// #autoload // #name = Bluez LAzMoRtAr // #version = 1.0 // #date = September 21,2001 // #author = {GEEZ} Bluez // #warrior = Bluez // #email = Blueztone@oldfogieshome.com // #web = http://www.tribes2hardware.com/dvs/ // #description = When bound key is pressed, mounts and fires Targeting laser..when released, it mounts the mortar. // #status = Release // #config = LazMortar_config if(!isObject(LazMortar)) { new scriptobject (LazMortar) { class = LazMortar; }; if($pref::Bluez_Lazmortar::Zoom $= "") { $pref::Bluez_Lazmortar::Zoom = true; $pref::Bluez_Lazmortar::MSG = false; } } function LazMortar_OPTS(%this) { new GuiControl(LazMortar_config) { profile = "GuiDefaultProfile"; horizSizing = "center"; vertSizing = "center"; position = "13 13"; extent = "373 327"; minExtent = "8 8"; visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; helpTag = "0"; new ShellPaneCtrl() { profile = "ShellPaneProfile"; horizSizing = "center"; vertSizing = "center"; position = "65 56"; extent = "251 138"; minExtent = "48 92"; visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; helpTag = "0"; text = "Laz Mortar Config"; longTextBuffer = "0"; maxLength = "255"; noTitleBar = "0"; new ShellFieldCtrl() { profile = "ShellFieldProfile"; horizSizing = "right"; vertSizing = "bottom"; position = "17 27"; extent = "217 94"; minExtent = "16 18"; visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; helpTag = "0"; }; new ShellToggleButton(LazmortarZoom) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom"; position = "47 37"; extent = "155 30"; minExtent = "26 27"; visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; variable = "$pref::Bluez_Lazmortar::Zoom"; helpTag = "0"; text = "ZOOM ON TOGGLE"; longTextBuffer = "0"; maxLength = "255"; }; new GuiTextCtrl(LazMortarText) { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; position = "62 70"; extent = "135 22"; minExtent = "8 8"; visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; helpTag = "0"; text = "TEAM MESSAGE TOGGLE:"; longTextBuffer = "0"; maxLength = "255"; }; new ShellToggleButton(LazmortarT_MSG) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom"; position = "47 85"; extent = "155 30"; minExtent = "26 27"; visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; variable = "$pref::Bluez_Lazmortar::MSG"; helpTag = "0"; text = "FIRE ON MY TARGET! "; longTextBuffer = "0"; maxLength = "255"; }; }; }; } package LazMortar { function OptionsDlg::onWake( %this ) { if (!$LazMortarToggle) { $RemapName[$RemapCount]="LazMortar"; $RemapCmd[$RemapCount]="LazMortarToggle"; $RemapCount++; $LazMortarToggle = true; } parent::onWake( %this ); } function LazMortarToggle(%val) { if ( %val ) { LazMortar.Zoom(); LazMortar.Fireontarget(); LazMortar.Fire(); use( TargetingLaser ); } else { LazMortar.Fire(); toggleZoom(0); use( Mortar ); } } function LazMortar::Fire(%this, %val) { $mvTriggerCount0 += $mvTriggerCount0 & 1 == %val ? 2 : 1; } function LazMortar::Zoom(%this) { if(!$pref::Bluez_Lazmortar::Zoom) return; toggleZoom(1); } function LazMortar::Fireontarget(%this) { if(!$pref::Bluez_Lazmortar::MSG) return; commandToServer( 'CannedChat', 'ChatTargetFire', false ); } }; activatepackage(LazMortar); LazMortar_OPTS();