@LabelIndex 26134
@StringIndex 0
class 0 raid_archer : raid_private_standard {
parameter:
	int	LongRangePhysicalSpecial_a = 458752001;

handler:
	EventHandler CREATED() {
		myself.i_ai2 = 0;
		super;
	}

	EventHandler ATTACKED(attacker,damage) {
		if( myself.i_ai2 == 0 && myself::DistFromMe(attacker) < 100 ) {
			myself::AddTimerEx(100002,2000);
			myself.i_ai2 = 1;
			myself.c_ai1 = attacker;
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 100002 ) {
			myself::AddFleeDesire(myself.c_ai1,10000);
			myself.i_ai2 = 0;
		}
		super;
	}

	EventHandler PARTY_ATTACKED(attacker,private,damage) {
		if( myself::IsNullCreature(myself.top_desire_target) == 0 ) {
			if( ( ( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) && attacker == myself.top_desire_target ) && gg::Rand(20) < 1 ) {
				myself::AddUseSkillDesire(attacker,LongRangePhysicalSpecial_a,0,1,1000000);
			}
		}
		super;
	}

	EventHandler SEE_SPELL(speller,skill_name_id) {
		if( myself::IsNullCreature(myself.top_desire_target) == 0 ) {
			if( speller == myself.top_desire_target && gg::Rand(20) < 1 ) {
				myself::AddUseSkillDesire(speller,LongRangePhysicalSpecial_a,0,1,1000000);
			}
		}
		super;
	}

}
