// // MISSION14 - Mining Facility // #include "..\\Game\\speechevent.h" LOCALIZATION //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LSTRING_Savegame "14 - Bridge of Sighs" "14 - Pont des Soupirs" "14 – Brücke der Seufzer" "14 - El puente de los suspiros" "14 - Il ponte di Sighs" LSTRING_LocationCard "BRIDGE OF SIGHS" "PONT DES SOUPIRS" "BRÜCKE DER SEUFZER" "EL PUENTE DE LOS SUSPIROS" "IL PONTE DI SIGHS" LSTRING_FIDestroyGennyTASKBAR "Destroy field generator" "Destruction générateur de champs" "Feldgenerator zerstören." "Destruir generador de campo" "Distruggi il generatore del campo." LSTRING_FIDestroyGatesTASKBAR "Destroy hyperspace gates" "Destruction accès à l'hyperespace" "Hyperraumtore zerstören." "Destruir puertas hiperespaciales" "Distruggi i portali dell'Iperspazio." LSTRING_Hyperspace " HYPERSPACE" " HYPERESPACE" " HYPERRAUMSPRUNG" " HIPERESPACIO" " IPERSPAZIO" ENDL //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FleetIntel ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM FleetIntel States FCIntro, FIDestroyGennyLBXIn, FIDestroyGennyOpenSensors, FIDestroyGenny, FIDestroyGennyPING, FIDestroyGennyEND, FIDestroyGennyWAITEND, FISensorTech, FIDestroyGatesLBXIn, FIDestroyGatesOpenSensors, FIDestroyGates, FIDestroyGatesPING, FIDestroyGatesEND, FIDestroyGatesWAITEND, FIHyperdriveOnline, FCTakeUsHome, FIIdle; INIT Jump FIIdle; // Go immediately to FIIdle ENDINIT WATCH ENDWATCH STATE FCIntro //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M14_Fleet_HyperspaceDisengaged, 0); // Hyperspace successful. We are at the edge of the Homeworld system. //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (0, 4000, LSTRING_FCIntro); // Hyperspace successful. We are at the edge of the Homeworld system. ENDINIT WATCH IF (IntelEventEnded ()) Jump FIDestroyGennyLBXIn; ENDIF ENDWATCH ENDSTATE FCIntro //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGennyLBXIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT PauseOtherKAS(); wideScreenIn(90); // letterbox bars fade in over 3 seconds Jump FIDestroyGennyOpenSensors; ENDINIT WATCH ENDWATCH ENDSTATE FIDestroyGennyLBXIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGennyOpenSensors //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TimerCreateSetStart ("FIOpenSensorsTimer", 5); ENDINIT WATCH IF (TimerExpiredDestroy ("FIOpenSensorsTimer")) OpenSensors (TRUE); PauseUniverse(); Jump FIDestroyGenny; ENDIF ENDWATCH ENDSTATE FIDestroyGennyOpenSensors //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGenny //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TimerCreateSetStart ("FIDestroyGennyTimer", 1); ENDINIT WATCH IF (TimerExpiredDestroy ("FIDestroyGennyTimer")) //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (4, 6000, LSTRING_FIDestroyGenny); // Elson's information was correct. This is the field generator. We must destroy it. Jump FIDestroyGennyPING; ENDIF ENDWATCH ENDSTATE FIDestroyGenny //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGennyPING //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M14_Intel_DestroyGenerator, 0); // Elson's information was correct. This is the field generator. We must destroy it. TimerCreateSetStart ("FIDestroyGennyPINGTimer", 2); VarCreateSet ("G_FleetIntelIntroHasPlayed", TRUE); // Tells other parts of the script to do stuff (create the objectives) ENDINIT WATCH VarDestroy ("IntelEvent"); VarCreateSet("IntelEvent", IntelEventEnded()); IF (VarGet("IntelEvent") = 2) IF (VarGet ("NeverCreateGennyPingAgain") = FALSE) PingAddShips (TEAMSHIPS_MiningBase, "MiningBasePING"); // Create the PING for the Mining Base VarCreateSet ("NeverCreateGennyPingAgain", TRUE); ENDIF wideScreenOut (30); // player pressed SPACE or ESC and wants out immediately so remove the LBX in 1 second Jump FIDestroyGennyEND; ELSEIF (VarGet("IntelEvent")) Jump FIDestroyGennyWAITEND; ENDIF IF (TimerExpiredDestroy ("FIDestroyGennyPINGTimer")) SoundEvent (267); // Play the movement chime when the pointer is drawn IF (VarGet ("NeverCreateGennyPingAgain") = FALSE) PingAddShips (TEAMSHIPS_MiningBase, "MiningBasePING"); // Create the PING for the Mining Base VarCreateSet ("NeverCreateGennyPingAgain", TRUE); ENDIF TutSetTextDisplayBoxToSubtitleRegion(); TutSetPointerTargetAIVolume ("MiningBasePOINTER", VOLUME_MiningBaseSphere); ENDIF ENDWATCH ENDSTATE FIDestroyGennyPING //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGennyWAITEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TimerCreateSetStart ("FIDestroyGennyENDTimer", 3); // Wait in the SM for a short while after the event is over ENDINIT WATCH VarDestroy ("IntelEvent"); VarCreateSet("IntelEvent", IntelEventEnded()); IF (VarGet("IntelEvent") = 2) wideScreenOut (30); // player pressed SPACE or ESC and wants out immediately so remove the LBX in 1 second Jump FIDestroyGennyEND; ENDIF IF (TimerExpiredDestroy ("FIDestroyGennyENDTimer")) wideScreenOut (30); // fade out over 1 second Jump FIDestroyGennyEND; ENDIF ENDWATCH ENDSTATE FIDestroyGennyWAITEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGennyEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TutRemoveAllPointers (); UnpauseUniverse(); UnpauseOtherKAS(); CloseSensors (TRUE); VarDestroy ("G_CLICK_DestroyGenny"); Jump FIIdle; ENDINIT WATCH ENDWATCH ENDSTATE FIDestroyGennyEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FISensorTech //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M14_Intel_ResearchSensors,0); // Research Division reports advancements in sensor fidelity which would allow us to determine the location of enemy ships. We advise commencing research immediately. //SoundEvent (271); // Play a sound event to notify the player that a subtitle is up //SubtitleSimulate (4, 11000, LSTRING_FISensorTech); // Research Division reports advancements in sensor fidelity which would allow us to determine the location of enemy ships. We advise commencing research immediately. ENDINIT WATCH IF (IntelEventEnded ()) VarCreateSet ("G_SensorTechEventHasPlayed", TRUE); Jump FIIdle; ENDIF ENDWATCH ENDSTATE FISensorTech //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGatesLBXIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT PauseOtherKAS(); wideScreenIn(90); // letterbox bars fade in over 3 seconds Jump FIDestroyGatesOpenSensors; ENDINIT WATCH ENDWATCH ENDSTATE FIDestroyGatesLBXIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGatesOpenSensors //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TimerCreateSetStart ("FIOpenSensorsTimer", 5); ENDINIT WATCH IF (TimerExpiredDestroy ("FIOpenSensorsTimer")) OpenSensors (TRUE); PauseUniverse(); Jump FIDestroyGates; ENDIF ENDWATCH ENDSTATE FIDestroyGatesOpenSensors //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGates //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TimerCreateSetStart ("FIDestroyGatesTimer", 1); ENDINIT WATCH IF (TimerExpiredDestroy ("FIDestroyGatesTimer")) //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (4, 6000, LSTRING_FIDestroyGates); // The enemy has activated several standing hyperspace gates. Destroy the gates to prevent enemy reinforcement. Jump FIDestroyGatesPING; ENDIF ENDWATCH ENDSTATE FIDestroyGates //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGatesPING //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M14_Intel_DestroyHyperspaceGates, 0); // The enemy has activated several standing hyperspace gates. Destroy the gates to prevent enemy reinforcement. VarCreateSet ("G_FIDestroyGatesHasPlayed", TRUE); // Tells other parts of the script to do stuff (create the objectives) TimerCreateSetStart ("FIDestroyGatesPINGTimer", 2); ENDINIT WATCH VarDestroy ("IntelEvent"); VarCreateSet("IntelEvent", IntelEventEnded()); IF (VarGet("IntelEvent") = 2) IF (VarGet ("NeverCreateGatesPingAgain") = FALSE) PingAddPoint (POINT_GATE1, "GATE1PING"); // Create the PING for the Hyperspace Gates PingAddPoint (POINT_GATE2, "GATE2PING"); // Create the PING for the Hyperspace Gates PingAddPoint (POINT_GATE3, "GATE3PING"); // Create the PING for the Hyperspace Gates VarCreateSet ("NeverCreateGatesPingAgain", TRUE); ENDIF wideScreenOut (30); // player pressed SPACE or ESC and wants out immediately so remove the LBX in 1 second Jump FIDestroyGatesEND; ELSEIF (VarGet("IntelEvent")) Jump FIDestroyGatesWAITEND; ENDIF IF (TimerExpiredDestroy ("FIDestroyGatesPINGTimer")) SoundEvent (267); // Play the movement chime when the pointer is drawn IF (VarGet ("NeverCreateGatesPingAgain") = FALSE) PingAddPoint (POINT_GATE1, "GATE1PING"); // Create the PING for the Hyperspace Gates PingAddPoint (POINT_GATE2, "GATE2PING"); // Create the PING for the Hyperspace Gates PingAddPoint (POINT_GATE3, "GATE3PING"); // Create the PING for the Hyperspace Gates VarCreateSet ("NeverCreateGatesPingAgain", TRUE); ENDIF TutSetTextDisplayBoxToSubtitleRegion(); TutSetPointerTargetAIVolume ("GATE1POINTER", VOLUME_GATE1Sphere); TutSetPointerTargetAIVolume ("GATE2POINTER", VOLUME_GATE2Sphere); TutSetPointerTargetAIVolume ("GATE3POINTER", VOLUME_GATE3Sphere); ENDIF ENDWATCH ENDSTATE FIDestroyGatesPING //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGatesWAITEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TimerCreateSetStart ("FIDestroyGatesENDTimer", 3); // Wait in the SM for a short while after the event is over ENDINIT WATCH VarDestroy ("IntelEvent"); VarCreateSet("IntelEvent", IntelEventEnded()); IF (VarGet("IntelEvent") = 2) wideScreenOut (30); // player pressed SPACE or ESC and wants out immediately so remove the LBX in 1 second Jump FIDestroyGatesEND; ENDIF IF (TimerExpiredDestroy ("FIDestroyGatesENDTimer")) wideScreenOut (30); // fade out over 1 second Jump FIDestroyGatesEND; ENDIF ENDWATCH ENDSTATE FIDestroyGatesWAITEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDestroyGatesEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TutRemoveAllPointers (); UnpauseUniverse(); UnpauseOtherKAS(); CloseSensors (TRUE); VarDestroy ("G_CLICK_DestroyGates"); Jump FIIdle; ENDINIT WATCH ENDWATCH ENDSTATE FIDestroyGatesEND //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIHyperdriveOnline //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M14_Intel_HyperdriveOnline,0); //SoundEvent (271); // Play a sound event to notify the player that a subtitle is up //SubtitleSimulate (4, 7000, LSTRING_FIHyperdriveOnline); // The field surrounding the Homeworld system has been shut down. Hyperdrive on-line. ENDINIT WATCH IF (IntelEventEnded ()) VarCreateSet ("G_TakeUsHomeEventHasPlayed", TRUE); //Jump FCTakeUsHome; Jump FIIdle; ENDIF ENDWATCH ENDSTATE FIHyperdriveOnline //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FCTakeUsHome //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //SpeechEvent (M14_Fleet_TakeUsHome, 0); // Take us home. //SoundEvent (271); // Play a sound event to notify the player that a subtitle is up //SubtitleSimulate (4, 11000, LSTRING_FCTakeUsHome); // Take us home. ENDINIT WATCH //IF (IntelEventEnded ()) // VarCreateSet ("G_TakeUsHomeEventHasPlayed", TRUE); // Jump FIIdle; //ENDIF ENDWATCH ENDSTATE FCTakeUsHome //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIIdle //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH // FIRST TIME watches // play the Fleet Command intro event 5 seconds after you enter the level (segue's into the FIDestroyGenny event) IFONCE (TimerExpiredDestroy ("G_FCHyperspaceSuccessful")) Jump FCIntro; ENDIFONCE // When the timer is up AND if the NIS is not playing, play the Sensor Array tech event IFONCE ( (VarGet ("G_NISPlayingNow") = FALSE) AND (TimerExpiredDestroy ("G_PlaySensorArrayTechEvent")) ) Jump FISensorTech; ENDIFONCE // When the timer is up after N10, OR if the player attacks a hyperspace gate, play the FI event telling you the gates are active IFONCE ( (VarGet ("G_HyperspaceGateDamaged") = TRUE) OR (TimerExpiredDestroy ("G_PlayHyperspaceGateEvent")) ) Jump FIDestroyGatesLBXIn; ENDIFONCE // When all primary objectives have been completed, play the final FI event IFONCE (TimerExpiredDestroy ("G_AllObjectivesComplete")) Jump FIHyperdriveOnline; ENDIFONCE // REPLAYING event watches // FLEET INTEL event - destroy Gravwell field IF (VarGet ("G_CLICK_DestroyGenny")) Jump FIDestroyGennyLBXIn; ENDIF // FLEET INTEL event - destroy hyperspace gates IF (VarGet ("G_CLICK_DestroyGates")) Jump FIDestroyGatesLBXIn; ENDIF ENDWATCH ENDSTATE FIIdle //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM FleetIntel //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FleetIntel ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Mining Base ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM MiningBase States Rotate; INIT VarCreateSet ("G_MiningBaseUnderAttack", FALSE); Jump Rotate; ENDINIT WATCH IF (TeamHealthAverage () < 35 AND NOT VarGet("MiningBaseHurt")) // If the carrier gets below 40% health, call in the cavalry VarCreateSet ("G_MiningBaseHurt", TRUE); MsgSendAll ("MiningBaseDamaged"); ENDIF IF (UnderAttack (SHIPS_AttackingMiningBase)) VarSet ("G_MiningBaseUnderAttack", TRUE); ELSE VarSet ("G_MiningBaseUnderAttack", FALSE); ENDIF ENDWATCH STATE Rotate //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // Just sit there and rotate, dummy ENDINIT WATCH ENDWATCH ENDSTATE Rotate //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM MiningBase //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Mining Base ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ AIShips ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM AIShips States GiveToAI; INIT Jump GiveToAI; ENDINIT WATCH ENDWATCH STATE GiveToAI //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_CPUCarrier)) ShipsAdd (SHIPS_CPUCarrier, TEAMSHIPS_CPUCarrier); // Before you go to the AI, make a shiplist of yourself VarCreateSet ("G_SHIPSCPUCarrier", ShipsCount (SHIPS_CPUCarrier)); ELSEIF (ThisTeamIs (TEAM_CPUCollector)) ShipsAdd (SHIPS_CPUCollector, TEAMSHIPS_CPUCollector); // Before you go to the AI, make a shiplist of yourself VarCreateSet ("G_SHIPSCPUCollector", ShipsCount (SHIPS_CPUCollector)); ENDIF TeamGiveToAI (); ENDINIT WATCH ENDWATCH ENDSTATE GiveToAI //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM AIShips //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ AIShips ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ IonSphere ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM IonSphere States WatchForEnemies, Loop, BackInFormation, NullState; INIT TeamHealthSet (200); // These are badass Elite Guard Ion Frigates, so they have double the health ShipsDamageModifierSet (TEAMSHIPS_IonSphere, 200); // These are badass Elite Guard Ion Frigates, so they do double the damage TacticsAggressive (); VarCreateSet ("INDEX", 0); VarCreateSet ("G_IonFrigatesUnderAttack", FALSE); Jump WatchForEnemies; ENDINIT WATCH IF (UnderAttack (SHIPS_AttackingIonFrigates)) VarSet ("G_IonFrigatesUnderAttack", TRUE); ELSE VarSet ("G_IonFrigatesUnderAttack", FALSE); ENDIF // if you die, go to a nullstate IFONCE (ShipsCount (TEAMSHIPS_IonSPhere) = 0) Jump NullState; ENDIFONCE ENDWATCH STATE WatchForEnemies //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH IF (FindEnemiesInside (VOLUME_Layer3Vol, SHIPS_Penetrators, 3000)) Jump Loop; ENDIF ENDWATCH ENDSTATE WatchForEnemies //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Loop //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // Finds ships in the current team that are near (distance of 55000 m) SHIPS_Penetrators // and only those attack the enemy. SHIPS_VolumeShips is a shiplist of the ships // that were chosen as targets. BulgeAttack(SHIPS_Penetrators, SHIPS_VolumeShips, SHIPS_Attackers, 55000); IF (ShipsSelectType (SHIPS_IHateYou, SHIPS_Penetrators, "SalCapCorvette") || ShipsSelectClass (SHIPS_IHateYou, SHIPS_Penetrators, "CLASS_Destroyer") || ShipsSelectClass (SHIPS_IHateYou, SHIPS_Penetrators, "CLASS_Frigate") || ShipsSelectClass (SHIPS_IHateYou, SHIPS_Penetrators, "CLASS_Corvette")) ShipsAttack(SHIPS_IHateYou, SHIPS_ShipTest); ENDIF //cut out to turbocharge this level #if(0) ShipsSelectIndex (SHIPS_ShipTest, TEAMSHIPS_IonSphere, VarGet ("INDEX")); IF ( (ShipsOrder (SHIPS_ShipTest) != 2) AND (ShipsSelectNearby (SHIPS_Targets, SHIPS_Penetrators, SHIPSPOINT_ShipTest, 35000)) ) ShipsAttack (SHIPS_Targets, SHIPS_ShipTest); ShipsAdd (SHIPS_VolumeShips, SHIPS_Targets); ENDIF VarInc ("INDEX"); IF (VarGet ("INDEX") < ShipsCount (TEAMSHIPS_IonSphere)) Jump Loop; ELSE VarSet ("INDEX", 0); ENDIF #endif ENDINIT WATCH IF (FindEnemiesInside (VOLUME_Layer3Vol, SHIPS_Penetrators, 3000)) ShipsRemove (SHIPS_Penetrators, SHIPS_VolumeShips); IF (ShipsCount (SHIPS_Penetrators) > 0) Jump Loop; ENDIF ENDIF IF (ShipsOrder (SHIPS_Attackers) != 2) // If the whole team is not attacking anyone, go back into formation //IF (ShipsCount (SHIPS_VolumeShips) = 0) // Jump BackInFormation; //ELSE Jump Loop; //ENDIF ENDIF ENDWATCH ENDSTATE Loop //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE BackInFormation //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT UnhideShips (TEAMSHIPS_HiddenDummy); // Unhide the Dummy team Guard (TEAMSHIPS_HiddenDummy); // Guard it FormationSphere (); // Go into sphere formation HideShips (TEAMSHIPS_HiddenDummy); // Hide the dummy team again Jump WatchForEnemies; ENDINIT WATCH ENDWATCH ENDSTATE BackInFormation //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM IonSphere //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ IonSphere ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ HiddenDummy ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM HiddenDummy States NullState; INIT HideShips (TEAMSHIPS_HiddenDummy); ENDINIT WATCH ENDWATCH STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM HiddenDummy //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ HiddenDummy ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ RoamingMG ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM RoamingMG States Patrol, Decide, Dock, Launch, NullState, CheckIonAttackers, ProtectIons, AttackLayer2Vol; INIT Jump Decide; ENDINIT WATCH ENDWATCH STATE Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TacticsNeutral (); FormationDelta3D (); PatrolPath (PATH_RoamingMGPath); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_RoamingMG) = 0) // If you die, go to a nullstate Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF IF (VarGet ("G_IonFrigatesUnderAttack") = TRUE) Jump ProtectIons; ELSEIF (FindEnemiesInside (VOLUME_Layer2Vol, SHIPS_MGLayer2VolFound, 2000)) Jump AttackLayer2Vol; ENDIF ENDWATCH ENDSTATE Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TacticsNeutral (); Stop (); // Stop everything! ShipsDockStay (TEAMSHIPS_RoamingMG , SHIPS_CPUCarrier); // Dock these guys with the CPU Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_RoamingMG) = 0) // If you die, go to a nullstate Jump NullState; ENDIF IF (TeamDockedReadyForLaunch ()) Jump Launch; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_RoamingMG) = 0) // If you die, go to a nullstate Jump NullState; ENDIF IF (TeamFinishedLaunching ()) Jump Decide; ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TacticsNeutral (); IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ELSEIF (VarGet ("G_IonFrigatesUnderAttack") = TRUE) Jump CheckIonAttackers; ELSEIF (FindEnemiesInside (VOLUME_Layer2Vol, SHIPS_MGLayer2VolFound, 2000)) Jump AttackLayer2Vol; ELSE Jump Patrol; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_RoamingMG) = 0) // If you die, go to a nullstate Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE CheckIonAttackers //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IFONCE (TRUE) VarCreateSet ("IonIndex", 0); VarCreateSet ("ShortestDistance", 100000000); //set to a really high number VarCreateSet ("TempDist", 0); ENDIFONCE ShipsSelectIndex (SHIPS_IonTest, SHIPS_AttackingIonFrigates, VarGet("IonIndex")); VarSet ("TempDist", FindDistance (SHIPSPOINT_IonTest, THISTEAMSPOINT)); // compare the distance from the test ship to the team with the distance of the // closest ship so far. If this test ship is closer, it becomes the new closest ship IF (VarGet ("TempDist") < VarGet ("ShortestDistance")) ShipsClear (SHIPS_Closest); ShipsAdd (SHIPS_Closest, SHIPS_IonTest); VarSet ("ShortestDistance", VarGet("TempDist")); ENDIF VarInc("IonIndex"); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_RoamingMG) = 0) // If you die, go to a nullstate Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF IF (VarGet ("IonIndex") < ShipsCount (SHIPS_AttackingIonFrigates)) Jump CheckIonAttackers; ELSE Jump ProtectIons; ENDIF ENDWATCH ENDSTATE CheckIonAttackers //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE ProtectIons //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // Get the ships nearby SHIPS_Closest FindEnemiesNearby (SHIPS_Closest, 15000); IF (ShipsSelectType (SHIPS_MGTargets, SHIPS_Closest, "SalCapCorvette")) TacticsEvasive (); ELSEIF (ShipsSelectType (SHIPS_MGTargets, SHIPS_Closest, "AttackBomber")) TacticsEvasive (); ELSEIF (ShipsSelectType (SHIPS_MGTargets, SHIPS_Closest, "Interceptor")) TacticsEvasive (); ELSEIF (ShipsSelectClass (SHIPS_MGTargets, SHIPS_Closest, "CLASS_Fighter")) TacticsEvasive (); ELSEIF (ShipsSelectClass (SHIPS_MGTargets, SHIPS_Closest, "CLASS_Corvette")) TacticsEvasive (); ELSE ShipsAdd (SHIPS_MGTargets, SHIPS_Closest); TacticsNeutral (); ENDIF IF (ShipsCount (SHIPS_MGTargets) > 0) Attack (SHIPS_MGTargets); ELSE Jump Decide; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_RoamingMG) = 0) // If you die, go to a nullstate Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF // if the ships you're attacking die OR you stop attacking for some reason, jump back into this state to kill the rest of the baddies IF ( (ShipsCount (SHIPS_MGTargets) = 0) OR (ShipsOrder (TEAMSHIPS_RoamingMG) != 2) ) Jump ProtectIons; ENDIF ENDWATCH ENDSTATE ProtectIons //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackLayer2Vol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ShipsClear (SHIPS_MGTargets); IF (ShipsSelectType (SHIPS_MGTargets, SHIPS_MGLayer2VolFound, "SalCapCorvette")) ELSEIF (ShipsSelectType (SHIPS_MGTargets, SHIPS_MGLayer2VolFound, "AttackBomber")) ELSEIF (ShipsSelectType (SHIPS_MGTargets, SHIPS_MGLayer2VolFound, "Interceptor")) ELSEIF (ShipsSelectClass (SHIPS_MGTargets, SHIPS_MGLayer2VolFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_MGTargets, SHIPS_MGLayer2VolFound, "CLASS_Corvette")) ELSE ShipsAdd (SHIPS_MGTargets, SHIPS_MGLayer2VolFound); ENDIF IF (ShipsCount (SHIPS_MGTargets) > 0) TacticsEvasive (); Attack (SHIPS_MGTargets); ELSE Jump Decide; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_RoamingMG) = 0) // If you die, go to a nullstate Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF IF (VarGet ("G_IonFrigatesUnderAttack") = TRUE) // If you hear that some Ion Frigates are under attack, go Decide again Jump Decide; ENDIF // if the ships you're attacking die OR you stop attacking for some reason, jump back into this state to kill the rest of the baddies IF ( (ShipsCount (SHIPS_MGTargets) = 0) OR (ShipsOrder (TEAMSHIPS_RoamingMG) != 2) ) Jump AttackLayer2Vol; ENDIF ENDWATCH ENDSTATE AttackLayer2Vol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM RoamingMG //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ RoamingMG ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ProxDeath ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM ProxDeath States Decide, Dock, Launch, CheckProx, DIEProxDIE, ScoutSpeedBurst, GuardMiningBase, NullState; INIT FormationDelta3D (); Jump Decide; ENDINIT WATCH ENDWATCH STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_Layer1Vol, SHIPS_ProxLayer1VolFound, 2000); FindEnemiesInside (VOLUME_Layer2Vol, SHIPS_ProxLayer2VolFound, 2000); TacticsNeutral (); IF (TeamFuelLowest () < 25) // If you are low on fuel, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ELSEIF ( (ShipsSelectType (SHIPS_ProximityFound, SHIPS_ProxLayer1VolFound, "ProximitySensor")) OR (ShipsSelectType (SHIPS_ProximityFound, SHIPS_ProxLayer2VolFound, "ProximitySensor")) ) Jump CheckProx; //ELSEIF ( (ShipsCount (TEAMSHIPS_Cloaking1) = 0) AND // If all the CloakGens are dead, go guard the MiningBase // (ShipsCount (TEAMSHIPS_Cloaking2) = 0) AND .. ) // Jump GuardMiningBase; ELSEIF ( (ShipsCount (SHIPS_CPUCarrier) > 0) AND (NOT TeamDockedReadyForLaunch ()) ) // If you've got nowhere else to go, then dock with the Carrier Jump Dock; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_ProxScout) = 0) // If you die, go to a nullstate Jump NullState; ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) = 0) Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF IF ( (FindEnemiesInside (VOLUME_Layer1Vol, SHIPS_ProxLayer1VolFound, 2000)) OR (FindEnemiesInside (VOLUME_Layer2Vol, SHIPS_ProxLayer2VolFound, 2000)) ) VarCreateSet ("SHIPSProxLayer1VolFound", ShipsCount (SHIPS_ProxLayer1VolFound)); VarCreateSet ("SHIPSProxLayer2VolFound", ShipsCount (SHIPS_ProxLayer2VolFound)); //Print ("ProxTeam has found some ships in Layer 1 or Layer 2!!!!!"); IF ( (ShipsSelectType (SHIPS_ProximityFound, SHIPS_ProxLayer1VolFound, "ProximitySensor")) OR (ShipsSelectType (SHIPS_ProximityFound, SHIPS_ProxLayer2VolFound, "ProximitySensor")) ) VarCreateSet ("SHIPSProximityFound", ShipsCount (SHIPS_ProximityFound)); //Print ("ProxTeam has found some proximity sensors!!"); Jump Decide; ENDIF ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TacticsNeutral (); ShipsDockStay (TEAMSHIPS_ProxScout, SHIPS_CPUCarrier); // Dock these guys with the CPU Carrier ShipsDockStay (TEAMSHIPS_ProxInt, SHIPS_CPUCarrier); // Dock these guys with the CPU Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_ProxScout) = 0) // If you die, go to a nullstate Jump NullState; ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) = 0) Jump NullState; ENDIF IF (TeamDockedReadyForLaunch ()) Jump Decide; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); ENDINIT WATCH IF (ShipsCount (TEAMSHIPS_ProxScout) = 0) // If you die, go to a nullstate Jump NullState; ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) = 0) Jump NullState; ENDIF IF (TeamFinishedLaunching ()) FormationDelta3D (); Jump Decide; ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE CheckProx //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (TeamDockedReadyForLaunch ()) Jump Launch; ENDIF IFONCE (TRUE) VarCreateSet ("ProxIndex", 0); VarCreateSet ("ShortestDistance", 100000000); //set to a really high number VarCreateSet ("TempDist", 0); ENDIFONCE IF (ShipsCount (TEAMSHIPS_ProxScout) > 0) ShipsSelectIndex (SHIPS_ProxTest, SHIPS_ProximityFound, VarGet ("ProxIndex")); VarSet ("TempDist", FindDistance (SHIPSPOINT_ProxTest, THISTEAMSPOINT)); // compare the distance from the test ship to the team with the distance of the // closest ship so far. If this test ship is closer, it becomes the new closest ship IF (VarGet ("TempDist") < VarGet ("ShortestDistance")) ShipsClear (SHIPS_ProxClosest); ShipsAdd (SHIPS_ProxClosest, SHIPS_ProxTest); VarSet ("ShortestDistance", VarGet("TempDist")); ENDIF VarInc("ProxIndex"); ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) > 0) ShipsSelectIndex (SHIPS_ProxTest, SHIPS_ProximityFound, VarGet ("ProxIndex")); VarSet ("TempDist", FindDistance (SHIPSPOINT_ProxTest, THISTEAMSPOINT)); // compare the distance from the test ship to the team with the distance of the // closest ship so far. If this test ship is closer, it becomes the new closest ship IF (VarGet ("TempDist") < VarGet ("ShortestDistance")) ShipsClear (SHIPS_ProxClosest); ShipsAdd (SHIPS_ProxClosest, SHIPS_ProxTest); VarSet ("ShortestDistance", VarGet("TempDist")); ENDIF VarInc("ProxIndex"); ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_ProxScout) = 0) // If you die, go to a nullstate Jump NullState; ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) = 0) Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF IF (VarGet("ProxIndex") < ShipsCount(SHIPS_ProximityFound)) JUMP CheckProx; ELSE JUMP DIEProxDIE; ENDIF ENDWATCH ENDSTATE CheckProx //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE DIEProxDIE //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (TEAMSHIPS_ProxScout) > 0) ShipsAdd (SHIPS_ProxTargets, SHIPS_ProxClosest); ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) > 0) ShipsAdd (SHIPS_ProxTargets, SHIPS_ProxClosest); ENDIF VarCreateSet ("G_SHIPSProxTargets", ShipsCount (SHIPS_ProxTargets)); IF (ShipsCount (SHIPS_ProxTargets) > 0) IF (ThisTeamIs (TEAM_ProxScout)) TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_ProxInt)) TacticsNeutral (); ENDIF Attack (SHIPS_ProxTargets); ELSE Jump Decide; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_ProxScout) = 0) // If you die, go to a nullstate Jump NullState; ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) = 0) Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF // if the ships you're attacking die OR you stop attacking for some reason, jump back into this state to kill the rest of the baddies IF (ThisTeamIs (TEAM_ProxScout)) IF ( (ShipsCount (SHIPS_ProxTargets) = 0) OR (ShipsOrder (TEAMSHIPS_ProxScout) != 2) ) Jump DIEProxDIE; ENDIF ELSEIF (ThisTeamIs (TEAM_ProxInt)) IF ( (ShipsCount (SHIPS_ProxTargets) = 0) OR (ShipsOrder (TEAMSHIPS_ProxInt) != 2) ) Jump DIEProxDIE; ENDIF ENDIF // if this is the Scout team, and they are far away from their targets, go into the SpeedBurst loop IF (ThisTeamIs (TEAM_ProxScout)) IF (NOT Nearby (SHIPSPOINT_ProxTargets, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump ScoutSpeedBurst; ENDIF ENDIF ENDWATCH ENDSTATE DIEProxDIE //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE ScoutSpeedBurst //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpecialToggle (); TimerCreateSetStart ("SpeedBurstTimer", 9); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_ProxScout) = 0) // If you die, go to a nullstate TimerDestroy ("SpeedBurstTimer"); Jump NullState; ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) = 0) TimerDestroy ("SpeedBurstTimer"); Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) TimerDestroy ("SpeedBurstTimer"); Jump Dock; ENDIF ENDIF // if you get close to the ships you're after, go back to the DIEProxDIE state IF (Nearby (SHIPSPOINT_ProxTargets, 14000)) TimerDestroy ("SpeedBurstTimer"); Jump DIEProxDIE; ENDIF // if the ships you're attacking die OR you stop attacking for some reason, jump back into this state to kill the rest of the baddies IF (ThisTeamIs (TEAM_ProxScout)) IF ( (ShipsCount (SHIPS_ProxTargets) = 0) OR (ShipsOrder (TEAMSHIPS_ProxScout) != 2) ) TimerDestroy ("SpeedBurstTimer"); Jump DIEProxDIE; ENDIF ELSEIF (ThisTeamIs (TEAM_ProxInt)) IF ( (ShipsCount (SHIPS_ProxTargets) = 0) OR (ShipsOrder (TEAMSHIPS_ProxInt) != 2) ) TimerDestroy ("SpeedBurstTimer"); Jump DIEProxDIE; ENDIF ENDIF // if the speedburst timer is up, jump back into the state to give yourself another speedburst IF (TimerExpiredDestroy ("SpeedBurstTimer")) Jump ScoutSpeedBurst; ENDIF ENDWATCH ENDSTATE ScoutSpeedBurst //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardMiningBase //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (TeamDockedReadyForLaunch ()) Jump Launch; ENDIF Guard (TEAMSHIPS_MiningBase); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (TEAMSHIPS_ProxScout) = 0) // If you die, go to a nullstate Jump NullState; ELSEIF (ShipsCount (TEAMSHIPS_ProxInt) = 0) Jump NullState; ENDIF IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (SHIPS_CPUCarrier) > 0) Jump Dock; ENDIF ENDIF ENDWATCH ENDSTATE GuardMiningBase //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM ProxDeath //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ProxDeath ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ InnerDefenseTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM InnerDefenseTeam States Decide, Patrol, Attack, ProtectMiningBase, NullState; INIT IF (ThisTeamIs (TEAM_InnerDestroyer2)) FormationBroad (); ENDIF Jump Decide; ENDINIT WATCH ENDWATCH STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (TEAMSHIPS_InnerCruiser) > 0) IF (FindEnemiesInside (VOLUME_Layer1Vol, SHIPS_InnerDefenseFound, 2000)) Jump Attack; ELSE Jump Patrol; ENDIF ELSEIF (ShipsCount (TEAMSHIPS_InnerDestroyer1) > 0) IF (FindEnemiesInside (VOLUME_Layer1Vol, SHIPS_InnerDefenseFound, 2000)) Jump Attack; ELSE Jump Patrol; ENDIF ELSEIF (ShipsCount (TEAMSHIPS_InnerDestroyer2) > 0) IF (FindEnemiesInside (VOLUME_Layer1Vol, SHIPS_InnerDefenseFound, 2000)) Jump Attack; ELSE Jump Patrol; ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) // If you die, go to a nullstate Jump NullState; ENDIF // if you're the Dogged Destroyer and the MiningBase is underattack, go attack the attackers IF ( (ThisTeamIs (TEAM_InnerDestroyer1)) AND (VarGet ("G_MiningBaseUnderAttack") = TRUE) ) Jump ProtectMiningBase; ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Stop (); IF (ThisTeamIs (TEAM_InnerCruiser)) PatrolPath (PATH_InnerCruiserPath); ELSEIF (ThisTeamIs (TEAM_InnerDestroyer1)) PatrolPath (PATH_InnerDestroyer1Path); ELSEIF (ThisTeamIs (TEAM_InnerDestroyer2)) FormationBroad (); PatrolPath (PATH_InnerDestroyer2Path); ENDIF ENDINIT WATCH // **** watch everywhere stuff **** IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // if you find any enemies while patrolling, go back to decide IF (FindEnemiesInside (VOLUME_Layer1Vol, SHIPS_NewGuysFound, 2000)) Jump Decide; ENDIF ENDWATCH ENDSTATE Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Attack //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_InnerDestroyer2)) FormationBroad (); ENDIF IF (ThisTeamIs (TEAM_InnerCruiser)) ShipsClear (SHIPS_InnerDefenseTargets); IF (ShipsSelectType (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "SalCapCorvette")) ELSEIF (ShipsSelectType (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Carrier")) ELSE ShipsAdd (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound); ENDIF IF (ShipsCount (SHIPS_InnerDefenseTargets) > 0) //Print ("InnerDefenseTeam Trying to MoveAttack NOW!!!!!!!!!!!!!!!!!!!!"); //MoveAttack (SHIPS_InnerDefenseTargets); Attack (SHIPS_InnerDefenseTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_InnerDestroyer1)) ShipsClear (SHIPS_InnerDefenseTargets); IF (ShipsSelectType (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "SalCapCorvette")) ELSEIF (ShipsSelectType (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Carrier")) ELSE ShipsAdd (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound); ENDIF IF (ShipsCount (SHIPS_InnerDefenseTargets) > 0) //Print ("InnerDefenseTeam Trying to MoveAttack NOW!!!!!!!!!!!!!!!!!!!!"); //MoveAttack (SHIPS_InnerDefenseTargets); Attack (SHIPS_InnerDefenseTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_InnerDestroyer2)) ShipsClear (SHIPS_InnerDefenseTargets); IF (ShipsSelectType (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "SalCapCorvette")) ELSEIF (ShipsSelectType (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound, "CLASS_Carrier")) ELSE ShipsAdd (SHIPS_InnerDefenseTargets, SHIPS_InnerDefenseFound); ENDIF IF (ShipsCount (SHIPS_InnerDefenseTargets) > 0) //Print ("InnerDefenseTeam Trying to MoveAttack NOW!!!!!!!!!!!!!!!!!!!!"); //MoveAttack (SHIPS_InnerDefenseTargets); Attack (SHIPS_InnerDefenseTargets); ELSE Jump Decide; ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) // If you die, go to a nullstate Jump NullState; ENDIF // if the ships you're attacking die OR you stop attacking for some reason, jump back into this state to kill the rest of the baddies IF (ThisTeamIs (TEAM_InnerCruiser)) IF ( (ShipsCount (SHIPS_InnerDefenseTargets) = 0) OR (ShipsOrder (TEAMSHIPS_InnerCruiser) != 2) ) Jump Attack; ENDIF ELSEIF (ThisTeamIs (TEAM_InnerDestroyer1)) IF ( (ShipsCount (SHIPS_InnerDefenseTargets) = 0) OR (ShipsOrder (TEAMSHIPS_InnerDestroyer1) != 2) ) Jump Attack; ENDIF ELSEIF (ThisTeamIs (TEAM_InnerDestroyer2)) IF ( (ShipsCount (SHIPS_InnerDefenseTargets) = 0) OR (ShipsOrder (TEAMSHIPS_InnerDestroyer2) != 2) ) Jump Attack; ENDIF ENDIF // if you're the Dogged Destroyer and the MiningBase is underattack, go attack the attackers IF ( (ThisTeamIs (TEAM_InnerDestroyer1)) AND (VarGet ("G_MiningBaseUnderAttack") = TRUE) ) Jump ProtectMiningBase; ENDIF ENDWATCH ENDSTATE Attack //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE ProtectMiningBase //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ShipsClear (SHIPS_MiningBaseTargets); IF (ShipsSelectType (SHIPS_MiningBaseTargets, SHIPS_AttackingMiningBase, "SalCapCorvette")) ELSEIF (ShipsSelectType (SHIPS_MiningBaseTargets, SHIPS_AttackingMiningBase, "HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_MiningBaseTargets, SHIPS_AttackingMiningBase, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_MiningBaseTargets, SHIPS_AttackingMiningBase, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_MiningBaseTargets, SHIPS_AttackingMiningBase, "CLASS_Carrier")) ELSE ShipsAdd (SHIPS_MiningBaseTargets, SHIPS_AttackingMiningBase); ENDIF IF (ShipsCount (SHIPS_MiningBaseTargets) > 0) MoveAttack (SHIPS_MiningBaseTargets); ELSE Jump Decide; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) // If you die, go to a nullstate Jump NullState; ENDIF // if the ships you're attacking die OR you stop attacking for some reason, jump back into this state to kill the rest of the baddies IF ( (ShipsCount (SHIPS_MiningBaseTargets) = 0) OR (ShipsOrder (TEAMSHIPS_InnerDestroyer1) != 2) ) Jump Attack; ENDIF ENDWATCH ENDSTATE ProtectMiningBase //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM InnerDefenseTeam //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ InnerDefenseTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ InnerCloakingTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM InnerCloakingTeam States Guard, GuardCloakityOn, GuardCloakityOff, NullState; INIT Jump Guard; ENDINIT WATCH ENDWATCH STATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //IF ( (ThisTeamIs (TEAM_CloakACarrier)) OR (ThisTeamIs (TEAM_CloakBCarrier)) ) // IF (ShipsCount (SHIPS_CPUCarrier) > 0) // Guard (SHIPS_CPUCarrier); // ELSE // Guard (TEAMSHIPS_MiningBase); // ENDIF IF ( (ThisTeamIs (TEAM_CloakADestroyer1)) OR (ThisTeamIs (TEAM_CloakBDestroyer1)) ) IF (ShipsCount (TEAMSHIPS_InnerDestroyer1) > 0) Guard (TEAMSHIPS_InnerDestroyer1); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakADestroyer2)) OR (ThisTeamIs (TEAM_CloakBDestroyer2)) ) IF (ShipsCount (TEAMSHIPS_InnerDestroyer2) > 0) Guard (TEAMSHIPS_InnerDestroyer2); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakACruiser)) OR (ThisTeamIs (TEAM_CloakBCruiser)) ) IF (ShipsCount (TEAMSHIPS_InnerCruiser) > 0) Guard (TEAMSHIPS_InnerCruiser); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // if you find ships within visual range, activate cloaking //IF ( (ThisTeamIs (TEAM_CloakACarrier)) OR (ThisTeamIs (TEAM_CloakBCarrier)) ) // IF (FindEnemiesNearTeam (SHIPS_CloakCarrierFound, 14000)) // Jump GuardCloakityOn; // ENDIF IF ( (ThisTeamIs (TEAM_CloakADestroyer1)) OR (ThisTeamIs (TEAM_CloakBDestroyer1)) ) IF (FindEnemiesNearTeam (SHIPS_CloakDestroyer1Found, 14000)) Jump GuardCloakityOn; ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakADestroyer2)) OR (ThisTeamIs (TEAM_CloakBDestroyer2)) ) IF (FindEnemiesNearTeam (SHIPS_CloakDestroyer2Found, 14000)) Jump GuardCloakityOn; ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakACruiser)) OR (ThisTeamIs (TEAM_CloakBCruiser)) ) IF (FindEnemiesNearTeam (SHIPS_CloakCruiserFound, 14000)) Jump GuardCloakityOn; ENDIF ENDIF ENDWATCH ENDSTATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCloakityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // issue the guard command again just for safety //IF ( (ThisTeamIs (TEAM_CloakACarrier)) OR (ThisTeamIs (TEAM_CloakBCarrier)) ) // IF (ShipsCount (SHIPS_CPUCarrier) > 0) // Guard (SHIPS_CPUCarrier); // ELSE // Guard (TEAMSHIPS_MiningBase); // ENDIF IF ( (ThisTeamIs (TEAM_CloakADestroyer1)) OR (ThisTeamIs (TEAM_CloakBDestroyer1)) ) IF (ShipsCount (TEAMSHIPS_InnerDestroyer1) > 0) Guard (TEAMSHIPS_InnerDestroyer1); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakADestroyer2)) OR (ThisTeamIs (TEAM_CloakBDestroyer2)) ) IF (ShipsCount (TEAMSHIPS_InnerDestroyer2) > 0) Guard (TEAMSHIPS_InnerDestroyer2); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakACruiser)) OR (ThisTeamIs (TEAM_CloakBCruiser)) ) IF (ShipsCount (TEAMSHIPS_InnerCruiser) > 0) Guard (TEAMSHIPS_InnerCruiser); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ENDIF SpecialToggle(); // Turn on the Cloaking ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // if there are NO ships within visual range, turn OFF the cloaking field //IF ( (ThisTeamIs (TEAM_CloakACarrier)) OR (ThisTeamIs (TEAM_CloakBCarrier)) ) // IF (NOT FindEnemiesNearTeam (SHIPS_CloakCarrierFound, 14000)) // Jump GuardCloakityOff; // ENDIF IF ( (ThisTeamIs (TEAM_CloakADestroyer1)) OR (ThisTeamIs (TEAM_CloakBDestroyer1)) ) IF (NOT FindEnemiesNearTeam (SHIPS_CloakDestroyer1Found, 14000)) Jump GuardCloakityOff; ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakADestroyer2)) OR (ThisTeamIs (TEAM_CloakBDestroyer2)) ) IF (NOT FindEnemiesNearTeam (SHIPS_CloakDestroyer2Found, 14000)) Jump GuardCloakityOff; ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakACruiser)) OR (ThisTeamIs (TEAM_CloakBCruiser)) ) IF (NOT FindEnemiesNearTeam (SHIPS_CloakCruiserFound, 14000)) Jump GuardCloakityOff; ENDIF ENDIF ENDWATCH ENDSTATE GuardCloakityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCloakityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // issue the guard command again just for safety //IF ( (ThisTeamIs (TEAM_CloakACarrier)) OR (ThisTeamIs (TEAM_CloakBCarrier)) ) // IF (ShipsCount (SHIPS_CPUCarrier) > 0) // Guard (SHIPS_CPUCarrier); // ELSE // Guard (TEAMSHIPS_MiningBase); // ENDIF IF ( (ThisTeamIs (TEAM_CloakADestroyer1)) OR (ThisTeamIs (TEAM_CloakBDestroyer1)) ) IF (ShipsCount (TEAMSHIPS_InnerDestroyer1) > 0) Guard (TEAMSHIPS_InnerDestroyer1); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakADestroyer2)) OR (ThisTeamIs (TEAM_CloakBDestroyer2)) ) IF (ShipsCount (TEAMSHIPS_InnerDestroyer2) > 0) Guard (TEAMSHIPS_InnerDestroyer2); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakACruiser)) OR (ThisTeamIs (TEAM_CloakBCruiser)) ) IF (ShipsCount (TEAMSHIPS_InnerCruiser) > 0) Guard (TEAMSHIPS_InnerCruiser); ELSE Guard (TEAMSHIPS_MiningBase); ENDIF ENDIF SpecialToggle(); // Turn OFF the cloaking ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // if you find ships within visual range, activate cloaking //IF ( (ThisTeamIs (TEAM_CloakACarrier)) OR (ThisTeamIs (TEAM_CloakBCarrier)) ) // IF (FindEnemiesNearTeam (SHIPS_CloakCarrierFound, 14000)) // Jump GuardCloakityOn; // ENDIF IF ( (ThisTeamIs (TEAM_CloakADestroyer1)) OR (ThisTeamIs (TEAM_CloakBDestroyer1)) ) IF (FindEnemiesNearTeam (SHIPS_CloakDestroyer1Found, 14000)) Jump GuardCloakityOn; ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakADestroyer2)) OR (ThisTeamIs (TEAM_CloakBDestroyer2)) ) IF (FindEnemiesNearTeam (SHIPS_CloakDestroyer2Found, 14000)) Jump GuardCloakityOn; ENDIF ELSEIF ( (ThisTeamIs (TEAM_CloakACruiser)) OR (ThisTeamIs (TEAM_CloakBCruiser)) ) IF (FindEnemiesNearTeam (SHIPS_CloakCruiserFound, 14000)) Jump GuardCloakityOn; ENDIF ENDIF ENDWATCH ENDSTATE GuardCloakityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM InnerCloakingTeam //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ InnerCloakingTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ HyperspaceGateTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM HyperspaceGateTeam States HyperspaceOut, HyperspaceIn, Decide, Patrol, AttackBox, AttackSphere, Dock, Launch, NullState; INIT Jump HyperspaceOut; ENDINIT WATCH ENDWATCH STATE HyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT HideShips (THISTEAMSHIPS); TeamHyperspaceOut (); // Get _everyone_ outta here so they can come in through the gate at the appropriate time ENDINIT WATCH // GATE 2, WAVE 1: One team watches to see if there is enough of a force in the volume to launch IF (ThisTeamIs (TEAM_G2HC)) IFONCE (TRUE) VarCreateSet ("G_TOTALWave1Gate2BoxFound", 0); ENDIFONCE FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave1Found, 100); ShipsSelectClass (SHIPS_G2Wave1FighterFound, SHIPS_G2Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G2Wave1CorvetteFound, SHIPS_G2Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G2Wave1FrigateFound, SHIPS_G2Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G2Wave1DestroyerFound, SHIPS_G2Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G2Wave1CarrierFound, SHIPS_G2Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G2Wave1CruiserFound, SHIPS_G2Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate2BoxFound", 62*(ShipsCount (SHIPS_G2Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G2Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G2Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G2Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G2Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G2Wave1Cruiserfound))); IFONCE ( (VarGet ("G_TOTALWave1Gate2BoxFound") > 2800) OR (VarGet ("G_GATE2") < 39000) ) VarCreateSet ("G_Gate2Wave1LaunchNow", TRUE); TimerCreateSetStart ("G_PlayHyperspaceGateEvent", 1); ENDIFONCE ENDIF // GATE 2, WAVE 2: Second wave watches to see if wave one is dead OR there is a _really_ large player force inside the volume IF (ThisTeamIs (TEAM_G2Des)) IFONCE (TRUE) VarCreateSet ("G_TOTALWave2Gate2BoxFound", 0); ENDIFONCE FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave2Found, 100); ShipsSelectClass (SHIPS_G2Wave2FighterFound, SHIPS_G2Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G2Wave2CorvetteFound, SHIPS_G2Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G2Wave2FrigateFound, SHIPS_G2Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G2Wave2DestroyerFound, SHIPS_G2Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G2Wave2CarrierFound, SHIPS_G2Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G2Wave2CruiserFound, SHIPS_G2Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate2BoxFound", 62*(ShipsCount (SHIPS_G2Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G2Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G2Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G2Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G2Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G2Wave2Cruiserfound))); IFONCE (VarGet ("G_TOTALWave2Gate2BoxFound") > 4800) VarCreateSet ("G_Gate2Wave2LaunchNow", TRUE); ENDIFONCE ENDIF IF ( (VarGet ("G_Gate2Wave1LaunchNow")) AND (TimerExpired ("G_Gate2Wave1NowInLevel")) ) IFONCE ( ((ShipsCount (TEAMSHIPS_G2HC) = 0) AND (ShipsCount (TEAMSHIPS_G2Int) = 0) AND (ShipsCount (TEAMSHIPS_G2Bomber) = 0)) OR (VarGet ("G_TOTALWave2Gate2BoxFound") > 4800) ) VarCreateSet ("G_Gate2Wave2LaunchNow", TRUE); ENDIFONCE ENDIF // GATE 2, WAVE 1: if the word is given to launch, then hyperspace in through the gate IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) OR (ThisTeamIs (TEAM_G2SF)) ) IF (VarGet ("G_Gate2Wave1LaunchNow") = TRUE) Jump HyperspaceIn; ENDIF ENDIF // GATE 2, WAVE 2: if the word is given to launch, then hyperspace in through the gate IF ( (ThisTeamIs (TEAM_G2Des)) OR (ThisTeamIs (TEAM_G2MDes)) ) IF (VarGet ("G_Gate2Wave2LaunchNow") = TRUE) Jump HyperspaceIn; ENDIF ENDIF // ------------------------------------------------------------------------------------------------------------------------ // GATE 1, WAVE 1: One team watches to see if there is enough of a force in the volume to launch IF (ThisTeamIs (TEAM_G1HC)) IFONCE (TRUE) VarCreateSet ("G_TOTALWave1Gate1BoxFound", 0); ENDIFONCE FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave1Found, 100); ShipsSelectClass (SHIPS_G1Wave1FighterFound, SHIPS_G1Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G1Wave1CorvetteFound, SHIPS_G1Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G1Wave1FrigateFound, SHIPS_G1Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G1Wave1DestroyerFound, SHIPS_G1Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G1Wave1CarrierFound, SHIPS_G1Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G1Wave1CruiserFound, SHIPS_G1Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate1BoxFound", 62*(ShipsCount (SHIPS_G1Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G1Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G1Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G1Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G1Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G1Wave1Cruiserfound))); IFONCE ( (VarGet ("G_TOTALWave1Gate1BoxFound") > 2800) OR (VarGet ("G_GATE1") < 39000) ) VarCreateSet ("G_Gate1Wave1LaunchNow", TRUE); TimerCreateSetStart ("G_PlayHyperspaceGateEvent", 1); ENDIFONCE ENDIF // GATE 1, WAVE 2: Second wave watches to see if wave one is dead OR there is a _really_ large player force inside the volume IF (ThisTeamIs (TEAM_G1Des)) IFONCE (TRUE) VarCreateSet ("G_TOTALWave2Gate1BoxFound", 0); ENDIFONCE FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave2Found, 100); ShipsSelectClass (SHIPS_G1Wave2FighterFound, SHIPS_G1Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G1Wave2CorvetteFound, SHIPS_G1Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G1Wave2FrigateFound, SHIPS_G1Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G1Wave2DestroyerFound, SHIPS_G1Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G1Wave2CarrierFound, SHIPS_G1Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G1Wave2CruiserFound, SHIPS_G1Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate1BoxFound", 62*(ShipsCount (SHIPS_G1Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G1Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G1Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G1Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G1Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G1Wave2Cruiserfound))); IFONCE (VarGet ("G_TOTALWave2Gate1BoxFound") > 4800) VarCreateSet ("G_Gate1Wave2LaunchNow", TRUE); ENDIFONCE ENDIF IF ( (VarGet ("G_Gate1Wave1LaunchNow")) AND (TimerExpired ("G_Gate1Wave1NowInLevel")) ) IFONCE ( ((ShipsCount (TEAMSHIPS_G1HC) = 0) AND (ShipsCount (TEAMSHIPS_G1Int) = 0) AND (ShipsCount (TEAMSHIPS_G1Bomber) = 0)) OR (VarGet ("G_TOTALWave2Gate1BoxFound") > 4800) ) VarCreateSet ("G_Gate1Wave2LaunchNow", TRUE); ENDIFONCE ENDIF // GATE 1, WAVE 1: if the word is given to launch, then hyperspace in through the gate IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) OR (ThisTeamIs (TEAM_G1SF)) ) IF (VarGet ("G_Gate1Wave1LaunchNow") = TRUE) Jump HyperspaceIn; ENDIF ENDIF // GATE 1, WAVE 2: if the word is given to launch, then hyperspace in through the gate IF ( (ThisTeamIs (TEAM_G1Des)) OR (ThisTeamIs (TEAM_G1MDes)) ) IF (VarGet ("G_Gate1Wave2LaunchNow") = TRUE) Jump HyperspaceIn; ENDIF ENDIF //------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1: One team watches to see if there is enough of a force in the volume to launch IF (ThisTeamIs (TEAM_G3HC)) IFONCE (TRUE) VarCreateSet ("G_TOTALWave1Gate3BoxFound", 0); ENDIFONCE FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave1Found, 100); ShipsSelectClass (SHIPS_G3Wave1FighterFound, SHIPS_G3Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G3Wave1CorvetteFound, SHIPS_G3Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G3Wave1FrigateFound, SHIPS_G3Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G3Wave1DestroyerFound, SHIPS_G3Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G3Wave1CarrierFound, SHIPS_G3Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G3Wave1CruiserFound, SHIPS_G3Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate3BoxFound", 62*(ShipsCount (SHIPS_G3Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G3Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G3Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G3Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G3Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G3Wave1Cruiserfound))); IFONCE ( (VarGet ("G_TOTALWave1Gate3BoxFound") > 2800) OR (VarGet ("G_GATE3") < 39000) ) VarCreateSet ("G_Gate3Wave1LaunchNow", TRUE); TimerCreateSetStart ("G_PlayHyperspaceGateEvent", 1); ENDIFONCE ENDIF // GATE 3, WAVE 2: Second wave watches to see if wave one is dead OR there is a _really_ large player force inside the volume IF (ThisTeamIs (TEAM_G3Des)) IFONCE (TRUE) VarCreateSet ("G_TOTALWave2Gate3BoxFound", 0); ENDIFONCE FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave2Found, 100); ShipsSelectClass (SHIPS_G3Wave2FighterFound, SHIPS_G3Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G3Wave2CorvetteFound, SHIPS_G3Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G3Wave2FrigateFound, SHIPS_G3Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G3Wave2DestroyerFound, SHIPS_G3Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G3Wave2CarrierFound, SHIPS_G3Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G3Wave2CruiserFound, SHIPS_G3Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate3BoxFound", 62*(ShipsCount (SHIPS_G3Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G3Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G3Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G3Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G3Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G3Wave2Cruiserfound))); IFONCE (VarGet ("G_TOTALWave2Gate3BoxFound") > 4800) VarCreateSet ("G_Gate3Wave2LaunchNow", TRUE); ENDIFONCE ENDIF IF ( (VarGet ("G_Gate3Wave1LaunchNow")) AND (TimerExpired ("G_Gate3Wave1NowInLevel")) ) IFONCE ( ((ShipsCount (TEAMSHIPS_G3HC) = 0) AND (ShipsCount (TEAMSHIPS_G3Int) = 0) AND (ShipsCount (TEAMSHIPS_G3Bomber) = 0)) OR (VarGet ("G_TOTALWave2Gate3BoxFound") > 4800) ) VarCreateSet ("G_Gate3Wave2LaunchNow", TRUE); ENDIFONCE ENDIF // GATE 3, WAVE 1: if the word is given to launch, then hyperspace in through the gate IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) OR (ThisTeamIs (TEAM_G3SF)) ) IF (VarGet ("G_Gate3Wave1LaunchNow") = TRUE) Jump HyperspaceIn; ENDIF ENDIF // GATE 3, WAVE 2: if the word is given to launch, then hyperspace in through the gate IF ( (ThisTeamIs (TEAM_G3Des)) OR (ThisTeamIs (TEAM_G3MDes)) ) IF (VarGet ("G_Gate3Wave2LaunchNow") = TRUE) Jump HyperspaceIn; ENDIF ENDIF ENDWATCH ENDSTATE HyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE HyperspaceIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // GATE 2, WAVE 1: in you come! IF (VarGet ("G_GATE2") > 0) IF (ThisTeamIs (TEAM_G2HC)) TimerCreateSetStart ("G_Gate2Wave1NowInLevel", 17); GateShipsIn (TEAMSHIPS_G2HC, POINT_GATE2); ELSEIF (ThisTeamIs (TEAM_G2Int)) GateShipsIn (TEAMSHIPS_G2Int, POINT_GATE2); ELSEIF (ThisTeamIs (TEAM_G2Bomber)) GateShipsIn (TEAMSHIPS_G2Bomber, POINT_GATE2); ELSEIF (ThisTeamIs (TEAM_G2SF)) GateShipsIn (TEAMSHIPS_G2SF, POINT_GATE2); ENDIF ENDIF // GATE 2, WAVE 2: in you come! IF (VarGet ("G_GATE2") > 0) IF (ThisTeamIs (TEAM_G2Des)) TimerCreateSetStart ("G_Gate2Wave2NowInLevel", 17); GateShipsIn (TEAMSHIPS_G2Des, POINT_GATE2); ELSEIF (ThisTeamIs (TEAM_G2MDes)) GateShipsIn (TEAMSHIPS_G2MDes, POINT_GATE2); ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1: in you come! IF (VarGet ("G_GATE1") > 0) IF (ThisTeamIs (TEAM_G1HC)) TimerCreateSetStart ("G_Gate1Wave1NowInLevel", 17); GateShipsIn (TEAMSHIPS_G1HC, POINT_Gate1); ELSEIF (ThisTeamIs (TEAM_G1Int)) GateShipsIn (TEAMSHIPS_G1Int, POINT_Gate1); ELSEIF (ThisTeamIs (TEAM_G1Bomber)) GateShipsIn (TEAMSHIPS_G1Bomber, POINT_Gate1); ELSEIF (ThisTeamIs (TEAM_G1SF)) GateShipsIn (TEAMSHIPS_G1SF, POINT_Gate1); ENDIF ENDIF // GATE 1, WAVE 2: in you come! IF (VarGet ("G_GATE1") > 0) IF (ThisTeamIs (TEAM_G1Des)) TimerCreateSetStart ("G_Gate1Wave2NowInLevel", 17); GateShipsIn (TEAMSHIPS_G1Des, POINT_Gate1); ELSEIF (ThisTeamIs (TEAM_G1MDes)) GateShipsIn (TEAMSHIPS_G1MDes, POINT_Gate1); ENDIF ENDIF //---------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1: in you come! IF (VarGet ("G_GATE3") > 0) IF (ThisTeamIs (TEAM_G3HC)) TimerCreateSetStart ("G_Gate3Wave1NowInLevel", 17); GateShipsIn (TEAMSHIPS_G3HC, POINT_Gate3); ELSEIF (ThisTeamIs (TEAM_G3Int)) GateShipsIn (TEAMSHIPS_G3Int, POINT_Gate3); ELSEIF (ThisTeamIs (TEAM_G3Bomber)) GateShipsIn (TEAMSHIPS_G3Bomber, POINT_Gate3); ELSEIF (ThisTeamIs (TEAM_G3SF)) GateShipsIn (TEAMSHIPS_G3SF, POINT_Gate3); ENDIF ENDIF // GATE 3, WAVE 2: in you come! IF (VarGet ("G_GATE3") > 0) IF (ThisTeamIs (TEAM_G3Des)) TimerCreateSetStart ("G_Gate3Wave2NowInLevel", 17); GateShipsIn (TEAMSHIPS_G3Des, POINT_Gate3); ELSEIF (ThisTeamIs (TEAM_G3MDes)) GateShipsIn (TEAMSHIPS_G3MDes, POINT_Gate3); ENDIF ENDIF //Jump Decide; ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // GATE 2, WAVE 1: if the timer is up, go to the Decide state IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) OR (ThisTeamIs (TEAM_G2SF)) ) IF (TimerExpired ("G_Gate2Wave1NowInLevel")) Jump Decide; ENDIF ENDIF // GATE 2, WAVE 2: if the timer is up, go to the Decide state IF ( (ThisTeamIs (TEAM_G2Des)) OR (ThisTeamIs (TEAM_G2MDes)) ) IF (TimerExpired ("G_Gate2Wave2NowInLevel")) Jump Decide; ENDIF ENDIF //------------------------------------------------------------------------------------------------------------------ // GATE 1, WAVE 1: if the timer is up, go to the Decide state IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) OR (ThisTeamIs (TEAM_G1SF)) ) IF (TimerExpired ("G_Gate1Wave1NowInLevel")) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 2: if the timer is up, go to the Decide state IF ( (ThisTeamIs (TEAM_G1Des)) OR (ThisTeamIs (TEAM_G1MDes)) ) IF (TimerExpired ("G_Gate1Wave2NowInLevel")) Jump Decide; ENDIF ENDIF //------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1: if the timer is up, go to the Decide state IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) OR (ThisTeamIs (TEAM_G3SF)) ) IF (TimerExpired ("G_Gate3Wave1NowInLevel")) Jump Decide; ENDIF ENDIF // GATE 3, WAVE 2: if the timer is up, go to the Decide state IF ( (ThisTeamIs (TEAM_G3Des)) OR (ThisTeamIs (TEAM_G3MDes)) ) IF (TimerExpired ("G_Gate3Wave2NowInLevel")) Jump Decide; ENDIF ENDIF ENDWATCH ENDSTATE HyperspaceIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_G2SF)) Jump Patrol; ENDIF IF (ThisTeamIs (TEAM_G1SF)) Jump Patrol; ENDIF IF (ThisTeamIs (TEAM_G3SF)) Jump Patrol; ENDIF // GATE 2, WAVE 1 IF (ShipsCount (TEAMSHIPS_G2HC) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate2Wave1AttackGate2Box", TRUE); VarCreateSet ("G_Gate2Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate2 box, filter, apply modifiers, and set the "AttackGate2Box" variable if force is strong enough ShipsClear (SHIPS_G2Wave1Found); ShipsClear (SHIPS_G2Wave1FighterFound); ShipsClear (SHIPS_G2Wave1CorvetteFound); ShipsClear (SHIPS_G2Wave1FrigateFound); ShipsClear (SHIPS_G2Wave1DestroyerFound); ShipsClear (SHIPS_G2Wave1CarrierFound); ShipsClear (SHIPS_G2Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave1Found, 100); ShipsSelectClass (SHIPS_G2Wave1FighterFound, SHIPS_G2Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G2Wave1CorvetteFound, SHIPS_G2Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G2Wave1FrigateFound, SHIPS_G2Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G2Wave1DestroyerFound, SHIPS_G2Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G2Wave1CarrierFound, SHIPS_G2Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G2Wave1CruiserFound, SHIPS_G2Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate2BoxFound", 62*(ShipsCount (SHIPS_G2Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G2Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G2Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G2Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G2Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G2Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate2BoxFound") > 2800) VarSet ("G_Gate2Wave1AttackGate2Box", TRUE); ELSE VarSet ("G_Gate2Wave1AttackGate2Box", FALSE); ENDIF // Find everyone inside the Gate2 sphere ShipsClear (SHIPS_G2Wave1GateFound); FindEnemiesInside (VOLUME_Gate2NearbySphere, SHIPS_G2Wave1GateFound, 100); VarCreateSet ("G_SHIPSG2Wave1GateFound", ShipsCount (SHIPS_G2Wave1GateFound)); IF (ShipsCount (SHIPS_G2Wave1GateFound) > 0) VarSet ("G_Gate2Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate2Wave1AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G2Int) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate2Wave1AttackGate2Box", TRUE); VarCreateSet ("G_Gate2Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate2 box, filter, apply modifiers, and set the "AttackGate2Box" variable if force is strong enough ShipsClear (SHIPS_G2Wave1Found); ShipsClear (SHIPS_G2Wave1FighterFound); ShipsClear (SHIPS_G2Wave1CorvetteFound); ShipsClear (SHIPS_G2Wave1FrigateFound); ShipsClear (SHIPS_G2Wave1DestroyerFound); ShipsClear (SHIPS_G2Wave1CarrierFound); ShipsClear (SHIPS_G2Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave1Found, 100); ShipsSelectClass (SHIPS_G2Wave1FighterFound, SHIPS_G2Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G2Wave1CorvetteFound, SHIPS_G2Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G2Wave1FrigateFound, SHIPS_G2Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G2Wave1DestroyerFound, SHIPS_G2Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G2Wave1CarrierFound, SHIPS_G2Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G2Wave1CruiserFound, SHIPS_G2Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate2BoxFound", 62*(ShipsCount (SHIPS_G2Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G2Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G2Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G2Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G2Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G2Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate2BoxFound") > 2800) VarSet ("G_Gate2Wave1AttackGate2Box", TRUE); ELSE VarSet ("G_Gate2Wave1AttackGate2Box", FALSE); ENDIF // Find everyone inside the Gate2 sphere ShipsClear (SHIPS_G2Wave1GateFound); FindEnemiesInside (VOLUME_Gate2NearbySphere, SHIPS_G2Wave1GateFound, 100); VarCreateSet ("G_SHIPSG2Wave1GateFound", ShipsCount (SHIPS_G2Wave1GateFound)); IF (ShipsCount (SHIPS_G2Wave1GateFound) > 0) VarSet ("G_Gate2Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate2Wave1AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G2Bomber) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate2Wave1AttackGate2Box", TRUE); VarCreateSet ("G_Gate2Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate2 box, filter, apply modifiers, and set the "AttackGate2Box" variable if force is strong enough ShipsClear (SHIPS_G2Wave1Found); ShipsClear (SHIPS_G2Wave1FighterFound); ShipsClear (SHIPS_G2Wave1CorvetteFound); ShipsClear (SHIPS_G2Wave1FrigateFound); ShipsClear (SHIPS_G2Wave1DestroyerFound); ShipsClear (SHIPS_G2Wave1CarrierFound); ShipsClear (SHIPS_G2Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave1Found, 100); ShipsSelectClass (SHIPS_G2Wave1FighterFound, SHIPS_G2Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G2Wave1CorvetteFound, SHIPS_G2Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G2Wave1FrigateFound, SHIPS_G2Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G2Wave1DestroyerFound, SHIPS_G2Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G2Wave1CarrierFound, SHIPS_G2Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G2Wave1CruiserFound, SHIPS_G2Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate2BoxFound", 62*(ShipsCount (SHIPS_G2Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G2Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G2Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G2Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G2Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G2Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate2BoxFound") > 2800) VarSet ("G_Gate2Wave1AttackGate2Box", TRUE); ELSE VarSet ("G_Gate2Wave1AttackGate2Box", FALSE); ENDIF // Find everyone inside the Gate2 sphere ShipsClear (SHIPS_G2Wave1GateFound); FindEnemiesInside (VOLUME_Gate2NearbySphere, SHIPS_G2Wave1GateFound, 100); VarCreateSet ("G_SHIPSG2Wave1GateFound", ShipsCount (SHIPS_G2Wave1GateFound)); IF (ShipsCount (SHIPS_G2Wave1GateFound) > 0) VarSet ("G_Gate2Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate2Wave1AttackGateSphere", FALSE); ENDIF ENDIF // GATE 2, WAVE 2 IF (ShipsCount (TEAMSHIPS_G2Des) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate2Wave2AttackGate2Box", TRUE); VarCreateSet ("G_Gate2Wave2AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate2 box, filter, apply modifiers, and set the "AttackGate2Box" variable if force is strong enough ShipsClear (SHIPS_G2Wave2Found); ShipsClear (SHIPS_G2Wave2FighterFound); ShipsClear (SHIPS_G2Wave2CorvetteFound); ShipsClear (SHIPS_G2Wave2FrigateFound); ShipsClear (SHIPS_G2Wave2DestroyerFound); ShipsClear (SHIPS_G2Wave2CarrierFound); ShipsClear (SHIPS_G2Wave2CruiserFound); FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave2Found, 100); ShipsSelectClass (SHIPS_G2Wave2FighterFound, SHIPS_G2Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G2Wave2CorvetteFound, SHIPS_G2Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G2Wave2FrigateFound, SHIPS_G2Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G2Wave2DestroyerFound, SHIPS_G2Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G2Wave2CarrierFound, SHIPS_G2Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G2Wave2CruiserFound, SHIPS_G2Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate2BoxFound", 62*(ShipsCount (SHIPS_G2Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G2Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G2Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G2Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G2Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G2Wave2Cruiserfound))); IF (VarGet ("G_TOTALWave2Gate2BoxFound") > 2800) VarSet ("G_Gate2Wave2AttackGate2Box", TRUE); ELSE VarSet ("G_Gate2Wave2AttackGate2Box", FALSE); ENDIF // Find everyone inside the Gate2 sphere ShipsClear (SHIPS_G2Wave2GateFound); FindEnemiesInside (VOLUME_Gate2NearbySphere, SHIPS_G2Wave2GateFound, 100); VarCreateSet ("G_SHIPSG2Wave2GateFound", ShipsCount (SHIPS_G2Wave2GateFound)); IF (ShipsCount (SHIPS_G2Wave2GateFound) > 0) VarSet ("G_Gate2Wave2AttackGateSphere", TRUE); ELSE VarSet ("G_Gate2Wave2AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G2MDes) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate2Wave2AttackGate2Box", TRUE); VarCreateSet ("G_Gate2Wave2AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate2 box, filter, apply modifiers, and set the "AttackGate2Box" variable if force is strong enough ShipsClear (SHIPS_G2Wave2Found); ShipsClear (SHIPS_G2Wave2FighterFound); ShipsClear (SHIPS_G2Wave2CorvetteFound); ShipsClear (SHIPS_G2Wave2FrigateFound); ShipsClear (SHIPS_G2Wave2DestroyerFound); ShipsClear (SHIPS_G2Wave2CarrierFound); ShipsClear (SHIPS_G2Wave2CruiserFound); FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave2Found, 100); ShipsSelectClass (SHIPS_G2Wave2FighterFound, SHIPS_G2Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G2Wave2CorvetteFound, SHIPS_G2Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G2Wave2FrigateFound, SHIPS_G2Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G2Wave2DestroyerFound, SHIPS_G2Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G2Wave2CarrierFound, SHIPS_G2Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G2Wave2CruiserFound, SHIPS_G2Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate2BoxFound", 62*(ShipsCount (SHIPS_G2Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G2Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G2Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G2Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G2Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G2Wave2Cruiserfound))); IF (VarGet ("G_TOTALWave2Gate2BoxFound") > 2800) VarSet ("G_Gate2Wave2AttackGate2Box", TRUE); ELSE VarSet ("G_Gate2Wave2AttackGate2Box", FALSE); ENDIF // Find everyone inside the Gate2 sphere ShipsClear (SHIPS_G2Wave2GateFound); FindEnemiesInside (VOLUME_Gate2NearbySphere, SHIPS_G2Wave2GateFound, 100); VarCreateSet ("G_SHIPSG2Wave2GateFound", ShipsCount (SHIPS_G2Wave2GateFound)); IF (ShipsCount (SHIPS_G2Wave2GateFound) > 0) VarSet ("G_Gate2Wave2AttackGateSphere", TRUE); ELSE VarSet ("G_Gate2Wave2AttackGateSphere", FALSE); ENDIF ENDIF // GATE 2, WAVE 1 - here's where you finally decide what to do IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) OR (ThisTeamIs (TEAM_G2SF)) ) IF (VarGet ("G_Gate2Wave1AttackGateSphere") = TRUE) Jump AttackSphere; ELSEIF (VarGet ("G_Gate2Wave1AttackGate2Box") = TRUE) Jump AttackBox; ELSE Jump Patrol; ENDIF ENDIF // GATE 2, WAVE 2 - here's where you finally decide what to do IF ( (ThisTeamIs (TEAM_G2Des)) OR (ThisTeamIs (TEAM_G2MDes)) ) IF (VarGet ("G_Gate2Wave2AttackGate2Box") = TRUE) Jump AttackBox; ELSEIF (VarGet ("G_Gate2Wave2AttackGateSphere") = TRUE) Jump AttackSphere; ELSE Jump Patrol; ENDIF ENDIF //------------------------------------------------------------------------------------------------------------------------ // GATE 1, WAVE 1 IF (ShipsCount (TEAMSHIPS_G1HC) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate1Wave1AttackGate1Box", TRUE); VarCreateSet ("G_Gate1Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate1 box, filter, apply modifiers, and set the "AttackGate1Box" variable if force is strong enough ShipsClear (SHIPS_G1Wave1Found); ShipsClear (SHIPS_G1Wave1FighterFound); ShipsClear (SHIPS_G1Wave1CorvetteFound); ShipsClear (SHIPS_G1Wave1FrigateFound); ShipsClear (SHIPS_G1Wave1DestroyerFound); ShipsClear (SHIPS_G1Wave1CarrierFound); ShipsClear (SHIPS_G1Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave1Found, 100); ShipsSelectClass (SHIPS_G1Wave1FighterFound, SHIPS_G1Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G1Wave1CorvetteFound, SHIPS_G1Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G1Wave1FrigateFound, SHIPS_G1Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G1Wave1DestroyerFound, SHIPS_G1Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G1Wave1CarrierFound, SHIPS_G1Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G1Wave1CruiserFound, SHIPS_G1Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate1BoxFound", 62*(ShipsCount (SHIPS_G1Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G1Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G1Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G1Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G1Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G1Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate1BoxFound") > 2800) VarSet ("G_Gate1Wave1AttackGate1Box", TRUE); ELSE VarSet ("G_Gate1Wave1AttackGate1Box", FALSE); ENDIF // Find everyone inside the Gate1 sphere ShipsClear (SHIPS_G1Wave1GateFound); FindEnemiesInside (VOLUME_Gate1NearbySphere, SHIPS_G1Wave1GateFound, 100); VarCreateSet ("G_SHIPSG1Wave1GateFound", ShipsCount (SHIPS_G1Wave1GateFound)); IF (ShipsCount (SHIPS_G1Wave1GateFound) > 0) VarSet ("G_Gate1Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate1Wave1AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G1Int) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate1Wave1AttackGate1Box", TRUE); VarCreateSet ("G_Gate1Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate1 box, filter, apply modifiers, and set the "AttackGate1Box" variable if force is strong enough ShipsClear (SHIPS_G1Wave1Found); ShipsClear (SHIPS_G1Wave1FighterFound); ShipsClear (SHIPS_G1Wave1CorvetteFound); ShipsClear (SHIPS_G1Wave1FrigateFound); ShipsClear (SHIPS_G1Wave1DestroyerFound); ShipsClear (SHIPS_G1Wave1CarrierFound); ShipsClear (SHIPS_G1Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave1Found, 100); ShipsSelectClass (SHIPS_G1Wave1FighterFound, SHIPS_G1Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G1Wave1CorvetteFound, SHIPS_G1Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G1Wave1FrigateFound, SHIPS_G1Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G1Wave1DestroyerFound, SHIPS_G1Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G1Wave1CarrierFound, SHIPS_G1Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G1Wave1CruiserFound, SHIPS_G1Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate1BoxFound", 62*(ShipsCount (SHIPS_G1Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G1Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G1Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G1Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G1Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G1Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate1BoxFound") > 2800) VarSet ("G_Gate1Wave1AttackGate1Box", TRUE); ELSE VarSet ("G_Gate1Wave1AttackGate1Box", FALSE); ENDIF // Find everyone inside the Gate1 sphere ShipsClear (SHIPS_G1Wave1GateFound); FindEnemiesInside (VOLUME_Gate1NearbySphere, SHIPS_G1Wave1GateFound, 100); VarCreateSet ("G_SHIPSG1Wave1GateFound", ShipsCount (SHIPS_G1Wave1GateFound)); IF (ShipsCount (SHIPS_G1Wave1GateFound) > 0) VarSet ("G_Gate1Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate1Wave1AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G1Bomber) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate1Wave1AttackGate1Box", TRUE); VarCreateSet ("G_Gate1Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate1 box, filter, apply modifiers, and set the "AttackGate1Box" variable if force is strong enough ShipsClear (SHIPS_G1Wave1Found); ShipsClear (SHIPS_G1Wave1FighterFound); ShipsClear (SHIPS_G1Wave1CorvetteFound); ShipsClear (SHIPS_G1Wave1FrigateFound); ShipsClear (SHIPS_G1Wave1DestroyerFound); ShipsClear (SHIPS_G1Wave1CarrierFound); ShipsClear (SHIPS_G1Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave1Found, 100); ShipsSelectClass (SHIPS_G1Wave1FighterFound, SHIPS_G1Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G1Wave1CorvetteFound, SHIPS_G1Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G1Wave1FrigateFound, SHIPS_G1Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G1Wave1DestroyerFound, SHIPS_G1Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G1Wave1CarrierFound, SHIPS_G1Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G1Wave1CruiserFound, SHIPS_G1Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate1BoxFound", 62*(ShipsCount (SHIPS_G1Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G1Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G1Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G1Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G1Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G1Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate1BoxFound") > 2800) VarSet ("G_Gate1Wave1AttackGate1Box", TRUE); ELSE VarSet ("G_Gate1Wave1AttackGate1Box", FALSE); ENDIF // Find everyone inside the Gate1 sphere ShipsClear (SHIPS_G1Wave1GateFound); FindEnemiesInside (VOLUME_Gate1NearbySphere, SHIPS_G1Wave1GateFound, 100); VarCreateSet ("G_SHIPSG1Wave1GateFound", ShipsCount (SHIPS_G1Wave1GateFound)); IF (ShipsCount (SHIPS_G1Wave1GateFound) > 0) VarSet ("G_Gate1Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate1Wave1AttackGateSphere", FALSE); ENDIF ENDIF // GATE 1, WAVE 2 IF (ShipsCount (TEAMSHIPS_G1Des) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate1Wave2AttackGate1Box", TRUE); VarCreateSet ("G_Gate1Wave2AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate1 box, filter, apply modifiers, and set the "AttackGate1Box" variable if force is strong enough ShipsClear (SHIPS_G1Wave2Found); ShipsClear (SHIPS_G1Wave2FighterFound); ShipsClear (SHIPS_G1Wave2CorvetteFound); ShipsClear (SHIPS_G1Wave2FrigateFound); ShipsClear (SHIPS_G1Wave2DestroyerFound); ShipsClear (SHIPS_G1Wave2CarrierFound); ShipsClear (SHIPS_G1Wave2CruiserFound); FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave2Found, 100); ShipsSelectClass (SHIPS_G1Wave2FighterFound, SHIPS_G1Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G1Wave2CorvetteFound, SHIPS_G1Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G1Wave2FrigateFound, SHIPS_G1Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G1Wave2DestroyerFound, SHIPS_G1Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G1Wave2CarrierFound, SHIPS_G1Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G1Wave2CruiserFound, SHIPS_G1Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate1BoxFound", 62*(ShipsCount (SHIPS_G1Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G1Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G1Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G1Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G1Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G1Wave2Cruiserfound))); IF (VarGet ("G_TOTALWave2Gate1BoxFound") > 2800) VarSet ("G_Gate1Wave2AttackGate1Box", TRUE); ELSE VarSet ("G_Gate1Wave2AttackGate1Box", FALSE); ENDIF // Find everyone inside the Gate1 sphere ShipsClear (SHIPS_G1Wave2GateFound); FindEnemiesInside (VOLUME_Gate1NearbySphere, SHIPS_G1Wave2GateFound, 100); VarCreateSet ("G_SHIPSG1Wave2GateFound", ShipsCount (SHIPS_G1Wave2GateFound)); IF (ShipsCount (SHIPS_G1Wave2GateFound) > 0) VarSet ("G_Gate1Wave2AttackGateSphere", TRUE); ELSE VarSet ("G_Gate1Wave2AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G1MDes) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate1Wave2AttackGate1Box", TRUE); VarCreateSet ("G_Gate1Wave2AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate1 box, filter, apply modifiers, and set the "AttackGate1Box" variable if force is strong enough ShipsClear (SHIPS_G1Wave2Found); ShipsClear (SHIPS_G1Wave2FighterFound); ShipsClear (SHIPS_G1Wave2CorvetteFound); ShipsClear (SHIPS_G1Wave2FrigateFound); ShipsClear (SHIPS_G1Wave2DestroyerFound); ShipsClear (SHIPS_G1Wave2CarrierFound); ShipsClear (SHIPS_G1Wave2CruiserFound); FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave2Found, 100); ShipsSelectClass (SHIPS_G1Wave2FighterFound, SHIPS_G1Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G1Wave2CorvetteFound, SHIPS_G1Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G1Wave2FrigateFound, SHIPS_G1Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G1Wave2DestroyerFound, SHIPS_G1Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G1Wave2CarrierFound, SHIPS_G1Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G1Wave2CruiserFound, SHIPS_G1Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate1BoxFound", 62*(ShipsCount (SHIPS_G1Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G1Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G1Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G1Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G1Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G1Wave2Cruiserfound))); IF (VarGet ("G_TOTALWave2Gate1BoxFound") > 2800) VarSet ("G_Gate1Wave2AttackGate1Box", TRUE); ELSE VarSet ("G_Gate1Wave2AttackGate1Box", FALSE); ENDIF // Find everyone inside the Gate1 sphere ShipsClear (SHIPS_G1Wave2GateFound); FindEnemiesInside (VOLUME_Gate1NearbySphere, SHIPS_G1Wave2GateFound, 100); VarCreateSet ("G_SHIPSG1Wave2GateFound", ShipsCount (SHIPS_G1Wave2GateFound)); IF (ShipsCount (SHIPS_G1Wave2GateFound) > 0) VarSet ("G_Gate1Wave2AttackGateSphere", TRUE); ELSE VarSet ("G_Gate1Wave2AttackGateSphere", FALSE); ENDIF ENDIF // GATE 2, WAVE 1 - here's where you finally decide what to do IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) OR (ThisTeamIs (TEAM_G1SF)) ) IF (VarGet ("G_Gate1Wave1AttackGateSphere") = TRUE) Jump AttackSphere; ELSEIF (VarGet ("G_Gate1Wave1AttackGate1Box") = TRUE) Jump AttackBox; ELSE Jump Patrol; ENDIF ENDIF // GATE 2, WAVE 2 - here's where you finally decide what to do IF ( (ThisTeamIs (TEAM_G1Des)) OR (ThisTeamIs (TEAM_G1MDes)) ) IF (VarGet ("G_Gate1Wave2AttackGate1Box") = TRUE) Jump AttackBox; ELSEIF (VarGet ("G_Gate1Wave2AttackGateSphere") = TRUE) Jump AttackSphere; ELSE Jump Patrol; ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 IF (ShipsCount (TEAMSHIPS_G3HC) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate3Wave1AttackGate3Box", TRUE); VarCreateSet ("G_Gate3Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate3 box, filter, apply modifiers, and set the "AttackGate3Box" variable if force is strong enough ShipsClear (SHIPS_G3Wave1Found); ShipsClear (SHIPS_G3Wave1FighterFound); ShipsClear (SHIPS_G3Wave1CorvetteFound); ShipsClear (SHIPS_G3Wave1FrigateFound); ShipsClear (SHIPS_G3Wave1DestroyerFound); ShipsClear (SHIPS_G3Wave1CarrierFound); ShipsClear (SHIPS_G3Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave1Found, 100); ShipsSelectClass (SHIPS_G3Wave1FighterFound, SHIPS_G3Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G3Wave1CorvetteFound, SHIPS_G3Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G3Wave1FrigateFound, SHIPS_G3Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G3Wave1DestroyerFound, SHIPS_G3Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G3Wave1CarrierFound, SHIPS_G3Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G3Wave1CruiserFound, SHIPS_G3Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate3BoxFound", 62*(ShipsCount (SHIPS_G3Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G3Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G3Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G3Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G3Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G3Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate3BoxFound") > 2800) VarSet ("G_Gate3Wave1AttackGate3Box", TRUE); ELSE VarSet ("G_Gate3Wave1AttackGate3Box", FALSE); ENDIF // Find everyone inside the Gate3 sphere ShipsClear (SHIPS_G3Wave1GateFound); FindEnemiesInside (VOLUME_Gate3NearbySphere, SHIPS_G3Wave1GateFound, 100); VarCreateSet ("G_SHIPSG3Wave1GateFound", ShipsCount (SHIPS_G3Wave1GateFound)); IF (ShipsCount (SHIPS_G3Wave1GateFound) > 0) VarSet ("G_Gate3Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate3Wave1AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G3Int) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate3Wave1AttackGate3Box", TRUE); VarCreateSet ("G_Gate3Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate3 box, filter, apply modifiers, and set the "AttackGate3Box" variable if force is strong enough ShipsClear (SHIPS_G3Wave1Found); ShipsClear (SHIPS_G3Wave1FighterFound); ShipsClear (SHIPS_G3Wave1CorvetteFound); ShipsClear (SHIPS_G3Wave1FrigateFound); ShipsClear (SHIPS_G3Wave1DestroyerFound); ShipsClear (SHIPS_G3Wave1CarrierFound); ShipsClear (SHIPS_G3Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave1Found, 100); ShipsSelectClass (SHIPS_G3Wave1FighterFound, SHIPS_G3Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G3Wave1CorvetteFound, SHIPS_G3Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G3Wave1FrigateFound, SHIPS_G3Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G3Wave1DestroyerFound, SHIPS_G3Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G3Wave1CarrierFound, SHIPS_G3Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G3Wave1CruiserFound, SHIPS_G3Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate3BoxFound", 62*(ShipsCount (SHIPS_G3Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G3Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G3Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G3Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G3Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G3Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate3BoxFound") > 2800) VarSet ("G_Gate3Wave1AttackGate3Box", TRUE); ELSE VarSet ("G_Gate3Wave1AttackGate3Box", FALSE); ENDIF // Find everyone inside the Gate3 sphere ShipsClear (SHIPS_G3Wave1GateFound); FindEnemiesInside (VOLUME_Gate3NearbySphere, SHIPS_G3Wave1GateFound, 100); VarCreateSet ("G_SHIPSG3Wave1GateFound", ShipsCount (SHIPS_G3Wave1GateFound)); IF (ShipsCount (SHIPS_G3Wave1GateFound) > 0) VarSet ("G_Gate3Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate3Wave1AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G3Bomber) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate3Wave1AttackGate3Box", TRUE); VarCreateSet ("G_Gate3Wave1AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate3 box, filter, apply modifiers, and set the "AttackGate3Box" variable if force is strong enough ShipsClear (SHIPS_G3Wave1Found); ShipsClear (SHIPS_G3Wave1FighterFound); ShipsClear (SHIPS_G3Wave1CorvetteFound); ShipsClear (SHIPS_G3Wave1FrigateFound); ShipsClear (SHIPS_G3Wave1DestroyerFound); ShipsClear (SHIPS_G3Wave1CarrierFound); ShipsClear (SHIPS_G3Wave1CruiserFound); FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave1Found, 100); ShipsSelectClass (SHIPS_G3Wave1FighterFound, SHIPS_G3Wave1Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G3Wave1CorvetteFound, SHIPS_G3Wave1Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G3Wave1FrigateFound, SHIPS_G3Wave1Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G3Wave1DestroyerFound, SHIPS_G3Wave1Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G3Wave1CarrierFound, SHIPS_G3Wave1Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G3Wave1CruiserFound, SHIPS_G3Wave1Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave1Gate3BoxFound", 62*(ShipsCount (SHIPS_G3Wave1FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G3Wave1CorvetteFound)) +612*(ShipsCount (SHIPS_G3Wave1FrigateFound)) +1425*(ShipsCount (SHIPS_G3Wave1DestroyerFound)) +2000*(ShipsCount (SHIPS_G3Wave1CarrierFound)) +3700*(ShipsCount (SHIPS_G3Wave1Cruiserfound))); IF (VarGet ("G_TOTALWave1Gate3BoxFound") > 2800) VarSet ("G_Gate3Wave1AttackGate3Box", TRUE); ELSE VarSet ("G_Gate3Wave1AttackGate3Box", FALSE); ENDIF // Find everyone inside the Gate3 sphere ShipsClear (SHIPS_G3Wave1GateFound); FindEnemiesInside (VOLUME_Gate3NearbySphere, SHIPS_G3Wave1GateFound, 100); VarCreateSet ("G_SHIPSG3Wave1GateFound", ShipsCount (SHIPS_G3Wave1GateFound)); IF (ShipsCount (SHIPS_G3Wave1GateFound) > 0) VarSet ("G_Gate3Wave1AttackGateSphere", TRUE); ELSE VarSet ("G_Gate3Wave1AttackGateSphere", FALSE); ENDIF ENDIF // GATE 3, WAVE 2 IF (ShipsCount (TEAMSHIPS_G3Des) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate3Wave2AttackGate3Box", TRUE); VarCreateSet ("G_Gate3Wave2AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate3 box, filter, apply modifiers, and set the "AttackGate3Box" variable if force is strong enough ShipsClear (SHIPS_G3Wave2Found); ShipsClear (SHIPS_G3Wave2FighterFound); ShipsClear (SHIPS_G3Wave2CorvetteFound); ShipsClear (SHIPS_G3Wave2FrigateFound); ShipsClear (SHIPS_G3Wave2DestroyerFound); ShipsClear (SHIPS_G3Wave2CarrierFound); ShipsClear (SHIPS_G3Wave2CruiserFound); FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave2Found, 100); ShipsSelectClass (SHIPS_G3Wave2FighterFound, SHIPS_G3Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G3Wave2CorvetteFound, SHIPS_G3Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G3Wave2FrigateFound, SHIPS_G3Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G3Wave2DestroyerFound, SHIPS_G3Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G3Wave2CarrierFound, SHIPS_G3Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G3Wave2CruiserFound, SHIPS_G3Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate3BoxFound", 62*(ShipsCount (SHIPS_G3Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G3Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G3Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G3Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G3Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G3Wave2Cruiserfound))); IF (VarGet ("G_TOTALWave2Gate3BoxFound") > 2800) VarSet ("G_Gate3Wave2AttackGate3Box", TRUE); ELSE VarSet ("G_Gate3Wave2AttackGate3Box", FALSE); ENDIF // Find everyone inside the Gate3 sphere ShipsClear (SHIPS_G3Wave2GateFound); FindEnemiesInside (VOLUME_Gate3NearbySphere, SHIPS_G3Wave2GateFound, 100); VarCreateSet ("G_SHIPSG3Wave2GateFound", ShipsCount (SHIPS_G3Wave2GateFound)); IF (ShipsCount (SHIPS_G3Wave2GateFound) > 0) VarSet ("G_Gate3Wave2AttackGateSphere", TRUE); ELSE VarSet ("G_Gate3Wave2AttackGateSphere", FALSE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_G3MDes) > 0) // Create some variables IFONCE (TRUE) VarCreateSet ("G_Gate3Wave2AttackGate3Box", TRUE); VarCreateSet ("G_Gate3Wave2AttackGateSphere", TRUE); ENDIFONCE // Find everyone inside the Gate3 box, filter, apply modifiers, and set the "AttackGate3Box" variable if force is strong enough ShipsClear (SHIPS_G3Wave2Found); ShipsClear (SHIPS_G3Wave2FighterFound); ShipsClear (SHIPS_G3Wave2CorvetteFound); ShipsClear (SHIPS_G3Wave2FrigateFound); ShipsClear (SHIPS_G3Wave2DestroyerFound); ShipsClear (SHIPS_G3Wave2CarrierFound); ShipsClear (SHIPS_G3Wave2CruiserFound); FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave2Found, 100); ShipsSelectClass (SHIPS_G3Wave2FighterFound, SHIPS_G3Wave2Found, "CLASS_Fighter"); ShipsSelectClass (SHIPS_G3Wave2CorvetteFound, SHIPS_G3Wave2Found, "CLASS_Corvette"); ShipsSelectClass (SHIPS_G3Wave2FrigateFound, SHIPS_G3Wave2Found, "CLASS_Frigate"); ShipsSelectClass (SHIPS_G3Wave2DestroyerFound, SHIPS_G3Wave2Found, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_G3Wave2CarrierFound, SHIPS_G3Wave2Found, "CLASS_Carrier"); ShipsSelectClass (SHIPS_G3Wave2CruiserFound, SHIPS_G3Wave2Found, "CLASS_HeavyCruier"); VarSet ("G_TOTALWave2Gate3BoxFound", 62*(ShipsCount (SHIPS_G3Wave2FighterFound)) // Add up the value in RUs of all the ships in the volume +222*(ShipsCount (SHIPS_G3Wave2CorvetteFound)) +612*(ShipsCount (SHIPS_G3Wave2FrigateFound)) +1425*(ShipsCount (SHIPS_G3Wave2DestroyerFound)) +2000*(ShipsCount (SHIPS_G3Wave2CarrierFound)) +3700*(ShipsCount (SHIPS_G3Wave2Cruiserfound))); IF (VarGet ("G_TOTALWave2Gate3BoxFound") > 2800) VarSet ("G_Gate3Wave2AttackGate3Box", TRUE); ELSE VarSet ("G_Gate3Wave2AttackGate3Box", FALSE); ENDIF // Find everyone inside the Gate3 sphere ShipsClear (SHIPS_G3Wave2GateFound); FindEnemiesInside (VOLUME_Gate3NearbySphere, SHIPS_G3Wave2GateFound, 100); VarCreateSet ("G_SHIPSG3Wave2GateFound", ShipsCount (SHIPS_G3Wave2GateFound)); IF (ShipsCount (SHIPS_G3Wave2GateFound) > 0) VarSet ("G_Gate3Wave2AttackGateSphere", TRUE); ELSE VarSet ("G_Gate3Wave2AttackGateSphere", FALSE); ENDIF ENDIF // GATE 3, WAVE 1 - here's where you finally decide what to do IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) OR (ThisTeamIs (TEAM_G3SF)) ) IF (VarGet ("G_Gate3Wave1AttackGateSphere") = TRUE) Jump AttackSphere; ELSEIF (VarGet ("G_Gate3Wave1AttackGate3Box") = TRUE) Jump AttackBox; ELSE Jump Patrol; ENDIF ENDIF // GATE 3, WAVE 2 - here's where you finally decide what to do IF ( (ThisTeamIs (TEAM_G3Des)) OR (ThisTeamIs (TEAM_G3MDes)) ) IF (VarGet ("G_Gate3Wave2AttackGate3Box") = TRUE) Jump AttackBox; ELSEIF (VarGet ("G_Gate3Wave2AttackGateSphere") = TRUE) Jump AttackSphere; ELSE Jump Patrol; ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // GATE 2, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G2SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //---------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G1SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //---------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G3SF) > 0) Jump Dock; ENDIF ENDIF ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // GATE 2, WAVE 1 IF (ThisTeamIs (TEAM_G2HC)) PatrolPath (PATH_G2HCPath); ELSEIF (ThisTeamIs (TEAM_G2Int)) PatrolPath (PATH_G2IntPath); ELSEIF (ThisTeamIs (TEAM_G2Bomber)) PatrolPath (PATH_G2BomberPath); ELSEIF (ThisTeamIs (TEAM_G2SF)) PatrolPath (PATH_G2SFPath); Jump NullState; ENDIF // GATE 2, WAVE 2 IF (ThisTeamIs (TEAM_G2Des)) PatrolPath (PATH_G2DesPath); ELSEIF (ThisTeamIs (TEAM_G2MDes)) PatrolPath (PATH_G2MDesPath); ENDIF //------------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 IF (ThisTeamIs (TEAM_G1HC)) PatrolPath (PATH_G1HCPath); ELSEIF (ThisTeamIs (TEAM_G1Int)) PatrolPath (PATH_G1IntPath); ELSEIF (ThisTeamIs (TEAM_G1Bomber)) PatrolPath (PATH_G1BomberPath); ELSEIF (ThisTeamIs (TEAM_G1SF)) PatrolPath (PATH_G1SFPath); Jump NullState; ENDIF // GATE 1, WAVE 2 IF (ThisTeamIs (TEAM_G1Des)) PatrolPath (PATH_G1DesPath); ELSEIF (ThisTeamIs (TEAM_G1MDes)) PatrolPath (PATH_G1MDesPath); ENDIF //------------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 IF (ThisTeamIs (TEAM_G3HC)) PatrolPath (PATH_G3HCPath); ELSEIF (ThisTeamIs (TEAM_G3Int)) PatrolPath (PATH_G3IntPath); ELSEIF (ThisTeamIs (TEAM_G3Bomber)) PatrolPath (PATH_G3BomberPath); ELSEIF (ThisTeamIs (TEAM_G3SF)) PatrolPath (PATH_G3SFPath); Jump NullState; ENDIF // GATE 3, WAVE 2 IF (ThisTeamIs (TEAM_G3Des)) PatrolPath (PATH_G3DesPath); ELSEIF (ThisTeamIs (TEAM_G3MDes)) PatrolPath (PATH_G3MDesPath); ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // GATE 2, WAVE 1 volume checking IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) OR (ThisTeamIs (TEAM_G2SF)) ) IF ( (FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave1Found, 100)) OR (FindEnemiesInside (VOLUME_Gate2NearbySphere, SHIPS_G2Wave1GateFound, 100)) ) Jump Decide; ENDIF ENDIF // GATE 2, WAVE 2 volume checking IF ( (ThisTeamIs (TEAM_G2Des)) OR (ThisTeamIs (TEAM_G2MDes)) ) IF ( (FindEnemiesInside (VOLUME_Gate2Box, SHIPS_G2Wave2Found, 100)) OR (FindEnemiesInside (VOLUME_Gate2NearbySphere, SHIPS_G2Wave2GateFound, 100)) ) Jump Decide; ENDIF ENDIF // GATE 2, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G2SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 volume checking IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) OR (ThisTeamIs (TEAM_G1SF)) ) IF ( (FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave1Found, 100)) OR (FindEnemiesInside (VOLUME_Gate1NearbySphere, SHIPS_G1Wave1GateFound, 100)) ) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 2 volume checking IF ( (ThisTeamIs (TEAM_G1Des)) OR (ThisTeamIs (TEAM_G1MDes)) ) IF ( (FindEnemiesInside (VOLUME_Gate1Box, SHIPS_G1Wave2Found, 100)) OR (FindEnemiesInside (VOLUME_Gate1NearbySphere, SHIPS_G1Wave2GateFound, 100)) ) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G1SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 volume checking IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) OR (ThisTeamIs (TEAM_G3SF)) ) IF ( (FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave1Found, 100)) OR (FindEnemiesInside (VOLUME_Gate3NearbySphere, SHIPS_G3Wave1GateFound, 100)) ) Jump Decide; ENDIF ENDIF // GATE 3, WAVE 2 volume checking IF ( (ThisTeamIs (TEAM_G3Des)) OR (ThisTeamIs (TEAM_G3MDes)) ) IF ( (FindEnemiesInside (VOLUME_Gate3Box, SHIPS_G3Wave2Found, 100)) OR (FindEnemiesInside (VOLUME_Gate3NearbySphere, SHIPS_G3Wave2GateFound, 100)) ) Jump Decide; ENDIF ENDIF // GATE 3, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G3SF) > 0) Jump Dock; ENDIF ENDIF ENDIF ENDWATCH ENDSTATE Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackBox //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // GATE 2, WAVE 1 IF (ThisTeamIs (TEAM_G2HC)) ShipsClear (SHIPS_Gate2Wave1HCTargets); VarCreateSet ("G_SHIPSG2Wave1Found", ShipsCount (SHIPS_G2Wave1Found)); IF (ShipsSelectType (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1Found, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate2Wave1HCTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave1HCTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Int)) VarCreateSet ("G_SHIPSG2Wave1Found", ShipsCount (SHIPS_G2Wave1Found)); ShipsClear (SHIPS_Gate2Wave1IntTargets); IF (ShipsSelectType (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1Found, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1Found, "CLASS_Destroyer")) ELSE ShipsAdd (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate2Wave1IntTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave1IntTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Bomber)) VarCreateSet ("G_SHIPSG2Wave1Found", ShipsCount (SHIPS_G2Wave1Found)); ShipsClear (SHIPS_Gate2Wave1BomTargets); IF (ShipsSelectType (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1Found, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1Found, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1Found, "CLASS_HeavyCruiser")) ELSE ShipsAdd (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate2Wave1BomTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave1BomTargets); ELSE Jump Decide; ENDIF ENDIF // GATE 2, WAVE 2 IF (ThisTeamIs (TEAM_G2Des)) ShipsClear (SHIPS_Gate2Wave2DesTargets); VarCreateSet ("G_SHIPSG2Wave2Found", ShipsCount (SHIPS_G2Wave2Found)); IF (ShipsSelectType (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2Found, "CLASS_HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2Found, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2Found); ENDIF IF (ShipsCount (SHIPS_Gate2Wave2DesTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave2DesTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2MDes)) VarCreateSet ("G_SHIPSG2Wave2Found", ShipsCount (SHIPS_G2Wave2Found)); ShipsClear (SHIPS_Gate2Wave2MDesTargets); IF (ShipsSelectType (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2Found, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2Found); ENDIF IF (ShipsCount (SHIPS_Gate2Wave2MDesTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave2MDesTargets); ELSE Jump Decide; ENDIF ENDIF //---------------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 IF (ThisTeamIs (TEAM_G1HC)) ShipsClear (SHIPS_Gate1Wave1HCTargets); VarCreateSet ("G_SHIPSG1Wave1Found", ShipsCount (SHIPS_G1Wave1Found)); IF (ShipsSelectType (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1Found, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate1Wave1HCTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave1HCTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Int)) VarCreateSet ("G_SHIPSG1Wave1Found", ShipsCount (SHIPS_G1Wave1Found)); ShipsClear (SHIPS_Gate1Wave1IntTargets); IF (ShipsSelectType (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1Found, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1Found, "CLASS_Destroyer")) ELSE ShipsAdd (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate1Wave1IntTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave1IntTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Bomber)) VarCreateSet ("G_SHIPSG1Wave1Found", ShipsCount (SHIPS_G1Wave1Found)); ShipsClear (SHIPS_Gate1Wave1BomTargets); IF (ShipsSelectType (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1Found, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1Found, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1Found, "CLASS_HeavyCruiser")) ELSE ShipsAdd (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate1Wave1BomTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave1BomTargets); ELSE Jump Decide; ENDIF ENDIF // GATE 1, WAVE 2 IF (ThisTeamIs (TEAM_G1Des)) ShipsClear (SHIPS_Gate1Wave2DesTargets); VarCreateSet ("G_SHIPSG1Wave2Found", ShipsCount (SHIPS_G1Wave2Found)); IF (ShipsSelectType (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2Found, "CLASS_HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2Found, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2Found); ENDIF IF (ShipsCount (SHIPS_Gate1Wave2DesTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave2DesTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1MDes)) VarCreateSet ("G_SHIPSG1Wave2Found", ShipsCount (SHIPS_G1Wave2Found)); ShipsClear (SHIPS_Gate1Wave2MDesTargets); IF (ShipsSelectType (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2Found, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2Found); ENDIF IF (ShipsCount (SHIPS_Gate1Wave2MDesTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave2MDesTargets); ELSE Jump Decide; ENDIF ENDIF //---------------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 IF (ThisTeamIs (TEAM_G3HC)) ShipsClear (SHIPS_Gate3Wave1HCTargets); VarCreateSet ("G_SHIPSG3Wave1Found", ShipsCount (SHIPS_G3Wave1Found)); IF (ShipsSelectType (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1Found, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate3Wave1HCTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave1HCTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Int)) VarCreateSet ("G_SHIPSG3Wave1Found", ShipsCount (SHIPS_G3Wave1Found)); ShipsClear (SHIPS_Gate3Wave1IntTargets); IF (ShipsSelectType (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1Found, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1Found, "CLASS_Destroyer")) ELSE ShipsAdd (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate3Wave1IntTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave1IntTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Bomber)) VarCreateSet ("G_SHIPSG3Wave1Found", ShipsCount (SHIPS_G3Wave1Found)); ShipsClear (SHIPS_Gate3Wave1BomTargets); IF (ShipsSelectType (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1Found, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1Found, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1Found, "CLASS_HeavyCruiser")) ELSE ShipsAdd (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1Found); ENDIF IF (ShipsCount (SHIPS_Gate3Wave1BomTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave1BomTargets); ELSE Jump Decide; ENDIF ENDIF // GATE 3, WAVE 2 IF (ThisTeamIs (TEAM_G3Des)) ShipsClear (SHIPS_Gate3Wave2DesTargets); VarCreateSet ("G_SHIPSG3Wave2Found", ShipsCount (SHIPS_G3Wave2Found)); IF (ShipsSelectType (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2Found, "CLASS_HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2Found, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2Found); ENDIF IF (ShipsCount (SHIPS_Gate3Wave2DesTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave2DesTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3MDes)) VarCreateSet ("G_SHIPSG3Wave2Found", ShipsCount (SHIPS_G3Wave2Found)); ShipsClear (SHIPS_Gate3Wave2MDesTargets); IF (ShipsSelectType (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2Found, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2Found, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2Found, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2Found, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2Found); ENDIF IF (ShipsCount (SHIPS_Gate3Wave2MDesTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave2MDesTargets); ELSE Jump Decide; ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // GATE 2, WAVE 1 IF (ThisTeamIs (TEAM_G2HC)) IF ( (ShipsCount (SHIPS_Gate2Wave1HCTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2HC) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Int)) IF ( (ShipsCount (SHIPS_Gate2Wave1IntTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2Int) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Bomber)) IF ( (ShipsCount (SHIPS_Gate2Wave1BomTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2Bomber) != 2) ) Jump Decide; ENDIF ENDIF // GATE 2, WAVE 2 IF (ThisTeamIs (TEAM_G2Des)) IF ( (ShipsCount (SHIPS_Gate2Wave2DesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2Des) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2MDes)) IF ( (ShipsCount (SHIPS_Gate2Wave2MDesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2MDes) != 2) ) Jump Decide; ENDIF ENDIF // GATE 2, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G2SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 IF (ThisTeamIs (TEAM_G1HC)) IF ( (ShipsCount (SHIPS_Gate1Wave1HCTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1HC) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Int)) IF ( (ShipsCount (SHIPS_Gate1Wave1IntTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1Int) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Bomber)) IF ( (ShipsCount (SHIPS_Gate1Wave1BomTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1Bomber) != 2) ) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 2 IF (ThisTeamIs (TEAM_G1Des)) IF ( (ShipsCount (SHIPS_Gate1Wave2DesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1Des) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1MDes)) IF ( (ShipsCount (SHIPS_Gate1Wave2MDesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1MDes) != 2) ) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G1SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 IF (ThisTeamIs (TEAM_G3HC)) IF ( (ShipsCount (SHIPS_Gate3Wave1HCTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3HC) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Int)) IF ( (ShipsCount (SHIPS_Gate3Wave1IntTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3Int) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Bomber)) IF ( (ShipsCount (SHIPS_Gate3Wave1BomTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3Bomber) != 2) ) Jump Decide; ENDIF ENDIF // GATE 3, WAVE 2 IF (ThisTeamIs (TEAM_G3Des)) IF ( (ShipsCount (SHIPS_Gate3Wave2DesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3Des) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3MDes)) IF ( (ShipsCount (SHIPS_Gate3Wave2MDesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3MDes) != 2) ) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G3SF) > 0) Jump Dock; ENDIF ENDIF ENDIF ENDWATCH ENDSTATE AttackBox //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackSphere //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // GATE 2, WAVE 1 IF (ThisTeamIs (TEAM_G2HC)) ShipsClear (SHIPS_Gate2Wave1HCTargets); IF (ShipsSelectType (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1GateFound, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate2Wave1HCTargets, SHIPS_G2Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate2Wave1HCTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave1HCTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Int)) ShipsClear (SHIPS_Gate2Wave1IntTargets); IF (ShipsSelectType (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1GateFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1GateFound, "CLASS_Destroyer")) ELSE ShipsAdd (SHIPS_Gate2Wave1IntTargets, SHIPS_G2Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate2Wave1IntTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave1IntTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Bomber)) ShipsClear (SHIPS_Gate2Wave1BomTargets); IF (ShipsSelectType (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1GateFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1GateFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1GateFound, "CLASS_HeavyCruiser")) ELSE ShipsAdd (SHIPS_Gate2Wave1BomTargets, SHIPS_G2Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate2Wave1BomTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave1BomTargets); ELSE Jump Decide; ENDIF ENDIF // GATE 2, WAVE 2 IF (ThisTeamIs (TEAM_G2Des)) ShipsClear (SHIPS_Gate2Wave2DesTargets); IF (ShipsSelectType (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2GateFound, "CLASS_HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2GateFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate2Wave2DesTargets, SHIPS_G2Wave2GateFound); ENDIF IF (ShipsCount (SHIPS_Gate2Wave2DesTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave2DesTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2MDes)) ShipsClear (SHIPS_Gate2Wave2MDesTargets); IF (ShipsSelectType (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2GateFound, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate2Wave2MDesTargets, SHIPS_G2Wave2GateFound); ENDIF IF (ShipsCount (SHIPS_Gate2Wave2MDesTargets) > 0) Stop (); Attack (SHIPS_Gate2Wave2MDesTargets); ELSE Jump Decide; ENDIF ENDIF //--------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 IF (ThisTeamIs (TEAM_G1HC)) ShipsClear (SHIPS_Gate1Wave1HCTargets); IF (ShipsSelectType (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1GateFound, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate1Wave1HCTargets, SHIPS_G1Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate1Wave1HCTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave1HCTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Int)) ShipsClear (SHIPS_Gate1Wave1IntTargets); IF (ShipsSelectType (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1GateFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1GateFound, "CLASS_Destroyer")) ELSE ShipsAdd (SHIPS_Gate1Wave1IntTargets, SHIPS_G1Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate1Wave1IntTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave1IntTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Bomber)) ShipsClear (SHIPS_Gate1Wave1BomTargets); IF (ShipsSelectType (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1GateFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1GateFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1GateFound, "CLASS_HeavyCruiser")) ELSE ShipsAdd (SHIPS_Gate1Wave1BomTargets, SHIPS_G1Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate1Wave1BomTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave1BomTargets); ELSE Jump Decide; ENDIF ENDIF // GATE 1, WAVE 2 IF (ThisTeamIs (TEAM_G1Des)) ShipsClear (SHIPS_Gate1Wave2DesTargets); IF (ShipsSelectType (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2GateFound, "CLASS_HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2GateFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate1Wave2DesTargets, SHIPS_G1Wave2GateFound); ENDIF IF (ShipsCount (SHIPS_Gate1Wave2DesTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave2DesTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1MDes)) ShipsClear (SHIPS_Gate1Wave2MDesTargets); IF (ShipsSelectType (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2GateFound, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate1Wave2MDesTargets, SHIPS_G1Wave2GateFound); ENDIF IF (ShipsCount (SHIPS_Gate1Wave2MDesTargets) > 0) Stop (); Attack (SHIPS_Gate1Wave2MDesTargets); ELSE Jump Decide; ENDIF ENDIF //--------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 IF (ThisTeamIs (TEAM_G3HC)) ShipsClear (SHIPS_Gate3Wave1HCTargets); IF (ShipsSelectType (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1GateFound, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate3Wave1HCTargets, SHIPS_G3Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate3Wave1HCTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave1HCTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Int)) ShipsClear (SHIPS_Gate3Wave1IntTargets); IF (ShipsSelectType (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1GateFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1GateFound, "CLASS_Destroyer")) ELSE ShipsAdd (SHIPS_Gate3Wave1IntTargets, SHIPS_G3Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate3Wave1IntTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave1IntTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Bomber)) ShipsClear (SHIPS_Gate3Wave1BomTargets); IF (ShipsSelectType (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1GateFound, "CLASS_Frigate")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1GateFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1GateFound, "CLASS_HeavyCruiser")) ELSE ShipsAdd (SHIPS_Gate3Wave1BomTargets, SHIPS_G3Wave1GateFound); ENDIF IF (ShipsCount (SHIPS_Gate3Wave1BomTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave1BomTargets); ELSE Jump Decide; ENDIF ENDIF // GATE 3, WAVE 2 IF (ThisTeamIs (TEAM_G3Des)) ShipsClear (SHIPS_Gate3Wave2DesTargets); IF (ShipsSelectType (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2GateFound, "CLASS_HeavyCruiser")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2GateFound, "CLASS_Destroyer")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate3Wave2DesTargets, SHIPS_G3Wave2GateFound); ENDIF IF (ShipsCount (SHIPS_Gate3Wave2DesTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave2DesTargets); ELSE Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3MDes)) ShipsClear (SHIPS_Gate3Wave2MDesTargets); IF (ShipsSelectType (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2GateFound, "SalCapCorvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2GateFound, "CLASS_Fighter")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2GateFound, "CLASS_Corvette")) ELSEIF (ShipsSelectClass (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2GateFound, "CLASS_Frigate")) ELSE ShipsAdd (SHIPS_Gate3Wave2MDesTargets, SHIPS_G3Wave2GateFound); ENDIF IF (ShipsCount (SHIPS_Gate3Wave2MDesTargets) > 0) Stop (); Attack (SHIPS_Gate3Wave2MDesTargets); ELSE Jump Decide; ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // GATE 2, WAVE 1 IF (ThisTeamIs (TEAM_G2HC)) IF ( (ShipsCount (SHIPS_Gate2Wave1HCTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2HC) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Int)) IF ( (ShipsCount (SHIPS_Gate2Wave1IntTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2Int) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2Bomber)) IF ( (ShipsCount (SHIPS_Gate2Wave1BomTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2Bomber) != 2) ) Jump Decide; ENDIF ENDIF // GATE 2, WAVE 2 IF (ThisTeamIs (TEAM_G2Des)) IF ( (ShipsCount (SHIPS_Gate2Wave2DesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2Des) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G2MDes)) IF ( (ShipsCount (SHIPS_Gate2Wave2MDesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G2MDes) != 2) ) Jump Decide; ENDIF ENDIF // GATE 2, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G2SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 IF (ThisTeamIs (TEAM_G1HC)) IF ( (ShipsCount (SHIPS_Gate1Wave1HCTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1HC) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Int)) IF ( (ShipsCount (SHIPS_Gate1Wave1IntTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1Int) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1Bomber)) IF ( (ShipsCount (SHIPS_Gate1Wave1BomTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1Bomber) != 2) ) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 2 IF (ThisTeamIs (TEAM_G1Des)) IF ( (ShipsCount (SHIPS_Gate1Wave2DesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1Des) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G1MDes)) IF ( (ShipsCount (SHIPS_Gate1Wave2MDesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G1MDes) != 2) ) Jump Decide; ENDIF ENDIF // GATE 1, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G1SF) > 0) Jump Dock; ENDIF ENDIF ENDIF //-------------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 IF (ThisTeamIs (TEAM_G3HC)) IF ( (ShipsCount (SHIPS_Gate3Wave1HCTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3HC) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Int)) IF ( (ShipsCount (SHIPS_Gate3Wave1IntTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3Int) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3Bomber)) IF ( (ShipsCount (SHIPS_Gate3Wave1BomTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3Bomber) != 2) ) Jump Decide; ENDIF ENDIF // GATE 3, WAVE 2 IF (ThisTeamIs (TEAM_G3Des)) IF ( (ShipsCount (SHIPS_Gate3Wave2DesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3Des) != 2) ) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_G3MDes)) IF ( (ShipsCount (SHIPS_Gate3Wave2MDesTargets) = 0) OR (ShipsOrder (TEAMSHIPS_G3MDes) != 2) ) Jump Decide; ENDIF ENDIF // GATE 3, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) ) IF ( (TeamFuelLowest () < 30) OR (TeamHealthAverage () < 40) ) // If you are low on fuel or health, dock IF (ShipsCount (TEAMSHIPS_G3SF) > 0) Jump Dock; ENDIF ENDIF ENDIF ENDWATCH ENDSTATE AttackSphere //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // GATE 2, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G2HC)) OR (ThisTeamIs (TEAM_G2Int)) OR (ThisTeamIs (TEAM_G2Bomber)) ) Stop (); DockStay (TEAM_G2SF); ENDIF //------------------------------------------------------------------------------------------------------------------- // GATE 1, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G1HC)) OR (ThisTeamIs (TEAM_G1Int)) OR (ThisTeamIs (TEAM_G1Bomber)) ) Stop (); DockStay (TEAM_G1SF); ENDIF //------------------------------------------------------------------------------------------------------------------- // GATE 3, WAVE 1 docking IF ( (ThisTeamIs (TEAM_G3HC)) OR (ThisTeamIs (TEAM_G3Int)) OR (ThisTeamIs (TEAM_G3Bomber)) ) Stop (); DockStay (TEAM_G3SF); ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TeamDockedReadyForLaunch ()) Jump Launch; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TeamFinishedLaunching ()) Jump Decide; ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM HyperspaceGateTeam //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ HyperspaceGateTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ DummyController ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM DummyController States Null; INIT Jump Null; ENDINIT WATCH ENDWATCH STATE Null //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE Null //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM DummyController //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ DummyController ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ Global Stuff ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ INIT //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // FSM creates // FSMCreate (FleetIntel, TEAM_FleetIntel); FSMCreate (MiningBase, TEAM_MiningBase); // The Mining Base.. err.. hyperspace inhibitor.. itself FSMCreate (AIShips, TEAM_CPUCarrier); // An AI-controlled Carrier which does only Defensive moves FSMCreate (AIShips, TEAM_CPUCollector); // Two AI-controlled Collectors FSMCreate (IonSphere, TEAM_IonSphere); // The deadly sphere of 300+ Ion Cannon Frigates FSMCreate (RoamingMG, TEAM_RoamingMG); // Roaming team of MultiGun corvettes who attack anyone that is attacking the Ion Frigates FSMCreate (ProxDeath, TEAM_ProxScout); // Team of Scouts that scour the world for Proximity Sensors FSMCreate (ProxDeath, TEAM_ProxInt); // Team of Interceptors that scour the world for Proximity Sensors (back up the Scouts) FSMCreate (InnerDefenseTeam, TEAM_InnerCruiser); // Cruiser that sits in the Inner Sphere with a bunch of CloakGens FSMCreate (InnerDefenseTeam, TEAM_InnerDestroyer1); // Destroyer that sits above the MiningBase and doggedly protects it; also cloaked FSMCreate (InnerDefenseTeam, TEAM_InnerDestroyer2); // Destroyers that sit below the MiningBase; also cloaked FSMCreate (InnerCloakingTeam, TEAM_CloakACruiser); // Cloak Generator which hides the Cruiser FSMCreate (InnerCloakingTeam, TEAM_CloakBCruiser); // Cloak Generator which hides the Cruiser FSMCreate (InnerCloakingTeam, TEAM_CloakADestroyer1); // Cloak Generator which hides Destroyer1 FSMCreate (InnerCloakingTeam, TEAM_CloakBDestroyer1); // Cloak Generator which hides Destroyer1 FSMCreate (InnerCloakingTeam, TEAM_CloakADestroyer2); // Cloak Generator which hides Destroyer2 FSMCreate (InnerCloakingTeam, TEAM_CloakBDestroyer2); // Cloak Generator which hides Destroyer2 //FSMCreate (InnerCloakingTeam, TEAM_CloakACarrier); // Cloak Generator which hides the Carrier //FSMCreate (InnerCloakingTeam, TEAM_CloakBCarrier); // Cloak Generator which hides the Carrier FSMCreate (HyperspaceGateTeam, TEAM_G2HC); // GATE 2, Wave 1 - Heavy Corvette group FSMCreate (HyperspaceGateTeam, TEAM_G2Int); // GATE 2, Wave 1 - Interceptor sphere designed to take out Frigates FSMCreate (HyperspaceGateTeam, TEAM_G2Bomber); // GATE 2, Wave 1 - Attack Bomber group FSMCreate (HyperspaceGateTeam, TEAM_G2SF); // GATE 2, Wave 1 - Support Frigate group; just hang out near the gate and repair Strike Craft FSMCreate (HyperspaceGateTeam, TEAM_G2Des); // GATE 2, Wave 2 - Destroyers FSMCreate (HyperspaceGateTeam, TEAM_G2MDes); // GATE 2, Wave 2 - Missile Destroyer FSMCreate (HyperspaceGateTeam, TEAM_G1HC); // GATE 1, Wave 1 - Heavy Corvette group FSMCreate (HyperspaceGateTeam, TEAM_G1Int); // GATE 1, Wave 1 - Interceptor sphere designed to take out Frigates FSMCreate (HyperspaceGateTeam, TEAM_G1Bomber); // GATE 1, Wave 1 - Attack Bomber group FSMCreate (HyperspaceGateTeam, TEAM_G1SF); // GATE 1, Wave 1 - Support Frigate group; just hang out near the gate and repair Strike Craft FSMCreate (HyperspaceGateTeam, TEAM_G1Des); // GATE 1, Wave 2 - Destroyers FSMCreate (HyperspaceGateTeam, TEAM_G1MDes); // GATE 1, Wave 2 - Missile Destroyer FSMCreate (HyperspaceGateTeam, TEAM_G3HC); // GATE 3, Wave 1 - Heavy Corvette group FSMCreate (HyperspaceGateTeam, TEAM_G3Int); // GATE 3, Wave 1 - Interceptor sphere designed to take out Frigates FSMCreate (HyperspaceGateTeam, TEAM_G3Bomber); // GATE 3, Wave 1 - Attack Bomber group FSMCreate (HyperspaceGateTeam, TEAM_G3SF); // GATE 3, Wave 1 - Support Frigate group; just hang out near the gate and repair Strike Craft FSMCreate (HyperspaceGateTeam, TEAM_G3Des); // GATE 3, Wave 2 - Destroyers FSMCreate (HyperspaceGateTeam, TEAM_G3MDes); // GATE 3, Wave 2 - Missile Destroyer FSMCreate (DummyController, TEAM_DummyController); // Dummy team used for centering the NIS around FSMCreate (HiddenDummy, TEAM_HiddenDummy); // Dummy team used for keeping the ion sphere in position - they unhide it, then guard it, then hide it again //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // mission objectives // // TEMPORARY - Create hyperspace objective right away so you can hyperspace through the game //ObjectiveCreate ("Hyperspace", LSTRING_Hyperspace, LSTRING_Hyperspace); //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // AI stuffs // // Set all the AI Features BuildControl(TRUE); DisableAllAIFeatures (); EnableAIFeature (4, 0); // active Resource Controller EnableAIFeature (10, 0); // RESOURCE feature: resource ships under fire send distress signals (NOTE: only active guard and temp guard react to distress signals) EnableAIFeature (200, 0); // RESOURCE feature: resource collectors are requested depending on need, rather than random number EnableAIFeature (800, 0); // RESOURCE feature: support frigates are requested EnableAIFeature (1000, 0); // RESOURCE feature: resource ships are put into aggressive mode EnableAIFeature (1, 1); // DEFENSE feature: guard teams are created - default to small teams in spherical formation around resource ships EnableAIFeature (2, 1); // DEFENSE feature: guard teams are larger and roam around. React to distress signals and invasion of sphere of influence EnableAIFeature (4, 1); // DEFENSE feature: enemy ships within a certain distance away from the mothership are considered invaders and dealth with (NOTE: only active guard and temp guard react to invaders) EnableAIFeature (10, 1); // DEFENSE feature: mothership defense is activated - this option causes idle ships to defend the mothership EnableAIFeature (20, 1); // DEFENSE feature: guard and active guard teams also get recalled and defend the mothership EnableAIFeature (40, 1); // DEFENSE feature: all ships in the computer player's fleet available get recalled and defend the mothership EnableAIFeature (100, 1); // DEFENSE feature: minimal cloak defense - if any cloak capable ship is detected, the computer player builds a few proximity sensors EnableAIFeature (200, 1); // DEFENSE feature: more rigorous cloaking defense - if any cloak capable ship is detected within the sphere of influence, more proximity sensors are pumped out and roam around //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ SaveLevel(14, LSTRING_Savegame); ENDINIT WATCH //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // location card // IFONCE (TRUE) TimerCreateSetStart ("LocationCardTimer", 1); ENDIFONCE IF (TimerExpiredDestroy ("LocationCardTimer")) LocationCard (5000, LSTRING_LocationCard); ENDIF //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // FSM creates // //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // NIS's // // n10 - when the ships penetrate, start the widescreen IF (NOT VarGet("G_PlayedNis") AND FindEnemiesInside (VOLUME_NISVolume, SHIPS_nisVolumeFOUND, 13000)) TimerCreateSetStart ("WideScreenInBeforeNIS", 5); wideScreenIn(90); //90 frames == 3 seconds VarCreateSet("G_PlayedNis", TRUE); ENDIF // n10 - after the widescreen is done, play the NIS IF (TimerExpiredDestroy("WideScreenInBeforeNIS")) ShipsAdd (SHIPS_NisCentreShip, TEAMSHIPS_DummyController); HideShips (TEAMSHIPS_DummyController); // To be hidden and never seen again HideShips (TEAMSHIPS_MiningBase); // To be hidden and unhidden after the NIS VarCreateSet ("G_PlayNis", 10); VarCreateSet ("G_NISPlayingNow", TRUE); PauseUniverse(); ENDIF // whent the NIS is done, unpause the universe IFONCE (VarGet ("G_Nis10Complete")) VarDestroy ("G_NISPlayingNow"); UnhideShips (TEAMSHIPS_MiningBase); UnpauseUniverse(); ENDIFONCE // create the timer to play the NISLet - TEMPORARY, HACK //IFONCE (TRUE) // TimerCreateSetStart ("G_PlayNISLetNow", 45); //ENDIFONCE // m14a - when the timer is up, start the widescreen //IF (TimerExpiredDestroy ("G_PlayNISLetNow")) // TimerCreateSetStart ("WideScreenInBeforeNISLet", 5); // wideScreenIn(90); //90 frames == 3 seconds //ENDIF // m14a - after the widescreen is done, play the NIS //IF (TimerExpiredDestroy("WideScreenInBeforeNISLet")) // VarCreateSet ("G_PlayNislet", 151); //ENDIF //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // fleet intel // //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // AI stuffs // //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // in-game events // // When you come out of hyperspace, start a timer to trigger an in-game Fleet Command event which talks about the jump IFONCE (TRUE) TimerCreateSetStart ("G_FCHyperspaceSuccessful", 5); ENDIFONCE // create the timer to play the research event for Sensors Array tech IFONCE (TRUE) TimerCreateSetStart ("G_PlaySensorArrayTechEvent", Random (180, 250)); ENDIFONCE // when the NIS is over, set a timer to play the FI event about the hyperspace gates going active IFONCE (VarGet ("G_Nis10Complete")) //TimerCreateSetStart ("G_PlayHyperspaceGateEvent", Random (45, 85)); ENDIFONCE //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // mission objectives // // if the Fleet Intel intro is playing, create the initial objectives: IFONCE (VarGet ("G_FleetIntelIntroHasPlayed") = TRUE) ObjectiveCreate ("DestroyGenny", LSTRING_FIDestroyGennyTASKBAR, LSTRING_FIDestroyGennyTASKBAR); ENDIFONCE // if the player destroys the Mining Base, the "DestroyGenny" objective is met IFONCE (ShipsCount (TEAMSHIPS_MiningBase) = 0) ObjectiveSet ("DestroyGenny", TRUE); PingRemove ("MiningBasePING"); ENDIFONCE // if the FI event about the hyperspace gates has played, create the DestroyGates objective IFONCE (VarGet ("G_FIDestroyGatesHasPlayed") = TRUE) ObjectiveCreateSecondary ("DestroyGates", LSTRING_FIDestroyGatesTASKBAR, LSTRING_FIDestroyGatesTASKBAR); ENDIFONCE // if the player destroys the Hyperspace gates, the "DestroyGates" objectives are met IFONCE ( (VarGet ("G_GATE1") < 0) AND (VarGet ("G_GATE2") < 0) AND (VarGet ("G_GATE3") < 0) ) ObjectiveSet ("DestroyGates", TRUE); PingRemove ("GATE1PING"); PingRemove ("GATE2PING"); PingRemove ("GATE3PING"); ENDIFONCE // if all primary objectives are complete, start a timer to create the HYPERSPACE objective IFONCE (ObjectiveGet ("DestroyGenny") = TRUE) TimerCreateSetStart ("G_AllObjectivesComplete", 4); ENDIFONCE // when the timer's up, create the HYPERSPACE objective and the ReadyToHYPERSPACE variable (which tells other parts of the script to do stuff) IFONCE (VarGet ("G_TakeUsHomeEventHasPlayed") = TRUE) ObjectiveCreate ("Hyperspace", LSTRING_Hyperspace, LSTRING_Hyperspace); ENDIFONCE //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // technology // // MISSION 14 Tech stuff: //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // when the event talking about sensor tech plays, allow the player to research it IFONCE (VarGet ("G_SensorTechEventHasPlayed") = TRUE) TechSetResearch ("SensorsArrayTech"); ENDIFONCE // MISSION 02 Tech stuff: //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // if player researches Corvette drive, allow Corvette chassis // (Build: Light Corvette) IFONCE (TechGet ("MassDrive10Kt")) TechSetResearch ("Chassis2"); ENDIFONCE // if player researches Corvette chassis, allow Heavy Corvette upgrade // (Build: Heavy Corvette) IF ((TechGet ("Chassis2")) AND (VarGet ("SetMediumGuns") = FALSE)) TechSetResearch ("MediumGuns"); VarCreateSet ("SetMediumGuns", TRUE); ENDIF // MISSION 01 Tech stuff: //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // if player researches Fighter chassis, allow Corvette Drive // (Build: Repair Corvette) IFONCE (TechGet ("Chassis1")) TechSetResearch ("MassDrive10Kt"); ENDIFONCE //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDWATCH //ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ Global Stuff ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