Advertisement
Guest User

Untitled

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