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

Avesta Doors 7.4 SOLVED

Sebastian Ching

New Member
Joined
Dec 26, 2007
Messages
314
Reaction score
4
Location
Rio grande, rs, Brazil
Greetings, well i m having some problems in avesta from ferrus 7.4, i m using a global map 7.4, the trouble is when i use an expertise doors, the server just crash appearing many console errors, please if someone know how can i fix it i apreciate much
sorry my english

ffbd7d.jpg
 
Thanks for answer
doorsclose

-- Player with storage value of the item's actionid set to 1 can open

function onUse(cid, item, frompos, item2, topos)
if(item.actionid == 0) then
-- Make it a normal door
doTransformItem(item.uid, item.itemid+1)
return TRUE
end

local canEnter = (getPlayerStorageValue(cid, item.actionid) == 1)
if not(canEnter) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door is sealed against unwanted intruders.")
return TRUE
end

doTransformItem(item.uid, item.itemid+1)
local canGo = (queryTileAddThing(cid, frompos, bit.bor(2, 4)) == RETURNVALUE_NOERROR) --Veryfies if the player can go, ignoring blocking things
if not(canGo) then
return FALSE
end

local dir = getDirectionTo(getPlayerPosition(cid), frompos)
doMoveCreature(cid, dir)
return TRUE
end
 
sorry xD

function onStepOut(cid, item, pos)
if(item.actionid == 0) then
-- This is not a special door
return TRUE
end

local topos = getPlayerPosition(cid)
doRelocate(pos, topos)

-- Remove any item that was not moved
-- Happens when there is an unmoveable item on the door, ie. a fire field
local tmpPos = {x=pos.x, y=pos.y, z=pos.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
 
Use the doors from othire instead since I know they work. Don't forget to change in movements.xml / actions.xml
 
Back
Top