• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Gate of Expertise, not working

Zt0ffe

New Member
Joined
Sep 26, 2008
Messages
341
Reaction score
4
Location
Sweden
Hello!

Iam having doors not working as intended.


This is the settings in Items.xml for the door not working

Code:
  <item id="12165" article="a" name="gate of expertise">
    <attribute key="type" value="door" />
    <attribute key="levelDoor" value="1000" />
    <attribute key="blockprojectile" value="1" />
    <attribute key="transformUseTo" value="12166"/>
  </item>
    <item id="12166" article="a" name="gate of expertise">
        <attribute key="type" value="door"/>
        <attribute key="closingDoor" value="1"/>
        <attribute key="transformUseTo" value="12165"/>
    </item>


18:48 You see a gate of expertise for level 50.
ItemID: [12165], ActionID: [1050].
TransformTo: [12166] (onUse).
Position: [X: 33080] [Y: 31215] [Z: 7].


Anyone can open the door and its NOT dragging you into its position when you click on it(Like a normal gate of expertise). It just opens and stays that in open position until you close it again. (It just function as a regular door..)

Really need help.



Thanks in advance!
 
Last edited:
Post your doors.lua or you can use the doors.lua from TFS 0.3.6.
data/actions/scripts/other/doors.lua
Code:
local function checkStackpos(item, position)
   position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
   local thing = getThingFromPos(position)

   position.stackpos = STACKPOS_TOP_FIELD
   local field = getThingFromPos(position)

   return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
end

