alchemist.txt 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. //===== rAthena Script =======================================
  2. //= Alchemist Shop
  3. //===== By: ==================================================
  4. //= rAthena Dev Team
  5. //===== Current Version: =====================================
  6. //= 1.8
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Merchants for Alchemist Materials and Manuals.
  11. //===== Additional Comments: =================================
  12. //= 1.1 fixed Medicine Bowl issue, thanx 2 MasterOfMuppets
  13. //= 1.2 Reddozen's fixes of typos. added optional Elemental
  14. //= Potion Guide. [Lupus]
  15. //= 1.3 Deleted Elemental Potions Guide due to original quest [Lupus]
  16. //= 1.4 Alchemists can now purchase 2000 Medicine Bowls at once. [SinSloth]
  17. //= 1.5 Updated to Aegis 10.3 Standards. [L0ne_W0lf]
  18. //= 1.6 Corrected canceling purchase. [L0ne_W0lf]
  19. //= 1.7 Updated to match AEGIS script. [Masao]
  20. //= 1.8 Moved Craft Book Merchant to Renewal path. [Euphy]
  21. //============================================================
  22. alde_alche,24,188,3 script Guild Dealer 740,{
  23. if (checkweight(1201,1) == 0) {
  24. mes "- Wait a minute! -";
  25. mes "- Currently you are carrying -";
  26. mes "- too many items with you. -";
  27. mes "- Please come back again -";
  28. mes "- after you store some items into kafra storage. -";
  29. close;
  30. }
  31. mes "[Gever Al Sharp]";
  32. mes "Welcome to the";
  33. mes "Alchemist Union.";
  34. mes "How can I assist you today?";
  35. next;
  36. switch(select("Purchase materials.:Purchase a production manual.:Quit.")) {
  37. case 1:
  38. mes "[Gever Al Sharp]";
  39. mes "What would you like?";
  40. next;
  41. if (select("Medicine Bowl - 8 Zeny:Cancel.") == 1) {
  42. mes "[Gever Al Sharp]";
  43. mes "How many do you want?";
  44. mes "Enter '0' if you want to quit.";
  45. next;
  46. while(1) {
  47. input .@input,0,2001;
  48. if (.@input == 0) {
  49. mes "[Gever Al Sharp]";
  50. mes "The deal was cancelled.";
  51. mes "Come again next time.";
  52. close;
  53. }
  54. else if (.@input < 1 || .@input > 2000) {
  55. mes "[Gever Al Sharp]";
  56. mes "The number must";
  57. mes "be less than 2000.";
  58. next;
  59. }
  60. else {
  61. break;
  62. }
  63. }
  64. set .@sell,.@input * 8;
  65. set .@item_weight,.@input * 10;
  66. if (Zeny < .@sell) {
  67. mes "[Gever Al Sharp]";
  68. mes "You don't";
  69. mes "have enough zeny.";
  70. mes "Check how much zeny";
  71. mes "you have first.";
  72. close;
  73. }
  74. if ((MaxWeight - Weight) < .@item_weight) {
  75. mes "[Gever Al Sharp]";
  76. mes "It doesn't seem like";
  77. mes "you can carry everything.";
  78. mes "Please check the space";
  79. mes "in your inventory.";
  80. close;
  81. }
  82. set Zeny, Zeny-.@sell;
  83. getitem 7134,.@input; //Medicine_Bowl
  84. mes "[Gever Al Sharp]";
  85. mes "Thank you.";
  86. mes "Come again.";
  87. close;
  88. }
  89. mes "[Gever Al Sharp]";
  90. mes "Well then,";
  91. mes "come again when";
  92. mes "you need to purchase";
  93. mes "materials related to";
  94. mes "Alchemy, alright?";
  95. close;
  96. case 2:
  97. mes "[Gever Al Sharp]";
  98. mes "What do you need?";
  99. mes "Manuals are generally 100,000 zeny. But there are a couple of special manuals that will cost more.";
  100. next;
  101. switch(select("Potion Creation Guide:Alcohol Creation Guide:Bottle Grenade Creation Guide:Acid Bottle Creation Guide:Plant Bottle Creation Guide:Marine Sphere Bottle Creation Guide:Glistening Coat Creation Guide:Condensed Potion Creation Guide:Cancel Deal.")) {
  102. case 1:
  103. callsub S_SellManual,7144,100000; //Normal_Potion_Book
  104. break;
  105. case 2:
  106. callsub S_SellManual,7127,100000; //Alcol_Create_Book
  107. break;
  108. case 3:
  109. callsub S_SellManual,7128,100000; //FireBottle_Create_Book
  110. break;
  111. case 4:
  112. callsub S_SellManual,7129,100000; //Acid_Create_Book
  113. break;
  114. case 5:
  115. callsub S_SellManual,7130,100000; //Plant_Create_Book
  116. break;
  117. case 6:
  118. callsub S_SellManual,7131,100000; //Mine_Create_Book
  119. break;
  120. case 7:
  121. callsub S_SellManual,7132,100000; //Coating_Create_Book
  122. break;
  123. case 8:
  124. callsub S_SellManual,7133,240000; //Slim_Potion_Create_Book
  125. break;
  126. case 9:
  127. mes "[Gever Al Sharp]";
  128. mes "Well then...";
  129. mes "Come back if you";
  130. mes "ever need to buy";
  131. mes "a production manual.";
  132. close;
  133. }
  134. case 3:
  135. mes "[Gever Al Sharp]";
  136. mes "Alright then,";
  137. mes "have a good day.";
  138. close;
  139. }
  140. S_SellManual:
  141. .@item_id = getarg(0);
  142. .@zeny_req = getarg(1);
  143. if (Zeny < .@zeny_req) {
  144. mes "[Gever Al Sharp]";
  145. mes "You don't";
  146. mes "have enough zeny.";
  147. mes "Check how much zeny";
  148. mes "you have first.";
  149. close;
  150. }
  151. mes "[Gever Al Sharp]";
  152. mes getitemname(.@item_id) +"?";
  153. mes "That'll be "+ .@zeny_req +" zeny.";
  154. next;
  155. if (select("Purchase.:Quit.") == 1) {
  156. Zeny = Zeny - .@zeny_req;
  157. getitem .@item_id,1;
  158. mes "[Gever Al Sharp]";
  159. mes "Thank you for";
  160. mes "your patronage.";
  161. close;
  162. }
  163. mes "[Gever Al Sharp]";
  164. mes "Come again";
  165. mes "next time.";
  166. close;
  167. }