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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-20-2015, 04:15 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

#bot resurrectme works correctly, do you have a target when you're doing it?
Code:
if(!strcasecmp(sep->arg[1], "resurrectme"))    {
    Mob *target = c->GetTarget();
    if(target == nullptr || !target->IsCorpse()) {
        c->Message(15, "You must select a corpse!");
        return;
    }

    if(c->IsGrouped()) {
        bool hasrezzer = false;
        Group *g = c->GetGroup();
        for(int i = 0; i < MAX_GROUP_MEMBERS; i++) {
            if(g && g->members[i] && g->members[i]->IsBot() && (g->members[i]->GetClass() == CLERIC)) {
                hasrezzer = true;
                Mob *rezzer = g->members[i];
                rezzer->CastToBot()->BotGroupSay(rezzer->CastToBot(), "Trying to resurrect %s.", target->GetCleanName());
                rezzer->CastToBot()->Bot_Command_RezzTarget(target);
                break;
            }
        }
        
        if(!hasrezzer)
            c->Message(15, "You must have a Cleric in your group!");
    } else
        c->Message(15, "You must have a Cleric in your group!");
    
    return;
}
Side note, bots inherit their runspeed from the mob they're following (you usually):
Code:
if(AImovement_timer->Check()) {
    if(GetFollowID()) {
        Mob* follow = entity_list.GetMob(GetFollowID());
        if(follow) {
            float dist = DistanceSquared(m_Position, follow->GetPosition());
            int speed = follow->GetRunspeed();
            if(dist < GetFollowDistance() + 1000)
                speed = follow->GetWalkspeed();

            if(dist > GetFollowDistance()) {
                CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed);
                if(rest_timer.Enabled())
                    rest_timer.Disable();
                return;
            } else {
                if(moved) {
                    moved = false;
                    SetCurrentSpeed(0);
                }
            }
        }
    }
}
Reply With Quote
  #2  
Old 06-20-2015, 05:42 AM
Tamian
Fire Beetle
 
Join Date: Apr 2004
Posts: 19
Default

I do have the corpse targeted, and I am seeing the "trying to rez" message -- just the rez never comes.
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:45 AM.


 

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