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

(Requests) Rookgard Level Bridge

Maybe? :huh:

Code:
function onStepIn(cid, item, fromPosition, toPosition)
	if getPlayerLevel(cid) >= 2 then
		doTeleportThing(cid, toPosition)
	else
		doTeleportThing(cid, fromPosition)
		doPlayerSendCancel(cid, "You need level 2 to pass.")
	end
	return true
end
 
Last edited:
Lua:
function onStepIn(cid, item, fromPosition, toPosition)
	if getPlayerLevel(cid) < 2 then -- or == 1 then
		doTeleportThing(cid, fromPosition)
		doPlayerSendCancel(cid, "You need level 2 to pass.")
	end
	return true
end

Shorter ._.
 
Not sure but 0.3.4 or 5+ have aid for not only lvl doors but also tiles.
yeah I was right
Code:
		Level depending Level Door & Tile
			1000 -> maximumDoorLevel
				+ Required Level
From doc/ACTION_IDS in 0.3.6
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= 2 then
if getCreaturePosition(cid).y < toPosition.y then
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
end
else
doPlayerSendCancel(cid, "You need level 2 to pass.")
end
return TRUE
end

check
 
Dont work.
I have now this warning.
PHP:
[Warning - Event::loadScript] Event onStepIn not found (data/movements/scripts/rook_leveltile.lua)
 
function onStepIn(cid, item, position, fromPosition)
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid, 22, "You need level 2 to pass.")
doTeleportThing(cid, fromPosition)
end
return TRUE
end

This work :)
 
I change the script a little bit and now it works

PHP:
function onStepIn(cid, item, position, fromPosition)
if getPlayerLevel(cid) < 2 then
doPlayerSendTextMessage(cid, 22, "You need level 2 to pass.")
doTeleportThing(cid, fromPosition)
end
return TRUE
end

Thanks :)
 
Back
Top