EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Plugins & Mods (https://www.eqemulator.org/forums/forumdisplay.php?f=678)
-   -   Zone Plugins. (https://www.eqemulator.org/forums/showthread.php?t=39607)

Kingly_Krab 04-26-2015 05:51 PM

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



All times are GMT -4. The time now is 08:05 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.