summaryrefslogtreecommitdiff
path: root/data/maps/SevenIsland_TrainerTower_Elevator/scripts.inc
blob: e8ee2450f91c499c33328d54c13d0ad5462c4b57 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
SevenIsland_TrainerTower_Elevator_MapScripts:: @ 8164AF8
	map_script 5, SevenIsland_TrainerTower_Elevator_MapScript1_1C4F54
	map_script 2, SevenIsland_TrainerTower_Elevator_MapScript2_1C5046
	.byte 0

SevenIsland_TrainerTower_Elevator_EventScript_164B03:: @ 8164B03
	lockall
	setvar VAR_0x8004, 6
	checkflag FLAG_TEMP_2
	call_if FALSE, EventScript_1A7AB9
	copyvar VAR_0x8005, VAR_ELEVATOR_FLOOR
	special Special_DrawElevatorCurrentFloorWindow
	message Text_1A535C
	waitmessage
	setvar VAR_0x8004, 6
	specialvar VAR_RESULT, Special_InitElevatorFloorSelectMenuPos
	switch VAR_RESULT
	case 0, EventScript_164B46
	case 1, EventScript_164B52
	end

EventScript_164B46:: @ 8164B46
	multichoicedefault 0, 0, MULTICHOICE_ROOFTOP_B1F, 0, FALSE
	goto EventScript_164B5E
	end

EventScript_164B52:: @ 8164B52
	multichoicedefault 0, 0, MULTICHOICE_ROOFTOP_B1F, 1, FALSE
	goto EventScript_164B5E
	end

EventScript_164B5E:: @ 8164B5E
	switch VAR_RESULT
	case 0, EventScript_164BCD
	case 1, EventScript_164B90
	case 2, EventScript_164BD3
	case 127, EventScript_164BD3
	end

EventScript_164B90:: @ 8164B90
	setvar VAR_0x8006, 3
	setdynamicwarp MAP_SEVEN_ISLAND_TRAINER_TOWER_LOBBY, 255, 17, 8
	compare_var_to_value VAR_ELEVATOR_FLOOR, 3
	goto_if eq, EventScript_164BD3
	call EventScript_164BD8
	setvar VAR_ELEVATOR_FLOOR, 3
	special Special_CloseElevatorCurrentFloorWindow
	delay 25
	applymovement 255, Movement_164BE5
	waitmovement 0
	warp MAP_SEVEN_ISLAND_TRAINER_TOWER_LOBBY, 255, 17, 8
	waitstate
	releaseall
	end

EventScript_164BCD:: @ 8164BCD
	goto EventScript_164BD3
	end

EventScript_164BD3:: @ 8164BD3
	special Special_CloseElevatorCurrentFloorWindow
	releaseall
	end

EventScript_164BD8:: @ 8164BD8
	special Special_CloseElevatorCurrentFloorWindow
	closemessage
	waitse
	special Special_AnimateElevator
	waitstate
	setflag FLAG_TEMP_2
	return

Movement_164BE5:: @ 8164BE5
	step_2d
	step_1c
	step_10
	step_13
	step_13
	step_10
	step_end