class 1 wizard_corpse_vampire_teleport : wizard_corpse_vampire_basic
{
parameter:
	int	TeleportEffect = 1031169;

handler:
	EventHandler CREATED()
	{
		myself::AddTimerEx(3000,10000);
		super;
	}

	EventHandler SEE_CREATURE(creature)
	{
		if( creature.is_pc == 0 && myself::IsInCategory(11,creature.npc_class_id) == 0 )
		{
			super;
			return;
		}
		if( myself.p_state != 3 && myself::GetLifeTime() > 7 )
		{
			if( myself::DistFromMe(creature) > 200 )
			{
				myself::InstantTeleport(myself.sm,myself::FloatToInt(creature.x),myself::FloatToInt(creature.y),myself::FloatToInt(creature.z));
				if( myself::Skill_GetConsumeMP(TeleportEffect) < myself.sm.mp && myself::Skill_GetConsumeHP(TeleportEffect) < myself.sm.hp && myself::Skill_InReuseDelay(TeleportEffect) == 0 )
				{
					myself::AddUseSkillDesire(myself.sm,TeleportEffect,1,1,1000000);
				}
			}
			if( creature.is_pc == 0 && myself::IsInCategory(11,creature.npc_class_id) == 0 )
			{
				return;
			}
			if( myself::GetLifeTime() > 0 && myself::InMyTerritory(myself.sm) )
			{
				myself::AddAttackDesire(creature,1,200);
			}
		}
	}

	EventHandler TIMER_FIRED_EX(timer_id)
	{
		if( timer_id == 3000 )
		{
			myself::LookNeighbor(500);
			myself::AddTimerEx(3000,10000);
		}
		super;
	}

}
