Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Plugins & Mods

Quests::Plugins & Mods Completed plugins for public use as well as modifications.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-01-2015, 09:46 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default Group Flagging.

This allows you to set and check whole groups flags. As it may not be obvious, this requires a custom file in your plugins folder.
Code:
sub CheckGroupFlag {
    my $client = plugin::val('client');
    my $flag = shift;
    if ($client->GetGroup()) {
        for ($i = 0; $i < 6; $i++) {
            if ($client->GetGroup()->GetMember($i) && !$client->GetGroup()->GetMember($i)->HasZoneFlag($flag)) {
                return 0;
            }
        }
    } else {
        if (!$client->HasZoneFlag($flag)) {
            return 0;
        }
    }
    return 1;
}

sub SetGroupFlag {
    my $client = plugin::val('client');
    my $flag = shift;
    if ($client->GetGroup()) {
        for ($i = 0; $i < 6; $i++) {
            if ($client->GetGroup()->GetMember($i) && !$client->GetGroup()->GetMember($i)->HasZoneFlag($flag)) {
                $client->GetGroup()->GetMember($i)->SetZoneFlag($flag);
            }
        }
    } else {
        if (!$client->HasZoneFlag($flag)) {
            $client->SetZoneFlag($flag);
        }
    }
}

return 1;
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:16 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3