• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Close this theard! Or Remove!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
Close this theard! or Remove!
 
Last edited:
I'm not sure if its what you want, but you can try:
LUA:
function onThink(interval, lastExecution, thinkInterval)
	for _, pid in pairs(getPlayersOnline()) do
		if(getCreatureHealth(pid) >= (getCreatureMaxHealth(pid)*0.7)) then
			doSendMagicEffect(getThingPosition(pid), 170)
		end
	end
	return true
end
 
did you make when the player got 70% - 100% of the hp it will come dosendmagiceffect!

not if they got 69% or something if they got 69% nothing come out!
 
thx but can you fix now the next after 69% its come a other effect until 30% its stops! then it will come medium hp that is yellow it will come!

doSendMagicEffect(getThingPosition(pid), 175)
 
Last edited:
LUA:
function onThink(interval, lastExecution, thinkInterval)
	for _, pid in pairs(getPlayersOnline()) do
		if getCreatureHealth(pid) >= getCreatureMaxHealth(pid) * 0.7 then
			doSendMagicEffect(getThingPosition(pid), 170)
		elseif getCreatureMaxHealth(pid) * 0.3 <= getCreatureHealth(pid) < getCreatureMaxHealth(pid) * 0.7 then
			doSendMagicEffect(getThingPosition(pid), 175)
		end
	end
	return true
end
 
Back
Top