Advertisement
KillsAlone

H2MT Headlong+AI

Nov 4th, 2021 (edited)
2,385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 54.16 KB | None | 0 0
  1. ;= H2MT Headlong+AI by Kills Alone ======================================================
  2.  
  3. ;= GLOBALS ==============================================================================
  4.  
  5. (global short g_jetfuel 100)
  6.  
  7. (global boolean g_jetpack_enabled false)
  8. (global boolean g_pelican_unit_dump false)
  9. (global boolean g_phantom_unit_dump false)
  10.  
  11. (global vehicle g_gausshog none)
  12. (global vehicle g_guntower none)
  13. (global vehicle g_hev_frank none)
  14. (global vehicle g_hev_syn none)
  15. (global vehicle g_hev_trigger none)
  16. (global vehicle g_pelican none)
  17. (global vehicle g_phantom none)
  18. (global vehicle g_scorpion none)
  19. (global vehicle g_warthog none)
  20. (global vehicle g_wraith none)
  21.  
  22. (global short g_randomh1 0)
  23.  
  24. (global short g_random_alien 0)
  25. (global short g_random_alien_alpha 0)
  26. (global short g_random_alien_beta 0)
  27.  
  28. (global short g_random_spartan 0)
  29.  
  30. (global ai g_spartan_name none)
  31.  
  32.  
  33. (script static unit player0
  34.   (unit (list_get (players) 0)))
  35.  
  36. (script static unit player1
  37.   (unit (list_get (players) 1)))
  38.  
  39. (script static short player_count
  40.   (list_count (players)))
  41.  
  42.  
  43. ;= COMMAND SCRIPTS ======================================================================
  44.  
  45. (script command_script cs_csquad_drop_bugger_advance0
  46.     ; Allow the Buggers to move and attack
  47.     (cs_ignore_obstacles false)
  48.         (cs_vehicle_boost true)
  49. ;           (cs_enable_moving true)
  50.                 (cs_enable_targeting true)
  51.  
  52.                 ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
  53.                 (cs_force_combat_status 4)
  54.  
  55. ;               (cs_go_to csquad_drop_bugger_advance0/p0 1)
  56.  
  57. ;               (cs_face true csquad_drop_bugger_advance0/p4FACE)
  58.  
  59. )
  60.  
  61. (script command_script cs_csquad_drop_ranger_advance0
  62.     ; Allow the Rangers to move and attack
  63.     (cs_ignore_obstacles false)
  64.         (cs_vehicle_boost true)
  65.             (cs_enable_moving true)
  66.                 (cs_enable_targeting true)
  67.  
  68.                 ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
  69.                 (cs_force_combat_status 4)
  70.  
  71. ;               (cs_go_to csquad_drop_ranger_advance0/p0 1)
  72.  
  73.                 (cs_face true csquad_drop_ranger_advance0/p4FACE)
  74.  
  75. )
  76.  
  77. (script command_script cs_csquad_drop_wraith0_advance0
  78.     ; Allow the Wraith to move and attack
  79.     (cs_ignore_obstacles true)
  80.         (cs_vehicle_boost true)
  81.             (cs_enable_moving true)
  82.                 (cs_enable_targeting true)
  83. ;               (cs_vehicle_speed 0.50)
  84. ;               (sleep 300)
  85. ;           (begin_random
  86. ;               (begin (cs_go_to csquad_drop_wraith0_advance0/p0 1) (sleep (random_range 10 20)))
  87. ;               (begin (cs_go_to csquad_drop_wraith0_advance0/p1 1) (sleep (random_range 10 20)))
  88. ;               (begin (sleep 1) (sleep (random_range 10 20)))
  89. ;           )
  90. ;               (cs_go_to csquad_drop_wraith0_advance0/p0 1)
  91. ;               (cs_go_to csquad_drop_wraith0_advance0/p1 1)
  92.  
  93.                 ; Look at the player
  94. ;               (cs_look_player true)
  95.  
  96.                 ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
  97. ;               (cs_force_combat_status 4)
  98. )
  99.  
  100. (script command_script cs_csquad_ghost0_advance0
  101. ;   (cs_abort_on_damage true)
  102. ;   (cs_abort_on_combat_status ai_combat_status_clear_los)
  103.     (cs_vehicle_boost true)
  104.     (cs_enable_targeting true)
  105.     (cs_go_to csquad_ghost0_advance0/p0 1)
  106.     (cs_go_to csquad_ghost0_advance0/p1 1)
  107.     (cs_go_to csquad_ghost0_advance0/p2 1)
  108.     (cs_go_to csquad_ghost0_advance0/p3 1)
  109.     (cs_go_to csquad_ghost0_advance0/p4 1)
  110.     (cs_go_to csquad_ghost0_advance0/p5 1)
  111.     (cs_go_to csquad_ghost0_advance0/p6 1)
  112.         (cs_enable_moving true)
  113.        
  114. ;       (ai_prefer_target g_gausshog 1)
  115.        
  116.                 ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
  117.                 (cs_force_combat_status 4)
  118. ;               (cs_shoot true)
  119.                 (cs_shoot true g_scorpion)
  120. )
  121.  
  122. (script command_script cs_csquad_ghost2_advance0
  123.     ; Allow the Ghost to move and attack
  124.     (cs_ignore_obstacles true)
  125.         (cs_vehicle_boost true)
  126.             (cs_enable_moving true)
  127.                 (cs_enable_targeting true)
  128.                 (cs_go_to csquad_ghost2_advance0/p0 1)
  129.                 (cs_go_to csquad_ghost2_advance0/p1 1)
  130.                 (cs_go_to csquad_ghost2_advance0/p2 1)
  131.                 ; Rotate the Ghost
  132.                 (cs_face true csquad_ghost2_advance0/p3FACE)
  133. ;               (cs_face_object true scarab)
  134.                 (sleep 30)
  135.  
  136.                 ; Look at the player
  137. ;               (cs_look_player true)
  138.  
  139.                 (cs_ignore_obstacles false)
  140.  
  141.                 ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
  142.                 (cs_force_combat_status 4)
  143.  
  144. ;                   (cs_vehicle_speed 0.50)
  145. ;                   (cs_vehicle_boost false)
  146. ;               (cs_go_to csquad_ghost2_advance0/p3 1)
  147. ;                       (sleep 100)
  148. ;                   (cs_vehicle_speed 1)
  149. )
  150.  
  151. (script command_script cs_csquad_banshee1_advance0
  152.     ; Allow the Banshee to move and attack
  153.     (cs_ignore_obstacles false)
  154.         (cs_vehicle_boost true)
  155.             (cs_enable_moving true)
  156.                 (cs_enable_targeting true)
  157.                 (cs_go_to csquad_banshee1_advance0/p0 1)
  158.                 (cs_go_to csquad_banshee1_advance0/p1 1)
  159. ;               (cs_go_to csquad_banshee1_advance0/p2 1)
  160.                 ; Rotate the Banshee
  161.                 (cs_face true csquad_banshee1_advance0/p3FACE)
  162. ;               (cs_face_object true scarab)
  163.                 (sleep 30)
  164.  
  165.                 ; Look at the player
  166. ;               (cs_look_player true)
  167.  
  168.                 (cs_ignore_obstacles false)
  169.  
  170.                 ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
  171.                 (cs_force_combat_status 4)
  172.  
  173. ;                   (cs_vehicle_speed 0.50)
  174. ;                   (cs_vehicle_boost false)
  175. ;               (cs_go_to csquad_banshee1_advance0/p3 1)
  176. ;                       (sleep 100)
  177. ;                   (cs_vehicle_speed 1)
  178. )
  179.  
  180. (script command_script cs_csquad_phantom0_advance0
  181.     (cs_ignore_obstacles true)
  182.     (cs_enable_pathfinding_failsafe true)
  183.  
  184.     (sleep_until (= g_phantom_unit_dump 1) 1)
  185.    
  186.     (print "Phantom is coming to take a dump!")
  187. ;       (ai_place csquad_phantom0)
  188.  
  189. ;   (cs_vehicle_speed 0.5)
  190. ;   (cs_vehicle_boost true)
  191.     (cs_enable_targeting true)
  192.    
  193.     (cs_fly_to csquad_phantom0_advance0/p0 1)
  194.         (sleep 1)
  195.     (cs_fly_to csquad_phantom0_advance0/p1 1)
  196.     (sleep 1)  
  197.     (cs_fly_to csquad_phantom0_advance0/p2 1)
  198.         (sleep 30)
  199.  
  200.     ; Rotate the Phantom
  201.     (cs_face true csquad_phantom0_advance0/p3FACE)
  202. ;   (cs_face_object true scarab)
  203.         (sleep 30)
  204.  
  205.     (cs_fly_to csquad_phantom0_advance0/p4 1)
  206.         (sleep 100)
  207.  
  208.     ; Drop some Covenant
  209.     (print "Phantom takes a dump all over you!")
  210.     (ai_vehicle_exit csquad_phantom0/passenger0)
  211.     (sleep 20)
  212.     (ai_vehicle_exit csquad_phantom0/passenger1)
  213.     (sleep 20)
  214.     (ai_vehicle_exit csquad_phantom0/passenger2)
  215.     (sleep 20)
  216.     (ai_vehicle_exit csquad_phantom0/passenger3)
  217. ;   (ai_vehicle_exit ai_current_actor)
  218. ;       (sleep 60)
  219.  
  220.     ; Turn the Phantom and head towards the exit
  221.     (cs_face false csquad_phantom0_advance0/p3FACE)
  222.     (cs_fly_to csquad_phantom0_advance0/p1 1)
  223.         (sleep 1)
  224. ;       (cs_vehicle_speed 1)
  225.     (cs_fly_to csquad_phantom0_advance0/p0 1)
  226. ;           (cs_enable_moving true)
  227.  
  228. ;   (ai_erase ai_current_squad)
  229.     (object_destroy (ai_vehicle_get ai_current_actor))
  230.  
  231.         (set g_phantom_unit_dump 0)
  232. )
  233.  
  234. (script command_script cs_hsquad_pelican0_advance0
  235.     (cs_ignore_obstacles true)
  236.     (cs_enable_pathfinding_failsafe true)
  237.  
  238.     (sleep_until (= g_pelican_unit_dump 1) 1)
  239.    
  240.     (print "Pelican is coming to take a dump!")
  241. ;       (ai_place hsquad_pelican0)
  242.  
  243.     (cs_vehicle_speed 0.5)
  244. ;   (cs_vehicle_boost true)
  245.     (cs_enable_targeting true)
  246.    
  247.     (cs_fly_to hsquad_pelican0_advance0/p0 1)
  248.         (sleep 1)
  249.     (cs_fly_to hsquad_pelican0_advance0/p1 1)
  250.     (sleep 1)  
  251.     (cs_fly_to hsquad_pelican0_advance0/p2 1)
  252.         (sleep 30)
  253.  
  254.     ; Rotate the Pelican
  255.     (cs_face true hsquad_pelican0_advance0/p3FACE)
  256. ;   (cs_face_object true scarab)
  257.         (sleep 30)
  258.  
  259.     (cs_fly_to hsquad_pelican0_advance0/p4 1)
  260.         (sleep 100)
  261.  
  262. ;   (unit_open (ai_vehicle_get ai_current_actor))
  263.  
  264.     ; Drop some Marines
  265.     (print "Pelican takes a dump all over you!")
  266.     (ai_vehicle_exit hsquad_pelican0/passenger0)
  267.     (ai_vehicle_exit hsquad_pelican0/passenger1)
  268. ;   (ai_vehicle_exit ai_current_actor)
  269.  
  270. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l01")
  271. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l02")
  272. ;   (sleep (random_range 0 30)
  273. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l03")
  274. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l04")
  275. ;   (sleep (random_range 0 30)
  276. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l05")
  277. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r01")
  278. ;   (sleep (random_range 0 30)
  279. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r02")
  280. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r03")
  281. ;   (sleep (random_range 0 30)
  282. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r04")
  283. ;   (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r05")
  284. ;   (ai_migrate "hsquad_pelican0" "hsquad")
  285.         (sleep 60)
  286.  
  287. ;   (unit_close (ai_vehicle_get ai_current_actor)
  288.  
  289.     ; Turn the Pelican and head towards the exit
  290.     (cs_face false hsquad_pelican0_advance0/p3FACE)
  291.     (cs_fly_to hsquad_pelican0_advance0/p1 1)
  292.         (sleep 1)
  293.         (cs_vehicle_speed 1)
  294.     (cs_fly_to hsquad_pelican0_advance0/p0 1)
  295. ;           (cs_enable_moving true)
  296.  
  297. ;   (ai_erase ai_current_squad)
  298.     (object_destroy (ai_vehicle_get ai_current_actor))
  299.  
  300.         (set g_pelican_unit_dump 0)
  301. )
  302.  
  303. (script command_script cs_hsquad_warthog1_advance0
  304. ; Allow the Warthog to move and attack
  305.     (cs_ignore_obstacles true)
  306.             (cs_enable_moving true)
  307.                 (cs_enable_targeting true)
  308.                     (cs_go_to hsquad_warthog1_advance0/p0 1)
  309.                     (cs_go_to hsquad_warthog1_advance0/p1 1)
  310.                     (cs_go_to hsquad_warthog1_advance0/p2 1)
  311.                     (cs_go_to hsquad_warthog1_advance0/p3 1)
  312.                     (cs_go_to hsquad_warthog1_advance0/p4 1)
  313.                     (cs_go_to hsquad_warthog1_advance0/p5 1)
  314.                     (cs_go_to hsquad_warthog1_advance0/p6 1)
  315.                     (cs_go_to hsquad_warthog1_advance0/p7 1)
  316.                     (cs_go_to hsquad_warthog1_advance0/p8 1)
  317.                     (cs_go_to hsquad_warthog1_advance0/p9 1)
  318.                     (cs_go_to hsquad_warthog1_advance0/p10 1)
  319.                     (cs_go_to hsquad_warthog1_advance0/p11 1)
  320.                     (cs_go_to hsquad_warthog1_advance0/p12 1)
  321.                     (cs_go_to hsquad_warthog1_advance0/p13 1)
  322.                     (cs_go_to hsquad_warthog1_advance0/p14 1)
  323.                     (cs_go_to hsquad_warthog1_advance0/p15 1)
  324.                     (cs_go_to hsquad_warthog1_advance0/p16 1)
  325.                     (cs_go_to hsquad_warthog1_advance0/p17 1)
  326.                     (cs_go_to hsquad_warthog1_advance0/p18 1)
  327.                     (cs_go_to hsquad_warthog1_advance0/p19 1)
  328.                 ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
  329.                 (cs_force_combat_status 4)
  330.                     (sleep 500)
  331.                 (ai_vehicle_exit hsquad_warthog1)
  332.  
  333.                 ; Regroup with Hsquad
  334.                 (ai_migrate "hsquad_warthog1/gunner" "hsquad")
  335.  
  336.                 ; Orders Driver to get into the Wraith (if alive)
  337.                 (ai_vehicle_enter hsquad_warthog1/driver g_wraith "wraith_d")
  338.                     (sleep 100)
  339.                 (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_warthog "explosion")
  340.                 (object_destroy g_warthog)
  341. )
  342.  
  343. (script command_script cs_hsquad_deploy_turret0
  344.     (cs_enable_pathfinding_failsafe true)
  345. ;   (cs_deploy_turret hsquad_deploy_turret0/p0)
  346.         (begin_random
  347.             (begin (cs_deploy_turret hsquad_deploy_turret0/p0) (sleep (random_range 10 20)))
  348.             (begin (cs_deploy_turret hsquad_deploy_turret0/p1) (sleep (random_range 10 20)))
  349.             (begin (cs_deploy_turret hsquad_deploy_turret0/p2) (sleep (random_range 10 20)))
  350.             (begin (cs_deploy_turret hsquad_deploy_turret0/p3) (sleep (random_range 10 20)))
  351.         )
  352. )
  353.  
  354. (script command_script cs_hsquad_scorpion_advance0
  355. ; Allow the Scorpion to move and attack
  356.     (cs_ignore_obstacles true)
  357.             (cs_enable_moving true)
  358.                 (cs_enable_targeting true)
  359.                         (sleep 300)
  360.                     (cs_go_to hsquad_scorpion_advance0/p0 1)
  361.                     (cs_go_to hsquad_scorpion_advance0/p1 1)
  362.                     (cs_go_to hsquad_scorpion_advance0/p2 1)
  363.                     (cs_go_to hsquad_scorpion_advance0/p3 1)
  364.                     (cs_go_to hsquad_scorpion_advance0/p4 1)
  365.                     (cs_go_to hsquad_scorpion_advance0/p5 1)
  366.                     (cs_go_to hsquad_scorpion_advance0/p6 1)
  367.                     (cs_go_to hsquad_scorpion_advance0/p7 1)
  368.                         (sleep 300)
  369.                     (cs_go_to hsquad_scorpion_advance0/p4 1)
  370.                     (cs_go_to hsquad_scorpion_advance0/p8 1)
  371.                     ; Turn the Scorpion
  372.                     (cs_face false hsquad_scorpion_advance0/pFACE)
  373. )
  374.  
  375. ;*
  376. (script command_script cs_ai_player_style
  377. ; Allow the AI Player(s) to move and attack
  378.     (cs_ignore_obstacles true)
  379.             (cs_enable_moving true)
  380.                 (cs_enable_targeting true)
  381.                     (cs_set_style assaulting)
  382. )
  383. *;
  384.  
  385. ;= KILL VOLUMES =========================================================================
  386.  
  387. ; Kill Player 1?
  388. (script continuous killzone_player0
  389.     (if (OR (= (volume_test_objects kill_shark (list_get (players) 0)) TRUE)
  390.             (= (volume_test_objects kill_bldg4 (list_get (players) 0)) TRUE))
  391.         (unit_kill (unit (list_get (players) 0)))
  392.     )
  393. )
  394.  
  395. ; Kill Player 2?
  396. (script continuous killzone_player1
  397.     (if (OR (= (volume_test_objects kill_shark (list_get (players) 1)) TRUE)
  398.             (= (volume_test_objects kill_bldg4 (list_get (players) 1)) TRUE))
  399.         (unit_kill (unit (list_get (players) 1)))
  400.     )
  401. )
  402.  
  403.  
  404. ;= TELEPORTER ===========================================================================
  405.  
  406. ; Teleport Player 1
  407. (script continuous tele_player0
  408.         (sleep_until (= (volume_test_objects tele_touch (list_get (players) 0)) TRUE))
  409.             (begin
  410.                 (object_teleport (player0) tele_dest)
  411.                 (print "Teleporting Player 1")
  412.                 (sound_impulse_start "sound\game_sfx\multiplayer\teleporter_activate" none 1.0)
  413.             )
  414. )
  415.  
  416. ; Teleport Player 2
  417. (script continuous tele_player1
  418.         (sleep_until (= (volume_test_objects tele_touch (list_get (players) 1)) TRUE))
  419.             (begin
  420.                 (object_teleport (player1) tele_dest)
  421.                 (print "Teleporting Player 2")
  422.                 (sound_impulse_start "sound\game_sfx\multiplayer\teleporter_activate" none 1.0)
  423.             )
  424. )
  425.  
  426.  
  427. ;= RESPAWN ==============================================================================
  428.  
  429. (script continuous csquad_sniper0_spawner
  430.     (sleep 200)
  431.         (if (<= (ai_living_count csquad_sniper0) 0)
  432.             (begin
  433.                 (print "Csquad Sniper have been defeated!")
  434.                 (sleep 150)
  435.                 (ai_place csquad_sniper0)
  436.             )
  437.         )
  438. )
  439.  
  440. (script continuous csquad_drop_alpha_spawner
  441.     (sleep 200)
  442.  
  443.     (if (<= (ai_living_fraction alien_drop_alpha) 0)
  444.         (begin
  445.             (sleep 300)
  446.             (print "The Covenant are sending down reinforcements!")
  447.             (set g_random_alien_alpha (random_range 0 5))
  448.  
  449.         ; Brutes0
  450.         (if (= g_random_alien_alpha 0)
  451.             (begin
  452.                 (print "Random drop ... Brutes0 at alpha")
  453.                     (sleep 100)
  454.                 (ai_place "csquad_drop_alpha_brutes0")
  455.             )
  456.         )
  457.         ; Brutes1
  458.         (if (= g_random_alien_alpha 1)
  459.             (begin
  460.                 (print "Random drop ... Brutes0 at alpha")
  461.                     (sleep 100)
  462.                 (ai_place "csquad_drop_alpha_brutes1")
  463.             )
  464.         )
  465.         ; Brutes2
  466.         (if (= g_random_alien_alpha 2)
  467.             (begin
  468.                 (print "Random drop ... Brutes0 at alpha")
  469.                     (sleep 100)
  470.                 (ai_place "csquad_drop_alpha_brutes2")
  471.             )
  472.         )
  473.  
  474.         ; Hunters0
  475.         (if (= g_random_alien_alpha 3)
  476.             (begin
  477.                 (print "Random drop ... Hunters0 at alpha")
  478.                     (sleep 100)
  479.                 (ai_place "csquad_drop_alpha_hunters0")
  480.             )
  481.         )
  482.         ; Hunters1
  483.         (if (= g_random_alien_alpha 4)
  484.             (begin
  485.                 (print "Random drop ... Hunters1 at alpha")
  486.                     (sleep 100)
  487.                 (ai_place "csquad_drop_alpha_hunters0")
  488.             )
  489.         )
  490.         ; Hunters2
  491.         (if (= g_random_alien_alpha 5)
  492.             (begin
  493.                 (print "Random drop ... Hunters2 at alpha")
  494.                     (sleep 100)
  495.                 (ai_place "csquad_drop_alpha_hunters0")
  496.             )
  497.         )
  498.         )
  499.     )
  500. )
  501.  
  502. (script continuous csquad_drop_beta_spawner
  503.     (sleep 200)
  504.  
  505.     (if (<= (ai_living_fraction alien_drop_beta) 0)
  506.         (begin
  507.             (sleep 200)
  508.             (print "The Covenant are sending down reinforcements!")
  509.             (set g_random_alien_beta (random_range 0 5))
  510.  
  511.         ; Brutes0
  512.         (if (= g_random_alien_beta 0)
  513.             (begin
  514.                 (print "Random drop ... Brutes0 at beta")
  515.                     (sleep 100)
  516.                 (ai_place "csquad_drop_beta_brutes0")
  517.             )
  518.         )
  519.         ; Brutes1
  520.         (if (= g_random_alien_beta 1)
  521.             (begin
  522.                 (print "Random drop ... Brutes1 at beta")
  523.                     (sleep 100)
  524.                 (ai_place "csquad_drop_beta_brutes1")
  525.             )
  526.         )
  527.         ; Brutes2
  528.         (if (= g_random_alien_beta 2)
  529.             (begin
  530.                 (print "Random drop ... Brutes2 at beta")
  531.                     (sleep 100)
  532.                 (ai_place "csquad_drop_beta_brutes2")
  533.             )
  534.         )
  535.  
  536.         ; Elites0
  537.         (if (= g_random_alien_beta 3)
  538.             (begin
  539.                 (print "Random drop ... Elites0 at beta")
  540.                     (sleep 100)
  541.                 (ai_place "csquad_drop_beta_elites0")
  542.             )
  543.         )
  544.         ; Elites1
  545.         (if (= g_random_alien_beta 4)
  546.             (begin
  547.                 (print "Random drop ... Elites1 at beta")
  548.                     (sleep 100)
  549.                 (ai_place "csquad_drop_beta_elites1")
  550.             )
  551.         )
  552.         ; Elites2
  553.         (if (= g_random_alien_beta 5)
  554.             (begin
  555.                 (print "Random drop ... Elites2 at beta")
  556.                     (sleep 100)
  557.                 (ai_place "csquad_drop_beta_elites2")
  558.             )
  559.         )
  560.         )
  561.     )
  562. )
  563.  
  564. (script continuous csquad0_spawner
  565.     (sleep 200)
  566.         (if (<= (ai_living_count csquad) 0)
  567.             (begin
  568.                 (print "Csquad have been defeated!")
  569. ;               (sleep 150)
  570. ;               (ai_place csquad_phantom0)
  571.                 (set g_phantom_unit_dump 1)
  572.                 (sleep_forever)
  573.             )
  574.         )
  575. )
  576.  
  577. (script continuous hsquad0_spawner
  578.     (sleep 200)
  579.         (if (<= (ai_living_count hsquad) 0)
  580.             (begin
  581.                 (print "Hsquad has been lost!")
  582. ;               (sleep 150)
  583. ;               (ai_place hsquad_pelican0)
  584.                 (set g_pelican_unit_dump 1)
  585.                 (sleep_forever)
  586.             )
  587.         )
  588. )
  589.  
  590. (script continuous hsquad_outside_spawner
  591.     (sleep 200)
  592.         (if (<= (ai_living_count hsquad_outside) 0)
  593.             (begin
  594.                 (print "Hsquad Outside has been lost!")
  595.                 (sleep 200)
  596.                 (ai_place hsquad_outside)
  597.             )
  598.         )
  599. )
  600.  
  601. (script continuous odst_chunky_spawner
  602.     (sleep 200)
  603. ;       (if (<= (ai_living_count odst_chunky) 0)
  604.         (if (<= (unit_get_health (ai_get_unit odst_chunky)) 0)
  605.             (begin
  606.                 (print "ODST Chunky has been lost!")
  607.  
  608.                 (object_create_anew door)
  609. ;               (object_create_anew hev)
  610.                     (sleep 420)
  611. ;               (ai_place odst_chunky)
  612.                 (ai_place odst_syn)
  613.  
  614. ;               Identify HEV
  615.                 (set g_hev_syn (ai_vehicle_get_from_starting_location odst_syn/odst_syn))
  616.  
  617.                 (objects_attach g_hev_syn "door" door "")              
  618.                     (sleep 180)
  619.                 (objects_detach g_hev_syn door)
  620.                 (effect_new_on_object_marker "effects\cinematics\05\hev_door_release" g_hev_syn "door_release")
  621.                 (ai_vehicle_exit odst_syn)
  622.                     (sleep 200)
  623. ;               (effect_new_on_object_marker "effects\generic\explosions_ground\metal_destroyed" g_hev_syn "hev_d") ; Dangerous
  624.                 (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_hev_syn "hev_d")
  625.                 (object_destroy g_hev_syn)
  626.                 (object_destroy door)
  627.                 (sleep_forever)
  628.             )
  629.         )
  630. )
  631.  
  632. (script continuous odst_griefer_spawner
  633.     (sleep 200)
  634. ;       (if (<= (ai_living_count odst_griefer) 0)
  635.         (if (<= (unit_get_health (ai_get_unit odst_griefer)) 0)
  636.             (begin
  637.                 (print "ODST Griefer has been lost!")
  638.  
  639.                 (object_create_anew door)
  640. ;               (object_create_anew hev)
  641.                     (sleep 420)
  642. ;               (ai_place odst_griefer)
  643.                 (ai_place odst_trigger)
  644.  
  645. ;               Identify HEV
  646.                 (set g_hev_trigger (ai_vehicle_get_from_starting_location odst_trigger/odst_trigger))
  647.  
  648.                 (objects_attach g_hev_trigger "door" door "")              
  649.                     (sleep 180)
  650.                 (objects_detach g_hev_trigger door)
  651.                 (effect_new_on_object_marker "effects\cinematics\05\hev_door_release" g_hev_trigger "door_release")
  652.                 (ai_vehicle_exit odst_trigger)
  653.                     (sleep 200)
  654. ;               (effect_new_on_object_marker "effects\generic\explosions_ground\metal_destroyed" g_hev_trigger "hev_d") ; Dangerous
  655.                 (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_hev_trigger "hev_d")
  656.                 (object_destroy g_hev_trigger)
  657.                 (object_destroy door)
  658.                 (sleep_forever)
  659.             )
  660.         )
  661. )
  662.  
  663. (script continuous odst_holiday_spawner
  664.     (sleep 200)
  665. ;       (if (<= (ai_living_count odst_holiday) 0)
  666.         (if (<= (unit_get_health (ai_get_unit odst_holiday)) 0)
  667.             (begin
  668.                 (print "ODST Holiday has been lost!")
  669.  
  670.                 (object_create_anew door)
  671. ;               (object_create_anew hev)
  672.                     (sleep 420)
  673. ;               (ai_place odst_holiday)
  674.                 (ai_place odst_frank)
  675.  
  676. ;               Identify HEV
  677.                 (set g_hev_frank (ai_vehicle_get_from_starting_location odst_frank/odst_frank))
  678.  
  679.                 (objects_attach g_hev_frank "door" door "")            
  680.                     (sleep 180)
  681.                 (objects_detach g_hev_frank door)
  682.                 (effect_new_on_object_marker "effects\cinematics\05\hev_door_release" g_hev_frank "door_release")
  683.                 (ai_vehicle_exit odst_frank)
  684.                     (sleep 200)
  685. ;               (effect_new_on_object_marker "effects\generic\explosions_ground\metal_destroyed" g_hev_frank "hev_d") ; Dangerous
  686.                 (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_hev_frank "hev_d")
  687.                 (object_destroy g_hev_frank)
  688.                 (object_destroy door)
  689.                 (sleep_forever)
  690.             )
  691.         )
  692. )
  693.  
  694. (script continuous odst_roach_spawner
  695.     (sleep 200)
  696. ;       (if (<= (ai_living_count odst_roach) 0)
  697.         (if (<= (unit_get_health (ai_get_unit odst_roach)) 0)
  698.             (begin
  699.                 (print "ODST Roach has been lost!")
  700.                 (sleep 420)
  701. ;               (ai_place odst_roach)
  702.                 (ai_place odst_slayer)
  703.                 (sleep_forever)
  704.             )
  705.         )
  706. )
  707.  
  708. (script static void spartan_gear
  709.                 (begin_random
  710.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) assault_rifle true false))
  711.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) battle_rifle true false))
  712. ;                   (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) brg true false))
  713.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) beam_rifle true false))
  714.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) brute_plasma_rifles true false))
  715.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) brute_shot true false))
  716.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) covenant_carbine true false))
  717.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) designated_marksman_rifle true false))
  718.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) gpmg true false))
  719.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) missile_pod+ar true false))
  720.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) plasma_rifles true false))
  721.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) pistol true false))
  722.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) rocket_launcher true false))
  723.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) shotgun true false))
  724. ;                   (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) smgs true false))
  725. ;                   (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) smg+magnum true false))
  726.                     (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) sniper_rifle true false))
  727. ;                   (begin (print "Leave my inventory alone!"))
  728. ;                   (begin (print "Stop touching my weapons!"))
  729. ;                   (begin (print "Keep your hands off my guns!"))
  730.                 )
  731. )
  732.  
  733. (script continuous spartan_spawner
  734.     (sleep 200)
  735.  
  736.     (if (<= (unit_get_health (ai_get_unit spartan)) 0)
  737. ;   (if (<= (ai_living_fraction spartan)0)
  738. ;   (if (<= (ai_living_count spartan) 0)
  739.         (begin
  740.             (print "Waking Spartan spawner ...")
  741.             (set g_random_spartan (random_range 0 27))
  742.  
  743.         ; Spartan_Foxx0
  744.         (if (= g_random_spartan 0)
  745.             (begin
  746.                 (print "Placing Spartan Foxx0")
  747.                     (sleep 100)
  748.                 (ai_place "spartan_foxx0")
  749.                     (sleep 5)
  750.                 (set g_spartan_name "spartan_foxx0/spartan_foxx") ; use ai_current_actor or ai_current_squad next time
  751. ;               (spartan_gear)
  752.             )
  753.         )
  754.         ; Spartan_Foxx1
  755.         (if (= g_random_spartan 1)
  756.             (begin
  757.                 (print "Placing Spartan Foxx1")
  758.                     (sleep 100)
  759.                 (ai_place "spartan_foxx1")
  760.                     (sleep 5)
  761.                 (set g_spartan_name "spartan_foxx1/spartan_foxx")
  762. ;               (spartan_gear)
  763.             )
  764.         )
  765.        
  766.         ; Spartan Raid0
  767.         (if (= g_random_spartan 2)
  768.             (begin
  769.                 (print "Placing Spartan Raid0")
  770.                     (sleep 100)
  771.                 (ai_place "spartan_raid0")
  772.                     (sleep 5)
  773.                 (set g_spartan_name "spartan_raid0/spartan_raid")
  774. ;               (spartan_gear)
  775.             )
  776.         )
  777.         ; Spartan Raid1
  778.         (if (= g_random_spartan 3)
  779.             (begin
  780.                 (print "Placing Spartan Raid1")
  781.                     (sleep 100)
  782.                 (ai_place "spartan_raid1")
  783.                     (sleep 5)
  784.                 (set g_spartan_name "spartan_raid1/spartan_raid")
  785. ;               (spartan_gear)
  786.             )
  787.         )
  788.        
  789.         ; Spartan Fury0
  790.         (if (= g_random_spartan 4)
  791.             (begin
  792.                 (print "Placing Spartan Fury0")
  793.                     (sleep 100)
  794.                 (ai_place "spartan_fury0")
  795.                     (sleep 5)
  796.                 (set g_spartan_name "spartan_fury0/spartan_fury")
  797. ;               (spartan_gear)
  798.             )
  799.         )
  800.         ; Spartan Fury1
  801.         (if (= g_random_spartan 5)
  802.             (begin
  803.                 (print "Placing Spartan Fury1")
  804.                     (sleep 100)
  805.                 (ai_place "spartan_fury1")
  806.                     (sleep 5)
  807.                 (set g_spartan_name "spartan_fury1/spartan_fury")
  808. ;               (spartan_gear)
  809.             )
  810.         )
  811.  
  812.         ; Spartan Scorn0
  813.         (if (= g_random_spartan 6)
  814.             (begin
  815.                 (print "Placing Spartan Scorn0")
  816.                     (sleep 100)
  817.                 (ai_place "spartan_scorn0")
  818.                     (sleep 5)
  819.                 (set g_spartan_name "spartan_scorn0/spartan_scorn")
  820. ;               (spartan_gear)
  821.             )
  822.         )
  823.         ; Spartan Scorn1
  824.         (if (= g_random_spartan 7)
  825.             (begin
  826.                 (print "Placing Spartan Scorn1")
  827.                     (sleep 100)
  828.                 (ai_place "spartan_scorn1")
  829.                     (sleep 5)
  830.                 (set g_spartan_name "spartan_scorn1/spartan_scorn")
  831. ;               (spartan_gear)
  832.             )
  833.         )
  834.  
  835.         ; Spartan Avenger0
  836.         (if (= g_random_spartan 8)
  837.             (begin
  838.                 (print "Placing Spartan Avenger0")
  839.                     (sleep 100)
  840.                 (ai_place "spartan_avenger0")
  841.                     (sleep 5)
  842.                 (set g_spartan_name "spartan_avenger0/spartan_avenger")
  843. ;               (spartan_gear)
  844.             )
  845.         )
  846.         ; Spartan Avenger1
  847.         (if (= g_random_spartan 9)
  848.             (begin
  849.                 (print "Placing Spartan Avenger1")
  850.                     (sleep 100)
  851.                 (ai_place "spartan_avenger1")
  852.                     (sleep 5)
  853.                 (set g_spartan_name "spartan_avenger1/spartan_avenger")
  854. ;               (spartan_gear)
  855.             )
  856.         )
  857.  
  858.         ; Spartan Cheeks0
  859.         (if (= g_random_spartan 10)
  860.             (begin
  861.                 (print "Placing Spartan Cheeks0")
  862.                     (sleep 100)
  863.                 (ai_place "spartan_cheeks0")
  864.                     (sleep 5)
  865.                 (set g_spartan_name "spartan_cheeks0/spartan_cheeks")
  866. ;               (spartan_gear)
  867.             )
  868.         )
  869.         ; Spartan Cheeks1
  870.         (if (= g_random_spartan 11)
  871.             (begin
  872.                 (print "Placing Spartan Cheeks1")
  873.                     (sleep 100)
  874.                 (ai_place "spartan_cheeks1")
  875.                     (sleep 5)
  876.                 (set g_spartan_name "spartan_cheeks1/spartan_cheeks")
  877. ;               (spartan_gear)
  878.             )
  879.         )
  880.        
  881.         ; Spartan Opti0
  882.         (if (= g_random_spartan 12)
  883.             (begin
  884.                 (print "Placing Spartan Opti0")
  885.                     (sleep 100)
  886.                 (ai_place "spartan_opti0")
  887.                     (sleep 5)
  888.                 (set g_spartan_name "spartan_opti0/spartan_opti")
  889. ;               (spartan_gear)     
  890.             )
  891.         )
  892.         ; Spartan Opti1
  893.         (if (= g_random_spartan 13)
  894.             (begin
  895.                 (print "Placing Spartan Opti1")
  896.                     (sleep 100)
  897.                 (ai_place "spartan_opti1")
  898.                     (sleep 5)
  899.                 (set g_spartan_name "spartan_opti1/spartan_opti")
  900. ;               (spartan_gear)         
  901.             )
  902.         )
  903.  
  904.         ; Spartan_Pirate0
  905.         (if (= g_random_spartan 14)
  906.             (begin
  907.                 (print "Placing Spartan Pirate0")
  908.                     (sleep 100)
  909.                 (ai_place "spartan_pirate0")
  910.                     (sleep 5)
  911.                 (set g_spartan_name "spartan_pirate0/spartan_pirate")
  912. ;               (spartan_gear)
  913.             )
  914.         )
  915.         ; Spartan_Pirate1
  916.         (if (= g_random_spartan 15)
  917.             (begin
  918.                 (print "Placing Spartan Pirate1")
  919.                     (sleep 100)
  920.                 (ai_place "spartan_pirate1")
  921.                     (sleep 5)
  922.                 (set g_spartan_name "spartan_pirate1/spartan_pirate")
  923. ;               (spartan_gear)
  924.             )
  925.         )
  926.        
  927.         ; Spartan Kills0
  928.         (if (= g_random_spartan 16)
  929.             (begin
  930.                 (print "Placing Spartan Kills0")
  931.                     (sleep 100)
  932.                 (ai_place "spartan_kills0")
  933.                     (sleep 5)
  934.                 (set g_spartan_name "spartan_kills0/spartan_kills")
  935. ;               (spartan_gear)
  936.             )
  937.         )
  938.         ; Spartan Kills1
  939.         (if (= g_random_spartan 17)
  940.             (begin
  941.                 (print "Placing Spartan Kills1")
  942.                     (sleep 100)
  943.                 (ai_place "spartan_kills1")
  944.                     (sleep 5)
  945.                 (set g_spartan_name "spartan_kills1/spartan_kills")
  946. ;               (spartan_gear)
  947.             )
  948.         )
  949.        
  950.         ; Spartan Bo0
  951.         (if (= g_random_spartan 18)
  952.             (begin
  953.                 (print "Placing Spartan Bo0")
  954.                     (sleep 100)
  955.                 (ai_place "spartan_bo0")
  956.                     (sleep 5)
  957.                 (set g_spartan_name "spartan_bo0/spartan_bo")
  958. ;               (spartan_gear)
  959.             )
  960.         )
  961.         ; Spartan Bo1
  962.         (if (= g_random_spartan 19)
  963.             (begin
  964.                 (print "Placing Spartan Bo1")
  965.                     (sleep 100)
  966.                 (ai_place "spartan_bo1")
  967.                     (sleep 5)
  968.                 (set g_spartan_name "spartan_bo1/spartan_bo")
  969. ;               (spartan_gear)
  970.             )
  971.         )
  972.  
  973.         ; Spartan Carnage0
  974.         (if (= g_random_spartan 20)
  975.             (begin
  976.                 (print "Placing Spartan Carnage0")
  977.                     (sleep 100)
  978.                 (ai_place "spartan_carnage0")
  979.                     (sleep 5)
  980.                 (set g_spartan_name "spartan_carnage0/spartan_carnage")
  981. ;               (spartan_gear)
  982.             )
  983.         )
  984.         ; Spartan Carnage1
  985.         (if (= g_random_spartan 21)
  986.             (begin
  987.                 (print "Placing Spartan Carnage1")
  988.                     (sleep 100)
  989.                 (ai_place "spartan_carnage1")
  990.                     (sleep 5)
  991.                 (set g_spartan_name "spartan_carnage1/spartan_carnage")
  992. ;               (spartan_gear)
  993.             )
  994.         )
  995.  
  996.         ; Spartan Cypher0
  997.         (if (= g_random_spartan 22)
  998.             (begin
  999.                 (print "Placing Spartan Cypher0")
  1000.                     (sleep 100)
  1001.                 (ai_place "spartan_cypher0")
  1002.                     (sleep 5)
  1003.                 (set g_spartan_name "spartan_cypher0/spartan_cypher")
  1004. ;               (spartan_gear)
  1005.             )
  1006.         )
  1007.         ; Spartan Cypher1
  1008.         (if (= g_random_spartan 23)
  1009.             (begin
  1010.                 (print "Placing Spartan Cypher1")
  1011.                     (sleep 100)
  1012.                 (ai_place "spartan_cypher1")
  1013.                     (sleep 5)
  1014.                 (set g_spartan_name "spartan_cypher1/spartan_cypher")
  1015. ;               (spartan_gear)
  1016.             )
  1017.         )
  1018.  
  1019.         ; Spartan Grape0
  1020.         (if (= g_random_spartan 24)
  1021.             (begin
  1022.                 (print "Placing Spartan Grape0")
  1023.                     (sleep 100)
  1024.                 (ai_place "spartan_grape0")
  1025.                     (sleep 5)
  1026.                 (set g_spartan_name "spartan_grape0/spartan_grape")
  1027. ;               (spartan_gear)
  1028.             )
  1029.         )
  1030.         ; Spartan Grape1
  1031.         (if (= g_random_spartan 25)
  1032.             (begin
  1033.                 (print "Placing Spartan Grape1")
  1034.                     (sleep 100)
  1035.                 (ai_place "spartan_grape1")
  1036.                     (sleep 5)
  1037.                 (set g_spartan_name "spartan_grape1/spartan_grape")
  1038. ;               (spartan_gear)
  1039.             )
  1040.         )
  1041.        
  1042.         ; Spartan Shade0
  1043.         (if (= g_random_spartan 26)
  1044.             (begin
  1045.                 (print "Placing Spartan Shade0")
  1046.                     (sleep 100)
  1047.                 (ai_place "spartan_shade0")
  1048.                     (sleep 5)
  1049.                 (set g_spartan_name "spartan_shade0/spartan_shade")
  1050. ;               (spartan_gear)         
  1051.             )
  1052.         )
  1053.         ; Spartan Shade1
  1054.         (if (= g_random_spartan 27)
  1055.             (begin
  1056.                 (print "Placing Spartan Shade1")
  1057.                     (sleep 100)
  1058.                 (ai_place "spartan_shade1")
  1059.                     (sleep 5)
  1060.                 (set g_spartan_name "spartan_shade1/spartan_shade")
  1061. ;               (spartan_gear)         
  1062.             )
  1063.         )
  1064.     )
  1065. ))
  1066.  
  1067. (script continuous hsquad_pelican0_spawner
  1068.     (sleep 200)
  1069.         (if (<= (ai_living_count hsquad_pelican0) 0)
  1070.             (begin
  1071.                 (print "Hsquad Pelican dump has been lost!")
  1072.                 (sleep 300)
  1073.                 (ai_place hsquad_pelican0)
  1074.                 (cs_run_command_script hsquad_pelican0/pilot cs_hsquad_pelican0_advance0)
  1075.                 (set g_pelican_unit_dump 1)
  1076.             )
  1077.         )
  1078. )
  1079.  
  1080. (script continuous csquad_phantom0_spawner
  1081.     (sleep 200)
  1082.         (if (<= (ai_living_count csquad_phantom0) 0)
  1083.             (begin
  1084.                 (print "Csquad Phantom dump has been defeated!")
  1085.                 (sleep 300)
  1086.                 (ai_place csquad_phantom0)
  1087.                 (cs_run_command_script csquad_phantom0/pilot cs_csquad_phantom0_advance0)
  1088.                 (set g_phantom_unit_dump 1)
  1089.             )
  1090.         )
  1091. )
  1092.  
  1093. (script continuous csquad_ghost2_spawner
  1094.     (sleep 200)
  1095. ;       (if (<= (ai_living_count csquad_ghost2) 0)
  1096.         (if (<= (unit_get_health (ai_get_unit csquad_ghost2)) 0)
  1097.             (begin
  1098.                 (print "Csquad Ghost has been defeated!")
  1099.                 (sleep 300)
  1100.                 (ai_place csquad_ghost2)
  1101.                 (cs_run_command_script csquad_ghost2/driver cs_csquad_ghost2_advance0)
  1102.             )
  1103.         )
  1104. )
  1105.  
  1106. (script continuous csquad_banshee1_spawner
  1107.     (sleep 200)
  1108.         (if (<= (ai_living_count csquad_banshee1) 0)
  1109.             (begin
  1110.                 (print "Csquad Banshee has been defeated!")
  1111.                 (sleep 700)
  1112.                 (ai_place csquad_banshee1)
  1113.                 (cs_run_command_script csquad_banshee1/pilot cs_csquad_banshee1_advance0)
  1114.             )
  1115.         )
  1116. )
  1117.  
  1118. (script continuous csquad_drop_spawner
  1119.     (sleep 300)
  1120.  
  1121.     (if (<= (ai_living_fraction alien_drop)
  1122. ;   (if (<= (ai_living_count alien_drop)
  1123.         0)
  1124.         (begin
  1125.             (sleep 600)
  1126.             (print "The Covenant Capital Ship is sending down reinforcements!")
  1127.             (set g_random_alien (random_range 1 24)) ; 0 24
  1128.  
  1129.         ; Tartarus
  1130.         (if (= g_random_alien 0)
  1131.             (begin
  1132.                 (print "Random drop ... Tartarus")
  1133.                     (sleep 100)
  1134.                     ; Remove Tartarus invinciblity
  1135.                     (object_set_function_variable (ai_get_object csquad_drop_tartarus0) "invincibility" 0 0.1)
  1136.                 (ai_place "csquad_drop_tartarus0")
  1137.             )
  1138.         )
  1139.         ; Brutes0
  1140.         (if (= g_random_alien 1)
  1141.             (begin
  1142.                 (print "Random drop ... Brutes0")
  1143.                     (sleep 100)
  1144.                 (ai_place "csquad_drop_brutes0")
  1145.             )
  1146.         )
  1147.         ; Brutes1
  1148.         (if (= g_random_alien 2)
  1149.             (begin
  1150.                 (print "Random drop ... Brutes1")
  1151.                     (sleep 100)
  1152.                 (ai_place "csquad_drop_brutes1")
  1153.             )
  1154.         )
  1155.         ; Brutes2
  1156.         (if (= g_random_alien 3)
  1157.             (begin
  1158.                 (print "Random drop ... Brutes2")
  1159.                     (sleep 100)
  1160.                 (ai_place "csquad_drop_brutes2")
  1161.             )
  1162.         )
  1163.  
  1164.         ; Bugger0
  1165.         (if (= g_random_alien 4)
  1166.             (begin
  1167.                 (print "Random drop ... bugger0")
  1168.                     (sleep 100)
  1169.                 (ai_place "csquad_drop_bugger0/1")
  1170.                 (object_set_velocity (ai_get_object csquad_drop_bugger0/1) 0 0 -28.6)
  1171.                 (cs_run_command_script csquad_drop_bugger0/1 cs_csquad_drop_bugger_advance0)
  1172.                     (sleep (random_range 3 9))
  1173.                 (ai_place "csquad_drop_bugger0/2")
  1174.                 (object_set_velocity (ai_get_object csquad_drop_bugger0/2) 0 0 -28.5)
  1175.                 (cs_run_command_script csquad_drop_bugger0/2 cs_csquad_drop_bugger_advance0)
  1176.                     (sleep (random_range 3 9))
  1177.                 (ai_place "csquad_drop_bugger0/3")
  1178.                 (object_set_velocity (ai_get_object csquad_drop_bugger0/3) 0 0 -28.4)
  1179.                 (cs_run_command_script csquad_drop_bugger0/3 cs_csquad_drop_bugger_advance0)
  1180.                     (sleep (random_range 3 9))
  1181.                 (ai_place "csquad_drop_bugger0/4")
  1182.                 (object_set_velocity (ai_get_object csquad_drop_bugger0/4) 0 0 -28.5)
  1183.                 (cs_run_command_script csquad_drop_bugger0/4 cs_csquad_drop_bugger_advance0)
  1184.                     (sleep (random_range 3 9))
  1185.                 (ai_place "csquad_drop_bugger0/5")
  1186.                 (object_set_velocity (ai_get_object csquad_drop_bugger0/5) 0 0 -28.5)
  1187.                 (cs_run_command_script csquad_drop_bugger0/5 cs_csquad_drop_bugger_advance0)
  1188.                     (sleep (random_range 3 9))
  1189.                 (ai_place "csquad_drop_bugger0/6")
  1190.                 (object_set_velocity (ai_get_object csquad_drop_bugger0/6) 0 0 -28.5)
  1191.                 (cs_run_command_script csquad_drop_bugger0/6 cs_csquad_drop_bugger_advance0)
  1192.  
  1193. ;               (ai_magically_see csquad_drop_bugger0 hsquad)
  1194.                 (ai_magically_see ai_current_squad human) ; hsquad
  1195.             )
  1196.         )
  1197.         ; Bugger1
  1198.         (if (= g_random_alien 5)
  1199.             (begin
  1200.                 (print "Random drop ... bugger1")
  1201.                     (sleep 100)
  1202.                 (ai_place "csquad_drop_bugger1/1")
  1203.                 (object_set_velocity (ai_get_object csquad_drop_bugger1/1) 0 0 -28.6)
  1204.                 (cs_run_command_script csquad_drop_bugger1/1 cs_csquad_drop_bugger_advance0)
  1205.                     (sleep (random_range 3 9))
  1206.                 (ai_place "csquad_drop_bugger1/2")
  1207.                 (object_set_velocity (ai_get_object csquad_drop_bugger1/2) 0 0 -28.5)
  1208.                 (cs_run_command_script csquad_drop_bugger1/2 cs_csquad_drop_bugger_advance0)
  1209.                     (sleep (random_range 3 9))
  1210.                 (ai_place "csquad_drop_bugger1/3")
  1211.                 (object_set_velocity (ai_get_object csquad_drop_bugger1/3) 0 0 -28.4)
  1212.                 (cs_run_command_script csquad_drop_bugger1/3 cs_csquad_drop_bugger_advance0)
  1213.                     (sleep (random_range 3 9))
  1214.                 (ai_place "csquad_drop_bugger1/4")
  1215.                 (object_set_velocity (ai_get_object csquad_drop_bugger1/4) 0 0 -28.5)
  1216.                 (cs_run_command_script csquad_drop_bugger1/4 cs_csquad_drop_bugger_advance0)
  1217.                     (sleep (random_range 3 9))
  1218.                 (ai_place "csquad_drop_bugger1/5")
  1219.                 (object_set_velocity (ai_get_object csquad_drop_bugger1/5) 0 0 -28.5)
  1220.                 (cs_run_command_script csquad_drop_bugger1/5 cs_csquad_drop_bugger_advance0)
  1221.                     (sleep (random_range 3 9))
  1222.                 (ai_place "csquad_drop_bugger1/6")
  1223.                 (object_set_velocity (ai_get_object csquad_drop_bugger1/6) 0 0 -28.5)
  1224.                 (cs_run_command_script csquad_drop_bugger1/6 cs_csquad_drop_bugger_advance0)
  1225.  
  1226. ;               (ai_magically_see csquad_drop_bugger1 hsquad)
  1227.                 (ai_magically_see ai_current_squad human) ; hsquad
  1228.             )
  1229.         )
  1230.  
  1231.         ; Elites0
  1232.         (if (= g_random_alien 6)
  1233.             (begin
  1234.                 (print "Random drop ... Elites0")
  1235.                     (sleep 100)
  1236.                 (ai_place "csquad_drop_elites0")
  1237.  
  1238.             )
  1239.         )
  1240.         ; Elites1
  1241.         (if (= g_random_alien 7)
  1242.             (begin
  1243.                 (print "Random drop ... Elites1")
  1244.                     (sleep 100)
  1245.                 (ai_place "csquad_drop_elites1")
  1246.  
  1247.             )
  1248.         )
  1249.         ; Elites2
  1250.         (if (= g_random_alien 8)
  1251.             (begin
  1252.                 (print "Random drop ... Elites2")
  1253.                     (sleep 100)
  1254.                 (ai_place "csquad_drop_elites2")
  1255.  
  1256.             )
  1257.         )
  1258.         ; SpecOps0
  1259.         (if (= g_random_alien 9)
  1260.             (begin
  1261.                 (print "Random drop ... SpecOps0")
  1262.                     (sleep 100)
  1263.                 (ai_place "csquad_drop_specops0")
  1264.  
  1265.             )
  1266.         )
  1267.         ; Stealth0
  1268.         (if (= g_random_alien 10)
  1269.             (begin
  1270.                 (print "Random drop ... Stealth0")
  1271.                     (sleep 100)
  1272.                 (ai_place "csquad_drop_stealth0")
  1273.  
  1274.             )
  1275.         )
  1276.         ; Ranger0
  1277.         (if (= g_random_alien 11)
  1278.             (begin
  1279.                 (print "Random drop ... Ranger0")
  1280.                     (sleep 100)
  1281.                 (ai_place "csquad_drop_ranger0/1")
  1282.                 (cs_run_command_script csquad_drop_ranger0/1 cs_csquad_drop_ranger_advance0)
  1283.                     (sleep (random_range 6 32))
  1284.                 (ai_place "csquad_drop_ranger0/2")
  1285.                 (cs_run_command_script csquad_drop_ranger0/2 cs_csquad_drop_ranger_advance0)
  1286.                     (sleep (random_range 6 32))
  1287.                 (ai_place "csquad_drop_ranger0/3")
  1288.                 (cs_run_command_script csquad_drop_ranger0/3 cs_csquad_drop_ranger_advance0)
  1289.                     (sleep (random_range 6 32))
  1290.                 (ai_place "csquad_drop_ranger0/4")
  1291.                 (cs_run_command_script csquad_drop_ranger0/4 cs_csquad_drop_ranger_advance0)
  1292.  
  1293.                 (ai_magically_see ai_current_squad human)
  1294.             )
  1295.         )
  1296.         ; Ranger1
  1297.         (if (= g_random_alien 12)
  1298.             (begin
  1299.                 (print "Random drop ... Ranger1")
  1300.                     (sleep 100)
  1301.                 (ai_place "csquad_drop_ranger1/1")
  1302.                 (cs_run_command_script csquad_drop_ranger1/1 cs_csquad_drop_ranger_advance0)
  1303.                     (sleep (random_range 6 32))
  1304.                 (ai_place "csquad_drop_ranger1/2")
  1305.                 (cs_run_command_script csquad_drop_ranger1/2 cs_csquad_drop_ranger_advance0)
  1306.                     (sleep (random_range 6 32))
  1307.                 (ai_place "csquad_drop_ranger1/3")
  1308.                 (cs_run_command_script csquad_drop_ranger1/3 cs_csquad_drop_ranger_advance0)
  1309.                     (sleep (random_range 6 32))
  1310.                 (ai_place "csquad_drop_ranger1/4")
  1311.                 (cs_run_command_script csquad_drop_ranger1/4 cs_csquad_drop_ranger_advance0)
  1312.  
  1313.                 (ai_magically_see ai_current_squad human)
  1314.             )
  1315.         )
  1316.  
  1317.         ; Grunts0
  1318.         (if (= g_random_alien 13)
  1319.             (begin
  1320.                 (print "Random drop ... Grunts0")
  1321.                     (sleep 100)
  1322.                 (ai_place "csquad_drop_grunts0")
  1323.             )
  1324.         )
  1325.         ; Grunts1
  1326.         (if (= g_random_alien 14)
  1327.             (begin
  1328.                 (print "Random drop ... Grunts1")
  1329.                     (sleep 100)
  1330.                 (ai_place "csquad_drop_grunts1")
  1331.             )
  1332.         )
  1333.         ; Grunts2
  1334.         (if (= g_random_alien 15)
  1335.             (begin
  1336.                 (print "Random drop ... Grunts2")
  1337.                     (sleep 100)
  1338.                 (ai_place "csquad_drop_grunts2")
  1339.             )
  1340.         )
  1341.  
  1342.         ; Hunters0
  1343.         (if (= g_random_alien 16)
  1344.             (begin
  1345.                 (print "Random drop ... Hunters0")
  1346.                     (sleep 100)
  1347.                 (ai_place "csquad_drop_hunters0")
  1348.             )
  1349.         )
  1350.         ; Hunters1
  1351.         (if (= g_random_alien 17)
  1352.             (begin
  1353.                 (print "Random drop ... Hunters1")
  1354.                     (sleep 100)
  1355.                 (ai_place "csquad_drop_hunters0")
  1356.             )
  1357.         )
  1358.         ; Hunters2
  1359.         (if (= g_random_alien 18)
  1360.             (begin
  1361.                 (print "Random drop ... Hunters2")
  1362.                     (sleep 100)
  1363.                 (ai_place "csquad_drop_hunters0")
  1364.             )
  1365.         )
  1366.  
  1367.         ; Jackals0
  1368.         (if (= g_random_alien 19)
  1369.             (begin
  1370.                 (print "Random drop ... Jackals0")
  1371.                     (sleep 100)
  1372.                 (ai_place "csquad_drop_jackals0")
  1373.             )
  1374.         )
  1375.         ; Jackals1
  1376.         (if (= g_random_alien 20)
  1377.             (begin
  1378.                 (print "Random drop ... Jackals1")
  1379.                     (sleep 100)
  1380.                 (ai_place "csquad_drop_jackals1")
  1381.             )
  1382.         )
  1383.         ; Jackals2
  1384.         (if (= g_random_alien 21)
  1385.             (begin
  1386.                 (print "Random drop ... Jackals2")
  1387.                     (sleep 100)
  1388.                 (ai_place "csquad_drop_jackals2")
  1389.             )
  1390.         )
  1391.  
  1392.         ; Wraith0
  1393.         (if (= g_random_alien 22)
  1394.             (begin
  1395.                 (print "Random drop ... Wraith0")
  1396.                     (sleep 100)
  1397.                 (ai_place "csquad_drop_wraith0")                   
  1398.             )
  1399.         )
  1400.         ; Wraith1
  1401.         (if (= g_random_alien 23)
  1402.             (begin
  1403.                 (print "Random drop ... Wraith1")
  1404.                     (sleep 100)
  1405.                 (ai_place "csquad_drop_wraith0")                   
  1406.             )
  1407.         )
  1408.         ; Wraith2
  1409.         (if (= g_random_alien 24)
  1410.             (begin
  1411.                 (print "Random drop ... Wraith2")
  1412.                     (sleep 100)
  1413.                 (ai_place "csquad_drop_wraith0")                   
  1414.             )
  1415.         )
  1416.     )
  1417. ))
  1418.  
  1419.  
  1420. (script continuous csquad_wraith2_spawner
  1421.     (sleep 200)
  1422.         (if (<= (unit_get_health (ai_get_unit csquad_wraith1/driver)) 0)
  1423.             (begin
  1424.                 (print "Wraith1 has been defeated!")
  1425.                 (sleep 450)
  1426.                 (ai_place csquad_wraith2)
  1427.                 (sleep_forever)
  1428.             )
  1429.         )
  1430. )
  1431.  
  1432.  
  1433. (script continuous hsquad_gunner_spawner
  1434.     (sleep 200)
  1435. ;       (if (<= (ai_living_count human_gunner) 0)
  1436.         (if (<= (unit_get_health (ai_get_unit hsquad_gunner/gunner)) 0)
  1437.             (begin
  1438.                 (print "Hsquad Gunner has been lost!")
  1439.                 (sleep 250)
  1440.                 (ai_place hsquad_gunner)
  1441.             )
  1442.         )
  1443. )
  1444.  
  1445.  
  1446. (script continuous hsquad_warthog0_flipper
  1447.     (sleep 200)
  1448.         (if (= (vehicle_overturned g_gausshog) 1)
  1449.             (begin
  1450.                 (print "Flip that hog!")
  1451.                 (sleep 100)
  1452.                 (vehicle_flip g_gausshog)
  1453.             )
  1454.         )
  1455. )
  1456.  
  1457.  
  1458. ;= CHAPTER TITLES =======================================================================
  1459.  
  1460. (script dormant chapter_title0
  1461.     (sleep 30)
  1462. ;   (cinematic_set_title title0)
  1463.     (sleep 150)
  1464.     (hud_cinematic_fade 1 0.5)
  1465.     (cinematic_show_letterbox false)
  1466. )
  1467.  
  1468.  
  1469. ;= MISC =================================================================================
  1470.  
  1471. (script static boolean player_in_vehicle
  1472.     (or
  1473.         (unit_in_vehicle (unit (player0)))
  1474.         (and
  1475.             (game_is_cooperative)
  1476.             (unit_in_vehicle (unit (player1)))
  1477.         )
  1478.     )
  1479. )
  1480.  
  1481. (script static boolean players_in_vehicle
  1482.     (and
  1483.         (unit_in_vehicle (unit (player0)))
  1484.         (or
  1485.             (not (game_is_cooperative))
  1486.             (unit_in_vehicle (unit (player1)))
  1487.         )
  1488.     )
  1489. )
  1490.  
  1491. ;= MISSION MAIN =========================================================================
  1492.  
  1493. (script dormant mission_start
  1494.  
  1495.     ; Initial chapter title
  1496. ;   (wake chapter_title0)
  1497.  
  1498.     ; Initial checkpoint
  1499. ;   (sleep 150)
  1500. ;   (game_save)
  1501.  
  1502.     ; Identify Pelican
  1503.     (set g_pelican (ai_vehicle_get_from_starting_location hsquad_pelican0/pilot))
  1504.  
  1505.     ; Identify Phantom
  1506.     (set g_phantom (ai_vehicle_get_from_starting_location csquad_phantom0/pilot))
  1507.  
  1508.     ; Identify Scorpion
  1509.     (set g_scorpion (ai_vehicle_get_from_starting_location hsquad_scorpion0/driver))
  1510.  
  1511.     ; Identify Wraith
  1512.     (set g_wraith (ai_vehicle_get_from_starting_location csquad_wraith1/driver))
  1513.  
  1514.     ; Identify Warthog
  1515.     (set g_warthog (ai_vehicle_get_from_starting_location hsquad_warthog1/driver))
  1516.  
  1517.     ; Identify Gausshog
  1518.     (set g_gausshog (ai_vehicle_get_from_starting_location hsquad_warthog0/warthog0))
  1519.  
  1520.     ; Identify Guntower
  1521.     (set g_guntower (ai_vehicle_get_from_starting_location csquad_guntower0/guntower0))
  1522.    
  1523.     ; Initial order for Gunner to get into Gausshog
  1524.     (ai_vehicle_enter hsquad_gunner g_gausshog "warthog_g")
  1525.  
  1526.     ; Initial order for Gunner to get into Guntower
  1527.     (ai_vehicle_enter csquad_gunner g_guntower "guntower_d")
  1528.  
  1529.     ; Enable AI vehicles
  1530.     (cs_run_command_script csquad_drop_wraith0/driver cs_csquad_drop_wraith0_advance0)
  1531.  
  1532.     (cs_run_command_script csquad_ghost2/driver cs_csquad_ghost2_advance0)
  1533.  
  1534.     (cs_run_command_script csquad_ghost0/driver cs_csquad_ghost0_advance0)
  1535.  
  1536.     (cs_run_command_script csquad_banshee1/pilot cs_csquad_banshee1_advance0)
  1537.  
  1538.     (cs_run_command_script csquad_phantom0/pilot cs_csquad_phantom0_advance0)
  1539.  
  1540.     (cs_run_command_script hsquad_pelican0/pilot cs_hsquad_pelican0_advance0)
  1541.  
  1542.     (cs_run_command_script hsquad_warthog1/driver cs_hsquad_warthog1_advance0)
  1543.    
  1544.     (cs_run_command_script hsquad_scorpion0/driver cs_hsquad_scorpion_advance0)
  1545.  
  1546.     (cs_run_command_script hsquad/1 cs_hsquad_deploy_turret0)
  1547.    
  1548.     ; Give a Marine Johnson's hat
  1549.     (object_set_permutation (ai_get_object hsquad/1) "helmet" "hat")
  1550.  
  1551.     ; Remove a Marines helmet
  1552. ;   (object_set_permutation (ai_get_object hsquad/1) "helmet" "")
  1553.  
  1554.     ; Give Marine a Comm Pack and Pilot helmt
  1555.     (object_set_permutation (ai_get_object hsquad/2) "comm_pack" "on")
  1556.     (object_set_permutation (ai_get_object hsquad/2) "helmet" "pilot")
  1557.  
  1558.     ; Grab what you can, supplies are running low
  1559.     (set g_randomh1 (random_range 0 8))
  1560.         (if (= g_randomh1 0) (object_set_permutation (ai_get_object hsquad_outside/1) "helmet" ""))
  1561.         (if (= g_randomh1 1) (object_set_permutation (ai_get_object hsquad_outside/2) "helmet" ""))
  1562.         (if (= g_randomh1 2) (object_set_permutation (ai_get_object hsquad_outside/2) "helmet" "hat"))
  1563.         (if (= g_randomh1 3) (object_set_permutation (ai_get_object hsquad_outside/3) "helmet" ""))
  1564.         (if (= g_randomh1 4) (object_set_permutation (ai_get_object hsquad_outside/3) "helmet" "hat"))
  1565.         (if (= g_randomh1 5) (object_set_permutation (ai_get_object hsquad_outside/4) "helmet" ""))
  1566.         (if (= g_randomh1 6) (object_set_permutation (ai_get_object hsquad_outside/4) "helmet" "hat"))
  1567.         (if (= g_randomh1 7) (object_set_permutation (ai_get_object hsquad_pelican0/passenger0) "helmet" ""))
  1568.         (if (= g_randomh1 8) (object_set_permutation (ai_get_object hsquad_pelican0/passenger0) "helmet" "hat"))
  1569.  
  1570.     ; Remove ODST Chunky's head
  1571. ;   (object_set_permutation (ai_get_object odst_chunky/odst_chunky) "head" "")
  1572.  
  1573.     ; Change Warthog1 Gunner head to wounded
  1574.     (object_set_permutation (ai_get_object hsquad_warthog1/gunner) "head" "wounded")
  1575.  
  1576.     ; These helmets don't come cheap
  1577.     (set g_randomh1 (random_range 0 6))
  1578.         (if (= g_randomh1 0) (object_set_permutation (ai_get_object odst_chunky/odst_chunky) "head" "odst"))
  1579.         (if (= g_randomh1 1) (object_set_permutation (ai_get_object odst_griefer/odst_griefer) "head" "odst"))
  1580.         (if (= g_randomh1 2) (object_set_permutation (ai_get_object odst_holiday/odst_holiday) "head" "odst"))
  1581.         (if (= g_randomh1 3) (object_set_permutation (ai_get_object odst_roach/odst_roach) "head" "odst"))
  1582.         (if (= g_randomh1 4) (object_set_permutation (ai_get_object odst_frank/odst_frank) "head" "odst"))
  1583.         (if (= g_randomh1 5) (object_set_permutation (ai_get_object odst_slayer/odst_slayer) "head" "odst"))
  1584.         (if (= g_randomh1 6) (object_set_permutation (ai_get_object odst_trigger/odst_trigger) "head" "odst"))
  1585.  
  1586.     ; Lock the Scorpion so the other AI cannot take a seat
  1587.     (ai_vehicle_reserve (ai_vehicle_get hsquad_scorpion0/driver) true)
  1588.  
  1589. ;   (ai_vehicle_reserve (ai_vehicle_get hsquad_warthog0/warthog0) true)
  1590.  
  1591.         (ai_vehicle_reserve_seat g_gausshog "warthog_d" true)
  1592.         (ai_vehicle_reserve_seat g_gausshog "warthog_p" true)
  1593.  
  1594.         ; Remove Tartarus invinciblity
  1595.         (object_set_function_variable (ai_get_object csquad_drop_tartarus0) "invincibility" 0 0.1)
  1596.  
  1597.     ; WHAT IS YOUR MAJOR MALFUNCTION, NUMBNUTS?
  1598.  
  1599.     ; Gravity Lift visibility
  1600.     (object_set_function_variable carrier "grav_lift_control" 1 0)
  1601. ;   (object_set_function_variable carrier "grav_lift_control" 0 75)
  1602. ;   (print "grav-lift deactivate")
  1603.  
  1604.     ; Enable Elite Ranger Jetpack
  1605. ;   (print "jetpack on")
  1606. ;   (object_set_function_variable elite_ranger_agro "vertical_thrust" 1 0)
  1607. ;   (object_set_function_variable elite_ranger_agro "vertical_thrust" 0 0)
  1608.  
  1609.     ; Enable Hunter Light
  1610. ;   (object_set_function_variable hunter_agro "weapon_illumination" 1 0)
  1611.  
  1612.     ; Enable Brute Shield
  1613. ;   (object_set_function_variable brute_agro "shield" 1 0)
  1614.  
  1615.     ; Enable Plasma Turret Barrel Spin
  1616. ;   (object_set_function_variable plasma_turret "barrel_spin" 1 0)
  1617. ;   (object_set_function_variable plasma_turret "power" 1 0)
  1618.  
  1619.  
  1620.     ; Enable kill volumes
  1621.     (kill_volume_enable kill_bldg4)
  1622.     (kill_volume_enable kill_shark)
  1623.  
  1624.     (print "End of mission_start")
  1625. )
  1626.  
  1627. (script static void start
  1628.     (wake mission_start)
  1629. )
  1630.  
  1631. (script startup mission_main
  1632.  
  1633.     ; Necessary startup stuff
  1634.     (ai_allegiance player human)
  1635.     (ai_allegiance covenant prophet)
  1636.  
  1637.     ; Clear objectives
  1638. ;   (objectives_clear)
  1639. ;   (objectives_show_up_to 1)
  1640.  
  1641.     ; Protect players
  1642.     (object_cannot_take_damage (players))
  1643.     (object_hide (player0) true)
  1644.     (object_hide (player1) true)
  1645.  
  1646. ;   (profile_reset)
  1647. ;   (game_is_cooperative)
  1648. ;   (game_coop_players 4)
  1649.  
  1650.     (texture_cache_flush)
  1651.     (geometry_cache_flush)
  1652.     (rasterizer_bloom_override false)
  1653.     (game_can_use_flashlights false)
  1654.  
  1655.     (camera_control false)
  1656. ;   (camera_control on)
  1657.  
  1658. ;   (switch_bsp 0)
  1659.  
  1660.     (fade_in 1 1 1 0)
  1661.     (render_lights 1)
  1662.  
  1663.     ; Begin the mission
  1664.     ; Comment this out when you're testing individual encounters
  1665. ;   (if (> (player_count) 0) (start))
  1666.     (start)
  1667.     (print "Begin the mission.")
  1668.         (version)
  1669. )
  1670.  
  1671. (script continuous jet_pack_scenery
  1672. ;       (sleep_until (= g_jetpack_enabled 1) 1)
  1673.  
  1674.         ; Attach Jetpack scenery to Player 1
  1675.         (object_create jetpack)
  1676.         (objects_attach (unit (player0)) "jet_pack" jetpack "")
  1677. )
  1678.  
  1679. (script continuous jet_pack_boost
  1680. ;       (sleep_until (= g_jetpack_enabled 1) 1)
  1681. ;       (sleep_until (and (player_action_test_jump) (player_action_test_look_relative_up)) 15) ; player_action_test_move_relative_all_directions
  1682.  
  1683. ;       (sleep_until (and (>= g_jetfuel 20) (player_action_test_jump) 1))
  1684.         (sleep_until (>= g_jetfuel 20) 1)
  1685.             (player_action_test_reset)
  1686.         (sleep_until (player_action_test_jump) 1) ;1 ; 7 ; 15
  1687.             (object_set_velocity (player0) 1.5 0 4.5) ; move 1.5 forward and 4.5 upward
  1688.             (effect_new_on_object_marker "effects\objects\weapons\support_high\rocket_launcher\rocket_fire1" jetpack "fx_jets_human")
  1689.             (set g_jetfuel (- g_jetfuel 20))
  1690.                 (sleep 15) ; 10
  1691.             (player_action_test_reset)
  1692. ;               (set g_jetpack_enabled 1)
  1693. ;           (effect_new_on_object_marker "effects\objects\characters\sentinel\small_explosion_sparks" jetpack "body") ; used up and burned out
  1694. ;           (effect_new_on_object_marker "effects\objects\characters\sentinel_constructor\destroyed" jetpack "body") ; not bad looking boost, remove garbage
  1695. ;           (effect_new_on_object_marker "effects\objects\characters\sentinel_enforcer\perm_destroyed_spark" jetpack "body") ; electric shorting out
  1696. ;           (effect_new_on_object_marker "effects\scenery\fires\fire_jet_stream1" jetpack "body")
  1697.  
  1698. ;           (objects_attach (unit (player0)) "" jetstream "uplift")
  1699. ;           (objects_attach (unit (player0)) "contrail" jetstream "")
  1700.  
  1701. ;(sleep_until (> (player_action_test_jump)) 1)
  1702.  
  1703. ;   (if (player_action_test_jump)
  1704. ;           (begin
  1705.  
  1706. ;               (effect_new_on_object_marker "effects\objects\characters\sentinel\small_explosion_sparks" jetpack "body")
  1707. ;               (objects_attach (unit (player0)) "" jetstream "uplift")
  1708. ;           )
  1709. ;   )
  1710.  
  1711. ;           (effect_new_on_object_marker "effects\objects\characters\masterchief\spartan_ranger" (jetpack) "contrail")
  1712. ;           (effect_new_on_object_marker "effects\scenery\sparks\spark_ember_medium" (player0) "body")
  1713.  
  1714. ;               (sleep 2)
  1715. ;           (sound_impulse_stop "sound\vehicles\jet_pack\jet_pack\loop")
  1716. ;           (sound_looping_start "sound\vehicles\jet_pack\jet_pack" jetpack 3)
  1717. ;               (sleep 2)
  1718. ;           (sound_looping_stop "sound\vehicles\jet_pack\jet_pack") ; sound_looping_stop_immediately
  1719. ;           (sound_impulse_start "sound\vehicles\jet_pack\jet_pack\loop" jetpack 1.0) ; in ; out
  1720. ;           (sleep (sound_impulse_language_time "sound\vehicles\jet_pack\jet_pack\loop"))
  1721. )
  1722.  
  1723.  
  1724. (script continuous jet_pack_refuel ; jet_pack_audio
  1725.         (sleep_until (<= g_jetfuel 0) 1)
  1726.             (sound_impulse_start "sound\vehicles\jet_pack\jet_pack\out" jetpack 0.65)      
  1727.                 (sleep 100)
  1728. ;           (set g_jetfuel (+ g_jetfuel 100))
  1729.             (set g_jetfuel 100)
  1730.             (print "Jet Pack is ready")
  1731.             (sound_impulse_start "sound\ui\active_cammo_ready" jetpack 0.75)
  1732. )
  1733.  
  1734.  
  1735. ;*
  1736. (script continuous is_jet_pack_on
  1737.         (sleep_until (player_flashlight_on) 1) ; 2 ; 15
  1738.             (player_action_test_reset)
  1739. ;       (sleep_until (or (player_flashlight_on) (player_active_camouflage_on)) 15)
  1740. ;       (if (<= (ai_living_count csquad_sniper0) 0)
  1741.         (begin
  1742.             (if (= g_jetpack_enabled 0)
  1743.                     (set g_jetpack_enabled 1)
  1744.             )
  1745.         (sleep_until (player_flashlight_on) 1) ; 2 ; 15
  1746.             (player_action_test_reset)
  1747. ;           (if (= g_jetpack_enabled 1)
  1748.                     (set g_jetpack_enabled 0)
  1749.  
  1750.         ; Remove Jetpack scenery from Player 1
  1751.         (objects_detach (unit (player0)) jetpack)
  1752.         (object_destroy jetpack)           
  1753.         )
  1754. )
  1755. *;
  1756.  
  1757. ;= RECYCLE ==============================================================================
  1758.  
  1759. (script continuous waste_management
  1760.             (sleep 115)
  1761.         (garbage_collect_now)
  1762.  
  1763.         ; Insert player(s) into ai_player squad
  1764. ;       (ai_attach (unit (list_get (players) 0)) ai_player)
  1765.  
  1766. ;       (player_enable_input 0)
  1767.  
  1768.         ; Activate with the flashlight?
  1769. ;       (ai_force_active_by_unit (unit (list_get (players) 0)) 1)
  1770.  
  1771.         ; Keep the squad active
  1772. ;       (ai_force_active "ai_player" true)
  1773.  
  1774.         ; Test if the player(s) are part of ai_player squad
  1775. ;       (ai_living_count ai_player)
  1776.  
  1777. ;       (cs_run_command_script ai_player cs_ai_player_style) ; /1
  1778.  
  1779.         (ai_force_active "csquad" true)
  1780.         (ai_force_active "hsquad_outside" true)
  1781.         (ai_force_active "odst" true)
  1782.         (ai_force_active "spartan" true)
  1783.  
  1784.         ; Disregard the Pelican
  1785. ;       (ai_disregard g_pelican true)
  1786.         (ai_disregard (ai_vehicle_get hsquad_pelican0/pilot) true)
  1787. ;       (ai_disregard (ai_actors hsquad_pelican0) true)
  1788.  
  1789.         ; Disregard the Phantom
  1790. ;       (ai_disregard g_phantom true)
  1791.         (ai_disregard (ai_vehicle_get csquad_phantom0/pilot) true)
  1792. ;       (ai_disregard (ai_actors csquad_phantom0) true)
  1793.  
  1794.         ; Disregard the ODST Griefer (lower tower sniper)
  1795.         (ai_disregard (ai_actors odst_griefer) true)
  1796.  
  1797. ;       (camera_set_first_person (unit (list_get (ai_actors hsquad_outside))))
  1798.  
  1799. ;       (unit_add_equipment (unit (player0)) wimpy true false)
  1800. ;       (unit_add_equipment (unit (list_get (ai_actors hsquad_outside/1) 0)) battle_rifle true false)
  1801. ;       (unit_add_equipment (unit (list_get (ai_actors csquad_drop_brutes0/4) 0)) rocket_launcher_brute true false)
  1802.  
  1803.         ; SKULL CHEATS
  1804. ;       (ice_cream_flavor_stock 0)   ;  Envy - The MC now has an Active Camouflage device
  1805. ;       (ice_cream_flavor_stock 1)   ;  Grunt Birthday Party
  1806. ;       (ice_cream_flavor_stock 2)   ;  Assassins
  1807. ;       (ice_cream_flavor_stock 3)   ;  Thunderstorm
  1808. ;       (ice_cream_flavor_stock 4)   ;  Famine
  1809. ;       (ice_cream_flavor_stock 5)   ;  Daddy!
  1810. ;       (ice_cream_flavor_stock 6)   ;  Blind
  1811. ;       (ice_cream_flavor_stock 7)   ;  Ghost - AI characters will not flinch from attacks
  1812. ;       (ice_cream_flavor_stock 8)   ;  Black eye - Your shield does not charge normally
  1813. ;       (ice_cream_flavor_stock 9)   ;  Catch - A.I. will throw more grenades
  1814. ;       (ice_cream_flavor_stock 10)  ;  Sputnik
  1815. ;       (ice_cream_flavor_stock 11)  ;  Iron
  1816. ;       (ice_cream_flavor_stock 12)  ;  Mythic - Enemies & allies have double the health & shielding they have on legendary
  1817. ;       (ice_cream_flavor_stock 13)  ;  Angry - Enemies fire weapons faster & more frequently
  1818. ;       (ice_cream_flavor_stock 14)  ;  ???
  1819.  
  1820.         ; Enable Camo Cheat
  1821. ;       (cheat_active_camouflage_by_player 0 true)
  1822.  
  1823. ;       (cheats_load)
  1824. ;           (cheat_bump_possession 1)
  1825. ;            (cheat_jetpack 1)
  1826. ;             (cheat_valhalla 1)
  1827. ;              (cheat_all_powerups 1)
  1828. ;               (cheat_all_vehicles 1)
  1829. ;                (cheat_all_weapons 1)
  1830.  
  1831.         ; Attach Jetpack scenery to Player 1
  1832. ;       (objects_attach (unit (player0)) "body" jetpack "")
  1833.  
  1834.         ; Attach Jetpack to Spartan AI
  1835. ;       (objects_attach (unit (list_get (ai_actors spartan) 0)) "jetpack" jetpack "")
  1836.        
  1837.         (ai_vehicle_reserve_seat g_gausshog "warthog_d" true)
  1838.         (ai_vehicle_reserve_seat g_gausshog "warthog_p" true)
  1839. ;       (ai_vehicle_reserve g_gausshog true)
  1840. ;       (ai_vehicle_reserve (ai_vehicle_get hsquad_warthog0/warthog0) true)
  1841.  
  1842.         ; Orders Human Gunner to get back on that Hog (which she will usually do)
  1843.         (ai_vehicle_enter hsquad_gunner g_gausshog "warthog_g")
  1844.  
  1845.         ; Orders Covenant Gunner to get back on that Guntower
  1846.         (ai_vehicle_enter csquad_gunner g_guntower "guntower_d")
  1847.         (ai_magically_see ai_current_squad hsquad_scorpion0)
  1848.  
  1849.         ; Orders Hsquad Outside Marine 4 to get on that Turret
  1850.         (ai_vehicle_enter hsquad_outside/4 human_turret)
  1851. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement