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

push back , Level req

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
Can some do like this
like rook u need to be level tex 100 for go over a line/floor ?
if not lvl 100 u will be pushed back pushed back 1 floor and a msg come u most be over "100" or smth.. :$

REP++
 
Code:
local level = 100
function onStepIn(cid, item, position, fromPosition)
	return getPlayerLevel(cid) < level and doTeleportThing(cid, fromPosition, TRUE), doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must be level " .. level .. " or higher in order to pass.")
end
 
Code:
local level = 100
function onStepIn(cid, item, position, fromPosition)
	return getPlayerLevel(cid) < level and doTeleportThing(cid, fromPosition, TRUE), doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must be level " .. level .. " or higher in order to pass.")
end

Damn now thats short lol. Ill learn from this :thumbup:

What I was making was already like 2x longer lol

EDIT: Only flaw on that script is that it will send the error message "You must be ---- etc" will be sent even if the player is lvl 100+!

What Id use is this:

LUA:
local level = 100
function onStepIn(cid, item, position, fromPosition)
	if getPlayerLevel(cid) < level then
		doTeleportThing(cid, fromPosition, TRUE)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must be level " .. level .. " or higher in order to pass.")
	end
	return 1
end

But if you can shorten it considering that small flaw, feel free to :)
 
Last edited:
Back
Top