• 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!

Boss Room

The Mapper

Just Imagine
Joined
Jul 22, 2009
Messages
182
Reaction score
2
Hey everyone, I was wondering if anyone could help me to find a boss room script.

I need the script to work as the player enters a room a boss is summoned and until he beats it a teleport will appear to a chest room.
 
You mean something like this? (creaturescript)

LUA:
local tpId = 1387
local tps = {
                ["Orshabaal"] = {pos = {x=970, y=1194, z=9}, toPos = {x=970, y=1194, z=10}, time = 60},
}

function removeTp(tp)
        local t = getTileItemById(tp.pos, tpId)
        if t then
                doRemoveItem(t.uid, 1)
                doSendMagicEffect(tp.pos, CONST_ME_POFF)
        end
end

function onDeath(cid)
        local tp = tps[getCreatureName(cid)]
        if tp then
                doCreateTeleport(tpId, tp.toPos, tp.pos)
                doCreatureSay(cid, "Run before the teleport disappears in "..tp.time.." seconds.", TALKTYPE_ORANGE_1)
                addEvent(removeTp, tp.time*1000, tp)
        end
        return TRUE
end
 
You mean something like this? (creaturescript)

LUA:
local tpId = 1387
local tps = {
                ["Orshabaal"] = {pos = {x=970, y=1194, z=9}, toPos = {x=970, y=1194, z=10}, time = 60},
}

function removeTp(tp)
        local t = getTileItemById(tp.pos, tpId)
        if t then
                doRemoveItem(t.uid, 1)
                doSendMagicEffect(tp.pos, CONST_ME_POFF)
        end
end

function onDeath(cid)
        local tp = tps[getCreatureName(cid)]
        if tp then
                doCreateTeleport(tpId, tp.toPos, tp.pos)
                doCreatureSay(cid, "Run before the teleport disappears in "..tp.time.." seconds.", TALKTYPE_ORANGE_1)
                addEvent(removeTp, tp.time*1000, tp)
        end
        return TRUE
end
does it work?
 
If you have problems with a script post the problems/errors, how you added it and your server version.
Since the monster is the one dieing (so cid is the monster), register it in the monster file (so not in login.lua).
Code:
<script>
     <event name="Name"/>
</script
 
Back
Top