Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 147.53 KB | None | 0 0
  1. (script stub scenery AR0 none)
  2. (script stub scenery AR1 none)
  3. (script stub scenery AR2 none)
  4.  
  5. (script stub scenery GR0 none)
  6. (script stub scenery GR1 none)
  7. (script stub scenery GR2 none)
  8.  
  9.  
  10. (global object_definition ar_obj "cmt\weapons\spv3\human\assault_rifle\assault_rifle")
  11. (global object_definition br_obj "cmt\weapons\spv3\human\battle_rifle\battle_rifle")
  12. (global object_definition dr_obj "cmt\weapons\spv3\human\dmr\dmr")
  13. (global object_definition sg_obj "cmt\weapons\spv3\human\shotgun\shotgun")
  14. (global object_definition smg_obj "cmt\weapons\spv3\human\smg\smg")
  15. (global object_definition sr_obj "cmt\weapons\spv3\human\sniper_rifle\sniper_rifle")
  16. (global object_definition ps_obj "cmt\weapons\spv3\human\pistol\pistol")
  17.  
  18.  
  19.  
  20.  
  21.  
  22. (global short grencount1 0)
  23. (global short grencount2 0)
  24.  
  25. (global short grenlock 0)
  26.  
  27.  
  28. (global short GX0 0)
  29. (global short GX1 0)
  30. (global short GX2 0)
  31. (global short GX3 0)
  32.  
  33. (global short spawning 0)
  34. (global short softlock 0)
  35.  
  36. (global short start 0)
  37.  
  38. (global short ai_debug 0)
  39. (global short ally_debug 0)
  40. (global short seed 0)
  41. (global short tempint 0)
  42. (global short tempint2 0)
  43. (global short temp_shipcount 0)
  44. (global short temp_ghostcount 0)
  45. (global short temp_wraithcount 0)
  46. (global short temp_bspindex 0)
  47.  
  48. (global unit dropship none)
  49. (global unit grav none)
  50. (global unit WRAITH none)
  51. (global unit GHOST none)
  52.  
  53.  
  54. (global short spawn_mode 0)
  55. (global short vehicle_id 0)
  56. (global short shipcount 0)
  57. (global short wraithcount 0)
  58. (global short ghostcount 0)
  59.  
  60. (global unit p1 none)
  61.  
  62.  
  63.  
  64.  
  65. ;; Fuck me fuck me fuck me. Holy shit are there a lot of really convulted things going on in this map.
  66. ;; I forced this game to do a lot of stuff it's simply not designed to do. These scripts are documented best I could.
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. ;;The grenade setups below are to allow for recursive functions to be done, which I was able to avoid just about everywhere else.
  77. ;; Recursive functions are loops that repeat until a condition is met. They don't exist in blamscript, so we recreate them using
  78. ;; continuous scripts that start with the qualifying If statement at the end of each pass. When we meet the criteria, a (sleep -1) pauses
  79. ;; the script until it can be setup again and woken, ready to start from the top. We must be sure to reset the variables it uses before waking it,
  80. ;; so that when it restarts it's in the right setup. In the case of the grenades below, the variables are the 4 grenade counts GX0 GX1 GX2 GX3
  81. ;;There's no function that details how many of a specific grenade the player has. So we did some workaround. There are 4 starting
  82. ;; profiles in the scenario that each give a grenade. We use the (player_add_equipment) function with the boolean set false, and check
  83. ;; if the total grenade count has changed. if so we add 1 to the grenade count. If not, we move on to the next grenade type.
  84. ;; This is used to reallocate the grenades that get taken away by the weapon chest scripts later on. We add up the grenades,
  85. ;; swap weapons (which deletes grenades) then add the grenades back afterwards. Yikes! Let's get to it then...
  86.  
  87.  
  88. (script continuous GRENADE_WIZARD_0
  89.    
  90.     (if (= 0 start)
  91.         (sleep -1)
  92.     )
  93.    
  94.     (set grencount1 (unit_get_total_grenade_count p1))
  95.    
  96.    
  97.     (objects_attach p1 "" 0_grenade "")
  98.     (objects_detach p1 0_grenade)
  99.     (sleep 1)
  100.     (object_create_anew 0_grenade)
  101.  
  102.    
  103.     (set grencount2 (unit_get_total_grenade_count p1))
  104.    
  105.     (if (!= grencount1 grencount2)
  106.         (set GX0 (- GX0 1))
  107.     )
  108.    
  109.     (if (= grencount1 grencount2)
  110.         (begin
  111.             (set grenlock 1)
  112.             (sleep -1)
  113.         )
  114.     )
  115.    
  116. )
  117.  
  118.  
  119. (script continuous GRENADE_WIZARD_0A
  120.  
  121.     (if (= 0 start)
  122.         (sleep -1)
  123.     )
  124.  
  125.     (if (< 0 GX0)
  126.         (begin
  127.             (player_add_equipment p1 0_grenade false)
  128.             (set GX0 (- GX0 1))
  129.         )
  130.         (begin
  131.             (set grenlock 3)
  132.             (sleep -1)
  133.            
  134.         )
  135.     )
  136.    
  137. )
  138.  
  139.  
  140. (script continuous GRENADE_WIZARD_1
  141.  
  142.     (if (= 0 start)
  143.         (sleep -1)
  144.     )
  145.    
  146.     (set grencount1 (unit_get_total_grenade_count p1))
  147.    
  148.    
  149.     (objects_attach p1 "" 1_grenade "")
  150.     (objects_detach p1 1_grenade)
  151.     (sleep 1)
  152.     (object_create_anew 1_grenade)
  153.  
  154.    
  155.     (set grencount2 (unit_get_total_grenade_count p1))
  156.    
  157.     (if (!= grencount1 grencount2)
  158.         (set GX1 (- GX1 1))
  159.     )
  160.    
  161.     (if (= grencount1 grencount2)
  162.         (begin
  163.             (set grenlock 1)
  164.             (sleep -1)
  165.         )
  166.     )
  167.    
  168. )
  169.  
  170.  
  171. (script continuous GRENADE_WIZARD_1A
  172.  
  173.     (if (= 0 start)
  174.         (sleep -1)
  175.     )
  176.  
  177.     (if (< 0 GX1)
  178.         (begin
  179.             (player_add_equipment p1 1_grenade false)
  180.             (set GX1 (- GX1 1))
  181.         )
  182.         (begin
  183.             (set grenlock 3)
  184.             (sleep -1)
  185.            
  186.         )
  187.     )
  188.    
  189. )
  190.  
  191.  
  192. (script continuous GRENADE_WIZARD_2
  193.  
  194.     (if (= 0 start)
  195.         (sleep -1)
  196.     )
  197.    
  198.     (set grencount1 (unit_get_total_grenade_count p1))
  199.    
  200.    
  201.     (objects_attach p1 "" 2_grenade "")
  202.     (objects_detach p1 2_grenade)
  203.     (sleep 1)
  204.     (object_create_anew 2_grenade)
  205.  
  206.    
  207.     (set grencount2 (unit_get_total_grenade_count p1))
  208.    
  209.     (if (!= grencount1 grencount2)
  210.         (set GX2 (- GX2 1))
  211.     )
  212.    
  213.     (if (= grencount1 grencount2)
  214.         (begin
  215.             (set grenlock 1)
  216.             (sleep -1)
  217.         )
  218.     )
  219.    
  220. )
  221.  
  222.  
  223. (script continuous GRENADE_WIZARD_2A
  224.  
  225.     (if (= 0 start)
  226.         (sleep -1)
  227.     )
  228.  
  229.     (if (< 0 GX2)
  230.         (begin
  231.             (player_add_equipment p1 2_grenade false)
  232.             (set GX2 (- GX2 1))
  233.         )
  234.         (begin
  235.             (set grenlock 3)
  236.             (sleep -1)
  237.         )
  238.     )
  239.    
  240. )
  241.  
  242. (script continuous GRENADE_WIZARD_3
  243.  
  244.     (if (= 0 start)
  245.         (sleep -1)
  246.     )
  247.    
  248.     (set grencount1 (unit_get_total_grenade_count p1))
  249.    
  250.    
  251.     (objects_attach p1 "" 3_grenade "")
  252.     (objects_detach p1 3_grenade)
  253.     (sleep 1)
  254.     (object_create_anew 3_grenade)
  255.  
  256.    
  257.     (set grencount2 (unit_get_total_grenade_count p1))
  258.    
  259.     (if (!= grencount1 grencount2)
  260.         (set GX3 (- GX3 1))
  261.     )
  262.    
  263.     (if (= grencount1 grencount2)
  264.         (begin
  265.             (set grenlock 1)
  266.             (sleep -1)
  267.         )
  268.     )
  269.    
  270. )
  271.  
  272.  
  273. (script continuous GRENADE_WIZARD_3A
  274.  
  275.     (if (= 0 start)
  276.         (sleep -1)
  277.     )
  278.  
  279.     (if (< 0 GX3)
  280.         (begin
  281.             (player_add_equipment p1 3_grenade false)
  282.             (set GX3 (- GX3 1))
  283.         )
  284.         (begin
  285.             (set grenlock 3)
  286.             (sleep -1)
  287.         )
  288.     )
  289.    
  290. )
  291.  
  292. (script continuous GRENADE_WIZARD
  293.  
  294.     (sleep_until (= 1 grenlock) 5)
  295.  
  296.  
  297. (set GX0 4)
  298. (set GX1 4)
  299. (set GX2 4)
  300. (set GX3 4)
  301.  
  302.  
  303.  
  304. (set grencount1 0)
  305. (set grencount2 0)
  306. (set grenlock 9)
  307. (wake GRENADE_WIZARD_0)
  308. (sleep_until (= 1 grenlock) 2)
  309. (set grenlock 9)
  310. (wake GRENADE_WIZARD_1)
  311. (sleep_until (= 1 grenlock) 2)
  312. (set grenlock 9)
  313. (wake GRENADE_WIZARD_2)
  314. (sleep_until (= 1 grenlock) 2)
  315. (set grenlock 9)
  316. (wake GRENADE_WIZARD_3)
  317. (sleep_until (= 1 grenlock) 2)
  318.  
  319.  
  320. (set grenlock 2)
  321.  
  322. (sleep_until (= 3 grenlock) 2)
  323. (set grenlock 9)
  324. (wake GRENADE_WIZARD_0A)
  325. (sleep_until (= 3 grenlock) 2)
  326. (set grenlock 9)
  327. (wake GRENADE_WIZARD_1A)
  328. (sleep_until (= 3 grenlock) 2)
  329. (set grenlock 9)
  330. (wake GRENADE_WIZARD_2A)
  331. (sleep_until (= 3 grenlock) 2)
  332. (set grenlock 9)
  333. (wake GRENADE_WIZARD_3A)
  334. (sleep_until (= 3 grenlock) 2)
  335.  
  336.  
  337. (set grenlock 0)
  338.  
  339. )
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349. ;;;;The following script sleeps until one of our ammo device_controls are activated.
  350. ;; this script will teleport ammo boxes of UNSC weapons to the player so that it appears they refilled
  351. ;; their ammo from the container. The controls are attached to ammo chest scenery items in the mr_resetti script.
  352. ;; this is because device_controls use special collision rules which only affect items like projectiles (maybe particles?),
  353. ;; but the collision does not apply to the players themselves, so they can walk right through it
  354.  
  355.  
  356. (script continuous AMMO_WIZARD
  357.  
  358.  
  359.  
  360.  
  361.  
  362.     (if (or
  363.             (= 1 (device_get_position ac1))
  364.             (= 1 (device_get_position ac2))
  365.             (= 1 (device_get_position ac3))
  366.        
  367.         )
  368.         (begin
  369.            
  370.             (objects_attach p1 "" a1 "")
  371.             (objects_attach p1 "" a2 "")
  372.             (objects_attach p1 "" a3 "")
  373.             (objects_attach p1 "" a4 "")
  374.             (objects_attach p1 "" a5 "")
  375.             (objects_attach p1 "" a6 "")
  376.             (objects_attach p1 "" a7 "")
  377.             (objects_attach p1 "" a8 "")
  378.             (objects_attach p1 "" a9 "")
  379.             (objects_attach p1 "" a0 "")
  380.            
  381.             (objects_detach p1 a1)
  382.             (objects_detach p1 a2)
  383.             (objects_detach p1 a3)
  384.             (objects_detach p1 a4)
  385.             (objects_detach p1 a5)
  386.             (objects_detach p1 a6)
  387.             (objects_detach p1 a7)
  388.             (objects_detach p1 a8)
  389.             (objects_detach p1 a9)
  390.             (objects_detach p1 a0)
  391.            
  392.             (sleep 1)
  393.            
  394.             (object_create_anew a0)
  395.             (object_create_anew a1)
  396.             (object_create_anew a2)
  397.             (object_create_anew a3)
  398.             (object_create_anew a4)
  399.             (object_create_anew a5)
  400.             (object_create_anew a6)
  401.             (object_create_anew a7)
  402.             (object_create_anew a8)
  403.             (object_create_anew a9)
  404.            
  405.             (device_set_position ac1 0)
  406.             (device_set_position ac2 0)
  407.             (device_set_position ac3 0)
  408.            
  409.         )
  410.        
  411.     )
  412.  
  413.  
  414. )
  415.  
  416. (script continuous GUN_WIZARD
  417.  
  418.    
  419.  
  420.    
  421.  
  422.     (if (or
  423.             (= 1 (device_get_position gc1))
  424.             (= 1 (device_get_position gc2))
  425.             (= 1 (device_get_position gc3))
  426.         )
  427.         (begin
  428.             (display_scripted_ui_widget "weaponmenu")
  429.             (show_hud 0)
  430.             (device_set_power gc1 0)
  431.             (device_set_power gc2 0)
  432.             (device_set_power gc3 0)
  433.            
  434.             (device_set_position gc1 0)
  435.             (device_set_position gc2 0)
  436.             (device_set_position gc3 0)
  437.            
  438.  
  439.         )
  440.     )
  441.  
  442. )
  443.  
  444. (script continuous SAVE_WIZARD
  445.     (sleep (* 30 (* 60 3)))
  446.     (sleep_until (game_safe_to_save) 5)
  447.     (game_save_totally_unsafe)
  448. )
  449.  
  450. (script continuous mr_resetti
  451.  
  452.     (if (!= (structure_bsp_index) temp_bspindex)
  453.         (begin
  454.             (set spawning 0)
  455.             (set vehicle_id 0)
  456.             (set spawn_mode 0)
  457.            
  458.                 (if (= 0 (structure_bsp_index))
  459.                     (begin
  460.                     (objects_detach (AR1) ac1)
  461.                     (objects_detach (AR2) ac1)
  462.                     (objects_attach (AR0) "" ac1 "")
  463.                     (objects_detach (AR0) ac1)
  464.                     )
  465.                 )
  466.                 (if (= 1 (structure_bsp_index))
  467.                     (begin
  468.                     (objects_detach (AR0) ac1)
  469.                     (objects_detach (AR2) ac1)
  470.                     (objects_attach (AR1) "" ac1 "")
  471.                     (objects_detach (AR1) ac1)
  472.                     )
  473.                 )
  474.                 (if (= 2 (structure_bsp_index))
  475.                     (begin
  476.                     (objects_detach (AR0) ac1)
  477.                     (objects_detach (AR1) ac1)
  478.                     (objects_attach (AR2) "" ac1 "")
  479.                     (objects_detach (AR2) ac1)
  480.                     )
  481.                 )
  482.                
  483.                 (if (= 0 (structure_bsp_index))
  484.                     (begin
  485.                     (objects_detach (GR1) gc1)
  486.                     (objects_detach (GR2) gc1)
  487.                     (objects_attach (GR0) "" gc1 "")
  488.                     (objects_detach (GR0) gc1)
  489.                     )
  490.                 )
  491.                 (if (= 1 (structure_bsp_index))
  492.                     (begin
  493.                     (objects_detach (GR0) gc1)
  494.                     (objects_detach (GR2) gc1)
  495.                     (objects_attach (GR1) "" gc1 "")
  496.                     (objects_detach (GR1) gc1)
  497.                     )
  498.                 )
  499.                 (if (= 2 (structure_bsp_index))
  500.                     (begin
  501.                     (objects_detach (GR0) gc1)
  502.                     (objects_detach (GR1) gc1)
  503.                     (objects_attach (GR2) "" gc1 "")
  504.                     (objects_detach (GR2) gc1)
  505.                     )
  506.                 )
  507.  
  508.        
  509.         )
  510.     )
  511.    
  512.     (if (= 1 spawning)
  513.         (begin
  514.             (sleep 30)
  515.             (if (and (= 1 spawning ) (= 0 shipcount) )
  516.                 (begin
  517.                     (sleep 60)
  518.                     (if (and (= 1 spawning) (= 0 shipcount))
  519.                         (set spawning 0)
  520.                     )
  521.                 )
  522.             )
  523.         )
  524.     )
  525.  
  526.     (set temp_bspindex (structure_bsp_index))
  527.     (sleep 30)
  528. )
  529.  
  530.  
  531.  
  532.  
  533. (script continuous shipcounter
  534.     (set temp_shipcount 0)
  535.     (sleep 1)
  536.     (if (= 0 (unit_get_health xship))
  537.         (set temp_shipcount (+ temp_shipcount 1))
  538.     )
  539.     (sleep 1)
  540.     (if (= 0  (unit_get_health yship))
  541.         (set temp_shipcount (+ temp_shipcount 1))
  542.     )
  543.     (sleep 1)
  544.     (if (= 0  (unit_get_health zship))
  545.         (set temp_shipcount (+ temp_shipcount 1))
  546.     )
  547.     (sleep 1)
  548.     (if (= 0  (unit_get_health uship))
  549.         (set temp_shipcount (+ temp_shipcount 1))
  550.     )
  551.     (sleep 1)
  552.     (if (= 0  (unit_get_health vship))
  553.         (set temp_shipcount (+ temp_shipcount 1))
  554.     )
  555.     (sleep 1)
  556.     (if (= 0  (unit_get_health wship))
  557.         (set temp_shipcount (+ temp_shipcount 1))
  558.     )
  559.     (sleep 1)
  560.     (set shipcount temp_shipcount)
  561.    
  562. )
  563.  
  564. (script continuous temp_ghostcounter
  565.  
  566. (set temp_ghostcount 0)
  567. (if (< -1 (unit_get_health ghosta))
  568.     (set temp_ghostcount (+ 1 temp_ghostcount))
  569. )
  570. (if (< -1 (unit_get_health ghostb))
  571.     (set temp_ghostcount (+ 1 temp_ghostcount))
  572. )
  573. (if (< -1 (unit_get_health ghostc))
  574.     (set temp_ghostcount (+ 1 temp_ghostcount))
  575. )
  576. (if (< -1 (unit_get_health ghostd))
  577.     (set temp_ghostcount (+ 1 temp_ghostcount))
  578. )
  579. (set ghostcount temp_ghostcount)
  580.  
  581. )
  582.  
  583. (script continuous temp_wraithcounter
  584.  
  585. (set temp_wraithcount 0)
  586. (if (< -1 (unit_get_health wraitha))
  587.     (set temp_wraithcount (+ 1 temp_wraithcount))
  588. )
  589. (if (< -1 (unit_get_health wraithb))
  590.     (set temp_wraithcount (+ 1 temp_wraithcount))
  591. )
  592. (set wraithcount temp_wraithcount)
  593.  
  594. )
  595.  
  596.  
  597. (script continuous random_seed_obfuscator
  598.  
  599.     (player_action_test_reset)
  600.        
  601.     (sleep 5)
  602.  
  603.     (cond
  604.         ((player_action_test_look_relative_left)
  605.             (begin
  606.                 (set seed (random_range 1 100))
  607.                 (set seed (random_range 1 1000))
  608.                 (set seed (random_range 1 172))
  609.             )
  610.         )
  611.        
  612.         ((player_action_test_look_relative_up)
  613.             (begin
  614.                 (set seed (random_range 1 45))
  615.                 (set seed (random_range 1 487))
  616.             )
  617.         )
  618.        
  619.         ((player_action_test_look_relative_down)
  620.             (begin
  621.                 (set seed (random_range 1 50))
  622.                 (set seed (random_range 1 500))
  623.                 (set seed (random_range 1 5000))
  624.                 (set seed (random_range 1 5))
  625.             )
  626.         )
  627.        
  628.         ((player_action_test_look_relative_right)
  629.             (begin
  630.                 (set seed (random_range 1 25))
  631.                 (set seed (random_range 1 250))
  632.                 (set seed (random_range 1 2500))
  633.                 (set seed (random_range 1 9001))
  634.                 (set seed (random_range 1 1337))
  635.             )
  636.         )
  637.    
  638.    
  639.    
  640.     )
  641.  
  642.  
  643.  
  644.  
  645. )
  646.  
  647.  
  648.  
  649. (script continuous debug
  650.     (set ai_debug (+ (ai_living_count 1_headlong) (ai_living_count 1_terminal) (ai_living_count 1_ivory) (ai_living_count 1_parking) (ai_living_count 1_interior)))
  651.     (set ally_debug (+ (ai_living_count 0_cybase) (ai_living_count 0_underpass) (ai_living_count 0_oldtown)))
  652. )
  653.  
  654.  
  655.  
  656.  
  657.  
  658. (script static void spawn_dropship
  659.    
  660.     (cond
  661.         ((not (= 0 (unit_get_health uship)))
  662.             (begin
  663.                 (object_destroy UCR)
  664.                 (object_destroy UCL)
  665.                 (object_destroy uship)
  666.                
  667.                 (object_create uship)
  668.                 (object_create ucr)
  669.                 (object_create ucl)
  670.                 (object_create utr)
  671.                 (object_create utl)
  672.                 (object_create ug)
  673.                 (unit_close utr)
  674.                 (unit_close utl)
  675.                 (unit_close ug)
  676.                
  677.                 (objects_attach uship "gravlift" ug "")
  678.                 (objects_attach uship "troop_door_right" utr "")
  679.                 (objects_attach uship "troop_door_left" utl "")
  680.                 (objects_attach uship "turret_door_left" ucr "")
  681.                 (objects_attach uship "turret_door_right" ucl "")
  682.                
  683.                 (set dropship uship)
  684.                 (set grav ug)
  685.             )
  686.         )
  687.    
  688.  
  689.  
  690.         ((not (= 0 (unit_get_health vship)))
  691.             (begin
  692.                 (object_destroy vCR)
  693.                 (object_destroy vCL)
  694.                 (object_destroy vship)
  695.                
  696.                 (object_create vship)
  697.                 (object_create vcr)
  698.                 (object_create vcl)
  699.                 (object_create vtr)
  700.                 (object_create vtl)
  701.                 (object_create vg)
  702.                 (unit_close vtr)
  703.                 (unit_close vtl)
  704.                 (unit_close vg)
  705.                
  706.                 (objects_attach vship "gravlift" vg "")
  707.                 (objects_attach vship "troop_door_right" vtr "")
  708.                 (objects_attach vship "troop_door_left" vtl "")
  709.                 (objects_attach vship "turret_door_left" vcr "")
  710.                 (objects_attach vship "turret_door_right" vcl "")
  711.                
  712.                 (set dropship vship)
  713.                 (set grav vg)
  714.             )
  715.         )
  716.    
  717.  
  718.         ((not (= 0 (unit_get_health wship)))
  719.             (begin
  720.                 (object_destroy wCR)
  721.                 (object_destroy wCL)
  722.                 (object_destroy wship)
  723.                
  724.                 (object_create wship)
  725.                 (object_create wcr)
  726.                 (object_create wcl)
  727.                 (object_create wtr)
  728.                 (object_create wtl)
  729.                 (object_create wg)
  730.                 (unit_close wtr)
  731.                 (unit_close wtl)
  732.                 (unit_close wg)
  733.                
  734.                 (objects_attach wship "gravlift" wg "")
  735.                 (objects_attach wship "troop_door_right" wtr "")
  736.                 (objects_attach wship "troop_door_left" wtl "")
  737.                 (objects_attach wship "turret_door_left" wcr "")
  738.                 (objects_attach wship "turret_door_right" wcl "")
  739.                
  740.                 (set dropship wship)
  741.                 (set grav wg)
  742.             )
  743.         )
  744.    
  745.    
  746.    
  747.         ((not (= 0 (unit_get_health xship)))
  748.             (begin
  749.                 (object_destroy xCR)
  750.                 (object_destroy xCL)
  751.                 (object_destroy xship)
  752.                
  753.                 (object_create xship)
  754.                 (object_create xcr)
  755.                 (object_create xcl)
  756.                 (object_create xtr)
  757.                 (object_create xtl)
  758.                 (object_create xg)
  759.                 (unit_close xtr)
  760.                 (unit_close xtl)
  761.                 (unit_close xg)
  762.                
  763.                 (objects_attach xship "gravlift" xg "")
  764.                 (objects_attach xship "troop_door_right" xtr "")
  765.                 (objects_attach xship "troop_door_left" xtl "")
  766.                 (objects_attach xship "turret_door_left" xcr "")
  767.                 (objects_attach xship "turret_door_right" xcl "")
  768.                
  769.                 (set dropship xship)
  770.                 (set grav xg)
  771.             )
  772.         )
  773.    
  774.    
  775.         ((not (= 0 (unit_get_health yship)))
  776.             (begin
  777.                 (object_destroy yCR)
  778.                 (object_destroy yCL)
  779.                 (object_destroy yship)
  780.                
  781.                 (object_create yship)
  782.                 (object_create ycr)
  783.                 (object_create ycl)
  784.                 (object_create ytr)
  785.                 (object_create ytl)
  786.                 (object_create yg)
  787.                 (unit_close ytr)
  788.                 (unit_close ytl)
  789.                 (unit_close yg)
  790.                
  791.                 (objects_attach yship "gravlift" yg "")
  792.                 (objects_attach yship "troop_door_right" ytr "")
  793.                 (objects_attach yship "troop_door_left" ytl "")
  794.                 (objects_attach yship "turret_door_left" ycr "")
  795.                 (objects_attach yship "turret_door_right" ycl "")
  796.                
  797.                 (set dropship yship)
  798.                 (set grav yg)
  799.             )
  800.         )
  801.    
  802.  
  803.  
  804.         ((not (= 0 (unit_get_health zship)))
  805.             (begin
  806.                 (object_destroy zCR)
  807.                 (object_destroy zCL)
  808.                 (object_destroy zship)
  809.                
  810.                 (object_create zship)
  811.                 (object_create zcr)
  812.                 (object_create zcl)
  813.                 (object_create ztr)
  814.                 (object_create ztl)
  815.                 (object_create zg)
  816.                 (unit_close ztr)
  817.                 (unit_close ztl)
  818.                 (unit_close zg)
  819.                
  820.                 (objects_attach zship "gravlift" zg "")
  821.                 (objects_attach zship "troop_door_right" ztr "")
  822.                 (objects_attach zship "troop_door_left" ztl "")
  823.                 (objects_attach zship "turret_door_left" zcr "")
  824.                 (objects_attach zship "turret_door_right" zcl "")
  825.                
  826.                 (set dropship zship)
  827.                 (set grav zg)
  828.             )
  829.         )
  830.     )  
  831.    
  832.    
  833.     (set softlock 0)
  834.    
  835. )
  836.  
  837.  
  838.  
  839. ;;next we'll spawn one of two possible wraiths in the map. Basically a dupe of the above but FAR simplified with the lack of attachments.
  840.  
  841.  
  842. (script static void spawn_wraith
  843.  
  844.         (set WRAITH none)
  845.        
  846.        
  847.         (begin
  848.             (cond
  849.                 ((> 0 (unit_get_health wraitha))
  850.                 (begin
  851.                     (object_create wraitha)
  852.                     (ai_place driver/ghost)
  853.                     (sleep 2)
  854.                     (vehicle_load_magic wraitha "g-driver" (ai_actors driver/ghost))
  855.                     (sleep_until (vehicle_test_seat_list wraitha "g-driver" (ai_actors driver/ghost)) 5)
  856.                     (set wraithcount (+ 1 wraithcount))
  857.                     (set WRAITH wraitha)
  858.                 )
  859.                 )
  860.                 ((> 0 (unit_get_health wraithb))
  861.                 (begin
  862.                     (object_create wraithb)
  863.                     (ai_place driver/ghost)
  864.                     (sleep 2)
  865.                     (vehicle_load_magic wraithb "g-driver" (ai_actors driver/ghost))
  866.                     (sleep_until (vehicle_test_seat_list wraithb "g-driver" (ai_actors driver/ghost)) 5)
  867.                     (set wraithcount (+ 1 wraithcount))
  868.                     (set WRAITH wraithb)
  869.                 )
  870.                 )
  871.             )
  872.            
  873.         )
  874.        
  875.  
  876.     (set softlock 0)
  877. )
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885. (script static void spawn_ghost
  886.  
  887.         (set GHOST none)
  888.        
  889.        
  890.         (begin
  891.             (cond
  892.                 ((> 0 (unit_get_health ghosta))
  893.                 (begin
  894.                     (object_create ghosta)
  895.                     (ai_place driver/ghost)
  896.                     (sleep 2)
  897.                     (vehicle_load_magic ghosta "g-driver" (ai_actors driver/ghost))
  898.                     (sleep_until (vehicle_test_seat_list ghosta "g-driver" (ai_actors driver/ghost)) 5)
  899.                     (set GHOST ghosta)
  900.                 )
  901.                 )
  902.                 ((> 0 (unit_get_health ghostb))
  903.                 (begin
  904.                     (object_create ghostb)
  905.                     (ai_place driver/ghost)
  906.                     (sleep 2)
  907.                     (vehicle_load_magic ghostb "g-driver" (ai_actors driver/ghost))
  908.                     (sleep_until (vehicle_test_seat_list ghostb "g-driver" (ai_actors driver/ghost)) 5)
  909.                     (set GHOST ghostb)
  910.                 )
  911.                 )
  912.                 ((> 0 (unit_get_health ghostc))
  913.                 (begin
  914.                     (object_create ghostc)
  915.                     (ai_place driver/ghost)
  916.                     (sleep 2)
  917.                     (vehicle_load_magic ghostc "g-driver" (ai_actors driver/ghost))
  918.                     (sleep_until (vehicle_test_seat_list ghostc "g-driver" (ai_actors driver/ghost)) 5)
  919.                     (set GHOST ghostc)
  920.                 )
  921.                 )
  922.                 ((> 0 (unit_get_health ghostd))
  923.                 (begin
  924.                     (object_create ghostd)
  925.                     (ai_place driver/ghost)
  926.                     (sleep 2)
  927.                     (vehicle_load_magic ghostd "g-driver" (ai_actors driver/ghost))
  928.                     (sleep_until (vehicle_test_seat_list ghostd "g-driver" (ai_actors driver/ghost)) 5)
  929.                     (set GHOST ghostd)
  930.                 )
  931.                 )
  932.                
  933.             )
  934.            
  935.         )
  936.        
  937.  
  938.     (set softlock 0)
  939. )
  940.  
  941.  
  942. (script continuous ghost_smasher
  943.  
  944.     (sleep_until (= 0 vehicle_id) 5)   ;; if Vehicle_ID = 0, we know that we're not trying to spawn anything, and we won't delete it halfway through creating it.
  945.    
  946.     (if (and (< -1 (unit_get_health ghosta)) (not (vehicle_test_seat_list ghosta "g-driver" (ai_actors 2_mombasaghosts))))
  947.         (begin
  948.         (unit_kill ghosta)
  949.         (object_destroy ghosta)
  950.         )
  951.     )
  952.    
  953.     (if (and (< -1 (unit_get_health ghostb)) (not (vehicle_test_seat_list ghostb "g-driver" (ai_actors 2_mombasaghosts))))
  954.         (begin
  955.         (unit_kill ghostb)
  956.         (object_destroy ghostb)
  957.         )
  958.     )
  959.    
  960.     (if (and (< -1 (unit_get_health ghostc)) (not (vehicle_test_seat_list ghostc "g-driver" (ai_actors 2_mombasaghosts))))
  961.         (begin
  962.         (unit_kill ghostc)
  963.         (object_destroy ghostc)
  964.         )
  965.     )
  966.    
  967.     (if (and (< -1 (unit_get_health ghostd)) (not (vehicle_test_seat_list ghostd "g-driver" (ai_actors 2_mombasaghosts))))
  968.         (begin
  969.         (unit_kill ghostd)
  970.         (object_destroy ghostd)
  971.         )
  972.     )
  973.  
  974. )
  975.  
  976. (script continuous wraith_smasher
  977.  
  978.     (sleep_until (= 0 softlock) 5)   ;; if Vehicle_ID = 0, we know that we're not trying to spawn anything, and we won't delete it halfway through creating it.
  979.    
  980.     (if (and (< -1 (unit_get_health wraitha)) (not (vehicle_test_seat_list wraitha "g-driver" (ai_actors 2_mombasaghosts))))
  981.         (begin
  982.         (unit_kill wraitha)
  983.         (object_destroy wraitha)
  984.         )
  985.     )
  986.    
  987.     (if (and (< -1 (unit_get_health wraithb)) (not (vehicle_test_seat_list wraithb "g-driver" (ai_actors 2_mombasaghosts))))
  988.         (begin
  989.         (unit_kill wraithb)
  990.         (object_destroy wraithb)
  991.         )
  992.     )
  993.  
  994. )
  995.  
  996.  
  997.  
  998.  
  999.  
  1000. ;; the following script will be running to check if additional wraiths or ghosts need to be dropped into the level. Only the third and fourth BSP utilize vehicles.
  1001. ;; by running the wraithcount after ghost count, we give preference to spawning a wraith when both of them are needed on the map.
  1002. ;; This uses some human logic to determine which vehicles to place. A cond returns ONLY the first true value.
  1003. ;; So if the first value is true, none of the others are even looked at or checked. Perfect for something like the following:
  1004. ;; What do we want? Ghosts, then wraiths. There shouldn't be 4 ghosts and no wraiths, there shouldn't be 2 wraiths and no ghosts.
  1005. ;; So we first check if there's less than 2 ghosts. If so we spawn some. Always have ghosts on the map.
  1006. ;; Then we check for at least one wraith. If there are 0 we spawn a wraith. Don't want 3 ghosts and no wraith.
  1007. ;; Then we check for 3 or more ghosts. If there's only 2 or less ghosts, and at least 1 wraith, we spawn more ghosts.
  1008. ;; As a backup, if there are more than 1 wraith and more than 2 ghosts, don't spawn anything at all.
  1009.  
  1010. (script continuous do_i_need_a_car
  1011.  
  1012.     (sleep_until (= 0 vehicle_id) 5)
  1013.     (sleep 15) ;; this is to allow the wraith and ghost smashers a chance to run before we switch vehicle_id away from 0 again. Those scripts use vehicle_id = 0 as a boolean.
  1014.    
  1015.     (if (= 2 (structure_bsp_index))
  1016.         (begin
  1017.             (cond
  1018.                             ((> 2 ghostcount)
  1019.                                 (set vehicle_id 1)
  1020.                             )
  1021.                             ((= 0 wraithcount)
  1022.                                 (set vehicle_id 2)
  1023.                             )
  1024.                             ((> 3 ghostcount)
  1025.                                 (set vehicle_id 1)
  1026.                             )
  1027.                        
  1028.             )
  1029.         )
  1030.     )
  1031.     (if (= 3 (structure_bsp_index))
  1032.         (begin
  1033.             (cond
  1034.                             ((> 2 ghostcount)
  1035.                                 (set vehicle_id 1)
  1036.                             )  
  1037.             )
  1038.         )
  1039.     )
  1040.    
  1041.    
  1042.     (if (and (< 0 wraithcount) (< 2 ghostcount))
  1043.         (set vehicle_id 0)
  1044.     )
  1045.    
  1046. )
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052. ;; Our spawn system creates a single script that spawns AI in a shared location. The AI are then migrated to local AI which populate each indivdual BSP
  1053. ;; the spawn script for allied marines is below. We call for the AI in scripts beneath it. The spawn script is global, the scripts that call it are all local.
  1054. ;; The scripts beneath wait for the BSP to be valid, for the AI to be out of reinforcements, and for the player to be near that AI's section.
  1055. ;; Then we run the spawn_ai script and wait for it to create our encounter. After so many ticks, the local script migrates the AI and begins the dropship.
  1056.  
  1057.  
  1058.  
  1059.         ;;the following script is the big one. It controls the main CSPAWN squad that is shared between ALL BSP structures. It is a modular setup with 1 spawn per AI type, with the number of AI being entirely
  1060.         ;;controlled by the script itself. This allows for full control at all times with the complete range of AI available, without having to setup spawns for each individual encounter. The main CSPAWN A.I. group
  1061.         ;;is then migrated using ai_migrate to the actual encounter that they will be acting as. Here she is;
  1062.  
  1063.  
  1064. (script static void spawn_ai
  1065.         (set tempint (random_range 1 11))
  1066.  
  1067.        
  1068.    
  1069.        
  1070.         (if (= 0 spawn_mode)  ;; this is a trigger we use when we want to spawn a smaller encounter. If set to 1 we only spawn the small group.
  1071.             (begin             
  1072.                 (ai_place cspawn/s-pp)
  1073.                 (ai_place cspawn/s-pp)
  1074.                 (ai_place cspawn/g-pp)  ;;; these always spawn. By placing more up here, we lessen potential variety but allow for a "half spawn" of the stronger characters below.
  1075.                 (ai_place cspawn/g+pp)
  1076.                
  1077.                
  1078.                 (if (= (game_difficulty_get) hard)
  1079.                     (begin
  1080.                         (ai_place cspawn/j-pp)             
  1081.                         (ai_place cspawn/j-pp)
  1082.                         (ai_place cspawn/e-pr)
  1083.                         (ai_place cspawn/gund)      ;; these will also spawn if the game is on heroic
  1084.                     )
  1085.                 )
  1086.                 (if (= (game_difficulty_get) impossible)
  1087.                     (begin
  1088.                         (ai_place cspawn/g+pp)
  1089.                         (ai_place cspawn/j-pp)             
  1090.                         (ai_place cspawn/j-pp)
  1091.                         (ai_place cspawn/e+cb)
  1092.                         (ai_place cspawn/s+nd)          ;; or these will if set to legendary.
  1093.                         (ai_place cspawn/s+nd)
  1094.                     )
  1095.                 )  
  1096.             )
  1097.         )
  1098.  
  1099.         (if (= tempint 1)
  1100.             (begin
  1101.                 (ai_place cspawn/e-pr)
  1102.                  (ai_place cspawn/e+pr)
  1103.                 (ai_place cspawn/g-pp)
  1104.                 (ai_place cspawn/j-pp)
  1105.                 (ai_place cspawn/j+sh)
  1106.             )
  1107.         )
  1108.  
  1109.         (if (= tempint 2)
  1110.             (begin
  1111.                 (ai_place cspawn/BF-BP)
  1112.                 (ai_place cspawn/BF-BP)
  1113.                 (ai_place cspawn/BL-CB)
  1114.                 (ai_place cspawn/s+nd)
  1115.                 (ai_place cspawn/jSCB)
  1116.                 (ai_place cspawn/j-pp)
  1117.             )
  1118.         )
  1119.  
  1120.         (if (= tempint 3)
  1121.             (begin
  1122.                 (ai_place cspawn/BL-CB)
  1123.                 (ai_place cspawn/BF+BR)
  1124.                 (ai_place cspawn/Bf-BP)
  1125.                 (ai_place cspawn/GUND)
  1126.                 (ai_place cspawn/j-pp)
  1127.                 (ai_place cspawn/jSCB)
  1128.             )
  1129.         )
  1130.  
  1131.         (if (= tempint 4)
  1132.             (begin
  1133.                 (ai_place cspawn/e+CB)
  1134.                 (ai_place cspawn/e-pr)
  1135.                 (ai_place cspawn/g+pp)
  1136.                 (ai_place cspawn/S-PP)
  1137.                 (ai_place cspawn/S+ND)
  1138.             )
  1139.         )
  1140.  
  1141.  
  1142.         (if (= tempint 5)
  1143.             (begin
  1144.                 (ai_place cspawn/BL+BS)
  1145.                 (ai_place cspawn/BF+BR)
  1146.                 (ai_place cspawn/GUND)
  1147.                 (ai_place cspawn/GUND)             
  1148.                 (ai_place cspawn/s+nd)
  1149.                
  1150.             )
  1151.         )
  1152.  
  1153.         (if (= tempint 6)
  1154.             (begin
  1155.                 (ai_place cspawn/BL-CB)
  1156.                 (ai_place cspawn/BF-BP)
  1157.                 (ai_place cspawn/BF-BP)
  1158.                 (ai_place cspawn/s+nd)
  1159.                 (ai_place cspawn/j-pp)
  1160.                
  1161.             )
  1162.         )
  1163.  
  1164.         (if (= tempint 7)
  1165.             (begin
  1166.                 (ai_place cspawn/e+CB)
  1167.                 (ai_place cspawn/e+pr)
  1168.                 (ai_place cspawn/g-pp)
  1169.                 (ai_place cspawn/j+pp)
  1170.                 (ai_place cspawn/j+sh)
  1171.             )
  1172.         )
  1173.  
  1174.         (if (= tempint 8)
  1175.             (begin
  1176.                 (ai_place cspawn/e+pr)
  1177.                 (ai_place cspawn/e-pr)
  1178.                 (ai_place cspawn/g+pp)
  1179.                 (ai_place cspawn/jSCB)
  1180.                 (ai_place cspawn/jSCB)
  1181.             )
  1182.         )
  1183.  
  1184.         (if (= tempint 9)
  1185.             (begin
  1186.                 (ai_place cspawn/e+CB)
  1187.                 (ai_place cspawn/e-pr)
  1188.                 (ai_place cspawn/e-pr)
  1189.                 (ai_place cspawn/j+pp)
  1190.             )
  1191.         )
  1192.  
  1193.         (if (= tempint 10)
  1194.             (begin
  1195.                 (ai_place cspawn/EUES)
  1196.                 (ai_place cspawn/e+CB)
  1197.                 (ai_place cspawn/g+pp)
  1198.                 (ai_place cspawn/j+sh)
  1199.                 (ai_place cspawn/j+sh)
  1200.             )
  1201.         )
  1202.  
  1203.     (set softlock 0)
  1204. )
  1205.  
  1206.  
  1207.  
  1208. ;;For marines, we wait until the player has left that zone and then spawn the AI, migrate the AI, and then run (ai_teleport_to_starting_location) to move them to the BSP.
  1209. ;; the spawn points are placed so that the player cannot see them unless they are inside that zone. This makes sure that AI won't ever pop-up in front of the player's view.
  1210. ;;For Covenant, We create 10 squads that can be dropped, to be sure there are a proper mix and setup of the characters. We want balance in each squad the player fights against.
  1211. ;;Since the marines are for support, balance isn't important. There are no power weapons, so we simply pick one at random repeatedly until we have 6, and then migrate them to the local BSP.
  1212.  
  1213.  
  1214.  
  1215.  
  1216. (script continuous hspawner    ;; as hspawner is a continuous, in our startup script    "Preheat"    we put it to sleep remotely.
  1217.         (if (> (ai_living_count hspawn) 3)
  1218.             (sleep -1)  ;; if there are more than 3 marines, the script sleeps indefinitely.
  1219.             (begin      ;; if there are not more than 3 marines, it spawns one at random.
  1220.            
  1221.  
  1222.                 (set tempint (random_range 1 10))
  1223.                
  1224.                 (if (= tempint 1)
  1225.                     (ai_place hspawn/MAR))
  1226.                 (if (= tempint 2)
  1227.                     (ai_place hspawn/MBR))
  1228.                 (if (= tempint 3)
  1229.                     (ai_place hspawn/OAR))
  1230.                 (if (= tempint 4)
  1231.                     (ai_place hspawn/OBR))
  1232.                 (if (= tempint 5)
  1233.                     (ai_place hspawn/M++))
  1234.                 (if (= tempint 6)
  1235.                     (ai_place hspawn/PSM))
  1236.                 (if (= tempint 7)
  1237.                     (ai_place hspawn/PSG))
  1238.                 (if (= tempint 8)
  1239.                     (ai_place hspawn/PHP))
  1240.                 (if (= tempint 9)
  1241.                     (ai_place hspawn/FMAR))
  1242.             )
  1243.         )
  1244.        
  1245.         ;; because the script uses the (sleep -1) command in the true return of an IF statement, when the script is woken it will return back to the IF and run again.
  1246.         ;; The ELSE half is the (begin script, which randomly spawns one AI and then waits to see if there are 3.
  1247.         ;; the scripts below are waiting for there to be 3 AI which they then replace.
  1248.        
  1249.        
  1250. )
  1251.  
  1252. (script dormant escape
  1253.             (device_set_power gc1 1)
  1254.             (device_set_power gc2 1)
  1255.             (device_set_power gc3 1)
  1256.    
  1257.  
  1258. )
  1259.  
  1260. (script dormant health_pack
  1261.             (device_set_power gc1 1)
  1262.             (device_set_power gc2 1)
  1263.             (device_set_power gc3 1)
  1264.            
  1265.             (objects_attach p1 "" a0 "")
  1266.             (objects_detach p1 a0)
  1267.             (sleep 2)
  1268.             (object_create_anew a0)
  1269.            
  1270. )
  1271.  
  1272. (script dormant spawn_ps
  1273.  
  1274.     (show_hud 1)
  1275.            
  1276.     (if (not (unit_has_weapon p1 ps_obj))
  1277.         (begin
  1278.             (set grenlock 1)
  1279.             (sleep_until (= 2 grenlock) 5)
  1280.            
  1281.             (sleep 1)
  1282.             (player_add_equipment p1 blank true)
  1283.            
  1284.             (set grenlock 3)
  1285.             (object_create_anew pistol)
  1286.             (objects_attach p1 "" pistol "")
  1287.             (sleep 1)
  1288.             (objects_detach p1 pistol)
  1289.            
  1290.            
  1291.                     (device_set_power gc1 1)
  1292.                     (device_set_power gc2 1)
  1293.                     (device_set_power gc3 1)
  1294.         )
  1295.         (begin
  1296.                     (device_set_power gc1 1)
  1297.                     (device_set_power gc2 1)
  1298.                     (device_set_power gc3 1)
  1299.         )
  1300.        
  1301.     )
  1302. )
  1303.  
  1304. (script dormant spawn_ar
  1305.  
  1306.     (show_hud 1)
  1307.    
  1308.     (if (not (unit_has_weapon p1 ar_obj))
  1309.         (begin
  1310.             (set grenlock 1)
  1311.             (sleep_until (= 2 grenlock) 5)
  1312.            
  1313.             (sleep 1)
  1314.             (player_add_equipment p1 blank true)
  1315.            
  1316.             (set grenlock 3)
  1317.             (object_create_anew assault_rifle)
  1318.             (objects_attach p1 "" assault_rifle "")
  1319.             (sleep 1)
  1320.             (objects_detach p1 assault_rifle)
  1321.            
  1322.            
  1323.                     (device_set_power gc1 1)
  1324.                     (device_set_power gc2 1)
  1325.                     (device_set_power gc3 1)
  1326.         )
  1327.         (begin
  1328.                     (device_set_power gc1 1)
  1329.                     (device_set_power gc2 1)
  1330.                     (device_set_power gc3 1)
  1331.         )
  1332.     )
  1333. )
  1334.  
  1335.  
  1336. (script dormant spawn_br
  1337.  
  1338.     (show_hud 1)
  1339.     (if (not (unit_has_weapon p1 br_obj))
  1340.         (begin 
  1341.             (set grenlock 1)
  1342.             (sleep_until (= 2 grenlock) 5)
  1343.            
  1344.             (sleep 1)
  1345.             (player_add_equipment p1 blank true)
  1346.            
  1347.             (set grenlock 3)
  1348.             (object_create_anew battle_rifle)
  1349.             (objects_attach p1 "" battle_rifle "")
  1350.             (sleep 1)
  1351.             (objects_detach p1 battle_rifle)
  1352.            
  1353.            
  1354.                     (device_set_power gc1 1)
  1355.                     (device_set_power gc2 1)
  1356.                     (device_set_power gc3 1)
  1357.         )
  1358.         (begin
  1359.                     (device_set_power gc1 1)
  1360.                     (device_set_power gc2 1)
  1361.                     (device_set_power gc3 1)
  1362.         )
  1363.     )
  1364. )
  1365.  
  1366.  
  1367. (script dormant spawn_sg
  1368.  
  1369.  
  1370.     (show_hud 1)
  1371.     (if (not (unit_has_weapon p1 sg_obj))
  1372.         (begin 
  1373.             (set grenlock 1)
  1374.             (sleep_until (= 2 grenlock) 5)
  1375.            
  1376.             (sleep 1)
  1377.             (player_add_equipment p1 blank true)
  1378.            
  1379.             (set grenlock 3)
  1380.             (object_destroy shotgun)
  1381.             (object_create_anew shotgun)
  1382.             (objects_attach p1 "" shotgun "")
  1383.             (sleep 1)
  1384.             (objects_detach p1 shotgun)
  1385.            
  1386.            
  1387.                     (device_set_power gc1 1)
  1388.                     (device_set_power gc2 1)
  1389.                     (device_set_power gc3 1)
  1390.         )
  1391.         (begin
  1392.                     (device_set_power gc1 1)
  1393.                     (device_set_power gc2 1)
  1394.                     (device_set_power gc3 1)
  1395.         )
  1396.     )
  1397. )
  1398.  
  1399.  
  1400. (script dormant spawn_smg
  1401.  
  1402.     (show_hud 1)
  1403.     (if (not (unit_has_weapon p1 smg_obj))
  1404.         (begin 
  1405.             (set grenlock 1)
  1406.             (sleep_until (= 2 grenlock) 5)
  1407.            
  1408.             (sleep 1)
  1409.             (player_add_equipment p1 blank true)
  1410.            
  1411.             (set grenlock 3)
  1412.             (object_create_anew smg)
  1413.             (objects_attach p1 "" smg "")
  1414.             (sleep 1)
  1415.             (objects_detach p1 smg)
  1416.            
  1417.            
  1418.                     (device_set_power gc1 1)
  1419.                     (device_set_power gc2 1)
  1420.                     (device_set_power gc3 1)
  1421.         )
  1422.         (begin
  1423.                     (device_set_power gc1 1)
  1424.                     (device_set_power gc2 1)
  1425.                     (device_set_power gc3 1)
  1426.         )
  1427.     )
  1428. )
  1429.  
  1430.  
  1431. (script dormant spawn_sr
  1432.  
  1433.     (show_hud 1)
  1434.     (if (not (unit_has_weapon p1 sr_obj))
  1435.         (begin 
  1436.             (set grenlock 1)
  1437.             (sleep_until (= 2 grenlock) 5)
  1438.            
  1439.             (sleep 1)
  1440.             (player_add_equipment p1 blank true)
  1441.            
  1442.             (set grenlock 3)
  1443.             (object_create_anew sniper_rifle)
  1444.             (objects_attach p1 "" sniper_rifle "")
  1445.             (sleep 1)
  1446.             (objects_detach p1 sniper_rifle)
  1447.            
  1448.            
  1449.                     (device_set_power gc1 1)
  1450.                     (device_set_power gc2 1)
  1451.                     (device_set_power gc3 1)
  1452.         )
  1453.         (begin
  1454.                     (device_set_power gc1 1)
  1455.                     (device_set_power gc2 1)
  1456.                     (device_set_power gc3 1)
  1457.         )
  1458.     )
  1459. )
  1460.  
  1461. (script dormant spawn_dr
  1462.  
  1463.     (show_hud 1)
  1464.    
  1465.     (if (not (unit_has_weapon p1 dr_obj))
  1466.         (begin
  1467.             (set grenlock 1)
  1468.             (sleep_until (= 2 grenlock) 5)
  1469.            
  1470.             (sleep 1)
  1471.             (player_add_equipment p1 blank true)
  1472.            
  1473.             (set grenlock 3)
  1474.             (object_create_anew dmr)
  1475.             (objects_attach p1 "" dmr "")
  1476.             (sleep 1)
  1477.             (objects_detach p1 dmr)
  1478.            
  1479.            
  1480.                     (device_set_power gc1 1)
  1481.                     (device_set_power gc2 1)
  1482.                     (device_set_power gc3 1)
  1483.         )
  1484.         (begin
  1485.                     (device_set_power gc1 1)
  1486.                     (device_set_power gc2 1)
  1487.                     (device_set_power gc3 1)
  1488.         )
  1489.     )      
  1490. )
  1491.  
  1492.  
  1493.    
  1494.    
  1495. (script startup Preheat
  1496.    
  1497.        
  1498.         (sleep -1 hspawner)   ;; immediately put the hspawner to sleep, so that it starts in the OFF position.
  1499.         (if (= 1 (get_digital_forward_throttle 2))
  1500.             (begin
  1501.                 (set_digital_forward_throttle 2 0)
  1502.                 (core_load)        
  1503.             )
  1504.         )
  1505.        
  1506.         (objects_attach (GR0) "" gc1 "")
  1507.         (objects_attach (AR0) "" ac1 "")
  1508.         (objects_detach (GR0) gc1)
  1509.         (objects_detach (AR0) ac1)
  1510.        
  1511.         (object_create_anew 0_grenade)
  1512.         (object_create_anew 1_grenade)
  1513.         (object_create_anew 2_grenade)
  1514.         (object_create_anew 3_grenade)
  1515.        
  1516.        
  1517.         (set p1 (unit (list_get (players) 0)))
  1518.         (set developer_mode 4)
  1519.         (ai_allegiance human player)
  1520.         (ai_follow_target_players 0_cybase)
  1521.         (ai_follow_target_players 0_underpass)
  1522.         (ai_follow_target_players 0_oldtown)
  1523.         (ai_follow_target_players 1_headlong)
  1524.         (ai_follow_target_players 1_terminal)
  1525.         (ai_follow_target_players 1_tower)
  1526.         (ai_follow_target_players 2_mombasamarine)
  1527.         (ai_follow_target_players 2_chronomarine)
  1528.        
  1529.        
  1530.        
  1531.         (set start 1)
  1532.    
  1533. )  
  1534.  
  1535.  
  1536. (script continuous sp_0turf
  1537.     (sleep -1)
  1538.        
  1539.    
  1540.                 (object_destroy UCR)
  1541.                 (object_destroy UCL)
  1542.                 (object_destroy uship)
  1543.                
  1544.                 (object_create uship)
  1545.                 (object_create ucr)
  1546.                 (object_create ucl)
  1547.                 (object_create utr)
  1548.                 (object_create utl)
  1549.                 (object_create ug)
  1550.                 (unit_close utr)
  1551.                 (unit_close utl)
  1552.                 (unit_close ug)
  1553.                
  1554.                 (objects_attach uship "gravlift" ug "")
  1555.                 (objects_attach uship "troop_door_right" utr "")
  1556.                 (objects_attach uship "troop_door_left" utl "")
  1557.                 (objects_attach uship "turret_door_left" ucr "")
  1558.                 (objects_attach uship "turret_door_right" ucl "")
  1559.  
  1560.    
  1561.    
  1562.    
  1563.     (set softlock 1)
  1564.     (spawn_ai)
  1565.     (sleep_until (= 0 softlock) 5)
  1566.    
  1567.  
  1568.    
  1569.    
  1570.    
  1571.     (vehicle_load_magic ug "" (ai_actors cspawn))
  1572.     (ai_braindead cspawn 1)
  1573.     (ai_migrate cspawn 0_turf)
  1574.     (set spawning 0)
  1575.    
  1576.     (set tempint (random_range 1 3))
  1577.    
  1578.     (if (= 1 tempint)
  1579.         (begin
  1580.             (object_teleport uship 0_oldtown)
  1581.             (recording_play uship 0_oldtownturf)
  1582.            
  1583.            
  1584.            
  1585.             (sleep_until (> 800 (recording_time uship)) 5)
  1586.             (unit_open ug)
  1587.             (sleep 30)
  1588.             (ai_braindead 0_turf 0)
  1589.             (vehicle_unload ug "")
  1590.             (ai_attack 0_turf)
  1591.             (sleep_until (= 0 (recording_time uship)) 5)
  1592.            
  1593.                 (object_destroy uship)
  1594.                
  1595.                
  1596.             (sleep 15)
  1597.         )
  1598.     )
  1599.    
  1600.     (if (= 2 tempint)
  1601.         (begin
  1602.             (object_teleport uship 0_turf)
  1603.             (recording_play uship 0_turf)
  1604.            
  1605.            
  1606.            
  1607.             (sleep_until (> 910 (recording_time uship)) 5)
  1608.             (unit_open ug)
  1609.             (sleep 30)
  1610.             (ai_braindead 0_turf 0)
  1611.             (vehicle_unload ug "")
  1612.             (ai_attack 0_turf)
  1613.             (sleep_until (= 0 (recording_time uship)) 5)
  1614.            
  1615.                 (object_destroy uship)
  1616.                
  1617.                
  1618.             (sleep 15)
  1619.         )
  1620.     )
  1621.                    
  1622. )  
  1623.  
  1624.  
  1625. (script continuous sp_0courtyard
  1626.     (sleep -1)
  1627.        
  1628.     (object_destroy vCR)
  1629.                 (object_destroy vCL)
  1630.                 (object_destroy vship)
  1631.                
  1632.                 (object_create vship)
  1633.                 (object_create vcr)
  1634.                 (object_create vcl)
  1635.                 (object_create vtr)
  1636.                 (object_create vtl)
  1637.                 (object_create vg)
  1638.                 (unit_close vtr)
  1639.                 (unit_close vtl)
  1640.                 (unit_close vg)
  1641.                
  1642.                 (objects_attach vship "gravlift" vg "")
  1643.                 (objects_attach vship "troop_door_right" vtr "")
  1644.                 (objects_attach vship "troop_door_left" vtl "")
  1645.                 (objects_attach vship "turret_door_left" vcr "")
  1646.                 (objects_attach vship "turret_door_right" vcl "")
  1647.                
  1648.     (set softlock 1)
  1649.     (spawn_ai)
  1650.     (sleep_until (= 0 softlock) 5)
  1651.    
  1652.    
  1653.    
  1654.    
  1655.     (vehicle_load_magic vg "" (ai_actors cspawn))
  1656.     (ai_braindead cspawn 1)
  1657.     (ai_migrate cspawn 0_courtyard)
  1658.     (set spawning 0)
  1659.    
  1660.     (set tempint (random_range 1 3))
  1661.    
  1662.     (if (= 1 tempint)
  1663.         (begin
  1664.             (object_teleport vship 0_courtyardA)
  1665.             (recording_play vship 0_courtyardA)
  1666.            
  1667.            
  1668.            
  1669.             (sleep_until (> 735 (recording_time vship)) 5)
  1670.             (unit_open vg)
  1671.             (sleep 30)
  1672.             (ai_braindead 0_courtyard 0)
  1673.             (vehicle_unload vg "")
  1674.             (ai_attack 0_courtyard)
  1675.             (sleep_until (= 0 (recording_time vship)) 5)
  1676.            
  1677.                 (object_destroy vship)
  1678.                
  1679.                
  1680.             (sleep 15)
  1681.         )
  1682.     )
  1683.    
  1684.     (if (= 2 tempint)
  1685.         (begin
  1686.             (object_teleport vship 0_courtyardB)
  1687.             (recording_play vship 0_courtyardB)
  1688.            
  1689.            
  1690.            
  1691.             (sleep_until (> 685 (recording_time vship)) 5)
  1692.             (unit_open vg)
  1693.             (sleep 30)
  1694.             (ai_braindead 0_courtyard 0)
  1695.             (vehicle_unload vg "")
  1696.             (ai_attack 0_courtyard)
  1697.             (sleep_until (= 0 (recording_time vship)) 5)
  1698.            
  1699.                 (object_destroy vship)
  1700.                
  1701.                
  1702.             (sleep 15)
  1703.         )
  1704.     )
  1705.                    
  1706. )  
  1707.  
  1708.  
  1709.  
  1710. (script continuous sp_0jalley
  1711.  
  1712.     (sleep -1)
  1713.        
  1714.                 (object_destroy wCR)
  1715.                 (object_destroy wCL)
  1716.                 (object_destroy wship)
  1717.                
  1718.                 (object_create wship)
  1719.                 (object_create wcr)
  1720.                 (object_create wcl)
  1721.                 (object_create wtr)
  1722.                 (object_create wtl)
  1723.                 (object_create wg)
  1724.                 (unit_close wtr)
  1725.                 (unit_close wtl)
  1726.                 (unit_close wg)
  1727.                
  1728.                 (objects_attach wship "gravlift" wg "")
  1729.                 (objects_attach wship "troop_door_right" wtr "")
  1730.                 (objects_attach wship "troop_door_left" wtl "")
  1731.                 (objects_attach wship "turret_door_left" wcr "")
  1732.                 (objects_attach wship "turret_door_right" wcl "")
  1733.                
  1734.     (set softlock 1)
  1735.     (spawn_ai)
  1736.     (sleep_until (= 0 softlock) 5)
  1737.    
  1738.  
  1739.    
  1740.    
  1741.    
  1742.    
  1743.     (vehicle_load_magic wg "" (ai_actors cspawn))
  1744.     (ai_braindead cspawn 1)
  1745.     (ai_migrate cspawn 0_jalley)
  1746.     (set spawning 0)
  1747.    
  1748.    
  1749.     (set tempint (random_range 1 3))
  1750.    
  1751.     (if (= 1 tempint)
  1752.         (begin 
  1753.    
  1754.             (object_teleport wship 0_overpass)
  1755.             (recording_play wship 0_overpass)
  1756.            
  1757.            
  1758.            
  1759.             (sleep_until (> 705 (recording_time wship)) 5)
  1760.             (unit_open wg)
  1761.             (sleep 30)
  1762.             (ai_braindead 0_jalley 0)
  1763.             (vehicle_unload wg "")
  1764.             (ai_attack 0_jalley)
  1765.             (sleep_until (= 0 (recording_time wship)) 5)
  1766.            
  1767.                 (object_destroy wship)
  1768.                
  1769.                
  1770.             (sleep 15)
  1771.        
  1772.         )
  1773.     )
  1774.     (if (= 2 tempint)
  1775.         (begin 
  1776.            
  1777.             (object_teleport wship 0_oldtown)
  1778.             (recording_play wship 0_oldtown)
  1779.            
  1780.            
  1781.            
  1782.             (sleep_until (> 830 (recording_time wship)) 5)
  1783.             (unit_open wg)
  1784.             (sleep 30)
  1785.             (ai_braindead 0_jalley 0)
  1786.             (vehicle_unload wg "")
  1787.             (ai_attack 0_jalley)
  1788.             (sleep_until (= 0 (recording_time wship)) 5)
  1789.            
  1790.                 (object_destroy wship)
  1791.                
  1792.                
  1793.             (sleep 15)
  1794.        
  1795.         )
  1796.     )
  1797.    
  1798.                    
  1799. )  
  1800.  
  1801.  
  1802.  
  1803. (script continuous sp_1headlong
  1804.  
  1805.     (sleep -1)
  1806.        
  1807.    
  1808.                 (object_destroy UCR)
  1809.                 (object_destroy UCL)
  1810.                 (object_destroy uship)
  1811.                
  1812.                 (object_create uship)
  1813.                 (object_create ucr)
  1814.                 (object_create ucl)
  1815.                 (object_create utr)
  1816.                 (object_create utl)
  1817.                 (object_create ug)
  1818.                 (unit_close utr)
  1819.                 (unit_close utl)
  1820.                 (unit_close ug)
  1821.                
  1822.                 (objects_attach uship "gravlift" ug "")
  1823.                 (objects_attach uship "troop_door_right" utr "")
  1824.                 (objects_attach uship "troop_door_left" utl "")
  1825.                 (objects_attach uship "turret_door_left" ucr "")
  1826.                 (objects_attach uship "turret_door_right" ucl "")
  1827.  
  1828.     (set softlock 1)
  1829.     (spawn_ai)
  1830.     (sleep_until (= 0 softlock) 5)
  1831.    
  1832.  
  1833.    
  1834.    
  1835.    
  1836.     (vehicle_load_magic ug "" (ai_actors cspawn))
  1837.     (ai_braindead cspawn 1)
  1838.     (ai_migrate cspawn 1_headlong)
  1839.     (set spawning 0)
  1840.    
  1841.     (set tempint (random_range 1 3))
  1842.    
  1843.     (if (= 1 tempint)
  1844.         (begin
  1845.             (object_teleport uship 1_headlonga)
  1846.             (recording_play uship 1_headlonga)
  1847.            
  1848.            
  1849.            
  1850.             (sleep_until (> 715 (recording_time uship)) 5)
  1851.             (unit_open ug)
  1852.             (sleep 30)
  1853.             (ai_braindead 1_headlong 0)
  1854.             (vehicle_unload ug "")
  1855.             (ai_attack 1_headlong)
  1856.             (sleep_until (= 0 (recording_time uship)) 5)
  1857.            
  1858.                 (object_destroy uship)
  1859.                
  1860.                
  1861.             (sleep 15)
  1862.         )
  1863.     )
  1864.    
  1865.     (if (= 2 tempint)
  1866.         (begin
  1867.             (object_teleport uship 1_headlongb)
  1868.             (recording_play uship 1_headlongb)
  1869.            
  1870.            
  1871.            
  1872.             (sleep_until (> 905 (recording_time uship)) 5)
  1873.             (unit_open ug)
  1874.             (sleep 30)
  1875.             (ai_braindead 1_headlong 0)
  1876.             (vehicle_unload ug "")
  1877.             (ai_attack 1_headlong)
  1878.             (sleep_until (= 0 (recording_time uship)) 5)
  1879.            
  1880.                 (object_destroy uship)
  1881.                
  1882.                
  1883.             (sleep 15)
  1884.         )
  1885.     )
  1886.                    
  1887. )  
  1888.  
  1889.  
  1890. (script continuous sp_1terminal
  1891.  
  1892.     (sleep -1)
  1893.        
  1894.                 (object_destroy vCR)
  1895.                 (object_destroy vCL)
  1896.                 (object_destroy vship)
  1897.                
  1898.                 (object_create vship)
  1899.                 (object_create vcr)
  1900.                 (object_create vcl)
  1901.                 (object_create vtr)
  1902.                 (object_create vtl)
  1903.                 (object_create vg)
  1904.                 (unit_close vtr)
  1905.                 (unit_close vtl)
  1906.                 (unit_close vg)
  1907.                
  1908.                 (objects_attach vship "gravlift" vg "")
  1909.                 (objects_attach vship "troop_door_right" vtr "")
  1910.                 (objects_attach vship "troop_door_left" vtl "")
  1911.                 (objects_attach vship "turret_door_left" vcr "")
  1912.                 (objects_attach vship "turret_door_right" vcl "")
  1913.                
  1914.                
  1915.     (set softlock 1)
  1916.     (spawn_ai)
  1917.     (sleep_until (= 0 softlock) 5)
  1918.    
  1919.  
  1920.  
  1921.    
  1922.    
  1923.     (vehicle_load_magic vg "" (ai_actors cspawn))
  1924.     (ai_braindead cspawn 1)
  1925.     (ai_migrate cspawn 1_terminal)
  1926.     (set spawning 0)
  1927.    
  1928.     (set tempint (random_range 1 3))
  1929.    
  1930.     (if (= 1 tempint)
  1931.         (begin
  1932.             (object_teleport vship 1_terma)
  1933.             (recording_play vship 1_terma)
  1934.            
  1935.            
  1936.            
  1937.             (sleep_until (> 870 (recording_time vship)) 5)
  1938.             (unit_open vg)
  1939.             (sleep 30)
  1940.             (ai_braindead 1_terminal 0)
  1941.             (vehicle_unload vg "")
  1942.             (ai_attack 1_terminal)
  1943.             (sleep_until (= 0 (recording_time vship)) 5)
  1944.            
  1945.                 (object_destroy vship)
  1946.                
  1947.                
  1948.             (sleep 15)
  1949.         )
  1950.     )
  1951.    
  1952.     (if (= 2 tempint)
  1953.         (begin
  1954.             (object_teleport vship 1_termb)
  1955.             (recording_play vship 1_termb)
  1956.            
  1957.            
  1958.            
  1959.             (sleep_until (> 1280 (recording_time vship)) 5)
  1960.             (unit_open vg)
  1961.             (sleep 30)
  1962.             (ai_braindead 1_terminal 0)
  1963.             (vehicle_unload vg "")
  1964.             (ai_attack 1_terminal)
  1965.             (sleep_until (= 0 (recording_time vship)) 5)
  1966.            
  1967.                 (object_destroy vship)
  1968.                
  1969.                
  1970.             (sleep 15)
  1971.         )
  1972.     )
  1973.                    
  1974. )  
  1975.  
  1976. ;;;;;
  1977.  
  1978. ;;;;
  1979.  
  1980. ;; BSP 2
  1981.  
  1982. ;;;;;;
  1983.  
  1984. ;;;;;
  1985.            
  1986.  
  1987. (script continuous sp_2mombasarear
  1988.  
  1989.     (sleep -1)
  1990.        
  1991.    
  1992.                 (object_destroy UCR)
  1993.                 (object_destroy UCL)
  1994.                 (object_destroy uship)
  1995.                
  1996.                 (object_create uship)
  1997.                 (object_create ucr)
  1998.                 (object_create ucl)
  1999.                 (object_create utr)
  2000.                 (object_create utl)
  2001.                 (object_create ug)
  2002.                 (unit_close utr)
  2003.                 (unit_close utl)
  2004.                 (unit_close ug)
  2005.                
  2006.                 (objects_attach uship "gravlift" ug "")
  2007.                 (objects_attach uship "troop_door_right" utr "")
  2008.                 (objects_attach uship "troop_door_left" utl "")
  2009.                 (objects_attach uship "turret_door_left" ucr "")
  2010.                 (objects_attach uship "turret_door_right" ucl "")
  2011.  
  2012.    
  2013.    
  2014.     (spawn_ai)
  2015.     (sleep_until (= 0 softlock) 5)
  2016.     (set spawn_mode 0)
  2017.        
  2018.     (cond
  2019.                     ((= 0 vehicle_id)
  2020.                         (sleep 1)
  2021.                     )
  2022.                     ((= 1 vehicle_id)
  2023.                         (begin
  2024.                             (set softlock 1)
  2025.                             (spawn_ghost)
  2026.                             (sleep_until (= 0 softlock) 5)
  2027.                             (objects_attach uship "small_cargo01" GHOST "" )
  2028.                             (set softlock 1)
  2029.                             (spawn_ghost)
  2030.                             (sleep_until (= 0 softlock) 5)
  2031.                             (objects_attach uship "small_cargo02" GHOST "")
  2032.                             (set vehicle_id 0)
  2033.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2034.                         )
  2035.                     )
  2036.                     ((= 2 vehicle_id)  
  2037.                         (begin
  2038.                             (set softlock 1)
  2039.                             (spawn_wraith)
  2040.                             (sleep_until (= 0 softlock) 5)
  2041.                             (objects_attach uship "large_cargo" WRAITH "" )
  2042.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2043.                             (set vehicle_id 0)
  2044.                         )
  2045.                     )
  2046.     )
  2047.    
  2048.    
  2049.    
  2050.    
  2051.    
  2052.     (vehicle_load_magic ug "" (ai_actors cspawn))
  2053.     (ai_braindead cspawn 1)
  2054.     (ai_migrate cspawn 2_newmombasa)
  2055.     (set spawning 0)
  2056.    
  2057.    
  2058.     (set tempint (random_range 1 4))
  2059.    
  2060.     (if (= 1 tempint)
  2061.         (begin
  2062.             (object_teleport uship 2_newmombasaA1)
  2063.             (recording_play uship 2_newmombasaA1)
  2064.            
  2065.            
  2066.            
  2067.             (sleep_until (> 955 (recording_time uship)) 5)
  2068.             (unit_open ug)
  2069.             (sleep 30)
  2070.             (ai_braindead 2_newmombasa 0)
  2071.             (vehicle_unload ug "")
  2072.            
  2073.             (objects_detach uship wraitha)
  2074.             (objects_detach uship wraithb)
  2075.            
  2076.             (objects_detach uship ghosta)
  2077.             (objects_detach uship ghostb)
  2078.             (objects_detach uship ghostc)
  2079.             (objects_detach uship ghostd)
  2080.            
  2081.             (ai_attack 2_newmombasa)
  2082.             (sleep_until (= 0 (recording_time uship)) 5)
  2083.            
  2084.                 (object_destroy uship)
  2085.                
  2086.                
  2087.             (sleep 15)
  2088.         )
  2089.     )
  2090.    
  2091.     (if (= 2 tempint)
  2092.         (begin
  2093.             (object_teleport uship 2_newmombasaA)
  2094.             (recording_play uship 2_newmombasaA2)
  2095.            
  2096.            
  2097.            
  2098.             (sleep_until (> 965 (recording_time uship)) 5)
  2099.             (unit_open ug)
  2100.             (sleep 30)
  2101.             (ai_braindead 2_newmombasa 0)
  2102.             (vehicle_unload ug "")
  2103.            
  2104.             (objects_detach uship wraitha)
  2105.             (objects_detach uship wraithb)
  2106.            
  2107.             (objects_detach uship ghosta)
  2108.             (objects_detach uship ghostb)
  2109.             (objects_detach uship ghostc)
  2110.             (objects_detach uship ghostd)
  2111.            
  2112.             (ai_attack 2_newmombasa)
  2113.             (sleep_until (= 0 (recording_time uship)) 5)
  2114.            
  2115.                 (object_destroy uship)
  2116.                
  2117.                
  2118.             (sleep 15)
  2119.         )
  2120.     )
  2121.    
  2122.     (if (= 3 tempint)
  2123.         (begin
  2124.             (object_teleport uship 2_newmombasaA)
  2125.             (recording_play uship 2_newmombasaA3)
  2126.            
  2127.            
  2128.            
  2129.             (sleep_until (> 1190 (recording_time uship)) 5)
  2130.             (unit_open ug)
  2131.             (sleep 30)
  2132.             (ai_braindead 2_newmombasa 0)
  2133.             (vehicle_unload ug "")
  2134.            
  2135.             (objects_detach uship wraitha)
  2136.             (objects_detach uship wraithb)
  2137.            
  2138.             (objects_detach uship ghosta)
  2139.             (objects_detach uship ghostb)
  2140.             (objects_detach uship ghostc)
  2141.             (objects_detach uship ghostd)
  2142.            
  2143.             (ai_attack 2_newmombasa)
  2144.             (sleep_until (= 0 (recording_time uship)) 5)
  2145.            
  2146.                 (object_destroy uship)
  2147.                
  2148.                
  2149.             (sleep 15)
  2150.         )
  2151.     )
  2152.                    
  2153. )
  2154.  
  2155.  
  2156. (script continuous sp_2newmombasa
  2157.        
  2158.     (sleep -1)
  2159.    
  2160.                 (object_destroy vCR)
  2161.                 (object_destroy vCL)
  2162.                 (object_destroy vship)
  2163.                
  2164.                 (object_create vship)
  2165.                 (object_create vcr)
  2166.                 (object_create vcl)
  2167.                 (object_create vtr)
  2168.                 (object_create vtl)
  2169.                 (object_create vg)
  2170.                 (unit_close vtr)
  2171.                 (unit_close vtl)
  2172.                 (unit_close vg)
  2173.                
  2174.                 (objects_attach vship "gravlift" vg "")
  2175.                 (objects_attach vship "troop_door_right" vtr "")
  2176.                 (objects_attach vship "troop_door_left" vtl "")
  2177.                 (objects_attach vship "turret_door_left" vcr "")
  2178.                 (objects_attach vship "turret_door_right" vcl "")
  2179.                
  2180.     (set softlock 1)
  2181.    
  2182.     (spawn_ai)
  2183.     (sleep_until (= 0 softlock) 5)
  2184.     (set spawn_mode 0)
  2185.    
  2186.    
  2187.    
  2188.     (cond
  2189.                     ((= 0 vehicle_id)
  2190.                         (sleep 1)
  2191.                     )
  2192.                     ((= 1 vehicle_id)
  2193.                         (begin
  2194.                             (set softlock 1)
  2195.                             (spawn_ghost)
  2196.                             (sleep_until (= 0 softlock) 5)
  2197.                             (objects_attach vship "small_cargo01" GHOST "" )
  2198.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2199.                             (set softlock 1)
  2200.                             (spawn_ghost)
  2201.                             (sleep_until (= 0 softlock) 5)
  2202.                             (objects_attach vship "small_cargo02" GHOST "")
  2203.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2204.                             (set vehicle_id 0)
  2205.                         )
  2206.                     )
  2207.                     ((= 2 vehicle_id)  
  2208.                         (begin
  2209.                             (set softlock 1)
  2210.                             (spawn_wraith)
  2211.                             (sleep_until (= 0 softlock) 5)
  2212.                             (objects_attach vship "large_cargo" WRAITH "" )
  2213.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2214.                             (set vehicle_id 0)
  2215.                         )
  2216.                     )
  2217.     )
  2218.    
  2219.    
  2220.    
  2221.    
  2222.    
  2223.     (vehicle_load_magic vg "" (ai_actors cspawn))
  2224.     (ai_braindead cspawn 1)
  2225.     (ai_migrate cspawn 2_mombasarear)
  2226.     (set spawning 0)
  2227.    
  2228.     (set tempint (random_range 1 3))
  2229.    
  2230.     (if (= 1 tempint)
  2231.         (begin
  2232.             (object_teleport vship 2_newmombasaB)
  2233.             (recording_play vship 2_newmombasaB1)
  2234.            
  2235.            
  2236.            
  2237.             (sleep_until (> 965 (recording_time vship)) 5)
  2238.             (unit_open vg)
  2239.             (sleep 30)
  2240.             (ai_braindead 2_mombasarear 0)
  2241.             (vehicle_unload vg "")
  2242.            
  2243.             (objects_detach vship wraitha)
  2244.             (objects_detach vship wraithb)
  2245.            
  2246.             (objects_detach vship ghosta)
  2247.             (objects_detach vship ghostb)
  2248.             (objects_detach vship ghostc)
  2249.             (objects_detach vship ghostd)
  2250.            
  2251.            
  2252.             (ai_attack 2_mombasarear)
  2253.             (sleep_until (= 0 (recording_time vship)) 5)
  2254.            
  2255.                 (object_destroy vship)
  2256.                
  2257.                
  2258.             (sleep 15)
  2259.         )
  2260.     )
  2261.    
  2262.     (if (= 1 tempint)
  2263.         (begin
  2264.             (object_teleport vship 2_newmombasaB)
  2265.             (recording_play vship 2_newmombasaB2)
  2266.            
  2267.            
  2268.            
  2269.             (sleep_until (> 1280 (recording_time vship)) 5)
  2270.             (unit_open vg)
  2271.             (sleep 30)
  2272.             (ai_braindead 2_mombasarear 0)
  2273.             (vehicle_unload vg "")
  2274.            
  2275.             (objects_detach vship wraitha)
  2276.             (objects_detach vship wraithb)
  2277.            
  2278.             (objects_detach vship ghosta)
  2279.             (objects_detach vship ghostb)
  2280.             (objects_detach vship ghostc)
  2281.             (objects_detach vship ghostd)
  2282.            
  2283.            
  2284.             (ai_attack 2_mombasarear)
  2285.             (sleep_until (= 0 (recording_time vship)) 5)
  2286.            
  2287.                 (object_destroy vship)
  2288.                
  2289.                
  2290.             (sleep 15)
  2291.         )
  2292.     )
  2293.    
  2294.     (if (= 1 tempint)
  2295.         (begin
  2296.             (object_teleport vship 2_newmombasaB)
  2297.             (recording_play vship 2_newmombasaB3)
  2298.            
  2299.            
  2300.            
  2301.             (sleep_until (> 780 (recording_time vship)) 5)
  2302.             (unit_open vg)
  2303.             (sleep 30)
  2304.             (ai_braindead 2_mombasarear 0)
  2305.             (vehicle_unload vg "")
  2306.            
  2307.             (objects_detach vship wraitha)
  2308.             (objects_detach vship wraithb)
  2309.            
  2310.             (objects_detach vship ghosta)
  2311.             (objects_detach vship ghostb)
  2312.             (objects_detach vship ghostc)
  2313.             (objects_detach vship ghostd)
  2314.            
  2315.            
  2316.             (ai_attack 2_mombasarear)
  2317.             (sleep_until (= 0 (recording_time vship)) 5)
  2318.            
  2319.                 (object_destroy vship)
  2320.                
  2321.                
  2322.             (sleep 15)
  2323.         )
  2324.     )
  2325.                    
  2326. )
  2327.  
  2328.  
  2329. (script continuous sp_2loadingbay
  2330.  
  2331.     (sleep -1)
  2332.  
  2333.        
  2334.                 (object_destroy wCR)
  2335.                 (object_destroy wCL)
  2336.                 (object_destroy wship)
  2337.                
  2338.                 (object_create wship)
  2339.                 (object_create wcr)
  2340.                 (object_create wcl)
  2341.                 (object_create wtr)
  2342.                 (object_create wtl)
  2343.                 (object_create wg)
  2344.                 (unit_close wtr)
  2345.                 (unit_close wtl)
  2346.                 (unit_close wg)
  2347.                
  2348.                 (objects_attach wship "gravlift" wg "")
  2349.                 (objects_attach wship "troop_door_right" wtr "")
  2350.                 (objects_attach wship "troop_door_left" wtl "")
  2351.                 (objects_attach wship "turret_door_left" wcr "")
  2352.                 (objects_attach wship "turret_door_right" wcl "")  
  2353.                
  2354.     (set softlock 1)   
  2355.    
  2356.     (spawn_ai)
  2357.     (sleep_until (= 0 softlock) 5)
  2358.     (set spawn_mode 0)
  2359.    
  2360.    
  2361.    
  2362.  
  2363.    
  2364.    
  2365.     (cond
  2366.                     ((= 0 vehicle_id)
  2367.                         (sleep 1)
  2368.                     )
  2369.                     ((= 1 vehicle_id)
  2370.                         (begin
  2371.                             (set softlock 1)
  2372.                             (spawn_ghost)
  2373.                             (sleep_until (= 0 softlock) 5)
  2374.                             (objects_attach wship "small_cargo01" GHOST "" )
  2375.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2376.                             (set softlock 1)
  2377.                             (spawn_ghost)
  2378.                             (sleep_until (= 0 softlock) 5)
  2379.                             (objects_attach wship "small_cargo02" GHOST "")
  2380.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2381.                             (set vehicle_id 0)
  2382.                            
  2383.                         )
  2384.                     )
  2385.                     ((= 2 vehicle_id)  
  2386.                         (begin
  2387.                             (set softlock 1)
  2388.                             (spawn_wraith)
  2389.                             (sleep_until (= 0 softlock) 5)
  2390.                             (objects_attach wship "large_cargo" WRAITH "" )
  2391.                             (ai_migrate driver/ghost 2_mombasaghosts)
  2392.                             (set vehicle_id 0)
  2393.                         )
  2394.                     )
  2395.     )
  2396.    
  2397.    
  2398.    
  2399.    
  2400.    
  2401.     (vehicle_load_magic wg "" (ai_actors cspawn))
  2402.     (ai_braindead cspawn 1)
  2403.     (ai_migrate cspawn 2_loadingbay)
  2404.     (set spawning 0)
  2405.    
  2406.     (set tempint (random_range 1 3))
  2407.    
  2408.     (if (= 1 tempint)
  2409.         (begin
  2410.             (object_teleport wship 2_loading)
  2411.             (recording_play wship 2_loading1)
  2412.            
  2413.            
  2414.            
  2415.             (sleep_until (> 1190 (recording_time wship)) 5)
  2416.             (unit_open wg)
  2417.             (sleep 30)
  2418.             (ai_braindead 2_loadingbay 0)
  2419.             (vehicle_unload wg "")
  2420.            
  2421.             (objects_detach wship wraitha)
  2422.             (objects_detach wship wraithb)
  2423.            
  2424.             (objects_detach wship ghosta)
  2425.             (objects_detach wship ghostb)
  2426.             (objects_detach wship ghostc)
  2427.             (objects_detach wship ghostd)
  2428.            
  2429.            
  2430.             (ai_attack 2_loadingbay)
  2431.             (sleep_until (= 0 (recording_time wship)) 5)
  2432.            
  2433.                 (object_destroy wship)
  2434.                
  2435.                
  2436.             (sleep 15)
  2437.         )
  2438.     )
  2439.    
  2440.     (if (= 2 tempint)
  2441.         (begin
  2442.             (object_teleport wship 2_loading)
  2443.             (recording_play wship 2_loading2)
  2444.            
  2445.            
  2446.            
  2447.             (sleep_until (> 880 (recording_time wship)) 5)
  2448.             (unit_open wg)
  2449.             (sleep 30)
  2450.             (ai_braindead 2_loadingbay 0)
  2451.             (vehicle_unload wg "")
  2452.            
  2453.             (objects_detach wship wraitha)
  2454.             (objects_detach wship wraithb)
  2455.            
  2456.             (objects_detach wship ghosta)
  2457.             (objects_detach wship ghostb)
  2458.             (objects_detach wship ghostc)
  2459.             (objects_detach wship ghostd)
  2460.            
  2461.             (ai_attack 2_loadingbay)
  2462.             (sleep_until (= 0 (recording_time wship)) 5)
  2463.            
  2464.                 (object_destroy wship)
  2465.                
  2466.                
  2467.             (sleep 15)
  2468.         )
  2469.     )
  2470.                    
  2471. )
  2472.  
  2473. (script continuous sp_2chronoparking
  2474.  
  2475.     (sleep -1)
  2476.        
  2477.                 (object_destroy xCR)
  2478.                 (object_destroy xCL)
  2479.                 (object_destroy xship)
  2480.                
  2481.                 (object_create xship)
  2482.                 (object_create xcr)
  2483.                 (object_create xcl)
  2484.                 (object_create xtr)
  2485.                 (object_create xtl)
  2486.                 (object_create xg)
  2487.                 (unit_close xtr)
  2488.                 (unit_close xtl)
  2489.                 (unit_close xg)
  2490.                
  2491.                 (objects_attach xship "gravlift" xg "")
  2492.                 (objects_attach xship "troop_door_right" xtr "")
  2493.                 (objects_attach xship "troop_door_left" xtl "")
  2494.                 (objects_attach xship "turret_door_left" xcr "")
  2495.                 (objects_attach xship "turret_door_right" xcl "")
  2496.                
  2497.     (set softlock 1)
  2498.    
  2499.     (spawn_ai)
  2500.     (sleep_until (= 0 softlock) 5)
  2501.     (set spawn_mode 0)
  2502.    
  2503.    
  2504.    
  2505.  
  2506.    
  2507.     (cond
  2508.                     ((= 0 vehicle_id)
  2509.                         (sleep 1)
  2510.                     )
  2511.                     ((= 1 vehicle_id)
  2512.                         (begin
  2513.                             (set softlock 1)
  2514.                             (spawn_ghost)
  2515.                             (sleep_until (= 0 softlock) 5)
  2516.                             (objects_attach xship "small_cargo01" GHOST "" )
  2517.                             (ai_migrate driver/ghost 2_chronoghosts)
  2518.                             (set softlock 1)
  2519.                             (spawn_ghost)
  2520.                             (sleep_until (= 0 softlock) 5)
  2521.                             (objects_attach xship "small_cargo02" GHOST "")
  2522.                             (ai_migrate driver/ghost 2_chronoghosts)
  2523.                             (set vehicle_id 0)
  2524.                         )
  2525.                     )
  2526.                     ((= 2 vehicle_id)  
  2527.                         (begin
  2528.                             (set softlock 1)
  2529.                             (spawn_wraith)
  2530.                             (sleep_until (= 0 softlock) 5)
  2531.                             (objects_attach xship "large_cargo" WRAITH "" )
  2532.                             (ai_migrate driver/ghost 2_chronoghosts)
  2533.                             (set vehicle_id 0)
  2534.                         )
  2535.                     )
  2536.     )
  2537.    
  2538.    
  2539.    
  2540.    
  2541.    
  2542.     (vehicle_load_magic xg "" (ai_actors cspawn))
  2543.     (ai_braindead cspawn 1)
  2544.     (ai_migrate cspawn 2_chronoparking)
  2545.     (set spawning 0)
  2546.    
  2547.     (set tempint (random_range 1 3))
  2548.    
  2549.     (if (= 1 tempint)
  2550.         (begin
  2551.             (object_teleport xship 2_chronoa)
  2552.             (recording_play xship 2_chronoa1)
  2553.            
  2554.            
  2555.            
  2556.             (sleep_until (> 1060 (recording_time xship)) 5)
  2557.             (unit_open xg)
  2558.             (sleep 30)
  2559.             (ai_braindead 2_chronoparking 0)
  2560.             (vehicle_unload xg "")
  2561.            
  2562.             (objects_detach xship wraitha)
  2563.             (objects_detach xship wraithb)
  2564.            
  2565.             (objects_detach xship ghosta)
  2566.             (objects_detach xship ghostb)
  2567.             (objects_detach xship ghostc)
  2568.             (objects_detach xship ghostd)
  2569.            
  2570.            
  2571.             (ai_attack 2_chronoparking)
  2572.             (sleep_until (= 0 (recording_time xship)) 5)
  2573.            
  2574.                 (object_destroy xship)
  2575.                
  2576.                
  2577.             (sleep 15)
  2578.         )
  2579.     )
  2580.    
  2581.     (if (= 2 tempint)
  2582.         (begin
  2583.             (object_teleport xship 2_chronoa)
  2584.             (recording_play xship 2_chronoa2)
  2585.            
  2586.            
  2587.            
  2588.             (sleep_until (> 1005 (recording_time xship)) 5)
  2589.             (unit_open xg)
  2590.             (sleep 30)
  2591.             (ai_braindead 2_chronoparking 0)
  2592.             (vehicle_unload xg "")
  2593.            
  2594.             (objects_detach xship wraitha)
  2595.             (objects_detach xship wraithb)
  2596.            
  2597.             (objects_detach xship ghosta)
  2598.             (objects_detach xship ghostb)
  2599.             (objects_detach xship ghostc)
  2600.             (objects_detach xship ghostd)
  2601.            
  2602.             (ai_attack 2_chronoparking)
  2603.             (sleep_until (= 0 (recording_time xship)) 5)
  2604.            
  2605.                 (object_destroy xship)
  2606.                
  2607.                
  2608.             (sleep 15)
  2609.         )
  2610.     )
  2611.                    
  2612. )
  2613.  
  2614. (script continuous sp_2chronorear
  2615.  
  2616.     (sleep -1)
  2617.        
  2618.                 (object_destroy yCR)
  2619.                 (object_destroy yCL)
  2620.                 (object_destroy yship)
  2621.                
  2622.                 (object_create yship)
  2623.                 (object_create ycr)
  2624.                 (object_create ycl)
  2625.                 (object_create ytr)
  2626.                 (object_create ytl)
  2627.                 (object_create yg)
  2628.                 (unit_close ytr)
  2629.                 (unit_close ytl)
  2630.                 (unit_close yg)
  2631.                
  2632.                 (objects_attach yship "gravlift" yg "")
  2633.                 (objects_attach yship "troop_door_right" ytr "")
  2634.                 (objects_attach yship "troop_door_left" ytl "")
  2635.                 (objects_attach yship "turret_door_left" ycr "")
  2636.                 (objects_attach yship "turret_door_right" ycl "")
  2637.                
  2638.     (set softlock 1)
  2639.    
  2640.     (spawn_ai)
  2641.     (sleep_until (= 0 softlock) 5)
  2642.     (set spawn_mode 0)
  2643.    
  2644.    
  2645.    
  2646.  
  2647.    
  2648.     (cond
  2649.                     ((= 0 vehicle_id)
  2650.                         (sleep 1)
  2651.                     )
  2652.                     ((= 1 vehicle_id)
  2653.                         (begin
  2654.                             (set softlock 1)
  2655.                             (spawn_ghost)
  2656.                             (sleep_until (= 0 softlock) 5)
  2657.                             (objects_attach yship "small_cargo01" GHOST "" )
  2658.                             (ai_migrate driver/ghost 2_chronoghosts)
  2659.                             (set softlock 1)
  2660.                             (spawn_ghost)
  2661.                             (sleep_until (= 0 softlock) 5)
  2662.                             (objects_attach yship "small_cargo02" GHOST "")
  2663.                             (ai_migrate driver/ghost 2_chronoghosts)
  2664.                             (set vehicle_id 0)
  2665.                         )
  2666.                     )
  2667.                     ((= 2 vehicle_id)  
  2668.                         (begin
  2669.                             (set softlock 1)
  2670.                             (spawn_wraith)
  2671.                             (sleep_until (= 0 softlock) 5)
  2672.                             (objects_attach yship "large_cargo" WRAITH "" )
  2673.                             (ai_migrate driver/ghost 2_chronoghosts)
  2674.                             (set vehicle_id 0)
  2675.                         )
  2676.                     )
  2677.     )
  2678.    
  2679.    
  2680.    
  2681.    
  2682.    
  2683.     (vehicle_load_magic yg "" (ai_actors cspawn))
  2684.     (ai_braindead cspawn 1)
  2685.     (ai_migrate cspawn 2_chronorear)
  2686.     (set spawning 0)
  2687.    
  2688.     (set tempint (random_range 1 3))
  2689.    
  2690.     (if (= 1 tempint)
  2691.         (begin
  2692.             (object_teleport yship 2_chronob)
  2693.             (recording_play yship 2_chronob1)
  2694.            
  2695.            
  2696.            
  2697.             (sleep_until (> 1305 (recording_time yship)) 5)
  2698.             (unit_open yg)
  2699.             (sleep 30)
  2700.             (ai_braindead 2_chronorear 0)
  2701.             (vehicle_unload yg "")
  2702.            
  2703.             (objects_detach yship wraitha)
  2704.             (objects_detach yship wraithb)
  2705.            
  2706.             (objects_detach yship ghosta)
  2707.             (objects_detach yship ghostb)
  2708.             (objects_detach yship ghostc)
  2709.             (objects_detach yship ghostd)
  2710.            
  2711.            
  2712.             (ai_attack 2_chronorear)
  2713.             (sleep_until (= 0 (recording_time yship)) 5)
  2714.            
  2715.                 (object_destroy yship)
  2716.                
  2717.                
  2718.             (sleep 15)
  2719.         )
  2720.     )
  2721.    
  2722.     (if (= 2 tempint)
  2723.         (begin
  2724.             (object_teleport yship 2_chronob)
  2725.             (recording_play yship 2_chronob2)
  2726.            
  2727.            
  2728.            
  2729.             (sleep_until (> 980 (recording_time yship)) 5)
  2730.             (unit_open yg)
  2731.             (sleep 30)
  2732.             (ai_braindead 2_chronorear 0)
  2733.             (vehicle_unload yg "")
  2734.            
  2735.             (objects_detach yship wraitha)
  2736.             (objects_detach yship wraithb)
  2737.            
  2738.             (objects_detach yship ghosta)
  2739.             (objects_detach yship ghostb)
  2740.             (objects_detach yship ghostc)
  2741.             (objects_detach yship ghostd)
  2742.            
  2743.             (ai_attack 2_chronorear)
  2744.             (sleep_until (= 0 (recording_time yship)) 5)
  2745.            
  2746.                 (object_destroy yship)
  2747.                
  2748.                
  2749.             (sleep 15)
  2750.         )
  2751.     )
  2752.                    
  2753. )
  2754. ;;;;;
  2755.  
  2756. ;;;;
  2757.  
  2758. ;; BSP 3
  2759.  
  2760. ;;;;;;
  2761.  
  2762. ;;;;;
  2763.  
  2764. (script continuous sp_3front
  2765.  
  2766.     (sleep -1)
  2767.        
  2768.                 (object_destroy xCR)
  2769.                 (object_destroy xCL)
  2770.                 (object_destroy xship)
  2771.                
  2772.                 (object_create xship)
  2773.                 (object_create xcr)
  2774.                 (object_create xcl)
  2775.                 (object_create xtr)
  2776.                 (object_create xtl)
  2777.                 (object_create xg)
  2778.                 (unit_close xtr)
  2779.                 (unit_close xtl)
  2780.                 (unit_close xg)
  2781.                
  2782.                 (objects_attach xship "gravlift" xg "")
  2783.                 (objects_attach xship "troop_door_right" xtr "")
  2784.                 (objects_attach xship "troop_door_left" xtl "")
  2785.                 (objects_attach xship "turret_door_left" xcr "")
  2786.                 (objects_attach xship "turret_door_right" xcl "")
  2787.                
  2788.     (set softlock 1)
  2789.    
  2790.     (spawn_ai)
  2791.     (sleep_until (= 0 softlock) 5)
  2792.     (set spawn_mode 0)
  2793.    
  2794.    
  2795.    
  2796.  
  2797.    
  2798.     (cond
  2799.                     ((= 0 vehicle_id)
  2800.                         (sleep 1)
  2801.                     )
  2802.                     ((= 1 vehicle_id)
  2803.                         (begin
  2804.                             (set softlock 1)
  2805.                             (spawn_ghost)
  2806.                             (sleep_until (= 0 softlock) 5)
  2807.                             (objects_attach xship "small_cargo01" GHOST "" )
  2808.                             (ai_migrate driver/ghost 3_ghost)
  2809.                             (set softlock 1)
  2810.                             (spawn_ghost)
  2811.                             (sleep_until (= 0 softlock) 5)
  2812.                             (objects_attach xship "small_cargo02" GHOST "")
  2813.                             (ai_migrate driver/ghost 3_ghost)
  2814.                             (set vehicle_id 0)
  2815.                         )
  2816.                     )
  2817.                     ((= 2 vehicle_id)  
  2818.                         (begin
  2819.                             (set softlock 1)
  2820.                             (spawn_wraith)
  2821.                             (sleep_until (= 0 softlock) 5)
  2822.                             (objects_attach xship "large_cargo" WRAITH "" )
  2823.                             (ai_migrate driver/ghost 3_ghost)
  2824.                             (set vehicle_id 0)
  2825.                         )
  2826.                     )
  2827.     )
  2828.    
  2829.    
  2830.    
  2831.    
  2832.    
  2833.     (vehicle_load_magic xg "" (ai_actors cspawn))
  2834.     (ai_braindead cspawn 1)
  2835.     (ai_migrate cspawn 3_front)
  2836.     (set spawning 0)
  2837.    
  2838.     (set tempint (random_range 1 6))
  2839.    
  2840.     (if (= 1 tempint)
  2841.         (begin
  2842.             (object_teleport xship 3_frontA)
  2843.             (recording_play xship 3_frontA1)
  2844.            
  2845.            
  2846.            
  2847.             (sleep_until (> 930 (recording_time xship)) 5)
  2848.             (unit_open xg)
  2849.             (sleep 30)
  2850.             (ai_braindead 3_front 0)
  2851.             (vehicle_unload xg "")
  2852.            
  2853.             (objects_detach xship wraitha)
  2854.             (objects_detach xship wraithb)
  2855.            
  2856.             (objects_detach xship ghosta)
  2857.             (objects_detach xship ghostb)
  2858.             (objects_detach xship ghostc)
  2859.             (objects_detach xship ghostd)
  2860.            
  2861.            
  2862.             (ai_attack 3_front)
  2863.             (sleep_until (= 0 (recording_time xship)) 5)
  2864.            
  2865.                 (object_destroy xship)
  2866.                
  2867.                
  2868.             (sleep 15)
  2869.         )
  2870.     )
  2871.    
  2872.     (if (= 2 tempint)
  2873.         (begin
  2874.             (object_teleport xship 3_fronta)
  2875.             (recording_play xship 3_fronta2)
  2876.            
  2877.            
  2878.            
  2879.             (sleep_until (> 760 (recording_time xship)) 5)
  2880.             (unit_open xg)
  2881.             (sleep 30)
  2882.             (ai_braindead 3_front 0)
  2883.             (vehicle_unload xg "")
  2884.            
  2885.             (objects_detach xship wraitha)
  2886.             (objects_detach xship wraithb)
  2887.            
  2888.             (objects_detach xship ghosta)
  2889.             (objects_detach xship ghostb)
  2890.             (objects_detach xship ghostc)
  2891.             (objects_detach xship ghostd)
  2892.            
  2893.             (ai_attack 3_front)
  2894.             (sleep_until (= 0 (recording_time xship)) 5)
  2895.            
  2896.                 (object_destroy xship)
  2897.                
  2898.                
  2899.             (sleep 15)
  2900.         )
  2901.     )
  2902.    
  2903.     (if (= 3 tempint)
  2904.         (begin
  2905.             (object_teleport xship 3_fronta3)
  2906.             (recording_play xship 3_fronta3)
  2907.            
  2908.            
  2909.            
  2910.             (sleep_until (> 740 (recording_time xship)) 5)
  2911.             (unit_open xg)
  2912.             (sleep 30)
  2913.             (ai_braindead 3_front 0)
  2914.             (vehicle_unload xg "")
  2915.            
  2916.             (objects_detach xship wraitha)
  2917.             (objects_detach xship wraithb)
  2918.            
  2919.             (objects_detach xship ghosta)
  2920.             (objects_detach xship ghostb)
  2921.             (objects_detach xship ghostc)
  2922.             (objects_detach xship ghostd)
  2923.            
  2924.             (ai_attack 3_front)
  2925.             (sleep_until (= 0 (recording_time xship)) 5)
  2926.            
  2927.                 (object_destroy xship)
  2928.                
  2929.                
  2930.             (sleep 15)
  2931.         )
  2932.     )
  2933.    
  2934.     (if (= 4 tempint)
  2935.         (begin
  2936.             (object_teleport xship 3_frontb)
  2937.             (recording_play xship 3_frontb1)
  2938.            
  2939.            
  2940.            
  2941.             (sleep_until (> 910 (recording_time xship)) 5)
  2942.             (unit_open xg)
  2943.             (sleep 30)
  2944.             (ai_braindead 3_front 0)
  2945.             (vehicle_unload xg "")
  2946.            
  2947.             (objects_detach xship wraitha)
  2948.             (objects_detach xship wraithb)
  2949.            
  2950.             (objects_detach xship ghosta)
  2951.             (objects_detach xship ghostb)
  2952.             (objects_detach xship ghostc)
  2953.             (objects_detach xship ghostd)
  2954.            
  2955.             (ai_attack 3_front)
  2956.             (sleep_until (= 0 (recording_time xship)) 5)
  2957.            
  2958.                 (object_destroy xship)
  2959.                
  2960.                
  2961.             (sleep 15)
  2962.         )
  2963.     )
  2964.    
  2965.     (if (= 5 tempint)
  2966.         (begin
  2967.             (object_teleport xship 3_frontb)
  2968.             (recording_play xship 3_frontb2)
  2969.            
  2970.            
  2971.            
  2972.             (sleep_until (> 860 (recording_time xship)) 5)
  2973.             (unit_open xg)
  2974.             (sleep 30)
  2975.             (ai_braindead 3_front 0)
  2976.             (vehicle_unload xg "")
  2977.            
  2978.             (objects_detach xship wraitha)
  2979.             (objects_detach xship wraithb)
  2980.            
  2981.             (objects_detach xship ghosta)
  2982.             (objects_detach xship ghostb)
  2983.             (objects_detach xship ghostc)
  2984.             (objects_detach xship ghostd)
  2985.            
  2986.             (ai_attack 3_front)
  2987.             (sleep_until (= 0 (recording_time xship)) 5)
  2988.            
  2989.                 (object_destroy xship)
  2990.                
  2991.                
  2992.             (sleep 15)
  2993.         )
  2994.     )
  2995.    
  2996.                    
  2997. )
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007. (script continuous sp_3back
  3008.  
  3009.     (sleep -1)
  3010.        
  3011.                 (object_destroy yCR)
  3012.                 (object_destroy yCL)
  3013.                 (object_destroy yship)
  3014.                
  3015.                 (object_create yship)
  3016.                 (object_create yCR)
  3017.                 (object_create yCL)
  3018.                 (object_create ytr)
  3019.                 (object_create ytl)
  3020.                 (object_create yg)
  3021.                 (unit_close ytr)
  3022.                 (unit_close ytl)
  3023.                 (unit_close yg)
  3024.                
  3025.                 (objects_attach yship "gravlift" yg "")
  3026.                 (objects_attach yship "troop_door_right" ytr "")
  3027.                 (objects_attach yship "troop_door_left" ytl "")
  3028.                 (objects_attach yship "turret_door_left" yCR "")
  3029.                 (objects_attach yship "turret_door_right" yCL "")
  3030.                
  3031.     (set softlock 1)
  3032.    
  3033.     (spawn_ai)
  3034.     (sleep_until (= 0 softlock) 5)
  3035.     (set spawn_mode 0)
  3036.    
  3037.    
  3038.    
  3039.  
  3040.    
  3041.     (cond
  3042.                     ((= 0 vehicle_id)
  3043.                         (sleep 1)
  3044.                     )
  3045.                     ((= 1 vehicle_id)
  3046.                         (begin
  3047.                             (set softlock 1)
  3048.                             (spawn_ghost)
  3049.                             (sleep_until (= 0 softlock) 5)
  3050.                             (objects_attach yship "small_cargo01" GHOST "" )
  3051.                             (ai_migrate driver/ghost 3_ghost)
  3052.                             (set softlock 1)
  3053.                             (spawn_ghost)
  3054.                             (sleep_until (= 0 softlock) 5)
  3055.                             (objects_attach yship "small_cargo02" GHOST "")
  3056.                             (ai_migrate driver/ghost 3_ghost)
  3057.                             (set vehicle_id 0)
  3058.                         )
  3059.                     )
  3060.                     ((= 2 vehicle_id)  
  3061.                         (begin
  3062.                             (set softlock 1)
  3063.                             (spawn_wraith)
  3064.                             (sleep_until (= 0 softlock) 5)
  3065.                             (objects_attach yship "large_cargo" WRAITH "" )
  3066.                             (ai_migrate driver/ghost 3_ghost)
  3067.                             (set vehicle_id 0)
  3068.                         )
  3069.                     )
  3070.     )
  3071.    
  3072.    
  3073.    
  3074.    
  3075.    
  3076.     (vehicle_load_magic yg "" (ai_actors cspawn))
  3077.     (ai_braindead cspawn 1)
  3078.     (ai_migrate cspawn 3_back)
  3079.     (set spawning 0)
  3080.    
  3081.     (set tempint (random_range 1 4))
  3082.    
  3083.     (if (= 1 tempint)
  3084.         (begin
  3085.             (object_teleport yship 3_backA)
  3086.             (recording_play yship 3_backA1)
  3087.            
  3088.            
  3089.            
  3090.             (sleep_until (> 790 (recording_time yship)) 5)
  3091.             (unit_open yg)
  3092.             (sleep 30)
  3093.             (ai_braindead 3_back 0)
  3094.             (vehicle_unload yg "")
  3095.            
  3096.             (objects_detach yship wraitha)
  3097.             (objects_detach yship wraithb)
  3098.            
  3099.             (objects_detach yship ghosta)
  3100.             (objects_detach yship ghostb)
  3101.             (objects_detach yship ghostc)
  3102.             (objects_detach yship ghostd)
  3103.            
  3104.            
  3105.             (ai_attack 3_back)
  3106.             (sleep_until (= 0 (recording_time yship)) 5)
  3107.            
  3108.                 (object_destroy yship)
  3109.                
  3110.                
  3111.             (sleep 15)
  3112.         )
  3113.     )
  3114.    
  3115.     (if (= 2 tempint)
  3116.         (begin
  3117.             (object_teleport yship 3_backa2)
  3118.             (recording_play yship 3_backa2)
  3119.            
  3120.            
  3121.            
  3122.             (sleep_until (> 765 (recording_time yship)) 5)
  3123.             (unit_open yg)
  3124.             (sleep 30)
  3125.             (ai_braindead 3_back 0)
  3126.             (vehicle_unload yg "")
  3127.            
  3128.             (objects_detach yship wraitha)
  3129.             (objects_detach yship wraithb)
  3130.            
  3131.             (objects_detach yship ghosta)
  3132.             (objects_detach yship ghostb)
  3133.             (objects_detach yship ghostc)
  3134.             (objects_detach yship ghostd)
  3135.            
  3136.             (ai_attack 3_back)
  3137.             (sleep_until (= 0 (recording_time yship)) 5)
  3138.            
  3139.                 (object_destroy yship)
  3140.                
  3141.                
  3142.             (sleep 15)
  3143.         )
  3144.     )
  3145.    
  3146.     (if (= 3 tempint)
  3147.         (begin
  3148.             (object_teleport yship 3_backa2)
  3149.             (recording_play yship 3_backa3)
  3150.            
  3151.            
  3152.            
  3153.             (sleep_until (> 1025 (recording_time yship)) 5)
  3154.             (unit_open yg)
  3155.             (sleep 30)
  3156.             (ai_braindead 3_back 0)
  3157.             (vehicle_unload yg "")
  3158.            
  3159.             (objects_detach yship wraitha)
  3160.             (objects_detach yship wraithb)
  3161.            
  3162.             (objects_detach yship ghosta)
  3163.             (objects_detach yship ghostb)
  3164.             (objects_detach yship ghostc)
  3165.             (objects_detach yship ghostd)
  3166.            
  3167.             (ai_attack 3_back)
  3168.             (sleep_until (= 0 (recording_time yship)) 5)
  3169.            
  3170.                 (object_destroy yship)
  3171.                
  3172.                
  3173.             (sleep 15)
  3174.         )
  3175.     )
  3176.    
  3177.    
  3178.                    
  3179. )
  3180. ;;;;;
  3181.  
  3182. ;;;;
  3183.  
  3184. ;; BSP 4
  3185.  
  3186. ;;;;;;
  3187.  
  3188. ;;;;;
  3189.  
  3190.  
  3191.  
  3192. (script continuous sp_4front
  3193.  
  3194.     (sleep -1)
  3195.        
  3196.    
  3197.                 (object_destroy UCR)
  3198.                 (object_destroy UCL)
  3199.                 (object_destroy uship)
  3200.                
  3201.                 (object_create uship)
  3202.                 (object_create ucr)
  3203.                 (object_create ucl)
  3204.                 (object_create utr)
  3205.                 (object_create utl)
  3206.                 (object_create ug)
  3207.                 (unit_close utr)
  3208.                 (unit_close utl)
  3209.                 (unit_close ug)
  3210.                
  3211.                 (objects_attach uship "gravlift" ug "")
  3212.                 (objects_attach uship "troop_door_right" utr "")
  3213.                 (objects_attach uship "troop_door_left" utl "")
  3214.                 (objects_attach uship "turret_door_left" ucr "")
  3215.                 (objects_attach uship "turret_door_right" ucl "")
  3216.  
  3217.    
  3218.    
  3219.     (spawn_ai)
  3220.     (sleep_until (= 0 softlock) 5)
  3221.     (set spawn_mode 0)
  3222.        
  3223.     (cond
  3224.                     ((= 0 vehicle_id)
  3225.                         (sleep 1)
  3226.                     )
  3227.                     ((= 1 vehicle_id)
  3228.                         (begin
  3229.                             (set softlock 1)
  3230.                             (spawn_ghost)
  3231.                             (sleep_until (= 0 softlock) 5)
  3232.                             (objects_attach uship "small_cargo01" GHOST "" )
  3233.                             (set softlock 1)
  3234.                             (spawn_ghost)
  3235.                             (sleep_until (= 0 softlock) 5)
  3236.                             (objects_attach uship "small_cargo02" GHOST "")
  3237.                             (set vehicle_id 0)
  3238.                             (ai_migrate driver/ghost 4_bridgeghost)
  3239.                         )
  3240.                     )
  3241.                     ((= 2 vehicle_id)  
  3242.                         (begin
  3243.                             (set softlock 1)
  3244.                             (spawn_wraith)
  3245.                             (sleep_until (= 0 softlock) 5)
  3246.                             (objects_attach uship "large_cargo" WRAITH "" )
  3247.                             (ai_migrate driver/ghost 4_bridgeghost)
  3248.                             (set vehicle_id 0)
  3249.                         )
  3250.                     )
  3251.     )
  3252.    
  3253.    
  3254.    
  3255.    
  3256.    
  3257.     (vehicle_load_magic ug "" (ai_actors cspawn))
  3258.     (ai_braindead cspawn 1)
  3259.     (ai_migrate cspawn 4_front)
  3260.     (set spawning 0)
  3261.    
  3262.    
  3263.     (set tempint (random_range 1 3))
  3264.    
  3265.     (if (= 1 tempint)
  3266.         (begin
  3267.             (object_teleport uship 4_cityscapeC)
  3268.             (recording_play uship 4_cityscapeC1)
  3269.            
  3270.            
  3271.            
  3272.             (sleep_until (> 965 (recording_time uship)) 5)
  3273.             (unit_open ug)
  3274.             (sleep 30)
  3275.             (ai_braindead 4_front 0)
  3276.             (vehicle_unload ug "")
  3277.            
  3278.             (objects_detach uship wraitha)
  3279.             (objects_detach uship wraithb)
  3280.            
  3281.             (objects_detach uship ghosta)
  3282.             (objects_detach uship ghostb)
  3283.             (objects_detach uship ghostc)
  3284.             (objects_detach uship ghostd)
  3285.            
  3286.             (ai_attack 4_front)
  3287.             (sleep_until (= 0 (recording_time uship)) 5)
  3288.            
  3289.                 (object_destroy uship)
  3290.                
  3291.                
  3292.             (sleep 15)
  3293.         )
  3294.     )
  3295.    
  3296.     (if (= 2 tempint)
  3297.         (begin
  3298.             (object_teleport uship 4_cityscapeC2)
  3299.             (recording_play uship 4_cityscapeC2)
  3300.            
  3301.            
  3302.            
  3303.             (sleep_until (> 975 (recording_time uship)) 5)
  3304.             (unit_open ug)
  3305.             (sleep 30)
  3306.             (ai_braindead 4_front 0)
  3307.             (vehicle_unload ug "")
  3308.            
  3309.             (objects_detach uship wraitha)
  3310.             (objects_detach uship wraithb)
  3311.            
  3312.             (objects_detach uship ghosta)
  3313.             (objects_detach uship ghostb)
  3314.             (objects_detach uship ghostc)
  3315.             (objects_detach uship ghostd)
  3316.            
  3317.             (ai_attack 4_front)
  3318.             (sleep_until (= 0 (recording_time uship)) 5)
  3319.            
  3320.                 (object_destroy uship)
  3321.                
  3322.                
  3323.             (sleep 15)
  3324.         )
  3325.     )
  3326.    
  3327.                    
  3328. )
  3329.  
  3330.  
  3331.  
  3332. (script continuous sp_4mid
  3333.  
  3334.     (sleep -1)
  3335.        
  3336.    
  3337.                 (object_destroy vcr)
  3338.                 (object_destroy vcl)
  3339.                 (object_destroy vship)
  3340.                
  3341.                 (object_create vship)
  3342.                 (object_create vcr)
  3343.                 (object_create vcl)
  3344.                 (object_create vtr)
  3345.                 (object_create vtl)
  3346.                 (object_create vg)
  3347.                 (unit_close vtr)
  3348.                 (unit_close vtl)
  3349.                 (unit_close vg)
  3350.                
  3351.                 (objects_attach vship "gravlift" vg "")
  3352.                 (objects_attach vship "troop_door_right" vtr "")
  3353.                 (objects_attach vship "troop_door_left" vtl "")
  3354.                 (objects_attach vship "turret_door_left" vcr "")
  3355.                 (objects_attach vship "turret_door_right" vcl "")
  3356.  
  3357.    
  3358.    
  3359.     (spawn_ai)
  3360.     (sleep_until (= 0 softlock) 5)
  3361.     (set spawn_mode 0)
  3362.        
  3363.     (cond
  3364.                     ((= 0 vehicle_id)
  3365.                         (sleep 1)
  3366.                     )
  3367.                     ((= 1 vehicle_id)
  3368.                         (begin
  3369.                             (set softlock 1)
  3370.                             (spawn_ghost)
  3371.                             (sleep_until (= 0 softlock) 5)
  3372.                             (objects_attach vship "small_cargo01" GHOST "" )
  3373.                             (set softlock 1)
  3374.                             (spawn_ghost)
  3375.                             (sleep_until (= 0 softlock) 5)
  3376.                             (objects_attach vship "small_cargo02" GHOST "")
  3377.                             (set vehicle_id 0)
  3378.                             (ai_migrate driver/ghost 4_bridgeghost)
  3379.                         )
  3380.                     )
  3381.                     ((= 2 vehicle_id)  
  3382.                         (begin
  3383.                             (set softlock 1)
  3384.                             (spawn_wraith)
  3385.                             (sleep_until (= 0 softlock) 5)
  3386.                             (objects_attach vship "large_cargo" WRAITH "" )
  3387.                             (ai_migrate driver/ghost 4_bridgeghost)
  3388.                             (set vehicle_id 0)
  3389.                         )
  3390.                     )
  3391.     )
  3392.    
  3393.    
  3394.    
  3395.    
  3396.    
  3397.     (vehicle_load_magic vg "" (ai_actors cspawn))
  3398.     (ai_braindead cspawn 1)
  3399.     (ai_migrate cspawn 4_mid)
  3400.     (set spawning 0)
  3401.    
  3402.    
  3403.     (set tempint (random_range 1 3))
  3404.    
  3405.     (if (= 1 tempint)
  3406.         (begin
  3407.             (object_teleport vship 4_bridgeA)
  3408.             (recording_play vship 4_bridge1)
  3409.            
  3410.            
  3411.            
  3412.             (sleep_until (> 965 (recording_time vship)) 5)
  3413.             (unit_open vg)
  3414.             (sleep 30)
  3415.             (ai_braindead 4_mid 0)
  3416.             (vehicle_unload vg "")
  3417.            
  3418.             (objects_detach vship wraitha)
  3419.             (objects_detach vship wraithb)
  3420.            
  3421.             (objects_detach vship ghosta)
  3422.             (objects_detach vship ghostb)
  3423.             (objects_detach vship ghostc)
  3424.             (objects_detach vship ghostd)
  3425.            
  3426.             (ai_attack 4_mid)
  3427.             (sleep_until (= 0 (recording_time vship)) 5)
  3428.            
  3429.                 (object_destroy vship)
  3430.                
  3431.                
  3432.             (sleep 15)
  3433.         )
  3434.     )
  3435.    
  3436.     (if (= 2 tempint)
  3437.         (begin
  3438.             (object_teleport vship 4_bridgeB)
  3439.             (recording_play vship 4_bridge2)
  3440.            
  3441.            
  3442.            
  3443.             (sleep_until (> 1200 (recording_time vship)) 5)
  3444.             (unit_open vg)
  3445.             (sleep 30)
  3446.             (ai_braindead 4_mid 0)
  3447.             (vehicle_unload vg "")
  3448.            
  3449.             (objects_detach vship wraitha)
  3450.             (objects_detach vship wraithb)
  3451.            
  3452.             (objects_detach vship ghosta)
  3453.             (objects_detach vship ghostb)
  3454.             (objects_detach vship ghostc)
  3455.             (objects_detach vship ghostd)
  3456.            
  3457.             (ai_attack 4_mid)
  3458.             (sleep_until (= 0 (recording_time vship)) 5)
  3459.            
  3460.                 (object_destroy vship)
  3461.                
  3462.                
  3463.             (sleep 15)
  3464.         )
  3465.     )
  3466.    
  3467.                    
  3468. )
  3469.  
  3470.  
  3471.  
  3472. (script continuous sp_4back
  3473.  
  3474.     (sleep -1)
  3475.        
  3476.    
  3477.                 (object_destroy wcr)
  3478.                 (object_destroy wcl)
  3479.                 (object_destroy wship)
  3480.                
  3481.                 (object_create wship)
  3482.                 (object_create wcr)
  3483.                 (object_create wcl)
  3484.                 (object_create wtr)
  3485.                 (object_create wtl)
  3486.                 (object_create wg)
  3487.                 (unit_close wtr)
  3488.                 (unit_close wtl)
  3489.                 (unit_close wg)
  3490.                
  3491.                 (objects_attach wship "gravlift" wg "")
  3492.                 (objects_attach wship "troop_door_right" wtr "")
  3493.                 (objects_attach wship "troop_door_left" wtl "")
  3494.                 (objects_attach wship "turret_door_left" wcr "")
  3495.                 (objects_attach wship "turret_door_right" wcl "")
  3496.  
  3497.    
  3498.    
  3499.     (spawn_ai)
  3500.     (sleep_until (= 0 softlock) 5)
  3501.     (set spawn_mode 0)
  3502.        
  3503.     (cond
  3504.                     ((= 0 vehicle_id)
  3505.                         (sleep 1)
  3506.                     )
  3507.                     ((= 1 vehicle_id)
  3508.                         (begin
  3509.                             (set softlock 1)
  3510.                             (spawn_ghost)
  3511.                             (sleep_until (= 0 softlock) 5)
  3512.                             (objects_attach wship "small_cargo01" GHOST "" )
  3513.                             (set softlock 1)
  3514.                             (spawn_ghost)
  3515.                             (sleep_until (= 0 softlock) 5)
  3516.                             (objects_attach wship "small_cargo02" GHOST "")
  3517.                             (set vehicle_id 0)
  3518.                             (ai_migrate driver/ghost 4_bridgeghost)
  3519.                         )
  3520.                     )
  3521.                     ((= 2 vehicle_id)  
  3522.                         (begin
  3523.                             (set softlock 1)
  3524.                             (spawn_wraith)
  3525.                             (sleep_until (= 0 softlock) 5)
  3526.                             (objects_attach wship "large_cargo" WRAITH "" )
  3527.                             (ai_migrate driver/ghost 4_bridgeghost)
  3528.                             (set vehicle_id 0)
  3529.                         )
  3530.                     )
  3531.     )
  3532.    
  3533.    
  3534.    
  3535.    
  3536.    
  3537.     (vehicle_load_magic wg "" (ai_actors cspawn))
  3538.     (ai_braindead cspawn 1)
  3539.     (ai_migrate cspawn 4_back)
  3540.     (set spawning 0)
  3541.    
  3542.    
  3543.     (set tempint (random_range 1 3))
  3544.    
  3545.     (if (= 1 tempint)
  3546.         (begin
  3547.             (object_teleport wship 4_cityscapeA)
  3548.             (recording_play wship 4_cityscapeA4)
  3549.            
  3550.            
  3551.            
  3552.             (sleep_until (> 820 (recording_time wship)) 5)
  3553.             (unit_open wg)
  3554.             (sleep 30)
  3555.             (ai_braindead 4_back 0)
  3556.             (vehicle_unload wg "")
  3557.            
  3558.             (objects_detach wship wraitha)
  3559.             (objects_detach wship wraithb)
  3560.            
  3561.             (objects_detach wship ghosta)
  3562.             (objects_detach wship ghostb)
  3563.             (objects_detach wship ghostc)
  3564.             (objects_detach wship ghostd)
  3565.            
  3566.             (ai_attack 4_back)
  3567.             (sleep_until (= 0 (recording_time wship)) 5)
  3568.            
  3569.                 (object_destroy wship)
  3570.                
  3571.                
  3572.             (sleep 15)
  3573.         )
  3574.     )
  3575.    
  3576.     (if (= 2 tempint)
  3577.         (begin
  3578.             (object_teleport wship 4_cityscapeA)
  3579.             (recording_play wship 4_cityscapeA5)
  3580.            
  3581.            
  3582.            
  3583.             (sleep_until (> 950 (recording_time wship)) 5)
  3584.             (unit_open wg)
  3585.             (sleep 30)
  3586.             (ai_braindead 4_back 0)
  3587.             (vehicle_unload wg "")
  3588.            
  3589.             (objects_detach wship wraitha)
  3590.             (objects_detach wship wraithb)
  3591.            
  3592.             (objects_detach wship ghosta)
  3593.             (objects_detach wship ghostb)
  3594.             (objects_detach wship ghostc)
  3595.             (objects_detach wship ghostd)
  3596.            
  3597.             (ai_attack 4_back)
  3598.             (sleep_until (= 0 (recording_time wship)) 5)
  3599.            
  3600.                 (object_destroy wship)
  3601.                
  3602.                
  3603.             (sleep 15)
  3604.         )
  3605.     )
  3606.    
  3607.                    
  3608. )
  3609.  
  3610.  
  3611.  
  3612. (script continuous sp_4A
  3613.  
  3614.     (sleep -1)
  3615.        
  3616.    
  3617.                 (object_destroy xcr)
  3618.                 (object_destroy xcl)
  3619.                 (object_destroy xship)
  3620.                
  3621.                 (object_create xship)
  3622.                 (object_create xcr)
  3623.                 (object_create xcl)
  3624.                 (object_create xtr)
  3625.                 (object_create xtl)
  3626.                 (object_create xg)
  3627.                 (unit_close xtr)
  3628.                 (unit_close xtl)
  3629.                 (unit_close xg)
  3630.                
  3631.                 (objects_attach xship "gravlift" xg "")
  3632.                 (objects_attach xship "troop_door_right" xtr "")
  3633.                 (objects_attach xship "troop_door_left" xtl "")
  3634.                 (objects_attach xship "turret_door_left" xcr "")
  3635.                 (objects_attach xship "turret_door_right" xcl "")
  3636.  
  3637.    
  3638.    
  3639.     (spawn_ai)
  3640.     (sleep_until (= 0 softlock) 5)
  3641.     (set spawn_mode 0)
  3642.        
  3643.     (cond
  3644.                     ((= 0 vehicle_id)
  3645.                         (sleep 1)
  3646.                     )
  3647.                     ((= 1 vehicle_id)
  3648.                         (begin
  3649.                             (set softlock 1)
  3650.                             (spawn_ghost)
  3651.                             (sleep_until (= 0 softlock) 5)
  3652.                             (objects_attach xship "small_cargo01" GHOST "" )
  3653.                             (set softlock 1)
  3654.                             (spawn_ghost)
  3655.                             (sleep_until (= 0 softlock) 5)
  3656.                             (objects_attach xship "small_cargo02" GHOST "")
  3657.                             (set vehicle_id 0)
  3658.                             (ai_migrate driver/ghost 4_bridgeghost)
  3659.                         )
  3660.                     )
  3661.                     ((= 2 vehicle_id)  
  3662.                         (begin
  3663.                             (set softlock 1)
  3664.                             (spawn_wraith)
  3665.                             (sleep_until (= 0 softlock) 5)
  3666.                             (objects_attach xship "large_cargo" WRAITH "" )
  3667.                             (ai_migrate driver/ghost 4_bridgeghost)
  3668.                             (set vehicle_id 0)
  3669.                         )
  3670.                     )
  3671.     )
  3672.    
  3673.    
  3674.    
  3675.    
  3676.    
  3677.     (vehicle_load_magic xg "" (ai_actors cspawn))
  3678.     (ai_braindead cspawn 1)
  3679.     (ai_migrate cspawn 4_a)
  3680.     (set spawning 0)
  3681.    
  3682.    
  3683.     (set tempint (random_range 1 5))
  3684.    
  3685.     (if (= 1 tempint)
  3686.         (begin
  3687.             (object_teleport xship 4_cityscapeA)
  3688.             (recording_play xship 4_cityscapeA1)
  3689.            
  3690.            
  3691.            
  3692.             (sleep_until (> 1020 (recording_time xship)) 5)
  3693.             (unit_open xg)
  3694.             (sleep 30)
  3695.             (ai_braindead 4_a 0)
  3696.             (vehicle_unload xg "")
  3697.            
  3698.             (objects_detach xship wraitha)
  3699.             (objects_detach xship wraithb)
  3700.            
  3701.             (objects_detach xship ghosta)
  3702.             (objects_detach xship ghostb)
  3703.             (objects_detach xship ghostc)
  3704.             (objects_detach xship ghostd)
  3705.            
  3706.             (ai_attack 4_a)
  3707.             (sleep_until (= 0 (recording_time xship)) 5)
  3708.            
  3709.                 (object_destroy xship)
  3710.                
  3711.                
  3712.             (sleep 15)
  3713.         )
  3714.     )
  3715.    
  3716.     (if (= 2 tempint)
  3717.         (begin
  3718.             (object_teleport xship 4_cityscapeA2)
  3719.             (recording_play xship 4_cityscapeA2)
  3720.            
  3721.            
  3722.            
  3723.             (sleep_until (> 1050 (recording_time xship)) 5)
  3724.             (unit_open xg)
  3725.             (sleep 30)
  3726.             (ai_braindead 4_a 0)
  3727.             (vehicle_unload xg "")
  3728.            
  3729.             (objects_detach xship wraitha)
  3730.             (objects_detach xship wraithb)
  3731.            
  3732.             (objects_detach xship ghosta)
  3733.             (objects_detach xship ghostb)
  3734.             (objects_detach xship ghostc)
  3735.             (objects_detach xship ghostd)
  3736.            
  3737.             (ai_attack 4_a)
  3738.             (sleep_until (= 0 (recording_time xship)) 5)
  3739.            
  3740.                 (object_destroy xship)
  3741.                
  3742.                
  3743.             (sleep 15)
  3744.         )
  3745.     )
  3746.    
  3747.     (if (= 3 tempint)
  3748.         (begin
  3749.             (object_teleport xship 4_cityscapeA22)
  3750.             (recording_play xship 4_cityscapeA2)
  3751.            
  3752.            
  3753.            
  3754.             (sleep_until (> 1050 (recording_time xship)) 5)
  3755.             (unit_open xg)
  3756.             (sleep 30)
  3757.             (ai_braindead 4_a 0)
  3758.             (vehicle_unload xg "")
  3759.            
  3760.             (objects_detach xship wraitha)
  3761.             (objects_detach xship wraithb)
  3762.            
  3763.             (objects_detach xship ghosta)
  3764.             (objects_detach xship ghostb)
  3765.             (objects_detach xship ghostc)
  3766.             (objects_detach xship ghostd)
  3767.            
  3768.             (ai_attack 4_a)
  3769.             (sleep_until (= 0 (recording_time xship)) 5)
  3770.            
  3771.                 (object_destroy xship)
  3772.                
  3773.                
  3774.             (sleep 15)
  3775.         )
  3776.     )
  3777.    
  3778.     (if (= 4 tempint)
  3779.         (begin
  3780.             (object_teleport xship 4_cityscapeA2)
  3781.             (recording_play xship 4_cityscapeA3)
  3782.            
  3783.            
  3784.            
  3785.             (sleep_until (> 1010 (recording_time xship)) 5)
  3786.             (unit_open xg)
  3787.             (sleep 30)
  3788.             (ai_braindead 4_a 0)
  3789.             (vehicle_unload xg "")
  3790.            
  3791.             (objects_detach xship wraitha)
  3792.             (objects_detach xship wraithb)
  3793.            
  3794.             (objects_detach xship ghosta)
  3795.             (objects_detach xship ghostb)
  3796.             (objects_detach xship ghostc)
  3797.             (objects_detach xship ghostd)
  3798.            
  3799.             (ai_attack 4_a)
  3800.             (sleep_until (= 0 (recording_time xship)) 5)
  3801.            
  3802.                 (object_destroy xship)
  3803.                
  3804.                
  3805.             (sleep 15)
  3806.         )
  3807.     )
  3808.    
  3809.                    
  3810. )
  3811.  
  3812.  
  3813. (script continuous sp_4B
  3814.  
  3815.     (sleep -1)
  3816.        
  3817.    
  3818.                 (object_destroy ycr)
  3819.                 (object_destroy ycl)
  3820.                 (object_destroy yship)
  3821.                
  3822.                 (object_create yship)
  3823.                 (object_create ycr)
  3824.                 (object_create ycl)
  3825.                 (object_create ytr)
  3826.                 (object_create ytl)
  3827.                 (object_create yg)
  3828.                 (unit_close ytr)
  3829.                 (unit_close ytl)
  3830.                 (unit_close yg)
  3831.                
  3832.                 (objects_attach yship "gravlift" yg "")
  3833.                 (objects_attach yship "troop_door_right" ytr "")
  3834.                 (objects_attach yship "troop_door_left" ytl "")
  3835.                 (objects_attach yship "turret_door_left" ycr "")
  3836.                 (objects_attach yship "turret_door_right" ycl "")
  3837.  
  3838.    
  3839.    
  3840.     (spawn_ai)
  3841.     (sleep_until (= 0 softlock) 5)
  3842.     (set spawn_mode 0)
  3843.        
  3844.     (cond
  3845.                     ((= 0 vehicle_id)
  3846.                         (sleep 1)
  3847.                     )
  3848.                     ((= 1 vehicle_id)
  3849.                         (begin
  3850.                             (set softlock 1)
  3851.                             (spawn_ghost)
  3852.                             (sleep_until (= 0 softlock) 5)
  3853.                             (objects_attach yship "small_cargo01" GHOST "" )
  3854.                             (set softlock 1)
  3855.                             (spawn_ghost)
  3856.                             (sleep_until (= 0 softlock) 5)
  3857.                             (objects_attach yship "small_cargo02" GHOST "")
  3858.                             (set vehicle_id 0)
  3859.                             (ai_migrate driver/ghost 4_bridgeghost)
  3860.                         )
  3861.                     )
  3862.                     ((= 2 vehicle_id)  
  3863.                         (begin
  3864.                             (set softlock 1)
  3865.                             (spawn_wraith)
  3866.                             (sleep_until (= 0 softlock) 5)
  3867.                             (objects_attach yship "large_cargo" WRAITH "" )
  3868.                             (ai_migrate driver/ghost 4_bridgeghost)
  3869.                             (set vehicle_id 0)
  3870.                         )
  3871.                     )
  3872.     )
  3873.    
  3874.    
  3875.    
  3876.    
  3877.    
  3878.     (vehicle_load_magic yg "" (ai_actors cspawn))
  3879.     (ai_braindead cspawn 1)
  3880.     (ai_migrate cspawn 4_B)
  3881.     (set spawning 0)
  3882.    
  3883.    
  3884.     (set tempint (random_range 1 5))
  3885.    
  3886.    
  3887.    
  3888.     (if (= 1 tempint)
  3889.         (begin
  3890.             (object_teleport yship 4_cityscapeB1)
  3891.             (recording_play yship 4_cityscapeB3)
  3892.            
  3893.            
  3894.            
  3895.             (sleep_until (> 870 (recording_time yship)) 5)
  3896.             (unit_open yg)
  3897.             (sleep 30)
  3898.             (ai_braindead 4_B 0)
  3899.             (vehicle_unload yg "")
  3900.            
  3901.             (objects_detach yship wraitha)
  3902.             (objects_detach yship wraithb)
  3903.            
  3904.             (objects_detach yship ghosta)
  3905.             (objects_detach yship ghostb)
  3906.             (objects_detach yship ghostc)
  3907.             (objects_detach yship ghostd)
  3908.            
  3909.             (ai_attack 4_B)
  3910.             (sleep_until (= 0 (recording_time yship)) 5)
  3911.            
  3912.                 (object_destroy yship)
  3913.                
  3914.                
  3915.             (sleep 15)
  3916.         )
  3917.     )
  3918.    
  3919.     (if (= 2 tempint)
  3920.         (begin
  3921.             (object_teleport yship 4_cityscapeB1)
  3922.             (recording_play yship 4_cityscapeB4)
  3923.            
  3924.            
  3925.            
  3926.             (sleep_until (> 1140 (recording_time yship)) 5)
  3927.             (unit_open yg)
  3928.             (sleep 30)
  3929.             (ai_braindead 4_B 0)
  3930.             (vehicle_unload yg "")
  3931.            
  3932.             (objects_detach yship wraitha)
  3933.             (objects_detach yship wraithb)
  3934.            
  3935.             (objects_detach yship ghosta)
  3936.             (objects_detach yship ghostb)
  3937.             (objects_detach yship ghostc)
  3938.             (objects_detach yship ghostd)
  3939.            
  3940.             (ai_attack 4_B)
  3941.             (sleep_until (= 0 (recording_time yship)) 5)
  3942.            
  3943.                 (object_destroy yship)
  3944.                
  3945.                
  3946.             (sleep 15)
  3947.         )
  3948.     )
  3949.    
  3950.     (if (= 3 tempint)
  3951.         (begin
  3952.             (object_teleport yship 4_cityscapeB)
  3953.             (recording_play yship 4_cityscapeB5)
  3954.            
  3955.            
  3956.            
  3957.             (sleep_until (> 750 (recording_time yship)) 5)
  3958.             (unit_open yg)
  3959.             (sleep 30)
  3960.             (ai_braindead 4_B 0)
  3961.             (vehicle_unload yg "")
  3962.            
  3963.             (objects_detach yship wraitha)
  3964.             (objects_detach yship wraithb)
  3965.            
  3966.             (objects_detach yship ghosta)
  3967.             (objects_detach yship ghostb)
  3968.             (objects_detach yship ghostc)
  3969.             (objects_detach yship ghostd)
  3970.            
  3971.             (ai_attack 4_B)
  3972.             (sleep_until (= 0 (recording_time yship)) 5)
  3973.            
  3974.                 (object_destroy yship)
  3975.                
  3976.                
  3977.             (sleep 15)
  3978.         )
  3979.     )
  3980.    
  3981.     (if (= 4 tempint)
  3982.         (begin
  3983.             (object_teleport yship 4_cityscapeB)
  3984.             (recording_play yship 4_cityscapeB6)
  3985.            
  3986.            
  3987.            
  3988.             (sleep_until (> 1050 (recording_time yship)) 5)
  3989.             (unit_open yg)
  3990.             (sleep 30)
  3991.             (ai_braindead 4_B 0)
  3992.             (vehicle_unload yg "")
  3993.            
  3994.             (objects_detach yship wraitha)
  3995.             (objects_detach yship wraithb)
  3996.            
  3997.             (objects_detach yship ghosta)
  3998.             (objects_detach yship ghostb)
  3999.             (objects_detach yship ghostc)
  4000.             (objects_detach yship ghostd)
  4001.            
  4002.             (ai_attack 4_B)
  4003.             (sleep_until (= 0 (recording_time yship)) 5)
  4004.            
  4005.                 (object_destroy yship)
  4006.                
  4007.                
  4008.             (sleep 15)
  4009.         )
  4010.     )
  4011.    
  4012.                    
  4013. )
  4014.  
  4015.  
  4016. (script continuous sp_4C
  4017.  
  4018.     (sleep -1)
  4019.        
  4020.    
  4021.                 (object_destroy zcr)
  4022.                 (object_destroy zcl)
  4023.                 (object_destroy zship)
  4024.                
  4025.                 (object_create zship)
  4026.                 (object_create zcr)
  4027.                 (object_create zcl)
  4028.                 (object_create ztr)
  4029.                 (object_create ztl)
  4030.                 (object_create zg)
  4031.                 (unit_close ztr)
  4032.                 (unit_close ztl)
  4033.                 (unit_close zg)
  4034.                
  4035.                 (objects_attach zship "gravlift" zg "")
  4036.                 (objects_attach zship "troop_door_right" ztr "")
  4037.                 (objects_attach zship "troop_door_left" ztl "")
  4038.                 (objects_attach zship "turret_door_left" zcr "")
  4039.                 (objects_attach zship "turret_door_right" zcl "")
  4040.  
  4041.    
  4042.    
  4043.     (spawn_ai)
  4044.     (sleep_until (= 0 softlock) 5)
  4045.     (set spawn_mode 0)
  4046.        
  4047.     (cond
  4048.                     ((= 0 vehicle_id)
  4049.                         (sleep 1)
  4050.                     )
  4051.                     ((= 1 vehicle_id)
  4052.                         (begin
  4053.                             (set softlock 1)
  4054.                             (spawn_ghost)
  4055.                             (sleep_until (= 0 softlock) 5)
  4056.                             (objects_attach zship "small_cargo01" GHOST "" )
  4057.                             (set softlock 1)
  4058.                             (spawn_ghost)
  4059.                             (sleep_until (= 0 softlock) 5)
  4060.                             (objects_attach zship "small_cargo02" GHOST "")
  4061.                             (set vehicle_id 0)
  4062.                             (ai_migrate driver/ghost 4_bridgeghost)
  4063.                         )
  4064.                     )
  4065.                     ((= 2 vehicle_id)  
  4066.                         (begin
  4067.                             (set softlock 1)
  4068.                             (spawn_wraith)
  4069.                             (sleep_until (= 0 softlock) 5)
  4070.                             (objects_attach zship "large_cargo" WRAITH "" )
  4071.                             (ai_migrate driver/ghost 4_bridgeghost)
  4072.                             (set vehicle_id 0)
  4073.                         )
  4074.                     )
  4075.     )
  4076.    
  4077.    
  4078.    
  4079.    
  4080.    
  4081.     (vehicle_load_magic zg "" (ai_actors cspawn))
  4082.     (ai_braindead cspawn 1)
  4083.     (ai_migrate cspawn 4_c)
  4084.     (set spawning 0)
  4085.    
  4086.    
  4087.     (set tempint (random_range 1 3))
  4088.    
  4089.    
  4090.    
  4091.     (if (= 1 tempint)
  4092.         (begin
  4093.             (object_teleport zship 4_cityscapeB1)
  4094.             (recording_play zship 4_cityscapeB1)
  4095.            
  4096.            
  4097.            
  4098.             (sleep_until (> 910 (recording_time zship)) 5)
  4099.             (unit_open zg)
  4100.             (sleep 30)
  4101.             (ai_braindead 4_c 0)
  4102.             (vehicle_unload zg "")
  4103.            
  4104.             (objects_detach zship wraitha)
  4105.             (objects_detach zship wraithb)
  4106.            
  4107.             (objects_detach zship ghosta)
  4108.             (objects_detach zship ghostb)
  4109.             (objects_detach zship ghostc)
  4110.             (objects_detach zship ghostd)
  4111.            
  4112.             (ai_attack 4_c)
  4113.             (sleep_until (= 0 (recording_time zship)) 5)
  4114.            
  4115.                 (object_destroy zship)
  4116.                
  4117.                
  4118.             (sleep 15)
  4119.         )
  4120.     )
  4121.    
  4122.     (if (= 2 tempint)
  4123.         (begin
  4124.             (object_teleport zship 4_cityscapeB1)
  4125.             (recording_play zship 4_cityscapeB2)
  4126.            
  4127.            
  4128.            
  4129.             (sleep_until (> 930 (recording_time zship)) 5)
  4130.             (unit_open zg)
  4131.             (sleep 30)
  4132.             (ai_braindead 4_c 0)
  4133.             (vehicle_unload zg "")
  4134.            
  4135.             (objects_detach zship wraitha)
  4136.             (objects_detach zship wraithb)
  4137.            
  4138.             (objects_detach zship ghosta)
  4139.             (objects_detach zship ghostb)
  4140.             (objects_detach zship ghostc)
  4141.             (objects_detach zship ghostd)
  4142.            
  4143.             (ai_attack 4_c)
  4144.             (sleep_until (= 0 (recording_time zship)) 5)
  4145.            
  4146.                 (object_destroy zship)
  4147.                
  4148.                
  4149.             (sleep 15)
  4150.         )
  4151.     )
  4152.    
  4153.    
  4154.    
  4155.                    
  4156. )
  4157.  
  4158.  
  4159.  
  4160. (script continuous sp_5A
  4161.  
  4162.     (sleep -1)
  4163.        
  4164.    
  4165.                 (object_destroy UCR)
  4166.                 (object_destroy UCL)
  4167.                 (object_destroy uship)
  4168.                
  4169.                 (object_create uship)
  4170.                 (object_create ucr)
  4171.                 (object_create ucl)
  4172.                 (object_create utr)
  4173.                 (object_create utl)
  4174.                 (object_create ug)
  4175.                 (unit_close utr)
  4176.                 (unit_close utl)
  4177.                 (unit_close ug)
  4178.                
  4179.                 (objects_attach uship "gravlift" ug "")
  4180.                 (objects_attach uship "troop_door_right" utr "")
  4181.                 (objects_attach uship "troop_door_left" utl "")
  4182.                 (objects_attach uship "turret_door_left" ucr "")
  4183.                 (objects_attach uship "turret_door_right" ucl "")
  4184.  
  4185.    
  4186.    
  4187.     (spawn_ai)
  4188.     (sleep_until (= 0 softlock) 5)
  4189.     (set spawn_mode 0)
  4190.    
  4191.    
  4192.    
  4193.    
  4194.     (vehicle_load_magic ug "" (ai_actors cspawn))
  4195.     (ai_braindead cspawn 1)
  4196.     (ai_migrate cspawn 5_A)
  4197.     (set spawning 0)
  4198.    
  4199.    
  4200.     (set tempint (random_range 1 5))
  4201.    
  4202.     (if (= 1 tempint)
  4203.         (begin
  4204.             (object_teleport uship 5_tombstoneA)
  4205.             (recording_play uship 5_tombstoneA1)
  4206.            
  4207.            
  4208.            
  4209.             (sleep_until (> 850 (recording_time uship)) 5)
  4210.             (unit_open ug)
  4211.             (sleep 30)
  4212.             (ai_braindead 5_A 0)
  4213.             (vehicle_unload ug "")
  4214.            
  4215.             (objects_detach uship wraitha)
  4216.             (objects_detach uship wraithb)
  4217.            
  4218.             (objects_detach uship ghosta)
  4219.             (objects_detach uship ghostb)
  4220.             (objects_detach uship ghostc)
  4221.             (objects_detach uship ghostd)
  4222.            
  4223.             (ai_attack 5_A)
  4224.             (sleep_until (= 0 (recording_time uship)) 5)
  4225.            
  4226.                 (object_destroy uship)
  4227.                
  4228.                
  4229.             (sleep 15)
  4230.         )
  4231.     )
  4232.    
  4233.     (if (= 2 tempint)
  4234.         (begin
  4235.             (object_teleport uship 5_tombstoneA)
  4236.             (recording_play uship 5_tombstoneA2)
  4237.            
  4238.            
  4239.            
  4240.             (sleep_until (> 930 (recording_time uship)) 5)
  4241.             (unit_open ug)
  4242.             (sleep 30)
  4243.             (ai_braindead 5_A 0)
  4244.             (vehicle_unload ug "")
  4245.            
  4246.             (objects_detach uship wraitha)
  4247.             (objects_detach uship wraithb)
  4248.            
  4249.             (objects_detach uship ghosta)
  4250.             (objects_detach uship ghostb)
  4251.             (objects_detach uship ghostc)
  4252.             (objects_detach uship ghostd)
  4253.            
  4254.             (ai_attack 5_A)
  4255.             (sleep_until (= 0 (recording_time uship)) 5)
  4256.            
  4257.                 (object_destroy uship)
  4258.                
  4259.                
  4260.             (sleep 15)
  4261.         )
  4262.     )
  4263.    
  4264.     (if (= 3 tempint)
  4265.         (begin
  4266.             (object_teleport uship 5_tombstoneB1)
  4267.             (recording_play uship 5_tombstoneB1)
  4268.            
  4269.            
  4270.            
  4271.             (sleep_until (> 760 (recording_time uship)) 5)
  4272.             (unit_open ug)
  4273.             (sleep 30)
  4274.             (ai_braindead 5_A 0)
  4275.             (vehicle_unload ug "")
  4276.            
  4277.             (objects_detach uship wraitha)
  4278.             (objects_detach uship wraithb)
  4279.            
  4280.             (objects_detach uship ghosta)
  4281.             (objects_detach uship ghostb)
  4282.             (objects_detach uship ghostc)
  4283.             (objects_detach uship ghostd)
  4284.            
  4285.             (ai_attack 5_A)
  4286.             (sleep_until (= 0 (recording_time uship)) 5)
  4287.            
  4288.                 (object_destroy uship)
  4289.                
  4290.                
  4291.             (sleep 15)
  4292.         )
  4293.     )
  4294.    
  4295.     (if (= 4 tempint)
  4296.         (begin
  4297.             (object_teleport uship 5_tombstoneB)
  4298.             (recording_play uship 5_tombstoneB2)
  4299.            
  4300.            
  4301.            
  4302.             (sleep_until (> 1180 (recording_time uship)) 5)
  4303.             (unit_open ug)
  4304.             (sleep 30)
  4305.             (ai_braindead 5_A 0)
  4306.             (vehicle_unload ug "")
  4307.            
  4308.             (objects_detach uship wraitha)
  4309.             (objects_detach uship wraithb)
  4310.            
  4311.             (objects_detach uship ghosta)
  4312.             (objects_detach uship ghostb)
  4313.             (objects_detach uship ghostc)
  4314.             (objects_detach uship ghostd)
  4315.            
  4316.             (ai_attack 5_A)
  4317.             (sleep_until (= 0 (recording_time uship)) 5)
  4318.            
  4319.                 (object_destroy uship)
  4320.                
  4321.                
  4322.             (sleep 15)
  4323.         )
  4324.     )
  4325.    
  4326.                    
  4327. )
  4328.  
  4329.  
  4330.  
  4331.  
  4332. (script continuous sp_5B
  4333.  
  4334.     (sleep -1)
  4335.        
  4336.    
  4337.                 (object_destroy vcr)
  4338.                 (object_destroy vcl)
  4339.                 (object_destroy vship)
  4340.                
  4341.                 (object_create vship)
  4342.                 (object_create vcr)
  4343.                 (object_create vcl)
  4344.                 (object_create vtr)
  4345.                 (object_create vtl)
  4346.                 (object_create vg)
  4347.                 (unit_close vtr)
  4348.                 (unit_close vtl)
  4349.                 (unit_close vg)
  4350.                
  4351.                 (objects_attach vship "gravlift" vg "")
  4352.                 (objects_attach vship "troop_door_right" vtr "")
  4353.                 (objects_attach vship "troop_door_left" vtl "")
  4354.                 (objects_attach vship "turret_door_left" vcr "")
  4355.                 (objects_attach vship "turret_door_right" vcl "")
  4356.  
  4357.    
  4358.    
  4359.     (spawn_ai)
  4360.     (sleep_until (= 0 softlock) 5)
  4361.     (set spawn_mode 0)
  4362.    
  4363.    
  4364.    
  4365.    
  4366.     (vehicle_load_magic vg "" (ai_actors cspawn))
  4367.     (ai_braindead cspawn 1)
  4368.     (ai_migrate cspawn 5_B)
  4369.     (set spawning 0)
  4370.    
  4371.    
  4372.     (set tempint (random_range 1 4))
  4373.    
  4374.     (if (= 1 tempint)
  4375.         (begin
  4376.             (object_teleport vship 5_zanzibarA)
  4377.             (recording_play vship 5_zanzibarA1)
  4378.            
  4379.            
  4380.            
  4381.             (sleep_until (> 635 (recording_time vship)) 5)
  4382.             (unit_open vg)
  4383.             (sleep 30)
  4384.             (ai_braindead 5_b 0)
  4385.             (vehicle_unload vg "")
  4386.            
  4387.             (objects_detach vship wraitha)
  4388.             (objects_detach vship wraithb)
  4389.            
  4390.             (objects_detach vship ghosta)
  4391.             (objects_detach vship ghostb)
  4392.             (objects_detach vship ghostc)
  4393.             (objects_detach vship ghostd)
  4394.            
  4395.             (ai_attack 5_b)
  4396.             (sleep_until (= 0 (recording_time vship)) 5)
  4397.            
  4398.                 (object_destroy vship)
  4399.                
  4400.                
  4401.             (sleep 15)
  4402.         )
  4403.     )
  4404.    
  4405.     (if (= 2 tempint)
  4406.         (begin
  4407.             (object_teleport vship 5_zanzibarA)
  4408.             (recording_play vship 5_zanzibarA2)
  4409.            
  4410.            
  4411.            
  4412.             (sleep_until (> 810 (recording_time vship)) 5)
  4413.             (unit_open vg)
  4414.             (sleep 30)
  4415.             (ai_braindead 5_b 0)
  4416.             (vehicle_unload vg "")
  4417.            
  4418.             (objects_detach vship wraitha)
  4419.             (objects_detach vship wraithb)
  4420.            
  4421.             (objects_detach vship ghosta)
  4422.             (objects_detach vship ghostb)
  4423.             (objects_detach vship ghostc)
  4424.             (objects_detach vship ghostd)
  4425.            
  4426.             (ai_attack 5_b)
  4427.             (sleep_until (= 0 (recording_time vship)) 5)
  4428.            
  4429.                 (object_destroy vship)
  4430.                
  4431.                
  4432.             (sleep 15)
  4433.         )
  4434.     )
  4435.    
  4436.     (if (= 3 tempint)
  4437.         (begin
  4438.             (object_teleport vship 5_zanzibarA)
  4439.             (recording_play vship 5_zanzibarA3)
  4440.            
  4441.            
  4442.            
  4443.             (sleep_until (> 760 (recording_time vship)) 5)
  4444.             (unit_open vg)
  4445.             (sleep 30)
  4446.             (ai_braindead 5_b 0)
  4447.             (vehicle_unload vg "")
  4448.            
  4449.             (objects_detach vship wraitha)
  4450.             (objects_detach vship wraithb)
  4451.            
  4452.             (objects_detach vship ghosta)
  4453.             (objects_detach vship ghostb)
  4454.             (objects_detach vship ghostc)
  4455.             (objects_detach vship ghostd)
  4456.            
  4457.             (ai_attack 5_b)
  4458.             (sleep_until (= 0 (recording_time vship)) 5)
  4459.            
  4460.                 (object_destroy vship)
  4461.                
  4462.                
  4463.             (sleep 15)
  4464.         )
  4465.     )
  4466.    
  4467.    
  4468.                    
  4469. )
  4470.  
  4471.  
  4472.  
  4473. (script continuous sp_5C
  4474.  
  4475.     (sleep -1)
  4476.        
  4477.    
  4478.                 (object_destroy wcr)
  4479.                 (object_destroy wcl)
  4480.                 (object_destroy wship)
  4481.                
  4482.                 (object_create wship)
  4483.                 (object_create wcr)
  4484.                 (object_create wcl)
  4485.                 (object_create wtr)
  4486.                 (object_create wtl)
  4487.                 (object_create wg)
  4488.                 (unit_close wtr)
  4489.                 (unit_close wtl)
  4490.                 (unit_close wg)
  4491.                
  4492.                 (objects_attach wship "gravlift" wg "")
  4493.                 (objects_attach wship "troop_door_right" wtr "")
  4494.                 (objects_attach wship "troop_door_left" wtl "")
  4495.                 (objects_attach wship "turret_door_left" wcr "")
  4496.                 (objects_attach wship "turret_door_right" wcl "")
  4497.  
  4498.    
  4499.    
  4500.     (spawn_ai)
  4501.     (sleep_until (= 0 softlock) 5)
  4502.     (set spawn_mode 0)
  4503.    
  4504.    
  4505.    
  4506.    
  4507.     (vehicle_load_magic wg "" (ai_actors cspawn))
  4508.     (ai_braindead cspawn 1)
  4509.     (ai_migrate cspawn 5_C)
  4510.     (set spawning 0)
  4511.    
  4512.    
  4513.     (set tempint (random_range 1 4))
  4514.    
  4515.     (if (= 1 tempint)
  4516.         (begin
  4517.             (object_teleport wship 5_zanzibarB)
  4518.             (recording_play wship 5_zanzibarB1)
  4519.            
  4520.            
  4521.            
  4522.             (sleep_until (> 635 (recording_time wship)) 5)
  4523.             (unit_open wg)
  4524.             (sleep 30)
  4525.             (ai_braindead 5_C 0)
  4526.             (vehicle_unload wg "")
  4527.            
  4528.             (objects_detach wship wraitha)
  4529.             (objects_detach wship wraithb)
  4530.            
  4531.             (objects_detach wship ghosta)
  4532.             (objects_detach wship ghostb)
  4533.             (objects_detach wship ghostc)
  4534.             (objects_detach wship ghostd)
  4535.            
  4536.             (ai_attack 5_C)
  4537.             (sleep_until (= 0 (recording_time wship)) 5)
  4538.            
  4539.                 (object_destroy wship)
  4540.                
  4541.                
  4542.             (sleep 15)
  4543.         )
  4544.     )
  4545.    
  4546.     (if (= 2 tempint)
  4547.         (begin
  4548.             (object_teleport wship 5_zanzibarB)
  4549.             (recording_play wship 5_zanzibarB2)
  4550.            
  4551.            
  4552.            
  4553.             (sleep_until (> 810 (recording_time wship)) 5)
  4554.             (unit_open wg)
  4555.             (sleep 30)
  4556.             (ai_braindead 5_C 0)
  4557.             (vehicle_unload wg "")
  4558.            
  4559.             (objects_detach wship wraitha)
  4560.             (objects_detach wship wraithb)
  4561.            
  4562.             (objects_detach wship ghosta)
  4563.             (objects_detach wship ghostb)
  4564.             (objects_detach wship ghostc)
  4565.             (objects_detach wship ghostd)
  4566.            
  4567.             (ai_attack 5_C)
  4568.             (sleep_until (= 0 (recording_time wship)) 5)
  4569.            
  4570.                 (object_destroy wship)
  4571.                
  4572.                
  4573.             (sleep 15)
  4574.         )
  4575.     )
  4576.    
  4577.     (if (= 3 tempint)
  4578.         (begin
  4579.             (object_teleport wship 5_zanzibarB)
  4580.             (recording_play wship 5_zanzibarB3)
  4581.            
  4582.            
  4583.            
  4584.             (sleep_until (> 760 (recording_time wship)) 5)
  4585.             (unit_open wg)
  4586.             (sleep 30)
  4587.             (ai_braindead 5_C 0)
  4588.             (vehicle_unload wg "")
  4589.            
  4590.             (objects_detach wship wraitha)
  4591.             (objects_detach wship wraithb)
  4592.            
  4593.             (objects_detach wship ghosta)
  4594.             (objects_detach wship ghostb)
  4595.             (objects_detach wship ghostc)
  4596.             (objects_detach wship ghostd)
  4597.            
  4598.             (ai_attack 5_C)
  4599.             (sleep_until (= 0 (recording_time wship)) 5)
  4600.            
  4601.                 (object_destroy wship)
  4602.                
  4603.                
  4604.             (sleep 15)
  4605.         )
  4606.     )
  4607.    
  4608.    
  4609.                    
  4610. )
  4611.  
  4612.  
  4613.  
  4614.  
  4615.    
  4616.  
  4617. (script continuous sp_1interiors
  4618.  
  4619.     (sleep -1)
  4620.  
  4621.  
  4622.     (set softlock 1)
  4623.     (set spawn_mode 1)
  4624.     (spawn_ai) 
  4625.     (sleep_until (= 0 softlock) 5)
  4626.     (set spawn_mode 0)
  4627.     (ai_migrate cspawn 1_interior/spawn)
  4628.     (set spawning 0)
  4629.     (ai_teleport_to_starting_location 1_interior/spawn)
  4630.     (ai_migrate 1_interior/spawn 1_interior/headlong)
  4631.    
  4632.    
  4633. )
  4634.  
  4635. (script continuous sp_1parking
  4636.     (sleep -1)
  4637.  
  4638.     (set softlock 1)
  4639.    
  4640.     (spawn_ai) 
  4641.     (sleep_until (= 0 softlock) 5)
  4642.    
  4643.     (ai_migrate cspawn 1_parking/spawn)
  4644.     (set spawning 0)
  4645.     (ai_teleport_to_starting_location 1_parking/spawn)
  4646.     (ai_migrate 1_parking/spawn 1_parking/terminal)
  4647.     (sleep 10)
  4648.    
  4649. )
  4650.  
  4651.  
  4652. (script continuous sp_1ivory
  4653.     (sleep -1)
  4654.  
  4655.     (set softlock 1)
  4656.    
  4657.     (spawn_ai) 
  4658.     (sleep_until (= 0 softlock) 5)
  4659.    
  4660.     (ai_migrate cspawn 1_ivory/spawn)
  4661.     (set spawning 0)
  4662.     (ai_teleport_to_starting_location 1_ivory/spawn)
  4663.     (ai_migrate 1_ivory/spawn 1_ivory/tower)
  4664.    
  4665.    
  4666.    
  4667. )
  4668.  
  4669. (script continuous sp_3mid
  4670.  
  4671.     (sleep -1)
  4672.  
  4673.  
  4674.     (set softlock 1)
  4675.    
  4676.     (spawn_ai) 
  4677.     (sleep_until (= 0 softlock) 5)
  4678.    
  4679.     (ai_migrate cspawn 3_mid/spawn)
  4680.     (set spawning 0)
  4681.     (ai_teleport_to_starting_location 3_mid/spawn)
  4682.    
  4683.                    
  4684. )
  4685.  
  4686.  
  4687.  
  4688.  
  4689. ;;;;; END OF static void spAWN SCRIPTS
  4690. ;;;;; END OF static void spAWN SCRIPTS
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.    
  4697. (script continuous spawnWIZARD
  4698.  
  4699.     (if (= 0 (structure_bsp_index))
  4700.         (begin
  4701.  
  4702.             (if (and (< (ai_living_count 0_turf) 4) (> 2 shipcount) (or (volume_test_objects 0turf (players))(volume_test_objects 0base (players))(volume_test_objects 0town (players))(volume_test_objects 0alley (players))) (> 18 (+ (ai_living_count 0_jalley) (ai_living_count 0_courtyard) (ai_living_count 0_turf))))
  4703.        
  4704.                 (begin
  4705.                     (set spawning 1)
  4706.                     (sleep_until (> 0 (unit_get_health uship)) 5)
  4707.                     (wake sp_0turf)
  4708.                    
  4709.                     (sleep_until (= 0 spawning) 5)
  4710.                     (sleep 30)
  4711.                 )
  4712.        
  4713.             )
  4714.            
  4715.             (if (and (< (ai_living_count 0_jalley) 4) (> 2 shipcount) (or (volume_test_objects 0overpass (players))(volume_test_objects 0court (players))(volume_test_objects 0town (players))) (> 18 (+ (ai_living_count 0_jalley) (ai_living_count 0_courtyard) (ai_living_count 0_turf))))
  4716.        
  4717.                 (begin
  4718.                     (set spawning 1)
  4719.                     (sleep_until (> 0 (unit_get_health vship)) 5)
  4720.                     (wake sp_0jalley)
  4721.                    
  4722.                     (sleep_until (= 0 spawning) 5)
  4723.                     (sleep 30)
  4724.                 )
  4725.        
  4726.             )
  4727.            
  4728.             (if (and (< (ai_living_count 0_courtyard) 4) (> 2 shipcount) (or (volume_test_objects 0court (players))(volume_test_objects 0overpass (players))(volume_test_objects 0exit (players))) (> 18 (+ (ai_living_count 0_jalley) (ai_living_count 0_courtyard) (ai_living_count 0_turf))))
  4729.        
  4730.                 (begin
  4731.                     (set spawning 1)
  4732.                     (sleep_until (> 0 (unit_get_health wship)) 5)
  4733.                     (wake sp_0courtyard)
  4734.                    
  4735.                     (sleep_until (= 0 spawning) 5)
  4736.                     (sleep 30)
  4737.                 )
  4738.        
  4739.             )
  4740.            
  4741.         )
  4742.     )
  4743.    
  4744.     (if (= 1 (structure_bsp_index))
  4745.         (begin
  4746.        
  4747.             (if (and (< (ai_living_count 1_ivory) 4) (not (volume_test_objects 1ivory (players))) (volume_test_objects 1park (players)) (> 20 (+ (ai_living_count 1_headlong) (ai_living_count 1_terminal) (ai_living_count 1_ivory) (ai_living_count 1_parking) (ai_living_count 1_interior))))
  4748.        
  4749.                 (begin
  4750.                     (set spawning 1)
  4751.                     (wake sp_1ivory)
  4752.                     (sleep_until (= 0 spawning) 5)
  4753.                 )
  4754.        
  4755.             )
  4756.  
  4757.             (if (and (< (ai_living_count 1_interior) 4) (not (volume_test_objects 1interiors (players))) (volume_test_objects 1headlong (players)) (> 20 (+ (ai_living_count 1_headlong) (ai_living_count 1_terminal) (ai_living_count 1_ivory) (ai_living_count 1_parking) (ai_living_count 1_interior))))
  4758.        
  4759.                 (begin
  4760.                     (set spawning 1)
  4761.                     (wake sp_1interiors)
  4762.                     (sleep_until (= 0 spawning) 5)
  4763.                 )
  4764.        
  4765.             )
  4766.            
  4767.             (if (and (< (ai_living_count 1_parking) 4) (not (volume_test_objects 1parkinglot (players))) (or (volume_test_objects 1station (players)) (volume_test_objects 1terminal (players))) (> 20 (+ (ai_living_count 1_headlong) (ai_living_count 1_terminal) (ai_living_count 1_ivory) (ai_living_count 1_parking) (ai_living_count 1_interior))))
  4768.        
  4769.                 (begin
  4770.                     (set spawning 1)
  4771.                     (wake sp_1parking)
  4772.                     (sleep_until (= 0 spawning) 5)
  4773.                 )
  4774.        
  4775.             )
  4776.                
  4777.             (if (and (< (ai_living_count 1_headlong) 4) (or (volume_test_objects 1headlong (players))(volume_test_objects 1park (players))0) (> 20 (+ (ai_living_count 1_headlong) (ai_living_count 1_terminal) (ai_living_count 1_ivory) (ai_living_count 1_parking) (ai_living_count 1_interior))))
  4778.        
  4779.                 (begin
  4780.                     (set spawning 1)
  4781.                     (sleep_until (> 0 (unit_get_health uship)) 5)
  4782.                     (wake sp_1headlong)
  4783.                     (sleep_until (= 0 spawning) 5)
  4784.                     (sleep 30)
  4785.                 )
  4786.        
  4787.             )          
  4788.                        
  4789.            
  4790.             (if (and (< (ai_living_count 1_terminal) 4) (or (volume_test_objects 1terminal (players)) (volume_test_objects 1park (players)) (volume_test_objects 1station (players)) (volume_test_objects 1parkinglot (players))) (> 20 (+ (ai_living_count 1_headlong) (ai_living_count 1_terminal) (ai_living_count 1_ivory) (ai_living_count 1_parking) (ai_living_count 1_interior))))
  4791.        
  4792.                 (begin
  4793.                     (set spawning 1)
  4794.                     (sleep_until (> 0 (unit_get_health vship)) 5)
  4795.                     (wake sp_1terminal)
  4796.                     (sleep_until (= 0 spawning) 5)
  4797.                     (sleep 30)
  4798.                 )
  4799.        
  4800.             )
  4801.            
  4802.                    
  4803.            
  4804.            
  4805.         )
  4806.     )
  4807.    
  4808.     (if (= 2 (structure_bsp_index))
  4809.         (begin
  4810.  
  4811.             (if (and (< (ai_living_count 2_newmombasa) 4) (or (volume_test_objects 2mombafront (players)) (volume_test_objects 2metromomba (players)) (volume_test_objects 2mombaback (players))) (> 15 (+ (ai_living_count 2_mombasaghosts) (ai_living_count 2_chronoghosts) (ai_living_count 2_newmombasa) (ai_living_count 2_chronoparking) (ai_living_count 2_mombasarear) (ai_living_count 2_chronorear) (ai_living_count 2_loadingbay) )))
  4812.        
  4813.                 (begin
  4814.                     (set spawning 1)
  4815.                     (sleep_until (> 0 (unit_get_health uship)) 5)
  4816.                     (wake sp_2newmombasa)
  4817.                     (sleep_until (= 0 spawning) 5)
  4818.                     (sleep_until (= 0 vehicle_id) 5)
  4819.                     (sleep 30)
  4820.                    
  4821.                 )
  4822.        
  4823.             )
  4824.            
  4825.             (if (and (< (ai_living_count 2_mombasarear) 4) (or (volume_test_objects 2mombafront (players))  (volume_test_objects 2mombaback (players))) (> 15 (+ (ai_living_count 2_mombasaghosts) (ai_living_count 2_chronoghosts) (ai_living_count 2_newmombasa) (ai_living_count 2_chronoparking) (ai_living_count 2_mombasarear) (ai_living_count 2_chronorear) (ai_living_count 2_loadingbay) )))
  4826.        
  4827.                 (begin
  4828.                     (set spawning 1)
  4829.                     (sleep_until (> 0 (unit_get_health vship)) 5)
  4830.                     (wake sp_2mombasarear)
  4831.                     (sleep_until (= 0 spawning) 5)
  4832.                     (sleep_until (= 0 vehicle_id) 5)
  4833.                     (sleep 30)
  4834.                 )
  4835.        
  4836.             )
  4837.            
  4838.             (if (and (< (ai_living_count 2_loadingbay) 4) (or (volume_test_objects 2mombafront (players))  (volume_test_objects 2mombaback (players))) (> 15 (+ (ai_living_count 2_mombasaghosts) (ai_living_count 2_chronoghosts) (ai_living_count 2_newmombasa) (ai_living_count 2_chronoparking) (ai_living_count 2_mombasarear) (ai_living_count 2_chronorear) (ai_living_count 2_loadingbay) )))
  4839.        
  4840.                 (begin
  4841.                     (set spawning 1)
  4842.                     (sleep_until (> 0 (unit_get_health wship)) 5)
  4843.                     (wake sp_2loadingbay)
  4844.                     (sleep_until (= 0 spawning) 5)
  4845.                     (sleep_until (= 0 vehicle_id) 5)
  4846.                     (sleep 30)
  4847.                 )
  4848.        
  4849.             )
  4850.            
  4851.             (if (and (< (ai_living_count 2_chronoparking) 4) (or (volume_test_objects 2chronopolis (players))  (volume_test_objects 2metrochrono (players))) (> 15 (+ (ai_living_count 2_mombasaghosts) (ai_living_count 2_chronoghosts) (ai_living_count 2_newmombasa) (ai_living_count 2_chronoparking) (ai_living_count 2_mombasarear) (ai_living_count 2_chronorear) (ai_living_count 2_loadingbay) )))
  4852.        
  4853.                 (begin
  4854.                     (set spawning 1)
  4855.                     (sleep_until (> 0 (unit_get_health xship)) 5)
  4856.                     (wake sp_2chronoparking)
  4857.                     (sleep_until (= 0 spawning) 5)
  4858.                     (sleep_until (= 0 vehicle_id) 5)
  4859.                     (sleep 30)
  4860.                 )
  4861.        
  4862.             )
  4863.            
  4864.                 (if (and (< (ai_living_count 2_chronorear) 4) (volume_test_objects 2chronopolis (players)) (> 15 (+ (ai_living_count 2_mombasaghosts) (ai_living_count 2_chronoghosts) (ai_living_count 2_newmombasa) (ai_living_count 2_chronoparking) (ai_living_count 2_mombasarear) (ai_living_count 2_chronorear) (ai_living_count 2_loadingbay) )))
  4865.        
  4866.                 (begin
  4867.                     (set spawning 1)
  4868.                     (sleep_until (> 0 (unit_get_health yship)) 5)
  4869.                     (wake sp_2chronorear)
  4870.                     (sleep_until (= 0 spawning) 5)
  4871.                     (sleep_until (= 0 vehicle_id) 5)
  4872.                     (sleep 30)
  4873.                 )
  4874.        
  4875.             )
  4876.            
  4877.         )
  4878.     )
  4879.    
  4880.    
  4881.     (if (= 3 (structure_bsp_index))
  4882.         (begin
  4883.  
  4884.             (if (and (< (ai_living_count 3_front) 4) (or (volume_test_objects 3front (players)) (volume_test_objects 3mid (players))) (> 20 (+ (ai_living_count 3_front) (ai_living_count 3_back) (ai_living_count 3_mid) (ai_living_count 3_ghost) )))
  4885.        
  4886.                 (begin
  4887.                     (set spawning 1)
  4888.                     (sleep_until (> 0 (unit_get_health xship)) 5)
  4889.                     (wake sp_3front)
  4890.                     (sleep_until (= 0 spawning) 5)
  4891.                     (sleep_until (= 0 vehicle_id) 5)
  4892.                     (sleep 30)
  4893.                    
  4894.                 )
  4895.        
  4896.             )
  4897.            
  4898.             (if (and (< (ai_living_count 3_mid) 4) (not (volume_test_objects 3mid (players))) (> 20 (+ (ai_living_count 3_front) (ai_living_count 3_back) (ai_living_count 3_mid) (ai_living_count 3_ghost) )) (> 20 (+ (ai_living_count 3_front) (ai_living_count 3_back) (ai_living_count 3_mid) (ai_living_count 3_ghost) )))
  4899.        
  4900.                 (begin
  4901.                     (set spawning 1)
  4902.                    
  4903.                     (wake sp_3mid)
  4904.                     (sleep_until (= 0 spawning) 5)
  4905.                     (sleep 30)
  4906.                    
  4907.                 )
  4908.        
  4909.             )
  4910.            
  4911.             (if (and (< (ai_living_count 3_back) 4) (or (volume_test_objects 3mid (players)) (volume_test_objects 3back (players))) (> 20 (+ (ai_living_count 3_front) (ai_living_count 3_back) (ai_living_count 3_mid) (ai_living_count 3_ghost) )))
  4912.        
  4913.                 (begin
  4914.                     (set spawning 1)
  4915.                     (sleep_until (> 0 (unit_get_health yship)) 5)
  4916.                     (wake sp_3back)
  4917.                     (sleep_until (= 0 spawning) 5)
  4918.                     (sleep_until (= 0 vehicle_id) 5)
  4919.                     (sleep 30)
  4920.                    
  4921.                 )
  4922.        
  4923.             )
  4924.            
  4925.         )
  4926.     )
  4927.    
  4928.    
  4929.     (if (= 4 (structure_bsp_index))
  4930.         (begin
  4931.  
  4932.             (if (and (< (ai_living_count 4_front) 5) (or (volume_test_objects 4front (players)) (volume_test_objects 4mid (players))) (> 20 (+ (ai_living_count 4_front) (ai_living_count 4_mid) (ai_living_count 4_back) (ai_living_count 4_a) (ai_living_count 4_b) (ai_living_count 4_c) )))
  4933.        
  4934.                 (begin
  4935.                     (set spawning 1)
  4936.                     (sleep_until (> 0 (unit_get_health uship)) 5)
  4937.                     (wake sp_4front)
  4938.                     (sleep_until (= 0 spawning) 5)
  4939.                     (sleep_until (= 0 vehicle_id) 5)
  4940.                     (sleep 30)
  4941.                    
  4942.                 )
  4943.        
  4944.             )
  4945.            
  4946.             (if (and (< (ai_living_count 4_mid) 5) (or (volume_test_objects 4front (players)) (volume_test_objects 4mid (players)) (volume_test_objects 4back (players))) (> 20 (+ (ai_living_count 4_front) (ai_living_count 4_mid) (ai_living_count 4_back) (ai_living_count 4_a) (ai_living_count 4_b) (ai_living_count 4_c) )))
  4947.        
  4948.                 (begin
  4949.                     (set spawning 1)
  4950.                     (sleep_until (> 0 (unit_get_health vship)) 5)
  4951.                     (wake sp_4mid)
  4952.                     (sleep_until (= 0 spawning) 5)
  4953.                     (sleep_until (= 0 vehicle_id) 5)
  4954.                     (sleep 30)
  4955.                    
  4956.                 )
  4957.        
  4958.             )
  4959.            
  4960.             (if (and (< (ai_living_count 4_back) 5) (or (volume_test_objects 4back (players)) (volume_test_objects 4mid (players)) (volume_test_objects 4A (players))) (> 20 (+ (ai_living_count 4_front) (ai_living_count 4_mid) (ai_living_count 4_back) (ai_living_count 4_a) (ai_living_count 4_b) (ai_living_count 4_c) )))
  4961.        
  4962.                 (begin
  4963.                     (set spawning 1)
  4964.                     (sleep_until (> 0 (unit_get_health wship)) 5)
  4965.                     (wake sp_4back)
  4966.                     (sleep_until (= 0 spawning) 5)
  4967.                     (sleep_until (= 0 vehicle_id) 5)
  4968.                     (sleep 30)
  4969.                    
  4970.                 )
  4971.        
  4972.             )
  4973.            
  4974.             (if (and (< (ai_living_count 4_A) 5) (or (volume_test_objects 4back (players)) (volume_test_objects 4A (players)) (volume_test_objects 4B (players))) (> 20 (+ (ai_living_count 4_front) (ai_living_count 4_mid) (ai_living_count 4_back) (ai_living_count 4_a) (ai_living_count 4_b) (ai_living_count 4_c) )))
  4975.        
  4976.                 (begin
  4977.                     (set spawning 1)
  4978.                     (sleep_until (> 0 (unit_get_health xship)) 5)
  4979.                     (wake sp_4A)
  4980.                     (sleep_until (= 0 spawning) 5)
  4981.                     (sleep_until (= 0 vehicle_id) 5)
  4982.                     (sleep 30)
  4983.                    
  4984.                 )
  4985.        
  4986.             )
  4987.            
  4988.             (if (and (< (ai_living_count 4_B) 5) (or (volume_test_objects 4A (players)) (volume_test_objects 4B (players)) (volume_test_objects 4C (players))) (> 20 (+ (ai_living_count 4_front) (ai_living_count 4_mid) (ai_living_count 4_back) (ai_living_count 4_a) (ai_living_count 4_b) (ai_living_count 4_c) )))
  4989.        
  4990.                 (begin
  4991.                     (set spawning 1)
  4992.                     (sleep_until (> 0 (unit_get_health yship)) 5)
  4993.                     (wake sp_4B)
  4994.                     (sleep_until (= 0 spawning) 5)
  4995.                     (sleep_until (= 0 vehicle_id) 5)
  4996.                     (sleep 30)
  4997.                    
  4998.                 )
  4999.        
  5000.             )
  5001.            
  5002.             (if (and (< (ai_living_count 4_C) 5) (or (volume_test_objects 4B (players)) (volume_test_objects 4C (players))) (> 20 (+ (ai_living_count 4_front) (ai_living_count 4_mid) (ai_living_count 4_back) (ai_living_count 4_a) (ai_living_count 4_b) (ai_living_count 4_c) )))
  5003.        
  5004.                 (begin
  5005.                     (set spawning 1)
  5006.                     (sleep_until (> 0 (unit_get_health zship)) 5)
  5007.                     (wake sp_4C)
  5008.                     (sleep_until (= 0 spawning) 5)
  5009.                     (sleep_until (= 0 vehicle_id) 5)
  5010.                     (sleep 30)
  5011.                    
  5012.                 )
  5013.        
  5014.             )
  5015.        
  5016.             )
  5017.            
  5018.         )
  5019.    
  5020.    
  5021.    
  5022.    
  5023.     (if (= 5 (structure_bsp_index))
  5024.         (begin
  5025.  
  5026.             (if (and (< (ai_living_count 5_A) 4) (or (volume_test_objects 5A (players)) (volume_test_objects 5B (players))) (> 20 (+ (ai_living_count 5_A) (ai_living_count 5_B) (ai_living_count 5_C) )))
  5027.        
  5028.                 (begin
  5029.                     (set spawning 1)
  5030.                     (sleep_until (> 0 (unit_get_health uship)) 5)
  5031.                     (wake sp_5A)
  5032.                     (sleep_until (= 0 spawning) 5)
  5033.                     (sleep_until (= 0 vehicle_id) 5)
  5034.                     (sleep 30)
  5035.                    
  5036.                 )
  5037.        
  5038.             )
  5039.            
  5040.             (if (and (< (ai_living_count 5_B) 4) (or (volume_test_objects 5A (players)) (volume_test_objects 5B (players)) (volume_test_objects 5C (players))) (> 20 (+ (ai_living_count 5_A) (ai_living_count 5_B) (ai_living_count 5_C) )))
  5041.        
  5042.                 (begin
  5043.                     (set spawning 1)
  5044.                     (sleep_until (> 0 (unit_get_health vship)) 5)
  5045.                     (wake sp_5B)
  5046.                     (sleep_until (= 0 spawning) 5)
  5047.                     (sleep 30)
  5048.                    
  5049.                 )
  5050.        
  5051.             )
  5052.            
  5053.             (if (and (< (ai_living_count 5_C) 4) (or (volume_test_objects 5B (players)) (volume_test_objects 5C (players))) (> 20 (+ (ai_living_count 5_A) (ai_living_count 5_B) (ai_living_count 5_C) )))
  5054.        
  5055.                 (begin
  5056.                     (set spawning 1)
  5057.                     (sleep_until (> 0 (unit_get_health wship)) 5)
  5058.                     (wake sp_5C)
  5059.                     (sleep_until (= 0 spawning) 5)
  5060.                     (sleep_until (= 0 vehicle_id) 5)
  5061.                     (sleep 30)
  5062.                    
  5063.                 )
  5064.        
  5065.             )
  5066.            
  5067.         )
  5068.     )
  5069. )
  5070.  
  5071.    
  5072. ;;;;END OF SPAWNWIZARD CONTINUOUS SCRIPT
  5073. ;;;;END OF SPAWNWIZARD CONTINUOUS SCRIPT
  5074.  
  5075.  
  5076. ;;;;END OF SPAWNWIZARD CONTINUOUS SCRIPT
  5077. ;;;;END OF SPAWNWIZARD CONTINUOUS SCRIPT
  5078.  
  5079.  
  5080.            
  5081.    
  5082. (script continuous 0_cybase
  5083.  
  5084.         (if (and (= 0 (structure_bsp_index)) (< (ai_living_count 0_cybase) 5) (not (volume_test_objects 0court (players))) (> 7  (+ (ai_living_count 0_cybase) (ai_living_count 0_underpass) (ai_living_count 0_oldtown)) ) )
  5085.             (begin
  5086.                 (if (= (game_difficulty_get) hard)
  5087.                     (sleep_until (> 5 (+ (ai_living_count 0_cybase) (ai_living_count 0_underpass) (ai_living_count 0_oldtown))) 5)
  5088.                 )
  5089.                
  5090.                 (if (= (game_difficulty_get) impossible)
  5091.                     (sleep_until (> 3 (+ (ai_living_count 0_cybase) (ai_living_count 0_underpass) (ai_living_count 0_oldtown))) 5)
  5092.                 )
  5093.                
  5094.                
  5095.                 (wake hspawner)
  5096.                 (sleep_until (< 3 (ai_living_count hspawn)) 5)
  5097.                 (ai_migrate hspawn 0_migration/cybase)
  5098.                 (ai_teleport_to_starting_location 0_migration/cybase)
  5099.                 (ai_migrate 0_migration/cybase 0_cybase)
  5100.                 (ai_attack 0_cybase)
  5101.             )
  5102.         )
  5103.        
  5104.         (if (and (= 0 (structure_bsp_index)) (< (ai_living_count 0_underpass) 5) (not (volume_test_objects 0base (players))) (> 7 (+ (ai_living_count 0_cybase) (ai_living_count 0_underpass) (ai_living_count 0_oldtown)) ) )
  5105.             (begin
  5106.                 (if (= (game_difficulty_get) hard)
  5107.                     (sleep_until (> 5 (+ (ai_living_count 0_cybase) (ai_living_count 0_underpass) (ai_living_count 0_oldtown))) 5)
  5108.                 )
  5109.                
  5110.                 (if (= (game_difficulty_get) impossible)
  5111.                     (sleep_until (> 3 (+ (ai_living_count 0_cybase) (ai_living_count 0_underpass) (ai_living_count 0_oldtown))) 5)
  5112.                 )
  5113.                
  5114.                
  5115.                 (wake hspawner)
  5116.                 (sleep_until (< 3 (ai_living_count hspawn)) 5)
  5117.                 (ai_migrate hspawn 0_migration/underpass)
  5118.                 (ai_teleport_to_starting_location 0_migration/underpass)
  5119.                 (ai_migrate 0_migration/underpass 0_underpass)
  5120.                 (ai_attack 0_underpass)
  5121.             )
  5122.         )
  5123.        
  5124. )
  5125.  
  5126. (script continuous 1_base
  5127.  
  5128.         (if (and (= 1 (structure_bsp_index)) (< (ai_living_count 1_base) 5) (not (volume_test_objects 1interiors (players))) (> 7 (+ (ai_living_count 1_base) (ai_living_count 1_station) (ai_living_count 1_tower) ) ) )
  5129.             (begin
  5130.                 (if (= (game_difficulty_get) hard)
  5131.                     (sleep_until (> 5 (+ (ai_living_count 1_base) (ai_living_count 1_station) )) 5)
  5132.                 )
  5133.                
  5134.                 (if (= (game_difficulty_get) impossible)
  5135.                     (sleep_until (> 3 (+ (ai_living_count 1_base) (ai_living_count 1_station) )) 5)
  5136.                 )
  5137.                
  5138.                
  5139.                 (wake hspawner)
  5140.                 (sleep_until (< 3 (ai_living_count hspawn)) 5)
  5141.                 (ai_migrate hspawn 1_migration/base)
  5142.                 (ai_teleport_to_starting_location 1_migration/base)
  5143.                 (ai_migrate 1_migration/base 1_base)
  5144.                 (ai_attack 1_base)
  5145.             )
  5146.         )
  5147.        
  5148.  
  5149.        
  5150. )
  5151.  
  5152.  
  5153. (script continuous 2_base
  5154.  
  5155.         (if (and (= 2 (structure_bsp_index)) (< (ai_living_count 2_base) 4) (not (volume_test_objects 2metrochrono (players)))  )
  5156.             (begin
  5157.                 (wake hspawner)
  5158.                 (sleep_until (< 3 (ai_living_count hspawn)) 5)
  5159.                 (ai_migrate hspawn 2_base/spawn)
  5160.                 (ai_teleport_to_starting_location 2_base/spawn)
  5161.                 (ai_migrate 2_base/spawn 2_base/base)
  5162.                 (ai_attack 2_base)
  5163.             )
  5164.         )
  5165.                 ;; These marines are for show and should not end up getting into a fight. They just "protect" the base.
  5166.  
  5167.        
  5168. )
  5169.  
  5170.  
  5171.  
  5172. (script continuous 2_banshees
  5173.     (sleep 90)
  5174.     (sleep_until (= 2 (structure_bsp_index)) 5)
  5175.    
  5176.         (if (and (= 2 (structure_bsp_index))(< -1 (unit_get_health sheea)))
  5177.                 (begin
  5178.                     (if (not (vehicle_test_seat_list sheea "B-driver" (ai_actors 2_mombasashee)))
  5179.                         (begin
  5180.                             (vehicle_unload sheea "")
  5181.                             (sleep 5)
  5182.                             (unit_kill sheea)
  5183.                             (object_destroy sheea)
  5184.                         )
  5185.                     )
  5186.                 )
  5187.         )
  5188.        
  5189.         (if (and (= 2 (structure_bsp_index))(< -1 (unit_get_health sheeb)))
  5190.                 (begin
  5191.                     (if (not (vehicle_test_seat_list sheeb "B-driver" (ai_actors 2_mombasashee)))
  5192.                         (begin
  5193.                             (vehicle_unload sheeb "")
  5194.                             (sleep 5)
  5195.                             (unit_kill sheeb)
  5196.                             (object_destroy sheeb)
  5197.                         )
  5198.                     )
  5199.                 )
  5200.         )
  5201.    
  5202.    
  5203.         (if (and (= 2 (structure_bsp_index))(< -1 (unit_get_health sheec)))
  5204.             (begin
  5205.                 (if (not (vehicle_test_seat_list sheec "B-driver" (ai_actors 2_chronoshee)))
  5206.                     (begin
  5207.                         (vehicle_unload sheec "")
  5208.                         (sleep 5)
  5209.                         (unit_kill sheec)
  5210.                         (object_destroy sheec)
  5211.                     )
  5212.                 )
  5213.             )
  5214.         )
  5215.        
  5216.         (if (and (= 2 (structure_bsp_index))(< -1 (unit_get_health sheed)))
  5217.             (begin
  5218.                 (if (not (vehicle_test_seat_list sheed "B-driver" (ai_actors 2_chronoshee)))
  5219.                     (begin
  5220.                         (vehicle_unload sheed "")
  5221.                         (sleep 5)
  5222.                         (unit_kill sheed)
  5223.                         (object_destroy sheed)
  5224.                     )
  5225.                 )
  5226.             )
  5227.         )
  5228.  
  5229.        
  5230.         (if (and (= 2 (structure_bsp_index)) (or (> 0 (unit_get_health sheea)) (> 0 (unit_get_health sheeb)) ) (or (volume_test_objects 2mombafront (players)) (volume_test_objects 2mombaback (players))) )
  5231.             (begin
  5232.                 (if (volume_test_objects 2mombafront (players))
  5233.                     (begin
  5234.                         (if (> 0 (unit_get_health sheeb))
  5235.                             (begin
  5236.                                 (ai_place driver/banshee)
  5237.                                 (sleep 1)
  5238.                                 (object_create_anew sheeb)
  5239.                                 (sleep 1)
  5240.                                 (vehicle_load_magic sheeb "" (ai_actors driver/banshee))
  5241.                                 (sleep_until (vehicle_test_seat_list sheeb "B-driver" (ai_actors driver/banshee)) 5)
  5242.                                 (ai_migrate driver/banshee 2_mombasashee)
  5243.                                 (object_teleport sheeb 2_vflagb)
  5244.                             )              
  5245.                         )
  5246.                         (if (> 0 (unit_get_health sheea))
  5247.                             (begin
  5248.                                 (ai_place driver/banshee)
  5249.                                 (sleep 1)
  5250.                                 (object_create_anew sheea)
  5251.                                 (sleep 1)
  5252.                                 (vehicle_load_magic sheea "" (ai_actors driver/banshee))
  5253.                                 (sleep_until (vehicle_test_seat_list sheea "B-driver" (ai_actors driver/banshee)) 5)
  5254.                                 (ai_migrate driver/banshee 2_mombasashee)
  5255.                                 (object_teleport sheea 2_vflagb)
  5256.                             )              
  5257.                         )
  5258.                     )
  5259.                 )
  5260.                 (if (volume_test_objects 2mombaback (players))
  5261.                     (begin
  5262.                         (if (> 0 (unit_get_health sheeb))
  5263.                             (begin
  5264.                                 (ai_place driver/banshee)
  5265.                                 (sleep 1)
  5266.                                 (object_create_anew sheeb)
  5267.                                 (sleep 1)
  5268.                                 (vehicle_load_magic sheeb "" (ai_actors driver/banshee))
  5269.                                 (sleep_until (vehicle_test_seat_list sheeb "B-driver" (ai_actors driver/banshee)) 5)
  5270.                                 (ai_migrate driver/banshee 2_mombasashee)
  5271.                                 (object_teleport sheeb 2_vflaga)
  5272.                             )              
  5273.                         )
  5274.                         (if (> 0 (unit_get_health sheea))
  5275.                             (begin
  5276.                                 (ai_place driver/banshee)
  5277.                                 (sleep 1)
  5278.                                 (object_create_anew sheea)
  5279.                                 (sleep 1)
  5280.                                 (vehicle_load_magic sheea "" (ai_actors driver/banshee))
  5281.                                 (sleep_until (vehicle_test_seat_list sheea "B-driver" (ai_actors driver/banshee)) 5)
  5282.                                 (ai_migrate driver/banshee 2_mombasashee)
  5283.                                 (object_teleport sheea 2_vflaga)
  5284.                             )              
  5285.                         )
  5286.                     )
  5287.                    
  5288.                 )
  5289.             )
  5290.         )
  5291.        
  5292.         (if (and (= 2 (structure_bsp_index)) (or (> 0 (unit_get_health sheed)) (> 0 (unit_get_health sheec)) ) (volume_test_objects 2chronopolis (players)) )
  5293.             (begin
  5294.                 (if (volume_test_objects 2chronobox (players))
  5295.                         (begin
  5296.                        
  5297.                             (if (> 0 (unit_get_health sheed))
  5298.                                 (begin
  5299.                                     (ai_place driver/banshee)
  5300.                                     (sleep 1)
  5301.                                     (object_create_anew sheed)
  5302.                                     (sleep 1)
  5303.                                     (vehicle_load_magic sheed "B-driver" (ai_actors driver/banshee))
  5304.                                     (sleep_until (vehicle_test_seat_list sheed "B-driver" (ai_actors driver/banshee)) 5)
  5305.                                     (ai_migrate driver/banshee 2_chronoshee)
  5306.                                     (object_teleport sheed 2_vflagc)
  5307.                                 )              
  5308.                             )
  5309.                             (if (> 0 (unit_get_health sheec))
  5310.                                 (begin
  5311.                                     (ai_place driver/banshee)
  5312.                                     (sleep 1)
  5313.                                     (object_create_anew sheec)
  5314.                                     (sleep 1)
  5315.                                     (vehicle_load_magic sheec "B-driver" (ai_actors driver/banshee))
  5316.                                     (sleep_until (vehicle_test_seat_list sheec "B-driver" (ai_actors driver/banshee)) 5)
  5317.                                     (ai_migrate driver/banshee 2_chronoshee)
  5318.                                     (object_teleport sheec 2_vflagc)
  5319.                                 )              
  5320.                             )
  5321.                         )
  5322.                 )
  5323.                 (if (and (volume_test_objects 2chronopolis (players)) (not (volume_test_objects 2chronobox (players))))
  5324.                         (begin
  5325.                             (if (> 0 (unit_get_health sheed))
  5326.                                 (begin
  5327.                                     (ai_place driver/banshee)
  5328.                                     (sleep 1)
  5329.                                     (object_create_anew sheed)
  5330.                                     (sleep 1)
  5331.                                     (vehicle_load_magic sheed "B-driver" (ai_actors driver/banshee))
  5332.                                     (sleep_until (vehicle_test_seat_list sheed "B-driver" (ai_actors driver/banshee)) 5)
  5333.                                     (ai_migrate driver/banshee 2_chronoshee)
  5334.                                     (object_teleport sheed 2_vflagd)
  5335.                                 )              
  5336.                             )
  5337.                             (if (> 0 (unit_get_health sheec))
  5338.                                 (begin
  5339.                                     (ai_place driver/banshee)
  5340.                                     (sleep 1)
  5341.                                     (object_create_anew sheec)
  5342.                                     (sleep 1)
  5343.                                     (vehicle_load_magic sheec "B-driver" (ai_actors driver/banshee))
  5344.                                     (sleep_until (vehicle_test_seat_list sheec "B-driver" (ai_actors driver/banshee)) 5)
  5345.                                     (ai_migrate driver/banshee 2_chronoshee)
  5346.                                     (object_teleport sheec 2_vflagd)
  5347.                                 )              
  5348.                             )
  5349.                         )
  5350.                        
  5351.                     )
  5352.                 )
  5353.         )
  5354. )
  5355.    
  5356.  
  5357. (script continuous 2_warthog
  5358.     (sleep 90)
  5359.     (sleep_until (= 2 (structure_bsp_index)) 5)
  5360.    
  5361.         (if (and (= 2 (structure_bsp_index))(= 0 (unit_get_health mhoga)))
  5362.             (begin
  5363.                 (if (not (vehicle_test_seat_list mhoga "M-driver" (ai_actors 2_mombasamarine/driver)))
  5364.                     (begin
  5365.                         (vehicle_unload mhoga "")
  5366.                         (sleep 5)
  5367.                         (unit_kill mhoga)
  5368.                         (object_destroy mhoga)
  5369.                     )
  5370.                 )
  5371.             )
  5372.         )
  5373.        
  5374.         (if (and (= 2 (structure_bsp_index))(= 0 (unit_get_health mhogb)))
  5375.             (begin
  5376.                 (if (not (vehicle_test_seat_list mhogb "M-driver" (ai_actors 2_mombasamarine/driver)))
  5377.                     (begin
  5378.                         (vehicle_unload mhogb "")
  5379.                         (sleep 5)
  5380.                         (unit_kill mhogb)
  5381.                         (object_destroy mhogb)
  5382.                     )
  5383.                 )
  5384.             )
  5385.         )
  5386.        
  5387.         (if (and (= 2 (structure_bsp_index))(= 0 (unit_get_health mhogc)))
  5388.             (begin
  5389.                 (if (not (vehicle_test_seat_list mhogc "M-driver" (ai_actors 2_chronomarine/driver)))
  5390.                     (begin
  5391.                         (vehicle_unload mhogc "")
  5392.                         (sleep 5)
  5393.                         (unit_kill mhogc)
  5394.                         (object_destroy mhogc)
  5395.                     )
  5396.                 )
  5397.             )
  5398.         )
  5399.        
  5400.        
  5401.         (if (and (= 2 (structure_bsp_index))(= 0 (unit_get_health mhogd)))
  5402.             (begin
  5403.                 (if (not (vehicle_test_seat_list mhogd "M-driver" (ai_actors 2_chronomarine/driver)))
  5404.                     (begin
  5405.                         (vehicle_unload mhogd "")
  5406.                         (sleep 5)
  5407.                         (unit_kill mhogd)
  5408.                         (object_destroy mhogd)
  5409.                     )
  5410.                 )
  5411.             )
  5412.         )
  5413.        
  5414.         (if (and (= 2 (structure_bsp_index)) (or (> 0 (unit_get_health mhoga)) (> 0 (unit_get_health mhogb)) ) (or (volume_test_objects 2mombafront (players)) (volume_test_objects 2mombaback (players))) )
  5415.             (begin
  5416.                 (if (volume_test_objects 2mombaback (players))
  5417.                     (begin
  5418.                         (cond
  5419.                             ((> 0 (unit_get_health mhoga))
  5420.                                 (begin
  5421.                        
  5422.                                     (ai_place warthog_ai/driver)
  5423.                                     (sleep 1)
  5424.                                     (object_create_anew mhoga)
  5425.                                     (sleep 1)
  5426.                                     (vehicle_load_magic mhoga "driver" (ai_actors warthog_ai/driver))
  5427.                                     (sleep_until (vehicle_test_seat_list mhoga "M-driver" (ai_actors warthog_ai/driver)) 5)
  5428.                                     (ai_migrate warthog_ai/driver 2_mombasamarine/driver)
  5429.                                     (ai_place warthog_ai/passenger)
  5430.                                     (ai_place warthog_ai/passenger)
  5431.                                     (sleep 1)
  5432.                                     (vehicle_load_magic mhoga "" (ai_actors warthog_ai/passenger))
  5433.                                     (ai_migrate warthog_ai/passenger 2_mombasamarine/warthog)
  5434.                                     (object_teleport mhoga 2_vflaga)
  5435.                                 )
  5436.                             )
  5437.                            
  5438.                             ((> 0 (unit_get_health mhogb))
  5439.                                 (begin
  5440.                                     (ai_place warthog_ai/driver)
  5441.                                     (sleep 1)
  5442.                                     (object_create_anew mhogb)
  5443.                                     (sleep 1)
  5444.                                     (vehicle_load_magic mhogb "driver" (ai_actors warthog_ai/driver))
  5445.                                     (sleep_until (vehicle_test_seat_list mhogb "M-driver" (ai_actors warthog_ai/driver)) 5)
  5446.                                     (ai_migrate warthog_ai/driver 2_mombasamarine/driver)
  5447.                                     (ai_place warthog_ai/passenger)
  5448.                                     (ai_place warthog_ai/passenger)
  5449.                                     (sleep 1)
  5450.                                     (vehicle_load_magic mhogb "" (ai_actors warthog_ai/passenger))
  5451.                                     (ai_migrate warthog_ai/passenger 2_mombasamarine/warthog)
  5452.                                     (object_teleport mhogb 2_vflaga)                           
  5453.                                 )
  5454.                             )
  5455.                         )
  5456.                     )
  5457.                 )
  5458.                 (if (volume_test_objects 2mombafront (players))
  5459.                     (begin
  5460.                         (cond
  5461.                             ((> 0 (unit_get_health mhoga))
  5462.                                 (begin
  5463.                        
  5464.                                     (ai_place warthog_ai/driver)
  5465.                                     (sleep 1)
  5466.                                     (object_create_anew mhoga)
  5467.                                     (sleep 1)
  5468.                                     (vehicle_load_magic mhoga "driver" (ai_actors warthog_ai/driver))
  5469.                                     (sleep_until (vehicle_test_seat_list mhoga "M-driver" (ai_actors warthog_ai/driver)) 5)
  5470.                                     (ai_migrate warthog_ai/driver 2_mombasamarine/driver)
  5471.                                     (ai_place warthog_ai/passenger)
  5472.                                     (ai_place warthog_ai/passenger)
  5473.                                     (sleep 1)
  5474.                                     (vehicle_load_magic mhoga "" (ai_actors warthog_ai/passenger))
  5475.                                     (ai_migrate warthog_ai/passenger 2_mombasamarine/warthog)
  5476.                                     (object_teleport mhoga 2_vflagb)
  5477.                                 )
  5478.                             )
  5479.                            
  5480.                             ((> 0 (unit_get_health mhogb))
  5481.                                 (begin
  5482.                                     (ai_place warthog_ai/driver)
  5483.                                     (sleep 1)
  5484.                                     (object_create_anew mhogb)
  5485.                                     (sleep 1)
  5486.                                     (vehicle_load_magic mhogb "driver" (ai_actors warthog_ai/driver))
  5487.                                     (sleep_until (vehicle_test_seat_list mhogb "M-driver" (ai_actors warthog_ai/driver)) 5)
  5488.                                     (ai_migrate warthog_ai/driver 2_mombasamarine/driver)
  5489.                                     (ai_place warthog_ai/passenger)
  5490.                                     (ai_place warthog_ai/passenger)
  5491.                                     (sleep 1)
  5492.                                     (vehicle_load_magic mhogb "" (ai_actors warthog_ai/passenger))
  5493.                                     (ai_migrate warthog_ai/passenger 2_mombasamarine/warthog)
  5494.                                     (object_teleport mhogb 2_vflagb)                           
  5495.                                 )
  5496.                             )
  5497.                         )
  5498.                     )
  5499.                 )
  5500.        
  5501.             )
  5502.         )
  5503.        
  5504.         (if (and (= 2 (structure_bsp_index)) (or (> 0 (unit_get_health mhogc)) (> 0 (unit_get_health mhogd)) ) (volume_test_objects 2chronopolis (players)) )
  5505.             (begin
  5506.                 (if (volume_test_objects 2chronobox (players))
  5507.                     (begin
  5508.                         (cond
  5509.                             ((> 0 (unit_get_health mhogc))
  5510.                                 (begin
  5511.                        
  5512.                                     (ai_place warthog_ai/driver)
  5513.                                     (sleep 1)
  5514.                                     (object_create_anew mhogc)
  5515.                                     (sleep 1)
  5516.                                     (vehicle_load_magic mhogc "driver" (ai_actors warthog_ai/driver))
  5517.                                     (sleep_until (vehicle_test_seat_list mhogc "M-driver" (ai_actors warthog_ai/driver)) 5)
  5518.                                     (ai_migrate warthog_ai/driver 2_chronomarine/driver)
  5519.                                     (ai_place warthog_ai/passenger)
  5520.                                     (ai_place warthog_ai/passenger)
  5521.                                     (sleep 1)
  5522.                                     (vehicle_load_magic mhogc "" (ai_actors warthog_ai/passenger))
  5523.                                     (ai_migrate warthog_ai/passenger 2_chronomarine/warthog)
  5524.                                     (object_teleport mhogc 2_vflagc)
  5525.                                 )
  5526.                             )
  5527.                            
  5528.                             ((> 0 (unit_get_health mhogd))
  5529.                                 (begin
  5530.                                     (ai_place warthog_ai/driver)
  5531.                                     (sleep 1)
  5532.                                     (object_create_anew mhogd)
  5533.                                     (sleep 1)
  5534.                                     (vehicle_load_magic mhogd "driver" (ai_actors warthog_ai/driver))
  5535.                                     (sleep_until (vehicle_test_seat_list mhogd "M-driver" (ai_actors warthog_ai/driver)) 5)
  5536.                                     (ai_migrate warthog_ai/driver 2_chronomarine/driver)
  5537.                                     (ai_place warthog_ai/passenger)
  5538.                                     (ai_place warthog_ai/passenger)
  5539.                                     (sleep 1)
  5540.                                     (vehicle_load_magic mhogd "" (ai_actors warthog_ai/passenger))
  5541.                                     (ai_migrate warthog_ai/passenger 2_chronomarine/warthog)
  5542.                                     (object_teleport mhogd 2_vflagc)                           
  5543.                                 )
  5544.                             )
  5545.                         )
  5546.                     )
  5547.                     (begin              ;;this is the ELSE half, which gets played if the player is not in chronobox.
  5548.                         (cond
  5549.                             ((> 0 (unit_get_health mhogc))
  5550.                                 (begin
  5551.                        
  5552.                                     (ai_place warthog_ai/driver)
  5553.                                     (sleep 1)
  5554.                                     (object_create_anew mhogc)
  5555.                                     (sleep 1)
  5556.                                     (vehicle_load_magic mhogc "driver" (ai_actors warthog_ai/driver))
  5557.                                     (sleep_until (vehicle_test_seat_list mhogc "M-driver" (ai_actors warthog_ai/driver)) 5)
  5558.                                     (ai_migrate warthog_ai/driver 2_chronomarine/driver)
  5559.                                     (ai_place warthog_ai/passenger)
  5560.                                     (ai_place warthog_ai/passenger)
  5561.                                     (sleep 1)
  5562.                                     (vehicle_load_magic mhogc "" (ai_actors warthog_ai/passenger))
  5563.                                     (ai_migrate warthog_ai/passenger 2_chronomarine/warthog)
  5564.                                     (object_teleport mhogc 2_vflagd)
  5565.                                 )
  5566.                             )
  5567.                            
  5568.                             ((> 0 (unit_get_health mhogd))
  5569.                                 (begin
  5570.                                     (ai_place warthog_ai/driver)
  5571.                                     (sleep 1)
  5572.                                     (object_create_anew mhogd)
  5573.                                     (sleep 1)
  5574.                                     (vehicle_load_magic mhogd "driver" (ai_actors warthog_ai/driver))
  5575.                                     (sleep_until (vehicle_test_seat_list mhogd "M-driver" (ai_actors warthog_ai/driver)) 5)
  5576.                                     (ai_migrate warthog_ai/driver 2_chronomarine/driver)
  5577.                                     (ai_place warthog_ai/passenger)
  5578.                                     (ai_place warthog_ai/passenger)
  5579.                                     (sleep 1)
  5580.                                     (vehicle_load_magic mhogd "" (ai_actors warthog_ai/passenger))
  5581.                                     (ai_migrate warthog_ai/passenger 2_chronomarine/warthog)
  5582.                                     (object_teleport mhogd 2_vflagd)                           
  5583.                                 )
  5584.                             )
  5585.                         )
  5586.                     )
  5587.                 )
  5588.            
  5589.             )
  5590.         )
  5591. )
  5592.  
  5593.  
  5594. (script continuous 3_warthog
  5595.     (sleep 90)
  5596.     (sleep_until (= 3 (structure_bsp_index)) 5)
  5597.    
  5598.         (if (and (= 3 (structure_bsp_index))(= 0 (unit_get_health mhoga)))
  5599.             (begin
  5600.                 (if (not (vehicle_test_seat_list mhoga "M-driver" (ai_actors 3_warthog/driver)))
  5601.                     (begin
  5602.                         (vehicle_unload mhoga "")
  5603.                         (sleep 5)
  5604.                         (unit_kill mhoga)
  5605.                         (object_destroy mhoga)
  5606.                     )
  5607.                 )
  5608.             )
  5609.         )
  5610.        
  5611.         (if (and (= 3 (structure_bsp_index))(= 0 (unit_get_health mhogb)))
  5612.             (begin
  5613.                 (if (not (vehicle_test_seat_list mhogb "M-driver" (ai_actors 3_warthog/driver)))
  5614.                     (begin
  5615.                         (vehicle_unload mhogb "")
  5616.                         (sleep 5)
  5617.                         (unit_kill mhogb)
  5618.                         (object_destroy mhogb)
  5619.                     )
  5620.                 )
  5621.             )
  5622.         )
  5623.        
  5624.         (if (and (= 3 (structure_bsp_index)) (or (> 0 (unit_get_health mhoga)) (> 0 (unit_get_health mhogb)) ))
  5625.             (begin
  5626.                 (if (not (volume_test_objects 3front (players)))
  5627.                     (begin
  5628.                         (cond
  5629.                             ((> 0 (unit_get_health mhoga))
  5630.                                 (begin
  5631.                        
  5632.                                     (ai_place warthog_ai/driver)
  5633.                                     (sleep 1)
  5634.                                     (object_create_anew mhoga)
  5635.                                     (sleep 1)
  5636.                                     (vehicle_load_magic mhoga "driver" (ai_actors warthog_ai/driver))
  5637.                                     (sleep_until (vehicle_test_seat_list mhoga "M-driver" (ai_actors warthog_ai/driver)) 5)
  5638.                                     (ai_migrate warthog_ai/driver 3_warthog/driver)
  5639.                                     (ai_place warthog_ai/passenger)
  5640.                                     (ai_place warthog_ai/passenger)
  5641.                                     (sleep 1)
  5642.                                     (vehicle_load_magic mhoga "" (ai_actors warthog_ai/passenger))
  5643.                                     (ai_migrate warthog_ai/passenger 3_warthog/warthog)
  5644.                                     (object_teleport mhoga 3_vflaga)
  5645.                                 )
  5646.                             )
  5647.                            
  5648.                             ((> 0 (unit_get_health mhogb))
  5649.                                 (begin
  5650.                                     (ai_place warthog_ai/driver)
  5651.                                     (sleep 1)
  5652.                                     (object_create_anew mhogb)
  5653.                                     (sleep 1)
  5654.                                     (vehicle_load_magic mhogb "driver" (ai_actors warthog_ai/driver))
  5655.                                     (sleep_until (vehicle_test_seat_list mhogb "M-driver" (ai_actors warthog_ai/driver)) 5)
  5656.                                     (ai_migrate warthog_ai/driver 3_warthog/driver)
  5657.                                     (ai_place warthog_ai/passenger)
  5658.                                     (ai_place warthog_ai/passenger)
  5659.                                     (sleep 1)
  5660.                                     (vehicle_load_magic mhogb "" (ai_actors warthog_ai/passenger))
  5661.                                     (ai_migrate warthog_ai/passenger 3_warthog/warthog)
  5662.                                     (object_teleport mhogb 3_vflaga)                           
  5663.                                 )
  5664.                             )
  5665.                         )
  5666.                     )
  5667.                 )
  5668.                 (if (not (volume_test_objects 3back (players)))
  5669.                     (begin
  5670.                         (cond
  5671.                             ((> 0 (unit_get_health mhoga))
  5672.                                 (begin
  5673.                        
  5674.                                     (ai_place warthog_ai/driver)
  5675.                                     (sleep 1)
  5676.                                     (object_create_anew mhoga)
  5677.                                     (sleep 1)
  5678.                                     (vehicle_load_magic mhoga "driver" (ai_actors warthog_ai/driver))
  5679.                                     (sleep_until (vehicle_test_seat_list mhoga "M-driver" (ai_actors warthog_ai/driver)) 5)
  5680.                                     (ai_migrate warthog_ai/driver 3_warthog/driver)
  5681.                                     (ai_place warthog_ai/passenger)
  5682.                                     (ai_place warthog_ai/passenger)
  5683.                                     (sleep 1)
  5684.                                     (vehicle_load_magic mhoga "" (ai_actors warthog_ai/passenger))
  5685.                                     (ai_migrate warthog_ai/passenger 3_warthog/warthog)
  5686.                                     (object_teleport mhoga 3_vflagb)
  5687.                                 )
  5688.                             )
  5689.                            
  5690.                             ((> 0 (unit_get_health mhogb))
  5691.                                 (begin
  5692.                                     (ai_place warthog_ai/driver)
  5693.                                     (sleep 1)
  5694.                                     (object_create_anew mhogb)
  5695.                                     (sleep 1)
  5696.                                     (vehicle_load_magic mhogb "driver" (ai_actors warthog_ai/driver))
  5697.                                     (sleep_until (vehicle_test_seat_list mhogb "M-driver" (ai_actors warthog_ai/driver)) 5)
  5698.                                     (ai_migrate warthog_ai/driver 3_warthog/driver)
  5699.                                     (ai_place warthog_ai/passenger)
  5700.                                     (ai_place warthog_ai/passenger)
  5701.                                     (sleep 1)
  5702.                                     (vehicle_load_magic mhogb "" (ai_actors warthog_ai/passenger))
  5703.                                     (ai_migrate warthog_ai/passenger 3_warthog/warthog)
  5704.                                     (object_teleport mhogb 3_vflagb)                           
  5705.                                 )
  5706.                             )
  5707.                         )
  5708.                     )
  5709.                 )
  5710.        
  5711.             )
  5712.         )      
  5713. )
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720. ;;;;END OF MARINE CONTINUOUS SCRIPTS
  5721. ;;;;END OF MARINE CONTINUOUS SCRIPTS
  5722.  
  5723.  
  5724.  
  5725.  
  5726. ;;;;END OF MARINE CONTINUOUS SCRIPTS
  5727. ;;;;END OF MARINE CONTINUOUS SCRIPTS
  5728. ;;;;END OF MARINE CONTINUOUS SCRIPTS
  5729. ;;;;END OF MARINE CONTINUOUS SCRIPTS
  5730.  
  5731.    
  5732. (script continuous cleanup
  5733.  
  5734.    
  5735.     (if (and (= 0 shipcount) (= 0 (structure_bsp_index))(< 18 (+ (ai_living_count 0_turf) (ai_living_count 0_jalley) (ai_living_count 0_courtyard))))
  5736.         (begin
  5737.                 (cond
  5738.                     ((volume_test_objects 0base (players))
  5739.                         (ai_kill_silent 0_jalley)
  5740.                     )
  5741.                     ((volume_test_objects 0court (players))
  5742.                         (begin
  5743.                             (ai_kill_silent 0_turf)
  5744.                            
  5745.                         )
  5746.                     )
  5747.                     ((volume_test_objects 0alley (players))
  5748.                         (ai_kill_silent 0_courtyard)
  5749.                     )
  5750.                     ((volume_test_objects 0town (players))
  5751.                         (begin
  5752.                             (ai_kill_silent 0_courtyard)
  5753.                         )
  5754.                     )
  5755.                     ((volume_test_objects 0turf (players))
  5756.                         (begin
  5757.                             (ai_kill_silent 0_courtyard)
  5758.                         )
  5759.                     )
  5760.                     ((volume_test_objects 0exit (players))
  5761.                         (sleep 1)
  5762.                     )
  5763.                     ((volume_test_objects 0overpass (players))
  5764.                         (ai_kill_silent 0_turf)
  5765.                     )
  5766.                 )
  5767.  
  5768.         )
  5769.     )
  5770.    
  5771.     (if (and (= 1 (structure_bsp_index))(< 18 (+ (ai_living_count 1_headlong) (ai_living_count 1_ivory) (ai_living_count 1_interior) (ai_living_count 1_terminal) (ai_living_count 1_parking))))
  5772.         (begin
  5773.                 (cond
  5774.                     ((volume_test_objects 1parkinglot (players))
  5775.                         (ai_kill_silent 1_headlong)
  5776.                         (ai_kill_silent 1_ivory)
  5777.                     )
  5778.                     ((volume_test_objects 1headlong (players))
  5779.                         (ai_kill_silent 1_parking)
  5780.                     )
  5781.                    
  5782.                 )
  5783.  
  5784.         )
  5785.     )
  5786.    
  5787.     (if (and (= 2 (structure_bsp_index))(< 18 (+ (ai_living_count 2_newmombasa) (ai_living_count 2_mombasarear) (ai_living_count 2_loadingbay) (ai_living_count 2_chronoparking) (ai_living_count 2_chronorear))))
  5788.         (begin
  5789.             (cond
  5790.                 ((or (volume_test_objects 2mombaback (players)) (volume_test_objects 2mombafront (players)))
  5791.                     (ai_kill_silent 2_chronoparking)
  5792.                     (ai_kill_silent 2_chronorear)
  5793.                     (ai_kill_silent 2_chronoghosts)
  5794.                     (ai_kill_silent 2_chronomarine)
  5795.                    
  5796.                    
  5797.                    
  5798.                     (if (volume_test_object 2chronopolis wraitha)
  5799.                         (object_destroy wraitha)
  5800.                     )
  5801.                    
  5802.                     (if (volume_test_object 2chronopolis wraithb)
  5803.                         (object_destroy wraithb)
  5804.                     )
  5805.                    
  5806.                     (if (volume_test_object 2chronopolis ghosta)
  5807.                         (object_destroy ghosta)
  5808.                     )
  5809.                    
  5810.                     (if (volume_test_object 2chronopolis ghostb)
  5811.                         (object_destroy ghostb)
  5812.                     )
  5813.                    
  5814.                     (if (volume_test_object 2chronopolis ghostc)
  5815.                         (object_destroy ghostc)
  5816.                     )
  5817.                    
  5818.                     (if (volume_test_object 2chronopolis ghostd)
  5819.                         (object_destroy ghostd)
  5820.                     )
  5821.                    
  5822.                 )
  5823.                 ((volume_test_objects 2chronopolis (players))
  5824.                     (ai_kill_silent 2_newmombasa)
  5825.                     (ai_kill_silent 2_mombasarear)
  5826.                     (ai_kill_silent 2_loadingbay)
  5827.                     (ai_kill_silent 2_mombasaghosts)
  5828.                     (ai_kill_silent 2_mombasamarine)
  5829.                    
  5830.                     (if (or (volume_test_object 2mombafront mhoga) (volume_test_object 2mombaback mhoga))
  5831.                         (object_destroy mhoga)
  5832.                     )
  5833.                    
  5834.                     (if (or (volume_test_object 2mombafront mhogb) (volume_test_object 2mombaback mhogb))
  5835.                         (object_destroy mhogb)
  5836.                     )
  5837.                    
  5838.                     (if (or (volume_test_object 2mombafront wraitha) (volume_test_object 2mombaback wraitha))
  5839.                         (object_destroy wraitha)
  5840.                     )
  5841.                    
  5842.                     (if (or (volume_test_object 2mombafront wraithb) (volume_test_object 2mombaback wraithb))
  5843.                         (object_destroy wraithb)
  5844.                     )
  5845.                    
  5846.                     (if (or (volume_test_object 2mombafront ghosta) (volume_test_object 2mombaback ghosta))
  5847.                         (object_destroy ghosta)
  5848.                     )
  5849.                    
  5850.                     (if (or (volume_test_object 2mombafront ghostb) (volume_test_object 2mombaback ghostb))
  5851.                         (object_destroy ghostb)
  5852.                     )
  5853.                    
  5854.                     (if (or (volume_test_object 2mombafront ghostc) (volume_test_object 2mombaback ghostc))
  5855.                         (object_destroy ghostc)
  5856.                     )
  5857.                    
  5858.                     (if (or (volume_test_object 2mombafront ghostd) (volume_test_object 2mombaback ghostd))
  5859.                         (object_destroy ghostd)
  5860.                     )                  
  5861.                    
  5862.                 )
  5863.                
  5864.             )
  5865.         )
  5866.     )
  5867. )
  5868.  
  5869.  
  5870.  
  5871.  
  5872. ;;This script is to help guarantee engagements between A.I. across the map. The BSP sections are large and open, this isn't a small skirmish
  5873. ;; but rather an invasion of a planet. There will be large battles constantly that the A.I. must know about and actively participate in. For this reason
  5874. ;; all A.I. are aware of all other A.I. at all times, using magically_see_encounter.
  5875.  
  5876.  
  5877. (script continuous blood_lust
  5878.  
  5879.     (if (= 0 (structure_bsp_index))
  5880.    
  5881.         (begin
  5882.        
  5883.             (ai_magically_see_encounter 0_jalley 0_cybase)
  5884.             (ai_magically_see_encounter 0_jalley 0_oldtown)
  5885.             (ai_magically_see_encounter 0_jalley 0_underpass)
  5886.             (ai_magically_see_encounter 0_cybase 0_jalley)
  5887.             (ai_magically_see_encounter 0_oldtown 0_jalley)
  5888.             (ai_magically_see_encounter 0_underpass 0_jalley)
  5889.            
  5890.            
  5891.             (ai_magically_see_encounter 0_turf 0_cybase)
  5892.             (ai_magically_see_encounter 0_turf 0_oldtown)
  5893.             (ai_magically_see_encounter 0_turf 0_underpass)
  5894.             (ai_magically_see_encounter 0_cybase 0_turf)
  5895.             (ai_magically_see_encounter 0_oldtown 0_turf)
  5896.             (ai_magically_see_encounter 0_underpass 0_turf)
  5897.            
  5898.             (ai_magically_see_encounter 0_courtyard 0_cybase)
  5899.             (ai_magically_see_encounter 0_courtyard 0_oldtown)
  5900.             (ai_magically_see_encounter 0_courtyard 0_underpass)
  5901.             (ai_magically_see_encounter 0_cybase 0_courtyard)
  5902.             (ai_magically_see_encounter 0_oldtown 0_courtyard)
  5903.             (ai_magically_see_encounter 0_underpass 0_courtyard)
  5904.            
  5905.            
  5906.        
  5907.         )
  5908.    
  5909.    
  5910.     )
  5911.    
  5912.    
  5913.     (if (= 1 (structure_bsp_index))
  5914.    
  5915.         (begin
  5916.        
  5917.             (ai_magically_see_encounter 1_ivory 1_base)
  5918.             (ai_magically_see_encounter 1_ivory 1_station)
  5919.             (ai_magically_see_encounter 1_ivory 1_tower)
  5920.             (ai_magically_see_encounter 1_base 1_ivory)
  5921.             (ai_magically_see_encounter 1_station 1_ivory)
  5922.             (ai_magically_see_encounter 1_tower 1_ivory)
  5923.            
  5924.            
  5925.             (ai_magically_see_encounter 1_headlong 1_base)
  5926.             (ai_magically_see_encounter 1_headlong 1_station)
  5927.             (ai_magically_see_encounter 1_headlong 1_tower)
  5928.             (ai_magically_see_encounter 1_base 1_headlong)
  5929.             (ai_magically_see_encounter 1_station 1_headlong)
  5930.             (ai_magically_see_encounter 1_tower 1_headlong)
  5931.            
  5932.             (ai_magically_see_encounter 1_terminal 1_base)
  5933.             (ai_magically_see_encounter 1_terminal 1_station)
  5934.             (ai_magically_see_encounter 1_terminal 1_tower)
  5935.             (ai_magically_see_encounter 1_base 1_terminal)
  5936.             (ai_magically_see_encounter 1_station 1_terminal)
  5937.             (ai_magically_see_encounter 1_tower 1_terminal)
  5938.            
  5939.             (ai_magically_see_encounter 1_parking 1_base)
  5940.             (ai_magically_see_encounter 1_parking 1_station)
  5941.             (ai_magically_see_encounter 1_parking 1_tower)
  5942.             (ai_magically_see_encounter 1_base 1_parking)
  5943.             (ai_magically_see_encounter 1_station 1_parking)
  5944.             (ai_magically_see_encounter 1_tower 1_parking)
  5945.            
  5946.             (ai_magically_see_encounter 1_interior 1_base)
  5947.             (ai_magically_see_encounter 1_interior 1_station)
  5948.             (ai_magically_see_encounter 1_interior 1_tower)
  5949.             (ai_magically_see_encounter 1_base 1_interior)
  5950.             (ai_magically_see_encounter 1_station 1_interior)
  5951.             (ai_magically_see_encounter 1_tower 1_interior)
  5952.            
  5953.            
  5954.        
  5955.         )
  5956.    
  5957.    
  5958.     )
  5959.    
  5960.     (if (= 2 (structure_bsp_index))
  5961.    
  5962.         (begin
  5963.        
  5964.             (ai_magically_see_encounter 2_newmombasa 2_base)
  5965.             (ai_magically_see_encounter 2_newmombasa 2_mombasamarine)
  5966.             (ai_magically_see_encounter 2_newmombasa 2_chronomarine)
  5967.             (ai_magically_see_encounter 2_base 2_newmombasa)
  5968.             (ai_magically_see_encounter 2_mombasamarine 2_newmombasa)
  5969.             (ai_magically_see_encounter 2_chronomarine 2_newmombasa)
  5970.        
  5971.             (ai_magically_see_encounter 2_chronoghosts 2_base)
  5972.             (ai_magically_see_encounter 2_chronoghosts 2_mombasamarine)
  5973.             (ai_magically_see_encounter 2_chronoghosts 2_chronomarine)
  5974.             (ai_magically_see_encounter 2_base 2_chronoghosts)
  5975.             (ai_magically_see_encounter 2_mombasamarine 2_chronoghosts)
  5976.             (ai_magically_see_encounter 2_chronomarine 2_chronoghosts)
  5977.        
  5978.             (ai_magically_see_encounter 2_mombasaghosts 2_base)
  5979.             (ai_magically_see_encounter 2_mombasaghosts 2_mombasamarine)
  5980.             (ai_magically_see_encounter 2_mombasaghosts 2_chronomarine)
  5981.             (ai_magically_see_encounter 2_base 2_mombasaghosts)
  5982.             (ai_magically_see_encounter 2_mombasamarine 2_mombasaghosts)
  5983.             (ai_magically_see_encounter 2_chronomarine 2_mombasaghosts)        
  5984.            
  5985.             (ai_magically_see_encounter 2_mombasarear 2_base)
  5986.             (ai_magically_see_encounter 2_mombasarear 2_mombasamarine)
  5987.             (ai_magically_see_encounter 2_mombasarear 2_chronomarine)
  5988.             (ai_magically_see_encounter 2_base 2_mombasarear)
  5989.             (ai_magically_see_encounter 2_mombasamarine 2_mombasarear)
  5990.             (ai_magically_see_encounter 2_chronomarine 2_mombasarear)
  5991.            
  5992.             (ai_magically_see_encounter 2_loadingbay 2_base)
  5993.             (ai_magically_see_encounter 2_loadingbay 2_mombasamarine)
  5994.             (ai_magically_see_encounter 2_loadingbay 2_chronomarine)
  5995.             (ai_magically_see_encounter 2_base 2_loadingbay)
  5996.             (ai_magically_see_encounter 2_mombasamarine 2_loadingbay)
  5997.             (ai_magically_see_encounter 2_chronomarine 2_loadingbay)
  5998.            
  5999.            
  6000.             (ai_magically_see_encounter 2_chronoparking 2_base)
  6001.             (ai_magically_see_encounter 2_chronoparking 2_mombasamarine)
  6002.             (ai_magically_see_encounter 2_chronoparking 2_chronomarine)
  6003.             (ai_magically_see_encounter 2_base 2_chronoparking)
  6004.             (ai_magically_see_encounter 2_mombasamarine 2_chronoparking)
  6005.             (ai_magically_see_encounter 2_chronomarine 2_chronoparking)
  6006.            
  6007.             (ai_magically_see_encounter 2_chronorear 2_base)
  6008.             (ai_magically_see_encounter 2_chronorear 2_mombasamarine)
  6009.             (ai_magically_see_encounter 2_chronorear 2_chronomarine)
  6010.             (ai_magically_see_encounter 2_base 2_chronorear)
  6011.             (ai_magically_see_encounter 2_mombasamarine 2_chronorear)
  6012.             (ai_magically_see_encounter 2_chronomarine 2_chronorear)
  6013.            
  6014.            
  6015.            
  6016.             (ai_magically_see_encounter 2_mombasamarine 2_mombasaghosts)
  6017.             (ai_magically_see_encounter 2_mombasaghosts 2_mombasamarine)
  6018.        
  6019.            
  6020.            
  6021.        
  6022.         )
  6023.    
  6024.    
  6025.     )
  6026.    
  6027.    
  6028.     (if (= 3 (structure_bsp_index))
  6029.    
  6030.         (begin
  6031.        
  6032.             (ai_magically_see_encounter 3_front 3_marinefront)
  6033.             (ai_magically_see_encounter 3_front 3_marinemid)
  6034.             (ai_magically_see_encounter 3_front 3_marineback)
  6035.             (ai_magically_see_encounter 3_back 3_warthog)
  6036.            
  6037.             (ai_magically_see_encounter 3_mid 3_marinefront)
  6038.             (ai_magically_see_encounter 3_mid 3_marinemid)
  6039.             (ai_magically_see_encounter 3_mid 3_marineback)
  6040.             (ai_magically_see_encounter 3_back 3_warthog)
  6041.            
  6042.             (ai_magically_see_encounter 3_back 3_marinefront)
  6043.             (ai_magically_see_encounter 3_back 3_marinemid)
  6044.             (ai_magically_see_encounter 3_back 3_marineback)
  6045.             (ai_magically_see_encounter 3_back 3_warthog)
  6046.        
  6047.             (ai_magically_see_encounter 3_marinefront 3_front)
  6048.             (ai_magically_see_encounter 3_marinefront 3_mid)
  6049.             (ai_magically_see_encounter 3_marinefront 3_back)
  6050.             (ai_magically_see_encounter 3_marinemid 3_ghost)
  6051.            
  6052.             (ai_magically_see_encounter 3_marinemid 3_front)
  6053.             (ai_magically_see_encounter 3_marinemid 3_mid)
  6054.             (ai_magically_see_encounter 3_marinemid 3_back)
  6055.             (ai_magically_see_encounter 3_marinemid 3_ghost)
  6056.            
  6057.             (ai_magically_see_encounter 3_marineback 3_front)
  6058.             (ai_magically_see_encounter 3_marineback 3_mid)
  6059.             (ai_magically_see_encounter 3_marineback 3_back)
  6060.             (ai_magically_see_encounter 3_marineback 3_ghost)
  6061.            
  6062.             (ai_magically_see_encounter 3_ghost 3_warthog)
  6063.             (ai_magically_see_encounter 3_warthog 3_ghost)
  6064.            
  6065.            
  6066.        
  6067.         )
  6068.    
  6069.    
  6070.     )
  6071.    
  6072.    
  6073.    
  6074.  
  6075.  
  6076. (sleep 30)
  6077.  
  6078. )
  6079.  
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.    
  6086.    
  6087. ;; The following script allows for the marines to "follow" the player around the map. Based on the location that the player is in, the marines will migrate to that encounter and use those firing points.
  6088.  
  6089. (script continuous 0_migration
  6090.    
  6091.     (cond
  6092.         ((volume_test_objects 0overpass (players))
  6093.             (begin
  6094.                 (ai_migrate 0_cybase 0_oldtown)
  6095.                 (ai_migrate 0_underpass 0_oldtown)
  6096.             )
  6097.         )
  6098.         ((volume_test_objects 0base (players))
  6099.             (begin
  6100.                 (ai_migrate 0_cybase 0_underpass)
  6101.                 (ai_migrate 0_oldtown 0_underpass)
  6102.                
  6103.             ))
  6104.         ((volume_test_objects 0court (players))
  6105.             (begin
  6106.                 (ai_migrate 0_underpass 0_cybase)
  6107.                 (ai_migrate 0_oldtown 0_cybase)
  6108.                 (ai_try_to_fight 0_cybase 0_courtyard)
  6109.             ))
  6110.         ((volume_test_objects 0alley (players))
  6111.             (begin
  6112.                 (ai_migrate 0_cybase 0_oldtown)
  6113.                 (ai_migrate 0_underpass 0_oldtown)
  6114.                 (ai_try_to_fight 0_oldtown 0_jalley)
  6115.             ))
  6116.         ((volume_test_objects 0town (players))
  6117.             (begin
  6118.                 (ai_migrate 0_cybase 0_underpass)
  6119.                 (ai_migrate 0_oldtown 0_underpass)
  6120.                 (ai_try_to_fight 0_underpass 0_turf)
  6121.             ))
  6122.         ((volume_test_objects 0turf (players))
  6123.             (begin
  6124.                 (ai_migrate 0_cybase 0_underpass)
  6125.                 (ai_migrate 0_oldtown 0_underpass)
  6126.                 (ai_try_to_fight 0_underpass 0_turf)
  6127.             ))
  6128.         ((volume_test_objects 0exit (players))
  6129.             (begin
  6130.                 (ai_migrate 0_underpass 0_cybase)
  6131.                 (ai_migrate 0_oldtown 0_cybase)
  6132.                 (ai_try_to_fight 0_cybase 0_courtyard)
  6133.                
  6134.             ))
  6135.     )
  6136. )
  6137.  
  6138. (script continuous 0_snipers
  6139.  
  6140.     (cond
  6141.             (
  6142.                 (volume_test_objects 0base (players))
  6143.                     (begin
  6144.                         (ai_kill_silent 0_snipers/jalley)
  6145.                         (ai_kill_silent 0_snipers/overpass)
  6146.                    
  6147.                         (if (> 2 (ai_living_count 0_snipers))
  6148.                         (ai_place 0_snipers/town)
  6149.                         )
  6150.                        
  6151.                    
  6152.                     )
  6153.             )
  6154.            
  6155.             (
  6156.                 (volume_test_objects 0court (players))
  6157.                     (begin
  6158.                         (ai_kill_silent 0_snipers/jalley)
  6159.                         (ai_kill_silent 0_snipers/town)
  6160.                    
  6161.                         (if (> 2 (ai_living_count 0_snipers))
  6162.                         (ai_place 0_snipers/courtyard)
  6163.                         )
  6164.                    
  6165.                     )
  6166.             )
  6167.            
  6168.             (
  6169.                 (volume_test_objects 0alley (players))
  6170.                     (begin
  6171.                         (ai_kill_silent 0_snipers/courtyard)
  6172.                                            
  6173.                         (if (> 2 (ai_living_count 0_snipers))
  6174.                         (ai_place 0_snipers/jalley)
  6175.                         )
  6176.                    
  6177.                     )
  6178.             )
  6179.            
  6180.             (
  6181.                 (volume_test_objects 0overpass (players))
  6182.                     (begin
  6183.                         (ai_kill_silent 0_snipers/courtyard)
  6184.                                            
  6185.                         (if (> 2 (ai_living_count 0_snipers))
  6186.                         (ai_place 0_snipers/jalley)
  6187.                         )
  6188.                    
  6189.                     )
  6190.             )
  6191.            
  6192.             (
  6193.                 (volume_test_objects 0town (players))
  6194.                     (begin
  6195.                         (ai_kill_silent 0_snipers/courtyard)
  6196.                         (ai_kill_silent 0_snipers/overpass)
  6197.                                            
  6198.                         (if (> 2 (ai_living_count 0_snipers))
  6199.                         (ai_place 0_snipers/town)
  6200.                         )
  6201.                    
  6202.                     )
  6203.             )
  6204.            
  6205.            
  6206.            
  6207.             (
  6208.                 (volume_test_objects 0turf (players))
  6209.                     (begin
  6210.                         (ai_kill_silent 0_snipers/courtyard)
  6211.                         (ai_kill_silent 0_snipers/overpass)
  6212.                                            
  6213.                         (if (> 2 (ai_living_count 0_snipers))
  6214.                         (ai_place 0_snipers/town)
  6215.                         )
  6216.                    
  6217.                     )
  6218.             )
  6219.            
  6220.        
  6221.             (
  6222.                 (volume_test_objects 0exit (players))
  6223.                     (begin
  6224.                         (ai_kill_silent 0_snipers/town)
  6225.                         (ai_kill_silent 0_snipers/overpass)
  6226.                         (ai_kill_silent 0_snipers/jalley)
  6227.                                            
  6228.                         (if (> 2 (ai_living_count 0_snipers))
  6229.                         (ai_place 0_snipers/town)
  6230.                         )
  6231.                    
  6232.                     )
  6233.             )
  6234.  
  6235.     )
  6236.        
  6237.     (if (> 2 (ai_living_count 0_snipers))
  6238.         (sleep 10)
  6239.         (sleep (* 30 60))
  6240.     )
  6241. )
  6242.  
  6243.  
  6244. (script continuous 1_snipers
  6245.  
  6246.     (cond
  6247.             (
  6248.                 (volume_test_objects 1parkinglot (players))
  6249.                     (begin
  6250.                         (ai_kill_silent 1_snipers/headlong)
  6251.                         (ai_kill_silent 1_snipers/park)
  6252.                    
  6253.                         (if (> 2 (ai_living_count 1_snipers))
  6254.                         (ai_place 1_snipers/train)
  6255.                         )
  6256.                        
  6257.                    
  6258.                     )
  6259.             )
  6260.            
  6261.             (
  6262.                 (volume_test_objects 1station (players))
  6263.                     (begin
  6264.                         (ai_kill_silent 1_snipers/headlong)
  6265.                         (ai_kill_silent 1_snipers/park)
  6266.                    
  6267.                         (if (> 2 (ai_living_count 1_snipers))
  6268.                         (ai_place 1_snipers/train)
  6269.                         )                      
  6270.                    
  6271.                     )
  6272.             )
  6273.            
  6274.             (
  6275.                 (volume_test_objects 1terminal (players))
  6276.                     (begin
  6277.                         (ai_kill_silent 1_snipers/headlong)
  6278.                        
  6279.                    
  6280.                         (if (> 2 (ai_living_count 1_snipers))
  6281.                         (ai_place 1_snipers/train)
  6282.                         )
  6283.                        
  6284.                    
  6285.                     )
  6286.             )
  6287.            
  6288.             (
  6289.                 (volume_test_objects 1park (players))
  6290.                     (begin
  6291.                         (if (> 2 (ai_living_count 1_snipers))
  6292.                         (ai_place 1_snipers/park)
  6293.                         )
  6294.                        
  6295.                    
  6296.                     )
  6297.             )
  6298.            
  6299.             (
  6300.                 (volume_test_objects 1headlong (players))
  6301.                     (begin
  6302.                         (ai_kill_silent 1_snipers/train)
  6303.                        
  6304.                    
  6305.                         (if (> 2 (ai_living_count 1_snipers))
  6306.                         (ai_place 1_snipers/headlong)
  6307.                         )
  6308.                        
  6309.                    
  6310.                     )
  6311.             )
  6312.            
  6313.            
  6314.            
  6315.             (
  6316.                 (volume_test_objects 1interiors (players))
  6317.                     (begin
  6318.                         (ai_kill_silent 1_snipers/train)
  6319.                         (ai_kill_silent 1_snipers/park)
  6320.                        
  6321.                    
  6322.                         (if (> 2 (ai_living_count 1_snipers))
  6323.                         (ai_place 1_snipers/headlong)
  6324.                         )
  6325.                        
  6326.                    
  6327.                     )
  6328.             )
  6329.            
  6330.        
  6331.             (
  6332.                 (volume_test_objects 1ivory (players))
  6333.                     (begin
  6334.                         (ai_kill_silent 1_snipers/train)
  6335.                         (ai_kill_silent 1_snipers/headlong)
  6336.                        
  6337.                    
  6338.                         (if (> 2 (ai_living_count 1_snipers))
  6339.                         (ai_place 1_snipers/park)
  6340.                         )
  6341.                        
  6342.                    
  6343.                     )
  6344.             )
  6345.  
  6346.     )
  6347.        
  6348.     (if (> 2 (ai_living_count 1_snipers))
  6349.         (sleep 10)
  6350.         (sleep (* 30 60))
  6351.     )
  6352. )
  6353.  
  6354.  
  6355.  
  6356. (script continuous 1_migration
  6357.    
  6358.     (cond
  6359.         ((volume_test_objects 1parkinglot (players))
  6360.             (begin
  6361.                 (ai_migrate 1_base 1_station)              
  6362.             )
  6363.         )
  6364.         ((volume_test_objects 1station (players))
  6365.             (begin
  6366.                 (ai_migrate 1_base 1_station)              
  6367.             )
  6368.         )
  6369.         ((volume_test_objects 1terminal (players))
  6370.             (begin
  6371.                 (ai_migrate 1_base 1_station)              
  6372.             )
  6373.         )
  6374.         ((volume_test_objects 1park (players))
  6375.             (begin
  6376.                 (ai_migrate 1_station 1_tower)     
  6377.                 (ai_migrate 1_base 1_tower)
  6378.             )
  6379.         )
  6380.         ((volume_test_objects 1headlong (players))
  6381.             (begin
  6382.                 (ai_migrate 1_station 1_base)              
  6383.             )
  6384.         )
  6385.         ((volume_test_objects 1interiors (players))
  6386.             (begin
  6387.                 (ai_migrate 1_station 1_base)              
  6388.             )
  6389.         )
  6390.         ((volume_test_objects 1ivory (players))
  6391.             (begin
  6392.                 (ai_migrate 1_base 1_tower)            
  6393.                 (ai_migrate 1_station 1_tower)             
  6394.             )
  6395.         )
  6396.     )
  6397. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement