Jump to content
  • 0

Script exchange of items for the amount indicated


ZelosAvalon

Question


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

i need help for edit my script, i try to 
 
i need help for edit my event i when i make script for exchange one per one working, but i try to make an script where de player can put how many coins he have for exchange more coins at a time.
 
this script give for a player just 1 coin and delete all coins he put in #pas1.
 
the ratio is: 5 Silver => 1 Golden
 
 

 

case 1:

{
mes "[Event Manager]";
mes "How many Silver Coins do you want to get from Golden Coins ?:";
input #pas1;   
next;  
{ if(countitem(8032) >= #pas1)
delitem 8032,#pas1;
mes " [ Event Manager ]";
mes "Thank you for choosing ...RO that luck be with you in future events, and you can win many Coins, and exchange with beautiful items.";
getitem 8033,1;
close;
}

 

Edited by ZelosAvalon
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

 

i need help for edit my script, i try to 
 
i need help for edit my event i when i make script for exchange one per one working, but i try to make an script where de player can put how many coins he have for exchange more coins at a time.
 
this script give for a player just 1 coin and delete all coins he put in #pas1.
 
the ratio is: 5 Silver => 1 Golden

 

	mes "[Event Manager]";
	mes "How many silver coins would you like to exchange?";
	mes "[5 Silver Coins = 1 Gold Coin]";
	next;
	switch( input( .@pas1, 5, countitem(8032) ) ) {
		case -1:
			mes "[Event Manager]";
			mes "You can't go that low; the minimum value is 5.";
			close;
			
		case 1:
			mes "[Event Manager]";
			mes "You don't have that many silver coins!";
			close;
	}
	delitem 8032, .@pas1-(.@pas1%5);
	mes " [ Event Manager ]";
	mes "Thank you for choosing ...RO that luck be with you in future events, and you can win many Coins, and exchange with beautiful items.";
	getitem 8033, .@pas1/5;
	close;
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.

×
×
  • Create New...