//  一切的一切
int Rule = 1;
int RoundTime = 99;
int PlayerSpawn = 0;
int PlayerSpawnDir = 305;
int PlayerWeapon = 48;
int PlayerWeapon2 = 17;
int PlayerHP = 15000;

int trg0; 
int shi0; 
int trg1;
int trg2;

int now;  
int player;
int timer0;  
int gameover;

int c1;      
int ca1;      
int c2;      
int ca2;   
int c3;   
int ca3; 
int c4;
int ca4;
int c5;
int ca5;
int c6;   
int ca6; 
int c7;
int ca7;  // NPC代码
  
int bing;  // 兵兵
int bing1; 
int tong;  // 痛笑
int tong1; 
int lao;   // 老大
int lao1; 
int zhu;   // 公主 
int zhu1;  
int zhushi;  
int p1;   // 快活林
int p2; 
int p3; 
int p4; 
int p5; 
int pa1; 
int pa2; 
int pa3; 
int pa4; 
int pa5; 

int j1;  //F条件

int y1;      
int ya1;      
int y2;      
int ya2;   
int y3;   
int ya3; 
int y4;
int ya4;
int y5;
int ya5;

GetDistance(int k1,int k2)
{
   SetTarget(0, "char", k1);
   SetTarget(1, "char", k2);
   return Distance(0,1);
}


GetManPlaceDistance(int man,int place)
{
   SetTarget(0, "char", man);
   SetTarget(1, "waypoint", place);
   return Distance(0,1);
}

difangNPC(int pa,int p) { // 快活林人事死亡读曲
 if (pa>=0 && p<0) {
  GameOver(-1);}}
kuaihuolin(int pa,int p) { // 敌方NPC死亡读曲
 if (pa>=0 && p<0) {
  GameOver(-1);}}
gaolaoda(int lao,int la) { // 高老大死亡读曲
 if (lao>=0 && la<0) {
  GameOver(-1);}}


GetNPCChar() {
   bing=GetChar("『流星奇迹』_兵兵");
   bing1=GetAnyChar("『流星奇迹』_兵兵");
   tong=GetChar("只痛笑ZJ  ☆");
   tong1=GetAnyChar("只痛笑ZJ  ☆");
   lao=GetChar("『流星奇迹』_高老大");
   lao1=GetAnyChar("『流星奇迹』_高老大");
   zhu=GetChar("『流星奇迹』_公主");
   zhu1=GetAnyChar("『流星奇迹』_公主");
   p1=GetChar("『流星奇迹』_梦");
   pa1=GetAnyChar("『流星奇迹』_梦");
   p2=GetChar("『流星奇迹』_凤凤");
   pa2=GetAnyChar("『流星奇迹』_凤凤");
   p3=GetChar("『流星奇迹』_小何");
   pa3=GetAnyChar("『流星奇迹』_小何");
   p4=GetChar("『流星奇迹』_叶翔");
   pa4=GetAnyChar("『流星奇迹』_叶翔");
   p5=GetChar("『流星奇迹』_大哥");
   pa5=GetAnyChar("『流星奇迹』_大哥");
   c1=GetChar("『流星奇迹』_土匪");
   ca1=GetAnyChar("『流星奇迹』_土匪");
   c2=GetChar("『流星奇迹』_孙剑");
   ca2=GetAnyChar("『流星奇迹』_孙剑");
   c3=GetChar("『流星奇迹』_子舆");
   ca3=GetAnyChar("『流星奇迹』_子舆");
   c4=GetChar("『流星奇迹』_王强");
   ca4=GetAnyChar("『流星奇迹』_王强");
   c5=GetChar("『流星奇迹』_蒙面");
   ca5=GetAnyChar("『流星奇迹』_蒙面");
   c6=GetChar("『流星奇迹』_孙玉伯");
   ca6=GetAnyChar("『流星奇迹』_孙玉伯");
   c7=GetChar("『流星奇迹』_律香川");
   ca7=GetAnyChar("『流星奇迹』_律香川");
   y1=GetChar("『流星奇迹』_无名1");
   ya1=GetAnyChar("『流星奇迹』_无名1");
   y2=GetChar("『流星奇迹』_无名2");
   ya2=GetAnyChar("『流星奇迹』_无名2");
   y3=GetChar("『流星奇迹』_无名3");
   ya3=GetAnyChar("『流星奇迹』_无名3");
   y4=GetChar("『流星奇迹』_无名4");
   ya4=GetAnyChar("『流星奇迹』_无名4");
   y5=GetChar("『流星奇迹』_无名5");
   ya5=GetAnyChar("『流星奇迹』_无名5");

}
diannao(){

if (zhushi+100<=GetGameTime()) {
zhushi = GetGameTime();	
Perform(zhu,"use",30);
Perform(zhu,"use",40);
Perform(zhu,"use",41);
Perform(zhu,"use",5);
Perform(zhu,"use",3);	
Perform(zhu,"use",4);
Perform(zhu,"use",19);
Perform(zhu,"use",34);}}

