Here is a very simple script, was requested here http://otland.net/f16/item-not-able-trade-147036/, this basically don't let to trade an item, it is easy to configurate:
login.lua
you can add/remove the items who can't be traded in this line, of course, separating by commas :
note: if you are using tfs 0.3.6pl1 and the table itemsnoTrade has only one value you have to change the line:
for :
I hope you like it
Regards
Lua:
local itemsnoTrade = {2160}
function onTradeRequest(cid, target, item, targetItem)
if (isInArray(itemsnoTrade, item.itemid)) then
doPlayerSendCancel (cid, "You can't trade this item.")
return false
end
return true
end
XML:
<event type="traderequest" name="tradeRequest" event="script" value="trade.lua"/>
login.lua
Lua:
registerCreatureEvent(cid, "tradeRequest")
you can add/remove the items who can't be traded in this line, of course, separating by commas :
Lua:
local itemsnoTrade = {2160, 2148}
note: if you are using tfs 0.3.6pl1 and the table itemsnoTrade has only one value you have to change the line:
Lua:
if (isInArray(itemsnoTrade, item.itemid)) then
Lua:
if (isInArray(itemsnoTrade, item.itemid) or itemsnoTrade[1] == item.itemid) then
Regards
Last edited: