// 金华城
int Rule = 4;
int RoundTime = 99;
int PlayerSpawn = 13;
int PlayerSpawnDir = 305;
int PlayerWeapon = 50;
int PlayerWeapon2 = 54;
int PlayerHP = 20000;

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;

OnStart()
{
	AddNPC("npc13_01");
	AddNPC("npc13_02");
	AddNPC("npc13_03");
	AddNPC("npc13_04");
	AddNPC("npc13_05");
	AddNPC("npc13_06");
	AddNPC("npc13_07");
        AddNPC("npc13_08");
        AddNPC("npc13_11");
}

OnUpdate()
{	
	int player = GetChar("player");
	if (player < 0)
	{
		return 0;
	}
	
	int c;
	int c2;
	int c3;
	int c4;
	int c5;
	int c6;
	int c7;
	int c8;
	int c9;
	int c10;
	int now = GetGameTime();

        if (trg0 == 0 && now>timer1)
	{
		c = GetChar("蒙面人﹒甲");
		c2 = GetChar("蒙面人﹒乙");
		c3 = GetChar("蒙面人﹒丙");
		c4 = GetChar("蒙面人﹒丁");
		c5 = GetChar("伊人梦");
		if (c>=0 && c2>=0 && c3>=0 && c4>=0)
		{	
			ChangeBehavior(c, "follow", player);
			Perform(c, "pause", 3);
			Perform(c, "aggress");
			Perform(c, "say", "你们是什么人，胆敢闯入这里，找死！");
			Perform(c, "pause", 14);
			Perform(c, "faceto", c3);
			
			ChangeBehavior(c2, "follow", c);
			Perform(c2, "pause", 3);
			Perform(c2, "aggress");
			Perform(c2, "say", "不管是谁，都去死吧！");
			Perform(c2, "pause", 12);
			Perform(c2, "faceto", c);
			
			ChangeBehavior(c3, "follow", player);
			Perform(c3, "pause", 3);
			Perform(c3, "aggress");
			Perform(c3, "say", "还有个妞哇。。！");
			Perform(c3, "pause", 10);
			Perform(c3, "faceto", c);


			Perform(c4, "pause", 17);
			Perform(c4, "faceto", player);


			Perform(c5, "pause", 8);
			Perform(c5, "say", "老公，你说的什么话阿。。！");
			Perform(c5, "pause", 2);
			Perform(c5, "say", "管他几个，一个不留。。。！");
			Perform(c5, "pause", 2);
			Perform(c5, "say", "呵呵. . . 恩。. .");
			Perform(c5, "pause", 2);
			Perform(c5, "faceto", player);

			
                        PlayerPerform("block", 0);
			PlayerPerform("pause", 6);
			PlayerPerform("say", "（嘿。。不说了，先干掉他们。 ）");
		        PlayerPerform("pause", 4);
			PlayerPerform("say", "嘿嘿，你可不要下手这么狠阿，以后可别打我阿？");
		        PlayerPerform("pause", 6);
			PlayerPerform("say", "呵，1 2 3 4个。梦，你两个，我两个。");
			PlayerPerform("faceto", c4);
			PlayerPerform("block", 1);
		        trg0 = 1;
		}				
	}
	
        if (trg1 == 0)
	{
		c = GetChar("律香彬");
		c2 = GetChar("孙剑");
		c3 = GetChar("贴身护卫﹒甲");
		c4 = GetChar("贴身护卫﹒乙");
		c5 = GetChar("蒙面人﹒甲");
		c6 = GetChar("蒙面人﹒丙");
		c7 = GetChar("贴身护卫﹒乙");
		c8 = GetChar("贴身护卫﹒丁");
		SetTarget(0, "char", c);
		SetTarget(1, "char", player);
		if (c>=0 && c2>=0 && c3>=0 && c4>=0 && GetEnemy(c)==player && Distance(0, 1)<200)
		{
			ChangeBehavior(c,"follow",player);
                        Perform(c, "say", "是！");
			Perform(c, "pause", 12);
			Perform(c, "say", "站住！伊人君，胆子真不不小阿。真的过来了。");
			Perform(c, "faceto", player);
				
			ChangeBehavior(c2,"follow",player);
			Perform(c2, "say", "一起杀了他！免留后患");
			Perform(c2, "pause", 2);
			Perform(c2, "say", "我倒要瞧瞧你的厉害。听说你是高寄萍身边一等有的杀手");
			Perform(c2, "pause", 2);		
			Perform(c2, "say", "哼，看你这德行。快活林不过如此.");
			Perform(c2, "pause", 2);		
			Perform(c2, "say", "早猜到你会过来。找死的家伙。");
			Perform(c2, "pause", 2);
			Perform(c2, "faceto", player);

			ChangeBehavior(c3,"follow",player);
			Perform(c3, "say", "是！");
			Perform(c3, "pause", 12);
			Perform(c3, "faceto", player);

			ChangeBehavior(c4,"follow",player);
		        Perform(c4, "say", "是！");
			Perform(c4, "pause", 12);
			Perform(c4, "faceto", player);

			ChangeBehavior(c5,"follow",player);
			Perform(c5, "say", "是！");
			Perform(c5, "pause", 12);
			Perform(c5, "faceto", player);

			ChangeBehavior(c6,"follow",player);
			Perform(c6, "say", "是！");
			Perform(c6, "pause", 12);
			Perform(c6, "faceto", player);

			ChangeBehavior(c7,"follow",player);
			Perform(c7, "say", "是！");
			Perform(c7, "pause", 12);
			Perform(c7, "faceto", player);

			ChangeBehavior(c8,"follow",player);
			Perform(c8, "say", "是！遵命");
			Perform(c8, "pause", 13);
			Perform(c8, "faceto", player);
				
			PlayerPerform("block", 0);
			PlayerPerform("say", "哼，来吧！难道怕你们不成。。 ");
			PlayerPerform("pause", 6);
			PlayerPerform("say", "废话少说，我今天都会让你们死在这里！");
			PlayerPerform("pause", 4);
			PlayerPerform("block", 1);
                        trg1 = 1;
			timer1 = now + 30;
		}
	}
        if (trg1 == 1 && now>timer1)
	{
		c = GetChar("孙剑");
		if (c>=0)
		{
			Perform(c, "say", "怕了么？");
			Perform(c, "guard", 4);
			Perform(c, "faceto", player);


			PlayerPerform("say", "怕你就不叫伊人君。。。。！");
			PlayerPerform("pause", 5);				
			PlayerPerform("say", "（孙剑果然厉害！）");
                        trg1 = 2;
		}
	}

        if (trg1 == 2 && now>timer0)
	{
		c = GetChar("律香彬");
		c2 = GetChar("孙剑");
		if (c>=0 && c2>=0 && GetHP(c2)<20000)
		{
                        Perform(c, "say", "放马过来吧！");
			Perform(c, "pause", 1);
			Perform(c, "say", "你的对手在这！今天好好跟你打一场");
			Perform(c, "pause", 4);
			Perform(c, "faceto", player);

                        Perform(c2, "say", "我先行离开！香彬，这里交给你了。");
			Perform(c2, "pause", 1);
			Perform(c2, "say", "拖延住他！我先回避一下，");
			Perform(c2, "faceto", player);
				
                        PlayerPerform("block", 0);
			PlayerPerform("say", "日！");
			PlayerPerform("pause", 2);
			PlayerPerform("say", "站住！卑鄙小人");
			PlayerPerform("pause", 2);
                        PlayerPerform("block", 1);
                        trg1 = 3;
			timer0 = now + 6;
		}
	}
        if (trg1 == 3 && now>timer0)
	{
		c = GetChar("孙剑");
		if (c>=0)
		{
                        RemoveNPC(c);
                        timer0 = now + 10;					
                        trg1 = 4;
		}
	}
        if (trg1 == 4 && now>timer0)
	{

	         AddNPC("npc13_09");
                 AddNPC("npc13_10");
                 RemoveNPC(GetAnyChar("蒙面人﹒甲"));
                  trg1 = 5;


}

if (trg2 == 0)
	{
		c = GetChar("律香彬");
		if (c>=0 && GetHP(c)<GetMaxHP(c)/2)
		{
                        Perform(c, "use", 34);
			Perform(c, "use", 40);
                        trg2 = 1;
		}
	}


        if (trg3 == 0)
	{
		c = GetChar("律香彬");
		if (c>=0 && GetHP(c)<GetMaxHP(c)/2)
		{
                        Perform(c, "use", 15);
                        Perform(c, "use", 15);
			Perform(c, "use", 33);
			Perform(c, "say", "可恶！看来只有用真功夫了！");
			Perform(c, "faceto", player);

		        PlayerPerform("say", "来吧！我看你有什么真工夫。");
		        PlayerPerform("use", 8);
			PlayerPerform("use", 5);
			PlayerPerform("use", 3);		
		        PlayerPerform("use", 4);
			PlayerPerform("use", 15);
		        PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 20);
			PlayerPerform("use", 8);
			PlayerPerform("use", 22);
			PlayerPerform("use", 34);
			PlayerPerform("use", 40);
			PlayerPerform("use", 5);
			PlayerPerform("use", 3);		
			PlayerPerform("use", 4);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
                        trg3 = 1;
		}
	}

        if (trg4 == 0)
	{
		c = GetChar("律香彬");
		c2 = GetChar("伊人梦");
		if (GetHP(c)<5000 && c2>=0)
		{
			Perform(c, "use", 35);
			Perform(c, "pause", 3);
			Perform(c, "say", "我真的不知道！我只是想来这玩玩而已。但是你可以去城里找找。！");
			Perform(c, "pause", 8);
			Perform(c, "say", "停！我认输，我不是你的对手。");
                        Perform(c, "faceto", player);

                        Perform(c2, "say", "孙剑是在跟我们玩把戏。。。。咱就顺着他。。");
			Perform(c2, "pause", 2);
			Perform(c2, "say", "他是不会说的。杀了他算了。");
			Perform(c2, "pause", 2);
			Perform(c2, "say", "呵呵，怕了？小人。");
			Perform(c2, "pause", 2);
			Perform(c2, "faceto", player);

			PlayerPerform("block", 0);
			PlayerPerform("say", "？？？？？！！！！");
		        PlayerPerform("pause", 8);
			PlayerPerform("say", "说，孙剑跑哪里了？");
		        PlayerPerform("pause", 4);
			PlayerPerform("block", 1);
                        trg4 = 1;
		}
	}		


        if (trg5 == 0)
	{
		c = GetChar("律香彬");
		if (c>=0 && GetHP(player)<GetMaxHP(player)/2)
	        { 
                        PlayerPerform("use", 8);
			PlayerPerform("use", 5);
			PlayerPerform("use", 3);		
		        PlayerPerform("use", 4);
			PlayerPerform("use", 15);
		        PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 20);
			PlayerPerform("use", 8);
			PlayerPerform("use", 22);
			PlayerPerform("use", 34);
			PlayerPerform("use", 40);
			PlayerPerform("use", 5);
			PlayerPerform("use", 3);		
			PlayerPerform("use", 4);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("use", 15);
			PlayerPerform("say", "没想到你小子还有两下子阿。呵呵。有打头喽！");
                        trg5 = 1;
		}
	}


}