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

This is a pretty basic change guys.

You'll need to add the special ability. Here's an example:

Code:
common.h

	IGNORE_ROOT_AGGRO_RULES = 42,
	CASTING_RESIST_DIFF = 43,
	COUNTER_AVOID_DAMAGE = 44,
	PROX_AGGRO = 45,
	ALWAYS_AGGRO = 46, <-----
	MAX_SPECIAL_ATTACK = 47
Then, just add it in where it fits your goal. Such as:

Code:
aggro.cpp

Mob::CheckWillAggro

   ...

	if (RuleB(Aggro, UseLevelAggro) && ((
		( GetLevel() >= 18 )
		||(GetBodyType() == BT_Undead)
		||( mob->IsClient() && mob->CastToClient()->IsSitting() )
		||( mob->GetLevelCon(GetLevel()) != CON_GREEN )
		||( GetSpecialAbility(ALWAYS_AGGRO) ))
After that, add the special ability to the NPC's that you desire. Voilą.

That function is so abhorrent it deserves an award.
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote