@LabelIndex 26036
@StringIndex 0
class 0 raid_private_standard : default_npc {
parameter:
	float	Attack_DecayRatio = 6.600000;
	float	UseSkill_DecayRatio = 66000.000000;
	float	Attack_BoostValue = 300.000000;
	float	UseSkill_BoostValue = 100000.000000;
	int	different_level_9_attacked = 295895041;
	int	different_level_9_see_spelled = 276234241;

handler:
	EventHandler NO_DESIRE() {
		if( myself::IsMyBossAlive() ) {
			myself::AddFollowDesire(myself.boss,5);
		} else {
			myself::AddMoveAroundDesire(10,5);
		}
	}

	EventHandler CREATED() {
		myself::AddTimerEx(1001,2000);
		if( myself::IsMyBossAlive() == 0 ) {
			myself::Despawn();
		}
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 1001 ) {
			if( myself::IsNullCreature(myself.boss) == 0 && myself::DistFromMe(myself.boss) > 500 && myself::IsMyBossAlive() != 0 && myself.p_state != 3 ) {
				myself::InstantTeleport(myself.sm,gg::FloatToInt(myself.boss.x),gg::FloatToInt(myself.boss.y),gg::FloatToInt(myself.boss.z));
			}
			if( gg::Rand(3) < 1 ) {
				myself::RandomizeAttackDesire();
			}
			if( myself::IsMyBossAlive() == 0 ) {
				myself::Despawn();
			}
			myself::AddTimerEx(1001,( 60 * 1000 ));
		}
	}

	EventHandler PARTY_ATTACKED(attacker,private,damage,i0,c0) {
		if( attacker.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(attacker,myself::Skill_GetAbnormalType(different_level_9_attacked)) == -1 ) {
				if( different_level_9_attacked == 295895041 ) {
					myself::CastBuffForQuestReward(attacker,different_level_9_attacked);
					myself::RemoveAttackDesire(attacker.id);
					return;
				} else {
					myself::CastBuffForQuestReward(attacker,different_level_9_attacked);
				}
			}
		}
		if( private == myself.sm ) {
			i0 = 10;
		} else {
			i0 = ( 8 + gg::Rand(13) );
		}
		if( gg::GetAbnormalLevel(attacker,myself::Skill_GetAbnormalType(295895041)) == -1 ) {
			if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
				if( damage == 0 ) {
					damage = 1;
				}
				myself::AddAttackDesire(attacker,1,( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) * 20000 ));
			}
		}
		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,gg::FloatToInt(myself.top_desire_target.x),gg::FloatToInt(myself.top_desire_target.y),gg::FloatToInt(myself.top_desire_target.z));
			} else {
				myself::RemoveAllAttackDesire();
				if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
					if( damage == 0 ) {
						damage = 1;
					}
					myself::AddAttackDesire(attacker,1,( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) * 20000 ));
				}
				myself::InstantTeleport(myself.sm,gg::FloatToInt(attacker.x),gg::FloatToInt(attacker.y),gg::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 SEE_SPELL(speller,skill_name_id) {
		if( speller.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(speller,myself::Skill_GetAbnormalType(different_level_9_see_spelled)) == -1 ) {
				if( different_level_9_see_spelled == 295895041 ) {
					myself::CastBuffForQuestReward(speller,different_level_9_see_spelled);
					myself::RemoveAttackDesire(speller.id);
					return;
				} else {
					myself::CastBuffForQuestReward(speller,different_level_9_see_spelled);
				}
			}
		}
		if( myself::Skill_GetEffectPoint(skill_name_id) > 0 ) {
			if( myself::IsNullCreature(myself.top_desire_target) == 0 ) {
				if( myself.p_state == 3 && myself.top_desire_target != speller ) {
					myself::AddAttackDesire(speller,1,( ( ( myself::Skill_GetEffectPoint(skill_name_id) / myself.sm.max_hp ) * 2000 ) * 150 ));
				}
			}
		}
		if( myself::IsNullCreature(myself.top_desire_target) == 0 ) {
			if( myself::GetPathfindFailCount() > 10 && speller == myself.top_desire_target && gg::FloatToInt(myself.sm.hp) != gg::FloatToInt(myself.sm.max_hp) ) {
				myself::InstantTeleport(myself.sm,gg::FloatToInt(speller.x),gg::FloatToInt(speller.y),gg::FloatToInt(speller.z));
			}
		}
	}

	EventHandler PARTY_DIED(private) {
		if( private == myself.boss ) {
			myself::Despawn();
		}
	}

}
