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

Error when opening doors doors green and blue djns

Jpstafe

Well-Known Member
Joined
Aug 8, 2011
Messages
507
Reaction score
68
Hello, good evening, I want to use the green djns and I can't get past the door to go buy the items, the quest is already activated, through djns scrolls
green.png
01:56 The door seems to be sealed against unwanted intruders.
How do I solve this error? The same thing also happens in blue djns
doors.lua:

Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local itemId = item:getId()   
    if table.contains(questDoors, itemId) then   
        if player:getStorageValue(item.actionid) ~= -1 then
            item:transform(itemId + 1)
            player:teleportTo(toPosition, true)
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
        end
        return true
    elseif table.contains(levelDoors, itemId) then   
        if item.actionid > 0 and player:getLevel() >= item.actionid - 1000 then
            item:transform(itemId + 1)
            player:teleportTo(toPosition, true)
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, "Only the worthy may pass.")
        end
        return true
    elseif table.contains(keys, itemId) then
        if target.actionid > 0 then
            if item.actionid == target.actionid and doors[target.itemid] then
                target:transform(doors[target.itemid])
                return true
            end
            player:sendTextMessage(MESSAGE_STATUS_SMALL, "The key does not match.")
            return true
        end
        return false
    end

    if table.contains(horizontalOpenDoors, itemId) or table.contains(verticalOpenDoors, itemId) then
        local doorCreature = Tile(toPosition):getTopCreature()
        if doorCreature then
            toPosition.x = toPosition.x + 1
            local query = Tile(toPosition):queryAdd(doorCreature, bit.bor(FLAG_IGNOREBLOCKCREATURE, FLAG_PATHFINDING))
            if query ~= RETURNVALUE_NOERROR then
                toPosition.x = toPosition.x - 1
                toPosition.y = toPosition.y + 1
                query = Tile(toPosition):queryAdd(doorCreature, bit.bor(FLAG_IGNOREBLOCKCREATURE, FLAG_PATHFINDING))
            end

            if query ~= RETURNVALUE_NOERROR then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(query))
                return true
            end

            doorCreature:teleportTo(toPosition, true)
        end

        if not table.contains(openSpecialDoors, itemId) then
            item:transform(itemId - 1)
        end
        return true
    end

    if doors[itemId] then
        if item.actionid == 0 then
            item:transform(doors[itemId])
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, "It is locked.")
        end
        return true
    end
    return false
end
 
Lua:
if table.contains(questDoors, itemId) then 
        if player:getStorageValue(item.actionid) ~= -1 then
            item:transform(itemId + 1)
            player:teleportTo(toPosition, true)
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
        end
        return true

Here we can see the error message, and we can see its executing the "else" statement, so therefore the storage value of the action ID[key] of the door is -1.... and therefore giving the "sealed against intruder" message.

Find out what storage value the mission completion gives, and make sure this matches the action id of the doors.
 
I would like to solve the door issue, because I have the green and blue scrolls.
I have already given you the solution.

The code is not the problem, your setup is....

If the mission that gives you door access, sets storage key 12345 to 1....
Then in the map editor, change the action id of the door to 12345....
 
I have already given you the solution.

The code is not the problem, your setup is....

If the mission that gives you door access, sets storage key 12345 to 1....
Then in the map editor, change the action id of the door to 12345....
I changed the Action ID of the door and it still doesn't work, is that the case or am I making a mistake? When I changed that id, I got an error on other doors...
baos de cachu.png
 
I changed the Action ID of the door and it still doesn't work, is that the case or am I making a mistake? When I changed that id, I got an error on other doors...
View attachment 82809
nono you misunderstood...

Im not telling you to set the action id of the door to 12345...it was just an example.

You need to find the djinn script that handles the missions, most likely an NPC (its been a long time since ive done the quest so i dont remember), and check which storage is set when they've completed the correct mission. You then change the action id of the door to whatever storage key its setting.
 
Back
Top