• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Exp Teleport

melegy

Devils
Joined
Dec 5, 2012
Messages
178
Reaction score
2
Location
Egypt
I need script for Teleport that no one can enter above level 50 k
Version 4.0 based on otserv sun version 0.6.0
 
Code:
local level = 50000

function onStepIn(cid, item, position, fromPosition)
    if getPlayerLevel(cid) > level then
        return false
    end
    return true
end
See how easy that was?
 
Returning false doesn't cancel the step, add doTeleportThing(cid, fromPosition) below if getPlayerLevel(cid) > level then
 
Joking, Thanks Thanks alot

Guys, i really wanna it ( TP noone above Level 50,000 can enter )
 
Last edited by a moderator:
Like Ninja posted, use doTeleportThing(cid, fromPosition) to push the player back.
Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerLevel(cid) >= 50000 then
         doTeleportThing(cid, fromPosition)
         doPlayerSendCancel(cid, "You need to be lower than level 50k.")
     else
         doTeleportThing(cid, {x = 100, y = 100, z = 7}) -- where it should teleport
     end
     return 1
end
 
It doesn't show any line? Could be the fromPosition parameter, can you show other movement stepin scripts since you don't have the source?

You can also do this
Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerLevel(cid) >= 50000 then
         doTeleportThing(cid, {x = 100, y = 100, z = 7}) -- position where it should push the player back to
         doPlayerSendCancel(cid, "You need to be lower than level 50k.")
     else
         doTeleportThing(cid, {x = 100, y = 100, z = 7}) -- where it should teleport
     end
     return 1
end
 
Last edited:
i've this script work fine

function onStepIn(cid, item, position, fromPosition)
return if getPlayerLevel(cid) >= 300000 and true or doTeleportThing(cid, fromPosition) and doPlayerSedTextMessage(cid, 22, "You need level 30+")
 
Then I can't think of something that could be nil, did you use the script how I posted it?
You can also just use that and change the numbers and text.
 
Back
Top