Jump to content
  • 0

Need help on Converter


Question

Posted

Sorry because i requested exchanger again .

well as for information , mine is not really same as other .

my plan is i need converter which can exchange 15 pcs Token(20290) for 1pcs token(20291) and another function will be exchange token(20291) into cashpoint .

Im a little confuse with the @input amount thing ..

well as here is my script . really hopes someone can help me look at it ?

ra_temsky,60,135,3 script Converter 83,{
mes "[Converter]";
mes "what can I do for you?";
Goto L_cash;
L_cash:
 next;
 mes "[Converter]";
 mes "Here the rates about the exchange:";
 mes "^FF33552 Heroic Token^000000 - ^FF33551 Sacred Token^000000";
 mes "^FF33551 Sacred Token^000000 - ^FF33552 Cash^000000";
 mes "Tell me, what choice do you take?";
 next;
 switch( select("^FF33552 Heroic Token Quest^000000 > ^FF33551 Sacred Token^000000:^FF33551 Sacred Token^000000 > ^FF33552 Cash^000000" )){
  Case 1:
if( countitem(20290) < 15 ){
 mes "You didnt have enough requirement.";
}else{
 mes "How many you want to exchange ?";
 mes "Max : Limit "+( #CASHPOINTS / 15 )+" .";
 input @Amount,0,countitem(20290);
 if( !@Amount ) close;
 next;
 mes "Okay..";
 delitem 20290,@Amount;
 getitem 20291,@Amount;
}
close;
  Case 2:
if( countitem(20291) < 1 ){
 mes "You didnt have enough "+getitemname( 20291 )+".";
}else{
 mes "How many you want to exchange ?";
 mes "Max : Limit "+countitem(20291)+" .";
 input @Amount,0,countitem(20291);
 if( !@Amount ) close;
 next;
 mes "Okay..";
 delitem 20291,@Amount;
 set #CASHPOINTS,#CASHPOINTS + ( 1 * @Amount );
}
close;
 }
L_Thanks:
 mes "[Converter]";
 mes "Pleasure doing business with you.";
 close;
L_No:
 mes "[Converter]";
 mes "Okay~ Bye!";
 close;
}

well actually its emistry`s work .

Thanks to him btw .

im gonna need to change the

^FF33552 Heroic Token Quest^000000 > ^FF33551 Sacred Token^000000

cause at this moment , its only exchange 1 heroic into 1 sacred token

however , my plan is i wanted to exchange 15 heroin token for every 1pcs sacred token ?

2 answers to this question

Recommended Posts

Posted

LOL ???


  Case 1:
if( countitem(20290) < 15 ){
 mes "You didnt have enough requirement.";
}else{
 mes "How many you want to exchange ?";
 mes "Max : Limit "+( #CASHPOINTS / 15 )+" .";
 input @Amount,0,countitem(20290);
 if( !@Amount ) close;
 next;
 mes "Okay..";
 delitem 20290,@Amount;
 getitem 20291,@Amount;
}

in your script....you check for item ID 20290

but...you show the limit ( CASHPOINT /15 ) ?? /no1

then..input limit is amount of 20290 you currently have ?

you messed up this part...

it should be like this..

 mes "Max : Limit "+( countitem(20290) / 15 )+" .";
 input @Amount,0,( countitem(20290) / 15 );
 if( !@Amount ) close;
 next;
 mes "Okay..";
 delitem 20290,( @Amount * 15 );

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.

  • Recently Browsing   0 members

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