Hello,my scrip inquisition no work.what is the problem.in use tfs 0.3.2 crimdamson
thz for all
PHP:
local config = {
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear..",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Ushuriel"] = { { x = 33333, y = 31653, z = 12 }, { x=33269, y = 31643, z = 12, stackpos = 1 } },
["Annihilon"] = { { x = 33461, y = 31440, z = 13 }, { x = 33413, y = 31406, z = 13, stackpos = 1 } },
["Hellgorak"] = { { x = 33534, y = 31243, z = 10 }, { x = 33489, y = 31279, z = 10, stackpos = 1 } },
["Madareth"] = { { x = 33328, y = 31582, z = 12 }, { x = 33253, y = 31711, z = 12, stackpos = 1 } },
["Zugurosh"] = { { x = 33261, y = 31662, z = 12 }, { x = 33269, y = 31663, z = 12, stackpos = 1 } },
["Latrivan"] = { { x = 33203, y = 31296, z = 13 }, { x = 33246, y = 31690, z = 12, stackpos = 1 } }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onKill(cid, target)
local position = getCreaturePosition(target)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(target) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
end
end
return TRUE
end
thz for all