Jump to content

Recommended Posts

  • 4 months later...
Posted
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...