// 一级高官的威力
int Rule = 1;
int RoundTime = 70;
int PlayerSpawn = 2;
int PlayerSpawnDir = 0;
int PlayerWeapon = 17;
int PlayerWeapon2 = 50;
int PlayerHP = 30000;

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 trg9 = 0;
int trg10 = 0;
int trg11 = 0;
int trg12 = 0;
int trg13 = 0;
int trg14 = 0;
int trg15 = 0;
int timer0 = 0;
int timer1 = 0;
int timer2 = 0;
int timer3 = 0;
int timer4 = 0;
int gameover = 0;

OnStart()
{
	AddNPC("炎黄律香川1");
}


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 c9;
        int c10;
        int c11;
        int c12;
        int c13;
        int c14;
        int c15;
	int now = GetGameTime();

	if (trg0 == 0)
	{
		c = GetChar("律香川"); 
		if (c>=0)
		{		
			Perform(c, "say", "知道了（哼，知道就受死吧。。。");
			Perform(c, "pause", 3);
			Perform(c, "say", "……（哼，..怕你我就不叫律香川。你小看我，让你尝尝我的厉害。。");
			Perform(c, "pause", 3);
			Perform(c, "say", "哈哈哈。你以为我是在吹吗？哼哼，我知道你小子武功厉害。");
			Perform(c, "pause", 2);
			Perform(c, "say", "好大的口气，怪不得堂主会下令让我来收拾你。。");
			Perform(c, "pause", 2);
			Perform(c, "say", "你给我站住，我听堂主说，公子还有律香彬都是死在你的手下。");
			Perform(c, "faceto", player);
					
                      
                        PlayerPerform("block", 0);
			PlayerPerform("use", 19);
			PlayerPerform("use", 5);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 20);
                        PlayerPerform("say", "原来你就是律香川，孙玉伯身边一等一的高人，领教了在下。");
                        PlayerPerform("pause", 3);
                        PlayerPerform("say", "哦，怕了，呵呵，怕现在说出来，我况且可以饶恕你。");
                        PlayerPerform("pause", 2);
                        PlayerPerform("say", "你？笑话，你以为你是我的对手，你比孙剑他们还厉害？");
                        PlayerPerform("pause", 2);
                        PlayerPerform("say", "不错，那又怎么着，我杀的就是他们。。怎么？");
                        PlayerPerform("pause", 1);
                        PlayerPerform("block", 1);
                        
                        trg0 = 1;
			timer0 = now + 12;
		}
	}           
        if (trg0 == 1 && now>timer0)
	{
                        AddNPC("炎黄杀手1");
                        AddNPC("炎黄杀手2");
                        AddNPC("炎黄杀手3");
                        AddNPC("炎黄杀手4");
                        AddNPC("炎黄杀手5");
                        AddNPC("炎黄杀手6");
                        AddNPC("炎黄杀手7");

	                trg0 = 2;               
        }    
        if (trg0 == 2)        
        {   

		c = GetChar("无情杀手1");
		c1 = GetChar("无情杀手2");
		c2 = GetChar("无情杀手3");  
		c3 = GetChar("无情杀手4"); 
		c4 = GetChar("无情杀手5");
		c5 = GetChar("无情杀手6");
		c6 = GetChar("无情杀手7");  
		c7 = GetChar("律香川"); 
                if (c>0 && c1>0 && c2>0 && c3>0 && c4>0 && c5>0 && c6>0)
                { 
			ChangeBehavior(c, "follow", player);
                        Perform(c, "use", 19);
                        Perform(c, "use", 5);
			Perform(c, "say", "是老大，属下遵命。。一起干掉他。。");
			Perform(c, "pause", 2);
			Perform(c, "say", "老大，我们来了..属下来迟，忘老大处罚。");
                        Perform(c, "faceto", c7);
			Perform(c, "crouch", 1);                   

			ChangeBehavior(c1, "follow", player);
                        Perform(c1, "use", 19);
                        Perform(c1, "use", 5);
			Perform(c1, "say", "是。。");
			Perform(c1, "pause", 4);
                        Perform(c1, "faceto", c7);
			Perform(c1, "crouch", 1);

			ChangeBehavior(c2, "follow", player);
                        Perform(c2, "use", 19);
                        Perform(c2, "use", 5);
			Perform(c2, "say", "是。。");
			Perform(c2, "pause", 4);
                        Perform(c2, "faceto", c7);
			Perform(c2, "crouch", 1);

			ChangeBehavior(c3, "follow", player);
                        Perform(c3, "use", 19);
                        Perform(c3, "use", 5);
			Perform(c3, "say", "是。。");
			Perform(c3, "pause", 4);
                        Perform(c3, "faceto", c7);
			Perform(c3, "crouch", 1);

			ChangeBehavior(c4, "follow", player);
			Perform(c4, "say", "是。。");
			Perform(c4, "pause", 4);
                        Perform(c4, "faceto", c7);
			Perform(c4, "crouch", 1);


			ChangeBehavior(c5, "follow", player);
                        Perform(c5, "use", 19);
                        Perform(c5, "use", 5);
			Perform(c5, "say", "是。。");
			Perform(c5, "pause", 4);
                        Perform(c5, "faceto", c7);
			Perform(c5, "crouch", 1);


			ChangeBehavior(c6, "follow", player);
                        Perform(c6, "use", 19);
                        Perform(c6, "use", 5);
			Perform(c6, "say", "是。。");
			Perform(c6, "pause", 4);
                        Perform(c6, "faceto", c7);
			Perform(c6, "crouch", 1);


			ChangeBehavior(c7, "follow", player);
                        Perform(c7, "use", 19);
                        Perform(c7, "use", 5);
			Perform(c7, "say", "不要废话，速度解决。。");
			Perform(c7, "pause", 2);
                        Perform(c7, "faceto", c);

                        PlayerPerform("block", 0);
                        PlayerPerform("say", "难免要跟你们这些人打一场，让你们都去见孙剑他们吧。");
                        PlayerPerform("say", "放马过来吧。。");
                        PlayerPerform("pause", 6);
                        PlayerPerform("block", 1);

                        trg0 = 3;
                }
        }
        if (trg1 == 0)
        {
                c = GetAnyChar("律香川");      
                if (c>=0 && GetHP(c)<10000)
                {
                        Perform(c, "say", "哼，怪不得公子会被你杀害。。");
                        trg1 = 1;
		}
	}  
        if (trg1 == 1)
        {
                c = GetAnyChar("律香川");      
                if (c>=0 && GetHP(c)<8000)
                {
                        Perform(c, "say", "好小子...哼哼...");
                        trg1 = 2;
		}
	}  
       
        if (trg0 == 3)
	{
                c = GetChar("律香川");
		if (c>=0 && GetHP(c)<4000)
		{     
                        Perform(c, "pause", 200000);
                        Perform(c, "say", "可惜你活不久了..我不能陪你玩了。小子们，你们先撤。");
                        Perform(c, "pause", 1);
                        Perform(c, "say", "身手不错……..果真是我的目标");
                        Perform(c, "pause", 2);
			Perform(c, "faceto", player);	

                        PlayerPerform("block", 0);
                        PlayerPerform("pause", 2);
                        PlayerPerform("say", "是么？..到底是谁活不久了，现在还是X数。");
                        PlayerPerform("pause", 5);
                        PlayerPerform("block", 1);

			trg0 = 4;
			timer1 = now + 5;
		}
	}          
 
        if (trg0 == 4 && now>timer1)
	{
                RemoveNPC(GetAnyChar("无情杀手1"));
		RemoveNPC(GetAnyChar("无情杀手2"));
                RemoveNPC(GetAnyChar("无情杀手3"));
		RemoveNPC(GetAnyChar("无情杀手4"));
                RemoveNPC(GetAnyChar("无情杀手5"));
		RemoveNPC(GetAnyChar("无情杀手6"));
                RemoveNPC(GetAnyChar("无情杀手7"));

	                trg0 = 5;    
			timer2 = now + 5;           
      
		}

        if (trg0 == 5 && now>timer2)
	{
                    AddNPC("炎黄高官1");

      	                trg0 = 6;   
			timer2 = now + 5;           
      
		}
	
  if (trg1 == 2)
	{
		c = GetChar("一级高官");	
		c2 = GetChar("律香川");		
		if (c>=0 && GetEnemy(c)==player)
		{
                        ChangeBehavior(c,"follow",player);
			Perform(c, "aggress");
			Perform(c, "say", "有志气，得罪了。看你的功夫如何了。。");
			Perform(c, "pause", 6);
			Perform(c, "say", "我狠想会会这家伙。。到底有多厉害。。");
			Perform(c, "pause", 1);
			Perform(c, "say", "律香川..你先行下去疗伤，我在金华堂主让我们离开，");
			Perform(c, "pause", 3);
			Perform(c, "say", "哈楼。你好阿，伊人君。。");
			Perform(c, "faceto", player);


			Perform(c2, "pause", 50000);
			Perform(c2, "say", "是，属下知道了。");
			Perform(c2, "faceto", c);
			Perform(c2, "pause", 5);
			Perform(c2, "say", "他是谁，他是我们里的高官，也是我的老大。");
			Perform(c2, "pause", 2);
			Perform(c2, "faceto", player);


			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 20);
			PlayerPerform("say", "领教了。。。");		
			PlayerPerform("pause", 2);
			PlayerPerform("say", "那好阿，我到要看看你是个什么人物，这么受人敬仰。放马过来吧。。");		
			PlayerPerform("pause", 8);
			PlayerPerform("say", "你是谁。我怎么从没见过你..孙玉伯身边的人貌似很有煞气。");		
			PlayerPerform("pause", 1);
			PlayerPerform("block", 1);

		         trg1 = 3;
		        timer0 = now + 8; 


	    }

          }
     if (trg1 == 3 && now>timer0)
	{

                RemoveNPC(GetAnyChar("律香川"));

		         trg1 = 4;
		        timer1 = now + 5; 


	}

     if (trg1 == 4 && now>timer1)
	{

                    AddNPC("炎黄手下1");
                    AddNPC("炎黄手下2");
                    AddNPC("炎黄手下3");
                    AddNPC("炎黄手下4");
                    AddNPC("炎黄手下5");
                    AddNPC("炎黄手下6");
                    AddNPC("炎黄手下7");

		         trg1 = 5;


	}

	if (trg2 == 0)
	{
		c = GetAnyChar("一级高官");
		if (c>=0 && GetHP(c)<GetMaxHP(c)/2)
		{			
			Perform(c, "say", "呵呵.伊人君，这里不宽敞，咱后面见。。");
			trg2 = 1;
			timer0 = now + 4;
		}
	}


