Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 12-18-2012, 04:22 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

the only thing i can see that would be causing an issue is that not all bot owners are using the command, as it currently checks for ownership here:

Code:
if(botGroupMember && botGroupMember->GetBotOwnerCharacterID() == client->CharacterID()) {
if you want the group leader to be able to issue the command to all bots in the group, regardless of ownership, you should be able to use this instead:

Code:
void Bot::BotGroupOrderGuard(Group* group, Client* client)
{
    if (!client || !group)
        return;

    Mob* leader = group->GetLeader();
    int32   cid = client->CharacterID();

    for (int i = 0; i < MAX_GROUP_MEMBERS; i++)
    {
        if (!group->members[i] || !group->members[i]->IsBot())
            continue;

        Bot*   bot = group->members[i]->CastToBot();
        uint32 oid = bot->GetBotOwnerCharacterID();

        // verify command was issued by bot owner or group leader
        if (cid != oid && client->CastToMob() != leader)
            continue;

        bot->SetFollowID(0);
        bot->WipeHateList();
        bot->Say("Guarding here.");

        if (!bot->HasPet() || !bot->GetPet())
            continue;
        bot->GetPet()->WipeHateList();
    }
}
it looks like the #bot botgroup guard command may have unexpected results when you have a bot-only group whose members are owned by more than one client as well, but that's probably a fairly rare occurrence.
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 11:00 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3