class 1 agit_vampire_archer : agit_fortress_of_the_dead
{
parameter:
	int	DDMagic1 = 1040903;
	int	DDMagic2 = 1294343;

handler:
	EventHandler ATTACKED(attacker)
	{
		if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
		{
			if( myself::DistFromMe(attacker) < 800 )
			{
				if( myself::Skill_GetConsumeMP(DDMagic1) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic1) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic1) == 0 )
				{
					myself::AddUseSkillDesire(attacker,DDMagic1,0,0,1000000);
				}
			}
			else if( myself::DistFromMe(attacker) >= 800 )
			{
				if( myself::Skill_GetConsumeMP(DDMagic2) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic2) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic2) == 0 )
				{
					myself::AddUseSkillDesire(attacker,DDMagic2,0,0,1000000);
				}
			}
		}
		super;
	}

	EventHandler SEE_SPELL(speller,skill_name_id,target)
	{
		if( speller.is_pc != 0 || myself::IsInCategory(11,speller.npc_class_id) )
		{
			if( myself::DistFromMe(speller) < 800 )
			{
				if( myself::Skill_GetConsumeMP(DDMagic1) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic1) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic1) == 0 )
				{
					myself::AddUseSkillDesire(speller,DDMagic1,0,0,1000000);
				}
			}
			else if( myself::DistFromMe(speller) >= 800 )
			{
				if( myself::Skill_GetConsumeMP(DDMagic2) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic2) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic2) == 0 )
				{
					myself::AddUseSkillDesire(speller,DDMagic2,0,0,1000000);
				}
			}
		}
		super;
	}

	EventHandler CLAN_ATTACKED(attacker,victim,damage)
	{
		if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
		{
			if( myself::DistFromMe(attacker) < 800 )
			{
				if( myself::Skill_GetConsumeMP(DDMagic1) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic1) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic1) == 0 )
				{
					myself::AddUseSkillDesire(attacker,DDMagic1,0,0,1000000);
				}
			}
			else if( myself::DistFromMe(attacker) >= 800 )
			{
				if( myself::Skill_GetConsumeMP(DDMagic2) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic2) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic2) == 0 )
				{
					myself::AddUseSkillDesire(attacker,DDMagic2,0,0,1000000);
				}
			}
		}
		super;
	}

}
