// 五雷塔6
int Rule = 5;
int RoundTime = 600;
int PlayerSpawn = 115;
int PlayerSpawnDir = 270;
int PlayerWeapon = 15;
int PlayerWeapon2 = 18;
int PlayerHP = 15000;

int trg0; 
int shi0; 
int trg1;
int trg2;
int trg3;
int trg4;
int trg5;
int trg6;

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

int c1shi; 
int c2shi; 
int c3shi; 
int c4shi; 
int c5shi; 
int c6shi; 
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 wuming;
GetDistance(int k1,int k2)
{
   SetTarget(0, "char", k1);
   SetTarget(1, "char", k2);
   return Distance(0,1);
}

GetNPCChar() {
   c1=GetChar("2o10年、兵兵");
   ca1=GetAnyChar("2o10年、兵兵");

   c2=GetChar("只痛笑ZJ  ☆");
   ca2=GetAnyChar("只痛笑ZJ  ☆");

   c3=GetChar("晶晶");
   ca3=GetAnyChar("晶晶");

   c4=GetChar("上官");
   ca4=GetAnyChar("上官");

   c5=GetChar("无名");
   ca5=GetAnyChar("无名");

   c6=GetChar("豆豆");
   ca6=GetAnyChar("豆豆");

} 
xunhuan(){
if (c1shi+50<=GetGameTime()) {
c1shi = GetGameTime();	
Perform(c1,"use",40);
Perform(c1,"use",41);
Perform(c1,"use",5);
Perform(c1,"use",3);	
Perform(c1,"use",4);
Perform(c1,"use",34);}

if (c2shi+50<=GetGameTime()) {
c2shi = GetGameTime();	
Perform(c2,"use",40);
Perform(c2,"use",41);
Perform(c2,"use",5);
Perform(c2,"use",3);	
Perform(c2,"use",4);
Perform(c2,"use",34);}

if (c3shi+50<=GetGameTime()) {
c3shi = GetGameTime();	
Perform(c3,"use",40);
Perform(c3,"use",41);
Perform(c3,"use",5);
Perform(c3,"use",3);	
Perform(c3,"use",4);
Perform(c3,"use",34);}

if (c4shi+50<=GetGameTime()) {
c4shi = GetGameTime();	
Perform(c4,"use",40);
Perform(c4,"use",41);
Perform(c4,"use",5);
Perform(c4,"use",3);	
Perform(c4,"use",4);
Perform(c4,"use",34);}

if (c5shi+50<=GetGameTime()) {
c5shi = GetGameTime();	
Perform(c5,"use",40);
Perform(c5,"use",41);
Perform(c5,"use",5);
Perform(c5,"use",3);	
Perform(c5,"use",4);
Perform(c5,"use",34);}

if (c6shi+50<=GetGameTime()) {
c6shi = GetGameTime();	
Perform(c6,"use",40);
Perform(c6,"use",41);
Perform(c6,"use",5);
Perform(c6,"use",3);	
Perform(c6,"use",4);
Perform(c6,"use",34);}}

scene1(){
if (trg0 == 0){
PlayerPerform("use", 19);
PlayerPerform("block",0);
PlayerPerform("say","   恩.. 我现在就去跟他们比个你死我活~！.. ");  // 时刻:6
PlayerPerform("pause",2);
PlayerPerform("say"," 要不染怎么会不漏面呢. ");  // 时刻:4
PlayerPerform("pause",2);
PlayerPerform("say","  不见得我一定会输的.  既然兵兵的任务都难不到我，想必兵兵也是对我有些惊恐了！ ");  // 时刻:2
PlayerPerform("pause",2);
PlayerPerform("say","  无论如何！今天在这里要跟他们做个了断！. ");  // 时刻:0
PlayerPerform("block",1);
trg0++;}


if (trg0 == 1 &&  c1>=0 && GetDistance(player,c1)<=80 ){

ChangeBehavior(c1, "patrol", 13);
Perform(c1,"use",30);
Perform(c1,"use",19);
PlayerPerform("say","  这是你说的，那我就不客气了·.. ");  // 时刻:4
PlayerPerform("pause",2);
Perform(c1,"say","  来吧  看看谁是最厉害的！打败我们，就让你见兵兵！..");  // 时刻:2
Perform(c1,"faceto",player);
trg0++;}

if (trg1 == 0 &&  c2>=0 && GetDistance(player,c2)<=80 ){


ChangeBehavior(c2, "patrol", 392);
Perform(c2,"use",30);
Perform(c2,"use",19);
PlayerPerform("say","  这是你说的，那我就不客气了·.. ");  // 时刻:4
PlayerPerform("pause",2);
Perform(c2,"say","  来吧  看看谁是最厉害的！打败我们，就让你见兵兵！..");  // 时刻:2
Perform(c2,"faceto",player);
trg1++;}

if (trg2 == 0 &&  c3>=0 && GetDistance(player,c3)<=80 ){


ChangeBehavior(c3, "patrol", 373);
Perform(c3,"use",30);
Perform(c3,"use",19);
PlayerPerform("say","  这是你说的，那我就不客气了·.. ");  // 时刻:4
PlayerPerform("pause",2);
Perform(c3,"say","  来吧  看看谁是最厉害的！打败我们，就让你见兵兵！..");  // 时刻:2
Perform(c3,"faceto",player);
trg2++;}

if (trg3 == 0 &&  c4>=0 && GetDistance(player,c4)<=80 ){


ChangeBehavior(c4, "patrol", 381);
Perform(c4,"use",30);
Perform(c4,"use",19);
PlayerPerform("say","  这是你说的，那我就不客气了·.. ");  // 时刻:4
PlayerPerform("pause",2);
Perform(c4,"say","  来吧  看看谁是最厉害的！打败我们，就让你见兵兵！..");  // 时刻:2
Perform(c4,"faceto",player);
trg3++;}

if (trg4 == 0 &&  c5>=0 && GetDistance(player,c5)<=80 ){


ChangeBehavior(c5, "patrol", 426);
Perform(c5,"use",30);
Perform(c5,"use",19);
PlayerPerform("say","  这是你说的，那我就不客气了·.. ");  // 时刻:4
PlayerPerform("pause",2);
Perform(c5,"say","  来吧  看看谁是最厉害的！打败我们，就让你见兵兵！..");  // 时刻:2
Perform(c5,"faceto",player);
trg4++;}

if (trg5 == 0 &&  c6>=0 && GetDistance(player,c6)<=80 ){


ChangeBehavior(c6, "patrol", 75);
Perform(c6,"use",30);
Perform(c6,"use",19);
PlayerPerform("say","  这是你说的，那我就不客气了·.. ");  // 时刻:4
PlayerPerform("pause",2);
Perform(c6,"say","  来吧  看看谁是最厉害的！打败我们，就让你见兵兵！..");  // 时刻:2
Perform(c6,"faceto",player);
trg5++;}}

ziji(){
if (GetHP(player)<=0) 
{ GameOver(-1);}}
OnStart(){
AddNPC("6关1");
AddNPC("6关2");
AddNPC("6关3");
AddNPC("6关4");
AddNPC("6关5");
AddNPC("6关6");}
OnUpdate()
{	
	player = GetAnyChar("player");
	if (player < 0){return 0;}
        now = GetGameTime();
        GetNPCChar() ; 
        xunhuan(); 
	ziji();
	scene1();
}