You can do this in Perl, yes, but writing them to attack on a timer on proximity-based entities isn't as good as just having them aggro the NPC. Doing this with faction would be the much simpler route. There is an npc_aggro column in npc_types which you can turn on and off to make an NPC aggro on to other NPCs. If you haven't deleted the Mines of Gloomingdeep (tutorialb, zone 189) guards, you can take a look at how their faction works and what the faction of the trash in their zone looks like. Hopefully this will help you out.
|