// 四方阵 //第1关
int Rule = 5;
int RoundTime = 3;
int PlayerSpawn = 15;
int PlayerSpawnDir = 270;
int PlayerWeapon = 58;
int PlayerWeapon2 = 28;
int PlayerHP = 3000;

int trg0 = 0;
int timer0 = 0;
OnStart()
{
	AddNPC("1关1");
	AddNPC("1关2");
	AddNPC("1关3");
}

OnUpdate()
{
	int player = GetAnyChar("player");
	if (player < 0)
	{
		return 0;
	}
	int c; // BOSS
	int c1;// 头
	int c2;// 兵
	int c3;// 兵
	int now = GetGameTime();
	if (trg0 == 0)
	{
		c1 = GetChar("金枪王"); 
		c2 = GetChar("金枪兵1"); 
		c3 = GetChar("金枪兵2");

		if (c1>=0 &&  c2>=0 && c3>=0 && GetHP(player)>0)
		{
			ChangeBehavior(c3, "patrol", 13, 14, 15, 16);
			Perform(c3, "say", "放心...绝对办好！...");
			Perform(c3, "pause", 12);

			ChangeBehavior(c2, "patrol", 1, 2, 3, 6, 5, 4, 7, 8, 9, 10, 11);
			Perform(c2, "say", "当然知道！..");
			Perform(c2, "pause", 10);

			Perform(c1, "say", " 都给我看好点！你们知道老大的这次是要谁的命.. ");
			Perform(c1, "pause", 8);

			PlayerPerform("block", 0);
		        PlayerPerform("crouch", 0);
			PlayerPerform("say", "（应该是很困难的。先用心闯关吧！）");
			PlayerPerform("pause", 2);
			PlayerPerform("say", "（真是不能失败！不知道兵兵搞的是什么鬼...）");
			PlayerPerform("pause", 2);
			PlayerPerform("say", "（兵兵给我的一个考验...）");
		        PlayerPerform("crouch", 1);
			PlayerPerform("block", 1);

			trg0 = 1;
		}
	}


	if (trg0 == 1)
	{
		c1 = GetChar("金枪王"); 
		c2 = GetChar("金枪兵1"); 
		c3 = GetChar("金枪兵2");
		if (c1>=0 && GetEnemy(c1)==player)
		{	
			ChangeBehavior(c1, "follow", player);
			ChangeBehavior(c2, "follow", player);
			ChangeBehavior(c3, "follow", player);
                        Perform(c1,"use",4);
                        Perform(c1,"use",40);
                        Perform(c1,"use",34);
			PlayerPerform("say", "（怎么会是他... 他不是兵兵的助理么？ ）");
			PlayerPerform("pause", 2);
			Perform(c1, "say", "  只痛笑ZJ  ☆..下命令！");
			Perform(c1, "say", "  很好！ 就是他..伊人君！杀死他..");
			Perform(c1, "faceto", player);
			trg0 = 2;
		}			
	}

}