I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).
I'm looking for a way to transform my ground tile back with a delay of 5 minutes.
already tried a couple transformback's like in the script above but all keep giving errors comparable to the one below.
I'm looking for a way to transform my ground tile back with a delay of 5 minutes.
Code:
local monsters = {
{name = "bandit1", pos = {x = 827, y = 984, z = 5}},
{name = "bandit2", pos = {x = 826, y = 986, z = 5}},
{name = "bandit3", pos = {x = 829, y = 986, z = 5}},
{name = "bandit4", pos = {x = 830, y = 983, z = 5}},
{name = "bandit5", pos = {x = 830, y = 987, z = 5}}
}
local pos = {x = 829, y = 986, z = 5, stackpos = 253}
function onStepIn(cid, item, position, fromPosition)
local function doTransformBack(pos, itemid, transformid)
return doTransformItem(getTileItemById(pos, transformid).uid, itemid)
end
if isPlayer(cid) == TRUE then
for m = 1, #monsters do
doSummonCreature(monsters[m].name, monsters[m].pos)
end
doTransformItem(getTileItemById({x = 827, y = 988, z = 5}, 9067).uid, 4339)
doTransformItem(getTileItemById({x = 828, y = 988, z = 5}, 9067).uid, 4339)
doTransformItem(getTileItemById({x = 829, y = 988, z = 5}, 9067).uid, 4339)
doTransformItem(getTileItemById({x = 830, y = 988, z = 5}, 9067).uid, 4339)
addEvent(doTransformBack, 1*10*1000, {x = 827, y = 988, z = 5}, 4339, 9067)
if getPlayerSex(cid) == 0 then
doCreatureSay(getThingfromPos(pos).uid, "Boys, get her!", TALKTYPE_ORANGE_1)
else
doCreatureSay(getThingfromPos(pos).uid, "Boys, get him!", TALKTYPE_ORANGE_1)
end
end
return true
end
already tried a couple transformback's like in the script above but all keep giving errors comparable to the one below.
Code:
[12/09/2014 11:16:56] Lua Script Error: [MoveEvents Interface]
[12/09/2014 11:16:56] in a timer event called from:
[12/09/2014 11:16:56] data/movements/scripts/others/Bandit Camp.lua:onStepIn
[12/09/2014 11:16:56] luaDoTransformItem(). Item not found