string Name	= "锦衣卫千户_破坏者";
int Model =	26;
int Weapon = 23;
int Weapon2 = 14;
int Team = 2;
int View = 10000;
int Think = 30000;
int	Attack1	= 35;
int Attack2 = 30;
int Attack3 = 35;
int	Guard =	0;
int	Dodge =	0;
int Jump = 15;
int Look = 90;
int Burst = 30;
int Aim = 10;
int GetItem = 10;
int Spawn = 167;
int HP = 12000;
	

int g_selfAddr;
int g_self;
int Stat;
int now;
int HPlast=0;
int realHP=0;
int i;
int time;
int Id;

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

SaySub(int id, int sd, string say1, string say2, string say3, string say4, string say5)
{
       if (sd == 0)
       {
           Say(id, say1);
       }
       if (sd == 1 )
       {
           Say(id, say2);
       }
       if (sd == 2 )
       {
           Say(id, say3);
       }
       if (sd == 3)
       {
           Say(id, say4);
       }
       if (sd == 4)
       {
           Say(id, say5);
       }
       return 0;
}

OnUpdate()
{
	now = GetGameTime();

	if (Stat==0)
	{Stat=1;realHP=GetHP(g_self);HPlast=realHP;}


int HPnow=GetHP(g_self);
if(HPnow==realHP&&HPlast<realHP){HPlast=realHP;}

if(now > time && HPnow<HPlast && i==0 && GetHP(g_self)>=3000)
{
Id = Rand(2);
if(Id==0)
{                        
                        Attack1 = 0;
                        Attack2 = 0;
                        Attack3 = 0;
                        Guard =	100;
                        Burst = 70;
SaySub(g_self,Rand(8),"呵呵！这样就对了...呵呵...","再来啊...杀死我啊...哈哈哈","来吧！来吧！");
		UpdateAIAttrib(g_self);time= GetGameTime() + 2+Rand(2);i=1;}
HPlast=HPnow;
}
if(now > time && i==1)
{                        
                        Attack1 = 35;
                        Attack2 = 30;
                        Attack3 = 35;
			Guard  = 0;
                        Burst = 85;
		UpdateAIAttrib(g_self);time= GetGameTime() + 2+Rand(2);i=0;}



}