scene1(){
if (trg0 == 0 &&  zhu>=0 && GetDistance(player,zhu)<=200 ){


SetTarget(1,"waypoint",5);
ChangeBehavior(zhu,"attacktarget",1);
PlayerPerform("block",0);
Perform(zhu, "aggress");
Perform(zhu,"pause",4);
PlayerPerform("say","那就让我来结束这一切！... 受死吧！ ");  // 时刻:50
PlayerPerform("pause",8);
Perform(zhu,"say","好一个（普度重生）. 不过说的对，我害人害的不少了，该是结束的时候了...");  // 时刻:46
Perform(zhu,"pause",8);
PlayerPerform("say","我不会客气的，杀死你，（普度重生）不会是（情缘未了）了 ");  // 时刻:42
PlayerPerform("pause",8);
Perform(zhu,"say","不用在说了，一切他们都是听命于我，其实你真正该杀的人就是我..动手吧！.");  // 时刻:38
Perform(zhu,"pause",8);
PlayerPerform("say","是你自己不知道珍惜自己的生命.. ");  // 时刻:35
PlayerPerform("say","那又如何呢！你还不是一个死！...连伤害梦跟老大我怎能饶恕你，在说之前我放了你。 ");  // 时刻:34
PlayerPerform("pause",8);
Perform(zhu,"say","这一切的一切...都要结束在今天你跟我的这一战。结束了我，永远代表结束了！ .");  // 时刻:30
Perform(zhu,"pause",1);
Perform(zhu,"say","从来不需要你的可怜！自知不是你的对手，我也要跟你打一场....");  // 时刻:29
Perform(zhu,"pause",6);
PlayerPerform("say","说这话是什么意思！你是不是知道打不过我呢，放心吧，我是不会留情的。我一定要杀了你.. ");  // 时刻:26
PlayerPerform("pause",6);
Perform(zhu,"say","哈哈，我这辈子没什么留恋的了，江湖上的高手我都知道了。也见到了...");  // 时刻:23
Perform(zhu,"pause",5);
PlayerPerform("say","果然不出所料.. 你真是真人不漏相阿！不过今天你是死定了！ ");  // 时刻:20
PlayerPerform("pause",4);
Perform(zhu,"say","哈哈！当然是有事情发生在你身上，所以才会缠着你不放！结果连累了我爹。他是无辜的。.");  // 时刻:18
Perform(zhu,"pause",4);
PlayerPerform("say","难道他们没有死，既然你是老大，。那你为什么老是缠着我不放呢！.. ");  // 时刻:16
PlayerPerform("pause",6);
Perform(zhu,"say","哼，他们死了没有，我比谁都清楚，不用你来责备我，今天是算算你跟我的事情。");  // 时刻:13
Perform(zhu,"pause",6);
PlayerPerform("say","你这个妖女还有没有良心阿，孙剑他们都是为了你牺牲的，你竟然说出这样的话。 ");  // 时刻:10
PlayerPerform("pause",6);
Perform(zhu,"say","我是公主，孙剑他们说穿了跟你一样.都是一条狗！");  // 时刻:7
Perform(zhu,"pause",5);
PlayerPerform("say","我也是F你了，小小的年纪真是厉害，孙剑都是你的手下，你究竟是谁 ");  // 时刻:4
PlayerPerform("pause",4);
Perform(zhu,"say","哈哈！你真是厉害，竟能走出洛阳，救出你的老大，我也真是F你.");  // 时刻:2
Perform(zhu,"pause",2);
PlayerPerform("say"," 今天你是跑不掉的了！" );  // 时刻:0
Perform(zhu,"faceto",player);
PlayerPerform("block",1);
trg0++;shi0=GetGameTime();}


if (trg0==1 && zhu>=0 && GetHP(zhu)<GetMaxHP(zhu) && shi0+50>GetGameTime()) {
GameOver(-1);}

if (trg0==1 && GetManPlaceDistance(zhu,5)<50) {

ChangeBehavior(zhu,"kill",player);
PlayerPerform("block",0);
PlayerPerform("say",".........."); 
PlayerPerform("pause",2);
Perform(zhu, "aggress");
Perform(zhu,"say","！ 了断！情缘  我知道你喜欢我，但是我们是不可能的。 "); 
Perform(zhu,"faceto",player);
PlayerPerform("block",1);
trg0++;}

if (trg0==2 && GetHP(zhu)<GetMaxHP(zhu)/2 && j1==0)  {

ChangeBehavior(zhu,"kill",player);
PlayerPerform("block",0);
PlayerPerform("pause",5);
PlayerPerform("block",1);
Perform(zhu, "aggress");
PlayerPerform("say",".知道跟你斗很奸诈！不过我看你给我耍什么花招！."); 
PlayerPerform("pause",2);
Perform(zhu,"say","！我先休息一下！一会、回来在跟你斗！... "); 
Perform(zhu,"faceto",player);
j1=1;timer0 = now + 5;}

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

RemoveNPC(zhu1);
AddNPC("6");
AddNPC("无名1");AddNPC("无名3");
AddNPC("无名2");AddNPC("无名4");
AddNPC("无名5");
j1=2;}

