summaryrefslogtreecommitdiff
path: root/data/scripts/hyruleTown/script_GoronMerchant.inc
blob: e2aee53a0ce54350d3c63627b94ebfa0cf2b0bf4 (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
@ Hyrule Town Goron Merchant
SCRIPT_START script_GoronMerchant
	BeginBlock
	SetAnimationState 0x0004
	DoPostScriptAction 0x0000
	DoPostScriptAction 0x000a
	DoPostScriptAction 0x0007
	_0807E9D4
	Call SetPriorityMessage
	Call sub_08069684
	EndBlock
script_080107F2:
	EndBlock
	BeginBlock
	CheckPlayerInRegion2 0x3030
	JumpIfNot script_080107F2
	Call sub_080696B0
script_08010804:
	EndBlock
	BeginBlock
	CheckPlayerInRegion2 0x3030
	JumpIfNot script_080107F2
	HasRoomItemForSale
	JumpIf script_08010860
	CheckEntityInteractType
	JumpIfNot script_08010804
	EndBlock
	SetPlayerIdle
	Call DisablePauseMenuAndPutAwayItems
	FacePlayer
	CheckGlobalFlag GORON_KAKERA_L
	JumpIfNot script_08010858
	CheckGlobalFlag GORON_KAKERA_M
	JumpIfNot script_08010858
	CheckGlobalFlag GORON_KAKERA_R
	JumpIfNot script_08010858
	CheckGlobalFlag GORON_KAKERA_LV5
	JumpIfNot script_08010850
	MessageNoOverlap TEXT_TINGLE, 0x39
	Jump script_080108BA
script_08010850:
	MessageNoOverlap TEXT_STOCKWELL, 0x1b
	Jump script_080108BA
script_08010858:
	MessageNoOverlap TEXT_STOCKWELL, 0x1a
	Jump script_080108BA
script_08010860:
	EndBlock
	SetPlayerIdle
	Call DisablePauseMenu
	FacePlayer
	Call sub_08069660
	WaitUntilTextboxCloses
	CheckTextboxResult
	JumpIfNot script_080108B2
	Call GoronMerchant_TryToBuyKinstone
	JumpIfNot script_080108B2
	WaitPlayerGetItem
	WaitUntilTextboxCloses
	FaceAwayFromPlayer
	CheckGlobalFlag GORON_KAKERA_L
	JumpIfNot script_080108AA
	CheckGlobalFlag GORON_KAKERA_M
	JumpIfNot script_080108AA
	CheckGlobalFlag GORON_KAKERA_R
	JumpIfNot script_080108AA
	MessageNoOverlap TEXT_STOCKWELL, 0x21
	Jump script_080108B2
script_080108AA:
.ifdef USA
	SetLocalFlag 0x00fa
.else
.ifdef DEMO_USA
	SetLocalFlag 0x00fa
.endif
.endif
	MessageNoOverlap TEXT_STOCKWELL, 0x20
script_080108B2:
	WaitUntilTextboxCloses
	Call ScriptCommand_PlayerDropHeldObject
script_080108BA:
	WaitUntilTextboxCloses
	Call EnablePauseMenu
	EnablePlayerControl
	SetAnimationState 0x0004
	DoPostScriptAction 0x0000
	Jump script_08010804