lets say i asked for 1 poring coin but my bronze is only 9pcs ..the NPC will say "Im sorry you dont have enough Bronze coin"
heres a Simple code i grabbed from a forum and modified it ..
THANKS
credits to the owner of this script
itemmall,194,73,2 script Poring Coin Exchanger 763,{
while( 1 ){
switch( select("Bronze Coin to Event Token:Silver Coin to Event Token:Gold Coin to Event Token:Exit") ){
Case 1:
if( !countitem(673) ){
mes "You didnt have enough Silver Coin.";
close;
}else{
mes "You have "+countitem(673)+" Silver Coin.";
mes "How many Bronze Coin will be convert to Weedring Token ?";
input @Amount,0,countitem(673);
if( !@Amount || (( .bronze * @Amount ) ) > 1000000000 ){
mes "Deal Cancelled.";
}else{
delitem 673,@Amount * 10;
mes "Converted "+@Amount * 10+" of Bronze Coin into Weedring Token.";
mes "Gained Total of "+( .Rates * @Amount )+" of Zeny.";
getitem 7539,@Amount;
}
}
next;
break;
Case 2:
if( !countitem(675) ){
mes "You didnt have enough Weedring Token.";
}else{
mes "You have "+countitem(675)+" Weedring Token.";
mes "How many Weedring Token will be convert to Archangeling Token ?";
input @Amount,0,countitem(675);
if( !@Amount || (( .bronze * @Amount ) ) > 1000000000 ){
mes "Deal Cancelled.";
}else{
delitem 675,@Amount * 5;
mes "Converted "+@Amount * 10+" of Bronze Coin into Weedring Token.";
mes "Gained Total of "+( .Rates * @Amount )+" of Zeny.";
getitem 7539,@Amount; }
}
next;
break;
Case 3:
if( !countitem(671) ){
mes "You didnt have enough Weedring Token.";
}else{
mes "You have "+countitem(671)+" Weedring Token.";
mes "How many Weedring Token will be convert to Archangeling Token ?";
input @Amount,0,countitem(671);
if( !@Amount || (( .bronze * @Amount ) ) > 1000000000 ){
mes "Deal Cancelled.";
}else{
delitem 671,@Amount;
mes "Converted "+@Amount * 10+" of Bronze Coin into Weedring Token.";
mes "Gained Total of "+( .Rates * @Amount )+" of Zeny.";
getitem 7539,@Amount; }
}
next;
break;
Case 4:
mes "Comeback if you change your mind";
close;
}
}
close;
}
Question
shironaito22
R> Coin to Poring coin Exchanger
with Weight check
1 Poring coin is = to 10m
10 Bronze coin = 1 Poring coin
5 Silver coin = 1 poring coin
1 Gold coin = 1 poring coin
lets say i asked for 1 poring coin but my bronze is only 9pcs ..the NPC will say "Im sorry you dont have enough Bronze coin"
heres a Simple code i grabbed from a forum and modified it ..
THANKS
credits to the owner of this script
itemmall,194,73,2 script Poring Coin Exchanger 763,{ while( 1 ){ switch( select("Bronze Coin to Event Token:Silver Coin to Event Token:Gold Coin to Event Token:Exit") ){ Case 1: if( !countitem(673) ){ mes "You didnt have enough Silver Coin."; close; }else{ mes "You have "+countitem(673)+" Silver Coin."; mes "How many Bronze Coin will be convert to Weedring Token ?"; input @Amount,0,countitem(673); if( !@Amount || (( .bronze * @Amount ) ) > 1000000000 ){ mes "Deal Cancelled."; }else{ delitem 673,@Amount * 10; mes "Converted "+@Amount * 10+" of Bronze Coin into Weedring Token."; mes "Gained Total of "+( .Rates * @Amount )+" of Zeny."; getitem 7539,@Amount; } } next; break; Case 2: if( !countitem(675) ){ mes "You didnt have enough Weedring Token."; }else{ mes "You have "+countitem(675)+" Weedring Token."; mes "How many Weedring Token will be convert to Archangeling Token ?"; input @Amount,0,countitem(675); if( !@Amount || (( .bronze * @Amount ) ) > 1000000000 ){ mes "Deal Cancelled."; }else{ delitem 675,@Amount * 5; mes "Converted "+@Amount * 10+" of Bronze Coin into Weedring Token."; mes "Gained Total of "+( .Rates * @Amount )+" of Zeny."; getitem 7539,@Amount; } } next; break; Case 3: if( !countitem(671) ){ mes "You didnt have enough Weedring Token."; }else{ mes "You have "+countitem(671)+" Weedring Token."; mes "How many Weedring Token will be convert to Archangeling Token ?"; input @Amount,0,countitem(671); if( !@Amount || (( .bronze * @Amount ) ) > 1000000000 ){ mes "Deal Cancelled."; }else{ delitem 671,@Amount; mes "Converted "+@Amount * 10+" of Bronze Coin into Weedring Token."; mes "Gained Total of "+( .Rates * @Amount )+" of Zeny."; getitem 7539,@Amount; } } next; break; Case 4: mes "Comeback if you change your mind"; close; } } close; }
u input or asked the npc to give you
Edited by EmistryPlease use codebox.
Link to comment
Share on other sites
2 answers to this question
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.