milk_trader.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //===== eAthena Script =======================================
  2. //= Milk Trader
  3. //===== By: ==================================================
  4. //= kobra_k88
  5. //===== Current Version: =====================================
  6. //= 1.2a
  7. //===== Compatible With: =====================================
  8. //= eAthena 7.15 +
  9. //===== Description: =========================================
  10. //= trades bottles for milk
  11. //===== Additional Comments: =================================
  12. //= Fully working
  13. //= 1.1 Negative input bug fixed [Lupus]
  14. //= 1.2 Raised the price to close zeny exploit [Lupus]
  15. //= 1.2a Switched to Lupus's "loopless" technique.[kobra_k88]
  16. //============================================================
  17. // Milk Trader -------------------------------------------------------------
  18. prontera.gat,71,131,7 script Milk Trader 86,{
  19. mes "[Milk Trader]";
  20. mes "If you bring me an empty bottle and 20 Zeny, I will exchange it for 1 bottle of milk.";
  21. next;
  22. menu "-Exchange as many as possible.",M_0, "-Let me set the amount.",M_1, "-Cancel",M_End;
  23. M_0:
  24. set @amount, 1000;
  25. if(zeny/20 < @amount) set @amount, zeny/20;
  26. if(countitem(713) < @amount) set @amount, countitem(713);
  27. if(@amount > 0) goto L_Milk;
  28. mes "[Milk Trader]";
  29. mes "..... Are you trying to make a fool of me.... ?";
  30. close;
  31. M_1:
  32. input @amount;
  33. if(@amount < 1 || @amount > 1000) goto M_End;
  34. if(countitem(713) < @amount) goto L_NoBottle;
  35. if(zeny < (@amount*20)) goto L_NoZeny;
  36. L_Milk:
  37. getitem 519, @amount;
  38. delitem 713, @amount;
  39. set zeny, zeny - (@amount*20);
  40. M_End:
  41. mes "[Milk Trader]";
  42. mes "Come back anytime.";
  43. close;
  44. L_NoBottle:
  45. mes "[Milk Trader]";
  46. mes "Ok, empty bottle please! Empty Bottle!!";
  47. mes "... Aww.. you don't have enough...?";
  48. close;
  49. L_NoZeny:
  50. mes "[Milk Trader]";
  51. mes "You need more zeny.";
  52. close;
  53. }