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

Need Help with Level tile Script.!! :(

melegy

Devils
Joined
Dec 5, 2012
Messages
178
Reaction score
2
Location
Egypt
Hi, otlanders
I'm looking for level tile (If you do not in Correct level you can't pass Tile area, and push you back 2 Sqm or Teleport you back to Temple.)

Tibia 8.1, XML

Thanks You Otlanders :)
 
Very basic but should be easy for you to understand!

LUA:
function onStepIn(cid, item, pos) -- old distro, old parameters?
   
    local level = 50
    local back = {x=1000, y=1000, z=7}

    if getPlayerLevel(cid) < level then
        doTeleportThing(cid, back)
        doPlayerSendTextMessage(cid, 22, "You need "..level.." to walk here.")
    end
   
    return true
end
 
Last edited:
Thanks, Thanks Ond !@! <3 :)
It's Work 100%, But if you can make it when you do not in levels it's Teleport you and Send message Says that you are not in correct leve ?
 
LUA:
function onStepIn(cid, item, position, fromPosition)
local level = 300
	if getPlayerLevel(cid) >= level  then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome over.")
	else
		doTeleportThing(cid, fromPosition)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be at least level "..level.." to pass here!")
		doSendMagicEffect(getPlayerPosition(cid), 9)
		end
	return TRUE
end

It takes you back one step, not be needed to put the position into the script. Just set an unique id on the tiles
 
LUA:
function onStepIn(cid, item, position, fromPosition)
local level = 300
	if getPlayerLevel(cid) >= level  then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome over.")
	else
		doTeleportThing(cid, fromPosition)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be at least level "..level.." to pass here!")
		doSendMagicEffect(getPlayerPosition(cid), 9)
		end
	return TRUE
end

It takes you back one step, not be needed to put the position into the script. Just set an unique id on the tiles

I think he's using an enough old server to not have the fromPos/toPos. Besides:

push you back 2 Sqm or Teleport you back to Temple.
 
Back
Top