class 1 raid_boss_party : raid_boss_standard
{
parameter:
	string	Privates = "orc:party_private:1:20sec";

handler:
	EventHandler CREATED()
	{
		myself.sm.weight_point = 10;
		myself::CreatePrivates(Privates);
		super;
	}

	EventHandler PARTY_ATTACKED(attacker,private,damage,i0,c0)
	{
		if( private != myself.sm )
		{
			if( attacker.level <= ( myself.sm.level + 8 ) )
			{
				if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
				{
					if( damage == 0 )
					{
						damage = 1;
					}
					myself::AddAttackDesire(attacker,1,( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) * 20000 ));
				}
			}
			i0 = ( 8 + gg::Rand(13) );
			if( myself::GetPathfindFailCount() > i0 )
			{
				if( myself::IsNullCreature(myself.top_desire_target) == 1 )
				{
				}
				else if( myself::DistFromMe(myself.top_desire_target) < 1000 )
				{
					myself::InstantTeleport(myself.sm,myself::FloatToInt(myself.top_desire_target.x),myself::FloatToInt(myself.top_desire_target.y),myself::FloatToInt(myself.top_desire_target.z));
				}
				else
				{
					myself::RemoveAllAttackDesire();
					if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
					{
						if( damage == 0 )
						{
							damage = 1;
						}
						myself::AddAttackDesire(attacker,1,( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) * 20000 ));
					}
					myself::InstantTeleport(myself.sm,myself::FloatToInt(attacker.x),myself::FloatToInt(attacker.y),myself::FloatToInt(attacker.z));
				}
			}
		}
		if( myself.sm.in_peacezone != 0 )
		{
			myself::InstantTeleport(myself.sm,myself.start_x,myself.start_y,myself.start_z);
			myself::RemoveAllAttackDesire();
		}
	}

	EventHandler PARTY_DIED(private)
	{
		if( private != myself.sm )
		{
			myself::CreateOnePrivate(private.npc_class_id,private.ai,private.weight_point,( 270 + gg::Rand(60) ));
		}
	}

}