if (trg2 == 1 && now>timer0)
	{

                RemoveNPC(GetAnyChar("高官手下1"));
                RemoveNPC(GetAnyChar("高官手下2"));
                RemoveNPC(GetAnyChar("高官手下3"));
                RemoveNPC(GetAnyChar("高官手下4"));
                RemoveNPC(GetAnyChar("高官手下5"));
                RemoveNPC(GetAnyChar("高官手下6"));
                RemoveNPC(GetAnyChar("高官手下7"));
                RemoveNPC(GetAnyChar("一级高官"));
		         trg2 = 2;
			 timer4 = now + 5;
                   }

if (trg2 == 2 && now>timer4)
	{

	          AddNPC("炎黄僵尸1");
	          AddNPC("炎黄僵尸2");
	          AddNPC("炎黄僵尸3");
	          AddNPC("炎黄僵尸4");
	          AddNPC("炎黄僵尸5");
	          AddNPC("炎黄僵尸6");
	          AddNPC("炎黄僵尸7");
	          AddNPC("炎黄僵尸8");
		         trg2 = 3;
                   }


if (trg3 == 0)
	{
		c = GetChar("无敌僵尸1");
		c1 = GetChar("无敌僵尸2");
		c2 = GetChar("无敌僵尸3");
		c3 = GetChar("无敌僵尸4");
		c4 = GetChar("无敌僵尸5");
		c5 = GetChar("无敌僵尸6");
		c6 = GetChar("无敌僵尸7");
		c7 = GetChar("无敌僵尸8");
		
		if (c>=0 && GetEnemy(c)==player)
		{

			ChangeBehavior(c, "follow", player);
			Perform(c, "say", "哼哼。我们又来了...");
			Perform(c, "faceto", player);

		       ChangeBehavior(c1, "kill", player);
                        Perform(c1, "use", 19);
                        Perform(c1, "use", 5);
		       ChangeBehavior(c2, "kill", player);
                        Perform(c2, "use", 19);
                        Perform(c2, "use", 5);
		       ChangeBehavior(c3, "kill", player);
                        Perform(c3, "use", 19);
                        Perform(c3, "use", 5);
		       ChangeBehavior(c4, "kill", player);
                        Perform(c4, "use", 19);
                        Perform(c4, "use", 5);
		       ChangeBehavior(c5, "kill", player);
                        Perform(c5, "use", 19);
                        Perform(c5, "use", 5);
		       ChangeBehavior(c6, "kill", player);
                        Perform(c6, "use", 19);
                        Perform(c6, "use", 5);
		       ChangeBehavior(c7, "kill", player);
                        Perform(c7, "use", 19);
                        Perform(c7, "use", 5);

			PlayerPerform("block", 0);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 20);
			PlayerPerform("say", "僵尸总会出现在这里。也许这就是命...");
			PlayerPerform("pause", 3);
			PlayerPerform("block", 1);


			trg3 = 1;

		}		
	}
      if (trg3 == 1)
	{
		c = GetAnyChar("无敌僵尸1");
		c3 = GetAnyChar("无敌僵尸2");
		c4 = GetAnyChar("无敌僵尸3");
		c5 = GetAnyChar("无敌僵尸4");
		c6 = GetAnyChar("无敌僵尸5");
		c7 = GetAnyChar("无敌僵尸6");
		c8 = GetAnyChar("无敌僵尸7");
		c9 = GetAnyChar("无敌僵尸8");
		if (GetHP(c)<=0 && GetHP(c3)<=0 && GetHP(c4)<=0 && GetHP(c5)<=0 && GetHP(c6)<=0 &&  GetHP(c7)<=0 &&  GetHP(c8)<=0 &&  GetHP(c9)<=0 && player>=0 && GetHP(player)>0)
		{

			PlayerPerform("say", "无敌僵尸的魅力。哈哈。。...");
			PlayerPerform("pause", 3);


			trg3 = 2;
			timer1 = now + 4;
		}		
	}



