ammo_boxes.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. //===== eAthena Script ========================================
  2. //= Ammo Box Event
  3. //===== By: ==================================================
  4. //= Playtester
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= eAthena 1.0+
  9. //===== Description: =========================================
  10. //= Turns bullets into ammo boxes.
  11. //===== Additional Comments: =================================
  12. //= 1.0 Added the first 8 ammo boxes [Playtester]
  13. //============================================================
  14. que_ng.gat,187,149,3 script Kenny 83,{
  15. mes "[Kenny]";
  16. mes "My name is Kenny.";
  17. mes "I can create ^0000FFbullet casings^000000";
  18. mes "and ^0000FFsphere packs^000000.";
  19. next;
  20. mes "[Kenny]";
  21. mes "Would you like to try using one of";
  22. mes "my bullet bullet casings or sphere";
  23. mes "packs?";
  24. mes "Select the one you want me to make!";
  25. next;
  26. menu "Bullet Casing",-,"Silver Bullet Casing",Q2,"Shell of Blood Casing",Q3,"Lightning Sphere Pack",Q4,"Blind Sphere Pack",Q5,"Poison Sphere Pack",Q6,"Freezing Sphere Pack",Q7,"Flare Sphere Pack",Q8;
  27. // Arguments
  28. //===========
  29. callsub sF_Make, 13200,500,12149, "Bullet Casings";
  30. goto M_Menu;
  31. Q2:
  32. callsub sF_Make, 13201,500,12151, "Silver Bullet Casings";
  33. goto M_Menu;
  34. Q3:
  35. callsub sF_Make, 13202,500,12150, "Shell of Blood Casings";
  36. goto M_Menu;
  37. Q4:
  38. callsub sF_Make, 13204,500,12144, "Lightning Sphere Packs";
  39. goto M_Menu;
  40. Q5:
  41. callsub sF_Make, 13206,500,12145, "Blind Sphere Packs";
  42. goto M_Menu;
  43. Q6:
  44. callsub sF_Make, 13205,500,12146, "Poison Sphere Packs";
  45. goto M_Menu;
  46. Q7:
  47. callsub sF_Make, 13207,500,12147, "Freezing Sphere Packs";
  48. goto M_Menu;
  49. Q8:
  50. callsub sF_Make, 13203,500,12148, "Flare Sphere Packs";
  51. goto M_Menu;
  52. // Subfunction for making ammo boxes
  53. //==================================
  54. sF_Make:
  55. set @ammonum,500;
  56. if(countitem(getarg(0)) < @ammonum) goto L_NdAmmo;
  57. if(Zeny < getarg(1)) goto L_NdZeny;
  58. mes "[Kenny]";
  59. mes "What do you want me to do?";
  60. next;
  61. menu "Give me as many as you can.",-, "I want to set the amount.",sM_0b, "Nevermind",M_End;
  62. set @amount,50;
  63. if(zeny/getarg(1) < @amount) set @amount, zeny/getarg(1);
  64. if(countitem(getarg(0))/@ammonum < @amount) set @amount, countitem(getarg(0))/@ammonum;
  65. if(@amount > 0) goto L_End;
  66. mes "[Kenny]";
  67. mes "Dude, you don't even have the right items...";
  68. close;
  69. sM_0b:
  70. input @amount;
  71. if(@amount<1 || @amount>50) goto L_BadAmnt;
  72. if(countitem(getarg(0))/@ammonum < @amount) goto L_NdAmmo;
  73. if(Zeny < (getarg(1)*@amount)) goto L_NdZeny;
  74. L_End:
  75. set Zeny, Zeny - (getarg(1)*@amount);
  76. delitem getarg(0), (@amount*@ammonum);
  77. getitem getarg(2), @amount;
  78. mes "[Kenny]";
  79. mes "There you go~!";
  80. mes "Here are your " +getarg(3)+ ".";
  81. close;
  82. L_NdAmmo:
  83. mes "[Kenny]";
  84. mes "Sorry, but you need 500 bullets or";
  85. mes "spheres and 500 zeny to make";
  86. mes "1 bullet casing or 1 sphere pack.";
  87. close;
  88. L_NdZeny:
  89. mes "[Kenny]";
  90. mes "You don't have enough zeny for that many.";
  91. close;
  92. L_BadAmnt:
  93. mes "[Kenny]";
  94. mes "Please choose a number between 1 and 50.";
  95. close;
  96. L_Come:
  97. mes "[Kenny]";
  98. mes "Please, come again whenever you want too.";
  99. close;
  100. M_End:
  101. mes "[Kenny]";
  102. mes "Sure, no problem.";
  103. mes "Come back any time.";
  104. close;
  105. }