Wusse
Member
- Joined
- Oct 3, 2023
- Messages
- 48
- Reaction score
- 12
Hey!
Using TFS 1.4.2 10.98
i came across this thread (Lua - Block item throw to specified tile (https://otland.net/threads/block-item-throw-to-specified-tile.277995/#post-2672662))
and im trying to use the second example Sarah mentions.
this is how my script looks like:
this is my events.xml:
gyazo.com
ive tried it but it doesnt seem to work for me and i dont really understand why, if someone could shed some light into this problem id appreciate it!
GIF showing the problem:
gyazo.com
Using TFS 1.4.2 10.98
i came across this thread (Lua - Block item throw to specified tile (https://otland.net/threads/block-item-throw-to-specified-tile.277995/#post-2672662))
and im trying to use the second example Sarah mentions.
this is how my script looks like:
Lua:
local ids = {9999}
local ec = EventCallback
function ec.onMoveItem(player, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
local tile = Tile(toPosition)
if tile then
for _, i in pairs(tile:getItems()) do
if i:getActionId() == ids then
return false
end
end
end
return true
end
ec:register(-1)
this is my events.xml:
![gyazo.com](/proxy.php?image=https%3A%2F%2Fi.gyazo.com%2Fthumb%2F1200%2F059926984cb2e96eb93636737a225936-png.jpg&hash=dd917ed0158d7f77af2bac941a148a7b&return_error=1)
Gyazo
ive tried it but it doesnt seem to work for me and i dont really understand why, if someone could shed some light into this problem id appreciate it!
GIF showing the problem:
![gyazo.com](/proxy.php?image=https%3A%2F%2Fi.gyazo.com%2Fthumb%2F1200%2F8750e36b329a91e9ae023a506eb05801-gif.gif&hash=0d7d1c1a837d3f92aa457d3a2f662f1b&return_error=1)