EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   COMMITTED: Add Bot Command ( #bot pull ) (https://www.eqemulator.org/forums/showthread.php?t=33488)

Timothy_nonax 05-08-2011 05:28 AM

COMMITTED: Add Bot Command ( #bot pull )
 
bot.cpp
Code:

10078,10079d10077
<                c->Message(0, "#bot pull [<bot name>] [target] - Bot Pulling Target NPC's");
<
10085,10122d10082
<        // pull
<        if(!strcasecmp(sep->arg[1], "pull")) {
<
<                Mob *target = c->GetTarget();
<                if(target == NULL || target == c || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
<                {
<                        c->Message(15, "You must select a monster");
<                        return;
<                }
<               
<                if(c->IsGrouped())
<                {
<                        bool haspuller = false;
<                        Group *g = c->GetGroup();
<                        for(int i=0; i<MAX_GROUP_MEMBERS; i++)
<                        {
<                                if(g && g->members[i] && g->members[i]->IsBot() && !strcasecmp(g->members[i]->GetName() , sep->arg[2]))
<                                {
<
<                                        haspuller = true;
<                                        Mob *puller = g->members[i];
<                                        if (puller->CastToBot()->IsArcheryRange(target))
<                                        {
<                                                puller->Say("Trying to Pull %s \n", target->GetCleanName());
<                                                puller->CastToBot()->BotRangedAttack(target);
<                                        } else {
<                                                puller->Say("Out of Range %s \n", target->GetCleanName());
<                                        }
<                                }
<                        }
<                        if(!haspuller) {
<                                c->Message(15, "You must have an Puller in your group.");
<                        }
<                }
<                return;
<
<        }
<

Function for Caster.
bot tank pulling any mobs =)

Congdar 05-08-2011 08:24 PM

committed to r1891


All times are GMT -4. The time now is 09:34 AM.

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