
#### animationscript function main #####
# data/bgs/menu/card.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==0)
    {


  if(frame>=1){

    void self = getlocalvar("self");

    int P = getentityproperty(self,"health") - 1;

    void PLeft = playerkeys(P, 0, "moveleft");

    void PRight = playerkeys(P, 0, "moveright");

    void PAt = playerkeys(P, 0, "attack");

    int State = getglobalvar("ChooSt");

    int Prog = getglobalvar("Progress");

    int PersLock = getentityvar(self, "Lock");



    if(PersLock != 1){

      if(Prog > 0){

        if(State == 1){

          performattack(self, openborconstant("ANI_FOLLOW4"));

        } else if(State == 2){

          performattack(self, openborconstant("ANI_FOLLOW5"));

        } else if(State == 3){

          setglobalvar(P + "Char", "X");

          performattack(self, openborconstant("ANI_FREESPECIAL2"));

        }

      } else if(State > 0){

        setglobalvar(P + "Char", "X");

        performattack(self, openborconstant("ANI_FREESPECIAL2"));

      }



      if(PLeft || PRight){

        int Page = getentityvar(self, "Page");



        if(Prog > 0){

          if(PLeft){

            setentityvar(self, "Page", Page - 1);

          } else if(PRight){

            setentityvar(self, "Page", Page + 1);

          }

        }



        performattack(self, openborconstant("ANI_FREESPECIAL"));

      }

      if(PAt){

        setglobalvar(P + "Char", "Megazord");

        setglobalvar("ChooSt", 1);

        PersLock = 1;

        setentityvar(self, "Lock", 1);

        performattack(self, openborconstant("ANI_FREESPECIAL10"));

      }

    }

  }

        return;
    }
    if(animhandle==1)
    {


  if(frame>=1){

    void self = getlocalvar("self");

    int P = getentityproperty(self,"health") - 1;

    void PLeft = playerkeys(P, 0, "moveleft");

    void PRight = playerkeys(P, 0, "moveright");

    void PAt = playerkeys(P, 0, "attack");

    int State = getglobalvar("ChooSt");

    int Prog = getglobalvar("Progress");

    int PersLock = getentityvar(self, "Lock");



    if(PersLock != 1){

      if(Prog > 0){

        if(State == 1){

          performattack(self, openborconstant("ANI_FOLLOW4"));

        } else if(State == 2){

          performattack(self, openborconstant("ANI_FOLLOW5"));

        } else if(State == 3){

          setglobalvar(P + "Char", "X");

          performattack(self, openborconstant("ANI_FREESPECIAL2"));

        }

      } else if(State > 0){

        setglobalvar(P + "Char", "X");

        performattack(self, openborconstant("ANI_FREESPECIAL2"));

      }



      if(PLeft || PRight){

        int Page = getentityvar(self, "Page");



        if(Prog > 0){

          if(PLeft){

            setentityvar(self, "Page", Page - 1);

          } else if(PRight){

            setentityvar(self, "Page", Page + 1);

          }

        }



        performattack(self, openborconstant("ANI_FREESPECIAL"));

      }

      if(PAt){

        setglobalvar(P + "Char", "DragonzordF");

        setglobalvar("ChooSt", 2);

        PersLock = 1;

        setentityvar(self, "Lock", 1);

      }

    }

  }

	        return;
    }
    if(animhandle==2)
    {


  if(frame>=1){

    void self = getlocalvar("self");

    int P = getentityproperty(self,"health") - 1;

    void PLeft = playerkeys(P, 0, "moveleft");

    void PRight = playerkeys(P, 0, "moveright");

    void PAt = playerkeys(P, 0, "attack");

    int State = getglobalvar("ChooSt");

    int Prog = getglobalvar("Progress");

    int PersLock = getentityvar(self, "Lock");



    if(PersLock != 1){

      if(Prog > 0){

        if(State == 1){

          performattack(self, openborconstant("ANI_FOLLOW4"));

        } else if(State == 2){

          performattack(self, openborconstant("ANI_FOLLOW5"));

        } else if(State == 3){

          setglobalvar(P + "Char", "X");

          performattack(self, openborconstant("ANI_FREESPECIAL2"));

        }

      } else if(State > 0){

        setglobalvar(P + "Char", "X");

        performattack(self, openborconstant("ANI_FREESPECIAL2"));

      }



      if(PLeft || PRight){

        int Page = getentityvar(self, "Page");



        if(Prog > 0){

          if(PLeft){

            setentityvar(self, "Page", Page - 1);

          } else if(PRight){

            setentityvar(self, "Page", Page + 1);

          }

        }



        performattack(self, openborconstant("ANI_FREESPECIAL"));

      }

      if(PAt){

        setglobalvar(P + "Char", "MegaDragonzord");

        setglobalvar("ChooSt", 3);

        PersLock = 1;

        setentityvar(self, "Lock", 1);

      }

    }

  }

	        return;
    }
    if(animhandle==3)
    {


  if(frame>=1){

    void self = getlocalvar("self");

    int P = getentityproperty(self,"health") - 1;

    void PAt = playerkeys(P, 0, "attack");

    int State = getglobalvar("ChooTw");

    int Prog = getglobalvar("Progress");

    int PersLock = getentityvar(self, "Lock");



    if(PersLock != 1){

      if(State != 0){

        setglobalvar(P + "Char", "X");

        performattack(self, openborconstant("ANI_FREESPECIAL2"));

      }



      if(PAt){

        setglobalvar(P + "Char", "Dragonzord");

        setglobalvar("ChooTw", 1);

        PersLock = 1;

        setentityvar(self, "Lock", 1);

      }

    }

  }

	        return;
    }
    if(animhandle==4)
    {


  if(frame>=1){

    void self = getlocalvar("self");

    int P = getentityproperty(self,"health") - 1;

    void PAt = playerkeys(P, 0, "attack");

    int State = getglobalvar("ChooTw");

    int Prog = getglobalvar("Progress");

    int PersLock = getentityvar(self, "Lock");



    if(PersLock != 1){

      if(State != 0){

        setglobalvar(P + "Char", "X");

        performattack(self, openborconstant("ANI_FREESPECIAL2"));

      }



      if(PAt){

        setglobalvar(P + "Char", "TRex");

        setglobalvar("ChooTw", 2);

        PersLock = 1;

        setentityvar(self, "Lock", 1);

      }

    }

  }

	        return;
    }
    if(animhandle==5)
    {


  if(frame==9){

    void self = getlocalvar("self");

    int Page = getentityvar(self, "Page");



    if(Page < 1){

      Page = 3;

      setentityvar(self, "Page", Page);

    } else if(Page > 3){

      Page = 1;

      setentityvar(self, "Page", Page);

    }



    if(Page==3){

      performattack(self, openborconstant("ANI_FOLLOW3"));

    } else if(Page==2){

      performattack(self, openborconstant("ANI_FOLLOW2"));

    } else {

      performattack(self, openborconstant("ANI_FOLLOW1"));

    }

  }

	        return;
    }
    if(animhandle==8)
    {


  if(frame>=1){

    void self = getlocalvar("self");

    int P = getentityproperty(self,"health") - 1;

    void Player = getplayerproperty(P, "entity");



    if(Player){

      performattack(self, openborconstant("ANI_FREESPECIAL"));

      updateframe(self, 4);

    }

  }

	        return;
    }
    if(animhandle==9)
    {


  if(frame==1){

    void self = getlocalvar("self");



    setentityvar(self, "Page", 1);

  }

	        return;
    }

}

#### animationscript function main #####
# data/bgs/menu/piliher.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==10)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self,"x"); //Get character's x coordinate

    int XPos = openborvariant("xpos"); //Get screen edge's position

    int Screen = openborvariant("hResolution"); // Get resolution

    float posx = getindexedvar(0);

    

    changeentityproperty(self, "position",posx);

    //if(x > XPos + Screen/2){

    //  changeentityproperty(self, "position", x-1);

    //} else if(x < XPos + Screen/2){

    // changeentityproperty(self, "position", x+1);

    //}

	        return;
    }

}

