commit c541a465b86b4453069ff6c6eda02647d30adaa5 Author: wcinquan Date: Fri Jul 11 23:55:47 2014 -0400 ProPack init and final release diff --git a/ProPack_Final/ProPack7.vl2 b/ProPack_Final/ProPack7.vl2 new file mode 100644 index 0000000..14bbc5b Binary files /dev/null and b/ProPack_Final/ProPack7.vl2 differ diff --git a/ProPack_Final/audio/headshot.wav b/ProPack_Final/audio/headshot.wav new file mode 100644 index 0000000..f084fa6 Binary files /dev/null and b/ProPack_Final/audio/headshot.wav differ diff --git a/ProPack_Final/audio/wbslap.wav b/ProPack_Final/audio/wbslap.wav new file mode 100644 index 0000000..8ec9c42 Binary files /dev/null and b/ProPack_Final/audio/wbslap.wav differ diff --git a/ProPack_Final/scripts/Propack/ProPackAutoChat.cs b/ProPack_Final/scripts/Propack/ProPackAutoChat.cs new file mode 100644 index 0000000..072ac78 --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackAutoChat.cs @@ -0,0 +1,133 @@ +// #category = ProPack +// #name = ProPack Auto Chat +// #version = 6.81 +// #date = June 30, 2001 +// #warrior = MeBaD +// #web = http://propack.tribes2.org +// #description = Auto Chat functions for ProPack +// #credit = Neofight, Widow, Blotter +// #status = vgrd + +package ProPackAutoChat { + + function ProPackAutoGenBoom(%msgType, %msgString, %victimname, %vgen, %vposs, %killername, %kgen, %kposs, %damageType) { + if ($ProPackPrefs::AutoGenBoom) { + if (Strstr(%msgString, "You received a") != -1) { // Make sure it's you + commandtoserver('TeamMessageSent', "Gens dead!~wene.generator"); + } + } + } + function ProPackAutoVPadBoom(%msgType, %msgString, %victimname, %vgen, %vposs, %killername, %kgen, %kposs, %damageType) { + if ($ProPackPrefs::AutoVPadBoom) { + if (Strstr(%msgString, "You received a") != -1) { // Make sure it's you + commandToServer('CannedChat', 'ChatEnemyVehicleDestroyed', false ); + } + } + } + + function ProPackAutoTaunt(%msgType, %msgString, %victimname, %vgen, %vposs, %killername, %kgen, %kposs, %damageType) { + + if ($ProPackPrefs::Autotaunt) { + + $ProPackTauntCount++; + + if ($ProPackTauntCount > 7) { + $ProPackTauntCount = 0; + } + + %killer = StripNameColors(detag(%killername)); + + if ((Strstr($PPName, %killer) != -1) && (Strlen(%killer) > 0)) { + issueChatCmd( $ProPackAutoTauntCM, $ProPackTauntCount ); + } + } + } + + function TauntLikeHell(%this) { + if (%this) { + cancel($YOUSPAMMINGBASTARD); + $ProPackTauntCount++; + + if ($ProPackTauntCount > 7) { + $ProPackTauntCount = 0; + } + + issueChatCmd( $ProPackAutoTauntCM, $ProPackTauntCount ); + + $YOUSPAMMINGBASTARD = schedule(500, 0, "TauntLikeHell", %this); + } else { + cancel($YOUSPAMMINGBASTARD); + } + } + + // Enables Editable chat menu's + ProPack Taunt variable + function addChat(%keyDesc, %command) { + if ($ProPackAutoTauntCM $= "") { + $ProPackAutoTauntCM = $CurrentChatMenu; + } + %key = firstWord(%keyDesc); + %text = restWords(%keyDesc); + %cm = $CurrentChatMenu; + + if (strstr(%command, "~w") != -1) { // with a ~ it must be custom! + %wav = firstWord(%command); + %isteam = restWords(%command); + %NewText = %text @ %wav; + %cm.bindCmd(keyboard, %key, "ProPackIssueChat(\"" @ %isteam @ "\",\"" @ %NewText @ "\");", ""); + } else { + parent::addChat(%keyDesc, %command); // so Custom voice packs can work + return; // so it dosen't screw up the menu counts + } + %cm.option[%cm.optionCount] = %key @ ": " @ %text; + %cm.command[%cm.optionCount] = %command; + %cm.isMenu[%cm.optionCount] = 0; + %cm.optionCount++; + } + + function ProPackIssueChat(%where, %what) { + if (%where $= "Team") { + commandtoserver('TeamMessageSent', %what); + } else { + commandtoserver('MessageSent', %what); + } + cancelChatMenu(); + } + + function DispatchLaunchMode() { + addMessageCallBack('MsgLegitKill', ProPackAutoTaunt); + addMessageCallBack('msgGenDes', ProPackAutoGenBoom); + addMessageCallBack('msgVSDes', ProPackAutoVPadBoom); + parent::DispatchLaunchMode(); + } + + function EnemyMute(%val) { + if (%val) { + for (%i = 0; %i < PlayerListGroup.getCount(); %i++) { + %object = PlayerListGroup.getObject(%i); + + if (%object.teamid != $PPTeam) { + if ((%object.chatMuted) && (!$EnemyTeamMuted)) { + // fixes the double bug stuff + } else { + commandToServer( 'TogglePlayerMute', %object.clientId ); //only mutes your enemy + } + } else { + if (%object.chatMuted) commandToServer( 'TogglePlayerMute', %object.clientId ); //clears any muted players on your team + } + } + schedule(1000, 0, "MuteNotice"); + } + } + + function MuteNotice() { + if ($EnemyTeamMuted) { + $EnemyTeamMuted = false; + addMessageHudLine( "\c4*** \c2Enemy Team Unmuted \c4***"); + } else { + $EnemyTeamMuted = true; + addMessageHudLine( "\c4*** \c2Enemy Team Muted \c4***"); + } + } + +}; +activatePackage(ProPackAutoChat); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackDemo.cs b/ProPack_Final/scripts/Propack/ProPackDemo.cs new file mode 100644 index 0000000..152e157 --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackDemo.cs @@ -0,0 +1,95 @@ +// #category = ProPack +// #name = ProPack Demo +// #version = 6.82 +// #date = September 29, 2001 +// #warrior = Neofight +// #email = neofight@tribes2.org +// #description = Static line like T1's old chat in InfoHud displays when you are recording a demo, reminds you to start one when in tourney mode, automatically names your demos for you and auto-stops them at the end of a map. +// #status = beta 6 +// #credit = DEDEN, MeBaD, Blotter, FSB-AO + +// Match demo reminder set-up +if(!isObject(MatchDemo)) { + new ScriptObject(MatchDemo) { + on = 0; + }; +} + +package ProPackDemo { + function beginDemoRecord() { + + error("demo started"); + + if(isDemo()) return; + stopDemoRecord(); // make sure that current recording stream is stopped + $DemoCount = 0; + %name = getField( $pref::Player[$pref::Player::Current], 0 ); + + for(%found = true; %found; $DemoCount++ ) { + %demonum = $DemoCount; + while (strlen(%demonum) < 4) %demonum = "0" @ %demonum; + %file = "recordings/" @ %name @ " - " @ $MissionName @ " - " @ %demonum @ ".rec"; + %found = isFile(%file); + } + + $DemoFile = %file; + $ProInfoDemo = "DEMO"; + AddProInfoLine("Demo: [" @ $DemoFile @ "]"); + + saveDemoSettings(); + startRecord(%file); + + if(!isRecordingDemo()) { // make sure start worked + deleteFile($DemoFile); + $ProInfoDemo = ""; + AddProInfoLine("Demo FAILED: [" @ $DemoFile @ "]"); + $DemoFile = ""; + } + } + + function demoRecordComplete() { + // tell the user + if($DemoFile !$= "") { + $ProInfoDemo = ""; + AddProInfoLine("Demo End: [" @ $DemoFile @ "]"); + $DemoFile = ""; + } + } + + function DemoReset(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) { + if(strstr(%msgString, "Free For All") != -1) + MatchDemo.on = 0; + } + + function ProPackDemoRemind(%msgType, %msgString, %time) { + if( !isRecordingDemo() && !isPlayingDemo() && MatchDemo.on && (strstr(%msgString, "Match starts in") != -1) ) { + if( %time $= "15") AddProInfoLine("Start Demo!" @ $ProInfoDemo); + if( %time $= "10") AddProInfoLine("Start Demo Now!" @ $ProInfoDemo); + if( %time $= "5" ) AddProInfoLine("Start Demo Now Fool!" @ $ProInfoDemo); + } + } + + // --- Overrides --- + function clientCmdPickTeamMenu(%teamA, %teamB) { + parent::clientCmdPickTeamMenu( %teamA, %teamB ); + MatchDemo.on = 1; + } + + function scheduleStopDemo() { + schedule(3000, 0, demoRecordComplete); + schedule(3000, 0, stopDemoRecord); + } + + function stopDemoRecord() { + parent::stopDemoRecord(); + if(MatchDemo.on) MatchDemo.on = 0; + } + function DispatchLaunchMode() { + addmessagecallback('MsgGameOver', scheduleStopDemo); + addMessageCallback('MsgMissionStart', ProPackDemoRemind); + addMessageCallback('MsgAdminForce', DemoReset); + addMessageCallback('MsgVotePassed', DemoReset); + parent::DispatchLaunchMode(); + } +}; +activatepackage(ProPackDemo); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackFixes.cs b/ProPack_Final/scripts/Propack/ProPackFixes.cs new file mode 100644 index 0000000..1a1f3f7 --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackFixes.cs @@ -0,0 +1,173 @@ +// #hide +// #category = ProPack +// #name = ProPack Fixes +// #version = 6.91 +// #date = November 21, 2001 +// #warrior = Neofight +// #description = Compilation of little T2 fixes from a variety of authors +// #status = Growing as fixes are discovered +// #credit = MeBaD, WegBert, Halide, liq, UberGuy, jsut, Neofight + +// If the screenshots path doesn't exist, create it. +$ProShotDirectory = new FileObject(); +$ProShotDirectory.openForWrite("screenshots/"); +$ProShotDirectory.close(); +$ProShotDirectory.delete(); +$ProShotDirectory = ""; + +package Fixes { + // FixRemap.cs + // by WegBert + function redoBrokenMapping( %actionMap, %device, %action, %cmd, %newIndex ) { + %actionMap.bind( %device, %action, %cmd ); + OP_RemapList.setRowById( %newIndex, buildFullMapString( %newIndex ) ); + } + + function RemapInputCtrl::onInputEvent( %this, %device, %action ) { + Parent::onInputEvent( %this, %device, %action ); + + if (%this.mode !$= "consoleKey") { + switch$ ( OP_ControlsPane.group ) { + case "Observer": + %actionMap = observerMap; + %cmd = $ObsRemapCmd[%this.index]; + + default: + %actionMap = moveMap; + %cmd = $RemapCmd[%this.index]; + } + + %prevMap = %actionMap.getCommand( %device, %action ); + if (%prevMap !$= %cmd && %prevMap !$= "") { + %mapName = getMapDisplayName( %device, %action ); + %prevMapIndex = findRemapCmdIndex( %prevMap ); + if (%prevMapIndex == -1) { + if (MessageBoxOKDlg.isAwake()) + Canvas.popDialog(MessageBoxOKDlg); + + MessageBoxYesNo( "FIXREMAP WARNING", + "\"" @ %mapName @ "\" is bound to the function \"" @ %prevMap @ "\"! The function may exist in a user script. do you still want to undo this mapping?", + "redoBrokenMapping(" @ %actionMap @ ", " @ %device @ ", \"" @ %action @ "\", \"" @ %cmd @ "\", " @ %this.index @ ");", "" ); + } + } + } + } + // Shrike reticle fix + // Halide + function CommanderMapGui::onSleep(%this) { + parent::onSleep(%this); + schedule(200,0,"ClientCmdDisplayHuds"); + } + // FOV Fix version 1.0 + // liq + function ClientCmdDisplayHuds() { + parent::ClientCmdDisplayHuds(); + schedule(150, 0, setFov, $pref::Player::defaultFov); + schedule(1000, 0, setFov, $pref::Player::defaultFov); // safety net + } + // Eliminate CenterPrint + // MeBaD + function clientCmdCenterPrint( %message, %time, %lines ) { + clientCmdBottomPrint( %message, %time, %lines ); + } + // T1-esque screenshots + // UberGuy + function doScreenShot(%val) { + %fileName = ""; + if(!%val) { + for(%found = true; %found; $ProPack::screenCount++ ) { + %suffix = $ProPack::screenCount @ "."; + while (strlen(%suffix) < 5) %suffix = "0" @ %suffix; + %fileName = "screenshots/ScreenShot" @ %suffix @ "png"; + %found = isFile(%fileName); + } + screenShot("base/" @ %fileName); + } + } + // .dso deletion on exit + // UberGuy + function quit() { + + %cnt = 0; + %tmpObj = new ScriptObject() {}; + for(%file = findFirstFile("*.dso"); %file !$= ""; %file = findNextFile("*.dso")) { + %tmpObj.file[%cnt++] = %file; + } + for (%i=0; %i<%cnt; %i++) { + deleteFile(%tmpObj.file[%i]); + } + %tmpObj.delete(); + return parent::quit(); + } + // TeamChat during Debrief GUI + // UberGuy + function DebriefGui::onWake(%this) { + parent::onWake(%this); + %bind = moveMap.getBinding(TeamMessageHud); + debriefMap.bind(getField(%bind, 0), getField(%bind, 1), TeamDebriefChat); + } + // Distinguish between global chat... + function toggleDebriefChat() { + DB_ChatEntry.teamChat = false; + parent::toggleDebriefChat(); + } + // ... and team chat + function teamDebriefChat() { + DB_ChatEntry.teamChat = true; + Canvas.pushDialog(DB_ChatDlg); + } + // Send that chat message + function DB_ChatEntry::sendChat(%this) { + %text = %this.getValue(); + if (%text !$= "") { + if (%this.teamChat) commandToServer('teamMessageSent', %text); + else commandToServer('messageSent', %text); + } + %this.setValue(""); + MessageHud_Edit.setValue(""); + Canvas.popDialog(DB_ChatDlg); + // No parent call + } + // Chathud Fix + // Qing + function resizeChatHud( %val ) { + if ( %val ) { + MainChatHud.nextChatHudLen(); + for(%i = 1; %i < 20; %i++) + schedule(%i * 10 ,0,pageDownMessageHud); + } + } + // StaticWaypointFix + // jsut + function CommanderTree::processCommand(%this, %command, %target, %typeTag) { + parent::processCommand(%this, %command, %target, %typeTag); + // special case? + if(%typeTag < 0) { + switch$(getTaggedString(%command)) { + // waypoints: tree owns the waypoint targets + case "CreateWayPoint": + %target.settext(%this.currentWaypointID); + return; + } + } + } + // no ammo weapon switch + // Neofight + function clientCmdSetAmmoHudCount(%amount) { + if(%amount == 0) + nextWeapon(true); + parent::clientCmdSetAmmoHudCount(%amount); + } + + // Hudmover calls for the new TR2 huds to be moveable + // Neofight + function PlayGui::onWake(%this) { + parent::onWake(%this); + if(isObject(HM) && isObject(HudMover)) { + hudmover::addhud(TR2EventHud, "TR2 Event Hud"); + hudmover::addhud(TR2BonusHud, "TR2 Jackpot Hud"); + hudmover::addhud(TR2_ThrowStrength, "TR2 Throw Indicator"); + } + } +}; +activatePackage(Fixes); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackFlag.cs b/ProPack_Final/scripts/Propack/ProPackFlag.cs new file mode 100644 index 0000000..57bc90f --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackFlag.cs @@ -0,0 +1,155 @@ +// #category = ProPack +// #name = ProPack Flag +// #version = 6.98 +// #date = October 7, 2001 +// #warrior = Neofight +// #email = neofight@tribes2.org +// #web = http://propack.tribes2.org +// #description = Transparent flag event pop-ups +// #status = beta +// #credit = Crunchy + +package ProPackFlag { + + function ProPackFlagHandleReturned(%msgType, %msgString, %clientname, %teamName, %team) { + %team = StripNameColors(detag(%team)); + %name = StripNameColors(detag(%clientname)); + + ProPackFlagPopup(%name, %team, "returned", "", ""); + } + + function ProPackFlagHandleTaken(%msgType, %msgString, %clientname, %teamName, %team) { + %team = StripNameColors(detag(%team)); + %name = StripNameColors(detag(%clientname)); + + ProPackFlagPopup(%name, %team, "took", "", ""); + } + + function ProPackFlagTR2Taken(%msgType, %msgString, %clientname, %teamName, %team) { + %team = StripNameColors(detag(%team)); + %name = StripNameColors(detag(%clientname)); + + if ($IHaveFlag) { + ProPackFlagPopup(%name, %team, "took", "", ""); + } else if (StrStr(%msgString, "Teammate") != -1) { + ProPackFlagPopup(%name, %team, "took", "", ""); + } else { + ProPackFlagPopup(%name, %team, "took", "", ""); + } + } + + function ProPackFlagHandleDropped(%msgType, %msgString, %clientname, %teamName, %team) { + %team = StripNameColors(detag(%team)); + %name = StripNameColors(detag(%clientname)); + + ProPackFlagPopup(%name, %team, "dropped", "", ""); + } + + function ProPackFlagHandleCapped(%msgType, %msgString, %clientname, %teamName, %team) { + %team = StripNameColors(detag(%team)); + %name = StripNameColors(detag(%clientname)); + + ProPackFlagPopup(%name, %team, "captured", "", ""); + } + + function ProPackFlagPopup(%clientname, %team, %action, %team1color, %team2color) { + %teamName = $clTeamScore[%team, 0]; + %name = StripNameColors(detag(%clientname)); + %color = (%team == $PPTeam) ? %team1color : %team2color; + + if (ProPackFlag.schedule != 0) cancel(ProPackFlag.schedule); + + if ($IHaveFlag) { + %text = %color@"You" SPC %action SPC "the flag!"; + } else if ( %name $= "0" || %name $= $PPName ) { + if (%action $= "took") %action = "taken"; + %text = %color@"The" SPC %teamname SPC "flag was" SPC %action@"!"; + } else { + %text = %clientname SPC %color@%action SPC "the" SPC %teamName SPC "flag!"; + } + + ProPackFlagText.setText(""@%text); + + if ($ProPackPrefs::FlagHudActive) { + ProPackFlag.setVisible(true); + } else { + ProPackFlag.setVisible(false); + } + + ProPackFlag.schedule = schedule(5000, 0, eval, "ProPackFlag.setVisible(false);"); + ProPackFlag.schedule = schedule(5000, 0, "ProPackFlagClearPopup"); + } + + function ProPackFlagClearPopup() { + ProPackFlagText.setText(""); + } + + function ProPackFlagCreate() { + ProPackFlagDestroy(); + + %ProFlagX = getWord($pref::Video::resolution, 0) * 0.5 - 160; + %ProFlagY = getWord($pref::Video::resolution, 1) * 0.8; + + new ShellFieldCtrl(ProPackFlag) { + profile = "GuiConsoleProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = %ProFlagX SPC %ProFlagY; + extent = "320 20"; + minExtent = "8 8"; + visible = "1"; + + new GuiMLTextCtrl(ProPackFlagText) { + profile = "ProPackTextCtrl"; + horizSizing = "center"; + vertSizing = "center"; + position = "0 0"; + extent = "318 18"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + }; + playgui.add(ProPackFlag); + } + + function ProPackFlagDestroy() { + if (isObject(ProPackFlag)) { + playGui.remove(ProPackFlag); + ProPackFlag.delete(); + } + } + + // --- Overrides --- + function clientCmdTogglePlayHuds(%val) { + if ( (%val) && ($ProPackPrefs::FlagHudActive) ) { + ProPackFlag.setVisible(true); + } else { + ProPackFlag.setVisible(false); + } + parent::clientCmdTogglePlayHuds(%val); + } + + function PlayGui::onWake(%this) { + parent::onWake(%this); + if (!isObject(ProPackFlag)) schedule(3000, 0, "ProPackFlagCreate"); + if(isObject(HM) && isObject(HudMover)) hudmover::addhud(ProPackFlag, "ProPackFlag"); + } + + function DispatchLaunchMode() { + addMessageCallback('MsgCTFFlagTaken', ProPackFlagHandleTaken); + addMessageCallback('MsgCTFFlagDropped', ProPackFlagHandleDropped); + addMessageCallback('MsgCTFFlagCapped', ProPackFlagHandleCapped); + addMessageCallback('MsgCTFFlagReturned', ProPackFlagHandleReturned); + addMessageCallback('MsgTeamRabbitFlagTaken', ProPackFlagHandleTaken); + addMessageCallback('MsgTeamRabbitFlagDropped', ProPackFlagHandleDropped); + addMessageCallback('MsgTeamRabbitFlagReturned', ProPackFlagHandleReturned); + addMessageCallback('MsgTR2FlagTaken', ProPackFlagTR2Taken); + addMessageCallback('MsgTR2FlagDropped', ProPackFlagHandleDropped); + + parent::DispatchLaunchMode(); + } +}; +activatePackage(ProPackFlag); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackFlagTrixy.cs b/ProPack_Final/scripts/Propack/ProPackFlagTrixy.cs new file mode 100644 index 0000000..b45f77c --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackFlagTrixy.cs @@ -0,0 +1,79 @@ +// #category = ProPack +// #name = ProPack Flag Trixy +// #version = 0.1 +// #date = June 30, 2001 +// #warrior = MeBaD +// #web = http://propack.tribes2.org +// #description = Tricc Flag Stats +// #credit = (From AutoChat: Neofight, Widow, Blotter) +// #status = Workin + +package ProPackFlagTrixy { + + function ProPackAutoGotFlag(%msgType, %msgString, %victimname, %vgen, %vposs, %killername, %kgen, %kposs, %damageType) { + if ($ProPackPrefs::AutoGotFlag) { + if (Strstr(%msgString, "You took the") != -1) { // Make sure it's you as the taker! + $ProPackYellHelp = schedule( 5000, 0, "commandToServer", 'CannedChat', 'ChatHelp', false ); // issue's the command + + if ($ProPackPrefs::AutoGrabSpeed) { + + %speed = mFloor(getControlObjectSpeed() * 3.6); + + // New settings for classic + if (%speed < 100) { + %saying = $ProPackPrefs::GrabSpeedText1; + } else if (%speed < 175) { + %saying = $ProPackPrefs::GrabSpeedText2; + } else if (%speed < 250) { + %saying = $ProPackPrefs::GrabSpeedText3; + } else if (%speed < 300) { + %saying = $ProPackPrefs::GrabSpeedText4; + } else { + %saying = $ProPackPrefs::GrabSpeedText5; + } + + if (%speed > $ProPackPrefs::FlagGrabClocked) { + $ProPackPrefs::FlagGrabClocked = %speed; + $ProPackPrefs::MapGrabSpeed = $MissionName; + %words = "You clocked a NEW record of: "; + export("$ProPackPrefs::*", "prefs/ProPackPrefs.cs", false); + } else { + %words = "Current Record: "; + } + + if ($ProPackPrefs::AddPeek) { + commandtoserver('TeamMessageSent', "\c2" @ %saying @ " \c4[\c1" @ %speed @ " kph\c4] \c2InBound Peek \c4[\c1" @ $ProPackPeekSpd @ " kph\c4]~wflg.flag"); + ClientCmdbottomprint("" @ %words @ "" @ $ProPackPrefs::FlagGrabClocked @ " Map : " @ $ProPackPrefs::MapGrabSpeed @ + "\nRoute Peek Record:" @ $ProPackPrefs::SpeedPeekRecord, 5, 2); + $ProPackPeekSpd = 0; // Reset so the outbound route is on it's own + } else { + commandtoserver('TeamMessageSent', "\c2" @ %saying @ " \c4[\c1" @ %speed @ " kph\c4]~wflg.flag"); + ClientCmdbottomprint("" @ %words @ "" @ $ProPackPrefs::FlagGrabClocked @ " Map : " @ $ProPackPrefs::MapGrabSpeed, 5); + } + } + } + } + } + + function YouDeadWhileRaggin(%msgType, %msgString) { + if ((detag(%msgType) $= "MsgCTFFlagCapped") && (Strstr(%msgString, "You captured the") != -1)) { + if ($ProPackPrefs::AutoGotFlag) { + if ($ProPackPrefs::AddPeek) { + commandtoserver('TeamMessageSent', "\c2Capped at->\c4[\c1" @ mFloor(getControlObjectSpeed() * 3.6) @ " kph\c4] \c2Return Peek->\c4[\c1" @ $ProPackPeekSpd @ " kph\c4]~wgbl.woohoo"); + $ProPackPeekSpd = 0; + } else { + commandtoserver('TeamMessageSent', "\c2Capped at->\c4[\c1" @ mFloor(getControlObjectSpeed() * 3.6) @ " kph\c4]~wgbl.woohoo"); + } + } + } + cancel($ProPackYellHelp); // so you don't yell help for no reason! + } + + function DispatchLaunchMode() { + addMessageCallBack('MsgCTFFlagTaken', ProPackAutoGotFlag); + addMessageCallBack('MsgCTFFlagDropped', YouDeadWhileRaggin); + addMessageCallBack('MsgCTFFlagCapped', YouDeadWhileRaggin); + parent::DispatchLaunchMode(); + } +}; +activatePackage(ProPackFlagTrixy); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackInfo.cs b/ProPack_Final/scripts/Propack/ProPackInfo.cs new file mode 100644 index 0000000..60b3e65 --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackInfo.cs @@ -0,0 +1,378 @@ +// #category = ProPack +// #name = ProPack Info +// #version = 6.52 +// #description = Transparent, mesage-filtering, kill-stripping, color-coded, information-rich HUD from hell. +// #status = Beta +// #date = June 3, 2001 +// #web = http://propack.tribes2.org +// #warrior = MeBaD +// #credit = Neofight, UberGuy, Ego + +package ProPackInfo { + + function ClearProPackInfo() { + $ProInfoline[1] = ""; + $ProInfoline[2] = ""; + $ProInfoline[3] = ""; + $ProInfoline[4] = ""; + $ProInfoline[5] = ""; + $ProInfoline[6] = ""; + $ProInfoDemo = ""; + $ProInfoTask = ""; + AddProInfoLine(%null); + } + + function AddProInfoLine(%text, %msgType) { + $ProInfoline[1] = $ProInfoline[2]; + $ProInfoline[2] = $ProInfoline[3]; + $ProInfoline[3] = $ProInfoline[4]; + $ProInfoline[4] = $ProInfoline[5]; + $ProInfoline[5] = $ProInfoline[6]; + $ProInfoline[6] = %text; + + ProPackInfoText.setText($ProInfoline[1] @ "\n" @ + $ProInfoline[2] @ "\n" @ + $ProInfoline[3] @ "\n" @ + $ProInfoline[4] @ "\n" @ + $ProInfoline[5] @ "\n" @ + $ProInfoline[6] @ "\n" @ + $ProInfoDemo SPC $ProInfoTask); + } + + function clientTaskCompleted() { + if((TaskList.currentTask != -1) && isObject(TaskList.currentTask)) { + %temptask = $ProInfoTask; + $ProInfoTask = ""; + AddProInfoLine(%temptask @ " Completed!"); + } + parent::clientTaskCompleted(); + } + + function clientCmdAcceptedTask(%desc) { + $ProInfoTask = "" @ StripNameColors(%desc); + AddProInfoLine("Task: " @ $ProInfoTask ); + } + + // This mutes the [V**] keys and fixes the dynamix "error" not allowing us to edit the chat menu :\ + function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) { + + %message = detag( %msgString ); + %voice = detag( %voice ); // Moved the original detag fix to here so all sounds can be used. + + if($ProPackPrefs::MuteSpammers) { + //stfu spammers!!!!! + if($SpammerSTFU[%sender] $= %message) { + return; + } + $SpammerSTFU[%sender] = %message; + } + + // Mute out [VGX] stuff - Uber Chat with a slight twist + if ($ProPackPrefs::MuteDefaultKeys) { + %color = getSubStr(%message,0,1); + + if (%color $= "[") { + %pos = strpos(%message,"]"); + %color = getSubStr(%message,%pos+2,1); //Skip end ] and color code + %pos+=3; + } + + %message = %color @ getSubStr(%message,%pos,strlen(%message)-%pos); + } + + if ( ( %message $= "" ) || isClientChatMuted( %sender ) ) + return; + + // search for wav tag marker + %wavStart = strstr( %message, "~w" ); + if ( %wavStart == -1 ) + addMessageHudLine( %message ); + + else + if(strstr(%message, "~wK") !=-1) { //THANKS to Ego for the voicepack.cs fix!!! + %voice = "custom"; //Assign our base directory here. + %wav = getSubStr(%message, %wavStart + 3, 1000); //Move the name three spaces for our delim + %wavFile = "voice/" @ %voice @ "/" @ %wav @ ".wav"; + if (%pitch < 0.5 || %pitch > 2.0) + %pitch = 1.0; + %wavLengthMS = alxGetWaveLen(%wavFile) * %pitch; + if ( $ClientChatHandle[%sender] != 0 ) + alxStop( $ClientChatHandle[%sender] ); + $ClientChatHandle[%sender] = alxCreateSource( AudioChat, %wavFile ); + if (%pitch != 1.0) + alxSourcef($ClientChatHandle[%sender], "AL_PITCH", %pitch); + alxPlay( $ClientChatHandle[%sender] ); + %message = getSubStr(%message, 0, %wavStart); + addMessageHudLine(%message); + } + + else + { + %wav = getSubStr(%message, %wavStart + 2, 1000); + if (%voice !$= "") + %wavFile = "voice/" @ %voice @ "/" @ %wav @ ".wav"; + else + %wavFile = %wav; + //only play voice files that are < 5000ms in length + if (%pitch < 0.5 || %pitch > 2.0) + %pitch = 1.0; + %wavLengthMS = alxGetWaveLen(%wavFile) * %pitch; + if (%wavLengthMS < $MaxMessageWavLength ) + { + if ( $ClientChatHandle[%sender] != 0 ) + alxStop( $ClientChatHandle[%sender] ); + $ClientChatHandle[%sender] = alxCreateSource( AudioChat, %wavFile ); + + //pitch the handle + if (%pitch != 1.0) + alxSourcef($ClientChatHandle[%sender], "AL_PITCH", %pitch); + alxPlay( $ClientChatHandle[%sender] ); + } + else + error( "** WAV file \"" @ %wavFile @ "\" is too long! **" ); + + %message = getSubStr(%message, 0, %wavStart); + addMessageHudLine(%message); + } + } + + function addMessageHudLine(%text) { + if ($ProPackPrefs::MuteToolsActive) { + // these are the 4 exceptions with either no callback or a shitty one + if (($ProPackPrefs::MuteToolsHackzorLoadout !$= "") && (Strstr(%text, "Inventory set") != -1 || Strstr(%text, "Inventory updated") != -1)) { + switch$ ($ProPackPrefs::MuteToolsHackzorLoadout) { + case "Append-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorLoadout_Append SPC StripNameColors(%text)); + case "Alter/Split-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorLoadout_Append); + case "BottomPrint": + clientCmdBottomPrint($ProPackPrefs::MuteToolsHackzorLoadout_Append SPC StripNameColors(%text), 3, 1); + } + return; + } + if (($ProPackPrefs::MuteToolsHackzorKitPickup !$= "") && (Strstr(%text, "picked up a repair kit.") != -1)) { + switch$ ($ProPackPrefs::MuteToolsHackzorKitPickup) { + case "Append-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorKitPickup_Append SPC StripNameColors(%text)); + case "Alter/Split-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorKitPickup_Append); + case "BottomPrint": + clientCmdBottomPrint($ProPackPrefs::MuteToolsHackzorKitPickup_Append, 3, 1); + } + return; + } + if (($ProPackPrefs::MuteToolsHackzorPackOn !$= "") && ((Strstr(%text, "pack on.") != -1) || (Strstr(%text, "pack activated.") != -1))) { + switch$ ($ProPackPrefs::MuteToolsHackzorPackOn) { + case "Append-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorPackOn_Append SPC StripNameColors(%text)); + case "Alter/Split-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorPackOn_Append); + case "BottomPrint": + clientCmdBottomPrint($ProPackPrefs::MuteToolsHackzorPackOn_Append SPC StripNameColors(%text), 3, 1); + } + return; + } + if (($ProPackPrefs::MuteToolsHackzorPackOff !$= "") && (Strstr(%text, "pack off.") != -1)) { + switch$ ($ProPackPrefs::MuteToolsHackzorPackOff) { + case "Append-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorPackOff_Append SPC StripNameColors(%text)); + case "Alter/Split-to-InfoHud": + AddProInfoLine($ProPackPrefs::MuteToolsHackzorPackOff_Append); + case "BottomPrint": + clientCmdBottomPrint($ProPackPrefs::MuteToolsHackzorPackOff_Append SPC StripNameColors(%text), 3, 1); + } + return; + } + } + parent::addMessageHudLine(%text); + } + + // from Uber's chat with a ProPack twist + function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) { + + if ( %msgString $= "" ) return; + %subType = detag(%msgType); + %msgs = %msgString; + + if ($ProPackPrefs::MuteToolsActive) { // this IS defaultmessagecallback IF it is muted + + %ProPackCheckMute = $ProPackPrefs::MuteTools[%subType]; + + if ((%ProPackCheckMute !$= "") && (%subType !$= "")) { //($ProPackPrefs::InfoHudActive) ?? duh .. it should be anyhow :o + if (Strstr(%msgString, "picked up a repair kit.") == -1) { + switch$ (%ProPackCheckMute) { + case "Append-to-InfoHud": + %fill = true; + AddProInfoLine($ProPackPrefs::MuteTools[%subType @ "_Append"] @ StripNameColors(detag(%msgs))); + case "Alter/Split-to-InfoHud": + %fill = true; + AddProInfoLine($ProPackPrefs::MuteTools[%subType @ "_Append"]); + case "BottomPrint": + %fill = true; + clientCmdBottomPrint($ProPackPrefs::MuteTools[%subType @ "_Append"], 3, 1); + default: // case "Mute": + %fill = true; + } + } else { + %fill = false; // let it pass to AddMessageHudLine cause it's easier to handle + } + } + if (%fill) { + %message = detag( %msgString ); + // search for wav tag marker + %wavStart = strstr( %message, "~w" ); + if ( %wavStart != -1 ) { + %wav = getSubStr( %message, %wavStart + 2, 1000 ); + %wavLengthMS = alxGetWaveLen( %wav ); + if ( %wavLengthMS <= $MaxMessageWavLength ) { + alxPlay(alxCreateSource( AudioChat, %wav )); + } else { + error( "WAV file \"" @ %wav @ "\" is too long! **" ); + } + } + return; // wav only + } + } + + if ($ProPackPrefs::CKillsActive) { + if ( %subType $= "msgSuicide" || %subType $= "msgVehicleCrash" || %subType $= "msgTR2Knockdown" || (strstr(%subType,"Kill") != -1 )) { + + %vict = detag(%a1); + %kllr = detag(%a4); + + if ($MyPlayerID[%vict].teamId == $PPTeam) { + if (StripNameColors(%vict) $= $PPName) { + %Provc = "\c3"; + %vc = ""; + } else { + %Provc = "\c1"; + %vc = ""; + } + } else { + %Provc = "\c5"; + %vc = ""; + } + + if ($MyPlayerID[%kllr].teamId == $PPTeam) { + if (StripNameColors(%kllr) $= $PPName) { + %Prokc = "\c3"; + %kc = ""; + } else { + %Prokc = "\c1"; + %kc = ""; + } + } else { + %Prokc = "\c5"; + %kc = ""; + } + + if (($ProPackPrefs::DeathMessages) && ($ProPackPrefs::InfoHudActive)) { + if (%subType $= "msgVehicleCrash") + %a7 = 36; // to fix the nexuscamping crap in CTF + + %weapon = ProNoSpacedWeaponName(%a7); //%weapon = $DamageTypeText[%a7]; + %kllr = StripNameColors(%kllr); + %vict = StripNameColors(%vict); + + if (%kllr $= %vict) { + %weapon = "Suicide"; + %vict = ""; + } + + if ((Strlen(%weapon) < 1)) { + return; + } else { + %msg = %kc@%kllr @ " " @ %weapon @ " " @ %vc@%vict; + } + + AddProInfoLine(%msg); + return; // mute from normal chat menu + } else { + if (%vict !$= "") { + %msgs = strreplace(%msgs,%vict,%Provc@%vict@"\c0"); + } + if (%kllr !$= "" && %kllr !$= %vict) { + %msgs = strreplace(%msgs,%kllr,%Prokc@%kllr@"\c0"); + } + } + } + } + parent::defaultMessageCallback(%msgType, %msgs, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); + } + + //------------------------------------- + // Handle ProInfo Chat Menu GUI + //------------------------------------- + function ProPackInfoCreate() { + ProPackInfoDestroy(); + + %ProInfoX = getWord(outerChatHud.position, 0) + getWord(outerChatHud.extent, 0) + 4; + %ProInfoY = 0; + + new ShellFieldCtrl(ProPackInfo) { + profile = "GuiConsoleProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = %ProInfoX SPC %ProInfoY; + extent = "280 124"; + minExtent = "8 8"; + visible = "1"; + + new GuiMLTextCtrl(ProPackInfoText) { + profile = "ProPackTextCtrl"; + horizSizing = "center"; + vertSizing = "center"; + position = "0 0"; + extent = "280 124"; + minExtent = "4 4"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = -1; + }; + }; + playgui.add(ProPackInfo); + } + + function ProPackInfoDestroy() { + if (isObject(ProPackInfo)) { + playgui.remove(ProPackInfo); + ProPackInfo.delete(); + } + } + + // --- Overrides --- + function clientCmdTogglePlayHuds(%val) { + if ($ProPackPrefs::InfoHudActive) { + ProPackInfo.setVisible(%val); + } + parent::clientCmdTogglePlayHuds(%val); + } + + function demoPlaybackComplete() { + ClearProPackInfo(); + parent::demoPlaybackComplete(); + } + + function Disconnect() { + ClearProPackInfo(); + parent::Disconnect(); + } + + function PlayGui::onWake(%this) { + parent::onWake(%this); + if (!isobject(ProPackInfo)) schedule(3000, 0, "ProPackInfoCreate"); + if(isObject(HM) && isObject(HudMover)) hudmover::addhud(ProPackInfo, "ProPackInfo"); + } + + function DispatchLaunchMode() { + addMessageCallBack('MsgGameOver', ClearProPackInfo); + addMessageCallBack('MsgArenaRoundEnd', ClearProPackInfo); + addMessageCallBack('MsgSiegeHalftime', ClearProPackInfo); + addMessageCallBack('MsgMissionDropInfo', ClearProPackInfo); + addMessageCallBack('MsgAdminChangeMission', ClearProPackInfo); + parent::DispatchLaunchMode(); + } +}; +activatePackage(ProPackInfo); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackJoinRetry.cs b/ProPack_Final/scripts/Propack/ProPackJoinRetry.cs new file mode 100644 index 0000000..3e41897 --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackJoinRetry.cs @@ -0,0 +1,74 @@ +// #category = ProPack +// #name = ProPack Join & Retry +// #version = 1.21 +// #date = October 13, 2001 +// #warrior = Neofight +// #description = Join & Retry +// #status = Good enough ;) +// #credit = PJ + +package JoinRetry { + function onConnectRequestRejected( %msg ) { + switch$(%msg) { + + case "CR_INVALID_CONNECT_PACKET": + %error = "Network error - badly formed network packet - this should not happen!"; + case "CR_AUTHENTICATION_FAILED": + %error = "Failed to authenticate with server. Please restart TRIBES 2 and try again."; + case "CR_YOUAREBANNED": + %error = "You are not allowed to play on this server."; + case "CR_SERVERFULL": + %error = "This server is full."; + default: + %error = "Connection error. Please try another server. Error code: (" @ %msg @ ")"; + } + DisconnectedCleanup(); + + if(%msg !$= "CR_SERVERFULL") { + MessageBoxOK( "REJECTED", %error); + } else { + $RetryTimer = 3; + AutoConnect(); + } + } + + function AutoConnect() { + Canvas.popDialog( MessageBoxOKDlg ); + + MessageBoxOK("Retrying Server", "\nServer: " @ $JoinGameAddress @ "\nThis server is full.\nRetrying in " @ $RetryTimer @ " seconds.", "ConnectButtonResult();" ); + + if($RetryTimer == 0) { + Canvas.popDialog( MessageBoxOKDlg ); + JoinGame($JoinGameAddress); + } else { + $RetryTimer--; + $RetrySchedule = schedule(1000, 0, "AutoConnect"); + } + } + + function ConnectButtonResult() { + cancel($RetrySchedule); + Canvas.popDialog( MessageBoxOKDlg ); + } + + function OP_LaunchScreenMenu::init( %this ) { + %this.clear(); + %this.add( "Join Game", 1 ); + %this.add( "Host Game", 2 ); + %this.add( "Warrior Setup", 3 ); + %this.add( "Email", 4 ); + %this.add( "Chat", 5 ); + %this.add( "Browser", 6 ); + } + + function OpenLaunchTabs(%gotoWarriorSetup) { + switch$($pref::Shell::LaunchGui) { + case "Join Game" : + GM_TabView.setSelected(1); + case "Host Game" : + GM_TabView.setSelected(2); + } + parent::OpenLaunchTabs(%gotoWarriorSetup); + } +}; +activatePackage(JoinRetry); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackMulti.cs b/ProPack_Final/scripts/Propack/ProPackMulti.cs new file mode 100644 index 0000000..f20ecdb --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackMulti.cs @@ -0,0 +1,148 @@ +// #category = ProPack +// #name = ProPack Multi +// #version = 4.38 +// #date = 10/5/2001 +// #warrior = Neofight +// #email = neofight@tribes2.org +// #web = http://propack.tribes2.org +// #description = FPS, Ping, Speed, Altitude all toggleable within ProPackInterface +// #status = Beta 3 +// #Credit = Crunchy, MeBaD + +package ProPackMulti { + + // --- PING --- + function NetBarHud::infoUpdate(%this, %ping, %packetLoss, %sendPackets, %sendBytes, %receivePackets, %receiveBytes) { + parent::infoUpdate(%this, %ping, %packetLoss, %sendPackets, %sendBytes, %receivePackets, %receiveBytes); + $ppping = mFloor(%ping); + } + + function ProPackPingRateCheck() { + if ($ppping > 999) $ppping = 999; + + if ($ppping < 75) { + %ProPackPingText = "00FF00"; + } else if ( ($ppping >= 125) && ($ppping < 150) ) { + %ProPackPingText = "FFFF00"; + } else if ($ppping >= 150) { + %ProPackPingText = "FF0000"; + } else { + %ProPackPingText = "FFFFFF"; + } + return "" @ $ppping; + } + + // --- FPS --- + function ProPackFPSRateCheck() { + + if ($fps::real < 30) { + %ProPackFPSText = "FF0000"; + } else if (($fps::real >= 60) && ($fps::real < 90)) { + %ProPackFPSText = "FFFF00"; + } else if ($fps::real >= 90) { + %ProPackFPSText = "00FF00"; + } else { + %ProPackFPSText = "FFFFFF"; + } + return "" @ mFloor($fps::real); + } + + // --- HUD Text --- + function ProPackMultiUpdate() { + cancel($ProPackMultiSchedule); + + %speed = mFloor(getControlObjectSpeed() * 3.6); + + if ($ProPackPrefs::FPSHud) { + $ProMulti[1] = "FPS " @ ProPackFPSRateCheck() @ "\n"; + } + + if ($ProPackPrefs::PingHud) { + $ProMulti[2] = "Ping " @ ProPackPingRateCheck() @ "\n"; + } + + if ($ProPackPrefs::SpeedHud) { + $ProMulti[4] = "Spd " @ %speed @ "\n"; + + } + + if ($ProPackPrefs::AltHud) { + $ProMulti[3] = "Alt " @ getControlObjectAltitude() @ "\n"; + } + + if ($ProPackPrefs::PeekSpeedHud) { + if (%speed == 0) { // Reset if you stop + $ProPackPeekSpd = 0; + } else if ((%speed > $ProPackPeekSpd) && ($ProPackPrefs::AddPeek)) { // Added in for Peek Speed + $ProPackPeekSpd = %speed; + // Debug - addMessageHudLine( "\c4***\c2Peek Speed: [" @ $ProPackPeekSpd @ "]\c4***"); + } + + if ($ProPackPrefs::SpeedPeekRecord < %speed) { + $ProPackPrefs::SpeedPeekRecord = %speed; + } + $ProMulti[5] = "Peek " @ $ProPackPeekSpd @ "\n"; + } + + ProPackMultiText.setText($ProMulti[1] @ $ProMulti[2] @ $ProMulti[3] @ $ProMulti[4] @ $ProMulti[5]); + + $ProPackMultiSchedule = schedule(500, 0, "ProPackMultiUpdate"); + } + + + // --- MultiGUI --- + function ProPackMultiCreate() { + ProPackMultiDestroy(); + + %ProMultiX = getWord($pref::Video::resolution, 0) - 44; + %ProMultiY = getWord(hudClusterBack.position, 1) + getWord(hudClusterBack.extent, 1) + 2; + + new ShellFieldCtrl(ProPackMulti) { + profile = "GuiConsoleProfile"; + horizSizing = "left"; + vertSizing = "bottom"; + position = %ProMultiX SPC %ProMultiY; + extent = "42 80"; + minExtent = "8 8"; + visible = "1"; + + new GuiMLTextCtrl(ProPackMultiText) { + profile = "ProPackTextCtrl"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "42 80"; + visible = "1"; + }; + }; + playGui.add(ProPackMulti); + + $ProPackMultiSchedule = schedule(1000, 0, "ProPackMultiUpdate"); + } + + function ProPackMultiDestroy() { + if ($ProPackMultiSchedule !$= "") + cancel($ProPackMultiSchedule); + + if (isObject(ProPackMulti)) { + playGui.remove(ProPackMulti); + ProPackMulti.delete(); + } + } + + // --- Overrides --- + function clientCmdTogglePlayHuds(%val) { + ProPackMulti.setVisible(%val); + parent::clientCmdTogglePlayHuds(%val); + } + + function PlayGui::onWake(%this) { + parent::onWake(%this); + if (!isobject(ProPackMulti)) { + schedule(3000, 0, "ProPackMultiCreate"); + schedule(3000, 0, "ProPackMultiUpdate"); + } + if(isObject(HM) && isObject(HudMover)) hudmover::addhud(ProPackMulti, "ProPackMulti"); + } +}; +activatePackage(ProPackMulti); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackObjective.cs b/ProPack_Final/scripts/Propack/ProPackObjective.cs new file mode 100644 index 0000000..160702f --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackObjective.cs @@ -0,0 +1,838 @@ + // #category = ProPack +// #name = ProPack Objective +// #version = 6.99 +// #description = Simple, small, transparent, information-rich, non-ghey objectives HUD. +// #status = Beta 2 +// #date = 11/14/2001 +// #warrior = MeBaD +// #credit = Neofight +// #web = http://propack.tribes2.org + +// Positions +$ProScorePOS[1280] = "1095 42"; +$ProScorePOS[1152] = "963 42"; +$ProScorePOS[1024] = "847 42"; +$ProScorePOS[800] = "617 42"; + +// Arena Support information +$ArenaSupport::LocalVersion = 1.0; +$ArenaSupport::RemoteVersion = 0; +$ArenaSupport::TeamCount = 2; + +package ProPackObjective { + + //***************************************// + // The One and Only ObjectiveHUD // + //***************************************// + + function teamScoreIs(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::teamScoreIs(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %teamNum = detag(%a1); + %score = detag(%a2); + if(%score $= "") %score = 0; + UpdateProScore(%teamNum, %score); + } + + function YourScoreIs(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::YourScoreIs(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + $ProScoreis = detag(%a1); + $ProScore[1] = $ProScoreis; + $ProScore[2] = ""; + + UpdateProScore(1); + } + + function ClientCmdDisplayHuds() { + switch$ ($HudMode) { + case "Pilot": + ProHudStatus.setVisible($ProPackPrefs::StatusHudActive); + ProHudScore.setVisible($ProPackPrefs::ScoreHudActive); + case "Passenger": + ProHudStatus.setVisible($ProPackPrefs::StatusHudActive); + ProHudScore.setVisible($ProPackPrefs::ScoreHudActive); + case "Object": + ProHudStatus.setVisible($ProPackPrefs::StatusHudActive); + PPTR2CarrierHealth.setVisible($ProPackPrefs::StatusHudActive); + ProHudScore.setVisible($ProPackPrefs::ScoreHudActive); + case "Observer": + ProHudStatus.setVisible(false); + PPTR2CarrierHealth.setVisible(false); + ProHudScore.setVisible($ProPackPrefs::ScoreHudActive); + case "PickTeam": + ProHudStatus.setVisible(false); + PPTR2CarrierHealth.setVisible(false); + ProHudScore.setVisible($ProPackPrefs::ScoreHudActive); + case "SiegeHalftime": + ProHudStatus.setVisible(false); + ProHudScore.setVisible(false); + default: + ProHudStatus.setVisible(false); + PPTR2CarrierHealth.setVisible(false); + ProHudScore.setVisible(false); + } + parent::ClientCmdDisplayHuds(); + } + + function setupObjHud(%gameType) { + for (%i = 1; %i < 3; %i++) { + $ProTeam[%i] = ""; + $ProScore[%i] = ""; + $ProStatus[%i] = ""; + } + $ProScoreis = ""; + $ProSingleScore = ""; + $ProDMKills = ""; + $ProDMDeaths = ""; + $ProSiegeTeamCheck = 0; + + switch$ (%gameType) { + case BountyGame: + $ProSingleScore = "Score: "; + case RabbitGame: + $ProSingleScore = "Score: "; + case DMGame: + $ProSingleScore = "Score: "; + case SiegeGame: + $ProSingleScore = "->"; + $ProSiegeTeamCheck = 1; + case HuntersGame: + $ProSingleScore = "Score: "; + case TeamRabbitGame: + // just for grins + case ArenaGame: + // just for grins + case TR2Game: + // just for grins + } + echo("Overriding gametype for ProPackObjectiveHud ... " @ %gameType); + UpdateProStatus(); + + parent::setupObjHud(%gameType); + } + + //--------------------------------------------------------------- + // Handle all hunters Events + //--------------------------------------------------------------- + function huntAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::huntAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + %teamNum = detag(%a1); + %teamName = detag(%a2); + %score = detag(%a3); + + $ProTeam[%teamNum] = %teamName; + $ProScore[%teamNum] = %score; + UpdateProScore(); + } + + function huntYouHaveFlags(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::huntYouHaveFlags(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + %numFlags = detag(%a1); + $ProStatus[1] = "Flags: " @ %numFlags; + + %FlagValue = 0; + for (%i = %numFlags; %i > 0; %i--) { + %FlagValue = %FlagValue + %i; + } + + $ProStatus[2] = "Value: " @ %FlagValue; + UpdateProStatus(); + } + + //--------------------------------------------------------------- + // Handle all Siege Events + //--------------------------------------------------------------- + function siegeAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::siegeAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %teamNum = detag(%a1); + if(detag(%a3)) + %role = "CAPTURE"; + else + %role = "PROTECT"; + + if ($PPTeam == %teamNum) { + $ProScore[1] = %role; + $ProScore[2] = ""; + UpdateProScore(1); + } + } + + function siegeRolesSwitched(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::siegeRolesSwitched(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + %newOff = detag(%a2); + %newDef = %newOff == 1 ? 2: 1; + + if ($PPTeam == %newOff) { + $ProScore[1] = "CAPTURE"; + } else if ($PPTeam == %newDef) { + $ProScore[1] = "PROTECT"; + } else { + $ProScore[1] = ""; + } + $ProScore[2] = ""; + UpdateProScore(1); + } + + function ProSiegeRoleSwitch(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + if ($ProSiegeTeamCheck) { + if (Strstr($ProScore[1], PROTECT) != -1) { + $ProScore[1] = "CAPTURE"; + } else { + $ProScore[1] = "PROTECT"; + } + $ProScore[2] = ""; + UpdateProScore(1); + } + } + + //--------------------------------------------------------------- + // Handle all Wabbit Events + //--------------------------------------------------------------- + function rabbitFlagTaken(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::rabbitFlagTaken(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %bunny = StripNameColors(detag(%a1)); + + if ( %bunny $= detag($PPName) ) { + $ProStatus[1] = "RUN!!!"; + } else { + $ProStatus[1] = %bunny; + } + UpdateProStatus(); + } + + function rabbitFlagDropped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::rabbitFlagDropped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + $ProStatus[1] = "< Dropped >"; + UpdateProStatus(); + } + + function rabbitFlagReturned(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::rabbitFlagReturned(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + $ProStatus[1] = "< Home >"; + UpdateProStatus(); + } + + function rabbitFlagStatus(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::rabbitFlagStatus(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %flagStatus = StripNameColors(detag(%a1)); + $ProStatus[1] = %flagStatus; + UpdateProStatus(); + } + + //--------------------------------------------------------------- + // Handle all Team Wabbit Events: Neo's adaptation of the release from the mod author, Juno + //--------------------------------------------------------------- + function teamRabbitAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + %teamNum = detag(%a1); + %teamName = detag(%a2); + %flagStatus = detag(%a3); + %score = detag(%a4); + + $ProScore[%teamNum] = ""; + $ProStatus[%teamNum] = ""; + + $ProScore[%teamNum] = %score; + $ProTeam[%teamNum] = %teamName; + $ProStatus[%teamNum] = %flagStatus; + + UpdateProScore(%teamNum, %score); + UpdateProStatus(); + } + + function teamRabbitFlagTaken(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + %index = detag(%a3); + %bunny = detag(%a4); + + if ( %bunny $= detag($PPName) ) { + %bunny = "RUN!!!"; + } + + switch (%index) { + case 1: + $ProStatus[1] = ""; + $ProStatus[2] = %bunny; + + case 2: + $ProStatus[1] = %bunny; + $ProStatus[2] = ""; + } + UpdateProStatus(); + } + + function teamRabbitFlagDropped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + %index = detag(%a2); + + switch (%index) { + case 1: + $ProStatus[1] = ""; + $ProStatus[2] = ""; + + case 2: + $ProStatus[1] = ""; + $ProStatus[2] = ""; + } + UpdateProStatus(); + } + + function teamRabbitFlagReturned(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + $ProStatus[1] = ""; + $ProStatus[2] = ""; + UpdateProStatus(); + } + + function teamRabbitFlagStatus(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + %flagStatus = StripNameColors(detag(%a1)); + %team = detag(%a2); + + switch (%team) { + case 1: + $ProStatus[1] = ""; + $ProStatus[2] = %flagStatus; + + case 2: + $ProStatus[1] = %flagStatus; + $ProStatus[2] = ""; + } + UpdateProStatus(); + } + + //--------------------------------------------------------------- + // TR2 Events de Neo + //--------------------------------------------------------------- + function TR2HudInit(%msgType, %msgString, %team1, %team2, %score1, %score2, %flagLoc, %carrierHealth, %currentBonus) { + parent::TR2HudInit(%msgType, %msgString, %team1, %team2, %score1, %score2, %flagLoc, %carrierHealth, %currentBonus); + + %team1Name = detag(%team1); + %team2Name = detag(%team2); + %team1Score = detag(%score1); + %team2Score = detag(%score2); + %flagStatus = detag(%flagLoc); + + if(%team1Score $= "") %team1Score = 0; + if(%team2Score $= "") %team2Score = 0; + + // Set the values + $ProTeam[1] = %team1Name; + $ProTeam[2] = %team2Name; + $ProScore[1] = %team1Score; + $ProScore[2] = %team2Score; + $ProStatus[1] = "" @ %flagStatus; + + // Update the huds + UpdateProScore(1, %team1Score); + UpdateProScore(2, %team2Score); + UpdateProStatus(); + } + + function TR2FlagTaken (%msgType, %msgString, %client, %team, %flagteam, %clientnamebase) { + %bunny = StripNameColors(detag(%client)); + + if ($IHaveFlag) { + $ProStatus[1] = "RUN!!!"; + PPTR2CarrierHealth.setVisible(false); + } else if (StrStr(%msgString, "Teammate") != -1) { + $ProStatus[1] = "" @ %bunny; + PPTR2CarrierHealth.profile.fillColor = "0 255 0"; + PPTR2CarrierHealth.setVisible(true); + } else { + $ProStatus[1] = "" @ %bunny; + PPTR2CarrierHealth.profile.fillColor = "255 0 0"; + PPTR2CarrierHealth.setVisible(true); + } + UpdateProStatus(); + } + + function handleTR2FlagDropped(%msgType, %msgString, %client, %team, %flagteam) { + parent::handleTR2FlagDropped(%msgType, %msgString, %client, %team, %flagteam); + + $ProStatus[1] = ""; + PPTR2CarrierHealth.setVisible(false); + UpdateProStatus(); + } + + function handleTR2FlagStatus(%msgType, %msgString, %location) { + parent::handleTR2FlagStatus(%msgType, %msgString, %location); + + %location = detag(%location); + $ProStatus[1] = "" @ %location; + PPTR2CarrierHealth.setVisible(false); + UpdateProStatus(); + } + + function handleTR2CarrierHealth(%msgType, %msgString, %amt, %team) { + parent::handleTR2CarrierHealth(%msgType, %msgString, %amt, %team); + + PPTR2CarrierHealth.setValue(%amt); + } + + function handleTR2SetScore(%msgType, %msgString, %team, %score) { + parent::handleTR2SetScore(%msgType, %msgString, %team, %score); + + %team = detag(%team); + %score = detag(%score); + $ProScore[%team] = %score; + UpdateProScore(%team); + } + + //--------------------------------------------------------------- + // Handle all Death Match Events + //--------------------------------------------------------------- + function dmKill(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::dmKill(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + $ProDMKills = detag(%a1); + $ProScore[1] = "" @ $ProDMKills @ " / " @ $ProDMDeaths @ " " @ $ProScoreis; + UpdateProScore(1); + } + + function dmPlayerDies(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::dmPlayerDies(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + $ProDMDeaths = detag(%a1); + $ProScore[1] = "" @ $ProDMKills @ " / " @ $ProDMDeaths @ " " @ $ProScoreis; + UpdateProScore(1); + } + + //--------------------------------------------------------------- + // Handle All Arena Events: Neo's adaptation of the 1.0 release from the mod author, Teribaen + //--------------------------------------------------------------- + function arenaVersionMsg( %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6 ) { + %version = detag(%a1); + %versionString = detag(%a2); + + $ArenaSupport::RemoteVersion = %version; + + commandToServer( 'ArenaSupportHello', $ArenaSupport::LocalVersion ); + } + + function arenaServerState( %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6 ) { + %teamCount = detag(%a1); + $ArenaSupport::TeamCount = %teamCount; + } + + function arenaAddTeam( %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6 ) { + %teamNum = detag(%a1); + if ( %teamNum > 2 ) return; + + %teamName = detag(%a2); + %score = detag(%a3); + if(%score $= "") %score = 0; + + %ProaliveCount = detag(%a4); + %PrototalCount = detag(%a5); + if(%ProaliveCount $= "") %ProaliveCount = 0; + if(%PrototalCount $= "") %PrototalCount = 0; + + $ProScore[%teamNum] = ""; + $ProStatus[%teamNum] = ""; + + if ( $ArenaSupport::TeamCount == 2 ) { + $ProTeam[%teamNum] = %teamName; + $ProScore[%teamNum] = %score; + // switch the status lines for Arena so it is more intuitive + if(%teamNum == 1) %teamNum = 2; + else if (%teamNum == 2) %teamNum = 1; + $ProStatus[%teamNum] = %ProaliveCount @ "/" @ %PrototalCount; + } + UpdateProStatus(); + } + + // Update the alive/total player count for a team in the status hud + function arenaTeamState(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + %teamNum = detag(%a1); + + if ( %teamNum > 2 ) return; + + %ProaliveCount = detag(%a2); + %PrototalCount = detag(%a3); + + if(%ProaliveCount $= "") %ProaliveCount = 0; + if(%PrototalCount $= "") %PrototalCount = 0; + + // Switch the status lines for arena so it is more intuitive + // Display alive/total counts for the teams + if ( $ArenaSupport::TeamCount == 2 ) { + if(%teamNum == 1) %teamNum = 2; + else if (%teamNum == 2) %teamNum = 1; + $ProStatus[%teamNum] = %ProaliveCount @ "/" @ %PrototalCount; + } + UpdateProStatus(); + } + + //--------------------------------------------------------------- + // Handle all Cap and Hold Events + //--------------------------------------------------------------- + function cnhAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::cnhAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %teamNum = detag(%a1); + %teamName = detag(%a2); + %score = detag(%a3); + if(%score $= "") %score = 0; + %sLimit = detag(%a4); + + $ProStatus[%teamNum] = "Held : " @ detag(%a5); + $ProTeam[%teamNum] = %teamName; + $ProScore[%teamNum] = "+" @ (%sLimit - %score); + + UpdateProScore(%teamNum, $ProScore); + UpdateProStatus(); + } + + function hudFlipFlopsHeld(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::hudFlipFlopsHeld(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %teamNum = detag(%a1); + + if (%teamNum == "2") %line = "1"; + else %line = "2"; + + $ProStatus[%line] = "Held : " @ detag(%a2); + UpdateProStatus(); + } + + function cnhTeamCap(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::cnhTeamCap(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + %teamNum = detag(%a4); + %score = detag(%a5); + %sLimit = detag(%a6); + %string = %sLimit - %score; + UpdateProScore(%teamNum, "+" @ %string); + } + + //--------------------------------------------------------------- + // Handle all Bounty Events + //--------------------------------------------------------------- + function bountyTargetIs(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::bountyTargetIs(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %hit = detag(%a1); + if(%hit $= "") + %hit = "< Waiting >"; + + $ProStatus[1] = StripNameColors(%hit); + $ProStatus[2] = ""; + UpdateProStatus(); + } + + function bountyTargetDropped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::bountyTargetDropped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + $ProStatus[1] = ""; + $ProStatus[2] = "< Waiting >"; + UpdateProStatus(); + } + + //--------------------------------------------------------------- + // Handle all CTF Events + //--------------------------------------------------------------- + function ctfAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::ctfAddTeam(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %teamNum = detag(%a1); + %teamName = detag(%a2); + %flagStatus = detag(%a3); + %score = detag(%a4); + + if (%flagStatus $= "") { + %flagStatus = ""; + } + + // NULL out before setting + $ProScore[%teamNum] = ""; + $ProStatus[%teamNum] = ""; + + $ProScore[%teamNum] = %score; + $ProTeam[%teamNum] = %teamName; + $ProStatus[%teamNum] = %flagStatus; + + UpdateProScore(%teamNum, %score); + UpdateProStatus(); + } + + function ctfFlagTaken(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::ctfFlagTaken(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %team = detag(%a3); + %taker = detag(%a4); + + if ( StripNameColors(%taker) $= detag($PPName) ) { + $ProStatus[%team] = "RUN!!!"; + } else { + $ProStatus[%team] = %taker; + } + + UpdateProStatus(); + } + + function ctfFlagDropped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::ctfFlagDropped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %team = detag(%a3); + $ResetTimer = 1; + + if (%team == "1") + CTFReturnUpdate("1", "46", "1"); + else + CTFReturnUpdate("2", "46", "1"); + } + + function ctfFlagCapped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::ctfFlagCapped(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + $ProStatus[1] = ""; + $ProStatus[2] = ""; + UpdateProStatus(); + } + + function ctfFlagReturned(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + parent::ctfFlagReturned(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6); + + %team = detag(%a3); + $ProStatus[%team] = ""; + UpdateProStatus(); + } + + function CTFReturnUpdate(%line,%time,%new) { + + if ((Strstr($ProStatus[%line], "< ENEMY: ") != -1) || (Strstr($ProStatus[%line], "< YOURS: ") != -1) || (%new == "1")) { + + if ($ResetTimer == "1") { + %newtime = "45"; + if (ProHudStatus.schedule[%line] !$= "") { + cancel(ProHudStatus.schedule[%line]); + ProHudStatus.schedule[%line] = ""; + } + $ResetTimer = 0; + } else { + %newtime = (%time - 1); + } + + // See if status has changed no need to update + if (%line == $PPTeam) + %whom = "YOURS:"; + else + %whom = "ENEMY:"; + + $ProStatus[%line] = "< " @ %whom @ " " @ %newtime @ " >"; + + ProHudStatus.schedule[%line] = schedule(1000, 0, "CTFReturnUpdate", %line, %newtime); + } + UpdateProStatus(); + } + //--------------------------------------------------------------- + // Hud Update Functions + //--------------------------------------------------------------- + function doUpdateGhettoList() { + parent::doUpdateGhettoList(); + UpdateProScore(); + } + + function UpdateProScore(%team, %amount) { + + if ((%team) && (%amount)) { + $ProScore[%team] = %amount; + } + if ($PPTeam == "1") { + %color[1] = "00FF00"; + %color[2] = "FFFFFF"; + } else { + %color[2] = "00FF00"; + %color[1] = "FFFFFF"; + } + + if (($ProPackPrefs::OBHudActive) && ($ProPackPrefs::ScoreHudActive)) { + ProHudScore.setVisible(true); + } else { + ProHudScore.setVisible(false); + } + + if (isobject($hudposProHudScore)) { + ProHudScore.position = $hudposProHudScore; + } else { + ProHudScore.position = $ProScorePOS[getWord($pref::Video::resolution, 0)]; + } + + if (StrLen($ProTeam[1]) < 1) { + ProHudScoreText.setText("" @ $ProSingleScore SPC $ProScore[1]); + } else { + ProHudScoreText.setText("" @ $ProTeamCount[1] @ " - " @ getword($ProTeam[1], 0) @ " : " @ $ProScore[1] @ "\n" @ + "" @ $ProTeamCount[2] @ " - " @ getword($ProTeam[2], 0) @ " : " @ $ProScore[2] ); + } + } + + function UpdateProStatus() { + + if ((strlen($ProStatus[1]) < 1) && (strlen($ProStatus[2]) < 1)) { + ProHudStatusText.setText(""); + ProHudStatus.setVisible(false); + } else { + if ($PPTeam == 1) %otherteam = 2; + else if ($PPTeam == 2) %otherteam = 1; + else %otherteam = 0; + + if (($ProPackPrefs::OBHudActive) && ($ProPackPrefs::StatusHudActive)) { + ProHudStatus.setVisible(true); + } else { + ProHudStatus.setVisible(false); + PPTR2CarrierHealth.setVisible(false); + } + + ProHudStatusText.setText("" @ $ProStatus[$PPTeam] @ + "\n" @ $ProStatus[%otherteam]); + } + } + + //-------------------------------------- + // GUI + //-------------------------------------- + function ProHudCreate() { + ProHudDestroy(); + + %ProStatusX = getWord($pref::Video::resolution, 0) * 0.50 - 100; + %ProStatusY = getWord($pref::Video::resolution, 1) * 0.66; + + new ShellFieldCtrl(ProHudStatus) { + profile = "GuiConsoleProfile"; + horizSizing = "center"; + vertSizing = "bottom"; + position = %ProStatusX SPC %ProStatusY; + extent = "200 50"; + minExtent = "8 8"; + visible = "0"; + + new GuiMLTextCtrl(ProHudStatusText) { + profile = "ProPackTextCtrl"; + horizSizing = "center"; + vertSizing = "top"; + position = "0 0"; + extent = "200 50"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + + new GuiProgressCtrl(PPTR2CarrierHealth) { + profile = "TR2CarrierHudProfile"; + horizSizing = "center"; + vertSizing = "bottom"; + position = "50 40"; + extent = "100 10"; + minExtent = "10 10"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + }; + }; + playgui.add(ProHudStatus); + + new ShellFieldCtrl(ProHudScore) { + profile = "GuiConsoleProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "844 42"; + extent = "104 40"; + minExtent = "8 8"; + visible = "0"; + + new GuiMLTextCtrl(ProHudScoreText) { + profile = "ProPackTextCtrl"; + horizSizing = "center"; + vertSizing = "center"; + position = "0 0"; + extent = "102 38"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + }; + playgui.add(ProHudScore); + } + + function ProHudDestroy() { + if (isObject(ProHudStatus)) { + playgui.remove(ProHudStatus); + ProHudStatus.delete(); + } + if (isObject(ProHudScore)) { + playgui.remove(ProHudScore); + ProHudScore.delete(); + } + } + + //------------------- + // Override hud.cs + //------------------- + function ClientCmdDisplayHuds() { + parent::ClientCmdDisplayHuds(); + objectiveHud.setVisible(getProReverse($ProPackPrefs::OBHudActive)); + } + + function updateDemoPlaybackStatus() { // turns on the default objective hud in demo mode + parent::updateDemoPlaybackStatus(); + objectiveHud.setVisible(true); + } + + function restoreAllHuds() { + parent::restoreAllHuds(); + objectiveHud.setVisible(getProReverse($ProPackPrefs::OBHudActive)); + } + + function clientCmdTogglePlayHuds(%val) { + parent::clientCmdTogglePlayHuds(%val); + objectiveHud.setVisible(getProReverse($ProPackPrefs::OBHudActive)); + + if ( (%val) && ($ProPackPrefs::ScoreHudActive) ) { + ProHudScore.setVisible(true); + } else { + ProHudScore.setVisible(false); + PPTR2CarrierHealth.setVisible(false); + } + + if ( (%val) && ($ProPackPrefs::StatusHudActive) ) { + ProHudStatus.setVisible(true); + } else { + ProHudStatus.setVisible(false); + PPTR2CarrierHealth.setVisible(false); + } + } + + function PlayGui::onWake(%this) { + parent::onWake(%this); + if (!isObject(ProHudScore)) schedule(3000, 0, "ProHudCreate"); + if(isObject(HM) && isObject(HudMover)) hudmover::addhud(ProHudScore, "ProPackScore"); + if(isObject(HM) && isObject(HudMover)) hudmover::addhud(ProHudStatus, "ProPackStatus"); + } + + function DispatchLaunchMode() { + addMessageCallback('MsgClientJoinTeam', ProSiegeRoleSwitch); // switching Teams + + addMessageCallback('MsgTeamRabbitAddTeam', teamRabbitAddTeam); + addMessageCallback('MsgTeamRabbitFlagTaken', teamRabbitFlagTaken); + addMessageCallback('MsgTeamRabbitFlagDropped', teamRabbitFlagDropped); + addMessageCallback('MsgTeamRabbitFlagReturned', teamRabbitFlagReturned); + addMessageCallback('MsgTeamRabbitFlagStatus', teamRabbitFlagStatus); + + addMessageCallback('MsgArenaVersion', arenaVersionMsg ); + addMessageCallback('MsgArenaServerState', arenaServerState); + addMessageCallback('MsgArenaAddTeam', arenaAddTeam); + addMessageCallback('MsgArenaTeamState', arenaTeamState); + + addMessageCallback('MsgTR2FlagTaken', TR2FlagTaken); + + parent::DispatchLaunchMode(); + } +}; +activatePackage(ProPackObjective); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackObserved.cs b/ProPack_Final/scripts/Propack/ProPackObserved.cs new file mode 100644 index 0000000..ff7ab8b --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackObserved.cs @@ -0,0 +1,110 @@ +// #category = ProPack +// #name = ProPack Observed +// #version = 2.2 +// #date = August 13, 2001 +// #warrior = Neofight +// #email = neofight@tribes2.org +// #web = http://propack.tribes2.org +// #description = Can't remember who is watching? Now you know. +// #status = Beta 2 +// #credit = MeBaD + +package ProPackObserved { + + function ProPackCheckObserv(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + %messagetype = detag(%msgType); + %messagestring = detag(%msgString); + %observername = detag(%a1); + + if ((%messagetype $= "Observer") && (Strstr(%messagestring, "is now observing you.") != -1)) { + if ($ProPackPrefs::WaveToObserver) commandToServer('CannedChat', 'ChatAnimWave', false); + $ProPackObCount++; + $ProPackObserver[$ProPackObCount] = %observername; + } else if ((%messagetype $= "ObserverEnd") && (Strstr(%messagestring, "is no longer observing you.") != -1) || (%messagetype $= "MsgClientJoinTeam") || (%messagetype $= "MsgClientDrop")) { + for (%i = 1; %i <= $ProPackObCount; %i++) { + if ($ProPackObserver[%i] $= %observername) { + //echo("Client erased : " @ $ProPackObserver[%i]); + $ProPackObserver[%i] = ""; + $ProPackObCount--; + //SqueezeObserverLines(%i); + } + } + } + + %count = "1"; + while ($ProPackObserver[%count] !$= "") { + %ProPackObserverName = %ProPackObserverName @ $ProPackObserver[%count] @ "\n"; + %count++; + } + ProPackObserved.setVisible(true); + ProPackObservedText.setText("" @ %ProPackObserverName); + } + + function SqueezeObserverLines(%num) { + for (%i = %num; %i <= $ProPackObCount; %i++) { + %x = %i + 1; + $ProPackObserver[%i] = $ProPackObserver[%x]; + } + + %count = "1"; + while ($ProPackObserver[%count] !$= "") { + %ProPackObserverName = %ProPackObserverName @ "\n" @ $ProPackObserver[%count]; + %count++; + } + ProPackObservedText.setText("" @ %ProPackObserverName); + } + + function ProPackObservedCreate() { + ProPackObservedDestroy(); + + %ProObsX = getWord($pref::Video::resolution, 0) - 146; //- width of the hud + small space + %ProObsY = getWord(hudClusterBack.position, 1) + getWord(hudClusterBack.extent, 1) + 2 + 64 + 2; + + new ShellFieldCtrl(ProPackObserved) { + profile = "GuiConsoleProfile"; + horizSizing = "left"; + vertSizing = "bottom"; + position = %ProObsX SPC %ProObsY; + extent = "144 100"; + minExtent = "8 8"; + visible = "0"; + + new GuiMLTextCtrl(ProPackObservedText) { + profile = "ProPackTextCtrl"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "144 100"; + visible = "1"; + }; + }; + playGui.add(ProPackObserved); + } + + function ProPackObservedDestroy() { + if (isObject(ProPackObserved)) { + playGui.remove(ProPackObserved); + ProPackObserved.delete(); + } + } + + function clientCmdTogglePlayHuds(%val) { + ProPackObserved.setVisible(%val); + parent::clientCmdTogglePlayHuds(%val); + } + + function PlayGui::onWake(%this) { + parent::onWake(%this); + if (!isObject(ProPackObserved)) schedule(3000, 0, "ProPackObservedCreate"); // POS video prefs + if(isObject(HM) && isObject(HudMover)) hudmover::addhud(ProPackObserved, "ProPackObserved"); + } + + function DispatchLaunchMode() { + addMessageCallback('Observer', ProPackCheckObserv); + addMessageCallback('ObserverEnd', ProPackCheckObserv); + addMessageCallback('MsgClientJoinTeam', ProPackCheckObserv); + addMessageCallback('MsgClientDrop', ProPackCheckObserv); + parent::DispatchLaunchmode(); + } +}; +activatePackage(ProPackObserved); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackThrow.cs b/ProPack_Final/scripts/Propack/ProPackThrow.cs new file mode 100644 index 0000000..88f5d78 --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackThrow.cs @@ -0,0 +1,60 @@ +// #category = ProPack +// #name = ProPack Throw +// #version = 3.01 +// #status = Beta 3 +// #date = July 4, 2001 +// #warrior = Neofight +// #email = neofight@tribes2.org +// #web = http://propack.tribes2.org +// #description = Full-force repair kits, grenades, mines, drop grenades, and an option to beacon your mines! +// #Credit = Happy & Runar + + function ProKit(%val) { + if (%val) + throw(RepairKit); + } + + function DropGrenades(%val) { + if (%val) { + throw(Grenade); + throw(FlareGrenade); + throw(FlashGrenade); + throw(CameraGrenade); + throw(ConcussionGrenade); + } + } + + function BeaconMine(%val) { + if (%val) { + use(mine); + use(beacon); + use(beacon); + } + } + + function ProGrenade(%val) { + if(%val) + commandToServer('endThrowCount'); + else + commandToServer('startThrowCount'); + + $mvTriggerCount4 += $mvTriggerCount4 & 1 == %val ? 2 : 1; + } + + function ProMine(%val) { + if (%val) + commandToServer( 'endThrowCount' ); + else + commandToServer( 'startThrowCount' ); + $mvTriggerCount5++; + } + +package ProPackThrow { + // When you die the server clears the throw count, so we start it up again when we respawn. + function updateActionMaps() { + parent::updateActionMaps(); + commandToServer( 'startThrowCount' ); + } +}; + +activatePackage(ProPackThrow); diff --git a/ProPack_Final/scripts/Propack/ProPackTracker.cs b/ProPack_Final/scripts/Propack/ProPackTracker.cs new file mode 100644 index 0000000..b619807 --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackTracker.cs @@ -0,0 +1,522 @@ +// #category = ProPack +// #name = ProPack Tracker +// #version = 5.89 +// #description = Death/Kill stat tracking by weapon w/ optional pop-ups +// #status = close to final ;p +// #date = June 3, 2001 +// #warrior = MeBaD +// #web = http://propack.tribes2.org +// #credit = Neofight + +$isLTon = "1"; // make activate LifeTimeStatsFULLStats default to turning on (big screen) +$discscreenshots = "0"; // disabled by default + +$trackerleft[1280] = "415 562"; +$trackerright[1280] = "665 562"; +$trackerleft[1152] = "351 482"; +$trackerright[1152] = "601 482"; +$trackerleft[1024] = "287 425"; +$trackerright[1024] = "537 425"; +$trackerleft[800] = "175 275"; +$trackerright[800] = "425 275"; + +package ProPackTracker { + // Activate ReCall of last print + function ActivateReCall(%val) { + if (%val) { + + TrackerPopup($RecallLeft, $RecallRight, 7); + + if ((Strlen($RecallLeft) < 1) || (Strlen($RecallRight) < 1)) { + %printthis = "No event in buffer... YET"; + } else { + %printthis = " Recall of Last Event"; + } + clientCmdBottomPrint(%printthis, 5, 1); + } + } + + // Activate Full display of all kills + function ActivateLifeTime(%val) { + + if (%val) { + if ($isLTon == "2") { + clientcmdTogglePlayHuds(true); + FullTrackStats.setVisible(false); + + FullTrackStatsText.setText(""); // clear that big buffer + FullTrackStatsRightText.setText(""); // clear that big buffer + FullTrackStatsLeftText.setText(""); // clear that big buffer + clientCmdBottomPrint("Returning to game", 1, 1); + $isLTon = "1"; + } else { + clientcmdTogglePlayHuds(false); + FullTrackStats.BuildFULLprintout(); + $isLTon++; + } + } + } + + // Activate AutoScreenshot + function ActivateAutoSC(%val) { + if (%val) { + if ($discscreenshots == "1") { + $discscreenshots = "0"; + %word = "DISABLED"; + %color = "FF0000"; // red + } else { + $discscreenshots = "1"; + %word = "ENABLED"; + %color = "99FF00"; // green + } + clientCmdBottomPrint(" Auto Screenshots : " @ %word, 5, 1); + } + } + +//--------------------------- +// Control the hud events +//--------------------------- + function handleClientJoin(%msgType, %msgString, %clientName, %clientId, %targetId, %isAI, %isAdmin, %isSuperAdmin, %isSmurf, %guid) { + parent::handleClientJoin(%msgType, %msgString, %clientName, %clientId, %targetId, %isAI, %isAdmin, %isSuperAdmin, %isSmurf, %guid); + + if(StrStr(%msgString, "Welcome to Tribes") != -1) { + ProClearGameTrack(); + } + } + + function FullTrackStats::BuildFULLprintout() { + + %weapons = "\n"; + + for (%i = 1; %i < 31; %i++) { + %weapon = ProNoSpacedWeaponName(%i); + if (Strlen(%weapon) > 0) { + if ((%i != 7) && ((%i > 0) && (%i < 12)) || (%i == 31)) { + %ThisLTKills = ProhandleLifeTime(%weapon, "2", "kills"); + %ThisLTDeaths = ProhandleLifeTime(%weapon, "2", "deaths"); + %weapons = %weapons @ " " @ %weapon @ "\n"; + %leftstats = %leftstats @ "" @ $GameKills[%weapon] @ " - " @ $GameDeaths[%weapon] @ "\n"; + %rightstats = %rightstats @ "" @ %ThisLTKills @ " - " @ %ThisLTDeaths @ "\n"; + } + } + } + + // adds the rest of them .. heh + %weapons = %weapons @ " headshots\n rearshocks\n carrierkills\n flagreturns\n"; + + %leftstats = %leftstats @ "" @ $GameKills[lasertohead] @ "\n"; + %leftstats = %leftstats @ "" @ $GameKills[rearshock] @ "\n"; + %leftstats = %leftstats @ "" @ $carrierkills @ "\n"; + %leftstats = %leftstats @ "" @ $returnsthisgame @ "\n"; + + %rightstats = %rightstats @ "" @ $LifeTime::Kills_lasertohead @ "\n"; + %rightstats = %rightstats @ "" @ $LifeTime::Kills_rearshock @ "\n"; + %rightstats = %rightstats @ "" @ $LifeTime::CTFCarrierKills @ "\n"; + %rightstats = %rightstats @ "" @ $LifeTime::CTFReturns @ "\n"; + + // main big window + // Game Box + FullTrackStats.setVisible(true); + FullTrackStatsText.setText("All your Stats are belong to " @ $PPName @ "\n\n" @ + "Weapon Current Kills/Deaths LifeTime Kills/Deaths\n" @ + %weapons ); + FullTrackStatsLeftText.setText(%leftstats); + FullTrackStatsRightText.setText(%rightstats); + } + + function ProCheckFlagReturn(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + if ($ProPackPrefs::TrackerActive) { + + %msg = detag(%msgString); + %subType = detag(%msgType); + %printflagloadout = 0; + + if (Strstr(%msg, "You returned your flag") != -1) { //MsgCTFFlagReturned + $returnsthisgame++; + $LifeTime::CTFReturns++; + %word = "Flag Returns"; + + $FlagPrintGame = $returnsthisgame; + $FlagPrintLife = $LifeTime::CTFReturns; + + %printflagloadout = 1; + } + + if ((%subType $= "msgCarKill") && (Strstr(%msg, "You received") != -1)) { //Player check added for the 'Classic' Mod + $carrierkills++; + $LifeTime::CTFCarrierKills++; + %word = "FlagCarrier Kills"; + + $FlagPrintGame = $carrierkills; + $FlagPrintLife = $LifeTime::CTFCarrierKills; + %printflagloadout = 1; + } + + if (%printflagloadout == "1") { + %printleft = "Current " @ %word @ "\n"; + %printleft = %printleft @ "" @ $FlagPrintGame; + + %printright = %printright @ "LifeTime " @ %word @ "\n"; + %printright = %printright @ "" @ $FlagPrintLife; + + TrackerPopup(%printleft, %printright, 7); + + $RecallLeft = %printleft; + $RecallRight = %printright; + } + } + } + + function ProHeadshot (%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6) { + if ($ProPackPrefs::TrackerHeadshotSound) { + %msg = detag(%msgString); + + if (Strstr(%msg, "You received") != -1) + alxPlay(alxCreateSource(AudioChat, "headshot.wav")); + } + } + + function ProHeadshotKill() { + if ($ProPackPrefs::TrackerActive) { + + $GameKills[lasertohead]++; + $LifeTime::Kills_lasertohead++; + + // left box + %printleft = "Current Headshot kills \n"; + %printleft = %printleft @ "" @ $GameKills[lasertohead]; + + // right box + %printright = %printright @ "LifeTime Headshot kills \n"; + %printright = %printright @ "" @ $LifeTime::Kills_lasertohead; + + TrackerPopup(%printleft, %printright, 7); + + $RecallLeft = %printleft; + $RecallRight = %printright; + + } + + if ($ProPackPrefs::TrackerHeadshotSound) { + %handle[1] = alxCreateSource(AudioChat, "headshot.wav"); + %handle[2] = alxCreateSource(AudioChat, "wbslap.wav"); + + for (%i = 1; %i < 3; %i++) { + alxPlay(%handle[%i]); + } + } + } + + function ProRearshockKill() { + if ($ProPackPrefs::TrackerActive) { + + $GameKills[rearshock]++; + $LifeTime::Kills_rearshock++; + + // left box + %printleft = "Current Rearshock kills \n"; + %printleft = %printleft @ "" @ $GameKills[rearshock]; + + // right box + %printright = %printright @ "LifeTime Rearshock kills \n"; + %printright = %printright @ "" @ $LifeTime::Kills_rearshock; + + TrackerPopup(%printleft, %printright, 7); + + $RecallLeft = %printleft; + $RecallRight = %printright; + + } + } + + function ProTrackKill(%msgType, %msgString, %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType) { + if ($ProPackPrefs::TrackerActive) { + + %doweprint = 0; + %CoolshotCheck = detag(%msgType); + %ProdamageType = detag(%damageType); + %ProkillerName = StripNameColors(detag(%killerName)); + %ProvictimName = StripNameColors(detag(%victimName)); + + if ((%CoolshotCheck $= "MsgHeadshotKill") && (Strstr(%ProkillerName, $PPName) != -1)) { + ProHeadshotKill(); + return; + } + + if ( ((%CoolshotCheck $= "msgRearshot") || (%CoolshotCheck $= "MsgRearshotKill")) && (Strstr(%ProkillerName, $PPName) != -1) ) { + ProRearshockKill(); + return; + } + + %ProWeaponUsed = ProNoSpacedWeaponName(%ProdamageType); //%ProWeaponUsed = $DamageTypeText[%damageType] + + if (Strlen(%ProWeaponUsed) < 1) { + return; // default is ghey! + } + + // Killed Someone + if (Strstr(%Prokillername, $PPName) != -1) { + $GameKills[%ProWeaponUsed]++; + %LifeTimeDeathPrint = ProhandleLifeTime(%ProWeaponUsed, "2", "Deaths"); + %LifeTimeKillPrint = ProhandleLifeTime(%ProWeaponUsed, "1", "Kills"); + + if ((Strstr(%ProWeaponUsed, "disc") != -1) && ($discscreenshots == "1")) { + clientcmdTogglePlayHuds(false); + schedule(500, 0, "doScreenShot"); // let the disc settle in .. heh + schedule(900, 0, "clientcmdTogglePlayHuds", true); + } + %doweprint = 1; + } + + // Death by someone + if (Strstr(%Provictimname, $PPName) != -1) { + $GameDeaths[%ProWeaponUsed]++; + %LifeTimeDeathPrint = ProhandleLifeTime(%ProWeaponUsed, "1", "Deaths"); + %LifeTimeKillPrint = ProhandleLifeTime(%ProWeaponUsed, "2", "Kills"); + + %doweprint = 1; + } + + if (%doweprint == 1) { + %printleft = "Current " @ %ProWeaponUsed @ " Kills \n"; + %printleft = %printleft @ "" @ $GameKills[%ProWeaponUsed] @ " - " @ $GameDeaths[%ProWeaponUsed]; + + %printright = %printright @ "LifeTime " @ %ProWeaponUsed @ " Kills \n"; + %printright = %printright @ "" @ %LifeTimeKillPrint @ " - " @ %LifeTimeDeathPrint; + + TrackerPopup(%printleft, %printright, 7); + + $RecallLeft = %printleft; + $RecallRight = %printright; + } + } + } + + function ProClearGameTrack() { + for (%i = 0; %i < 36; %i++) { + %WeaponName = ProNoSpacedWeaponName(%i); + $GameKills[%WeaponName] = 0; + $GameDeaths[%WeaponName] = 0; + } + $returnsthisgame = 0; + $carrierkills = 0; + $gameKills[lasertohead] = 0; + $gameKills[rearshock] = 0; + + echo("Clearing Game Kills..."); + } + + function Disconnect() { // override disconnect just to add export + ProBackupLTKills(); + ProClearGameTrack(); + parent::Disconnect(); + } + + function ProBackupLTKills() { + export("$LifeTime::*", "prefs/LifeTimeKills.cs", false); + echo("Saved LifeTime Kills"); + } + + function ProhandleLifeTime(%weapon,%add,%type) { + // %weapon, display[2] or add[1], death or kill + if (%add == "1") { // got kill :) || death :( + if (%type $= "Kills") { $LifeTime::Kills_[%weapon]++; return $LifeTime::Kills_[%weapon]; } + if (%type $= "Deaths") { $LifeTime::Deaths_[%weapon]++; return $LifeTime::Deaths_[%weapon]; } + } else { // display + if (%type $= "Kills") { return $LifeTime::Kills_[%weapon]; } + if (%type $= "Deaths") { return $LifeTime::Deaths_[%weapon]; } + } + } + + function DispatchLaunchMode() { + if (!isPlayingDemo()) { + addMessageCallback('MsgGameOver', ProBackupLTKills); + addMessageCallBack('MsgClientReady', ProClearGameTrack); // set everything to 0 when your ready for it + addMessageCallback('MsgCTFFlagReturned', ProCheckFlagReturn); + addMessageCallBack('msgCarKill', ProCheckFlagReturn); + addMessageCallBack('MsgLegitKill', ProTrackKill); + addMessageCallBack('MsgHeadshotKill', ProTrackKill); + addMessageCallBack('msgHeadshot', ProHeadshot); + addMessageCallBack('MsgRearshotKill', ProTrackKill); // Added for 'Classic' Mod + addMessageCallBack('msgRearshot', ProTrackKill); // Added for 'Classic' Mod + addMessageCallBack('msgTR2Knockdown', ProTrackKill); // Added for TR2 + } + + parent::DispatchLaunchMode(); + } + +//----------------- +// GUI Stuff now :) +//----------------- + function TransTrackHudCreate() { + TransTrackHudDestroy(); + + $TransTrackLeft = new ShellFieldCtrl(TransTrackLeft) { + profile = "GuiConsoleProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "175 275"; + extent = "200 50"; + minExtent = "8 8"; + visible = "0"; + + new GuiMLTextCtrl(TransPrintLeftText) { + profile = "ProPackTextCtrl"; + horizSizing = "center"; + vertSizing = "center"; + position = "3 5"; + extent = "190 40"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + }; + playgui.add($TransTrackLeft); + + $TransTrackRight = new ShellFieldCtrl(TransTrackRight) { + profile = "GuiConsoleProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "425 275"; + extent = "200 50"; + minExtent = "8 8"; + visible = "0"; + + new GuiMLTextCtrl(TransPrintRightText) { + profile = "ProPackTextCtrl"; + horizSizing = "center"; + vertSizing = "center"; + position = "3 5"; + extent = "190 40"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + }; + playgui.add($TransTrackRight); + + $FullTrackStats = new ShellFieldCtrl(FullTrackStats) { + profile = "GuiChatBackProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "0 0"; + extent = "400 324"; + minExtent = "8 8"; + visible = "0"; + + new GuiMLTextCtrl(FullTrackStatsText) { + profile = "ProPackTextCtrl"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "3 5"; + extent = "390 290"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "3"; + allowColorChars = "1"; + maxChars = "-1"; + }; + + new ShellFieldCtrl(FullTrackStatsLeft) { + profile = "GuiChatBackProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "90 60"; + extent = "150 264"; + minExtent = "8 8"; + visible = "1"; + + new GuiMLTextCtrl(FullTrackStatsLeftText) { + profile = "ProPackTextCtrl"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "2 7"; + extent = "140 264"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + }; + + new ShellFieldCtrl(FullTrackStatsRight) { + profile = "GuiChatBackProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "250 60"; + extent = "150 264"; + minExtent = "8 8"; + visible = "1"; + + new GuiMLTextCtrl(FullTrackStatsRightText) { + profile = "ProPackTextCtrl"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "2 7"; + extent = "140 264"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + }; + }; + playgui.add($FullTrackStats); + $TransTrackHudBuild = true; + } + + function TransTrackHudDestroy() { + if ($TransTrackHudBuild) { + playgui.remove($TransTrackRight); + playgui.remove($TransTrackLeft); + TransTrackLeft.delete(); + TransTrackRight.delete(); + $TransTrackLeft = ""; + $TransTrackRight = ""; + + playgui.remove($FullTrackStats); + FullTrackStats.delete(); + $FullTrackStats = ""; + + $TransTrackHudBuild = false; + } + } + + function LoadingGui::onWake(%this) { + if (!$TransTrackHudBuild) { + TransTrackHudCreate(); + } + parent::onWake(%this); + } + + function TrackerPopup(%leftprint, %rightprint, %time ) { + if ($ProPackPrefs::TrackerPopup) { + + %sectime = (%time * 1000); // make all time in seconds + + TransTrackLeft.position = $trackerleft[getWord($pref::Video::resolution, 0)]; + TransPrintLeftText.setText("" @ %leftprint); + + TransTrackRight.position = $trackerright[getWord($pref::Video::resolution, 0)]; + TransPrintRightText.setText("" @ %rightprint); + + TransTrackLeft.setVisible(true); + TransTrackRight.setVisible(true); + + schedule(%sectime, 0, eval, "TransTrackLeft.setVisible(false);"); + schedule(%sectime, 0, eval, "TransTrackRight.setVisible(false);"); + } + } +}; +activatePackage(ProPackTracker); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/ProPackVehicleKeys.cs b/ProPack_Final/scripts/Propack/ProPackVehicleKeys.cs new file mode 100644 index 0000000..b7002ef --- /dev/null +++ b/ProPack_Final/scripts/Propack/ProPackVehicleKeys.cs @@ -0,0 +1,67 @@ +// #category = ProPack +// #name = ProPack VehicleKeys +// #version = 2.2 +// #date = July 29, 2001 +// #warrior = Neofight +// #email = neofight@tribes2.org +// #web = http://propack.tribes2.org +// #description = hard-coded vehicle keys = same on all maps; toggleable teleport option +// #status = Good enough +// #Credit = jsut, Silverspirit + +package ProVehicleKeys { + function VehicleHud::onWake(%this) { + parent::onWake(%this); + + if (isObject(hudMap)) { + hudMap.pop(); + hudMap.delete(); + } + new ActionMap(hudMap); + hudMap.blockBind(moveMap, toggleInventoryHud); + hudMap.blockBind(moveMap, toggleScoreScreen); + hudMap.blockBind(moveMap, toggleCommanderMap); + hudMap.bindCmd(keyboard, escape, "", "VehicleHud.onCancel();" ); + hudMap.bindCmd(keyboard, "1", "", "VehicleHud.QuickBuy( \"scoutVehicle\" );"); + hudMap.bindCmd(keyboard, "2", "", "VehicleHud.QuickBuy( \"AssaultVehicle\" );"); + hudMap.bindCmd(keyboard, "3", "", "VehicleHud.QuickBuy( \"mobileBaseVehicle\" );"); + hudMap.bindCmd(keyboard, "4", "", "VehicleHud.QuickBuy( \"scoutFlyer\" );"); + hudMap.bindCmd(keyboard, "5", "", "VehicleHud.QuickBuy( \"BomberFlyer\" );"); + hudMap.bindCmd(keyboard, "6", "", "VehicleHud.QuickBuy( \"hapcFlyer\" );"); + hudMap.push(); + } + + function VehicleHud::QuickBuy(%this, %id) { + parent::QuickBuy(%this,$ProQuickBuy[%id]); + } + + function VehicleHud::addLine(%this, %tag, %lineNum, %name, %count) { + $ProQuickBuy[%name] = %lineNum; + return parent::addLine(%this, %tag, %lineNum, %name, %count); + } + + function VehicleHud::onSleep(%this) { + parent::onSleep(%this); + $ProQuickBuy["scoutVehicle"] = ""; + $ProQuickBuy["AssaultVehicle"] = ""; + $ProQuickBuy["mobileBaseVehicle"] = ""; + $ProQuickBuy["scoutFlyer"] = ""; + $ProQuickBuy["BomberFlyer"] = ""; + $ProQuickBuy["hapcFlyer"] = ""; + } + + function ProPackTeleportToggle(%val) { + if(%val) { + if($pref::Vehicle::pilotTeleport $= "1") { + clientCmdBottomPrint( "Teleport Off", 2, 1 ); + $pref::Vehicle::pilotTeleport = "0"; + toggleVehicleTeleportPref(); + } else { + clientCmdBottomPrint( "Teleport On", 2, 1 ); + $pref::Vehicle::pilotTeleport = "1"; + toggleVehicleTeleportPref(); + } + } + } +}; +activatePackage(ProVehicleKeys); \ No newline at end of file diff --git a/ProPack_Final/scripts/Propack/gui/ProPackInterface.gui b/ProPack_Final/scripts/Propack/gui/ProPackInterface.gui new file mode 100644 index 0000000..72d33d1 --- /dev/null +++ b/ProPack_Final/scripts/Propack/gui/ProPackInterface.gui @@ -0,0 +1,976 @@ +//--- OBJECT WRITE BEGIN --- ProPack In-game Interface +new GuiControl(ProPackGui) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + + new ShellPaneCtrl(ProPackParent) { + profile = "ShellPaneProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "0 0"; + extent = "640 480"; + minExtent = "48 92"; + visible = "1"; + text = "ProPack::InterFace"; + longTextBuffer = "0"; + noTitleBar = "0"; + + new ShellTabButton(ProPackHudOptionsBtn) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "15 40"; + extent = "189 38"; + minExtent = "48 38"; + visible = "1"; + command = "ProPackGui.setFrameList(ProPackHudOptions);"; + text = "Hud Transparent Options"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellTabButton(ProPackAutoChatBtn) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "15 80"; + extent = "189 38"; + minExtent = "48 38"; + visible = "1"; + command = "ProPackGui.setFrameList(ProPackAutoChat);"; + text = "AutoChat Options"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellTabButton(ProPackTrackerBtn) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "15 120"; + extent = "189 38"; + minExtent = "48 38"; + visible = "1"; + command = "ProPackGui.setFrameList(ProPackTracker);"; + text = "Kill Tracking Options"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellTabButton(ProPackInfoHudBtn) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "15 160"; + extent = "189 38"; + minExtent = "48 38"; + visible = "1"; + command = "ProPackGui.setFrameList(ProPackInfoHud);"; + text = "InfoHud Options (Split Chat)"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellTabButton(ProPackOBHudBtn) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "15 200"; + extent = "189 38"; + minExtent = "48 38"; + visible = "1"; + command = "ProPackGui.setFrameList(ProPackOBHud);"; + text = "NEW ObjectiveHud Options"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellTabButton(ProPackMultiBtn) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "15 240"; + extent = "189 38"; + minExtent = "48 38"; + visible = "1"; + command = "ProPackGui.setFrameList(ProPackMulti);"; + text = "Multi Hud FPS/Ping/Alt/Speed"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellTabButton(ProPackMuteBtn) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "15 280"; + extent = "189 38"; + minExtent = "48 38"; + visible = "1"; + command = "ProPackGui.setFrameList(ProPackMute);"; + text = "Mute/Alter Tools"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellTabFrame(ProPackHudOptionsFrame) { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "199 33"; + extent = "419 424"; + minExtent = "254 26"; + visible = "1"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + + new GuiMLTextCtrl(ProPackHudOptionsNotes) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "11 11"; + extent = "397 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellToggleButton(ProPackOuterChatHud) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 125"; + extent = "190 27"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::outerChatHudVar"; + text = "ChatHud Background"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackChatMenuHud) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 155"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::ChatMenuHudVar"; + text = "ChatMenu Background"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackmainVoteHud) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 185"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::mainVoteHudVar"; + text = "Vote Status Hud"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackHudClusterBack) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 215"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::HudClusterBack"; + text = "Health/Energy/Compass"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackretFrameHud) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 245"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::retFrameHud"; + text = "Reticle Frame Outline"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackAmmoHud) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 275"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::ammoHud"; + text = "AmmoHud (Bottom left of reticle)"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackBottomPrintDlg) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 305"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::bottomprintdlgVar"; + text = "Bottom Print Dlg"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackTR2EventPopup) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 335"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::TR2EventPopupVar"; + text = "TR2 Event Popup"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackTR2BonusHud) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 365"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::TR2BonusHudVar"; + text = "TR2 Bonus Hud"; + longTextBuffer = "0"; + maxLength = "255"; + }; + }; + new ShellTabFrame(ProPackAutoChatFrame) { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "199 33"; + extent = "419 424"; + minExtent = "254 26"; + visible = "0"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + + new GuiMLTextCtrl(ProPackAutoChatNotes) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "11 11"; + extent = "397 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellToggleButton(ProPackWaveToObserver) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 95"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::WaveToObserver"; + text = "Greet Observers (Local)"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackAutoTaunt) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::AutoTaunt"; + text = "AutoTaunt (Local)"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackMuteSpammers) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "222 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::MuteSpammers"; + text = "Mute Repeated Messages"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackAutoGotFlag) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 155"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::AutoGotFlag"; + text = "Auto Got Flag (HELP!)"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackAutoGenBoom) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 185"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::AutoGenBoom"; + text = "Auto Gen Boom"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackAutoVPadBoom) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "222 185"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::AutoVPadBoom"; + text = "Auto V-Pad Boom"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackAutoGrabSpeed) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "10 215"; + extent = "191 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::AutoGrabSpeed"; + text = "Team: (Flag) Grab Speed"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new GuiMLTextCtrl(ProPackGrabInfo) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "20 255"; + extent = "110 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellTextEditCtrl(ProPackGrab1) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "125 245"; + extent = "295 38"; + minExtent = "32 38"; + visible = "1"; + maxLength = "35"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellTextEditCtrl(ProPackGrab2) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "125 273"; + extent = "295 38"; + minExtent = "32 38"; + visible = "1"; + maxLength = "35"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellTextEditCtrl(ProPackGrab3) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "125 301"; + extent = "295 38"; + minExtent = "32 38"; + visible = "1"; + maxLength = "35"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellTextEditCtrl(ProPackGrab4) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "125 329"; + extent = "295 38"; + minExtent = "32 38"; + visible = "1"; + maxLength = "35"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellTextEditCtrl(ProPackGrab5) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "125 357"; + extent = "295 38"; + minExtent = "32 38"; + visible = "1"; + maxLength = "35"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellToggleButton(ProPackAddPeekActive) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "222 215"; + extent = "191 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::AddPeek"; + text = "Peek Speed"; + longTextBuffer = "0"; + maxLength = "255"; + }; + }; + new ShellTabFrame(ProPackTrackerFrame) { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "199 33"; + extent = "419 424"; + minExtent = "254 26"; + visible = "0"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + + new GuiMLTextCtrl(ProPackTrackerNotes) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "11 11"; + extent = "397 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellToggleButton(ProPackTrackerActivate) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::TrackerActive"; + text = "Track Stats"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackKillPopup) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 155"; + extent = "175 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::TrackerPopup"; + text = "Kill Popup"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackHeadShotSounds) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 185"; + extent = "175 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::TrackerHeadShotSound"; + text = "Head Shot Sounds"; + longTextBuffer = "0"; + maxLength = "255"; + }; + }; + new ShellTabFrame(ProPackInfoHudFrame) { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "199 33"; + extent = "419 424"; + minExtent = "254 26"; + visible = "0"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + + new GuiMLTextCtrl(ProPackInfoHudNotes) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "11 11"; + extent = "397 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellToggleButton(ProPackInfoHudActivate) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackprefs::InfoHudActivate"; + text = "Info Hud Activated"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackSplitDeathMsg) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 155"; + extent = "175 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::DeathMessages"; + text = "Split Death Messages"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackMuteChatDisplay) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "222 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::MuteChatDisplay"; + text = "Mute Chat [V**] Display"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackColorKills) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "222 155"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::CKillsActive"; + text = "Color Kills"; + longTextBuffer = "0"; + maxLength = "255"; + }; + }; + new ShellTabFrame(ProPackOBHudFrame) { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "199 33"; + extent = "419 424"; + minExtent = "254 26"; + visible = "0"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + + new GuiMLTextCtrl(ProPackOBHudNotes) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "11 11"; + extent = "397 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellToggleButton(ProPackOBHudActivate) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::OBHudActive"; + text = "New Objective Hud Activated"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackScoreHudActivate) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 155"; + extent = "175 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::ScoreHudActive"; + text = "Score Hud Activated"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackStatusHudActivate) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 185"; + extent = "175 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::StatusHudActive"; + text = "Status Hud Activated"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackFlagHudActivate) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "222 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::FlagHudActive"; + text = "New Flag Status Hud Activated"; + longTextBuffer = "0"; + maxLength = "255"; + }; + }; + new ShellTabFrame(ProPackMultiFrame) { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "199 33"; + extent = "419 424"; + minExtent = "254 26"; + visible = "0"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + + new GuiMLTextCtrl(ProPackMultiNotes) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "11 11"; + extent = "397 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellToggleButton(ProPackFPSHudActive) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 125"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::FPSHud"; + text = "FPS Hud"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackPingHudActive) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 155"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::PingHud"; + text = "Ping Hud"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackSpeedHudActive) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 185"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::SpeedHud"; + text = "Speed Hud"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackAltHudActive) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 215"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::AltHud"; + text = "Altitude Hud"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellToggleButton(ProPackPeekSpdActive) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 245"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::PeekSpeedHud"; + text = "Speed Peek Hud"; + longTextBuffer = "0"; + maxLength = "255"; + }; + }; + new ShellTabFrame(ProPackMuteFrame) { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "199 33"; + extent = "419 424"; + minExtent = "254 26"; + visible = "0"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + + new GuiMLTextCtrl(ProPackMuteNotes) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "11 11"; + extent = "397 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + new ShellToggleButton(ProPackMuteToolsActivate) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "21 103"; + extent = "388 30"; + minExtent = "26 27"; + visible = "1"; + variable = "$ProPackPrefs::MuteToolsActive"; + text = "Alter/Split Tools Active"; + longTextBuffer = "0"; + maxLength = "255"; + }; + new ShellScrollCtrl(ProPackMuteListParent) { + profile = "NewScrollCtrlProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "11 131"; + extent = "408 289"; + minExtent = "24 52"; + visible = "1"; + helpTag = "0"; + willFirstRespond = "1"; + hScrollBar = "alwaysOff"; + vScrollBar = "alwaysOn"; + constantThumbHeight = "0"; + defaultLineHeight = "15"; + childMargin = "0 0"; + fieldBase = "gui/shll_field"; + + new GuiScrollContentCtrl(ProPackMuteToolsList) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "4 4"; + extent = "384 297"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + + new GuiChatMenuTreeCtrl(ProPackMuteToolsTree) { + profile = "ShellTreeViewProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "409 280"; + minExtent = "8 8"; + visible = "1"; + altCommand = "ProPackGui.editSelectedMuteListItem();"; + helpTag = "0"; + tabSize = "16"; + imagesBitmap = "gui/shll_treeView.png"; + numImages = "13"; + textOffset = "2"; + fullRowSelect = "0"; + itemHeight = "15"; + altFontColor = "6 215 245 255"; + altFontColorHL = "6 215 245 255"; + altFontColorSE = "25 56 68 255"; + dirty = "0"; + }; + }; + }; + }; + }; +}; +//--- OBJECT WRITE END --- + +//--- OBJECT WRITE BEGIN --- Mute options Popup +new GuiControl(ProPackEditMuteItem) { + profile = "DlgBackProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + + new ShellPaneCtrl(ProPackEditTitle) { + profile = "ShellDlgPaneProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "150 110"; + extent = "400 300"; + minExtent = "48 92"; + visible = "1"; + helpTag = "0"; + text = "Edit::"; + noTitleBar = "0"; + + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "21 42"; + extent = "80 22"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + text = "Action:"; + }; + new ShellPopupMenu(ProPackEditMuteActions) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "97 34"; + extent = "249 36"; + minExtent = "49 36"; + visible = "1"; + helpTag = "0"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "21 80"; + extent = "80 22"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + text = "Alter Text:"; + }; + new ShellTextEditCtrl() { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "97 72"; + extent = "249 38"; + minExtent = "32 38"; + visible = "1"; + variable = "$ProPackGui::AlterText"; + helpTag = "0"; + historySize = "0"; + maxLength = "100"; + password = "0"; + glowOffset = "9 9"; + }; + new GuiMLTextCtrl(ProPackEditNotes) { + profile = "ProPackTextCTRL"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 113"; + extent = "368 100"; + minExtent = "8 8"; + visible = "1"; + lineSpacing = "2"; + allowColorChars = "1"; + maxChars = "-1"; + }; + // cancel - commit offset + //- 270 - 130 + //- 50 [135] (30) [135] 50 + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "215 245"; + extent = "135 38"; + minExtent = "32 38"; + visible = "1"; + command = "ProPackGui.setMuteItem();"; + helpTag = "0"; + text = "Commit Changes"; + simpleStyle = "0"; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "50 245"; + extent = "135 38"; + minExtent = "32 38"; + visible = "1"; + command = "ProPackEditMuteActions.clear();Canvas.popDialog(ProPackEditMuteItem);"; + accelerator = "escape"; + helpTag = "0"; + text = "Cancel"; + simpleStyle = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/ProPack_Final/scripts/Propack/gui/trans.png b/ProPack_Final/scripts/Propack/gui/trans.png new file mode 100644 index 0000000..0d8eb56 Binary files /dev/null and b/ProPack_Final/scripts/Propack/gui/trans.png differ diff --git a/ProPack_Final/scripts/autoexec/FilterPopup.cs b/ProPack_Final/scripts/autoexec/FilterPopup.cs new file mode 100644 index 0000000..1910143 --- /dev/null +++ b/ProPack_Final/scripts/autoexec/FilterPopup.cs @@ -0,0 +1,157 @@ +// Filter Popup 1.1 by MexicanSquirrel +// Email: dan-martins@home.com + +// Changes the filter text to a nice little popup menu. + +// New to this version: Added "ADD" and "DELETE" buttons beside the popup that +// let you add and delete filters quickly and easily. vge (that's 'duh' for those +// of you who haven't played T1 ;) + +// Note: if you run in 640x480 resolution the new buttons will not be available to you. They would be, but they won't fit :o + +package FilterPopup { + + + function FilterPopupLoad() { + + new ShellPopupMenu(FilterPopup) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "46 -3"; + extent = "195 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + + if ($pref::Video::Resolution !$= "640 480 16" && $pref::Video::Resolution !$= "640 480 32") { + + new ShellBitmapButton(FilterPopup_Add) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "223 -3"; + extent = "64 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "FilterPopup.addNewFilter();"; + helpTag = "0"; + text = "ADD"; + simpleStyle = "0"; + }; + new ShellBitmapButton(FilterPopup_Delete) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "270 -3"; + extent = "64 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "FilterPopup.deleteFilter();"; + helpTag = "0"; + text = "DELETE"; + simpleStyle = "0"; + }; + + } // if + + $FilterPopupLoaded = 1; + + } // function FilterPopupLoad() + + + function FilterPopupSetup() { + + if (!$FilterPopupLoaded) FilterPopupLoad(); + + if (isObject(GMJ_FilterText)) + GMJ_FilterText.delete(); + + GM_JoinPane.remove(FilterPopup); + GM_JoinPane.add(FilterPopup); + + if ($pref::Video::Resolution !$= "640 480 16" && $pref::Video::Resolution !$= "640 480 32") { + + GM_JoinPane.remove(FilterPopup_Add); + GM_JoinPane.remove(FilterPopup_Delete); + + GM_JoinPane.add(FilterPopup_Add); + GM_JoinPane.add(FilterPopup_Delete); + } + + FilterPopup.clear(); + + FilterPopup.add("All Servers", 0, 1); + FilterPopup.add("Buddies", 1, 1); + FilterPopup.add("Favorites", 2, 1); + + for (%i = 0; $pref::ServerBrowser::Filter[%i] !$= ""; %i++) + FilterPopup.add(getField($pref::ServerBrowser::Filter[%i], 0), %i + 3, 1); + + FilterPopup.setSelected($pref::ServerBrowser::activeFilter); + } // FilterPopupSetup() + + function FilterPopup::onSelect(%this, %id, %text) { + + // set the selected item as the current filter + $pref::ServerBrowser::activeFilter = %id; + GMJ_Browser.runQuery(); + } + + function FilterPopup::addNewFilter() { + + $FilterPopupAddingNew = 1; + canvas.pushDialog(ChooseFilterDlg); + ChooseFilterDlg.newFilter(); + } + + function FilterPopup::deleteFilter() { + + if ($pref::ServerBrowser::activeFilter > 2) { + canvas.pushDialog(ChooseFilterDlg); + ChooseFilterDlg.deleteFilter(); + ChooseFilterDlg.go(); + } + } + +// ------------------------------------- +// Overrides +// ------------------------------------- + + function GameGui::onWake(%this) { + parent::onWake(%this); + FilterPopupSetup(); + } + + function ChooseFilterDlg::onSleep(%this) { + parent::onSleep(%this); + + FilterPopupSetup(); + } + + function FilterEditDlg::onSleep(%this) { + parent::onSleep(%this); + if ($FilterPopupAddingNew) + ChooseFilterDlg.go(); + $FilterPopupAddingNew = 0; + } + +}; //package FilterPopup + +$FilterPopupLoaded = 0; +$FilterPopupAddingNew = 0; + +activatePackage(FilterPopup); diff --git a/ProPack_Final/scripts/autoexec/ProPackInit.cs b/ProPack_Final/scripts/autoexec/ProPackInit.cs new file mode 100644 index 0000000..c6713e0 --- /dev/null +++ b/ProPack_Final/scripts/autoexec/ProPackInit.cs @@ -0,0 +1,797 @@ +// #category = ProPack +// #name = ProPack +// #date = 1/14/2003 +// #warrior = MeBaD & Neofight +// #web = http://propack.tribes2.org +// #description = *.ownage +// #status = Till someone gives me somfin good to add... done :X - MeBaD + +exec("scripts/Propack/ProPackAutoChat.cs"); +exec("scripts/Propack/ProPackFlagTrixy.cs"); +exec("scripts/Propack/ProPackDemo.cs"); +exec("scripts/Propack/ProPackFixes.cs"); +exec("scripts/Propack/ProPackFlag.cs"); +exec("scripts/Propack/ProPackInfo.cs"); +exec("scripts/Propack/ProPackJoinRetry.cs"); +exec("scripts/Propack/ProPackMulti.cs"); +exec("scripts/Propack/ProPackObjective.cs"); +exec("scripts/Propack/ProPackObserved.cs"); +exec("scripts/Propack/ProPackThrow.cs"); +exec("scripts/Propack/ProPackTracker.cs"); + +if(isFile("prefs/ProPackPrefs.cs")) { + exec("prefs/ProPackPrefs.cs"); + error("Using existing ProPack Prefs..."); +} else { + $ProPackPrefs::AltHud = "0"; + $ProPackPrefs::ammohud = "1"; + $ProPackPrefs::AutoGenBoom = "1"; + $ProPackPrefs::AutoGotFlag = "1"; + $ProPackPrefs::AutoGrabSpeed = "1"; + $ProPackPrefs::AutoTaunt = "1"; + $ProPackPrefs::AutoVPadBoom = "1"; + $ProPackPrefs::bottomprintdlg = "GuiDefaultProfile"; + $ProPackPrefs::bottomprintdlgVar = "0"; + $ProPackPrefs::CarrierHudActive = "0"; + $ProPackPrefs::ChatMenuHud = "GuiDefaultProfile"; + $ProPackPrefs::ChatMenuHudVar = "0"; + $ProPackPrefs::CKillsActive = "1"; + $ProPackPrefs::DeathMessages = "1"; + $ProPackPrefs::FlagHudActive = "1"; + $ProPackPrefs::FPSHud = "1"; + $ProPackPrefs::GrabSpeedText1 = "Crawling Home "; + $ProPackPrefs::GrabSpeedText2 = "Jogging Home "; + $ProPackPrefs::GrabSpeedText3 = "Running Home "; + $ProPackPrefs::GrabSpeedText4 = "Cruisin\' Home "; + $ProPackPrefs::GrabSpeedText5 = "Haulin\' Ass "; + $ProPackPrefs::hudclusterback = "0"; + $ProPackprefs::InfoHudActivate = "1"; + $ProPackPrefs::InfoHudActive = "1"; + $ProPackPrefs::mainvotehud = "GuiDefaultProfile"; + $ProPackPrefs::mainVoteHudVar = "0"; + $ProPackPrefs::MuteChatDisplay = "1"; + $ProPackPrefs::MuteDefaultKeys = "1"; + $ProPackPrefs::MuteSpammers = "0"; + $ProPackPrefs::MuteToolsActive = "1"; + $ProPackPrefs::MuteToolsHackzorKitPickup = "Alter/Split-to-InfoHud"; + $ProPackPrefs::MuteToolsHackzorKitPickup_Append = "=NEW KIT="; + $ProPackPrefs::MuteToolsHackzorLoadout = "Append-to-InfoHud"; + $ProPackPrefs::MuteToolsHackzorLoadout_Append = ""; + $ProPackPrefs::MuteToolsHackzorPackOff = "BottomPrint"; + $ProPackPrefs::MuteToolsHackzorPackOff_Append = ""; + $ProPackPrefs::MuteToolsHackzorPackOn = "BottomPrint"; + $ProPackPrefs::MuteToolsHackzorPackOn_Append = ""; + $ProPackPrefs::MuteToolsmsgCarKill = "Mute"; + $ProPackPrefs::MuteToolsmsgCTFEnemyCap = "Mute"; + $ProPackPrefs::MuteToolsmsgCTFEnemyFlagTouch = "Mute"; + $ProPackPrefs::MuteToolsMsgCTFFlagCapped = "Mute"; + $ProPackPrefs::MuteToolsMsgCTFFlagDropped = "Mute"; + $ProPackPrefs::MuteToolsMsgCTFFlagMined = "Mute"; + $ProPackPrefs::MuteToolsMsgCTFFlagReturned = "Mute"; + $ProPackPrefs::MuteToolsMsgCTFFlagTaken = "Mute"; + $ProPackPrefs::MuteToolsmsgCTFFriendCap = "Mute"; + $ProPackPrefs::MuteToolsmsgCTFFriendFlagTouch = "Mute"; + $ProPackPrefs::MuteToolsmsgDepInvDes = "Mute"; + $ProPackPrefs::MuteToolsmsgDepInvRep = "Mute"; + $ProPackPrefs::MuteToolsmsgDepSensorDes = "Mute"; + $ProPackPrefs::MuteToolsmsgDepTurDes = "Mute"; + $ProPackPrefs::MuteToolsmsgDepTurRep = "Mute"; + $ProPackPrefs::MuteToolsmsgDepTurretRep = "Mute"; + $ProPackPrefs::MuteToolsmsgEscAsst = "Mute"; + $ProPackPrefs::MuteToolsmsgFlagDef = "Mute"; + $ProPackPrefs::MuteToolsmsgGenDef = "Mute"; + $ProPackPrefs::MuteToolsmsgGenDes = "Alter/Split-to-InfoHud"; + $ProPackPrefs::MuteToolsmsgGenDes_Append = "Enemy Lights OUT!"; + $ProPackPrefs::MuteToolsmsgGenRep = "Mute"; + $ProPackPrefs::MuteToolsmsgHeadshot = "Mute"; + $ProPackPrefs::MuteToolsmsgInvDes = "Mute"; + $ProPackPrefs::MuteToolsmsgInvRep = "Mute"; + $ProPackPrefs::MuteToolsmsgIStationRep = "Mute"; + $ProPackPrefs::MuteToolsmsgItemPickup = "Append-to-InfoHud"; + $ProPackPrefs::MuteToolsMsgItemPickup_Append = ""; + $ProPackPrefs::MuteToolsMsgMissionEnd = "Mute"; + $ProPackPrefs::MuteToolsMsgMissionEnding = "Mute"; + $ProPackPrefs::MuteToolsMsgMissionStart = "Mute"; + $ProPackPrefs::MuteToolsmsgMPBTeleDes = "Alter/Split-to-InfoHud"; + $ProPackPrefs::MuteToolsmsgMPBTeleDes_Append = "MPB Teleport OUT!"; + $ProPackPrefs::MuteToolsmsgRearshot = "Mute"; + $ProPackPrefs::MuteToolsmsgRepairKitUsed = "Alter/Split-to-InfoHud"; + $ProPackPrefs::MuteToolsmsgRepairKitUsed_Append = "-KIT USED-"; + $ProPackPrefs::MuteToolsMsgSatchelChargeDetonate = "BottomPrint"; + $ProPackPrefs::MuteToolsMsgSatchelChargeDetonate_Append = "Sachel BOOM!"; + $ProPackPrefs::MuteToolsMsgSatchelChargePlaced = "BottomPrint"; + $ProPackPrefs::MuteToolsMsgSatchelChargePlaced_Append = "Sachel deployed"; + $ProPackPrefs::MuteToolsmsgSensorDes = "Mute"; + $ProPackPrefs::MuteToolsmsgSensorRep = "Mute"; + $ProPackPrefs::MuteToolsmsgSentryDes = "Mute"; + $ProPackPrefs::MuteToolsmsgSentryRep = "Mute"; + $ProPackPrefs::MuteToolsmsgSolarDes = "Alter/Split-to-InfoHud"; + $ProPackPrefs::MuteToolsmsgSolarDes_Append = "Solar Panel OUT!"; + $ProPackPrefs::MuteToolsmsgsolarRep = "Mute"; + $ProPackPrefs::MuteToolsMsgTeamRabbitFlagDropped = "Mute"; + $ProPackPrefs::MuteToolsMsgTeamRabbitFlagReturned = "Mute"; + $ProPackPrefs::MuteToolsMsgTeamRabbitFlagTaken = "Mute"; + $ProPackPrefs::MuteToolsMsgTR2FlagDropped = "Mute"; + $ProPackPrefs::MuteToolsMsgTR2FlagTaken = "Mute"; + $ProPackPrefs::MuteToolsMsgTR2InstantBonus = "Mute"; + $ProPackPrefs::MuteToolsmsgTurretDes = "Mute"; + $ProPackPrefs::MuteToolsMsgTurretMount = "Append-to-InfoHud"; + $ProPackPrefs::MuteToolsMsgTurretMount_Append = ""; + $ProPackPrefs::MuteToolsmsgTurretRep = "Mute"; + $ProPackPrefs::MuteToolsmsgVehicleDestroy = "Mute"; + $ProPackPrefs::MuteToolsmsgVehicleScore = "Mute"; + $ProPackPrefs::MuteToolsmsgVehicleTeamDestroy = "Mute"; + $ProPackPrefs::MuteToolsmsgVSDes = "Alter/Split-to-InfoHud"; + $ProPackPrefs::MuteToolsmsgVSDes_Append = "Enemy V-Pad OUT!"; + $ProPackPrefs::MuteToolsmsgVSRep = "Mute"; + $ProPackPrefs::MuteToolsmsgVStationRep = "Mute"; + $ProPackPrefs::MuteToolsscoreFlaRetMsg = "Mute"; + $ProPackPrefs::MuteToolsscoreStaleRetMsg = "BottomPrint"; + $ProPackPrefs::MuteToolsscoreStaleRetMsg_Append = "Stalemate Broken"; + $ProPackPrefs::OBHudActive = "1"; + $ProPackPrefs::outerChatHud = "GuiChatBackProfile"; + $ProPackPrefs::outerChatHudVar = "1"; + $ProPackPrefs::PingHud = "1"; + $ProPackPrefs::retframehud = "0"; + $ProPackPrefs::ScoreHudActive = "1"; + $ProPackPrefs::SpeedHud = "1"; + $ProPackPrefs::AddPeek = "1"; + $ProPackPrefs::StatusHudActive = "1"; + $ProPackPrefs::TR2BonusHud = "TR2TransHudProfile"; + $ProPackPrefs::TR2BonusHudVar = "0"; + $ProPackPrefs::TR2EventPopup = "TR2EventPopupProfile"; + $ProPackPrefs::TR2EventPopupVar = "1"; + $ProPackPrefs::TrackerActive = "1"; + $ProPackPrefs::TrackerHeadShotSound = "1"; + $ProPackPrefs::TrackerPopup = "1"; + $ProPackPrefs::WaveToObserver = "1"; + $ProPackPrefs::SpeedPeekRecord = 0; + error("Creating ProPack Prefs..."); +} + +package ProPackLoad { + //------------------------------------------------------------------------------------------- + // Load Gui + //------------------------------------------------------------------------------------------- + function toggleProPack(%val) { + if ( %val ) + toggleCursorHuds('ProPackGui'); + } + + function DispatchLaunchMode() { + // Needs to exist before everything else :o + new GuiControlProfile ("ProPackTextCtrl") { + fontType = "Univers Condensed"; + fontSize = 16; + fontColor = "255 255 255"; + justify = "left"; + }; + + new GuiControlProfile ("TR2CarrierHudProfile") { + opaque = false; + border = true; + borderColor = "225 225 225 100"; + }; + + new GuiControlProfile ("TR2TransHudProfile") { + bitmap = "scripts/ProPack/gui/trans.png"; + borderColor = "0 0 0 0"; + }; + + if (isFile("prefs/lifetimekills.cs")) exec("prefs/lifetimekills.cs"); + if (!isObject(ProPackGui)) exec("scripts/ProPack/gui/ProPackInterface.gui"); + + schedule(1500, 0, "ProPackGuiLoadout"); + parent::DispatchLaunchMode(); + + ProPackGrab1.setText($ProPackPrefs::GrabSpeedText1); + ProPackGrab2.setText($ProPackPrefs::GrabSpeedText2); + ProPackGrab3.setText($ProPackPrefs::GrabSpeedText3); // Bug fix! + ProPackGrab4.setText($ProPackPrefs::GrabSpeedText4); + ProPackGrab5.setText($ProPackPrefs::GrabSpeedText5); + } + + //------------------------------------------------------------------------------------------- + // Pro Pack Gui control + //------------------------------------------------------------------------------------------- + function ProPackGui::loadHud( %this, %tag ) { + $Hud[%tag] = ProPackGui; + $Hud[%tag].childGui = ProPackParent; + $Hud[%tag].parent = ProPackParent; + } + + function ProPackGui::onwake(%this) { + if ( isObject( hudMap ) ) { + hudMap.pop(); + hudMap.delete(); + } + new ActionMap( hudMap ); + hudMap.blockBind( moveMap, toggleScoreScreen ); + hudMap.blockBind( moveMap, toggleCommanderMap ); + hudMap.blockBind( moveMap, toggleinventoryScreen ); + hudMap.bindCmd( keyboard, escape, "", "ProPackGui.ondone();" ); + hudMap.push(); + + alxPlay(alxCreateSource(AudioChat, "fx/misc/diagnostic_on.wav")); + + ProPackGui.setFrameList("ProPackHudOptions"); + + ProPackHudOptionsBtn.setValue(true); + ProPackHudOptionsNotes.setText(getProPackNotes("ProPackHudOptions")); + ProPackGui.setupMuteToolsList(); + } + + function ProPackGui::setupHud( %this, %tag ) { } + + function ProPackGui::onsleep(%this) { + hudMap.pop(); + hudMap.delete(); + updateActionMaps(); + ProPackGui.HideAllRight(); + + TR2EventPopup.profile = $ProPackPrefs::TR2EventPopup; + TR2BonusHud.profile = $ProPackPrefs::TR2BonusHud; + outerChatHud.profile = $ProPackPrefs::outerChatHud; + ChatMenuHud.profile = $ProPackPrefs::ChatMenuHud; + mainvotehud.profile = $ProPackPrefs::mainvotehud; + hudclusterback.opacity = $ProPackPrefs::hudclusterback; + BottomPrintDlg.profile = $ProPackPrefs::bottomprintdlg; + ProPackEditMuteActions.clear(); + $ProPackGui::Command = ""; + clientcmdTogglePlayHuds(true); + } + + function ProPackGui::ondone(%this) { + toggleCursorHuds( 'ProPackGui' ); + } + + // HIDE all right sides + function ProPackGui::HideAllRight(%this) { + + // the Panes + ProPackHudOptionsFrame.setVisible(false); + ProPackAutoChatFrame.setVisible(false); + ProPackTrackerFrame.setVisible(false); + ProPackInfoHudFrame.setVisible(false); + ProPackOBHudFrame.setVisible(false); + ProPackMultiFrame.setVisible(false); + ProPackMuteFrame.setVisible(false); + + // The Tabs + ProPackHudOptionsBtn.setValue(false); + ProPackAutoChatBtn.setValue(false); + ProPackTrackerBtn.setValue(false); + ProPackInfoHudBtn.setValue(false); + ProPackOBHudBtn.setValue(false); + ProPackMultiBtn.setValue(false); + ProPackMuteBtn.setValue(false); + + clientcmdTogglePlayHuds(false); + + ProPackGui.Saveus(); + + for (%i = 1; %i < 6; %i++) { // moved from multihud for faster processing + $ProMulti[%i] = ""; + } + } + + function ProPackGui::Saveus(%this) { + + // Play gui's + $ProPackPrefs::TR2EventPopup = getProPackTRVALtoGUI(ProPackTR2EventPopup.getValue()); + $ProPackPrefs::TR2BonusHud = getProPackTRVALtoGUI(ProPackTR2BonusHud.getValue()); + $ProPackPrefs::outerChatHud = getProPackVALtoGUI(ProPackOuterChatHud.getValue()); + $ProPackPrefs::ChatMenuHud = getProPackVALtoGUI(ProPackChatMenuHud.getValue()); + $ProPackPrefs::mainvotehud = getProPackVALtoGUI(ProPackmainVoteHud.getValue()); + $ProPackPrefs::bottomprintdlg = getProPackVALtoGUI(ProPackBottomPrintDlg.getValue()); + $ProPackPrefs::ammohud = ProPackammohud.getValue(); + $ProPackPrefs::retframehud = ProPackretframehud.getValue(); + $ProPackPrefs::hudClusterBack = ProPackhudClusterBack.getValue(); + + // Auto Chat + $ProPackPrefs::AutoTaunt = ProPackAutoTaunt.getValue(); + $ProPackPrefs::AutoGotFlag = ProPackAutoGotFlag.getValue(); + $ProPackPrefs::AutoGrabSpeed = ProPackAutoGrabSpeed.getValue(); + $ProPackPrefs::AutoGenBoom = ProPackAutoGenBoom.getValue(); + $ProPackPrefs::AutoVPadBoom = ProPackAutoVPadBoom.getValue(); + $ProPackPrefs::GrabSpeedText1 = ProPackGrab1.getValue(); + $ProPackPrefs::GrabSpeedText2 = ProPackGrab2.getValue(); + $ProPackPrefs::GrabSpeedText3 = ProPackGrab3.getValue(); + $ProPackPrefs::GrabSpeedText4 = ProPackGrab4.getValue(); + $ProPackPrefs::GrabSpeedText5 = ProPackGrab5.getValue(); + $ProPackPrefs::WaveToObserver = ProPackWaveToObserver.getValue(); + + // Tracker + $ProPackPrefs::TrackerActive = ProPackTrackerActivate.getValue(); + $ProPackPrefs::TrackerPopup = ProPackKillPopup.getValue(); + $ProPackPrefs::TrackerHeadShotSound = ProPackHeadShotSounds.getValue(); + + // InfoHud + $ProPackPrefs::InfoHudActive = ProPackInfoHudActivate.getValue(); + $ProPackPrefs::DeathMessages = ProPackSplitDeathMsg.getValue(); + $ProPackPrefs::CKillsActive = ProPackColorKills.getValue(); + $ProPackPrefs::MuteDefaultKeys = ProPackMuteChatDisplay.getValue(); + // New Peek Speed + $ProPackPrefs::AddPeek = ProPackAddPeekActive.getValue(); + + // OBhud & FlagHud + $ProPackPrefs::OBHudActive = ProPackOBHudActivate.getValue(); + $ProPackPrefs::ScoreHudActive = ProPackScoreHudActivate.getValue(); + $ProPackPrefs::StatusHudActive = ProPackStatusHudActivate.getValue(); + $ProPackPrefs::FlagHudActive = ProPackFlagHudActivate.getValue(); + + // Multi + $ProPackPrefs::FPSHud = ProPackFPSHudActive.getValue(); + $ProPackPrefs::PingHud = ProPackPingHudActive.getValue(); + $ProPackPrefs::AltHud = ProPackAltHudActive.getValue(); + $ProPackPrefs::SpeedHud = ProPackSpeedHudActive.getValue(); + $ProPackPrefs::PeekSpeedHud = ProPackAddPeekActive.getValue(); + + //mute + $ProPackPrefs::MuteToolsActive = ProPackMuteToolsActivate.getValue(); + + export("$ProPackPrefs::*", "prefs/ProPackPrefs.cs", false); + error("ProPack: Saving Prefs..."); + } + + function ProPackGuiLoadout(%this) { + TR2EventPopup.profile = $ProPackPrefs::TR2EventPopup; + TR2BonusHud.profile = $ProPackPrefs::TR2BonusHud; + outerChatHud.profile = $ProPackPrefs::outerChatHud; + ChatMenuHud.profile = $ProPackPrefs::ChatMenuHud; + mainvotehud.profile = $ProPackPrefs::mainvotehud; + hudclusterback.opacity = $ProPackPrefs::hudclusterback; + BottomPrintDlg.profile = $ProPackPrefs::bottomprintdlg; + } + + function ProPackGui::setFrameList(%bs, %this) { + + %frame = %this @ "Frame"; + %button = %this @ "Btn"; + %notes = %this @ "Notes"; + + // Play Gui's + ProPackTR2EventPopup.setValue(getProPackTRGUItoVal($ProPackPrefs::TR2EventPopup)); + ProPackTR2BonusHud.setValue(getProPackTRGUItoVal($ProPackPrefs::TR2BonusHud)); + ProPackOuterChatHud.setValue(getProPackGUItoVal($ProPackPrefs::outerChatHud)); + ProPackmainVoteHud.setValue(getProPackGUItoVal($ProPackPrefs::mainVoteHud)); + ProPackChatMenuHud.setValue(getProPackGUItoVal($ProPackPrefs::ChatMenuHud)); + ProPackBottomPrintDlg.setValue(getProPackGUItoVal($ProPackPrefs::bottomprintdlg)); + ProPackammohud.setValue($ProPackPrefs::ammohud); + ProPackretframehud.setValue($ProPackPrefs::retframehud); + ProPackhudClusterBack.setValue($ProPackPrefs::hudClusterBack); + + // Autochat + ProPackAutoTaunt.setValue($ProPackPrefs::AutoTaunt); + ProPackAutoGotFlag.setValue($ProPackPrefs::AutoGotFlag); + ProPackAutoGrabSpeed.setValue($ProPackPrefs::AutoGrabSpeed); + ProPackAutoGenBoom.setValue($ProPackPrefs::AutoGenBoom); + ProPackAutoVPadBoom.setValue($ProPackPrefs::AutoVPadBoom); + ProPackGrabInfo.setText("0 -> 99kph\n\n100 -> 174kph\n\n175 -> 249kph\n\n 250 -> 300kph\n\n 300++kph"); + ProPackWaveToObserver.setValue($ProPackPrefs::WaveToObserver); + + // Tracker + ProPackTrackerActivate.setValue($ProPackPrefs::TrackerActive); + ProPackKillPopup.setValue($ProPackPrefs::TrackerPopup); + ProPackHeadShotSounds.setValue($ProPackPrefs::TrackerHeadShotSound); + + // InfoHud + ProPackInfoHudActivate.setValue($ProPackPrefs::InfoHudActive); + ProPackSplitDeathMsg.setValue($ProPackPrefs::DeathMessages); + ProPackColorKills.setValue($ProPackPrefs::CKillsActive); + ProPackMuteChatDisplay.setValue($ProPackPrefs::MuteDefaultKeys); + ProPackAddPeekActive.setValue($ProPackPrefs::AddPeek); // Speed Peek + + // OBhud & FlagHud + ProPackOBHudActivate.setValue($ProPackPrefs::OBHudActive); + ProPackScoreHudActivate.setValue($ProPackPrefs::ScoreHudActive); + ProPackStatusHudActivate.setValue($ProPackPrefs::StatusHudActive); + ProPackFlagHudActivate.setValue($ProPackPrefs::FlagHudActive); + + // Multi + ProPackFPSHudActive.setValue($ProPackPrefs::FPSHud); + ProPackPingHudActive.setValue($ProPackPrefs::PingHud); + ProPackAltHudActive.setValue($ProPackPrefs::AltHud); + ProPackSpeedHudActive.setValue($ProPackPrefs::SpeedHud); + ProPackPeekSpdActive.setValue($ProPackPrefs::PeekSpeedHud); + + + // Mute + ProPackMuteToolsActivate.setValue($ProPackPrefs::MuteToolsActive); + + %notes.setText(getProPackNotes(%this)); + ProPackGui.HideAllRight(); + %button.setValue(true); + %frame.setVisible(true); + } + + function getProPackTRVALtoGUI(%this) { + if (%this == 1) + return "TR2EventPopupProfile"; + else + return "TR2TransHudProfile"; + } + + function getProPackTRGUItoVal(%this) { + if ( (%this $= "TR2EventPopupProfile" ) || (%this $= "TR2BonusPopupProfile") ) + return true; + else + return false; + } + + function getProPackGUItoVal(%this) { + if (%this $= "GuiDefaultProfile") + return false; + else + return true; + } + + function getProPackVALtoGUI(%this) { + if (%this == 0) + return "GuiDefaultProfile"; + else + return "GuiChatBackProfile"; + } + + function getProReverse (%this) { + if (%this == 1) + return false; + else + return true; + } + + function getProPackNotes(%this) { + + %ProPackVersion = "7 RELEASE"; + %HeaderFont = "ProPack Version " @ + %ProPackVersion @ "\n\n"; + %FooterFont = ""; + + switch$ (%this) { + case "ProPackHudOptions": + return %HeaderFont @ "HudControl\n" @ + %FooterFont @ "Alter Huds from Transparrent to Opaque!"; + case "ProPackAutoChat": + return %HeaderFont @ "Auto Chat Controls\n" @ + %FooterFont @ "Auto-response for events!"; + case "ProPackTracker": + return %HeaderFont @ "Kill Tracking Events!\n" @ + %FooterFont @ "Events for legit kills!"; + case "ProPackInfoHud": + return %HeaderFont @ "Info Hud Controls\n" @ + %FooterFont @ "AKA Split ChatHud (Mute/Pullout/Bottomprint see Mute tools)"; + case "ProPackOBHud": + return %HeaderFont @ "THE Objective Hud\n" @ + %FooterFont @ "OMG, the default one is ghey!"; + case "ProPackMulti": + return %HeaderFont @ "Multi Hud Control\n" @ + %FooterFont @ "FPS/Ping/Altitude/Speed/Peek Speed all rolled into one!"; + case "ProPackMute": + return %HeaderFont @ "Mute/Alter Tools\n" @ + %FooterFont @ "Tools to change a selected group of messages\nwhile *still* being able to hear the sounds from that message!\n*This list contains the most common message groups to alter*"; + } + } + + //------------------------------------------------------------------------------------------- + // Handle Mute Tools list + //------------------------------------------------------------------------------------------- + function ProPackGui::setupMuteToolsList(%this) { + if (!ProPackGui.fillList) { + %guiRoot = ProPackMuteToolsTree.getFirstRootItem(); + %newGuiId = ProPackMuteToolsTree.insertItem( %guiRoot, "Root Mute/Alter Tools", 0 ); + ProPackGui.filllist((%guiRoot + 1)); + ProPackMuteToolsTree.expandItem( %newGuiId ); + ProPackMuteToolsTree.selectItem( %newGuiId ); + ProPackGui.fillList = true; + } + } + + function ProPackGui::fillList(%this, %guiRoot) { + %listRoot = ProPackMuteToolsTree.insertItem( %guiRoot, "Flag Messages", 0 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgCTFFlagCapped @ ")- Flag Capped", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgCTFEnemyCap @ ")- Enemy Capture (score)", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgCTFFriendCap @ ")- Friendly Capture (score)", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgCTFEnemyFlagTouch @ ")- Enemy Touch Flag", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgCTFFriendFlagTouch @ ")- Friendly Touch Flag", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsscoreFlaRetMsg @ ")- Flag Returned", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsscoreStaleRetMsg @ ")- StaleMate Broken", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgCarKill @ ")- Carrier Killed", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgEscAsst @ ")- Flag Assist", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgCTFFlagReturned @ ")- Flag Returned", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgCTFFlagTaken @ ")- Flag Taken", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgCTFFlagDropped @ ")- Flag Dropped", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgFlagDef @ ")- Flag Defend", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgTeamRabbitFlagReturned @ ")- Team Rabbit Flag Returned", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgTeamRabbitFlagTaken @ ")- Team Rabbit Flag Taken", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgTeamRabbitFlagDropped @ ")- Team Rabbit Flag Dropped", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgTR2FlagTaken @ ")- TR2 Flag Taken", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgTR2FlagDropped @ ")- TR2 Flag Dropped", 1 ); + + %listRoot = ProPackMuteToolsTree.insertItem( %guiRoot, "Destroy Point Messages", 0 ); + %VlistRoot = ProPackMuteToolsTree.insertItem( %listRoot, "Vehicles", 0 ); + ProPackMuteToolsTree.insertItem( %VlistRoot, "(" @ $ProPackPrefs::MuteToolsmsgVehicleDestroy @ ")- Vehicle (legit)", 1 ); + ProPackMuteToolsTree.insertItem( %VlistRoot, "(" @ $ProPackPrefs::MuteToolsmsgVehicleTeamDestroy @ ")- Vehicle (TK)", 1 ); + ProPackMuteToolsTree.insertItem( %VlistRoot, "(" @ $ProPackPrefs::MuteToolsmsgVehicleScore @ ")- Vehicle (You Score)", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgSentryDes @ ")- Sentry Turret Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgSensorDes @ ")- Sensor Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgTurretDes @ ")- Turret Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgSolarDes @ ")- Solar Pannel Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgDepSensorDes @ ")- Deployed Sensor Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgDepTurDes @ ")- Deployed Turret Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgDepInvDes @ ")- Deployed Inventory Station Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgInvDes @ ")- Inventory Station Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgVSDes @ ")- V-Pad Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgMPBTeleDes @ ")- MPB Teleport Destroy", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgGenDes @ ")- Generator Destroy", 1 ); + + %listRoot = ProPackMuteToolsTree.insertItem( %guiRoot, "Repair Point Messages", 0 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgGenRep @ ")- Generator Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgIStationRep @ ")- Inventory Station Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgSensorRep @ ")- Sensor Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgTurretRep @ ")- Turret Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgVStationRep @ ")- V-Pad Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgsolarRep @ ")- Solar Pannel Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgSentryRep @ ")- Sentry Turret Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgDepTurretRep @ ")- Deployed Turret Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgDepInvRep @ ")- Deployed Inventory Station Repair", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgGenDef @ ")- Defending Generator Repair", 1 ); + + %listRoot = ProPackMuteToolsTree.insertItem( %guiRoot, "Announcer", 0 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgMissionEnd @ ")- Mission Ending CountDown", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgMissionStart @ ")- Mission Start CountDown", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgCTFFlagMined @ ")- Flag Mined", 1 ); + + %listRoot = ProPackMuteToolsTree.insertItem( %guiRoot, "Packs", 0 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsHackzorPackOn @ ")- (ALL) Pack On", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsHackzorPackOff @ ")- (ALL) Pack Off", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgSatchelChargePlaced @ ")- SatchelCharge Placed", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgSatchelChargeDetonate @ ")- SatchelCharge Detonate", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgTurretMount @ ")- Turret Mounting", 1 ); + + %listRoot = ProPackMuteToolsTree.insertItem( %guiRoot, "Misc", 0 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgItemPickup @ ")- Item Pickup", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgRepairKitUsed @ ")- RepairKit Used", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsHackzorKitPickup @ ")- Repair Kit Pickup", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsHackzorLoadout @ ")- Loadout", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgHeadshot @ ")- Headshot Point", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsmsgRearshot @ ")- RearShock Point", 1 ); + ProPackMuteToolsTree.insertItem( %listRoot, "(" @ $ProPackPrefs::MuteToolsMsgTR2InstantBonus @ ")- TR2 Instant Bonus", 1 ); + } + + function ProPackGui::getMuteListMsgType(%this, %text) { + // local because this is only used in GUI NOT gameplay!!! + // DO NOT TOUCH OR I WILL SACRIFICE YOU TO THE UE PIGS!!! + %newtext = restWords(%text); + + %textToMsgType["Flag Capped"] = "MsgCTFFlagCapped"; + %textToMsgType["Enemy Capture (score)"] = "msgCTFEnemyCap"; + %textToMsgType["Friendly Capture (score)"] = "msgCTFFriendCap"; + %textToMsgType["Friendly Touch Flag"] = "msgCTFFriendFlagTouch"; + %textToMsgType["Enemy Touch Flag"] = "msgCTFEnemyFlagTouch"; + %textToMsgType["Flag Returned"] = "scoreFlaRetMsg"; + %textToMsgType["StaleMate Broken"] = "scoreStaleRetMsg"; + %textToMsgType["Carrier Killed"] = "msgCarKill"; + %textToMsgType["Flag Defended"] = "msgFlagDef"; + %textToMsgType["Flag Assist"] = "msgEscAsst"; + %textToMsgType["Flag Returned"] = "MsgCTFFlagReturned"; + %textToMsgType["Flag Taken"] = "MsgCTFFlagTaken"; + %textToMsgType["Flag Dropped"] = "MsgCTFFlagDropped"; + %textToMsgType["Team Rabbit Flag Returned"] = "MsgTeamRabbitFlagReturned"; + %textToMsgType["Team Rabbit Flag Taken"] = "MsgTeamRabbitFlagTaken"; + %textToMsgType["Team Rabbit Flag Dropped"] = "MsgTeamRabbitFlagDropped"; + %textToMsgType["TR2 Flag Taken"] = "MsgTR2FlagTaken"; + %textToMsgType["TR2 Flag Dropped"] = "MsgTR2FlagDropped"; + + %textToMsgType["Sensor Destroy"] = "msgSensorDes"; + %textToMsgType["Turret Destroy"] = "msgTurretDes"; + %textToMsgType["Inventory Station Destroy"] = "msgInvDes"; + %textToMsgType["V-Pad Destroy"] = "msgVSDes"; + %textToMsgType["MPB Teleport Destroy"] = "msgMPBTeleDes"; + %textToMsgType["Solar Pannel Destroy"] = "msgSolarDes"; + %textToMsgType["Sentry Turret Destroy"] = "msgSentryDes"; + %textToMsgType["Deployed Sensor Destroy"] = "msgDepSensorDes"; + %textToMsgType["Deployed Turret Destroy"] = "msgDepTurDes"; + %textToMsgType["Deployed Inventory Station Destroy"] = "msgDepInvDes"; + %textToMsgType["Generator Destroy"] = "msgGenDes"; + %textToMsgType["Vehicle (legit)"] = "msgVehicleDestroy"; + %textToMsgType["Vehicle (TK)"] = "msgVehicleTeamDestroy"; + %textToMsgType["Vehicle (You Score)"] = "msgVehicleScore"; + + %textToMsgType["Generator Repair"] = "msgGenRep"; + %textToMsgType["Inventory Station Repair"] = "msgIStationRep"; + %textToMsgType["Sensor Repair"] = "msgSensorRep"; + %textToMsgType["Turret Repair"] = "msgTurretRep"; + %textToMsgType["V-Pad Repair"] = "msgVStationRep"; + %textToMsgType["Solar Pannel Repair"] = "msgsolarRep"; + %textToMsgType["Sentry Turret Repair"] = "msgSentryRep"; + %textToMsgType["Deployed Turret Repair"] = "msgDepTurretRep"; + %textToMsgType["Deployed Inventory Station Repair"] = "msgDepInvRep"; + %textToMsgType["Defending Generator Repair"] = "msgGenDef"; + + %textToMsgType["Mission Ending CountDown"] = "MsgMissionEnd"; + %textToMsgType["Mission Start CountDown"] = "MsgMissionStart"; + %textToMsgType["Flag Mined"] = "MsgCTFFlagMined"; + + %textToMsgType["(ALL) Pack On"] = "HackzorPackOn"; + %textToMsgType["(ALL) Pack Off"] = "HackzorPackOff"; + %textToMsgType["SatchelCharge Placed"] = "MsgSatchelChargePlaced"; + %textToMsgType["SatchelCharge Detonate"] = "MsgSatchelChargeDetonate"; + %textToMsgType["Turret Mounting"] = "MsgTurretMount"; + + %textToMsgType["RepairKit Used"] = "msgRepairKitUsed"; + %textToMsgType["Item Pickup"] = "MsgItemPickup"; + %textToMsgType["Loadout"] = "HackzorLoadout"; + %textToMsgType["Repair Kit Pickup"] = "HackzorKitPickup"; + %textToMsgType["Headshot Point"] = "msgHeadshot"; + %textToMsgType["RearShock Point"] = "msgRearshot"; + %textToMsgType["TR2 Instant Bonus"] = "MsgTR2InstantBonus"; + + return %textToMsgType[%newtext]; + } + + function ProPackGui::editSelectedMuteListItem(%this) { + ProPackEditNotes.setText("1) Alter/Split-to-InfoHud:\n Pulls messages to InfoHud with a replacement of the message\n" @ + "2) Append-to-InfoHud:\n Pulls messages to InfoHud while appending the text to your altered text\n" @ + "3) BottomPrint:\n Simular to Alter/Split changing a msg and printing at the bottom of the screen\n\n" @ + "***ALL of these options allow the T2 HTML style code for TextML Controling***"); + + %item = ProPackMuteToolsTree.getSelectedItem(); + %temp = ProPackMuteToolsTree.getItemText( %item ); + %command = ProPackMuteToolsTree.getItemValue( %item ); + if (%command) { + $ProPackGui::Action = ""; // clear anyway + $ProPackGui::Command = ProPackGui.getMuteListMsgType(%temp); + ProPackEditMuteActions.add( "Alter/Split-to-InfoHud", 1 ); + %index["Alter/Split-to-InfoHud"] = "1"; + ProPackEditMuteActions.add( "Append-to-InfoHud", 2 ); + %index["Append-to-InfoHud"] = "2"; + ProPackEditMuteActions.add( "BottomPrint", 3 ); + %index["BottomPrint"] = "3"; + ProPackEditMuteActions.add( "Mute", 4 ); + %index["Mute"] = "4"; + ProPackEditMuteActions.add( "Normal (Chat Menu)", "5"); + %index["Normal (Chat Menu)"] = "5"; + + ProPackEditMuteActions.setSelected(%index[$ProPackPrefs::MuteTools[ProPackGui.getMuteListMsgType(%temp)]]); + $ProPackGui::Action = $ProPackPrefs::MuteTools[ProPackGui.getMuteListMsgType(%temp)]; + $ProPackGui::AlterText = $ProPackPrefs::MuteTools[ProPackGui.getMuteListMsgType(%temp) @ "_Append"]; + $ProPackGui::FullName = %temp; + + Canvas.pushDialog( ProPackEditMuteItem ); + ProPackEditTitle.setText("Edit::" @ restWords(%temp)); + } + } + + function ProPackGui::setMuteItem(%this) { + Canvas.popDialog(ProPackEditMuteItem); + if ($ProPackGui::Action $= "Normal (Chat Menu)") { + $ProPackPrefs::MuteTools[$ProPackGui::Command @ "_Append"] = ""; + $ProPackPrefs::MuteTools[$ProPackGui::Command] = ""; + schedule(250, 0, "MessageBoxOK", "Changes Made", "Item Cleared from Alter List"); + } else if ($ProPackGui::Action $= "Mute") { + $ProPackPrefs::MuteTools[$ProPackGui::Command] = "Mute"; + $ProPackPrefs::MuteTools[$ProPackGui::Command @ "_Append"] = ""; + schedule(250, 0, "MessageBoxOK", "Changes Made", "Item added to Alter Mute list"); + } else { + $ProPackPrefs::MuteTools[$ProPackGui::Command] = $ProPackGui::Action; + if ($ProPackGui::AlterText !$= "") { + $ProPackPrefs::MuteTools[$ProPackGui::Command @ "_Append"] = $ProPackGui::AlterText; + schedule(250, 0, "MessageBoxOK", "Changes Made", + "\nAction: " @ $ProPackGui::Action @ + "\nAlter Text: " @ $ProPackGui::AlterText); + } else { + schedule(250, 0, "MessageBoxOK", "ERROR", "Text && Action required\nto Alter an Item!"); + } + } + ProPackEditMuteActions.clear(); + %dis = ProPackMuteToolsTree.getSelectedItem(); + %temp = ProPackMuteToolsTree.getItemText(%dis); + ProPackMuteToolsTree.editItem(%dis, "(" @ $ProPackPrefs::MuteTools[ProPackGui.getMuteListMsgType(%temp)] @ ")- " @ restWords($ProPackGui::FullName), 1 ); + } + + function ProPackEditMuteActions::onSelect( %this, %index, %value ) { + $ProPackGui::Action = %value; + } + //------------------------------------------------------------------------------------------- + // Handle Override Control + //------------------------------------------------------------------------------------------- + //key bind setup + function OptionsDlg::onWake( %this ) { + if (!$ProBinds) { + $RemapName[$RemapCount]="\c5ToggleProPack"; + $RemapCmd[$RemapCount]="toggleProPack"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Last Recall"; + $RemapCmd[$RemapCount]="ActivateReCall"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5LifeTimeKills"; + $RemapCmd[$RemapCount]="ActivateLifeTime"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Pitch Grenade"; + $RemapCmd[$RemapCount]="ProGrenade"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Pitch Mine"; + $RemapCmd[$RemapCount]="ProMine"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Throw RepKit"; + $RemapCmd[$RemapCount]="ProKit"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Ditch Grenades"; + $RemapCmd[$RemapCount]="DropGrenades"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Beacon Mine"; + $RemapCmd[$RemapCount]="BeaconMine"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Teleport Toggle"; + $RemapCmd[$RemapCount]="ProPackTeleportToggle"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5Mute Enemy Team"; + $RemapCmd[$RemapCount]="EnemyMute"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5AutoScreenShot"; + $RemapCmd[$RemapCount]="ActivateAutoSC"; + $RemapCount++; + + $RemapName[$RemapCount]="\c5OneKeyTaunt"; + $RemapCmd[$RemapCount]="TauntLikeHell"; + $RemapCount++; + + $ProBinds = true; + } + parent::onWake( %this ); + } + + function clientCmdSetPilotVehicleKeys() { + passengerKeys.copyBind(moveMap, toggleProPack); + passengerKeys.copyBind(moveMap, ActivateReCall); + passengerKeys.copyBind(moveMap, ActivateLifeTime); + passengerKeys.copyBind(moveMap, ProPackTeleportToggle); + passengerKeys.copyBind(moveMap, EnemyMute); + passengerKeys.copyBind(moveMap, ActivateAutoSC); + + parent::clientCmdSetPilotVehicleKeys(); + } + + function clientCmdSetPassengerVehicleKeys() { + passengerKeys.copyBind(moveMap, toggleProPack); + passengerKeys.copyBind(moveMap, ActivateReCall); + passengerKeys.copyBind(moveMap, ActivateLifeTime); + passengerKeys.copyBind(moveMap, ProPackTeleportToggle); + passengerKeys.copyBind(moveMap, EnemyMute); + passengerKeys.copyBind(moveMap, ActivateAutoSC); + + parent::clientCmdSetPassengerVehicleKeys(); + } + + function clientCmdSetWeaponsHudActive(%slot, %ret, %vis) { + parent::clientCmdSetWeaponsHudActive(%slot, %ret, %vis); + reticleFrameHud.setVisible($ProPackPrefs::retframehud); + ammoHud.setVisible($ProPackPrefs::ammohud); + } + + function clientCmdSetFirstPerson(%value) { + parent::clientCmdSetFirstPerson(%value); + ammoHud.setVisible($ProPackPrefs::ammohud); + } + + function ClientCmdDisplayHuds() { + parent::ClientCmdDisplayHuds(); + ammoHud.setVisible($ProPackPrefs::ammohud); + } + + function clientcmdTogglePlayHuds(%val) { + parent::clientcmdTogglePlayHuds(%val); + ammoHud.setVisible($ProPackPrefs::ammohud); + } +}; +activatePackage(ProPackLoad); \ No newline at end of file diff --git a/ProPack_Final/scripts/autoexec/ProPackSupport.cs b/ProPack_Final/scripts/autoexec/ProPackSupport.cs new file mode 100644 index 0000000..3e5d018 --- /dev/null +++ b/ProPack_Final/scripts/autoexec/ProPackSupport.cs @@ -0,0 +1,153 @@ +// #hide +// #category = ProPack +// #name = ProPackSupport +// #credit = MeBaD, Neofight, PanamaJack + +$String::asciiString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; + +// designed for quick access to change a Name -> clientid +function ProGhettoList() { + cancel($updatingdalist); + $updatingdalist = schedule(1000, 0, "doUpdateGhettoList"); +} + +function doUpdateGhettoList () { + $ProTeamcount[1] = 0; + $ProTeamcount[2] = 0; + + // get all names to clientID's + for (%i = 0; %i < PlayerListGroup.getCount(); %i++) { // count starts @ 0 + $MyPlayerID[PlayerListGroup.getObject(%i).name] = PlayerListGroup.getObject(%i); + $ProTeamCount[PlayerListGroup.getObject(%i).teamId]++; + } +} + +package ProPackSupport { + function DispatchLaunchMode() { + addMessageCallback('MsgClient', handleClientJoinTeam); + addMessageCallback('MsgClientJoin', handleClientJoin); + addMessageCallback('MsgClientJoinTeam', handleClientJoinTeam); + addMessageCallback('MsgClientDrop', ProGhettoList); + addMessageCallback('MsgForceObserver', ProGhettoList); + + parent::DispatchLaunchmode(); + } + + function handleClientJoin(%msgType, %msgString, %clientName, %clientId, %targetId, %isAI, %isAdmin, %isSuperAdmin, %isSmurf, %guid) { + %clientId = detag(%clientId); + %clientName = detag(%clientName); + + if (strstr(%msgString, "Welcome to Tribes2") != -1) { + $PPClientID = %clientId; + $PPName = StripNameColors(%clientName); + } + parent::handleClientJoin(%msgType, %msgString, %clientName, %clientId, %targetId, %isAI, %isAdmin, %isSuperAdmin, %isSmurf, %guid); + } + + function handleClientJoinTeam(%msgType, %msgString, %clientName, %teamName, %clientId, %teamId) { + %clientId = detag(%clientId); + %teamId = detag(%teamId); + + if ($PPClientID == %clientId) + $PPTeam = %teamId; + + ProGhettoList(); + + parent::handleClientJoinTeam(%msgType, %msgString, %clientName, %teamName, %clientId, %teamId); + } + + // From PJ's support + function String::ascii(%string, %idx) { + if(Strlen(%string) <= %idx || %idx < 0) + return -1; + %char = getSubStr(%string, %idx, 1); + %idx = Strstr($String::asciiString, %char); + if(%idx < 0) + return -1; + + if(Strcmp(%char, getSubStr($String::asciiString, %idx, 1)) == 0) + return %idx + 32; + else + return %idx + 64; + } + + function String::char(%ascii) { + if(%ascii < 32 || %ascii > 128) + return ""; + else + return getSubStr($String::asciiString, %ascii-32, 1); + } + + function StripNameColors(%in) { + %name = ""; + + for (%i = 0; %i < Strlen(%in); %i++) { + %ascii = String::ascii(%in, %i); + if ((%ascii > 31) && (%ascii < 129)) + %name = %name @ String::char(%ascii); + } + + %name = %name @ ""; + return %name; + } + + function StripAll(%in) { + %name = ""; + + for (%i = 0; %i < Strlen(%in); %i++) { + %ascii = String::ascii(%in, %i); + if (((%ascii > 47) && (%ascii < 58)) || ((%ascii > 64) && (%ascii < 91)) || ((%ascii > 96) && (%ascii < 123))) + %name = %name @ String::char(%ascii); + } + + %name = %name @ ""; + return %name; + } + + // For weapon tracking--maybe one day this will be unnecessary... + function ProNoSpacedWeaponName(%num) { + // Edit this if you are a Modder + %NoSpace[1] = "Blaster"; + %NoSpace[2] = "Plasma"; + %NoSpace[3] = "Chaingun"; + %NoSpace[4] = "Disc"; + %NoSpace[5] = "Grenade"; + %NoSpace[6] = "Laser"; + %NoSpace[7] = "Elf"; + %NoSpace[8] = "Mortar"; + %NoSpace[9] = "Missile"; + %NoSpace[10] = "Shocklance"; + %NoSpace[11] = "Mine"; + %NoSpace[12] = "Explosion"; + %NoSpace[13] = "Impact"; + %NoSpace[14] = "Ground"; + %NoSpace[15] = "Turret"; + %NoSpace[16] = "PlasmaTurret"; + %NoSpace[17] = "AATurret"; + %NoSpace[18] = "ElfTurret"; + %NoSpace[19] = "MortarTurret"; + %NoSpace[20] = "MissileTurret"; + %NoSpace[21] = "ClampTurret"; + %NoSpace[22] = "SpikeTurret"; + %NoSpace[23] = "SentryTurret"; + %NoSpace[24] = "OutOfBounds"; + %NoSpace[25] = "lava"; + %NoSpace[26] = "ShrikeBlaster"; + %NoSpace[27] = "BellyTurret"; + %NoSpace[28] = "Bomberbomb"; + %NoSpace[29] = "TankChaingun"; + %NoSpace[30] = "TankMortar"; + %NoSpace[31] = "SatchelCharge"; + %NoSpace[32] = "MPBMissile"; + %NoSpace[33] = "Lightning"; + %NoSpace[34] = "VehicleSpawn"; + %NoSpace[35] = "ForceField"; + %NoSpace[36] = "Crash"; + %NoSpace[98] = "NexusCamping"; + %NoSpace[99] = "Suicide"; + %NoSpace[201] = "Grid"; + + return %NoSpace[%num]; + } +}; +activatePackage(ProPackSupport); \ No newline at end of file diff --git a/ProPack_Final/scripts/autoexec/Waypointer.cs b/ProPack_Final/scripts/autoexec/Waypointer.cs new file mode 100644 index 0000000..9cdb211 --- /dev/null +++ b/ProPack_Final/scripts/autoexec/Waypointer.cs @@ -0,0 +1,245 @@ +// #name = Waypointer +// #version = 1.2 +// #description = Strategic waypoints +// #status = Release +// #credit = Runar + +$CommandTask['Player', 3, text] = "\c1N\cramed WP"; +$CommandTask['Player', 3, tag] = 'wpName'; +$CommandTask['Player', 3, hotkey] = "n"; + +$CommandTask['Player', 4, text] = "\c1N\cramed WP"; +$CommandTask['Player', 4, tag] = 'wpName'; +$CommandTask['Player', 4, hotkey] = "n"; +$CommandTask['Player', 4, enemy] = true; + +$CommandTask['Player', 5, text] = "\c11\cr Capper"; +$CommandTask['Player', 5, tag] = 'wpCapper'; +$CommandTask['Player', 5, hotkey] = "1"; + +$CommandTask['Player', 6, text] = "\c11\cr Capper"; +$CommandTask['Player', 6, tag] = 'wpCapper'; +$CommandTask['Player', 6, hotkey] = "1"; +$CommandTask['Player', 6, enemy] = true; + +$CommandTask['Player', 7, text] = "\c12\cr Light O"; +$CommandTask['Player', 7, tag] = 'wpLO'; +$CommandTask['Player', 7, hotkey] = "2"; + +$CommandTask['Player', 8, text] = "\c12\cr Light O"; +$CommandTask['Player', 8, tag] = 'wpLO'; +$CommandTask['Player', 8, hotkey] = "2"; +$CommandTask['Player', 8, enemy] = true; + +$CommandTask['Player', 9, text] = "\c13\cr Mid O"; +$CommandTask['Player', 9, tag] = 'wpMidO'; +$CommandTask['Player', 9, hotkey] = "3"; + +$CommandTask['Player', 10, text] = "\c13\cr Mid O"; +$CommandTask['Player', 10, tag] = 'wpMidO'; +$CommandTask['Player', 10, hotkey] = "3"; +$CommandTask['Player', 10, enemy] = true; + +$CommandTask['Player', 11, text] = "\c14\cr Heavy O"; +$CommandTask['Player', 11, tag] = 'wpHO'; +$CommandTask['Player', 11, hotkey] = "4"; + +$CommandTask['Player', 12, text] = "\c14\cr Heavy O"; +$CommandTask['Player', 12, tag] = 'wpHO'; +$CommandTask['Player', 12, hotkey] = "4"; +$CommandTask['Player', 12, enemy] = true; + +$CommandTask['Player', 13, text] = "\c15\cr Light D"; +$CommandTask['Player', 13, tag] = 'wpLD'; +$CommandTask['Player', 13, hotkey] = "5"; + +$CommandTask['Player', 14, text] = "\c15\cr Light D"; +$CommandTask['Player', 14, tag] = 'wpLD'; +$CommandTask['Player', 14, hotkey] = "5"; +$CommandTask['Player', 14, enemy] = true; + +$CommandTask['Player', 15, text] = "\c16\cr Mid D"; +$CommandTask['Player', 15, tag] = 'wpMidD'; +$CommandTask['Player', 15, hotkey] = "6"; + +$CommandTask['Player', 16, text] = "\c16\cr Mid D"; +$CommandTask['Player', 16, tag] = 'wpMidD'; +$CommandTask['Player', 16, hotkey] = "6"; +$CommandTask['Player', 16, enemy] = true; + +$CommandTask['Player', 17, text] = "\c17\cr Heavy D"; +$CommandTask['Player', 17, tag] = 'wpHD'; +$CommandTask['Player', 17, hotkey] = "7"; + +$CommandTask['Player', 18, text] = "\c17\cr Heavy D"; +$CommandTask['Player', 18, tag] = 'wpHD'; +$CommandTask['Player', 18, hotkey] = "7"; +$CommandTask['Player', 18, enemy] = true; + +$CommandTask['Player', 19, text] = "\c18\cr Farmer"; +$CommandTask['Player', 19, tag] = 'wpFarmer'; +$CommandTask['Player', 19, hotkey] = "8"; + +$CommandTask['Player', 20, text] = "\c18\cr Farmer"; +$CommandTask['Player', 20, tag] = 'wpFarmer'; +$CommandTask['Player', 20, hotkey] = "8"; +$CommandTask['Player', 20, enemy] = true; + +$CommandTask['Player', 21, text] = "\c19\cr Heavy on Flag"; +$CommandTask['Player', 21, tag] = 'wpHoF'; +$CommandTask['Player', 21, hotkey] = "9"; + +$CommandTask['Player', 22, text] = "\c19\cr Heavy on Flag"; +$CommandTask['Player', 22, tag] = 'wpHoF'; +$CommandTask['Player', 22, hotkey] = "9"; +$CommandTask['Player', 22, enemy] = true; + +$CommandTask['Player', 23, text] = "\c10\cr AirForce"; +$CommandTask['Player', 23, tag] = 'wpAF'; +$CommandTask['Player', 23, hotkey] = "0"; + +$CommandTask['Player', 24, text] = "\c10\cr AirForce"; +$CommandTask['Player', 24, tag] = 'wpAF'; +$CommandTask['Player', 24, hotkey] = "0"; +$CommandTask['Player', 24, enemy] = true; + +package Waypointer +{ + function CommanderTree::processCommand(%this, %command, %target, %typeTag) + { + switch$(getTaggedString(%command)) + { + case "wpName": + for(%i = 0; %i < %this.getNumSelectedTargets("Clients"); %i++) + { + %targetId = %this.getSelectedTarget("Clients", %i); + + if(%target > 0) + %target = createClientTarget(%targetId, "0 0 0"); + + for(%cl = 0; %cl < PlayerListGroup.getCount(); %cl++) + { + %obj = PlayerListGroup.getObject(%cl); + + if(%targetid == %obj.targetId) + %name = %obj.name; + } + + %target.createWaypoint(%name); + CMContextPopup.target = -1; + } + return; + + case "wpCapper": + %target.createWaypoint("Capper " SPC %this.WPcapperID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpLO": + %target.createWaypoint("Light O " SPC %this.WPloID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpMidO": + %target.createWaypoint("Mid O " SPC %this.WPmoID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpHO": + %target.createWaypoint("Heavy O " SPC %this.WPhoID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpLD": + %target.createWaypoint("Light D " SPC %this.WPldID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpMidD": + %target.createWaypoint("Mid D " SPC %this.WPmdID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpHD": + %target.createWaypoint("Heavy D " SPC %this.WPhdID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpFarmer": + %target.createWaypoint("Farmer " SPC %this.WPFarmerID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpHoF": + %target.createWaypoint("HoF " SPC %this.WPhofID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + + case "wpAF": + %target.createWaypoint("AirForce " SPC %this.WPAirForceID++); + if(%target.getTargetId() != -1) + { + $ClientWaypoints.add(%target); + CMContextPopup.target = -1; + } + return; + } + + parent::processCommand(%this, %command, %target, %typeTag); + } + + + function CommanderMapGui::reset(%this) + { + CommanderTree.WPcapperID = 0; + CommanderTree.WPloID = 0; + CommanderTree.WPmoID = 0; + CommanderTree.WPhoID = 0; + CommanderTree.WPldID = 0; + CommanderTree.WPmdID = 0; + CommanderTree.WPhdID = 0; + CommanderTree.WPFarmerID = 0; + CommanderTree.WPhofID = 0; + CommanderTree.WPAirForceID = 0; + + parent::reset(%this); + } +}; + +activatePackage(Waypointer); \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..4ecbbe9 --- /dev/null +++ b/README @@ -0,0 +1,6 @@ +Historical Tribes 2 Racemod and propack support modules + +Info: + http://bombshelter.servebeer.com/?Page=ProPack + http://bombshelter.servebeer.com/?Page=RaceMod + diff --git a/RaceMod_Final/RaceMod-1.2.5.zip b/RaceMod_Final/RaceMod-1.2.5.zip new file mode 100644 index 0000000..c5aa889 Binary files /dev/null and b/RaceMod_Final/RaceMod-1.2.5.zip differ diff --git a/RaceMod_Final/RaceMod_MapsV7.5.vl2 b/RaceMod_Final/RaceMod_MapsV7.5.vl2 new file mode 100644 index 0000000..c6f2fcf Binary files /dev/null and b/RaceMod_Final/RaceMod_MapsV7.5.vl2 differ