• 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 doors and doors level

Jpstafe

Well-Known Member
Joined
Aug 8, 2011
Messages
507
Reaction score
68
Hello Otland community, I have a door error, when I want to set the price of the houses I get "21:00 You see a closed door." Before, the description of the house and the price appeared, I don't know why not now, on the level doors it doesn't even let me open them and I can't even see the description of the door? why is this? because it was working perfectly, I haven't touched anything
In the map editor I get the houses, with their respective IDs and prices...
I am using tfs 1.2 8.0

02.png

01.png
03.png
 
Maybe the problem is in script, not in map.

Have you changed any script in your otserver?
 
XML:
        <!-- Doors -->

    <action fromid="1228" toid="1227" script="other/doors.lua" />
    <action fromid="1209" toid="1214" script="other/doors.lua" />
    <action fromid="1229" toid="1262" script="other/doors.lua" />
    <action fromid="1219" toid="1227" script="other/doors.lua" />
    <action fromid="1539" toid="1542" script="other/doors.lua" />
    <action itemid="2092" script="other/doors.lua" />
    <action fromid="2086" toid="2089" script="other/doors.lua" />
    <action fromid="3535" toid="3552" script="other/doors.lua" />
    <action fromid="4913" toid="4918" script="other/doors.lua" />
    <action fromid="5082" toid="5085" script="other/doors.lua" />
    <action fromid="5098" toid="5145" script="other/doors.lua" />
    <action fromid="5278" toid="5295" script="other/doors.lua" />
    <action fromid="5515" toid="5518" script="other/doors.lua" />
    <action fromid="5732" toid="5737" script="other/doors.lua" />
    <action fromid="5745" toid="5749" script="other/doors.lua" />
    <action fromid="6192" toid="6209" script="other/doors.lua" />
    <action fromid="6249" toid="6266" script="other/doors.lua" />
    <action fromid="6795" toid="6802" script="other/doors.lua" />
    <action fromid="6891" toid="6908" script="other/doors.lua" />
    <action fromid="7033" toid="7050" script="other/doors.lua" />
    <action fromid="7054" toid="7057" script="other/doors.lua" />
    <action fromid="8541" toid="8558" script="other/doors.lua" />
    <action fromid="9165" toid="9184" script="other/doors.lua" />
    <action fromid="9267" toid="9284" script="other/doors.lua" />
    <action itemid="10032" script="other/doors.lua" />
    <action fromid="10268" toid="10285" script="other/doors.lua" />
    <action fromid="10468" toid="10486" script="other/doors.lua" />
    <action fromid="10775" toid="10777" script="other/doors.lua" />
    <action fromid="10780" toid="10786" script="other/doors.lua" />
    <action fromid="10789" toid="10792" script="other/doors.lua" />
    <action fromid="12092" toid="12105" script="other/doors.lua" />
    <action fromid="12188" toid="12190" script="other/doors.lua" />
    <action fromid="12193" toid="12199" script="other/doors.lua" />
    <action fromid="12202" toid="12205" script="other/doors.lua" />
    <action fromid="19840" toid="19857" script="other/doors.lua" />
    <action fromid="19980" toid="19997" script="other/doors.lua" />
    <action fromid="20273" toid="20290" script="other/doors.lua" />
    <action fromid="17235" toid="17238" script="other/doors.lua" />
    <action fromid="18208" toid="18209" script="other/doors.lua" />
    <action fromid="13020" toid="13023" script="other/doors.lua" />
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey) --agregado doors 7.4
    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(verticalOpenDoors, itemId) then
        local doorCreature = Tile(toPosition):getTopCreature()
        if doorCreature then
            toPosition.x = toPosition.x + 1
            doorCreature:teleportTo(toPosition, true)
        end

        if not table.contains(openSpecialDoors, itemId) then
            item:transform(itemId - 1)
        end
        return true
    end
 
            if table.contains(horizontalOpenDoors, itemId) then
        local doorCreature = Tile(toPosition):getTopCreature()
        if doorCreature then
            toPosition.y = toPosition.y + 1
            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