#### animationscript function main #####
# data/bgs/menu/zordon_bgfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==12)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==1)
        {
            changeentityproperty(getlocalvar("self"), "setlayer", 20);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/obj_killer.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==13)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/arrow_panel/arrow_panel.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==14)
    {
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==15)
    {
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/mmpr/mmpr.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==16)
    {
        if(frame==0)
        {
            pausemusic(1);
        }
        if(frame==0)
        {
            setglobalvar("morphStatus", 1);
        }
        if(frame==65)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==17)
    {


	void	self = getlocalvar("self");

	int	P1 = getplayerproperty(0, "entity");

	int	P2 = getplayerproperty(1, "entity");

	int	P3 = getplayerproperty(2, "entity");

	int	P4 = getplayerproperty(3, "entity");

	int	P1Name = getentityproperty(P1,"defaultmodel");

	int	P2Name = getentityproperty(P2,"defaultmodel");

	int	P3Name = getentityproperty(P3,"defaultmodel");

	int	P4Name = getentityproperty(P4,"defaultmodel");





	if(frame==43){



	if	(P1Name == "Zack" || P2Name == "Zack" || P3Name == "Zack" || P4Name == "Zack")

	{

	performattack(self,	openborconstant("ANI_FOLLOW11"));

	}



	else	if (P1Name == "Billy" || P2Name == "Billy" || P3Name == "Billy" || P4Name == "Billy")

	{

	performattack(self,	openborconstant("ANI_FOLLOW13"));

	}



	else	if (P1Name == "Trini" || P2Name == "Trini" || P3Name == "Trini" || P4Name == "Trini")

	{

	performattack(self,	openborconstant("ANI_FOLLOW14"));

	}



	else	if (P1Name == "Kim" || P2Name == "Kim" || P3Name == "Kim" || P4Name == "Kim")

	{

	performattack(self,	openborconstant("ANI_FOLLOW12"));

	}



	else	if (P1Name == "Tommy" || P2Name == "Tommy" || P3Name == "Tommy" || P4Name == "Tommy")

	{

	performattack(self,	openborconstant("ANI_FOLLOW15"));

	}



	}

	        if(frame==50)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==18)
    {


	void	self = getlocalvar("self");

	int	P1 = getplayerproperty(0, "entity");

	int	P2 = getplayerproperty(1, "entity");

	int	P3 = getplayerproperty(2, "entity");

	int	P4 = getplayerproperty(3, "entity");

	int	P1Name = getentityproperty(P1,"defaultmodel");

	int	P2Name = getentityproperty(P2,"defaultmodel");

	int	P3Name = getentityproperty(P3,"defaultmodel");

	int	P4Name = getentityproperty(P4,"defaultmodel");





	if(frame==43){



	if (P1Name == "Billy" || P2Name == "Billy" || P3Name == "Billy" || P4Name == "Billy")

	{

	performattack(self,	openborconstant("ANI_FOLLOW13"));

	}



	else	if (P1Name == "Trini" || P2Name == "Trini" || P3Name == "Trini" || P4Name == "Trini")

	{

	performattack(self,	openborconstant("ANI_FOLLOW14"));

	}



	else	if (P1Name == "Kim" || P2Name == "Kim" || P3Name == "Kim" || P4Name == "Kim")

	{

	performattack(self,	openborconstant("ANI_FOLLOW12"));

	}



	else	if (P1Name == "Tommy" || P2Name == "Tommy" || P3Name == "Tommy" || P4Name == "Tommy")

	{

	performattack(self,	openborconstant("ANI_FOLLOW15"));

	}



	}

	        if(frame==43)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==19)
    {


	void	self = getlocalvar("self");

	int	P1 = getplayerproperty(0, "entity");

	int	P2 = getplayerproperty(1, "entity");

	int	P3 = getplayerproperty(2, "entity");

	int	P4 = getplayerproperty(3, "entity");

	int	P1Name = getentityproperty(P1,"defaultmodel");

	int	P2Name = getentityproperty(P2,"defaultmodel");

	int	P3Name = getentityproperty(P3,"defaultmodel");

	int	P4Name = getentityproperty(P4,"defaultmodel");





	if(frame==43){



	if (P1Name == "Tommy" || P2Name == "Tommy" || P3Name == "Tommy" || P4Name == "Tommy")

	{

	performattack(self,	openborconstant("ANI_FOLLOW15"));

	}



	}

	        if(frame==43)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==20)
    {


	void	self = getlocalvar("self");

	int	P1 = getplayerproperty(0, "entity");

	int	P2 = getplayerproperty(1, "entity");

	int	P3 = getplayerproperty(2, "entity");

	int	P4 = getplayerproperty(3, "entity");

	int	P1Name = getentityproperty(P1,"defaultmodel");

	int	P2Name = getentityproperty(P2,"defaultmodel");

	int	P3Name = getentityproperty(P3,"defaultmodel");

	int	P4Name = getentityproperty(P4,"defaultmodel");





	if(frame==43){



	if (P1Name == "Trini" || P2Name == "Trini" || P3Name == "Trini" || P4Name == "Trini")

	{

	performattack(self,	openborconstant("ANI_FOLLOW14"));

	}



	else	if (P1Name == "Kim" || P2Name == "Kim" || P3Name == "Kim" || P4Name == "Kim")

	{

	performattack(self,	openborconstant("ANI_FOLLOW12"));

	}



	else	if (P1Name == "Tommy" || P2Name == "Tommy" || P3Name == "Tommy" || P4Name == "Tommy")

	{

	performattack(self,	openborconstant("ANI_FOLLOW15"));

	}



	}

	        if(frame==43)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==21)
    {


	void	self = getlocalvar("self");

	int	P1 = getplayerproperty(0, "entity");

	int	P2 = getplayerproperty(1, "entity");

	int	P3 = getplayerproperty(2, "entity");

	int	P4 = getplayerproperty(3, "entity");

	int	P1Name = getentityproperty(P1,"defaultmodel");

	int	P2Name = getentityproperty(P2,"defaultmodel");

	int	P3Name = getentityproperty(P3,"defaultmodel");

	int	P4Name = getentityproperty(P4,"defaultmodel");





	if(frame==43){



	if (P1Name == "Kim" || P2Name == "Kim" || P3Name == "Kim" || P4Name == "Kim")

	{

	performattack(self,	openborconstant("ANI_FOLLOW12"));

	}



	else	if (P1Name == "Tommy" || P2Name == "Tommy" || P3Name == "Tommy" || P4Name == "Tommy")

	{

	performattack(self,	openborconstant("ANI_FOLLOW15"));

	}



	}

	        if(frame==43)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==22)
    {
        if(frame==43)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==23)
    {
        if(frame==0)
        {
            pausemusic(1);
        }
        if(frame==0)
        {
            setglobalvar("morphStatus", 1);
        }
        if(frame==65)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==24)
    {


	void self = getlocalvar("self");

	int morph = getglobalvar("morphStatus");

	int morphB = getglobalvar("morphBlock");

	int P1 = getplayerproperty(0, "entity");

	int P2 = getplayerproperty(1, "entity");

	int P3 = getplayerproperty(2, "entity");

	int P4 = getplayerproperty(3, "entity");

	int P1Name = getentityproperty(P1,"defaultmodel");

	int P2Name = getentityproperty(P2,"defaultmodel");

	int P3Name = getentityproperty(P3,"defaultmodel");

	int P4Name = getentityproperty(P4,"defaultmodel");



	if(frame==0){

	if(morphB==1){killentity(self);}

	}

	if(frame==23){

	if (P1Name == "Jason" || P2Name == "Jason" || P3Name == "Jason" || P4Name == "Jason")

	{

	performattack(self, openborconstant("ANI_FOLLOW10"));

	}



	else if (P1Name == "Zack" || P2Name == "Zack" || P3Name == "Zack" || P4Name == "Zack")

	{

	performattack(self, openborconstant("ANI_FOLLOW11"));

	}

	

	else if (P1Name == "Billy" || P2Name == "Billy" || P3Name == "Billy" || P4Name == "Billy")

	{

	performattack(self, openborconstant("ANI_FOLLOW13"));

	}

	

	else if (P1Name == "Trini" || P2Name == "Trini" || P3Name == "Trini" || P4Name == "Trini")

	{

	performattack(self, openborconstant("ANI_FOLLOW14"));

	}



	else if (P1Name == "Kim" || P2Name == "Kim" || P3Name == "Kim" || P4Name == "Kim")

	{

	performattack(self, openborconstant("ANI_FOLLOW12"));

	}



	else if (P1Name == "Tommy" || P2Name == "Tommy" || P3Name == "Tommy" || P4Name == "Tommy")

	{

	performattack(self, openborconstant("ANI_FOLLOW15"));

	}



	}

	        if(frame==1)
        {
            pausemusic(1);
        }
        if(frame==1)
        {
            setglobalvar("morphStatus", 1);
        }
        if(frame==1)
        {
            setglobalvar("morphBlock", 1);
        }
        if(frame==23)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==25)
    {
        if(frame==1)
        {
            pausemusic(1);
        }
        if(frame==1)
        {
            setglobalvar("morphStatus", 1);
        }
        if(frame==1)
        {
            setglobalvar("morphBlock", 1);
        }
        if(frame==281)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/pom.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==26)
    {
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==27)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/colordust/colordust.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==28)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==29)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==30)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==31)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==32)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==33)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==34)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==35)
    {
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/teleportfx/teleportfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==36)
    {
        if(frame==1)
        {
            changepal(1);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==37)
    {
        if(frame==1)
        {
            changepal(2);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==38)
    {
        if(frame==1)
        {
            changepal(2);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==39)
    {
        if(frame==1)
        {
            changepal(3);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==40)
    {
        if(frame==1)
        {
            changepal(3);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==41)
    {
        if(frame==1)
        {
            changepal(4);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==42)
    {
        if(frame==1)
        {
            changepal(4);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==43)
    {
        if(frame==1)
        {
            changepal(5);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==44)
    {
        if(frame==1)
        {
            changepal(5);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==45)
    {
        if(frame==1)
        {
            changepal(6);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==46)
    {
        if(frame==1)
        {
            changepal(6);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==47)
    {
        if(frame==1)
        {
            changepal(7);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==48)
    {
        if(frame==1)
        {
            changepal(7);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==49)
    {
        if(frame==1)
        {
            changepal(0);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==50)
    {
        if(frame==1)
        {
            changepal(0);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==51)
    {
        if(frame==1)
        {
            changepal(1);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==52)
    {
        if(frame==1)
        {
            changepal(3);
        }
        if(frame==20)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/flash/flash.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==53)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/flash/flash2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==54)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/flash/flash3.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==55)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/flash/flash4.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==56)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "setlayer", 1100);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==57)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==58)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "setlayer", 1001001010);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/flauncher/flauncher.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==59)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/particle/particle.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==60)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==0)
        {
            randomMap(6);
        }
        if(frame==8)
        {
            suicide();
        }
        return;
    }
    if(animhandle==61)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==8)
        {
            suicide();
        }
        return;
    }
    if(animhandle==62)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==8)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/selectfx/selectfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==63)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/magichit/magichit.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==64)
    {
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/flash/sflash.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==65)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/flash/sflash2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==66)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/freeze/freezefx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==67)
    {
        if(frame==11)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/freeze/freezefx2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==68)
    {
        if(frame==0)
        {
            changepal(1);
        }
        if(frame==0)
        {
            moveRandom(20, 20, 1);
        }
        return;
    }
    if(animhandle==69)
    {
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==70)
    {
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==71)
    {
        if(frame==1)
        {
            randomAnim(30, 0, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bflash/bflash.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==72)
    {
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==73)
    {
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==74)
    {
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==77)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/shock/shock.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==78)
    {
        if(frame==20)
        {
            suicide();
        }
        return;
    }
    if(animhandle==79)
    {


	void self = getlocalvar("self"); //Get calling entity.

	int Sr = (rand() & 0x7fffffff) % 3 ;

	if (Sr==1){

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW21"));

	}

	if (Sr==2){

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW22"));

	}

	        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==80)
    {
        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==81)
    {
        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==82)
    {
        if(frame==20)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/burn/burnP.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==83)
    {
        if(frame==1)
        {
            spawn01("faisca", -30, 20, 1);
        }
        if(frame==3)
        {
            spawn01("faisca", -10, 25, 1);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==84)
    {
        if(frame==0)
        {
            changepal(1);
        }
        if(frame==1)
        {
            spawnAni("faisca", -30, 20, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", -10, 25, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==85)
    {
        if(frame==0)
        {
            changepal(2);
        }
        if(frame==1)
        {
            spawnAni("faisca", -30, 20, 1, "ANI_FOLLOW13", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", -10, 25, 1, "ANI_FOLLOW13", 0, 0, 0);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/burn/burnM.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==86)
    {
        if(frame==1)
        {
            spawn01("faisca", -30, 20, 1);
        }
        if(frame==3)
        {
            spawn01("faisca", -10, 25, 1);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==87)
    {
        if(frame==0)
        {
            changepal(1);
        }
        if(frame==1)
        {
            spawnAni("faisca", -30, 20, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", -10, 25, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==88)
    {
        if(frame==0)
        {
            changepal(2);
        }
        if(frame==1)
        {
            spawnAni("faisca", -30, 20, 1, "ANI_FOLLOW13", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", -10, 25, 1, "ANI_FOLLOW13", 0, 0, 0);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/nburn/nburn.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==89)
    {
        if(frame==1)
        {
            spawn01("faisca", 0, 0, 1);
        }
        if(frame==3)
        {
            spawn01("faisca", 0, 5, 1);
        }
        if(frame==5)
        {
            spawn01("faisca", 0, 0, 1);
        }
        if(frame==10)
        {
            suicide();
        }
        return;
    }
    if(animhandle==90)
    {
        if(frame==0)
        {
            changepal(1);
        }
        if(frame==1)
        {
            spawnAni("faisca", 0, 0, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", 0, 5, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 0, 0, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==10)
        {
            suicide();
        }
        return;
    }
    if(animhandle==91)
    {
        if(frame==0)
        {
            changepal(2);
        }
        if(frame==1)
        {
            spawnAni("faisca", 0, 0, 1, "ANI_FOLLOW13", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", 0, 5, 1, "ANI_FOLLOW13", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 0, 0, 1, "ANI_FOLLOW13", 0, 0, 0);
        }
        if(frame==10)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/super/super.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==92)
    {
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            spawn01("hyperbg", 0, 0, -1);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 380);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 410);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 430);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 460);
        }
        if(frame==7)
        {
            setglobalvar("zoomvalue", 490);
        }
        if(frame==8)
        {
            setglobalvar("zoomvalue", 520);
        }
        if(frame==9)
        {
            setglobalvar("zoomvalue", 550);
        }
        if(frame==10)
        {
            setglobalvar("zoomvalue", 580);
        }
        if(frame==11)
        {
            setglobalvar("zoomvalue", 610);
        }
        if(frame==12)
        {
            setglobalvar("zoomvalue", 640);
        }
        if(frame==13)
        {
            setglobalvar("zoomvalue", 670);
        }
        if(frame==14)
        {
            setglobalvar("zoomvalue", 700);
        }
        if(frame==15)
        {
            setglobalvar("zoomvalue", 730);
        }
        if(frame==17)
        {
            setglobalvar("zoomvalue", 760);
        }
        if(frame==19)
        {
            setglobalvar("zoomvalue", 790);
        }
        if(frame==21)
        {
            setglobalvar("zoomvalue", 820);
        }
        if(frame==23)
        {
            setglobalvar("zoomvalue", 850);
        }
        if(frame==30)
        {
            setglobalvar("zoomentity", NULL());
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/hyperbg/hyperbg.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==93)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "frozen", 0);

	changeentityproperty(self, "freezetime", 1);

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/hyperbg/hyperbg_panel.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==94)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "frozen", 0);

	changeentityproperty(self, "freezetime", 1);

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/cut/cut1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==99)
    {


	if(frame==0){

	void vSelf = getlocalvar("self");

	int r = rand()%30;

	    if(r > 0){

	    changeentityproperty(vSelf,"animation",openborconstant("ANI_FOLLOW1"));

	    }

	}

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/cut/cuts.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==102)
    {
        if(frame==1)
        {
            spawn01("particle", 0, 0, 1);
        }
        if(frame==3)
        {
            spawn01("particle", 0, 0, 1);
        }
        return;
    }
    if(animhandle==103)
    {


	if(frame==0){

	void vSelf = getlocalvar("self");

	int r = rand()%30;

	    if(r > 0){

	    changeentityproperty(vSelf,"animation",openborconstant("ANI_FOLLOW1"));

	    }

	}

	        if(frame==1)
        {
            spawn01("particle", 0, 0, 1);
        }
        if(frame==3)
        {
            spawn01("particle", 0, 0, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/ko/kofx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==105)
    {
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 380);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 410);
        }
        if(frame==8)
        {
            setglobalvar("zoomvalue", 430);
        }
        if(frame==10)
        {
            setglobalvar("zoomvalue", 460);
        }
        if(frame==12)
        {
            setglobalvar("zoomvalue", 490);
        }
        if(frame==14)
        {
            setglobalvar("zoomvalue", 520);
        }
        if(frame==16)
        {
            setglobalvar("zoomvalue", 550);
        }
        if(frame==18)
        {
            setglobalvar("zoomvalue", 580);
        }
        if(frame==20)
        {
            setglobalvar("zoomvalue", 610);
        }
        if(frame==22)
        {
            setglobalvar("zoomvalue", 640);
        }
        if(frame==46)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==46)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/powerblaster/powerblaster.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==106)
    {


int     iIndex  = 0;

int     iX      = 200;

int     iY      = 130;

int     iFont   = 1;

int     iZ      = 100;

int XPos = openborvariant("xpos");

void self = getlocalvar("self"); //Get calling entity.

int Direction = getentityproperty(self, "direction");

int x = getentityproperty(self, "x"); 

void    vText   = "GET READY!";

int     iTime   = openborvariant("elapsed_time");

changeentityproperty(self, "position", XPos);

//settextobj(iIndex, iX, iY, iFont, iZ, "Direction: "+Direction+" - X: "+x, iTime+200);

	        if(frame==0)
        {
            spawn01("hyperbg", 0, 0, 0);
        }
        if(frame==87)
        {
            spawnAni("blasterbeam", -20, 0, 136, "ANI_IDLE", 2, 0, 0);
        }
        if(frame==88)
        {
            terminate("blasterbeam");
        }
        if(frame==89)
        {
            spawnAni("blasterbeam", -20, 0, 136, "ANI_IDLE", 9, 0, 0);
        }
        if(frame==89)
        {
            spawn03("blasterfake", 240, 0, 166, -1);
        }
        if(frame==90)
        {
            terminate("blasterbeam");
        }
        if(frame==90)
        {
            spawn03("gboom", 240, 0, 166, -1);
        }
        if(frame==90)
        {
            spawn03("blasterboom", 240, 0, 136, -1);
        }
        if(frame==90)
        {
            damage_all_enemies2(10000, 99, "ATK_NORMAL");
        }
        if(frame==91)
        {
            terminate("blasterfake");
        }
        if(frame==91)
        {
            terminate("hyperbg");
        }
        if(frame==93)
        {
            terminate("blasterfake");
        }
        if(frame==93)
        {
            terminate("hyperbg");
        }
        if(frame==93)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==107)
    {


int     iIndex  = 0;

int     iX      = 200;

int     iY      = 130;

int     iFont   = 1;

int     iZ      = 100;

int XPos = openborvariant("xpos");

void self = getlocalvar("self"); //Get calling entity.

int Direction = getentityproperty(self, "direction");

int x = getentityproperty(self, "x"); 

void    vText   = "GET READY!";

int     iTime   = openborvariant("elapsed_time");

changeentityproperty(self, "position", XPos);

//settextobj(iIndex, iX, iY, iFont, iZ, "Direction: "+Direction+" - X: "+x, iTime+200);

	        if(frame==0)
        {
            spawn01("hyperbg", 0, 0, 0);
        }
        if(frame==87)
        {
            spawnAni("blasterbeam", -20, 0, 136, "ANI_IDLE", 2, 0, 0);
        }
        if(frame==88)
        {
            terminate("blasterbeam");
        }
        if(frame==89)
        {
            spawnAni("blasterbeam", -20, 0, 136, "ANI_IDLE", 9, 0, 0);
        }
        if(frame==89)
        {
            spawn03Ani("blasterfake", 240, 0, 166, -1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==90)
        {
            terminate("blasterbeam");
        }
        if(frame==90)
        {
            spawn03("gboom", 240, 0, 166, -1);
        }
        if(frame==90)
        {
            spawn03("blasterboom", 240, 0, 136, -1);
        }
        if(frame==90)
        {
            damage_all_enemies2(10000, 99, "ATK_NORMAL");
        }
        if(frame==91)
        {
            terminate("blasterfake");
        }
        if(frame==91)
        {
            terminate("hyperbg");
        }
        if(frame==93)
        {
            terminate("blasterfake");
        }
        if(frame==93)
        {
            terminate("hyperbg");
        }
        if(frame==93)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/powerblaster/blasterfake.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==108)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "frozen", 0);

	changeentityproperty(self, "freezetime", 1);

	        return;
    }
    if(animhandle==109)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "frozen", 0);

	changeentityproperty(self, "freezetime", 1);

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/powerblaster/blasterbeam.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==110)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "frozen", 0);

	changeentityproperty(self, "freezetime", 1);

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/crack/crackG.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==112)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/gkaboom/gkaboom.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==113)
    {
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fboom/fboom.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==114)
    {
        if(frame==28)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/gboom/gboom.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==115)
    {
        if(frame==2)
        {
            spawn01("crackG", 0, 0, -1);
        }
        if(frame==2)
        {
            spawn000("gkaboom", 0, 30, -1);
        }
        if(frame==3)
        {
            spawnRandomZ("sboom", 100, 5, 50);
        }
        if(frame==4)
        {
            spawnRandomZ("sboom", 100, 5, 50);
        }
        if(frame==5)
        {
            spawnRandomZ("fboom", 100, 5, 50);
        }
        if(frame==6)
        {
            spawnRandomZ("sboom", 100, 5, 50);
        }
        if(frame==7)
        {
            spawnRandomZ("fboom", 100, 5, 50);
        }
        if(frame==8)
        {
            spawnRandomZ("sboom", 100, 5, 50);
        }
        if(frame==9)
        {
            spawnRandomZ("fboom", 100, 5, 50);
        }
        if(frame==10)
        {
            spawnRandomZ("sboom", 100, 5, 50);
        }
        if(frame==11)
        {
            spawnRandomZ("fboom", 100, 5, 50);
        }
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/powerblaster/blasterboom.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==116)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "frozen", 0);

	changeentityproperty(self, "freezetime", 1);

	        if(frame==9)
        {
            spawn01("gboom", 20, 1, 20);
        }
        if(frame==10)
        {
            spawnRandomZ("gboom", 400, 1, 120);
        }
        if(frame==11)
        {
            spawnRandomZ("gboom", 400, 1, 120);
        }
        if(frame==18)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/aplayercontrol.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==117)
    {
        if(frame==0)
        {
            stopPlayers();
        }
        if(frame==1)
        {
            AnimPlayer(0, "ANI_FOLLOW80");
        }
        if(frame==1)
        {
            AnimPlayer(1, "ANI_FOLLOW80");
        }
        if(frame==1)
        {
            AnimPlayer(2, "ANI_FOLLOW80");
        }
        if(frame==1)
        {
            AnimPlayer(3, "ANI_FOLLOW80");
        }
        if(frame==2)
        {
            spawnPosAni("textControl", 240, 90, 200, "ANI_FOLLOW13", 1);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==118)
    {
        if(frame==2)
        {
            checkStageType("nowinpose", "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            checkStageType("wall", "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            stopPlayers();
        }
        if(frame==3)
        {
            AnimPlayer(0, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(1, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(2, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(3, "ANI_FOLLOW80");
        }
        if(frame==4)
        {
            spawnPosAni("textControl", 240, 90, 200, "ANI_FOLLOW13", 1);
        }
        if(frame==5)
        {
            playersEscape(1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==119)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==120)
    {
        if(frame==0)
        {
            stopPlayers();
        }
        if(frame==1)
        {
            AnimPlayer(0, "ANI_FOLLOW80");
        }
        if(frame==1)
        {
            AnimPlayer(1, "ANI_FOLLOW80");
        }
        if(frame==1)
        {
            AnimPlayer(2, "ANI_FOLLOW80");
        }
        if(frame==1)
        {
            AnimPlayer(3, "ANI_FOLLOW80");
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==121)
    {
        if(frame==1)
        {
            changepropertyAll("direction", 1);
        }
        if(frame==2)
        {
            changepropertyAll("direction", 0);
        }
        if(frame==3)
        {
            changepropertyAll("direction", 1);
        }
        if(frame==4)
        {
            changepropertyAll("direction", 0);
        }
        if(frame==5)
        {
            noplayerJoin(0);
        }
        if(frame==5)
        {
            DeControlPlayer(0, 0);
        }
        if(frame==5)
        {
            DeControlPlayer(1, 0);
        }
        if(frame==5)
        {
            DeControlPlayer(2, 0);
        }
        if(frame==5)
        {
            DeControlPlayer(3, 0);
        }
        if(frame==5)
        {
            changepropertyAll("subject_to_screen", 1);
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==122)
    {
        if(frame==2)
        {
            checkStageType("nowinpose", "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            changepropertyAll("subject_to_wall", 0);
        }
        if(frame==2)
        {
            stopPlayers();
        }
        if(frame==3)
        {
            AnimPlayer(0, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(1, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(2, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(3, "ANI_FOLLOW80");
        }
        if(frame==4)
        {
            spawnPosAni("textControl", 240, 90, 200, "ANI_FOLLOW14", 1);
        }
        if(frame==5)
        {
            playersEscape(1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==123)
    {
        if(frame==0)
        {
            changepropertyAll("subject_to_minz", 0);
        }
        if(frame==0)
        {
            changepropertyAll("animation", "ANI_IDLE");
        }
        if(frame==1)
        {
            changepropertyAll("setlayer", 0);
        }
        if(frame==1)
        {
            changepropertyAll("animation", "ANI_WALK");
        }
        if(frame==1)
        {
            changeproperty(0, "direction", 0);
        }
        if(frame==1)
        {
            changeproperty(3, "direction", 0);
        }
        if(frame==1)
        {
            changeproperty(0, "velocity", -0.55, 0.5, 0);
        }
        if(frame==1)
        {
            changeproperty(3, "velocity", -0.35, 0.5, 0);
        }
        if(frame==1)
        {
            changeproperty(2, "velocity", 0.35, 0.5, 0);
        }
        if(frame==1)
        {
            changeproperty(1, "velocity", 0.55, 0.5, 0);
        }
        if(frame==2)
        {
            changepropertyAll("subject_to_gravity", 1);
        }
        if(frame==2)
        {
            changepropertyAll("subject_to_minz", 1);
        }
        if(frame==2)
        {
            IdlPlayers();
        }
        if(frame==2)
        {
            noplayerJoin(0);
        }
        if(frame==2)
        {
            layer(-1);
        }
        if(frame==2)
        {
            dasher(0, 0.5, 0);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==124)
    {
        if(frame==2)
        {
            checkStageType("nowinpose", "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            checkStageType("wall", "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            stopPlayers();
        }
        if(frame==3)
        {
            AnimPlayer(0, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(1, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(2, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(3, "ANI_FOLLOW80");
        }
        if(frame==4)
        {
            spawnPosAni("textControl", 240, 40, 200, "ANI_FOLLOW14", 1);
        }
        if(frame==5)
        {
            playersEscape(1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==125)
    {
        if(frame==1)
        {
            stopPlayers();
        }
        if(frame==1)
        {
            changepropertyAll("direction", 1);
        }
        if(frame==2)
        {
            AnimPlayer(0, "ANI_FOLLOW81");
        }
        if(frame==2)
        {
            AnimPlayer(1, "ANI_FOLLOW81");
        }
        if(frame==2)
        {
            AnimPlayer(2, "ANI_FOLLOW81");
        }
        if(frame==2)
        {
            AnimPlayer(3, "ANI_FOLLOW81");
        }
        if(frame==3)
        {
            DeControlPlayer(0, 0);
        }
        if(frame==3)
        {
            DeControlPlayer(1, 0);
        }
        if(frame==3)
        {
            DeControlPlayer(2, 0);
        }
        if(frame==3)
        {
            DeControlPlayer(3, 0);
        }
        if(frame==6)
        {
            noplayerJoin(0);
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==126)
    {
        if(frame==1)
        {
            stopPlayers(0, 0);
        }
        if(frame==1)
        {
            changepropertyAll("direction", 1);
        }
        if(frame==4)
        {
            setbgspeed(0);
        }
        if(frame==4)
        {
            MovePlayer(0, 10, 0, 0);
        }
        if(frame==4)
        {
            MovePlayer(1, 10, 0, 0);
        }
        if(frame==4)
        {
            MovePlayer(2, 10, 0, 0);
        }
        if(frame==4)
        {
            MovePlayer(3, 10, 0, 0);
        }
        if(frame==5)
        {
            noplayerJoin(0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==127)
    {
        if(frame==2)
        {
            checkStageType("nowinpose", "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            checkStageType("wall", "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            stopPlayers();
        }
        if(frame==3)
        {
            AnimPlayer(0, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(1, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(2, "ANI_FOLLOW80");
        }
        if(frame==3)
        {
            AnimPlayer(3, "ANI_FOLLOW80");
        }
        if(frame==4)
        {
            spawnPosAni("textControl", 240, 90, 200, "ANI_FOLLOW23", 1);
        }
        if(frame==5)
        {
            playersEscape(1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==128)
    {
        if(frame==1)
        {
            stopPlayers(0, 0);
        }
        if(frame==1)
        {
            changepropertyAll("direction", 0);
        }
        if(frame==1)
        {
            changepropertyAll("setlayer", 1001001010);
        }
        if(frame==3)
        {
            AnimPlayer(0, "ANI_FALL");
        }
        if(frame==3)
        {
            AnimPlayer(1, "ANI_FALL");
        }
        if(frame==3)
        {
            AnimPlayer(2, "ANI_FALL");
        }
        if(frame==3)
        {
            AnimPlayer(3, "ANI_FALL");
        }
        if(frame==3)
        {
            MovePlayer(0, 7.5, 2.5, 0);
        }
        if(frame==3)
        {
            MovePlayer(1, 7.5, 2.5, 0);
        }
        if(frame==3)
        {
            MovePlayer(2, 7.5, 2.5, 0);
        }
        if(frame==3)
        {
            MovePlayer(3, 7.5, 2.5, 0);
        }
        if(frame==4)
        {
            noplayerJoin(0);
        }
        if(frame==4)
        {
            finishlevel();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/speedfx/speedfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==129)
    {
        if(frame==1)
        {
            moveRandom(10, 20, 1);
        }
        if(frame==1)
        {
            velo001(-2, 0, 0);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==130)
    {
        if(frame==0)
        {
            randomAnim(30, 0, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            moveRandom(10, 20, 1);
        }
        if(frame==1)
        {
            velo001(-3, 0, 0);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/money.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==139)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==0)
        {
            antiwallturn(10, 5, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/coin.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==140)
    {


	antiwallturn(10,5,0);

	        if(frame==0)
        {
            randomJump(3, 3);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/cola/cola.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==141)
    {
        if(frame==0)
        {
            randomJump(2, 2);
        }
        if(frame==0)
        {
            antiwallturn(10, 5, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/cola/colamachine.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==142)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==12)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==12)
        {
            suicide();
        }
        return;
    }
    if(animhandle==144)
    {
        if(frame==0)
        {
            lifeCheck(200, "ANI_FALL");
        }
        if(frame==1)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==2)
        {
            anichange("ANI_IDLE");
        }
        return;
    }
    if(animhandle==145)
    {
        if(frame==1)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==1)
        {
            anichange("ANI_follow9");
        }
        return;
    }
    if(animhandle==146)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==12)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==12)
        {
            suicide();
        }
        return;
    }
    if(animhandle==147)
    {


if(frame ==1)

{

void self = getlocalvar("self");

int health = getentityproperty(self,"health");

int maxhealth = getentityproperty(self,"maxhealth");

if((health) >=(maxhealth -200)/3) damageentity(self,self,(maxhealth -199)/3);

else

{

performattack(self,openborconstant("ani_follow8"));



}

}

	        if(frame==3)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==4)
        {
            anichange("ANI_follow6");
        }
        return;
    }
    if(animhandle==148)
    {


void self = getlocalvar("self");

int health = getentityproperty(self,"health");

if(health<=200)

{

void opp = getentityproperty(self,"opponent");

int opp_direction = getentityproperty(opp,"direction");

if(opp_direction == 1) changeentityproperty(self,"direction",1);

if(opp_direction == 0) changeentityproperty(self,"direction",0);

performattack(self,openborconstant("ani_fall"));

}

	        return;
    }
    if(animhandle==149)
    {
        if(frame==0)
        {
            lifeCheck(0, "ANI_FALL");
        }
        if(frame==1)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==2)
        {
            anichange("ANI_follow6");
        }
        return;
    }
    if(animhandle==150)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==10)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==11)
        {
            suicide();
        }
        return;
    }
    if(animhandle==151)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==5)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==12)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==12)
        {
            suicide();
        }
        return;
    }
    if(animhandle==152)
    {


void self = getlocalvar("self");

int health = getentityproperty(self,"health");

if(health<=200)

{

void opp = getentityproperty(self,"opponent");

int opp_direction = getentityproperty(opp,"direction");

if(opp_direction == 1) changeentityproperty(self,"direction",1);

if(opp_direction == 0) changeentityproperty(self,"direction",0);

performattack(self,openborconstant("ani_fall"));

}

	        return;
    }
    if(animhandle==153)
    {


if(frame ==1)

{

void self = getlocalvar("self");

int health = getentityproperty(self,"health");

int maxhealth = getentityproperty(self,"maxhealth");

changeentityproperty(self,"maxhealth",maxhealth + 200);

changeentityproperty(self,"health",health + 200);

}

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/crate.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==154)
    {
        if(frame==0)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW3", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        return;
    }
    if(animhandle==156)
    {
        if(frame==0)
        {
            noscroll();
        }
        if(frame==0)
        {
            randomteleonscreen();
        }
        if(frame==0)
        {
            antiwallRandom(1);
        }
        if(frame==1)
        {
            anichange("ANI_IDLE");
        }
        return;
    }
    if(animhandle==158)
    {
        if(frame==1)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW3", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==160)
    {
        if(frame==0)
        {
            spawn01("flash4", 15, 15, 1);
        }
        if(frame==1)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW3", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("afx2", 0, 50, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/drum.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==164)
    {
        if(frame==0)
        {
            velo001(-3, 0, 0);
        }
        return;
    }
    if(animhandle==165)
    {
        if(frame==0)
        {
            antiwallCollide(30, "ANI_FOLLOW10");
        }
        if(frame==1)
        {
            anichange("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==166)
    {
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==168)
    {
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==172)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        return;
    }
    if(animhandle==173)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/crate-fall.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==174)
    {
        if(frame==0)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        return;
    }
    if(animhandle==176)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "candamage", "TYPE_PLAYER","TYPE_ENEMY");

	        if(frame==0)
        {
            noscroll();
        }
        if(frame==0)
        {
            randomteleonscreen();
        }
        if(frame==0)
        {
            antiwallRandom(1);
        }
        if(frame==1)
        {
            anichange("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==177)
    {


	void self = getlocalvar("self");

	if (frame==1){

	changeentityproperty(self, "candamage", "TYPE_PLAYER","TYPE_ENEMY");

	}

	        if(frame==1)
        {
            noscroll();
        }
        if(frame==1)
        {
            randomX();
        }
        if(frame==1)
        {
            antiwallRandom(1);
        }
        if(frame==2)
        {
            anichange("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==178)
    {
        if(frame==1)
        {
            anichange("ANI_FOLLOW4");
        }
        return;
    }
    if(animhandle==180)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==182)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==183)
    {
        if(frame==0)
        {
            randomteleonscreen();
        }
        if(frame==0)
        {
            antiwallRandom(1);
        }
        if(frame==1)
        {
            anichange("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==186)
    {
        if(frame==0)
        {
            randomJump(2, 1);
        }
        if(frame==0)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==16)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/drum_bike.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==187)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        if(frame==1)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==188)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==189)
    {
        if(frame==3)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        return;
    }
    if(animhandle==190)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/tnt.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==191)
    {
        if(frame==1)
        {
            anichange("ANI_IDLE");
        }
        return;
    }
    if(animhandle==192)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "candamage", "TYPE_PLAYER","TYPE_NPC");

	        if(frame==1)
        {
            randomteleonscreen();
        }
        if(frame==1)
        {
            antiwallRandom(1);
        }
        if(frame==2)
        {
            anichange("ANI_IDLE");
        }
        return;
    }
    if(animhandle==193)
    {
        if(frame==5)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==17)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/latao.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==194)
    {
        if(frame==0)
        {
            velo001(5, NULL(), NULL());
        }
        return;
    }
    if(animhandle==195)
    {
        if(frame==0)
        {
            velo001(-5, NULL(), NULL());
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/redjason/redjasonm.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==199)
    {
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL8", 0, "U", 0);
        }
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL9", 0, "D", 0);
        }
        if(frame==0)
        {
            randomAnim(30, 0, "ANI_ATTACK4");
        }
        if(frame==1)
        {
            velo001(2, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/redjason/voices/jasonlong01.wav", "sounds/null.wav");
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==200)
    {
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL8", 0, "U", 0);
        }
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL9", 0, "D", 0);
        }
        if(frame==3)
        {
            randSound0("chars/redjason/voices/jasonlong04.wav", "sounds/null.wav");
        }
        if(frame==4)
        {
            velo001(2, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==202)
    {
        if(frame==1)
        {
            velo001(3, 0, 0);
        }
        if(frame==4)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==203)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

    	antiwallVel(-15,15,0);

	        return;
    }
    if(animhandle==204)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        return;
    }
    if(animhandle==208)
    {


	antiwallVel(-15,15,0);

	        if(frame==0)
        {
            releaseTarget();
        }
        return;
    }
    if(animhandle==209)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

    	antiwallVel(-15,15,0);

	        return;
    }
    if(animhandle==210)
    {
        if(frame==0)
        {
            velo001(0, 0, 0);
        }
        if(frame==2)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==211)
    {
        if(frame==0)
        {
            floater(60);
        }
        if(frame==0)
        {
            spawn01("bflash", 15, 30, -1);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==212)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 64, -1, 1);
        }
        if(frame==3)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==4)
        {
            velo001(1, 0, 0);
        }
        if(frame==5)
        {
            position(14, 11, 45, 1, 1);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(25, 2, 4, 1, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        if(frame==8)
        {
            clearL();
        }
        return;
    }
    if(animhandle==214)
    {
        if(frame==0)
        {
            DeControl(1);
        }
        if(frame==10)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==10)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_FOLLOW80", 0, 0, 0);
        }
        if(frame==28)
        {
            finishlevel();
        }
        return;
    }
    if(animhandle==215)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

    changeentityproperty(self,"subject_to_screen",1);

    changeentityproperty(self,"subject_to_wall",1);

performattack(getlocalvar("self"), openborconstant("ANI_CANT"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==216)
    {
        if(frame==3)
        {
            clearL();
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==217)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==218)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(0.55, 0, 0);
        }
        if(frame==2)
        {
            velo001(0, 0, 0);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==7)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==8)
        {
            setglobalvar("zoomentity", NULL());
        }
        return;
    }
    if(animhandle==219)
    {


    void self = getlocalvar("self");

    int Summon = getentityvar(self, 1);



    if(frame==0){

      setentityvar(self, 1, openborvariant("elapsed_time"));

    }

    if(Summon <= openborvariant("elapsed_time") - 2000){

      setentityvar(self, 1, NULL());

      performattack(self,openborconstant("ANI_ATTACK2"));

    }

	        return;
    }
    if(animhandle==226)
    {
        if(frame==10)
        {
            clearL();
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==228)
    {
        if(frame==0)
        {
            checkStageType("noweapon", "ANI_CANT");
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("sdust", 0, 0, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(1, 0, 3);
        }
        if(frame==11)
        {
            velo001(0, 0, 0);
        }
        if(frame==11)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==229)
    {
        if(frame==0)
        {
            spawnAni("cdust", 14, 29, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(2.5, NULL(), -2.5);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==230)
    {
        if(frame==0)
        {
            checkStageType("noweapon", "ANI_CANT");
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("sdust", 0, 0, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound0("chars/redjason/voices/jasonweapon.wav", "sounds/null.wav");
        }
        if(frame==1)
        {
            velo001(6, 0, 0);
        }
        if(frame==2)
        {
            velo001(4, 0, 0);
        }
        if(frame==3)
        {
            velo001(2, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==231)
    {


	void vSelf = getlocalvar("self");

	if(frame==0){

	changeentityproperty(vSelf, "aiflag", "jumping", 0);

	changeentityproperty(vSelf, "aiflag", "attacking", 1);

	}

	if(frame==1){

	int  iTime = openborvariant("elapsed_time");

	changeentityproperty(vSelf, "velocity", 0, 0 , 0); // This is to stop entity from moving forward

	changeentityproperty(vSelf, "tosstime", iTime + 12);

	}

	        if(frame==2)
        {
            velo001(4, NULL(), -4);
        }
        if(frame==2)
        {
            spawnAni("cdust", 31, 2, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==232)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==233)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==234)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==235)
    {
        if(frame==0)
        {
            slamstart2(5);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(4, 11, 49, -1, 0);
        }
        if(frame==2)
        {
            position(5, 25, 52, -1, 0);
        }
        if(frame==3)
        {
            position(11, -14, 51, 1, 0);
        }
        if(frame==3)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==4)
        {
            position(14, -32, 23, 1, 0);
        }
        if(frame==4)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==5)
        {
            position(19, 0, 3, 1, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        if(frame==5)
        {
            spawn01("stompfx", 0, 0, 1);
        }
        if(frame==5)
        {
            targetdamage(25);
        }
        if(frame==6)
        {
            position(19, 0, 0, 1, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(8, 1, -1, 1, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        if(frame==9)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==236)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, -21, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -32, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, -30, 69, 0, 1);
        }
        if(frame==4)
        {
            position(8, -15, 68, 1, 1);
        }
        if(frame==5)
        {
            position(22, 3, 35, 1, 0);
        }
        if(frame==5)
        {
            spawn01("stompfx", 25, 5, 1);
        }
        if(frame==5)
        {
            targetdamage(15);
        }
        if(frame==6)
        {
            position(19, 25, 2, -1, 0);
        }
        if(frame==7)
        {
            position(28, 25, 2, -1, 0);
        }
        if(frame==13)
        {
            position(19, 25, 2, -1, 0);
        }
        if(frame==13)
        {
            spawn01("flash4", 50, 2, 1);
        }
        if(frame==13)
        {
            targetdamage(10);
        }
        if(frame==14)
        {
            position(22, 0, 0, 1, 0);
        }
        if(frame==14)
        {
            depost(0);
        }
        if(frame==14)
        {
            throw(8, 1, -1, 1, 0, 0);
        }
        if(frame==15)
        {
            clearL();
        }
        if(frame==16)
        {
            anichange("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==240)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(5, 9, 64, -1, 0);
        }
        if(frame==2)
        {
            position(11, -11, 52, 1, 0);
        }
        if(frame==2)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==3)
        {
            position(14, 0, 45, 1, 0);
        }
        if(frame==3)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==4)
        {
            position(14, 0, 35, 1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(25, 2, 4, 1, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==241)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(4, 11, 49, -1, 0);
        }
        if(frame==2)
        {
            position(5, 25, 52, -1, 0);
        }
        if(frame==3)
        {
            position(11, -14, 51, 1, 0);
        }
        if(frame==3)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==4)
        {
            position(14, -32, 23, 1, 0);
        }
        if(frame==4)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==5)
        {
            position(19, 0, 3, 1, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        if(frame==5)
        {
            spawn01("stompfx", 0, 0, 1);
        }
        if(frame==5)
        {
            targetdamage(25);
        }
        if(frame==6)
        {
            position(19, 0, 0, 1, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(8, 1, -1, 1, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        if(frame==9)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==242)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, -21, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -32, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, -30, 69, 0, 1);
        }
        if(frame==4)
        {
            position(8, -15, 68, 1, 1);
        }
        if(frame==5)
        {
            position(22, 3, 35, 1, 0);
        }
        if(frame==5)
        {
            spawn01("stompfx", 25, 5, 1);
        }
        if(frame==5)
        {
            targetdamage(15);
        }
        if(frame==6)
        {
            position(19, 25, 2, -1, 0);
        }
        if(frame==7)
        {
            position(28, 25, 2, -1, 0);
        }
        if(frame==13)
        {
            position(19, 25, 2, -1, 0);
        }
        if(frame==13)
        {
            spawn01("flash4", 50, 2, 1);
        }
        if(frame==13)
        {
            targetdamage(10);
        }
        if(frame==14)
        {
            position(22, 0, 0, 1, 0);
        }
        if(frame==14)
        {
            depost(0);
        }
        if(frame==14)
        {
            throw(8, 1, -1, 1, 0, 0);
        }
        if(frame==15)
        {
            clearL();
        }
        if(frame==16)
        {
            anichange("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==243)
    {
        if(frame==0)
        {
            antiwall(5, -15, 0);
        }
        return;
    }
    if(animhandle==245)
    {
        if(frame==0)
        {
            randSound0("chars/redjason/voices/jasonshort05.wav", "sounds/null.wav");
        }
        return;
    }
    if(animhandle==246)
    {
        if(frame==0)
        {
            randSound0("chars/redjason/voices/jasonshort06.wav", "sounds/null.wav");
        }
        return;
    }
    if(animhandle==248)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==251)
    {
        if(frame==0)
        {
            velo001(-2, NULL(), NULL());
        }
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==1)
        {
            velo001(-1, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==2)
        {
            velo001(-0.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==253)
    {


	if(frame==0) {

    		void self = getlocalvar("self");

    		void e;



    		clearspawnentry();

    		setspawnentry("name", "glue");

    		e = spawn();

    		changeentityproperty(e,"parent",self); // <--- ADDED

    		bindentity(e, self,0,1,30,-1,2); // <--- CHANGED

    	}

	        return;
    }
    if(animhandle==254)
    {


  if(frame == 0){

    void self = getlocalvar("self");

    int x = getglobalvar("Rx"); //Get respawn x coordinate

    int z = getglobalvar("Rz"); //Get respawn z coordinate

    int XPos = openborvariant("xpos");



    if(x && z){

      changeentityproperty(self, "position", XPos+x, z);

    }

  }

        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_IDLE", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        if(frame==20)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==256)
    {
        if(frame==1)
        {
            spawnAni("bflash", 10, 30, 1, "ANI_FOLLOW30", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(3.5, 0, 1.5);
        }
        if(frame==3)
        {
            randSound0("chars/redjason/voices/jasonshort04.wav", "chars/redjason/voices/jasonshort05.wav");
        }
        if(frame==9)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==258)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==1)
        {
            randSound0("chars/redjason/voices/jasonshort03.wav", "sounds/null.wav");
        }
        if(frame==2)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==260)
    {
        if(frame==0)
        {
            gravity(1);
        }


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "shock");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

			antiwallVel(-15,15,0);

	        if(frame==1)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==261)
    {
        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_IDLE", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        if(frame==20)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==262)
    {
        if(frame==8)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==266)
    {
        if(frame==8)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==268)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, -1);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(4, 26, 50, -1, -1);
        }
        if(frame==2)
        {
            position(8, -13, 61, -1, 0);
        }
        if(frame==3)
        {
            position(8, 0, 41, -1, 0);
        }
        if(frame==3)
        {
            depost(0);
        }
        if(frame==3)
        {
            throw(15, 2, 0, 1, -3, 0);
        }
        if(frame==4)
        {
            clearL();
        }
        return;
    }
    if(animhandle==269)
    {


	antiwallVel(-15,15,0);

	        if(frame==0)
        {
            releaseTarget();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/beam/beam.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==270)
    {
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==271)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==272)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==273)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==274)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("bflash", 0, 0, 0);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==275)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("bflash", 0, 0, 0);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==277)
    {
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/megazord/megazord.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==280)
    {
        if(frame==0)
        {
            randomAnim(30, 0, "ANI_ATTACK4");
        }
        if(frame==3)
        {
            velo001(2, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==281)
    {
        if(frame==3)
        {
            velo001(2, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==283)
    {


	if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    void e2;

    clearspawnentry();

    setspawnentry("name", "nburn");

    e = spawn();

    bindentity(e, self,-20,1,35,1,1);

    clearspawnentry();

    setspawnentry("name", "nburn");

    e2 = spawn();

    bindentity(e2, self,10,1,15,1,1);

		}

	        if(frame==4)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        return;
    }
    if(animhandle==284)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        return;
    }
    if(animhandle==286)
    {


	antiwallVel(-15,15,0);

	        if(frame==0)
        {
            releaseTarget();
        }
        if(frame==3)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==287)
    {
        if(frame==0)
        {
            velo001(0, 0, 0);
        }
        if(frame==2)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==288)
    {
        if(frame==0)
        {
            floater(60);
        }
        if(frame==0)
        {
            spawn01("bflash", 15, 30, -1);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==290)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 64, -1, 1);
        }
        if(frame==3)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==4)
        {
            velo001(1, 0, 0);
        }
        if(frame==5)
        {
            position(14, 11, 45, 1, 1);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(25, 2, 4, 1, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        if(frame==8)
        {
            clearL();
        }
        return;
    }
    if(animhandle==292)
    {
        if(frame==0)
        {
            DeControl(1);
        }
        if(frame==8)
        {
            setglobalvar("morphStatus", 1);
        }
        if(frame==8)
        {
            spawnPosAni("mmpr", 240, 0, 140, "ANI_IDLE", 1);
        }
        if(frame==25)
        {
            spawn01("colordust", 0, 0, -1);
        }
        if(frame==25)
        {
            pausemusic(0);
        }
        if(frame==26)
        {
            DeControl(0);
        }
        return;
    }
    if(animhandle==293)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

    changeentityproperty(self,"subject_to_screen",1);

    changeentityproperty(self,"subject_to_wall",1);

performattack(getlocalvar("self"), openborconstant("ANI_CANT"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==294)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==295)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(0.55, 0, 0);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==7)
        {
            setglobalvar("zoomentity", NULL());
        }
        return;
    }
    if(animhandle==296)
    {


    void self = getlocalvar("self");

    int Summon = getentityvar(self, 1);



    if(frame==0){

      setentityvar(self, 1, openborvariant("elapsed_time"));

    }

    if(Summon <= openborvariant("elapsed_time") - 2000){

      setentityvar(self, 1, NULL());

      performattack(self,openborconstant("ANI_ATTACK2"));

    }

	        return;
    }
    if(animhandle==302)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("sdust", 0, 0, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==8)
        {
            velo001(5, 0, 0);
        }
        if(frame==9)
        {
            velo001(4, 0, 0);
        }
        if(frame==10)
        {
            velo001(3, 0, 0);
        }
        if(frame==11)
        {
            velo001(2, 0, 0);
        }
        if(frame==12)
        {
            velo001(0, 0, 0);
        }
        if(frame==12)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==303)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 5);
        }
        if(frame==0)
        {
            spawnAni("sdust", 0, 0, 6, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==10)
        {
            spawn01("sdust", 0, 0, 5);
        }
        if(frame==10)
        {
            shooter("beam", 52, 60, 0, 2.3, 0, 0);
        }
        if(frame==10)
        {
            spawn01("cdust", 52, 60, 1);
        }
        return;
    }
    if(animhandle==304)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==306)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 74, -1, 1);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==5)
        {
            position(7, 12, 77, 1, 1);
        }
        if(frame==6)
        {
            position(11, 24, 68, 1, 1);
        }
        if(frame==7)
        {
            position(14, 25, 2, -1, 1);
        }
        if(frame==7)
        {
            spawn01("stompfx", 25, 0, 1);
        }
        if(frame==8)
        {
            position(14, 0, 2, -1, 1);
        }
        if(frame==8)
        {
            depost(0);
        }
        if(frame==8)
        {
            throw(25, 2, 2, 1.3, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        return;
    }
    if(animhandle==312)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==315)
    {
        if(frame==0)
        {
            velo001(-2, NULL(), NULL());
        }
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==1)
        {
            velo001(-1, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==2)
        {
            velo001(-0.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==317)
    {


	if(frame==0) {

    		void self = getlocalvar("self");

    		void e;



    		clearspawnentry();

    		setspawnentry("name", "glue");

    		e = spawn();

    		changeentityproperty(e,"parent",self); // <--- ADDED

    		bindentity(e, self,0,1,30,-1,2); // <--- CHANGED

    	}

	        return;
    }
    if(animhandle==318)
    {
        if(frame==1)
        {
            mpadd(1000);
        }
        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_IDLE", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        return;
    }
    if(animhandle==320)
    {
        if(frame==1)
        {
            spawnAni("bflash", 10, 30, 1, "ANI_FOLLOW30", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4.5, 0, 0);
        }
        if(frame==3)
        {
            velo001(2.5, 0, 0);
        }
        if(frame==4)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==321)
    {
        if(frame==2)
        {
            shooter("po", -30, 0, 1, -0.5, 0, 0);
        }
        return;
    }
    if(animhandle==322)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(6, NULL(), NULL());
        }
        if(frame==1)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==324)
    {
        if(frame==0)
        {
            gravity(1);
        }


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "shock");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

			antiwallVel(-15,15,0);

	        if(frame==1)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==325)
    {
        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_IDLE", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        return;
    }
    if(animhandle==326)
    {
        if(frame==4)
        {
            spawn01("fxspark", 40, 40, 1);
        }
        if(frame==5)
        {
            spawn01("fxspark", 50, 80, 1);
        }
        if(frame==6)
        {
            spawn01("fxspark", 60, 60, 1);
        }
        if(frame==7)
        {
            spawn01("fxspark", 70, 40, 1);
        }
        return;
    }
    if(animhandle==329)
    {
        if(frame==2)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==330)
    {
        if(frame==7)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/redjason/redjason.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==333)
    {
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL8", 0, "U", 0);
        }
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL9", 0, "D", 0);
        }
        if(frame==0)
        {
            randomAnim(30, 0, "ANI_ATTACK4");
        }
        if(frame==1)
        {
            velo001(2, 0, 0);
        }
        if(frame==1)
        {
            randSound0("sounds/null.wav", "chars/redjason/voices/jasonlong02.wav");
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==334)
    {
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL8", 0, "U", 0);
        }
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL9", 0, "D", 0);
        }
        if(frame==1)
        {
            randSound0("sounds/null.wav", "chars/redjason/voices/jasonlong03.wav");
        }
        if(frame==2)
        {
            velo001(2, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==335)
    {
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL8", 0, "U", 0);
        }
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL9", 0, "D", 0);
        }
        if(frame==0)
        {
            randomAnim(30, 0, "ANI_ATTACK4");
        }
        return;
    }
    if(animhandle==337)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

    	antiwallVel(-15,15,0);

	        return;
    }
    if(animhandle==338)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        return;
    }
    if(animhandle==342)
    {


	antiwallVel(-15,15,0);

	        if(frame==0)
        {
            releaseTarget();
        }
        return;
    }
    if(animhandle==343)
    {
        if(frame==0)
        {
            velo001(0, 0, 0);
        }
        if(frame==2)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==344)
    {
        if(frame==0)
        {
            floater(60);
        }
        if(frame==0)
        {
            spawn01("bflash", 15, 30, -1);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==346)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 64, -1, 1);
        }
        if(frame==3)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==4)
        {
            velo001(1, 0, 0);
        }
        if(frame==5)
        {
            position(14, 11, 45, 1, 1);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(25, 2, 4, 1, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        if(frame==8)
        {
            clearL();
        }
        return;
    }
    if(animhandle==348)
    {
        if(frame==0)
        {
            DeControl(1);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        if(frame==8)
        {
            setglobalvar("morphStatus", 1);
        }
        if(frame==8)
        {
            spawnPosAni("mmpr", 240, 0, 140, "ANI_IDLE", 1);
        }
        if(frame==25)
        {
            noplayerJoin(0);
        }
        if(frame==25)
        {
            spawn01("colordust", 0, 0, -1);
        }
        if(frame==25)
        {
            pausemusic(0);
        }
        if(frame==25)
        {
            spawn01("MMPRFX", 0, 0, 0);
        }
        if(frame==26)
        {
            DeControl(0);
        }
        return;
    }
    if(animhandle==349)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

    changeentityproperty(self,"subject_to_screen",1);

    changeentityproperty(self,"subject_to_wall",1);

performattack(getlocalvar("self"), openborconstant("ANI_CANT"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==350)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==351)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(0.55, 0, 0);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==7)
        {
            setglobalvar("zoomentity", NULL());
        }
        return;
    }
    if(animhandle==352)
    {


    void self = getlocalvar("self");

    int Summon = getentityvar(self, 1);



    if(frame==0){

      setentityvar(self, 1, openborvariant("elapsed_time"));

    }

    if(Summon <= openborvariant("elapsed_time") - 2000){

      setentityvar(self, 1, NULL());

      performattack(self,openborconstant("ANI_ATTACK2"));

    }

	        return;
    }
    if(animhandle==359)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("sdust", 0, 0, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(6, 0, 0);
        }
        if(frame==2)
        {
            velo001(3, 0, 0);
        }
        if(frame==3)
        {
            velo001(1, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==360)
    {
        if(frame==0)
        {
            spawnAni("cdust", 14, 29, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(2.5, NULL(), -2.5);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==361)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==362)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==363)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==364)
    {
        if(frame==0)
        {
            cancelgrab("ANI_ATTACK2");
        }
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(5, 9, 64, -1, 0);
        }
        if(frame==2)
        {
            position(11, -11, 72, 1, 0);
        }
        if(frame==2)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==3)
        {
            position(14, -11, 45, 1, 0);
        }
        if(frame==3)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==4)
        {
            position(14, 0, 45, 1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(25, 2, 3.5, 1, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==365)
    {
        if(frame==0)
        {
            cancelgrab("ANI_ATTACK2");
        }
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 74, -1, 1);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==5)
        {
            position(7, 12, 77, 1, 1);
        }
        if(frame==6)
        {
            position(11, 24, 68, 1, 1);
        }
        if(frame==7)
        {
            position(14, 25, 2, -1, 1);
        }
        if(frame==7)
        {
            spawn01("stompfx", 25, 0, 1);
        }
        if(frame==8)
        {
            position(14, 0, 2, -1, 1);
        }
        if(frame==8)
        {
            depost(0);
        }
        if(frame==8)
        {
            throw(25, 2, 2, 1.3, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        return;
    }
    if(animhandle==370)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(5, 9, 64, -1, 0);
        }
        if(frame==2)
        {
            position(11, -11, 72, 1, 0);
        }
        if(frame==2)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==3)
        {
            position(14, -11, 45, 1, 0);
        }
        if(frame==3)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==4)
        {
            position(14, 0, 45, 1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(25, 2, 3.5, 1, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==371)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 74, -1, 1);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==5)
        {
            position(7, 12, 77, 1, 1);
        }
        if(frame==6)
        {
            position(11, 24, 68, 1, 1);
        }
        if(frame==7)
        {
            position(14, 25, 2, -1, 1);
        }
        if(frame==7)
        {
            spawn01("stompfx", 25, 0, 1);
        }
        if(frame==8)
        {
            position(14, 0, 2, -1, 1);
        }
        if(frame==8)
        {
            depost(0);
        }
        if(frame==8)
        {
            throw(25, 2, 2, 1.3, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        return;
    }
    if(animhandle==374)
    {
        if(frame==0)
        {
            randSound0("chars/redjason/voices/jasonshort01.wav", "sounds/null.wav");
        }
        return;
    }
    if(animhandle==375)
    {
        if(frame==0)
        {
            randSound0("chars/redjason/voices/jasonshort02.wav", "sounds/null.wav");
        }
        return;
    }
    if(animhandle==377)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==380)
    {
        if(frame==0)
        {
            velo001(-2, NULL(), NULL());
        }
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==1)
        {
            velo001(-1, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==2)
        {
            velo001(-0.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==382)
    {


	if(frame==0) {

    		void self = getlocalvar("self");

    		void e;



    		clearspawnentry();

    		setspawnentry("name", "glue");

    		e = spawn();

    		changeentityproperty(e,"parent",self); // <--- ADDED

    		bindentity(e, self,0,1,30,-1,2); // <--- CHANGED

    	}

	        return;
    }
    if(animhandle==383)
    {


  if(frame == 0){

    void self = getlocalvar("self");

    int x = getglobalvar("Rx"); //Get respawn x coordinate

    int z = getglobalvar("Rz"); //Get respawn z coordinate

    int XPos = openborvariant("xpos");



    if(x && z){

      changeentityproperty(self, "position", XPos+x, z);

    }

  }

        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_IDLE", 0, 0, 0);
        }
        if(frame==19)
        {
            morphCheck();
        }
        return;
    }
    if(animhandle==385)
    {
        if(frame==1)
        {
            spawnAni("bflash", 10, 30, 1, "ANI_FOLLOW30", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(3.5, 0, 0);
        }
        if(frame==2)
        {
            randSound0("chars/redjason/voices/jasonshort04.wav", "sounds/null.wav");
        }
        if(frame==3)
        {
            velo001(2.5, 0, 0);
        }
        if(frame==4)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==387)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==1)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==1)
        {
            randSound0("chars/redjason/voices/jasonshort03.wav", "sounds/null.wav");
        }
        if(frame==2)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==389)
    {
        if(frame==0)
        {
            gravity(1);
        }


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "shock");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

			antiwallVel(-15,15,0);

	        if(frame==1)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==390)
    {
        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_IDLE", 0, 0, 0);
        }
        if(frame==19)
        {
            morphCheck();
        }
        return;
    }
    if(animhandle==391)
    {
        if(frame==10)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==394)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==396)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, -1);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(5, 9, 64, -1, 0);
        }
        if(frame==2)
        {
            position(11, -11, 72, 1, 0);
        }
        if(frame==3)
        {
            position(14, -11, 45, 1, 0);
        }
        if(frame==4)
        {
            position(14, 0, 45, 1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(25, 2, 0, 1, -3, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/yellowtrini/yellowtrinim.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==400)
    {
        if(frame==2)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==401)
    {
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL8", 0, "U", 0);
        }
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL9", 0, "D", 0);
        }
        if(frame==0)
        {
            randomAnim(30, 0, "ANI_ATTACK5");
        }
        if(frame==1)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinilong06.wav");
        }
        if(frame==2)
        {
            velo001(1, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==402)
    {
        if(frame==2)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinilong05.wav");
        }
        if(frame==11)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==403)
    {
        if(frame==2)
        {
            velo001(3, 0, 0);
        }
        if(frame==4)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==404)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

    	antiwallVel(-15,15,0);

	        return;
    }
    if(animhandle==405)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        return;
    }
    if(animhandle==409)
    {


	antiwallVel(-15,15,0);

	        if(frame==0)
        {
            releaseTarget();
        }
        return;
    }
    if(animhandle==410)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

    	antiwallVel(-15,15,0);

	        return;
    }
    if(animhandle==411)
    {
        if(frame==0)
        {
            floater(60);
        }
        if(frame==0)
        {
            spawn01("bflash", 15, 30, -1);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==413)
    {
        if(frame==0)
        {
            DeControl(1);
        }
        if(frame==10)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==10)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_FOLLOW70", 0, 0, 0);
        }
        if(frame==28)
        {
            finishlevel();
        }
        return;
    }
    if(animhandle==414)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

    changeentityproperty(self,"subject_to_screen",1);

    changeentityproperty(self,"subject_to_wall",1);

