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

RevScripts TFS 1.4 HELP portal requesting level

VagosClubTM

Active Member
Joined
Aug 16, 2019
Messages
219
Reaction score
32
Location
Chile
Hello friends, I am looking for a script to be able to use portals with levels, that is, if you do not have a certain level, example 200, the portal will not let you pass and you will not be able to go to the area.

TFS 1.4
 
Solution
Put the actionid on the tile below the portal, and have the portal not have a destination set.

Untitled.png

data/scripts
Lua:
local levelRequired = 200
local teleportDestination = Position(1000, 1000, 7)

local moveEvent = MoveEvent()
moveEvent:type("stepin")

function moveEvent.onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return true
    end
    if creature:getLevel() < levelRequired then
        return true
    end
    creature:teleportTo(teleportDestination)
    return true
end

moveEvent:aid(45021)
moveEvent:register()
Put the actionid on the tile below the portal, and have the portal not have a destination set.

Untitled.png

data/scripts
Lua:
local levelRequired = 200
local teleportDestination = Position(1000, 1000, 7)

local moveEvent = MoveEvent()
moveEvent:type("stepin")

function moveEvent.onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return true
    end
    if creature:getLevel() < levelRequired then
        return true
    end
    creature:teleportTo(teleportDestination)
    return true
end

moveEvent:aid(45021)
moveEvent:register()
 
Solution
Put the actionid on the tile below the portal, and have the portal not have a destination set.

View attachment 64241

data/scripts
Lua:
local levelRequired = 200
local teleportDestination = Position(1000, 1000, 7)

local moveEvent = MoveEvent()
moveEvent:type("stepin")

function moveEvent.onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return true
    end
    if creature:getLevel() < levelRequired then
        return true
    end
    creature:teleportTo(teleportDestination)
    return true
end

moveEvent:aid(45021)
moveEvent:register()
Hello bro, do you have any npc that sells you items but you have to pay with Christmas currency?

@Xikini
 
Back
Top