• 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 Limit to enter TP

zerghel

Tsuni
Joined
Jul 1, 2008
Messages
299
Reaction score
9
hello guys.
I have a war Server and i've been seeing how HLvl players Abuse from LLvl players, and the newcomers get bored of dying again and again, so i had an idea, make a Low Level Zone for newcomers, so i'm needing a TP movement script that only teleport player with, lvl 100 to 150 for tfs 0.3.6pl1

it's like separate experienced players from newbies like in other games online, they separate them by channels or servers but this is much more simple.

thx in advance guys =)
 
Possible soluton

Lua:
rightpos = {x=xxx, y=xxx, z=x} -- set the destination to the zone


function onStepIn(cid, item, pos)
       if item.actionid == ACTIONID then -- this need to be set on the teleport
	     if getPlayerLevel(cid) > 100 then -- > 100 means 100 or bigger then 100
	       doTeleportThing(cid, rightpos) -- teleport player to destination zone
	         doSendMagicEffect(rightpos, 10, cid) -- add a magic effect 10 = teleport effect like normal
			else
			doPlayerSendTextMessage(cid, 18, "You need level 100 or higher to enter this!") -- this message will be gives if player is not level 100 or higher
			pos.y = pos.y+1 -- this will teleport the player 1 sqm away if he isn't level 100 or higher
			doTeleportThing(cid, pos) -- this will teleport the player 1 sqm away if he isn't level 100 or higher
			doSendMagicEffect(pos, 12) -- add a magic effect 12 = like UH healing blue sparkles
	     end
     end
  return TRUE
end

add this to movement.xml
Lua:
<movevent event="StepIn" actionid="ACTIONID" script="SCRIPTNAME.lua" />

this might work.


kind regards
 
movements.xml

Lua:
local tile_id = {x = 1000, y = 1000, z = 7}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if isPlayer(cid) and getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 150 then
		doTeleportThing(cid, tile_id)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Only levels 100 -> 150 may enter this area!")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		doTeleportThing(cid, fromPosition)
	end
	return true
end
 
Back
Top