string  gsNames = " ";
balujunrenwumingcheng(string prefix, int Model)
{
	gsNames = prefix+"_";

	if(Model== 3){gsNames = gsNames+ "特战队";}
	if(Model== 10){gsNames = gsNames+ "飞虎队";}
	if(Model== 18){gsNames = gsNames+ "行动组";}
	if(Model== 11){gsNames = gsNames+ "游击队";}
	if(Model== 9){gsNames = gsNames+ "蛙蛇";}
	if(Model== 90){gsNames = gsNames+ "警示厅卫队";}
	if(Model== 2){gsNames = gsNames+ "海豹突击队";}
	if(Model== 922){gsNames = gsNames+ "北极复仇者";}
	return 0;
}
xiaoshibenmingcheng(string prefix, int Model)
{
	gsNames = prefix+"_";

	if(Model== 30){gsNames = gsNames+ "贼寇";}
	if(Model== 31){gsNames = gsNames+ "倭寇";}
	if(Model== 32){gsNames = gsNames+ "跑堂狗";}
	if(Model== 33){gsNames = gsNames+ "日野";}
	if(Model== 34){gsNames = gsNames+ "北川";}
	if(Model== 35){gsNames = gsNames+ "田中";}
	return 0;
}
npcxljs(int id, int hp, int atk)
{
	Say(id,"生命: ", hp/10, ".", hp%10,"   受创: ", atk/10, ".", atk%10);
	return 0;
}
npcggjwuqi1()
{

	int weapon;
	int lxqj = Rand(5);
	if(lxqj==0){weapon=3;}
	if(lxqj==1){weapon=12;}
	if(lxqj==2){weapon=21;}
	if(lxqj==3){weapon=30;}
	if(lxqj==4){weapon=21;}	

	return weapon-0;
}
npcggjwuqi2()
{

	int weapon;
	int lxqj = Rand(2);
	if(lxqj==0){weapon=35;}
	if(lxqj==1){weapon=44;}

	return weapon-0;
}

npcdj(int id){

Perform(id, "use", 41);
Perform(id, "use", 40);
Perform(id, "use", 34);
Perform(id, "use", 19);
Perform(id, "use", 5);
Perform(id, "use", 4);
Perform(id, "use", 3);
Perform(id, "use", 8);
 } 
julipanduan(int k1,int k2)  // 距离判断
{
   SetTarget(0, "char", k1);
   SetTarget(1, "char", k2);
   return Distance(0,1);
}
daodadidian(int man,int place)  // 到达地点
{
   SetTarget(0, "char", man);
   SetTarget(1, "waypoint", place);
   return Distance(0,1);
}

zhidingdidian(int id,int fx)     // 指定地点奔跑
{
	SetTarget(0, "waypoint", fx);
	ChangeBehavior(id, "attacktarget", 0);
}
npcsiwang(int startId, int stopId)
{
	int i;
	int allys = 0;
	int enemys = 0;
	int anys = 0;
	int dieds = 0;
	int g_tmpReturn;

	for(i=startId; i<=stopId; i++)
	{
		if(GetTeam(i)==0)		{anys++;if(GetHP(i)<=0){dieds++;}}
		if(GetTeam(i)==1 && GetHP(i)>0)	{allys++;}
		if(GetTeam(i)==2)		{enemys++;if(GetHP(i)<=0){dieds++;}}
	}

	if(anys+enemys <= dieds)
	{
		g_tmpReturn = 1;
	}
	else
	{
		g_tmpReturn = 0;
	}
	return g_tmpReturn-0;
}
npclikai1(int startId, int stopId)
{
	int i;
	int g_tmpReturn = 0;

	for(i=startId; i<=stopId; i++)
	{
		if(GetTeam(i)==1 && GetHP(i)<=0)
		{
			if(GetMaxHP(i) > 0)
			{
				RemoveNPC(i);
				g_tmpReturn ++;
			}
		}
	}

	return g_tmpReturn-0;
}

npclikai2(int startId, int stopId)
{
	int i;
	int g_tmpReturn = 0;

	for(i=startId; i<=stopId; i++)
	{
		if((GetTeam(i)==2 || GetTeam(i)==0) && GetHP(i)<=0)
		{
			if(GetMaxHP(i) > 0)
			{
				RemoveNPC(i);
				g_tmpReturn ++;
			}
		}
	}

	return g_tmpReturn-0;
}
npcrenshu1(int startId, int stopId)
{
	int i;
	int ret = 0;
	for(i=startId; i<stopId; i++)
	{
		if(GetTeam(i)==1)
		{
			ret ++;
		}
	}
	return ret-0;
}


npcrenshu2(int startId, int stopId) 
{
	int i;
	int ret = 0;
	for(i=startId; i<stopId; i++)
	{
		if((GetTeam(i)==2 || GetTeam(i)==0))
		{
			ret ++;
		}
	}
	return ret-0;
}
