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

Required health/mana to pass a tile

DestinationSer

@echo off
Joined
Mar 7, 2009
Messages
2,806
Solutions
1
Reaction score
676
Is there possible to make a tile who just allows you to go in if u have a certain amount of health or mana?
 
LUA:
local health = 1000 -- change this
function onStepIn(cid, item, position, fromPosition)

	if getCreatureHealth(cid) >= health then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have more than ".. health .." you can pass.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have ".. getCreatureHealth(cid) .." you need ".. health .." to pass.")
		doTeleportThing(cid, fromPosition)
	end
return true
end
 
Always make sure to check if its a player, else if a monster step into the tile you will get errors.
 
Back
Top