Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,128,80,3 script Banker Exchanger 833,{
- setarray .@item,671,7539;
- mes "Select an Item.";
- set .@selected,select( "^0055FF ~ ^000000"+getitemname( .@item[0] ),"^0055FF ~ ^000000"+getitemname( .@item[1] ) ) - 1;
- mes "Select a service.";
- switch( select(
- "Exchange ^0055FF"+getitemname( .@item[.@selected] )+"^000000 to "+( ( .@selected )?"Cashpoints":"Zeny" ),
- "Exchange ^0055FF"+( ( .@selected )?"Cashpoints":"Zeny" )+"^000000 to "+getitemname( .@item[.@selected] )
- )){
- Case 1:
- if( !.@selected ){
- if( Zeny >= 1000000000 ){
- mes "You cant hold that much of Zeny.";
- }else if( !countitem( .@item[.@selected] ) ){
- mes "You dont have any "+getitemname( .@item[.@selected] )+".";
- }else{
- delitem .@item[.@selected],1;
- set Zeny,Zeny + 500000000;
- mes "Exchanged to 500,000,000 zeny.";
- }
- }else{
- mes "How many "+getitemname( .@item[.@selected] )+" will be exchange to Cashpoints ?";
- mes "You got "+countitem( .@item[.@selected] )+" x "+getitemname( .@item[.@selected] );
- input .@amount,0,countitem( .@item[.@selected] );
- if( .@amount ){
- if( countitem( .@item[.@selected] ) < .@amount ){
- mes "You dont have enoug "+.@amount+" x "+getitemname( .@item[.@selected] )+".";
- }else{
- delitem .@item[.@selected],.@amount;
- set #KAFRAPOINTS,#KAFRAPOINTS + 15*.@amount;
- mes "Gained "+15*.@amount+" x Cashpoints.";
- }
- }
- }
- break;
- Case 2:
- if( !.@selected ){
- if( Zeny < 500000000 ){
- mes "You dont have that much of Zeny. You need 500,000,000 zeny.";
- }else{
- getitem .@item[.@selected],1;
- set Zeny,Zeny - 500000000;
- mes "Gained "+getitemname( .@item[.@selected] );
- }
- }else{
- mes "How many Cashpoints will be exchange to "+getitemname( .@item[.@selected] )+" ?";
- mes "You got "+#KAFRAPOINTS+" x Cashpoints.";
- set .@maxamount,( 30000 - countitem( .@item[.@selected] ) );
- if( .@maxamount > #KAFRAPOINTS/15 )
- set .@maxamount,#KAFRAPOINTS/15;
- input .@amount,0,.@maxamount;
- if( .@amount ){
- getitem .@item[.@selected],.@amount;
- set #KAFRAPOINTS,#KAFRAPOINTS - 15*.@amount;
- mes "Gained "+.@amount+" x "+getitemname( .@item[.@selected] );
- }
- }
- default: break;
- }
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement