1 //===== rAthena Script =======================================
3 //===== By: ==================================================
5 //===== Current Version: =====================================
7 //===== Compatible With: =====================================
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 //============================================================
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~!";
24 switch(select("Refine my Ore.:Cancel.")) {
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!";
30 mes "[Ore Tester Sorty]";
31 mes "So, would you like me to organize your ores?";
33 .@i = select("Steel, please.:Iron, please.:Iron Ore, please.:Rough Oridecon, please.:No, thanks.");
35 mes "[Ore Tester Sorty]";
36 mes "Huh, I really hate messy people!";
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)+"...";
47 // if (countitem(.@item)) {
48 // set .@count, countitem(.@item);
49 // set .@total, .@total + .@count;
50 // delitem .@item, .@count;
52 // getitem .@item, .@total;
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?";
63 mes "[Ore Tester Sorty]";
64 mes "It seems that your bag is clean? Huhu! You might be the master of cleaning!";