Kuantikum
Member
- Joined
- Jul 3, 2015
- Messages
- 219
- Solutions
- 1
- Reaction score
- 20
I would like to know if it is possible to count how many monsters there are in an area fromX toX ??
Can you help me?
Lua:
local top_left_corner = {x = 3341, y = 804, z = 6}
local bottom_right_corner = {x = 3352, y = 811, z = 6}
if monsters_summoned[1] then
local monster_count = 0
for i = 1, #monsters_summoned do
if isCreature(monsters_summoned[i]) then
monster_count = monster_count + 1
end
end
if monster_count > 0 then
doCreatureSay(cid, monster_count .. " creatures from previous lever activation are still alive.", TALKTYPE_MONSTER)
return true
end
end
Can you help me?