if (trg3 == 2 && now>timer1)
	{

                RemoveNPC(GetAnyChar("无敌僵尸1"));
                RemoveNPC(GetAnyChar("无敌僵尸2"));
                RemoveNPC(GetAnyChar("无敌僵尸3"));
                RemoveNPC(GetAnyChar("无敌僵尸4"));
                RemoveNPC(GetAnyChar("无敌僵尸5"));
                RemoveNPC(GetAnyChar("无敌僵尸6"));
                RemoveNPC(GetAnyChar("无敌僵尸7"));
                RemoveNPC(GetAnyChar("无敌僵尸8"));
		         trg3 = 3;
			 timer2 = now + 5;
                   }

if (trg3 == 3 && now>timer2)
	{


	          AddNPC("炎黄贴身1");
	          AddNPC("炎黄贴身2");
	          AddNPC("炎黄贴身3");
		         trg3 = 4;
                   }


if (trg3 == 4)
	{
		c = GetChar("高官贴身1");
		c1 = GetChar("高官贴身2");
		c2 = GetChar("高官贴身3");
		if (c>=0 && GetEnemy(c)==player)
		{

			ChangeBehavior(c, "follow", player);
                        Perform(c, "use", 19);
                        Perform(c, "use", 5);
			Perform(c, "say", "我接触一下你的魅力。。..嘿嘿。不要下手那么狠哟。。");
			Perform(c, "faceto", player);

		       ChangeBehavior(c1, "kill", player);
                        Perform(c1, "use", 19);
                        Perform(c1, "use", 5);
		       ChangeBehavior(c2, "kill", player);
                        Perform(c2, "use", 19);
                        Perform(c2, "use", 5);
		         trg3 = 5;
                   }

      }


	if (trg4 == 0)
	{
		c = GetAnyChar("高官贴身1");
		if (c>=0 && GetHP(c)<GetMaxHP(c)/2)
		{			
			Perform(c, "say", "呵呵.伊人君，..果然是帅气。。。");
			trg4 = 1;
		}
	}
	if (trg5 == 0)
	{
		c = GetAnyChar("高官贴身2");
		if (c>=0 && GetHP(c)<GetMaxHP(c)/2)
		{			
			Perform(c, "say", "果然是帅气。。");
			trg5 = 1;
		}
	}
	if (trg6 == 0)
	{
		c = GetAnyChar("高官贴身3");
		if (c>=0 && GetHP(c)<GetMaxHP(c)/2)
		{			
			Perform(c, "say", "女人的梦想与追求。。好希望我是伊人梦。");
			trg6 = 1;
		}
	}

      if (trg6 == 1)
	{
		c = GetAnyChar("高官贴身1");
		c3 = GetAnyChar("高官贴身2");
		c4 = GetAnyChar("高官贴身3");
		if (GetHP(c)<=0 && GetHP(c3)<=0 && GetHP(c4)<=0 && player>=0 && GetHP(player)>0)
		{

			PlayerPerform("say", "呜....女人都是这样。哼。");
			PlayerPerform("pause", 3);

			trg6 = 2;
		        gameover = 1;
			timer0 = now + 4;
		}		
	}



	if (gameover!=-1 && GetHP(player)<=0)
	{
		gameover = -1;
		timer1 = now + 2; 
	}	
	if ((gameover==1 || gameover==-1) && now>timer1)
	{
		GameOver(gameover);
		gameover = 2;
	}
}
     
