• 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 Gate of expertise High Exp

Luka Trklja

Member
Joined
Jul 8, 2016
Messages
121
Solutions
5
Reaction score
8
Location
Croatia
How to make gate of expertise for high lvls? I know what to make for like lvl under 1000, if its 100 level then AID 1100, but what about high exp level for example 150k?

Thanks a lot in advance!
 
In map editor, give the gate of experience door a unique ID (that is unique/not used by anything else). Etc 53073
Then in data/movements/scripts/level_door.lua, replace with this:

Lua:
function onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return false
    end

    -- Start custom level door
    local uniqueId = 53073
    local level = 150000
    if item:getUniqueId() == uniqueId then
        if creature:getLevel() < level then
            creature:sendTextMessage(MESSAGE_INFO_DESCR, "Only the worthy may pass.")
            creature:teleportTo(fromPosition, true)
            return false
        else
            return true
        end
    end
    -- End custom level door

    if creature:getLevel() < item.actionid - 1000 then
        creature:sendTextMessage(MESSAGE_INFO_DESCR, "Only the worthy may pass.")
        creature:teleportTo(fromPosition, true)
        return false
    end
    return true
end

Or if this script is not the default one, add this below the first condition that verifies that it is a player that is passing through:
Lua:
-- Start custom level door
local uniqueId = 53073
local level = 150000
if item:getUniqueId() == uniqueId then
    if creature:getLevel() < level then
        creature:sendTextMessage(MESSAGE_INFO_DESCR, "Only the worthy may pass.")
        creature:teleportTo(fromPosition, true)
        return false
    else
        return true
    end
end
-- End custom level door

And restart the server.
 
Last edited by a moderator:
Back
Top