string Name	= "夜魅魂";
int Model =	38;
int Weapon = 5;
int Weapon2 = 14;
int Team = 1;
int View = 200;
int Think = 96;
int	Attack1	= 25;
int Attack2 = 25;
int Attack3 = 0;
int	Guard =	50;
int	Dodge =	0;
int Jump = 15;
int Look = 20;
int Burst = 35;
int Aim = 10;
int GetItem = 10;
int Spawn = 142;
int HP = 20000;
	

int g_selfAddr;
int g_self;
int Stat;
int NPC1;
int NPC2;

OnInit(int this)
{
	g_selfAddr = this;
}

OnStart()
{
	g_self = GetSelf(g_selfAddr);
	ChangeBehavior(g_self, "idle");
}

OnUpdate()
{
	NPC1 = GetAnyChar("锦衣卫_1");
	NPC2 = GetAnyChar("菁英部队_1");
if (Stat==0 && NPC2>0 && GetHP(NPC2)>0){Stat++;}
if (Stat==1)
{
View = 0;
Attack1	= 0;
Attack2 = 0;
Attack3 = 0;
Guard =	0;
UpdateAIAttrib(g_self);Stat=2;

}

if (Stat==2)
{
SetTarget(0, "waypoint", 130);
SetTarget(1, "char", g_self);
	if(Distance(0,1) < 80)
	{
View = 250;
Attack1	= 5;
Attack2 = 5;
Attack3 = 0;
Guard =	90;
UpdateAIAttrib(g_self);Stat=3;
	}
}

if (Stat==3 && NPC1>0 && GetHP(NPC1)>0){Stat++;}
if (Stat==4)
{
View = 200;
Attack1	= 25;
Attack2 = 25;
Attack3 = 0;
Guard =	50;
UpdateAIAttrib(g_self);Stat=5;

}

}
