• 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!

Closed!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
Closed Theard!
 
Last edited:
How do you mean?

I want a script there i put a item id which block the right click trade with.
 
i want like this: if the item dont have the attribute its not trade able! the trade with will be blocked!
 
so just onTradeAccept check if id of item or any item in container have blocked id and return false I guess
but better do it in source, container loops can cause slowdowns and even crashes when someone wants to abuse them
 
LUA:
function onTradeRequest(cid, target, item)
local cfg = {
	items = {itemid, itemid, itemid}
	}

 if isInArray (cfg.items, item.itemid) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You are not allowed to trade this item")
	return false
end
return true
end
If you want to make it like walls then you will need a custom client cause you will have to edit the tibia.dat
 
Back
Top