Siemka, mam problem za cholere nie chce mi usuwać przedmiotu pod X czasie :( Tworzy normalnie, ale usuwać już nie.
Kod:
local cfg = {
teleportPos = {x = 1037, y = 905, z = 7, stackpos=1}, -- where appear teleport
teleportToPos = {x = 1011, y = 886, z = 7}, -- position where send teleport.
gatepos = {x=1011, y = 902, z = 7, stackpos = 1},
min = 1, -- time minutes open.. 10 min and closee tp
max = 2,
}
function onTime()
if(os.date("%A") == "Sunday") then -- you can edit Saturday for: Monday , Tuesday ,etc
local item = getTileItemById(cfg.teleportPos, 3767)
if(item.uid ~= 0) then
doRemoveItem(item.uid)
doBroadcastMessage("blablal", MESSAGE_EVENT_ADVANCE)
addEvent(removeZombiesEventBlockEnterPosition, cfg.min * 60 * 1000, cid)
addEvent(doCreateItem, cfg.max * 60 * 1000, 1484, {x=1011, y = 902, z = 7, stackpos = 1})
end
return true
end
end
function removeZombiesEventBlockEnterPosition()
local item = getTileItemById({x=1011, y = 902, z = 7, stackpos = 1}, 1484)
if(item.uid ~= 0) then
doRemoveItem(item.uid)
end
end