tduva

Untitled

Jul 4th, 2019
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. This thread is responsible for starting the last main missions in the game:
  2.  
  3. Riot
  4. Los Desperados
  5. End of the Line Part 1
  6. End of the Line Part 2
  7. End of the Line Part 3
  8.  
  9. This thread shows how they implemented checkpoints for End of the Line, as well as how the Gang Territory Skip is possible by completing Los Desperados twice.
  10.  
  11. :MS_RIOT_MISSIONS
  12. thread 'RIOT'
  13.  
  14. :RIOT_11
  15.  
  16. ### Wait for 250ms
  17. wait $DEFAULT_WAIT_TIME
  18.  
  19. ### Check mission progress variable if all missions have been completed, and end thread if that is the case
  20. if
  21. $RIOT_TOTAL_PASSED_MISSIONS == 5
  22. jf @RIOT_36
  23. end_thread
  24.  
  25. :RIOT_36
  26. if
  27. Player.Defined($PLAYER_CHAR)
  28. jf @RIOT_673
  29.  
  30. ### Check if the player is currently not on a mission
  31. if
  32. $ONMISSION == 0
  33. jf @RIOT_673
  34.  
  35. ###
  36. ### Checks for "Riot"
  37. ###
  38.  
  39. ### Check if the player is standing in the mission marker
  40. if
  41. 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_MADD_DOGG_CRIB $Y_MADD_DOGG_CRIB $Z_MADD_DOGG_CRIB radius 1.2 1.2 2.0 on_foot
  42. jf @RIOT_180
  43. if
  44. Player.Controllable($PLAYER_CHAR)
  45. jf @RIOT_180
  46.  
  47. ### Check if the mission progress variable is at 0, so it should start the first mission in the chain
  48. if
  49. $RIOT_TOTAL_PASSED_MISSIONS == 0
  50. jf @RIOT_180
  51. $ONMISSION = 1
  52. 00BA: show_text_styled GXT 'RIOT_1' time 1000 style 2 // Riot
  53. ### Make CJ walk towards the building and perform a fade
  54. gosub @SUB_CJ_GOTO_MADD_DOGGS_CRIB
  55. start_mission 108 // Riot
  56.  
  57. ###
  58. ### "Los Desperados" and "End of the Line" (for starting from the mission marker)
  59. ###
  60.  
  61. ### Check if standing in the mission marker
  62. :RIOT_180
  63. if
  64. 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.2 1.2 2.0 on_foot
  65. jf @RIOT_587
  66. if
  67. Player.Controllable($PLAYER_CHAR)
  68. jf @RIOT_587
  69.  
  70. ###
  71. ### "Los Desperados"
  72. ###
  73.  
  74. if
  75. $RIOT_TOTAL_PASSED_MISSIONS == 1
  76. jf @RIOT_372
  77. 0956: get_respect_to $47
  78. if
  79. $47 > 1
  80. jf @RIOT_320
  81. $ONMISSION = 1
  82. 00BA: show_text_styled GXT 'RIOT_2' time 1000 style 2 // Los Desperados
  83. gosub @SUB_CJ_GOTO_SWEET_HOUSE
  84. start_mission 109 // Los Desperados
  85. jump @RIOT_372
  86.  
  87. ### Show error message if not enough respect (jumped over if not applicable)
  88. :RIOT_320
  89. 00BC: show_text_highpriority GXT 'MOREREP' time 1000 flag 1 // ~s~You need to gain more respect.
  90. if
  91. $HELP_RESPECT_SHOWN == 0
  92. jf @RIOT_372
  93. 03E5: show_text_box 'HELP101' // Respect can be earned be passing certain missions, killing rival gangs members, gaining territory and tagging.
  94. $HELP_RESPECT_SHOWN = 1
  95.  
  96. ###
  97. ### "End of the Line Part 1" (from mission marker)
  98. ###
  99.  
  100. ### Check if calls have been answered
  101. :RIOT_372
  102. if
  103. $1355 == 1
  104. jf @RIOT_483
  105. if
  106. $1354 == 1
  107. jf @RIOT_467
  108. ### Check mission progress variable
  109. if
  110. $RIOT_TOTAL_PASSED_MISSIONS == 2
  111. jf @RIOT_460
  112. $ONMISSION = 1
  113. 00BA: show_text_styled GXT 'RIOT_4' time 1000 style 2 // End Of The Line
  114. gosub @SUB_CJ_GOTO_SWEET_HOUSE
  115. start_mission 110 // End Of The Line (1)
  116.  
  117. :RIOT_460
  118. jump @RIOT_483
  119.  
  120. ### If the second call checked hasn't been answered, this probably means that not enough gang territories have been taken over, so output this message
  121. :RIOT_467
  122. 00BC: show_text_highpriority GXT 'MORTURF' time 2000 flag 1 // ~s~You need to take over more gang territories around Los Santos!
  123.  
  124. ###
  125. ### "End of the Line Part 2" (from mission marker)
  126. ###
  127.  
  128. :RIOT_483
  129. if
  130. $RIOT_TOTAL_PASSED_MISSIONS == 3
  131. jf @RIOT_535
  132. $ONMISSION = 1
  133. 00BA: show_text_styled GXT 'RIOT_4' time 1000 style 2 // End Of The Line
  134. gosub @SUB_CJ_GOTO_SWEET_HOUSE
  135. start_mission 111 // End Of The Line (2)
  136.  
  137. ###
  138. ### "End of the Line Part 3" (from mission marker)
  139. ###
  140.  
  141. :RIOT_535
  142. if
  143. $RIOT_TOTAL_PASSED_MISSIONS == 4
  144. jf @RIOT_587
  145. $ONMISSION = 1
  146. 00BA: show_text_styled GXT 'RIOT_4' time 1000 style 2 // End Of The Line
  147. gosub @SUB_CJ_GOTO_SWEET_HOUSE
  148. start_mission 112 // End Of The Line (3)
  149.  
  150. ###
  151. ### Automatically starting the next part of "End of the Line"
  152. ###
  153. ### Since End of the Line consists of several parts (in order to allow for checkpoints), the next mission part has to automatically start when playing through it normally. This is only done when that mission part hasn't been started yet (if it has, it can only be started again from the mission marker, see above).
  154.  
  155. ###
  156. ### "End of the Line Part 2" (automatically)
  157. ###
  158.  
  159. :RIOT_587
  160. ### Check mission progress variable as well as $151 (if it has been started yet)
  161. ### When Los Desperados has been completed for the second time, then both of these checks are true ($RIOT_TOTAL_PASSED_MISSIONS is at 3 and "End of the Line Part 2" obviously hasn't been started yet), that's why it starts automatically when doing the Gang Territory Skip
  162. if and
  163. $RIOT_TOTAL_PASSED_MISSIONS == 3
  164. $151 == 0
  165. jf @RIOT_630
  166. $151 = 1
  167. $ONMISSION = 1
  168. start_mission 111 // End Of The Line (2)
  169.  
  170. ###
  171. ### "End of the Line Part 3" (automatically)
  172. ###
  173.  
  174. :RIOT_630
  175. if and
  176. $RIOT_TOTAL_PASSED_MISSIONS == 4
  177. $151 == 1
  178. jf @RIOT_673
  179. $151 = 2
  180. $ONMISSION = 1
  181. start_mission 112 // End Of The Line (3)
  182.  
  183. ### Jump to the start
  184. :RIOT_673
  185. jump @RIOT_11
Advertisement
Add Comment
Please, Sign In to add comment