Thread: Zone Plugins.
View Single Post
  #1  
Old 04-26-2015, 05:51 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default Zone Plugins.

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();
    }
}
Reply With Quote