alchemist.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. //===== rAthena Script =======================================
  2. //= Alchemist Shop
  3. //===== By: ==================================================
  4. //= rAthena Dev Team
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Merchants for Alchemist Materials and Manuals.
  12. //===== Additional Comments: =================================
  13. //= 1.0 Split Geneticist shop from main file. [Euphy]
  14. //= Updated dialogue to match the official script.
  15. //============================================================
  16. // Main NPC :: craft_book_alche_skill_npc
  17. //============================================================
  18. alde_alche,31,186,3 script Craft Book Merchant#alde 883,{
  19. mes "[Craft Book Merchant]";
  20. mes "Welcome.";
  21. mes "I'm here to sell";
  22. mes "^0000FFspecial craft books^000000 for Geneticists.";
  23. next;
  24. mes "[Craft Book Merchant]";
  25. mes "Geneticists have some skills";
  26. mes "that require craft books to activate.";
  27. next;
  28. mes "[Craft Book Merchant]";
  29. mes "The more craft books you have,";
  30. mes "the more skills you can use.";
  31. next;
  32. mes "[Craft Book Merchant]";
  33. mes "Please understand that";
  34. mes "I specialize in the sale of these special books and";
  35. mes "I ^FF0000don't sell other items^000000.";
  36. next;
  37. mes "[Craft Book Merchant]";
  38. mes "Would you like to take a look at my craft books?";
  39. next;
  40. if(select("Sure.:No.") == 2) {
  41. mes "[Craft Book Merchant]";
  42. mes "Thank you for visiting my shop.";
  43. mes "Please be safe on your travels.";
  44. close;
  45. }
  46. if (checkweight(1201,1) == 0) {
  47. mes "[Craft Book Merchant]";
  48. mes "I'm sorry, but your inventory is almost full.";
  49. mes "Please empty your inventory first.";
  50. close;
  51. }
  52. if (MaxWeight - Weight < 2500) {
  53. mes "[Craft Book Merchant]";
  54. mes "Please empty your inventory first.";
  55. close;
  56. }
  57. mes "[Craft Book Merchant]";
  58. mes "Okay then, here's the list of available craft books.";
  59. next;
  60. switch(select("[Apple Bomb Craft Book] 100,000 zeny:[Pineapple Bomb Craft Book] 100,000 zeny:[Coconut Bomb Craft Book] 100,000 zeny:[Melon Bomb Craft Book] 100,000 zeny:[Banana Bomb Craft Book] 100,000 zeny:[Plant Gene Cultivation Method] 100,000 zeny:[Superior Potion Craft Manual] 100,000 zeny:[Mix Cooking Book] 100,000 zeny:[Health Improvement Research Book] 100,000 zeny:[Vigor Drink Recipe] 100,000 zeny:Close")){
  61. case 1: set .@item,6279; break;
  62. case 2: set .@item,6280; break;
  63. case 3: set .@item,6281; break;
  64. case 4: set .@item,6282; break;
  65. case 5: set .@item,6283; break;
  66. case 6: set .@item,6284; break;
  67. case 7: set .@item,6285; break;
  68. case 8: set .@item,11022; break;
  69. case 9: set .@item,11023; break;
  70. case 10: set .@item,11024; break;
  71. case 11:
  72. mes "[Craft Book Merchant]";
  73. mes "Thank you for your patronage.";
  74. mes "Please come again.";
  75. close;
  76. }
  77. mes "[Craft Book Merchant]";
  78. mes "^0000FF["+getitemname(.@item)+"] costs";
  79. mes "100,000 zeny.";
  80. mes "How many would you like to purchase?";
  81. next;
  82. input .@amount;
  83. if (.@amount == 0) {
  84. mes "[Craft Book Merchant]";
  85. mes "Would you like to see some different books?";
  86. close;
  87. }
  88. if (.@amount < 1 || .@amount > 99 ){
  89. mes "[Craft Book Merchant]";
  90. mes "You cannot purchase more than 100 at a time.";
  91. close;
  92. }
  93. mes "[Craft Book Merchant]";
  94. mes "You've entered "+.@amount+"x ^0000FF["+getitemname(.@item)+"]^000000 to be purchased.";
  95. mes "Would you like to continue?";
  96. next;
  97. if (select("Yes:No") == 1) {
  98. set .@total, .@amount * 100000;
  99. if (Zeny < .@total) {
  100. mes "[Craft Book Merchant]";
  101. mes "I'm sorry, but you don't have enough money.";
  102. close;
  103. }
  104. if (checkweight(.@item,.@amount) == 0){
  105. mes "[Craft Book Merchant]";
  106. mes "It doesn't seem like you can carry everything.";
  107. mes "Please check the space in your inventory.";
  108. close;
  109. }
  110. mes "[Craft Book Merchant]";
  111. mes "Thank you for your patronage.";
  112. set Zeny,Zeny - .@total;
  113. getitem .@item,.@amount;
  114. close;
  115. }
  116. mes "[Craft Book Merchant]";
  117. mes "Please take your time";
  118. mes "before you make your decision.";
  119. close;
  120. }