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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2012, 06:57 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

or... you can add the lines in red here:

Code:
// AI Processing for the Bot object
void Bot::AI_Process() {
    _ZP(Mob_BOT_Process);

    if(!IsAIControlled())
        return;

    int8 botClass = GetClass();
    uint8 botLevel = GetLevel();

    if(IsCasting() && (botClass != BARD))
        return;

    // A bot wont start its AI if not grouped
    if(!GetBotOwner() || !IsGrouped()) {
        return;
    }

    if(GetAppearance() == eaDead)
        return;

    Mob* BotOwner = GetBotOwner();

    // The bots need an owner
    if(!BotOwner)
        return;

    try {
        if(BotOwner->CastToClient()->IsDead()) {
            SetTarget(0);
            SetBotOwner(0);
            return;
        }
    }
    catch(...) {
        SetTarget(0);
        SetBotOwner(0);
        return;
    }
    
    if(!GetFollowID()) {
        if(GetArchetype() != ARCHETYPE_MELEE) {
            if (GetManaPercent() < 100)
                BotMeditate(true);
            else
                BotMeditate(false);
        }
        return;
    }
this should cause any bot that isn't pure melee to meditate if they are set to guard and have less than 100% mana. code compiled, but otherwise untested.
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 03:14 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