root/npc/merchants/quivers.txt @ 1

Revision 1, 6.7 kB (checked in by jinshiro, 17 years ago)
RevLine 
[1]1//===== eAthena Script =======================================
2//= Arrow Quiver Event
3//===== By: ==================================================
4//= Muad_Dib (Prometheus Project); L0ne_W0lf
5//===== Current Version: =====================================
6//= 1.2
7//===== Compatible With: =====================================
8//= eAthena SVN
9//===== Description: =========================================
10//= [Aegis COnversion]
11//= Turns arrows into Arrow Quivers.
12// Breakdown of Subroutine "S_BuyQuiver"
13// arg(0): Type of Arrow to be packaged (item ID)
14// arg(1): How many of each 'getarg(0)' arrow per quiver
15// arg(2): The cost of making a 'getarg(0)' quiver.
16// arg(3): The quiver given by the NPC. (item ID)
17//===== Additional Comments: =================================
18//= 07/06/05 : Added 1st Version. [Muad_Dib]
19//= Converted to eAthena format by Dr.Evil
20//= added prize to quest - 500 Zeny
21//= Fixed a few spelling errors. [Nexon]
22//= 1.1 Added Holy Arrow Quivers [Playtester]
23//= 1.2 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
24//=     Removed "Holy Arrows" from the list.
25//============================================================
26
27payon_in01,5,134,5      script  Inventor Jaax   89,{
28        if (checkweight(1201,1) == 0) {
29                mes "[Inventor Jaax]";
30                mes "Hey, you're carrying";
31                mes "way too much stuff. Why don't you stash it away in Kafra Storage? We can talk after you do that, right?";
32                close;
33        }
34        set .@now_weight,MaxWeight-Weight;
35        if (.@now_weight < 2000) {
36                mes "[Inventor Jaax]";
37                mes "Hey, you're carrying";
38                mes "way too much stuff. Why don't you stash it away in Kafra Storage? We can talk after you do that, right?";
39                close;
40        }
41        mes "[Inventor Jaax]";
42        mes "My name is Jaxx.";
43        mes "Without ego, I can";
44        mes "say that I am perhaps the";
45        mes "^663300greatest inventor of our time^000000.";
46        next;
47        mes "[Inventor Jaxx]";
48        mes "This time, I've";
49        mes "created something";
50        mes "truly extraordinary. I call them... ^663300Magic Quivers^000000 !! This will be remembered in history as an";
51        mes "arrow revolution!";
52        Emotion e_no1;
53        next;
54        mes "[Inventor Jaax]";
55        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!";
56        next;
57        mes "[Inventor Jaax]";
58        mes "Would you like to try using one of my arrow quivers? I have no doubt that someone like you can appreciate my genius!";
59        next;
60        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")) {
61        case 1: callsub S_BuyQuiver,1750,500,500,12004;
62        case 2: callsub S_BuyQuiver,1770,500,500,12005;
63        case 3: callsub S_BuyQuiver,1753,500,500,12006;
64        case 4: callsub S_BuyQuiver,1765,500,500,12007;
65        case 5: callsub S_BuyQuiver,1752,500,500,12008;
66        case 6: callsub S_BuyQuiver,1751,500,500,12009;
67        case 7: callsub S_BuyQuiver,1755,500,500,12010;
68        case 8: callsub S_BuyQuiver,1756,500,500,12011;
69        case 9: callsub S_BuyQuiver,1754,500,500,12012;
70        case 10: callsub S_BuyQuiver,1767,500,500,12013;
71        case 11: callsub S_BuyQuiver,1757,500,500,12014;
72        case 12: callsub S_BuyQuiver,1762,500,500,12015;
73        }
74        //This doesn't seem to be accessable...
75        //mes "[Inventor Jaax]";
76        //mes "Is there";
77        //mes "anything you want?";
78        //close;
79
80S_BuyQuiver:
81        if (countitem(getarg(0)) > 499) {
82                mes "[Inventor Jaax]";
83                mes "Excellent!";
84                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.";
85                next;
86                switch(select("Store as many Arrows in quivers as possible:Purchase 1 quiver:Cancel")) {
87                case 1:
88                        set .@arrows,countitem(getarg(0));
89                        set .@quiver,.@arrows / getarg(1);
90                        set .@arrows_used,.@quiver * getarg(1);
91                        set .@arrow_zeny01,.@quiver * getarg(2);
92                        mes "Number of";
93                        mes "Arrows: ^3131FF"+.@arrows+" ^000000";
94                        mes "Maximum Number";
95                        mes "of Purchasable";
96                        mes "Quivers: ^3131FF"+.@quiver+" ^000000";
97                        mes "Zeny required: ^3131FF"+.@arrow_zeny01+" Zeny^000000";
98                        next;
99                        mes "[Inventor Jaax]";
100                        mes "Would you like to";
101                        mes "buy as many Quivers";
102                        mes "as you can for the Arrows";
103                        mes "you are currently carrying?";
104                        next;
105                        if (select("Yes:Cancel") == 1) {
106                                if (.@arrow_zeny01 < Zeny) {
107                                        mes "[Inventor Jaax]";
108                                        mes "There you go!";
109                                        mes "Just remember, ^FF0000you won't be able to use the Quiver when your carried weight is 90% of your maximum weight limit^000000.";
110                                        set zeny,zeny-.@arrow_zeny01;
111                                        delitem getarg(0),.@arrows_used; //Arrow
112                                        getitem getarg(3),.@quiver; //Quiver
113                                        next;
114                                        mes "[Inventor Jaax]";
115                                        mes "So...";
116                                        mes "Just keep track";
117                                        mes "of how much you're";
118                                        mes "carrying from time";
119                                        mes "to time and you should";
120                                        mes "be alright.";
121                                        close;
122                                }
123                                else {
124                                        mes "[Inventor Jaax]";
125                                        mes "I'm sorry, but you don't have enough Zeny. I can't just give these away after working years";
126                                        mes "to develop this revolutionary technology!";
127                                        close;
128                                }
129                        }
130                        mes "[Inventor Jaax]";
131                        mes "You changed your mind?";
132                        mes "When the glory of owning";
133                        mes "a quiver is so close?";
134                        close;
135                case 2:
136                        if (zeny > getarg(2)) {
137                                mes "[Inventor Jaax]";
138                                mes "There you go!";
139                                mes "Just remember, ^FF0000you won't be able to use the Quiver when your carried weight is 90% of your maximum weight limit^000000.";
140                                set zeny,zeny-getarg(2);
141                                delitem getarg(0),getarg(1); //Arrow
142                                getitem getarg(3),1; //Quiver
143                                next;
144                                mes "[Inventor Jaax]";
145                                mes "So...";
146                                mes "Just keep track";
147                                mes "of how much you're";
148                                mes "carrying from time";
149                                mes "to time and you should";
150                                mes "be alright.";
151                                close;
152                        }
153                        else {
154                                mes "[Inventor Jaax]";
155                                mes "You don't even";
156                                mes "have "+getarg(2)+" Zeny?";
157                                mes "I'm so sorry. I had no";
158                                mes "idea that you were so...";
159                                mes "^333333Destitute^000000.";
160                                close;
161                        }
162                case 3:
163                        mes "[Inventor Jaax]";
164                        mes "What...?";
165                        mes "Do you not see that this invention can forever change the way Arrows are carried?! The future is now!";
166                        close;
167                }
168        }
169        else {
170                mes "[Inventor Jaax]";
171                mes "You can carry a maximum of 500 Arrows within this quiver. It was made using my secret method,";
172                mes "so the total weight of the Arrows and Quiver is less than carrying the Arrows alone.";
173                next;
174                mes "[Inventor Jaax]";
175                mes "It's a miracle of science! One that you can experience for yourself if you bring me at least 500 Arrows and 500 Zeny for each Quiver.";
176                close;
177        }
178}
Note: See TracBrowser for help on using the browser.