stone_change.txt 2.1 KB

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