summaryrefslogtreecommitdiff
path: root/npc/merchants/quivers.txt
blob: 984d182feca9cec3a764a0e9314d06a0b8b6740b (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
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015  Hercules Dev Team
//= Copyright (C)  Playtester
//= Copyright (C)  Nexon
//= Copyright (C)  L0ne_W0lf
//= Copyright (C)  Muad_Dib (Prometheus Project)
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program.  If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= Arrow Quiver Event
//================= Description ===========================================
//= Turns arrows into Arrow Quivers.
//================= Current Version =======================================
//= 1.2
//=========================================================================

payon_in01,5,134,5	script	Inventor Jaax	4_M_ORIENT02,{
	if (checkweight(Knife,1) == 0 || MaxWeight - Weight < 2000) {
		mes "[Inventor Jaax]";
		mes "Hey, you're carrying";
		mes "way too much stuff. Why don't you stash it away in Kafra Storage? We can talk after you do that, right?";
		close;
	}
	mes "[Inventor Jaax]";
	mes "My name is Jaax.";
	mes "Without ego, I can";
	mes "say that I am perhaps the";
	mes "^663300greatest inventor of our time^000000.";
	next;
	mes "[Inventor Jaax]";
	mes "This time, I've";
	mes "created something";
	mes "truly extraordinary. I call them... ^663300Magic Quivers^000000 !! This will be remembered in history as an";
	mes "arrow revolution!";
	emotion e_no1;
	next;
	mes "[Inventor Jaax]";
	mes "I've studied magic and quivers for years, working night and day until I finally figured how to condense arrows with magic! With magic quivers, you'll be carrying more arrows, but with less weight!";
	next;
	mes "[Inventor Jaax]";
	mes "Would you like to try using one of my arrow quivers? I have no doubt that someone like you can appreciate my genius!";
	next;
	switch(select("Quiver", "Iron Arrow Quiver", "Steel Arrow Quiver", "Oridecon Arrow Quiver", "Fire Arrow Quiver", "Silver Arrow Quiver", "Wind Arrow Quiver", "Stone Arrow Quiver", "Crystal Arrow Quiver", "Shadow Arrow Quiver", "Immaterial Arrow Quiver", "Rusty Arrow Quiver")) {
	case 1: callsub S_BuyQuiver,1750,500,500,12004;
	case 2: callsub S_BuyQuiver,1770,500,500,12005;
	case 3: callsub S_BuyQuiver,1753,500,500,12006;
	case 4: callsub S_BuyQuiver,1765,500,500,12007;
	case 5: callsub S_BuyQuiver,1752,500,500,12008;
	case 6: callsub S_BuyQuiver,1751,500,500,12009;
	case 7: callsub S_BuyQuiver,1755,500,500,12010;
	case 8: callsub S_BuyQuiver,1756,500,500,12011;
	case 9: callsub S_BuyQuiver,1754,500,500,12012;
	case 10: callsub S_BuyQuiver,1767,500,500,12013;
	case 11: callsub S_BuyQuiver,1757,500,500,12014;
	case 12: callsub S_BuyQuiver,1762,500,500,12015;
	}
	//This doesn't seem to be accessable...
	//mes "[Inventor Jaax]";
	//mes "Is there";
	//mes "anything you want?";
	//close;

// Arguments:
// -0: Type of Arrow to be packaged (item ID).
// -1: How many of each 'getarg(0)' arrow per quiver.
// -2: The cost of making a 'getarg(0)' quiver.
// -3: The quiver given by the NPC (item ID).
S_BuyQuiver:
	if (countitem(getarg(0)) >= getarg(1)) {
		mes "[Inventor Jaax]";
		mes "Excellent!";
		mes "Are you carrying any Arrows with you? I'll provide you with a quiver that can carry "+getarg(1)+" of your "+getitemname(getarg(0))+"s for only ^FF3131"+getarg(2)+" Zeny^000000.";
		next;
		switch(select("Store as many Arrows in quivers as possible", "Purchase 1 quiver", "Cancel")) {
		case 1:
			.@arrows = countitem(getarg(0));
			.@quiver = .@arrows / getarg(1);
			.@arrows_used = .@quiver * getarg(1);
			.@arrow_zeny01 = .@quiver * getarg(2);
			mes "Number of";
			mes "Arrows: ^3131FF"+.@arrows+" ^000000";
			mes "Maximum Number";
			mes "of Purchasable";
			mes "Quivers: ^3131FF"+.@quiver+" ^000000";
			mes "Zeny required: ^3131FF"+.@arrow_zeny01+" Zeny^000000";
			next;
			mes "[Inventor Jaax]";
			mes "Would you like to";
			mes "buy as many Quivers";
			mes "as you can for the Arrows";
			mes "you are currently carrying?";
			next;
			if (select("Yes", "Cancel") == 1) {
				if (.@arrow_zeny01 < Zeny) {
					mes "[Inventor Jaax]";
					mes "There you go!";
					mes "Just remember, ^FF0000you won't be able to use the Quiver when your carried weight is 90% of your maximum weight limit^000000.";
					Zeny -= .@arrow_zeny01;
					delitem getarg(0),.@arrows_used; //Arrow
					getitem getarg(3),.@quiver; //Quiver
					next;
					mes "[Inventor Jaax]";
					mes "So...";
					mes "Just keep track";
					mes "of how much you're";
					mes "carrying from time";
					mes "to time and you should";
					mes "be alright.";
					close;
				}
				else {
					mes "[Inventor Jaax]";
					mes "I'm sorry, but you don't have enough Zeny. I can't just give these away after working years";
					mes "to develop this revolutionary technology!";
					close;
				}
			}
			mes "[Inventor Jaax]";
			mes "You changed your mind?";
			mes "When the glory of owning";
			mes "a quiver is so close?";
			close;
		case 2:
			if (Zeny > getarg(2)) {
				mes "[Inventor Jaax]";
				mes "There you go!";
				mes "Just remember, ^FF0000you won't be able to use the Quiver when your carried weight is 90% of your maximum weight limit^000000.";
				Zeny -= getarg(2);
				delitem getarg(0),getarg(1); //Arrow
				getitem getarg(3),1; //Quiver
				next;
				mes "[Inventor Jaax]";
				mes "So...";
				mes "Just keep track";
				mes "of how much you're";
				mes "carrying from time";
				mes "to time and you should";
				mes "be alright.";
				close;
			}
			else {
				mes "[Inventor Jaax]";
				mes "You don't even";
				mes "have "+getarg(2)+" Zeny?";
				mes "I'm so sorry. I had no";
				mes "idea that you were so...";
				mes "^333333Destitute^000000.";
				close;
			}
		case 3:
			mes "[Inventor Jaax]";
			mes "What...?";
			mes "Do you not see that this invention can forever change the way Arrows are carried?! The future is now!";
			close;
		}
	}
	else {
		mes "[Inventor Jaax]";
		mes "You can carry a maximum of "+getarg(1)+" Arrows within this quiver. It was made using my secret method,";
		mes "so the total weight of the Arrows and Quiver is less than carrying the Arrows alone.";
		next;
		mes "[Inventor Jaax]";
		mes "It's a miracle of science! One that you can experience for yourself if you bring me at least "+getarg(1)+" Arrows and "+getarg(2)+" Zeny for each Quiver.";
		close;
	}
}