if (trg0 == 2 &&  c2>=0 &&  y1>=0 && y2>=0 && y3>=0 && y4>=0 && y5>=0 &&GetDistance(player,c2)<=200 ){

ChangeBehavior(y1,"kill",player);
ChangeBehavior(y2,"kill",player);
ChangeBehavior(y3,"kill",player);
ChangeBehavior(y4,"kill",player);
ChangeBehavior(y5,"kill",player);
ChangeBehavior(c2,"kill",player);
PlayerPerform("block",0);
Perform(y1, "aggress");
Perform(y2, "aggress");
Perform(y3, "aggress");
Perform(y4, "aggress");
Perform(y5, "aggress");
Perform(c2, "aggress");
Perform(y1,"pause",30);
Perform(y2,"pause",30);
Perform(y3,"pause",30);
Perform(y4,"pause",30);
Perform(y5,"pause",30);
Perform(c2,"say"," 认命吧.");  // 时刻:26
Perform(c2,"pause",8);
PlayerPerform("say","哦！那我就来结束一切！.. ");  // 时刻:22
PlayerPerform("pause",6);
Perform(c2,"say","我也不知道，自我感觉这一切的一切将要结束！。.");  // 时刻:18
Perform(c2,"pause",4);
PlayerPerform("say","结束！你怎么知道，此话怎么解释！.. ");  // 时刻:16
PlayerPerform("pause",6);
Perform(c2,"say","没用了。真的要结束了，真的要结束在今天了。知道为什么吗？");  // 时刻:13
Perform(c2,"pause",6);
PlayerPerform("say","不管死没死，至少你们败给我，我已经觉得很满足了至于你们的死，我并不是就真的想杀你们灭口。 ");  // 时刻:10
PlayerPerform("pause",6);
Perform(c2,"say"," 人总会死，这是命运。不过你屡次杀的人都是白杀的，你做错了。");  // 时刻:7
Perform(c2,"pause",5);
PlayerPerform("say"," 你能说出这种话，看来你一点都没有自尊心，活在公主的指示下！你活着有什么意思。 ");  // 时刻:4
PlayerPerform("pause",4);
Perform(c2,"say"," 不错，现在你知道什么事情了吧，我们的所做所为都是公主的指示，只不过我是她的狗而已！.");  // 时刻:2
Perform(c2,"pause",2);
PlayerPerform("say"," 孙剑！你没有死，很好！是不是一切将结束在今天.." );  // 时刻:0
Perform(c2,"faceto",player);
Perform(y1,"faceto",player);
Perform(y2,"faceto",player);
Perform(y3,"faceto",player);
Perform(y4,"faceto",player);
Perform(y5,"faceto",player);
PlayerPerform("block",1);
trg0++;shi0=GetGameTime();}

