newObject(PlayChatMenu, ChatMenu, "Root Menu:"); newObject(CommandChatMenu, ChatMenu, "Command Menu"); function setPlayChatMenu(%heading) { $curPlayChatMenu = %heading; } function setCommanderChatMenu(%heading) { $curCommanderChatMenu = %heading; } function addPlayTeamChat(%text, %msg, %sound) { if(%sound != "") { %msg = %msg @ "~w" @ %sound; } if($curPlayChatMenu != "") { %text = $curPlayChatMenu @ "\\" @ %text; } addCMCommand(PlayChatMenu, %text, say, 1, %msg); } function addPlayChat(%text, %msg, %sound) { if(%sound != "") { %msg = %msg @ "~w" @ %sound; } if($curPlayChatMenu != "") { %text = $curPlayChatMenu @ "\\" @ %text; } addCMCommand(PlayChatMenu, %text, say, 0, %msg); } function addPlayAnim(%text, %anim, %sound) { if($curPlayChatMenu != "") { %text = $curPlayChatMenu @ "\\" @ %text; } addCMCommand(PlayChatMenu, %text, messageAndAnimate, %anim, %sound); } function addLocal(%text, %sound) { if($curPlayChatMenu != "") { %text = $curPlayChatMenu @ "\\" @ %text; } addCMCommand(PlayChatMenu, %text, localMessage, %sound); } function addPlayCMDResponse(%text, %action, %msg, %sound) { if(%sound != "") %msg = %msg @ "~w" @ %sound; if($curPlayChatMenu != "") %text = $curPlayChatMenu @ "\\" @ %text; addCMCommand(PlayChatMenu, %text, remoteEval, 2048, "CStatus", %action, %msg); } function addCommandResponse(%text, %action, %msg, %sound) { if(%sound != "") %msg = %msg @ "~w" @ %sound; if($curCommanderChatMenu != "") %text = $curCommanderChatMenu @ "\\" @ %text; addCMCommand(CommandChatMenu, %text, remoteEval, 2048, "CStatus", %action, %msg); } function addContextCommand(%text, %type) { if($curCommanderChatMenu != "") %text = $curCommanderChatMenu @ "\\" @ %text; addCMCommand(CommandChatMenu, %text, contextCommand, %type); } function addCommand(%text, %action, %msg, %sound) { if(%sound != "") %msg = %msg @ "~w" @ %sound; if($curCommanderChatMenu != "") %text = $curCommanderChatMenu @ "\\" @ %text; addCMCommand(CommandChatMenu, %text, setIssueCommand, %action, %msg); } // Player Chat menu setPlayChatMenu("vOffense"); addPlayTeamChat("aAttack!","Attack!", attack); addPlayTeamChat("wWait for signal", "Wait for my signal to attack.", waitsig); addPlayTeamChat("cCease fire", "Cease Fire", wshoot); addPlayTeamChat("mMove out", "Move out.", moveout); addPlayTeamChat("rReady", "Ready.", ready); addPlayTeamChat("hHit deck", "Hit the deck!", hitdeck); addPlayTeamChat("eRegroup", "Regroup to positions.", regroup); addPlayTeamChat("vCover me", "Cover me!", coverme); addPlayTeamChat("gCapping", "Going offense.", ono); addPlayTeamChat("jGoing offense", "Going HO.", ono); addPlayTeamChat("zAPC ready", "APC Ready to go.", waitpas); addPlayTeamChat("dHelp", "Help!", help); addPlayTeamChat("bBelay Order.", "Belay Order. ", belay); addPlayTeamChat("sBehind You", "Turn around!", ovrhere); setPlayChatMenu("tTarget"); addPlayTeamChat("aTarget acquired", "Target aquired!", tgtacq); addPlayTeamChat("fFire on my target", "Fire on my target.", firetgt); addPlayTeamChat("nTarget needed", "I need a target.", needtgt); addPlayTeamChat("oTarget out of range", "Target out of range.", tgtout); addPlayTeamChat("dDestroy Enemy Generator", "Destroy the enemy generator!", deseqip); addPlayTeamChat("eEnemy Generator Destroyed", "Enemy generator destroyed!", gendes); addPlayTeamChat("tDestroy Enemy Turret", "Destroy the enemy turret!", destur); addPlayTeamChat("sEnemy Turret Destroyed", "Enemy turret destroyed!", turdes); addPlayTeamChat("qLost Enemy Base", "Lost Enemy base!", dsgst4); setPlayChatMenu("dDefense"); addPlayTeamChat("iIncoming Enemies", "Incoming enemies!", incom2); addPlayTeamChat("aAttacked", "We are being attacked.", basatt); addPlayTeamChat("eDeploy Turrets", "Deploy Turrets!", depobj); addPlayTeamChat("nNeed more defense", "We need more defense!", needdef); addPlayTeamChat("bDefend our base", "Defend our base.", defbase); addPlayTeamChat("dDefending base", "Defending our base.", defend); addPlayTeamChat("tBase Taken", "Our base is taken!", basetkn); addPlayTeamChat("cBase Clear", "Our base is secure.", bsclr2); addPlayTeamChat("qIs Base Clear?", "Is our base clear?", isbclr); setPlayChatMenu("cIncoming Enemies"); addPlayTeamChat("aIncoming Left", "Incoming Left", incom2); addPlayTeamChat("dIncoming Right", "Incoming Right", incom2); addPlayTeamChat("wIncoming Front", "Incoming Front", incom2); addPlayTeamChat("sIncoming Back", "Incoming Back", incom2); addPlayTeamChat("zIncoming Chute", "Incoming Chute", incom2); addPlayTeamChat("cIncoming Tower", "Incoming from Tower", incom2); setPlayChatMenu("fFlag"); addPlayTeamChat("gFlag gone", "Our flag is not in our base!", flgtkn1); addPlayTeamChat("eEnemy has flag", "The enemy has our flag!", flgtkn2); addPlayTeamChat("hHave enemy flag", "I have the enemy flag!", offflg); addPlayTeamChat("sFlag secure", "Our flag is secure!", flaghm); addPlayTeamChat("rReturn our flag", "Return our flag to our base.", retflag); addPlayTeamChat("fGet enemy flag", "Get the enemy flag!", geteflg); addPlayTeamChat("mFlag mined", "Our flag is mined.", flgmine); addPlayTeamChat("cClear mines", "Clear the mines from our flag!", clrflg); addPlayTeamChat("dMines cleared", "Mines have been cleared.", mineclr); addPlayTeamChat("vCap the flag", "Capture the flag!", capobj); setPlayChatMenu("rNeed"); addPlayTeamChat("rNeed Repairs", "Need repairs!", needrep); addPlayTeamChat("aNeed APC Pickup", "I need an APC pickup.", needpku); addPlayTeamChat("eNeed Escort", "I need an escort back to base!", needesc); addPlayTeamChat("tNeed Ammo", "Can anyone bring me some ammo?", needamo); addPlayTeamChat("dRepair HoF", "Repair the HoF!", repplyr); addPlayTeamChat("qFix RT", "Repair our Rocket Turret.", repeqp); addPlayTeamChat("wEscort Capper", "Escort our flag carrier!", escfr); addPlayTeamChat("fReturning flag", "Returning our flag, ready up!", ready); setPlayChatMenu("eTeam"); addPlayTeamChat("wWatch Shooting", "Watch where you're shooting!", wshoot); addPlayTeamChat("dDont know", "I don't know.", dontkno); addPlayTeamChat("nNo", "No.", no); addPlayTeamChat("yYes", "Yes.", yes); addPlayTeamChat("tThanks", "Thanks.", thanks); addPlayTeamChat("aNo Problem", "No Problem.", noprob); addPlayTeamChat("sSorry", "Sorry.", sorry); addLocal("hHurry station", hurystn); addPlayTeamChat("rDrop Flag", "Drop their flag!", watchsh); setPlayChatMenu("gGlobal"); addPlayTeamChat("zDoh", "Doh!", doh); addPlayTeamChat("oOops", "Oops", oops); addPlayTeamChat("sShazbot", "Shazbot.", color2); addPlayTeamChat("qDamnit", "Damnit!", color6); addPlayTeamChat("cCrap", "Ahhh Crap!", color7); addPlayTeamChat("eDuh", "Duh!", dsgst1); addPlayTeamChat("xYou Idiot", "You Idiot!", dsgst2); addPlayChat("hHi.", "Hi.", hello); addPlayChat("bBye.", "Bye.", bye); addPlayChat("nNo", "No.", no); addPlayChat("yYes", "Yes.", yes); addPlayChat("dDont know", "I dont know.", dontkno); addPlayChat("fSorry", "Sorry.", sorry); addPlayChat("aNo Problem", "No Problem.", noprob); addPlayChat("gHey", "Hi.", watchsh); addPlayChat("tThanks", "Thanks.", thanks); setPlayChatMenu("srandom stuff"); addPlayTeamChat("vHow'd that feel?", "How'd that feel?", taunt10); addPlayChat("gCome get some", "Come get some!", taunt4); addPlayTeamChat("yWoohoo.", "Woohoo!", cheer2); addPlayChat("eMissed me!", "Missed me.", taunt2); addPlayTeamChat("dDance", "Dance.", taunt3); addPlayTeamChat("oOver here", "Over here.", ovrhere); addPlayTeamChat("aArgh", "Argh.", dsgst4); addPlayTeamChat("qYeah", "Yeah!", cheer1); addPlayTeamChat("rYoohoo", "Yoohoo!", taunt1); setPlayChatMenu("aAnimations"); addPlayAnim("oOver here", 0, ovrhere); addPlayAnim("dMove out of way", 1, outway); addPlayAnim("rRetreat", 2, retreat); addPlayAnim("sStop", 3, dsgst4); addPlayAnim("fSalute", 4, yes); addPlayAnim("zKneel Pose", 10); addPlayAnim("xStand Pose", 11); addPlayAnim("qCelebrate 1", 5, cheer1); addPlayAnim("eCelebrate 2", 6, cheer2); addPlayAnim("wCelebrate 3", 7, cheer3); addPlayAnim("vTaunt 1 - How'd that feel?", 8, taunt10); addPlayAnim("gTaunt 2 - Come get some", 9, taunt4); addPlayAnim("hWave - Hi", 12, hello); addPlayAnim("bWave - Bye", 12, bye); setPlayChatMenu("zCommand Response"); addPlayTeamChat("aEscort Left", "Escorting: LOOK LEFT", ovrhere); addPlayCMDResponse("zCompleted", 0, "Objective completed", "objcomp"); addPlayCMDResponse("uUnable to complete", 0, "Unable to complete objective.", "objxcmp"); addPlayAnim("vDeath Scream.", 1, death); addPlayAnim("bBoard APC.", 1, boarda); addPlayAnim("gDeploy Pulse Sensor.", 1, deppuls); addPlayAnim("fPilot APC.", 1, pilot); addPlayTeamChat("sEscort Above", "Escorting: LOOK UP", wshoot1); addPlayTeamChat("wEscort Front", "Escorting: LOOK IN FRONT", ovrhere); addPlayTeamChat("dEscort Left", "Escorting: LOOK RIGHT", ovrhere); addPlayAnim("eDeploy AmmoPad", "Deploy ammo pad at waypoint", depapad); addPlayChat("rUnable", "Unable to complete objective.", objxcmp); setPlayChatMenu("hMore random Stuff"); addPlayChat("rReady", "Ready.", ready); addPlayChat("aAttack", "Attack!", attack); addPlayTeamChat("eHmm", "Hmm.", color3); addPlayChat("ssux0r", "Shutup.", dsgst5); addPlayTeamChat("wSigh", "Sigh.", dsgst5); addPlayChat("hHelp", "Help!", help); addPlayChat("gAttack Objective", "Attack objective.", attobj); addPlayChat("vIve had worse", "I've had worse.", tautn11); setPlayChatMenu("xCapping"); addPlayTeamChat("cClear Flag", "Spam their flag!", clrobj); addPlayTeamChat("vWaiting", "Waiting for orders.", wait2); addPlayTeamChat("rReady", "Ready to attack!", ready); addPlayTeamChat("gStarting Run", "Starting my run.", ono); addPlayTeamChat("sStop Shooting", "Stop shooting FLAG", cease); addPlayTeamChat("dWheres Flag", "Where did their flag drop?", dontkno); addPlayTeamChat("wWait", "Wait!", wait1); // Commander Menu function contextIssueCommand(%action, %msg, %sound) { if(%sound != "") %msg = %msg @ "~w" @ %sound; setIssueCommand(%action, %msg); } // $CommandTarget can be one of: // waypoint // enemy vehicle // enemy player // enemy static // enemy turret // enemy sensor // friendly vehicle // friendly player // friendly static // friendly turret // friendly sensor function Commander::StarCommand(%type) { if(%type == "*Attack") { if($CommandTarget == "enemy static") contextIssueCommand(1, "Destroy enemy equipment at waypoint", "attobj"); else if($CommandTarget == "enemy turret") contextIssueCommand(1, "Destroy enemy turret at waypoint", "attobj"); else if($CommandTarget == "enemy sensor") contextIssueCommand(1, "Destroy enemy sensor at waypoint", "attobj"); else if($CommandTarget == "enemy player" || $CommandTarget == "enemy vehicle") contextIssueCommand(1, "Attack enemy " @ $CommandTargetName, "attway"); else if($CommandTarget == "friendly player") contextIssueCommand(1, "Cover " @ $CommandTargetName, "escfr"); else if($CommandTarget == "friendly vehicle") contextIssueCommand(1, "Board APC ", "boarda"); else contextIssueCommand(1, "Attack enemy forces", "attway"); } else if(%type == "*Defend") { if($CommandTarget == "friendly player") contextIssueCommand(2, "Defend " @ $CommandTargetName, "escfr"); else contextIssueCommand(2, "Defend waypoint", "defway"); } else if(%type == "*Repair") { if($CommandTarget == "friendly player") contextIssueCommand(2, "Repair " @ $CommandTargetName, "repplyr"); else contextIssueCommand(2, "Repair " @ $CommandTargetName, "repobj"); } } setCommanderChatMenu(""); addCommand("aAttack", 1, "*Attack"); addCommand("dDefend", 2, "*Defend"); addCommand("rRepair", 3, "*Repair"); setCommanderChatMenu("eDeploy"); setCommanderChatMenu("eDeploy\\sSensor"); addCommand("pPulse sensor", 2, "Deploy pulse sensor at waypoint", "deppuls"); addCommand("jJammer", 2, "Deploy sensor jammer at waypoint", "depjamr"); addCommand("mMotion sensor", 2, "Deploy motion sensor at waypoint", "depmot"); addCommand("cCamera", 2, "Deploy camera at waypoint", "depcam"); setCommanderChatMenu("eDeploy\\aObject"); addCommand("aAmmo", 2, "Deploy Ammo Station", "depamo"); addCommand("iInventory", 2, "Deploy Inventory Station", "depinv"); addCommand("tTurret", 2, "Deploy Turret", "deptur"); addCommand("bBeacon", 2, "Deploy beacon at waypoint", "depbecn"); setCommanderChatMenu("eDeploy"); addCommand("vA.P.C.", 2, "Pilot APC to waypoint", "pilot"); setCommanderChatMenu("kCommand Response"); addCommandResponse("aAcknwledged", 1, "Command acknowledged", "acknow"); addCommandResponse("cCompleted", 0, "Objective complete", "objcomp"); addCommandResponse("uUnable to complete", 0, "Unable to complete objective", "objxcmp"); echo("random's Chat Executed.");