gyroguevarra Posted December 2, 2013 Posted December 2, 2013 you have 500ygg then in npc you got 5tcg (500ygg to 5tcg) thank you Quote
Echo Posted December 2, 2013 Posted December 2, 2013 (edited) sorry posted something I was working on and realized there was an error will try to fix it asap. Well I can't seem to find the break atm but this should atleast give you an idea of how to approach the issue... prontera,147,172,5 script Exchanger 47,{ set .@npcname$, "^0000FF[ Braggi ]^000000"; set .@item,607; //itemid to exchange for reward set .@reward,7227; //itemid for reward item set .@price, 100; //#of cost items to exchange per #rewards set .@numReward, 1; //#of reward items costtoreward will get you. //Checking #of items set .@count, countitem( .@item ); //End Prep mes .@npcname$; mes "Hello! I Will Exchange"; mes ""+getitemname( .@item )+" into "+getitemname( .@reward )+""; mes "You currently have "+.@count+""; if(.@count >= .@price ) { mes "How many "+getitemname( .@reward )+" will you trade for?"; input .@amount; if (.@count < (.@amount * .@price)){ mes .@npcname$; mes "I'm sorry but you do not have enough"; mes ""+getitemname( .@item )+" to convert into "+(.@numReward * .@amount)+" "+getitemname( .@reward )+"."; end; } else { delitem .@item,( .@amount * .@price ); getitem .@reward,( .@amount * .@numReward); mes "Have a nice day!"; } } close; } Fixed... Currently takes in the #of TCG cards you want good luck! Edited December 2, 2013 by Echo Quote
Echo Posted December 2, 2013 Posted December 2, 2013 (edited) Okat thankyou Sorry I used the wrong item ID for the TCG slot you will need to change the .@reward variable to the correct itemID! (in my test server it is showing up as Bossnia Entrance Ticket) Could just be a mistake on my side lol.... Edited December 2, 2013 by Echo Quote
Emistry Posted December 2, 2013 Posted December 2, 2013 if( countitem( 607 ) >= 500 ){ delitem 607,500; getitem 7227,1; } Quote
Question
gyroguevarra
you have 500ygg then in npc you got 5tcg (500ygg to 5tcg) thank you
4 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.