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

Solved Teleporting Tiles

Programmer

Lua, Java, C
Joined
Jan 26, 2013
Messages
67
Reaction score
3
Location
United States
Do you guys know of a way I can make a tile with a certain Action ID teleport you to a location if you are... equal to or greater than "Level X"?
 
Code:
function onStepIn(cid, item, position, fromPosition, toPosition, lastPosition, actor)
   if (getPlayerLevel(cid) < 100) then
     return doTeleportThing(cid, fromPosition), doPlayerSendCancel(cid, "You need to be at least level 100 or greater in order to use this teleport."), doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT), false
   end
  
   doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
   doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
   return true
end
 
Last edited:
simple here:
Code:
local level = 100
local pos = {x=,y=,z=}
function onStepIn(cid, item, position, fromPosition)
    if getPlayerLevel(cid) >= level then
        doTeleportThing(cid, pos)
    else
        doPlayerSendCancel(cid, "Sorry you need to be level "..level.." to enter.")
    end
end
 
Back
Top