if (trg0==3 && c2>=0 && y1>=0 && y2>=0 && y3>=0 && y4>=0 && y5>=0 && GetHP(c2)<GetMaxHP(c2) && GetHP(y1)<GetMaxHP(y1) && GetHP(y2)<GetMaxHP(y2) && GetHP(y3)<GetMaxHP(y3) && GetHP(y4)<GetMaxHP(y4) && GetHP(y5)<GetMaxHP(y5)&& 
shi0+30>GetGameTime()){
GameOver(-1);}


if (trg0==3 && GetHP(c2)<GetMaxHP(c2)/2){

PlayerPerform("say"," ？？？？？？？？. ");  // 时刻:4
PlayerPerform("pause",4);
Perform(c2, "aggress");
Perform(y1, "aggress");
Perform(y2, "aggress");
Perform(y3, "aggress");
Perform(y4, "aggress");
Perform(y5, "aggress");
Perform(c2,"say"," .做个结束吧！让你明白一切！..（伊人君） 无名！我们走....！！ "); 
trg0++;timer0 = now + 5;}

if (trg0==4 && now>timer0){
RemoveNPC(ya1);
RemoveNPC(ya2);
RemoveNPC(ya3);
RemoveNPC(ya4);
RemoveNPC(ya5);
RemoveNPC(ca2);
AddNPC("自己0");
trg0++;}

if (trg0==5 && lao>=0 && GetDistance(player,lao)<=200 ){

PlayerPerform("block",0);
Perform(lao,"pause",4);
Perform(lao, "aggress");
Perform(lao,"say"," 那就让兵兵告诉你吧！...");  // 时刻:26
Perform(lao,"pause",8);
PlayerPerform("say","  啊，都来了！忽忽，到底是什么事情，能不能快点告诉我阿。那公主不用杀了吗？. ");  // 时刻:22
PlayerPerform("pause",6);
Perform(lao,"say","这你不用问。待会你自然就知道了。呵呵！.");  // 时刻:18
Perform(lao,"pause",4);
PlayerPerform("say"," 搞什么阿，还把快活林的人叫来，又不是护送你，说个事情叫什么人阿/。.. ");  // 时刻:16
PlayerPerform("pause",6);
Perform(lao,"say","  呵呵，不要着急！先把我们快活林的人全部叫出来！...");  // 时刻:13
Perform(lao,"pause",6);
PlayerPerform("say"," 什么事情 ..快告诉我，就我被蒙在鼓里了！....");  // 时刻:10
PlayerPerform("crouch", 0);
PlayerPerform("pause",6);
Perform(lao,"say"," 对。不过是好事情！...你现在还不知道什么事吧！我来告诉你吧...");  // 时刻:7
Perform(lao,"pause",5);
PlayerPerform("say"," 怎么你也说结束呢，究竟是什么事情，难道又有什么事情发生吗？ ");  // 时刻:4
PlayerPerform("pause",4);
Perform(lao,"say"," 君.你这一切不会在迟延下去了，该结束了！... ");  // 时刻:2
Perform(lao,"pause",2);
PlayerPerform("say"," 老大！你现在处境很危险！还是回快活林避一下吧！." );  // 时刻:0
Perform(lao,"faceto",player);
PlayerPerform("block",1);
PlayerPerform("crouch", 1);
trg0++;timer0 = now + 18;}

