I have this code and I want to use it for each Inqui Boss, but it only works with Ushuriel, I don't know what's the problem, also if someone can post me a link on how to use player storage/sealed doors that would be great.
Lua:
function onKill(cid, target)
local m = {
["Ushuriel"] = {
message = "Escape through the teleport quickly before it closes!",
cfg = {
{
time = 60, -- Seconds until tp closes.
to = { x = 33070, y = 31787, z = 13 }, -- Where the tp takes you.
tp = { x = 33175, y = 31728, z = 11 } -- Where the tp creates.
},
}
}
}
if isPlayer(target) then
return true
end
local monster = m[getCreatureName(target)]
if monster then
for i = 1, #monster.cfg do
local c = monster.cfg[i]
local function deleteTeleport()
local teleport = getTileItemById(c.tp, 1387).uid
if(teleport > 0) then
doRemoveItem(teleport)
doSendMagicEffect(c.tp, CONST_ME_POFF)
end
return true
end
doCreateTeleport(1387, c.to, c.tp)
doSendMagicEffect(c.tp, CONST_ME_ENERGYAREA)
addEvent(deleteTeleport, c.time * 1000)
end
doCreatureSay(cid, monster.message, TALKTYPE_ORANGE_1)
end
return true
end