root/npc/merchants/dye_maker.txt @ 23

Revision 1, 8.8 kB (checked in by jinshiro, 17 years ago)
Line 
1//===== eAthena Script =======================================
2//= Dye Maker
3//===== By: ==================================================
4//= eAthena Dev Team
5//===== Current Version: =====================================
6//= 1.4
7//===== Compatible With: =====================================
8//= eAthena SVN
9//===== Description: =========================================
10//= [Aegis Conversion]
11//===== Additional Comments: =================================
12//= 1.0 Fully working [kobra_k88]
13//= 1.1 Spell Checked [Nexon]
14//= 1.2 Rescripted to Aegis 10.3 standard. [L0ne_W0lf]
15//= 1.2b Fixed typos in variable names [ultramage]
16//= 1.3 Made the checks more dynamic [ultramage]
17//= 1.3b Fixed incorrect checking loop structure [ultramage]
18//= 1.4 Added a checkweight. [L0ne_W0lf]
19//============================================================
20
21morocc_in,146,99,3      script  Java Dullihan   58,{
22        if ((MaxWeight-Weight) < 200 || checkweight(1201,1) == 0) {
23                mes "- Wait a moment! -";
24                mes "- Currently you're carrying -";
25                mes "- too many items with you. -";
26                mes "- Please come back later -";
27                mes "- after you put some items into kafra storage. -";
28                close;
29        }
30        mes "[Dye Maker Java Dullihan]";
31        mes "Wow...";
32        mes "Such a nice day. Days like this are perfect to make dyes.";
33        next;
34        switch(select("Talk:Make Dyestuffs:Cancel")) {
35        case 1:
36                mes "[Dye Maker Java Dullihan]";
37                mes "Erm, I don't really have much to say to you. But, if you would like me to tell you about my life, I can do that. It's a little long and boring, but would you like to listen?";
38                next;
39                if (select("Listen:Don't Listen") == 1) {
40                        mes "[Dye Maker Java Dullihan]";
41                        mes "As long as I can remember, my father has been making dyes. He used to spend countless hours making dyes of different colors. Even when my mother passed away, he never stopped.";
42                        next;
43                        mes "[Dye Maker Java Dullihan]";
44                        mes "At one point in my life, I became rebellious and ran away from home. I didn't want to be stuck to the family business and wanted to try other things.";
45                        next;
46                        mes "[Dye Maker Java Dullihan]";
47                        mes "Anyways...";
48                        mes "I eventually wound up back home to carry on the family tradition, making dyes for 15 years already. I guess it was really in my blood.";
49                        next;
50                        mes "[Dye Maker Java Dullihan]";
51                        mes "Something I realized these days is that now I can understand my father. Why my father devoted everything to making dyes...";
52                        next;
53                        mes "[Dye Maker Java Dullihan]";
54                        mes "In the middle of all that tedious and hard work, he probably felt the magic of those colors passing on so many dreams for other people.";
55                        next;
56                        mes "[Dye Maker Java Dullihan]";
57                        mes "It was probably for those dreams that he tried so hard to make dyes for his customers...";
58                        next;
59                        mes "[Dye Maker Java Dullihan]";
60                        mes "Heh... How do I know this? Well, that's the way I feel right now. Since a couple years ago, I've been able to hear what the colors were saying...";
61                        next;
62                        mes "[Dye Maker Java Dullian]";
63                        mes "Just watch. Someday, I'm going to succeed in making the color my father wanted to, but never got the chance to make.";
64                        close;
65                }
66                mes "[Dye Maker Java Dullihan]";
67                mes "Ahahahaha...";
68                mes "Well, I guess no one would want to listen to a measly dyemaker's story anyway. Hahaha....";
69                close;
70
71        case 2:
72                mes "[Dye Maker Java Dullihan]";
73                mes "Great! If you want it, I'll make it for you. I promise I'll make you the color you want. But what color dye would you like to make? The fee is different depending on the color.";
74                next;
75                mes "[Dye Maker Java Dullihan]";
76                mes "Why, do you ask? Just remember that there are colors that are easy to make, and those that require more effort and work. Please don't think the fee is too expensive.";
77                next;
78                mes "[Dye Maker Java Dullihan]";
79                mes "The color of the dye is special, made with all my heart and soul.";
80                next;
81                switch(select("Scarlet Dyestuffs:Lemon Dyestuffs:Cobaltblue Dyestuffs:Darkgreen Dyestuffs:Orange Dyestuffs:Violet Dyestuffs:White Dyestuffs:Black Dyestuffs:Cancel")) {
82                case 1: callsub S_MakeDye,1,1; break;
83                case 2: callsub S_MakeDye,2,1; break;
84                case 3: callsub S_MakeDye,3,2; break;
85                case 4: callsub S_MakeDye,4,3; break;
86                case 5: callsub S_MakeDye,5,4; break;
87                case 6: callsub S_MakeDye,6,4; break;
88                case 7: callsub S_MakeDye,7,4; break;
89                case 8: callsub S_MakeDye,8,4; break;
90                case 9:
91                        mes "[Dye Maker Java Dullihan]";
92                        mes "Eeeehhhh!! What's this? You change your mind now!? So disappointing...";
93                        close;
94                }
95
96        case 3:
97                mes "[Dye Maker Java Dullihan]";
98                mes "I'm not bragging or anything. But I have the skills to make dyestuff. If you ever need dyestuff, please come to me. I'll make them for you at a reasonable price.";
99                close;
100        }
101
102S_MakeDye:
103        mes "[Dye Maker Java Dullihan]";
104        switch(getarg(0)) {
105        case 1:
106                mes "Mmm... I need 30 Red Herbs, 1 Counteragent, and 1 Empty Bottle to make Red Dyestuffs. The fee is only 3000 zeny to make it.";
107                setarray .@item[0], 507, 973, 713;
108                setarray .@count[0], 30,   1,   1;
109                set .@cost,3000;
110                set .@dyestuff,975;
111                break;
112        case 2:
113                mes "Mmm... I need 30 Yellow Herbs, 1 Couneragent, and 1 Empty Bottle to make Lemon Dyestuffs. The fee is only 3000 zeny to make it.";
114                setarray .@item[0], 508, 973, 713;
115                setarray .@count[0], 30,   1,   1;
116                set .@cost,3000;
117                set .@dyestuff,976;
118                break;
119        case 3:
120                mes "Mmm... I need 20 Blue Herbs, 1 Counteragent, and 1 Empty Bottle to make Cobaltblue Dyestuff. It's hard to use the Blue Herb, so the fee is going to be 3500 zeny.";
121                setarray .@item[0], 510, 973, 713;
122                setarray .@count[0], 20,   1,   1;
123                set .@cost,3500;
124                set .@dyestuff,978;
125                break;
126        case 4:
127                mes "Mmm... I need 5 Blue Herbs, 20 Green Herbs, 20 Yellow Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle to make Darkgreen Dyestuffs. Don't get all of the materials confused. The fee is only 5000 zeny.";
128                setarray .@item[0], 510, 511, 508, 974, 973, 713;
129                setarray .@count[0],  5,  20,  20,   1,   1,   1;
130                set .@cost,5000;
131                set .@dyestuff,979;
132                break;
133        case 5:
134                mes "Mmm... I need 20 Red Herbs, 20 Yellow Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle to make Orange Dyestuff. The fee is going to be 5000 zeny.";
135                setarray .@item[0], 507, 508, 974, 973, 713;
136                setarray .@count[0], 20,  20,   1,   1,   1;
137                set .@cost,5000;
138                set .@dyestuff,980;
139                break;
140        case 6:
141                mes "Mmm... I need 10 Blue Herbs, 30 Red Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle to make Violet Dyestuffs. The fee will be 5000 zeny.";
142                setarray .@item[0], 510, 507, 974, 973, 713;
143                setarray .@count[0], 10,  30,   1,   1,   1;
144                set .@cost,5000;
145                set .@dyestuff,981;
146                break;
147        case 7:
148                mes "Mmm... I need 30 White Herbs, 1 Counteragent, and 1 Empty bottle to make White Dyestuffs. The fee will be 3000 zeny.";
149                setarray .@item[0], 509, 973, 713;
150                setarray .@count[0], 30,   1,   1;
151                set .@cost,3000;
152                set .@dyestuff,982;
153                break;
154        case 8:
155                mes "Mmm... I need 30 of each Red, Yellow, and Green Herb, 5 Blue Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle. The process takes longer and more effort than the others, so it is going to be 7000 zeny.";
156                setarray .@item[0], 507, 508, 511, 510, 974, 973, 713;
157                setarray .@count[0], 30,  30,  30,   5,   1,   1,   1;
158                set .@cost,7000;
159                set .@dyestuff,983;
160                break;
161        }
162        next;
163        mes "[Dye Maker Java Dullihan]";
164        switch(getarg(1)) {
165        case 1: mes "Ah! I think you would have everything ready. Would you like to start the process?"; break;
166        case 2: mes "Okay! I believe you would have everything ready. Would you like to start the process?"; break;
167        case 3: mes "Okay! I believe you would have everything ready. Shall we begin the process?"; break;
168        case 4: mes "Okay! I believe you would have everything prepared. Would you like to start the process?"; break;
169        }
170        next;
171        if (select("Make Dyestuffs:Cancel") == 1) {
172                set .@size, getarraysize(.@item);
173                // check requirements
174                for( set .@i,0 ; .@i < .@size ; set .@i,.@i+1 )
175                        if( countitem(.@item[.@i]) < .@count[.@i] )
176                                break;
177                if( .@i < .@size || Zeny < .@cost ) {
178                        mes "[Dye Maker Java Dullihan]";
179                        mes "Hmmm. Not enough...";
180                        mes "I don't think I'll be able to make the color you want with those materials. Why don't you go get some more materials...?";
181                        close;
182                }
183                // delete items
184                for (set .@i, 0; .@i < .@size ; set .@i, .@i+1)
185                        delitem .@item[.@i], .@count[.@i];
186                set zeny,zeny-.@cost;
187                // get dyestuff
188                getitem .@dyestuff,1;
189               
190                mes "[Dye Maker Java Dullihan]";
191                mes "Hmm... It came out pretty well. A very rich color. Of course I'll be trying harder to make a more charming color...";
192                next;
193                mes "[Dye Maker Java Dullihan]";
194                mes "Well, then. Stop by whenever you need more dyes.";
195                close;
196        }
197        mes "[Dye Maker Java Dullihan]";
198        mes "Eeeehhhh!! What's this?";
199        mes "You change your mind now!? So disappointing...";
200        return;
201}
Note: See TracBrowser for help on using the browser.