#include "shenghua.pst"
#include "shenghua1.pst"
string Name = "";
int Model = jiangshixuanze();
int Weapon =  46;
int Weapon2 = 28;
int Team = 2;
int View = 2500+Rand(2500);
int Think =150;
int Attack1 = 30;
int Attack2 = 25;
int Attack3 = 45;
int Guard = 0;
int Dodge = 0;
int Jump = 5+Rand(15);
int Look = 1000;
int Burst = 100;
int Aim = 100;
int GetItem = 0;
int Spawn = Rand(120);
int HP = jiangshishengming(Model);
int hpf = 120-Rand(100);

int npc;
int Stat;
int g_selfAddr;
OnInit(int this)
{
	jiangshimingzi(Name,Model);
    	Name = gsNames;
	g_selfAddr = this;
}


OnStart()
{
	npc = GetSelf(g_selfAddr);
	ChangeBehavior(npc, "run");

}
NPCDAOJU(){

int LXx=Rand(5);
if(LXx==0){Perform(npc,"use",41);}
if(LXx==1){Perform(npc,"use",34);}
if(LXx==2){Perform(npc,"use",5);}
if(LXx==3){Perform(npc,"use",4);}
if(LXx==4){Perform(npc,"use",3);}
}

OnUpdate()
{

	if(Stat==0)
	{
		Stat++;
		npcztxs1(npc, HP);	
		return 0;
	}
        if(Stat+60<GetGameTime()){
        Stat=GetGameTime();
        NPCDAOJU();
        NPCDAOJU();
       }
}