local function doorEnter(cid, item, toPosition)
   doTransformItem(item.uid, item.itemid + 1)
   doTeleportThing(cid, toPosition)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
   if(fromPosition.x ~= CONTAINER_POSITION and isPlayerPzLocked(cid) and getTileInfo(fromPosition).protection) then
     doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
     return true
   end

   if(getItemLevelDoor(item.itemid) > 0) then
     if(item.actionid == 189) then
       if(not isPremium(cid)) then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
         return true
       end

       doorEnter(cid, item, toPosition)
       return true
     end

     local gender = item.actionid - 186
     if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then
       if(gender ~= getPlayerSex(cid)) then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
         return true
       end

       doorEnter(cid, item, toPosition)
       return true
     end

     local skull = item.actionid - 180
     if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then
       if(skull ~= getCreatureSkullType(cid)) then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
         return true
       end

       doorEnter(cid, item, toPosition)
       return true
     end

     local group = item.actionid - 150
     if(group >= 0 and group < 30) then
       if(group > getPlayerGroupId(cid)) then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
         return true
       end

       doorEnter(cid, item, toPosition)
       return true
     end

     local vocation = item.actionid - 100
     if(vocation >= 0 and vocation < 50) then
       local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
       if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
         return true
       end

       doorEnter(cid, item, toPosition)
       return true
     end

     if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
       doorEnter(cid, item, toPosition)
     else
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
     end

     return true
   end

   if(isInArray(specialDoors, item.itemid)) then
     if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then
       doorEnter(cid, item, toPosition)
     else
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
     end

     return true
   end

   if(isInArray(keys, item.itemid)) then
     if(itemEx.actionid > 0) then
       if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
         doTransformItem(itemEx.uid, doors[itemEx.itemid])
         return true
       end

       doPlayerSendCancel(cid, "The key does not match.")
       return true
     end

     return false
   end

   if(isInArray(horizontalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) 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
       local pzDoorPosition = getTileInfo(doorPosition).protection
       local pzNewPosition = getTileInfo(newPosition).protection
       if((pzDoorPosition and not pzNewPosition and doorCreature.uid ~= cid) or
         (not pzDoorPosition and pzNewPosition and doorCreature.uid == cid and isPlayerPzLocked(cid))) then
         doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
       else
         doTeleportThing(doorCreature.uid, newPosition)
         if(not isInArray(closingDoors, item.itemid)) then
           doTransformItem(item.uid, item.itemid - 1)
         end
       end

       return true
     end

     doTransformItem(item.uid, item.itemid - 1)
     return true
   end

   if(isInArray(verticalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) 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(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
         doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
       else
         doTeleportThing(doorCreature.uid, newPosition)
         if(not isInArray(closingDoors, item.itemid)) then
           doTransformItem(item.uid, item.itemid - 1)
         end
       end

       return true
     end

     doTransformItem(item.uid, item.itemid - 1)
     return true
   end

   if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) 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

In data/lib/000-constant.lua
Code:
doors = {[1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236, [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542, [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918, [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111, [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139, [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283, [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194, [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254, [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895, [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046, [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167, [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272, [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472, [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470, [10774] = 10776, [10775] = 10776, [10779] = 10780, [10781] = 10782, [10783] = 10785, [10784] = 10785, [10788] = 10789, [10790] = 10791}
closingDoors = {1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133, 5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558, 9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10780, 10782, 10789, 10791}
verticalOpenDoors = {1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131, 5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044, 7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10483, 10485, 10789, 10791}
horizontalOpenDoors = {1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118, 5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893, 6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285, 10470, 10472, 10474, 10476, 10780, 10782}
specialDoors = {1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049, 8551, 8553, 9175, 9177, 9277, 9279, 10278, 10280, 10475, 10484, 10781, 10790}
keys = {2086, 2087, 2088, 2089, 2090, 2091, 2092, 10032, 10091}
 
doors.png






I added 12157, 12166 to data/lib/000-constant.lua and it still dont work :/

Code:
doors = {[1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236, [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542, [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918, [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111, [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139, [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283, [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194, [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254, [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895, [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046, [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167, [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272, [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472, [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470, [10774] = 10776, [10775] = 10776, [10779] = 10780, [10781] = 10782, [10783] = 10785, [10784] = 10785, [10788] = 10789, [10790] = 10791}
closingDoors = {1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133, 5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558, 9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10780, 10782, 10789, 10791, 12157, 12166}
verticalOpenDoors = {1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131, 5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044, 7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10483, 10485, 10789, 10791, 12166}
horizontalOpenDoors = {1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118, 5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893, 6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285, 10470, 10472, 10474, 10476, 10780, 10782, 12157}
specialDoors = {1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049, 8551, 8553, 9175, 9177, 9277, 9279, 10278, 10280, 10475, 10484, 10781, 10790}
keys = {2086, 2087, 2088, 2089, 2090, 2091, 2092, 10032, 10091}
 
And this is my actions/scripts/other/doors.lua

Code:
local function checkStackpos(item, position)
    position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
    local thing = getThingFromPos(position)

    position.stackpos = STACKPOS_TOP_FIELD
    local field = getThingFromPos(position)

    return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(getItemLevelDoor(item.itemid) > 0) then
        if(item.actionid == 189) then
            if(isPremium(cid) ~= TRUE) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                return TRUE
            end

            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
            return TRUE
        end

        local gender = item.actionid - 186
        if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender) == TRUE) then
            local playerGender = getPlayerSex(cid)
            if(playerGender ~= gender) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                return TRUE
            end

            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
            return TRUE
        end

        local skull = item.actionid - 180
        if(skull >= 0 and skull < 6) then
            local playerSkull = getCreatureSkullType(cid)
            if(playerSkull ~= skull) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                return TRUE
            end

            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
            return TRUE
        end

        local group = item.actionid - 150
        if(group >= 0 and group < 30) then
            local playerGroup = getPlayerGroupId(cid)
            if(playerGroup < group) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                return TRUE
            end

            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
            return TRUE
        end

        local vocation = item.actionid - 100
        if(vocation >= 0 and vocation < 50) then
            local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
            if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                return TRUE
            end

            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
            return TRUE
        end

        if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) 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
    end

    if(isInArray(specialDoors, item.itemid) == TRUE) then
        if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) 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
    end

    if(isInArray(keys, item.itemid) == TRUE) then
        if(itemEx.actionid > 0) then
            if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
                doTransformItem(itemEx.uid, doors[itemEx.itemid])
                return TRUE
            end

            doPlayerSendCancel(cid, "The key does not match.")
            return TRUE
        end

        return FALSE
    end

    if(isInArray(horizontalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition)) 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(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
                doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
            else
                doTeleportThing(doorCreature.uid, newPosition, TRUE)
                if(isInArray(closingDoors, item.itemid) ~= TRUE) then
                    doTransformItem(item.uid, item.itemid - 1)
                end
            end

            return TRUE
        end

        doTransformItem(item.uid, item.itemid - 1)
        return TRUE
    end

    if(isInArray(verticalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition)) 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(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
                doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
            else
                doTeleportThing(doorCreature.uid, newPosition, TRUE)
                if(isInArray(closingDoors, item.itemid) ~= TRUE) then
                    doTransformItem(item.uid, item.itemid - 1)
                end
            end

            return TRUE
        end

        doTransformItem(item.uid, item.itemid - 1)
        return TRUE
    end

    if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) 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
 
Can you explain what happens? You open the door, then you get teleported to the position of the door, and how do you get stuck in the door in the last picture? Is this when you step out the door?
 
When i am opening door, it opens like normal. You still standing 1 sqr from it.

Then you can go past it like normal. If you close the door standing in the doorway picture 3 happens, u wont get pushed at all with the door.
 
Try to remove the attribute lines with transformUseTo from the door in items.xml.
Code:
<attribute key="transformUseTo" value="12166"/>
<attribute key="transformUseTo" value="12165"/>
 
Try to remove the attribute lines with transformUseTo from the door in items.xml.
Code:
<attribute key="transformUseTo" value="12166"/>
<attribute key="transformUseTo" value="12165"/>

I removed it and they behavied exactly the same.

Edit; When I did this i cannot open the door.

Code:
  <item id="12165" article="a" name="gate of expertise">
    <attribute key="type" value="door" />
    <attribute key="levelDoor" value="1000" />
    <attribute key="blockprojectile" value="1" />
    <!--<attribute key="transformUseTo" value="12166"/>-->
  </item>
    <item id="12166" article="a" name="gate of expertise">
        <attribute key="type" value="door"/>
        <attribute key="closingDoor" value="1"/>
    <!--    <attribute key="transformUseTo" value="12165"/> -->
    </item>
  <item id="12156" article="a" name="gate of expertise">
    <attribute key="type" value="door" />
    <attribute key="levelDoor" value="1000" />
    <attribute key="blockprojectile" value="1" />
  <!-- <attribute key="transformUseTo" value="12157"/> -->
  </item>
  <item id="12157" article="a" name="gate of expertise">
    <attribute key="type" value="door" />
    <attribute key="closingDoor" value="1"/>
  <!--    <attribute key="transformUseTo" value="12156"/> -->
  </item>
 
Last edited:
Back
Top