@LabelIndex 26427
@StringIndex 0
class 0 ai_gludio_bow_guard : ai_gludio_hold {
handler:
	EventHandler ATTACKED(attacker,damage) {
		if( myself::IsInCategory(12,attacker.class_id) != 0 && myself::Castle_GetPledgeState(attacker.master) == 2 ) {
		} else if( myself::Castle_GetPledgeState(attacker) != 2 ) {
			if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
				myself::AddAttackDesire(attacker,1,( ( ( damage / myself.sm.max_hp ) / 0.050000 ) * 100 ));
			}
		}
		if( myself.sm.in_peacezone != 0 ) {
			myself::InstantTeleport(myself.sm,myself.start_x,myself.start_y,myself.start_z);
			myself::RemoveAllAttackDesire();
		}
	}

	EventHandler CLAN_ATTACKED(attacker,damage) {
		if( myself::IsInCategory(12,attacker.class_id) != 0 && myself::Castle_GetPledgeState(attacker.master) == 2 ) {
		} else if( myself::Castle_GetPledgeState(attacker) != 2 ) {
			if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
				myself::AddAttackDesire(attacker,1,( ( ( damage / myself.sm.max_hp ) / 0.050000 ) * 50 ));
			}
		}
	}

	EventHandler SPELLED(speller,skill_name_id) {
		if( skill_name_id == 16121857 ) {
			myself::AddAttackDesire(speller,1,50000);
		}
	}

}
