Need help in my Coin Trader NPC. even if I dont have the necessary required items in trading for Gold Coins to Cash Points it still gives mithril coins. here's my script
turbo_room,103,114,3 script Trader 874,{ mes "[Coin Trader]"; mes "Hello "+StrCharInfo(0)+"!"; mes "What would you like to do?";menu "Gold Coin to Cash Points",goldcoin, "Mithrill Coin to Zeny",coin, "Zeny to Mithril Coin",mithril; goldcoin: if(countitem(671) >= 1) { delitem 671,1; next; mes "[Sample]"; mes "Here is your item!"; atcommand "@cash 5"; close; }coin: if(countitem(674) >= 1) { delitem 674,1; next; mes "[Sample]"; mes "Here is your money!"; set Zeny,Zeny + 1000000000; close; }mithril: if(zenny = 1000000000) { getitem 674,1; next; mes "[Sample]"; mes "Here is your Mithril Coin!"; set Zeny,Zeny - 1000000000; close; } next; mes "[Coin Trader]"; mes "Sorry but you don't have the requirements to continue."; close; OnInit: waitingroom "Coin Trader",0;}
Need help in my Coin Trader NPC. even if I dont have the necessary required items in trading for Gold Coins to Cash Points it still gives mithril coins.
here's my script
turbo_room,103,114,3 script Trader 874,{ mes "[Coin Trader]"; mes "Hello "+StrCharInfo(0)+"!"; mes "What would you like to do?";menu "Gold Coin to Cash Points",goldcoin, "Mithrill Coin to Zeny",coin, "Zeny to Mithril Coin",mithril; goldcoin: if(countitem(671) >= 1) { delitem 671,1; next; mes "[Sample]"; mes "Here is your item!"; atcommand "@cash 5"; close; }coin: if(countitem(674) >= 1) { delitem 674,1; next; mes "[Sample]"; mes "Here is your money!"; set Zeny,Zeny + 1000000000; close; }mithril: if(zenny = 1000000000) { getitem 674,1; next; mes "[Sample]"; mes "Here is your Mithril Coin!"; set Zeny,Zeny - 1000000000; close; } next; mes "[Coin Trader]"; mes "Sorry but you don't have the requirements to continue."; close; OnInit: waitingroom "Coin Trader",0;}Edited by MumblesCodeboxed content.
Share this post
Link to post
Share on other sites