summaryrefslogtreecommitdiff
path: root/npc/006-1_Desert_mountains/pachua.txt
blob: f4d2a6530164df70198906ff703bc0a51ee85e05 (plain) (blame)
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
006-1.gat,23,100,0	script	Pachua	143,{

	set @LEATHER_PATCH_PRICE, 300;

	set @wants_leather_patch, QUEST_Forestbow_state & NIBBLE_4_MASK;

	mes "[Chief Pachua]";
	mes "\"How!\"";
	next;
	
	if (getequipid(equip_head) == 643 || getequipid(equip_head) == 644) goto L_WearingCowboy;
	if (getequipid(equip_legs) == 642) goto L_WearingChaps;

	mes "[Chief Pachua]";
	mes "\"For generations my tribe has been crafting special clothes out of different items.\"";
	next;

L_Check_Shops:
	if((countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) && (countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1)) goto L_Super_store;
	if(countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) goto L_Chaps_store;
	if(countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1) goto L_Cowboy_store;

	mes "[Chief Pachua]";
	mes "\"Maybe if you bring me the right materials I can make something for you.\"";
        next;

        if (@wants_leather_patch)
		menu	"Wait, can you make a leather patch for me?", L_leather_patch,
                	"OK, bye.", -;

	close;

L_CheckStuff:
	mes "[Chief Pachua]";
	mes "\"Let me see what you have there.\"";
	next;
	return;

L_Super_store:
	callsub L_CheckStuff;
	mes "[Chief Pachua]";
	mes "\"Ahh you have lots of good items to work with.\"";
	mes "";
	mes "\"With them I can make you either";
	mes "a Cowboy hat or Snake Skin Chaps\"";
	next;
	if (@wants_leather_patch)
		menu
			"Cowboy hat, please.", L_BuyCowboy,
			"Snake Skin Chaps sound good.", L_BuyChaps,
			"Can you make a leather patch?", L_leather_patch,
			"Not now, maybe later.", L_NoDeal;
	if (!@wants_leather_patch)
		menu
			"Cowboy hat, please.", L_BuyCowboy,
			"Snake Skin Chaps sound good.", L_BuyChaps,
			"Not now, maybe later.", L_NoDeal;

L_Cowboy_store:
	callsub L_CheckStuff;
	mes "[Chief Pachua]";
	mes "\"To make you a Cowboy hat I will need:";
	mes "1 Fancy hat";
	mes "2 Snake skins";
	mes "5.000 GP\"";
	mes "";
	mes "\"Do we have a deal?\"";
	next;
	if (@wants_leather_patch)
		menu
			"Yes, that's fine.", L_BuyCowboy,
			"Can you make a leather patch?", L_leather_patch,
			"On second thought, maybe later.", L_NoDeal;
	if (!@wants_leather_patch)
		menu
			"Yes, that's fine.", L_BuyCowboy,
			"On second thought, maybe later.", L_NoDeal;

L_Chaps_store:
	callsub L_CheckStuff;
	mes "[Chief Pachua]";
	mes "\"To make you a pair of Snake Skin Chaps I will need:";
	mes "1 Jeans Shorts";
	mes "10 Snake skins";
	mes "10.000 GP\"";
	mes "";
	mes "\"Do we have a deal?\"";
	next;
	if (!@wants_leather_patch)
		menu
			"Yes, that's fine.", L_BuyChaps,
			"On second thought, maybe later.", L_NoDeal;
	if (@wants_leather_patch)
		menu
			"Yes, that's fine.", L_BuyChaps,
			"Can you make a leather patch?", L_leather_patch,
			"On second thought, maybe later.", L_NoDeal;

L_BuyChaps:
	if (zeny < 10000) goto L_NoMoney;
	if (countitem("JeansShorts") < 1) goto L_NoJeans;
	if (countitem("SnakeSkin") < 10) goto L_NoSkin;
	set zeny, zeny - 10000;
	delitem "SnakeSkin", 10;
	delitem "JeansShorts", 1;
	getitem "JeansChaps", 1;
	goto L_DealDone;

L_BuyCowboy:
	if (zeny < 5000) goto L_NoMoney;
	if (countitem("FancyHat") < 1) goto L_NoFancy;
	if (countitem("SnakeSkin") < 2) goto L_NoSkin;
	set zeny, zeny - 5000;
	delitem "SnakeSkin", 2;
	delitem "FancyHat", 1;
	set @temp,rand(2);
	if(@temp == 0) goto L_Cowboy_white;
	goto L_Cowboy_black;

L_Cowboy_white:
	getitem "WhiteCowboyHat", 1;
	goto L_DealDone;

L_Cowboy_black:
	getitem "BlackCowboyHat", 1;
	goto L_DealDone;

L_leather_patch:
	mes "[Chief Pachua]";
	mes "\"If you just want a piece of leather, then yes, I can make that.  Bring me a snake skin and " + @LEATHER_PATCH_PRICE + " GP.\"";
        next;

        menu	"Here you are.", -,
		"OK, I'll be back later.", L_End,
		"That's too expensive!.", L_NoDeal;

	if (countitem("SnakeSkin") < 1) goto L_NoSkins;
	if (zeny < @LEATHER_PATCH_PRICE) goto L_NoMoney;
	getinventorylist;
	if (@inventorylist_count == 100 && countitem("SnakeSkin") > 1) goto L_TooMany;

        set zeny, zeny - @LEATHER_PATCH_PRICE;
        delitem "SnakeSkin", 1;
        getitem "LeatherPatch", 1;
        goto L_DealDone;

L_DealDone:
	mes "[Chief Pachua]";
	mes "\"Here you are!\"";
	mes "";
	mes "\"Come back any time.\"";
	close;

L_NoDeal:
	mes "[Chief Pachua]";
	mes "\"Alright, but you wont get a better deal anywhere else!\"";
	close;

L_NoMoney:
	mes "[Chief Pachua]";
	mes "\"Oh dear, it seems you don't have enough money.\"";
	close;

L_NoJeans:
	mes "[Chief Pachua]";
	mes "\"Oh dear, it seems you don't have enough jeans shorts.\"";
	close;

L_NoFancy:
	mes "[Chief Pachua]";
	mes "\"Oh dear, it seems you don't have enough fancy hats.\"";
	close;

L_NoSkins:
	mes "[Chief Pachua]";
	mes "\"Oh dear, it seems you don't have enough snake skins.\"";
	close;

L_WearingCowboy:
	mes "[Chief Pachua]";
	mes "\"Ah, I see that you are wearing a hat made with the ancient methods of my tribe.\"";
	next;
	goto L_Check_Shops;

L_WearingChaps:
	mes "[Chief Pachua]";
	mes "\"Ah, I see that you are wearing pants made by my tribe.\"";
	next;
	goto L_Check_Shops;

L_End:
	close;

L_TooMany:
	mes "[Chief Pachua]";
	mes "\"You don't have room for a leather patch. Come back later.\"";
	close;
}