class 1 party_leader_ag_wizard_casting_rangecurse_stone : party_leader_wizard_casting_rangecurse_stone
{
handler:
	EventHandler SEE_CREATURE(creature)
	{
		if( creature.is_pc != 0 )
		{
			if( myself::OwnItemCount(creature,FriendShip1) >= 1 || myself::OwnItemCount(creature,FriendShip2) >= 1 || myself::OwnItemCount(creature,FriendShip3) >= 1 || myself::OwnItemCount(creature,FriendShip4) >= 1 || myself::OwnItemCount(creature,FriendShip5) >= 1 )
			{
			}
			else if( creature.is_pc == 0 && myself::IsInCategory(11,creature.npc_class_id) == 0 )
			{
				return;
			}
			if( SetAggressiveTime == -1 )
			{
				if( myself::GetLifeTime() >= ( gg::Rand(5) + 3 ) && myself::InMyTerritory(myself.sm) )
				{
					myself::AddAttackDesire(creature,1,200);
				}
			}
			else if( SetAggressiveTime == 0 )
			{
				if( myself::InMyTerritory(myself.sm) )
				{
					myself::AddAttackDesire(creature,1,200);
				}
			}
			else if( myself::GetLifeTime() > ( SetAggressiveTime + gg::Rand(4) ) && myself::InMyTerritory(myself.sm) )
			{
				myself::AddAttackDesire(creature,1,200);
			}
			if( myself::GetLifeTime() > -1 && myself::InMyTerritory(myself.sm) )
			{
				myself::AddAttackDesire(creature,1,200);
			}
			super;
		}
		else if( myself::IsInCategory(11,creature.npc_class_id) != 0 )
		{
			if( myself::OwnItemCount(creature.master,FriendShip1) >= 1 || myself::OwnItemCount(creature.master,FriendShip2) >= 1 || myself::OwnItemCount(creature.master,FriendShip3) >= 1 || myself::OwnItemCount(creature.master,FriendShip4) >= 1 || myself::OwnItemCount(creature.master,FriendShip5) >= 1 )
			{
			}
			else if( creature.is_pc == 0 && myself::IsInCategory(11,creature.npc_class_id) == 0 )
			{
				return;
			}
			if( SetAggressiveTime == -1 )
			{
				if( myself::GetLifeTime() >= ( gg::Rand(5) + 3 ) && myself::InMyTerritory(myself.sm) )
				{
					myself::AddAttackDesire(creature,1,200);
				}
			}
			else if( SetAggressiveTime == 0 )
			{
				if( myself::InMyTerritory(myself.sm) )
				{
					myself::AddAttackDesire(creature,1,200);
				}
			}
			else if( myself::GetLifeTime() > ( SetAggressiveTime + gg::Rand(4) ) && myself::InMyTerritory(myself.sm) )
			{
				myself::AddAttackDesire(creature,1,200);
			}
			if( myself::GetLifeTime() > -1 && myself::InMyTerritory(myself.sm) )
			{
				myself::AddAttackDesire(creature,1,200);
			}
			super;
		}
		else if( creature.is_pc == 0 && myself::IsInCategory(11,creature.npc_class_id) == 0 )
		{
			return;
		}
		if( SetAggressiveTime == -1 )
		{
			if( myself::GetLifeTime() >= ( gg::Rand(5) + 3 ) && myself::InMyTerritory(myself.sm) )
			{
				myself::AddAttackDesire(creature,1,200);
			}
		}
		else if( SetAggressiveTime == 0 )
		{
			if( myself::InMyTerritory(myself.sm) )
			{
				myself::AddAttackDesire(creature,1,200);
			}
		}
		else if( myself::GetLifeTime() > ( SetAggressiveTime + gg::Rand(4) ) && myself::InMyTerritory(myself.sm) )
		{
			myself::AddAttackDesire(creature,1,200);
		}
		if( myself::GetLifeTime() > -1 && myself::InMyTerritory(myself.sm) )
		{
			myself::AddAttackDesire(creature,1,200);
		}
		super;
	}

}
