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

Solved Inquisiton Quest - HELP

arthurluna

Member
Joined
Apr 12, 2008
Messages
178
Reaction score
12
After the death of the bosses the player will have three minutes to enter the portal, after that a new boss will be created ... I'm not identify the boss's name can anyone help?
Code:
local bosses = {
    ["ushuriel"] =  {storage = 200, pos = {x = 33171, y = 31728, z = 11}},
    ["zugurosh"] =  {storage = 201, pos = {x = 33136, y = 31692, z = 11}},
    ["madareth"] =  {storage = 202, pos = {x = 33197, y = 31758, z = 11}},
    ["latrivan"] =  {storage = 203, pos = {x = 33228, y = 31728, z = 11}},
    ["golgordan"] = {storage = 203, pos = {x = 33236, y = 31728, z = 11}},
    ["annihilon"] = {storage = 204, pos = {x = 33197, y = 31690, z = 11}},
    ["hellgorak"] = {storage = 205, pos = {x = 33104, y = 31726, z = 11}}
}


function onKill(player, target)
    local targetMonster = target:getMonster()
    if not targetMonster then
        return true
    end

    local targetName = targetMonster:getName():lower()
    local bossStorage = bosses[targetName]
    if not bossStorage then
        return true
    end

    local newValue = 2
    if targetName == 'latrivan' or targetName == 'golgordan' then
        newValue = math.max(0, (Game.getStorageValue(bossStorage.storage) or -1)) + 1
    end
  
    Game.setStorageValue(bossStorage.storage, newValue)

    if newValue == 2 then
        player:say('You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room.', TALKTYPE_MONSTER_SAY)
        addEvent(Game.setStorageValue, 3 * 60 * 1000, bossStorage.storage, 0)
        addEvent(Game.createMonster, 1 * 1000, bossStorage, bossStorage.pos)
    end
    return true
end
 
Last edited by a moderator:
Back
Top