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 =)