Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This thread is responsible for starting the last main missions in the game:
- Riot
- Los Desperados
- End of the Line Part 1
- End of the Line Part 2
- End of the Line Part 3
- 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.
- :MS_RIOT_MISSIONS
- thread 'RIOT'
- :RIOT_11
- ### Wait for 250ms
- wait $DEFAULT_WAIT_TIME
- ### Check mission progress variable if all missions have been completed, and end thread if that is the case
- if
- $RIOT_TOTAL_PASSED_MISSIONS == 5
- jf @RIOT_36
- end_thread
- :RIOT_36
- if
- Player.Defined($PLAYER_CHAR)
- jf @RIOT_673
- ### Check if the player is currently not on a mission
- if
- $ONMISSION == 0
- jf @RIOT_673
- ###
- ### Checks for "Riot"
- ###
- ### Check if the player is standing in the mission marker
- if
- 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
- jf @RIOT_180
- if
- Player.Controllable($PLAYER_CHAR)
- jf @RIOT_180
- ### Check if the mission progress variable is at 0, so it should start the first mission in the chain
- if
- $RIOT_TOTAL_PASSED_MISSIONS == 0
- jf @RIOT_180
- $ONMISSION = 1
- 00BA: show_text_styled GXT 'RIOT_1' time 1000 style 2 // Riot
- ### Make CJ walk towards the building and perform a fade
- gosub @SUB_CJ_GOTO_MADD_DOGGS_CRIB
- start_mission 108 // Riot
- ###
- ### "Los Desperados" and "End of the Line" (for starting from the mission marker)
- ###
- ### Check if standing in the mission marker
- :RIOT_180
- if
- 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
- jf @RIOT_587
- if
- Player.Controllable($PLAYER_CHAR)
- jf @RIOT_587
- ###
- ### "Los Desperados"
- ###
- if
- $RIOT_TOTAL_PASSED_MISSIONS == 1
- jf @RIOT_372
- 0956: get_respect_to $47
- if
- $47 > 1
- jf @RIOT_320
- $ONMISSION = 1
- 00BA: show_text_styled GXT 'RIOT_2' time 1000 style 2 // Los Desperados
- gosub @SUB_CJ_GOTO_SWEET_HOUSE
- start_mission 109 // Los Desperados
- jump @RIOT_372
- ### Show error message if not enough respect (jumped over if not applicable)
- :RIOT_320
- 00BC: show_text_highpriority GXT 'MOREREP' time 1000 flag 1 // ~s~You need to gain more respect.
- if
- $HELP_RESPECT_SHOWN == 0
- jf @RIOT_372
- 03E5: show_text_box 'HELP101' // Respect can be earned be passing certain missions, killing rival gangs members, gaining territory and tagging.
- $HELP_RESPECT_SHOWN = 1
- ###
- ### "End of the Line Part 1" (from mission marker)
- ###
- ### Check if calls have been answered
- :RIOT_372
- if
- $1355 == 1
- jf @RIOT_483
- if
- $1354 == 1
- jf @RIOT_467
- ### Check mission progress variable
- if
- $RIOT_TOTAL_PASSED_MISSIONS == 2
- jf @RIOT_460
- $ONMISSION = 1
- 00BA: show_text_styled GXT 'RIOT_4' time 1000 style 2 // End Of The Line
- gosub @SUB_CJ_GOTO_SWEET_HOUSE
- start_mission 110 // End Of The Line (1)
- :RIOT_460
- jump @RIOT_483
- ### 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
- :RIOT_467
- 00BC: show_text_highpriority GXT 'MORTURF' time 2000 flag 1 // ~s~You need to take over more gang territories around Los Santos!
- ###
- ### "End of the Line Part 2" (from mission marker)
- ###
- :RIOT_483
- if
- $RIOT_TOTAL_PASSED_MISSIONS == 3
- jf @RIOT_535
- $ONMISSION = 1
- 00BA: show_text_styled GXT 'RIOT_4' time 1000 style 2 // End Of The Line
- gosub @SUB_CJ_GOTO_SWEET_HOUSE
- start_mission 111 // End Of The Line (2)
- ###
- ### "End of the Line Part 3" (from mission marker)
- ###
- :RIOT_535
- if
- $RIOT_TOTAL_PASSED_MISSIONS == 4
- jf @RIOT_587
- $ONMISSION = 1
- 00BA: show_text_styled GXT 'RIOT_4' time 1000 style 2 // End Of The Line
- gosub @SUB_CJ_GOTO_SWEET_HOUSE
- start_mission 112 // End Of The Line (3)
- ###
- ### Automatically starting the next part of "End of the Line"
- ###
- ### 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).
- ###
- ### "End of the Line Part 2" (automatically)
- ###
- :RIOT_587
- ### Check mission progress variable as well as $151 (if it has been started yet)
- ### 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
- if and
- $RIOT_TOTAL_PASSED_MISSIONS == 3
- $151 == 0
- jf @RIOT_630
- $151 = 1
- $ONMISSION = 1
- start_mission 111 // End Of The Line (2)
- ###
- ### "End of the Line Part 3" (automatically)
- ###
- :RIOT_630
- if and
- $RIOT_TOTAL_PASSED_MISSIONS == 4
- $151 == 1
- jf @RIOT_673
- $151 = 2
- $ONMISSION = 1
- start_mission 112 // End Of The Line (3)
- ### Jump to the start
- :RIOT_673
- jump @RIOT_11
Advertisement
Add Comment
Please, Sign In to add comment