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

Movement doesnt work as intended

lico69

New Member
Joined
Mar 11, 2011
Messages
38
Reaction score
1
Hey guys! I tried but none solution till the moment.

If the event is CLOSED it runs fine (return your guild is not the owner of the castle, you are not in a guild and the event is closed only castle owners have access) but if the event START the (you are not in a guild) get ignored and it calls registerToCastle(). Who can save me? Thanks :D

Lua:
function onStepIn(creature, item, pos, fromPosition)
    if Game.getStorageValue(37895) == nil then Game.setStorageValue(37895, 0) end
    if (creature:isPlayer()) then
        if (getCastleEventStatus() <= EVENT_CLOSED) then
            if (castleOwner > 0) then
                local guild = creature:getGuild()
                if (guild) then
                    if (guild:getId() ~= castleOwner) then
                        creature:teleportTo(fromPosition)
                        creature:sendCancelMessage('Your guild is not the owner of the Castle.')
                    end
                else
                    creature:teleportTo(fromPosition)
                    creature:sendCancelMessage('You are not in a guild.')
                end
            else
                creature:teleportTo(fromPosition)
                creature:sendCancelMessage('The event is closed. Only castle owners have access.')
            end

        else
            creature:registerToCastle()
        end
    end
    return true
end
 
Back
Top