gyroguevarra Posted November 27, 2013 Posted November 27, 2013 1pod = 2000cash points cash to pod pod to cash Quote
GodKnows Jhomz Posted April 19, 2014 Posted April 19, 2014 prontera,156,170,5 script Cash Exchanger 439,{ // Pods Item ID and each Pods Costs setarray .Pods[1],7179; setarray .Cash[1],2000; set @Menu$,""; for( set .@a,1; .@a < getarraysize( .Pods ); set .@a,.@a+1 ){ set @Menu$,@Menu$ + getitemname( .Pods[.@a] )+":"; } while( 1 ){ mes "What do you want to do today?"; next; switch( select( "Pod(s) to Cash:Cash to Pod(s)" ) ){ Case 1: mes "Very well. Here is the list on how much each Pod is worth:"; for( set .@a,1; .@a < getarraysize( .Pods ); set .@a,.@a+1 ){ mes "^0000FF"+getitemname( .Pods[.@a] )+" ^FF0000"+.Cash[.@a]+"^000000 Cash Points."; } next; set .@a,select( @Menu$ ); mes "Select the Amount of Pod you want to trade into Cash Points."; mes "You have "+countitem( .Pods[.@a] )+" "+getitemname( .Pods[.@a] )+"."; input @Amount,0,countitem( .Pods[.@a] ); if( @Amount < 1 ){ mes "You cancelled."; }else{ set #CASHPOINTS,#CASHPOINTS + ( @Amount * .Cash[.@a] ); delitem .Pods[.@a],@Amount; mes "Done, you have traded "+@Amount+" "+getitemname(.Pods[.@a])+" into "+( @Amount * .Cash[.@a] )+" Cash Points."; } dispbottom "Total Cash Points: "+#CASHPOINTS; close; break; Case 2: mes "Very well. Here is the list on how much each Pod is worth:"; for( set .@a,1; .@a < getarraysize( .Pods ); set .@a,.@a+1 ){ mes "^0000FF"+getitemname( .Pods[.@a] )+" ^FF0000"+.Cash[.@a]+"^000000 Cash Points."; } next; set .@a,select( @Menu$ ); mes "Select the Amount of Cash Points you want to trade into "+getitemname( .Pods[.@a] )+"."; mes "You can get maximum of "+#CASHPOINTS/.Cash[.@a]+" "+getitemname( .Pods[.@a] )+"."; input @Amount,0,#CASHPOINTS/.Cash[.@a]; if( @Amount < 1 ){ mes "You cancelled."; }else{ set #CASHPOINTS,#CASHPOINTS - ( @Amount * .Cash[.@a] ); getitem .Pods[.@a],@Amount; mes "Done, you have traded "+( @Amount * .Cash[.@a] )+" Cash Points into "+@Amount+" of "+getitemname(.Pods[.@a])+" ."; } dispbottom "Total Cash Points: "+#CASHPOINTS; close; break; } } close; } Emistry's Original Script From http://rathena.org/board/topic/70305-cash-exhchange-to-coin/#entry152495 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.