Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.85 KB | None | 0 0
  1. DEFINE MISSIONS 3
  2. DEFINE MISSION 0 AT @INITIAL
  3. DEFINE MISSION 1 AT @TUT_MISSION_1
  4. DEFINE MISSION 2 AT @MISSION_2
  5.  
  6. DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script
  7. //DEFINE SCRIPT {NAME} AT {LABEL} @
  8. DEFINE UNKNOWN_EMPTY_SEGMENT 0
  9. DEFINE UNKNOWN_THREADS_MEMORY 0
  10.  
  11. var
  12. $PLAYER_CHAR: Player
  13. end // var
  14. 03A4: name_thread 'MAIN'
  15. 01F0: set_max_wanted_level_to 6
  16. 0111: toggle_wasted_busted_check 0
  17. 00C0: set_current_time_hours_to 8 minutes_to 0
  18. 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84
  19. 03CB: set_rendering_origin_at 2488.56 -1666.84 13.38
  20. 0053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.38
  21. 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR
  22. 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
  23. 0373: set_camera_directly_behind_player
  24. 01B6: set_weather 0
  25. 0001: wait 0 ms
  26. 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1
  27. 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2
  28. 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3
  29. 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0
  30. 070D: rebuild_player $PLAYER_CHAR
  31. 01B4: toggle_player $PLAYER_CHAR can_move 1
  32. 016A: fade 1 time 0
  33. 04BB: select_interior 0
  34. 0629: change_integer_stat 181 to 4
  35. 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
  36. 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
  37. 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here
  38. 0004: $DEFAULT_WAIT_TIME = 250
  39. 03E6: remove_text_box
  40. 0417: start_mission 0 // Initial
  41. wait 0
  42. // put your create_thread commands here
  43. 00D7: create_thread @MissionTrigger
  44.  
  45. :MAIN_LOOP
  46. 0001: wait $DEFAULT_WAIT_TIME ms
  47. 0002: jump @MAIN_LOOP
  48.  
  49.  
  50.  
  51. // put your mods (threads) here
  52.  
  53. //-------------------------------------- MISSION SNIFFER
  54. // $TUT_MISSION_PASSED has to be cleared (0).
  55. // When you pass the mission, you have to raise $TUT_MISSIONS_PASSED.
  56.  
  57.  
  58.  
  59. :MissionTrigger
  60. thread "Mis_Trig"
  61. $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)
  62. repeat
  63. 0001: wait 0 ms
  64. if and
  65. player.Defined($PLAYER_CHAR)
  66. $ONMISSION == 0
  67. then
  68. if and
  69. 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
  70. Player.Controllable($PLAYER_CHAR)
  71. $TUT_MISSIONS_PASSED == 0
  72. then
  73. $ONMISSION = 1
  74. 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smoke
  75. start_mission 1
  76. end
  77. end
  78. until $TUT_MISSIONS_PASSED == 1
  79. marker.Disable($MARKER_SWEET_HOUSE)
  80.  
  81.  
  82. $MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)
  83. repeat
  84. 0001: wait 0 ms
  85. if and
  86. player.Defined($PLAYER_CHAR)
  87. $ONMISSION == 0
  88. then
  89. if and
  90. 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
  91. Player.Controllable($PLAYER_CHAR)
  92. $TUT_MISSIONS_PASSED == 1
  93. then
  94. $ONMISSION = 1
  95. 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smoke
  96. start_mission 2
  97. end
  98. end
  99. until $TUT_MISSIONS_PASSED == 1
  100. marker.Disable($MARKER_RYDER_HOUSE)
  101. end_thread
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. //-------------Mission 0---------------
  109. :INITIAL
  110. $TUT_MISSIONS_PASSED = 0
  111. $ONMISSION = 0
  112.  
  113. $X_SWEET_HOUSE = 2516.019
  114. $Y_SWEET_HOUSE = -1673.9849
  115. $Z_SWEET_HOUSE = 13.8766
  116.  
  117. $X_RYDER_HOUSE = 2472.1741
  118. $Y_RYDER_HOUSE = -1687.0452
  119. $Z_RYDER_HOUSE = 13.5078
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. end_thread
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. //-------------Mission 1---------------
  145. // Mission wrapper
  146. :TUT_MISSION_1
  147. thread 'TUT 1'
  148. gosub @TUT_MISSION_1_MAIN
  149. if wasted_or_busted
  150. then
  151. gosub @TUT_MISSION_1_FAIL
  152. end
  153. gosub @TUT_MISSION_1_CLEANUP
  154. end_thread
  155.  
  156. //-------------------------------------
  157. :TUT_MISSION_1_MAIN
  158. //Load models
  159. model.Load(#m4)
  160. model.Load(#BFYST)
  161. model.Load(#BMYST)
  162. model.Load(#TAMPA)
  163.  
  164. 038B: load_requested_models
  165.  
  166. :TUT_MISSION_1_LOAD
  167. wait 0 ms
  168. if and
  169. model.Available(#m4)
  170. model.Available(#BMYST)
  171. model.Available(#BFYST)
  172. model.Available(#TAMPA)
  173. 004D: jump_if_false @TUT_MISSION_1_LOAD
  174.  
  175. 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this
  176. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
  177.  
  178. 0674: set_car_model #TAMPA numberplate "PATRICK_"
  179. $car_num = car.Create(#TAMPA,2488.56, -1666.84, 13.38)
  180.  
  181.  
  182. $victim = Actor.Create(CIVFEMALE, #BFYST, 2488.56, -1656.84, 13.38)
  183. $innocent = Actor.Create(CIVMALE, #BMYST, 2490.56, -1656.84, 13.38)
  184. 0187: $victim_marker = create_marker_above_actor $victim
  185.  
  186. repeat
  187. wait 0 ms
  188. if actor.Dead($innocent)
  189. then
  190. jump @TUT_MISSION_1_FAIL
  191. end
  192. until actor.Dead($victim)
  193.  
  194. :TUT_MISSION_1_PASSED
  195. 0394: play_music 1
  196. $TUT_MISSIONS_PASSED += 1
  197. Player.Money($PLAYER_CHAR) += 10000
  198. 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
  199.  
  200. return
  201.  
  202. //-------------------------------------
  203. :TUT_MISSION_1_FAIL
  204. 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
  205. // Hier kun je alles kwijt wat moet gebeuren als de missie gefaald is. Bv. bepaalde dingen weer terugdraaien
  206. 0555: remove_weapon 31 from_actor $PLAYER_ACTOR
  207. return
  208.  
  209. //-------------------------------------
  210. :TUT_MISSION_1_CLEANUP
  211. $ONMISSION = 0
  212. // Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen
  213. // En om speciale settings voor deze missie terug te zetten naar normaal
  214. Marker.Disable($victim_marker)
  215. 010D: set_player $PLAYER_CHAR wanted_level_to 0
  216. model.Destroy(#BFYST)
  217. model.Destroy(#BMYST)
  218. model.Destroy(#M4)
  219. mission_cleanup
  220. return
  221.  
  222.  
  223.  
  224.  
  225. //-------------Mission 2---------------
  226. // Mission wrapper // Label for Mission 2 Wrapper
  227. :MISSION_2 // Create Thread Tut 2
  228. thread 'TUT 2' // First Gosub to :Mission_2_Main then after return continues below this line
  229. gosub @MISSION_2_MAIN // If Wasted Or Busted
  230. if wasted_or_busted // Then do the Following
  231. then // Second Gosub to :Mission_2_Fail then after return continues below this line
  232. gosub @MISSION_2_FAIL // end
  233. end // Third Gosub to :Mission_2_Cleanup after return continues below this line
  234. gosub @MISSION_2_CLEANUP // end_thread
  235. end_thread
  236.  
  237. //------------------------------------- // First Gosub sends us here
  238. :MISSION_2_MAIN // Label Mission_2_Main
  239. model.Load(#m4) // Load Model of M4 Gun
  240. model.Load(#BMYST)
  241. model.Load(#BFYST)
  242. :MISSION_2_LOAD // Label TUT_MISSION_2_LOAD for checking if Models are available
  243. wait 0 ms
  244. if and // If the following is true continue with the code:
  245. model.Available(#m4)
  246. model.Available(#BMYST)
  247. model.Available(#BFYST)
  248. 004D: jump_if_false @MISSION_2_LOAD // If the above is false jump to TUT_MISSION_1_Load
  249.  
  250. 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
  251. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
  252.  
  253.  
  254. $victim = Actor.Create(CIVFEMALE, #BFYST, 2488.56, -1656.84, 13.38) // Define a Variable that Creates an Actor with the Model Black Young Female at XYZ
  255. $innocent = Actor.Create(CIVMALE, #BMYST, 2490.56, -1656.84, 13.38) // Define a Variable that creates an innocent Actor with the Model Young Black Male at XYZ
  256. 0187: $victim_marker = create_marker_above_actor $victim // Define a Variable that creates a Marker above the Actor "Victim"
  257.  
  258. repeat
  259. wait 0 ms // (2) Repeat the following:
  260. if actor.Dead($innocent) // If the Innocent Actor is Dead
  261. then // then do the following:
  262. jump @MISSION_2_FAIL // jump @MISSION_2_Fail
  263. end // end
  264. until actor.Dead($victim) // (2) Until the Actor "Victim" is dead
  265.  
  266.  
  267.  
  268. //-------------------------------------
  269. :MISSION_2_PASSED // Label Mission_2_Passed
  270. Player.Money($PLAYER_CHAR) += 10000
  271. $TUT_MISSIONS_PASSED += 1 // Give The Player + 1000 Money
  272. 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ // Show Text Mission Passed
  273. // This subroutine is executed when the mission is passed.
  274. // Give the rewards, and make new missions available if needed.
  275.  
  276. return // Return to First Gosub
  277.  
  278. //------------------------------------- // Second Gosub sends us here
  279. :MISSION_2_FAIL // Label Mission_2_Fail
  280. 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! // Show Text Mission Failed
  281. 0555: remove_weapon 31 from_actor $PLAYER_ACTOR // Remove Weapon Nr. 31 (M4) from Player (it was given to us above)
  282. // This subroutine is executed when the mission fails. // return to second gosub
  283. return
  284.  
  285. //------------------------------------- // Third Gosub sends us here
  286. :MISSION_2_CLEANUP // Label Mission_2_Cleanup
  287. $ONMISSION = 0 // Set Onmission Status to Not on a mission
  288. // 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
  289. // 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
  290. Marker.Disable($victim_marker) // Disable the Marker over Victims head
  291. 010D: set_player $PLAYER_CHAR wanted_level_to 0 // Set the Players wanted Level to 0
  292. model.Destroy(#BMYST) // Destroy the Model Black Young Female
  293. model.Destroy(#BFYST) // Destroy the Model Black Young Male
  294. model.Destroy(#M4) // Destroy the Model M4 Gun
  295. mission_cleanup // Command to cleanup and End the Mission
  296. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement