//  地狱之路
int Rule = 5;
int RoundTime = 90;
int PlayerSpawn = 132;
int PlayerSpawnDir = 270;
int PlayerWeapon = 15;
int PlayerWeapon2 = 16;
int PlayerHP = 4500;

int trg0 = 0;
int trg1 = 0;
int trg2 = 0;
int trg3 = 0;
int trg4 = 0;
int trg5 = 0;
int trg6 = 0;
int trg7 = 0;
int trg8 = 0;
int timer0 = 0;
int timer1 = 0;
int gameover = 0;
int now = 0;


OnStart()
{
	AddNPC("npc-11-00");
	AddNPC("npc-11-01");
	AddNPC("npc-11-02");
	AddNPC("npc-11-03");
	AddNPC("npc-11-04");
	AddNPC("npc-11-05");
	AddNPC("npc-11-06");
	AddNPC("npc-11-07");
}


OnUpdate()
{
	int player = GetAnyChar("player");
	if (player < 0)
	{
		return 0;
	}
	if (gameover == 2)
	{
		return 0;
	}

        int c;
	int c1;
	int c2;
        int c3;
        int c4;
        int c5;
        int c6;
        int c7;
        int c8;
	int now = GetGameTime();

        if (trg0 == 0)
        {          
                c = GetAnyChar("履面使");              
                if (c>=0)
                {      
                        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", 2);
                        Perform(c, "say", "所以说没事啊……");
                        Perform(c, "pause", 4);
                        Perform(c, "say", "呵呵，凭你的本事还怕他们么……");
                        Perform(c, "pause", 4);
			Perform(c, "faceto", player);			
			                        
			PlayerPerform("block", 0);
                        PlayerPerform("say", "我晕，少罗嗦，一起上！！！");
                        PlayerPerform("pause", 4);
                        PlayerPerform("pause", 2); 
                        PlayerPerform("say", "算了还是赶紧杀吧…………");
                        PlayerPerform("pause", 4);
                        PlayerPerform("say", "哎，我ＴＭ都觉得烦你难道没事？？");
                        PlayerPerform("pause", 6);
                        PlayerPerform("say", "废话！！我要怕他们还敢把他们的掌门都作了啊…………");
                        PlayerPerform("pause", 4);
                        PlayerPerform("say", "这下好了，惹了一堆追兵…………");
                        PlayerPerform("pause", 2);
                        PlayerPerform("block", 1);
                        
                        trg0 = 1;     
		}
	} 
	if (trg1 == 0)
	{
		c = GetChar("峨嵋杀手");
		c1 = GetChar("履面使"); 
		c2 = GetChar("峨嵋杀手 ");
		c3 = GetChar("武当弟子");
		c4 = GetChar("武当弟子 ");
		c5 = GetChar("少林和尚");
		c6 = GetChar("少林和尚 ");
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);  
			Perform(c, "say", "大家快来！！！");
			Perform(c, "pause", 2);
			Perform(c, "say", "我找到那个人了！！");
			Perform(c, "faceto", c1);

			Perform(c1, "pause", 4);

			ChangeBehavior(c, "kill", player);   
			Perform(c2, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c3, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c4, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c5, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c6, "pause", 6);

                        PlayerPerform("say", "靠！！！还敢喊人，你去死吧！！！"); 
			PlayerPerform("pause", 6);
			trg1 = 1;
		}
	}
	if (trg2 == 0)
	{
		c = GetChar("峨嵋杀手 ");
		c1 = GetChar("履面使"); 
		c2 = GetChar("峨嵋杀手");
		c3 = GetChar("武当弟子");
		c4 = GetChar("武当弟子 ");
		c5 = GetChar("少林和尚");
		c6 = GetChar("少林和尚 ");
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);  
			Perform(c, "say", "大家是那个家伙！！！");
			Perform(c, "pause", 2);
			Perform(c, "say", "恩，是你！！");

			Perform(c1, "pause", 4);

			ChangeBehavior(c, "kill", player);   
			Perform(c2, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c3, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c4, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c5, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c6, "pause", 6);

                        PlayerPerform("say", "我晕这家伙还真**！！！"); 
			PlayerPerform("pause", 6);
			trg2 = 1;
		}
	}
	if (trg3 == 0)
	{
		c = GetChar("武当弟子");
		c1 = GetChar("履面使"); 
		c2 = GetChar("峨嵋杀手");
		c3 = GetChar("峨嵋杀手 ");
		c4 = GetChar("武当弟子 ");
		c5 = GetChar("少林和尚");
		c6 = GetChar("少林和尚 ");
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);  
			Perform(c, "say", "大伙来杀了他！！！");
			Perform(c, "pause", 2);
			Perform(c, "say", "杀了他！！");

			Perform(c1, "pause", 4);

			ChangeBehavior(c, "kill", player);   
			Perform(c2, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c3, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c4, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c5, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c6, "pause", 6);

                        PlayerPerform("say", "糟，被发现了！！！"); 
			PlayerPerform("pause", 6);
			trg3 = 1;
		}
	}
	if (trg4 == 0)
	{
		c = GetChar("武当弟子 ");
		c1 = GetChar("履面使"); 
		c2 = GetChar("峨嵋杀手");
		c3 = GetChar("峨嵋杀手 ");
		c4 = GetChar("武当弟子");
		c5 = GetChar("少林和尚");
		c6 = GetChar("少林和尚 ");
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);  
			Perform(c, "say", "大伙来分尸吧！！！");
			Perform(c, "pause", 2);
			Perform(c, "say", "好小子总算找到你了！！");

			Perform(c1, "pause", 4);

			ChangeBehavior(c, "kill", player);   
			Perform(c2, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c3, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c4, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c5, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c6, "pause", 6);

                        PlayerPerform("say", "*,　好狠！！！"); 
			PlayerPerform("pause", 6);
			trg4 = 1;
		}
	}
	if (trg5 == 0)
	{
		c = GetChar("少林和尚");
		c1 = GetChar("履面使"); 
		c2 = GetChar("峨嵋杀手");
		c3 = GetChar("峨嵋杀手 ");
		c4 = GetChar("武当弟子");
		c5 = GetChar("武当弟子 ");
		c6 = GetChar("少林和尚 ");
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);  
			Perform(c, "say", "大家快来啊！！！");
			Perform(c, "pause", 4);
			Perform(c, "say", "出家人本不嗜杀, 但阁下太过分了, 所以…………");

			Perform(c1, "pause", 4);

			ChangeBehavior(c, "kill", player);   
			Perform(c2, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c3, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c4, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c5, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c6, "pause", 6);

                        PlayerPerform("say", "靠, 死和尚！！！"); 
			PlayerPerform("pause", 6);
			trg5 = 1;
		}
	}
	if (trg6 == 0)
	{
		c = GetChar("少林和尚 ");
		c1 = GetChar("履面使"); 
		c2 = GetChar("峨嵋杀手");
		c3 = GetChar("峨嵋杀手 ");
		c4 = GetChar("武当弟子");
		c5 = GetChar("少林和尚");
		c6 = GetChar("武当弟子 ");
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);  
			Perform(c, "say", "大伙也要来吧！！！");
			Perform(c, "pause", 2);
			Perform(c, "say", "阿弥陀佛, 贫僧总算找到你了！！");

			Perform(c1, "pause", 4);

			ChangeBehavior(c, "kill", player);   
			Perform(c2, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c3, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c4, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c5, "pause", 6);

			ChangeBehavior(c, "kill", player);   
			Perform(c6, "pause", 6);

                        PlayerPerform("say", "说得好听, 实际上还不是一个货！！！"); 
			PlayerPerform("pause", 6);
			trg6 = 1;
		}
	}
	if (trg7 == 0 && trg1 == 1  && trg2 == 1 && trg3 == 1 && trg4 == 1 && trg5 == 1 && trg6 == 1)
	{
		c = GetChar("少林和尚 ");
		c1 = GetChar("履面使"); 
		c2 = GetChar("峨嵋杀手");
		c3 = GetChar("峨嵋杀手 ");
		c4 = GetChar("武当弟子");
		c5 = GetChar("少林和尚");
		c6 = GetChar("武当弟子 ");

		if (GetHP(c)<=0 && GetHP(c2)<=0 && GetHP(c3)<=0 && GetHP(c4)<=0 && GetHP(c5)<=0 && GetHP(c6)<=0)
		{

			trg7 = 1;
			timer0 = now + 3;
		}
	}  
	if (trg7 == 1 && now>timer0)
	{
		        AddNPC("npc-11-08");
		        trg7 = 2;
	}   
	if (trg8 == 0)
	{
		c = GetChar("武林盟主-雷眼");
		c1 = GetChar("履面使"); 
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);  
			Perform(c, "say", "我要为他们报仇，你，必须死！！！");
			Perform(c, "pause", 2);
			Perform(c, "say", "可恶，我来晚了一步，竟然让这么多武林豪杰死在你这个败类手上！！");
			Perform(c, "faceto", player);

			Perform(c1, "pause", 8);

           		PlayerPerform("use", 15);
           		PlayerPerform("use", 15);
           		PlayerPerform("use", 15);
           		PlayerPerform("use", 15);
           		PlayerPerform("use", 20);
                        PlayerPerform("say", "哟，你有那能耐么？？"); 
			PlayerPerform("pause", 6);
			trg8 = 1;
		}
	}
        if (trg8 == 1)
        {
                c = GetAnyChar("武林盟主-雷眼");      
                if (c>=0 && GetHP(c)<GetMaxHP(c)/2)
                {
           		Perform(c, "use", 16);
           		Perform(c, "use", 16);
           		Perform(c, "use", 16);
           		Perform(c, "use", 16);
           		Perform(c, "use", 16);
           		Perform(c, "use", 16);
                        Perform(c, "say", "可恶！！连为他们报仇都不行的话我还当什么武林盟主！！！！");
                        trg8 = 2;
		}
	} 
	if (trg8 == 2)
	{
		c = GetAnyChar("武林盟主-雷眼");
		if (GetHP(c)<=0)
		{
			Say(c, "你…………");
			trg8 = 3;
		}
	}
	if (trg8 == 3)
	{
		c = GetChar("SNTEST");
		if (c>=0)
		{
           		Perform(c, "use", 35);
			trg8 = 4;
		}
	}
        if (gameover!=-1 && GetHP(player)<=0)
	{
		gameover = -1;
		timer1 = now + 2; 
	}		
        if ((gameover==1 || gameover==-1) && now>timer1)
	{
		GameOver(gameover);
		gameover = 2;
	}
}  