E
Evil Puncker
Guest
For TFS 1.3, I would like to request the code of an item that when we 'used it with' any item and the item was on the table, it would automatically remove the item and set player balance to the price defined in the table, also it would remove the item charge, example:
pseudocode:
I hope I was not so confusing nor complicated lol
pseudocode:
LUA:
item_price_table {
["2195"] = 30000,
["23323"] = 50
}
function OnUse (player,item,target etc blahblah)
if target in table then remove and setplayerbalance item_price_table * amount then
item:removecharge(1)
player:sendmessage(you sold ".. item:getname("id from table") .." for ".. [2] .." gold coins)
return true
end
I hope I was not so confusing nor complicated lol