summaryrefslogtreecommitdiff
path: root/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc
blob: af72dedd00334994a1a4c2c85d2a3849ad05c1c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Route110_SeasideCyclingRoadNorthEntrance_MapScripts:: @ 81634C8
	map_script 3, Route110_SeasideCyclingRoadNorthEntrance_MapScript1_1634CE
	.byte 0

Route110_SeasideCyclingRoadNorthEntrance_MapScript1_1634CE:: @ 81634CE
	compare VAR_CYCLING_CHALLENGE_STATE, 3
	call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5
	compare VAR_CYCLING_CHALLENGE_STATE, 2
	call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5
	end

Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5:: @ 81634E5
	setvar VAR_CYCLING_CHALLENGE_STATE, 1
	return

Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634EB:: @ 81634EB
	lock
	faceplayer
	msgbox Route110_SeasideCyclingRoadNorthEntrance_Text_19E406, 4
	release
	end

Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634F7:: @ 81634F7
@ Coord event directly in front of the gatesman heading left to right
	lockall
	specialvar RESULT, GetPlayerAvatarBike @ player state?
	compare RESULT, 2
	call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D
	compare RESULT, 0
	goto_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_163523
	setflag FLAG_SYS_CYCLING_ROAD
	setvar VAR_TEMP_1, 1
	releaseall
	end

Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D:: @ 816351D
@ You're on the Mach Bike!
	setvar VAR_CYCLING_CHALLENGE_STATE, 1
	return

Route110_SeasideCyclingRoadNorthEntrance_EventScript_163523:: @ 8163523
@ You don't have a bike!
	msgbox Route110_SeasideCyclingRoadNorthEntrance_Text_19E3AD, 4
	closemessage
	applymovement 255, Route110_SeasideCyclingRoadNorthEntrance_Movement_163538
	waitmovement 0
	releaseall
	end

Route110_SeasideCyclingRoadNorthEntrance_Movement_163538:: @ 8163538
	step_left
	step_end

Route110_SeasideCyclingRoadNorthEntrance_EventScript_16353A:: @ 816353A
@ Coord event directly in front of the gatesman heading right to left
	lockall
	setvar VAR_CYCLING_CHALLENGE_STATE, 0
	clearflag FLAG_SYS_CYCLING_ROAD
	setvar VAR_TEMP_1, 0
	releaseall
	end