Thread: BoT Custom Code
View Single Post
  #5  
Old 08-28-2011, 05:49 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Quote:
Originally Posted by Criimson View Post
Something I also didn't really like when playing with my bots.
If I want them to change target while engaged I have to command them to guard then attack. Not efficient at all IMO.

If you add the line

botGroupMember->WipeHateList();

in the function:
void Bot::BotGroupOrderAttack(Group* group, Mob* target, Client* client)

like this:

Code:
if(botGroupMember->GetBotOwnerCharacterID() == client->CharacterID()) {
						botGroupMember->WipeHateList();
						botGroupMember->AddToHateList(target, 1);
It basically wipes the agro list and they will immediately attack what you tell them to
I just committed something similar for bit attack, follow, and guard. I had the issue of bot's pets not following the command and continuing to attack, so I added them in as well. Thanks for the suggestion. This always bothered me as well.
Reply With Quote