Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.71 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. 01F0: set_max_wanted_level_to 4
  17. set_wb_check_to 0
  18. 00C0: set_current_time 21 0
  19. 04E4: unknown_refresh_game_renderer_at 889.752 1984.2156 11.3262
  20. Camera.SetAtPos(895.9604, 1991.7198, 10.9372)
  21. $PLAYER_CHAR = Player.Create(#NULL, 889.752, 1984.2156, 11.3262)
  22. $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
  23. 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
  24. Camera.SetBehindPlayer
  25. set_weather 6
  26. wait 0 ms
  27. $PLAYER_CHAR.SetClothes("PLAYER_FACE", "HEAD", Head)
  28. $PLAYER_CHAR.SetClothes("JEANSDENIM", "JEANS", Legs)
  29. $PLAYER_CHAR.SetClothes("SNEAKERBINCBLK", "SNEAKER", Shoes)
  30. $PLAYER_CHAR.SetClothes("VEST", "VEST", Torso)
  31. $PLAYER_CHAR.Build
  32. $PLAYER_CHAR.CanMove = True
  33. fade 1 (out) 0 ms
  34. select_interior 0
  35. 0629: change_stat 181 (islands unlocked) to 4
  36. 016C: restart_if_wasted at 923.6397 2000.4899 11.2349 angle 137.0 for_town_number 0
  37. 016D: restart_if_busted at 923.6397 2000.4899 11.2349 angle 90.0 for_town_number 0
  38. 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here ($ONMISSION)
  39. $DEFAULT_WAIT_TIME = 250
  40. 03E6: remove_text_box
  41. 0417: start_mission 0 // Initial
  42. wait 0
  43. 0417: start_mission 1 // Cutscene 1
  44. // put your create_thread commands here
  45. 00D7: create_Thread @MissionTrigger
  46. :MAIN_LOOP
  47. 0001: wait $DEFAULT_WAIT_TIME ms
  48. 0002: jump @MAIN_LOOP
  49.  
  50.  
  51.  
  52. // put your mods (threads) here
  53.  
  54. :MissionTrigger
  55. thread "Mis_Trig"
  56.  
  57.  
  58. $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)
  59. repeat
  60. 0001: wait 0 ms
  61. if and
  62. player.Defined($PLAYER_CHAR)
  63. $ONMISSION == 0
  64. then
  65. if and
  66. 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
  67. Player.Controllable($PLAYER_CHAR)
  68. $TUT_MISSIONS_PASSED == 0
  69. then
  70. $ONMISSION = 1
  71. 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smoke
  72. start_mission 2
  73. end
  74. end
  75. until $TUT_MISSIONS_PASSED == 1
  76. marker.Disable($MARKER_SWEET_HOUSE)
  77.  
  78.  
  79. $MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)
  80. // I think here is a mistake somewhere....
  81. repeat
  82. 0001: wait 0 ms
  83. if and
  84. player.Defined($PLAYER_CHAR)
  85. $ONMISSION == 0
  86. then
  87. if and
  88. 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
  89. Player.Controllable($PLAYER_CHAR)
  90. $TUT_MISSIONS_PASSED == 1
  91. then
  92. $ONMISSION = 1
  93. 00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2 // RYDER
  94. start_mission 3
  95. end
  96. end
  97. until $TUT_MISSIONS_PASSED == 2
  98. marker.Disable($MARKER_RYDER_HOUSE)
  99. end_thread
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. //----------------------Mission 0-------------------------
  107. // put your missions here
  108.  
  109.  
  110. :Initial
  111. $A = 6000
  112. $B = 16000
  113. Actor.StorePos($PLAYER_ACTOR, $X, $Y, $Z)
  114. $ONMISSION = 0
  115. $TUT_MISSIONS_PASSED = 0
  116. $X_SWEET_HOUSE = 920.9996
  117. $Y_SWEET_HOUSE = 1985.3621
  118. $Z_SWEET_HOUSE = 10.8203
  119.  
  120. $X_RYDER_HOUSE = 893.4557
  121. $Y_RYDER_HOUSE = 1975.0697
  122. $Z_RYDER_HOUSE = 11.2338
  123.  
  124.  
  125.  
  126.  
  127. // Change Player Skin
  128. if
  129. Model.Available(#NULL)
  130. 09C7: change_player $PLAYER_CHAR model_to #NULL
  131. Player.Build($PLAYER_CHAR)
  132. model.Load(#DNMOLC1) // Select Model Here 1/2
  133. 038B: load_requested_models
  134. 09C7: change_player $PLAYER_CHAR model_to #DNMOLC1 // Select Model Here 2/2
  135.  
  136.  
  137. end_thread
  138.  
  139.  
  140.  
  141.  
  142.  
  143. //-------------------------------------------------PLACE REAL MISSIONS HERE-------------------------//
  144. // Cutscene 1
  145. :CUTSCENE_1
  146. thread 'CUT 1'
  147. // Begin First Cutscene
  148. 04BB: select_interior 0
  149. 04E4: unknown_refresh_game_renderer_at 922.1453 1877.2123 10.8203
  150. Player.CanMove($PLAYER_CHAR, false)
  151. 02A3: enable_widescreen 1
  152. 015D: set_gamespeed 0.8
  153. 0936: set_camera 920.9642 2043.0486 14.6534 position_to 922.1453 1877.2123 10.8203 time $A drop_mode 0
  154. 0920: point_camera 1033.6105 1994.8458 15.6421 transverse_to 978.839 1783.0623 8.6484 time $A mode 0
  155. wait $A
  156. 0936: set_camera 880.4531 1983.7474 15.7471 position_to 879.5115 2058.2239 15.8454 time $B drop_mode 0
  157. 0920: point_camera 879.5115 2058.2239 15.8454 transverse_to 839.1807 1907.1328 10.8203 time $B mode 0
  158. wait $B
  159. 02A3: enable_widescreen 0
  160. Camera.Restore
  161. 015D: set_gamespeed 1.0
  162. Player.CanMove($PLAYER_CHAR, true)
  163. wait 50
  164. fade 1 100
  165.  
  166. // Spawn Greenwood
  167. 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
  168. 014C: set_parked_car_generator $PARKED_GREENWO cars_to_generate_to 101
  169.  
  170. // Teleport Player
  171. //00A1: put_actor $PLAYER_ACTOR at 164.336 -1757.727 6.804047
  172. //Actor.Angle($PLAYER_ACTOR) = 98.7008
  173. 04BB: select_interior 8
  174. 04FA: reset_interior 8 colors
  175. 0860: link_actor $PLAYER_ACTOR to_interior 8
  176. 04E4: unknown_refresh_game_renderer_at 2373.0745 -1126.7084 1050.875
  177. 00A1: put_actor $PLAYER_ACTOR at 2373.0745 -1126.7084 1050.875
  178.  
  179. // Second Cutscene in Interior
  180. 04BB: select interior 8
  181. Player.CanMove($PLAYER_CHAR, false)
  182. 04E4: unknown_refresh_game_renderer_at 2372.5469 -1121.7041 1051.3367
  183. 02A3: enable_widescreen 1
  184. 015D: set_gamespeed 0.8
  185. 0936: set_camera 2372.5469 -1121.7041 1051.3367 position_to 2375.7603 -1125.887 1050.8826 time $A drop_mode 0
  186. 0920: point_camera 2369.998 -1128.869 1050.875 transverse_to 2370.8088 -1127.2448 1051.875 time $A mode 0
  187. wait $A
  188. 02A3: enable_widescreen 0
  189. Camera.Restore
  190. 015D: set_gamespeed 1.0
  191. Player.CanMove($PLAYER_CHAR, true)
  192. wait 100
  193. fade 1 100
  194.  
  195.  
  196.  
  197. end_thread
  198.  
  199.  
  200. //-------------Mission 1---------------
  201. // Mission wrapper
  202. :TUT_MISSION_1
  203. thread 'TUT 1'
  204. gosub @TUT_MISSION_1_MAIN
  205. if wasted_or_busted
  206. then
  207. gosub @TUT_MISSION_1_FAIL
  208. end
  209. gosub @TUT_MISSION_1_CLEANUP
  210. end_thread
  211.  
  212. //-------------------------------------
  213. :TUT_MISSION_1_MAIN
  214. //Load models
  215. model.Load(#m4)
  216. model.Load(#BFYST)
  217. model.Load(#BMYST)
  218. model.Load(#TAMPA)
  219.  
  220. 038B: load_requested_models
  221.  
  222. :TUT_MISSION_1_LOAD
  223. wait 0 ms
  224. if and
  225. model.Available(#m4)
  226. model.Available(#BMYST)
  227. model.Available(#BFYST)
  228. model.Available(#TAMPA)
  229. 004D: jump_if_false @TUT_MISSION_1_LOAD
  230.  
  231. 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this
  232. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
  233.  
  234. 0674: set_car_model #TAMPA numberplate "PATRICK_"
  235. $car_num = car.Create(#TAMPA,956.7369, 2002.0457, 10.8203)
  236.  
  237.  
  238. $victim = Actor.Create(CIVFEMALE, #BFYST, 963.3641, 1981.4812, 10.8203)
  239. $innocent = Actor.Create(CIVMALE, #BMYST, 960.5291, 1975.7067, 10.8203)
  240. 0187: $victim_marker = create_marker_above_actor $victim
  241.  
  242. repeat
  243. wait 0 ms
  244. if actor.Dead($innocent)
  245. then
  246. jump @TUT_MISSION_1_FAIL
  247. end
  248. until actor.Dead($victim)
  249.  
  250. :TUT_MISSION_1_PASSED
  251. 0394: play_music 1
  252. $TUT_MISSIONS_PASSED += 1
  253. Player.Money($PLAYER_CHAR) += 10000
  254. 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
  255.  
  256. return
  257.  
  258. //-------------------------------------
  259. :TUT_MISSION_1_FAIL
  260. 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
  261. // Hier kun je alles kwijt wat moet gebeuren als de missie gefaald is. Bv. bepaalde dingen weer terugdraaien
  262. 0555: remove_weapon 31 from_actor $PLAYER_ACTOR
  263. return
  264.  
  265. //-------------------------------------
  266. :TUT_MISSION_1_CLEANUP
  267. $ONMISSION = 0
  268. // Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen
  269. // En om speciale settings voor deze missie terug te zetten naar normaal
  270. Marker.Disable($victim_marker)
  271. 010D: set_player $PLAYER_CHAR wanted_level_to 0
  272. model.Destroy(#BFYST)
  273. model.Destroy(#BMYST)
  274. model.Destroy(#M4)
  275. 01C2: remove_references_to_actor $victim
  276. 01C2: remove_references_to_actor $innocent
  277. mission_cleanup
  278. return
  279.  
  280.  
  281.  
  282.  
  283. //-------------Mission 2---------------
  284. // Mission wrapper // Label for Mission 2 Wrapper
  285. :MISSION_2 // Create Thread Tut 2
  286. thread 'TUT 2' // First Gosub to :Mission_2_Main then after return continues below this line
  287. gosub @MISSION_2_MAIN // If Wasted Or Busted
  288. if wasted_or_busted // Then do the Following
  289. then // Second Gosub to :Mission_2_Fail then after return continues below this line
  290. gosub @MISSION_2_FAIL // end
  291. end // Third Gosub to :Mission_2_Cleanup after return continues below this line
  292. gosub @MISSION_2_CLEANUP // end_thread
  293. end_thread
  294.  
  295. //------------------------------------- // First Gosub sends us here
  296. :MISSION_2_MAIN // Label Mission_2_Main
  297. model.Load(#m4) // Load Model of M4 Gun
  298. model.Load(#BMYST)
  299. model.Load(#BFYST)
  300. :MISSION_2_LOAD // Label TUT_MISSION_2_LOAD for checking if Models are available
  301. wait 0 ms
  302. if and // If the following is true continue with the code:
  303. model.Available(#m4)
  304. model.Available(#BMYST)
  305. model.Available(#BFYST)
  306. 004D: jump_if_false @MISSION_2_LOAD // If the above is false jump to TUT_MISSION_1_Load
  307.  
  308. 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
  309. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
  310.  
  311.  
  312. $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
  313. $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
  314. 0187: $victim_marker = create_marker_above_actor $victim // Define a Variable that creates a Marker above the Actor "Victim"
  315.  
  316. repeat
  317. wait 0 ms // (2) Repeat the following:
  318. if actor.Dead($innocent) // If the Innocent Actor is Dead
  319. then // then do the following:
  320. jump @MISSION_2_FAIL // jump @MISSION_2_Fail
  321. end // end
  322. until actor.Dead($victim) // (2) Until the Actor "Victim" is dead
  323.  
  324.  
  325.  
  326. //-------------------------------------
  327. :MISSION_2_PASSED // Label Mission_2_Passed
  328. Player.Money($PLAYER_CHAR) += 10000
  329. $TUT_MISSIONS_PASSED += 1 // Give The Player + 1000 Money
  330. 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ // Show Text Mission Passed
  331. // This subroutine is executed when the mission is passed.
  332. // Give the rewards, and make new missions available if needed.
  333.  
  334. return // Return to First Gosub
  335.  
  336. //------------------------------------- // Second Gosub sends us here
  337. :MISSION_2_FAIL // Label Mission_2_Fail
  338. 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! // Show Text Mission Failed
  339. 0555: remove_weapon 31 from_actor $PLAYER_ACTOR // Remove Weapon Nr. 31 (M4) from Player (it was given to us above)
  340. // This subroutine is executed when the mission fails. // return to second gosub
  341. return
  342.  
  343. //------------------------------------- // Third Gosub sends us here
  344. :MISSION_2_CLEANUP // Label Mission_2_Cleanup
  345. $ONMISSION = 0 // Set Onmission Status to Not on a mission
  346. // 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
  347. // 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
  348. Marker.Disable($victim_marker) // Disable the Marker over Victims head
  349. 010D: set_player $PLAYER_CHAR wanted_level_to 0 // Set the Players wanted Level to 0
  350. model.Destroy(#BMYST) // Destroy the Model Black Young Female
  351. model.Destroy(#BFYST) // Destroy the Model Black Young Male
  352. model.Destroy(#M4)
  353. 01C2: remove_references_to_actor $victim // Like turning an actor into a random pedestrian
  354. 01C2: remove_references_to_actor $innocent // Destroy the Model M4 Gun
  355. mission_cleanup // Command to cleanup and End the Mission
  356. return
  357.  
  358.  
  359. //-------------Mission 3---------------
  360. // Mission wrapper // Label for Mission 2 Wrapper
  361. :MISSION_3 // Create Thread Tut 2
  362. thread 'TUT 3' // First Gosub to :Mission_2_Main then after return continues below this line
  363. gosub @MISSION_3_MAIN // If Wasted Or Busted
  364. if wasted_or_busted // Then do the Following
  365. then // Second Gosub to :Mission_2_Fail then after return continues below this line
  366. gosub @MISSION_3_FAIL // end
  367. end // Third Gosub to :Mission_2_Cleanup after return continues below this line
  368. gosub @MISSION_3_CLEANUP // end_thread
  369. end_thread
  370.  
  371. //------------------------------------- // First Gosub sends us here
  372. :MISSION_3_MAIN // Label Mission_2_Main
  373. model.Load(#m4) // Load Model of M4 Gun
  374. model.Load(#BMYST)
  375. model.Load(#BFYST)
  376. :MISSION_3_LOAD // Label TUT_MISSION_2_LOAD for checking if Models are available
  377. wait 0 ms
  378. if and // If the following is true continue with the code:
  379. model.Available(#m4)
  380. model.Available(#BMYST)
  381. model.Available(#BFYST)
  382. 004D: jump_if_false @MISSION_3_LOAD // If the above is false jump to TUT_MISSION_1_Load
  383.  
  384. 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
  385. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
  386.  
  387.  
  388. $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
  389. $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
  390. 0187: $victim_marker = create_marker_above_actor $victim // Define a Variable that creates a Marker above the Actor "Victim"
  391.  
  392. repeat
  393. wait 0 ms // (2) Repeat the following:
  394. if actor.Dead($innocent) // If the Innocent Actor is Dead
  395. then // then do the following:
  396. jump @MISSION_3_FAIL // jump @MISSION_2_Fail
  397. end // end
  398. until actor.Dead($victim) // (2) Until the Actor "Victim" is dead
  399.  
  400.  
  401.  
  402. //-------------------------------------
  403. :MISSION_3_PASSED // Label Mission_2_Passed
  404. Player.Money($PLAYER_CHAR) += 10000
  405. $TUT_MISSIONS_PASSED += 1 // Give The Player + 1000 Money
  406. 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ // Show Text Mission Passed
  407. // This subroutine is executed when the mission is passed.
  408. // Give the rewards, and make new missions available if needed.
  409.  
  410. return // Return to First Gosub
  411.  
  412. //------------------------------------- // Second Gosub sends us here
  413. :MISSION_3_FAIL // Label Mission_2_Fail
  414. 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! // Show Text Mission Failed
  415. 0555: remove_weapon 31 from_actor $PLAYER_ACTOR // Remove Weapon Nr. 31 (M4) from Player (it was given to us above)
  416. // This subroutine is executed when the mission fails. // return to second gosub
  417. return
  418.  
  419. //------------------------------------- // Third Gosub sends us here
  420. :MISSION_3_CLEANUP // Label Mission_2_Cleanup
  421. $ONMISSION = 0 // Set Onmission Status to Not on a mission
  422. // 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
  423. // 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
  424. Marker.Disable($victim_marker) // Disable the Marker over Victims head
  425. 010D: set_player $PLAYER_CHAR wanted_level_to 0 // Set the Players wanted Level to 0
  426. model.Destroy(#BMYST) // Destroy the Model Black Young Female
  427. model.Destroy(#BFYST) // Destroy the Model Black Young Male
  428. model.Destroy(#M4)
  429. 01C2: remove_references_to_actor $victim // Like turning an actor into a random pedestrian
  430. 01C2: remove_references_to_actor $innocent // Like turning an actor into a random pedestrian // Destroy the Model M4 Gun
  431. mission_cleanup // Command to cleanup and End the Mission
  432. return
  433.  
  434.  
  435. //----------------------Mission 0-------------------------
  436. // put your external scripts here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement