@LabelIndex 55258
@StringIndex 0
class 0 warrior_ag_heretic_priest : warrior_heretic_priest {
handler:
	EventHandler SEE_CREATURE(creature) {
		if( myself.p_state != 3 && myself.p_state != 10 ) {
			myself::BroadcastScriptEvent(10033,gg::GetIndexFromCreature(creature),HelpCastRange);
		}
		if( myself::DistFromMe(creature) <= 40 ) {
			if( myself::Skill_GetConsumeMP(PhysicalSpecial) < myself.sm.mp && myself::Skill_GetConsumeHP(PhysicalSpecial) < myself.sm.hp && myself::Skill_InReuseDelay(PhysicalSpecial) == 0 ) {
				myself::AddUseSkillDesire(creature,PhysicalSpecial,0,0,1000000);
			}
		} else if( myself::DistFromMe(creature) < 500 ) {
			if( myself::Skill_GetConsumeMP(PhysicalSpecial2) < myself.sm.mp && myself::Skill_GetConsumeHP(PhysicalSpecial2) < myself.sm.hp && myself::Skill_InReuseDelay(PhysicalSpecial2) == 0 ) {
				myself::AddUseSkillDesire(creature,PhysicalSpecial2,0,0,1000000);
			}
		}
		if( Hold == 1 ) {
			if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
				return;
			}
			if( myself::GetLifeTime() > SeeCreatureAttackerTime && myself::InMyTerritory(myself.sm) ) {
				myself::AddAttackDesire(creature,0,200);
			}
		} else if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
			return;
		}
		if( myself::GetLifeTime() > SeeCreatureAttackerTime && myself::InMyTerritory(myself.sm) ) {
			myself::AddAttackDesire(creature,1,200);
		}
		super;
	}

}
