stone_change.txt 2.3 KB

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