†Cheetah†
New Member
- Joined
- Apr 2, 2020
- Messages
- 2
- Reaction score
- 0
Hello Goodnight.
How can I check the name of a monster in some area?
I have tried this but I can't
I get this error
How can I check the name of a monster in some area?
I have tried this but I can't
Lua:
local fromPos = {x=559, y=269, z=8}
local toPos = {x=574, y=282, z=8}
local exit = {x=550, y=232, z=8}
function onUse(cid, item, fromposition, itemEx, toPosition)
local monster = "Morgaroth"
for x = fromPos.x, toPos.x do
for y = fromPos.y, toPos.y do
for z = fromPos.z, toPos.z do
local posicion = getTopCreature({x=x,y=y,z=z}).uid
end
end
end
if (getCreatureName(posicion) == monster) then
doSendMagicEffect(getPlayerPosition(cid), 39)
end
return true
end
I get this error
Last edited: