#event seeinvis "You suspect that this being can see you."
Sub Main
/declare npcno int outer
/declare aray[999] int outer
/declare sicount int outer
/squelch /mapf npc hide
/squelch /mapf npc show
/squelch /mqclear
/squelch /target clear
/squelch /mapf NPCConColor hide
/varset sicount 0
/for npcno 1 to ${SpawnCount[npc]}
/varset aray[${npcno}] ${NearestSpawn[${npcno}, npc].ID}
/next npcno
/for npcno 1 to ${SpawnCount[npc]}
/doevents clear
/target id ${aray[${npcno}]}
/delay 1s ${Target.ID}==${aray[${npcno}]}
/consider
/delay 7
/doevents
/if (${Int[${Math.Calc[${npcno}/50]}]}==${Math.Calc[${npcno}/50]}) /echo ${npcno} mobs checked...
/next npcno
/target clear
/echo There are ${sicount} see invis mobs in this zone.
/return
Sub Event_seeinvis
/echo ${npcno}: ${Spawn[${aray[${npcno}]}].Name} can see invis
/squelch /highlight ${Target.Name}
/varcalc sicount ${sicount}+1
/doevents clear
/return