Make sure your house doors have door Id 1
 
XML:
        <!-- Doors -->

    <action fromid="1228" toid="1227" script="other/doors.lua" />
    <action fromid="1209" toid="1214" script="other/doors.lua" />
    <action fromid="1229" toid="1262" script="other/doors.lua" />
    <action fromid="1219" toid="1227" script="other/doors.lua" />
    <action fromid="1539" toid="1542" script="other/doors.lua" />
    <action itemid="2092" script="other/doors.lua" />
    <action fromid="2086" toid="2089" script="other/doors.lua" />
    <action fromid="3535" toid="3552" script="other/doors.lua" />
    <action fromid="4913" toid="4918" script="other/doors.lua" />
    <action fromid="5082" toid="5085" script="other/doors.lua" />
    <action fromid="5098" toid="5145" script="other/doors.lua" />
    <action fromid="5278" toid="5295" script="other/doors.lua" />
    <action fromid="5515" toid="5518" script="other/doors.lua" />
    <action fromid="5732" toid="5737" script="other/doors.lua" />
    <action fromid="5745" toid="5749" script="other/doors.lua" />
    <action fromid="6192" toid="6209" script="other/doors.lua" />
    <action fromid="6249" toid="6266" script="other/doors.lua" />
    <action fromid="6795" toid="6802" script="other/doors.lua" />
    <action fromid="6891" toid="6908" script="other/doors.lua" />
    <action fromid="7033" toid="7050" script="other/doors.lua" />
    <action fromid="7054" toid="7057" script="other/doors.lua" />
    <action fromid="8541" toid="8558" script="other/doors.lua" />
    <action fromid="9165" toid="9184" script="other/doors.lua" />
    <action fromid="9267" toid="9284" script="other/doors.lua" />
    <action itemid="10032" script="other/doors.lua" />
    <action fromid="10268" toid="10285" script="other/doors.lua" />
    <action fromid="10468" toid="10486" script="other/doors.lua" />
    <action fromid="10775" toid="10777" script="other/doors.lua" />
    <action fromid="10780" toid="10786" script="other/doors.lua" />
    <action fromid="10789" toid="10792" script="other/doors.lua" />
    <action fromid="12092" toid="12105" script="other/doors.lua" />
    <action fromid="12188" toid="12190" script="other/doors.lua" />
    <action fromid="12193" toid="12199" script="other/doors.lua" />
    <action fromid="12202" toid="12205" script="other/doors.lua" />
    <action fromid="19840" toid="19857" script="other/doors.lua" />
    <action fromid="19980" toid="19997" script="other/doors.lua" />
    <action fromid="20273" toid="20290" script="other/doors.lua" />
    <action fromid="17235" toid="17238" script="other/doors.lua" />
    <action fromid="18208" toid="18209" script="other/doors.lua" />
    <action fromid="13020" toid="13023" script="other/doors.lua" />
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey) --agregado doors 7.4
    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(verticalOpenDoors, itemId) then
        local doorCreature = Tile(toPosition):getTopCreature()
        if doorCreature then
            toPosition.x = toPosition.x + 1
            doorCreature:teleportTo(toPosition, true)
        end

        if not table.contains(openSpecialDoors, itemId) then
            item:transform(itemId - 1)
        end
        return true
    end
 
            if table.contains(horizontalOpenDoors, itemId) then
        local doorCreature = Tile(toPosition):getTopCreature()
        if doorCreature then
            toPosition.y = toPosition.y + 1
            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
Make sure your house doors have door Id 1
in action id it says 0, do I have to put 1 there? Or do I have to put the id that marks the houses in Carlin as the mark on the shirt, in this case that house has the id 280, what do I put in id 280 or 1?
 

Attachments

Back
Top