Hello everyone, I made script that remove statue, sommon monster on same position and create statue back after x seconds, but it doesn't want to summon this statue back :/ I've got msg:
This is my script:
Any ideas?
Code:
[CODE]Lua Script Error: [MoveEvents Interface]
in a timer event called from:
data/movements/scripts/undeadstatue.lua:onStepIn
luaDoCreateItem(). Tile not found
This is my script:
Code:
function onStepIn(cid, item, position, fromPosition)
local statuepos = {x=1024 , y=1020 , z=7, stackpos=1}
local monster = "Rat"
local statueid = 3699
local delay = 10
local statue = getThingfromPos(statuepos)
if statue.itemid ~= 0 then
doRemoveItem(statue.uid, 1)
doSummonCreature(monster, statuepos)
addEvent(doCreateItem, delay * 1000, {statueid, 1, statuepos})
end
return TRUE
end
Any ideas?