• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Simple request, seller item

  • Thread starter Thread starter Evil Puncker
  • Start date Start date
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:

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
 
Solution
I just tested this one for TFS 1.3 and it works, Try it.
I just tested this one for TFS 1.3 and it works, Try it.
 
Solution
Back
Top