string Name	= "长枪";
int Model =	6;
int Weapon = 16;
int Weapon2 = 7;
int Team = 1;
int View = 400;
int Think = 100;
int	Attack1	= 30;
int Attack2 = 25;
int Attack3 = 25;
int	Guard =	40;
int	Dodge =	10;
int Jump = 30;
int Look = 5;
int Burst = 50;
int Aim = 100;
int GetItem = 0;
int Spawn = 25;
int HP = 4000;
int timer = 0;	
int now = 0;

// init function
int g_selfAddr;
int g_self;
void OnInit(int this)
{
	g_selfAddr = this;
}
void OnStart()
{
	int c = GetSelf(g_selfAddr);
	int player = GetChar("player");
	ChangeBehavior(c, "idle");
}

void  OnUpdate()
{
	int c = GetSelf(g_selfAddr);
	int player = GetChar("player");
	int now = GetGameTime();
SetTarget(0, "char", player);
SetTarget(3, "char", g_selfAddr);
if (Distance(0, 3) < 100&&now>timer)
{Perform(c, "faceto", player);timer=now+5;}
}