if (trg0==6 && now>timer0){
AddNPC("自己1");AddNPC("自己4");
AddNPC("自己2");
AddNPC("自己3");AddNPC("自己5");
trg0++;timer0 = now + 10;}


if (trg0==7 && p1>=0 &&  p2>=0 &&  p3>=0 &&  p4>=0 &&  p5>=0 && lao>=0 && now>timer0){

PlayerPerform("say","先不要说这些.. 兵兵怎么还不出现呢！！ ");  // 时刻:20
PlayerPerform("pause",10);
Perform(p2,"say"," 君  你是我们快活林的榜样！. ");  // 时刻:2
Perform(p2,"pause",18);
Perform(lao,"say"," 唉.. 我们跟你讲不清楚的，让兵兵来告诉你吧！ ");  // 时刻:14
Perform(lao,"pause",15);
PlayerPerform("say"," 到底是什么事情！！求求你告诉我好不好！ ");  // 时刻:10
PlayerPerform("pause",6);
Perform(p1, "aggress");
Perform(p1,"say"," 这个吗？我也是讲不清楚，反正一切都不在重演了..你也可以跟我白头到老了！. ");  // 时刻:7
Perform(p1,"faceto",player);
Perform(p1,"pause",5);
PlayerPerform("say"," 梦！你来告诉我，什么事情！什么结束，那妖女你们不杀了！ ");  // 时刻:4
PlayerPerform("pause",4);
Perform(p1,"say"," 老大！我们来了。.... ");  // 时刻:2
Perform(p1,"pause",2);
Perform(p1,"faceto",lao);
Perform(p2,"faceto",lao);
Perform(p3,"faceto",lao);
Perform(p4,"faceto",lao);
Perform(p5,"faceto",lao);

trg0++;timer0 = now + 25;}

if (trg0==8 && now>timer0){
AddNPC("900");
trg0++;}

