Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,623
- Solutions
- 6
- Reaction score
- 539
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello OTLanders!
I'm having a little problem... when I step on the tile, create the helmet but don't remove the pieces.
What I need to change on script?
Thanks!
I'm having a little problem... when I step on the tile, create the helmet but don't remove the pieces.
What I need to change on script?
Code:
local pos = {x=33198, y=32876, z=11, stackpos=2}
function onStepIn(cid, item, position)
if isPlayer(cid) == TRUE then
local it = {}
for i = 2335, 2341 do
local _i = getTileItemById(pos, i).uid
if _i > 0 then it[i] = _i else return end
end
for _, v in ipairs(it) do
doRemoveItem(v)
end
doCreateItem(2342, 1, pos)
doSendMagicEffect(pos, CONST_ME_FIREAREA)
end
end
Thanks!