Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.54 KB | None | 0 0
  1. DEFINE MISSIONS 4
  2. DEFINE MISSION 0 AT @INITIAL
  3. DEFINE MISSION 1 AT @CUTSCENE_1
  4. DEFINE MISSION 2 AT @TUT_MISSION_1
  5. DEFINE MISSION 3 AT @MISSION_2
  6.  
  7.  
  8. DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script
  9. //DEFINE SCRIPT {NAME} AT {LABEL} @
  10. DEFINE UNKNOWN_EMPTY_SEGMENT 0
  11. DEFINE UNKNOWN_THREADS_MEMORY 0
  12.  
  13. var
  14. $PLAYER_CHAR: Player
  15. end // var
  16. 03A4: name_thread 'MAIN'
  17. 01F0: set_max_wanted_level_to 6
  18. 0111: toggle_wasted_busted_check 0
  19. 00C0: set_current_time_hours_to 8 minutes_to 0
  20. 04E4: unknown_refresh_game_renderer_at 876.4393 1971.0162
  21. 03CB: set_rendering_origin_at 876.4393 1971.0162 11.4609
  22. 0053: $PLAYER_CHAR = create_player #NULL at 876.4393 1971.0162 11.4609
  23. 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR
  24. 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
  25. 0373: set_camera_directly_behind_player
  26. 01B6: set_weather 0
  27. 0001: wait 0 ms
  28. 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1
  29. 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2
  30. 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3
  31. 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0
  32. 070D: rebuild_player $PLAYER_CHAR
  33. 01B4: toggle_player $PLAYER_CHAR can_move 1
  34. 016A: fade 1 time 0
  35. 04BB: select_interior 0
  36. 0629: change_integer_stat 181 to 4
  37. 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
  38. 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
  39. 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here
  40. 0004: $DEFAULT_WAIT_TIME = 250
  41. 03E6: remove_text_box
  42. 0417: start_mission 0 // Initial
  43. wait 0
  44. 0417: start_mission 1 // Cutscene_1
  45. // put your create_thread commands here
  46. 00D7: create_thread @MissionTrigger
  47.  
  48. :MAIN_LOOP
  49. 0001: wait $DEFAULT_WAIT_TIME ms
  50. 0002: jump @MAIN_LOOP
  51.  
  52.  
  53.  
  54. // put your mods (threads) here
  55.  
  56. //-------------------------------------- MISSION SNIFFER
  57. // $TUT_MISSION_PASSED has to be cleared (0).
  58. // When you pass the mission, you have to raise $TUT_MISSIONS_PASSED.
  59.  
  60.  
  61.  
  62. :MissionTrigger
  63. thread "Mis_Trig"
  64.  
  65. $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)
  66.  
  67. repeat
  68. 0001: wait 0 ms
  69. if and
  70. player.Defined($PLAYER_CHAR)
  71. $ONMISSION == 0
  72. then
  73. if and
  74. 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot
  75. Player.Controllable($PLAYER_CHAR)
  76. $TUT_MISSIONS_PASSED == 0
  77. then
  78. $ONMISSION = 1
  79. 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smoke
  80. start_mission 2
  81. end
  82.  
  83. if and
  84. 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot
  85. Player.Controllable($PLAYER_CHAR)
  86. $TUT_MISSIONS_PASSED == 1
  87. then
  88. $ONMISSION = 1
  89. 00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2
  90. start_mission 3
  91. end
  92. end
  93. until $TUT_MISSIONS_PASSED == 2
  94.  
  95. marker.Disable($MARKER_SWEET_HOUSE)
  96.  
  97. //$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)
  98. // repeat
  99. // 0001: wait 0 ms
  100. // if and
  101. // player.Defined($PLAYER_CHAR)
  102. // $ONMISSION == 0
  103. // then
  104. // if and
  105. // 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot
  106. // Player.Controllable($PLAYER_CHAR)
  107. // $TUT_MISSIONS_PASSED == 2
  108. // then
  109. // $ONMISSION = 1
  110. // 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smoke
  111. // start_mission 2
  112. // end
  113. // end
  114. // until $TUT_MISSIONS_PASSED == 3
  115. //
  116. //marker.Disable($MARKER_RYDER_HOUSE)
  117.  
  118. end_thread
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. //-------------Mission 0---------------
  130. :Initial
  131. $A = 6000
  132. $B = 16000
  133. Actor.StorePos($PLAYER_ACTOR, $X, $Y, $Z)
  134.  
  135. $ONMISSION = 0
  136. $TUT_MISSIONS_PASSED = 0
  137.  
  138. $X_SWEET_HOUSE = 920.9996
  139. $Y_SWEET_HOUSE = 1985.3621
  140. $Z_SWEET_HOUSE = 10.8203
  141.  
  142. $X_RYDER_HOUSE = 893.4557
  143. $Y_RYDER_HOUSE = 1975.0697
  144. $Z_RYDER_HOUSE = 11.2338
  145.  
  146. // Change Player Skin
  147. if
  148. Model.Available(#NULL)
  149. 09C7: change_player $PLAYER_CHAR model_to #NULL
  150. Player.Build($PLAYER_CHAR)
  151. model.Load(#DNMOLC1) // Select Model Here 1/2
  152. 038B: load_requested_models
  153. 09C7: change_player $PLAYER_CHAR model_to #DNMOLC1 // Select Model Here 2/2
  154.  
  155. // Spawn Greenwood
  156. 014B: $PARKED_GREENWOO = init_parked_car_generator #GREENWOO -1 -1 1 alarm 0 door_lock 0 0 10000 at 920.5024 2011.5483 10.8039 angle 87.9706
  157. 014C: set_parked_car_generator $PARKED_GREENWO cars_to_generate_to 101
  158.  
  159. // Create Sphere
  160. //
  161. //if and
  162. // player.Defined($PLAYER_CHAR)
  163. // $ONMISSION == 0
  164. // $TUT_MISSIONS_PASSED == 1
  165. //then
  166. // marker.Disable($MARKER_SWEET_HOUSE)
  167. // $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)
  168. //end
  169.  
  170.  
  171. // Play Music
  172. //if and
  173. //$TUT_MISSIONS_PASSED = 0
  174. //$ONMISSION = 0
  175. //then
  176. //0AAC: 3@ = load_mp3 "CLEO\1.MP3"
  177. //0AAD: set_mp3 3@ perform_action 1
  178. //0AAE: release_mp3 3@
  179.  
  180.  
  181. end_thread
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. // -------------------------------------- Cutscene 1
  202. :CUTSCENE_1
  203. thread 'CUT 1'
  204. // Begin First Cutscene
  205. 04BB: select_interior 0
  206. 04E4: unknown_refresh_game_renderer_at 922.1453 1877.2123 10.8203
  207. Player.CanMove($PLAYER_CHAR, false)
  208. 02A3: enable_widescreen 1
  209. 015D: set_gamespeed 0.8
  210. 0936: set_camera 920.9642 2043.0486 14.6534 position_to 922.1453 1877.2123 10.8203 time $A drop_mode 0
  211. 0920: point_camera 1033.6105 1994.8458 15.6421 transverse_to 978.839 1783.0623 8.6484 time $A mode 0
  212. wait $A
  213. 0936: set_camera 880.4531 1983.7474 15.7471 position_to 879.5115 2058.2239 15.8454 time $B drop_mode 0
  214. 0920: point_camera 879.5115 2058.2239 15.8454 transverse_to 839.1807 1907.1328 10.8203 time $B mode 0
  215. wait $B
  216. 02A3: enable_widescreen 0
  217. Camera.Restore
  218. 015D: set_gamespeed 1.0
  219. Player.CanMove($PLAYER_CHAR, true)
  220. wait 50
  221. fade 1 100
  222.  
  223.  
  224.  
  225. // Teleport Player
  226. //00A1: put_actor $PLAYER_ACTOR at 164.336 -1757.727 6.804047
  227. //Actor.Angle($PLAYER_ACTOR) = 98.7008
  228. 04BB: select_interior 8
  229. 04FA: reset_interior 8 colors
  230. 0860: link_actor $PLAYER_ACTOR to_interior 8
  231. 04E4: unknown_refresh_game_renderer_at 2373.0745 -1126.7084 1050.875
  232. 00A1: put_actor $PLAYER_ACTOR at 2373.0745 -1126.7084 1050.875
  233.  
  234. // Second Cutscene in Interior
  235. 04BB: select interior 8
  236. Player.CanMove($PLAYER_CHAR, false)
  237. 04E4: unknown_refresh_game_renderer_at 2372.5469 -1121.7041 1051.3367
  238. 02A3: enable_widescreen 1
  239. 015D: set_gamespeed 0.8
  240. 0936: set_camera 2372.5469 -1121.7041 1051.3367 position_to 2375.7603 -1125.887 1050.8826 time $A drop_mode 0
  241. 0920: point_camera 2369.998 -1128.869 1050.875 transverse_to 2370.8088 -1127.2448 1051.875 time $A mode 0
  242. wait $A
  243. 02A3: enable_widescreen 0
  244. Camera.Restore
  245. 015D: set_gamespeed 1.0
  246. Player.CanMove($PLAYER_CHAR, true)
  247. wait 100
  248. fade 1 100
  249. 03E5: show_text_box 'HELP100'
  250.  
  251. end_thread
  252.  
  253.  
  254.  
  255. //-------------Mission 1---------------
  256. // Mission wrapper
  257. :TUT_MISSION_1
  258. thread 'TUT 1'
  259. gosub @TUT_MISSION_1_MAIN
  260. if wasted_or_busted
  261. then
  262. gosub @TUT_MISSION_1_FAIL
  263. end
  264. gosub @TUT_MISSION_1_CLEANUP
  265. end_thread
  266.  
  267. //-------------------------------------
  268. :TUT_MISSION_1_MAIN
  269. //Load models
  270. model.Load(#m4)
  271. model.Load(#BFYST)
  272. model.Load(#BMYST)
  273. model.Load(#TAMPA)
  274.  
  275. 038B: load_requested_models
  276.  
  277. :TUT_MISSION_1_LOAD
  278. wait 0 ms
  279. if and
  280. model.Available(#m4)
  281. model.Available(#BMYST)
  282. model.Available(#BFYST)
  283. model.Available(#TAMPA)
  284. 004D: jump_if_false @TUT_MISSION_1_LOAD
  285.  
  286. 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this
  287. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
  288.  
  289. 0674: set_car_model #TAMPA numberplate "PATRICK_"
  290. $car_num = car.Create(#TAMPA,956.7369, 2002.0457, 10.8203)
  291.  
  292.  
  293. $victim = Actor.Create(CIVFEMALE, #BFYST, 963.3641, 1981.4812, 10.8203)
  294. $innocent = Actor.Create(CIVMALE, #BMYST, 960.5291, 1975.7067, 10.8203)
  295. 0187: $victim_marker = create_marker_above_actor $victim
  296.  
  297. repeat
  298. wait 0 ms
  299. if actor.Dead($innocent)
  300. then
  301. jump @TUT_MISSION_1_FAIL
  302. end
  303. until actor.Dead($victim)
  304.  
  305. :TUT_MISSION_1_PASSED
  306. 0394: play_music 1
  307. $TUT_MISSIONS_PASSED += 1
  308. Player.Money($PLAYER_CHAR) += 10000
  309. 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 2500 style 1 // MISSION PASSED!~n~~w~$~1~
  310.  
  311. return
  312.  
  313. //-------------------------------------
  314. :TUT_MISSION_1_FAIL
  315. 00BA: show_text_styled GXT 'M_FAIL' time 2500 style 1 // ~r~MISSION FAILED!
  316. // Hier kun je alles kwijt wat moet gebeuren als de missie gefaald is. Bv. bepaalde dingen weer terugdraaien
  317. 0555: remove_weapon 31 from_actor $PLAYER_ACTOR
  318. return
  319.  
  320. //-------------------------------------
  321. :TUT_MISSION_1_CLEANUP
  322. $ONMISSION = 0
  323. // Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen
  324. // En om speciale settings voor deze missie terug te zetten naar normaal
  325. Marker.Disable($victim_marker)
  326. 010D: set_player $PLAYER_CHAR wanted_level_to 0
  327. model.Destroy(#BFYST)
  328. model.Destroy(#BMYST)
  329. model.Destroy(#M4)
  330. mission_cleanup
  331. return
  332.  
  333.  
  334.  
  335.  
  336. //-------------Mission 2---------------
  337. // Mission wrapper // Label for Mission 2 Wrapper
  338. :MISSION_2 // Create Thread Tut 2
  339. thread 'TUT 2' // First Gosub to :Mission_2_Main then after return continues below this line
  340. gosub @MISSION_2_MAIN // If Wasted Or Busted
  341. if wasted_or_busted // Then do the Following
  342. then // Second Gosub to :Mission_2_Fail then after return continues below this line
  343. gosub @MISSION_2_FAIL // end
  344. end // Third Gosub to :Mission_2_Cleanup after return continues below this line
  345. gosub @MISSION_2_CLEANUP // end_thread
  346. end_thread
  347.  
  348. //------------------------------------- // First Gosub sends us here
  349. :MISSION_2_MAIN // Label Mission_2_Main
  350. model.Load(#m4) // Load Model of M4 Gun
  351. model.Load(#BMYST)
  352. model.Load(#BFYST)
  353. :MISSION_2_LOAD // Label TUT_MISSION_2_LOAD for checking if Models are available
  354. wait 0 ms
  355. if and // If the following is true continue with the code:
  356. model.Available(#m4)
  357. model.Available(#BMYST)
  358. model.Available(#BFYST)
  359. 004D: jump_if_false @MISSION_2_LOAD // If the above is false jump to TUT_MISSION_1_Load
  360.  
  361. 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this // Give the Actor defined by the Variable Player Actor the Weapon labeled Nr. 31 (M4 GUN) with 1000 Ammo
  362. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
  363.  
  364.  
  365. $victim = Actor.Create(CIVFEMALE, #BFYST, 922.5363, 1966.5171, 10.8203) // Define a Variable that Creates an Actor with the Model Black Young Female at XYZ
  366. $innocent = Actor.Create(CIVMALE, #BMYST, 923.0659, 1975.2988, 10.8203) // Define a Variable that creates an innocent Actor with the Model Young Black Male at XYZ
  367. 0187: $victim_marker = create_marker_above_actor $victim // Define a Variable that creates a Marker above the Actor "Victim"
  368.  
  369. repeat
  370. wait 0 ms // (2) Repeat the following:
  371. if actor.Dead($innocent) // If the Innocent Actor is Dead
  372. then // then do the following:
  373. jump @MISSION_2_FAIL // jump @MISSION_2_Fail
  374. end // end
  375. until actor.Dead($victim) // (2) Until the Actor "Victim" is dead
  376.  
  377.  
  378.  
  379. //-------------------------------------
  380. :MISSION_2_PASSED // Label Mission_2_Passed
  381. Player.Money($PLAYER_CHAR) += 10000
  382. $TUT_MISSIONS_PASSED += 1 // Give The Player + 1000 Money
  383. 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 2500 style 1 // MISSION PASSED!~n~~w~$~1~ // Show Text Mission Passed
  384. 0394: play_music 1
  385. // This subroutine is executed when the mission is passed.
  386. // Give the rewards, and make new missions available if needed.
  387.  
  388. return // Return to First Gosub
  389.  
  390. //------------------------------------- // Second Gosub sends us here
  391. :MISSION_2_FAIL // Label Mission_2_Fail
  392. 00BA: show_text_styled GXT 'M_FAIL' time 2500 style 1 // ~r~MISSION FAILED! // Show Text Mission Failed
  393. 0555: remove_weapon 31 from_actor $PLAYER_ACTOR // Remove Weapon Nr. 31 (M4) from Player (it was given to us above)
  394. // This subroutine is executed when the mission fails. // return to second gosub
  395. return
  396.  
  397. //------------------------------------- // Third Gosub sends us here
  398. :MISSION_2_CLEANUP // Label Mission_2_Cleanup
  399. $ONMISSION = 0 // Set Onmission Status to Not on a mission
  400. // Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen // Nederlands for Here comes all Code that you want to be cleaned up before the Mission starts
  401. // En om speciale settings voor deze missie terug te zetten naar normaal // Nederlands for All Special Settings that where declared before this mission will be reset to normal
  402. Marker.Disable($victim_marker) // Disable the Marker over Victims head
  403. 010D: set_player $PLAYER_CHAR wanted_level_to 0 // Set the Players wanted Level to 0
  404. model.Destroy(#BMYST) // Destroy the Model Black Young Female
  405. model.Destroy(#BFYST) // Destroy the Model Black Young Male
  406. model.Destroy(#M4) // Destroy the Model M4 Gun
  407. mission_cleanup // Command to cleanup and End the Mission
  408. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement