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

Doors level problem

armyman

Member
Joined
Feb 15, 2014
Messages
318
Reaction score
14
in my server doors with level opem but don´t close automatic... have solution?
 
Some info would be useful. Server version, errors, all gate of expertise doors? or just a few, also the quest doors or only the level/gate of expertise doors?
Are they added in movements.xml, do you have the script closingdoor.lua, did you change your datapack?
 
O in my console have 1 error

Lua script error : [MoveEvents Interface ]
data/movements/scripts/closingdoor.lua:onStepOut

data/movements/scripts/closingdoor.lua:7: attempt to index local ' frompos' <a nil value>
stack traceback
data/movements/scripts/closingdoor.lua:7: in function <data/movements/scripts/closingdoor.lua:1>
 
function onStepOut(cid, item, topos, frompos)
if(item.actionid == 0) then
-- This is not a special door
return TRUE
end

doRelocate(frompos, {x=frompos.x+1, y=frompos.y, z=frompos.z})

local tmpPos = {x=frompos.x, y=frompos.y, z=frompos.z, stackpos=-1}
local tileCount = getTileThingByPos(tmpPos)
local i = 1
local tmpItem = {uid = 1}

while(tmpItem.uid ~= 0 and i < tileCount) do
tmpPos.stackpos = i
tmpItem = getTileThingByPos(tmpPos)
if(tmpItem.uid ~= item.uid and tmpItem.uid ~= 0) then
doRemoveItem(tmpItem.uid)
else
i = i + 1
end
end

doTransformItem(item.uid, item.itemid-1)
return TRUE
end
 
Code:
function onStepOut(cid, item, position, fromPositionition)
    if(item.actionid == 0) then
        -- This is not a special door
        return TRUE
    end

    doRelocate(fromPosition, {x=fromPosition.x+1, y=fromPosition.y, z=fromPosition.z})

    local tmpPos = {x=fromPosition.x, y=fromPosition.y, z=fromPosition.z, stackpos=-1}
    local tileCount = getTileThingByPos(tmpPos)
    local i = 1
    local tmpItem = {uid = 1}

    while(tmpItem.uid ~= 0 and i < tileCount) do
        tmpPos.stackpos = i
        tmpItem = getTileThingByPos(tmpPos)
        if(tmpItem.uid ~= item.uid and tmpItem.uid ~= 0) then
            doRemoveItem(tmpItem.uid)
        else
            i = i + 1
        end
    end

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