Code: Select all
#turbo 100
Sub main()
/declare npcid global
/declare index global
/declare casters global
/varset index 0
/varset casters 0
/varcalc npcid $searchspawn(npc,loc:$target(x):$target(y),radius:@Param0,next)
:mainloop
/if n $spawn(@npcid,speed)<71.44 {
/if "$spawn(@npcid,class)"=="Shaman" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Cleric" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Druid" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Enchanter" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Wizard" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Necromancer" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Magician" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Beastlord" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Paladin" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Shadowknight" /varset casters @casters+1
/if "$spawn(@npcid,class)"=="Ranger" /varset casters @casters+1
/goto :skip
}
/varcalc index @index+1
/chat #@Param1 [$int(@index)] - Incoming -> $spawn(@npcid,name,clean)
:skip
/varcalc npcid $searchspawn(id:@npcid,npc,loc:$target(x):$target(y),radius:@Param0,next)
/if "$spawn(@npcid,name,clean)"=="NULL" /goto :end
/goto :mainloop
:end
/chat #@Param1 Total incoming: $int(@index) mob(s). Possible casting: $int(@casters)
/returnUsage: /mac inc.mac <radius> <chat channel name>
All is fine except for casting-on-incoming mobs. I need some suggestions on how I would go about catching them. All I can do atm is flag them as "possible".


