Everything is working but the last part of creating the wall, no error but nothing happens
Lua:
local function back(params)
doCreatItem(params.wallid, 1, params.wallpos)
doTransformItem(params.laver, item.itemid - 1)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local corpsePos = {x=1108, y=1217, z=5, stackpos=1}
local corpse = getThingFromPos(corpsePos)
local corpseId = 5527
local wallPos = {x=1110, y=1217, z=5, stackpos=1}
local wall = getThingFromPos(wallPos)
local wallId = 9119
local time = 120
if (item.itemid == 1945 and corpse.itemid == corpseId and wall.itemid == wallId) then
doRemoveItem(corpse.uid, 1)
doRemoveItem(wall.uid, 1)
doTransformItem(item.uid, item.itemid + 1)
addEvent(doRemoveTeleport, time * 60 * 1000)
elseif (item.itemid == 1946) then
doTransformItem(item.uid, item.itemid - 1)
end
return true
end
function doRemoveTeleport()
doCreateItem(9119, 1, wallPos)
end