Advertisement
Echo29681

Point Merchant

Dec 1st, 2013
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. //Script by: Maggzillaaaaaaa (joke the woman wasn't happy I was scripting =P)
  2. // ================ rAthena Script ==================================================
  3. // ============== Information =======================================================
  4. // = Point Merchant
  5. // = Made by :
  6. // = Echo
  7. //===== Current Version: ===================================================
  8. //= 1.0
  9. //===== Compatible With: ===================================================
  10. //= with any rAthena Revision
  11. //===== Description: =======================================================
  12. //= Sells and Buys any amount of skill or stat points.
  13.  
  14. vend_zone,113,104,6 script Point Merchant 47,{
  15. // ===================== Settings ===========================
  16. set .@skillname$,"^0000FF[ Baldur ]^000000";
  17. set .@zenyCost,100000;
  18. // ================== End of Settings =======================
  19. mes .@skillname$;
  20. mes "Hello ^FF0000["+strcharinfo(0)+"]^000000!";
  21. mes "What do you want to do?";
  22. next;
  23. switch(select("-Buy Stats:-Buy Skills:-Sell Stats:-Sell Skills:Cancel")) {
  24. case 1:
  25. mes .@skillname$;
  26. mes "Okay input the Amount";
  27. mes "of Points you want to buy!";
  28. next;
  29. mes .@skillname$;
  30. mes "1 Point has a cost of "+.@zenyCost+" Zenny!";
  31. input .@amount;
  32. if( Zeny < ( .@amount * .@zenyCost ) ) {
  33. mes "You don't have enough money!";
  34. close;
  35. } else {
  36. set Zeny, Zeny - ( .@amount * .@zenyCost );
  37. set StatusPoint, StatusPoint + .@amount;
  38. mes "There you are, enjoy your new points!";
  39. close;
  40. }
  41. case 2:
  42. mes .@skillname$;
  43. mes "Okay input the Amount";
  44. mes "of Points you want to buy!";
  45. next;
  46. mes .@skillname$;
  47. mes "1 Point has a cost of "+.@zenyCost+" Zenny!";
  48. input .@amount;
  49. if( Zeny < ( .@amount * .@zenyCost ) ) {
  50. mes "You don't have enough money!";
  51. close;
  52. } else {
  53. set Zeny, Zeny - ( .@amount * .@zenyCost );
  54. set SkillPoint, SkillPoint + .@amount;
  55. mes "There you are, enjoy your new points!";
  56. close;
  57. }
  58. case 3:
  59. mes .@skillname$;
  60. mes "Okay input the Amount";
  61. mes "of Points you wish to sell!";
  62. next;
  63. mes .@skillname$;
  64. mes "1 Point has a value of "+.@zenyCost+" Zenny!";
  65. input .@amount;
  66. if( StatusPoint < ( .@amount ) ) {
  67. mes "You don't have enough Status Points!";
  68. close;
  69. } else {
  70. set Zeny, Zeny + ( .@amount * .@zenyCost );
  71. set StatusPoint, StatusPoint - .@amount;
  72. mes "There you are, enjoy your Zeny!";
  73. close;
  74. }
  75. case 4:
  76. mes .@skillname$;
  77. mes "Okay input the Amount";
  78. mes "of Points you wish to sell!";
  79. next;
  80. mes .@skillname$;
  81. mes "1 Point has a value of "+.@zenyCost+" Zenny!";
  82. input .@amount;
  83. if( skillpoint < ( .@amount ) ) {
  84. mes "You don't have enough Skill Points!";
  85. close;
  86. } else {
  87. set Zeny, Zeny + ( .@amount * .@zenyCost );
  88. set SkillPoint, SkillPoint - .@amount;
  89. mes "There you are, enjoy your zeny!";
  90. close;
  91. }
  92. case 5:
  93. mes .@skillname$;
  94. mes "Come again...";
  95. close;
  96. }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement