OSDN Git Service

First version
[st-ro/stro.git] / npc / re / other / stone_change.txt
1 //===== rAthena Script ======================================= 
2 //= Stone Changer
3 //===== By: ================================================== 
4 //= Euphy
5 //===== Current Version: ===================================== 
6 //= 1.1
7 //===== Compatible With: ===================================== 
8 //= rAthena Project
9 //===== Description: ========================================= 
10 //= [Official Conversion]
11 //= Organizes ores in a player's inventory.
12 //===== Additional Comments: ================================= 
13 //= 1.0 First version.
14 //= 1.1 Clean-up. [Capuche]
15 //============================================================ 
16
17 // Main NPC :: stonechange
18 //============================================================
19 geffen_in,99,174,5      script  Ore Tester#sorty        8_F_GIRL,{
20         mes "[Ore Tester Sorty]";
21         mes "Do you have ^3131FFany same type of ores in your inventories^000000 which take many spaces?";
22         mes "I can distinguish your ores and organize them right away~!";
23         next;
24         switch(select("Refine my Ore.:Cancel.")) {
25         case 1:
26                 mes "[Ore Tester Sorty]";
27                 mes "At the moment I can only distinguish ^FF0000Steel^000000, ^FF0000Iron^000000, ^FF0000Iron Ore^000000, and ^FF0000Rough Oridecon^000000 and organize them.";
28                 mes "Please note that ^3131FFother items are unable^000000!";
29                 next;
30                 mes "[Ore Tester Sorty]";
31                 mes "So, would you like me to organize your ores?";
32                 next;
33                 .@i = select("Steel, please.:Iron, please.:Iron Ore, please.:Rough Oridecon, please.:No, thanks.");
34                 if (.@i == 5) {
35                         mes "[Ore Tester Sorty]";
36                         mes "Huh, I really hate messy people!";
37                         close;
38                 }
39                 setarray .@ores[0],999,998,1002,756;
40                 .@item = .@ores[.@i-1];
41                 if (countitem(.@item) == 0) {
42                         mes "[Ore Tester Sorty]";
43                         mes "You don't have any "+getitemname(.@item)+"...";
44                         close;
45                 }
46                 // while(1) {
47                         // if (countitem(.@item)) {
48                                 // set .@count, countitem(.@item);
49                                 // set .@total, .@total + .@count;
50                                 // delitem .@item, .@count;
51                         // } else {
52                                 // getitem .@item, .@total;
53                                 // break;
54                         // }
55                 // }
56                 .@count = countitem(.@item);
57                 delitem .@item, .@count;
58                 getitem .@item, .@count;
59                 mes "[Ore Tester Sorty]";
60                 mes "It's done. Looks great! Don't you think so?";
61                 close;
62         case 2:
63                 mes "[Ore Tester Sorty]";
64                 mes "It seems that your bag is clean? Huhu! You might be the master of cleaning!";
65                 close;
66         }
67 }