summaryrefslogtreecommitdiff
path: root/data/scripts/berry_tree.s
blob: f6d98689ee15fe17f9ed0fbbfdf7cc3903e91572 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
BerryTreeScript:: @ 81A14DD
	special 43
	switch 0x8004
	case 255, Route102_EventScript_1A1533
	case 0, Route102_EventScript_1A153D
	case 1, Route102_EventScript_1A1595
	case 2, Route102_EventScript_1A15A2
	case 3, Route102_EventScript_1A15AF
	case 4, Route102_EventScript_1A15BC
	case 5, Route102_EventScript_1A15F9
	end

Route102_EventScript_1A1533:: @ 81A1533
	lockall
	message Route102_Text_1A1946
	waittext
	waitbutton
	releaseall
	end

Route102_EventScript_1A153D:: @ 81A153D
	lock
	faceplayer
	specialval RESULT, 49
	compare RESULT, 1
	jumpeq Route102_EventScript_1A1558
	message Route102_Text_1A16B6
	waittext
	waitbutton
	release
	end

Route102_EventScript_1A1558:: @ 81A1558
	msgbox Route102_Text_1A16CD, 5
	compare RESULT, 1
	jumpeq Route102_EventScript_1A1577
	compare RESULT, 0
	jumpeq Route102_EventScript_1A1593
	end

Route102_EventScript_1A1577:: @ 81A1577
	fadescreen 1
	closebutton
	special 44
	waitstate
	compare 0x800e, 0
	jumpeq Route102_EventScript_1A1593
	removeitem 0x800e, 1
	call Route102_EventScript_1A16A9

Route102_EventScript_1A1593:: @ 81A1593
	release
	end

Route102_EventScript_1A1595:: @ 81A1595
	lockall
	message Route102_Text_1A172C
	waittext
	waitbutton
	jump Route102_EventScript_1A165F

Route102_EventScript_1A15A2:: @ 81A15A2
	lockall
	message Route102_Text_1A174B
	waittext
	waitbutton
	jump Route102_EventScript_1A165F

Route102_EventScript_1A15AF:: @ 81A15AF
	lockall
	message Route102_Text_1A175C
	waittext
	waitbutton
	jump Route102_EventScript_1A165F

Route102_EventScript_1A15BC:: @ 81A15BC
	call Route102_EventScript_1A15CE
	lockall
	message Route102_Text_1A177D
	waittext
	waitbutton
	jump Route102_EventScript_1A165F

Route102_EventScript_1A15CE:: @ 81A15CE
	compare 0x8005, 0
	jumpeq Route102_EventScript_1A15F2
	compare 0x8005, 4
	jumpeq Route102_EventScript_1A15EB
	buffertext 1, Route102_Text_1A17B7
	return

Route102_EventScript_1A15EB:: @ 81A15EB
	buffertext 1, Route102_Text_1A179F
	return

Route102_EventScript_1A15F2:: @ 81A15F2
	buffertext 1, Route102_Text_1A17B0
	return

Route102_EventScript_1A15F9:: @ 81A15F9
	buffernum 1, 0x8006
	lock
	faceplayer
	msgbox Route102_Text_1A17C0, 5
	compare RESULT, 1
	jumpeq Route102_EventScript_1A161D
	compare RESULT, 0
	jumpeq Route102_EventScript_1A164B

Route102_EventScript_1A161D:: @ 81A161D
	special 46
	compare 0x8004, 0
	jumpeq Route102_EventScript_1A1642
	special 47
	message Route102_Text_1A17FD
	fanfare 387
	waittext
	waitfanfare
	waitbutton
	message Route102_Text_1A181A
	waittext
	waitbutton
	release
	end

Route102_EventScript_1A1642:: @ 81A1642
	message Route102_Text_1A1881
	waittext
	waitbutton
	release
	end

Route102_EventScript_1A164B:: @ 81A164B
	message Route102_Text_1A18C5
	waittext
	waitbutton
	release
	end

gUnknown_081A1654:: @ 81A1654
	lockall
	special 43
	call Route102_EventScript_1A16A9
	releaseall
	end

Route102_EventScript_1A165F:: @ 81A165F
	checkitem ITEM_WAILMER_PAIL, 1
	compare RESULT, 0
	jumpeq Route102_EventScript_1A168D
	msgbox Route102_Text_1A18E6, 5
	compare RESULT, 1
	jumpeq Route102_EventScript_1A1693
	compare RESULT, 0
	jumpeq Route102_EventScript_1A168D

Route102_EventScript_1A168D:: @ 81A168D
	releaseall
	end

gUnknown_081A168F:: @ 81A168F
	special 43
	lockall

Route102_EventScript_1A1693:: @ 81A1693
	message Route102_Text_1A1912
	waittext
	special 48
	special 94
	waitstate
	message Route102_Text_1A1925
	waittext
	waitbutton
	releaseall
	end

Route102_EventScript_1A16A9:: @ 81A16A9
	special 45
	inccounter GAME_STAT_PLANTED_BERRIES
	message Route102_Text_1A16FB
	waittext
	waitbutton
	return