OSDN Git Service

First version
[st-ro/stro.git] / npc / airports / airships.txt
1 //===== rAthena Script ======================================= 
2 //= The Airship System Script
3 //===== By: ================================================== 
4 //= rAthena Dev Team
5 //===== Current Version: =====================================
6 //= 1.0
7 //===== Compatible With: ===================================== 
8 //= rAthena Project
9 //===== Description: ========================================= 
10 //= The Airship System used in the official servers.
11 //===== Additional Comments: ================================= 
12 //= 1.0 First version.
13 //============================================================ 
14
15 //============================================================ 
16 //= Domestic Airship Route
17 //= ... -> Juno -> Einbroch -> Lighthalzen -> Einbroch
18 //= -> Juno -> Hugel -> ...
19 //============================================================ 
20
21 airplane,243,73,0       script  #AirshipWarp-1  45,1,1,{
22         end;
23
24 OnInit:
25 OnHide:
26         specialeffect EF_BASH;
27         disablenpc strnpcinfo(0);
28         end;
29
30 OnUnhide:
31         enablenpc strnpcinfo(0);
32         specialeffect EF_SUMMONSLAVE;
33         end;
34
35 OnTouch_:
36         switch ($@airplanelocation) {
37         case 0: warp "yuno",92,260; end;
38         case 1: warp "einbroch",92,278; end;
39         case 2: warp "lighthalzen",302,75; end;
40         case 3: warp "hugel",181,146; end;
41         }
42 }
43
44 airplane,243,29,0       duplicate(#AirshipWarp-1)       #AirshipWarp-2  45,1,1
45
46 airplane,1,1,0  script  Domestic_Airship        -1,{
47         end;
48 OnInit:
49         initnpctimer;
50         end;
51 OnTimer20000:
52         mapannounce "airplane","We are heading to Einbroch.",bc_map,"0x00ff00";
53         end;
54 OnTimer50000:
55         mapannounce "airplane","We will arrive in Einbroch shortly.",bc_map,"0x00ff00";
56         end;
57 OnTimer60000:
58         set $@airplanelocation,1;
59         donpcevent "#AirshipWarp-1::OnUnhide";
60         donpcevent "#AirshipWarp-2::OnUnhide";
61         mapannounce "airplane","Welcome to Einbroch. Have a safe trip.",bc_map,"0x00ff00";
62         end;
63 OnTimer70000:
64         mapannounce "airplane","Currently we are in Einbroch. The Airship will take off shortly.",bc_map,"0x00ff00";
65         end;
66 OnTimer80000:
67         donpcevent "#AirshipWarp-1::OnHide";
68         donpcevent "#AirshipWarp-2::OnHide";
69         mapannounce "airplane","The Airship is now taking off. Our next destination is Lighthalzen.",bc_map,"0x70dbdb";
70         end;
71 OnTimer100000:
72         mapannounce "airplane","We are heading to Lighthalzen.",bc_map,"0x70dbdb";
73         end;
74 OnTimer130000:
75         mapannounce "airplane","We will arrive in Lighthalzen shortly.",bc_map,"0x70dbdb";
76         end;
77 OnTimer140000:
78         set $@airplanelocation,2;
79         donpcevent "#AirshipWarp-1::OnUnhide";
80         donpcevent "#AirshipWarp-2::OnUnhide";
81         mapannounce "airplane","Welcome to Lighthalzen. Have a safe trip.",bc_map,"0x70dbdb";
82         end;
83 OnTimer150000:
84         mapannounce "airplane","Currently we are in Lighthalzen. The Airship will leave shortly.",bc_map,"0x70dbdb";
85         end;
86 OnTimer160000:
87         donpcevent "#AirshipWarp-1::OnHide";
88         donpcevent "#AirshipWarp-2::OnHide";
89         mapannounce "airplane","The Airship is leaving the ground. Our next destination is Einbroch.",bc_map,"0x00ff00";
90         end;
91 OnTimer180000:
92         mapannounce "airplane","We are heading to Einbroch.",bc_map,"0x00ff00";
93         end;
94 OnTimer210000:
95         mapannounce "airplane","We will arrive in Einbroch shortly.",bc_map,"0x00FF00";
96         end;
97 OnTimer220000:
98         set $@airplanelocation,1;
99         donpcevent "#AirshipWarp-1::OnUnhide";
100         donpcevent "#AirshipWarp-2::OnUnhide";
101         mapannounce "airplane","Welcome to Einbroch. Have a safe trip.",bc_map,"0x00ff00";
102         end;
103 OnTimer230000:
104         mapannounce "airplane","Currently we are in Einbroch. The Airship will take off shortly.",bc_map,"0x00ff00";
105         end;
106 OnTimer240000:
107         donpcevent "#AirshipWarp-1::OnHide";
108         donpcevent "#AirshipWarp-2::OnHide";
109         mapannounce "airplane","The Airship is now taking off. Our next destination is Juno.",bc_map,"0xff8200";
110         end;
111 OnTimer260000:
112         mapannounce "airplane","We are heading to Juno.",bc_map,"0xff8200";
113         end;
114 OnTimer290000:
115         mapannounce "airplane","We will arrive in Juno shortly.",bc_map,"0xff8200";
116         end;
117 OnTimer300000:
118         set $@airplanelocation,0;
119         donpcevent "#AirshipWarp-1::OnUnhide";
120         donpcevent "#AirshipWarp-2::OnUnhide";
121         mapannounce "airplane","Welcome to Juno. Have a safe trip.",bc_map,"0xff8200";
122         end;
123 OnTimer310000:
124         mapannounce "airplane","Currently we are in Juno. The Airship will leave shortly.",bc_map,"0xff8200";
125         end;
126 OnTimer320000:
127         donpcevent "#AirshipWarp-1::OnHide";
128         donpcevent "#AirshipWarp-2::OnHide";
129         mapannounce "airplane","The Airship is leaving the ground. Our next destination is Hugel.",bc_map,"0xca4bf3";
130         end;
131 OnTimer340000:
132         mapannounce "airplane","We are heading to Hugel.",bc_map,"0xca4bf3";
133         end;
134 OnTimer370000:
135         mapannounce "airplane","We will arrive in Hugel shortly.",bc_map,"0xca4bf3";
136         end;
137 OnTimer380000:
138         set $@airplanelocation,3;
139         donpcevent "#AirshipWarp-1::OnUnhide";
140         donpcevent "#AirshipWarp-2::OnUnhide";
141         mapannounce "airplane","Welcome to Hugel. Have a safe trip.",bc_map,"0xca4bf3";
142         end;
143 OnTimer390000:
144         mapannounce "airplane","Currently we are in Hugel. The Airship will leave shortly.",bc_map,"0xca4bf3";
145         end;
146 OnTimer400000:
147         donpcevent "#AirshipWarp-1::OnHide";
148         donpcevent "#AirshipWarp-2::OnHide";
149         mapannounce "airplane","The Airship is leaving the ground. Our next destination is Juno.",bc_map,"0xff8200";
150         end;
151 OnTimer420000:
152         mapannounce "airplane","We are heading to Juno.",bc_map,"0xff8200";
153         end;
154 OnTimer450000:
155         mapannounce "airplane","We will arrive in Juno shortly.",bc_map,"0xff8200";
156         end;
157 OnTimer460000:
158         set $@airplanelocation,0;
159         donpcevent "#AirshipWarp-1::OnUnhide";
160         donpcevent "#AirshipWarp-2::OnUnhide";
161         mapannounce "airplane","Welcome to Juno. Have a safe trip.",bc_map,"0xff8200";
162         end;
163 OnTimer470000:
164         mapannounce "airplane","Currently we are in Juno. The Airship will leave shortly.",bc_map,"0xff8200";
165         end;
166 OnTimer480000:
167         donpcevent "#AirshipWarp-1::OnHide";
168         donpcevent "#AirshipWarp-2::OnHide";
169         mapannounce "airplane","The Airship is leaving the ground. Our next destination is Einbroch.",bc_map,"0x00ff00";
170         stopnpctimer;
171         initnpctimer;
172 }
173
174 airplane,240,64,5       script  Exit#airplane1a::ExitAirplane   857,{
175         end;
176 }
177 airplane,247,64,5       duplicate(ExitAirplane) Exit#airplane1b 857
178 airplane,240,40,1       duplicate(ExitAirplane) Exit#airplane2a 857
179 airplane,247,40,1       duplicate(ExitAirplane) Exit#airplane2b 857
180
181 airplane,100,69,3       script  Airship Crew#ein-1      852,{
182         mes "[Airship Crew]";
183         mes "If we've landed at";
184         mes "your destination and";
185         mes "you'd like to leave the";
186         mes "Airship, please use the";
187         mes "stairs up ahead. Thank";
188         mes "you for your patronage.";
189         close;
190 }
191
192 airplane,64,94,1        script  Umbala Kid#ein_p        787,{
193         emotion e_swt2;
194         mes "[Kid]";
195         if (event_umbala >= 3) {
196                 mes "Wow, mom!";
197                 mes "L-look at this!";
198                 mes "We're flying! W-we're...";
199                 mes "We're in the freakin' sky!";
200         }
201         else {
202                 mes "Makumalagu!";
203                 mes "Saampa joojimbo";
204                 mes "kaku na jedi Solo.";
205                 mes "Bwahahahahahahaah!";
206         }
207         close;
208 }
209
210 airplane,66,93,3        script  Umbala Lady#ein_p       783,{
211         emotion e_dots;
212         mes "[Lady]";
213         if (event_umbala >= 3) {
214                 mes "Shush...";
215                 mes "Honey, behave~";
216                 mes "Don't act so excited";
217                 mes "when we're out in a";
218                 mes "public place like this!";
219         }
220         else {
221                 mes "Chooktu!";
222                 mes "Sacraup matii!";
223                 mes "Shaka gurftalfi";
224                 mes "huntiki manjoo!";
225         }
226         close;
227 }
228
229 airplane,71,91,7        script  Umbala Man#ein_p        789,{
230         if (event_umbala >= 3) {
231                 mes "[Chrmlim]";
232                 mes "Hey there~";
233                 mes "From that look on";
234                 mes "your face, I see that";
235                 mes "you can understand";
236                 mes "me. ^333333*Whew...!*^000000";
237                 next;
238                 emotion e_pif;
239                 mes "[Chrmlim]";
240                 mes "I've been helping the";
241                 mes "Airship enterprise by";
242                 mes "having the Airship Crewmen";
243                 mes "train in Umbala to overcome";
244                 mes "any acrophobia they might have through bungee jumping. Neat, eh?";
245                 next;
246                 mes "[Chrmlim]";
247                 mes "But...";
248                 mes "Some of them couldn't";
249                 mes "overcome their fear of";
250                 mes "heights. And a few even";
251                 mes "ended up, um, ^333333in Nifflheim^000000.";
252         }
253         else {
254                 mes "[Chrmlim]";
255                 mes "Bajoo ga";
256                 mes "nukta Airship.";
257                 next;
258                 mes "[Chrmlim]";
259                 mes "...";
260                 mes "......";
261                 next;
262                 emotion e_pif;
263                 mes "[Chrmlim]";
264                 mes "Shabala moow bajama";
265                 mes "Airship kulaha googoona ";
266                 mes "salu. Dama, kookoo na nu";
267                 mes "yukuta. Um, fashuku na ret!";
268         }
269         close;
270 }
271
272 airplane,250,58,2       script  Airship Staff#airplane  67,{
273         // Hugel quest addition
274         if (hg_ma1 == 3) {
275                 mes "[Airship Staff]";
276                 mes "Welcome";
277                 mes "to the Airship.";
278                 mes "How may I help you?";
279                 next;
280                 select("Do you have a passenger named Thierry?");
281                 mes "[Airship Staff]";
282                 mes "I am sorry, but I do not think that we have a passenger by that name.";
283                 close;
284         }
285         // Hugel quest end
286         mes "[Airship Staff]";
287         mes "Welcome";
288         mes "to the Airship.";
289         mes "How may I help you?";
290         next;
291         switch (select("Using the Airship:Captain's Cabin:Facilities:Cancel")) {
292         case 1:
293                 mes "[Airship Staff]";
294                 mes "When you see a broadcast";
295                 mes "announcing that we have";
296                 mes "arrived at your destination,";
297                 mes "please use one of the exits";
298                 mes "located at the north and";
299                 mes "south ends of the Airship.";
300                 next;
301                 mes "[Airship Staff]";
302                 mes "If you happen to miss";
303                 mes "your stop, don't worry.";
304                 mes "The Airship is constantly";
305                 mes "en route and you'll get";
306                 mes "another chance to arrive";
307                 mes "to your intended destination.";
308                 close;
309         case 2:
310                 mes "[Airship Staff]";
311                 mes "The Captain's Cabin";
312                 mes "is located at the front";
313                 mes "of the Airship. There, you";
314                 mes "can meet the captain and";
315                 mes "the pilot of the Airship.";
316                 close;
317         case 3:
318                 mes "[Airship Staff]";
319                 mes "The Airship provides";
320                 mes "various Mini Games for";
321                 mes "the entertainment of all";
322                 mes "our passengers. We invite";
323                 mes "you to try your luck and skills";
324                 mes "in the Airship's Mini Games~";
325                 close;
326         case 4:
327                 mes "[Airship Staff]";
328                 mes "Well, I hope you";
329                 mes "your flight aboard";
330                 mes "our Airships. Thank";
331                 mes "you and have a good day.";
332                 close;
333         }
334 }
335
336 airplane,80,71,2        script  Zerta#01airplane        834,{
337         mes "[Zerta]";
338         mes "Oh, hello adventurer.";
339         mes "I am currently on a";
340         mes "sacred journey, offering";
341         mes "prayer for the sake of the";
342         mes "Rune-Midgard continent.";
343         close;
344 }
345
346 airplane,65,63,4        script  Maelin#01airplane       714,{
347         mes "[Maelin]";
348         mes "Um, this Airship is";
349         mes "to Lutie, isn't it? I've";
350         mes "waiting so long,";
351         mes "but I haven't heard any";
352         mes "broadcast about Lutie.";
353         close;
354 }
355
356 airplane,72,34,6        script  Aanos#01airplane        702,{
357         mes "[Aanos]";
358         mes "Oh wooow~";
359         mes "The sky looks";
360         mes "so different and";
361         mes "pretty from up there!";
362         close;
363 }
364
365 airplane,221,158,2      script  Pilot#airplane  852,{
366         // Hugel quest addition
367         if (hg_ma1 == 3) {
368                 mes "[Pilot]";
369                 mes "I wish that I could go drink a cold fresh beer.";
370                 mes "Drinking is the goal of my life! Drinking gives me energy!";
371                 mes "I am nothing without drinks!";
372                 next;
373                 mes "[Pilot]";
374                 mes "But! Driving under the influence is not good.";
375                 mes "But! That makes me want to drink more and more!";
376                 emotion e_sob;
377                 next;
378                 select("Do you know a passenger named Thierry?");
379                 mes "[Pilot]";
380                 mes "This uniform is";
381                 mes "really dapper, but";
382                 mes "it's way too thick to";
383                 mes "wear around the Airship.";
384                 next;
385                 mes "[Pilot]";
386                 mes "...";
387                 mes "......";
388                 mes "No one ever really";
389                 mes "comes into this room.";
390                 mes "And the captain IS a reindeer. I could just strip to my boxers.";
391                 next;
392                 emotion e_omg;
393                 mes "[Pilot]";
394                 mes "Wah!? Who is it!";
395                 next;
396                 mes "- ...He is not listening to you, at all. -";
397                 close;
398         }
399         // Hugel quest end
400         switch (rand(1,4)) {
401         case 1:
402                 mes "[Pilot]";
403                 mes "It's been sooo";
404                 mes "long since I've";
405                 mes "enjoyed a nice, cold";
406                 mes "alcoholic brew. But the";
407                 mes "job requires me to be as";
408                 mes "clear headed as I can!";
409                 next;
410                 mes "[Pilot]";
411                 mes "Always drink responsibly!";
412                 mes "Still, I can't remember the";
413                 mes "last time I had a real vacation";
414                 mes "or even a day off. Yeap, some";
415                 mes "booze, some chips, some TV";
416                 mes "and serius R&R is in order.";
417                 emotion e_sob;
418                 close;
419         case 2:
420                 mes "[Pilot]";
421                 mes "Man, the weather";
422                 mes "is really nice today.";
423                 mes "Bright, open skies make";
424                 mes "for some good visibility";
425                 mes "and safe, carefree flying.";
426                 close;
427         case 3:
428                 mes "[Pilot]";
429                 mes "You know, our captain's a";
430                 mes "respectable guy. Him and";
431                 mes "his brother are actually well";
432                 mes "known in the aircraft industry.";
433                 mes "Who knew reindeer made";
434                 mes "such good captains?";
435                 next;
436                 mes "[Pilot]";
437                 mes "Just between you";
438                 mes "and me, I gotta tell";
439                 mes "you, that Santa was onto";
440                 mes "something, getting reindeers";
441                 mes "and elves to work for him.";
442                 mes "The man must be a genius!";
443                 close;
444         default:
445                 mes "[Pilot]";
446                 mes "You know, this whole";
447                 mes "piloting thing in the air,";
448                 mes "it's rather new, you know?";
449                 mes "Yeah, they got this Airship";
450                 mes "operation in a hurry.";
451                 next;
452                 emotion e_omg;
453                 mes "[Pilot]";
454                 mes "Still, they where real";
455                 mes "serius, really thought";
456                 mes "ahead. I mean, they had us";
457                 mes "training while the Airships";
458                 mes "were still being invented.";
459                 mes "Isn't that freakin' crazy?!";
460                 close;
461         }
462 }
463
464 airplane,50,66,5        script  Apple Merchant#airplane 86,{
465         mes "[Fruitz]";
466         mes "Welcome to Fruitz's";
467         mes "Shop where you can";
468         mes "purchase Apples or grind";
469         mes "them to make Apple Juice.";
470         next;
471         switch (select("Buy Apples.:Make Apple Juice.:Why are you here?:Cancel.")) {
472         case 1:
473                 mes "[Fruitz]";
474                 mes "Please enter the amount";
475                 mes "of Apples that you wish to";
476                 mes "buy. Each Apple is 15 zeny";
477                 mes "and you can buy a maximum";
478                 mes "of 500 at a time. Please enter";
479                 mes " '0' to cancel your order.";
480                 next;
481                 while (1) {
482                         input .@input;
483                         set .@pay, .@input * 15;
484                         if (.@input == 0) {
485                                 mes "[Fruitz]";
486                                 mes "Thanks for stopping";
487                                 mes "by my shop. Farewell!";
488                                 mes "Come by anytime when";
489                                 mes "you feel like having an";
490                                 mes "Apple to snack on~";
491                                 close;
492                         }
493                         else if (.@input < 1 || .@input > 500) {
494                                 mes "[Fruitz]";
495                                 mes "You've entered a number";
496                                 mes "higher than the maximum";
497                                 mes "value of 500. Please enter";
498                                 mes "the number of Apples you";
499                                 mes "wish to purchase again.";
500                                 next;
501                         }
502                         else {
503                                 mes "[Fruitz]";
504                                 mes "A total of ^FF0000" + .@input + "^000000 Apples";
505                                 mes "will cost you ^FF0000" + .@pay + " Zeny^000000 zeny.";
506                                 mes "Would you like to continue?";
507                                 next;
508                                 if (select("Yes:No") == 2) {
509                                         mes "[Fruitz]";
510                                         mes "Thanks for stopping";
511                                         mes "by my shop. Farewell!";
512                                         mes "Come by anytime when";
513                                         mes "you feel like having an";
514                                         mes "Apple to snack on~";
515                                         close;
516                                 }
517                                 break;
518                         }
519                 }
520                 if (Zeny < .@pay) {
521                         mes "[Fruitz]";
522                         mes "I'm sorry, but you don't";
523                         mes "have enough money to";
524                         mes "purchase that many Apples.";
525                         mes "Please check your zeny or";
526                         mes "purchase fewer Apples.";
527                         close;
528                 }
529                 else if (checkweight(512,.@input) == 0) {
530                         mes "[Fruitz]";
531                         mes "Hmmm, I don't think";
532                         mes "you've got enough room in";
533                         mes "your inventory to carry this";
534                         mes "many Apples. Why don't you free up some of your inventory space?";
535                         close;
536                 }
537                 else {
538                         set Zeny, Zeny - .@pay;
539                         getitem 512,.@input; //Apple
540                         mes "[Fruitz]";
541                         mes "Thanks for stopping by";
542                         mes "my shop. I hope you enjoy";
543                         mes "the flavor of these Apples~!";
544                         close;
545                 }
546         case 2:
547                 mes "[Fruitz]";
548                 mes "Okay, I'll need";
549                 mes "^FF00003 Apples and 1 Empty Bottle^000000";
550                 mes "to make 1 Apple Juice for you.";
551                 mes "Would you like to proceed?";
552                 next;
553                 switch (select("Yes:No")) {
554                 case 1:
555                         if (countitem(512) < 3 || countitem(713) < 1) {
556                                 mes "[Fruitz]";
557                                 mes "I'm sorry, but you don't";
558                                 mes "have enough materials to";
559                                 mes "create a bottle of Apple Juice.";
560                                 mes "Remember, I need 3 Apples";
561                                 mes "and 1 Empty Bottle to do it.";
562                                 close;
563                         }
564                         else {
565                                 mes "[Fruitz]";
566                                 mes "Thank you,";
567                                 mes "please wait";
568                                 mes "just a moment.";
569                                 next;
570                                 mes "^3355FF*Grind grind*";
571                                 mes "*Grind grind*";
572                                 mes "*Clang...!*^000000";
573                                 next;
574                                 delitem 512,3; //Apple
575                                 delitem 713,1; //Empty_Bottle
576                                 getitem 531,1; //Apple_Juice
577                                 mes "[Fruitz]";
578                                 mes "There you go~";
579                                 mes "I hope you enjoy!";
580                                 mes "Please feel free to";
581                                 mes "stop by for your Apple";
582                                 mes "and Apple Juice needs";
583                                 mes "at anytime, adventurer~";
584                                 close;
585                         }
586                 case 2:
587                         mes "[Fruitz]";
588                         mes "Thanks for stopping";
589                         mes "by my shop. Farewell!";
590                         mes "Come by anytime when";
591                         mes "you feel like having an";
592                         mes "Apple to snack on~";
593                         close;
594                 }
595         case 3:
596                 mes "[Fruitz]";
597                 mes "I used to be a wandering";
598                 mes "vagabond when, one day,";
599                 mes "I took a nap and something";
600                 mes "struck my head and awoke";
601                 mes "me from my restful slumber.";
602                 next;
603                 mes "[Fruitz]";
604                 mes "It turns out that I was";
605                 mes "sleeping beneath an apple";
606                 mes "tree and that an apple fell";
607                 mes "and hit me on the head.";
608                 mes "I was dying of hunger and";
609                 mes "was about to eat that Apple...";
610                 next;
611                 mes "[Fruitz]";
612                 mes "But suddenly, Kain, my old";
613                 mes "friend from the mining days,";
614                 mes "asked me to help him around";
615                 mes "on the Airship. So I did, and";
616                 mes "it was there where I found some";
617                 mes "people playing the Dice game.";
618                 next;
619                 mes "[Fruitz]";
620                 mes "I was bored and curious";
621                 mes "and ended up wagering that";
622                 mes "single Apple in a game of";
623                 mes "dice. But for some reason,";
624                 mes "I had this incredible lucky";
625                 mes "streak. One apple became two... ";
626                 next;
627                 mes "[Fruitz]";
628                 mes "Two became four and";
629                 mes "before I knew it, I had";
630                 mes "cornered the Apple market!";
631                 mes "I won so many Apples, I just";
632                 mes "started my own business here";
633                 mes "on the Airship. Weird, huh?";
634                 next;
635                 mes "[Fruitz]";
636                 mes "So Apples are good";
637                 mes "for you. They were";
638                 mes "certainly very good";
639                 mes "to me. Hahahahaah~!";
640                 close;
641         case 4:
642                 mes "[Fruitz]";
643                 mes "Thank you for";
644                 mes "using my shop.";
645                 mes "Farewell~";
646                 close;
647         }
648 }
649
650 //============================================================ 
651 //= International Airship Route
652 //= ... -> Izlude -> Juno -> Rachel -> ...
653 //============================================================ 
654
655 airplane_01,243,73,0    script  #AirshipWarp-3  45,1,1,{
656         end;
657         
658 OnTouch_:
659         switch ($@airplanelocation2) {
660         case 0: warp "ra_fild12",292,204; end;
661         case 1: 
662                 if(checkre(0))
663                         warp "izlude",200,73;
664                 else
665                         warp "izlude",200,56;
666                 end;
667         case 2: warp "yuno",12,261; end;
668         }
669
670 OnInit:
671 OnHide:
672         specialeffect EF_BASH;
673         disablenpc strnpcinfo(0);
674         end;
675         
676 OnUnhide:
677         enablenpc strnpcinfo(0);
678         specialeffect EF_SUMMONSLAVE;
679         end;
680 }
681
682 airplane_01,243,29,0    duplicate(#AirshipWarp-3)       #AirshipWarp-4  45,1,1
683
684 airplane_01,1,1,0       script  International_Airship   -1,{
685         end;
686 OnInit:
687 OnEnable:
688         initnpctimer;
689         end;
690 OnTimer25000:
691         mapannounce "airplane_01","We are heading to Izlude.",bc_map,"0x00ff00";
692         end;
693 OnTimer50000:
694         mapannounce "airplane_01","We will arrive in Izlude shortly.",bc_map,"0x00ff00";
695         end;
696 OnTimer60000:
697         set $@airplanelocation2,1;
698         donpcevent "#AirshipWarp-3::OnUnhide";
699         donpcevent "#AirshipWarp-4::OnUnhide";
700         mapannounce "airplane_01","Welcome to Izlude. Have a safe trip.",bc_map,"0x00ff00";
701         end;
702 OnTimer70000:
703         mapannounce "airplane_01","We are currently in Izlude. The Airship will take off shortly.",bc_map,"0x00ff00";
704         end;
705 OnTimer80000:
706         donpcevent "#AirshipWarp-3::OnHide";
707         donpcevent "#AirshipWarp-4::OnHide";
708         mapannounce "airplane_01","The Airship is now taking off. Our next destination is Juno.",bc_map,"0x70dbdb";
709         end;
710 OnTimer105000:
711         mapannounce "airplane_01","We are heading to Juno.",bc_map,"0x70dbdb";
712         end;
713 OnTimer130000:
714         mapannounce "airplane_01","We will arrive in Juno shortly.",bc_map,"0x70dbdb";
715         end;
716 OnTimer140000:
717         set $@airplanelocation2,2;
718         donpcevent "#AirshipWarp-3::OnUnhide";
719         donpcevent "#AirshipWarp-4::OnUnhide";
720         mapannounce "airplane_01","Welcome to Juno. Have a safe trip.",bc_map,"0x70dbdb";
721         end;
722 OnTimer150000:
723         mapannounce "airplane_01","We are currently in Juno. The Airship will leave shortly.",bc_map,"0x70dbdb";
724         end;
725 OnTimer160000:
726         donpcevent "#AirshipWarp-3::OnHide";
727         donpcevent "#AirshipWarp-4::OnHide";
728         mapannounce "airplane_01","The Airship is leaving the ground. Our next destination is Rachel.",bc_map,"0xFF8200";
729         end;
730 OnTimer185000:
731         mapannounce "airplane_01","We are heading to Rachel.",bc_map,"0xFF8200";
732         end;
733 OnTimer210000:
734         mapannounce "airplane_01","We will arrive in Rachel shortly.",bc_map,"0xFF8200";
735         end;
736 OnTimer220000:
737         set $@airplanelocation2,0;
738         donpcevent "#AirshipWarp-3::OnUnhide";
739         donpcevent "#AirshipWarp-4::OnUnhide";
740         mapannounce "airplane_01","Welcome to Rachel. Have a safe trip.",bc_map,"0xFF8200";
741         end;
742 OnTimer230000:
743         mapannounce "airplane_01","We are currently in Rachel. The Airship will take off shortly.",bc_map,"0xFF8200";
744         end;
745 OnTimer240000:
746         donpcevent "#AirshipWarp-3::OnHide";
747         donpcevent "#AirshipWarp-4::OnHide";
748         mapannounce "airplane_01","The Airship is now taking off. Our next destination is Izlude.",bc_map,"0x00ff00";
749         stopnpctimer;
750         set .moninv, .moninv + 1;
751         if (.moninv == 7) {
752                 if (rand(1,3) == 3) {
753                         donpcevent "Airship#airplane02::OnEnable";
754                         end;
755                 }
756                 set .moninv, 0;
757         }
758         initnpctimer;
759         end;
760 }
761
762 airplane_01,240,64,5    script  Exit#airplane_011a::ExitAirplane01      857,{
763         end;
764 }
765 airplane_01,247,64,5    duplicate(ExitAirplane01)       Exit#airplane_011b      857
766 airplane_01,240,40,1    duplicate(ExitAirplane01)       Exit#airplane_012a      857
767 airplane_01,247,40,1    duplicate(ExitAirplane01)       Exit#airplane_012b      857
768
769 airplane_01,250,58,2    script  Airship Staff#airplane01        67,{
770         mes "[Airship Staff]";
771         mes "Welcome";
772         mes "to the Airship.";
773         mes "How may I help you?";
774         next;
775         switch (select("Using the Airship:Captain's Cabin:Facilities:Cancel")) {
776         case 1:
777                 mes "[Airship Staff]";
778                 mes "When you see a broadcast";
779                 mes "announcing that we have";
780                 mes "arrived at your destination,";
781                 mes "please use one of the exits";
782                 mes "located at the north and";
783                 mes "south ends of the Airship.";
784                 next;
785                 mes "[Airship Staff]";
786                 mes "If you happen to miss";
787                 mes "your stop, don't worry.";
788                 mes "The Airship is constantly";
789                 mes "en route and you'll get";
790                 mes "another chance to arrive";
791                 mes "to your intended destination.";
792                 close;
793         case 2:
794                 mes "[Airship Staff]";
795                 mes "The Captain's Cabin";
796                 mes "is located at the front";
797                 mes "of the Airship. There, you";
798                 mes "can meet the captain and";
799                 mes "the pilot of the Airship.";
800                 close;
801         case 3:
802                 mes "[Airship Staff]";
803                 mes "The Airship provides";
804                 mes "various Mini Games for";
805                 mes "the entertainment of all";
806                 mes "our passengers. We invite";
807                 mes "you to try your luck and skills";
808                 mes "in the Airship's Mini Games~";
809                 close;
810         case 4:
811                 mes "[Airship Staff]";
812                 mes "Well, I hope you";
813                 mes "your flight aboard";
814                 mes "our Airships. Thank";
815                 mes "you and have a good day.";
816                 close;
817         }
818 }
819
820 airplane_01,50,66,5     script  Apple Merchant#air01    86,{
821         if (checkweight(1201,1) == 0) {
822                 mes "- Wait a minute !! -";
823                 mes "- Currently you're carrying -";
824                 mes "- too many items with you. -";
825                 mes "- Please try again -";
826                 mes "- after you loose some weight. -";
827                 close;
828         }
829         mes "[Meltz]";
830         mes "Welcome to Meltz's";
831         mes "Shop where you can";
832         mes "purchase Apples or grind";
833         mes "them to make Apple Juice.";
834         next;
835         switch (select("Buy Apples.:Make Apple Juice.:Cancel.")) {
836         case 1:
837                 mes "[Meltz]";
838                 mes "Please enter the amount";
839                 mes "of Apples that you wish to";
840                 mes "buy. Each Apple is 15 zeny";
841                 mes "and you can buy a maximum";
842                 mes "of 500 at a time. Please enter";
843                 mes "'0' to cancel your order.";
844                 next;
845                 while (1) {
846                         input .@input;
847                         set .@pay, .@input * 15;
848                         if (.@input == 0) {
849                                 mes "[Meltz]";
850                                 mes "Thanks for stopping";
851                                 mes "by my shop. Farewell!";
852                                 mes "Come by anytime when";
853                                 mes "you feel like having an";
854                                 mes "Apple to snack on~";
855                                 close;
856                         }
857                         else if (.@input < 1 || .@input > 500) {
858                                 mes "[Meltz]";
859                                 mes "You've entered a number";
860                                 mes "higher than the maximum";
861                                 mes "value of 500. Please enter";
862                                 mes "the number of Apples you";
863                                 mes "wish to purchase again.";
864                                 next;
865                         }
866                         else {
867                                 mes "[Meltz]";
868                                 mes "A total of ^FF0000" + .@input + "^000000 Apples";
869                                 mes "will cost you ^FF0000" + .@pay + "^000000 zeny.";
870                                 mes "Would you like to continue?";
871                                 next;
872                                 if (select("Yes:No") == 2) {
873                                         mes "[Meltz]";
874                                         mes "Thanks for stopping";
875                                         mes "by my shop. Farewell!";
876                                         mes "Come by anytime when";
877                                         mes "you feel like having an";
878                                         mes "Apple to snack on~";
879                                         close;
880                                 }
881                                 break;
882                         }
883                 }
884                 if (Zeny < .@pay) {
885                         mes "[Meltz]";
886                         mes "I'm sorry, you don't have";
887                         mes "enough money with you.";
888                         mes "Please check your funds or";
889                         mes "purchase less Apples.";
890                         close;
891                 }
892                 else if (checkweight(512,.@input) == 0) {
893                         mes "[Meltz]";
894                         mes "Hmm, I don't think you've";
895                         mes "got enough room to carry";
896                         mes "this many Apples. You might";
897                         mes "want to free up your inventory";
898                         mes "space.";
899                         close;
900                 }
901                 else {
902                         set Zeny, Zeny - .@pay;
903                         getitem 512,.@input; //Apple
904                         mes "[Meltz]";
905                         mes "Thanks for stopping by";
906                         mes "my shop. I hope you enjoy";
907                         mes "the flavor of these Apples~!";
908                         close;
909                 }
910         case 2:
911                 mes "[Meltz]";
912                 mes "Okay, I'll need";
913                 mes "^FF00003 Apples and 1 Empty Bottle^000000";
914                 mes "to make 1 Apple Juice for you.";
915                 mes "Would you like to proceed?";
916                 next;
917                 switch (select("Yes:No")) {
918                 case 1:
919                         if (countitem(512) < 3 || countitem(713) < 1) {
920                                 mes "[Meltz]";
921                                 mes "I'm sorry, but you don't";
922                                 mes "have enough materials to";
923                                 mes "create a bottle of Apple Juice.";
924                                 mes "Remember, I need 3 Apples";
925                                 mes "and 1 Empty Bottle to do it.";
926                                 close;
927                         }
928                         else {
929                                 mes "[Meltz]";
930                                 mes "Thank you, please wait.";
931                                 next;
932                                 mes "^3355FF*Grind* *Grind*";
933                                 mes "*Grind* *Grind*";
934                                 mes "*Clang...!*^000000";
935                                 next;
936                                 delitem 512,3; //Apple
937                                 delitem 713,1; //Empty_Bottle
938                                 getitem 531,1; //Apple_Juice
939                                 mes "[Meltz]";
940                                 mes "There you go~";
941                                 mes "Please come again.";
942                                 close;
943                         }
944                 case 2:
945                         mes "[Meltz]";
946                         mes "Thanks for stopping";
947                         mes "by my shop. Farewell!";
948                         mes "Come by anytime when";
949                         mes "you feel like having an";
950                         mes "Apple to snack on~";
951                         close;
952                 }
953         case 3:
954                 mes "[Meltz]";
955                 mes "Thanks for stopping";
956                 mes "by my shop. Farewell!";
957                 mes "Come by anytime when";
958                 mes "you feel like having an";
959                 mes "Apple to snack on~";
960                 close;
961         }
962 }
963
964 airplane_01,221,158,2   script  Pilot#airplane_01       852,{
965         switch (rand(1,4)) {
966         case 1:
967                 mes "[Pilot]";
968                 mes "Longitude, 131 degrees east.";
969                 mes "Latitude, 37 degrees north.";
970                 mes "We're right on course, captain.";
971                 close;
972         case 2:
973                 mes "[Pilot]";
974                 mes "Looks like a really";
975                 mes "cloudy day. Always hard";
976                 mes "to navigate when the skies";
977                 mes "aren't clear. Guess we'll";
978                 mes "need to amp the radar.";
979                 close;
980         case 3:
981                 mes "[Pilot]";
982                 mes "The Captain is a good";
983                 mes "man and I can't think of";
984                 mes "a finer person to command";
985                 mes "this ship. Still, he's pretty";
986                 mes "tough, a real slave driver.";
987                 next;
988                 mes "[^ff0000Tarlock^000000]";
989                 mes "^ff0000Hey...!^000000";
990                 mes "^ff0000Less chit-chat^000000";
991                 mes "^ff0000and more piloting!^000000";
992                 next;
993                 mes "[Pilot]";
994                 mes "R-right away, sir!";
995                 mes "(See what I mean?)";
996                 close;
997         default:
998                 mes "[Pilot]";
999                 mes "This uniform is";
1000                 mes "really dapper, but";
1001                 mes "it's way too thick to";
1002                 mes "wear around the Airship.";
1003                 next;
1004                 mes "[Pilot]";
1005                 mes "...";
1006                 mes "......";
1007                 mes "No one ever really";
1008                 mes "comes into this room.";
1009                 mes "And the captain IS a reindeer.";
1010                 mes "I could just strip to my boxers.";
1011                 next;
1012                 emotion e_omg;
1013                 mes "[Pilot]";
1014                 mes "Oh...! Hello there!";
1015                 mes "E-e-enjoying your flight?!";
1016                 close;
1017         }
1018 }
1019
1020 airplane_01,83,61,2     script  Dianne#01airplane_01    72,2,2,{
1021         mes "[Dianne]";
1022         mes "It's so weird!";
1023         mes "I went to visit the";
1024         mes "Airship Captain and";
1025         mes "all I saw was this";
1026         mes "weird reindeer. Oh!";
1027         mes "Do you think that...";
1028         close;
1029
1030 OnTouch_:
1031         emotion e_sob;
1032         end;
1033 }
1034
1035 airplane_01,69,63,2     script  Mendel#01airplane_01    55,{
1036         mes "[Mendel]";
1037         mes "As I expected, the";
1038         mes "in-flight meals are";
1039         mes "three star quality at best.";
1040         mes "*Harrrumph* I really should";
1041         mes "have brought my chef so that";
1042         mes "I could enjoy a real meal.";
1043         close;
1044 }
1045
1046 airplane_01,71,31,2     script  Swordsman Shimizu#air_01        106,{
1047         mes "[Swordsman Shimizu]";
1048         mes "Finally, after five";
1049         mes "years of waiting...";
1050         mes "I can have my revenge!";
1051         next;
1052         mes "[Swordsman Shimizu]";
1053         mes "I just...";
1054         mes "Have to make sure that";
1055         mes "I don't keep missing my";
1056         mes "stop. But soon, very soon,";
1057         mes "vengeance will be mine!";
1058         close;
1059 }
1060
1061 //============================================================ 
1062 //= Typing Challenge
1063 //============================================================ 
1064 airplane_01,32,61,4     script  Nils#ein        49,1,1,{
1065         mes "[Nils]";
1066         mes "Welcome to the";
1067         mes "^ff0000RO Typing Challenge^000000.";
1068         mes "Would you like to play";
1069         mes "a quick typing game?";
1070         next;
1071         switch (select("Play ^ff0000RO Typing Challenge^000000:Information:View Top Records:Cancel")) {
1072         case 1:
1073                 mes "[Nils]";
1074                 mes "Okay, we have";
1075                 mes "a new challenger!";
1076                 mes "Enter the following";
1077                 mes "text as quickly as you";
1078                 mes "can without making any";
1079                 mes "mistakes! Let's start~!";
1080                 setarray .@line1_1$[0], "^3cbcbccallipygian salacius lascivious^000000",
1081                                         "^3cbcbcBy the power of^000000",
1082                                         "^0000ffthkelfkskeldmsiejdlslehfndkelsheidl^000000",
1083                                         "^3cbcbcburrdingdingdingdilidingdingdingphoohudaamb^000000",
1084                                         "^3cbcbcCoboman no chikara-yumei na^000000",
1085                                         "^3cbcbcI'm the king of All Weirdos! Now^000000",
1086                                         "^3cbcbcYou give me no choice. I guess it's^000000";
1087                 setarray .@line1_2$[0], "^3cbcbclicentious prurient concupiscent^000000",
1088                                         "^3cbcbcp-po-poi-po-poi-poin-poing^000000",
1089                                         "^3cbcbcskemd^000000",
1090                                         "^3cbcbcandoorabambarambambambambamburanbamding^000000",
1091                                         "^3cbcbcchikara-daiookii na chikara da ze!^000000",
1092                                         "^3cbcbcyou know of my true power. Obey~!^000000",
1093                                         "^3cbcbctime for me to reveal my secret...^000000";
1094                 setarray .@line1_3$[0], "",
1095                                         "^3cbcbcGOD-POING. I NEVER LOSE!^000000",
1096                                         "",
1097                                         "",
1098                                         "^3cbcbcCOBO ON^000000",
1099                                         "",
1100                                         "";
1101                 setarray .@word1$[0],   "callipygian salacius lascivious licentious prurient concupiscent",
1102                                         "By the power of p-po-poi-po-poi-poin-poing GOD-POING. I NEVER LOSE!",
1103                                         "thkelfkskeldmsiejdlslehfndkelsheidlskemd",
1104                                         "burrdingdingdingdilidingdingdingphoohudaambandoorabambarambambambambamburanbamding",
1105                                         "Coboman no chikara-yumei na chikara-daiookii na chikara da ze! COBO ON",
1106                                         "I'm the king of All Weirdos! Now you know of my true power. Obey~!",
1107                                         "You give me no choice. I guess it's time for me to reveal my secret...";
1108                 setarray .@line2_1$[0], "^3cbcbcuNflAPPaBLe LoVaBLe SeCreTs AnD^000000",
1109                                         "^ff1493LiGhTsPeEd RiGhT SPEed LeFT TURn^000000",
1110                                         "^ff1493hfjdkeldjsieldjshfjdjeiskdlefvbd^000000",
1111                                         "^ff1493burapaphuralanderamduanbatuhiwooi^000000",
1112                                         "^ff1493belief love luck grimace sweat rush^000000",
1113                                         "^800080opeN, Open!op3n.openOpen0p3nOpEn0pen^000000",
1114                                         "^3cbcbcfReeDoM ecstAcy JoUrnaliSm ArMplt^000000";
1115                 setarray .@line2_2$[0], "^3cbcbcboWLIiNg aGaINST tHe KarMA of YoUtH^000000",
1116                                         "^ff1493RiGhT BuRn OrIGInAL GaNgSteR SmACk^000000",
1117                                         "",
1118                                         "^ff1493kabamturubamdingding^000000",
1119                                         "^ff1493folktale rodimus optimus bumblebee^000000",
1120                                         "^800080`open'0Pen open? open!111OPENSESAME^000000",
1121                                         "^3cbcbcDisCoverY hEaDaChE MoonbeAmS jUsTiCE^000000";
1122                 setarray .@word2$[0],   "uNflAPPaBLe LoVaBLe SeCreTs AnD boWLIiNg aGaINST tHe KarMA of YoUtH",
1123                                         "LiGhTsPeEd RiGhT SPEed LeFT TURn RiGhT BuRn OrIGInAL GaNgSteR SmACk",
1124                                         "hfjdkeldjsieldjshfjdjeiskdlefvbd",
1125                                         "burapaphuralanderamduanbatuhiwooikabamturubamdingding",
1126                                         "belief love luck grimace sweat rush folktale rodimus optimus bumblebee",
1127                                         "opeN, Open!op3n.openOpen0p3nOpEn0pen`open'0Pen open? open!111OPENSESAME",
1128                                         "fReeDoM ecstAcy JoUrnaliSm ArMplt DisCoverY hEaDaChE MoonbeAmS jUsTiCE";
1129                 setarray .@letters[0],  1300,
1130                                         1250,
1131                                         1180,
1132                                         1380,
1133                                         1740,
1134                                         1440,
1135                                         1450;
1136                 set .@wordtest, rand(7);
1137                 next;
1138                 mes "[Nils]";
1139                 mes .@line1_1$[.@wordtest];
1140                 mes .@line1_2$[.@wordtest];
1141                 mes .@line1_3$[.@wordtest];
1142                 set .@start_time, gettimetick(1);
1143                 next;
1144                 input .@save1$;
1145                 set .@end_time, gettimetick(1);
1146                 set .@total_time, .@end_time - .@start_time;
1147                 mes "[Nils]";
1148                 mes .@line2_1$[.@wordtest];
1149                 mes .@line2_2$[.@wordtest];
1150                 set .@start_time, gettimetick(1);
1151                 next;
1152                 input .@save2$;
1153                 set .@end_time, gettimetick(1);
1154                 set .@total_time, .@total_time + (.@start_time - .@end_time);
1155                 set .@tasoo, (.@letters[.@wordtest] / .@total_time) * 6;
1156                 if ((.@save1$ == .@word1$[.@wordtest]) && (.@save2$ == .@word2$[.@wordtest])) {
1157                         mes "[Nils]";
1158                         mes "Your record is ^ff0000" + .@total_time + " seconds^000000 and";
1159                         mes "the total letters are " + .@tasoo + ".";
1160                         next;
1161                         if (.@tasoo >= 1300) {
1162                                 mes "[Nils]";
1163                                 mes "Hmmm, this record isn't";
1164                                 mes "humanly possible unless you";
1165                                 mes "copy and paste the whole";
1166                                 mes "sentence. Please play fairly";
1167                                 mes "next time.";
1168                                 close;
1169                         }
1170                         if (.@tasoo >= $050320_ein_typing) {
1171                                 mes "[Nils]";
1172                                 mes "The previous top record was";
1173                                 mes "made by ^0000ff" + $050320_minus1_typing$ + "^000000";
1174                                 mes "with the total ^0000ff" + $050320_ein_typing + "^000000 letters.";
1175                                 mes "However, ^ff0000" + strcharinfo(0) + "^000000,";
1176                                 mes "you made the new top record";
1177                                 mes "this time. Congratulations!";
1178                                 set $050320_minus1_typing$, strcharinfo(0);
1179                                 set $050320_ein_typing, .@tasoo;
1180                                 close;
1181                         }
1182                         else {
1183                                 mes "[Nils]";
1184                                 mes "^0000ff" + $050320_minus1_typing$ + "^000000";
1185                                 mes "is the current";
1186                                 mes "record holder with";
1187                                 mes "a letter total of ^0000ff" + $050320_ein_typing + "^000000";
1188                                 mes "characters. Try to beat";
1189                                 mes "that record next time~";
1190                                 close;
1191                         }
1192                 }
1193                 else {
1194                         mes "[Nils]";
1195                         mes "Oooh...";
1196                         mes "I'm sorry, but";
1197                         mes "you entered the";
1198                         mes "text incorrectly...";
1199                         close;
1200                 }
1201         case 2:
1202                 mes "[Nils]";
1203                 mes "The ^ff0000RO Typing Challenge^000000";
1204                 mes "is a game where you enter";
1205                 mes "the given text as quickly as you";
1206                 mes "can. The name of the top player";
1207                 mes "is recorded for posterity. If you";
1208                 mes "want fame, here's your chance!";
1209                 next;
1210                 mes "[Nils]";
1211                 mes "I'd just like to let";
1212                 mes "you know that you type";
1213                 mes "all the text that you see";
1214                 mes "in the single input line that";
1215                 mes "you're given. So don't press";
1216                 mes "the enter key, just click 'OK.'";
1217                 close;
1218         case 3:
1219                 mes "[Nils]";
1220                 mes "^0000ff" + $050320_minus1_typing$ + "^000000";
1221                 mes "is the current";
1222                 mes "record holder with";
1223                 mes "a letter total of ^0000ff" + $050320_ein_typing + "^000000";
1224                 mes "characters. Try to beat";
1225                 mes "that record next time~";
1226                 close;
1227         case 4:
1228                 mes "[Nils]";
1229                 mes "Feel free to take on the";
1230                 mes "^ff0000RO Typing Challenge^000000";
1231                 mes "anytime. I'll be here~";
1232                 close;
1233         }
1234 }
1235
1236 //============================================================ 
1237 //= Apple Gambling
1238 //============================================================ 
1239 airplane_01,33,68,4     script  Clarice 74,{
1240         mes "[Clarice]";
1241         mes "Hi, I'm Clarice~";
1242         mes "How would you like";
1243         mes "to wager some Apples";
1244         mes "in a friendly game of Dice?";
1245         next;
1246         callfunc "applegamble","Clarice";
1247         end;
1248 }
1249
1250 function        script  applegamble     {
1251         .@npc_name$ = getarg(0);
1252         switch (select("Play Dice Game:Learn Dice Game Rules:Cancel")) {
1253         case 3:
1254                 mes "["+ .@npc_name$ +"]";
1255                 mes "I'm up for a game of";
1256                 mes "dice whenever you feel";
1257                 mes "like it. Just talk to me if";
1258                 mes "you ever get hit with the";
1259                 mes "sudden urge to gamble, kay?";
1260                 close;
1261         case 2:
1262                 mes "["+ .@npc_name$ +"]";
1263                 mes "The rules for the Dice game";
1264                 mes "are pretty simple. First, you";
1265                 mes "place a bet by wagering Apples.";
1266                 mes "You can bet a maximum of 50";
1267                 mes "Apples at a time. To keep things";
1268                 mes "legal, I can only accept Apples.";
1269                 next;
1270                 mes "["+ .@npc_name$ +"]";
1271                 mes "But hey, if all that zeny";
1272                 mes "is burning a hole in your";
1273                 mes "pocket, head over to Fruitz";
1274                 mes "and you can buy as many";
1275                 mes "Apples as you want, playah~";
1276                 next;
1277                 mes "["+ .@npc_name$ +"]";
1278                 mes "Now, we begin with me";
1279                 mes "rolling two 6-sided dice.";
1280                 mes "When it's your turn, you'll";
1281                 mes "roll two 6-sided dice. After";
1282                 mes "that, both of us will have the";
1283                 mes "option of rolling a third die.";
1284                 next;
1285                 mes "["+ .@npc_name$ +"]";
1286                 mes "Now here's the important";
1287                 mes "thing. If your total is higher";
1288                 mes "than 12, you'll bust, meaning";
1289                 mes "that you lose. Otherwise, the";
1290                 mes "person with the higher total";
1291                 mes "is the winner. Got it?";
1292                 next;
1293                 mes "["+ .@npc_name$ +"]";
1294                 mes "Now, you'll be the first";
1295                 mes "to decide whether or not";
1296                 mes "you'll roll the third die. Then,";
1297                 mes "depending on your result, I'll";
1298                 mes "roll my third die... Or maybe not.";
1299                 next;
1300                 mes "["+ .@npc_name$ +"]";
1301                 mes "When you win, you'll";
1302                 mes "receive twice as many";
1303                 mes "Apples as you wagered.";
1304                 mes "But if we happen to tie, you";
1305                 mes "get the Apples that you bet";
1306                 mes "returned to you. Fair, right?";
1307                 close;
1308         case 1:
1309                 break;
1310         }
1311         mes "["+ .@npc_name$ +"]";
1312         mes "Ooh, so you'll play with";
1313         mes "me? Great! How many";
1314         mes "Apples would you like to bet?";
1315         mes "Remember, you can wager";
1316         mes "up to 50 Apples. If you'd like";
1317         mes "to cancel, please enter '0'.";
1318         next;
1319         while(1) {
1320                 input .@amount;
1321                 if (.@amount == 0) {
1322                         mes "["+ .@npc_name$ +"]";
1323                         mes "Changed your mind?";
1324                         mes "I understand. Well then,";
1325                         mes "I hope we can play sometime.";
1326                         close;
1327                 }
1328                 else if (.@amount < 1 || .@amount > 50) {
1329                         mes "["+ .@npc_name$ +"]";
1330                         mes "You can't bet more than";
1331                         mes "50 Apples. Remember, we";
1332                         mes "need to keep these stakes";
1333                         mes "reasonable. Please enter";
1334                         mes "a value no greater than 50.";
1335                         next;
1336                         continue;
1337                 }
1338                 mes "["+ .@npc_name$ +"]";
1339                 mes "So you'll be";
1340                 mes "betting ^FF0000"+.@amount+"^000000 Apples.";
1341                 mes "Is that right?";
1342                 next;
1343                 if (select("Yes:No") == 2) {
1344                         mes "["+ .@npc_name$ +"]";
1345                         mes "Mm, made a mistake?";
1346                         mes "Alright, please enter the";
1347                         mes "number of Apples you";
1348                         mes "wish to place in this bet";
1349                         next;
1350                         continue;
1351                 }
1352                 if (countitem(512) <.@amount) {
1353                         mes "I'm sorry, but you";
1354                         mes "don't seem to have";
1355                         mes "enough Apples for this";
1356                         mes "bet... You can't gamble";
1357                         mes "if you can't play, you know.";
1358                         next;
1359                         continue;
1360                 }
1361                 delitem 512,.@amount;
1362                 mes "["+ .@npc_name$ +"]";
1363                 mes "Good!";
1364                 mes "Now we can start";
1365                 mes "this game! I'll roll first~";
1366                 break;
1367         }
1368         mes "^3355FF*Rolling and rumbling*^000000";
1369         next;
1370         set .@giveapple, .@amount*2;
1371         set .@table1, rand(1,6);
1372         set .@table2, rand(1,6);
1373         set .@tablesub, .@table1 + .@table2;
1374         set .@tabletotal, .@tablesub;
1375         mes "["+ .@npc_name$ +"]";
1376         mes "I got a ^0000FF" + .@table1 + "^000000 and a ^0000FF" + .@table2 + "^000000.";
1377         mes "That's a total of ^0000FF" + .@tablesub + "^000000.";
1378         mes "^FF0000" + strcharinfo(0) + "^000000, now it's your turn.";
1379         next;
1380         select("Cast Dice.");
1381         mes "^3355FF*Rolling and rumbling*^000000";
1382         set .@player1, rand(1,6);
1383         set .@player2, rand(1,6);
1384         set .@playersub, .@player1 + .@player2;
1385         if (.@playersub > 9 && .@amount > 39) {
1386                 set .@player1, rand(1,6);
1387                 set .@player2, rand(1,6);
1388                 set .@playersub, .@player1 + .@player2;
1389         }
1390         set .@playertotal, .@playersub;
1391         next;
1392         mes "["+ .@npc_name$ +"]";
1393         mes "^FF0000" + strcharinfo(0) + "^000000, you have ^FF0000" + .@player1 + "^000000 and ^FF0000" + .@player2 + "^000000. The total is ^FF0000" + .@playersub + "^000000 .";
1394         next;
1395         mes "["+ .@npc_name$ +"]";
1396         if(.@playersub == .@tablesub) {
1397                 mes "Currently my total is ^0000FF" + .@tablesub + "^000000 and ^FF0000" + strcharinfo(0) + "^000000, your total is ^FF0000" + .@playersub + "^000000. We are making an even game. Would you like to cast dice again?";
1398         } else if (.@playersub > .@tablesub) {
1399                 mes "Currently my total is ^0000FF" + .@tablesub + "^000000 and ^FF0000" + strcharinfo(0) + "^000000, your total is ^FF0000" + .@playersub + "^000000. ^FF0000" + strcharinfo(0) + "^000000, you are currently winning this game. Would you like to cast dice again?";
1400         } else if(.@tablesub > .@playersub) {
1401                 mes "Currently my total is ^0000FF" + .@tablesub + "^000000 and ^FF0000" + strcharinfo(0) + "^000000, your total is ^FF0000" + .@playersub + "^000000. I am winning this game. Would you like to cast dice again?";
1402         }
1403         next;
1404         switch (select("Cast dice.:Cancel.")) {
1405         case 1:
1406                 mes "^3355FF*Rolling and rumbling*^000000";
1407                 set .@player3, rand(1,6);
1408                 set .@playertotal, .@playertotal + .@player3;
1409                 next;
1410                 mes "["+ .@npc_name$ +"]";
1411                 if (.@playertotal > 12) {
1412                         mes "^FF0000" + strcharinfo(0) + "^000000, you got ^FF0000" + .@player3 + "^000000 and the total is now ^FF0000" + .@playertotal + "^000000. You lost this game. I am sorry but please try again.";
1413                         close;
1414                 }
1415                 else if (.@playertotal < .@tablesub) {
1416                         mes "^FF0000" + strcharinfo(0) + "^000000, you got ^FF0000" + .@player3 + "^000000 and the total is now ^FF0000" + .@playertotal + "^000000. Even though you casted dice again, still your total is smaller than mine. You lost the game. I am sorry and please try again.";
1417                         close;
1418                 }
1419                 else if (.@playertotal == .@tablesub) {
1420                         if (.@tablesub > 8) {
1421                                 mes "^FF0000" + strcharinfo(0) + "^000000, you got ^FF0000" + .@player3 + "^000000 and the total is now ^FF0000" + .@playertotal + "^000000. I don't want to take any risk, let's end this game in a draw. Let's play again some other time~";
1422                                 close2;
1423                                 getitem 512,.@amount; //Apple
1424                                 end;
1425                         }
1426                         mes "Alright.";
1427                         mes "Let me cast the dice again.";
1428                 }
1429                 else {
1430                         mes "^FF0000" + strcharinfo(0) + "^000000, you got ^FF0000" + .@player3 + "^000000 and the total is now ^FF0000" + .@playertotal + "^000000. Now it is my turn.";
1431                 }
1432                 break;
1433         case 2:
1434                 mes "["+ .@npc_name$ +"]";
1435                 if (.@playersub > .@tablesub) {
1436                         mes "I see, you don't want to take risk of losing the game. Okay, let me cast dice again.";
1437                 }
1438                 else if (.@playersub == .@tablesub) {
1439                         if (.@tablesub > 8) {
1440                                 mes "I see, you don't want to take risk of losing this game. Neither do I, let's end this game in a draw. Let's play again some other time~";
1441                                 close2;
1442                                 getitem 512,.@amount; //Apple
1443                                 end;
1444                         }
1445                         mes "Alright.";
1446                         mes "Let me cast the dice again.";
1447                 }
1448                 else {
1449                         mes "It couldn't hurt to try.";
1450                         mes "Well, I win this time.";
1451                         mes "I'm sorry, let's try play";
1452                         mes "again sometime.";
1453                         close;
1454                 }
1455                 break;
1456         }
1457         next;
1458         mes "^3355FF*Rolling and rumbling*^000000";
1459         set .@table3, rand(1,6);
1460         set .@tabletotal, .@tabletotal + .@table3;
1461         next;
1462         mes "["+ .@npc_name$ +"]";
1463         if (.@tabletotal > 12) {
1464                 mes "I got ^0000FF" + .@table3 + "^000000 and the total is now ^0000FF" + .@tabletotal + "^000000. I lost this game since my total exceeded 12. Let me give you my apples. Congratulations, that was a great game.";
1465                 close2;
1466                 getitem 512,.@giveapple; //Apple
1467                 end;
1468         }
1469         else if (.@playertotal > .@tabletotal) {
1470                 mes "I got ^0000FF" + .@table3 + "^000000 and the total is now ^0000FF" + .@tabletotal + "^000000. With total ^FF0000" + .@playertotal + "^000000 you won this game, ^FF0000" + strcharinfo(0) + "^000000. Let me give you my apples. It was a great game and I hope we will play again some other time.";
1471                 close2;
1472                 getitem 512,.@giveapple; //Apple
1473                 end;
1474         }
1475         else if (.@playertotal == .@tabletotal) {
1476                 mes "I got ^0000FF" + .@table3 + "^000000 and the total is now ^0000FF" + .@tabletotal + "^000000. With total ^FF0000" + .@playertotal + "^000000 this game came out even, ^FF0000" + strcharinfo(0) + "^000000. Let me give you your apple back. It was a great game and I hope we will play again some other time.";
1477                 close2;
1478                 getitem 512,.@amount; //Apple
1479                 end;
1480         }
1481         else if (.@playertotal < .@tabletotal) {
1482                 mes "I got ^0000FF" + .@table3 + "^000000 and the total is now ^0000FF" + .@tabletotal + "^000000. With total ^FF0000" + .@playertotal + "^000000 you lost this game, ^FF0000" + strcharinfo(0) + "^000000. I am sorry but please try again.";
1483                 close;
1484         }
1485 }