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

Premium Door TFS 1.0

edit actions doors.lua:
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local itemId, actionId = item:getId(), item:getActionId()

    if isInArray(questDoors, itemId) then
    
if player:getStorageValue(actionId) ~= -1 then
            item:transform(itemId + 1)
            player:teleportTo(toPosition, true)
        else
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
        end
        return true

    elseif isInArray(levelDoors, itemId) then

to:
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local itemId, actionId = item:getId(), item:getActionId()

    if isInArray(questDoors, itemId) then
        if (actionId == 13370) then
            if player:isPremium() then
                item:transform(itemId + 1)
                player:teleportTo(toPosition, true)
            else
                player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Only premium players may pass.")
            end
        elseif player:getStorageValue(actionId) ~= -1 then
            item:transform(itemId + 1)
            player:teleportTo(toPosition, true)
        else
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
        end
        return true

    elseif isInArray(levelDoors, itemId) then

If pve is set then premium players could open the door for none premium players.
That would be a move event edit and just set the action id of the tile under the door.

Set the door to 13370 or w.e action id you want to use.
 
Last edited:
Back
Top