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!