if (trg1==0 && p1>=0 &&  p2>=0 &&  p3>=0 &&  p4>=0 &&  p5>=0 && lao>=0 && bing>=0){

ChangeBehavior(p1, "follow", bing);
ChangeBehavior(p2, "follow", bing);
ChangeBehavior(p3, "follow", bing);
ChangeBehavior(p4, "follow", bing);
ChangeBehavior(p5, "follow", bing);
ChangeBehavior(lao, "follow", bing);
Perform(p1, "aggress");
Perform(p2, "aggress");
Perform(p3, "aggress");
Perform(p4, "aggress");
Perform(p5, "aggress");
Perform(lao, "aggress");
Perform(bing, "aggress");
Perform(p4,"pause",10);
Perform(p3,"pause",13);
Perform(p5,"pause",15);
Perform(p2,"pause",19);
Perform(p1,"pause",20);
Perform(lao,"pause",5);
Perform(bing,"say"," 那就把NPC叫出来，咱一起杀了痛快！不过不许杀死！...谁都不可以死！ ");  // 时刻:110
Perform(bing,"pause",1);
Perform(bing,"say"," 很好....不过在最后不要给我闹出人命！毕竟都是游戏！不准在我离开的时候杀生！ ");  // 时刻:109
Perform(bing,"pause",25);
Perform(lao,"say"," 虽然我是快活林的老大.但是我也愿意跟你合作！因为有你才有我！ "); // 105
Perform(lao,"pause",50);
Perform(p4,"say"," 我虽然长的比你帅 但这都是兵兵的功劳阿！."); // 100
Perform(p4,"pause",45);
Perform(p3,"say"," 是啊是啊！合作是必须的！."); // 97
Perform(p3,"pause",42);
Perform(p5,"say"," 我现在已经是快活林的大哥了，这都是兵兵的功劳！我们怎么会不愿意跟你合作呢！."); // 95
Perform(p5,"pause",40);
Perform(p2,"say"," 这是我们的服气！..！."); // 91
Perform(p2,"pause",36);
Perform(p1,"say"," 当然愿意了！..能跟你合作也不枉费你研究了我！."); // 90
Perform(p1,"pause",35);
Perform(bing,"say"," 到最后我告诉你！...不知道大家愿意跟我合作一下吗？.");  // 时刻:84
Perform(bing,"pause",10);
PlayerPerform("say"," 你说的是公主吗...  是不是把他杀掉呢！ ");  // 时刻:78
PlayerPerform("pause",10);
Perform(bing,"say"," 在我走的这场结局里，还想跟我一起合作杀个痛快吗？.");  // 时刻:74
Perform(bing,"pause",1);
Perform(bing,"say"," 流星永远是灿烂的！永远是辉煌的！..");  // 时刻:73
Perform(bing,"pause",1);
Perform(bing,"say"," 我又何尝不是呢！这就是结局！一段小小的结局！真正的结局是永远都不会停止的..");  // 时刻:72
Perform(bing,"pause",10);
PlayerPerform("say"," 很好！那我们也同时希望你常常回来看看我们！我们也是会想你的！... ");  // 时刻:68
PlayerPerform("pause",30);
Perform(bing,"say"," 不过我没想过放弃阿，流星已经成为了我生命中的一部分！.");  // 时刻:62
Perform(bing,"pause",1);
Perform(bing,"say"," 只能有时间研究！大家分享的快乐少了一点，我在这里表示抱歉！.");  // 时刻:61
Perform(bing,"pause",1);
Perform(bing,"say"," 不错！对于流星我是喜欢！好不容易走到现在这个地步，我怎么会放弃，只是时间不能全放在这里了");  // 时刻:60
Perform(bing,"pause",10);
Perform(p1,"say"," 你说的这句话我们很是愿意听！你说的很对，人这一生不可缺少游戏！那样活着也是没意思的！");  // 时刻:55
Perform(p1,"crouch", 1);
Perform(p2,"crouch", 1);
Perform(p3,"crouch", 1);
Perform(p4,"crouch", 1);
Perform(p5,"crouch", 1);
Perform(lao,"crouch", 1);
Perform(p1,"pause",55);
Perform(p2,"pause",55);
Perform(p3,"pause",55);
Perform(p4,"pause",55);
Perform(p5,"pause",55);
Perform(lao,"pause",10);
Perform(bing,"say"," 错！我没有放弃研究..我以后有的时间多的事，即使你们是游戏！但是人生中不可缺少游戏！");  // 时刻:50
Perform(bing,"pause",17);
Perform(lao,"say"," 兵兵..我祝你工作顺利！虽然你走掉！我们就会消失！将不会出现！但是我们也为你祝福..毕竟这是个游戏.. "); 
Perform(lao,"pause",45);
PlayerPerform("say"," 对.. 你说的很对，人生就是为了理想而活着！... ");  // 时刻:40
PlayerPerform("pause",13);
Perform(bing,"say"," 不错。我终于找到了一份属于自己的工作，我姐姐开了个大型（化妆品）我要去那里完成我的理想 ");  // 时刻:33
Perform(bing,"pause",11);
PlayerPerform("say","阿.原来是这样阿！你要工作了吗？.. ");  // 时刻:29
PlayerPerform("pause",15);
Perform(bing,"say"," 抱歉了.. 为了我的理想，人生就是要为理想而活着，如果不干点事业，活着有什么意思。 ");  // 时刻:26
Perform(bing,"pause",14);
PlayerPerform("say"," 什么理想呢！。你是不是不研究任务了以后，那我们以后还玩什么阿！... ");  // 时刻:19
PlayerPerform("pause",11);
Perform(bing,"say"," 不是奖励！不需要什么奖励！在我以后的日子里，今天我的理想将要实现！.. ");  // 时刻:14
Perform(bing,"pause",10);
PlayerPerform("say"," 呵呵！这么说，我怪不好意思的，什么事情，告诉我阿，是不是要奖励什么阿。 ");  // 时刻:8
PlayerPerform("pause",8);
Perform(bing,"say"," 本人制作的任务！你基本都闯过去了，在我的人生里，永远有你！也有大家！ ");  // 时刻:4
Perform(bing,"pause",4);
PlayerPerform("say"," 兵兵！到底是什么事情呢！为什么结局来了，是不是你搞的什么鬼阿。嘿嘿.. ");
Perform(bing,"faceto",player);
Perform(p1,"faceto",bing);
Perform(p2,"faceto",bing);
Perform(p3,"faceto",bing);
Perform(p4,"faceto",bing);
Perform(p5,"faceto",bing);
Perform(lao,"faceto",bing);
trg1++;timer0 = now + 115;}

