quivers.txt 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. //===== rAthena Script =======================================
  2. //= Arrow Quiver Event
  3. //===== By: ==================================================
  4. //= Muad_Dib (Prometheus Project); L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.2
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Turns arrows into Arrow Quivers.
  12. //= Breakdown of Subroutine "S_BuyQuiver"
  13. //= arg(0): Type of Arrow to be packaged (item ID).
  14. //= arg(1): How many of each 'getarg(0)' arrow per quiver.
  15. //= arg(2): The cost of making a 'getarg(0)' quiver.
  16. //= arg(3): The quiver given by the NPC (item ID).
  17. //===== Additional Comments: =================================
  18. //= 07/06/05 : Added 1st Version. [Muad_Dib]
  19. //= Converted to rAthena format by Dr.Evil
  20. //= added prize to quest - 500 Zeny
  21. //= Fixed a few spelling errors. [Nexon]
  22. //= 1.1 Added Holy Arrow Quivers [Playtester]
  23. //= 1.2 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
  24. //= Removed "Holy Arrows" from the list.
  25. //============================================================
  26. payon_in01,5,134,5 script Inventor Jaax 89,{
  27. if (checkweight(1201,1) == 0 || MaxWeight - Weight < 2000) {
  28. mes "[Inventor Jaax]";
  29. mes "Hey, you're carrying";
  30. mes "way too much stuff. Why don't you stash it away in Kafra Storage? We can talk after you do that, right?";
  31. close;
  32. }
  33. mes "[Inventor Jaax]";
  34. mes "My name is Jaxx.";
  35. mes "Without ego, I can";
  36. mes "say that I am perhaps the";
  37. mes "^663300greatest inventor of our time^000000.";
  38. next;
  39. mes "[Inventor Jaxx]";
  40. mes "This time, I've";
  41. mes "created something";
  42. mes "truly extraordinary. I call them... ^663300Magic Quivers^000000 !! This will be remembered in history as an";
  43. mes "arrow revolution!";
  44. emotion ET_BEST;
  45. next;
  46. mes "[Inventor Jaax]";
  47. mes "I've studied magic and quivers for years, working night and day until I finally figured how to condense arrows with magic! With magic quivers, you'll be carrying more arrows, but with less weight!";
  48. next;
  49. mes "[Inventor Jaax]";
  50. mes "Would you like to try using one of my arrow quivers? I have no doubt that someone like you can appreciate my genius!";
  51. next;
  52. switch(select("Quiver:Iron Arrow Quiver:Steel Arrow Quiver:Oridecon Arrow Quiver:Fire Arrow Quiver:Silver Arrow Quiver:Wind Arrow Quiver:Stone Arrow Quiver:Crystal Arrow Quiver:Shadow Arrow Quiver:Immaterial Arrow Quiver:Rusty Arrow Quiver")) {
  53. case 1: callsub S_BuyQuiver,1750,500,500,12004;
  54. case 2: callsub S_BuyQuiver,1770,500,500,12005;
  55. case 3: callsub S_BuyQuiver,1753,500,500,12006;
  56. case 4: callsub S_BuyQuiver,1765,500,500,12007;
  57. case 5: callsub S_BuyQuiver,1752,500,500,12008;
  58. case 6: callsub S_BuyQuiver,1751,500,500,12009;
  59. case 7: callsub S_BuyQuiver,1755,500,500,12010;
  60. case 8: callsub S_BuyQuiver,1756,500,500,12011;
  61. case 9: callsub S_BuyQuiver,1754,500,500,12012;
  62. case 10: callsub S_BuyQuiver,1767,500,500,12013;
  63. case 11: callsub S_BuyQuiver,1757,500,500,12014;
  64. case 12: callsub S_BuyQuiver,1762,500,500,12015;
  65. }
  66. //This doesn't seem to be accessable...
  67. //mes "[Inventor Jaax]";
  68. //mes "Is there";
  69. //mes "anything you want?";
  70. //close;
  71. S_BuyQuiver:
  72. .@item_id = getarg(0);
  73. .@amount = getarg(1);
  74. .@zeny_req = getarg(2);
  75. if (countitem(.@item_id) >= .@amount) {
  76. mes "[Inventor Jaax]";
  77. mes "Excellent!";
  78. mes "Are you carrying any Arrows with you? I'll provide you with a quiver that can carry "+ .@amount +" of your "+ getitemname(.@item_id) +"s for only ^FF3131"+ .@zeny_req +" Zeny^000000.";
  79. next;
  80. switch(select("Store as many Arrows in quivers as possible:Purchase 1 quiver:Cancel")) {
  81. case 1:
  82. .@arrows = countitem(.@item_id);
  83. set .@quiver,.@arrows / .@amount;
  84. set .@arrows_used,.@quiver * .@amount;
  85. .@arrow_zeny01 = .@quiver * .@zeny_req;
  86. mes "Number of";
  87. mes "Arrows: ^3131FF"+.@arrows+" ^000000";
  88. mes "Maximum Number";
  89. mes "of Purchasable";
  90. mes "Quivers: ^3131FF"+.@quiver+" ^000000";
  91. mes "Zeny required: ^3131FF"+.@arrow_zeny01+" Zeny^000000";
  92. next;
  93. mes "[Inventor Jaax]";
  94. mes "Would you like to";
  95. mes "buy as many Quivers";
  96. mes "as you can for the Arrows";
  97. mes "you are currently carrying?";
  98. next;
  99. if (select("Yes:Cancel") == 1) {
  100. if (.@arrow_zeny01 < Zeny) {
  101. mes "[Inventor Jaax]";
  102. mes "There you go!";
  103. mes "Just remember, ^FF0000you won't be able to use the Quiver when your carried weight is 90% of your maximum weight limit^000000.";
  104. set Zeny, Zeny-.@arrow_zeny01;
  105. delitem .@item_id,.@arrows_used;// Arrow
  106. getitem getarg(3),.@quiver; //Quiver
  107. next;
  108. mes "[Inventor Jaax]";
  109. mes "So...";
  110. mes "Just keep track";
  111. mes "of how much you're";
  112. mes "carrying from time";
  113. mes "to time and you should";
  114. mes "be alright.";
  115. close;
  116. }
  117. else {
  118. mes "[Inventor Jaax]";
  119. mes "I'm sorry, but you don't have enough Zeny. I can't just give these away after working years";
  120. mes "to develop this revolutionary technology!";
  121. close;
  122. }
  123. }
  124. mes "[Inventor Jaax]";
  125. mes "You changed your mind?";
  126. mes "When the glory of owning";
  127. mes "a quiver is so close?";
  128. close;
  129. case 2:
  130. if (Zeny > .@zeny_req) {
  131. mes "[Inventor Jaax]";
  132. mes "There you go!";
  133. mes "Just remember, ^FF0000you won't be able to use the Quiver when your carried weight is 90% of your maximum weight limit^000000.";
  134. Zeny = Zeny -.@zeny_req;
  135. delitem .@item_id,.@amount;// Arrow
  136. getitem getarg(3),1; //Quiver
  137. next;
  138. mes "[Inventor Jaax]";
  139. mes "So...";
  140. mes "Just keep track";
  141. mes "of how much you're";
  142. mes "carrying from time";
  143. mes "to time and you should";
  144. mes "be alright.";
  145. close;
  146. }
  147. else {
  148. mes "[Inventor Jaax]";
  149. mes "You don't even";
  150. mes "have "+ .@zeny_req +" Zeny?";
  151. mes "I'm so sorry. I had no";
  152. mes "idea that you were so...";
  153. mes "^333333Destitute^000000.";
  154. close;
  155. }
  156. case 3:
  157. mes "[Inventor Jaax]";
  158. mes "What...?";
  159. mes "Do you not see that this invention can forever change the way Arrows are carried?! The future is now!";
  160. close;
  161. }
  162. }
  163. else {
  164. mes "[Inventor Jaax]";
  165. mes "You can carry a maximum of "+ .@amount +" Arrows within this quiver. It was made using my secret method,";
  166. mes "so the total weight of the Arrows and Quiver is less than carrying the Arrows alone.";
  167. next;
  168. mes "[Inventor Jaax]";
  169. mes "It's a miracle of science! One that you can experience for yourself if you bring me at least "+ .@amount +" Arrows and "+ .@zeny_req +" Zeny for each Quiver.";
  170. close;
  171. }
  172. }