quivers.txt 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. //===== rAthena Script =======================================
  2. //= Arrow Quivers
  3. //===== By: ==================================================
  4. //= Muad_Dib (Prometheus Project); L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.1
  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. //= 1.0 Added Mora NPC. [Euphy]
  19. //= 1.1 Updated to match the official scripts. [Euphy]
  20. //============================================================
  21. // Mora :: ep14_1_tre
  22. //============================================================
  23. mora,106,117,3 script Quiver Maker#mora 516,{
  24. if (checkweight(1201,1) == 0) {
  25. mes "[Quiver Maker]";
  26. mes "You have too many things with you.";
  27. mes "Make some space in your inventory and come back. I'll tell you something interesting.";
  28. close;
  29. }
  30. if (MaxWeight - Weight < 2000) {
  31. mes "[Quiver Maker]";
  32. mes "You seem worn out with all that stuff.";
  33. mes "Make some space in your inventory and come back. I'll tell you something interesting.";
  34. close;
  35. }
  36. mes "[Quiver Maker]";
  37. mes "Mora villagers ask what good quivers are. They just don't know how the world works.";
  38. mes "No wonder they don't know a thing about quivers - spreading jam over leaves all day long.";
  39. next;
  40. switch(select("Please make me a quiver.:What's a quiver?")) {
  41. case 1:
  42. mes "[Quiver Maker]";
  43. mes "At last someone appreciates a quiver!";
  44. mes "I can make Elven Quivers and Hunting Quivers.";
  45. mes "Which do you need?";
  46. next;
  47. switch(select("An Elven Quiver:A Hunting Quiver:I don't need a quiver.")) {
  48. case 1: callsub S_BuyQuiver,1773,500,500,12575; //Arrow_Of_Elf_Cntr
  49. case 2: callsub S_BuyQuiver,1774,500,500,12576; //Hunting_Arrow_Cntr
  50. case 3:
  51. mes "[Quiver Maker]";
  52. mes "You can buy arrows off the tool merchant next to me.";
  53. close;
  54. }
  55. case 2:
  56. mes "[Quiver Maker]";
  57. mes "An arrow may be thin and light, but carrying hundreds and thousands of arrows is like carrying a whole log.";
  58. next;
  59. mes "[Quiver Maker]";
  60. mes "But when you have quivers, you can put arrows in them and save weight and space.";
  61. mes "If you're interested in one, I'll stitch one up for you.";
  62. close;
  63. }
  64. end;
  65. S_BuyQuiver:
  66. .@item_req = getarg(0);
  67. .@req_amount = getarg(1);
  68. if (countitem(getarg(0)) < .@req_amount) {
  69. mes "[Quiver Maker]";
  70. mes "Bring more than "+ .@req_amount +" "+ getitemname(.@item_req) +" and I'll make you a quiver.";
  71. close;
  72. }
  73. mes "[Quiver Maker]";
  74. mes "Oh, I see you have "+ getitemname(.@item_req) +" in your hand!";
  75. mes "Are you interested in using a quiver? It's really convenient!";
  76. mes "If you're interested, I can trade "+ .@req_amount +" of those arrows for one of these quivers for ^FF3131"+getarg(2)+" zeny^000000.";
  77. next;
  78. switch(select("Trade all the arrows you have:Get only one quiver:Don't trade")) {
  79. case 1:
  80. set .@arrows, countitem(.@item_req);
  81. set .@quiver, .@arrows / .@req_amount;
  82. set .@arrows_used, .@quiver * .@req_amount;
  83. set .@arrow_zeny01, .@quiver * getarg(2);
  84. mes "The number of arrows you have : ^3131FF"+.@arrows+"^000000";
  85. mes "The number of quivers available : ^3131FF"+.@quiver+"^000000";
  86. mes "Zeny needed for trade : ^3131FF"+.@arrow_zeny01+" zeny^000000";
  87. next;
  88. mes "Trade?";
  89. next;
  90. if(select("Trade:Don't trade") == 2) {
  91. mes "[Quiver Maker]";
  92. mes "Hey, you don't doubt my skills, do you?";
  93. close;
  94. }
  95. break;
  96. case 2:
  97. set .@quiver, 1;
  98. set .@arrows_used, .@req_amount;
  99. set .@arrow_zeny01, getarg(2);
  100. set .@zeny_mes,1;
  101. break;
  102. case 3:
  103. mes "[Quiver Maker]";
  104. mes "Hey, you don't doubt my skills, do you?";
  105. close;
  106. }
  107. if (Zeny < .@arrow_zeny01) {
  108. mes "[Quiver Maker]";
  109. if (.@zeny_mes == 1)
  110. mes "I said I'd accept human coins just for you, and you still don't want to spend the money?";
  111. else
  112. mes "You really don't expect to get your hands on a masterpiece for nothing, do you?";
  113. close;
  114. }
  115. mes "[Quiver Maker]";
  116. mes "Hey, here you are.";
  117. mes "There is ^3131FFsomething you need to know^000000 - try to remember it.";
  118. mes "^FF0000You can't use quivers when your encumbrance is over 70%.^000000";
  119. mes "You'd better keep that in mind, or you might be in trouble later.";
  120. set Zeny, Zeny-.@arrow_zeny01;
  121. delitem .@item_req,.@arrows_used;
  122. getitem getarg(3),.@quiver;
  123. close;
  124. }