Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1.  
  2.  
  3. prontera,128,80,3 script Banker Exchanger 833,{
  4.  
  5. setarray .@item,671,7539;
  6.  
  7. mes "Select an Item.";
  8. set .@selected,select( "^0055FF ~ ^000000"+getitemname( .@item[0] ),"^0055FF ~ ^000000"+getitemname( .@item[1] ) ) - 1;
  9. mes "Select a service.";
  10.  
  11. switch( select(
  12. "Exchange ^0055FF"+getitemname( .@item[.@selected] )+"^000000 to "+( ( .@selected )?"Cashpoints":"Zeny" ),
  13. "Exchange ^0055FF"+( ( .@selected )?"Cashpoints":"Zeny" )+"^000000 to "+getitemname( .@item[.@selected] )
  14. )){
  15. Case 1:
  16. if( !.@selected ){
  17. if( Zeny > 1000000000 ){
  18. mes "You cant hold that much of Zeny.";
  19. }else if( !countitem( .@item[.@selected] ) ){
  20. mes "You dont have any "+getitemname( .@item[.@selected] )+".";
  21. }else{
  22. delitem .@item[.@selected],1;
  23. set Zeny,Zeny + 1000000000;
  24. mes "Exchanged to 1,000,000,000 zeny.";
  25. }
  26. }else{
  27. mes "How many "+getitemname( .@item[.@selected] )+" will be exchange to Cashpoints ?";
  28. mes "You got "+countitem( .@item[.@selected] )+" x "+getitemname( .@item[.@selected] );
  29. input .@amount,0,countitem( .@item[.@selected] );
  30. if( .@amount ){
  31. if( countitem( .@item[.@selected] ) < .@amount ){
  32. mes "You dont have enoug "+.@amount+" x "+getitemname( .@item[.@selected] )+".";
  33. }else{
  34. delitem .@item[.@selected],.@amount;
  35. set #KAFRAPOINTS,#KAFRAPOINTS + .@amount;
  36. mes "Gained "+.@amount+" x Cashpoints.";
  37. }
  38. }
  39. }
  40. break;
  41. Case 2:
  42. if( !.@selected ){
  43. if( Zeny < 1000000000 ){
  44. mes "You dont have that much of Zeny. You need 1,000,000,000 zeny.";
  45. }else{
  46. getitem .@item[.@selected],1;
  47. set Zeny,Zeny - 1000000000;
  48. mes "Gained "+getitemname( .@item[.@selected] );
  49. }
  50. }else{
  51. mes "How many Cashpoints will be exchange to "+getitemname( .@item[.@selected] )+" ?";
  52. mes "You got "+#KAFRAPOINTS+" x Cashpoints.";
  53. set .@maxamount,( 30000 - countitem( .@item[.@selected] ) );
  54. if( .@maxamount > #KAFRAPOINTS )
  55. set .@maxamount,#KAFRAPOINTS;
  56. input .@amount,0,.@maxamount;
  57. if( .@amount ){
  58. getitem .@item[.@selected],.@amount;
  59. set #KAFRAPOINTS,#KAFRAPOINTS - .@amount;
  60. mes "Gained "+.@amount+" x "+getitemname( .@item[.@selected] );
  61. }
  62. }
  63. default: break;
  64. }
  65. close;
  66.  
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement