// // MISSION12 - Elite Guard Trap // #include "..\\Game\\speechevent.h" #include "..\\Game\\soundmusic.h" LOCALIZATION //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LSTRING_Savegame "12 - Galactic Core" "12 - Noyau Galactique" "12 - Galaktischer Kern" "12 - El centro de la galaxia" "12 - Il cuore della galassia" LSTRING_LocationCard "GALACTIC CORE" "NOYAU GALACTIQUE" "GALAKTISCHER KERN" "EL CENTRO DE LA GALAXIA" "IL CUORE DELLA GALASSIA" LSTRING_FICaughtInFieldTASKBAR "Destroy source of gravity field" "Destruction de la source du champ de gravité" "Quelle des Gravitationsfeldes vernichten." "Destruir la fuente del campo gravitatorio" "Distruggi la fonte del campo gravitazionale" LSTRING_FIUnderAttackTASKBAR "Protect the Fleet" "Protection de la Flotte" "Die Flotte schützen." "Proteger la flota" "Progetta la flotta" LSTRING_FIHelpDefectorTASKBAR "Protect the Defector" "Protection du Transfuge" "Den Überläufer schützen." "Proteger el deflector" "Proteggi il Defector" LSTRING_Hyperspace " HYPERSPACE" " HYPERESPACE" " HYPERRAUMSPRUNG" " HIPERESPACIO" " IPERSPAZIO" ENDL //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FleetIntel ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM FleetIntel States FCIntro, FICaughtInField, FIUnderAttack, FIMissileTechReady, FINewFighterTech, FocusOnDefector, DefectorHelpMe, DefectorHelpMe2, FIHelpDefector, FIDefectorOnBoard, FIIdle; INIT Jump FIIdle; // Go immediately to FIIdle ENDINIT WATCH ENDWATCH STATE FCIntro //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M12_Fleet_HyperspaceDisengaged, 0); // Dropping out of hyperspace. All systems online. VarCreateSet ("G_GoGravWells", TRUE); //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (0, 4000, LSTRING_FCIntro); // Dropping out of hyperspace. All systems online. ENDINIT WATCH IF (IntelEventEnded ()) Jump FICaughtInField; ENDIF ENDWATCH ENDSTATE FCIntro //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FICaughtInField //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M12_Intel_DestroyGravWell, 0); // We are caught in a gravity well. Fighters and Corvettes will be unable to move. Seek out the source of this field and destroy it. //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (4, 4000, LSTRING_FICaughtInField); // We are caught in a gravity well. Fighters and Corvettes will be unable to move. Seek out the source of this field and destroy it. MusicPlay (B04_EvilEmpire); ENDINIT WATCH IF (IntelEventEnded ()) IFONCE (TRUE) VarCreateSet ("G_FleetIntelIntroHasPlayed", TRUE); ENDIFONCE VarDestroy ("G_CLICK_DestroyField"); Jump FIIdle; ENDIF ENDWATCH ENDSTATE FICaughtInField //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIUnderAttack //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FIPlayerShips, 3000); // Determine if the player has Strike Craft ShipsSelectClass (SHIPS_FIPlayerFighters, SHIPS_FIPlayerShips, "CLASS_Fighter"); ShipsSelectClass (SHIPS_FIPlayerCorvettes, SHIPS_FIPlayerShips, "CLASS_Corvette"); ShipsAdd (SHIPS_FIPlayerStrikeCraft, SHIPS_FIPlayerFighters); ShipsAdd (SHIPS_FIPlayerStrikeCraft, SHIPS_FIPlayerCorvettes); IF (ShipsCount (SHIPS_FIPlayerStrikeCraft) > 0) // if the player has Strike Craft, play the strikecraft event IF (RaceOfHuman () = 0) SpeechEvent (M12_Intel_UnderAttackKushan, 0); // We are under attack by Taiidan forces. They are concentrating fire on our immobilized Strike Craft. ELSEIF (RaceOfHuman () = 1) SpeechEvent (M12_Intel_UnderAttackTaiidan, 0); // We are under attack by Kushan forces. They are concentrating fire on our immobilized Strike Craft. ENDIF ELSE // otherwise, play the non-Strike craft event IF (RaceOfHuman () = 0) SpeechEvent (M12_Intel_UnderAttackKushanSHORT, 0); // We are under attack by Taiidan forces. They are concentrating fire on our immobilized Strike Craft. ELSEIF (RaceOfHuman () = 1) SpeechEvent (M12_Intel_UnderAttackTaiidanSHORT, 0); // We are under attack by Kushan forces. They are concentrating fire on our immobilized Strike Craft. ENDIF ENDIF ENDINIT WATCH IF (IntelEventEnded ()) IFONCE (TRUE) VarCreateSet ("G_UnderAttackHasPlayed", TRUE); ENDIFONCE VarDestroy ("G_CLICK_ProtectFleet"); Jump FIIdle; ENDIF ENDWATCH ENDSTATE FIUnderAttack //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIMissileTechReady //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M12_Intel_ResearchMissleDestroyer, 0); //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (4, 6000, LSTRING_FIMissileTechReady); // The enemy is using a Missile Destroyer. Research Division reports it can produce a similar ship. We advise commencing research immediately. ENDINIT WATCH IF (IntelEventEnded ()) TechSetResearch ("MissileWeapons"); Jump FIIdle; ENDIF ENDWATCH ENDSTATE FIMissileTechReady //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FINewFighterTech //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //SoundEvent (4000); // #define Exp_DestProjectileLarge IF (RaceOfHuman () = 0) //SubtitleSimulate (4, 6000, LSTRING_FINewFighterTechKushan); // Research Division reports it is now equipped for Cloaked Fighter technology. We advise commencing research immediately. SpeechEvent (M12_Intel_ResearchCloadkedFighter, 0); // Research Division reports it is now equipped for Cloaked Fighter technology. We advise commencing research immediately. ELSEIF (RaceOfHuman () = 1) //SubtitleSimulate (4, 6000, LSTRING_FINewFighterTechTaiidan); // Research Division reports it is now equipped for Defense Fighter technology. We advise commencing research immediately. SpeechEvent (M12_Intel_ResearchDefenseFighter, 0); // Research Division reports it is now equipped for Defense Fighter technology. We advise commencing research immediately. ENDIF ENDINIT WATCH IF (IntelEventEnded ()) TechSetResearch ("CloakDefenseFighter"); Jump FIIdle; ENDIF ENDWATCH ENDSTATE FINewFighterTech //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FocusOnDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT wideScreenIn (90); // Wide screen in over 3 seconds TimerCreateSetStart ("DefectorWideScreen", 4); // Then hold it for 1 more ENDINIT WATCH IF (TimerExpiredDestroy ("DefectorWideScreen")) //MusicPlay (B04_EvilEmpire); SoundEvent(262); TutCameraFocus(TEAMSHIPS_Defector); TutCameraFocus(TEAMSHIPS_Defector); VarCreateSet ("G_MakeDefectorAnAlly", TRUE); //ShipsSwitchPlayerOwner (TEAMSHIPS_Defector); // Switch the Defector over to the player side ShipsSetNonRetaliation (TEAMSHIPS_Defector); VarCreateSet ("G_DefectorHasSwitchedSides", TRUE); Jump DefectorHelpMe; ENDIF ENDWATCH ENDSTATE FocusOnDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE DefectorHelpMe //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //SoundEvent (4000); // #define Exp_DestProjectileLarge TimerCreateSetStart ("G_StayFocusedOnDefector", 6); IF (RaceOfHuman () = 0) //SubtitleSimulate (9, 12000, LSTRING_DefectorHelpMeKushan); // Attention Kushan Mothership! .... SpeechEvent (M12_Defector_DefectingKushan, 0); // Attention Kushan Mothership! .... ELSEIF (RaceOfHuman () = 1) //SubtitleSimulate (9, 12000, LSTRING_DefectorHelpMeTaiidan); // Attention Taiidan Mothership! .... SpeechEvent (M12_Defector_DefectingTaiidan, 0); // Attention Kushan Mothership! .... ENDIF TutResetGameMessageQueue(); ENDINIT WATCH IF (IntelEventEnded ()) //IF (VarGet ("PlayerChangedFocus") = FALSE) // TutCameraFocusCancel(); // WideScreenOut (90); // VarCreateSet ("PlayerChangedFocus", TRUE); //ENDIF Jump DefectorHelpMe2; ENDIF // if the player cancels focus before the Defector is done talking, remove the letterbox in 60 frames (2 seconds) IF (TutGameSentMessage ("Game_BandBoxFocus,Game_ClickFocus,KB_FocusMothership,KB_CancelFocus,KB_Focus,KB_Sensors,TB_SensorsManager")) IF (VarGet ("PlayerChangedFocus") = FALSE) WideScreenOut (60); VarCreateSet ("PlayerChangedFocus", TRUE); ENDIF ENDIF ENDWATCH ENDSTATE DefectorHelpMe //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE DefectorHelpMe2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TimerCreateSetStart ("G_GoBackToPreviousFocus", 1); TimerCreateSetStart ("G_StartUnLetterbox", 2); TimerCreateSetStart ("G_WaitForLBXOutToFinish", 4); ENDINIT WATCH IF (TimerExpiredDestroy ("G_GoBackToPreviousFocus")) IF (VarGet ("PlayerChangedFocus") = FALSE) SoundEvent(262); TutCameraFocusCancel(); ENDIF ENDIF IF (TimerExpiredDestroy ("G_StartUnLetterbox")) IF (VarGet ("PlayerChangedFocus") = FALSE) WideScreenOut (60); VarCreateSet ("PlayerChangedFocus", TRUE); ENDIF ENDIF IF (TimerExpiredDestroy ("G_WaitForLBXOutToFinish")) Jump FIHelpDefector; ENDIF ENDWATCH ENDSTATE DefectorHelpMe2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIHelpDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M12_Intel_ProtectDefector, 0); // This could be a trap but the Kapella is clearly damaged. Engage the pursuing fleet and draw it away from the defecting ship. //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (4, 6000, LSTRING_FIHelpDefector); // This could be a trap but the Kapella is clearly damaged. Engage the pursuing fleet and draw it away from the defecting ship. ENDINIT WATCH IF (IntelEventEnded ()) IFONCE (TRUE) VarCreateSet ("G_ProtectDefectorHasPlayed", TRUE); PingAddShips (TEAMSHIPS_Defector, "DefectorPing"); ENDIFONCE //wideScreenOut (90); // Remove the widescreen that was created when the focus was done VarDestroy ("G_CLICK_ProtectDefector"); Jump FIIdle; ENDIF ENDWATCH ENDSTATE FIHelpDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIDefectorOnBoard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpeechEvent (M12_Intel_EngageHyperdrive, 0); // The defecting captain has been brought aboard. Engage hyperspace. //SoundEvent (4000); // #define Exp_DestProjectileLarge //SubtitleSimulate (4, 4000, LSTRING_FIDefectorOnBoard); // The defecting captain has been brought aboard. Engage hyperspace. ENDINIT WATCH IF (IntelEventEnded ()) IFONCE (TRUE) VarCreateSet ("G_DefectorIsOnBoard", TRUE); ENDIFONCE Jump FIIdle; ENDIF ENDWATCH ENDSTATE FIDefectorOnBoard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE FIIdle //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH // FIRST TIME watches // play the Fleet Command intro event 5 seconds after you enter the level IFONCE (TimerExpiredDestroy ("G_FCHyperspaceSuccessful")) Jump FCIntro; ENDIFONCE // when the player is underattack, play the event telling them about it IFONCE (TimerExpiredDestroy ("G_UnderAttackTimer")) Jump FIUnderAttack; ENDIFONCE // if the under attack event has played AND the player doesn't have missile destroy tech already, play the MissileTechReady event //IFONCE ( (VarGet ("G_UnderAttackHasPlayed") = TRUE) AND (NOT TechGet ("MissileWeapons")) ) IFONCE (TimerExpiredDestroy ("G_PlayMissileTech")) Jump FIMissileTechReady; ENDIFONCE // if the timer is up to play the technology event, play it IFONCE (TimerExpiredDestroy ("G_TechnologyTimer")) Jump FINewFighterTech; ENDIFONCE // if the Defector has hyperspaced in, focus on him and play the 'Defecting' event IFONCE (TimerExpired ("G_FocusOnDefectorNow")) Jump FocusOnDefector; ENDIFONCE // if all the objectives are complete, play the FI event to hyperspace IFONCE (TimerExpired ("G_AllObjectivesComplete")) Jump FIDefectorOnBoard; ENDIFONCE // REPLAYING event watches // FLEET INTEL event - destroy Gravwell field IF (VarGet ("G_CLICK_DestroyField")) Jump FICaughtInField; ENDIF // FLEET INTEL event - under attack from Taiidan fleet IF (VarGet ("G_CLICK_ProtectFleet")) Jump FIUnderAttack; ENDIF // FLEET INTEL event - Protect Defector IF (VarGet ("G_CLICK_ProtectDefector")) Jump FIHelpDefector; ENDIF ENDWATCH ENDSTATE FIIdle //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM FleetIntel //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FleetIntel ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ TestTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM TestTeam States Hide; INIT Jump Hide; ENDINIT WATCH ENDWATCH STATE Hide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT HideShips (TEAMSHIPS_TestTeam); ENDINIT WATCH ENDWATCH ENDSTATE Hide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM TestTeam //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ TestTeam ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GravWells ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM GravWells States Wait, Wait2, Move, GravityOn, GravityOff; INIT //Jump Move; //Jump GravityOn; Jump Wait; ENDINIT WATCH ENDWATCH STATE Move //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_GravwellTeam1)) MoveTo(POINT_GravwellMoveToPoint1); ELSEIF (ThisTeamIs (TEAM_GravwellTeam2)) MoveTo(POINT_GravwellMoveToPoint2); ELSEIF (ThisTeamIs (TEAM_GravwellTeam3)) MoveTo(POINT_GravwellMoveToPoint3); ENDIF ENDINIT WATCH IF (ThisTeamIs (TEAM_GravwellTeam1)) IF (Nearby (POINT_GravwellMoveToPoint1, 500)) Jump GravityOn; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam2)) IF (Nearby (POINT_GravwellMoveToPoint2, 500)) Jump GravityOn; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam3)) IF (Nearby (POINT_GravwellMoveToPoint3, 500)) Jump GravityOn; ENDIF ENDIF ENDWATCH ENDSTATE Move //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Wait //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH IF (VarGet ("G_GoGravWells") = TRUE) Jump Wait2; ENDIF ENDWATCH ENDSTATE Wait //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Wait2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH //IF (VarGet ("G_GoGravWells") = TRUE) // Jump GravityOn; //ENDIF IF (ThisTeamIs (TEAM_GravwellTeam1)) FindEnemiesNearTeam (SHIPS_GravWell1EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1EVERYONE); ShipsSelectClass (SHIPS_GravWell1Fighters, SHIPS_GravWell1EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell1Corvettes, SHIPS_GravWell1EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Fighters); ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Corvettes); IF (ShipsCount (SHIPS_GravWell1StrikeCraft) > 0) MoveTo (SHIPSPOINT_GravWell1StrikeCraft); //SpecialToggle(); // Turn the field on Jump GravityOn; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam2)) FindEnemiesNearTeam (SHIPS_GravWell2EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2EVERYONE); ShipsSelectClass (SHIPS_GravWell2Fighters, SHIPS_GravWell2EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell2Corvettes, SHIPS_GravWell2EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Fighters); ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Corvettes); IF (ShipsCount (SHIPS_GravWell2StrikeCraft) > 0) MoveTo (SHIPSPOINT_GravWell2StrikeCraft); //SpecialToggle(); // Turn the field on Jump GravityOn; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam3)) FindEnemiesNearTeam (SHIPS_GravWell3EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3EVERYONE); ShipsSelectClass (SHIPS_GravWell3Fighters, SHIPS_GravWell3EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell3Corvettes, SHIPS_GravWell3EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Fighters); ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Corvettes); IF (ShipsCount (SHIPS_GravWell3StrikeCraft) > 0) MoveTo (SHIPSPOINT_GravWell3StrikeCraft); //SpecialToggle(); // Turn the field on Jump GravityOn; ENDIF ENDIF ENDWATCH ENDSTATE Wait2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GravityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpecialToggle(); // Turn the field ON //IF (ThisTeamIs (TEAM_GravwellTeam1)) // FindEnemiesNearTeam (SHIPS_GravWell1EVERYONE, 16000); // //ShipsSelectNonCapital (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1EVERYONE); // ShipsSelectClass (SHIPS_GravWell1Fighters, SHIPS_GravWell1EVERYONE, "CLASS_Fighter"); // ShipsSelectClass (SHIPS_GravWell1Corvettes, SHIPS_GravWell1EVERYONE, "CLASS_Corvette"); // ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Fighters); // ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Corvettes); // IF (ShipsCount (SHIPS_GravWell1StrikeCraft) > 0) // MoveTo (SHIPSPOINT_GravWell1StrikeCraft); // SpecialToggle(); // Turn the field on // ENDIF //ELSEIF (ThisTeamIs (TEAM_GravwellTeam2)) // FindEnemiesNearTeam (SHIPS_GravWell2EVERYONE, 16000); // //ShipsSelectNonCapital (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2EVERYONE); // ShipsSelectClass (SHIPS_GravWell2Fighters, SHIPS_GravWell2EVERYONE, "CLASS_Fighter"); // ShipsSelectClass (SHIPS_GravWell2Corvettes, SHIPS_GravWell2EVERYONE, "CLASS_Corvette"); // ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Fighters); // ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Corvettes); // IF (ShipsCount (SHIPS_GravWell2StrikeCraft) > 0) // MoveTo (SHIPSPOINT_GravWell2StrikeCraft); // SpecialToggle(); // Turn the field on // ENDIF //ELSEIF (ThisTeamIs (TEAM_GravwellTeam3)) // FindEnemiesNearTeam (SHIPS_GravWell3EVERYONE, 16000); // //ShipsSelectNonCapital (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3EVERYONE); // ShipsSelectClass (SHIPS_GravWell3Fighters, SHIPS_GravWell3EVERYONE, "CLASS_Fighter"); // ShipsSelectClass (SHIPS_GravWell3Corvettes, SHIPS_GravWell3EVERYONE, "CLASS_Corvette"); // ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Fighters); // ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Corvettes); // IF (ShipsCount (SHIPS_GravWell3StrikeCraft) > 0) // MoveTo (SHIPSPOINT_GravWell3StrikeCraft); // SpecialToggle(); // Turn the field on // ENDIF //ENDIF ENDINIT WATCH // if you get within range of the Strike Craft, stop moving towards them. //IF (ThisTeamIs (TEAM_GravwellTeam1)) // IF (Nearby (SHIPSPOINT_GravwellTeam1, 4000)) // Stop (); // ENDIF //ELSEIF (ThisTeamIs (TEAM_GravwellTeam2)) // IF (Nearby (SHIPSPOINT_GravwellTeam2, 4000)) // Stop (); // ENDIF //ELSEIF (ThisTeamIs (TEAM_GravwellTeam3)) // IF (Nearby (SHIPSPOINT_GravwellTeam3, 4000)) // Stop (); // ENDIF //ENDIF // if there are no strike craft within range, turn off your gravwell IF (ThisTeamIs (TEAM_GravwellTeam1)) FindEnemiesNearTeam (SHIPS_GravWell1EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1EVERYONE); ShipsSelectClass (SHIPS_GravWell1Fighters, SHIPS_GravWell1EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell1Corvettes, SHIPS_GravWell1EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Fighters); ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Corvettes); IF (ShipsCount (SHIPS_GravWell1StrikeCraft) = 0) Jump GravityOff; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam2)) FindEnemiesNearTeam (SHIPS_GravWell2EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2EVERYONE); ShipsSelectClass (SHIPS_GravWell2Fighters, SHIPS_GravWell2EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell2Corvettes, SHIPS_GravWell2EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Fighters); ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Corvettes); IF (ShipsCount (SHIPS_GravWell2StrikeCraft) = 0) Jump GravityOff; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam3)) FindEnemiesNearTeam (SHIPS_GravWell3EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3EVERYONE); ShipsSelectClass (SHIPS_GravWell3Fighters, SHIPS_GravWell3EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell3Corvettes, SHIPS_GravWell3EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Fighters); ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Corvettes); IF (ShipsCount (SHIPS_GravWell3StrikeCraft) = 0) Jump GravityOff; ENDIF ENDIF ENDWATCH ENDSTATE GravityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GravityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT SpecialToggle(); // Turn the field OFF ENDINIT WATCH IF (ThisTeamIs (TEAM_GravwellTeam1)) FindEnemiesNearTeam (SHIPS_GravWell1EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1EVERYONE); ShipsSelectClass (SHIPS_GravWell1Fighters, SHIPS_GravWell1EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell1Corvettes, SHIPS_GravWell1EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Fighters); ShipsAdd (SHIPS_GravWell1StrikeCraft, SHIPS_GravWell1Corvettes); IF (ShipsCount (SHIPS_GravWell1StrikeCraft) > 0) MoveTo (SHIPSPOINT_GravWell1StrikeCraft); Jump GravityOn; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam2)) FindEnemiesNearTeam (SHIPS_GravWell2EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2EVERYONE); ShipsSelectClass (SHIPS_GravWell2Fighters, SHIPS_GravWell2EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell2Corvettes, SHIPS_GravWell2EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Fighters); ShipsAdd (SHIPS_GravWell2StrikeCraft, SHIPS_GravWell2Corvettes); IF (ShipsCount (SHIPS_GravWell2StrikeCraft) > 0) MoveTo (SHIPSPOINT_GravWell2StrikeCraft); Jump GravityOn; ENDIF ELSEIF (ThisTeamIs (TEAM_GravwellTeam3)) FindEnemiesNearTeam (SHIPS_GravWell3EVERYONE, 16000); //ShipsSelectNonCapital (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3EVERYONE); ShipsSelectClass (SHIPS_GravWell3Fighters, SHIPS_GravWell3EVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GravWell3Corvettes, SHIPS_GravWell3EVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Fighters); ShipsAdd (SHIPS_GravWell3StrikeCraft, SHIPS_GravWell3Corvettes); IF (ShipsCount (SHIPS_GravWell3StrikeCraft) > 0) MoveTo (SHIPSPOINT_GravWell3StrikeCraft); Jump GravityOn; ENDIF ENDIF ENDWATCH ENDSTATE GravityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM GravWells //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GravWells ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GravWellSupport ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM GravWellSupport States Choose, ServiceGravWell, ServiceCarrier, ServiceCruiser, GiveToAI; INIT Jump Choose; ENDINIT WATCH ENDWATCH STATE Choose //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_GW1Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam1) > 0) Jump ServiceGravWell; ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) Jump ServiceCarrier; ELSEIF (ShipsCount (TEAMSHIPS_Cruiser) > 0) Jump ServiceCruiser; ELSE Jump GiveToAI; ENDIF ELSEIF (ThisTeamIs (TEAM_GW2Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam2) > 0) Jump ServiceGravWell; ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) Jump ServiceCarrier; ELSEIF (ShipsCount (TEAMSHIPS_Cruiser) > 0) Jump ServiceCruiser; ELSE Jump GiveToAI; ENDIF ELSEIF (ThisTeamIs (TEAM_GW3Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam3) > 0) Jump ServiceGravWell; ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) Jump ServiceCarrier; ELSEIF (ShipsCount (TEAMSHIPS_Cruiser) > 0) Jump ServiceCruiser; ELSE Jump GiveToAI; ENDIF ENDIF ENDINIT WATCH ENDWATCH ENDSTATE Choose //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE ServiceGravWell //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_GW1Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam1) > 0) AttackSpecial (TEAMSHIPS_GravWellTeam1); ELSE Jump Choose; ENDIF ELSEIF (ThisTeamIs (TEAM_GW2Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam2) > 0) AttackSpecial (TEAMSHIPS_GravWellTeam2); ELSE Jump Choose; ENDIF ELSEIF (ThisTeamIs (TEAM_GW3Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam3) > 0) AttackSpecial (TEAMSHIPS_GravWellTeam3); ELSE Jump Choose; ENDIF ENDIF ENDINIT WATCH // If the ship you're servicing dies, go back to Choose IF (ThisTeamIs (TEAM_GW1Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam1) = 0) Jump Choose; ENDIF ELSEIF (ThisTeamIs (TEAM_GW2Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam2) = 0) Jump Choose; ENDIF ELSEIF (ThisTeamIs (TEAM_GW3Support)) IF (ShipsCount (TEAMSHIPS_GravWellTeam3) = 0) Jump Choose; ENDIF ENDIF ENDWATCH ENDSTATE ServiceGravWell //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE ServiceCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (TEAMSHIPS_Carrier) > 0) AttackSpecial (TEAMSHIPS_Carrier); ELSE Jump Choose; ENDIF ENDINIT WATCH // If the ship you're servicing dies, go back to Choose IF (ShipsCount (TEAMSHIPS_Carrier) = 0) Jump Choose; ENDIF ENDWATCH ENDSTATE ServiceCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE ServiceCruiser //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (TEAMSHIPS_Cruiser) > 0) AttackSpecial (TEAMSHIPS_Cruiser); ELSE Jump Choose; ENDIF ENDINIT WATCH // If the ship you're servicing dies, go back to Choose IF (ShipsCount (TEAMSHIPS_Cruiser) = 0) Jump Choose; ENDIF ENDWATCH ENDSTATE ServiceCruiser //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GiveToAI //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TeamGiveToAI (); ENDINIT WATCH ENDWATCH ENDSTATE GiveToAI //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM GravWellSupport //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GravWellSupport ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GuardGravWells ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM GuardGravWells States Move, AttackFleet, AttackMothership, NullState; INIT Jump Move; ENDINIT WATCH ENDWATCH STATE Move //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //IF (ThisTeamIs (TEAM_GuardGWTeam1)) // MoveTo (POINT_GuardGW1MoveToPoint); //ELSEIF (ThisTeamIs (TEAM_GuardGWTeam2)) // MoveTo (POINT_GuardGW2MoveToPoint); //ELSEIF (ThisTeamIs (TEAM_GuardGWTeam3)) // MoveTo (POINT_GuardGW3MoveToPoint); //ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (ThisTeamIs (TEAM_GuardGWTeam1)) //IF (Nearby (POINT_GuardGW1MoveToPoint, 500)) //TacticsEvasive (); Jump AttackFleet; //ENDIF ELSEIF (ThisTeamIs (TEAM_GuardGWTeam2)) //IF (Nearby (POINT_GuardGW2MoveToPoint, 500)) //TacticsEvasive (); Jump AttackFleet; //ENDIF ELSEIF (ThisTeamIs (TEAM_GuardGWTeam3)) //IF (Nearby (POINT_GuardGW3MoveToPoint, 500)) //TacticsEvasive (); Jump AttackFleet; //ENDIF ENDIF ENDWATCH ENDSTATE Move //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackFleet //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_GuardGWTeam1)) // Missile Destroyer // Select everyone FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_GW1EntireFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_GW1EntireFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_GW1EntireFleet, SHIPS_Mothership); // And filter it out // Select the Strike Craft ShipsSelectClass (SHIPS_GW1Fighters, SHIPS_GW1EntireFleet, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GW1Corvettes, SHIPS_GW1EntireFleet, "CLASS_Corvette"); ShipsAdd (SHIPS_GW1StrikeCraft, SHIPS_GW1Fighters); ShipsAdd (SHIPS_GW1StrikeCraft, SHIPS_GW1Corvettes); // Select the Capital ships ShipsSelectClass (SHIPS_GW1Frigates, SHIPS_GW1EntireFleet, "CLASS_Frigate"); ShipsSelectClass (SHIPS_GW1Destroyers, SHIPS_GW1EntireFleet, "CLASS_Destroyer"); ShipsAdd (SHIPS_GW1Capital, SHIPS_GW1Frigates); ShipsAdd (SHIPS_GW1Capital, SHIPS_GW1Destroyers); IF (ShipsCount (SHIPS_GW1StrikeCraft) > 0) Attack (SHIPS_GW1StrikeCraft); VarCreateSet ("AttackingStrikeCraft", TRUE); ELSEIF (ShipsCount (SHIPS_GW1Capital) > 0) Attack (SHIPS_GW1Capital); VarCreateSet ("AttackingCapital", TRUE); ELSE Jump AttackMothership; ENDIF ELSEIF ( (ThisTeamIs (TEAM_GuardGWTeam2)) OR (ThisTeamIs (TEAM_GuardGWTeam3)) ) // Assault Frigates // Select everyone FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_GW2EntireFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_GW2EntireFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_GW2EntireFleet, SHIPS_Mothership); // And filter it out // Select the Strike Craft ShipsSelectClass (SHIPS_GW2Fighters, SHIPS_GW2EntireFleet, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GW2Corvettes, SHIPS_GW2EntireFleet, "CLASS_Corvette"); ShipsAdd (SHIPS_GW2StrikeCraft, SHIPS_GW2Fighters); ShipsAdd (SHIPS_GW2StrikeCraft, SHIPS_GW2Corvettes); // Select the Capital ships ShipsSelectClass (SHIPS_GW2Frigates, SHIPS_GW2EntireFleet, "CLASS_Frigate"); ShipsSelectClass (SHIPS_GW2Destroyers, SHIPS_GW2EntireFleet, "CLASS_Destroyer"); ShipsAdd (SHIPS_GW2Capital, SHIPS_GW2Frigates); ShipsAdd (SHIPS_GW2Capital, SHIPS_GW2Destroyers); IF (ShipsCount (SHIPS_GW2Capital) > 0) Attack (SHIPS_GW2Capital); VarCreateSet ("AttackingCapital", TRUE); ELSEIF (ShipsCount (SHIPS_GW2StrikeCraft) > 0) Attack (SHIPS_GW2StrikeCraft); VarCreateSet ("AttackingStrikeCraft", TRUE); ELSE Jump AttackMothership; ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (ThisTeamIs (TEAM_GuardGWTeam1)) // Missile Destroyer IF (VarGet ("AttackingStrikeCraft") = TRUE) IF (ShipsCount (SHIPS_GW1StrikeCraft) = 0) VarDestroy ("AttackingStrikeCraft"); Jump AttackFleet; ENDIF ELSEIF (VarGet ("AttackingCapital") = TRUE) IF (ShipsCount (SHIPS_GW1Capital) = 0) VarDestroy ("AttackingCapital"); Jump AttackFleet; ENDIF ENDIF ELSEIF ( (ThisTeamIs (TEAM_GuardGWTeam2)) OR (ThisTeamIs (TEAM_GuardGWTeam3)) ) // Assault Frigates IF (VarGet ("AttackingStrikeCraft") = TRUE) IF (ShipsCount (SHIPS_GW2StrikeCraft) = 0) VarDestroy ("AttackingStrikeCraft"); Jump AttackFleet; ENDIF ELSEIF (VarGet ("AttackingCapital") = TRUE) IF (ShipsCount (SHIPS_GW2Capital) = 0) VarDestroy ("AttackingCapital"); Jump AttackFleet; ENDIF ENDIF ENDIF ENDWATCH ENDSTATE AttackFleet //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_EntireFleet, 3000); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_EntireFleet, "CLASS_Mothership"); VarCreateSet ("G_THISISTHEMOTHERSHIP", ShipsCount (SHIPS_PlayerMothership)); MoveAttack (SHIPS_PlayerMothership); //AttackMothership (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_EntireFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_EntireFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_EntireFleet, SHIPS_Mothership); // And filter it out ShipsSelectCapital (SHIPS_Capital, SHIPS_EntireFleet); ShipsSelectClass (SHIPS_GWFighters, SHIPS_EntireFleet, "CLASS_Fighter"); ShipsSelectClass (SHIPS_GWCorvettes, SHIPS_EntireFleet, "CLASS_Corvette"); ShipsAdd (SHIPS_StrikeCraft, SHIPS_GWFighters); ShipsAdd (SHIPS_StrikeCraft, SHIPS_GWCorvettes); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_Capital, "CLASS_Mothership"); ShipsSelectClass (SHIPS_Resource, SHIPS_Capital, "CLASS_Resource"); ShipsRemove (SHIPS_Capital, SHIPS_PlayerMothership); ShipsRemove (SHIPS_Capital, SHIPS_Resource); IF (ShipsCount (SHIPS_Capital) > 0) Jump AttackFleet; ELSEIF (ShipsCount (SHIPS_StrikeCraft) > 0) Jump AttackFleet; ENDIF ENDWATCH ENDSTATE AttackMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM GuardGravWells //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GuardGravWells ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ AIShips ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM AIShips States GiveToAI; INIT Jump GiveToAI; ENDINIT WATCH ENDWATCH STATE GiveToAI //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TeamGiveToAI (); ENDINIT WATCH ENDWATCH ENDSTATE GiveToAI //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM AIShips //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ AIShips ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Carrier ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM Carrier States ACT1Patrol, NullState; INIT Jump ACT1Patrol; ENDINIT WATCH ENDWATCH STATE ACT1Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT PatrolPath (PATH_CarrierPath); ENDINIT WATCH IF (ShipsCount (TEAMSHIPS_Carrier) = 0) Jump NullState; ENDIF IF (UnderAttack (SHIPS_CarrierAttackedACT1)) // Do this just to create the list ENDIF IFONCE (TeamHealthAverage () < 75) VarCreateSet ("G_CarrierLowOnHealth", TRUE); ENDIFONCE ENDWATCH ENDSTATE ACT1Patrol //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM Carrier //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Carrier ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GuardCarrier ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM GuardCarrier States Guard, AllDeadWaitForShips, WaitToDockWithAICarrier, GuardCruiser, Kamikaze, Dock, Launch, NullState; INIT VarCreateSet ("SHIPSOriginal", (ShipsCount (THISTEAMSHIPS))); VarCreateSet ("SHIPSRequested", 0); VarCreateSet ("SHIPSNeeded", 0); VarCreateSet ("SHIPSNewships", 0); VarCreateSet ("SHIPSKilled", 0); Jump Guard; ENDINIT WATCH // if there are 0 ships in the team, jump to a wait state to wait for more ships (otherwise the order will get lost) IF ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("WaitingForShips") = FALSE) ) Jump AllDeadWaitForShips; ENDIF // repopulation stuff from Falko IF ((ShipsCount (THISTEAMSHIPS) + VarGet ("SHIPSRequested")) < VarGet ("SHIPSOriginal")) VarSet ("SHIPSNeeded", (VarGet ("SHIPSOriginal") - (ShipsCount (THISTEAMSHIPS) + VarGet("SHIPSRequested")))); IF (ThisTeamIs (TEAM_GuardCarrierIon)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RequestShips ("IonCannonFrigate", VarGet ("SHIPSNeeded")); ENDIF ELSEIF (ThisTeamIs (TEAM_GuardCarrierCorv)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RequestShips ("HeavyCorvette", VarGet ("SHIPSNeeded")); ENDIF ELSEIF (ThisTeamIs (TEAM_GuardCarrierDef)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RequestShips ("HeavyDefender", VarGet ("SHIPSNeeded")); ENDIF ENDIF VarSet ("SHIPSKilled", VarGet ("SHIPSKilled") + VarGet ("SHIPSNeeded")); VarSet("SHIPSRequested", VarGet("SHIPSRequested") + VarGet("SHIPSNeeded")); ENDIF VarSet ("SHIPSNewships", NewShipsAdded()); IF (VarGet("SHIPSNewships")) VarSet("SHIPSRequested", VarGet("SHIPSRequested") - VarGet("SHIPSNewships")); ENDIF ENDWATCH STATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_GuardCarrierIon)) FormationWall (); ELSEIF (ThisTeamIs (TEAM_GuardCarrierCorv)) FormationDelta (); ELSEIF (ThisTeamIs (TEAM_GuardCarrierDef)) FormationSphere (); ENDIF Guard (TEAMSHIPS_Carrier); ENDINIT WATCH // watch everywhere stuff IF ( (ThisTeamIs (TEAM_GuardCarrierCorv)) OR (ThisTeamIs (TEAM_GuardCarrierDef)) ) IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies, guard the Cruiser IF (ShipsCount (TEAMSHIPS_Cruiser) > 0) Jump GuardCruiser; ELSE IF ( (ThisTeamIs (TEAM_GuardCarrierCorv)) OR (ThisTeamIs (TEAM_GuardCarrierDef)) ) Jump Kamikaze; // If there is no place left to go and you're a Strike Craft, kamikaze the Mothership ELSEIF (ThisTeamIs (TEAM_GuardCarrierIon)) // If there is no place left to go and you're a Frigate, hyperspace out TeamHyperspaceOut (); Jump NullState; ENDIF ENDIF ENDIF ENDWATCH ENDSTATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCruiser //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_GuardCarrierIon)) FormationWall (); ELSEIF (ThisTeamIs (TEAM_GuardCarrierCorv)) FormationDelta (); ELSEIF (ThisTeamIs (TEAM_GuardCarrierDef)) FormationSphere (); ENDIF Guard (TEAMSHIPS_Cruiser); ENDINIT WATCH // watch everywhere stuff IF ( (ThisTeamIs (TEAM_GuardCarrierCorv)) OR (ThisTeamIs (TEAM_GuardCarrierDef)) ) IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF ENDIF IF (ShipsCount (TEAMSHIPS_Cruiser) = 0) // If the Cruiser dies, that's it IF ( (ThisTeamIs (TEAM_GuardCarrierCorv)) OR (ThisTeamIs (TEAM_GuardCarrierDef)) ) Jump Kamikaze; // If there is no place left to go and you're a Strike Craft, kamikaze the Mothership ELSEIF (ThisTeamIs (TEAM_GuardCarrierIon)) // If there is no place left to go and you're a Frigate, hyperspace out TeamHyperspaceOut (); Jump NullState; ENDIF ENDIF ENDWATCH ENDSTATE GuardCruiser //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AllDeadWaitForShips //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT VarCreateSet ("WaitingForShips", TRUE); ENDINIT WATCH IF (ShipsCount (THISTEAMSHIPS) > 0) VarDestroy ("WaitingForShips"); Jump Guard; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) Jump NullState; ENDIF ENDWATCH ENDSTATE AllDeadWaitForShips //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Kamikaze //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetNearMothership, 3000); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_FleetNearMothership, "CLASS_Mothership"); Kamikaze (SHIPS_PlayerMothership); Jump NullState; ENDINIT WATCH ENDWATCH ENDSTATE Kamikaze //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT DockStay (TEAM_Carrier); // Dock with the Carrier ENDINIT WATCH // watch everywhere stuff IF (TeamDockedReadyForLaunch ()) // When you're all in AND repaired AND refuelled, then Launch Jump Launch; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies on your way there, go guard Jump Guard; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); // Get outta the Carrier ENDINIT WATCH // watch everywhere stuff IF (TeamFinishedLaunching ()) // When you're done launching, go guard Jump Guard; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies while launching, go guard Jump Guard; ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM GuardCarrier //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GuardCarrier ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Cruiser ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM Cruiser States Hide, ComeOnIn, AttackNearby, AttackFleet, AttackMothership, NullState; INIT Jump Hide; ENDINIT WATCH IFONCE (VarGet ("G_ACT2HasBegun") = TRUE) TimerCreateSetStart ("BringInTheBruiser", 250); ENDIFONCE IFONCE (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIFONCE ENDWATCH STATE Hide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT HideShips (TEAMSHIPS_Cruiser); ENDINIT WATCH IF ( (ShipsCount (TEAMSHIPS_Carrier) = 0) OR (TimerExpiredDestroy ("BringInTheBruiser")) ) UnhideShips (TEAMSHIPS_Cruiser); Jump ComeOnIn; ENDIF ENDWATCH ENDSTATE Hide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE ComeOnIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT PatrolPath (PATH_CruiserPath); //TimerCreateSetStart ("G_HowLongDoesThisCruiserTake", 10000); ENDINIT WATCH IF (FindEnemiesNearTeam (SHIPS_CruiserFound, 16000)) ShipsSelectClass (SHIPS_Mothership, SHIPS_CruiserFound, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_CruiserFound, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_CruiserFound) > 0) Stop (); Jump AttackNearby; ENDIF ENDIF IF (PathNextPoint () = 0) // When you've reached the end of the path, attack the Fleet //MsgSendAll ("Break"); Jump AttackFleet; ENDIF ENDWATCH ENDSTATE ComeOnIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ShipsSelectClass (SHIPS_NearbyDestroyers, SHIPS_CruiserFound, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_NearbyFrigates, SHIPS_CruiserFound, "CLASS_Frigate"); ShipsSelectClass (SHIPS_NearbyCorvettes, SHIPS_CruiserFound, "CLASS_Corvette"); IF (ShipsCount (SHIPS_NearbyDestroyers) > 0) // Attack Destroyers first Attack (SHIPS_NearbyDestroyers); ELSEIF (ShipsCount (SHIPS_NearbyFrigates) > 0) // Attack Frigates second Attack (SHIPS_NearbyFrigates); ELSEIF (ShipsCount (SHIPS_NearbyCorvettes) > 0) // Attack Corvettes third Attack (SHIPS_NearbyCorvettes); ELSE Attack (SHIPS_CruiserFound); // Attack everything else fourth ENDIF ENDINIT WATCH IF ( (ShipsCount (SHIPS_NearbyDestroyers) = 0) AND ((ShipsCount (SHIPS_NearbyFrigates) > 0) OR (ShipsCount (SHIPS_NearbyCorvettes) > 0)) ) Jump AttackNearby; ELSEIF ( (ShipsCount (SHIPS_NearbyFrigates) = 0) AND ((ShipsCount (SHIPS_NearbyDestroyers) > 0) OR (ShipsCount (SHIPS_NearbyCorvettes) > 0)) ) Jump AttackNearby; ELSEIF ( (ShipsCount (SHIPS_NearbyCorvettes) = 0) AND ((ShipsCount (SHIPS_NearbyFrigates) > 0) OR (ShipsCount (SHIPS_NearbyDestroyers) > 0)) ) Jump AttackNearby; ELSEIF (ShipsCount (SHIPS_CruiserFound) = 0) Jump ComeOnIn; ENDIF ENDWATCH ENDSTATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackFleet //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetNearMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetNearMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetNearMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_FleetDestroyers, SHIPS_FleetNearMothership, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_FleetFrigates, SHIPS_FleetNearMothership, "CLASS_Frigate"); IF (ShipsCount (SHIPS_FleetDestroyers) > 0) // Attack Destroyers first Attack (SHIPS_FleetDestroyers); ELSEIF (ShipsCount (SHIPS_FleetFrigates) > 0) // Attack Frigates second Attack (SHIPS_FleetFrigates); ELSE // If there are no Destroyers or Frigates, attack the Mothership Jump AttackMothership; ENDIF ENDINIT WATCH IF ( (ShipsCount (SHIPS_FleetDestroyers) = 0) AND (ShipsCount (SHIPS_FleetFrigates) > 0) ) // If all the Destroyers are dead but Frigates remain, attack the Fleet Jump AttackFleet; ELSEIF ( (ShipsCount (SHIPS_FleetFrigates) = 0) AND (ShipsCount (SHIPS_FleetDestroyers) > 0) ) // If all the Frigates are dead but Destroyers remain, attack the Fleet Jump AttackFleet; ENDIF IF ( (ShipsCount (SHIPS_FleetDestroyers) = 0) AND (ShipsCount (SHIPS_FleetFrigates) = 0) ) // If no Destroyers or Frigates are left, attack the Mothership Jump AttackMothership; ENDIF ENDWATCH ENDSTATE AttackFleet //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetNearMothership, 3000); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_FleetNearMothership, "CLASS_Mothership"); MoveAttack (SHIPS_PlayerMothership); ENDINIT WATCH FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetNearMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetNearMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetNearMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_FleetDestroyers, SHIPS_FleetNearMothership, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_FleetFrigates, SHIPS_FleetNearMothership, "CLASS_Frigate"); IF ( (ShipsCount (SHIPS_FleetDestroyers) > 0) OR (ShipsCount (SHIPS_FleetFrigates) > 0) ) Jump AttackFleet; ENDIF ENDWATCH ENDSTATE AttackMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM Cruiser //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Cruiser ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GuardCruiser ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM GuardCruiser States Hide, Guard, GuardCarrier, Kamikaze, Dock, Launch, NullState; INIT Jump Hide; ENDINIT WATCH IFONCE (VarGet ("G_ACT2HasBegun") = TRUE) TimerCreateSetStart ("BringInTheBruiser", 150); ENDIFONCE ENDWATCH STATE Hide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT HideShips (TEAMSHIPS_GuardCruiserDef); HideShips (TEAMSHIPS_GuardCruiserCorv); HideShips (TEAMSHIPS_GuardCruiserIon); ENDINIT WATCH IF ( (ShipsCount (TEAMSHIPS_Carrier) = 0) OR (TimerExpiredDestroy ("BringInTheBruiser")) ) UnHideShips (TEAMSHIPS_GuardCruiserDef); UnHideShips (TEAMSHIPS_GuardCruiserCorv); UnHideShips (TEAMSHIPS_GuardCruiserIon); Jump Guard; ENDIF ENDWATCH ENDSTATE Hide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_Cruiser); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF ( (ThisTeamIs (TEAM_GuardCruiserCorv)) OR (ThisTeamIs (TEAM_GuardCruiserDef)) ) IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF ENDIF IF (ShipsCount (TEAMSHIPS_Cruiser) = 0) // If the Cruiser dies, guard the Carrier IF (ShipsCount (TEAMSHIPS_Carrier) > 0) Jump GuardCarrier; ELSE IF ( (ThisTeamIs (TEAM_GuardCruiserCorv)) OR (ThisTeamIs (TEAM_GuardCruiserDef)) ) Jump Kamikaze; // If there is no place left to go and you're a Strike Craft, kamikaze the Mothership ELSEIF (ThisTeamIs (TEAM_GuardCruiserIon)) // If there is no place left to go and you're a Frigate, hyperspace out TeamHyperspaceOut (); Jump NullState; ENDIF ENDIF ENDIF ENDWATCH ENDSTATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_GuardCruiserDef)) FormationSphere (); ELSEIF (ThisTeamIs (TEAM_GuardCarrierCorv)) FormationDelta (); ELSEIF (ThisTeamIs (TEAM_GuardCarrierIon)) FormationWall (); ENDIF Guard (TEAMSHIPS_Cruiser); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF ( (ThisTeamIs (TEAM_GuardCruiserCorv)) OR (ThisTeamIs (TEAM_GuardCruiserDef)) ) IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies, that's it IF ( (ThisTeamIs (TEAM_GuardCruiserCorv)) OR (ThisTeamIs (TEAM_GuardCruiserDef)) ) Jump Kamikaze; // If there is no place left to go and you're a Strike Craft, kamikaze the Mothership ELSEIF (ThisTeamIs (TEAM_GuardCruiserIon)) // If there is no place left to go and you're a Frigate, hyperspace out TeamHyperspaceOut (); Jump NullState; ENDIF ENDIF ENDWATCH ENDSTATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Kamikaze //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetNearMothership, 3000); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_FleetNearMothership, "CLASS_Mothership"); Kamikaze (SHIPS_PlayerMothership); Jump NullState; ENDINIT WATCH ENDWATCH ENDSTATE Kamikaze //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT DockStay (TEAM_Carrier); // Dock with the Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TeamDockedReadyForLaunch ()) // When you're all in AND repaired AND refuelled, then Launch Jump Launch; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies on your way there, go guard Jump Guard; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); // Get outta the Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TeamFinishedLaunching ()) // When you're done launching, go guard Jump Guard; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies while launching, go guard Jump Guard; ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM GuardCruiser //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ GuardCruiser ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRInterceptors ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM STRInterceptors States WaitForLaunchOrder, Build, Decide, OnTheMoveToMothership, AttackNearby, AttackFleetAtMothership, AttackRestOfWorld, OnTheMoveToRestOfWorld, GuardCarrier, Dock, Launch, NullState; INIT VarCreateSet ("G_STRIntFighterIndex", 0); VarCreateSet ("G_STRIntFrigateIndex", 0); VarCreateSet ("G_STRIntFightSelectionExhausted", FALSE); VarCreateSet ("G_STRIntFrigSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDINIT WATCH IF (ThisTeamIs (TEAM_STRIntScout)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ENDIF ENDWATCH STATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRIntScout)) VarCreateSet ("G_STRIntScoutREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF IF (ThisTeamIs (TEAM_STRIntInt)) VarCreateSet ("G_STRIntIntREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF ENDINIT WATCH IF (VarGet ("G_STRInterceptorsLAUNCH") = TRUE) VarDestroy ("G_STRIntScoutREADY"); VarDestroy ("G_STRIntIntREADY"); Jump Build; ENDIF ENDWATCH ENDSTATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRIntScout)) VarCreateSet ("G_STRIntScoutBuilding", TRUE); ENDIF IF (ThisTeamIs (TEAM_STRIntInt)) VarCreateSet ("G_STRIntIntBuilding", TRUE); ENDIF VarCreateSet ("G_STRIntScoutNewships", 0); VarCreateSet ("G_STRIntIntNewships", 0); VarCreateSet ("G_STRIntScoutsToRequest", 0); VarCreateSet ("G_STRIntIntsToRequest", 0); // Request between 5 and 15 Scouts depending on the size of the TestTeam VarSet ("G_STRIntScoutsToRequest", (5 + (10*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is set //VarSet ("G_STRIntScoutsToRequest", 10); // HACK, temporary // Request between 5 and 15 Interceptors depending on the size of the TestTeam VarSet ("G_STRIntIntsToRequest", (5 + (10*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is set //VarSet ("G_STRIntIntsToRequest", 10); // HACK, temporary IF (ThisTeamIs (TEAM_STRIntScout)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 35*(VarGet ("G_STRIntScoutsToRequest")))); // Set RUs = Current RUs + Amount req'd to build Scouts RequestShips ("LightInterceptor", VarGet ("G_STRIntScoutsToRequest")); ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 55*(VarGet ("G_STRIntIntsToRequest")))); // Set RUs = Current RUs + Amount req'd to build Interceptors RequestShips ("HeavyInterceptor", VarGet ("G_STRIntScoutsToRequest")); ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff //IF (ShipsCount (THISTEAMSHIPS) = 0) // Jump WaitForLaunchOrder; //ENDIF IF ( (VarGet ("G_STRIntScoutBuilding") = TRUE) AND (VarGet ("G_STRIntIntBuilding") = TRUE) ) VarDestroy ("G_STRInterceptorsLAUNCH"); VarDestroy ("G_STRIntScoutBuilding"); VarDestroy ("G_STRIntIntBuilding"); ENDIF // Watch to see when both teams have their ships IF (ThisTeamIs (TEAM_STRIntScout)) VarSet ("G_STRIntScoutNewships", VarGet ("G_STRIntScoutNewships") + NewShipsAdded ()); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) VarSet ("G_STRIntIntNewships", VarGet ("G_STRIntIntNewships") + NewShipsAdded ()); ENDIF // When both teams have their ships OR the Carrier dies, then off they go IF ( ((VarGet ("G_STRIntScoutNewships") = VarGet ("G_STRIntScoutsToRequest")) AND (VarGet ("G_STRIntIntNewships") = VarGet ("G_STRIntIntsToRequest"))) OR ((ShipsCount (TEAMSHIPS_Carrier) = 0) AND ((ShipsCount (TEAMSHIPS_STRIntScout) > 0) OR (ShipsCount (TEAMSHIPS_STRIntInt) > 0))) ) Jump Decide; ENDIF ENDWATCH ENDSTATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FormationDelta3D (); // Do this for option 1) IF (ShipsCount (TEAMSHIPS_STRIntScout) > 0) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetAtMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRIntFighters, SHIPS_FleetAtMothership, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRIntFrigates, SHIPS_FleetAtMothership, "CLASS_Frigate"); ELSEIF (ShipsCount (TEAMSHIPS_STRIntInt) > 0) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetAtMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRIntFighters, SHIPS_FleetAtMothership, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRIntFrigates, SHIPS_FleetAtMothership, "CLASS_Frigate"); ENDIF // Do this for option 2) IF (ShipsCount (TEAMSHIPS_STRIntScout) > 0) //Print ("Scout: I'm SELECTING the Single Fighter and Frigate now!!!!"); FindEnemiesInside (VOLUME_WorldVolume, SHIPS_AllShipsInWorld, 1000); ShipsSelectClass (SHIPS_Mothership, SHIPS_AllShipsInWorld, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AllShipsInWorld, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSAllShipsInWorld", ShipsCount (SHIPS_AllShipsInWorld)); ShipsSelectClass (SHIPS_STRIntWorldFighters, SHIPS_AllShipsInWorld, "CLASS_Fighter"); //VarCreateSet ("G_SHIPSSTRIntWorldFighters", ShipsCount (SHIPS_STRIntWorldFighters)); ShipsSelectClass (SHIPS_STRIntWorldFrigates, SHIPS_AllShipsInWorld, "CLASS_Frigate"); //VarCreateSet ("G_SHIPSSTRIntWorldFrigates", ShipsCount (SHIPS_STRIntWorldFrigates)); IF (ShipsSelectIndex (SHIPS_STRIntSingleFighter, SHIPS_STRIntWorldFighters, VarGet ("G_STRIntFighterIndex"))) //VarCreateSet ("G_SHIPSSTRIntSingleFighter", ShipsCount (SHIPS_STRIntSingleFighter)); FindEnemiesNearTeam (SHIPS_STRIntSingleFighter, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRIntSingleFighter, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRIntSingleFighter, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRIntSingleFighterNearby", ShipsCount (SHIPS_STRIntSingleFighter)); ShipsSelectClass (SHIPS_STRIntWorldNearbyFighters, SHIPS_STRIntSingleFighter, "CLASS_Fighter"); VarInc ("G_STRIntFighterIndex"); ELSE VarSet ("G_STRIntFightSelectionExhausted", TRUE); ENDIF IF (ShipsSelectIndex (SHIPS_STRIntSingleFrigate, SHIPS_STRIntWorldFrigates, VarGet ("G_STRIntFrigateIndex"))) //VarCreateSet ("G_SHIPSSTRIntSingleFrigate", ShipsCount (SHIPS_STRIntSingleFrigate)); FindEnemiesNearTeam (SHIPS_STRIntSingleFrigate, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRIntSingleFrigate, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRIntSingleFrigate, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRIntSingleFrigateNearby", ShipsCount (SHIPS_STRIntSingleFrigate)); ShipsSelectClass (SHIPS_STRIntWorldNearbyFrigates, SHIPS_STRIntSingleFrigate, "CLASS_Frigate"); VarInc ("G_STRIntFrigateIndex"); ELSE VarSet ("G_STRIntFrigSelectionExhausted", TRUE); ENDIF ELSEIF (ShipsCount (TEAMSHIPS_STRIntInt) > 0) //Print ("Interceptor: I'm SELECTING the Single Fighter and Frigate now!!!!"); FindEnemiesInside (VOLUME_WorldVolume, SHIPS_AllShipsInWorld, 1000); ShipsSelectClass (SHIPS_Mothership, SHIPS_AllShipsInWorld, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AllShipsInWorld, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSAllShipsInWorld", ShipsCount (SHIPS_AllShipsInWorld)); ShipsSelectClass (SHIPS_STRIntWorldFighters, SHIPS_AllShipsInWorld, "CLASS_Fighter"); //VarCreateSet ("G_SHIPSSTRIntWorldFighters", ShipsCount (SHIPS_STRIntWorldFighters)); ShipsSelectClass (SHIPS_STRIntWorldFrigates, SHIPS_AllShipsInWorld, "CLASS_Frigate"); //VarCreateSet ("G_SHIPSSTRIntWorldFrigates", ShipsCount (SHIPS_STRIntWorldFrigates)); IF (ShipsSelectIndex (SHIPS_STRIntSingleFighter, SHIPS_STRIntWorldFighters, VarGet ("G_STRIntFighterIndex"))) //VarCreateSet ("G_SHIPSSTRIntSingleFighter", ShipsCount (SHIPS_STRIntSingleFighter)); FindEnemiesNearTeam (SHIPS_STRIntSingleFighter, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRIntSingleFighter, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRIntSingleFighter, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRIntSingleFighterNearby", ShipsCount (SHIPS_STRIntSingleFighter)); ShipsSelectClass (SHIPS_STRIntWorldNearbyFighters, SHIPS_STRIntSingleFighter, "CLASS_Fighter"); VarInc ("G_STRIntFighterIndex"); ELSE VarSet ("G_STRIntFightSelectionExhausted", TRUE); ENDIF IF (ShipsSelectIndex (SHIPS_STRIntSingleFrigate, SHIPS_STRIntWorldFrigates, VarGet ("G_STRIntFrigateIndex"))) //VarCreateSet ("G_SHIPSSTRIntSingleFrigate", ShipsCount (SHIPS_STRIntSingleFrigate)); FindEnemiesNearTeam (SHIPS_STRIntSingleFrigate, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRIntSingleFrigate, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRIntSingleFrigate, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRIntSingleFrigateNearby", ShipsCount (SHIPS_STRIntSingleFrigate)); ShipsSelectClass (SHIPS_STRIntWorldNearbyFrigates, SHIPS_STRIntSingleFrigate, "CLASS_Frigate"); VarInc ("G_STRIntFrigateIndex"); ELSE VarSet ("G_STRIntFrigSelectionExhausted", TRUE); ENDIF ENDIF // here's where you decide where to go: // 1) Attack the fleet at the Mothership // 2) Attack pockets of ships in the rest of the world // 3) Guard the Carrier // 4) Kamikaze the Mothership // 1) At the Mothership: If there are 300 RUs worth of Fighters, or at least one Frigate, go AttackFleetAtMothership IF ( (62*(ShipsCount (SHIPS_STRIntFighters)) > 300) OR (ShipsCount (SHIPS_STRIntFrigates) > 0) ) VarSet ("G_STRIntFighterIndex", 0); VarSet ("G_STRIntFrigateIndex", 0); VarSet ("G_STRIntFightSelectionExhausted", FALSE); VarSet ("G_STRIntFrigSelectionExhausted", FALSE); Jump AttackFleetAtMothership; // 2) Rest of World: If there are 300 RUs worth of Fighters, or at least one Frigate, go AttackRestOfWorld ELSEIF ( (NOT VarGet ("G_STRIntFightSelectionExhausted")) OR (NOT VarGet ("G_STRIntFrigSelectionExhausted")) ) IF ((62*(ShipsCount (SHIPS_STRIntWorldNearbyFighters)) > 300) OR (ShipsCount (SHIPS_STRIntWorldNearbyFrigates) > 0)) VarSet ("G_STRIntFighterIndex", 0); VarSet ("G_STRIntFrigateIndex", 0); VarSet ("G_STRIntFightSelectionExhausted", FALSE); VarSet ("G_STRIntFrigSelectionExhausted", FALSE); Jump AttackRestOfWorld; ELSE Jump Decide; ENDIF ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) // If the Carrier's still alive, Guard it VarSet ("G_STRIntFighterIndex", 0); VarSet ("G_STRIntFrigateIndex", 0); VarSet ("G_STRIntFightSelectionExhausted", FALSE); VarSet ("G_STRIntFrigSelectionExhausted", FALSE); Jump GuardCarrier; ELSE VarSet ("G_STRIntFighterIndex", 0); VarSet ("G_STRIntFrigateIndex", 0); VarSet ("G_STRIntFightSelectionExhausted", FALSE); VarSet ("G_STRIntFrigSelectionExhausted", FALSE); FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); Kamikaze (SHIPS_PlayerMothership); // If there are no places left to go, kamikaze the Mothership Jump NullState; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) VarSet ("G_STRIntFighterIndex", 0); VarSet ("G_STRIntFrigateIndex", 0); VarSet ("G_STRIntFightSelectionExhausted", FALSE); VarSet ("G_STRIntFrigSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) VarSet ("G_STRIntFighterIndex", 0); VarSet ("G_STRIntFrigateIndex", 0); VarSet ("G_STRIntFightSelectionExhausted", FALSE); VarSet ("G_STRIntFrigSelectionExhausted", FALSE); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (TEAMSHIPS_STRIntScout) > 0) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_PlayerFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_PlayerFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_PlayerFleet, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRIntFleetFighters, SHIPS_PlayerFleet, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRIntFleetFrigates, SHIPS_PlayerFleet, "CLASS_Frigate"); ELSEIF (ShipsCount (TEAMSHIPS_STRIntInt) > 0) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_PlayerFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_PlayerFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_PlayerFleet, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRIntFleetFighters, SHIPS_PlayerFleet, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRIntFleetFrigates, SHIPS_PlayerFleet, "CLASS_Frigate"); ENDIF IF (ShipsCount (SHIPS_STRIntFleetFighters) > 0) // Attack Fighters first IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxClear (); TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsAggressive (); ENDIF ShipsAdd (SHIPS_STRIntFleetATTACK, SHIPS_STRIntFleetFighters); ELSEIF (ShipsCount (SHIPS_STRIntFleetFrigates) > 0) // Attack Frigates second IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxClear (); TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsNeutral (); ENDIF ShipsAdd (SHIPS_STRIntFleetATTACK, SHIPS_STRIntFleetFrigates); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRIntFleetATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection Attack (SHIPS_STRIntFleetATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRIntFleetATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRIntFleetATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRIntFleetATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRIntFleetATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRIntScout)) IF (ShipsOrder (TEAMSHIPS_STRIntScout) != 2) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (ShipsOrder (TEAMSHIPS_STRIntInt) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRIntFleetATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToMothership; ENDIF ENDWATCH ENDSTATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxSet (800); // Set the velocity of the Scouts = to the Interceptors so they'll travel together ENDIF TacticsNeutral (); //FormationDelta3D (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRIntFleetATTACK); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRIntFleetATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRIntScout)) IF (ShipsOrder (TEAMSHIPS_STRIntScout) != 2) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (ShipsOrder (TEAMSHIPS_STRIntInt) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (ThisTeamIs (TEAM_STRIntScout)) IF (UnderAttack (SHIPS_AttackingSTRIntScout)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRIntScout, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRIntScout, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRIntScout) > 0) MsgSendAll ("STRIntIsUnderAttack"); ENDIF ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (UnderAttack (SHIPS_AttackingSTRIntInt)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRIntScout, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRIntScout, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRIntScout) > 0) MsgSendAll ("STRIntIsUnderAttack"); ENDIF ENDIF ENDIF // if at least one group of ships is underattack, jump BOTH teams to the AttackNearby state IF (MsgReceived ("STRIntIsUnderAttack")) ShipsClear (SHIPS_STRIntFleetATTACK); Jump AttackNearby; ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRIntFleetATTACK) = 0) ShipsClear (SHIPS_STRIntFleetATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackFleetAtMothership state IF (Nearby (SHIPSPOINT_STRIntFleetATTACK, 14000)) Jump AttackFleetAtMothership; ENDIF ENDWATCH ENDSTATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (SHIPS_AttackingSTRIntScout) > 0) ShipsSelectClass (SHIPS_STRIntNearbyFighters, SHIPS_AttackingSTRIntScout, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRIntNearbyFrigates, SHIPS_AttackingSTRIntScout, "CLASS_Frigate"); IF (ShipsCount (SHIPS_STRIntNearbyFighters) > 0) // Attack Fighters first IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxClear (); TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsAggressive (); ENDIF ShipsAdd (SHIPS_STRIntNearbyATTACK, SHIPS_STRIntNearbyFighters); ELSEIF (ShipsCount (SHIPS_STRIntNearbyFrigates) > 0) // Attack Frigates second IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxClear (); TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsNeutral (); ENDIF ShipsAdd (SHIPS_STRIntNearbyATTACK, SHIPS_STRIntNearbyFrigates); ELSEIF (ShipsCount (SHIPS_AttackingSTRInt) > 0) // Attack everything else third TeamVelocityMaxClear (); TacticsNeutral (); ShipsAdd (SHIPS_STRIntNearbyATTACK, SHIPS_AttackingSTRInt); ELSE //Print ("Scout Retaliate: THERE's NO ONE TO ATTACK!!!!"); ShipsClear (SHIPS_STRIntNearbyATTACK); Jump Decide; ENDIF ELSEIF (ShipsCount (SHIPS_AttackingSTRIntInt) > 0) ShipsSelectClass (SHIPS_STRIntNearbyFighters, SHIPS_AttackingSTRIntInt, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRIntNearbyFrigates, SHIPS_AttackingSTRIntInt, "CLASS_Frigate"); IF (ShipsCount (SHIPS_STRIntNearbyFighters) > 0) // Attack Fighters first IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxClear (); TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsAggressive (); ENDIF ShipsAdd (SHIPS_STRIntNearbyATTACK, SHIPS_STRIntNearbyFighters); ELSEIF (ShipsCount (SHIPS_STRIntNearbyFrigates) > 0) // Attack Frigates second IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxClear (); TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsNeutral (); ENDIF ShipsAdd (SHIPS_STRIntNearbyATTACK, SHIPS_STRIntNearbyFrigates); ELSEIF (ShipsCount (SHIPS_AttackingSTRInt) > 0) // Attack everything else third TeamVelocityMaxClear (); TacticsNeutral (); ShipsAdd (SHIPS_STRIntNearbyATTACK, SHIPS_AttackingSTRInt); ELSE //Print ("Int Retaliate: THERE's NO ONE TO ATTACK!!!!"); ShipsClear (SHIPS_STRIntNearbyATTACK); Jump Decide; ENDIF ELSE //Print ("You're NOT under attack, DUMMY!"); ShipsClear (SHIPS_STRIntNearbyATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection Attack (SHIPS_STRIntNearbyATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRIntNearbyATTACK); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRIntNearbyATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRIntNearbyATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRIntNearbyATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRIntScout)) IF (ShipsOrder (TEAMSHIPS_STRIntScout) != 2) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (ShipsOrder (TEAMSHIPS_STRIntInt) != 2) Jump Decide; ENDIF ENDIF // if BOTH teams are not underattack anymore, go back to Decide IF (ThisTeamIs (TEAM_STRIntScout)) IF (NOT UnderAttack (SHIPS_AttackingSTRIntScout)) VarCreateSet ("G_IntScoutsAreFree", TRUE); ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (NOT UnderAttack (SHIPS_AttackingSTRIntInt)) VarCreateSet ("G_IntIntsAreFree", TRUE); ENDIF ENDIF IF ( (VarGet ("G_IntScoutsAreFree") = TRUE) AND (VarGet ("G_IntIntsAreFree") = TRUE) ) VarDestroy ("G_IntScoutsAreFree"); VarDestroy ("G_IntIntsAreFree"); //Print ("I'M NOT UNDERATTACK ANYMORE!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRIntNearbyATTACK); Jump Decide; ENDIF ENDWATCH ENDSTATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (SHIPS_STRIntWorldNearbyFighters) > 0) // Attack Fighters first TeamVelocityMaxClear (); IF (ThisTeamIs (TEAM_STRIntScout)) TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsAggressive (); ENDIF ShipsAdd (SHIPS_STRIntWorldATTACK, SHIPS_STRIntWorldNearbyFighters); ELSEIF (ShipsCount (SHIPS_STRIntWorldNearbyFrigates) > 0) // Attack Frigates second IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxClear (); TacticsEvasive (); ELSEIF (ThisTeamIs (TEAM_STRIntInt)) TeamVelocityMaxClear (); TacticsNeutral (); ENDIF ShipsAdd (SHIPS_STRIntWorldATTACK, SHIPS_STRIntWorldNearbyFrigates); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRIntWorldATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection Attack (SHIPS_STRIntWorldATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRIntWorldATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRIntWorldATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRIntWorldATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRIntWorldATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRIntScout)) IF (ShipsOrder (TEAMSHIPS_STRIntScout) != 2) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (ShipsOrder (TEAMSHIPS_STRIntInt) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRIntWorldATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToRestOfWorld; ENDIF ENDWATCH ENDSTATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRIntScout)) TeamVelocityMaxSet (800); // Set the velocity of the Scouts = to the Interceptors so they'll travel together ENDIF TacticsNeutral (); //FormationDelta3D (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRIntWorldATTACK); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRIntWorldATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRIntScout)) IF (ShipsOrder (TEAMSHIPS_STRIntScout) != 2) Jump Decide; ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (ShipsOrder (TEAMSHIPS_STRIntInt) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (ThisTeamIs (TEAM_STRIntScout)) IF (UnderAttack (SHIPS_AttackingSTRIntScout)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRIntScout, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRIntScout, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRIntScout) > 0) MsgSendAll ("STRIntIsUnderAttack"); ENDIF ENDIF ELSEIF (ThisTeamIs (TEAM_STRIntInt)) IF (UnderAttack (SHIPS_AttackingSTRIntInt)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRIntScout, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRIntScout, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRIntScout) > 0) MsgSendAll ("STRIntIsUnderAttack"); ENDIF ENDIF ENDIF // if at least one group of ships is underattack, jump BOTH teams to the AttackNearby state IF (MsgReceived ("STRIntIsUnderAttack")) ShipsClear (SHIPS_STRIntWorldATTACK); Jump AttackNearby; ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRIntWorldATTACK) = 0) ShipsClear (SHIPS_STRIntWorldATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackRestOfWorld state IF (Nearby (SHIPSPOINT_STRIntWorldATTACK, 14000)) Jump AttackRestOfWorld; ENDIF ENDWATCH ENDSTATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_Carrier); TimerCreateSetStart ("GoDecideAgain", 30); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF IF (TimerExpiredDestroy ("GoDecideAgain")) // Every 30 seconds, jump to the Decide state and check the state of the universe Jump Decide; ENDIF ENDWATCH ENDSTATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT DockStay (TEAM_Carrier); // Dock with the Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF (TeamDockedReadyForLaunch ()) // When you're all in AND repaired AND refuelled, then Launch Jump Launch; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies on your way there, go decide Jump Decide; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); // Get outta the Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF (TeamFinishedLaunching ()) // When you're done launching, go decide Jump Decide; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies while launching, go decide Jump Decide; ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM STRInterceptors //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRInterceptors ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRBombers ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM STRBombers States WaitForLaunchOrder, Build, Decide, Guard, OnTheMoveToMothership, AttackNearby, AttackFleetAtMothership, AttackRestOfWorld, OnTheMoveToRestOfWorld, GuardCarrier, Dock, Launch, NullState; INIT VarCreateSet ("G_STRBomFrigateIndex", 0); VarCreateSet ("G_STRBomDestroyerIndex", 0); VarCreateSet ("G_STRBomFrigSelectionExhausted", FALSE); VarCreateSet ("G_STRBomDesSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDINIT WATCH IF (ThisTeamIs (TEAM_STRBomberAT)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ELSEIF (ThisTeamIs (TEAM_STRBomberHC)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ENDIF ENDWATCH STATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRBomberAT)) VarCreateSet ("G_STRBomberATREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF IF (ThisTeamIs (TEAM_STRBomberHC)) VarCreateSet ("G_STRBomberHCREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF ENDINIT WATCH IF (VarGet ("G_STRBombersLAUNCH") = TRUE) VarDestroy ("G_STRBomberATREADY"); VarDestroy ("G_STRBomberHCREADY"); Jump Build; ENDIF ENDWATCH ENDSTATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRBomberAT)) VarCreateSet ("G_STRBomberATBuilding", TRUE); ENDIF IF (ThisTeamIs (TEAM_STRBomberHC)) VarCreateSet ("G_STRBomberHCBuilding", TRUE); ENDIF VarCreateSet ("G_STRBomberATNewships", 0); VarCreateSet ("G_STRBomberHCNewships", 0); VarCreateSet ("G_STRBombersToRequest", 0); VarCreateSet ("G_STRCorvsToRequest", 0); // Request between 5 and 10 Attack Bombers depending on the size of the TestTeam VarSet ("G_STRBombersToRequest", (5 + (10*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRBombersToRequest", 10); // Request between 2 and 6 Heavy Corvettes depending on the size of the TestTeam VarSet ("G_STRCorvsToRequest", (2 + (4*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRCorvsToRequest", 4); IF (ThisTeamIs (TEAM_STRBomberAT)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 85*(VarGet ("G_STRBombersToRequest")))); // Set RUs = Current RUs + Amount req'd to build Attack Bombers RequestShips ("AttackBomber", VarGet ("G_STRBombersToRequest")); ENDIF ELSEIF (ThisTeamIs (TEAM_STRBomberHC)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 260*(VarGet ("G_STRCorvsToRequest")))); // Set RUs = Current RUs + Amount req'd to build Heavy Corvettes RequestShips ("HeavyCorvette", VarGet ("G_STRCorvsToRequest")); ENDIF ENDIF VarDestroy ("G_STRBomberTeamIsBuilt"); ENDINIT WATCH // watch everywhere stuff //IF (ShipsCount (THISTEAMSHIPS) = 0) // Jump WaitForLaunchOrder; //ENDIF IF ( (VarGet ("G_STRBomberATBuilding") = TRUE) AND (VarGet ("G_STRBomberHCBuilding") = TRUE) ) VarDestroy ("G_STRBombersLAUNCH"); VarDestroy ("G_STRBomberATBuilding"); VarDestroy ("G_STRBomberHCBuilding"); ENDIF // Watch to see when both teams have their ships IF (ThisTeamIs (TEAM_STRBomberAT)) VarSet ("G_STRBomberATNewships", VarGet ("G_STRBomberATNewships") + NewShipsAdded ()); ELSEIF (ThisTeamIs (TEAM_STRBomberHC)) VarSet ("G_STRBomberHCNewships", VarGet ("G_STRBomberHCNewships") + NewShipsAdded ()); ENDIF // When both teams have their ships OR the Carrier dies, then off they go IF ( ((VarGet ("G_STRBomberATNewships") = VarGet ("G_STRBombersToRequest")) AND (VarGet ("G_STRBomberHCNewships") = VarGet ("G_STRCorvsToRequest"))) OR ((ShipsCount (TEAMSHIPS_Carrier) = 0) AND ((ShipsCount (TEAMSHIPS_STRBomberAT) > 0) OR (ShipsCount (TEAMSHIPS_STRBomberHC) > 0))) ) IF (ThisTeamIs (TEAM_STRBomberAT)) VarCreateSet ("G_STRBomberTeamIsBuilt", TRUE); Jump Decide; ELSEIF (ThisTeamIs (TEAM_STRBomberHC)) Jump Guard; ENDIF ENDIF ENDWATCH ENDSTATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FormationClaw (); // Do this for option 1) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetAtMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRBomberFrigates, SHIPS_FleetAtMothership, "CLASS_Frigate"); ShipsSelectClass (SHIPS_STRBomberDestroyer, SHIPS_FleetAtMothership, "CLASS_Destroyer"); // Do this for option 2) //Print ("Bomber: I'm SELECTING the Single Frigate and Destroyer now!!!!"); FindEnemiesInside (VOLUME_WorldVolume, SHIPS_AllShipsInWorld, 1000); ShipsSelectClass (SHIPS_Mothership, SHIPS_AllShipsInWorld, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AllShipsInWorld, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSAllShipsInWorld", ShipsCount (SHIPS_AllShipsInWorld)); ShipsSelectClass (SHIPS_STRBomWorldFrigates, SHIPS_AllShipsInWorld, "CLASS_Frigate"); //VarCreateSet ("G_SHIPSSTRBomWorldFrigates", ShipsCount (SHIPS_STRBomWorldFrigates)); ShipsSelectClass (SHIPS_STRBomWorldDestroyers, SHIPS_AllShipsInWorld, "CLASS_Destroyer"); //VarCreateSet ("G_SHIPSSTRBomWorldDestroyers", ShipsCount (SHIPS_STRBomWorldDestroyers)); IF (ShipsSelectIndex (SHIPS_STRBomSingleFrigate, SHIPS_STRBomWorldFrigates, VarGet ("G_STRBomFrigateIndex"))) //VarCreateSet ("G_SHIPSSTRBomSingleFrigate", ShipsCount (SHIPS_STRBomSingleFrigate)); FindEnemiesNearTeam (SHIPS_STRBomSingleFrigate, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRBomSingleFrigate, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRBomSingleFrigate, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRBomSingleFrigateNearby", ShipsCount (SHIPS_STRBomSingleFrigate)); ShipsSelectClass (SHIPS_STRBomWorldNearbyFrigates, SHIPS_STRBomSingleFrigate, "CLASS_Frigate"); VarInc ("G_STRBomFrigateIndex"); ELSE VarSet ("G_STRBomFrigSelectionExhausted", TRUE); ENDIF IF (ShipsSelectIndex (SHIPS_STRBomSingleDestroyer, SHIPS_STRBomWorldDestroyers, VarGet ("G_STRBomDestroyerIndex"))) //VarCreateSet ("G_SHIPSSTRBomSingleDestroyer", ShipsCount (SHIPS_STRBomSingleDestroyer)); FindEnemiesNearTeam (SHIPS_STRBomSingleDestroyer, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRBomSingleDestroyer, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRBomSingleDestroyer, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRBomSingleDesNearby", ShipsCount (SHIPS_STRBomSingleDestroyer)); ShipsSelectClass (SHIPS_STRBomWorldNearbyDes, SHIPS_STRBomSingleDestroyer, "CLASS_Destroyer"); VarInc ("G_STRBomDestroyerIndex"); ELSE VarSet ("G_STRBomDesSelectionExhausted", TRUE); ENDIF // here where you decide where to go: // 1) Attack the fleet at the Mothership // 2) Attack pockets of ships in the rest of the world // 3) Guard the Carrier // 4) Kamikaze the Mothership // 1) At the Mothership: If there are 500 RUs worth of Frigates or Destroyers, go AttackFleetAtMothership IF ( (612*(ShipsCount (SHIPS_STRBomberFrigates)) + 1425*(ShipsCount (SHIPS_STRBomberDestroyer))) > 500) VarSet ("G_STRBomFrigateIndex", 0); VarSet ("G_STRBomDestroyerIndex", 0); VarSet ("G_STRBomFrigSelectionExhausted", FALSE); VarSet ("G_STRBomDesSelectionExhausted", FALSE); Jump AttackFleetAtMothership; // 2) Rest of World: If there are 500 RUs worth of Frigates or Destroyers, go AttackRestOfWorld ELSEIF ( (NOT VarGet ("G_STRBomFrigSelectionExhausted")) OR (NOT VarGet ("G_STRBomDesSelectionExhausted")) ) IF ( (612*(ShipsCount (SHIPS_STRBomWorldNearbyFrigates)) + 1425*(ShipsCount (SHIPS_STRBomWorldNearbyDes))) > 500) VarSet ("G_STRBomFrigateIndex", 0); VarSet ("G_STRBomDestroyerIndex", 0); VarSet ("G_STRBomFrigSelectionExhausted", FALSE); VarSet ("G_STRBomDesSelectionExhausted", FALSE); Jump AttackRestOfWorld; ELSE Jump Decide; ENDIF ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) // If the Carrier's still alive, Guard it VarSet ("G_STRBomFrigateIndex", 0); VarSet ("G_STRBomDestroyerIndex", 0); VarSet ("G_STRBomFrigSelectionExhausted", FALSE); VarSet ("G_STRBomDesSelectionExhausted", FALSE); Jump GuardCarrier; ELSE VarSet ("G_STRBomFrigateIndex", 0); VarSet ("G_STRBomDestroyerIndex", 0); VarSet ("G_STRBomFrigSelectionExhausted", FALSE); VarSet ("G_STRBomDesSelectionExhausted", FALSE); FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); VarCreateSet ("STRBomberHCKamikazeNow", TRUE); Kamikaze (SHIPS_PlayerMothership); // If there are no places left to go, kamikaze the Mothership Jump NullState; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) VarSet ("G_STRBomFrigateIndex", 0); VarSet ("G_STRBomDestroyerIndex", 0); VarSet ("G_STRBomFrigSelectionExhausted", FALSE); VarSet ("G_STRBomDesSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) VarSet ("G_STRBomFrigateIndex", 0); VarSet ("G_STRBomDestroyerIndex", 0); VarSet ("G_STRBomFrigSelectionExhausted", FALSE); VarSet ("G_STRBomDesSelectionExhausted", FALSE); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FormationBroad (); Guard (TEAMSHIPS_STRBomberAT); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // If the Bomber team decides to kamikaze itself, then do the same IF (VarGet ("STRBomberHCKamikazeNow") = TRUE) VarDestroy ("STRBomberHCKamikazeNow"); Kamikaze (SHIPS_PlayerMothership); Jump NullState; ENDIF // If the Bomber team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRBomberTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRBomberAT) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF ENDWATCH ENDSTATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_PlayerFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_PlayerFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_PlayerFleet, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRBomFleetFrigates, SHIPS_PlayerFleet, "CLASS_Frigate"); ShipsSelectClass (SHIPS_STRBomFleetDestroyers, SHIPS_PlayerFleet, "CLASS_Destroyer"); IF (ShipsCount (SHIPS_STRBomFleetFrigates) > 0) // Attack Frigates first ShipsAdd (SHIPS_STRBomFleetATTACK, SHIPS_STRBomFleetFrigates); ELSEIF (ShipsCount (SHIPS_STRBomFleetDestroyers) > 0) // Attack Destroyers second ShipsAdd (SHIPS_STRBomFleetATTACK, SHIPS_STRBomFleetDestroyers); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRBomFleetATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection TeamVelocityMaxClear (); TacticsNeutral (); Attack (SHIPS_STRBomFleetATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRBomFleetATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRBomFleetATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRBomFleetATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRBomFleetATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRBomberAT)) IF (ShipsOrder (TEAMSHIPS_STRBomberAT) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRBomFleetATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToMothership; ENDIF ENDWATCH ENDSTATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRBomberAT)) TeamVelocityMaxSet (520); // Set the velocity of the Bombers = to the HCorvettes so they'll travel together ENDIF TacticsNeutral (); //FormationDelta3D (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRBomFleetATTACK); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRBomFleetATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRBomberAT)) IF (ShipsOrder (TEAMSHIPS_STRBomberAT) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRBombers)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRBombers, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRBombers, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRBombers) > 0) ShipsClear (SHIPS_STRBomFleetATTACK); Jump AttackNearby; ENDIF ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRBomFleetATTACK) = 0) ShipsClear (SHIPS_STRBomFleetATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackFleetAtMothership state IF (Nearby (SHIPSPOINT_STRBomFleetATTACK, 14000)) Jump AttackFleetAtMothership; ENDIF ENDWATCH ENDSTATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ShipsSelectClass (SHIPS_STRBomNearbyFrigates, SHIPS_AttackingSTRBombers, "CLASS_Frigate"); ShipsSelectClass (SHIPS_STRBomNearbyDestroyers, SHIPS_AttackingSTRBombers, "CLASS_Destroyer"); IF (ShipsCount (SHIPS_STRBomNearbyFrigates) > 0) // Attack Frigates first ShipsAdd (SHIPS_STRBomNearbyATTACK, SHIPS_STRBomNearbyFrigates); ELSEIF (ShipsCount (SHIPS_STRBomNearbyDestroyers) > 0) // Attack Destroyers second ShipsAdd (SHIPS_STRBomNearbyATTACK, SHIPS_STRBomNearbyDestroyers); ELSEIF (ShipsCount (SHIPS_AttackingSTRBombers) > 0) // Attack everything else third ShipsAdd (SHIPS_STRBomNearbyATTACK, SHIPS_AttackingSTRBombers); ELSE //Print ("Scout Retaliate: THERE's NO ONE TO ATTACK!!!!"); ShipsClear (SHIPS_STRBomNearbyATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection TeamVelocityMaxClear (); TacticsNeutral (); Attack (SHIPS_STRBomNearbyATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRBomNearbyATTACK); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRBomNearbyATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRBomNearbyATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRBomNearbyATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRBomberAT)) IF (ShipsOrder (TEAMSHIPS_STRBomberAT) != 2) Jump Decide; ENDIF ENDIF // if Attack Bombers are not underattack anymore, go back to Decide IF (NOT UnderAttack (SHIPS_AttackingSTRBombers)) //Print ("I'M NOT UNDERATTACK ANYMORE!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRBomNearbyATTACK); Jump Decide; ENDIF ENDWATCH ENDSTATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (SHIPS_STRBomWorldNearbyFrigates) > 0) // Attack Frigates first TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRBomWorldATTACK, SHIPS_STRBomWorldNearbyFrigates); ELSEIF (ShipsCount (SHIPS_STRBomWorldNearbyDes) > 0) // Attack Destroyers second TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRBomWorldATTACK, SHIPS_STRBomWorldNearbyDes); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRBomWorldATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection Attack (SHIPS_STRBomWorldATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRBomWorldATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRBomWorldATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRBomWorldATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRBomWorldATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRBomberAT)) IF (ShipsOrder (TEAMSHIPS_STRBomberAT) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRBomWorldATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToRestOfWorld; ENDIF ENDWATCH ENDSTATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRBomberAT)) TeamVelocityMaxSet (520); // Set the velocity of the Bombers = to the HCorvettes so they'll travel together ENDIF TacticsNeutral (); //FormationDelta3D (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRBomWorldATTACK); Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) ShipsClear (SHIPS_STRBomWorldATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRBomberAT)) IF (ShipsOrder (TEAMSHIPS_STRBomberAT) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRBombers)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRBombers, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRBombers, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRBombers) > 0) ShipsClear (SHIPS_STRBomWorldATTACK); Jump AttackNearby; ENDIF ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRBomWorldATTACK) = 0) ShipsClear (SHIPS_STRBomWorldATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackRestOfWorld state IF (Nearby (SHIPSPOINT_STRBomWorldATTACK, 14000)) Jump AttackRestOfWorld; ENDIF ENDWATCH ENDSTATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_Carrier); TimerCreateSetStart ("GoDecideAgain", 30); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_Carrier) > 0) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF IF (TimerExpiredDestroy ("GoDecideAgain")) // Every 30 seconds, jump to the Decide state and check the state of the universe Jump Decide; ENDIF ENDWATCH ENDSTATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT DockStay (TEAM_Carrier); // Dock with the Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF (TeamDockedReadyForLaunch ()) // When you're all in AND repaired AND refuelled, then Launch Jump Launch; ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies on your way there, go decide IF (ThisTeamIs (TEAM_STRBomberAT)) Jump Decide; ELSEIF (ThisTeamIs (TEAM_STRBomberHC)) Jump Guard; ENDIF ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); // Get outta the Carrier ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF (TeamFinishedLaunching ()) // When you're done launching, go decide IF (ThisTeamIs (TEAM_STRBomberAT)) Jump Decide; ELSEIF (ThisTeamIs (TEAM_STRBomberHC)) Jump Guard; ENDIF ENDIF IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies while launching, go decide IF (ThisTeamIs (TEAM_STRBomberAT)) Jump Decide; ELSEIF (ThisTeamIs (TEAM_STRBomberHC)) Jump Guard; ENDIF ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM STRBombers //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRBombers ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRMG ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM STRMG States WaitForLaunchOrder, Build, Decide, Guard, OnTheMoveToMothership, AttackNearby, AttackFleetAtMothership, AttackRestOfWorld, OnTheMoveToRestOfWorld, GuardCarrier, Dock, Launch, NullState; INIT VarCreateSet ("G_STRMGFighterIndex", 0); VarCreateSet ("G_STRMGCorvetteIndex", 0); VarCreateSet ("G_STRMGFightSelectionExhausted", FALSE); VarCreateSet ("G_STRMGCorvSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDINIT WATCH IF (ThisTeamIs (TEAM_STRMGMG)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ELSEIF (ThisTeamIs (TEAM_STRMGSF)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ENDIF ENDWATCH STATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRMGMG)) VarCreateSet ("G_STRMGMGREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF IF (ThisTeamIs (TEAM_STRMGSF)) VarCreateSet ("G_STRMGSFREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF ENDINIT WATCH IF (VarGet ("G_STRMGLAUNCH") = TRUE) VarDestroy ("G_STRMGMGREADY"); VarDestroy ("G_STRMGSFREADY"); Jump Build; ENDIF ENDWATCH ENDSTATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRMGMG)) VarCreateSet ("G_STRMGMGBuilding", TRUE); ENDIF IF (ThisTeamIs (TEAM_STRMGSF)) VarCreateSet ("G_STRMGSFBuilding", TRUE); ENDIF VarCreateSet ("G_STRMGMGNewships", 0); VarCreateSet ("G_STRMGSFNewships", 0); VarCreateSet ("G_STRMGsToRequest", 0); VarCreateSet ("G_STRSFsToRequest", 0); // Request between 5 and 15 MultiGun Corvettes depending on the size of the TestTeam VarSet ("G_STRMGsToRequest", (5 + (10*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRMGsToRequest", 10); // Request between 1 and 2 Support Frigates depending on the size of the TestTeam VarSet ("G_STRSFsToRequest", (1 + (1*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRSFsToRequest", 1); IF (ThisTeamIs (TEAM_STRMGMG)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 225*(VarGet ("G_STRMGsToRequest")))); // Set RUs = Current RUs + Amount req'd to build MultiGun Corvettes RequestShips ("MultiGunCorvette", VarGet ("G_STRMGsToRequest")); ENDIF ELSEIF (ThisTeamIs (TEAM_STRMGSF)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 425*(VarGet ("G_STRSFsToRequest")))); // Set RUs = Current RUs + Amount req'd to build the Support Frigate RequestShips ("AdvanceSupportFrigate", VarGet ("G_STRSFsToRequest")); ENDIF ENDIF VarDestroy ("G_STRMGMGTeamIsBuilt"); // This variable used by the guarding team to see when the MG team is built ENDINIT WATCH // watch everywhere stuff //IF (ShipsCount (THISTEAMSHIPS) = 0) // Jump WaitForLaunchOrder; //ENDIF IF ( (VarGet ("G_STRMGMGBuilding") = TRUE) AND (VarGet ("G_STRMGSFBuilding") = TRUE) ) VarDestroy ("G_STRMGLAUNCH"); VarDestroy ("G_STRMGMGBuilding"); VarDestroy ("G_STRMGSFBuilding"); ENDIF // Watch to see when both teams have their ships IF (ThisTeamIs (TEAM_STRMGMG)) VarSet ("G_STRMGMGNewships", VarGet ("G_STRMGMGNewships") + NewShipsAdded ()); ELSEIF (ThisTeamIs (TEAM_STRMGSF)) VarSet ("G_STRMGSFNewships", VarGet ("G_STRMGSFNewships") + NewShipsAdded ()); ENDIF // When both teams have their ships OR the Carrier dies, then off they go IF ( ((VarGet ("G_STRMGMGNewships") = VarGet ("G_STRMGsToRequest")) AND (VarGet ("G_STRMGSFNewships") = VarGet ("G_STRSFsToRequest"))) OR ((ShipsCount (TEAMSHIPS_Carrier) = 0) AND ((ShipsCount (TEAMSHIPS_STRMGMG) > 0) OR (ShipsCount (TEAMSHIPS_STRMGSF) > 0))) ) IF (ThisTeamIs (TEAM_STRMGMG)) VarCreateSet ("G_STRMGMGTeamIsBuilt", TRUE); // This variable used by the guarding team to see when the MG team is built Jump Decide; ELSEIF (ThisTeamIs (TEAM_STRMGSF)) Jump Guard; ENDIF ENDIF ENDWATCH ENDSTATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FormationClaw (); TacticsEvasive (); // Do this for option 1) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetAtMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRMGFighters, SHIPS_FleetAtMothership, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRMGCorvettes, SHIPS_FleetAtMothership, "CLASS_Corvette"); // Do this for option 2) //Print ("MultiGun: I'm SELECTING the Single Frigate and Destroyer now!!!!"); FindEnemiesInside (VOLUME_WorldVolume, SHIPS_AllShipsInWorld, 1000); ShipsSelectClass (SHIPS_Mothership, SHIPS_AllShipsInWorld, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AllShipsInWorld, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSAllShipsInWorld", ShipsCount (SHIPS_AllShipsInWorld)); ShipsSelectClass (SHIPS_STRMGWorldFighters, SHIPS_AllShipsInWorld, "CLASS_Fighter"); //VarCreateSet ("G_SHIPSSTRMGWorldFighters", ShipsCount (SHIPS_STRMGWorldFighters)); ShipsSelectClass (SHIPS_STRMGWorldCorvettes, SHIPS_AllShipsInWorld, "CLASS_Corvette"); //VarCreateSet ("G_SHIPSSTRMGWorldCorvettes", ShipsCount (SHIPS_STRMGWorldCorvettes)); IF (ShipsSelectIndex (SHIPS_STRMGSingleFighter, SHIPS_STRMGWorldFighters, VarGet ("G_STRMGFighterIndex"))) //VarCreateSet ("G_SHIPSSTRMGSingleFighter", ShipsCount (SHIPS_STRMGSingleFighter)); FindEnemiesNearTeam (SHIPS_STRMGSingleFighter, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRMGSingleFighter, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRMGSingleFighter, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRMGSingleFighterNearby", ShipsCount (SHIPS_STRMGSingleFighter)); ShipsSelectClass (SHIPS_STRMGWorldNearbyFighters, SHIPS_STRMGSingleFighter, "CLASS_Fighter"); VarInc ("G_STRMGFighterIndex"); ELSE VarSet ("G_STRMGFightSelectionExhausted", TRUE); ENDIF IF (ShipsSelectIndex (SHIPS_STRMGSingleCorvette, SHIPS_STRMGWorldCorvettes, VarGet ("G_STRMGCorvetteIndex"))) //VarCreateSet ("G_SHIPSSTRMGSingleCorvette", ShipsCount (SHIPS_STRMGSingleCorvette)); FindEnemiesNearTeam (SHIPS_STRMGSingleCorvette, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRMGSingleCorvette, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRMGSingleCorvette, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRMGSingleCorvNearby", ShipsCount (SHIPS_STRMGSingleCorvette)); ShipsSelectClass (SHIPS_STRMGWorldNearbyCorv, SHIPS_STRMGSingleCorvette, "CLASS_Corvette"); VarInc ("G_STRMGCorvetteIndex"); ELSE VarSet ("G_STRMGCorvSelectionExhausted", TRUE); ENDIF // here where you decide where to go: // 1) Attack the fleet at the Mothership // 2) Attack pockets of ships in the rest of the world // 3) Guard the Carrier // 4) Kamikaze the Mothership // 1) At the Mothership: If there are 300 RUs worth of Fighters or Corvettes, go AttackFleetAtMothership IF ( (62*(ShipsCount (SHIPS_STRMGFighters)) + 222*(ShipsCount (SHIPS_STRMGCorvettes))) > 300) VarSet ("G_STRMGFighterIndex", 0); VarSet ("G_STRMGCorvetteIndex", 0); VarSet ("G_STRMGFightSelectionExhausted", FALSE); VarSet ("G_STRMGCorvSelectionExhausted", FALSE); Jump AttackFleetAtMothership; // 2) Rest of World: If there are 300 RUs worth of Fighters or Corvettes, go AttackRestOfWorld ELSEIF ( (NOT VarGet ("G_STRMGFightSelectionExhausted")) OR (NOT VarGet ("G_STRMGCorvSelectionExhausted")) ) IF ( (62*(ShipsCount (SHIPS_STRMGWorldNearbyFighters)) + 222*(ShipsCount (SHIPS_STRMGWorldNearbyCorv))) > 300) VarSet ("G_STRMGFighterIndex", 0); VarSet ("G_STRMGCorvetteIndex", 0); VarSet ("G_STRMGFightSelectionExhausted", FALSE); VarSet ("G_STRMGCorvSelectionExhausted", FALSE); Jump AttackRestOfWorld; ELSE Jump Decide; ENDIF ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) // If the Carrier's still alive, Guard it VarSet ("G_STRMGFighterIndex", 0); VarSet ("G_STRMGCorvetteIndex", 0); VarSet ("G_STRMGFightSelectionExhausted", FALSE); VarSet ("G_STRMGCorvSelectionExhausted", FALSE); Jump GuardCarrier; ELSE VarSet ("G_STRMGFighterIndex", 0); VarSet ("G_STRMGCorvetteIndex", 0); VarSet ("G_STRMGFightSelectionExhausted", FALSE); VarSet ("G_STRMGCorvSelectionExhausted", FALSE); FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_PlayerMothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); VarCreateSet ("STRMGSFKamikazeNow", TRUE); Kamikaze (SHIPS_PlayerMothership); // If there are no places left to go, kamikaze the Mothership Jump NullState; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) VarSet ("G_STRMGFighterIndex", 0); VarSet ("G_STRMGCorvetteIndex", 0); VarSet ("G_STRMGFightSelectionExhausted", FALSE); VarSet ("G_STRMGCorvSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDIF IF ( ((TeamHealthAverage () < 40) OR (TeamFuelLowest () < 25)) AND ((ShipsCount (TEAMSHIPS_STRMGSF) > 0) OR (ShipsCount (TEAMSHIPS_Carrier) > 0)) ) VarSet ("G_STRMGFighterIndex", 0); VarSet ("G_STRMGCorvetteIndex", 0); VarSet ("G_STRMGFightSelectionExhausted", FALSE); VarSet ("G_STRMGCorvSelectionExhausted", FALSE); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_STRMGMG); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // If the MultiGun team decides to kamikaze itself, then hyperspace out IF (VarGet ("STRMGSFKamikazeNow") = TRUE) VarDestroy ("STRMGSFKamikazeNow"); TeamHyperspaceOut (); Jump NullState; ENDIF // If the MultiGun team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRMGMGTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRMGMG) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF ENDWATCH ENDSTATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_PlayerFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_PlayerFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_PlayerFleet, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRMGFleetFighters, SHIPS_PlayerFleet, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRMGFleetCorvettes, SHIPS_PlayerFleet, "CLASS_Corvette"); IF (ShipsCount (SHIPS_STRMGFleetFighters) > 0) // Attack Fighters first ShipsAdd (SHIPS_STRMGFleetATTACK, SHIPS_STRMGFleetFighters); ELSEIF (ShipsCount (SHIPS_STRMGFleetCorvettes) > 0) // Attack Corvettes second ShipsAdd (SHIPS_STRMGFleetATTACK, SHIPS_STRMGFleetCorvettes); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRMGFleetATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection TeamVelocityMaxClear (); TacticsEvasive (); Attack (SHIPS_STRMGFleetATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRMGFleetATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF IF ( ((TeamHealthAverage () < 40) OR (TeamFuelLowest () < 25)) AND ((ShipsCount (TEAMSHIPS_STRMGSF) > 0) OR (ShipsCount (TEAMSHIPS_Carrier) > 0)) ) ShipsClear (SHIPS_STRMGFleetATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRMGFleetATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRMGFleetATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRMGMG)) IF (ShipsOrder (TEAMSHIPS_STRMGMG) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRMGFleetATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToMothership; ENDIF ENDWATCH ENDSTATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRMGMG)) TeamVelocityMaxSet (450); // Set the velocity of the MultiGuns = to the Support Frigate so they'll travel together ENDIF TacticsNeutral (); //FormationClaw (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRMGFleetATTACK); Jump WaitForLaunchOrder; ENDIF IF ( ((TeamHealthAverage () < 40) OR (TeamFuelLowest () < 25)) AND ((ShipsCount (TEAMSHIPS_STRMGSF) > 0) OR (ShipsCount (TEAMSHIPS_Carrier) > 0)) ) ShipsClear (SHIPS_STRMGFleetATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRMGMG)) IF (ShipsOrder (TEAMSHIPS_STRMGMG) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRMGs)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRMGs, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRMGs, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRMGs) > 0) ShipsClear (SHIPS_STRMGFleetATTACK); Jump AttackNearby; ENDIF ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRMGFleetATTACK) = 0) ShipsClear (SHIPS_STRMGFleetATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackFleetAtMothership state IF (Nearby (SHIPSPOINT_STRMGFleetATTACK, 14000)) Jump AttackFleetAtMothership; ENDIF ENDWATCH ENDSTATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ShipsSelectClass (SHIPS_STRMGNearbyFighters, SHIPS_AttackingSTRMGs, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRMGNearbyCorvettes, SHIPS_AttackingSTRMGs, "CLASS_Corvette"); IF (ShipsCount (SHIPS_STRMGNearbyFighters) > 0) // Attack Fighters first ShipsAdd (SHIPS_STRMGNearbyATTACK, SHIPS_STRMGNearbyFighters); ELSEIF (ShipsCount (SHIPS_STRMGNearbyCorvettes) > 0) // Attack Corvettes second ShipsAdd (SHIPS_STRMGNearbyATTACK, SHIPS_STRMGNearbyCorvettes); ELSEIF (ShipsCount (SHIPS_AttackingSTRMGs) > 0) // Attack everything else third ShipsAdd (SHIPS_STRMGNearbyATTACK, SHIPS_AttackingSTRMGs); ELSE //Print ("MG Retaliate: THERE's NO ONE TO ATTACK!!!!"); ShipsClear (SHIPS_STRMGNearbyATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection TeamVelocityMaxClear (); TacticsNeutral (); Attack (SHIPS_STRMGNearbyATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRMGNearbyATTACK); Jump WaitForLaunchOrder; ENDIF IF ( ((TeamHealthAverage () < 40) OR (TeamFuelLowest () < 25)) AND ((ShipsCount (TEAMSHIPS_STRMGSF) > 0) OR (ShipsCount (TEAMSHIPS_Carrier) > 0)) ) ShipsClear (SHIPS_STRMGNearbyATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRMGNearbyATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRMGNearbyATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRMGMG)) IF (ShipsOrder (TEAMSHIPS_STRMGMG) != 2) Jump Decide; ENDIF ENDIF // if MultiGuns are not underattack anymore, go back to Decide IF (NOT UnderAttack (SHIPS_AttackingSTRMGs)) //Print ("I'M NOT UNDERATTACK ANYMORE!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRMGNearbyATTACK); Jump Decide; ENDIF ENDWATCH ENDSTATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (SHIPS_STRMGWorldNearbyFighters) > 0) // Attack Fighters first TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRMGWorldATTACK, SHIPS_STRMGWorldNearbyFighters); ELSEIF (ShipsCount (SHIPS_STRMGWorldNearbyCorv) > 0) // Attack Corvettes second TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRMGWorldATTACK, SHIPS_STRMGWorldNearbyCorv); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRMGWorldATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection //VarCreateSet ("G_SHIPSSTRMGWorldATTACK", ShipsCount (SHIPS_STRMGWorldATTACK)); Attack (SHIPS_STRMGWorldATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRMGWorldATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF IF ( ((TeamHealthAverage () < 40) OR (TeamFuelLowest () < 25)) AND ((ShipsCount (TEAMSHIPS_STRMGSF) > 0) OR (ShipsCount (TEAMSHIPS_Carrier) > 0)) ) ShipsClear (SHIPS_STRMGWorldATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRMGWorldATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRMGWorldATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRMGMG)) IF (ShipsOrder (TEAMSHIPS_STRMGMG) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRMGWorldATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToRestOfWorld; ENDIF ENDWATCH ENDSTATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRMGMG)) TeamVelocityMaxSet (450); // Set the velocity of the MultiGuns = to the Support Frigate so they'll travel together ENDIF TacticsNeutral (); //FormationClaw (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRMGWorldATTACK); Jump WaitForLaunchOrder; ENDIF IF ( ((TeamHealthAverage () < 40) OR (TeamFuelLowest () < 25)) AND ((ShipsCount (TEAMSHIPS_STRMGSF) > 0) OR (ShipsCount (TEAMSHIPS_Carrier) > 0)) ) ShipsClear (SHIPS_STRMGWorldATTACK); //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRMGMG)) IF (ShipsOrder (TEAMSHIPS_STRMGMG) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRMGs)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRMGs, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRMGs, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRMGs) > 0) ShipsClear (SHIPS_STRMGWorldATTACK); Jump AttackNearby; ENDIF ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRMGWorldATTACK) = 0) ShipsClear (SHIPS_STRMGWorldATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackRestOfWorld state IF (Nearby (SHIPSPOINT_STRMGWorldATTACK, 14000)) Jump AttackRestOfWorld; ENDIF ENDWATCH ENDSTATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_Carrier); TimerCreateSetStart ("GoDecideAgain", 30); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF ( ((TeamHealthAverage () < 40) OR (TeamFuelLowest () < 25)) AND ((ShipsCount (TEAMSHIPS_STRMGSF) > 0) OR (ShipsCount (TEAMSHIPS_Carrier) > 0)) ) //Print ("I'm OUT OF FUEL!------------"); Jump Dock; ENDIF IF (TimerExpiredDestroy ("GoDecideAgain")) // Every 30 seconds, jump to the Decide state and check the state of the universe Jump Decide; ENDIF ENDWATCH ENDSTATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (TEAMSHIPS_STRMGSF) > 0) DockStay (TEAM_STRMGSF); // Dock with the Support Frigate VarCreateSet ("DockingWithSupportFrigate", TRUE); ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) DockStay (TEAM_Carrier); // Dock with the Carrier VarCreateSet ("DockingWithCarrier", TRUE); ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) VarDestroy ("DockingWithSupportFrigate"); VarDestroy ("DockingWithCarrier"); Jump WaitForLaunchOrder; ENDIF IF (VarGet ("DockingWithSupportFrigate") = TRUE) IF (ShipsCount (TEAMSHIPS_STRMGSF) = 0) // If the Support Frigate dies on your way there, go Decide VarDestroy ("DockingWithSupportFrigate"); Jump Decide; ENDIF ELSEIF (VarGet ("DockingWithCarrier") = TRUE) IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies on your way there, go decide VarDestroy ("DockingWithCarrier"); Jump Decide; ENDIF ENDIF IF (TeamDockedReadyForLaunch ()) // When you're all in AND repaired AND refuelled, then Launch Jump Launch; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); // Get outta the Carrier or Support Frigate ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) VarDestroy ("DockingWithSupportFrigate"); VarDestroy ("DockingWithCarrier"); Jump WaitForLaunchOrder; ENDIF IF (TeamFinishedLaunching ()) // When you're done launching, go decide VarDestroy ("DockingWithSupportFrigate"); VarDestroy ("DockingWithCarrier"); Jump Decide; ENDIF IF (VarGet ("DockingWithSupportFrigate") = TRUE) IF (ShipsCount (TEAMSHIPS_STRMGSF) = 0) // If the Support Frigate dies while launching, go Decide VarDestroy ("DockingWithSupportFrigate"); Jump Decide; ENDIF ELSEIF (VarGet ("DockingWithCarrier") = TRUE) IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // If the Carrier dies while launching, go decide VarDestroy ("DockingWithCarrier"); Jump Decide; ENDIF ENDIF ENDWATCH ENDSTATE Launch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM STRMG //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRMG ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRGW ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM STRGW States WaitForLaunchOrder, Build, Decide, Guard, GuardGravityOn, GuardGravityOff, OnTheMoveToMothership, AttackNearby, AttackFleetAtMothership, AttackRestOfWorld, OnTheMoveToRestOfWorld, GuardCarrier, NullState; INIT VarCreateSet ("G_STRGWFighterIndex", 0); VarCreateSet ("G_STRGWCorvetteIndex", 0); VarCreateSet ("G_STRGWFightSelectionExhausted", FALSE); VarCreateSet ("G_STRGWCorvSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDINIT WATCH IF (ThisTeamIs (TEAM_STRGWIon)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ELSEIF (ThisTeamIs (TEAM_STRGWGrav)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ENDIF ENDWATCH STATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRGWIon)) VarCreateSet ("G_STRGWIonREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF IF (ThisTeamIs (TEAM_STRGWGrav)) VarCreateSet ("G_STRGWGravREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF ENDINIT WATCH IF (VarGet ("G_STRGWLAUNCH") = TRUE) VarDestroy ("G_STRGWIonREADY"); VarDestroy ("G_STRGWGravREADY"); Jump Build; ENDIF ENDWATCH ENDSTATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRGWIon)) VarCreateSet ("G_STRGWIonBuilding", TRUE); ENDIF IF (ThisTeamIs (TEAM_STRGWGrav)) VarCreateSet ("G_STRGWGravBuilding", TRUE); ENDIF VarCreateSet ("G_STRGWIonNewships", 0); VarCreateSet ("G_STRGWGravNewships", 0); VarCreateSet ("G_STRGWIonsToRequest", 0); VarCreateSet ("G_STRGWGWsToRequest", 0); // Request between 1 and 2 Ion Cannon Frigates depending on the size of the TestTeam VarSet ("G_STRGWIonsToRequest", (1 + (1*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRGWIonsToRequest", 1); // Request 1 Gravity Well Generator VarSet ("G_STRGWGWsToRequest", (1 + (0*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRGWGWsToRequest", 1); IF (ThisTeamIs (TEAM_STRGWIon)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 650*(VarGet ("G_STRGWIonsToRequest")))); // Set RUs = Current RUs + Amount req'd to build Ion Cannon Frigates RequestShips ("IonCannonFrigate", VarGet ("G_STRGWIonsToRequest")); ENDIF ELSEIF (ThisTeamIs (TEAM_STRGWGrav)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 600*(VarGet ("G_STRGWGWsToRequest")))); // Set RUs = Current RUs + Amount req'd to build the Gravity Well Genny RequestShips ("GravWellGenerator", VarGet ("G_STRGWGWsToRequest")); ENDIF ENDIF VarDestroy ("G_STRGWIonTeamIsBuilt"); ENDINIT WATCH // watch everywhere stuff //IF (ShipsCount (THISTEAMSHIPS) = 0) // Jump WaitForLaunchOrder; //ENDIF IF ( (VarGet ("G_STRGWIonBuilding") = TRUE) AND (VarGet ("G_STRGWGravBuilding") = TRUE) ) VarDestroy ("G_STRGWLAUNCH"); VarDestroy ("G_STRGWIonBuilding"); VarDestroy ("G_STRGWGravBuilding"); ENDIF // Watch to see when both teams have their ships IF (ThisTeamIs (TEAM_STRGWIon)) VarSet ("G_STRGWIonNewships", VarGet ("G_STRGWIonNewships") + NewShipsAdded ()); ELSEIF (ThisTeamIs (TEAM_STRGWGrav)) VarSet ("G_STRGWGravNewships", VarGet ("G_STRGWGravNewships") + NewShipsAdded ()); ENDIF // When both teams have their ships OR the Carrier dies, then off they go IF ( ((VarGet ("G_STRGWIonNewships") = VarGet ("G_STRGWIonsToRequest")) AND (VarGet ("G_STRGWGravNewships") = VarGet ("G_STRGWGWsToRequest"))) OR ((ShipsCount (TEAMSHIPS_Carrier) = 0) AND ((ShipsCount (TEAMSHIPS_STRGWIon) > 0) OR (ShipsCount (TEAMSHIPS_STRGWGrav) > 0))) ) IF (ThisTeamIs (TEAM_STRGWIon)) VarCreateSet ("G_STRGWIonTeamIsBuilt", TRUE); Jump Decide; ELSEIF (ThisTeamIs (TEAM_STRGWGrav)) Jump Guard; ENDIF ENDIF ENDWATCH ENDSTATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FormationBroad (); // Do this for option 1) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetAtMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRGWFighters, SHIPS_FleetAtMothership, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRGWCorvettes, SHIPS_FleetAtMothership, "CLASS_Corvette"); // Do this for option 2) //Print ("GWIon: I'm SELECTING the Single Frigate and Destroyer now!!!!"); FindEnemiesInside (VOLUME_WorldVolume, SHIPS_AllShipsInWorld, 1000); ShipsSelectClass (SHIPS_Mothership, SHIPS_AllShipsInWorld, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AllShipsInWorld, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSAllShipsInWorld", ShipsCount (SHIPS_AllShipsInWorld)); ShipsSelectClass (SHIPS_STRGWWorldFighters, SHIPS_AllShipsInWorld, "CLASS_Fighter"); //VarCreateSet ("G_SHIPSSTRGWWorldFighters", ShipsCount (SHIPS_STRGWWorldFighters)); ShipsSelectClass (SHIPS_STRGWWorldCorvettes, SHIPS_AllShipsInWorld, "CLASS_Corvette"); //VarCreateSet ("G_SHIPSSTRGWWorldCorvettes", ShipsCount (SHIPS_STRGWWorldCorvettes)); IF (ShipsSelectIndex (SHIPS_STRGWSingleFighter, SHIPS_STRGWWorldFighters, VarGet ("G_STRGWFighterIndex"))) //VarCreateSet ("G_SHIPSSTRGWSingleFighter", ShipsCount (SHIPS_STRGWSingleFighter)); FindEnemiesNearTeam (SHIPS_STRGWSingleFighter, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRGWSingleFighter, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRGWSingleFighter, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRGWSingleFighterNearby", ShipsCount (SHIPS_STRGWSingleFighter)); ShipsSelectClass (SHIPS_STRGWWorldNearbyFighters, SHIPS_STRGWSingleFighter, "CLASS_Fighter"); VarInc ("G_STRGWFighterIndex"); ELSE VarSet ("G_STRGWFightSelectionExhausted", TRUE); ENDIF IF (ShipsSelectIndex (SHIPS_STRGWSingleCorvette, SHIPS_STRGWWorldCorvettes, VarGet ("G_STRGWCorvetteIndex"))) //VarCreateSet ("G_SHIPSSTRGWSingleCorvette", ShipsCount (SHIPS_STRGWSingleCorvette)); FindEnemiesNearTeam (SHIPS_STRGWSingleCorvette, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRGWSingleCorvette, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRGWSingleCorvette, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRGWSingleCorvNearby", ShipsCount (SHIPS_STRGWSingleCorvette)); ShipsSelectClass (SHIPS_STRGWWorldNearbyCorv, SHIPS_STRGWSingleCorvette, "CLASS_Corvette"); VarInc ("G_STRGWCorvetteIndex"); ELSE VarSet ("G_STRGWCorvSelectionExhausted", TRUE); ENDIF // here where you decide where to go: // 1) Attack the fleet at the Mothership // 2) Attack pockets of ships in the rest of the world // 3) Guard the Carrier // 4) Kamikaze the Mothership // 1) At the Mothership: If there are 300 RUs worth of Fighters or Corvettes, go AttackFleetAtMothership IF ( (62*(ShipsCount (SHIPS_STRGWFighters)) + 222*(ShipsCount (SHIPS_STRGWCorvettes))) > 300) VarSet ("G_STRGWFighterIndex", 0); VarSet ("G_STRGWCorvetteIndex", 0); VarSet ("G_STRGWFightSelectionExhausted", FALSE); VarSet ("G_STRGWCorvSelectionExhausted", FALSE); Jump AttackFleetAtMothership; // 2) Rest of World: If there are 300 RUs worth of Fighters or Corvettes, go AttackRestOfWorld ELSEIF ( (NOT VarGet ("G_STRGWFightSelectionExhausted")) OR (NOT VarGet ("G_STRGWCorvSelectionExhausted")) ) IF ( (62*(ShipsCount (SHIPS_STRGWWorldNearbyFighters)) + 222*(ShipsCount (SHIPS_STRGWWorldNearbyCorv))) > 300) VarSet ("G_STRGWFighterIndex", 0); VarSet ("G_STRGWCorvetteIndex", 0); VarSet ("G_STRGWFightSelectionExhausted", FALSE); VarSet ("G_STRGWCorvSelectionExhausted", FALSE); Jump AttackRestOfWorld; ELSE Jump Decide; ENDIF ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) // If the Carrier's still alive, Guard it VarSet ("G_STRGWFighterIndex", 0); VarSet ("G_STRGWCorvetteIndex", 0); VarSet ("G_STRGWFightSelectionExhausted", FALSE); VarSet ("G_STRGWCorvSelectionExhausted", FALSE); Jump GuardCarrier; ELSE VarSet ("G_STRGWFighterIndex", 0); VarSet ("G_STRGWCorvetteIndex", 0); VarSet ("G_STRGWFightSelectionExhausted", FALSE); VarSet ("G_STRGWCorvSelectionExhausted", FALSE); VarCreateSet ("STRGWSFKamikazeNow", TRUE); TeamHyperspaceOut (); // If there are no places left to go, Hyperspace out Jump NullState; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) VarSet ("G_STRGWFighterIndex", 0); VarSet ("G_STRGWCorvetteIndex", 0); VarSet ("G_STRGWFightSelectionExhausted", FALSE); VarSet ("G_STRGWCorvSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_STRGWIon); // GravWells should try to stay as close to the Ion Cannon Frigate as possible ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // If the Ion Cannon team decides to hyperspace out, then hyperspace out as well IF (VarGet ("STRGWSFKamikazeNow") = TRUE) VarDestroy ("STRGWSFKamikazeNow"); TeamHyperspaceOut (); Jump NullState; ENDIF // If the Ion team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRGWIonTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRGWIon) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF // if there are Strike Craft nearby, turn on the field FindEnemiesNearTeam (SHIPS_STRGWEVERYONE, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRGWEVERYONE, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRGWEVERYONE, SHIPS_Mothership); // And filter it out //ShipsSelectNonCapital (SHIPS_STRGWStrikeCraft, SHIPS_STRGWEVERYONE); ShipsSelectClass (SHIPS_STRGWYahooFighters, SHIPS_STRGWEVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRGWYahooCorvettes, SHIPS_STRGWEVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_STRGWStrikeCraft, SHIPS_STRGWYahooFighters); ShipsAdd (SHIPS_STRGWStrikeCraft, SHIPS_STRGWYahooCorvettes); IF (ShipsCount (SHIPS_STRGWStrikeCraft) > 0) Jump GuardGravityOn; ENDIF ENDWATCH ENDSTATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardGravityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_STRGWIon); // GravWells should try to stay as close to the Ion Cannon Frigate as possible SpecialToggle(); // Turn on the well ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // If the Ion Cannon team decides to hyperspace out, then hyperspace out as well IF (VarGet ("STRGWSFKamikazeNow") = TRUE) VarDestroy ("STRGWSFKamikazeNow"); TeamHyperspaceOut (); Jump NullState; ENDIF // If the Ion team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRGWIonTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRGWIon) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF // if there are NO Strike Craft nearby, turn OFF the field FindEnemiesNearTeam (SHIPS_STRGWEVERYONE, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRGWEVERYONE, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRGWEVERYONE, SHIPS_Mothership); // And filter it out //ShipsSelectNonCapital (SHIPS_STRGWStrikeCraft, SHIPS_STRGWEVERYONE); ShipsSelectClass (SHIPS_STRGWYahooFighters, SHIPS_STRGWEVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRGWYahooCorvettes, SHIPS_STRGWEVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_STRGWStrikeCraft, SHIPS_STRGWYahooFighters); ShipsAdd (SHIPS_STRGWStrikeCraft, SHIPS_STRGWYahooCorvettes); IF (ShipsCount (SHIPS_STRGWStrikeCraft) = 0) Jump GuardGravityOff; ENDIF ENDWATCH ENDSTATE GuardGravityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardGravityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_STRGWIon); // GravWells should try to stay as close to the Ion Cannon Frigate as possible SpecialToggle(); // Turn OFF the well ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // If the Ion Cannon team decides to hyperspace out, then hyperspace out as well IF (VarGet ("STRGWSFKamikazeNow") = TRUE) VarDestroy ("STRGWSFKamikazeNow"); TeamHyperspaceOut (); Jump NullState; ENDIF // If the Ion team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRGWIonTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRGWIon) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF // if there are Strike Craft nearby, turn ON the field FindEnemiesNearTeam (SHIPS_STRGWEVERYONE, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRGWEVERYONE, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRGWEVERYONE, SHIPS_Mothership); // And filter it out //ShipsSelectNonCapital (SHIPS_STRGWStrikeCraft, SHIPS_STRGWEVERYONE); ShipsSelectClass (SHIPS_STRGWYahooFighters, SHIPS_STRGWEVERYONE, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRGWYahooCorvettes, SHIPS_STRGWEVERYONE, "CLASS_Corvette"); ShipsAdd (SHIPS_STRGWStrikeCraft, SHIPS_STRGWYahooFighters); ShipsAdd (SHIPS_STRGWStrikeCraft, SHIPS_STRGWYahooCorvettes); IF (ShipsCount (SHIPS_STRGWStrikeCraft) > 0) Jump GuardGravityOn; ENDIF ENDWATCH ENDSTATE GuardGravityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_PlayerFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_PlayerFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_PlayerFleet, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRGWFleetFighters, SHIPS_PlayerFleet, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRGWFleetCorvettes, SHIPS_PlayerFleet, "CLASS_Corvette"); IF (ShipsCount (SHIPS_STRGWFleetFighters) > 0) // Attack Fighters first ShipsAdd (SHIPS_STRGWFleetATTACK, SHIPS_STRGWFleetFighters); ELSEIF (ShipsCount (SHIPS_STRGWFleetCorvettes) > 0) // Attack Corvettes second ShipsAdd (SHIPS_STRGWFleetATTACK, SHIPS_STRGWFleetCorvettes); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRGWFleetATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection TeamVelocityMaxClear (); //TacticsEvasive (); Attack (SHIPS_STRGWFleetATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRGWFleetATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRGWFleetATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRGWFleetATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRGWIon)) IF (ShipsOrder (TEAMSHIPS_STRGWIon) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRGWFleetATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToMothership; ENDIF ENDWATCH ENDSTATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //IF (ThisTeamIs (TEAM_STRGWIon)) // TeamVelocityMaxSet (450); // Set the velocity of the MultiGuns = to the Support Frigate so they'll travel together //ENDIF TacticsNeutral (); //FormationClaw (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRGWFleetATTACK); Jump WaitForLaunchOrder; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRGWIon)) IF (ShipsOrder (TEAMSHIPS_STRGWIon) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRGWs)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRGWs, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRGWs, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRGWs) > 0) ShipsClear (SHIPS_STRGWFleetATTACK); Jump AttackNearby; ENDIF ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRGWFleetATTACK) = 0) ShipsClear (SHIPS_STRGWFleetATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackFleetAtMothership state IF (Nearby (SHIPSPOINT_STRGWFleetATTACK, 14000)) Jump AttackFleetAtMothership; ENDIF ENDWATCH ENDSTATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ShipsSelectClass (SHIPS_STRGWNearbyFighters, SHIPS_AttackingSTRGWs, "CLASS_Fighter"); ShipsSelectClass (SHIPS_STRGWNearbyCorvettes, SHIPS_AttackingSTRGWs, "CLASS_Corvette"); IF (ShipsCount (SHIPS_STRGWNearbyFighters) > 0) // Attack Fighters first ShipsAdd (SHIPS_STRGWNearbyATTACK, SHIPS_STRGWNearbyFighters); ELSEIF (ShipsCount (SHIPS_STRGWNearbyCorvettes) > 0) // Attack Corvettes second ShipsAdd (SHIPS_STRGWNearbyATTACK, SHIPS_STRGWNearbyCorvettes); ELSEIF (ShipsCount (SHIPS_AttackingSTRGWs) > 0) // Attack everything else third ShipsAdd (SHIPS_STRGWNearbyATTACK, SHIPS_AttackingSTRGWs); ELSE //Print ("GW Ion Retaliate: THERE's NO ONE TO ATTACK!!!!"); ShipsClear (SHIPS_STRGWNearbyATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection TeamVelocityMaxClear (); TacticsNeutral (); Attack (SHIPS_STRGWNearbyATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRGWNearbyATTACK); Jump WaitForLaunchOrder; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRGWNearbyATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRGWNearbyATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRGWIon)) IF (ShipsOrder (TEAMSHIPS_STRGWIon) != 2) Jump Decide; ENDIF ENDIF // if MultiGuns are not underattack anymore, go back to Decide IF (NOT UnderAttack (SHIPS_AttackingSTRGWs)) //Print ("I'M NOT UNDERATTACK ANYMORE!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRGWNearbyATTACK); Jump Decide; ENDIF ENDWATCH ENDSTATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (SHIPS_STRGWWorldNearbyFighters) > 0) // Attack Fighters first TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRGWWorldATTACK, SHIPS_STRGWWorldNearbyFighters); ELSEIF (ShipsCount (SHIPS_STRGWWorldNearbyCorv) > 0) // Attack Corvettes second TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRGWWorldATTACK, SHIPS_STRGWWorldNearbyCorv); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRGWWorldATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection //VarCreateSet ("G_SHIPSSTRGWWorldATTACK", ShipsCount (SHIPS_STRGWWorldATTACK)); Attack (SHIPS_STRGWWorldATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRGWWorldATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRGWWorldATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRGWWorldATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRGWIon)) IF (ShipsOrder (TEAMSHIPS_STRGWIon) != 2) Jump Decide; ENDIF ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRGWWorldATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToRestOfWorld; ENDIF ENDWATCH ENDSTATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //IF (ThisTeamIs (TEAM_STRGWIon)) // TeamVelocityMaxSet (450); // Set the velocity of the MultiGuns = to the Support Frigate so they'll travel together //ENDIF TacticsNeutral (); //FormationClaw (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRGWWorldATTACK); Jump WaitForLaunchOrder; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRGWIon)) IF (ShipsOrder (TEAMSHIPS_STRGWIon) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRGWs)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRGWs, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRGWs, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRGWs) > 0) ShipsClear (SHIPS_STRGWWorldATTACK); Jump AttackNearby; ENDIF ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRGWWorldATTACK) = 0) ShipsClear (SHIPS_STRGWWorldATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackRestOfWorld state IF (Nearby (SHIPSPOINT_STRGWWorldATTACK, 14000)) Jump AttackRestOfWorld; ENDIF ENDWATCH ENDSTATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_Carrier); TimerCreateSetStart ("GoDecideAgain", 30); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF IF (TimerExpiredDestroy ("GoDecideAgain")) // Every 30 seconds, jump to the Decide state and check the state of the universe Jump Decide; ENDIF ENDWATCH ENDSTATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM STRGW //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRGW ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRCG ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM STRCG States WaitForLaunchOrder, Build, Decide, Guard, GuardCloakityOn, GuardCloakityOff, OnTheMoveToMothership, AttackNearby, AttackFleetAtMothership, AttackRestOfWorld, OnTheMoveToRestOfWorld, GuardCarrier, NullState; INIT VarCreateSet ("G_STRCGFrigateIndex", 0); VarCreateSet ("G_STRCGDestroyerIndex", 0); VarCreateSet ("G_STRCGFrigSelectionExhausted", FALSE); VarCreateSet ("G_STRCGDesSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDINIT WATCH IF (ThisTeamIs (TEAM_STRCGIon)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ELSEIF (ThisTeamIs (TEAM_STRCGCloak)) IFONCE ( (ShipsCount (THISTEAMSHIPS) = 0) AND (VarGet ("ACT3HasBegun") = TRUE) ) Jump NullState; ENDIFONCE ENDIF ENDWATCH STATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRCGIon)) VarCreateSet ("G_STRCGIonREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF IF (ThisTeamIs (TEAM_STRCGCloak)) VarCreateSet ("G_STRCGCloakREADY", TRUE); // Create these variables so the dispatch knows when both teams are ready ENDIF ENDINIT WATCH IF (VarGet ("G_STRCGLAUNCH") = TRUE) VarDestroy ("G_STRCGIonREADY"); VarDestroy ("G_STRCGCloakREADY"); Jump Build; ENDIF ENDWATCH ENDSTATE WaitForLaunchOrder //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_STRCGIon)) VarCreateSet ("G_STRCGIonBuilding", TRUE); ENDIF IF (ThisTeamIs (TEAM_STRCGCloak)) VarCreateSet ("G_STRCGCloakBuilding", TRUE); ENDIF VarCreateSet ("G_STRCGIonNewships", 0); VarCreateSet ("G_STRCGCloakNewships", 0); VarCreateSet ("G_STRCGIonsToRequest", 0); VarCreateSet ("G_STRCGCGsToRequest", 0); // Request between 1 and 3 Ion Cannon Frigates depending on the size of the TestTeam VarSet ("G_STRCGIonsToRequest", (1 + (2*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRCGIonsToRequest", 2); // Request 1 Cloaking Generator VarSet ("G_STRCGCGsToRequest", (1 + (0*((ShipsCount (TEAMSHIPS_TestTeam)))/100))); // Uncomment this when Fleet Strength is in //VarSet ("G_STRCGCGsToRequest", 1); IF (ThisTeamIs (TEAM_STRCGIon)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 650*(VarGet ("G_STRCGIonsToRequest")))); // Set RUs = Current RUs + Amount req'd to build Ion Cannon Frigates RequestShips ("IonCannonFrigate", VarGet ("G_STRCGIonsToRequest")); ENDIF ELSEIF (ThisTeamIs (TEAM_STRCGCloak)) IF (ShipsCount (TEAMSHIPS_Carrier) > 0) RUsSet (1, (RUsGet (1) + 500*(VarGet ("G_STRCGCGsToRequest")))); // Set RUs = Current RUs + Amount req'd to build the Cloakity Well Genny RequestShips ("CloakGenerator", VarGet ("G_STRCGCGsToRequest")); ENDIF ENDIF VarDestroy ("G_STRCGIonTeamIsBuilt"); ENDINIT WATCH // watch everywhere stuff //IF (ShipsCount (THISTEAMSHIPS) = 0) // Jump WaitForLaunchOrder; //ENDIF IF ( (VarGet ("G_STRCGIonBuilding") = TRUE) AND (VarGet ("G_STRCGCloakBuilding") = TRUE) ) VarDestroy ("G_STRCGLAUNCH"); VarDestroy ("G_STRCGIonBuilding"); VarDestroy ("G_STRCGCloakBuilding"); ENDIF // Watch to see when both teams have their ships IF (ThisTeamIs (TEAM_STRCGIon)) VarSet ("G_STRCGIonNewships", VarGet ("G_STRCGIonNewships") + NewShipsAdded ()); ELSEIF (ThisTeamIs (TEAM_STRCGCloak)) VarSet ("G_STRCGCloakNewships", VarGet ("G_STRCGCloakNewships") + NewShipsAdded ()); ENDIF // When both teams have their ships OR the Carrier dies, then off they go IF ( ((VarGet ("G_STRCGIonNewships") = VarGet ("G_STRCGIonsToRequest")) AND (VarGet ("G_STRCGCloakNewships") = VarGet ("G_STRCGCGsToRequest"))) OR ((ShipsCount (TEAMSHIPS_Carrier) = 0) AND ((ShipsCount (TEAMSHIPS_STRCGIon) > 0) OR (ShipsCount (TEAMSHIPS_STRCGCloak) > 0))) ) IF (ThisTeamIs (TEAM_STRCGIon)) VarCreateSet ("G_STRCGIonTeamIsBuilt", TRUE); Jump Decide; ELSEIF (ThisTeamIs (TEAM_STRCGCloak)) Jump Guard; ENDIF ENDIF ENDWATCH ENDSTATE Build //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FormationBroad (); // Do this for option 1) FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_FleetAtMothership, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_FleetAtMothership, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_FleetAtMothership, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRCGFrigates, SHIPS_FleetAtMothership, "CLASS_Frigate"); ShipsSelectClass (SHIPS_STRCGDestroyers, SHIPS_FleetAtMothership, "CLASS_Destroyer"); // Do this for option 2) //Print ("CGIon: I'm SELECTING the Single Frigate and Destroyer now!!!!"); FindEnemiesInside (VOLUME_WorldVolume, SHIPS_AllShipsInWorld, 1000); ShipsSelectClass (SHIPS_Mothership, SHIPS_AllShipsInWorld, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AllShipsInWorld, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSAllShipsInWorld", ShipsCount (SHIPS_AllShipsInWorld)); ShipsSelectClass (SHIPS_STRCGWorldFrigates, SHIPS_AllShipsInWorld, "CLASS_Frigate"); //VarCreateSet ("G_SHIPSSTRCCGorldFighters", ShipsCount (SHIPS_STRCGWorldFrigates)); ShipsSelectClass (SHIPS_STRCGWorldDestroyers, SHIPS_AllShipsInWorld, "CLASS_Destroyer"); //VarCreateSet ("G_SHIPSSTRCGWorldDestroyers", ShipsCount (SHIPS_STRCGWorldDestroyers)); IF (ShipsSelectIndex (SHIPS_STRCGSingleFrigate, SHIPS_STRCGWorldFrigates, VarGet ("G_STRCGFrigateIndex"))) //VarCreateSet ("G_SHIPSSTRCGSingleFrigate", ShipsCount (SHIPS_STRCGSingleFrigate)); FindEnemiesNearTeam (SHIPS_STRCGSingleFrigate, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRCGSingleFrigate, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRCGSingleFrigate, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRCGSingleFrigateNearby", ShipsCount (SHIPS_STRCGSingleFrigate)); ShipsSelectClass (SHIPS_STRCGWorldNearbyFrigates, SHIPS_STRCGSingleFrigate, "CLASS_Frigate"); VarInc ("G_STRCGFrigateIndex"); ELSE VarSet ("G_STRCGFrigSelectionExhausted", TRUE); ENDIF IF (ShipsSelectIndex (SHIPS_STRCGSingleDestroyer, SHIPS_STRCGWorldDestroyers, VarGet ("G_STRCGDestroyerIndex"))) //VarCreateSet ("G_SHIPSSTRCGSingleDestroyer", ShipsCount (SHIPS_STRCGSingleDestroyer)); FindEnemiesNearTeam (SHIPS_STRCGSingleDestroyer, 10000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRCGSingleDestroyer, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRCGSingleDestroyer, SHIPS_Mothership); // And filter it out //VarCreateSet ("G_SHIPSSTRCGSingleDesNearby", ShipsCount (SHIPS_STRCGSingleDestroyer)); ShipsSelectClass (SHIPS_STRCGWorldNearbyDes, SHIPS_STRCGSingleDestroyer, "CLASS_Destroyer"); VarInc ("G_STRCGDestroyerIndex"); ELSE VarSet ("G_STRCGDesSelectionExhausted", TRUE); ENDIF // here where you decide where to go: // 1) Attack the fleet at the Mothership // 2) Attack pockets of ships in the rest of the world // 3) Guard the Carrier // 4) Kamikaze the Mothership // 1) At the Mothership: If there are 500 RUs worth of Frigates or Destroyers, go AttackFleetAtMothership IF ( (612*(ShipsCount (SHIPS_STRCGFrigates)) + 1425*(ShipsCount (SHIPS_STRCGDestroyers))) > 500) VarSet ("G_STRCGFrigateIndex", 0); VarSet ("G_STRCGDestroyerIndex", 0); VarSet ("G_STRCGFrigSelectionExhausted", FALSE); VarSet ("G_STRCGDesSelectionExhausted", FALSE); Jump AttackFleetAtMothership; // 2) Rest of World: If there are 500 RUs worth of Frigates or Destroyers, go AttackRestOfWorld ELSEIF ( (NOT VarGet ("G_STRCGFrigSelectionExhausted")) OR (NOT VarGet ("G_STRCGDesSelectionExhausted")) ) IF ( (612*(ShipsCount (SHIPS_STRCGWorldNearbyFrigates)) + 1425*(ShipsCount (SHIPS_STRCGWorldNearbyDes))) > 500) VarSet ("G_STRCGFrigateIndex", 0); VarSet ("G_STRCGDestroyerIndex", 0); VarSet ("G_STRCGFrigSelectionExhausted", FALSE); VarSet ("G_STRCGDesSelectionExhausted", FALSE); Jump AttackRestOfWorld; ELSE Jump Decide; ENDIF ELSEIF (ShipsCount (TEAMSHIPS_Carrier) > 0) // If the Carrier's still alive, Guard it VarSet ("G_STRCGFrigateIndex", 0); VarSet ("G_STRCGDestroyerIndex", 0); VarSet ("G_STRCGFrigSelectionExhausted", FALSE); VarSet ("G_STRCGDesSelectionExhausted", FALSE); Jump GuardCarrier; ELSE VarSet ("G_STRCGFrigateIndex", 0); VarSet ("G_STRCGDestroyerIndex", 0); VarSet ("G_STRCGFrigSelectionExhausted", FALSE); VarSet ("G_STRCGDesSelectionExhausted", FALSE); VarCreateSet ("STRCGCGKamikazeNow", TRUE); TeamHyperspaceOut (); // If there are no places left to go, Hyperspace out Jump NullState; ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) VarSet ("G_STRCGFrigateIndex", 0); VarSet ("G_STRCGDestroyerIndex", 0); VarSet ("G_STRCGFrigSelectionExhausted", FALSE); VarSet ("G_STRCGDesSelectionExhausted", FALSE); Jump WaitForLaunchOrder; ENDIF ENDWATCH ENDSTATE Decide //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_STRCGIon); // CloakGens should try to stay as close to the Ion Cannon Frigate(s) as possible ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // If the Ion Cannon team decides to hyperspace out, then hyperspace out as well IF (VarGet ("STRCGCGKamikazeNow") = TRUE) VarDestroy ("STRCGCGKamikazeNow"); TeamHyperspaceOut (); Jump NullState; ENDIF // If the Ion team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRCGIonTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRCGIon) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF // if there are any ships within visual range, turn on the Cloaking field (MUHAHAHAHA :) FindEnemiesNearTeam (SHIPS_STRCGEVERYONE, 14000); IF (ShipsCount (SHIPS_STRCGEVERYONE) > 0) Jump GuardCloakityOn; ENDIF ENDWATCH ENDSTATE Guard //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCloakityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_STRCGIon); // CloakGens should try to stay as close to the Ion Cannon Frigates as possible SpecialToggle(); // Turn on the Cloaking ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // If the Ion Cannon team decides to hyperspace out, then hyperspace out as well IF (VarGet ("STRCGCGKamikazeNow") = TRUE) VarDestroy ("STRCGCGKamikazeNow"); TeamHyperspaceOut (); Jump NullState; ENDIF // If the Ion team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRCGIonTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRCGIon) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF // if there are NO ships within visual range, turn OFF the cloaking field FindEnemiesNearTeam (SHIPS_STRCGEVERYONE, 14000); IF (ShipsCount (SHIPS_STRCGEVERYONE) = 0) Jump GuardCloakityOff; ENDIF ENDWATCH ENDSTATE GuardCloakityOn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCloakityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_STRCGIon); // CloakGens should try to stay as close to the Ion Cannon Frigate as possible SpecialToggle(); // Turn OFF the well ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // If the Ion Cannon team decides to hyperspace out, then hyperspace out as well IF (VarGet ("STRCGCGKamikazeNow") = TRUE) VarDestroy ("STRCGCGKamikazeNow"); TeamHyperspaceOut (); Jump NullState; ENDIF // If the Ion team *dies*, then give yourself to the AI and go to the WaitForLaunchOrder state (because you're no good on your own) IF ( (VarGet ("G_STRCGIonTeamIsBuilt") = TRUE) AND (ShipsCount (TEAMSHIPS_STRCGIon) = 0) ) TeamGiveToAI (); Jump WaitForLaunchOrder; ENDIF // if there are ships within visual range, turn ON the field FindEnemiesNearTeam (SHIPS_STRCGEVERYONE, 10000); IF (ShipsCount (SHIPS_STRCGEVERYONE) > 0) Jump GuardCloakityOn; ENDIF ENDWATCH ENDSTATE GuardCloakityOff //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT FindEnemiesInside (VOLUME_MothershipSphere, SHIPS_PlayerFleet, 3000); ShipsSelectClass (SHIPS_Mothership, SHIPS_PlayerFleet, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_PlayerFleet, SHIPS_Mothership); // And filter it out ShipsSelectClass (SHIPS_STRCGFleetFrigates, SHIPS_PlayerFleet, "CLASS_Frigate"); ShipsSelectClass (SHIPS_STRCGFleetDestroyers, SHIPS_PlayerFleet, "CLASS_Destroyer"); IF (ShipsCount (SHIPS_STRCGFleetFrigates) > 0) // Attack Frigates first ShipsAdd (SHIPS_STRCGFleetATTACK, SHIPS_STRCGFleetFrigates); ELSEIF (ShipsCount (SHIPS_STRCGFleetDestroyers) > 0) // Attack Destroyers second ShipsAdd (SHIPS_STRCGFleetATTACK, SHIPS_STRCGFleetDestroyers); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRCGFleetATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection TeamVelocityMaxClear (); //TacticsEvasive (); //MoveAttack (SHIPS_STRCGFleetATTACK); Attack (SHIPS_STRCGFleetATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRCGFleetATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRCGFleetATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRCGFleetATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRCGIon)) IF (ShipsOrder (TEAMSHIPS_STRCGIon) != 2) Jump Decide; ENDIF ENDIF // if some Proximity Sensors show up nearby, get rid of them immediately FindEnemiesNearTeam (SHIPS_STRCGLookinForProx, 16000); IF ( (ShipsSelectType (SHIPS_STRCGFleetProxSensors, SHIPS_STRCGLookinForProx, "ProximitySensor")) AND (ShipsCount (TEAMSHIPS_STRCGCloak) > 0) ) Jump AttackNearby; ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRCGFleetATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToMothership; ENDIF ENDWATCH ENDSTATE AttackFleetAtMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //IF (ThisTeamIs (TEAM_STRCGIon)) // TeamVelocityMaxSet (450); // Set the velocity of the MultiGuns = to the Support Frigate so they'll travel together //ENDIF TacticsNeutral (); //FormationClaw (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRCGFleetATTACK); Jump WaitForLaunchOrder; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRCGIon)) IF (ShipsOrder (TEAMSHIPS_STRCGIon) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRCGs)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRCGs, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRCGs, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRCGs) > 0) ShipsClear (SHIPS_STRCGFleetATTACK); Jump AttackNearby; ENDIF ENDIF // if some Proximity Sensors show up nearby, get rid of them immediately FindEnemiesNearTeam (SHIPS_STRCGLookinForProx, 16000); IF ( (ShipsSelectType (SHIPS_STRCGFleetProxSensors, SHIPS_STRCGLookinForProx, "ProximitySensor")) AND (ShipsCount (TEAMSHIPS_STRCGCloak) > 0) ) Jump AttackNearby; ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRCGFleetATTACK) = 0) ShipsClear (SHIPS_STRCGFleetATTACK); Jump Decide; ENDIF // if you get close to the ships you're after, go back to the AttackFleetAtMothership state IF (Nearby (SHIPSPOINT_STRCGFleetATTACK, 14000)) Jump AttackFleetAtMothership; ENDIF ENDWATCH ENDSTATE OnTheMoveToMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT // special selection stuff to weed out proximity sensors first FindEnemiesNearTeam (SHIPS_STRCGLookinForProx, 16000); ShipsSelectClass (SHIPS_Mothership, SHIPS_STRCGLookinForProx, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_STRCGLookinForProx, SHIPS_Mothership); // And filter it out ShipsSelectType (SHIPS_STRCGFleetProxSensors, SHIPS_STRCGLookinForProx, "ProximitySensor"); ShipsSelectClass (SHIPS_STRCGNearbyFrigates, SHIPS_AttackingSTRCGs, "CLASS_Frigate"); ShipsSelectClass (SHIPS_STRCGNearbyDestroyers, SHIPS_AttackingSTRCGs, "CLASS_Destroyer"); IF ( (ShipsCount (SHIPS_STRCGFleetProxSensors) > 0) AND (ShipsCount (TEAMSHIPS_STRCGCloak) > 0) ) // Attack Proximity Sensors first VarCreateSet ("G_AttackingProximitySensors", TRUE); ShipsAdd (SHIPS_STRCGNearbyATTACK, SHIPS_STRCGFleetProxSensors); ELSEIF (ShipsCount (SHIPS_STRCGNearbyFrigates) > 0) // Attack Frigates second ShipsAdd (SHIPS_STRCGNearbyATTACK, SHIPS_STRCGNearbyFrigates); ELSEIF (ShipsCount (SHIPS_STRCGNearbyDestroyers) > 0) // Attack Destroyers third ShipsAdd (SHIPS_STRCGNearbyATTACK, SHIPS_STRCGNearbyDestroyers); ELSEIF (ShipsCount (SHIPS_AttackingSTRCGs) > 0) // Attack everything else last ShipsAdd (SHIPS_STRCGNearbyATTACK, SHIPS_AttackingSTRCGs); ELSE //Print ("CG Ion Retaliate: THERE's NO ONE TO ATTACK!!!!"); ShipsClear (SHIPS_STRCGNearbyATTACK); VarDestroy ("G_AttackingProximitySensors"); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection IF (ShipsSelectCapital (SHIPS_STRCGCapitalTargets, SHIPS_STRCGNearbyATTACK)) // If there are capital ships, then do a moveattack TeamVelocityMaxClear (); TacticsNeutral (); //MoveAttack (SHIPS_STRCGNearbyATTACK); Attack (SHIPS_STRCGNearbyATTACK); ELSE // Otherwise, do a regular attack TeamVelocityMaxClear (); TacticsNeutral (); Attack (SHIPS_STRCGNearbyATTACK); ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) //Print ("OPTION 11111111111111111111111"); ShipsClear (SHIPS_STRCGNearbyATTACK); VarDestroy ("G_AttackingProximitySensors"); Jump WaitForLaunchOrder; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRCGNearbyATTACK) = 0) //Print ("OPTION 22222222222222222222222"); ShipsClear (SHIPS_STRCGNearbyATTACK); VarDestroy ("G_AttackingProximitySensors"); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRCGIon)) IF (ShipsOrder (TEAMSHIPS_STRCGIon) != 2) //Print ("OPTION 333333333333333333333"); Jump Decide; ENDIF ENDIF // if MultiGuns are not underattack anymore, go back to Decide IF ( (NOT UnderAttack (SHIPS_AttackingSTRCGs)) AND (VarGet ("G_AttackingProximitySensors") = FALSE) ) //Print ("OPTION 444444444444444444444444"); ShipsClear (SHIPS_STRCGNearbyATTACK); VarDestroy ("G_AttackingProximitySensors"); Jump Decide; ENDIF ENDWATCH ENDSTATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ShipsCount (SHIPS_STRCGWorldNearbyFrigates) > 0) // Attack Frigates first TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRCGWorldATTACK, SHIPS_STRCGWorldNearbyFrigates); ELSEIF (ShipsCount (SHIPS_STRCGWorldNearbyDes) > 0) // Attack Destroyers second TeamVelocityMaxClear (); ShipsAdd (SHIPS_STRCGWorldATTACK, SHIPS_STRCGWorldNearbyDes); ELSE //Print ("No ONE TO ATTACK!!!!! +++"); ShipsClear (SHIPS_STRCGWorldATTACK); Jump Decide; ENDIF // when you're done all that nastiness, attack the ships you've put in the selection VarCreateSet ("G_SHIPSSTRCGWorldATTACK", ShipsCount (SHIPS_STRCGWorldATTACK)); //MoveAttack (SHIPS_STRCGWorldATTACK); Attack (SHIPS_STRCGWorldATTACK); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRCGWorldATTACK); //Print ("I'M DEAD!------------"); Jump WaitForLaunchOrder; ENDIF // when the ships you're attacking are dead, go back to Decide IF (ShipsCount (SHIPS_STRCGWorldATTACK) = 0) //Print ("I'VE KILLED ALL MY ENEMIES!!!!!!!!!!!!!!!!!!"); ShipsClear (SHIPS_STRCGWorldATTACK); Jump Decide; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRCGIon)) IF (ShipsOrder (TEAMSHIPS_STRCGIon) != 2) Jump Decide; ENDIF ENDIF // if some Proximity Sensors show up nearby, get rid of them immediately FindEnemiesNearTeam (SHIPS_STRCGLookinForProx, 16000); IF ( (ShipsSelectType (SHIPS_STRCGFleetProxSensors, SHIPS_STRCGLookinForProx, "ProximitySensor")) AND (ShipsCount (TEAMSHIPS_STRCGCloak) > 0) ) Jump AttackNearby; ENDIF // check to see if you're near the ships you're attacking, if not, go to "OnTheMove.." where you'll check to see if you're underattack IF (NOT Nearby (SHIPSPOINT_STRCGWorldATTACK, 14000)) //Print ("I'm TOO FAR FROM MY ENEMIES!!==========="); Jump OnTheMoveToRestOfWorld; ENDIF ENDWATCH ENDSTATE AttackRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //IF (ThisTeamIs (TEAM_STRCGIon)) // TeamVelocityMaxSet (450); // Set the velocity of the MultiGuns = to the Support Frigate so they'll travel together //ENDIF TacticsNeutral (); //FormationClaw (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) ShipsClear (SHIPS_STRCGWorldATTACK); Jump WaitForLaunchOrder; ENDIF // if for some reason you stop attacking, go back to Decide IF (ThisTeamIs (TEAM_STRCGIon)) IF (ShipsOrder (TEAMSHIPS_STRCGIon) != 2) Jump Decide; ENDIF ENDIF // if you get attacked, stop and fight back! IF (UnderAttack (SHIPS_AttackingSTRCGs)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingSTRCGs, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingSTRCGs, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingSTRCGs) > 0) ShipsClear (SHIPS_STRCGWorldATTACK); Jump AttackNearby; ENDIF ENDIF // if the ships you're after suddenly DIE (!), go back to the Decide state IF (ShipsCount (SHIPS_STRCGWorldATTACK) = 0) ShipsClear (SHIPS_STRCGWorldATTACK); Jump Decide; ENDIF // if some Proximity Sensors show up nearby, get rid of them immediately FindEnemiesNearTeam (SHIPS_STRCGLookinForProx, 16000); IF ( (ShipsSelectType (SHIPS_STRCGFleetProxSensors, SHIPS_STRCGLookinForProx, "ProximitySensor")) AND (ShipsCount (TEAMSHIPS_STRCGCloak) > 0) ) Jump AttackNearby; ENDIF // if you get close to the ships you're after, go back to the AttackRestOfWorld state IF (Nearby (SHIPSPOINT_STRCGWorldATTACK, 14000)) Jump AttackRestOfWorld; ENDIF ENDWATCH ENDSTATE OnTheMoveToRestOfWorld //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Guard (TEAMSHIPS_Carrier); TimerCreateSetStart ("GoDecideAgain", 30); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump WaitForLaunchOrder; ENDIF // if some Proximity Sensors show up nearby, get rid of them immediately FindEnemiesNearTeam (SHIPS_STRCGLookinForProx, 16000); IF ( (ShipsSelectType (SHIPS_STRCGFleetProxSensors, SHIPS_STRCGLookinForProx, "ProximitySensor")) AND (ShipsCount (TEAMSHIPS_STRCGCloak) > 0) ) Jump AttackNearby; ENDIF IF (TimerExpiredDestroy ("GoDecideAgain")) // Every 30 seconds, jump to the Decide state and check the state of the universe Jump Decide; ENDIF ENDWATCH ENDSTATE GuardCarrier //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM STRCG //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ STRCG ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Defector ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM Defector States HyperspaceOut, HyperspaceIn, GetToPlayerMothership, WaitToHyperspaceOut, HyperspaceOut2, NullState; INIT TeamHealthSet (200); // These are badass Elite Guard ships, so they have double the health ShipsDamageModifierSet (TEAMSHIPS_Defector, 200); // These are badass Elite Guard ships, so they do double the damage ShipsAdd (SHIPS_ThisIsTheDefector, TEAMSHIPS_Defector); Jump HyperspaceOut; ENDINIT WATCH // Keep him alive at 25% until the timer runs out IFONCE (TeamHealthAverage () < 25) TimerCreateSetStart ("KeepDefectorAlive", 90); ENDIFONCE IF ( (TeamHealthAverage () < 25) AND (TimerRemaining ("KeepDefectorAlive") > 0) ) TeamHealthSet (25); ENDIF IFONCE (VarGet ("G_MakeDefectorAnAlly") = TRUE) TeamAttributesSet (256); ENDIFONCE ENDWATCH STATE HyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT HideShips (THISTEAMSHIPS); TeamHyperspaceOut (); // Get outta here right away so you can come in at the appropriate time ENDINIT WATCH IF (VarGet ("G_ACT3HasBegun") = TRUE) Jump HyperspaceIn; ENDIF ENDWATCH ENDSTATE HyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE HyperspaceIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TeamHyperspaceIn (POINT_DefectorIN); TimerCreateSetStart ("G_DefectorHasHyperspacedIn", 14); TimerCreateSetStart ("G_FocusOnDefectorNow", 19); TimerCreateSetStart ("G_ChaseDefectorsComeOnIn", 1); ENDINIT WATCH IF (TimerExpired ("G_DefectorHasHyperspacedIn")) Jump GetToPlayerMothership; ENDIF ENDWATCH ENDSTATE HyperspaceIn //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE GetToPlayerMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT //Print ("Defector is trying to follow his path now!_!+!_!_!_!_"); PatrolPath (PATH_DefectorSAFE); //MoveTo (POINT_DefectorSAFE); ENDINIT WATCH // If you're at the end of your path, create a variable to let other parts of the script know. IFONCE (PathNextPoint () = 0) VarCreateSet ("G_DefectorIsReadyToLeave", TRUE); Jump WaitToHyperspaceOut; ENDIFONCE ENDWATCH ENDSTATE GetToPlayerMothership //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE WaitToHyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH //IF (VarGet ("G_DefectorCanHyperspaceOutNow") = TRUE) // Jump HyperspaceOut2; //ENDIF ENDWATCH ENDSTATE WaitToHyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE HyperspaceOut2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TeamHyperspaceOut (); // Player is leaving so you can leave now too Jump NullState; ENDINIT WATCH ENDWATCH ENDSTATE HyperspaceOut2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM Defector //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Defector ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ChaseDefector ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM ChaseDefector States WaitToHyperspace, HyperspaceOut, WaitToLaunch, Dock, LaunchInts, WaitToAttack, AttackDefector, MoveAttackDefector, AttackNearby, NullState; INIT TeamHealthSet (200); // These are badass Elite Guard ships, so they have double the health ShipsDamageModifierSet (TEAMSHIPS_ChaseDestroyer, 200); // These are badass Elite Guard ships, so they do double the damage ShipsDamageModifierSet (TEAMSHIPS_ChaseFrigate, 200); // These are badass Elite Guard ships, so they do double the damage ShipsDamageModifierSet (TEAMSHIPS_ChaseSupport, 200); // These are badass Elite Guard ships, so they do double the damage ShipsDamageModifierSet (TEAMSHIPS_ChaseInt, 200); // These are badass Elite Guard ships, so they do double the damage Jump WaitToHyperspace; ENDINIT WATCH ENDWATCH STATE WaitToHyperspace //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IFONCE (TRUE) //TimerCreateSetStart ("G_WaitToHyperspaceOut", 20); TimerCreateSetStart ("G_WaitToHyperspaceOut", 3); ENDIFONCE IF (ThisTeamIs (TEAM_ChaseInt)) DockInstant (TEAM_ChaseSupport); // Dock the Interceptors with the Support Frigate before everyone hyperspaces Jump WaitToLaunch; ENDIF IF ( (ThisTeamIs (TEAM_ChaseFrigate)) OR (ThisTeamIs (TEAM_ChaseDestroyer)) ) FormationBroad (); ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TimerExpired ("G_WaitToHyperspaceOut")) Jump HyperspaceOut; ENDIF ENDWATCH ENDSTATE WaitToHyperspace //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE HyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT TeamHyperspaceOut (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TimerExpired ("G_ChaseDefectorsComeOnIn")) IFONCE (TRUE) TimerCreateSetStart ("G_DestroyerComeOnIn", 4); TimerCreateSetStart ("G_FrigateComeOnIn", 7); TimerCreateSetStart ("G_SupportComeOnIn", 8); TimerCreateSetStart ("G_IntComeOnIn", 25); ENDIFONCE ENDIF IF (ThisTeamIs (TEAM_ChaseDestroyer)) IF (TimerExpired ("G_DestroyerComeOnIn")) TeamHyperspaceIn (POINT_DestroyerIN); TimerCreateSetStart ("G_DestroyerIsIn", 15); Jump WaitToAttack; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseFrigate)) IF (TimerExpired ("G_FrigateComeOnIn")) TeamHyperspaceIn (POINT_FrigateIN); TimerCreateSetStart ("G_FrigateIsIn", 15); Jump WaitToAttack; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseSupport)) IF (TimerExpired ("G_SupportComeOnIn")) TeamHyperspaceIn (POINT_SupportIN); TimerCreateSetStart ("G_SupportFrigateIsIn", 15); TimerCreateSetStart ("G_TellInterceptorsToLaunch", 45); Jump WaitToAttack; ENDIF //ELSEIF (ThisTeamIs (TEAM_ChaseInt)) // IF (TimerExpired ("G_IntComeOnIn")) // TeamHyperspaceIn (POINT_InterceptorIN); // TimerCreateSetStart ("G_IntIsIn", 15); // Jump WaitToAttack; // ENDIF ENDIF ENDWATCH ENDSTATE HyperspaceOut //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE WaitToAttack //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // wait til they've finished hyperspacing in to jump to the AttackDefector state IF (ThisTeamIs (TEAM_ChaseDestroyer)) IF (TimerExpired ("G_DestroyerIsIn")) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseFrigate)) IF (TimerExpired ("G_FrigateIsIn")) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseSupport)) IF (TimerExpired ("G_SupportFrigateIsIn")) Jump AttackDefector; ENDIF ENDIF ENDWATCH ENDSTATE WaitToAttack //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF (ThisTeamIs (TEAM_ChaseInt)) FormationSphere (); ENDIF IF ( (ThisTeamIs (TEAM_ChaseFrigate)) OR (ThisTeamIs (TEAM_ChaseDestroyer)) ) FormationBroad (); ENDIF //FindEnemiesInside (VOLUME_WorldVolume, SHIPS_AllShipsInWorld, 1000); // Select everyone in the world //ShipsSelectSpecial (SHIPS_ThisIsTheDefector, SHIPS_AllShipsInWorld, 4); // Then pick out that feisty Defector //VarCreateSet ("G_SHIPSThisIsTheDefector", ShipsCount (SHIPS_ThisIsTheDefector)); //Attack (SHIPS_ThisIsTheDefector); // Then attack his ass Attack (TEAMSHIPS_Defector); VarCreateSet ("G_SHIPSDefector", ShipsCount (TEAMSHIPS_Defector)); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // if the interceptors are low on fuel and the Support Frigate is still alive, dock with the Support Frigate IF (ThisTeamIs (TEAM_ChaseInt)) IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_ChaseSupport) > 0) ) Jump Dock; ENDIF ENDIF // if the team gets close enough to the Defector, start a MoveAttack IF ( (ThisTeamIs (TEAM_ChaseDestroyer)) OR (ThisTeamIs (TEAM_ChaseFrigate)) OR (ThisTeamIs (TEAM_ChaseSupport)) ) IF (Nearby (SHIPSPOINT_Defector, 5000)) Jump MoveAttackDefector; ENDIF ENDIF // if for some reason you stop attacking, jump back into this state IF (ThisTeamIs (TEAM_ChaseInt)) IF (ShipsOrder (TEAMSHIPS_ChaseInt) != 2) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseDestroyer)) IF (ShipsOrder (TEAMSHIPS_ChaseDestroyer) != 2) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseFrigate)) IF (ShipsOrder (TEAMSHIPS_ChaseFrigate) != 2) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseSupport)) IF (ShipsOrder (TEAMSHIPS_ChaseFrigate) != 2) Jump AttackDefector; ENDIF ENDIF // if you get attacked, get distracted and attack your attackers IF (UnderAttack (SHIPS_AttackingChaseTeam)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingChaseTeam, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingChaseTeam, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingChaseTeam) > 0) Jump AttackNearby; ENDIF ENDIF ENDWATCH ENDSTATE AttackDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE MoveAttackDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT IF ( (ThisTeamIs (TEAM_ChaseFrigate)) OR (ThisTeamIs (TEAM_ChaseDestroyer)) ) FormationBroad (); ENDIF MoveAttack (TEAMSHIPS_Defector); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // if for some reason you stop attacking, jump back into this state IF (ThisTeamIs (TEAM_ChaseInt)) IF (ShipsOrder (TEAMSHIPS_ChaseInt) != 2) Jump MoveAttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseDestroyer)) IF (ShipsOrder (TEAMSHIPS_ChaseDestroyer) != 2) Jump MoveAttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseFrigate)) IF (ShipsOrder (TEAMSHIPS_ChaseFrigate) != 2) Jump MoveAttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseSupport)) IF (ShipsOrder (TEAMSHIPS_ChaseFrigate) != 2) Jump MoveAttackDefector; ENDIF ENDIF // if you get attacked, get distracted and attack your attackers IF (UnderAttack (SHIPS_AttackingChaseTeam)) ShipsSelectClass (SHIPS_Mothership, SHIPS_AttackingChaseTeam, "CLASS_Mothership"); // Select the Mothership ShipsRemove (SHIPS_AttackingChaseTeam, SHIPS_Mothership); // And filter it out IF (ShipsCount (SHIPS_AttackingChaseTeam) > 0) Jump AttackNearby; ENDIF ENDIF ENDWATCH ENDSTATE MoveAttackDefector //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ShipsSelectClass (SHIPS_ChaseNearbyFighters, SHIPS_AttackingChaseTeam, "CLASS_Fighter"); ShipsSelectClass (SHIPS_ChaseNearbyFrigates, SHIPS_AttackingChaseTeam, "CLASS_Frigate"); ShipsSelectClass (SHIPS_ChaseNearbyCorvettes, SHIPS_AttackingChaseTeam, "CLASS_Corvette"); ShipsSelectClass (SHIPS_ChaseNearbyDestroyers, SHIPS_AttackingChaseTeam, "CLASS_Destroyer"); IF (ThisTeamIs (TEAM_ChaseDestroyer)) IF (ShipsCount (SHIPS_ChaseNearbyDestroyers) > 0) // Destroyer team should attack Destroyers first MoveAttack (SHIPS_ChaseNearbyDestroyers); ELSEIF (ShipsCount (SHIPS_ChaseNearbyFrigates) > 0) // Frigates second MoveAttack (SHIPS_ChaseNearbyFrigates); ELSEIF (ShipsCount (SHIPS_ChaseNearbyCorvettes) > 0) // Corvettes second Attack (SHIPS_ChaseNearbyCorvettes); ELSEIF (ShipsCount (SHIPS_ChaseNearbyFighters) > 0) // Fighters fourth Attack (SHIPS_ChaseNearbyFighters); ELSEIF (ShipsCount (SHIPS_AttackingChaseTeam) > 0) // Everything else last Attack (SHIPS_AttackingChaseTeam); ENDIF ELSEIF ( (ThisTeamIs (TEAM_ChaseFrigate)) OR (ThisTeamIs (TEAM_ChaseSupport)) ) IF (ShipsCount (SHIPS_ChaseNearbyCorvettes) > 0) // Frigate team should attack Corvettes first Attack (SHIPS_ChaseNearbyCorvettes); ELSEIF (ShipsCount (SHIPS_ChaseNearbyFrigates) > 0) // Frigates second MoveAttack (SHIPS_ChaseNearbyFrigates); ELSEIF (ShipsCount (SHIPS_ChaseNearbyDestroyers) > 0) // Destroyers third MoveAttack (SHIPS_ChaseNearbyDestroyers); ELSEIF (ShipsCount (SHIPS_ChaseNearbyFighters) > 0) // Fighters fourth Attack (SHIPS_ChaseNearbyFighters); ELSEIF (ShipsCount (SHIPS_AttackingChaseTeam) > 0) // Everything else last Attack (SHIPS_AttackingChaseTeam); ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseInt)) IF (ShipsCount (SHIPS_ChaseNearbyFighters) > 0) // Interceptor team should attack Fighters first FormationClaw (); Attack (SHIPS_ChaseNearbyFighters); ELSEIF (ShipsCount (SHIPS_ChaseNearbyFrigates) > 0) // Frigates second FormationClaw (); Attack (SHIPS_ChaseNearbyFrigates); ELSEIF (ShipsCount (SHIPS_ChaseNearbyDestroyers) > 0) // Destroyers third FormationClaw (); Attack (SHIPS_ChaseNearbyDestroyers); ELSEIF (ShipsCount (SHIPS_ChaseNearbyCorvettes) > 0) // Corvettes fourth FormationClaw (); Attack (SHIPS_ChaseNearbyCorvettes); ELSEIF (ShipsCount (SHIPS_AttackingChaseTeam) > 0) // Everything else last FormationClaw (); Attack (SHIPS_AttackingChaseTeam); ENDIF ENDIF ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF // if the interceptors are low on fuel and the Support Frigate is still alive, dock with the Support Frigate IF (ThisTeamIs (TEAM_ChaseInt)) IF ( (TeamFuelLowest () < 25) AND (ShipsCount (TEAMSHIPS_ChaseSupport) > 0) ) Jump Dock; ENDIF ENDIF // if for some reason you stop attacking, go attack the Defector again IF (ThisTeamIs (TEAM_ChaseInt)) IF (ShipsOrder (TEAMSHIPS_ChaseInt) != 2) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseDestroyer)) IF (ShipsOrder (TEAMSHIPS_ChaseDestroyer) != 2) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseFrigate)) IF (ShipsOrder (TEAMSHIPS_ChaseFrigate) != 2) Jump AttackDefector; ENDIF ELSEIF (ThisTeamIs (TEAM_ChaseSupport)) IF (ShipsOrder (TEAMSHIPS_ChaseFrigate) != 2) Jump AttackDefector; ENDIF ENDIF IF (NOT UnderAttack (SHIPS_AttackingChaseTeam)) Jump AttackDefector; ENDIF ENDWATCH ENDSTATE AttackNearby //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT DockStay (TEAM_ChaseSupport); // Dock with the Support Frigate ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TeamDockedReadyForLaunch ()) // When you're all in AND repaired AND refuelled, then Launch Jump LaunchInts; ENDIF IF (ShipsCount (TEAMSHIPS_ChaseSupport) = 0) // If the Support Frigate dies on your way there, go back to Attacking the Defector Jump AttackDefector; ENDIF ENDWATCH ENDSTATE Dock //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE WaitToLaunch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF //IF (TimerExpired ("G_SupportFrigateIsIn")) IF (TimerExpiredDestroy ("G_TellInterceptorsToLaunch")) IF (ThisTeamIs (TEAM_ChaseInt)) Jump LaunchInts; ENDIF ENDIF ENDWATCH ENDSTATE WaitToLaunch //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE LaunchInts //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT Launch (); ENDINIT WATCH // watch everywhere stuff IF (ShipsCount (THISTEAMSHIPS) = 0) Jump NullState; ENDIF IF (TeamFinishedLaunching ()) Jump AttackDefector; ENDIF ENDWATCH ENDSTATE LaunchInts //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM ChaseDefector //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ChaseDefector ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ StrikeTeamDispatch ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ FSM StrikeTeamDispatch States WaitForACT2, BeginSTRInterceptors, BeginSTRBombers, BeginSTRMGs, BeginSTRGWs, BeginSTRCGs, NullState; INIT VarCreateSet ("TimeBetweenLaunches", 205); VarCreateSet ("INTERCEPTORProductionTime", 200); VarCreateSet ("BOMBERProductionTime", 200); VarCreateSet ("MGProductionTime", 200); VarCreateSet ("GWProductionTime", 200); VarCreateSet ("CGProductionTime", 200); //VarCreateSet ("SALVAGEProductionTime", ??); Jump WaitForACT2; ENDINIT WATCH IFONCE (VarGet ("G_ACT3HasBegun") = TRUE) Jump NullState; ENDIFONCE ENDWATCH STATE WaitForACT2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH IF ( (VarGet ("G_ACT2HasBegun") = TRUE) AND (VarGet ("G_STRIntScoutREADY") = TRUE) AND (VarGet ("G_STRIntIntREADY") = TRUE) ) Jump BeginSTRInterceptors; ENDIF ENDWATCH ENDSTATE WaitForACT2 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE BeginSTRInterceptors //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT VarCreateSet ("G_STRInterceptorsLAUNCH", TRUE); TimerCreateSetStart ("LaunchNextTeam", (VarGet ("TimeBetweenLaunches") - VarGet ("BOMBERProductionTime"))); ENDINIT WATCH IF ( (TimerExpired ("LaunchNextTeam")) AND (VarGet ("G_STRBomberATREADY") = TRUE) AND (VarGet ("G_STRBomberHCREADY") = TRUE) ) TimerDestroy ("LaunchNextTeam"); Jump BeginSTRBombers; ENDIF ENDWATCH ENDSTATE BeginSTRInterceptors //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE BeginSTRBombers //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT VarCreateSet ("G_STRBombersLAUNCH", TRUE); TimerCreateSetStart ("LaunchNextTeam", (VarGet ("TimeBetweenLaunches") - VarGet ("MGProductionTime"))); ENDINIT WATCH IF ( (TimerExpired ("LaunchNextTeam")) AND (VarGet ("G_STRMGMGREADY") = TRUE) AND (VarGet ("G_STRMGSFREADY") = TRUE) ) TimerDestroy ("LaunchNextTeam"); Jump BeginSTRMGs; ENDIF ENDWATCH ENDSTATE BeginSTRBombers //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE BeginSTRMGs //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT VarCreateSet ("G_STRMGLAUNCH", TRUE); TimerCreateSetStart ("LaunchNextTeam", (VarGet ("TimeBetweenLaunches") - VarGet ("GWProductionTime"))); ENDINIT WATCH IF ( (TimerExpired ("LaunchNextTeam")) AND (VarGet ("G_STRGWIonREADY") = TRUE) AND (VarGet ("G_STRGWGravREADY") = TRUE) ) TimerDestroy ("LaunchNextTeam"); Jump BeginSTRGWs; ENDIF ENDWATCH ENDSTATE BeginSTRMGs //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE BeginSTRGWs //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT VarCreateSet ("G_STRGWLAUNCH", TRUE); TimerCreateSetStart ("LaunchNextTeam", (VarGet ("TimeBetweenLaunches") - VarGet ("CGProductionTime"))); ENDINIT WATCH IF ( (TimerExpired ("LaunchNextTeam")) AND (VarGet ("G_STRCGIonREADY") = TRUE) AND (VarGet ("G_STRCGCloakREADY") = TRUE) ) TimerDestroy ("LaunchNextTeam"); Jump BeginSTRCGs; ENDIF ENDWATCH ENDSTATE BeginSTRGWs //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE BeginSTRCGs //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT VarCreateSet ("G_STRCGLAUNCH", TRUE); TimerCreateSetStart ("LaunchNextTeam", (VarGet ("TimeBetweenLaunches") - VarGet ("INTERCEPTORProductionTime"))); ENDINIT WATCH IF ( (TimerExpired ("LaunchNextTeam")) AND (VarGet ("G_STRIntScoutREADY") = TRUE) AND (VarGet ("G_STRIntIntREADY") = TRUE) ) TimerDestroy ("LaunchNextTeam"); Jump BeginSTRInterceptors; ENDIF ENDWATCH ENDSTATE BeginSTRCGs //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ INIT ENDINIT WATCH ENDWATCH ENDSTATE NullState //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENDFSM StrikeTeamDispatch //ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ StrikeTeamDispatch ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ //ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ Global Stuff ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ INIT //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // FSM creates // FSMCreate (FleetIntel, TEAM_FleetIntel); FSMCreate (TestTeam, TEAM_TestTeam); // Team for seeing how big the player's fleet is (numships: 0, numships2: 100) FSMCreate (StrikeTeamDispatch, TEAM_StrikeTeamDispatch); // Team for dispatching the Strike Teams FSMCreate (GravWells, TEAM_GravwellTeam1); // ACT 1 ships: Gravity Well Generator #1 FSMCreate (GravWells, TEAM_GravwellTeam2); // ACT 1 ships: Gravity Well Generator #2 FSMCreate (GravWells, TEAM_GravwellTeam3); // ACT 1 ships: Gravity Well Generator #3 FSMCreate (GuardGravWells, TEAM_GuardGWTeam1); // ACT 1 ships: Missile Destroyer FSMCreate (GuardGravWells, TEAM_GuardGWTeam2); // ACT 1 ships: Assault Frigates FSMCreate (GuardGravWells, TEAM_GuardGWTeam3); // ACT 1 ships: Assault Frigates FSMCreate (GravWellSupport, TEAM_GW1Support); // ACT 1 ships: Support Frigate servicing GravWell #1 FSMCreate (GravWellSupport, TEAM_GW2Support); // ACT 1 ships: Support Frigate servicing GravWell #2 FSMCreate (GravWellSupport, TEAM_GW3Support); // ACT 1 ships: Support Frigate servicing GravWell #3 FSMCreate (AIShips, TEAM_AICarrier); // CPU controlled Carrier FSMCreate (AIShips, TEAM_AICollector); // CPU controlled Collector FSMCreate (AIShips, TEAM_AIController); // CPU controlled Controller FSMCreate (Carrier, TEAM_Carrier); // Carrier (KAS-controlled) FSMCreate (GuardCarrier, TEAM_GuardCarrierIon); // Guard team for Carrier: Ion Cannon Frigates FSMCreate (GuardCarrier, TEAM_GuardCarrierCorv); // Guard team for Carrier: Heavy Corvettes FSMCreate (GuardCarrier, TEAM_GuardCarrierDef); // Guard team for Carrier: Defenders FSMCreate (Cruiser, TEAM_Cruiser); // ACT2 Heavy Cruiser FSMCreate (GuardCruiser, TEAM_GuardCruiserDef); // Guard team for Cruiser: Defenders FSMCreate (GuardCruiser, TEAM_GuardCruiserCorv); // Guard team for Cruiser: Heavy Corvettes FSMCreate (GuardCruiser, TEAM_GuardCruiserIon); // Guard team for Cruiser: Ion Cannon Frigates FSMCreate (STRInterceptors, TEAM_STRIntScout); // ACT2 STRIKE TEAM: Interceptors [Scouts] FSMCreate (STRInterceptors, TEAM_STRIntInt); // ACT2 STRIKE TEAM: Interceptors [Interceptors] FSMCreate (STRBombers, TEAM_STRBomberAT); // ACT2 STRIKE TEAM: Attack Bombers [Attack Bombers] FSMCreate (STRBombers, TEAM_STRBomberHC); // ACT2 STRIKE TEAM: Attack Bombers [Heavy Corvettes] FSMCreate (STRMG, TEAM_STRMGMG); // ACT2 STRIKE TEAM: Multi-Gun Corvettes [Multi-Gun Corvettes] FSMCreate (STRMG, TEAM_STRMGSF); // ACT2 STRIKE TEAM: Multi-Gun Corvettes [Support Frigate] FSMCreate (STRGW, TEAM_STRGWIon); // ACT2 STRIKE TEAM: GravWell [Ion Cannon Frigates] FSMCreate (STRGW, TEAM_STRGWGrav); // ACT2 STRIKE TEAM: GravWell [Gravity Well Generator] FSMCreate (STRCG, TEAM_STRCGIon); // ACT2 STRIKE TEAM: CloakGen [Ion Cannon Frigates] FSMCreate (STRCG, TEAM_STRCGCloak); // ACT2 STRIKE TEAM: CloakGen [Cloak Generator] FSMCreate (Defector, TEAM_Defector); // ACT3: Defector! [Destroyer] FSMCreate (ChaseDefector, TEAM_ChaseDestroyer); // ACT3: Chase Destroyer FSMCreate (ChaseDefector, TEAM_ChaseFrigate); // ACT3: Chase Frigates FSMCreate (ChaseDefector, TEAM_ChaseSupport); // ACT3: Chase Support Frigate FSMCreate (ChaseDefector, TEAM_ChaseInt); // ACT3: Chase Interceptors //FSMCreate(MinelayingTeam, TEAM_MinelayingTeam); //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // AI stuffs // // Set all the AI Features BuildControl(TRUE); // give computer player control EnableAllAIFeatures (); DisableAIFeature (1, 1); // DEFENSE feature: guard teams are created - default to small teams in spherical formation around resource ships DisableAIFeature (2, 1); // DEFENSE feature: guard teams are larger and roam around. React to distress signals and invasion of sphere of influence DisableAIFeature (10, 1); // DEFENSE feature: mothership defense is activated - this option causes idle ships to defend the mothership DisableAIFeature (20, 1); // DEFENSE feature: guard and active guard teams also get recalled and defend the mothership DisableAIFeature (40, 1); // DEFENSE feature: all ships in the computer player's fleet available get recalled and defend the mothership DisableAIFeature (100, 1); // DEFENSE feature: minimal cloak defense - if any cloak capable ship is detected, the computer player builds a few proximity sensors DisableAIFeature (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 //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // save the level! SaveLevel (12, LSTRING_Savegame); ENDINIT WATCH //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // location card // IFONCE (TRUE) TimerCreateSetStart ("LocationCardTimer", 1); ENDIFONCE IF (TimerExpiredDestroy ("LocationCardTimer")) LocationCard (5000, LSTRING_LocationCard); ENDIF //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // FSM creates // //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // NIS's // //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // fleet intel // //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // AI stuffs // //Detecting the transition to ACT2: //1) As soon as one of the initial Frigates gets killed IFONCE ( (ShipsCount (TEAMSHIPS_GuardGWTeam2) = 0) OR (ShipsCount (TEAMSHIPS_GuardGWTeam3) = 0) ) VarCreateSet ("G_ACT2HasBegun", TRUE); //MusicStop (4); ENDIFONCE //2) If the Carrier gets attacked by a 'substantial' attack force ( > 1000 RUs worth of ships) IFONCE (TRUE) VarCreateSet ("G_TOTALCarrierAttackersACT1", 0); ENDIFONCE ShipsSelectClass (SHIPS_CarrierFightersACT1, SHIPS_CarrierAttackedACT1, "CLASS_Fighter"); ShipsSelectClass (SHIPS_CarrierCorvettesACT1, SHIPS_CarrierAttackedACT1, "CLASS_Corvette"); ShipsSelectClass (SHIPS_CarrierFrigatesACT1, SHIPS_CarrierAttackedACT1, "CLASS_Frigate"); ShipsSelectClass (SHIPS_CarrierDestroyersACT1, SHIPS_CarrierAttackedACT1, "CLASS_Destroyer"); ShipsSelectClass (SHIPS_CarrierCarriersACT1, SHIPS_CarrierAttackedACT1, "CLASS_Carrier"); VarSet ("G_TOTALCarrierAttackersACT1", 62*(ShipsCount (SHIPS_CarrierFightersACT1)) // Add up the value in RUs of all the ships attacking +222*(ShipsCount (SHIPS_CarrierCorvettesACT1)) +612*(ShipsCount (SHIPS_CarrierFrigatesACT1)) +1425*(ShipsCount (SHIPS_CarrierDestroyersACT1)) +2000*(ShipsCount (SHIPS_CarrierCarriersACT1))); IFONCE ( (VarGet ("G_TOTALCarrierAttackersACT1") > 1000) AND (VarGet ("G_ACT2HasBegun") = FALSE) ) VarCreateSet ("G_ACT2HasBegun", TRUE); ENDIFONCE //3) If the Carrier gets low on health (somehow the player managed to do it with < 1000 RUs worth of ships at any given time) IFONCE ( (VarGet ("G_CarrierLowOnHealth") = TRUE) AND (VarGet ("G_ACT2HasBegun") = FALSE) ) VarCreateSet ("G_ACT2HasBegun", TRUE); ENDIFONCE // If all these ships are dead, then ACT3 has begun // 1) Cruiser // 2) Guard Cruiser team // 3) Carrier // 4) Guard Carrier team //IFONCE ( (ShipsCount (TEAMSHIPS_Carrier) = 0) AND // (ShipsCount (TEAMSHIPS_GuardCarrierCorv) = 0) AND // (ShipsCount (TEAMSHIPS_GuardCarrierDef) = 0) AND // (ShipsCount (TEAMSHIPS_Cruiser) = 0) AND // (ShipsCount (TEAMSHIPS_GuardCruiserCorv) = 0) AND // (ShipsCount (TEAMSHIPS_GuardCruiserDef) = 0) ) // VarCreateSet ("G_ACT3HasBegun", TRUE); //ENDIFONCE //IFONCE ( (ShipsCount (TEAMSHIPS_Carrier) = 0) AND IFONCE (ShipsCount (TEAMSHIPS_Cruiser) = 0) VarCreateSet ("G_ACT3HasBegun", TRUE); ENDIFONCE // All this in case there are teams not fully built when the Carrier dies // IF (ShipsCount (TEAMSHIPS_Carrier) = 0) // // STRInterceptors // IFONCE (ShipsCount (TEAMSHIPS_RSTRIntScout) > 0) // FSMCreate (STRInterceptors, TEAM_RSTRIntScout); // ENDIFONCE // IFONCE (ShipsCount (TEAMSHIPS_RSTRIntInt) > 0) // FSMCreate (STRInterceptors, TEAM_RSTRIntInt); // ENDIFONCE // // // STRBombers // IFONCE (ShipsCount (TEAMSHIPS_RSTRBomberAT) > 0) // FSMCreate (STRBombers, TEAM_RSTRBomberAT); // ENDIFONCE // IFONCE (ShipsCount (TEAMSHIPS_RSTRBomberHC) > 0) // FSMCreate (STRBombers, TEAM_RSTRBomberHC); // ENDIFONCE // // // STRMG // IFONCE (ShipsCount (TEAMSHIPS_RSTRMGMG) > 0) // FSMCreate (STRBombers, TEAM_RSTRMGMG); // ENDIFONCE // IFONCE (ShipsCount (TEAMSHIPS_RSTRMGSF) > 0) // FSMCreate (STRBombers, TEAM_RSTRMGSF); // ENDIFONCE // // // STRGW // IFONCE (ShipsCount (TEAMSHIPS_RSTRGWIon) > 0) // FSMCreate (STRBombers, TEAM_RSTRGWIon); // ENDIFONCE // IFONCE (ShipsCount (TEAMSHIPS_RSTRGWGrav) > 0) // FSMCreate (STRBombers, TEAM_RSTRGWGrav); // ENDIFONCE // // // STRCG // IFONCE (ShipsCount (TEAMSHIPS_RSTRCGIon) > 0) // FSMCreate (STRBombers, TEAM_RSTRCGIon); // ENDIFONCE // IFONCE (ShipsCount (TEAMSHIPS_RSTRCGCloak) > 0) // FSMCreate (STRBombers, TEAM_RSTRCGCloak); // ENDIFONCE // ENDIF //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // 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 say when the attack on your immobilized fleet has begun IFONCE (TRUE) TimerCreateSetStart ("G_UnderAttackTimer", 30); ENDIFONCE // create the timer to play the missile tech event IFONCE ( (VarGet ("G_UnderAttackHasPlayed") = TRUE) AND ((NOT TechGet ("MissileWeapons")) AND (NOT TechGetResearch ("MissileWeapons"))) ) TimerCreateSetStart ("G_PlayMissileTech", 10); ENDIFONCE // create the timer to play the research event for Cloaked Fighter or Defense Fighter tech IFONCE (TRUE) TimerCreateSetStart ("G_TechnologyTimer", Random (180, 250)); ENDIFONCE //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // mission objectives // // if the Fleet Intel intro is playing, create the initial objectives: IFONCE (VarGet ("G_FleetIntelIntroHasPlayed") = TRUE) ObjectiveCreate ("DestroyField", LSTRING_FICaughtInFieldTASKBAR, LSTRING_FICaughtInFieldTASKBAR); VarCreateSet ("G_DestroyFieldObjectiveCreated", TRUE); ENDIFONCE // if the player destroys all 3 Gravwells, the "DestroyField" objective is met IFONCE ( (ShipsCount (TEAMSHIPS_GravwellTeam1) = 0) AND (ShipsCount (TEAMSHIPS_GravwellTeam2) = 0) AND (ShipsCount (TEAMSHIPS_GravwellTeam3) = 0) ) ObjectiveSet ("DestroyField", TRUE); ENDIFONCE // if the Fleet Intel event about the attack has played, create the protect fleet objective IFONCE (VarGet ("G_UnderAttackHasPlayed") = TRUE) ObjectiveCreate ("ProtectFleet", LSTRING_FIUnderAttackTASKBAR, LSTRING_FIUnderAttackTASKBAR); ENDIFONCE // if the Fleet Intel event about the Defector has played, create the protect Defector objective IFONCE (VarGet ("G_ProtectDefectorHasPlayed") = TRUE) ObjectiveSet ("ProtectFleet", TRUE); ObjectiveCreate ("ProtectDefector", LSTRING_FIHelpDefectorTASKBAR, LSTRING_FIHelpDefectorTASKBAR); ENDIFONCE // if the Defector dies, the level ends IFONCE ( (TimerExpired ("G_FocusOnDefectorNow")) AND (ShipsCount (TEAMSHIPS_Defector) = 0) ) //Print ("MISSION FAILED NOW! +_+_+_+_+_+_+_"); MissionFailed (); ENDIFONCE // if the player destroys all of the ChaseTeam, the "ProtectDefector" objective is met IFONCE ( (ShipsCount (TEAMSHIPS_ChaseDestroyer) = 0) AND (ShipsCount (TEAMSHIPS_ChaseFrigate) = 0) AND (ShipsCount (TEAMSHIPS_ChaseSupport) = 0) ) //AND //(ShipsCount (TEAMSHIPS_ChaseInt) = 0) ) ObjectiveSet ("ProtectDefector", TRUE); MusicStop (4); PingRemove ("DefectorPing"); ENDIFONCE // if all primary objectives are complete, AND the Defector is in place, start a timer to create the HYPERSPACE objective IFONCE ( (ObjectiveGet ("DestroyField") = TRUE) AND (ObjectiveGet ("ProtectFleet") = TRUE) AND (ObjectiveGet ("ProtectDefector") = TRUE) AND (VarGet ("G_DefectorIsReadyToLeave") = 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_DefectorIsOnBoard") = TRUE) ObjectiveCreate ("Hyperspace", LSTRING_Hyperspace, LSTRING_Hyperspace); ENDIFONCE // when the player finally hyperspaces out, tell the Defector to hyperspace out too //IFONCE (TutGameSentMessage ("Game_BeginHyperspace")) // VarCreateSet ("G_DefectorCanHyperspaceOutNow", TRUE); //ENDIFONCE //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ // technology // // 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