performattack(getlocalvar("self"), openborconstant("ANI_CANT"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==415)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==416)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(0.55, 0, 0);
        }
        if(frame==2)
        {
            velo001(0, 0, 0);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==7)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==8)
        {
            setglobalvar("zoomentity", NULL());
        }
        return;
    }
    if(animhandle==417)
    {


    void self = getlocalvar("self");

    int Summon = getentityvar(self, 1);



    if(frame==0){

      setentityvar(self, 1, openborvariant("elapsed_time"));

    }

    if(Summon <= openborvariant("elapsed_time") - 2000){

      setentityvar(self, 1, NULL());

      performattack(self,openborconstant("ANI_ATTACK2"));

    }

	        return;
    }
    if(animhandle==423)
    {
        if(frame==10)
        {
            clearL();
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==425)
    {
        if(frame==0)
        {
            checkStageType("noweapon", "ANI_CANT");
        }
        if(frame==1)
        {
            velo001(3, 0, 0);
        }
        if(frame==6)
        {
            velo001(2, 0, 0);
        }
        if(frame==10)
        {
            velo001(1, 0, 0);
        }
        if(frame==12)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==426)
    {
        if(frame==0)
        {
            spawnAni("cdust", 14, 29, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(2.5, NULL(), -2.5);
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==427)
    {
        if(frame==0)
        {
            checkStageType("noweapon", "ANI_CANT");
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            spawnAni("sdust", 0, 0, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==3)
        {
            randSound0("chars/yellowtrini/voices/triniweapon.wav", "sounds/null.wav");
        }
        if(frame==6)
        {
            shooter("trinidagger", 44, 56, 1, 5, 0, 0);
        }
        return;
    }
    if(animhandle==428)
    {


	void vSelf = getlocalvar("self");

	if(frame==0){

	changeentityproperty(vSelf, "aiflag", "jumping", 0);

	changeentityproperty(vSelf, "aiflag", "attacking", 1);

	}

	if(frame==1){

	int  iTime = openborvariant("elapsed_time");

	changeentityproperty(vSelf, "velocity", 0, 0 , 0); // This is to stop entity from moving forward

	changeentityproperty(vSelf, "tosstime", iTime + 12);

	}

	        if(frame==2)
        {
            velo001(4, NULL(), -4);
        }
        if(frame==2)
        {
            spawnAni("cdust", 31, 2, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==429)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==430)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==431)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==436)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 3, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(3, 35, 2, -1, 0);
        }
        if(frame==2)
        {
            position(7, 28, 57, -1, 0);
        }
        if(frame==3)
        {
            position(7, 16, 39, 1, 0);
        }
        if(frame==3)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==4)
        {
            position(10, -10, 32, 1, 0);
        }
        if(frame==4)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==5)
        {
            position(19, 0, 3, 1, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(25, 2, 4.5, 2, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        if(frame==9)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==11)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==11)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==437)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(1, 0, 0);
        }
        if(frame==3)
        {
            spawn01("flash3", 36, 41, 1);
        }
        if(frame==3)
        {
            position(3, 40, 2, -1, 0);
        }
        if(frame==5)
        {
            spawn01("flash3", 33, 54, 1);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==5)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==7)
        {
            position(0, 0, 20, 1, 0);
        }
        if(frame==7)
        {
            depost(0);
        }
        if(frame==7)
        {
            throw(25, 1, -4, 2, 0, 0);
        }
        if(frame==7)
        {
            velo001(0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("flash4", 26, 26, 1);
        }
        if(frame==8)
        {
            clearL();
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==438)
    {
        if(frame==0)
        {
            antiwall(5, -15, 0);
        }
        return;
    }
    if(animhandle==440)
    {
        if(frame==0)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinishort07.wav");
        }
        return;
    }
    if(animhandle==441)
    {
        if(frame==0)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinishort02.wav");
        }
        return;
    }
    if(animhandle==443)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==445)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 3, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(3, 35, 2, -1, 0);
        }
        if(frame==2)
        {
            position(7, 28, 57, -1, 0);
        }
        if(frame==3)
        {
            position(7, 16, 39, 1, 0);
        }
        if(frame==3)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==4)
        {
            position(10, -10, 32, 1, 0);
        }
        if(frame==4)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==5)
        {
            position(19, 0, 3, 1, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(25, 2, 4.5, 2, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        if(frame==9)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==11)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==11)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==446)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(1, 0, 0);
        }
        if(frame==3)
        {
            spawn01("flash3", 36, 41, 1);
        }
        if(frame==3)
        {
            position(3, 40, 2, -1, 0);
        }
        if(frame==5)
        {
            spawn01("flash3", 33, 54, 1);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==5)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==7)
        {
            position(0, 0, 20, 1, 0);
        }
        if(frame==7)
        {
            depost(0);
        }
        if(frame==7)
        {
            throw(25, 1, -4, 2, 0, 0);
        }
        if(frame==7)
        {
            velo001(0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("flash4", 26, 26, 1);
        }
        if(frame==8)
        {
            clearL();
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==448)
    {
        if(frame==0)
        {
            velo001(-2, NULL(), NULL());
        }
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==1)
        {
            velo001(-1, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==2)
        {
            velo001(-0.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==450)
    {


	if(frame==0) {

    		void self = getlocalvar("self");

    		void e;



    		clearspawnentry();

    		setspawnentry("name", "glue");

    		e = spawn();

    		changeentityproperty(e,"parent",self); // <--- ADDED

    		bindentity(e, self,0,1,30,-1,2); // <--- CHANGED

    	}

	        return;
    }
    if(animhandle==451)
    {


  if(frame == 0){

    void self = getlocalvar("self");

    int x = getglobalvar("Rx"); //Get respawn x coordinate

    int z = getglobalvar("Rz"); //Get respawn z coordinate

    int XPos = openborvariant("xpos");



    if(x && z){

      changeentityproperty(self, "position", XPos+x, z);

    }

  }

        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_FOLLOW7", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        if(frame==20)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==453)
    {
        if(frame==0)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinilong04.wav");
        }
        if(frame==1)
        {
            spawnAni("bflash", 10, 30, 1, "ANI_FOLLOW30", 0, 0, 0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5.5, 0, 0);
        }
        if(frame==2)
        {
            velo001(4, 0, 0);
        }
        if(frame==3)
        {
            velo001(3, 0, 0);
        }
        if(frame==4)
        {
            velo001(2, 0, 0);
        }
        if(frame==5)
        {
            velo001(1, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==455)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3.5, NULL(), 0);
        }
        if(frame==1)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinishort02.wav");
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==3)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==457)
    {
        if(frame==0)
        {
            gravity(1);
        }


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "shock");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

			antiwallVel(-15,15,0);

	        if(frame==1)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==458)
    {
        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_FOLLOW7", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        if(frame==20)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==465)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, -1);
        }
        if(frame==1)
        {
            position(0, -13, 6, -1, 1);
        }
        if(frame==2)
        {
            position(4, -7, 55, -1, 1);
        }
        if(frame==3)
        {
            position(0, 0, 20, 1, 0);
        }
        if(frame==3)
        {
            depost(0);
        }
        if(frame==3)
        {
            throw(15, 2, 0, 1, -3, 0);
        }
        if(frame==4)
        {
            clearL();
        }
        return;
    }
    if(animhandle==466)
    {


	antiwallVel(-15,15,0);

	        if(frame==0)
        {
            releaseTarget();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/yellowtrini/yellowtrini.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==470)
    {
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL8", 0, "U", 0);
        }
        if(frame==0)
        {
            keyslam("ANI_FREESPECIAL9", 0, "D", 0);
        }
        if(frame==0)
        {
            randomAnim(30, 0, "ANI_ATTACK5");
        }
        if(frame==1)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinilong01.wav");
        }
        if(frame==3)
        {
            velo001(2, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==471)
    {
        if(frame==1)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinilong07.wav");
        }
        return;
    }
    if(animhandle==473)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

    	antiwallVel(-15,15,0);

	        return;
    }
    if(animhandle==474)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        return;
    }
    if(animhandle==478)
    {


	antiwallVel(-15,15,0);

	        if(frame==0)
        {
            releaseTarget();
        }
        return;
    }
    if(animhandle==479)
    {
        if(frame==0)
        {
            velo001(1, 0, 0);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==480)
    {
        if(frame==0)
        {
            floater(60);
        }
        if(frame==0)
        {
            spawn01("bflash", 15, 30, -1);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==483)
    {
        if(frame==0)
        {
            DeControl(1);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        if(frame==7)
        {
            setglobalvar("morphStatus", 1);
        }
        if(frame==7)
        {
            spawnPosAni("mmpr", 240, 0, 140, "ANI_IDLE", 1);
        }
        if(frame==19)
        {
            noplayerJoin(0);
        }
        if(frame==19)
        {
            spawnAni("colordust", 0, 0, -1, "ANI_FOLLOW7", 0, 0, 0);
        }
        if(frame==19)
        {
            pausemusic(0);
        }
        if(frame==19)
        {
            spawn01("MMPRFX", 0, 0, 0);
        }
        if(frame==20)
        {
            DeControl(0);
        }
        return;
    }
    if(animhandle==484)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

    changeentityproperty(self,"subject_to_screen",1);

    changeentityproperty(self,"subject_to_wall",1);

performattack(getlocalvar("self"), openborconstant("ANI_CANT"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==485)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==486)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(0.55, 0, 0);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==7)
        {
            setglobalvar("zoomentity", NULL());
        }
        return;
    }
    if(animhandle==487)
    {


    void self = getlocalvar("self");

    int Summon = getentityvar(self, 1);



    if(frame==0){

      setentityvar(self, 1, openborvariant("elapsed_time"));

    }

    if(Summon <= openborvariant("elapsed_time") - 2000){

      setentityvar(self, 1, NULL());

      performattack(self,openborconstant("ANI_ATTACK2"));

    }

	        return;
    }
    if(animhandle==494)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("sdust", 0, 0, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4.5, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/yellowtrini/voices/trinilong02.wav", "sounds/null.wav");
        }
        if(frame==3)
        {
            spawn01("po", -20, 0, 1);
        }
        if(frame==4)
        {
            velo001(2, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", -20, 0, 1);
        }
        if(frame==5)
        {
            velo001(1, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", -20, 0, 1);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==495)
    {
        if(frame==0)
        {
            spawnAni("cdust", 14, 29, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(2.5, NULL(), -2.5);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==496)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==497)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==498)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==499)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(5, 9, 44, -1, 0);
        }
        if(frame==2)
        {
            position(11, -11, 52, 1, 0);
        }
        if(frame==2)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==3)
        {
            position(14, -11, 35, 1, 0);
        }
        if(frame==3)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==4)
        {
            position(14, 0, 35, 1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(25, 2, 3.5, 1, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==500)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 64, -1, 1);
        }
        if(frame==3)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==4)
        {
            velo001(1, 0, 0);
        }
        if(frame==5)
        {
            position(14, 11, 45, 1, 1);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(25, 2, 4, 1, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        if(frame==8)
        {
            clearL();
        }
        return;
    }
    if(animhandle==505)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(5, 9, 44, -1, 0);
        }
        if(frame==2)
        {
            position(11, -11, 52, 1, 0);
        }
        if(frame==2)
        {
            velo001(-1.5, 0, 0);
        }
        if(frame==3)
        {
            position(14, -11, 35, 1, 0);
        }
        if(frame==3)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==4)
        {
            position(14, 0, 35, 1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(25, 2, 3.5, 1, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==506)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, 0);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 5, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, -5, 2, -1, 1);
        }
        if(frame==3)
        {
            position(5, 9, 64, -1, 1);
        }
        if(frame==3)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==4)
        {
            position(11, 11, 72, 1, 1);
        }
        if(frame==4)
        {
            velo001(1, 0, 0);
        }
        if(frame==5)
        {
            position(14, 11, 45, 1, 1);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(25, 2, 4, 1, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        if(frame==8)
        {
            clearL();
        }
        return;
    }
    if(animhandle==509)
    {
        if(frame==0)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinishort01.wav");
        }
        return;
    }
    if(animhandle==510)
    {
        if(frame==0)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinishort02.wav");
        }
        return;
    }
    if(animhandle==512)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==515)
    {
        if(frame==0)
        {
            velo001(-2, NULL(), NULL());
        }
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==1)
        {
            velo001(-1, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==2)
        {
            velo001(-0.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==517)
    {


	if(frame==0) {

    		void self = getlocalvar("self");

    		void e;



    		clearspawnentry();

    		setspawnentry("name", "glue");

    		e = spawn();

    		changeentityproperty(e,"parent",self); // <--- ADDED

    		bindentity(e, self,0,1,30,-1,2); // <--- CHANGED

    	}

	        return;
    }
    if(animhandle==518)
    {


  if(frame == 0){

    void self = getlocalvar("self");

    int x = getglobalvar("Rx"); //Get respawn x coordinate

    int z = getglobalvar("Rz"); //Get respawn z coordinate

    int XPos = openborvariant("xpos");



    if(x && z){

      changeentityproperty(self, "position", XPos+x, z);

    }

  }

        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_FOLLOW7", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        return;
    }
    if(animhandle==520)
    {
        if(frame==1)
        {
            spawnAni("bflash", 10, 30, 1, "ANI_FOLLOW30", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4.5, 0, 1);
        }
        if(frame==2)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinishort02.wav");
        }
        if(frame==7)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==522)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==1)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==1)
        {
            randSound0("sounds/null.wav", "chars/yellowtrini/voices/trinishort07.wav");
        }
        if(frame==2)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==524)
    {
        if(frame==0)
        {
            gravity(1);
        }


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "shock");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

			antiwallVel(-15,15,0);

	        if(frame==1)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==525)
    {
        if(frame==1)
        {
            spawnAni("teleportfx", 0, 0, 0, "ANI_FOLLOW7", 0, 0, 0);
        }
        if(frame==20)
        {
            morphCheck();
        }
        return;
    }
    if(animhandle==526)
    {
        if(frame==2)
        {
            velo001(2, 0, 0);
        }
        if(frame==11)
        {
            velo001(1, 0, 0);
        }
        if(frame==14)
        {
            velo001(0, 0, 0);
        }
        if(frame==14)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==529)
    {
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==531)
    {
        if(frame==0)
        {
            slamstart(5);
        }
        if(frame==0)
        {
            position(0, 20, 2, -1, -1);
        }
        if(frame==0)
        {
            spawnAni("bflash", 33, 41, 0, "ANI_FOLLOW10", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 15, 2, -1, 0);
        }
        if(frame==2)
        {
            position(5, 9, 64, -1, 1);
        }
        if(frame==3)
        {
            position(11, 5, 57, -1, 1);
        }
        if(frame==4)
        {
            position(14, 0, 45, 1, 1);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(15, 2, 0, 1, -3, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/huditem/huditem.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==532)
    {


	int myVar = getglobalvar("HelperControl");

	checkStageType("truck","ANI_FOLLOW2");

	checkStageType("bonus","ANI_FOLLOW2");

	if (myVar && frame >0){

	void self = getlocalvar("self");

	changeentityproperty(self, "animation", openborconstant("ANI_IDLE"));

        }

	        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        return;
    }
    if(animhandle==533)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        return;
    }
    if(animhandle==534)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==0)
        {
            bmtPosition(240, 0, 136, 1);
        }
        if(frame==38)
        {
            suicide();
        }
        return;
    }
    if(animhandle==535)
    {


	int myVar = getglobalvar("HelperControl");

	checkStageType("truck","ANI_FOLLOW2");

	checkStageType("bonus","ANI_FOLLOW2");

	if (myVar==NULL()){

	void self = getlocalvar("self");

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));

        }

	        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/huditem/hudtips.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==536)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==537)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==538)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==539)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==540)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==19)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==541)
    {
        if(frame==1)
        {
            layer(2400);
        }
        return;
    }
    if(animhandle==542)
    {
        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/po.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==543)
    {
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/debris/debris1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==545)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==15)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/debris/debris2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==546)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==15)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/debris/debris3.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==547)
    {
        if(frame==0)
        {
            randomJump(5, 3, 2);
        }
        if(frame==15)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/debris/debris4.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==548)
    {
        if(frame==0)
        {
            randomJump(3, 5, 2);
        }
        if(frame==15)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/stompfx/stompfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==549)
    {
        if(frame==0)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==2)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        return;
    }
    if(animhandle==550)
    {
        if(frame==1)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 1);
        }
        if(frame==1)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 1);
        }
        if(frame==2)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 1);
        }
        if(frame==3)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/stompfire/stompfire.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==551)
    {
        if(frame==11)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==552)
    {
        if(frame==11)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/stomprock/stomprock.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==553)
    {
        if(frame==1)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==2)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==2)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==16)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==554)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/crack/crack.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==555)
    {




	     void self = getlocalvar("self");

     void inStage = getglobalvar("stageName");

     int layer = getentityproperty(self, "setlayer");

     if (inStage=="mirror")

     {

      	changeentityproperty(self,"setlayer",0);

      	//drawstring( 290,90,1,"layer: "+getentityproperty(self, "setlayer"));

      	//drawstring( 290,110,1,"stage: "+getglobalvar("stageName"));

     } else {

      changeentityproperty(self,"setlayer",-2);

     // drawstring( 290,90,1,"layer: "+getentityproperty(self, "setlayer"));

      //drawstring( 290,110,1,"stage: "+getglobalvar("stageName"));

      }



	        return;
    }
    if(animhandle==556)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/sdust/sdust.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==558)
    {
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==559)
    {
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/cdust/cdust.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==560)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==561)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==562)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==563)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==564)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==565)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/faisca/faisca.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==566)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW3"));

      }

    }

	        if(frame==1)
        {
            changepal(1);
        }
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==1)
        {
            velo001(0, 0, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==567)
    {
        if(frame==0)
        {
            velo001(-1, 0, 0);
        }


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW12"));

      }

    }

	        if(frame==1)
        {
            moveRandom(10, 10, 1);
        }
        return;
    }
    if(animhandle==568)
    {
        if(frame==0)
        {
            velo001(-1, 0, 0);
        }
        if(frame==1)
        {
            moveRandom(10, 10, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==569)
    {
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==1)
        {
            velo001(0, 0, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==570)
    {
        if(frame==1)
        {
            changepal(1);
        }
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==1)
        {
            velo001(0, 0, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==571)
    {
        if(frame==1)
        {
            changepal(2);
        }
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==1)
        {
            velo001(0, 0, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==572)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW2"));

      }

    }

	        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==1)
        {
            velo001(0, 0, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==573)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW14"));

      }

    }

	        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==1)
        {
            velo001(0, 0, 1);
        }
        if(frame==1)
        {
            changepal(3);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==574)
    {
        if(frame==1)
        {
            changepal(1);
        }
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==1)
        {
            velo001(0, 0, 1);
        }
        if(frame==1)
        {
            changepal(3);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fxspark/fxspark.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==575)
    {
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==576)
    {
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==577)
    {
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==578)
    {


    	if(frame==0){

      	void vSelf = getlocalvar("self");

      	int r = rand()%3;

        if (r <0){r = r*-1;}



     	if(r==0){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW1"));

        }



       	if(r==1){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW2"));

        }



       	if(r==2){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW3"));

        }





    	}

	        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/gshock/gshock.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==579)
    {


	void self = getlocalvar("self");

	changeentityproperty(self, "candamage", "TYPE_ENEMY");



if(frame == 54){

void self = getlocalvar("self");

killentity(self);

}

	        return;
    }
    if(animhandle==580)
    {


if(frame == 54){

void self = getlocalvar("self");

killentity(self);

}

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/gshot/gshot.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==581)
    {
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==582)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fx/exclamation.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==583)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==21)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==584)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/waterfx/waterfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==585)
    {
        if(frame==1)
        {
            spawnAni("particle", 0, 30, 1, "ANI_FOLLOW1", NULL(), NULL(), NULL());
        }
        return;
    }
    if(animhandle==586)
    {
        if(frame==1)
        {
            spawnAni("particle", 0, 30, 1, "ANI_FOLLOW2", NULL(), NULL(), NULL());
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fx/fx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==587)
    {
        if(frame==0)
        {
            layer(900);
        }
        if(frame==1)
        {
            suicide();
        }
        return;
    }
    if(animhandle==588)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==21)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==589)
    {
        if(frame==0)
        {
            layer(900);
        }
        if(frame==1)
        {
            suicide();
        }
        return;
    }
    if(animhandle==590)
    {
        if(frame==1)
        {
            spawn01("tthunder", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("tthunder", 0, 0, -20);
        }
        if(frame==2)
        {
            spawn01("tthunder", 0, 0, 20);
        }
        if(frame==3)
        {
            suicide();
        }
        return;
    }
    if(animhandle==591)
    {
        if(frame==0)
        {
            randomX();
        }
        if(frame==1)
        {
            spawn01("bubbles", 0, 0, 0);
        }
        if(frame==2)
        {
            randomX();
        }
        if(frame==3)
        {
            spawn01("bubbles", 0, 10, 0);
        }
        if(frame==4)
        {
            randomX();
        }
        if(frame==5)
        {
            spawn01("bubbles", 200, 20, 0);
        }
        if(frame==7)
        {
            spawn01("bubbles", 240, 0, 0);
        }
        return;
    }
    if(animhandle==592)
    {
        if(frame==0)
        {
            finishlevel();
        }
        return;
    }
    if(animhandle==593)
    {
        if(frame==0)
        {
            layer(900);
        }
        if(frame==0)
        {
            gravity(0);
        }
        if(frame==0)
        {
            velo001(0, 0, -0.5);
        }
        if(frame==1)
        {
            positionZ(272);
        }
        if(frame==11)
        {
            suicide();
        }
        return;
    }
    if(animhandle==594)
    {
        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            velo001(0, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0.75);
        }
        return;
    }
    if(animhandle==595)
    {
        if(frame==28)
        {
            suicide();
        }
        return;
    }
    if(animhandle==596)
    {
        if(frame==1)
        {
            spawn01("crackG", 0, 0, -1);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==597)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==21)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", 6, 0, 0);
        }
        if(frame==22)
        {
            spawnAni("Sky_Ranger", 0, 50, 1, "ANI_FOLLOW3", 9, 0, 0);
        }
        if(frame==23)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", 8.5, 0, 0);
        }
        if(frame==24)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", 6, 0, 0);
        }
        if(frame==25)
        {
            spawnAni("Sky_Ranger", 0, 150, 1, "ANI_FOLLOW3", 7, 0, 0);
        }
        if(frame==26)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", 9, 0, 0);
        }
        if(frame==27)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", 8.5, 0, 0);
        }
        if(frame==28)
        {
            spawnAni("Sky_Ranger", 0, 200, 1, "ANI_FOLLOW3", 7.5, 0, 0);
        }
        if(frame==29)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==598)
    {
        if(frame==16)
        {
            suicide();
        }
        return;
    }
    if(animhandle==599)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fx/fx2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==600)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);

        int time;

        int posx = getentityproperty(self, "x");



        float x,z;



        if(frame==0){



        setentityvar(self, 1, openborvariant("elapsed_time"));

        time = 0;



        }

        if (frame>0)

        {

        //x = sin(time/1.45)*2;

        x = sin(time/0.45)/16;

        z = cos(time/0.45)/16;

        changeentityproperty(self, "velocity", x, z, 0) ;

        time +=3;

        }



         if(Summon <= openborvariant("elapsed_time") - 500){

         setentityvar(self, 1, NULL());

         performattack(self,openborconstant("ANI_FOLLOW11"));

         }



	        if(frame==0)
        {
            spawnAni("gunner", 0, 100, 5, "ANI_FOLLOW8", 0, 0, 0);
        }
        if(frame==7)
        {
            spawnAni("Flamethrower", 0, 100, 5, "ANI_FOLLOW12", 0, 0, 0);
        }
        if(frame==14)
        {
            spawnAni("gunner", 0, 100, 5, "ANI_FOLLOW7", 0, 0, 0);
        }
        return;
    }
    if(animhandle==601)
    {
        if(frame==0)
        {
            velo001(1, 0, 0);
        }
        return;
    }
    if(animhandle==602)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==1)
        {
            randomJump(3, 3);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==603)
    {
        if(frame==1)
        {
            layer(1001001000);
        }
        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==604)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==1)
        {
            randomJump(3, 3);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==605)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==1)
        {
            randomJump(3, 3);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==606)
    {


	if (frame==23)

	{

	playmusic("data/music/chase.ogg",1,156480);

	}        if(frame==1)
        {
            layer(1001001000);
        }
        if(frame==28)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==607)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);

        int time;

        int posx = getentityproperty(self, "x");



        float x,z;



        if(frame==0){



        setentityvar(self, 1, openborvariant("elapsed_time"));

        time = 0;



        }

        if (frame>0)

        {

        x = sin(time/0.45)/16;

        z = cos(time/0.45)/16;

        changeentityproperty(self, "velocity", 0.25, z, 0) ;

        time +=3;

        }



         if(Summon <= openborvariant("elapsed_time") - 2000){

         setentityvar(self, 1, NULL());

         performattack(self,openborconstant("ANI_FOLLOW8"));

         }

	 if(posx>=240)

	 {

        changeentityproperty(self, "velocity", 0, z, 0) ;

	 }



	        return;
    }
    if(animhandle==608)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);

        int time;

        int posx = getentityproperty(self, "x");



        float x,z;



        if(frame==0){



        setentityvar(self, 1, openborvariant("elapsed_time"));

        time = 0;



        }

        if (frame>0)

        {

        //x = sin(time/1.45)*2;

        x = sin(time/0.45)/16;

        z = cos(time/0.45)/16;

        changeentityproperty(self, "velocity", x, z, 0) ;

        time +=3;

        }



         if(Summon <= openborvariant("elapsed_time") - 2200){

         setentityvar(self, 1, NULL());

         performattack(self,openborconstant("ANI_FOLLOW9"));

         }



	        if(frame==0)
        {
            spawnAni("gunner", 0, 100, 5, "ANI_FOLLOW8", 0, 0, 0);
        }
        if(frame==7)
        {
            spawnAni("soldier", 0, 100, 5, "ANI_FOLLOW12", 0, 0, 0);
        }
        if(frame==14)
        {
            spawnAni("gunner", 0, 100, 5, "ANI_FOLLOW7", 0, 0, 0);
        }
        return;
    }
    if(animhandle==609)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);

        int time;

        int posx = getentityproperty(self, "x");



        float x,z;



        if(frame==0){



        setentityvar(self, 1, openborvariant("elapsed_time"));

        time = 0;



        }

        if (frame>0)

        {

        //x = sin(time/1.45)*2;

        x = sin(time/0.45)/16;

        z = cos(time/0.45)/16;

        changeentityproperty(self, "velocity", x, z, 0) ;

        time +=3;

        }



         if(Summon <= openborvariant("elapsed_time") - 1000){

         setentityvar(self, 1, NULL());

         performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW10"));

         }



	        if(frame==0)
        {
            shooterAni("joh", -30, 15, 0, "ANI_FOLLOW4", -2, 0, 1);
        }
        if(frame==4)
        {
            shooterAni("joh", -30, 15, 0, "ANI_FOLLOW4", -1, 0, 1);
        }
        if(frame==5)
        {
            shooterAni("joh", -30, 15, 0, "ANI_FOLLOW4", 0, 0, 1);
        }
        if(frame==9)
        {
            shooterAni("joh", -30, 15, 0, "ANI_FOLLOW4", 1, 0, 1);
        }
        if(frame==10)
        {
            shooterAni("joh", -30, 15, 0, "ANI_FOLLOW4", 2, 0, 1);
        }
        if(frame==14)
        {
            shooterAni("joh", -30, 15, 0, "ANI_FOLLOW4", 3, 0, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/afake/afake.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==611)
    {
        if(frame==1)
        {
            velo001(1, NULL(), 1);
        }
        return;
    }
    if(animhandle==612)
    {
        if(frame==1)
        {
            spawnAni("Skeleton", 0, 0, 0, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==613)
    {
        if(frame==14)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/ashoutbox/ashoutbox.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==615)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==22)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==616)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==22)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==617)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==12)
        {
            toss("glueprojb", 11, 120, 0);
        }
        if(frame==13)
        {
            toss("glueprojb", 11, 120, 0);
        }
        if(frame==14)
        {
            toss("glueprojb", 11, 120, 0);
        }
        if(frame==15)
        {
            toss("glueprojb", 11, 120, 0);
        }
        if(frame==26)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/aitemFX/aitemFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==618)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==619)
    {
        if(frame==0)
        {
            floater(120);
        }
        if(frame==0)
        {
            randSound0("sounds/bblock1.wav", "sounds/bblock2.wav");
        }
        if(frame==14)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==620)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==621)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==622)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==623)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==624)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==625)
    {
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==626)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==627)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==628)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==629)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/sboom/sboom.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==631)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==1)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==18)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==632)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==633)
    {
        if(frame==1)
        {
            checkStageType("air", "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            checkStageType("underwater", "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==5)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==10)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 10, 20, 0);
        }
        if(frame==18)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/delay.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==634)
    {
        if(frame==1)
        {
            spawnPosAni("textControl", 240, 0, 50, "ANI_FOLLOW1", 1);
        }
        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==635)
    {
        if(frame==1)
        {
            spawnPosAni("textControlNS", 240, 0, 50, "ANI_FOLLOW2", 1);
        }
        if(frame==2)
        {
            spawn01("Morpher", 0, 0, 0);
        }
        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==636)
    {


	void self = getlocalvar("self");

	int  Health = getentityproperty(self, "health");

	if(frame==1){

	changeentityproperty(self, "health", Health-5);

	if (Health <= 0){

	killentity(self);

	}

	}

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/empty.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==638)
    {
        if(frame==1)
        {
            spawnPosAni("textControlNS", 240, 0, 50, "ANI_FOLLOW1", 1);
        }
        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==639)
    {
        if(frame==1)
        {
            randSound("sounds/voices/giant_battle1.wav", "sounds/voices/giant_battle2.wav", "sounds/voices/giant_battle3.wav");
        }
        if(frame==1)
        {
            suicide();
        }
        return;
    }
    if(animhandle==640)
    {
        if(frame==1)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/morpher/morpher.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==644)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==645)
    {


	int P1 = getplayerproperty(0, "entity");

	int P2 = getplayerproperty(1, "entity");

	int P3 = getplayerproperty(2, "entity");

	int P4 = getplayerproperty(3, "entity");

	void morphAnim = openborconstant("ANI_FOLLOW58");



	if(P1){

	changeopenborvariant("nojoin", 1);

	void pAnim = getentityproperty(P1, "animationID");

	int x = getentityproperty(P1, "x");

	int y = getentityproperty(P1, "y");

	int z = getentityproperty(P1, "z");

	changeentityproperty(P1, "position", NULL(),NULL(), y-1);

	changeentityproperty(P1, "direction", 1); //Face right

	changeentityproperty(P1,"noaicontrol",1);

	//changeentityproperty(P1,"velocity", 0,0,0);

	if (pAnim != morphAnim){ 

		performattack(P1, openborconstant("ANI_FOLLOW58"));

		}

	// NPC CODE	

	int  iEntity; 

    void vEntity;

    void self        = getlocalvar("self");

    int  iMax        = openborvariant("count_entities");   

	

    for(iEntity=0; iEntity<iMax; iEntity++)

        {

    	vEntity = getentity(iEntity);

    	if(getentityproperty(vEntity, "type")==openborconstant("TYPE_NPC"))

		{

			void nAnim = getentityproperty(vEntity, "animationID");

			float nx = getentityproperty(vEntity, "x");

			float na = getentityproperty(vEntity, "a");

			float nz = getentityproperty(vEntity, "z");

			if (nAnim != morphAnim){ 

				performattack(vEntity, openborconstant("ANI_FOLLOW58"));

				}

			}

		}

	// END NPC CODE

	}

	if(P2){

	changeopenborvariant("nojoin", 1);

	void pAnim2 = getentityproperty(P2, "animationID");

	int x = getentityproperty(P2, "x");

	int y = getentityproperty(P2, "y");

	int z = getentityproperty(P2, "z");

	changeentityproperty(P2, "position", NULL(),NULL(), y-1);

	changeentityproperty(P2, "direction", 1); //Face right

	changeentityproperty(P2,"noaicontrol",1);

	//changeentityproperty(P2,"velocity", 0,0,0);

	if (pAnim2 != morphAnim){ performattack(P2, openborconstant("ANI_FOLLOW58"));}

	}

	if(P3){

	changeopenborvariant("nojoin", 1);

	void pAnim3 = getentityproperty(P3, "animationID");

	int x = getentityproperty(P3, "x");

	int y = getentityproperty(P3, "y");

	int z = getentityproperty(P3, "z");

	changeentityproperty(P3, "position", NULL(),NULL(), y-1);

	changeentityproperty(P3, "direction", 1); //Face right

	changeentityproperty(P3,"noaicontrol",1);

	//changeentityproperty(P3,"velocity", 0,0,0);

	if (pAnim3 != morphAnim){ performattack(P3, openborconstant("ANI_FOLLOW58"));}

	}

	if(P4){

	changeopenborvariant("nojoin", 1);

	void pAnim4 = getentityproperty(P4, "animationID");

	int x = getentityproperty(P4, "x");

	int y = getentityproperty(P4, "y");

	int z = getentityproperty(P4, "z");

	changeentityproperty(P4, "position", NULL(),NULL(), y-1);

	changeentityproperty(P4, "direction", 1); //Face right

	changeentityproperty(P4,"noaicontrol",1);

	//changeentityproperty(P1,"velocity", 0,0,0);

	if (pAnim4 != morphAnim){ performattack(P4, openborconstant("ANI_FOLLOW58"));}

	}

	        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/morpher/morpher_return.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==647)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==648)
    {


	int P1 = getplayerproperty(0, "entity");

	int P2 = getplayerproperty(1, "entity");

	int P3 = getplayerproperty(2, "entity");

	int P4 = getplayerproperty(3, "entity");

	void morphAnim = openborconstant("ANI_FOLLOW57");



	if(P1){

	changeopenborvariant("nojoin", 1);

	void pAnim = getentityproperty(P1, "animationID");

	int x = getentityproperty(P1, "x");

	int y = getentityproperty(P1, "y");

	int z = getentityproperty(P1, "z");

	changeentityproperty(P1, "position", NULL(),NULL(), y-1);

	changeentityproperty(P1, "direction", 1); //Face right

	changeentityproperty(P1,"noaicontrol",1);

	//changeentityproperty(P1,"velocity", 0,0,0);

	if (pAnim != morphAnim){ performattack(P1, openborconstant("ANI_FOLLOW57"));}

		if (pAnim != morphAnim){ 

		performattack(P1, openborconstant("ANI_FOLLOW58"));

		}

	// NPC CODE	

	int  iEntity; 

    void vEntity;

    void self        = getlocalvar("self");

    int  iMax        = openborvariant("count_entities");   

	

    for(iEntity=0; iEntity<iMax; iEntity++)

        {

    	vEntity = getentity(iEntity);

    	if(getentityproperty(vEntity, "type")==openborconstant("TYPE_NPC"))

		{

			void nAnim = getentityproperty(vEntity, "animationID");

			float nx = getentityproperty(vEntity, "x");

			float na = getentityproperty(vEntity, "a");

			float nz = getentityproperty(vEntity, "z");

			if (nAnim != morphAnim){ 

				performattack(vEntity, openborconstant("ANI_FOLLOW57"));

				}

			}

		}

	// END NPC CODE

	}

	if(P2){

	changeopenborvariant("nojoin", 1);

	void pAnim2 = getentityproperty(P2, "animationID");

	int x = getentityproperty(P2, "x");

	int y = getentityproperty(P2, "y");

	int z = getentityproperty(P2, "z");

	changeentityproperty(P2, "position", NULL(),NULL(), y-1);

	changeentityproperty(P2, "direction", 1); //Face right

	changeentityproperty(P2,"noaicontrol",1);

	//changeentityproperty(P2,"velocity", 0,0,0);

	if (pAnim2 != morphAnim){ performattack(P2, openborconstant("ANI_FOLLOW57"));}

	}

	if(P3){

	changeopenborvariant("nojoin", 1);

	void pAnim3 = getentityproperty(P3, "animationID");

	int x = getentityproperty(P3, "x");

	int y = getentityproperty(P3, "y");

	int z = getentityproperty(P3, "z");

	changeentityproperty(P3, "position", NULL(),NULL(), y-1);

	changeentityproperty(P3, "direction", 1); //Face right

	changeentityproperty(P3,"noaicontrol",1);

	//changeentityproperty(P3,"velocity", 0,0,0);

	if (pAnim3 != morphAnim){ performattack(P3, openborconstant("ANI_FOLLOW57"));}

	}

	if(P4){

	changeopenborvariant("nojoin", 1);

	void pAnim4 = getentityproperty(P4, "animationID");

	int x = getentityproperty(P4, "x");

	int y = getentityproperty(P4, "y");

	int z = getentityproperty(P4, "z");

	changeentityproperty(P4, "position", NULL(),NULL(), y-1);

	changeentityproperty(P4, "direction", 1); //Face right

	changeentityproperty(P4,"noaicontrol",1);

	//changeentityproperty(P1,"velocity", 0,0,0);

	if (pAnim4 != morphAnim){ performattack(P4, openborconstant("ANI_FOLLOW57"));}

	}

	        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/focus/focus.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==649)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==650)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==651)
    {


	void self = getlocalvar("self");

	int  Health = getentityproperty(self, "health");

	if(frame==1){

	changeentityproperty(self, "health", Health-1);

	if (Health <= 0){

        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));

	}

	}

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/text/textControl.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==652)
    {
        if(frame==26)
        {
            killentity(getlocalvar("self"));
        }
        if(frame==27)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==653)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==654)
    {
        if(frame==29)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==655)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==656)
    {
        if(frame==0)
        {
            bmtPosition(240, 0, 120);
        }
        if(frame==1)
        {
            playmusic("data/music/gogo.ogg", 0);
        }
        if(frame==15)
        {
            finishlevel();
        }
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==657)
    {
        if(frame==0)
        {
            bmtPosition(240, 0, 400);
        }
        if(frame==1)
        {
            playmusic("data/music/gogo.ogg", 0);
        }
        if(frame==15)
        {
            finishlevel();
        }
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==658)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==659)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==660)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==661)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==662)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==663)
    {
        if(frame==27)
        {
            killentity(getlocalvar("self"));
        }
        if(frame==28)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==664)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==665)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==666)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==667)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==668)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==669)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==670)
    {
        if(frame==31)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==671)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==672)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==674)
    {
        if(frame==0)
        {
            bmtPosition(240, 0, 400);
        }
        if(frame==1)
        {
            playmusic("data/music/gogo.ogg", 0);
        }
        if(frame==15)
        {
            finishlevel();
        }
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/text/bonus_enemy.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==675)
    {
        if(frame==29)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/text/textControlns.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==676)
    {
        if(frame==26)
        {
            killentity(getlocalvar("self"));
        }
        if(frame==27)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==677)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==678)
    {
        if(frame==29)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==679)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==680)
    {
        if(frame==0)
        {
            slow(0);
        }
        if(frame==0)
        {
            bmtPosition(240, 0, 120);
        }
        if(frame==1)
        {
            playmusic("data/music/gogo.ogg", 0);
        }
        if(frame==15)
        {
            finishlevel();
        }
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==681)
    {
        if(frame==25)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==682)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==683)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==684)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==685)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==686)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==687)
    {
        if(frame==27)
        {
            killentity(getlocalvar("self"));
        }
        if(frame==28)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==688)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==689)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==690)
    {
        if(frame==26)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==691)
    {
        if(frame==26)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==692)
    {
        if(frame==26)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==693)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==694)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==695)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==696)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fxpanel/fxpanel2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==698)
    {
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==699)
    {
        if(frame==0)
        {
            gravity(0);
        }
        return;
    }
    if(animhandle==700)
    {
        if(frame==0)
        {
            gravity(0);
        }
        if(frame==1)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==3)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==4)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==5)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==6)
        {
            gravity(1);
        }
        if(frame==18)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==701)
    {
        if(frame==0)
        {
            spawnAni("sam", 0, 50, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==1)
        {
            spawn01("afxpanel", 0, 50, 1);
        }
        return;
    }
    if(animhandle==702)
    {


    if(frame==1){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > -30){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW4"));

      }

    }

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fxpanel/fxpanel.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==703)
    {
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==704)
    {
        if(frame==0)
        {
            gravity(0);
        }
        return;
    }
    if(animhandle==705)
    {
        if(frame==0)
        {
            gravity(0);
        }
        if(frame==1)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==3)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==4)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==5)
        {
            spawnRandom("sboom", 75, 40);
        }
        if(frame==6)
        {
            gravity(1);
        }
        if(frame==18)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==706)
    {
        if(frame==0)
        {
            spawnAni("sam", 0, 50, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==0)
        {
            spawnAni("afxpanel2", 0, 0, 0, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==707)
    {
        if(frame==0)
        {
            layer(1000);
        }
        return;
    }
    if(animhandle==708)
    {
        if(frame==0)
        {
            layer(1);
        }
        return;
    }
    if(animhandle==709)
    {


    if(frame==1){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW4"));

      }

    }

	        if(frame==1)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bgfx/cover.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==710)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==7)
        {
            changeentityproperty(getlocalvar("self"), "velocity", 0, -2.5, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bgfx/logospark.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==711)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bgfx/bgfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==712)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==1)
        {
            changeentityproperty(getlocalvar("self"), "setlayer", -2000);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/zoomout.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==713)
    {
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", -80);
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 990);
        }
        if(frame==1)
        {
            setglobalvar("zoomvalue", 980);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 970);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 960);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 950);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 940);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 930);
        }
        if(frame==7)
        {
            setglobalvar("zoomvalue", 920);
        }
        if(frame==8)
        {
            setglobalvar("zoomvalue", 910);
        }
        if(frame==9)
        {
            setglobalvar("zoomvalue", 900);
        }
        if(frame==10)
        {
            setglobalvar("zoomvalue", 890);
        }
        if(frame==11)
        {
            setglobalvar("zoomvalue", 880);
        }
        if(frame==12)
        {
            setglobalvar("zoomvalue", 870);
        }
        if(frame==13)
        {
            setglobalvar("zoomvalue", 860);
        }
        if(frame==14)
        {
            setglobalvar("zoomvalue", 850);
        }
        if(frame==15)
        {
            setglobalvar("zoomvalue", 840);
        }
        if(frame==16)
        {
            setglobalvar("zoomvalue", 830);
        }
        if(frame==17)
        {
            setglobalvar("zoomvalue", 820);
        }
        if(frame==18)
        {
            setglobalvar("zoomvalue", 810);
        }
        if(frame==19)
        {
            setglobalvar("zoomvalue", 800);
        }
        if(frame==20)
        {
            setglobalvar("zoomvalue", 790);
        }
        if(frame==21)
        {
            setglobalvar("zoomvalue", 780);
        }
        if(frame==22)
        {
            setglobalvar("zoomvalue", 770);
        }
        if(frame==23)
        {
            setglobalvar("zoomvalue", 760);
        }
        if(frame==24)
        {
            setglobalvar("zoomvalue", 750);
        }
        if(frame==25)
        {
            setglobalvar("zoomvalue", 740);
        }
        if(frame==26)
        {
            setglobalvar("zoomvalue", 730);
        }
        if(frame==27)
        {
            setglobalvar("zoomvalue", 720);
        }
        if(frame==28)
        {
            setglobalvar("zoomvalue", 710);
        }
        if(frame==29)
        {
            setglobalvar("zoomvalue", 700);
        }
        if(frame==30)
        {
            setglobalvar("zoomvalue", 690);
        }
        if(frame==31)
        {
            setglobalvar("zoomvalue", 680);
        }
        if(frame==32)
        {
            setglobalvar("zoomvalue", 670);
        }
        if(frame==33)
        {
            setglobalvar("zoomvalue", 660);
        }
        if(frame==34)
        {
            setglobalvar("zoomvalue", 650);
        }
        if(frame==35)
        {
            setglobalvar("zoomvalue", 640);
        }
        if(frame==36)
        {
            setglobalvar("zoomvalue", 630);
        }
        if(frame==37)
        {
            setglobalvar("zoomvalue", 620);
        }
        if(frame==38)
        {
            setglobalvar("zoomvalue", 610);
        }
        if(frame==39)
        {
            setglobalvar("zoomvalue", 600);
        }
        if(frame==40)
        {
            setglobalvar("zoomvalue", 590);
        }
        if(frame==41)
        {
            setglobalvar("zoomvalue", 580);
        }
        if(frame==42)
        {
            setglobalvar("zoomvalue", 570);
        }
        if(frame==43)
        {
            setglobalvar("zoomvalue", 560);
        }
        if(frame==44)
        {
            setglobalvar("zoomvalue", 550);
        }
        if(frame==45)
        {
            setglobalvar("zoomvalue", 540);
        }
        if(frame==46)
        {
            setglobalvar("zoomvalue", 530);
        }
        if(frame==47)
        {
            setglobalvar("zoomvalue", 520);
        }
        if(frame==48)
        {
            setglobalvar("zoomvalue", 510);
        }
        if(frame==49)
        {
            setglobalvar("zoomvalue", 500);
        }
        if(frame==50)
        {
            setglobalvar("zoomvalue", 490);
        }
        if(frame==51)
        {
            setglobalvar("zoomvalue", 480);
        }
        if(frame==52)
        {
            setglobalvar("zoomvalue", 470);
        }
        if(frame==53)
        {
            setglobalvar("zoomvalue", 460);
        }
        if(frame==54)
        {
            setglobalvar("zoomvalue", 450);
        }
        if(frame==55)
        {
            setglobalvar("zoomvalue", 440);
        }
        if(frame==56)
        {
            setglobalvar("zoomvalue", 430);
        }
        if(frame==57)
        {
            setglobalvar("zoomvalue", 420);
        }
        if(frame==58)
        {
            setglobalvar("zoomvalue", 410);
        }
        if(frame==59)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==60)
        {
            setglobalvar("zoomvalue", 390);
        }
        if(frame==61)
        {
            setglobalvar("zoomvalue", 380);
        }
        if(frame==62)
        {
            setglobalvar("zoomvalue", 370);
        }
        if(frame==63)
        {
            setglobalvar("zoomvalue", 360);
        }
        if(frame==64)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==65)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==66)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==67)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==68)
        {
            setglobalvar("zoomvalue", 310);
        }
        if(frame==69)
        {
            setglobalvar("zoomvalue", 310);
        }
        if(frame==70)
        {
            setglobalvar("zoomvalue", 300);
        }
        if(frame==71)
        {
            setglobalvar("zoomvalue", 290);
        }
        if(frame==72)
        {
            setglobalvar("zoomvalue", 280);
        }
        if(frame==73)
        {
            setglobalvar("zoomvalue", 270);
        }
        if(frame==74)
        {
            setglobalvar("zoomvalue", 260);
        }
        if(frame==75)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==76)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==714)
    {
        if(frame==1)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==1)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==1)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            setglobalvar("zoomvalue", 700);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 690);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 680);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 670);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 660);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 650);
        }
        if(frame==7)
        {
            setglobalvar("zoomvalue", 640);
        }
        if(frame==8)
        {
            setglobalvar("zoomvalue", 630);
        }
        if(frame==9)
        {
            setglobalvar("zoomvalue", 620);
        }
        if(frame==10)
        {
            setglobalvar("zoomvalue", 610);
        }
        if(frame==11)
        {
            setglobalvar("zoomvalue", 600);
        }
        if(frame==12)
        {
            setglobalvar("zoomvalue", 590);
        }
        if(frame==13)
        {
            setglobalvar("zoomvalue", 580);
        }
        if(frame==14)
        {
            setglobalvar("zoomvalue", 570);
        }
        if(frame==15)
        {
            setglobalvar("zoomvalue", 560);
        }
        if(frame==16)
        {
            setglobalvar("zoomvalue", 550);
        }
        if(frame==17)
        {
            setglobalvar("zoomvalue", 540);
        }
        if(frame==18)
        {
            setglobalvar("zoomvalue", 530);
        }
        if(frame==19)
        {
            setglobalvar("zoomvalue", 520);
        }
        if(frame==20)
        {
            setglobalvar("zoomvalue", 510);
        }
        if(frame==21)
        {
            setglobalvar("zoomvalue", 500);
        }
        if(frame==22)
        {
            setglobalvar("zoomvalue", 490);
        }
        if(frame==23)
        {
            setglobalvar("zoomvalue", 480);
        }
        if(frame==24)
        {
            setglobalvar("zoomvalue", 470);
        }
        if(frame==25)
        {
            setglobalvar("zoomvalue", 460);
        }
        if(frame==26)
        {
            setglobalvar("zoomvalue", 450);
        }
        if(frame==27)
        {
            setglobalvar("zoomvalue", 440);
        }
        if(frame==28)
        {
            setglobalvar("zoomvalue", 430);
        }
        if(frame==29)
        {
            setglobalvar("zoomvalue", 420);
        }
        if(frame==30)
        {
            setglobalvar("zoomvalue", 410);
        }
        if(frame==31)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==32)
        {
            setglobalvar("zoomvalue", 390);
        }
        if(frame==33)
        {
            setglobalvar("zoomvalue", 380);
        }
        if(frame==34)
        {
            setglobalvar("zoomvalue", 370);
        }
        if(frame==35)
        {
            setglobalvar("zoomvalue", 360);
        }
        if(frame==36)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==37)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==38)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==39)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==40)
        {
            setglobalvar("zoomvalue", 310);
        }
        if(frame==41)
        {
            setglobalvar("zoomvalue", 310);
        }
        if(frame==42)
        {
            setglobalvar("zoomvalue", 300);
        }
        if(frame==43)
        {
            setglobalvar("zoomvalue", 290);
        }
        if(frame==44)
        {
            setglobalvar("zoomvalue", 280);
        }
        if(frame==45)
        {
            setglobalvar("zoomvalue", 270);
        }
        if(frame==46)
        {
            setglobalvar("zoomvalue", 260);
        }
        if(frame==47)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==48)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/zoomin.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==715)
    {
        if(frame==1)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==1)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==1)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            setglobalvar("zoomvalue", 260);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 270);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 280);
        }
        if(frame==4)
        {
            setglobalvar("zoomvalue", 290);
        }
        if(frame==5)
        {
            setglobalvar("zoomvalue", 300);
        }
        if(frame==6)
        {
            setglobalvar("zoomvalue", 310);
        }
        if(frame==7)
        {
            setglobalvar("zoomvalue", 320);
        }
        if(frame==8)
        {
            setglobalvar("zoomvalue", 330);
        }
        if(frame==9)
        {
            setglobalvar("zoomvalue", 340);
        }
        if(frame==10)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==11)
        {
            setglobalvar("zoomvalue", 360);
        }
        if(frame==12)
        {
            setglobalvar("zoomvalue", 370);
        }
        if(frame==13)
        {
            setglobalvar("zoomvalue", 380);
        }
        if(frame==14)
        {
            setglobalvar("zoomvalue", 390);
        }
        if(frame==15)
        {
            setglobalvar("zoomvalue", 400);
        }
        if(frame==16)
        {
            setglobalvar("zoomvalue", 260);
        }
        if(frame==17)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/MMPRFX/MMPRFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==716)
    {
        if(frame==1)
        {
            terminateCopies();
        }
        if(frame==2)
        {
            terminateCopies();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/boombarrel/boombarrel.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==719)
    {
        if(frame==2)
        {
            spawnAni("po", 0, 40, 1, "ANI_IDLE", 0, -1, 0);
        }
        if(frame==2)
        {
            looper(1, 28);
        }
        if(frame==4)
        {
            spawnAni("po", 0, 40, 1, "ANI_IDLE", 0, -1, 0);
        }
        if(frame==6)
        {
            spawnAni("po", 0, 40, 1, "ANI_IDLE", 0, -1, 0);
        }
        if(frame==8)
        {
            spawnAni("po", 0, 40, 1, "ANI_IDLE", 0, -1, 0);
        }
        if(frame==11)
        {
            spawn01("gboom", 0, 0, 1);
        }
        if(frame==11)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==13)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/box.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==722)
    {
        if(frame==0)
        {
            healthCheck("ANI_FOLLOW2");
        }
        if(frame==1)
        {
            healthCheck("ANI_FOLLOW2");
        }
        if(frame==2)
        {
            healthCheck("ANI_FOLLOW2");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/enemies/dummy/dummy.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==725)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

	        if(frame==0)
        {
            gravity(1);
        }
        if(frame==4)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==727)
    {
        if(frame==3)
        {
            randSound7("putty1.wav", "putty2.wav", "putty3.wav", "putty4.wav", "putty5.wav", "putty6.wav", "putty7.wav");
        }
        if(frame==6)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==728)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==9)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==12)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==729)
    {


	if(frame<5) {

	void self = getlocalvar("self");

	changeentityproperty(self, "position", NULL(), NULL(), 1);

	changeentityproperty(self, "velocity", 0,0,0);

	}

	        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "aiflag", "drop", 0);
        }
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "aiflag", "falling", 0);
        }
        if(frame==0)
        {
            move(0, 0, 15);
        }
        if(frame==1)
        {
            spawn01("magicpillar", 0, 0, -1);
        }
        if(frame==1)
        {
            degravity(1);
        }
        if(frame==5)
        {
            velo001(0, 0, 1);
        }
        if(frame==9)
        {
            spawn01("magichit", 0, 30, 1);
        }
        if(frame==9)
        {
            degravity(0);
        }
        if(frame==10)
        {
            anichange("ANI_FALL11");
        }
        return;
    }
    if(animhandle==730)
    {


       void self = getlocalvar("self");

       changeentityproperty(self, "velocity", 0, 0, 0);

	        if(frame==1)
        {
            degravity(0);
        }
        return;
    }
    if(animhandle==731)
    {


   void e;

    if(frame==0)

    {

    void self = getlocalvar("self");

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    changeentityproperty(e, "parent", self);

    bindentity(e, self,0,1,0,1,1);

    }

    if(frame==1){

    killentity(e);

    }

	        if(frame==0)
        {
            gravity(1);
        }
        if(frame==4)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==733)
    {
        if(frame==3)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==6)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==739)
    {


	if(frame==0) {

    		void self = getlocalvar("self");

    		void e;



    		clearspawnentry();

    		setspawnentry("name", "net");

    		e = spawn();

    		changeentityproperty(e,"parent",self); // <--- ADDED

    		bindentity(e, self,0,1,30,-1,2); // <--- CHANGED

    	}

	        return;
    }
    if(animhandle==742)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "shock");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        if(frame==1)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==8)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==743)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);



	if(frame==0){

	setentityvar(self, 1, openborvariant("elapsed_time"));

	}

	if(Summon <= openborvariant("elapsed_time") - 500){

	setentityvar(self, 1, NULL());

	performattack(self,openborconstant("ANI_PAIN"));

	}

	        if(frame==1)
        {
            spawnbind2("sflash2", -5, 35, 1, -1, 2);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/blower.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==747)
    {


    void vSelf    = getlocalvar("self");             //Caller.

    void vEntity;                                     //Target entity placeholder.

    int iEntity;                                     //Entity enumeration holder.

    int iType;                                       //Entity type.

    int iMax      = openborvariant("ent_max");       //Entity count.

    int x = getentityproperty(vSelf, "x");

    int Dir = getentityproperty(vSelf, "direction");

    int Ex;



    //Enumerate and loop through entity collection.

    for(iEntity=0; iEntity<iMax; iEntity++){    

      vEntity = getentity(iEntity);                 //Get target entity from current loop.

      iType   = getentityproperty(vEntity, "type"); //Get target type.



      //Enemy, NPC & player type?

      if(iType == openborconstant("TYPE_PLAYER") || iType == openborconstant("TYPE_NPC")){

        Ex = getentityproperty(vEntity, "x");



        if(Dir==1 && Ex >= x + 1 && Ex <= x + 250 && Ex <470){

          changeentityproperty(vEntity, "position", Ex+1);

          

        } else if(Dir==0 && Ex <= x - 1 && Ex >= x - 250 && Ex >10){

          changeentityproperty(vEntity, "position", Ex-1);



        }

      }

    }

	        if(frame==0)
        {
            changeEntAnim("flagb", "ANI_FOLLOW1");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/effects/anginer.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==748)
    {
        if(frame==1)
        {
            shooter4("Angin", -150, 0, 20, 2, 0, 0, 320);
        }
        if(frame==2)
        {
            shooter4("Angin", -150, 160, 20, 2, 0, 0, 320);
        }
        if(frame==3)
        {
            shooter4("Angin", -150, 40, 20, 2, 0, 0, 320);
        }
        if(frame==4)
        {
            shooter4("Angin", -150, 200, 20, 2, 0, 0, 320);
        }
        if(frame==5)
        {
            shooter4("Angin", -150, 80, 20, 2, 0, 0, 320);
        }
        if(frame==6)
        {
            shooter4("Angin", -150, 120, 20, 2, 0, 0, 320);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/cone/cone.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==749)
    {
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/cone/cone_bike.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==751)
    {
        if(frame==2)
        {
            changeentityproperty(getlocalvar("self"), "velocity", -10, 0, 0);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fakeen.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==753)
    {
        if(frame==1)
        {
            spawn03("Blower", 0, 0, 0, 1);
        }
        if(frame==1)
        {
            spawn03("Blower", 0, 0, 0, -1);
        }
        if(frame==1)
        {
            spawn03("Anginer", 0, 0, 0, 1);
        }
        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==754)
    {


	void e;

	clearspawnentry();

	playmusic("data/music/boss.ogg",1);



	if(frame==1)

	{

	int r = rand()%12;

	if (r <0){			// If the r is negative,

	r = r*-1;			// Make it positive

	}



	if(r == 0){

    	setspawnentry("name", "Anaconda");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 1){

    	setspawnentry("name", "Ares");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 2){

    	setspawnentry("name", "Attuma");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 3){

    	setspawnentry("name", "Black_Mamba");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 4){

    	setspawnentry("name", "Bowman");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 5){

    	setspawnentry("name", "golem");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 6){

    	setspawnentry("name", "Whirlwind");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 7){

    	setspawnentry("name", "Hammerhead");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 8){

    	setspawnentry("name", "Madam_Masque");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 9){

    	setspawnentry("name", "Militant");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 10){

    	setspawnentry("name", "Trapster");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	else if(r == 11){

    	setspawnentry("name", "Viper");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+510,180, 300);

	changeentityproperty(e, "direction", 0);

	}

	else

	{

    	setspawnentry("name", "Hammer");

    	e = spawn();

	float x = getentityproperty(e, "x");

    	changeentityproperty(e, "boss",1);

	changeentityproperty(e, "position", x+240,180, 0);

	changeentityproperty(e, "direction", 0);

	}

	}

	        if(frame==2)
        {
            suicide();
        }
        return;
    }
    if(animhandle==755)
    {


	void self = getlocalvar("self");

	int  Health = getentityproperty(self, "health");

		if(frame==1){

		changeentityproperty(self, "health", Health-5);

		if (Health <= 0){

		killentity(self);

		}

	}

	        if(frame==1)
        {
            spawn03("Blower", 0, 0, 0, 1);
        }
        if(frame==1)
        {
            spawn03("Blower", 0, 0, 0, -1);
        }
        if(frame==1)
        {
            spawn03("Anginer", 0, 0, 0, 1);
        }
        return;
    }
    if(animhandle==758)
    {
        if(frame==0)
        {
            spawn01("exclamation", 0, 10, 0);
        }
        if(frame==1)
        {
            shooter("cone_bike", 0, 0, 0, -8, 0, 0);
        }
        if(frame==2)
        {
            shooter("cone_bike", 0, 0, 10, -8, 0, 0);
        }
        if(frame==3)
        {
            shooter("cone_bike", 0, 0, 20, -8, 0, 0);
        }
        if(frame==4)
        {
            shooter("cone_bike", 0, 0, 30, -8, 0, 0);
        }
        if(frame==5)
        {
            shooter("cone_bike", 0, 0, 40, -8, 0, 0);
        }
        if(frame==6)
        {
            shooter("cone_bike", 0, 0, 50, -8, 0, 0);
        }
        if(frame==7)
        {
            suicide();
        }
        return;
    }
    if(animhandle==759)
    {
        if(frame==0)
        {
            spawn01("exclamation", 0, 10, 0);
        }
        if(frame==1)
        {
            shooter("cone_bike", 0, 0, 0, -8, 0, 0);
        }
        if(frame==2)
        {
            shooter("cone_bike", 0, 0, -10, -8, 0, 0);
        }
        if(frame==3)
        {
            shooter("cone_bike", 0, 0, -20, -8, 0, 0);
        }
        if(frame==4)
        {
            shooter("cone_bike", 0, 0, -30, -8, 0, 0);
        }
        if(frame==5)
        {
            shooter("cone_bike", 0, 0, -40, -8, 0, 0);
        }
        if(frame==6)
        {
            shooter("cone_bike", 0, 0, -50, -8, 0, 0);
        }
        if(frame==7)
        {
            suicide();
        }
        return;
    }
    if(animhandle==760)
    {
        if(frame==0)
        {
            shooter("drum_bike", 0, 0, 0, -8, 0, 0);
        }
        if(frame==0)
        {
            shooter("drum_bike", 0, 0, 10, -8, 0, 0);
        }
        if(frame==0)
        {
            shooter("drum_bike", 0, 0, 20, -8, 0, 0);
        }
        if(frame==0)
        {
            shooter("drum_bike", 0, 0, 30, -8, 0, 0);
        }
        if(frame==0)
        {
            shooter("drum_bike", 0, 0, 40, -8, 0, 0);
        }
        if(frame==0)
        {
            shooter("drum_bike", 0, 0, 50, -8, 0, 0);
        }
        if(frame==1)
        {
            suicide();
        }
        return;
    }
    if(animhandle==761)
    {
        if(frame==0)
        {
            setbgspeed(0);
        }
        return;
    }
    if(animhandle==762)
    {


	if (frame==0){

	// NPC CODE	

	int  iEntity; 

    void vEntity;

    void self        = getlocalvar("self");

    int  iMax        = openborvariant("count_entities");   

    void morphAnim = openborconstant("ANI_FOLLOW58");

	

    for(iEntity=0; iEntity<iMax; iEntity++)

        {

    	vEntity = getentity(iEntity);

    	if(getentityproperty(vEntity, "type")==openborconstant("TYPE_NPC"))

		{

			void nAnim = getentityproperty(vEntity, "animationID");

			float nx = getentityproperty(vEntity, "x");

			float na = getentityproperty(vEntity, "a");

			float nz = getentityproperty(vEntity, "z");

			if (nAnim != morphAnim){ 

			changeentityproperty(vEntity,"subject_to_platform",0);

			changeentityproperty(vEntity,"velocity", 0,2,3);

			performattack(vEntity, openborconstant("ANI_FOLLOW82"));

				}

			}

		}

	// END NPC CODE

	}

	        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}
