// 五爪峰
int Rule = 3;
int RoundTime = 15;
int PlayerSpawn = 19;
int PlayerSpawnDir = 0;
int PlayerWeapon = 32;
int PlayerWeapon2 = 28;
int PlayerHP = 8000;

OnStart()
{
	AddNPC("npc11_01");
	AddNPC("npc11_02");
	AddNPC("npc11_03");
	AddNPC("npc11_04");
	AddNPC("npc11_05");
	AddNPC("npc11_06");
	AddNPC("npc11_07");
	AddNPC("npc11_08");
}
int player;
int trg0;
int trg1;
int trg2;
int timer0;
int timer1;
int gameover; 
OnUpdate()
{	
	int player = GetAnyChar("player");
	if (player < 0)
	{
		return 0;
	}
	if (gameover == 2)
	{
		return 0;
	}
	int now = GetGameTime();
	if (trg0 == 0)
	{
		int c = GetChar("冷燕");
		int c2 = GetChar("刀恶");
		if (c>=0 && c2>=0)
		{
			SetTarget(0, "char", c);
			ChangeBehavior(c2, "attacktarget", 0);
			Perform(c2, "pause", 5);
			Perform(c2, "say", "我想我不用做了，想说捡来跟活人乐一乐的说！但是你不识好歹，不过！我是不介意奸尸的啦！");
			Perform(c2, "pause", 5);
			Perform(c2, "say", "真是可惜，原本想说药被男的拿走的话，我也能仿造这个药，但是他不要，你又丢了。");
			Perform(c2, "pause", 5);
			Perform(c2, "say", "哇哈哈..真的不想活了？没关系！我可以先杀后奸，哈哈！");
			Perform(c2, "pause", 5);
			Perform(c2, "say", "呵..还在嘴硬！你中毒不轻吧！？");
			Perform(c2, "pause", 5);
			Perform(c2, "say", "哇哈哈哈！有个细皮嫩肉的女人，来！让大爷我好好照顾你！");
			Perform(c2, "faceto", c);
		
			Perform(c, "attack");
			Perform(c, "faceto", c2);
			Perform(c, "guard", 5);
			Perform(c, "faceto", c2);
			Perform(c, "say", "你想的美！");
			Perform(c, "pause", 5);
			Perform(c, "say", "可恶！");
			Perform(c, "pause", 5);
			Perform(c, "say", "我中毒照样能收拾你这淫贼！");
			Perform(c, "pause", 5);
			Perform(c, "say", "可恶！你这淫贼！！");
			Perform(c, "pause", 2);
			Perform(c, "faceto", c2);
			Perform(c, "use", 14);
			
			PlayerPerform("block", 0);
			PlayerPerform("say", "冷燕有危险，快点去救她吧！");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "唔！有人可制造解药？");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "为什么？解药不是在她身上吗？");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "..那声音是冷燕的...！？");
			PlayerPerform("pause", 8);
			PlayerPerform("use", 14);
			PlayerPerform("block", 1);
		
			trg0 = 1;
			timer0 = now + 25;
		}
	}
	if (trg0 == 1 && GetGameTime() > timer0)
	{
		SetTarget(0, "char", c);
		SetTarget(1, "char", player);
		if (c>=0 && c2>=0 && Distance(0, 1) < 200)
		{
			ChangeBehavior(c, "follow", player);
			ChangeBehavior(c2, "follow", player);
			Perform(c2, "say", "情你个头！我也懒得跟男人说感情！又不是同性恋！");
			Perform(c2, "pause", 5);
			Perform(c2, "say", "耻你个头！今天我要你们两个半死的人，变成死人！");
			Perform(c2, "pause", 5);
			Perform(c2, "say", "你奶奶个熊！居然来坏大爷我的好事！");
			Perform(c2, "guard", 3);
			Perform(c2, "faceto", player);
		
			Perform(c, "pause", 18);
			Perform(c, "say", "来了！");
			Perform(c, "guard", 4);
			Perform(c, "faceto", player);
			
			PlayerPerform("block", 0);
			PlayerPerform("pause", 7);
			PlayerPerform("say", "那就休怪我无情了！");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "一个大男人欺负女流之辈，不觉得可耻？");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "住手！");
			PlayerPerform("block", 1);
		
			trg0 = 2;
			timer0 = now + 19;
		}
	}
	if (trg0 == 2 && GetGameTime() > timer0)
	{
		if (GetHP(c2)<=0)
		{
			Perform(c2, "say", "大哥！我输了！离开这里我就给你们调制解药！");
	
			trg0 = 3;
			timer0 = now + 19;
			int gb = 1;
		}
	}
	if (trg1 == 0  && GetGameTime() > timer0)
	{
		int c3 = GetChar("剑仙の玄武");
		int c4 = GetChar("剑圣の赵云");
		if (c3>=0)
		{
			Perform(c3, "say", "很好！这个门由我守住！你们去巡隘口！");
			Perform(c3, "pause", 6);
			Perform(c3, "say", "屠城那个垃圾死了！快活林的杀手一定要捉到！");
		
			Perform(c4, "say", "是！我们不会让他们顺利逃离的！");
			Perform(c4, "guard", 4);

			trg1 = 1;
			trg2 = 1;
			timer1 = now + 5;
		}
	}
	if (trg1 == 1  && GetGameTime() > timer1 && trg2 < 2)
	{
		if (c4>=0 &&  GetEnemy(c4))
		{
			ChangeBehavior(c4, "follow", player);
			ChangeBehavior(GetChar("天将队长"), "follow", player);
			ChangeBehavior(GetChar("天兵侍卫"), "follow", player);
			ChangeBehavior(GetChar("天兵队长"), "follow", player);
			Perform(c4, "say", "大家快来啊！找到残兵败将了！");

			trg1 = 2;
			timer1 = now + 5;
		}
	}
	if (trg2 == 1  && GetGameTime() > timer1 )
	{
		SetTarget(0, "char", c3);
		SetTarget(1, "char", player);
		if (c4>=0 &&  Distance(0, 1) < 300)
		{
			ChangeBehavior(c4, "follow", player);
			ChangeBehavior(GetChar("天将队长"), "follow", player);
			ChangeBehavior(GetChar("天兵侍卫"), "follow", player);
			ChangeBehavior(GetChar("天兵队长"), "follow", player);
			ChangeBehavior(GetChar("火枪兵"), "follow", player);
			Perform(c3, "say", "顺便告诉你个好消息，就算是三层功力，也够杀你了");
			Perform(c3, "pause", 3);
			Perform(c3, "say", "我们要复活一次！修为就会消失七成功力，气死我了。");
			Perform(c3, "pause", 3);
			Perform(c3, "say", "上次小看你们，我们只用了一成功力！输了！这口气我们哪能吞下去？");
			Perform(c3, "pause", 3);
			Perform(c3, "say", "哼哼！今天你们都会死！");
			Perform(c3, "pause", 3);
			Perform(c3, "say", "你们妄想离开这里！");
			Perform(c3, "faceto", player);
			
			PlayerPerform("block", 0);
			PlayerPerform("pause", 3);
			PlayerPerform("pause", 3);
			PlayerPerform("say", "就为了这种小事！？");
			PlayerPerform("pause", 3);
			PlayerPerform("say", "切...哼。");
			PlayerPerform("pause", 3);
			PlayerPerform("say", "还想在死一次？");
			PlayerPerform("pause", 3);
			PlayerPerform("say", "唔！你们不是死了吗？");
			PlayerPerform("pause", 2);
			PlayerPerform("block", 1);

			trg2 = 2;
			timer1 = now + 5;
		}
	}
	if (gameover!=-1 && GetHP(player)<=0)
	{
		gameover = -1;
		timer1 = now + 2; 
	}
	c = GetAnyChar("冷燕");
	if (gameover!=-1 && c>=0 && GetHP(c)<=0)
	{			
		gameover = -1;
		timer1 = now + 2; 
	}	
	if ((gameover==1 || gameover==-1) && now>timer1)
	{
		GameOver(gameover);
		gameover = 2;
	}
}