if (trg1==1 && now>timer0){
AddNPC("2");
AddNPC("6");
AddNPC("8");
AddNPC("9");
AddNPC("10");
AddNPC("18");
AddNPC("19");
AddNPC("500");
SetTarget(1,"waypoint",2);
ChangeBehavior(bing,"attacktarget",1);
Perform(bing,"pause",10);
Perform(bing,"say"," 谁有不许闹出人命！只是最后我跟大家一起玩一玩！下次玩就不知道什么时候了！ ");  // 时刻:4
trg1++;}


if (trg2==0 && zhu>=0 && bing>=0 && c1>=0 && c2>=0 && c3>=0 && c4>=0 && c5>=0 && c6>=0 && c7>=0 && GetDistance(bing,zhu)<=100 ){

ChangeBehavior(p1, "idle");
ChangeBehavior(p2, "idle");
ChangeBehavior(p3, "idle");
ChangeBehavior(p4, "idle");
ChangeBehavior(p5, "idle");
ChangeBehavior(bing, "idle");
ChangeBehavior(lao, "idle");
Perform(c1, "aggress");
Perform(c2, "aggress");
Perform(c3, "aggress");
Perform(c4, "aggress");
Perform(c5, "aggress");
Perform(c6, "aggress");
Perform(c7, "aggress");
Perform(p1, "aggress");
Perform(p2, "aggress");
Perform(p3, "aggress");
Perform(p4, "aggress");
Perform(p5, "aggress");
Perform(lao, "aggress");
Perform(zhu, "aggress");
Perform(zhu,"pause",40);
Perform(lao,"pause",38);
Perform(p1,"pause",13);
Perform(p2,"pause",40);
Perform(p3,"pause",40);
Perform(p4,"pause",40);
Perform(p5,"pause",40);
Perform(c1,"pause",40);
Perform(c2,"pause",40);
Perform(c3,"pause",40);
Perform(c4,"pause",40);
Perform(c5,"pause",40);
Perform(c6,"pause",40);
Perform(c7,"pause",40);
Perform(bing, "aggress");
Perform(bing,"say"," 咨询网站www.23yh.cn  再见拉！嘿嘿！..永远关注你们的兵兵！.. ");  // 时刻:52
Perform(bing,"pause",2);
Perform(bing,"say"," 宣告结束！有机会在见！拜拜..记得我们！永远关注幽魂网的兵兵.. ");  // 时刻:50
Perform(bing,"pause",29);
Perform(p1,"say"," 自由了！哈哈...！！ "); // 37
Perform(p1,"pause",10);
Perform(bing,"say"," 因为这已经是我生命的一部分！我会常常来看你们的。 ");  // 时刻:31
Perform(bing,"pause",1);
Perform(bing,"say"," 呵呵！好了，有机会在见了，我要走了！这一切暂时结束了。但是不会永远。绝对不会。 ");  // 时刻:30
Perform(bing,"pause",12);
Perform(p1,"say"," 老公 说的太棒了！lvoe！..你 "); // 27
Perform(p1,"pause",7);
PlayerPerform("say"," 永远要保持快乐！祝福你！... ");  // 时刻:24
PlayerPerform("pause",2);
PlayerPerform("say"," 是！。呵呵！祝兵兵工作开心快乐！这是我们想要的，但是不要忘了我们！... ");  // 时刻:22
PlayerPerform("pause",22);
Perform(p1,"say"," （君）！还楞着干什么..难道你不为兵兵高兴吗？  "); // 20
Perform(p1,"pause",5);
Perform(bing,"say"," 虽然你们不是人类. 只是一个游戏. 但说出的话很安慰！你们也是，要开心快乐，我有时间会回来的 ");  // 时刻:18
Perform(bing,"pause",10);
Perform(p1,"say"," 我终于能和（君）白头偕老了！这都是兵兵的功劳阿。工作一定要开心哦！.. "); // 15
Perform(p1,"pause",5);
Perform(lao,"say"," 一切都恢复平静了..在这段时间我累的也不轻阿，该是歇歇的时候了！  "); // 12
Perform(lao,"pause",2);
Perform(p1,"crouch", 1);
Perform(p2,"crouch", 1);
Perform(p3,"crouch", 1);
Perform(p4,"crouch", 1);
Perform(p5,"crouch", 1);
Perform(c1,"crouch", 1);
Perform(c2,"crouch", 1);
Perform(c3,"crouch", 1);
Perform(c4,"crouch", 1);
Perform(c5,"crouch", 1);
Perform(c6,"crouch", 1);
Perform(c7,"crouch", 1);
Perform(zhu,"crouch", 1);
Perform(lao,"crouch", 1);
Perform(p1,"pause",10);
Perform(p2,"pause",10);
Perform(p3,"pause",10);
Perform(p4,"pause",10);
Perform(p5,"pause",10);
Perform(c1,"pause",10);
Perform(c2,"pause",10);
Perform(c3,"pause",10);
Perform(c4,"pause",10);
Perform(c5,"pause",10);
Perform(c6,"pause",10);
Perform(c7,"pause",10);
Perform(lao,"pause",10);
Perform(zhu,"say"," 那太好了。那我们全体NPC祝福你工作顺利，爱情甜美哦！.. "); // 10
Perform(zhu,"pause",5);
Perform(bing,"say"," 呵呵！你们都想通了，看来我的努力没有白费！呵呵..我的工作会顺利，因为有你们.. ");  // 时刻:8
Perform(bing,"pause",4);
Perform(zhu,"say"," 结束了.. 希望你不要放弃我们，我希望我们还能重回魔道！..有时间要回来看我们，我们会想你的。 "); // 5
Perform(zhu,"pause",5);
Perform(bing,"say"," 呵呵！你们都想通了，看来我的努力没有白费！呵呵..我的工作会顺利，因为有你们.. ");  // 时刻:4
Perform(bing,"pause",4);
Perform(zhu,"say"," 兵兵！结束了，既然你要工作了，我们也不在相斗了！我们祝福你！找到了自己的理想.. ");
Perform(c1,"faceto",bing);
Perform(c2,"faceto",bing);
Perform(c3,"faceto",bing);
Perform(c4,"faceto",bing);
Perform(c5,"faceto",bing);
Perform(c6,"faceto",bing);
Perform(c7,"faceto",bing);
Perform(zhu,"faceto",bing);
Perform(p1,"faceto",bing);
Perform(p2,"faceto",bing);
Perform(p3,"faceto",bing);
Perform(p4,"faceto",bing);
Perform(p5,"faceto",bing);
Perform(lao,"faceto",bing);
trg2++;timer0 = now + 55;}

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


GameOver(1);trg2++;}}



ziji(){

difangNPC(ca1,c1);
difangNPC(ca2,c2);
difangNPC(ca3,c3);
difangNPC(ca4,c4);
difangNPC(ca5,c5);
difangNPC(ca6,c6);
difangNPC(ca7,c7);
kuaihuolin(pa1,p1);
kuaihuolin(pa2,p2);
kuaihuolin(pa3,p3);
kuaihuolin(pa4,p4);
kuaihuolin(pa5,p5);
gaolaoda(lao1,lao);
if (GetHP(player)<=0) 
{ GameOver(-1);}}

OnStart()
{   
AddNPC("500");
}



OnUpdate()
{	
	player = GetAnyChar("player");
	if (player < 0){return 0;}
        now = GetGameTime();
        GetNPCChar() ; 
        diannao() ; 
	ziji();
	scene1();
        scene2();
}