//  炽雪
int Rule = 4;
int RoundTime = 45;
int PlayerSpawn = 72;
int PlayerSpawnDir = 80;
int PlayerWeapon = 6;
int PlayerWeapon2 = 0;
int PlayerHP = 6000;

int trg0 = 0;
int trg1 = 0;
int trg2 = 0;
int trg3 = 0;
int trg4 = 0;
int timer0 = 0;
int timer1 = 0;
int timer2 = 0;
int timer3 = 0;
int now = 0;
int gameover = 0;

OnStart()
{
	AddNPC("npc04_04");
	AddNPC("npc04_03");
	AddNPC("npc04_01");
	AddNPC("npc04_02");
}

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 now = GetGameTime();
	
        if (trg0 == 0)
	{
		c = GetChar("七侠-火"); 
		c1 = GetChar("七侠-怒");
                c2 = GetChar("七侠-雪");
                if (c>=0 && c1>=0 && c2>=0)
	        {
			Perform(c,"guard", 9999);
 			Perform(c,"say", "（算了……让怒先上，试试他的本事也好）"); 
			Perform(c,"pause", 4);
 			Perform(c,"say", "……"); 
			Perform(c,"pause", 6);
 			Perform(c,"say", "正是，所以我们不可乱来……"); 
			Perform(c,"pause", 4);
 			Perform(c,"say", "我们七侠的宗旨是什么？？"); 
			Perform(c,"pause", 4);   
			Perform(c,"say", "怒，不可乱来！"); 
			Perform(c,"pause", 6);
			Perform(c,"say", "说，你为什么要抢飞焱剑？"); 
			Perform(c,"pause", 4);
			Perform(c,"say", "站住！！！（据昨天抓住的刺客描绘，那个杀了寒叶的人就是他了……）"); 
			Perform(c,"pause", 6);

			Perform(c2,"guard", 9999);

                        ChangeBehavior(c1, "kill", player);
			Perform(c1,"say", "哇呀的，你去死吧！！！"); 
			Perform(c1,"pause", 6);
			Perform(c1,"say", "哼，知道了！！（眼神：好小子，呆会我就宰了你！！）"); 
			Perform(c1,"pause", 4);
			Perform(c1,"say", "以德服人，以武卫正！！"); 
			Perform(c1,"pause", 4);
			Perform(c1,"say", "这小子杀了我好兄弟寒叶！！我骂他句还算乱来？？？"); 
			Perform(c1,"pause", 6);
			Perform(c1,"say", "快说，不说小心老子刀子伺候！！！"); 
			Perform(c1,"pause", 14);

			PlayerPerform("block", 0);
			PlayerPerform("pause", 3);
			PlayerPerform("say", "一群废物！！");
			PlayerPerform("pause", 14);
			PlayerPerform("say", "哼！！");
			PlayerPerform("pause", 4);
			PlayerPerform("say", "我为什么要告诉你？");
			PlayerPerform("pause", 4);
                        PlayerPerform("say", "哦？"); 
			PlayerPerform("pause", 4);
                        PlayerPerform("say", "（不过，似乎碰到了点麻烦啊~~）"); 
			PlayerPerform("pause", 2);
                        PlayerPerform("say", "（过了这个镇子，前面就是洛阳了！！）"); 
			PlayerPerform("pause", 2);
			PlayerPerform("block", 1);

			trg0 = 1;
                }          
        }     
        if (trg0 == 1)
        {
                c = GetAnyChar("七侠-怒");      
                if (c>=0 && GetHP(c)<6000)
                {
                        Perform(c, "say", "好！痛快，好久没这么爽过了");
                        trg0 = 2;
		}
	}          
        if (trg0 == 2)
        {
                c = GetAnyChar("七侠-怒");      
                if (c>=0 && GetHP(c)<4000)
                {
                        Perform(c, "say", "恩，小子有点斤两！！！");
                        trg0 = 3;
		}
	}  
        if (trg0 == 3)
        {
                c = GetAnyChar("七侠-怒");      
                if (c>=0 && GetHP(c)<2500)
                {
                        Perform(c, "say", "呃…………");
                        trg0 = 4;
		}
	}  
        if (trg0 == 4)
        {
		c = GetChar("七侠-火"); 
		c1 = GetChar("七侠-怒");
                c2 = GetChar("七侠-雪");   
                if (c>=0 && c1>=0 && c2>=0)
                {
			Perform(c,"use", 15);
			Perform(c,"use", 15);
                        Perform(c,"say", "雪，准备好了没有？");
			Perform(c,"pause", 4);
                        Perform(c,"say", "怒，我的话你都不听了？？（眼神暗示：车轮，拖死他！）");
			Perform(c,"pause", 4);
                        Perform(c, "say", "怒，你先休息下，让雪上！");
			Perform(c,"pause", 2);
                        Perform(c, "say", "（怒不行了……这人好身手！！看来会有一场恶战……）");

                        ChangeBehavior(c1, "idle");
			Perform(c1,"guard", 9999);
			Perform(c1,"use", 16);
			Perform(c1,"use", 16);
			Perform(c1,"use", 16);
			Perform(c1,"use", 16);
			Perform(c1,"say", "唔……好了我知道了（二哥总是那么麻烦，让我一刀宰了他不就好了？）"); 
			Perform(c1,"pause", 4);
			Perform(c1,"say", "为什么？？？我明明打的正爽呢！！！"); 
			Perform(c1,"pause", 4);

                        ChangeBehavior(c2, "kill", player);
			Perform(c2,"use", 15);
			Perform(c2,"use", 15);
			Perform(c2,"say", "小子，你受死吧！（恩，这小子原来长得这么帅啊？还是下手轻点好了……）"); 
			Perform(c2,"pause", 2);
			Perform(c2,"say", "恩，早准备好了……"); 
			Perform(c2,"pause", 14);

			PlayerPerform("pause", 14);

                        trg0 = 5;
		}
	}  
        if (trg0 == 5)
        {
                c = GetAnyChar("七侠-雪");      
                if (c>=0 && GetHP(c)<6000)
                {
                        Perform(c, "say", "恩，不身手错（原来他不仅人长得帅，而且身手也不错，呜呜呜，为什么他要是我的敌人？？）");
                        trg0 = 6;
		}
	}          
        if (trg0 == 6)
        {
                c = GetAnyChar("七侠-雪");      
                if (c>=0 && GetHP(c)<4000)
                {
                        Perform(c, "say", "哎呀，我要用真功夫了哦！！！（哇，他真的好帅哦~~~）（眼神：脉脉含情~~）");
                        trg0 = 7;
		}
	}  
        if (trg0 == 7)
        {
                c = GetAnyChar("七侠-雪");      
                if (c>=0 && GetHP(c)<2500)
                {
			Perform(c, "pause", 2);
                        Perform(c, "say", "哎哟，对女子你不知道下手轻点啊！？（眼神：半痴半醉……）");

                        PlayerPerform("say", "…………");
			PlayerPerform("pause", 2);
                        trg0 = 8;
		}
	}  
        if (trg0 == 8)
        {
		c = GetChar("七侠-火"); 
		c1 = GetChar("七侠-怒");
                c2 = GetChar("七侠-雪");   
                if (c>=0 && c1>=0 && c2>=0)
                {
                        ChangeBehavior(c, "kill", player);
			Perform(c,"use", 15);
			Perform(c,"use", 15);
                        Perform(c, "say", "雪，你休息下，我来！");
			Perform(c,"pause", 2);
                        Perform(c, "say", "（雪？她这是怎么了？？？心不在焉的样子……还是让她先冷静下好……）");
			Perform(c,"pause", 2);

                        ChangeBehavior(c2, "idle");
			Perform(c2,"guard", 9999);
			Perform(c2,"use", 16);
			Perform(c2,"use", 16);
			Perform(c2,"use", 16);
			Perform(c2,"use", 16);
			Perform(c2,"say", "哦……（痴迷中……）"); 
			Perform(c2,"pause", 6);

			PlayerPerform("pause", 7);
			
                        trg0 = 9;
		}
	}  
        if (trg0 == 9)
        {
                c = GetAnyChar("七侠-火");      
                if (c>=0 && GetHP(c)<6000)
                {
                        Perform(c, "say", "哦？……（看来我小瞧他了……）");
                        trg0 = 10;
		}
	}          
        if (trg0 == 10)
        {
                c = GetAnyChar("七侠-火");      
                if (c>=0 && GetHP(c)<4000)
                {
                        Perform(c, "say", "……（好厉害……难怪怒打不赢他）");
                        trg0 = 11;
		}
	}  
        if (trg0 == 11)
        {
                c = GetAnyChar("七侠-火");      
                if (c>=0 && GetHP(c)<2500)
                {
                        Perform(c, "say", "唔，好身手，佩服！");
                        trg0 = 12;
		}
	}  
        if (trg0 == 12)
        {
		c = GetChar("七侠-火"); 
		c1 = GetChar("七侠-怒");
                c2 = GetChar("七侠-雪");   
                if (c>=0 && c1>=0 && c2>=0)
                {
                        ChangeBehavior(c, "kill", player);
			Perform(c,"use", 16);
			Perform(c,"use", 16);
			Perform(c,"use", 16);
			Perform(c,"use", 16);
			Perform(c,"pause", 1);
                        Perform(c, "say", "现在我们要一起上了！！阁下注意了！！");
			Perform(c,"pause", 4);
                        Perform(c, "say", "阁下好身手，让在下佩服不已");
			Perform(c,"pause", 2);

                        ChangeBehavior(c1, "kill", player);
			Perform(c1,"pause", 8);

                        ChangeBehavior(c2, "kill", player);
			Perform(c2,"pause", 8);

			PlayerPerform("block", 0);
			PlayerPerform("say", "哦，来吧！！");
			PlayerPerform("pause", 4);
                        PlayerPerform("say", "过奖"); 
			PlayerPerform("pause", 4);
			PlayerPerform("block", 1);
                        trg0 = 13;
		}
	}  
        if (trg0 == 13)
        {
		c = GetChar("七侠-火"); 
		c1 = GetChar("七侠-怒");
                c2 = GetChar("七侠-雪");  
		c3 = GetChar("");  
                if (c>=0 && GetHP(c)<1500 && c1>=0 && GetHP(c1)<1500 && c2>=0 && GetHP(c2)<1500 && c3>=0)
                {
                        Perform(c, "say", "后会有期！！");
			Perform(c, "pause", 2);
                        Perform(c, "say", "唔，在下突然有事，失陪了！！（靠，三个人都打不过他，还是先回洛阳算了……）");

			Perform(c1,"pause", 10);
                        Perform(c1, "say", "哼，我们还会再见的！！！");
			Perform(c1,"pause", 6);

			Perform(c2,"pause", 10);
                        Perform(c2, "say", "呼呼……（好帅）");
			Perform(c2,"pause", 4);

			PlayerPerform("block", 0);
                        PlayerPerform("say", "…………"); 
			PlayerPerform("pause", 14);
			PlayerPerform("block", 1);
                        trg0 = 14;
                        timer0 = now + 18;
		}
       } 
       if (trg0 == 14 && now>timer0)
       { 
			RemoveNPC(c);  	
			RemoveNPC(c1);
			RemoveNPC(c2);
			RemoveNPC(c3);

		        trg0 = 15;
       }
       if (trg1 == 0)
       {
                c = GetAnyChar("");
                if (c>=0 && GetHP(c)<GetMaxHP(c))
                {        
                        Perform(c, "say", "不要攻击我！要不然你会过不了关的！！");  
                        trg1 = 1;
                }
       }
       if (trg1 == 1)
       {
                c = GetAnyChar("");
                if (c>=0 && GetHP(c)<25000)
                {        
                        Perform(c, "say", "我说过了不要攻击我！！！");  
                        trg1 = 2;
                }
       }
       if (trg1 == 2)
       {
                c = GetAnyChar("");
                if (c>=0 && GetHP(c)<20000)
                {        
                        Perform(c, "say", "靠，你去死吧！！！！！"); 

			PlayerPerform("use", 35);
                        PlayerPerform("say", "…………");
			PlayerPerform("pause", 2);
                        trg1 = 3;
                }
       }
}












