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

Add creature health

Third Aid

Banned User
Joined
Dec 14, 2009
Messages
62
Reaction score
0
Location
Sweden
Hello, I'm trying to use doCreatureAddHealth on all creatures in an area, I thought something like this would work, but it didnt ^^

Lua:
for x = 111, 222 do
    for y = 55, 60 do
      local monsterArea = {x=x, y=y, z=7, stackpos=253}
      local getMonsters = getThingFromPos(monsterArea)
      doCreatureAddHealth(getMonsters.uid, 500)

So what's the problem with this? :p
 
Code:
for areaX = 111, 222 do
	for areaY = 55, 60 do
		local creature = getTopCreature({x=areaX, y=areaY, z=7}).uid
		if(isCreature(creature) == TRUE) then
			doCreatureAddHealth(creature, 500)
		end
	end
end
 
Back
Top