1. if you use client without "browse field" feature you may try putting id 1548 on them
2. if you use TFS 1.x there is event player: onMoveItem() in data\events, enabling it and returning false in some cases should do the trick
search for 'something sparkling' put it on any item and it wont be movable in-game anymore
Pretty sure you can add a AID/UID to it to make it unmovable.
I dont want to put uniqueid on every item.
It looks nice tbh, at least from my povDidn't read, since I knew it was the answer. The way they want to do it is pure laziness.
If you add sparkly shit ontop of it then it just looks retarded.
if the item is "useable" like a rune/potion, you can move it by use it a few sqms away.. the character will pick up the item and walk to the position to move it. (unless you have a protection against this in sources)Pretty sure you can add a AID/UID to it to make it unmovable.
You can take it from browse field ;xsearch for 'something sparkling' put it on any item and it wont be movable in-game anymore
What does that mean? I dont really get it.You can take it from browse field ;x
If any item is under this item "something special" is movable when u look at it thru browse field.What does that mean? I dont really get it.
I've been using it for ages and no one was able to take anything.
Yes, this happened to me, the only sol i found is putting uid.If any item is under this item "something special" is movable when u look at it thru browse field.
function Player:onMoveItem(item, count, fromPosition, toPosition)
if item.actionid == 101 then
self:sendCancelMessage('You cannot move this object.')
return false
end
return true
end
<attribute key="moveable" value="0"/>
it does work, but you can trade the item i have tested it. is there a way to disable trade in items with this aid?For TFS 1.x
Search at you data\events\scripts\player.lua for function Player: onMoveItem(item, count, fromPosition, toPosition) change for the one bellow.
Code:function Player:onMoveItem(item, count, fromPosition, toPosition) if item.actionid == 101 then self:sendCancelMessage('You cannot move this object.') return false end return true end
Enable it <event class="Player" method="onBrowseField" enabled="1" /> at data\events\events.xml
Now just add actionid 101 to any item you don't want players to move. Notice that people could still hack it, they can use browse field to trade the item with other player, it will still be unable to be moved while inside the container though.
yes, there is onTradeRequest event, that you can use to prevent trading an itemit does work, but you can trade the item i have tested it. is there a way to disable trade in items with this aid?
isInRange
?data/scripts/example.lua
local protectedArea = {
from = Position(3197, 1807, 7),
to = Position(3198, 1811, 7)
}
local ec = EventCallback
function ec.onMoveItem(player, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
if fromPosition.x == CONTAINER_POSITION then
fromPosition = item:getTopParent():getPosition()
end
if fromPosition:isInRange(protectedArea.from, protectedArea.to) then
player:sendTextMessage(MESSAGE_INFO_DESCR, "iwi")
return false
end
return true
end
ec:register(-666)
-- Prevent that can be taken with trade
local ec = EventCallback
function ec.onTradeRequest(player, target, item)
local position
local topParent = item:getTopParent()
if not topParent then
position = item:getPosition()
elseif getmetatable(topParent) == Container then
position = topParent:getPosition()
end
if position and position:isInRange(protectedArea.from, protectedArea.to) then
player:sendTextMessage(MESSAGE_INFO_DESCR, "iwi")
return false
end
return true
end
ec:register(-666)