def setup_all(self): debug.info("Truck Launched") self.truck_pirate = launch.launch_wave_around_unit( "Smuggler", "pirate", "truck", "modules/ai_qct_waitjump.py", 1, 3000, 5000, self.playa) debug.info("Scrap Released") self.cargo_container = launch.launch_wave_around_unit( "Scrap", "aera", "cargo", "default", 1, 7000, 5000, self.playa) debug.info("Aera Released") self.numaera = 4 self.aera_specopp = () for i in range(self.numaera): self.aera_specopp = self.aera_specopp + ( launch.launch_wave_around_unit( "Aera/SpecOpp", "aera", "dagger", "default", 1, 2000, 4000, self.playa), ) debug.info("Aera Cloaked") unit.TfgCloak(1, self.aera_specopp) self.repeat_more = 1 self.repeat_less = 1 self.repeat_end1 = 1 self.repeat_end2 = 1 self.timer1 = 0 self.jumpout = 0 self.quest_exit = 0 global truck_exit truck_exit = 0
def Execute (self): # remove this test self.sysfile = VS.getSystemFile() # if self.truck_pirate.getUnitSystemFile()!= VS.getSystemFile(): # print "Truck has Jumped Away :-)" # else: # print "Truck is still here! :-(" if self.quest_exit == 1: return 0 if (self.playa): if self.jumpout == 1: self.end_destruction() elif self.cargo_container.getMinDis(self.playa.Position()) < 1000: self.start_destruction() elif self.cargo_container.getMinDis(self.playa.Position()) < 2500 and not self.cargo_container.isNull(): if self.repeat_end2 == 1: VS.IOmessage (3,"[Computer]","all","Warning! Annomalous warp echos detected.") print print "Aera Un-Cloaked" print unit.TfgCloak(0,self.aera_specopp) self.repeat_end2 = 2 elif self.cargo_container.isNull(): if self.repeat_end2 == 1: print "null activating" VS.IOmessage (3,"[Computer]","all","Warning! De-Cloaking hostiles.") print print "Aera Un-Cloaked" print unit.TfgCloak(0,self.aera_specopp) unit.setTfgDirective(self.aera_specopp,self.playa,'A') VS.IOmessage (0,"Aera SpecOpp","all","[Translate: Aernoss -> Englysh] <surprise> Attention all! <anger> Entity/self valueless takes possession away value.") VS.IOmessage (3,"Aera SpecOpp","all","[Translate: Aernoss -> Englysh] <anger> Filthy human procreate entity/self! Death done!") self.repeat_end2 = 0 if unit.TfgisNull(self.aera_specopp): self.mission_success() if self.jumpout == 1: self.end_destruction() if self.truck_pirate.getMinDis(self.playa.Position()) < 200: if self.repeat_end1 == 2: VS.IOmessage (0,"Sonorous E2","all","I am with Confed Special Service.") VS.IOmessage (0,"Sonorous E2","all","You are hampering a priority 0 operation.") self.confed_epeels2=launch.launch_wave_around_unit("Sonorous A3","confed","epeellcat","default",5,1000,5000,self.playa) VS.IOmessage (5,"Sonorous E2","all","You are Terminated.") self.confed_epeels2.SetTarget(self.playa) self.confed_epeels2.setFgDirective('A') self.repeat_end1 = 3 elif self.truck_pirate.getMinDis(self.playa.Position()) < 1000: if self.repeat_end1 == 1: VS.IOmessage (0,"Smuggler:truck","all","Back off mate, if you know what's good for you.") print "My target is..." global truck_exit truck_exit = 1 print truck_exit self.repeat_more = 0 self.repeat_less = 0 self.repeat_end1 = 2 elif self.truck_pirate.getMinDis(self.playa.Position()) < 3000: if self.repeat_less == 1: VS.IOmessage (0,"Smuggler:truck","all","Please stay away, we are carrying valuable cargo.") self.repeat_more = 1 self.repeat_less = 0 else: if self.repeat_more == 1: VS.IOmessage (0,"Smuggler:truck","all","Keep your distance.") self.repeat_more = 0 self.repeat_less = 1 # self.makeQuestPersistent() return 1