EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   #bot group guard (https://www.eqemulator.org/forums/showthread.php?t=34382)

Criimson 10-22-2011 03:14 PM

#bot group guard
 
When using #bot group guard the bots no longer attack with me. I am familiar with this, but would like to change it. I looked at the code and it seems that it calls the mob function that has the bots stop following (SetFollowID (follow = 0)). This works ok as it keeps them from moving, but any ideas on having them keep on my agro usage?

IIRC angelox has a #bot group stay command which is more of what I am looking for.

I'll look more into it when I get the time if no one has any suggestions.

Thanks,
Criimson


EDIT: NM I found it. Leaving this here though as I will use this thread to post the changes.

Basically in the bot AI it equalizes the followid with helping auto fight

if(!IsEngaged()) {
if(GetFollowID()) {


----------------------------------------------------------------------------------

Ok so here is the fix I am going to use for now.
Feel free to change it to suit your needs. I am sure not everyone wants them assist when guarding, but I see no reason for my bots to just stand there.

In the AI_Process function this is the change (only added one check but placed a large portion of code for clarity of where to look

Code:

if(!IsEngaged()) {
                if(GetFollowID() || BotOwner) {
                        if(BotOwner && BotOwner->CastToClient()->AutoAttackEnabled() && BotOwner->GetTarget() &&
                                BotOwner->GetTarget()->IsNPC() && BotOwner->GetTarget()->GetHateAmount(BotOwner)) {
                                        AddToHateList(BotOwner->GetTarget(), 1);



All times are GMT -4. The time now is 03:25 AM.

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