OSDN Git Service

First version
[st-ro/stro.git] / npc / re / merchants / diamond.txt
1 //===== rAthena Script =======================================
2 //= Rare Diamond Merchant
3 //===== By: ==================================================
4 //= Z3R0
5 //===== Current Version: =====================================
6 //= 1.5
7 //===== Compatible With: =====================================
8 //= rAthena Project
9 //===== Description: =========================================
10 //= [Official Conversion]
11 //= Exchanges 17 Carat Diamond
12 //===== Additional Comments: =================================
13 //= 1.0 First / Optimized Version
14 //= 1.1 Adjusted for Missing ; on Line #271 (#15425)
15 //= 1.2 Removed Comments per Request (#15426)
16 //= 1.3 Changed Emotion # to Const Definition (#15427)
17 //= 1.4 Removed Double Space on Line #148 (#15428)
18 //= 1.5 Added This Version History (#15429)
19 //============================================================
20
21 // Main NPC :: diamond
22 //============================================================
23 -       script  RareDiamondMerchant     58,{
24
25         set .@npc$, "[Rare Diamond Merchant]";
26
27         mes .@npc$;
28         mes "Ladies and Gentlemen! ! !";
29         mes "You've heard rumors but you've never once seen with your own eyes";
30         mes "the world's rarest diamond!";
31         mes "The ^FF82FF'17 Carat Diamond'^000000 is currently on sale for a cheap price!!";
32         mes "If valuable diamonds interest you then listen up!";
33         next;
34         
35         mes .@npc$;
36         mes "You can give the diamond as a gift to your lover.";
37         mes "The receiver of the ^FF82FF'17 Carat Diamond'^000000 will cherish it";
38         mes "and treasure you in their heart.";
39         emotion e_loud;
40         next;
41         
42         mes .@npc$;
43         mes "What? You don't have a lover?";
44         mes "You can still just hang on to it for yourself.";
45         mes "The enchanting aura of the ^FF82FF'17 Carat Diamond'^000000 is likely";
46         mes "to bring love into your life.";
47         next;
48         
49         mes .@npc$;
50         mes "Known as the captivating diamond of diamonds...";
51         mes "It is the ^FF82FF'17 Carat Diamond'^000000!";
52         next;
53
54         set .@menu$, "^FF82FF'17 Carat Diamond'^000000?";
55         if (countitem(6024))
56                 set .@menu$, .@menu$ + ":Exchange my 17 Carat Diamond for zeny...";
57
58         switch(select(.@menu$)) {
59         case 1:
60                 mes .@npc$;
61                 mes "Yes!";
62                 mes "Hehe, the ^FF82FF'17 Carat Diamond'^000000 you see right now";
63                 mes "is one of the highest quality 17 carat diamonds.";
64                 mes "Comparing it to any pea-sized, colorless rock you may have";
65                 mes "dug up from Morroc is unspeakable!";
66                 emotion e_omg;
67                 next;
68                 
69                 mes .@npc$;
70                 mes "Some claim that this is the very same diamond";
71                 mes "that was seen by Kachua in Comodo!";
72                 next;
73                 
74                 if (select("End Conversation:How much is it?") == 1) {
75                         mes .@npc$;
76                         mes "It's rather inexpensive!";
77                         mes "If you're interested, talk to me any time!";
78                         close;
79                 }
80                 
81                 mes .@npc$;
82                 mes "Of course! The most important thing is price!";
83                 mes "As I've said earlier, the ^FF82FF'17 Carat Diamond'^000000 has been";
84                 mes "appraised as a 17 carat diamond.";
85                 mes "There aren't many like it in the world.";
86                 next;
87                 
88                 mes .@npc$;
89                 mes "The price is a mere 500 million zeny!";
90                 mes "There is also a 1,000,000z service fee.";
91                 mes "Compared to the quality of the diamond";
92                 mes "this is a small price to pay.";
93                 next;
94                 
95                 if (select("^828282It's too expensive.^000000:I'll buy it.") == 1) {
96                         mes .@npc$;
97                         mes "To say that a diamond such as the";
98                         mes "^FF82FF'17 Carat Diamond'^000000 is too expensive, ";
99                         mes "you leave me speechless.";
100                         close;
101                 }
102                 
103                 mes .@npc$;
104                 mes "OOOH! I knew from the moment I saw you that you were the rightful";
105                 mes "owner of this wonderful diamond.";
106                 mes "I'm glad I wasn't wrong!";
107                 mes "I believe this diamond will suit you quite well.";
108                 mes "All I need from you is to complete this contract.";
109                 next;
110                 
111                 while(1) {
112                         if (select("^B9062FI will sign the contract.^000000:^828282Nevermind, I changed my mind.^000000") == 2) {
113                                 mes .@npc$;
114                                 mes "I see, that's too bad..";
115                                 close;
116                         }
117                         
118                         mes .@npc$;
119                         mes "What is your name?";
120                         next;
121                         
122                         mes "[" + strcharinfo(0) + "]";
123                         mes "My name is " + strcharinfo(0) + ".";
124                         next;
125
126                         mes .@npc$;
127                         mes "Alright then, please sign here.";
128                         next;
129                         
130                         input .@charname$;
131                         if (.@charname$ == strcharinfo(0)) {
132                                 mes .@npc$;
133                                 mes "Okay, good.";
134                                 mes "All that is left now is payment.";
135                                 next;
136                                 
137                                 if (Zeny >= 501000000) {
138                                         mes .@npc$;
139                                         mes ". . . . . .";
140                                         next;
141                                         
142                                         mes .@npc$;
143                                         mes "Calculating the price and service fee..";
144                                         mes "501,000,000 zeny.";
145                                         mes "Amount has been confirmed.";
146                                         emotion e_loud;
147                                         set Zeny, Zeny - 501000000;
148                                         getitem 6024, 1;
149                                         next;
150
151                                         mes .@npc$;
152                                         mes "You may exchange the diamond back for zeny at any time.";
153                                         mes "However, there will be a 1,000,000z service fee.";
154                                         mes "Thank you for your business.";
155                                         emotion e_thx;
156                                         close;
157                                 }
158                                 else {
159                                         mes .@npc$;
160                                         mes "Hm?";
161                                         mes "I'm sorry, but you don't have sufficient funds.";
162                                         mes "Including the service fee, a total of 501,000,000z is required.";
163                                         mes "Please check your zeny balance and try again.";
164                                         emotion e_hmm;
165                                         close;
166                                 }
167                         }
168                         else {
169                                 mes .@npc$;
170                                 mes "Is this really your signature?";
171                                 mes "Will sign again to confirm?";
172                                 next;
173                         }
174                 }
175         case 2:
176                 mes .@npc$;
177                 mes "AAH. You would like to exchange your ^FF82FF'17 Carat Diamond'^000000 for zeny?";
178                 emotion e_gasp;
179                 next;
180                 if (select("Yes:No") == 2) {
181                         mes .@npc$;
182                         mes "Then, what is it you desire?..";
183                         mes ". . . . . ....";
184                         emotion e_dots;
185                         close;
186                 }
187
188                 mes .@npc$;
189                 mes "I see. After I receive your signature, ";
190                 mes "You must offer your ^FF82FF'17 Carat Diamond'^000000.";
191                 mes "Also don't forget there is a 1,000,000z service fee!";
192                 next;
193                 
194                 mes .@npc$;
195                 mes "What is your name?";
196                 next;
197                 
198                 mes "[" + strcharinfo(0) + "]";
199                 mes "My name is " + strcharinfo(0) + ".";
200                 next;
201                 
202                 mes .@npc$;
203                 mes "Alright then, please sign here.";
204                 next;
205                 
206                 while (1) {
207                         if (select("Sign:Don't Sign") == 2) {
208                                 mes .@npc$;
209                                 mes "The trade cannot be completed without your signature.";
210                                 close;
211                         }
212                         
213                         input .@charname$;
214                         if (.@charname$ == strcharinfo(0)) {
215                                 mes .@npc$;
216                                 mes "Your signature has been received.";
217                                 mes "I will now take your ^FF82FF'17 Carat Diamond'^000000..";
218                                 mes "You will receive ^0000FF499,000,000z^000000 afterwards.";
219                                 next;
220                                 
221                                 mes .@npc$;
222                                 mes "Thank you for your business.";
223                                 mes "Whenever you need a ^FF82FF'17 Carat Diamond'^000000,";
224                                 mes "come back anytime with 500 million zeny.";
225                                 emotion e_thx;
226                                 delitem 6024, 1;
227                                 set Zeny, Zeny + 499000000;
228                                 close;
229                         }
230                         else {
231                                 mes .@npc$;
232                                 mes "Is this really your signature?";
233                                 mes "Will sign again to confirm?";
234                                 next;
235                         }
236                 }
237         }
238 }
239
240 prontera,165,89,6       duplicate(RareDiamondMerchant)  Rare Diamond Merchant#1 58
241 geffen,106,63,6 duplicate(RareDiamondMerchant)  Rare Diamond Merchant#2 58
242 morocc,146,100,6        duplicate(RareDiamondMerchant)  Rare Diamond Merchant#3 58
243 alberta,129,60,6        duplicate(RareDiamondMerchant)  Rare Diamond Merchant#4 58
244 lighthalzen,163,65,6    duplicate(RareDiamondMerchant)  Rare Diamond Merchant#5 58
245 rachel,106,142,6        duplicate(RareDiamondMerchant)  Rare Diamond Merchant#6 58
246 payon,180,130,6 duplicate(RareDiamondMerchant)  Rare Diamond Merchant#7 58