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

Lua script to auto teleport char to X coords at x lvl

puhefihi

New Member
Joined
Sep 28, 2011
Messages
84
Reaction score
0
hey everyone basicly i need to teleport a character when they hit 55 to coords x32028, y32272, z6.. no matter where they are. Basicly i have my server and rook and your in rook till lvl 50.. BUT i want players to leave by themselves.. but if they dont leave when they hit lvl 55 i want to auto teleport them to those coords.. is it possible ?.

so when it says "congratulation you reached lvl 55" or what ever it says.. you go Pooof and end up at x32028, 32272, z6 :D. Thnx guys will rep of course.
 
is possible that if you arrive at the "X", sent to the area you want to count, for example:
PHP:
You Will be teleported in 30 seconds.
You Will be teleported in 29 seconds.
You Will be teleported in 28 seconds.
You Will be teleported in 27 seconds.
You Will be teleported in 26 seconds.
You Will be teleported in 25 seconds.
and count "0"
transport you to the area??

heelp?
 
Last edited by a moderator:
yes:
Lua:
function transport(sek, cid)
	if(sek > 0) then
		doCreatureSay(cid, "You Will be teleported in " .. sek .. " sek.", TALKTYPE_MONSTER_SAY)
		addEvent(transport, 30, sek - 1, cid)
	elseif(sek == 0) then
		if(isPlayer(cid)) then
			doTeleportThing(cid, {x=111, y=111, z=7})
		end
	end
end

but I did not understand when exactly start the countdown.

-- edit
TALKTYPE_MONSTER_SAY if you have 0.4 or
TALKTYPE_MONSTER for 0.3.6
 
Back
Top