// 炎硫岛
int Rule = 4;
int RoundTime = 15;
int PlayerSpawn = 9;
int PlayerSpawnDir = 90;
int PlayerWeapon = 55;
int PlayerWeapon2 = 17;
int PlayerHP = 2000;

int g_counter = 0;
int trg0 = 0;
int trg1 = 0;
int trg2 = 0;
int trg3 = 0;
int trg4 = 0;
int trg5 = 0;
int timer0 = 0;
int timer1 = 0;
int timer2 = 0;
int timer3 = 0;
int timer4 = 0;
int timer5 = 0;
int survivor = -1;

OnStart()
{
	AddNPC("npc+14+01");
	AddNPC("npc+14+02");
	AddNPC("npc+14+03");
	AddNPC("npc+14+04");
	AddNPC("npc+14+05");
	AddNPC("npc+14+06");
}

OnUpdate()
{	
	int player = GetChar("player");
	if (player < 0)
	{
		return 0;
	}
	
	int c;
	int c2;
	int c3;
	int c4;
	int c5;
	int c6;
	int t;
	
	g_counter = g_counter + 1;

	if (trg0 == 0)
	{
		c = GetChar("疾风马贼首领");
		c2 = GetChar("疾风小队长-2");
		c3 = GetChar("疾风马贼-2");
		c4 = GetChar("疾风马贼-3");
		c5 = GetChar("疾风小队长-1");
		c6 = GetChar("疾风马贼-1");
		if (c>=0 && c2>=0 && c3>=0 && c4>=0 && c5>=0 && c6>=0)
		{
			Perform(c2, "pause", 22);

			Perform(c3, "pause", 22);

			Perform(c4, "pause", 22);

			Perform(c5, "pause", 22);

			Perform(c6, "pause", 22);

			Perform(c, "say", "领教了");
			Perform(c, "pause", 4);
			Perform(c, "say", "恩，只有天网才有你这样的杀手");
			Perform(c, "pause", 4);
			Perform(c, "say", "你是天网派来的吧");
			Perform(c, "pause", 4);
			Perform(c, "say", "我还有一个问题");
			Perform(c, "pause", 4);
			Perform(c, "say", "看来是躲不掉了");
			Perform(c, "pause", 3);
			Perform(c, "faceto", player);
			
			PlayerPerform("block", 0);
			PlayerPerform("pause", 4);
			PlayerPerform("say", "出招吧");
			PlayerPerform("pause", 4);
			PlayerPerform("say", "不错，我是天网的人");
			PlayerPerform("pause", 4);
			PlayerPerform("say", "讲");
			PlayerPerform("pause", 4);
			PlayerPerform("say", "准备受死了？");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "你无路可走了");
			PlayerPerform("block", 1);

			trg0 = 1;
		}
	}
	if (trg0 == 1)
	{
		c = GetChar("疾风马贼首领");
		SetTarget(0, "char", c);
		SetTarget(1, "char", player);
		if (c>=0 && GetEnemy(c)==player)
		{


			c2 = GetChar("疾风小队长-2"); 
			if (c2 >= 0)
			{
				ChangeBehavior(c2, "kill", player);
			Perform(c2, "pause", 22);

			}

			c2 = GetChar("疾风小队长-1"); 
			if (c2 >= 0)
			{
				ChangeBehavior(c2, "kill", player);
			Perform(c2, "pause", 22);

			}

			c2 = GetChar("疾风马贼-2"); 
			if (c2 >= 0)
			{
				ChangeBehavior(c2, "kill", player);
			Perform(c2, "pause", 22);

			}
			c2 = GetChar("疾风马贼-1"); 
			if (c2 >= 0)
			{
				ChangeBehavior(c2, "kill", player);
			Perform(c2, "pause", 22);

			}
			c2 = GetChar("疾风马贼-3"); 
			if (c2 >= 0)
			{
				ChangeBehavior(c2, "kill", player);
			Perform(c2, "pause", 22);

			}

			trg0 = 2;
		}
	}
	if (trg1 == 0)
	{
		c = GetAnyChar("疾风马贼-1");
		c2 = GetAnyChar("疾风小队长-2");
		c3 = GetAnyChar("疾风马贼-2");
		c4 = GetAnyChar("疾风马贼-3");
		c5 = GetAnyChar("疾风小队长-1");
		if (c>=0 && GetHP(c)<=0 && GetHP(c2)<=0 && GetHP(c3)<=0 && GetHP(c4)<=0 && GetHP(c5)<=0)
		{
			Say(c, "﹒﹒﹒﹒﹒﹒﹒呜﹒﹒﹒");			
			trg1 = 1;
		}						
	}
	if (trg1 == 1)
	{
		c = GetChar("疾风马贼首领");
		if (c>=0 && GetEnemy(c)==player)
		{
			Perform(c, "pause", 3);
			Perform(c, "say", "请");
			Perform(c, "pause", 6);
			Perform(c, "say", "也许下一个就是我了");
			Perform(c, "pause", 3);
			Perform(c, "faceto", player);
			
			PlayerPerform("block", 0);
			PlayerPerform("say", "请");
			PlayerPerform("pause", 6);
			PlayerPerform("say", "不是也许，是一定");
			PlayerPerform("pause", 6);
			PlayerPerform("say", "你的手下都死了");
			PlayerPerform("block", 1);
			trg1 = 2;
		}							
	}
}