View Single Post
  #3  
Old 07-09-2011, 05:48 AM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

Had to update Bot.cpp
I always run a chanter and cleric and didnt notice that clerics weren't pacifying. Added a more proper check for chanter in the group.

Use this diff instead of the one above.

Code:
10079d10078
< 		c->Message(0, "#bot setfollowdistance ### - sets target bots follow distance to ### (ie 30 or 250).");
10457,10481d10455
< 	//Criimson added Bot follow distance - SetFollowDistance
< 	if(!strcasecmp(sep->arg[1], "setfollowdistance")) {
< 		if((c->GetTarget() == NULL) || (c->GetTarget() == c) || (!c->GetTarget()->IsBot()) ) {
< 			c->Message(15, "You must target a bot!");
< 		}
< 		else {
< 			int32 BotFollowDistance = atoi(sep->arg[2]);
< 			c->GetTarget()->SetFollowDistance(BotFollowDistance);
< 		}
< 
< 		return;
< 	}
< 
< 
< 	if(!strcasecmp(sep->arg[1], "picklock")) {
< 		if((c->GetTarget() == NULL) || (c->GetTarget() == c) || !c->GetTarget()->IsBot() || (c->GetTarget()->GetClass() != ROGUE)) {
< 			c->Message(15, "You must target a rogue bot!");
< 		}
< 		else {
< 			entity_list.BotPickLock(c->GetTarget()->CastToBot());
< 		}
< 
< 		return;
< 	}
< 
10939,10946d10912
< 							//Criimson: Reordered code - was giving priority to bard
< 						case DRUID:
< 							// Unless we have a ranger, druid is next best.
< 							if(TrackerClass != RANGER) {
< 								Tracker = g->members[i];
< 								TrackerClass = DRUID;
< 							}
< 							break;
10954c10920,10926
< 			
---
> 						case DRUID:
> 							// Unless we have a ranger, druid is next best.
> 							if(TrackerClass != RANGER) {
> 								Tracker = g->members[i];
> 								TrackerClass = DRUID;
> 							}
> 							break;
11377d11348
< 				bool DoesGroupHaveEnchanter = false;
11380,11403c11351
< 					if(g && g->members[i] && g->members[i]->IsBot() && (g->members[i]->GetClass() == ENCHANTER)) {
< 						DoesGroupHaveEnchanter = true;
< 					}
< 				}
< 
< 				for(int i=0; i<MAX_GROUP_MEMBERS; i++) {
< 					//Criimson - seperated cleric and chanter so chanter is primary
< 					if(g && g->members[i] && g->members[i]->IsBot() && (g->members[i]->GetClass() == ENCHANTER)) {
< 						Bot *pacer = g->members[i]->CastToBot();
< 						pacer->Say("Trying to pacify %s \n", target->GetCleanName());
< 
< 						if(pacer->Bot_Command_CalmTarget(target)) {
< 							if(target->FindType(SE_Lull) || target->FindType(SE_Harmony) || target->FindType(SE_Calm))
< 							//if(pacer->IsPacified(target))
< 								c->Message(0, "I have successfully pacified %s.", target->GetCleanName());
< 								return;
< 							/*else
< 								c->Message(0, "I failed to pacify %s.", target->GetCleanName());*/
< 						}
< 						else
< 							c->Message(0, "I failed to pacify %s.", target->GetCleanName());
< 					}
< 					//Criimson - seperated cleric and chanter so chanter is primary
< 					if(g && g->members[i] && g->members[i]->IsBot() && (g->members[i]->GetClass() == CLERIC) && (DoesGroupHaveEnchanter == false)) {
---
> 					if(g && g->members[i] && g->members[i]->IsBot() && ((g->members[i]->GetClass() == ENCHANTER) || g->members[i]->GetClass() == CLERIC)) {
11411d11358
< 								return;
13311,13312c13258
< 	//CRIIMSON: Changed so heal based on health percentage is different for hybrids
< 	if( botCasterClass == CLERIC || botCasterClass == DRUID || botCasterClass == SHAMAN) {
---
> 	if( botCasterClass == CLERIC || botCasterClass == DRUID || botCasterClass == SHAMAN || botCasterClass == PALADIN || botCasterClass == BEASTLORD || botCasterClass == RANGER) {
13357,13402d13302
< 		//CRIIMSON: Changed so heal based on health percentage is different for hybrids
< 		if( botCasterClass == PALADIN || botCasterClass == BEASTLORD || botCasterClass == RANGER) {
< 		//If AI_EngagedCastCheck() said to the healer that he had to heal
< 		if( iSpellTypes == SpellType_Heal )	{
< 			// check in group
< 			if(caster->HasGroup()) {
< 				Group *g = caster->GetGroup();
< 				
< 				if(g) {
< 					for(int i = 0; i < MAX_GROUP_MEMBERS; i++) {
< 						if(g->members[i] && !g->members[i]->qglobal) {
< 							if(g->members[i]->IsClient() && g->members[i]->GetHPRatio() < 20) {
< 								if(caster->AICastSpell(g->members[i], iChance, SpellType_Heal))
< 									return true;
< 							}
< 							else if((g->members[i]->GetClass() ==  WARRIOR || g->members[i]->GetClass() == PALADIN || g->members[i]->GetClass() == SHADOWKNIGHT) &&
< 								g->members[i]->GetHPRatio() < 20) 
< 							{
< 								if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))
< 									return true;
< 							}
< 							else if(g->members[i]->GetClass() ==  ENCHANTER && g->members[i]->GetHPRatio() < 20) {
< 								if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))
< 									return true;
< 							}
< 							else if(g->members[i]->GetHPRatio() < 20) {
< 								if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))
< 									return true;
< 							}
< 						}
< 
< 						if(g->members[i] && !g->members[i]->qglobal && g->members[i]->HasPet() && g->members[i]->GetPet()->GetHPRatio() < 20) {
< 							if(g->members[i]->GetPet()->GetOwner() != caster && caster->IsEngaged() && g->members[i]->IsCasting() && g->members[i]->GetClass() != ENCHANTER )
< 								continue;
< 
< 							if(caster->AICastSpell(g->members[i]->GetPet(), 100, SpellType_Heal))
< 								return true;
< 						}
< 					}
< 				}
< 			}
< 
< 			// TODO: raid heals
< 		}
< 	}
< 	
13434d13333
<
Criimson

Next I will be working on:
Character's pets breaking mez - bot pets work properly, but personal pets just hit the first thing that hits you. That is like early live (in fact when EQ was released I played a necro and i remember if I died my pet would go ape shit on the group. Was funny looking back, but they had to change it quickly because people got mad when they got wiped by a dead necros pet), but was changed at some point so pets stopped breaking mez.
Personal pet trying to keep attacking a dead MoB that has a dot on player.
Reply With Quote