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

Teleport script with uniqueid

StevenTrembly

New Member
Joined
Mar 17, 2016
Messages
40
Reaction score
4
How can i block pos of teleport that denie player to throw above it some trash items like vials - golds etc ?

PHP:
local config = {
    time = 120, -- minutes
    str = 98765, -- storage
    pos = {x = 31373, y = 32780, z = 7} -- position
}

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

    local function isTraining(uid)
        local self = Player(uid)
        if not self then return false end
        return self:getStorageValue(config.str) > 0 and self:teleportTo(config.pos) or true
    end

    check = addEvent(isTraining, config.time * 60 * 1000, player:getGuid())
    return player:setStorageValue(config.str, 1)
end

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

    return stopEvent(check) and player:setStorageValue(config.str, -1)
end
 
Last edited:
yea its working the issue is "where the pos of teleport which got the unique id" ppl able to throw on it things like vials - golds etc

i dont want them able to throw things on teleport position like when someone try to throw e.g. vial on teleport, turn false with cancel message "sorry you can't throw here"
 
Back
Top