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

Sealed Doors TFS 1.0

Kristoffer

Web designer
Joined
Apr 15, 2009
Messages
83
Reaction score
3
Location
Norway
Hello,

It seems like i can't open these kind of doors:
Door_%28Sealed%29.gif


Some of the doors do neither say "The door seems to be sealed against unwanted intruders."
I cannot open any of this doors, neither the annihilator door, yalahari, farmine, all of them sealed doors.

Doors.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isInArray(questDoors, item.itemid) == TRUE then
        if getPlayerStorageValue(cid, item.actionid) ~= -1 then
            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
        end
        return TRUE
    elseif isInArray(levelDoors, item.itemid) == TRUE then
        if item.actionid > 0 and getPlayerLevel(cid) >= item.actionid - 1000 then
            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
        end
        return TRUE
    elseif isInArray(keys, item.itemid) == TRUE then
        if itemEx.actionid > 0 then
            if item.actionid == itemEx.actionid then
                if doors[itemEx.itemid] ~= nil then
                    doTransformItem(itemEx.uid, doors[itemEx.itemid])
                    return TRUE
                end
            end
            doPlayerSendCancel(cid, "The key does not match.")
            return TRUE
        end
        return FALSE
    elseif isInArray(horizontalOpenDoors, item.itemid) == TRUE then
        local newPosition = toPosition
        newPosition.y = newPosition.y + 1
        local doorPosition = fromPosition
        doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        local doorCreature = getThingfromPos(doorPosition)
        if doorCreature.itemid ~= 0 then
            if getTilePzInfo(doorPosition) == TRUE and getTilePzInfo(newPosition) == FALSE and doorCreature.uid ~= cid then
                doPlayerSendCancel(cid, "Sorry, not possible.")
            else
                doTeleportThing(doorCreature.uid, newPosition, TRUE)
                if isInArray(openSpecialDoors, item.itemid) ~= TRUE then
                    doTransformItem(item.uid, item.itemid - 1)
                end
            end
            return TRUE
        end
        doTransformItem(item.uid, item.itemid - 1)
        return TRUE
    elseif isInArray(verticalOpenDoors, item.itemid) == TRUE then
        local newPosition = toPosition
        newPosition.x = newPosition.x + 1
        local doorPosition = fromPosition
        doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        local doorCreature = getThingfromPos(doorPosition)
        if doorCreature.itemid ~= 0 then
            if getTilePzInfo(doorPosition) == TRUE and getTilePzInfo(newPosition) == FALSE and doorCreature.uid ~= cid then
                doPlayerSendCancel(cid, "Sorry, not possible.")
            else
                doTeleportThing(doorCreature.uid, newPosition, TRUE)
                if isInArray(openSpecialDoors, item.itemid) ~= TRUE then
                    doTransformItem(item.uid, item.itemid - 1)
                end
            end
            return TRUE
        end
        doTransformItem(item.uid, item.itemid - 1)
        return TRUE
    elseif doors[item.itemid] ~= nil then
        if item.actionid == 0 then
            doTransformItem(item.uid, doors[item.itemid])
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
        end
        return TRUE
    end
    return FALSE
end

Actions.xml
Code:
    <action fromid="1209" toid="1214" script="other/doors.lua"/>
    <action fromid="1219" toid="1262" script="other/doors.lua"/>
    <action fromid="1539" toid="1542" script="other/doors.lua"/>
    <action fromid="2086" toid="2092" 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" />
    <action fromid="14755" toid="14760" script="other/hive_doors1.lua" />
    <action fromid="14767" toid="14771" script="other/hive_doors2.lua" />

Do anybody know how to fix this problem?
 
actionid = storage needed to open them
storage value must be 1
when I write questlines I use separate storage just for access - for these doors
 
How do you want them to work or do people have the storage you added as actionid in the doors?
Those doors are questdoors and open when people have the storage (the actionid you add will be the storage).
The value of the storage doesn't matter, as long as it's not -1 (this is when people don't have the storage).

If some of the quest doors don't give this message, look if they are added in actions.xml and in global.lua in the table questDoors.
 
Both the quest doors and the gate of expertise doors (level doors) only open when people have the requirements to open them.

You can use the normal doors if you want people to always be able to open them.
juNoDT.png
 
You can do that with addEvent to transform it back after a certain time.
Do you want this for 1 door or more doors? If it's for more doors, which doors and which actionid?
 
Code:
local function doCloseDoor(pos, old, new)
     if getTileItemById(pos, new).uid > 0 then
         doTransformItem(getTileItemById(pos, new).uid, old)
     end
     return true
end

addEvent(doCloseDoor, 10 * 1000, toPosition, item.itemid, item.itemid + 1)
 
Back
Top