iFoxkun

Banker NPC

Nov 26th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. //Made by Karul
  2. prontera,131,216,5 script Zeny Exchanger 984,{
  3.  
  4. set .@name$,"[Zeny Exchanger]";
  5.  
  6. mes .@name$;
  7. mes "Hello~";
  8. mes "What can i do for you?";
  9. next;
  10. mes "It will be your loss if you convert coins to the point of the max Zany limit, which is 2 Billion Zeny";
  11. next;
  12. menu "Zeny to Coins",L_ZC,"Coins to Zeny",L_CZ,"Nevermind",L_Nevermind;
  13.  
  14. L_Nevermind:
  15. mes .@name$;
  16. mes "Alright!";
  17. close;
  18.  
  19. L_ZC:
  20. mes .@name$;
  21. mes "Gold is 1 Million Zeny";
  22. mes "Mithril is 10 Million Zeny";
  23. mes "Silver is 100 Million Zeny";
  24. mes "Platinum is 200 Million Zeny";
  25. next;
  26. mes .@name$;
  27. mes "What kind of coins do you want to trade?";
  28. switch(select("Gold:Mithril:Silver:Platinum")) {
  29. case 1: next;
  30. mes .@name$;
  31. mes "How many Gold Coins do you want?";
  32. input .@goldc;
  33. if(checkweight(671,.@goldc)) {
  34. if( zeny < 1000000*.@goldc) { close; }
  35. set zeny,zeny-1000000*.@goldc;
  36. getitem 671,.@goldc;
  37. } else {
  38. mes .@name$;
  39. mes "You don't have enough space in your inventory";
  40. }
  41. close;
  42. case 2: next;
  43. mes .@name$;
  44. mes "How many Mithril Coins do you want?";
  45. input .@mithc;
  46. if(checkweight(674,.@mithc)) {
  47. if( zeny < 10000000*.@mithc) { close; }
  48. set zeny,zeny-10000000*.@mithc;
  49. getitem 674,.@mithc;
  50. } else {
  51. mes .@name$;
  52. mes "You don't have enough space in your inventory";
  53. }
  54. close;
  55. case 3: next;
  56. mes .@name$;
  57. mes "How many Silver Coins do you want?";
  58. input .@silvc;
  59. if(checkweight(675,.@silvc)) {
  60. if( zeny < 100000000*.@silvc) { close; }
  61. set zeny,zeny-100000000*.@silvc;
  62. getitem 675,.@silvc;
  63. } else {
  64. mes .@name$;
  65. mes "You don't have enough space in your inventory";
  66. }
  67. close;
  68. case 4: next;
  69. mes .@name$;
  70. mes "How many Platinum Coins do you want?";
  71. input .@platc;
  72. if(checkweight(677,.@platc)) {
  73. if( zeny < 200000000*.@platc) { close; }
  74. set zeny,zeny-200000000*.@platc;
  75. getitem 677,.@platc;
  76. } else {
  77. mes .@name$;
  78. mes "You don't have enough space in your inventory";
  79. }
  80. close;
  81. }
  82.  
  83. L_CZ:
  84. mes .@name$;
  85. mes "Gold is 1 Million Zeny";
  86. mes "Mithril is 10 Million Zeny";
  87. mes "Silver is 100 Million Zeny";
  88. mes "Platinum is 200 Million Zeny";
  89. next;
  90. mes "What would you like to convert?";
  91. switch(select("Gold:Mithril:Silver:Platinum")) {
  92. case 1: next;
  93. mes .@name$;
  94. mes "How many Gold coins do you want to convert?";
  95. input .@goldz;
  96. if( .@goldz < 0 ) || ( countitem(671) < .@goldz ) { close; }
  97. set zeny,zeny+1000000*.@goldz;
  98. delitem 671,.@goldz;
  99. close;
  100. case 2: next;
  101. mes .@name$;
  102. mes "How many Mithril coins do you want to convert?";
  103. input .@mithz;
  104. if( .@mithz < 0 ) || ( countitem(674) < .@mithz ) { close; }
  105. set zeny,zeny+10000000*.@mithz;
  106. delitem 674,.@mithz;
  107. close;
  108. case 3: next;
  109. mes .@name$;
  110. mes "How many Silver coins do you want to convert?";
  111. input .@silvz;
  112. if( .@silvz < 0 ) || ( countitem(675) < .@silvz ) { close; }
  113. set zeny,zeny+100000000*.@silvz;
  114. delitem 675,.@silvz;
  115. close;
  116. case 4: next;
  117. mes .@name$;
  118. mes "How many Platinum coins do you want to convert?";
  119. input .@platz;
  120. if( .@platz < 0 ) || ( countitem(677) < .@platz ) { close; }
  121. set zeny,zeny+200000000*.@platz;
  122. delitem 677,.@platz;
  123. close;
  124. }
  125. }
Add Comment
Please, Sign In to add comment