stone_change.txt 2.0 KB

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