summaryrefslogtreecommitdiff
path: root/data/maps/ThreeIsland_DunsparceTunnel/scripts.inc
blob: 9fc141070cf3df1db31cdffe9e65d88e07b1f51a (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
ThreeIsland_DunsparceTunnel_MapScripts:: @ 8164D26
	map_script 3, ThreeIsland_DunsparceTunnel_MapScript1_164D2C
	.byte 0

ThreeIsland_DunsparceTunnel_MapScript1_164D2C:: @ 8164D2C
	setworldmapflag FLAG_WORLD_MAP_THREE_ISLAND_DUNSPARCE_TUNNEL
	specialvar VAR_RESULT, sub_806E25C
	copyvar VAR_0x8008, VAR_RESULT
	compare_var_to_value VAR_0x8008, 1
	call_if 1, EventScript_164D50
	compare_var_to_value VAR_0x8008, 0
	call_if 1, EventScript_164D54
	end

EventScript_164D50:: @ 8164D50
	setmaplayoutindex LAYOUT_UNUSED_LAYOUT_83453C0
	return

EventScript_164D54:: @ 8164D54
	setobjectxyperm 1, 6, 3
	setobjectmovementtype 1, 10
	return

ThreeIsland_DunsparceTunnel_EventScript_164D60:: @ 8164D60
	lock
	faceplayer
	checkflag FLAG_0x2E2
	goto_if_eq EventScript_164DC2
	specialvar VAR_RESULT, sub_806E25C
	compare_var_to_value VAR_RESULT, 1
	goto_if_eq EventScript_164D90
	msgbox gUnknown_817D13B
	closemessage
	applymovement 1, Movement_1A75E5
	waitmovement 0
	release
	end

EventScript_164D90:: @ 8164D90
	msgbox gUnknown_817D1C9
	giveitem ITEM_NUGGET
	compare_var_to_value VAR_RESULT, 0
	goto_if_eq EventScript_164DB8
	setflag FLAG_0x2E2
	goto EventScript_164DC2
	end

EventScript_164DB8:: @ 8164DB8
	msgbox gUnknown_817D2DC
	release
	end

EventScript_164DC2:: @ 8164DC2
	msgbox gUnknown_817D28C
	release
	end