Hello i have this script and i need to check only "Mad Assassin" monster in this area, because it's check all monsters in world map, can you help me to add this?
Code:
function onKill(cid, target, lastHit)
local fromPos = {x = 770, y = 204, z = 7}
local toPos = {x= 963, y = 333, z = 7}
local amount = 0
for x = fromPos.x, toPos.x do
for y = fromPos.y, toPos.y do
for z = fromPos.z, toPos.z do
local monster = getTopCreature({x=x,y=y,z=z}).uid
if(isMonster(monster) == TRUE) then
amount = amount+1
end
end
end
end
if(amount >= 1) then
return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "There are "..amount.." Mad Assasins in the rift.")
end
end