string Name	= "精锐巡逻士兵_1";
int Model =	8;
int Weapon = 15;
int Weapon2 = 0;
int Team = 2;
int View = 300;
int Think = 800;
int	Attack1	= 35;
int Attack2 = 35;
int Attack3 = 30;
int	Guard =	0;
int	Dodge =	0;
int Jump = 10;
int Look = 90;
int Burst = 30;
int Aim = 100;
int GetItem = 10;
int Spawn = 58;
int HP = 800;
	

int g_selfAddr;
int g_self;
int m;
int player;
ChangeNPCSbBehavior()
{
if (GetHP(g_self)>=500 && GetHP(g_self)<800 && m==0){
			Perform(g_self, "guard", 1);
			Say(g_self, "偷袭！我要把你揪出来！！");
m=1;}

if (m==1){
ChangeBehavior(g_self, "follow",  player);
m=2;}

}
OnInit(int this)
{
	g_selfAddr = this;
}

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

OnUpdate()
{
	player = GetAnyChar("player");
ChangeNPCSbBehavior();

}
