Emistry

Coin Manager v3

Sep 27th, 2011
1,159
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. prontera,155,181,5 script Coin Manager 439,{
  2. // Your Server Max Zeny Amount
  3. set .MaxZeny,1000000000;
  4.  
  5. // Coins Item ID and each Coins Costs
  6. setarray .Coins[1],675,671,674;
  7. setarray .Zeny[1],1000000,10000000,100000000;
  8.  
  9. set @Menu$,"";
  10. for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
  11. set @Menu$,@Menu$ + getitemname( .Coins[.@a] )+":";
  12. }
  13. while( 1 ){
  14. mes "What do you want to do today?";
  15. next;
  16. switch( select( "Coin to Zeny:Zeny to Coin" ) ){
  17. Case 1:
  18. mes "Very well. Here is the list on how much each coin is worth:";
  19. for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
  20. mes "^0000FF"+getitemname( .Coins[.@a] )+" ^FF0000"+.Zeny[.@a]+"^000000 Zeny.";
  21. }
  22. next;
  23. set .@a,select( @Menu$ );
  24. mes "Select the Amount of Coins you want to trade into Zeny.";
  25. mes "You have "+countitem( .Coins[.@a] )+" "+getitemname( .Coins[.@a] )+".";
  26. input @Amount,0,countitem( .Coins[.@a] );
  27. if( @Amount < 1 ){
  28. mes "You cancelled.";
  29. }else if( ( Zeny + ( @Amount * .Zeny[.@a] ) ) > .MaxZeny ){
  30. mes "You can hold this amount of Zeny.";
  31. }else{
  32. set Zeny,Zeny + ( @Amount * .Zeny[.@a] );
  33. delitem .Coins[.@a],@Amount;
  34. mes "Done, you have traded "+@Amount+" of "+getitemname(.Coins[.@a])+" into "+( @Amount * .Zeny[.@a] )+" Zeny.";
  35. }
  36. next;
  37. break;
  38. Case 2:
  39. mes "Very well. Here is the list on how much each coin is worth:";
  40. for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
  41. mes "^0000FF"+getitemname( .Coins[.@a] )+" ^FF0000"+.Zeny[.@a]+"^000000 Zeny.";
  42. }
  43. next;
  44. set .@a,select( @Menu$ );
  45. mes "Select the Amount of Zeny you want to trade into "+getitemname( .Coins[.@a] )+".";
  46. mes "You can get maximum of "+Zeny/.Zeny[.@a]+" "+getitemname( .Coins[.@a] )+".";
  47. input @Amount,0,Zeny/.Zeny[.@a];
  48. if( @Amount < 1 ){
  49. mes "You cancelled.";
  50. }else{
  51. set Zeny,Zeny - ( @Amount * .Zeny[.@a] );
  52. getitem .Coins[.@a],@Amount;
  53. mes "Done, you have traded "+( @Amount * .Zeny[.@a] )+" Zeny into "+@Amount+" of "+getitemname(.Coins[.@a])+" .";
  54. }
  55. next;
  56. break;
  57. }
  58. }
  59. close;
  60. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment