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

Level on Teleportals

Rexanilator

New Member
Joined
Oct 3, 2009
Messages
297
Reaction score
2
I have searched and cannot find the answer...I imagine it is a simple solution...

I want to be able to set a level on the tp's so that when player step on the blue dot - it checks his level and then allows him to be tp'd or not.

Can someone share with me how to do this?

Rep Given!
 
1. You need to add a unique id and destination to the teleport through the map editor.

The unique id's must match.

data/movements/movements.xml
Code:
<movevent [COLOR="Red"]uid="1001"[/COLOR] type="StepIn" event="buffer" value="
	local level = 100
	return getPlayerLevel(cid) < level and doTeleportThing(cid, fromPosition, true) and doCreatureSay(cid, "You cannot enter.", TALKTYPE_ORANGE_1)
"/>
 
I finally tried to put this into some new mapping I was doing and it threw a bunch of errors all over the console and would not load at all. Something about invalid beginning tabs and ending tabs.

Is this for tfs0.3.6pl1 or for another distro?
 
Code:
function onStepIn(cid, item, position, fromPosition)
if getPlayerLevel(cid) > 99 then 
doTeleportThing(cid, {x = 100, y = 100, z = 100})
else 
doTeleportThing(cid, {x = 101, y = 101, z = 101}) -- if he's not 100
end
return true
end
 
Last edited:
Back
Top