• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Request: Kill Monster & Create Portal

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
i want Kill Monster & Create Portal when the kill the boss monster its create a teleport and its come a text its say the teleport will be remove in 1min! if they have enter the teleport they have come to the next room if they doesnt enter the teleport removes and the boss monster come back! TFS 0.3.5
 
Last edited:
Code:
local config = {
    message = "You now have 60 seconds to exit this room through the teleport.",
    timeToRemove = 60, -- seconds
    teleportId = 1387,
    bosses = {
        ["Ushuriel"] = { x = 588, y = 1086, z = 7 },
        ["Annihilion"] = { x = 276, y = 1045, z = 6 },
        ["Hellgorak"] = { x = 169, y = 1047, z = 6 },
        ["Madareth"] = { x = 416, y = 1017, z = 6 },
        ["Zugurosh"] = { x = 424, y = 1119, z = 7 },
        ["Latrivan"] = { x = 46, y = 1109, z = 7}
    }
}

local function removal(position)
    position.stackpos = 1
    if getThingfromPos(position).itemid == config.teleportId then
        doRemoveItem(getThingfromPos(position).uid)
    end
    return TRUE
end

function onDeath(cid, corpse, killer)
    registerCreatureEvent(cid, "inquisitionPortals")
    local position = getCreaturePosition(cid)
    for name, pos in pairs(config.bosses) do
        if name == getCreatureName(cid) then
            teleport = doCreateTeleport(config.teleportId, pos, position)
            doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
            addEvent(removal, config.timeToRemove * 1000, position)
        end
    end
    return TRUE
end
 
Code:
local config = {
    message = "You now have 60 seconds to exit this room through the teleport.",
    timeToRemove = 60, -- seconds
    teleportId = 1387,
    bosses = {
        ["Ushuriel"] = { x = 588, y = 1086, z = 7 },
        ["Annihilion"] = { x = 276, y = 1045, z = 6 },
        ["Hellgorak"] = { x = 169, y = 1047, z = 6 },
        ["Madareth"] = { x = 416, y = 1017, z = 6 },
        ["Zugurosh"] = { x = 424, y = 1119, z = 7 },
        ["Latrivan"] = { x = 46, y = 1109, z = 7}
    }
}

local function removal(position)
    position.stackpos = 1
    if getThingfromPos(position).itemid == config.teleportId then
        doRemoveItem(getThingfromPos(position).uid)
    end
    return TRUE
end

function onDeath(cid, corpse, killer)
    registerCreatureEvent(cid, "inquisitionPortals")
    local position = getCreaturePosition(cid)
    for name, pos in pairs(config.bosses) do
        if name == getCreatureName(cid) then
            teleport = doCreateTeleport(config.teleportId, pos, position)
            doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
            addEvent(removal, config.timeToRemove * 1000, position)
        end
    end
    return TRUE
end

where will they get tped!
 
aha but can i get the action or what is it!'
<action uniqueid="7100" script="annilathor.lua" />
 
Back
Top