These two plugins will allow you to aggro an entire zone on a client or repop an entire zone in a script.
RepopZone (plugin::RepopZone()):
Code:
sub RepopZone {
quest::clearspawntimers();
quest::repopzone();
plugin::Whisper("Zone repopped!");
}
AggroZone (plugin::AggroZone()):
Code:
sub AggroZone {
my $c = plugin::val('client');
my $e = plugin::val('entity_list');
my @n = $e->GetNPCList();
foreach my $p (@n) {
if ($p->GetLevel() <= 70) { ## I would recommend changing this if your NPCs go beyond 70.
$p->AddToHateList($c);
}
}
plugin::Whisper("Zone aggroed, beware!");
}
Here is an example of their uses:
Code:
sub EVENT_SAY {
if ($text=~/Repop/i) {
plugin::RepopZone();
} elsif ($text=~/Aggro/i) {
plugin::AggroZone();
}
}