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

rook levelbridge.lua not work

danio4don

AlatharStudio
Joined
Jun 15, 2012
Messages
371
Reaction score
55
Location
Poland
Hello. I have a problem with the levelbridge.lua script. the script doesn't work at all. do i need to configure any more scripts for this?

tfs 1.5 12.81

Lua:
local failPosition = Position(31704, 32279, 6)

function onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        return true
    end

    if player:getLevel() >= 2 then
        return true
    end

    player:teleportTo(failPosition)
    failPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need to be at least Level 2 in order to pass.')
    return true
end
 
Try changing failPosition = {X = 31704, y = 32279, z = 6}

at least this is how teleport works in 0.4
 
Lua:
local failPosition = Position(31704, 32279, 6)

function onStepIn(creature, item, position, fromPosition)
    print("Rookgard Bridge - Does it even work?")
    local player = creature:getPlayer()
    if not player then
        return true
    end

    if player:getLevel() >= 2 then
        return true
    end

    player:teleportTo(failPosition)
    failPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need to be at least Level 2 in order to pass.')
    return true
end

try to check that this script its even executed (u should get print in console if u step in on correct sqm), im pretty sure problem its about registering the script, not about code
 
Back
Top