• 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 bridge.

Gomn

Universe OTS is commin...
Joined
Feb 21, 2010
Messages
102
Reaction score
1
Location
Dungannon
hello
if player is below level 100 then he gets message in green colour "Your level is to low, its to dangerous for you",
and if level is 100 or higher then he gets green message again that says "Your level is fine you can go"

0Ny1u.png
 
Oops, I forgot about it.
Lua:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerLevel(cid) < 100 then
			pos.x = pos.x - 1
			doTeleportThing(cid, pos)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Your level is too low, it\'s too dangerous for you.')
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Your level is fine, you can go.')
		end
	end
end
 
Where do i write position?

Code:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerLevel(cid) < 100 then
			pos.[COLOR="red"]999 [/COLOR]= pos.999 - 1
			doTeleportThing(cid, pos)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Your level is too low, it\'s too dangerous for you.')
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Your level is fine, you can go.')
		end
	end
end

or how? im not too sure about it ;d
 
pos.x - is example 600
the white sqm is on left side have: pos.x-1 so its 599 (600-1).
You dont need write in script positions.
Just add in map editor on black sqm actionid of movement script.

If you want do it on White Squares just remake this line:
Lua:
pos.x = pos.x - 1
to "+ 1"
 
Lua:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerLevel(cid) < 100 then
			pos.x = pos.x - 1
			doTeleportThing(cid, pos)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your level is too low, it\'s too dangerous for you.")
		end
	end
	
	return true
end
 
Lua:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerLevel(cid) < 100 then
			pos.x = pos.x - 1
			doTeleportThing(cid, pos)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your level is too low, it\'s too dangerous for you.")
		end
	end
	
	return true
end
No he wants a message when player is high enough level too.
 
Back
Top