View Single Post
  #20  
Old 04-14-2017, 03:24 AM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

Okay, let me try this again.

If it has the ALWAYS_AGGRO special ability. It will *ALWAYS* aggro if it's KoS. It doesn't matter the body type, level, intelligence, etc. It WILL aggro if this is set in my code.

Now, assisting (or yelling for help) is different, and it will require an additional change.

Code:
aggro.cpp

void EntityList::AIYellForHelp(Mob* sender, Mob* attacker)

   ...

		//if they are in range, make sure we are not green...
			//then jump in if they are our friend
			if(mob->GetSpecialAbility(ALWAYS_ASSIST) || mob->GetLevel() >= 50 || attacker->GetLevelCon(mob->GetLevel()) != CON_GREEN)
Code:
common.h

	PROX_AGGRO = 45,
	ALWAYS_AGGRO = 46,
	ALWAYS_ASSIST = 47,
	MAX_SPECIAL_ATTACK = 48
TO RECAP:

If a mob is set to (46) and it's KoS. It will ALWAYS ATTACK REGARDLESS OF ANYTHING.

If a mob is set to (47). It will ALWAYS ASSIST ITS FACTION REGARDLESS OF ANYTHING.

If it's set to both 46 and 47 it will always do both.
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote