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

}

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

}

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

}

#### animationscript function main #####
# data/chars/misc/flash4.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==3)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        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==4)
    {
        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==5)
    {
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

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

}

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

}

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

}

#### animationscript function main #####
# data/chars/misc/freezefx2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==9)
    {
        if(frame==0)
        {
            changepal(1);
        }
        if(frame==0)
        {
            moveRandom(20, 20, 1);
        }
        return;
    }
    if(animhandle==10)
    {
        if(frame==11)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

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

}

#### animationscript function main #####
# data/chars/misc/burn/burnP.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==12)
    {
        if(frame==1)
        {
            spawn01("faisca", -30, 20, 1);
        }
        if(frame==3)
        {
            spawn01("faisca", -10, 25, 1);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==13)
    {
        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;
    }

}

#### animationscript function main #####
# data/chars/misc/burn/burnM.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==14)
    {
        if(frame==1)
        {
            spawn01("faisca", -30, 20, 1);
        }
        if(frame==3)
        {
            spawn01("faisca", -10, 25, 1);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==15)
    {
        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;
    }

}

#### animationscript function main #####
# data/chars/misc/nburn/nburn.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==16)
    {
        if(frame==1)
        {
            spawn01("faisca", 0, 0, 1);
        }
        if(frame==3)
        {
            spawn01("faisca", 0, 5, 1);
        }
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==17)
    {
        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)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/super/super.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==18)
    {
        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==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/ko/kofx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==24)
    {
        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==24)
        {
            setglobalvar("zoomvalue", 670);
        }
        if(frame==26)
        {
            setglobalvar("zoomvalue", 700);
        }
        if(frame==28)
        {
            setglobalvar("zoomvalue", 730);
        }
        if(frame==30)
        {
            setglobalvar("zoomvalue", 760);
        }
        if(frame==33)
        {
            setglobalvar("zoomvalue", 790);
        }
        if(frame==36)
        {
            setglobalvar("zoomvalue", 820);
        }
        if(frame==39)
        {
            setglobalvar("zoomvalue", 850);
        }
        if(frame==55)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==55)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/money.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==30)
    {
        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==31)
    {


	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==32)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        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==33)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==12)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==12)
        {
            suicide();
        }
        return;
    }
    if(animhandle==35)
    {
        if(frame==0)
        {
            lifeCheck(200, "ANI_FALL");
        }
        if(frame==1)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==2)
        {
            anichange("ANI_IDLE");
        }
        return;
    }
    if(animhandle==36)
    {
        if(frame==1)
        {
            anichange("ANI_follow9");
        }
        return;
    }
    if(animhandle==37)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==12)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==12)
        {
            suicide();
        }
        return;
    }
    if(animhandle==38)
    {


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==4)
        {
            anichange("ANI_follow6");
        }
        return;
    }
    if(animhandle==39)
    {


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==40)
    {
        if(frame==0)
        {
            lifeCheck(0, "ANI_FALL");
        }
        if(frame==1)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==2)
        {
            anichange("ANI_follow6");
        }
        return;
    }
    if(animhandle==41)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==10)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==11)
        {
            suicide();
        }
        return;
    }
    if(animhandle==42)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==12)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==12)
        {
            suicide();
        }
        return;
    }
    if(animhandle==43)
    {


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==44)
    {


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==45)
    {
        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==47)
    {
        if(frame==0)
        {
            noscroll();
        }
        if(frame==0)
        {
            randomteleonscreen();
        }
        if(frame==0)
        {
            antiwallRandom(1);
        }
        if(frame==1)
        {
            anichange("ANI_IDLE");
        }
        return;
    }
    if(animhandle==49)
    {
        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==51)
    {
        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==55)
    {
        if(frame==0)
        {
            velo001(-3, 0, 0);
        }
        return;
    }
    if(animhandle==56)
    {
        if(frame==0)
        {
            antiwallCollide(30, "ANI_FOLLOW10");
        }
        return;
    }
    if(animhandle==57)
    {
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==59)
    {
        if(frame==12)
        {
            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==65)
    {


	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==66)
    {


	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==67)
    {
        if(frame==1)
        {
            anichange("ANI_FOLLOW4");
        }
        return;
    }
    if(animhandle==69)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==71)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==72)
    {
        if(frame==0)
        {
            randomteleonscreen();
        }
        if(frame==0)
        {
            antiwallRandom(1);
        }
        if(frame==1)
        {
            anichange("ANI_FOLLOW6");
        }
        return;
    }

}

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


	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==77)
    {
        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==78)
    {
        if(frame==0)
        {
            velo001(5, NULL(), NULL());
        }
        return;
    }
    if(animhandle==79)
    {
        if(frame==0)
        {
            velo001(-5, NULL(), NULL());
        }
        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        spawn01("debris1",0,0,0);

      }

    }

	        if(frame==0)
        {
            stop();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==83)
    {


    if(frame==5){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        spawn01("debris1",0,0,0);

      }

    }

	        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==8)
        {
            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==86)
    {
        if(frame==28)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/bwidow/bwmine/bwmine.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==87)
    {
        if(frame==0)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==88)
    {


	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_FOLLOW1"));

	}

	        return;
    }

}

#### animationscript function main #####
# data/chars/enemies/sniper/sniperbw.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==89)
    {
        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==0)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==1)
        {
            setglobalvar("zoomvalue", 380);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 410);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 430);
        }
        if(frame==6)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==90)
    {
        if(frame==0)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==91)
    {
        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==0)
        {
            setglobalvar("zoomvalue", 350);
        }
        if(frame==1)
        {
            setglobalvar("zoomvalue", 380);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 410);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 430);
        }
        if(frame==6)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==92)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);

	if(frame==0){

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

	}

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

	setentityvar(self, 1, NULL());

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

	}

	        if(frame==1)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==1)
        {
            setglobalvar("zoomvalue", 360);
        }
        if(frame==1)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==1)
        {
            setglobalvar("zoomy", 0);
        }
        if(frame==1)
        {
            keymove(3, 0.6);
        }
        if(frame==1)
        {
            keyint("ANI_FREESPECIAL2", 0, "A", 0, 0);
        }
        if(frame==2)
        {
            keymove(3, 0.6);
        }
        if(frame==2)
        {
            keyint("ANI_FREESPECIAL2", 0, "A", 0, 0);
        }
        if(frame==3)
        {
            keymove(3, 0.6);
        }
        if(frame==3)
        {
            keyint("ANI_FREESPECIAL2", 0, "A", 0, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/warmachine/missile.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==94)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==95)
    {
        if(frame==0)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==1)
        {
            spawn01("po", -22, 0, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/bwidow/_nave/_bwnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==96)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("balaP", 29, 8, 0, 5, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==99)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==100)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==101)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==102)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }



      if (frame==0){

            shooter("missile" ,8,10,-1,3,0,-0.25);

            shooter("missile" ,8,10,-1,3,0,0);

      }

	}

if (z<180 && z> 100&& frame==0){

   	    shooter("missile" ,8,10,-1,3,0,-0.25);

            shooter("missile" ,8,10,-1,3,0,0.25);

            }

if (z<=100&& frame==0){

   	    shooter("missile" ,8,10,-1,3,0,0);

            shooter("missile" ,8,10,-1,3,0,0.25);

            }

	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==105)
    {


    if(frame>0){

      int Speed = getlevelproperty("bgspeed");



      if(Speed==NULL()){

        Speed = 0;

      }



      changelevelproperty("bgspeed", 0);

      changelevelproperty("rocking", 0);

      //changelevelproperty("bgspeed", Speed+1);

    }

	        return;
    }
    if(animhandle==106)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==107)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==109)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==111)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        if(frame==1)
        {
            velo001(2, NULL(), 0);
        }
        if(frame==3)
        {
            velo001(0.5, NULL(), 0);
        }
        if(frame==4)
        {
            velo001(0, NULL(), 0);
        }
        return;
    }
    if(animhandle==120)
    {
        if(frame==2)
        {
            velo001(1, NULL(), 0);
        }
        if(frame==4)
        {
            velo001(0.5, NULL(), 0);
        }
        if(frame==5)
        {
            velo001(0, NULL(), 0);
        }
        return;
    }
    if(animhandle==122)
    {


	if(frame==0){

	    void self = getlocalvar("self");

	    void e;

	    clearspawnentry();

	    setspawnentry("name", "burnP");

	    e = spawn();

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

	}

	        return;
    }
    if(animhandle==123)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==124)
    {
        if(frame==2)
        {
            velo001(1, NULL(), 0);
        }
        if(frame==3)
        {
            velo001(0.5, NULL(), 0);
        }
        if(frame==4)
        {
            velo001(0, NULL(), 0);
        }
        return;
    }
    if(animhandle==127)
    {
        if(frame==0)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(1, NULL(), 0);
        }
        if(frame==5)
        {
            velo001(0.5, NULL(), 0);
        }
        if(frame==6)
        {
            velo001(0, NULL(), 0);
        }
        return;
    }
    if(animhandle==128)
    {
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(1.9, NULL(), 5);
        }
        if(frame==12)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==129)
    {
        if(frame==5)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==130)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==131)
    {


    void vSelf = getlocalvar("self");

    if(frame==0){

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

    }

	        if(frame==0)
        {
            cancelgrab("ANI_FOLLOW4");
        }
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 15, 1, 1, 0);
        }
        if(frame==1)
        {
            randSound0("chars/bwidow/sounds/throw1.wav", "chars/bwidow/sounds/throw2.wav");
        }
        if(frame==1)
        {
            position(11, -19, 50, 1, 0);
        }
        if(frame==2)
        {
            position(8, -13, 41, 1, 0);
        }
        if(frame==3)
        {
            position(14, -11, 10, 1, 0);
        }
        if(frame==4)
        {
            position(17, 0, 1, 1, 0);
        }
        if(frame==5)
        {
            anichangeattack("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==132)
    {


    void self = getlocalvar("self");

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

    if(x>=100)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==133)
    {
        if(frame==0)
        {
            position(19, 0, 1, 1, 1);
        }
        if(frame==0)
        {
            spawn01("stompfx", 0, 0, 2);
        }
        if(frame==0)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==0)
        {
            hurt2(15);
        }
        if(frame==1)
        {
            depost(0);
        }
        if(frame==1)
        {
            throw(15, 2, 0, -4, 0, 0);
        }
        if(frame==1)
        {
            velo001(-3, NULL(), 3);
        }
        if(frame==1)
        {
            clearL();
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==134)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==135)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==136)
    {


    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_ATTACK3"));

    }

	        return;
    }
    if(animhandle==137)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(6, NULL(), 1.5);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==4)
        {
            noplayerJoin(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        if(frame==4)
        {
            subjectWall(1);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==138)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), 2.5);
        }
        if(frame==11)
        {
            noplayerJoin(0);
        }
        if(frame==11)
        {
            subjectScreen(1);
        }
        if(frame==11)
        {
            subjectWall(1);
        }
        if(frame==11)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==139)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==140)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==141)
    {
        if(frame==1)
        {
            subjectScreen(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==142)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==143)
    {
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==144)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/bwidow/sounds/hell.wav", "chars/bwidow/sounds/att2.wav");
        }
        if(frame==4)
        {
            shooter2("balaP", -8, 2, 0, -3.5, -3.5, 0);
        }
        if(frame==4)
        {
            shooter2("balaP", -18, 3, 0, -3.5, -3.5, 0);
        }
        if(frame==5)
        {
            shooter2("balaP", 0, 2, 0, 0, -4.5, 0);
        }
        if(frame==5)
        {
            shooter2("balaP", 9, 0, 0, 0, -4.5, 0);
        }
        if(frame==6)
        {
            shooter2("balaP", 27, 17, 0, 3.5, -3.5, 0);
        }
        if(frame==6)
        {
            shooter2("balaP", 32, 2, 0, 3.5, -3.5, 0);
        }
        if(frame==7)
        {
            shooter2("balaP", 27, 17, 0, 4.5, -2.5, 0);
        }
        if(frame==7)
        {
            shooter2("balaP", 32, 2, 0, 4.5, -2.5, 0);
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==145)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }


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

         int gunControlBW = getglobalvar("gunControlBW");





        if(gunControlBW==0 && frame==1){

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

        }else if(gunControlBW==1 && frame==1){

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

        }else if(gunControlBW==2 && frame==1){

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

        }else if(gunControlBW==3 && frame==1){

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

        }else if(gunControlBW==4 && frame==1){

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

        }else if(gunControlBW==5 && frame==1){

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

        }

	        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==146)
    {
        if(frame==3)
        {
            randSound0("chars/bwidow/sounds/free11.wav", "chars/bwidow/sounds/free22.wav");
        }
        if(frame==4)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            shooter("balaP", 25, 31, 0, 4.5, 0, 0);
        }
        return;
    }
    if(animhandle==147)
    {
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            shooter("biospark", 25, 46, 0, 0.5, 0, 0);
        }
        return;
    }
    if(animhandle==148)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("bwmine", 0, 0, 0);
        }
        return;
    }
    if(animhandle==149)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/bwidow/sounds/hell.wav", "chars/bwidow/sounds/att2.wav");
        }
        if(frame==4)
        {
            shooter2("balaP", -8, 2, 0, -3.5, -3.5, 0);
        }
        if(frame==4)
        {
            shooter2("balaP", -18, 3, 0, -3.5, -3.5, 0);
        }
        if(frame==5)
        {
            shooter2("balaP", 0, 2, 0, 0, -4.5, 0);
        }
        if(frame==5)
        {
            shooter2("balaP", 9, 0, 0, 0, -4.5, 0);
        }
        if(frame==6)
        {
            shooter2("balaP", 27, 17, 0, 3.5, -3.5, 0);
        }
        if(frame==6)
        {
            shooter2("balaP", 32, 2, 0, 3.5, -3.5, 0);
        }
        if(frame==7)
        {
            shooter2("balaP", 27, 17, 0, 4.5, -2.5, 0);
        }
        if(frame==7)
        {
            shooter2("balaP", 32, 2, 0, 4.5, -2.5, 0);
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==150)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==3)
        {
            randSound0("chars/bwidow/sounds/gotcha.wav", "chars/bwidow/sounds/gotcha2.wav");
        }
        if(frame==4)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==151)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==152)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            shooter("balaP", 25, 31, 0, 4.5, 0, 0);
        }
        return;
    }
    if(animhandle==153)
    {
        if(frame==1)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==2)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==7)
        {
            randSound0("chars/bwidow/sounds/free11.wav", "chars/bwidow/sounds/free22.wav");
        }
        if(frame==8)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==8)
        {
            shooter("balaP", 25, 31, 0, 4.5, 0, 0);
        }
        return;
    }
    if(animhandle==154)
    {


         if (frame==0){

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

        int gunControlBW = getglobalvar("gunControlBW"); // Get gunControlBWd state

            if (gunControlBW<5){

            setglobalvar("gunControlBW", gunControlBW+1);

            } else {

            setglobalvar("gunControlBW",0);

            }

        }

	        return;
    }
    if(animhandle==155)
    {
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/bwidow/sounds/call.wav", "chars/bwidow/sounds/call2.wav");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==156)
    {
        if(frame==0)
        {
            randSound0("chars/bwidow/sounds/hyper1.wav", "chars/bwidow/sounds/hyper2.wav");
        }
        if(frame==0)
        {
            spawn01("super", 0, 25, 0);
        }
        if(frame==2)
        {
            spawn01("sniperbw", 0, 0, 1);
        }
        return;
    }
    if(animhandle==157)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==158)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==159)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/bwidow/sounds/free21.wav", "chars/bwidow/sounds/free23.wav");
        }
        if(frame==2)
        {
            velo001(2, NULL(), 0);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==8)
        {
            velo001(1, NULL(), 0);
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==9)
        {
            velo001(0.5, NULL(), 0);
        }
        if(frame==10)
        {
            velo001(0, NULL(), 0);
        }
        return;
    }
    if(animhandle==160)
    {


         if (frame==0){

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

        int gunControlBW = getglobalvar("gunControlBW"); // Get gunControlBWd state

            if (gunControlBW>0){

            setglobalvar("gunControlBW", gunControlBW-1);

            } else {

            setglobalvar("gunControlBW",5);

            }

        }

	        return;
    }
    if(animhandle==165)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            velo001(-2, NULL(), 0);
        }
        if(frame==1)
        {
            position(7, 0, 30, -1, 0);
        }
        if(frame==1)
        {
            randSound0("chars/bwidow/sounds/throw1.wav", "chars/bwidow/sounds/throw2.wav");
        }
        if(frame==2)
        {
            position(14, -5, 1, -1, 0);
        }
        if(frame==3)
        {
            position(19, 0, 10, -1, 0);
        }
        if(frame==4)
        {
            position(24, 20, 1, -1, 0);
        }
        if(frame==5)
        {
            position(7, 0, 30, -1, 0);
        }
        if(frame==6)
        {
            position(14, -5, 1, -1, 0);
        }
        if(frame==6)
        {
            velo001(-1.5, NULL(), 0);
        }
        if(frame==7)
        {
            position(19, 0, 10, -1, 0);
        }
        if(frame==7)
        {
            velo001(-1, NULL(), 0);
        }
        if(frame==8)
        {
            position(24, 20, 0, -1, 0);
        }
        if(frame==9)
        {
            depost(0);
        }
        if(frame==9)
        {
            throw(25, 2, 5, 2, 0, 0);
        }
        if(frame==9)
        {
            velo001(0, NULL(), 0);
        }
        if(frame==10)
        {
            clearL();
        }
        return;
    }
    if(animhandle==166)
    {
        if(frame==2)
        {
            randSound0("chars/bwidow/sounds/gotcha.wav", "chars/bwidow/sounds/gotcha2.wav");
        }
        if(frame==6)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==6)
        {
            velo001(3, NULL(), 2.5);
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==167)
    {
        if(frame==8)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==173)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==175)
    {


	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==176)
    {


	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==177)
    {
        if(frame==3)
        {
            anichange("ANI_FOLLOW9");
        }
        return;
    }
    if(animhandle==179)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==181)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(4, NULL(), 1.5);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==182)
    {
        if(frame==0)
        {
            randSound0("chars/bwidow/sounds/select1.wav", "chars/bwidow/sounds/select2.wav");
        }
        return;
    }
    if(animhandle==183)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==184)
    {
        if(frame==3)
        {
            anichange("ANI_FOLLOW8");
        }
        return;
    }
    if(animhandle==185)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==187)
    {
        if(frame==0)
        {
            shadow();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/captain/shield.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==189)
    {


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

   void Owner = getentityproperty(self, "owner"); // Get owner

   int x = getentityproperty(self, "x"); // Get current x coordinate

   int Ox = getentityproperty(Owner, "x"); // Get Owner's x coordinate



   if(x <= Ox + 60 && x >= Ox - 60){ // Close to owner's x?

   setglobalvar("ShieldC", 0);

     killentity(self); //Suicide!

   }

	        return;
    }
    if(animhandle==190)
    {


    void self = getlocalvar("self");

    int Vx = getentityproperty(self, "xdir"); // Get current x velocity

    int Summon = getentityvar(self, 1);



    if(frame==0){

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

    }

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

      setentityvar(self, 1, NULL());

      changeentityproperty(self, "velocity", -Vx); // Reverses velocity

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

    }



	        return;
    }
    if(animhandle==191)
    {


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

   int Vx = getentityproperty(self, "xdir"); // Get current x velocity

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

   int Screen = openborvariant("hResolution"); // Get screen width

   int x = getentityproperty(self, "x"); // Get current x coordinate

   int Bounce = getlocalvar("Bounce" + self); // Get bounced state

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

   int SFX0 = loadsample("data/sounds/rebound.wav");

   int SFX00= loadsample("data/chars/captain/shield2.wav");



   int ShieldC= getglobalvar("ShieldC");// shield control

   setglobalvar("ShieldC", 1);

   ShieldC = 1;





   if(Bounce==NULL()){ // Localvar empty?

     setlocalvar("Bounce" + self, 0);

     Bounce = 0;

   }



   if(Bounce==3){ // Bounces reach 4 times?

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

   } else if(Vx > 0 && x >= XPos + Screen){ // Touches right screen edge

     	  playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "direction", 0);

          changeentityproperty(self, "velocity", -Vx); // Reverses velocity

          playsample(SFX00, 0, 120, 120, 100, 0);

     setlocalvar("Bounce" + self, Bounce+1);

        } else if(Vx < 0 && x <= XPos){ // Touches left screen edge

        playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "direction", 1);

          changeentityproperty(self, "velocity", -Vx); // Reverses Velocity

          playsample(SFX00, 0, 120, 120, 100, 0);

     setlocalvar("Bounce" + self, Bounce+1);

        }

	        return;
    }
    if(animhandle==192)
    {


    void self = getlocalvar("self");

    int Vx = getentityproperty(self, "xdir"); // Get current x velocity

    int Summon = getentityvar(self, 1);



    if(frame==0){

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

    }

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

      //setentityvar(self, 1, NULL());

      //changeentityproperty(self, "velocity", -Vx); // Reverses velocity

      killentity(self);

    }



	        return;
    }

}

#### animationscript function main #####
# data/chars/deadpool/pineapple.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==193)
    {
        if(frame==13)
        {
            spawn000("sboom", 0, 20, 0);
        }
        return;
    }
    if(animhandle==194)
    {
        if(frame==0)
        {
            spawn000("sboom", 0, 20, 0);
        }
        return;
    }
    if(animhandle==195)
    {
        if(frame==0)
        {
            randomJump(6, 6);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hulk/hwave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==196)
    {


if(frame == 14){

void self = getlocalvar("self");

killentity(self);

}

	        return;
    }

}

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


	if(frame==1){

	pausemusic(1);

	}

	if(frame==24){

	pausemusic(0);

	}

	        if(frame==0)
        {
            layer(900);
        }
        if(frame==1)
        {
            layer(1001001000);
        }
        if(frame==17)
        {
            spawnPosAni("textcontrol", 240, 0, 0, "ANI_FOLLOW9", 1);
        }
        if(frame==17)
        {
            slow(0);
        }
        if(frame==25)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/ironman/beamNave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==198)
    {
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==199)
    {
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/aNPCnave/arainbow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==201)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==202)
    {


	{

	//checkParentHealth ("ANI_FOLLOW2");

	}        return;
    }

}

#### animationscript function main #####
# data/chars/deadpool/heartp.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==203)
    {
        if(frame==0)
        {
            spawn000("sboom", 0, 20, 0);
        }
        return;
    }
    if(animhandle==204)
    {
        if(frame==0)
        {
            velo001(3, 0, 0);
        }
        if(frame==20)
        {
            velo001(0, 0, 0);
        }
        if(frame==30)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/deadpool/_nave/_dpnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==206)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==0)
        {
            toss("heartp", 55, 50, 1, 3, 0, 0);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==208)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==209)
    {


    void self = getlocalvar("self");

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

    

    if(frame==0)  {

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

        }



    if(x>=100)

    {



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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==210)
    {
        if(frame==5)
        {
            noplayerJoin(0);
        }
        if(frame==5)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==211)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==0)
        {
            spawnAni("heartp", 55, 50, 1, "ANI_FOLLOW1", 2, 0, 0);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==213)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==215)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==217)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);



     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/deadpool/deadpool.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==224)
    {
        if(frame==0)
        {
            randSound("chars/deadpool/att0.wav", "chars/deadpool/att1.wav", "chars/deadpool/att2.wav");
        }
        return;
    }
    if(animhandle==225)
    {
        if(frame==0)
        {
            randSound("chars/deadpool/att3.wav", "chars/deadpool/att4.wav", "chars/deadpool/att5.wav");
        }
        if(frame==3)
        {
            randSound0("chars/deadpool/tiger1.wav", "chars/deadpool/tiger2.wav");
        }
        return;
    }
    if(animhandle==226)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnM");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==227)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==229)
    {
        if(frame==0)
        {
            randSound2("chars/deadpool/hit-1.wav", "chars/deadpool/hit-2.wav", "chars/deadpool/hit-3.wav", "chars/deadpool/hit-4.wav", "chars/deadpool/hit-5.wav", "chars/deadpool/hit-6.wav");
        }
        return;
    }
    if(animhandle==230)
    {


    void self = getlocalvar("self");

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

    if(x>=50)

    {

    changeentityproperty(self,"subject_to_screen",1);

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=80)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==232)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(1, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==233)
    {


    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==234)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            randSound0("chars/deadpool/tiger1.wav", "chars/deadpool/tiger2.wav");
        }
        if(frame==4)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(7, NULL(), 2.75);
        }
        if(frame==7)
        {
            noplayerJoin(0);
        }
        if(frame==7)
        {
            subjectScreen(1);
        }
        if(frame==7)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==235)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), 2.5);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==17)
        {
            noplayerJoin(0);
        }
        if(frame==17)
        {
            subjectScreen(1);
        }
        if(frame==17)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==236)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==237)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==238)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==239)
    {
        if(frame==0)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==1)
        {
            cancelgrabOBJ("ANI_FOLLOW2");
        }
        if(frame==1)
        {
            slamstart(300);
        }
        if(frame==1)
        {
            position(0, 30, 0, 2, 0);
        }
        if(frame==2)
        {
            spawnPosAni("standby", 240, 0, 0, "ANI_IDLE", 1);
        }
        if(frame==2)
        {
            spawn01("cut1", 20, 20, 0);
        }
        if(frame==2)
        {
            addhits(1);
        }
        if(frame==3)
        {
            spawnRandom("flash", 30, 30);
        }
        if(frame==3)
        {
            addhits(1);
        }
        if(frame==4)
        {
            spawnRandom("flash4", 20, 20);
        }
        if(frame==4)
        {
            addhits(1);
        }
        if(frame==5)
        {
            spawnRandom("flash3", 30, 30);
        }
        if(frame==5)
        {
            addhits(1);
        }
        if(frame==6)
        {
            spawnRandom("flash", 20, 20);
        }
        if(frame==6)
        {
            addhits(1);
        }
        if(frame==7)
        {
            spawnRandom("flash2", 30, 30);
        }
        if(frame==7)
        {
            addhits(1);
        }
        if(frame==8)
        {
            spawnRandom("flash3", 20, 20);
        }
        if(frame==8)
        {
            addhits(1);
        }
        if(frame==9)
        {
            spawnRandom("flash", 30, 30);
        }
        if(frame==9)
        {
            addhits(1);
        }
        if(frame==10)
        {
            spawnRandom("flash4", 20, 20);
        }
        if(frame==10)
        {
            addhits(1);
        }
        if(frame==11)
        {
            spawnRandom("flash", 30, 30);
        }
        if(frame==11)
        {
            addhits(1);
        }
        if(frame==12)
        {
            spawnRandom("flash2", 20, 20);
        }
        if(frame==12)
        {
            addhits(1);
        }
        if(frame==13)
        {
            spawnRandom("flash3", 30, 30);
        }
        if(frame==13)
        {
            addhits(1);
        }
        if(frame==14)
        {
            finish(250, 1, 0, 0, 0, 0);
        }
        if(frame==14)
        {
            spawn01("cut1xx", 30, 40, 1);
        }
        if(frame==14)
        {
            addhits(1);
        }
        if(frame==14)
        {
            depost(1);
        }
        if(frame==14)
        {
            throw(50, 5, 0, 10, 0, 0);
        }
        if(frame==15)
        {
            clearL();
        }
        if(frame==15)
        {
            randSound("chars/deadpool/win-1.wav", "chars/deadpool/win-2.wav", "chars/deadpool/win-3.wav");
        }
        return;
    }
    if(animhandle==240)
    {
        if(frame==0)
        {
            randSound("chars/deadpool/pineapple.wav", "chars/deadpool/pineapple2.wav", "chars/deadpool/att4.wav");
        }
        if(frame==2)
        {
            toss("pineapple", 30, 55, -1);
        }
        return;
    }
    if(animhandle==241)
    {
        if(frame==6)
        {
            randSound0("chars/deadpool/tiger1.wav", "chars/deadpool/tiger2.wav");
        }
        if(frame==8)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==8)
        {
            velo001(7, NULL(), 2.75);
        }
        return;
    }
    if(animhandle==242)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==243)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            shooter("balaP", 34, 57, 0, 5, 0, 0);
        }
        if(frame==5)
        {
            shooter("balaP", 34, 57, 0, 5, 0, 0);
        }
        if(frame==7)
        {
            shooter("balaP", 34, 57, 0, 5, 0, 0);
        }
        return;
    }
    if(animhandle==244)
    {
        if(frame==0)
        {
            randSound("chars/deadpool/hyper-1.wav", "chars/deadpool/hyper-2.wav", "chars/deadpool/hyper-3.wav");
        }
        if(frame==0)
        {
            spawn01("super", 20, 45, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), NULL());
        }
        if(frame==21)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==22)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==23)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==252)
    {


	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)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3.5, 0, 2);
        }
        return;
    }
    if(animhandle==256)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3, NULL(), 1);
        }
        if(frame==3)
        {
            randSound0("chars/deadpool/tiger1.wav", "chars/deadpool/tiger2.wav");
        }
        return;
    }
    if(animhandle==257)
    {
        if(frame==0)
        {
            randSound2("sounds/announcer/dp-3.wav", "chars/deadpool/intro-1.wav", "chars/deadpool/intro-2.wav", "chars/deadpool/intro-3.wav", "chars/deadpool/intro-6.wav", "chars/deadpool/intro-5.wav");
        }
        return;
    }
    if(animhandle==258)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            randSound2("chars/deadpool/hit-1.wav", "chars/deadpool/hit-2.wav", "chars/deadpool/hit-3.wav", "chars/deadpool/hit-4.wav", "chars/deadpool/hit-5.wav", "chars/deadpool/hit-6.wav");
        }
        return;
    }
    if(animhandle==260)
    {
        if(frame==3)
        {
            randSound0("chars/deadpool/tiger1.wav", "chars/deadpool/tiger2.wav");
        }
        if(frame==3)
        {
            spawn01("stompfx", 15, 0, 0);
        }
        if(frame==3)
        {
            spawn01("crack", 15, 0, -1);
        }
        if(frame==3)
        {
            shooter("hwave", 100, 30, 0, 3, 0, 0, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/captain/_nave/_capnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==267)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            toss("beamNave", 65, 6, 1, 3, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==268)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==270)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==271)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==272)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==273)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            randSound("chars/captain/shield.wav", "chars/captain/at4.wav", "chars/captain/at45.wav");
        }
        if(frame==2)
        {
            spawnAni("shield", 25, 25, 1, "ANI_FREESPECIAL2", 6, 0, 0);
        }
        return;
    }
    if(animhandle==276)
    {


    if(frame>0){

      int Speed = getlevelproperty("bgspeed");



      if(Speed==NULL()){

        Speed = 0;

      }



      changelevelproperty("bgspeed", 0);

      changelevelproperty("rocking", 0);

      //changelevelproperty("bgspeed", Speed+1);

    }

	        return;
    }
    if(animhandle==277)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==278)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==280)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==282)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==287)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


void self = getlocalvar("self");

void name;



if(getglobalvar("indexedw"+self))

  {

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

  }

 if(frame==3)

 {

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

 }

	        if(frame==1)
        {
            nullopponent();
        }
        if(frame==2)
        {
            checkobject();
        }
        return;
    }
    if(animhandle==290)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==292)
    {
        if(frame==1)
        {
            nullopponent();
        }
        if(frame==2)
        {
            checkobject();
        }
        return;
    }
    if(animhandle==293)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==294)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==295)
    {
        if(frame==0)
        {
            checkPal2("ANI_FREESPECIAL8", 1);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3.5, 0, 2);
        }
        return;
    }
    if(animhandle==298)
    {
        if(frame==11)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==303)
    {
        if(frame==1)
        {
            shoot_spawner(3, 0, 30, 0);
        }
        return;
    }
    if(animhandle==307)
    {
        if(frame==1)
        {
            shoot_spawner(3, 1, 6, 0);
        }
        return;
    }
    if(animhandle==310)
    {


    void self = getlocalvar("self");

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

    if(x>=100)

    {

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

    }

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


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==312)
    {
        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);
        }
        return;
    }
    if(animhandle==313)
    {


    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==314)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), 2.5);
        }
        if(frame==8)
        {
            noplayerJoin(0);
        }
        if(frame==8)
        {
            subjectScreen(1);
        }
        if(frame==8)
        {
            subjectWall(1);
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==315)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), 2.5);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==7)
        {
            noplayerJoin(0);
        }
        if(frame==7)
        {
            subjectScreen(1);
        }
        if(frame==7)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==316)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==317)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==318)
    {
        if(frame==1)
        {
            subjectScreen(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==319)
    {


	if(frame==4)

	{

	       int SFX1 = loadsample("data/chars/captain/at4.wav");

	       int SFX2 = loadsample("data/chars/captain/at45.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==2)
        {
            slamstart(1);
        }
        if(frame==2)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==3)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==3)
        {
            position(5, -7, 48, -1, 0);
        }
        if(frame==4)
        {
            position(10, 10, 30, -1, 0);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(25, 2, 6, -1, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==320)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            checkPal2("ANI_FREESPECIAL7", 1);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==321)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            checkPal2("ANI_FREESPECIAL9", 1);
        }
        if(frame==2)
        {
            velo001(5.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==9)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==11)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==13)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==15)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==16)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==17)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==18)
        {
            velo001(0.5, NULL(), NULL());
        }
        return;
    }
    if(animhandle==322)
    {
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==323)
    {


 	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/captain/hyp1.wav");

	       int SFX2 = loadsample("data/chars/captain/hyp2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }



        }

       	int ShieldC= getglobalvar("ShieldC");// shield control

	void vSelf = getlocalvar("self");

	ShieldC==1;

	        if(frame==1)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            shooter2("shield", 30, 20, 0, 10, 0, 0);
        }
        if(frame==4)
        {
            checkShield(0, "ANI_FOLLOW1");
        }
        return;
    }
    if(animhandle==325)
    {
        if(frame==0)
        {
            block(1);
        }
        if(frame==5)
        {
            aniNHoldSwitch("ANI_CANT", "A2");
        }
        return;
    }
    if(animhandle==326)
    {
        if(frame==3)
        {
            shooter("balaP", 27, 48, 0, 4.5, 0, 0);
        }
        return;
    }
    if(animhandle==327)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==328)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            randSound0("chars/captain/stripes.wav", "chars/captain/at5.wav");
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4, NULL(), 3);
        }
        if(frame==5)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==7)
        {
            spawn01("po", -10, 0, 0);
        }
        return;
    }
    if(animhandle==332)
    {
        if(frame==2)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==333)
    {


	if(frame==4)

	{

	       int SFX1 = loadsample("data/chars/captain/at4.wav");

	       int SFX2 = loadsample("data/chars/captain/at45.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==3)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==3)
        {
            position(5, 7, 48, -1, 0);
        }
        if(frame==3)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==4)
        {
            position(10, 10, 30, -1, 0);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(25, 2, 5, 1, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==334)
    {


	if(frame==5)

	{

	       int SFX1 = loadsample("data/chars/captain/at2.wav");

	       int SFX2 = loadsample("data/chars/captain/at3.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==1)
        {
            position(0, 0, 0, 1, 0);
        }
        if(frame==2)
        {
            position(0, -10, 0, 1, 1);
        }
        if(frame==3)
        {
            position(5, -7, 48, -1, 0);
        }
        if(frame==4)
        {
            position(7, 0, 63, -1, 0);
        }
        if(frame==5)
        {
            position(10, 10, 50, -1, 0);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(25, 2, 6, 0.5, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==335)
    {


	void self = getlocalvar("self");

        if(getglobalvar("indexedw"+self))

        {

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

        }

	        return;
    }
    if(animhandle==338)
    {
        if(frame==2)
        {
            velo001(3, 0, -3);
        }
        return;
    }
    if(animhandle==342)
    {


	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==344)
    {
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(3.5, 0, 2);
        }
        return;
    }
    if(animhandle==346)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/captain/vic.wav");

	       int SFX2 = loadsample("data/chars/captain/vic2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3, NULL(), 2.5);
        }
        return;
    }
    if(animhandle==348)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==350)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/captain/rise.wav");

	       int SFX2 = loadsample("data/chars/captain/vic2.wav");

	       void vSelf = getlocalvar("self");

               int oPal = getentityproperty(vSelf, "mapdefault");

       	       changeentityproperty(vSelf, "map", oPal);

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }



        }

	        return;
    }

}

#### animationscript function main #####
# data/chars/ironman/beam.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==354)
    {
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==355)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==356)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("bflash", 0, 0, 0);
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==357)
    {
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==4)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==5)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/ironman/_nave/_ironnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==359)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            toss("beam", 89, 30, 1, 3, 0, 0);
        }
        if(frame==1)
        {
            keymove(3, 0.6);
        }
        if(frame==2)
        {
            keymove(3, 0.6);
        }
        if(frame==3)
        {
            keymove(3, 0.6);
        }
        if(frame==4)
        {
            keymove(3, 0.6);
        }
        if(frame==5)
        {
            keymove(3, 0.6);
        }
        if(frame==6)
        {
            keymove(3, 0.6);
        }
        if(frame==7)
        {
            keymove(3, 0.6);
        }
        if(frame==8)
        {
            keymove(3, 0.6);
        }
        if(frame==9)
        {
            keymove(3, 0.6);
        }
        if(frame==10)
        {
            keymove(3, 0.6);
        }
        if(frame==11)
        {
            keymove(3, 0.6);
        }
        return;
    }
    if(animhandle==360)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==361)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==363)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==364)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==365)
    {
        if(frame==4)
        {
            noplayerJoin(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==366)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==4)
        {
            velo001(8, NULL(), NULL());
        }
        if(frame==4)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==6)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==7)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==8)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==9)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==10)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==11)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==12)
        {
            velo001(-4, NULL(), NULL());
        }
        return;
    }
    if(animhandle==370)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==372)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==374)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==377)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==378)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}

	        return;
    }
    if(animhandle==379)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==384)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        if(frame==0)
        {
            gravity(1);
        }
        if(frame==0)
        {
            mpadd(10);
        }
        if(frame==2)
        {
            spawn01("pom", 0, 0, 0);
        }
        return;
    }
    if(animhandle==387)
    {
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==3)
        {
            spawn01("pom", 0, 0, 0);
        }
        return;
    }
    if(animhandle==388)
    {


	void self = getlocalvar("self");

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

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

	        if(frame==0)
        {
            move(-80, 0, 0);
        }
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            randSound0("chars/ironman/superior.wav", "chars/ironman/superior2.wav");
        }
        if(frame==2)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("cdust", 35, 35, 1);
        }
        if(frame==4)
        {
            velo001(5, NULL(), NULL());
        }
        if(frame==4)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==6)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==7)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==8)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==9)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==10)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==11)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==12)
        {
            subjectWall(1);
        }
        if(frame==12)
        {
            subjectScreen(1);
        }
        if(frame==12)
        {
            velo001(2, NULL(), NULL());
        }
        return;
    }
    if(animhandle==389)
    {
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==390)
    {
        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 2);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==391)
    {
        if(frame==1)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==2)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==3)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==7)
        {
            spawn01("cdust", 25, 55, 1);
        }
        if(frame==8)
        {
            velo001(-1, NULL(), 1);
        }
        if(frame==14)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==392)
    {
        if(frame==0)
        {
            velo001(-3, 0, 0);
        }
        if(frame==0)
        {
            position(7, 0, 43, 1, 0);
        }
        if(frame==0)
        {
            randSound0("chars/ironman/throw3.wav", "chars/ironman/throw4.wav");
        }
        if(frame==2)
        {
            position(0, -1, 10, -1, 0);
        }
        if(frame==2)
        {
            depost(0);
        }
        if(frame==2)
        {
            throw(35, 2, -6, 1.5, 0, 1);
        }
        if(frame==2)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==3)
        {
            clearL();
        }
        if(frame==3)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==4)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==5)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==7)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==394)
    {


	void self = getlocalvar("self");

    if(frame==0){

      int eTime = openborvariant("elapsed_time");



      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 90);

      changeentityproperty(self,"blink",1);

    }

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

    if (y>135){

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

    }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 2);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        return;
    }
    if(animhandle==395)
    {


    void self = getlocalvar("self");

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

    if(x>=-60)

    {

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=-60)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==397)
    {
        if(frame==0)
        {
            spawn01("cdust", 35, 35, 1);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==0)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==1)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==2)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==3)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==4)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==6)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==7)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==8)
        {
            velo001(2, NULL(), NULL());
        }
        return;
    }
    if(animhandle==398)
    {


    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==399)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), NULL());
        }
        if(frame==15)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==16)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==17)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==18)
        {
            noplayerJoin(0);
        }
        if(frame==18)
        {
            subjectScreen(1);
        }
        if(frame==18)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==400)
    {
        if(frame==0)
        {
            move(-40, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==19)
        {
            velo001(1.5, 0, -1);
        }
        if(frame==21)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==25)
        {
            degravity(0);
        }
        if(frame==25)
        {
            noplayerJoin(0);
        }
        if(frame==25)
        {
            subjectScreen(1);
        }
        if(frame==25)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==401)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==402)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==403)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==404)
    {
        if(frame==0)
        {
            randSound0("chars/ironman/repulsor.wav", "chars/ironman/repulsor2.wav");
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            toss("beam", 54, 40, 1);
        }
        return;
    }
    if(animhandle==405)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

        changeentityproperty(self, "subject_to_gravity", 1);

    }

	        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==2)
        {
            spawnAni("cdust", 9, 25, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==406)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

        changeentityproperty(self, "subject_to_gravity", 1);

    }

	        if(frame==2)
        {
            spawnAni("cdust", 9, 25, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==407)
    {
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==408)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            randSound0("chars/ironman/throw1.wav", "chars/ironman/throw2.wav");
        }
        if(frame==2)
        {
            velo001(4, NULL(), 4);
        }
        if(frame==2)
        {
            spawnAni("cdust", 0, 42, 1, "ANI_FOLLOW3", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==6)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==7)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==8)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==9)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==10)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==11)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==16)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==409)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            randSound0("chars/ironman/superior.wav", "chars/ironman/superior2.wav");
        }
        if(frame==2)
        {
            velo001(5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("cdust", 35, 35, 1);
        }
        if(frame==4)
        {
            velo001(5, NULL(), NULL());
        }
        if(frame==4)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==6)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==7)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==8)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==9)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==10)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==11)
        {
            spawn01("po", -22, 34, 0);
        }
        if(frame==12)
        {
            velo001(2, NULL(), NULL());
        }
        return;
    }
    if(animhandle==410)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/ironman/call1.wav", "chars/ironman/call2.wav");
        }
        if(frame==3)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==411)
    {
        if(frame==0)
        {
            spawn01("super", 0, 40, 0);
        }
        if(frame==1)
        {
            randSound0("chars/ironman/uni.wav", "chars/ironman/unib.wav");
        }
        if(frame==2)
        {
            velo001(-0.5, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==12)
        {
            velo001(-0.25, 0, 0);
        }
        if(frame==32)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==413)
    {
        if(frame==0)
        {
            block(1);
        }
        if(frame==17)
        {
            aniNHoldSwitch("ANI_CANT", "A2");
        }
        return;
    }
    if(animhandle==414)
    {


	void self = getlocalvar("self");

        void MPower = getentityproperty(self,"mp"); //get mp

	if (MPower <= 2){

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

	   }

	        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==5)
        {
            keymove(1.5);
        }
        if(frame==6)
        {
            keymove(1.5);
        }
        if(frame==7)
        {
            keymove(1.5);
        }
        if(frame==8)
        {
            keymove(1.5);
        }
        if(frame==9)
        {
            keymove(1.5);
        }
        if(frame==10)
        {
            keymove(1.5);
        }
        if(frame==11)
        {
            keymove(1.5);
        }
        if(frame==12)
        {
            keymove(1.5);
        }
        if(frame==13)
        {
            keymove(1.5);
        }
        if(frame==14)
        {
            keymove(1.5);
        }
        if(frame==14)
        {
            mpcost(3);
        }
        if(frame==15)
        {
            keymove(1.5);
        }
        if(frame==16)
        {
            keymove(1.5);
        }
        if(frame==17)
        {
            keymove(1.5);
        }
        return;
    }
    if(animhandle==415)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            checkPal("ANI_FREESPECIAL", 5);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("faisca", 35, 40, 0);
        }
        if(frame==5)
        {
            spawn01("faisca", 55, 40, 0);
        }
        if(frame==8)
        {
            spawn01("faisca", 35, 50, 0);
        }
        if(frame==10)
        {
            spawn01("faisca", 75, 40, 0);
        }
        return;
    }
    if(animhandle==416)
    {
        if(frame==1)
        {
            randSound0("chars/ironman/att_4-4.wav", "chars/ironman/special2.wav");
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("faisca", 35, 40, 0);
        }
        if(frame==3)
        {
            spawn01("faisca", -35, 40, 0);
        }
        if(frame==5)
        {
            spawn01("faisca", 35, 40, 0);
        }
        if(frame==5)
        {
            spawn01("faisca", -35, 40, 0);
        }
        return;
    }
    if(animhandle==420)
    {
        if(frame==2)
        {
            spawn01("cdust", 25, 55, 1);
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==421)
    {


    void vSelf = getlocalvar("self");



    if(frame==10){

      int  iTime = openborvariant("elapsed_time");



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

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

    }

	        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            position(0, 10, 0, -1, 0);
        }
        if(frame==2)
        {
            position(23, 35, 43, -1, 0);
        }
        if(frame==2)
        {
            spawnAni("cdust", 0, 42, 1, "ANI_FOLLOW3", 0, 0, 0);
        }
        if(frame==10)
        {
            position(7, 0, 43, 1, 0);
        }
        if(frame==10)
        {
            randSound0("chars/ironman/throw3.wav", "chars/ironman/throw5.wav");
        }
        if(frame==11)
        {
            position(10, 10, 40, -1, 0);
        }
        if(frame==11)
        {
            depost(0);
        }
        if(frame==11)
        {
            throw(35, 2, 5, -4.5, 0, 0);
        }
        if(frame==13)
        {
            clearL();
        }
        if(frame==21)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==422)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            position(3, 10, 0, -1, 0);
        }
        if(frame==2)
        {
            position(20, 38, 17, -1, 0);
        }
        if(frame==2)
        {
            spawn01("cdust", 0, 42, 1);
        }
        if(frame==2)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==2)
        {
            velo001(5.5, NULL(), NULL());
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==3)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==4)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==4)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==5)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==5)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==6)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==6)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==7)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==7)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==8)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==9)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==9)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==10)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==11)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==11)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==12)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==12)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==13)
        {
            spawn01("sdust", 40, 0, 0);
        }
        if(frame==13)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==14)
        {
            position(7, 0, 43, 1, 0);
        }
        if(frame==14)
        {
            randSound0("chars/ironman/throw3.wav", "chars/ironman/throw4.wav");
        }
        if(frame==16)
        {
            position(0, -1, 10, -1, 0);
        }
        if(frame==16)
        {
            depost(0);
        }
        if(frame==16)
        {
            throw(35, 2, -6, 1.5, 0, 1);
        }
        if(frame==16)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==17)
        {
            clearL();
        }
        if(frame==17)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==18)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==19)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==21)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==22)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==423)
    {
        if(frame==1)
        {
            velo001(-2, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("cdust", 0, 42, 1, "ANI_FOLLOW3", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(-1, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==428)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==430)
    {


	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==431)
    {


	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==433)
    {
        if(frame==3)
        {
            velo001(-2, 0, 0);
        }
        if(frame==5)
        {
            velo001(-1, 0, 0);
        }
        if(frame==7)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==435)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(2, NULL(), NULL());
        }
        return;
    }
    if(animhandle==437)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==4)
        {
            mpadd(10);
        }
        if(frame==4)
        {
            spawn01("pom", 0, 0, 0);
        }
        return;
    }
    if(animhandle==438)
    {
        if(frame==2)
        {
            anichangeattack("ANI_FOLLOW10");
        }
        return;
    }
    if(animhandle==439)
    {
        if(frame==0)
        {
            checkPal2("ANI_FREESPECIAL9", 5);
        }
        if(frame==1)
        {
            randSound0("chars/ironman/att_4-4.wav", "chars/ironman/special2.wav");
        }
        return;
    }
    if(animhandle==442)
    {
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/arrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==444)
    {


	void self = getlocalvar("self");

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

	        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }
    if(animhandle==445)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("bflash", 0, 0, 0);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==446)
    {
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/debris/debris1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==447)
    {
        if(frame==0)
        {
            randomJump(2, 3, 2);
        }
        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==448)
    {
        if(frame==0)
        {
            randomJump(3, 3, 2);
        }
        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==449)
    {
        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==450)
    {
        if(frame==0)
        {
            randomJump(3, 5, 2);
        }
        if(frame==15)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fireboom/fireboom.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==452)
    {
        if(frame==0)
        {
            checkStageType("air", "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 10, 0, 0);
        }
        if(frame==9)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", -10, 20, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/farrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==453)
    {


	void self = getlocalvar("self");

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

	        if(frame==0)
        {
            spawn01("faiscah", 15, 5, 0);
        }
        return;
    }
    if(animhandle==454)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("sboom", 0, 0, 0);
        }
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==455)
    {
        if(frame==0)
        {
            spawn01("faiscah", 15, 5, 0);
        }
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }

}

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


		void self = getlocalvar("self");

		void parent = getentityproperty(self,"parent");



		if( frame >= 7 ){

			killentity(self);

		}

	        return;
    }
    if(animhandle==457)
    {


		void self = getlocalvar("self");

		void parent = getentityproperty(self,"parent");



		if( frame >= 7 ){

			killentity(self);

		}

	        return;
    }

}

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


		void self = getlocalvar("self");

		void parent = getentityproperty(self,"parent");



		if( frame >= 7 ){

			killentity(self);

		}

	        return;
    }
    if(animhandle==459)
    {


		void self = getlocalvar("self");

		void parent = getentityproperty(self,"parent");



		if( frame >= 7 ){

			killentity(self);

		}

	        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/narrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==460)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("bflash", 0, 0, 0);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==461)
    {
        if(frame==1)
        {
            suicide();
        }
        return;
    }
    if(animhandle==462)
    {
        if(frame==0)
        {
            ani0020(openborconstant("ANI_FOLLOW6"), openborconstant("ANI_PAIN3"));
        }
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/harrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==463)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==0)
        {
            spawn000("fboom", -20, 0, 0);
        }
        if(frame==0)
        {
            shooter2("fpillar", 15, 0, 0, 2, 0, 0);
        }
        if(frame==0)
        {
            shooter2("fpillar", -15, 0, 0, -2, 0, 0);
        }
        return;
    }
    if(animhandle==464)
    {
        if(frame==0)
        {
            velo001(6, 0, -6);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/frarrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==465)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("freezefx", 0, 0, 0);
        }
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==466)
    {
        if(frame==0)
        {
            spawn01("freezefx2", 15, 5, 2);
        }
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }

}

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


    	if(frame==0){

      	void vSelf = getlocalvar("self");

      	int r = rand()%30;



     	if(r > 0 && r <= 15){

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

        }



       	if(r > 15 && r <=30){

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

        }



    	}

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

}

#### animationscript function main #####
# data/chars/hawkeye/earrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==470)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("sflash", 0, 0, 0);
        }
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==471)
    {
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            spawn01("fxspark", 0, 0, 1);
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 0, 1);
        }
        if(frame==4)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==5)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==5)
        {
            spawn01("fxspark", 0, 0, 1);
        }
        if(frame==6)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==7)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==7)
        {
            spawn01("fxspark", 0, 0, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/triarrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==472)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("bflash", 0, 0, 0);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==473)
    {
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/darrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==476)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==477)
    {
        if(frame==0)
        {
            velo001(11, 0, -6);
        }
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW2");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/faisca/faisca.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==478)
    {
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==479)
    {
        if(frame==1)
        {
            changepal(1);
        }
        if(frame==1)
        {
            moveRandom(20, 20, 1);
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

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


if(frame == 25){

void self = getlocalvar("self");

killentity(self);

}

	        if(frame==4)
        {
            spawn01("faisca", 10, 15, 2);
        }
        if(frame==10)
        {
            spawn01("faisca", 15, 10, 2);
        }
        if(frame==16)
        {
            spawn01("faisca", 10, 15, 2);
        }
        if(frame==22)
        {
            spawn01("faisca", 15, 10, 2);
        }
        return;
    }
    if(animhandle==481)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hawkeye/_nave/_hawknave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==482)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            toss("beamNave", 65, 6, 1, 3, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==485)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==486)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==487)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==488)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==14)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==18)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==22)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        return;
    }
    if(animhandle==492)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==494)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==496)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


	if(frame==0){

	void vSelf = getlocalvar("self");

	int r = rand()%30;

	    if(r > 0){

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

	    }

	}

	        return;
    }
    if(animhandle==506)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==507)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==508)
    {
        if(frame==3)
        {
            shooter("narrow", 10, 42, -1, 6, 0, 0);
        }
        return;
    }
    if(animhandle==511)
    {


    void self = getlocalvar("self");

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

    if(x>=5)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            shooter("frarrow", 10, 42, -1, 2, 0, 0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==512)
    {


    void self = getlocalvar("self");

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

    if(x>=5)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            shooter("frarrow", 10, 42, -1, 2, 0, 0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==513)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==14)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==514)
    {


    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==515)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            shooter("triarrow", 10, 42, -10, 6, 0, 0);
        }
        if(frame==2)
        {
            shooter("triarrow", 10, 42, -1, 6, 0, 0);
        }
        if(frame==3)
        {
            shooter("triarrow", 10, 42, 10, 6, 0, 0);
        }
        if(frame==4)
        {
            shooter("triarrow", 10, 42, 0, 6, 0, 0);
        }
        if(frame==5)
        {
            shooter("triarrow", 10, 42, -10, 6, 0, 0);
        }
        if(frame==6)
        {
            shooter("triarrow", 10, 42, -1, 6, 0, 0);
        }
        if(frame==7)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==7)
        {
            velo001(4.5, NULL(), NULL());
        }
        if(frame==18)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==20)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==21)
        {
            noplayerJoin(0);
        }
        if(frame==21)
        {
            subjectScreen(1);
        }
        if(frame==21)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==516)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), 2.5);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==7)
        {
            noplayerJoin(0);
        }
        if(frame==7)
        {
            subjectScreen(1);
        }
        if(frame==7)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==517)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==518)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==519)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==520)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/hawkeye/shoot.wav");

	       int SFX2 = loadsample("data/chars/hawkeye/arrow2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r < 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==4)
        {
            shooter("narrow", 10, 42, -1, 2, 0, 0);
        }
        return;
    }
    if(animhandle==521)
    {


    void self = getlocalvar("self");

    if(frame==0){

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

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

    }



	        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==2)
        {
            toss("darrow", 23, 43, 0);
        }
        return;
    }
    if(animhandle==522)
    {


	if (frame==0){

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

       int arrowControl = getlocalvar("arrowControl"+self); // Get arrowControld state



        if (arrowControl>0){

        setlocalvar("arrowControl"+self, arrowControl-1);

        arrowControl = arrowControl-1;

        setglobalvar("arrowControl"+self, arrowControl);

        setglobalvar("flechaControl", arrowControl);

        } else {

        setlocalvar("arrowControl"+self, 5);

        arrowControl = 5;

        setglobalvar("arrowControl"+self, arrowControl);

        setglobalvar("flechaControl", arrowControl);

        }

        }

	        return;
    }
    if(animhandle==523)
    {
        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==0)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/hawkeye/u.wav");

	       int SFX2 = loadsample("data/chars/hawkeye/u2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r < 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(2, NULL(), 4.3);
        }
        if(frame==13)
        {
            velo001(1, NULL(), 2.0);
        }
        if(frame==19)
        {
            shooter("farrow", 10, 42, -1, 6, 0, 0);
        }
        return;
    }
    if(animhandle==524)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/hawkeye/call1.wav", "chars/hawkeye/call2.wav");
        }
        if(frame==3)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==525)
    {
        if(frame==0)
        {
            randSound0("chars/hawkeye/hyper.wav", "chars/hawkeye/hyper2.wav");
        }
        if(frame==0)
        {
            spawn01("super", 0, 25, 0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            leaper(-2, 3.5, 0);
        }
        if(frame==8)
        {
            toss("harrow", 23, 43, 0);
        }
        return;
    }
    if(animhandle==527)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==528)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==2)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==5)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==8)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        return;
    }
    if(animhandle==529)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }




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

   int arrowControl = getlocalvar("arrowControl"+self); // Get arrowControld state



	//if(arrowControl==NULL()){ // Localvar empty?

        //setlocalvar("arrowControl"+self, 0);

        //arrowControl = 0;

        //}



        if (frame==4)

        {

	 if (arrowControl==0){

	 int SFX = loadsample("data/chars/hawkeye/arrow2.wav");

	 playsample(SFX, 0, 120, 120, 100, 0);

	 shooter ("arrow",10,42,-1,7,0,0,0);

	 mpadd (2);

	 //setlocalvar("arrowControl"+self, arrowControl+1);

	 }



	  if (arrowControl==1){

	  int SFX = loadsample("data/chars/hawkeye/expa.wav");

	 playsample(SFX, 0, 120, 120, 100, 0);

	 shooter ("farrow",10,42,-1,4,0,0,0);

	 //setlocalvar("arrowControl"+self, arrowControl+1);

	 }



	  else if (arrowControl==2){

 	 int SFX = loadsample("data/chars/hawkeye/net.wav");

	 playsample(SFX, 0, 120, 120, 100, 0);

	 shooter ("narrow",10,42,-1,4,0,0,0);

	 //setlocalvar("arrowControl"+self, arrowControl+1);

	 }



	 else if (arrowControl==3){

	 int SFX = loadsample("data/chars/hawkeye/shoot.wav");

	 playsample(SFX, 0, 120, 120, 100, 0);

	 shooter ("earrow",10,42,-1,4,0,0,0);

	// setlocalvar("arrowControl"+self, arrowControl+1);

	 }



	 else if (arrowControl==4){

	 int SFX = loadsample("data/chars/hawkeye/freeze.wav");

	 playsample(SFX, 0, 120, 120, 100, 0);

	 shooter ("frarrow",10,42,-1,3,0,0,0);

	 //setlocalvar("arrowControl"+self, arrowControl+1);

	 }



	 else if (arrowControl==5){

	 int SFX = loadsample("data/chars/hawkeye/triple.wav");

	 playsample(SFX, 0, 120, 120, 100, 0);

 	 //setlocalvar("arrowControl"+self, 0);

 	 anichange("ANI_FREESPECIAL7");

	 }





        }



	        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==530)
    {


	if (frame==0){

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

       int arrowControl = getlocalvar("arrowControl"+self); // Get arrowControld state



        if (arrowControl<5){

        setlocalvar("arrowControl"+self, arrowControl+1);

        arrowControl = arrowControl+1;

        setglobalvar("arrowControl"+self, arrowControl);

        setglobalvar("flechaControl", arrowControl);

        } else {

        setlocalvar("arrowControl"+self, 0);

        arrowControl = 0;

        setglobalvar("arrowControl"+self, arrowControl);

        setglobalvar("flechaControl", arrowControl);

        }

        }

	        return;
    }
    if(animhandle==534)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/hawkeye/att3.wav");

	       int SFX2 = loadsample("data/chars/hawkeye/att4.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r < 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        return;
    }
    if(animhandle==535)
    {
        if(frame==4)
        {
            shooter("arrow", 10, 42, -1, 6, 0, 0);
        }
        return;
    }
    if(animhandle==537)
    {
        if(frame==7)
        {
            toss("darrow", 23, 43, 0);
        }
        return;
    }
    if(animhandle==538)
    {




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

   int arrowControl = getlocalvar("arrowControl"+self); // Get arrowControld state



	if(arrowControl==NULL()){ // Localvar empty?

        setlocalvar("arrowControl"+self, 0);

        arrowControl = 0;

        }



	        return;
    }
    if(animhandle==540)
    {
        if(frame==1)
        {
            velo001(3, 0, -3);
        }
        return;
    }
    if(animhandle==544)
    {


	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==545)
    {


	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==547)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==14)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==549)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==14)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==551)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==552)
    {
        if(frame==1)
        {
            toss("darrow", -23, 43, 0);
        }
        if(frame==2)
        {
            toss("darrow", 93, 43, -10);
        }
        if(frame==3)
        {
            toss("darrow", 3, 43, 25);
        }
        if(frame==4)
        {
            toss("darrow", 123, 43, 5);
        }
        if(frame==5)
        {
            toss("darrow", 153, 43, -20);
        }
        if(frame==6)
        {
            toss("darrow", 193, 43, 45);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/crack/crackG.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==558)
    {
        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==559)
    {
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

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

}

#### animationscript function main #####
# data/chars/hulk/hsat.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==561)
    {
        if(frame==1)
        {
            spawnRandom("faiscah", 15, 5);
        }
        if(frame==2)
        {
            spawnRandom("faiscah", 15, 5);
        }
        if(frame==3)
        {
            spawnRandom("faiscah", 15, 5);
        }
        if(frame==4)
        {
            spawn000("gboom", 0, 0, 2);
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/laser/laserp.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==563)
    {
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

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


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);



	if(frame==0){

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

	}

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

	setentityvar(self, 1, NULL());

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

	}

	        if(frame==1)
        {
            dasher(5, 0, 0);
        }
        return;
    }
    if(animhandle==567)
    {
        if(frame==1)
        {
            dasher(-5, 0, 0);
        }
        return;
    }
    if(animhandle==568)
    {
        if(frame==0)
        {
            dasher(0, 0, 0);
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==569)
    {


	void self = getlocalvar("self");

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



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

    int ypos = openborvariant("ypos");

    int zoom = 256 + (z - 160 - ypos-30) * 2;

    if(zoom < 0) {zoom = 0;}

    setdrawmethod(self, 1, zoom, zoom, 0, 0, 0, -1);

	        if(frame==0)
        {
            changepal(1);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==570)
    {
        if(frame==0)
        {
            randomJumpZ(2, 3, 1);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==571)
    {
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/hulk/_nave/_hulknave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==572)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            shooter("laserp", 39, 75, 0, 5, 0, 0);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            shooter("laserp", 39, 75, 0, 5, 0, 0);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        if(frame==10)
        {
            keymove(2, 0.6);
        }
        if(frame==11)
        {
            keymove(2, 0.6);
        }
        if(frame==12)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==573)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==574)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==575)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==576)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        if(frame==1)
        {
            changeName("Dr._Banner");
        }
        return;
    }
    if(animhandle==577)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==581)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            spawnAni("joh", 50, 30, 0, "ANI_FOLLOW1", 5, 0, 0);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        if(frame==10)
        {
            keymove(2, 0.6);
        }
        if(frame==11)
        {
            keymove(2, 0.6);
        }
        if(frame==12)
        {
            keymove(2, 0.6);
        }
        if(frame==13)
        {
            keymove(2, 0.6);
        }
        if(frame==14)
        {
            keymove(2, 0.6);
        }
        if(frame==15)
        {
            keymove(2, 0.6);
        }
        if(frame==16)
        {
            keymove(2, 0.6);
        }
        if(frame==17)
        {
            keymove(2, 0.6);
        }
        if(frame==18)
        {
            keymove(2, 0.6);
        }
        if(frame==19)
        {
            keymove(2, 0.6);
        }
        if(frame==20)
        {
            keymove(2, 0.6);
        }
        if(frame==21)
        {
            keymove(2, 0.6);
        }
        if(frame==22)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==582)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==584)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==586)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            changeName("Dr._Banner");
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==589)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            changeName("Dr._Banner");
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==591)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==592)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==597)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        if(frame==0)
        {
            depost(0);
        }
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==598)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==600)
    {
        if(frame==0)
        {
            depost(0);
        }
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==601)
    {
        if(frame==0)
        {
            randSound("chars/hulk/spec1.wav", "chars/hulk/spec2.wav", "chars/hulk/att5.wav");
        }
        return;
    }
    if(animhandle==603)
    {
        if(frame==5)
        {
            dasher(0.75, -2.5, NULL());
        }
        if(frame==5)
        {
            randSound("chars/hulk/att4.wav", "chars/hulk/att5.wav", "chars/hulk/free1a.wav");
        }
        if(frame==6)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==9)
        {
            anichangeattack("ANI_FOLLOW4");
        }
        return;
    }
    if(animhandle==605)
    {
        if(frame==0)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==0)
        {
            spawn01("stomprock", 0, 0, 0);
        }
        if(frame==0)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }
    if(animhandle==606)
    {


        void self = getlocalvar("self");

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

        if(x>=5)

        {

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

        }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==607)
    {
        if(frame==2)
        {
            dasher(0.75, -2.5, NULL());
        }
        if(frame==4)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }
    if(animhandle==608)
    {


        void self = getlocalvar("self");

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

        if(x>=5)

        {

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

        }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==609)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==8)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==610)
    {


    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==611)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==8)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==11)
        {
            noplayerJoin(0);
        }
        if(frame==11)
        {
            subjectScreen(1);
        }
        if(frame==11)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==612)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==8)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(0, 0, 0);
        }
        if(frame==10)
        {
            randSound0("chars/hulk/call1.wav", "chars/hulk/call2.wav");
        }
        if(frame==11)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==11)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==13)
        {
            noplayerJoin(0);
        }
        if(frame==13)
        {
            subjectScreen(1);
        }
        if(frame==13)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==613)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==614)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==615)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==617)
    {


    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==1)
        {
            velo001(1, 0, -60);
        }
        return;
    }
    if(animhandle==618)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/hulk/free1a.wav");

	       int SFX2 = loadsample("data/chars/hulk/free1b.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==2)
        {
            shooter("hwave", 40, 40, 0, 3, 0, 0, 0);
        }
        return;
    }
    if(animhandle==619)
    {
        if(frame==1)
        {
            spawn01("super", 0, 20, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            randSound0("chars/hulk/hyper.wav", "chars/hulk/hyper2.wav");
        }
        if(frame==6)
        {
            shooter2("hsat", 0, 79, -1, 0.2, -20, 0, 0);
        }
        return;
    }
    if(animhandle==620)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/hulk/call1.wav", "chars/hulk/call2.wav");
        }
        if(frame==2)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==621)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/hulk/free1a.wav");

	       int SFX2 = loadsample("data/chars/hulk/free1b.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        return;
    }
    if(animhandle==622)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==2)
        {
            velo001(1, 0, 7);
        }
        if(frame==4)
        {
            randSound0("chars/hulk/att4.wav", "chars/hulk/att3.wav");
        }
        if(frame==5)
        {
            anichangeattack("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==623)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==624)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==1)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==2)
        {
            position(1, 18, 50, -1, 0);
        }
        if(frame==3)
        {
            position(10, 8, 72, -1, 1);
        }
        if(frame==4)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==5)
        {
            hurt2(25);
        }
        if(frame==5)
        {
            antiwall(15, -55, 0);
        }
        if(frame==5)
        {
            position(14, 33, 2, -1, 0);
        }
        if(frame==5)
        {
            spawn01("stompfx", 10, 0, 0);
        }
        if(frame==5)
        {
            spawn01("crack", 10, 0, -1);
        }
        if(frame==6)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==7)
        {
            position(1, 18, 50, -1, 0);
        }
        if(frame==8)
        {
            position(10, 8, 72, -1, 1);
        }
        if(frame==9)
        {
            antiwall(15, -55, 0);
        }
        if(frame==9)
        {
            move(-20, 2, 0);
        }
        if(frame==9)
        {
            position(14, 14, 2, -1, 0);
        }
        if(frame==9)
        {
            spawn01("stompfx", 10, 0, 0);
        }
        if(frame==9)
        {
            spawn01("crack", 10, 0, -1);
        }
        if(frame==10)
        {
            depost(0);
        }
        if(frame==10)
        {
            finish(50, 2, 2, 2, 0, 0);
        }
        if(frame==11)
        {
            clearL();
        }
        return;
    }
    if(animhandle==626)
    {
        if(frame==1)
        {
            keyint("ANI_FOLLOW4", 0, "UJ", 0, 0);
        }
        return;
    }
    if(animhandle==630)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(1, 30, 44, -1, 0);
        }
        if(frame==1)
        {
            antiwall(-15, 35, 0);
        }
        if(frame==1)
        {
            position(1, 0, 24, -1, 0);
        }
        if(frame==1)
        {
            depost(0);
        }
        if(frame==1)
        {
            throw(45, 2, 8, 1, 0, 0);
        }
        if(frame==2)
        {
            clearL();
        }
        return;
    }
    if(animhandle==632)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==1)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==2)
        {
            position(1, 18, 50, -1, 0);
        }
        if(frame==3)
        {
            position(10, 8, 72, -1, 1);
        }
        if(frame==4)
        {
            antiwall(15, -55, 0);
        }
        if(frame==4)
        {
            move(-20, 2, 0);
        }
        if(frame==4)
        {
            position(14, 14, 2, -1, 0);
        }
        if(frame==4)
        {
            spawn01("stompfx", 10, 0, 0);
        }
        if(frame==4)
        {
            spawn01("crack", 10, 0, -1);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            finish(50, 2, 2, 2, 0, 0);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==633)
    {
        if(frame==0)
        {
            randSound0("chars/hulk/extra1.wav", "chars/hulk/extra2.wav");
        }
        return;
    }
    if(animhandle==638)
    {
        if(frame==2)
        {
            velo001(2.5, 0, -2.5);
        }
        if(frame==3)
        {
            spawn01("stompfx", 10, 0, 0);
        }
        if(frame==7)
        {
            anichangeattack("ANI_FOLLOW7");
        }
        return;
    }
    if(animhandle==640)
    {
        if(frame==0)
        {
            depost(0);
        }
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==641)
    {


	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==642)
    {


	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==644)
    {
        if(frame==2)
        {
            dasher(1, 0, 0);
        }
        if(frame==3)
        {
            dasher(0.5, 0, 0);
        }
        if(frame==4)
        {
            dasher(0, 0, 0);
        }
        return;
    }
    if(animhandle==646)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==648)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==649)
    {
        if(frame==1)
        {
            anichange("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==650)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/hulk/spec1.wav");

	       int SFX2 = loadsample("data/chars/hulk/spec2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==2)
        {
            spawn01("stompfx", 0, 0, 1);
        }
        if(frame==2)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==6)
        {
            spawn01("stompfx", 0, 0, 1);
        }
        if(frame==10)
        {
            spawn01("stompfx", 0, 0, 1);
        }
        if(frame==10)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/thor/lthunder.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==654)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 80, 1);
        }
        if(frame==4)
        {
            spawn01("fxspark", 0, 40, 1);
        }
        return;
    }
    if(animhandle==655)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/thor/thunder/nthunder.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==658)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 40, 1);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 90, 1);
        }
        return;
    }
    if(animhandle==659)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/aHelper/proj/gt.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==660)
    {
        if(frame==1)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==23)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==661)
    {


	void self = getlocalvar("self");

	int r = rand()%30;

	if (frame==1)

	{

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

	   if(r > 0){

	   changeentityproperty(self, "direction", 1);

                 } else {

           changeentityproperty(self, "direction", 0);

                 }

       	}

	        if(frame==1)
        {
            randomteleonscreen();
        }
        if(frame==1)
        {
            antiwallRandom(1);
        }
        if(frame==3)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==25)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==662)
    {


	void self = getlocalvar("self");

	int r = rand()%30;

	if (frame==1)

	{

           if(r > 0){

	   changeentityproperty(self, "direction", 1);

                 } else {

           changeentityproperty(self, "direction", 0);

                 }

       	}

	        if(frame==1)
        {
            randomteleonscreen();
        }
        if(frame==1)
        {
            antiwallRandom(1);
        }
        if(frame==3)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==25)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==663)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/thor/_nave/_thornave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==664)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==0)
        {
            shooter("biospark", 48, 29, 1, 4, 0, 0);
        }
        return;
    }
    if(animhandle==667)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==668)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==669)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            velo001(5, 0, 0);
        }
        return;
    }
    if(animhandle==670)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==2)
        {
            velo001(4, 0, 0);
        }
        if(frame==3)
        {
            randSound("chars/thor/fs2.wav", "data/chars/thor/att3.wav", "data/chars/thor/att4.wav");
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 0, 1);
        }
        if(frame==5)
        {
            spawn01("fxspark", 10, 0, 1);
        }
        if(frame==7)
        {
            spawn01("fxspark", 0, 4, 1);
        }
        if(frame==10)
        {
            spawn01("fxspark", 10, 5, 1);
        }
        return;
    }
    if(animhandle==674)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==676)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==678)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==681)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==684)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/gshock2/gshock2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==685)
    {
        if(frame==17)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==686)
    {


	void self = getlocalvar("self");

	if (frame==0)

	{

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

       	}

	        if(frame==17)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==687)
    {


	void self = getlocalvar("self");

	if (frame==0)

	{

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

       	}

	        if(frame==17)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==688)
    {
        if(frame==23)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==694)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==698)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==699)
    {
        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==1)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==10)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==12)
        {
            spawn01("gt", 0, 0, 0);
        }
        return;
    }
    if(animhandle==700)
    {


    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 + 30);

    }

	        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(7, 0, 56, -1, 0);
        }
        if(frame==1)
        {
            position(7, 0, 70, -1, 0);
        }
        if(frame==2)
        {
            position(13, 35, 44, -1, 1);
        }
        if(frame==3)
        {
            position(14, 14, 14, 1, 1);
        }
        if(frame==3)
        {
            velo001(0, 0, -6);
        }
        if(frame==3)
        {
            spawnAni("cdust", 4, 14, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==4)
        {
            position(19, 14, 14, 1, 1);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(50, 2, 0, -4, 0, 0);
        }
        if(frame==4)
        {
            spawn01("stompfx", 0, 0, 2);
        }
        if(frame==4)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==701)
    {


	void self = getlocalvar("self");

    if(frame==0){

      int eTime = openborvariant("elapsed_time");



      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 60);

      changeentityproperty(self,"blink",1);

    }

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

    if (y>135){

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

    }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 1.5);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        return;
    }
    if(animhandle==702)
    {


    void self = getlocalvar("self");

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

    if(x>=30)

    {

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=30)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==704)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            velo001(3.5, NULL(), 2.5);
        }
        if(frame==9)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==705)
    {


    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==706)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("fxspark", 60, 60, 1);
        }
        if(frame==6)
        {
            spawn01("fxspark", 120, 60, 1);
        }
        if(frame==10)
        {
            spawn01("fxspark", 180, 50, 1);
        }
        if(frame==14)
        {
            spawn01("fxspark", 240, 40, 1);
        }
        if(frame==18)
        {
            spawn01("fxspark", 300, 60, 1);
        }
        if(frame==21)
        {
            spawn01("fxspark", 360, 40, 1);
        }
        if(frame==24)
        {
            anichangeattack("ANI_FOLLOW61");
        }
        return;
    }
    if(animhandle==707)
    {
        if(frame==0)
        {
            move(-40, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("fxspark", 35, 20, 1);
        }
        if(frame==2)
        {
            velo001(6, 0, -5);
        }
        if(frame==3)
        {
            spawnAni("cdust", 4, 39, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==4)
        {
            spawn01("fxspark", 10, 25, 1);
        }
        if(frame==5)
        {
            spawn01("fxspark", -10, 10, 1);
        }
        if(frame==6)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==7)
        {
            spawn01("stompfx", 15, 0, 2);
        }
        if(frame==7)
        {
            spawn01("crack", 15, 0, -1);
        }
        if(frame==7)
        {
            spawn01("GRSpark", 46, 0, 0);
        }
        if(frame==7)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==8)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==16)
        {
            spawnAni("gt", 65, 0, 0, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==29)
        {
            degravity(0);
        }
        if(frame==29)
        {
            noplayerJoin(0);
        }
        if(frame==29)
        {
            subjectScreen(1);
        }
        if(frame==29)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==708)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==709)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==710)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==711)
    {


	if(frame==9)

	{

	       int SFX1 = loadsample("data/chars/thor/fs1a.wav");

	       int SFX2 = loadsample("data/chars/thor/fs1b.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==9)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==10)
        {
            spawn01("fxspark", 60, 60, 1);
        }
        if(frame==14)
        {
            spawn01("fxspark", 120, 60, 1);
        }
        if(frame==18)
        {
            spawn01("fxspark", 180, 50, 1);
        }
        if(frame==22)
        {
            spawn01("fxspark", 240, 40, 1);
        }
        if(frame==26)
        {
            spawn01("fxspark", 300, 60, 1);
        }
        if(frame==29)
        {
            spawn01("fxspark", 360, 40, 1);
        }
        return;
    }
    if(animhandle==712)
    {
        if(frame==4)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==4)
        {
            randSound0("chars/thor/runa.wav", "chars/thor/respect.wav");
        }
        if(frame==6)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==7)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==8)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==713)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(2.5, 0, 4);
        }
        return;
    }
    if(animhandle==714)
    {


    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==0)
        {
            randSound0("chars/thor/fs2.wav", "data/chars/thor/fs1b.wav");
        }
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==1)
        {
            spawn01("fxspark", 35, 20, 1);
        }
        if(frame==2)
        {
            velo001(4, 0, -4);
        }
        if(frame==3)
        {
            spawnAni("cdust", 4, 39, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==4)
        {
            spawn01("fxspark", 10, 25, 1);
        }
        if(frame==5)
        {
            spawn01("fxspark", -10, 10, 1);
        }
        if(frame==6)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==7)
        {
            spawn01("stompfx", 15, 0, 2);
        }
        if(frame==7)
        {
            spawn01("crack", 15, 0, -1);
        }
        if(frame==7)
        {
            spawn01("GRSpark", 46, 0, 0);
        }
        if(frame==7)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==8)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==715)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(0, 0, 6);
        }
        return;
    }
    if(animhandle==716)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==717)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

        changeentityproperty(self, "subject_to_gravity", 1);

    }

	        if(frame==0)
        {
            randSound0("chars/thor/fs2.wav", "data/chars/thor/fs1b.wav");
        }
        if(frame==1)
        {
            spawn01("fxspark", 35, 20, 1);
        }
        if(frame==2)
        {
            velo001(4, 0, -4);
        }
        if(frame==3)
        {
            spawnAni("cdust", 4, 39, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==4)
        {
            spawn01("fxspark", 10, 25, 1);
        }
        if(frame==5)
        {
            spawn01("fxspark", -10, 10, 1);
        }
        if(frame==6)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==7)
        {
            spawn01("stompfx", 15, 0, 2);
        }
        if(frame==7)
        {
            spawn01("crack", 15, 0, -1);
        }
        if(frame==7)
        {
            spawn01("GRSpark", 46, 0, 0);
        }
        if(frame==7)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==8)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==718)
    {
        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 1.5);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keyflip();
        }
        if(frame==5)
        {
            keymove(1.5);
        }
        if(frame==5)
        {
            keyflip();
        }
        return;
    }
    if(animhandle==719)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==720)
    {


	void self = getlocalvar("self");

    	int Map = getentityproperty(self, "map");

    	void target = findtarget(self);

    	if(Map>=3&&Map<=5){

      performattack(self, openborconstant("ANI_FREESPECIAL10")); //Attack!

    }

	        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(2, 0, 4);
        }
        return;
    }
    if(animhandle==721)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/thor/call1.wav", "chars/thor/call2.wav");
        }
        if(frame==4)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==722)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(4, 0, 1);
        }
        if(frame==2)
        {
            velo001(2, 0, 0);
        }
        if(frame==3)
        {
            velo001(1, 0, 0);
        }
        if(frame==4)
        {
            velo001(0.5, 0, 0);
        }
        return;
    }
    if(animhandle==723)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/thor/god.wav");

	       int SFX2 = loadsample("data/chars/thor/god2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(1, 0, 4);
        }
        if(frame==6)
        {
            spawn01("super", 0, 80, 0);
        }
        if(frame==6)
        {
            velo001(0, 0, -6);
        }
        if(frame==7)
        {
            spawn01("gshock2", 0, 0, 2);
        }
        if(frame==7)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==7)
        {
            shooter("lthunder", 10, 0, 0, 4, 0, 0);
        }
        if(frame==7)
        {
            shooter("lthunder", 10, 0, 0, -4, 0, 0);
        }
        if(frame==8)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }
    if(animhandle==725)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==726)
    {
        if(frame==1)
        {
            velo001(3.5, NULL(), 2.5);
        }
        return;
    }
    if(animhandle==727)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 35, 1, -1, 0);
        }
        if(frame==1)
        {
            position(7, -7, 73, -1, 0);
        }
        if(frame==2)
        {
            position(13, 35, 44, -1, 1);
        }
        if(frame==3)
        {
            position(19, 15, 35, 1, 1);
        }
        if(frame==3)
        {
            depost(0);
        }
        if(frame==3)
        {
            throw(25, 2, 0, -4, 0, 0);
        }
        if(frame==8)
        {
            spawnAni("gshock2", 0, 0, 2, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==8)
        {
            spawn01("stompfx", 0, 0, 2);
        }
        if(frame==8)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==12)
        {
            clearL();
        }
        return;
    }
    if(animhandle==728)
    {
        if(frame==0)
        {
            randSound0("chars/thor/throw3.wav", "chars/thor/throw4.wav");
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(NULL(), NULL(), 5);
        }
        return;
    }
    if(animhandle==733)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(1, 30, 44, -1, 0);
        }
        if(frame==1)
        {
            position(1, 0, 24, 1, 0);
        }
        if(frame==1)
        {
            depost(0);
        }
        if(frame==1)
        {
            throw(45, 2, 8, 1, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/thor/att3.wav", "chars/thor/att4.wav");
        }
        if(frame==2)
        {
            clearL();
        }
        return;
    }
    if(animhandle==734)
    {
        if(frame==4)
        {
            spawnAni("gt", 25, 0, 0, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==735)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 35, 1, -1, 0);
        }
        if(frame==1)
        {
            position(1, 24, 43, -1, 0);
        }
        if(frame==2)
        {
            position(1, 17, 56, -1, 0);
        }
        if(frame==3)
        {
            position(7, 0, 56, -1, 0);
        }
        if(frame==4)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(2, NULL(), 4);
        }
        if(frame==4)
        {
            position(10, 0, 56, -1, 0);
        }
        if(frame==5)
        {
            position(10, 0, 56, -1, 1);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(35, 2, 6, -8, 0, 1);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==736)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 35, 1, -1, 0);
        }
        if(frame==1)
        {
            position(1, 24, 43, -1, 0);
        }
        if(frame==2)
        {
            position(1, 17, 56, -1, 0);
        }
        if(frame==2)
        {
            randSound0("chars/thor/att3.wav", "chars/thor/att4.wav");
        }
        if(frame==3)
        {
            position(1, 0, 71, 1, 0);
        }
        if(frame==3)
        {
            depost(0);
        }
        if(frame==3)
        {
            throw(35, 5, 0, 5, 0, 0);
        }
        if(frame==4)
        {
            clearL();
        }
        return;
    }
    if(animhandle==743)
    {


	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==744)
    {


	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==746)
    {


	void self = getlocalvar("self");

    	int Map = getentityproperty(self, "map");

    	void target = findtarget(self);

    	if(Map>=3&&Map<=5){

      performattack(self, openborconstant("ANI_FREESPECIAL11")); //Attack!

    }

	        if(frame==4)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==4)
        {
            randSound0("chars/thor/runa.wav", "chars/thor/respect.wav");
        }
        if(frame==6)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==7)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==8)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==747)
    {
        if(frame==0)
        {
            randSound0("chars/thor/select.wav", "chars/thor/intro.wav");
        }
        return;
    }
    if(animhandle==748)
    {
        if(frame==2)
        {
            anichange("ANI_FOLLOW1");
        }
        return;
    }
    if(animhandle==749)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/thor/spec1.wav");

	       int SFX2 = loadsample("data/chars/thor/spec2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        return;
    }

}

#### animationscript function main #####
# data/chars/vision/beam/vbeam.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==755)
    {


if(frame == 6){

void self = getlocalvar("self");

killentity(self);

}

	        return;
    }

}

#### animationscript function main #####
# data/chars/vision/_nave/_visionnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==758)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            toss("laserp", 25, 30, 1, 4, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==759)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==760)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==761)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==762)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==763)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==767)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==769)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==771)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==777)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==778)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/vision/vision.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==779)
    {
        if(frame==0)
        {
            velo001(0.05, 0, 0);
        }
        return;
    }
    if(animhandle==781)
    {


	if(frame==0){

      	void vSelf = getlocalvar("self");

      	int r = rand()%30;



      	if(r > 0){

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

      	}

    	 }

	        if(frame==1)
        {
            velo001(0.8, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==782)
    {
        if(frame==2)
        {
            spawnbind("vblast", 0, 0, 0);
        }
        return;
    }
    if(animhandle==783)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==784)
    {
        if(frame==0)
        {
            randSound("chars/vision/sound/voice9.wav", "chars/vision/sound/voice8.wav", "chars/vision/sound/voice9.wav");
        }
        return;
    }
    if(animhandle==786)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==787)
    {


	void self = getlocalvar("self");

    if(frame==0){

      int eTime = openborvariant("elapsed_time");



      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 90);

      changeentityproperty(self,"blink",1);

    }

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

    if (y>135){

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

    }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 1.5);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keyflip();
        }
        if(frame==5)
        {
            keymove(1.5);
        }
        if(frame==5)
        {
            keyflip();
        }
        if(frame==6)
        {
            keymove(1.5);
        }
        if(frame==6)
        {
            keyflip();
        }
        if(frame==7)
        {
            keymove(1.5);
        }
        if(frame==7)
        {
            keyflip();
        }
        if(frame==8)
        {
            keymove(1.5);
        }
        if(frame==8)
        {
            keyflip();
        }
        return;
    }
    if(animhandle==788)
    {


    void self = getlocalvar("self");

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

    if(frame==1)

    {

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

    }

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


    void self = getlocalvar("self");

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

    if(frame==1)

    {

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

    }

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


        void self = getlocalvar("self");

        if(frame==0)

        {

        changeentityproperty(self, "position", 145, 189, 0);

        }

	        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==5)
        {
            velo001(1, 0, 3);
        }
        return;
    }
    if(animhandle==791)
    {


    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==792)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            move(240, 0, 0);
        }
        if(frame==14)
        {
            spawnbind("vblast", 0, 0, 0);
        }
        if(frame==16)
        {
            noplayerJoin(0);
        }
        if(frame==16)
        {
            subjectScreen(1);
        }
        if(frame==16)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==793)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            move(300, 0, 0);
        }
        if(frame==12)
        {
            noplayerJoin(0);
        }
        if(frame==12)
        {
            subjectScreen(1);
        }
        if(frame==12)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==794)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==795)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==796)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==797)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/vision/sound/solar.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            spawnbind("vbeam", 6, 0, 1, 0, 4);
        }
        return;
    }
    if(animhandle==799)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

        changeentityproperty(self, "subject_to_gravity", 1);

    }

	        if(frame==2)
        {
            spawnAni("cdust", 9, 25, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        return;
    }
    if(animhandle==800)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==801)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01map("vfree", 0, 0, 0);
        }
        if(frame==7)
        {
            velo001(1, 0, 3);
        }
        return;
    }
    if(animhandle==802)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound2("chars/vision/sound/voice1.wav", "chars/vision/sound/voice4.wav", "chars/vision/sound/voice13.wav", "chars/vision/sound/voice14.wav", "chars/vision/sound/voice4.wav", "chars/vision/sound/voice1.wav");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==803)
    {


    if(frame==2){

      int eTime = openborvariant("elapsed_time");

	void self = getlocalvar("self");

      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 4000);

      changeentityproperty(self,"blink",2);

    }

	        if(frame==0)
        {
            randSound("chars/vision/sound/cannot.wav", "chars/vision/sound/shoot1.wav", "chars/vision/sound/density_d.wav");
        }
        if(frame==2)
        {
            spawn01("super", -8, 60, 0);
        }
        return;
    }
    if(animhandle==804)
    {
        if(frame==4)
        {
            mpcost(1);
        }
        if(frame==4)
        {
            aniNHoldSwitch("ANI_CANT", "A2");
        }
        return;
    }
    if(animhandle==805)
    {
        if(frame==0)
        {
            stealthMode(300);
        }
        if(frame==5)
        {
            keymove(2);
        }
        if(frame==6)
        {
            keymove(2);
        }
        if(frame==7)
        {
            keymove(2);
        }
        if(frame==8)
        {
            keymove(2);
        }
        if(frame==9)
        {
            keymove(2);
        }
        if(frame==21)
        {
            stealthMode(0);
        }
        if(frame==21)
        {
            beidle();
        }
        return;
    }
    if(animhandle==806)
    {
        if(frame==0)
        {
            stealthMode(300);
        }
        if(frame==11)
        {
            keymove(2);
        }
        if(frame==12)
        {
            keymove(2);
        }
        if(frame==13)
        {
            keymove(2);
        }
        if(frame==14)
        {
            keymove(2);
        }
        if(frame==15)
        {
            keymove(2);
        }
        if(frame==27)
        {
            stealthMode(0);
        }
        if(frame==27)
        {
            beidle();
        }
        return;
    }
    if(animhandle==807)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

    } else if(frame==26){

      setidle(self, openborconstant("ANI_IDLE"));

    }



	        if(frame==1)
        {
            dasher(1, 10, 0);
        }
        if(frame==22)
        {
            dasher(0, -30, 0);
        }
        if(frame==23)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==23)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }
    if(animhandle==811)
    {
        if(frame==2)
        {
            spawnbind("vblast", 0, 0, 0);
        }
        return;
    }
    if(animhandle==812)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 25, 10, -1, 0);
        }
        if(frame==6)
        {
            position(4, 15, 39, -1, 0);
        }
        if(frame==7)
        {
            position(7, -8, 51, -1, 0);
        }
        if(frame==8)
        {
            position(7, -10, 30, -1, 0);
        }
        if(frame==9)
        {
            depost(0);
        }
        if(frame==9)
        {
            throw(25, 2, 8, 1, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        return;
    }
    if(animhandle==813)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 25, 10, -1, 0);
        }
        if(frame==1)
        {
            position(4, 13, 49, -1, 0);
        }
        if(frame==2)
        {
            position(7, -12, 51, -1, 0);
        }
        if(frame==3)
        {
            position(7, -8, 61, -1, 0);
        }
        if(frame==11)
        {
            position(7, -8, 30, -1, 0);
        }
        if(frame==12)
        {
            depost(0);
        }
        if(frame==12)
        {
            throw(25, 2, -10, 1, 0, 0);
        }
        if(frame==12)
        {
            clearL();
        }
        return;
    }
    if(animhandle==815)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==816)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==817)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==819)
    {
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==1)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==5)
        {
            keymove(1.5);
        }
        if(frame==6)
        {
            keymove(1.5);
        }
        if(frame==7)
        {
            keymove(1.5);
        }
        return;
    }
    if(animhandle==821)
    {


	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==822)
    {


	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==823)
    {


        void self = getlocalvar("self");

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

	int r = rand()%900;



	if (frame==1)

	{

	if (hpfx == 54)	playSound("data/chars/vision/sound/voice7.wav");

	else if (hpfx == 78) playSound("data/chars/vision/sound/78.wav");

	else if (hpfx == 2) playSound("data/chars/vision/sound/voice8.wav");

	else if (hpfx <= 6) playSound("data/chars/vision/sound/035pct.wav");

	else if (r<=-50) playSound("data/chars/vision/sound/voice6.wav");

	else if (r<=50) playSound("data/chars/vision/sound/voice5.wav");

	else playSound("data/sounds/null.wav");

	}

	        return;
    }
    if(animhandle==824)
    {
        if(frame==2)
        {
            spawn01("vblast", 0, 0, 0);
        }
        return;
    }
    if(animhandle==826)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3.5, 0, 2.6);
        }
        return;
    }
    if(animhandle==828)
    {
        if(frame==1)
        {
            randSound2("chars/vision/sound/voice1.wav", "chars/vision/sound/voice4.wav", "chars/vision/sound/voice13.wav", "chars/vision/sound/voice14.wav", "chars/vision/sound/voice4.wav", "chars/vision/sound/voice1.wav");
        }
        return;
    }
    if(animhandle==829)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==831)
    {
        if(frame==2)
        {
            spawnbind("vburst", 0, 0, 0, 0, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/ward/ward.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==835)
    {
        if(frame==0)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==16)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==836)
    {
        if(frame==0)
        {
            checkStageType("air", "ANI_FOLLOW1");
        }
        if(frame==0)
        {
            checkStageType("underwater", "ANI_FOLLOW2");
        }
        if(frame==2)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 10, 0, 0);
        }
        if(frame==9)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", -10, 20, 0);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==837)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            dasher(0, 8, 0);
        }
        if(frame==0)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==1)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==7)
        {
            randomteleonscreen();
        }
        if(frame==7)
        {
            antiwallRandom(1);
        }
        if(frame==8)
        {
            dasher(0, -10, 0);
        }
        if(frame==8)
        {
            spawn01("po", 0, 50, 0);
        }
        if(frame==9)
        {
            spawn01("po", 0, 50, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/warmachine/wmissile.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==839)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==840)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==841)
    {
        if(frame==0)
        {
            spawn01("po", -32, 0, 0);
        }
        if(frame==0)
        {
            antiwallCollide(20, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            antiwallCollide(20, "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            spawn01("po", -32, 0, 0);
        }
        if(frame==2)
        {
            antiwallCollide(20, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            antiwallCollide(20, "ANI_FOLLOW1");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/warmachine/smb.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==843)
    {
        if(frame==0)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==1)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==2)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==3)
        {
            antiwallturn(10, 5, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/warmachine/_nave/_warnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==844)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}





	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("balaP", 60, 40, 0, 5, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==845)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}

	        return;
    }
    if(animhandle==847)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==848)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==849)
    {
        if(frame==4)
        {
            noplayerJoin(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==850)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}

	        if(frame==0)
        {
            keymove(3, 0.6);
        }
        if(frame==0)
        {
            randSound("data/chars/warmachine/repulsor.wav", "chars/warmachine/att_4-1.wav", "chars/warmachine/att_4-2.wav");
        }
        if(frame==1)
        {
            keymove(3, 0.6);
        }
        if(frame==2)
        {
            keymove(3, 0.6);
        }
        if(frame==3)
        {
            toss("missile", 55, 36, 0);
        }
        if(frame==3)
        {
            keymove(3, 0.6);
        }
        if(frame==4)
        {
            keymove(3, 0.6);
        }
        if(frame==5)
        {
            keymove(3, 0.6);
        }
        if(frame==6)
        {
            keymove(3, 0.6);
        }
        if(frame==7)
        {
            keymove(3, 0.6);
        }
        if(frame==8)
        {
            keymove(3, 0.6);
        }
        if(frame==9)
        {
            keymove(3, 0.6);
        }
        if(frame==10)
        {
            toss("missile", 78, 8, 0);
        }
        if(frame==10)
        {
            keymove(3, 0.6);
        }
        if(frame==11)
        {
            keymove(3, 0.6);
        }
        if(frame==12)
        {
            keymove(3, 0.6);
        }
        if(frame==13)
        {
            keymove(3, 0.6);
        }
        if(frame==14)
        {
            keymove(3, 0.6);
        }
        if(frame==15)
        {
            keymove(3, 0.6);
        }
        if(frame==16)
        {
            keymove(3, 0.6);
        }
        if(frame==17)
        {
            keymove(3, 0.6);
        }
        return;
    }
    if(animhandle==854)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==856)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==858)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        return;
    }
    if(animhandle==860)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}

	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("beam", 65, 6, 1, 3, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==861)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}

	        return;
    }
    if(animhandle==864)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}

	        return;
    }

}

#### animationscript function main #####
# data/chars/warmachine/cmissile.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==865)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==872)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        if(frame==0)
        {
            gravity(1);
        }
        if(frame==0)
        {
            mpadd(10);
        }
        if(frame==2)
        {
            spawn01("pom", 0, 0, 0);
        }
        return;
    }
    if(animhandle==873)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==876)
    {
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==4)
        {
            spawn01("pom", 0, 0, 0);
        }
        return;
    }
    if(animhandle==878)
    {
        if(frame==5)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==879)
    {
        if(frame==7)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==880)
    {
        if(frame==1)
        {
            spawn01("po", -22, 14, 0);
        }
        if(frame==3)
        {
            spawn01("po", -22, 14, 0);
        }
        if(frame==4)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(2, 0, 5.3);
        }
        if(frame==4)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==5)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==6)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==7)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==8)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==9)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==10)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==11)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==12)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==13)
        {
            spawn01("po", 0, 4, 0);
        }
        if(frame==15)
        {
            anichangeattack("ANI_FOLLOW11");
        }
        return;
    }
    if(animhandle==881)
    {
        if(frame==0)
        {
            position(0, -1, 10, -1, 0);
        }
        if(frame==0)
        {
            depost(0);
        }
        if(frame==0)
        {
            throw(35, 2, 6, 1.5, 0, 0);
        }
        if(frame==0)
        {
            clearL();
        }
        if(frame==0)
        {
            velo001(-6, NULL(), NULL());
        }
        if(frame==0)
        {
            randSound0("chars/warmachine/whimp.wav", "chars/warmachine/att_4-1.wav");
        }
        if(frame==1)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==2)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==882)
    {


	void self = getlocalvar("self");

    if(frame==0){

      int eTime = openborvariant("elapsed_time");



      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 90);

      changeentityproperty(self,"blink",1);

    }

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

    if (y>135){

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

    }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 2);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        return;
    }
    if(animhandle==883)
    {


    void self = getlocalvar("self");

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

    if(x>=50)

    {

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=50)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==885)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, 0, 0);
        }
        if(frame==8)
        {
            velo001(2, 0, 0);
        }
        if(frame==9)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==886)
    {


    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_RUNATTACK"));

    }

	        return;
    }
    if(animhandle==887)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("gshot", 110, 0, 0);
        }
        if(frame==3)
        {
            spawn01("gshot", 120, 0, 0);
        }
        if(frame==5)
        {
            spawn01("gshot", 140, 0, 0);
        }
        if(frame==7)
        {
            spawn01("gshot", 160, 0, 0);
        }
        if(frame==9)
        {
            spawn01("gshot", 180, 0, 0);
        }
        if(frame==11)
        {
            spawn01("gshot", 200, 0, 0);
        }
        if(frame==13)
        {
            spawn01("gshot", 220, 0, 0);
        }
        if(frame==15)
        {
            spawn01("gshot", 240, 0, 0);
        }
        if(frame==17)
        {
            spawn01("gshot", 260, 0, 0);
        }
        if(frame==20)
        {
            anichangeattack("ANI_FOLLOW61");
        }
        return;
    }
    if(animhandle==888)
    {
        if(frame==0)
        {
            move(-40, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==19)
        {
            velo001(1.5, 0, -1);
        }
        if(frame==21)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==26)
        {
            degravity(0);
        }
        if(frame==26)
        {
            noplayerJoin(0);
        }
        if(frame==26)
        {
            subjectScreen(1);
        }
        if(frame==26)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==889)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==890)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==891)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==892)
    {
        if(frame==3)
        {
            shooter2("balaP", 15, 33, 0, 2.5, -5, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==893)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            toss("wmissile", 23, 43, 0);
        }
        if(frame==3)
        {
            spawn01("cdust", 23, 43, 1);
        }
        return;
    }
    if(animhandle==894)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

        changeentityproperty(self, "subject_to_gravity", 1);

    }

	        if(frame==2)
        {
            spawnAni("cdust", 9, 25, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==895)
    {
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==24)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==896)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound0("chars/warmachine/haha2.wav", "chars/warmachine/att_4-1.wav");
        }
        if(frame==1)
        {
            velo001(-2, 0, 0);
        }
        if(frame==5)
        {
            velo001(-1, 0, 0);
        }
        if(frame==7)
        {
            velo001(-0, 0, 0);
        }
        return;
    }
    if(animhandle==897)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

    }

	        if(frame==0)
        {
            shooter2("balaP", 15, 33, 0, 2.5, -5, 0);
        }
        if(frame==3)
        {
            shooter2("balaP", 15, 33, 0, 2.5, -5, 0);
        }
        if(frame==7)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==898)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            velo001(4, 0, 0);
        }
        if(frame==1)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==2)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==7)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==8)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==9)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==10)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==11)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==899)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==900)
    {
        if(frame==0)
        {
            spawn01("super", 0, 25, 0);
        }
        if(frame==6)
        {
            toss("ward", -20, 53, 0);
        }
        if(frame==8)
        {
            toss("ward", 20, 53, 0);
        }
        if(frame==10)
        {
            toss("ward", -10, 53, 0);
        }
        if(frame==12)
        {
            toss("ward", 10, 53, 0);
        }
        if(frame==14)
        {
            toss("ward", -15, 53, 0);
        }
        if(frame==16)
        {
            toss("ward", 15, 53, 0);
        }
        if(frame==18)
        {
            toss("ward", -20, 53, 0);
        }
        if(frame==20)
        {
            toss("ward", 20, 53, 0);
        }
        if(frame==22)
        {
            toss("ward", -20, 53, 0);
        }
        if(frame==24)
        {
            toss("ward", 20, 53, 0);
        }
        if(frame==26)
        {
            toss("ward", -20, 53, 0);
        }
        if(frame==28)
        {
            toss("ward", 20, 53, 0);
        }
        if(frame==30)
        {
            toss("ward", -20, 53, 0);
        }
        return;
    }
    if(animhandle==901)
    {
        if(frame==0)
        {
            refill(100);
        }
        return;
    }
    if(animhandle==902)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==903)
    {


	void self = getlocalvar("self");

        void MPower = getentityproperty(self,"mp"); //get mp

	if (MPower <= 2){

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

	   }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==1)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            mpcost(1);
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==5)
        {
            keymove(1.5);
        }
        return;
    }
    if(animhandle==908)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==1)
        {
            position(0, 10, 0, -1, 0);
        }
        if(frame==2)
        {
            position(1, 20, 30, -1, 0);
        }
        if(frame==2)
        {
            velo001(-6, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("sdust", 22, 0, 0);
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==3)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==4)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==4)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==5)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==5)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==6)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==6)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==7)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==7)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==8)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==8)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==9)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==9)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==9)
        {
            antiwallCollide(10, "ANI_FOLLOW4");
        }
        if(frame==10)
        {
            position(0, -1, 10, -1, 0);
        }
        if(frame==10)
        {
            depost(0);
        }
        if(frame==10)
        {
            throw(35, 2, 6, 1.5, 0, 0);
        }
        if(frame==10)
        {
            clearL();
        }
        if(frame==10)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==10)
        {
            randSound0("chars/warmachine/whimp.wav", "chars/warmachine/att_4-1.wav");
        }
        if(frame==11)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==12)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==909)
    {
        if(frame==2)
        {
            spawn01("gshot", 30, 0, 0);
        }
        if(frame==2)
        {
            dasher(-0.5, 0, 0);
        }
        if(frame==3)
        {
            dasher(0, 0, 0);
        }
        return;
    }
    if(animhandle==910)
    {


    void vSelf = getlocalvar("self");



    if(frame==6){

      int  iTime = openborvariant("elapsed_time");



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

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

    }

	        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", -22, 14, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 14, 0);
        }
        if(frame==14)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==913)
    {
        if(frame==2)
        {
            velo001(2, 0, -2);
        }
        return;
    }
    if(animhandle==914)
    {


    void vSelf = getlocalvar("self");



    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 + 80);

    }

	        if(frame==2)
        {
            toss("smb", 10, 40, 0);
        }
        return;
    }
    if(animhandle==915)
    {
        if(frame==0)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==917)
    {


	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==918)
    {


	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==919)
    {
        if(frame==2)
        {
            anichangeattack("ANI_FOLLOW9");
        }
        return;
    }
    if(animhandle==921)
    {
        if(frame==5)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==923)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, 0, 0);
        }
        if(frame==8)
        {
            velo001(2, 0, 0);
        }
        return;
    }
    if(animhandle==925)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            gravity(1);
        }
        if(frame==4)
        {
            mpadd(15);
        }
        if(frame==5)
        {
            spawn01("pom", 0, 0, 0);
        }
        return;
    }
    if(animhandle==926)
    {
        if(frame==2)
        {
            anichangeattack("ANI_FOLLOW10");
        }
        return;
    }
    if(animhandle==927)
    {
        if(frame==2)
        {
            spawn01("gshot", 60, 0, 0);
        }
        if(frame==4)
        {
            spawn01("gshot", 40, 0, 0);
        }
        if(frame==6)
        {
            spawn01("gshot", 10, 0, 0);
        }
        if(frame==8)
        {
            spawn01("gshot", 15, 0, 0);
        }
        if(frame==10)
        {
            spawn01("gshot", 40, 0, 0);
        }
        if(frame==12)
        {
            spawn01("gshot", 60, 0, 0);
        }
        return;
    }
    if(animhandle==930)
    {
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }

}

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


	void	self = getlocalvar("self");

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

	if (iDirection == 0){ //Is entity facing left?

          changeentityproperty(self, "direction", 1);

	}





	if(frame==0)

	{

	int	SFX1 = loadsample("data/sounds/waterfx2.wav");

	int	SFX2 = loadsample("data/sounds/waterfx3.wav");

  	int	r = rand()%30;

	if(r	> 0){

	playsample(SFX1,	0, 120, 120, 100, 0);

	}

	if(r	< 0){

	playsample(SFX2,	0, 120, 120, 100, 0);

	}

	}



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

}

#### animationscript function main #####
# data/chars/quicksilver/_nave/_quicknave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==934)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==1)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/dash.wav");
        }
        if(frame==2)
        {
            velo001(6, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==939)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        if(frame==2)
        {
            velo001(-4, 0, 0);
        }
        if(frame==2)
        {
            shooter("splash", 0, 0, 5, -3, 0, 0);
        }
        if(frame==3)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        if(frame==4)
        {
            shooter2("waterfx", 20, 0, 5, -4, 0, 0);
        }
        if(frame==5)
        {
            shooter2("waterfx", 20, 0, 5, -7, 0, 0);
        }
        if(frame==6)
        {
            anichange("ANI_RISE");
        }
        return;
    }
    if(animhandle==940)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            velo001(-5, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==942)
    {


void self = getlocalvar("self");

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

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

    if(frame==3){

      int eTime = openborvariant("elapsed_time");

      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 300);

      changeentityproperty(self,"blink",2);

      if(dir==1){ // Facing right

           velo001 (-4,0,0);

            shooter2 ("splash",0,0,5,-3,0,0);

      } else {

         velo001 (4,0,0);

          shooter2 ("splash",0,0,5,3,0,0);

      }

    }



if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);



      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}

	        if(frame==11)
        {
            anichange("ANI_RISE");
        }
        return;
    }
    if(animhandle==943)
    {
        if(frame==0)
        {
            slow(0);
        }
        if(frame==1)
        {
            velo001(-5, 0, 7);
        }
        if(frame==5)
        {
            velo001(-3, 0, 2);
        }
        return;
    }
    if(animhandle==944)
    {
        if(frame==0)
        {
            velo001(2, 0, 4);
        }
        if(frame==13)
        {
            velo001(-4, 0, 0);
        }
        if(frame==13)
        {
            shooter("splash", 0, 0, 5, -3, 0, 0);
        }
        if(frame==14)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        if(frame==15)
        {
            shooter2("waterfx", 20, 0, 5, -4, 0, 0);
        }
        if(frame==16)
        {
            shooter2("waterfx", 20, 0, 5, -7, 0, 0);
        }
        return;
    }
    if(animhandle==945)
    {


    void self = getlocalvar("self");

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

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

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

      if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

    if(x>=80)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(4.75, 0, 0);
        }
        return;
    }
    if(animhandle==946)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/dash.wav");
        }
        if(frame==1)
        {
            velo001(6, NULL(), 2);
        }
        if(frame==1)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==4)
        {
            velo001(-4, 0, 0);
        }
        if(frame==4)
        {
            shooter("splash", 0, 0, 5, -3, 0, 0);
        }
        if(frame==5)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        if(frame==6)
        {
            shooter2("waterfx", 20, 0, 5, -4, 0, 0);
        }
        if(frame==7)
        {
            shooter2("waterfx", 20, 0, 5, -7, 0, 0);
        }
        if(frame==8)
        {
            shooter2("waterfx", 20, 0, 5, -8, 0, 0);
        }
        if(frame==9)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        if(frame==10)
        {
            shooter2("waterfx", 20, 0, 5, -4, 0, 0);
        }
        if(frame==11)
        {
            shooter2("waterfx", 20, 0, 5, -7, 0, 0);
        }
        if(frame==12)
        {
            anichange("ANI_RISE");
        }
        return;
    }
    if(animhandle==948)
    {
        if(frame==0)
        {
            shooter("splash", 20, 0, 5, -3, 0, 0);
        }
        if(frame==0)
        {
            randSound("chars/quicksilver/Strongatk03.wav", "chars/quicksilver/RisingUp.wav", "chars/quicksilver/Strongatk04.wav");
        }
        if(frame==1)
        {
            velo001(4, 0, 6);
        }
        if(frame==5)
        {
            velo001(2, 0, 2);
        }
        if(frame==7)
        {
            anichangeattack("ANI_FREESPECIAL7");
        }
        return;
    }
    if(animhandle==949)
    {


    void self = getlocalvar("self");

    if(frame==0){

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

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

    }

	        if(frame==3)
        {
            anichangeattack("ANI_JUMPLAND");
        }
        return;
    }
    if(animhandle==951)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==955)
    {


void self = getlocalvar("self");

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

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



    if(frame==0){

    		 if(dir==1){ // Facing right

           	 shooter2 ("splash",0,0,5,-3,0,0);

           	 velo001 (-4,0,0);

      } else {

      	      	 shooter2 ("splash",0,0,5,3,0,0);

      	   	 velo001 (4,0,0);

      }

    }

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==8)
        {
            anichange("ANI_RISE");
        }
        return;
    }
    if(animhandle==956)
    {


void self = getlocalvar("self");

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

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

if(frame==0){

      int eTime = openborvariant("elapsed_time");

      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 200);

      changeentityproperty(self,"blink",2);

    }



if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            velo001(-2, 0, 0);
        }
        return;
    }
    if(animhandle==957)
    {


    void self = getlocalvar("self");

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

  changeentityproperty(self, "position", -200,200, 0);

    if(x>=20)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(4.75, 0, 0);
        }
        if(frame==1)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==2)
        {
            shooter2("waterfx", 20, 0, 5, -3, 0, 0);
        }
        if(frame==3)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==4)
        {
            shooter2("waterfx", 20, 0, 5, -8, 0, 0);
        }
        if(frame==5)
        {
            shooter2("waterfx", 20, 0, 5, -3, 0, 0);
        }
        if(frame==6)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        return;
    }
    if(animhandle==958)
    {


void self = getlocalvar("self");

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

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



if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

           velo001 (-4,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      	   velo001 (4,0,0);

      }

	}	        if(frame==4)
        {
            beidle();
        }
        return;
    }
    if(animhandle==959)
    {
        if(frame==2)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==2)
        {
            velo001(8, NULL(), NULL());
        }
        if(frame==3)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==4)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==5)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==6)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==7)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==8)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        return;
    }
    if(animhandle==960)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,8,0,0);

      }

	}	        return;
    }
    if(animhandle==961)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==1)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/dash.wav");
        }
        if(frame==2)
        {
            velo001(8, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==962)
    {
        if(frame==4)
        {
            velo001(-4, 0, 0);
        }
        if(frame==4)
        {
            shooter("splash", 0, 0, 5, -3, 0, 0);
        }
        if(frame==5)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        if(frame==6)
        {
            shooter2("waterfx", 20, 0, 5, -4, 0, 0);
        }
        if(frame==7)
        {
            shooter2("waterfx", 20, 0, 5, -7, 0, 0);
        }
        if(frame==8)
        {
            shooter2("waterfx", 20, 0, 5, -8, 0, 0);
        }
        if(frame==9)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        if(frame==10)
        {
            shooter2("waterfx", 20, 0, 5, -4, 0, 0);
        }
        if(frame==11)
        {
            shooter2("waterfx", 20, 0, 5, -7, 0, 0);
        }
        if(frame==12)
        {
            anichange("ANI_RISE");
        }
        return;
    }
    if(animhandle==963)
    {


    void self = getlocalvar("self");

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

  changeentityproperty(self, "position", -200,200, 0);

    if(x>=20)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(4.75, 0, 0);
        }
        if(frame==1)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==2)
        {
            shooter2("waterfx", 20, 0, 5, -3, 0, 0);
        }
        if(frame==3)
        {
            shooter2("waterfx", 20, 0, 5, -5, 0, 0);
        }
        if(frame==4)
        {
            shooter2("waterfx", 20, 0, 5, -8, 0, 0);
        }
        if(frame==5)
        {
            shooter2("waterfx", 20, 0, 5, -3, 0, 0);
        }
        if(frame==6)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        return;
    }
    if(animhandle==964)
    {
        if(frame==1)
        {
            shooter2("waterfx", 20, 0, 5, -3, 0, 0);
        }
        if(frame==2)
        {
            shooter2("waterfx", 30, 10, 5, -5, 0, 0);
        }
        if(frame==3)
        {
            shooter2("waterfx", 20, 30, 5, -3, 0, 0);
        }
        if(frame==4)
        {
            shooter2("waterfx", 20, 0, 5, -6, 0, 0);
        }
        if(frame==5)
        {
            shooter2("waterfx", 20, 15, 5, -3, 0, 0);
        }
        if(frame==6)
        {
            shooter2("waterfx", 20, 30, 5, -3, 0, 0);
        }
        if(frame==7)
        {
            shooter2("waterfx", 20, 0, 5, -7, 0, 0);
        }
        if(frame==8)
        {
            shooter2("waterfx", 20, 15, 5, -3, 0, 0);
        }
        if(frame==9)
        {
            shooter2("waterfx", 20, 30, 5, -5, 0, 0);
        }
        return;
    }
    if(animhandle==965)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


	if(frame==0)

	{

	int	SFX1 = loadsample("data/chars/quicksilver/Lightatk01.wav");

	int	SFX2 = loadsample("data/chars/quicksilver/Lightatk02.wav");

	void	vSelf = getlocalvar("self");

	int	r = rand()%30;

	if(r	> 0){

	playsample(SFX1,	0, 120, 120, 100, 0);

	}

	if(r	< 0){

	playsample(SFX2,	0, 120, 120, 100, 0);

	}

	}

	        return;
    }
    if(animhandle==967)
    {


	if(frame==0)

	{

	int	SFX1 = loadsample("data/chars/quicksilver/Lightatk01.wav");

	int	SFX2 = loadsample("data/chars/quicksilver/Lightatk02.wav");

	void	vSelf = getlocalvar("self");

	int	r = rand()%30;

	if(r	> 0){

	playsample(SFX1,	0, 120, 120, 100, 0);

	}

	if(r	< 0){

	playsample(SFX2,	0, 120, 120, 100, 0);

	}

	}

	        return;
    }
    if(animhandle==968)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        if(frame==2)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/Medatk03.wav");
        }
        return;
    }
    if(animhandle==969)
    {
        if(frame==2)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/Medatk03.wav");
        }
        return;
    }
    if(animhandle==970)
    {
        if(frame==0)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/Medatk03.wav");
        }
        if(frame==1)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==2)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==971)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==972)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==973)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==975)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==976)
    {
        if(frame==0)
        {
            slow(0);
        }
        if(frame==1)
        {
            velo001(-5, 0, 7);
        }
        if(frame==5)
        {
            velo001(-3, 0, 2);
        }
        return;
    }
    if(animhandle==977)
    {


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

   int Vx = getentityproperty(self, "xdir"); // Get current x velocity

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

   int Screen = openborvariant("hResolution"); // Get screen width

   int x = getentityproperty(self, "x"); // Get current x coordinate

   int Bounce = getlocalvar("Bounce" + self); // Get bounced state

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

   int SFX0 = loadsample("data/chars/quicksilver/run.wav");

   int SFX00= loadsample("data/sounds/cap02.wav");

   if(Bounce==NULL()){ // Localvar empty?

     setlocalvar("Bounce" + self, 0);

     Bounce = 0;

   }

   if(Bounce==6){ // Bounces reach 4 times?

   setlocalvar("Bounce" + self, 0);

   Bounce = 0;

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

   } else if(Vx > 0 && x >= XPos + Screen-20){ // Touches right screen edge

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

     	  playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "velocity", -Vx); // Reverses velocity

          changeentityproperty(self, "direction", 0);

          playsample(SFX00, 0, 120, 120, 100, 0);

      setlocalvar("Bounce" + self, Bounce+1);

        } else if(Vx < 0 && x <= XPos+20){ // Touches left screen edge

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

        playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "velocity", -Vx); // Reverses Velocity

          changeentityproperty(self, "direction", 1);

          playsample(SFX00, 0, 120, 120, 100, 0);

     setlocalvar("Bounce" + self, Bounce+1);

        }

	        if(frame==0)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==2)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==4)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==5)
        {
            antiwallHit(30, -50, 30);
        }
        return;
    }
    if(animhandle==978)
    {


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

   int Vx = getentityproperty(self, "xdir"); // Get current x velocity

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

   int Screen = openborvariant("hResolution"); // Get screen width

   int x = getentityproperty(self, "x"); // Get current x coordinate

   int Bounce = getlocalvar("Bounce" + self); // Get bounced state

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

   int Summon = getentityvar(self, 1);

   int SFX0 = loadsample("data/chars/quicksilver/run.wav");

   int SFX00= loadsample("data/sounds/cap02.wav");

   if(frame==0){

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

    }

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

      setentityvar(self, 1, NULL());

      setlocalvar("Bounce" + self, 0);

      Bounce = 0;

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

    }

   if(Bounce==NULL()){ // Localvar empty?

     setlocalvar("Bounce" + self, 0);

     Bounce = 0;

   }

   if(Bounce==6){ // Bounces reach 6 times?

   setlocalvar("Bounce" + self, 0);

   setentityvar(self, 1, NULL());

   Bounce = 0;

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

   } else if(Vx > 0 && x >= XPos + Screen-40){ // Touches right screen edge

     	  playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "direction", 0);

          changeentityproperty(self, "velocity", -Vx); // Reverses velocity

          playsample(SFX00, 0, 120, 120, 100, 0);

          //settextobj(12, 200, 86, 1, 1, "dir - "+iDirection, openborvariant("elapsed_time")+200);

      setlocalvar("Bounce" + self, Bounce+1);

        } else if(Vx < 0 && x <= XPos+40){ // Touches left screen edge

          playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "direction", 1);

          changeentityproperty(self, "velocity", -Vx); // Reverses Velocity

          playsample(SFX00, 0, 120, 120, 100, 0);

          // settextobj(12, 200, 86, 1, 1, "dir - "+iDirection, openborvariant("elapsed_time")+200);

     setlocalvar("Bounce" + self, Bounce+1);

        }

	        if(frame==0)
        {
            velo001(NULL(), 0.5, NULL());
        }
        if(frame==0)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==2)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==4)
        {
            antiwallHit(30, -50, 30);
        }
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==5)
        {
            antiwallHit(30, -50, 30);
        }
        return;
    }
    if(animhandle==979)
    {
        if(frame==0)
        {
            velo001(2, 0, 4);
        }
        return;
    }
    if(animhandle==980)
    {


	void vSelf = getlocalvar("self");

	changeentityproperty(vSelf, "direction", 1);

    if(frame==0){

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

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

      int  iTime = openborvariant("elapsed_time");

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

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

    }

	        if(frame==18)
        {
            subjectScreen(1);
        }
        if(frame==19)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==981)
    {


    void self = getlocalvar("self");

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

    if(x>=20)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(4.75, 0, 0);
        }
        if(frame==2)
        {
            spawn01("po", -10, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", -10, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", -10, 0, 0);
        }
        return;
    }
    if(animhandle==982)
    {


    void self = getlocalvar("self");

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

    if(x>=20)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(4.75, 0, 0);
        }
        if(frame==2)
        {
            spawn01("po", -10, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", -10, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", -10, 0, 0);
        }
        return;
    }
    if(animhandle==983)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/dash.wav");
        }
        if(frame==1)
        {
            velo001(6, NULL(), 2);
        }
        if(frame==1)
        {
            spawn01("po", -22, 0, 0);
        }
        return;
    }
    if(animhandle==984)
    {


    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==985)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(6, NULL(), NULL());
        }
        if(frame==15)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==16)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==16)
        {
            noplayerJoin(0);
        }
        if(frame==16)
        {
            subjectScreen(1);
        }
        if(frame==16)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==986)
    {
        if(frame==0)
        {
            move(-40, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(6, 0, -5);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==17)
        {
            degravity(0);
        }
        if(frame==17)
        {
            noplayerJoin(0);
        }
        if(frame==17)
        {
            subjectScreen(1);
        }
        if(frame==17)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==987)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==988)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==989)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==990)
    {


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

   int Vx = getentityproperty(self, "xdir"); // Get current x velocity

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

   int Screen = openborvariant("hResolution"); // Get screen width

   int x = getentityproperty(self, "x"); // Get current x coordinate

   int Bounce = getlocalvar("Bounce" + self); // Get bounced state

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

   int SFX0 = loadsample("data/chars/quicksilver/run.wav");

   int SFX00= loadsample("data/sounds/cap02.wav");





   if(Bounce==NULL()){ // Localvar empty?

     setlocalvar("Bounce" + self, 0);

     Bounce = 0;

   }



   if(Bounce==6){ // Bounces reach 4 times?

   setlocalvar("Bounce" + self, 0);

     Bounce = 0;

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



   } else if(Vx > 0 && x >= XPos + Screen-20){ // Touches right screen edge

     	  playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "velocity", -Vx); // Reverses velocity

          changeentityproperty(self, "direction", 0);

          playsample(SFX00, 0, 120, 120, 100, 0);

           settextobj(12, 200, 86, 1, 1, "Bounce Right", openborvariant("elapsed_time")+200);

     setlocalvar("Bounce" + self, Bounce+1);

        } else if(Vx < 0 && x <= XPos+20){ // Touches left screen edge

                   settextobj(12, 200, 86, 1, 1, "Bounce Left", openborvariant("elapsed_time")+200);

         playsample(SFX0, 0, 120, 120, 100, 0);

          changeentityproperty(self, "velocity", -Vx); // Reverses Velocity

          changeentityproperty(self, "direction", 1);

          playsample(SFX00, 0, 120, 120, 100, 0);

     setlocalvar("Bounce" + self, Bounce+1);

        }

	        if(frame==0)
        {
            antiwallHit(50, -50, 30);
        }
        if(frame==0)
        {
            slow(1);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            antiwallHit(50, -50, 30);
        }
        if(frame==2)
        {
            antiwallHit(50, -50, 30);
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            antiwallHit(50, -50, 30);
        }
        if(frame==4)
        {
            antiwallHit(50, -50, 30);
        }
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==5)
        {
            antiwallHit(50, -50, 30);
        }
        if(frame==6)
        {
            antiwallHit(50, -50, 30);
        }
        return;
    }
    if(animhandle==991)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound("chars/quicksilver/Faster01.wav", "chars/quicksilver/Faster02.wav", "chars/quicksilver/Faster01.wav");
        }
        if(frame==1)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==4)
        {
            keymove(5);
        }
        if(frame==5)
        {
            keymove(5);
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==6)
        {
            keymove(5);
        }
        if(frame==7)
        {
            keymove(5);
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==8)
        {
            keymove(5);
        }
        if(frame==9)
        {
            keymove(5);
        }
        if(frame==9)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==13)
        {
            keymove(5);
        }
        if(frame==14)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==15)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==16)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==17)
        {
            bmtFriction(2, 1, 1);
        }
        return;
    }
    if(animhandle==992)
    {
        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound("chars/quicksilver/Strongatk03.wav", "chars/quicksilver/RisingUp.wav", "chars/quicksilver/Strongatk04.wav");
        }
        if(frame==1)
        {
            velo001(4, 0, 3.5);
        }
        if(frame==5)
        {
            velo001(2, 0, 2);
        }
        return;
    }
    if(animhandle==993)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==2)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/Medatk03.wav");
        }
        if(frame==4)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==994)
    {
        if(frame==0)
        {
            checkStageType("truck", "ANI_FREESPECIAL9");
        }
        if(frame==0)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==1)
        {
            velo001(30, -3, NULL());
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            anichange("ANI_FOLLOW2");
        }
        return;
    }
    if(animhandle==996)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==997)
    {


    void self = getlocalvar("self");

    if(frame==0){

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

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

    }

	        if(frame==0)
        {
            gravity(1);
        }
        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        return;
    }
    if(animhandle==998)
    {
        if(frame==1)
        {
            velo001(-5, 0, 7);
        }
        if(frame==5)
        {
            velo001(-3, 0, 2);
        }
        return;
    }
    if(animhandle==999)
    {
        if(frame==0)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==8)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==10)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==12)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==14)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==15)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==16)
        {
            bmtFriction(2, 1, 1);
        }
        if(frame==17)
        {
            bmtFriction(2, 1, 1);
        }
        return;
    }
    if(animhandle==1002)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1003)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1004)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1007)
    {


	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==1008)
    {


	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==1010)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(6, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(0.5, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1011)
    {
        if(frame==1)
        {
            spawn01("po", -10, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", -10, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", -10, 0, 0);
        }
        return;
    }
    if(animhandle==1012)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound("chars/quicksilver/Medatk01.wav", "chars/quicksilver/Medatk02.wav", "chars/quicksilver/dash.wav");
        }
        if(frame==2)
        {
            velo001(6.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==4)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==5)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==6)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==8)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==9)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(0.5, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1014)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1016)
    {
        if(frame==1)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("po", 22, 10, 0);
        }
        if(frame==3)
        {
            spawn01("po", 0, 20, 0);
        }
        if(frame==4)
        {
            spawn01("po", -22, 10, 0);
        }
        if(frame==5)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/tigra/_nave/_tigranave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1021)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==0)
        {
            shooter("balaP", 38, 20, 0, 5, 0, 0);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1023)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1025)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1026)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1027)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }



      if (frame==0){

            shooter("missile" ,18,20,-1,3,0,-0.25);

            shooter("missile" ,18,20,-1,3,0,0);

      }

	}

if (z<180 && z> 100&& frame==0){

   	    shooter("missile" ,18,20,-1,3,0,-0.25);

            shooter("missile" ,18,20,-1,3,0,0.25);

            }

if (z<=100&& frame==0){

   	    shooter("missile" ,18,20,-1,3,0,0);

            shooter("missile" ,18,20,-1,3,0,0.25);

            }

	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        if(frame==10)
        {
            keymove(2, 0.6);
        }
        if(frame==11)
        {
            keymove(2, 0.6);
        }
        if(frame==12)
        {
            keymove(2, 0.6);
        }
        if(frame==13)
        {
            keymove(2, 0.6);
        }
        if(frame==14)
        {
            keymove(2, 0.6);
        }
        if(frame==15)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1031)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1033)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1035)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==1045)
    {
        if(frame==1)
        {
            velo001(2, 0, 2);
        }
        return;
    }
    if(animhandle==1046)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==1047)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1048)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        if(frame==1)
        {
            velo001(NULL(), NULL(), 1.5);
        }
        return;
    }
    if(animhandle==1050)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        return;
    }
    if(animhandle==1051)
    {


    	void vSelf = getlocalvar("self");

        if(frame==0){

        int  iTime = openborvariant("elapsed_time");

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

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

        }

	        if(frame==0)
        {
            move(10, NULL(), 20);
        }
        if(frame==0)
        {
            ani0020(openborconstant("ANI_FOLLOW4"), openborconstant("ANI_FALL"));
        }
        if(frame==11)
        {
            velo001(-1.3, NULL(), 2.9);
        }
        return;
    }
    if(animhandle==1052)
    {
        if(frame==3)
        {
            velo001(-1.3, NULL(), 2.9);
        }
        if(frame==6)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1053)
    {
        if(frame==0)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==1)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==2)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1055)
    {
        if(frame==2)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(4, NULL(), 2.1);
        }
        return;
    }
    if(animhandle==1056)
    {


    void self = getlocalvar("self");

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

    if(x>=60)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1057)
    {
        if(frame==3)
        {
            velo001(2, NULL(), -4);
        }
        return;
    }
    if(animhandle==1058)
    {


    void self = getlocalvar("self");

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

    if(x>=60)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1059)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(2.5, 0, 2.5);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            velo001(4, 0, 2);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1060)
    {


    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==1061)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(5, 0, 2.5);
        }
        if(frame==8)
        {
            noplayerJoin(0);
        }
        if(frame==8)
        {
            subjectScreen(1);
        }
        if(frame==8)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1062)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==13)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==14)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==15)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==29)
        {
            noplayerJoin(0);
        }
        if(frame==29)
        {
            subjectScreen(1);
        }
        if(frame==29)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1063)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1064)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==5)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1065)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==5)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1066)
    {
        if(frame==0)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==1)
        {
            cancelgrabOBJ("ANI_FOLLOW2");
        }
        if(frame==1)
        {
            slamstart(300);
        }
        if(frame==1)
        {
            position(0, 30, 0, 2, 0);
        }
        if(frame==2)
        {
            spawnAni("afx", 0, 0, 10, "ANI_FOLLOW12", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("cut1", 20, 20, 0);
        }
        if(frame==2)
        {
            addhits(1);
        }
        if(frame==3)
        {
            spawnRandom("cut1", 30, 30);
        }
        if(frame==3)
        {
            addhits(1);
        }
        if(frame==4)
        {
            spawnRandom("cut1", 20, 20);
        }
        if(frame==4)
        {
            addhits(1);
        }
        if(frame==5)
        {
            spawnRandom("cut1", 30, 30);
        }
        if(frame==5)
        {
            addhits(1);
        }
        if(frame==6)
        {
            spawnRandom("cut1", 20, 20);
        }
        if(frame==6)
        {
            addhits(1);
        }
        if(frame==7)
        {
            spawnRandom("cut1", 30, 30);
        }
        if(frame==7)
        {
            addhits(1);
        }
        if(frame==8)
        {
            spawnRandom("cut1", 20, 20);
        }
        if(frame==8)
        {
            addhits(1);
        }
        if(frame==9)
        {
            spawnRandom("cut1", 30, 30);
        }
        if(frame==9)
        {
            addhits(1);
        }
        if(frame==10)
        {
            spawnRandom("cut1", 20, 20);
        }
        if(frame==10)
        {
            addhits(1);
        }
        if(frame==11)
        {
            spawnRandom("cut1", 30, 30);
        }
        if(frame==11)
        {
            addhits(1);
        }
        if(frame==12)
        {
            spawnRandom("cut1", 20, 20);
        }
        if(frame==12)
        {
            addhits(1);
        }
        if(frame==13)
        {
            spawnRandom("cut1", 30, 30);
        }
        if(frame==13)
        {
            addhits(1);
        }
        if(frame==14)
        {
            finish(250, 1, 0, 0, 0, 0);
        }
        if(frame==14)
        {
            spawn01("cut1xx", 30, 40, 1);
        }
        if(frame==14)
        {
            addhits(1);
        }
        if(frame==14)
        {
            depost(1);
        }
        if(frame==14)
        {
            throw(50, 5, 0, 10, 0, 0);
        }
        if(frame==15)
        {
            clearL();
        }
        if(frame==16)
        {
            randSound("chars/tigra/hyper-end-1.wav", "chars/tigra/hyper-end-2.wav", "chars/tigra/hyper-end-3.wav");
        }
        return;
    }
    if(animhandle==1067)
    {


	void self = getlocalvar("self");

    	int Map = getentityproperty(self, "map");

    	if(Map==4 || Map==5){

      performattack(self, openborconstant("ANI_FREESPECIAL10")); //Attack!

    }



	        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            randSound0("chars/tigra/take.wav", "chars/tigra/att9.wav");
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(4.5, 0, 2);
        }
        return;
    }
    if(animhandle==1068)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        return;
    }
    if(animhandle==1069)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "aiflag", "drop", 0);
        }
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "aiflag", "falling", 0);
        }
        return;
    }
    if(animhandle==1070)
    {


	 void self = getlocalvar("self");



    if(frame==0){

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

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

    }

	        if(frame==0)
        {
            randSound0("chars/tigra/take.wav", "chars/tigra/att9.wav");
        }
        if(frame==2)
        {
            velo001(4, 0, -3);
        }
        return;
    }
    if(animhandle==1071)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	   if(frame==0){

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

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

	   int  iTime = openborvariant("elapsed_time");

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

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

      }



	        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==1)
        {
            velo001(4, 0, -2);
        }
        if(frame==1)
        {
            spawnAni("cdust", 14, 29, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==2)
        {
            randSound0("chars/tigra/att3.wav", "chars/tigra/att4.wav");
        }
        return;
    }
    if(animhandle==1072)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            randSound0("chars/tigra/idiot.wav", "chars/tigra/att8.wav");
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4.5, 0, 2);
        }
        return;
    }
    if(animhandle==1073)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==3)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1074)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            anichangeattack("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==1075)
    {
        if(frame==0)
        {
            randSound("chars/tigra/pre-hyper-1.wav", "chars/tigra/pre-hyper-2.wav", "chars/tigra/hyper2.wav");
        }
        if(frame==0)
        {
            spawn01("super", 20, 45, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), NULL());
        }
        if(frame==19)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==20)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==21)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1077)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        if(frame==1)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1078)
    {


	if(frame==2)

	{

	       int SFX1 = loadsample("data/chars/emma_frost/eap.wav");

	       int SFX2 = loadsample("data/chars/emma_frost/eap2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            shooter2("eap", 0, 0, 0, 3, -2, 0);
        }
        return;
    }
    if(animhandle==1080)
    {
        if(frame==1)
        {
            velo001(3.5, 0, 2);
        }
        return;
    }
    if(animhandle==1082)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        return;
    }
    if(animhandle==1084)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        return;
    }
    if(animhandle==1085)
    {


	if(frame==3)

	{

	       int SFX1 = loadsample("data/chars/tigra/idiot.wav");

	       int SFX2 = loadsample("data/chars/tigra/att7.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            cancelgrab("ANI_FOLLOW2");
        }
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 30, 0, -1, 0);
        }
        if(frame==1)
        {
            position(4, 12, 36, -1, 0);
        }
        if(frame==1)
        {
            velo001(-2, NULL(), 2);
        }
        if(frame==2)
        {
            position(4, 14, 51, -1, 0);
        }
        if(frame==3)
        {
            position(7, -15, 52, -1, 0);
        }
        if(frame==4)
        {
            position(10, -14, 21, -1, 0);
        }
        if(frame==5)
        {
            move(0, 2, 0);
        }
        if(frame==5)
        {
            position(19, 0, 1, -1, 0);
        }
        if(frame==5)
        {
            velo001(0, NULL(), 0);
        }
        if(frame==5)
        {
            antiwall(-15, 25, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(30, 2, 1, -4, 0, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1086)
    {
        if(frame==0)
        {
            slamstart(0);
        }
        if(frame==0)
        {
            position(0, 30, 0, 1, 0);
        }
        if(frame==1)
        {
            depost(0);
        }
        if(frame==1)
        {
            fixGrab("ANI_FALL7");
        }
        if(frame==2)
        {
            velo001(2, NULL(), 3);
        }
        if(frame==2)
        {
            randSound0("chars/tigra/att3.wav", "chars/tigra/att4.wav");
        }
        if(frame==4)
        {
            slamstart(1);
        }
        if(frame==4)
        {
            position(5, 15, 12, 1, 0);
        }
        if(frame==5)
        {
            position(5, -17, 16, 1, 1);
        }
        if(frame==6)
        {
            position(8, -32, 51, 1, 1);
        }
        if(frame==7)
        {
            position(8, 12, 74, -1, 0);
        }
        if(frame==7)
        {
            antiwallCollideDir(35);
        }
        if(frame==8)
        {
            antiwall(35, -35, 0);
        }
        if(frame==8)
        {
            position(14, 35, 50, -1, 0);
        }
        if(frame==8)
        {
            depost(0);
        }
        if(frame==8)
        {
            throw(30, 2, 4.5, -2.5, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1087)
    {
        if(frame==19)
        {
            velo001(-3, NULL(), NULL());
        }
        if(frame==21)
        {
            velo001(3, NULL(), 2);
        }
        return;
    }
    if(animhandle==1088)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

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

	}

	        return;
    }
    if(animhandle==1089)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        return;
    }
    if(animhandle==1094)
    {


	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==1095)
    {


	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==1096)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        return;
    }
    if(animhandle==1098)
    {


        if(frame==0){

        void self = getlocalvar("self");

        setentityvar(self,"running",1);

	}

	        return;
    }
    if(animhandle==1099)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        if(frame==1)
        {
            velo001(4, 0, 2);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1101)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1102)
    {


	void self = getlocalvar("self");

    	int Map = getentityproperty(self, "map");

    	if(Map==4 || Map==5){

        changeentityproperty(self, "name", "Hellcat");

        }

	        return;
    }
    if(animhandle==1103)
    {


	void self = getlocalvar("self");

	if ( getentityvar(self,"running") == 1 ) {

   	setentityvar(self,"running",NULL());

	}

	        if(frame==0)
        {
            randSound0("chars/tigra/hyper.wav", "chars/tigra/laugh.wav");
        }
        return;
    }

}

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


	{

	checkParentHealth ("ANI_FOLLOW2");

	checkParentAnim ("ANI_IDLE","ANI_IDLE");

	}        return;
    }
    if(animhandle==1110)
    {


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

	if(frame==0){

          }

	if (frame==1){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",1);

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos-20, Width+1, 70);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            velo001(3, NULL(), 0);
        }
        if(frame==8)
        {
            velo001(0, NULL(), 0);
        }
        if(frame==15)
        {
            damage_all_enemies(2, 0, "ATK_NORMAL", "flash", "beat2.wav");
        }
        if(frame==21)
        {
            damage_all_enemies(2, 0, "ATK_NORMAL", "flash", "beat2.wav");
        }
        if(frame==27)
        {
            damage_all_enemies(2, 0, "ATK_NORMAL8", "eaph", "hiteap.wav");
        }
        if(frame==32)
        {
            damage_all_enemies(2, 1, "ATK_NORMAL", "flash", "beat2.wav");
        }
        if(frame==33)
        {
            velo001(-3, NULL(), 0);
        }
        if(frame==47)
        {
            noplayerJoin(0);
        }
        if(frame==47)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1111)
    {
        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1112)
    {


	{

	checkParentHealth ("ANI_FOLLOW2");

	checkParentAnim ("ANI_IDLE","ANI_IDLE");

	}        return;
    }
    if(animhandle==1113)
    {


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

	int Summon = getentityvar(self, 1);

	if (frame==1){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",0);

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos-20, openborvariant("PLAYER_MAX_Z"), 50);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            velo001(2, -0.25, 0.15);
        }
        if(frame==6)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==9)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==12)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==15)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==18)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==21)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==24)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==27)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==30)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==33)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==36)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==39)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==42)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==45)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==48)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1114)
    {


	if (frame==0)

	{

	void self = getlocalvar("self");

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

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

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

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

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

	changeentityproperty(self,"subject_to_obstacle",1);

	changeentityproperty(self,"subject_to_platform",1);

	changeentityproperty(self,"no_adjust_base",0);

	changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Captain_America" || P2Name == "Captain_America")

           {

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

	   }

}

	if(frame==3)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(3, 0, -3);
        }
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==34)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==34)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==35)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==37)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==39)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==41)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==43)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==45)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==47)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==48)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==50)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==52)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==54)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==56)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==58)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==61)
        {
            velo001(1, 0, 3);
        }
        if(frame==62)
        {
            noplayerJoin(0);
        }
        if(frame==62)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1115)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {



	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

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

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

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

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

	changeentityproperty(self,"subject_to_obstacle",1);

	changeentityproperty(self,"subject_to_platform",1);

	changeentityproperty(self,"no_adjust_base",0);

	changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Hawkeye" || P2Name == "Hawkeye")

           {

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

	   }

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(1.5, 0, -3);
        }
        if(frame==5)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==8)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==11)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==14)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==14)
        {
            leaper(-3, 3.5, 0);
        }
        if(frame==29)
        {
            noplayerJoin(0);
        }
        if(frame==29)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1116)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

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

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

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

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

		changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Emma_Frost" || P2Name == "Emma_Frost")

           {

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

	   }

        }

       	if (frame==1){

	changeentityproperty(self, "direction", 0);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos+500, Width+1, NULL());

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(3, 0, -3);
        }
        if(frame==13)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==15)
        {
            flash_all_enemies("eaph", "hiteap.wav");
        }
        if(frame==19)
        {
            noplayerJoin(0);
        }
        if(frame==19)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1117)
    {


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

	int Summon = getentityvar(self, 1);

	if (frame==0){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",1);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==2)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==3)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1118)
    {


	void self = getlocalvar("self");

        void time = openborvariant("elapsed_time");

        void mTime = time - (openborvariant("elapsed_time")-100);

        float x,z;

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

        z = -cos(time/1.45);

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



        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_gravity",0);

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

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

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

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

	}

	if (frame==1){

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos+240, Width+1, 80);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==21)
        {
            noplayerJoin(0);
        }
        if(frame==21)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1119)
    {


	void self = getlocalvar("self");

	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

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

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

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

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

	changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Mighty_Thor" || P2Name == "Mighty_Thor")

           {

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

	   }

	}

	if (frame==1){

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos+240, Width+1, 120);

        }

	        if(frame==1)
        {
            velo001(NULL(), NULL(), -3);
        }
        if(frame==2)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==22)
        {
            spawn01("stompfx", 0, 0, 2);
        }
        if(frame==22)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==22)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==22)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==23)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==23)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==23)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==24)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==24)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==25)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==25)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==25)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==26)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==31)
        {
            velo001(NULL(), NULL(), 7);
        }
        if(frame==32)
        {
            noplayerJoin(0);
        }
        if(frame==32)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1120)
    {
        if(frame==8)
        {
            shooterCD("fireball", "TYPE_ENEMY", 55, 42, 0, 2, 0, 0, 0);
        }
        if(frame==16)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1121)
    {


        void vSelf = getlocalvar("self");

        int r = rand()%9;

	if (r <0)

	{

  	 r = r*-1;

	}

        if(frame==1){

        setglobalvar("HelperControl", r);

        //setglobalvar("ammoControl", r);



        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(r ==3){

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

            }

        if(r ==4){

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

            }

        if(r ==5){

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

            }

        if(r ==6){

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

            }

        if(r ==7){

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

            }

        if(r ==8){

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

            }

        if(r ==9){

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

            }



        }

	        return;
    }
    if(animhandle==1122)
    {


	{

	checkParentHealth ("ANI_FOLLOW2");

	checkParentAnimName ("ANI_FREESPECIAL2","ANI_FOLLOW1","wolverine");

	checkParentAnimName ("ANI_ATTACK1","ANI_FOLLOW3","wolverine");

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

}

#### animationscript function main #####
# data/chars/misc/lball/lball.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1124)
    {
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1125)
    {
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/wolverine/_nave/_wolvnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1127)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            toss("lball", 53, 26, 1, 3, 0, 0);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1129)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1130)
    {


    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==3)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1131)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1132)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            randSound("chars/wolverine/grunt1.wav", "chars/wolverine/grunt2.wav", "chars/wolverine/drill.wav");
        }
        if(frame==2)
        {
            velo001(7.5, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==13)
        {
            velo001(-4, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1136)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1138)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1140)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

          spawner("aNPCnave",0,0,0);

     changeentityproperty(self, "position", -200,150, 0);

      }

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

    if(x>=100)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        if(frame==6)
        {
            spawner("aNPCnave", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1143)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

      }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/wolverine/wolverine.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1146)
    {
        if(frame==1)
        {
            randSound0("chars/wolverine/attack1.wav", "chars/wolverine/attack2.wav");
        }
        return;
    }
    if(animhandle==1147)
    {
        if(frame==1)
        {
            randSound0("chars/wolverine/attack2.wav", "chars/wolverine/attack3.wav");
        }
        return;
    }
    if(animhandle==1148)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        if(frame==1)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==1)
        {
            randSound0("chars/wolverine/attack3.wav", "chars/wolverine/attack4.wav");
        }
        if(frame==2)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1149)
    {
        if(frame==1)
        {
            velo001(1, 0, 2);
        }
        if(frame==4)
        {
            randSound0("chars/wolverine/attack4.wav", "chars/wolverine/attack5.wav");
        }
        return;
    }
    if(animhandle==1150)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==1151)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1155)
    {
        if(frame==0)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==1)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==2)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1156)
    {
        if(frame==0)
        {
            target(1.7, 1.5, 0, 0, 0.5);
        }
        if(frame==0)
        {
            dash();
        }
        return;
    }
    if(animhandle==1157)
    {
        if(frame==0)
        {
            velo001(0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/wolverine/down1.wav", "chars/wolverine/down2.wav");
        }
        if(frame==7)
        {
            anichange("ANI_FOLLOW17", 0);
        }
        if(frame==8)
        {
            slamstart2();
        }
        if(frame==8)
        {
            position(0, 30, 0, -1, 0);
        }
        if(frame==9)
        {
            position(4, 0, 46, 1, 0);
        }
        if(frame==10)
        {
            position(7, -8, 53, 1, 0);
        }
        if(frame==11)
        {
            position(7, 0, 33, 0, 0);
        }
        if(frame==11)
        {
            depost(0);
        }
        if(frame==11)
        {
            throw(35, 2, 6, 1, 0, 0);
        }
        if(frame==12)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1158)
    {
        if(frame==1)
        {
            velo001(1, 0, 2);
        }
        if(frame==3)
        {
            randSound0("chars/wolverine/attack4.wav", "chars/wolverine/attack5.wav");
        }
        return;
    }
    if(animhandle==1160)
    {
 

    if(frame==0){

      void self = getlocalvar("self");

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

      int  iTime = openborvariant("elapsed_time");

      changeentityproperty(self, "tosstime", iTime + 400);

    }



	        return;
    }
    if(animhandle==1162)
    {
        if(frame==1)
        {
            slow(1);
        }
        if(frame==4)
        {
            slow(0);
        }
        return;
    }
    if(animhandle==1163)
    {
        if(frame==1)
        {
            randSound0("chars/wolverine/attack2.wav", "chars/wolverine/attack3.wav");
        }
        return;
    }
    if(animhandle==1164)
    {
        if(frame==0)
        {
            velo001(-1.3, 0, 2.9);
        }
        return;
    }
    if(animhandle==1165)
    {
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==0)
        {
            depost(1);
        }
        if(frame==0)
        {
            fixGrab2("ANI_FALL7");
        }
        if(frame==0)
        {
            gravity(0);
        }
        if(frame==1)
        {
            velo001(NULL(), NULL(), 0.7);
        }
        if(frame==6)
        {
            velo001(NULL(), NULL(), 0);
        }
        if(frame==9)
        {
            spawn01("cut1", 27, 36, 0);
        }
        if(frame==12)
        {
            spawn01("cut1", 27, 36, 0);
        }
        if(frame==13)
        {
            depost(0);
        }
        if(frame==13)
        {
            fixGrab("ANI_PAIN");
        }
        if(frame==13)
        {
            clearL();
        }
        if(frame==14)
        {
            randSound0("chars/wolverine/attack2.wav", "chars/wolverine/attack3.wav");
        }
        if(frame==14)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1166)
    {


    void self = getlocalvar("self");

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

    if(x>=105)

    {

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=105)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1168)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(1.25, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/wolverine/attack1.wav", "chars/wolverine/attack2.wav");
        }
        if(frame==1)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==2)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1169)
    {


    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"));

    }

	        if(frame==0)
        {
            spawnPosAni("afx2", 240, 0, 50, "ANI_FOLLOW6", 0);
        }
        return;
    }
    if(animhandle==1170)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            randSound("chars/wolverine/grunt1.wav", "chars/wolverine/grunt2.wav", "chars/wolverine/drill.wav");
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5.5, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==13)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==14)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==15)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==16)
        {
            noplayerJoin(0);
        }
        if(frame==16)
        {
            subjectScreen(1);
        }
        if(frame==16)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1171)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        if(frame==19)
        {
            velo001(2, 0, 0);
        }
        if(frame==20)
        {
            velo001(1.5, 0, 0);
        }
        if(frame==21)
        {
            velo001(1, 0, 0);
        }
        if(frame==22)
        {
            velo001(0, 0, 0);
        }
        if(frame==27)
        {
            noplayerJoin(0);
        }
        if(frame==27)
        {
            subjectScreen(1);
        }
        if(frame==27)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1172)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1173)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==5)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1174)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==5)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1175)
    {


	void self = getlocalvar("self");

    	int Map = getentityproperty(self, "map");

    	void target = findtarget(self);

    	if(Map>=3){

      performattack(self, openborconstant("ANI_FREESPECIAL9")); //Attack!

    }

	        if(frame==0)
        {
            randSound("chars/wolverine/grunt1.wav", "chars/wolverine/grunt2.wav", "chars/wolverine/tornado.wav");
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(4, 0, 1.5);
        }
        return;
    }
    if(animhandle==1176)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound0("chars/wolverine/attack3.wav", "chars/wolverine/attack4.wav");
        }
        return;
    }
    if(animhandle==1177)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/wolverine/spawn00.wav", "chars/wolverine/spawn01.wav");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1178)
    {


    void self = getlocalvar("self");

     if(frame==0){

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

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

    }

	        if(frame==0)
        {
            randSound0("chars/wolverine/attack5.wav", "chars/wolverine/attack6.wav");
        }
        return;
    }
    if(animhandle==1179)
    {
        if(frame==0)
        {
            ani0020(openborconstant("ANI_FOLLOW15"), openborconstant("ANI_FOLLOW15"));
        }
        if(frame==1)
        {
            ani0020(openborconstant("ANI_FOLLOW15"), openborconstant("ANI_FOLLOW15"));
        }
        if(frame==2)
        {
            ani0020(openborconstant("ANI_FOLLOW15"), openborconstant("ANI_FOLLOW15"));
        }
        return;
    }
    if(animhandle==1180)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1181)
    {
        if(frame==0)
        {
            spawn01("super", 0, 30, 0);
        }
        if(frame==0)
        {
            randSound0("chars/wolverine/hyper1.wav", "chars/wolverine/hyper2.wav");
        }
        if(frame==1)
        {
            randSound0("chars/wolverine/grunt1.wav", "chars/wolverine/grunt2.wav");
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==5)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==10)
        {
            randSound0("chars/wolverine/grunt1.wav", "chars/wolverine/grunt2.wav");
        }
        if(frame==14)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==19)
        {
            randSound0("chars/wolverine/grunt1.wav", "chars/wolverine/grunt2.wav");
        }
        if(frame==23)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==28)
        {
            anichangeattack("ANI_FOLLOW1");
        }
        return;
    }
    if(animhandle==1182)
    {


    void self = getlocalvar("self");

     if(frame==0){

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

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

    }

	        if(frame==0)
        {
            randSound0("chars/wolverine/attack6.wav", "chars/wolverine/drill.wav");
        }
        return;
    }
    if(animhandle==1183)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            randSound0("chars/wolverine/attack1.wav", "chars/wolverine/attack2.wav");
        }
        if(frame==4)
        {
            randSound0("chars/wolverine/attack1.wav", "chars/wolverine/attack2.wav");
        }
        if(frame==7)
        {
            randSound0("chars/wolverine/attack6.wav", "chars/wolverine/attack7.wav");
        }
        return;
    }
    if(animhandle==1184)
    {
        if(frame==3)
        {
            randSound("chars/wolverine/grunt1.wav", "chars/wolverine/grunt2.wav", "chars/wolverine/drill.wav");
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(4.5, NULL(), NULL());
        }
        if(frame==14)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==15)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==16)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==17)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1188)
    {
        if(frame==0)
        {
            randSound0("chars/wolverine/attack2.wav", "chars/wolverine/attack3.wav");
        }
        return;
    }
    if(animhandle==1189)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 30, 0, -1, 0);
        }
        if(frame==0)
        {
            cancelgrab("ANI_FOLLOW5");
        }
        if(frame==2)
        {
            position(4, 0, 46, 1, 0);
        }
        if(frame==3)
        {
            position(7, -8, 53, 1, 0);
        }
        if(frame==4)
        {
            position(7, 0, 33, 0, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(35, 2, 6, 1, 0, 0);
        }
        if(frame==5)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1190)
    {
        if(frame==0)
        {
            randSound0("chars/wolverine/extra1.wav", "chars/wolverine/extra2.wav");
        }
        return;
    }
    if(animhandle==1195)
    {
        if(frame==2)
        {
            randSound0("chars/wolverine/attack1.wav", "chars/wolverine/attack2.wav");
        }
        return;
    }
    if(animhandle==1196)
    {
        if(frame==1)
        {
            randSound0("chars/wolverine/attack2.wav", "chars/wolverine/attack3.wav");
        }
        return;
    }
    if(animhandle==1198)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1199)
    {


	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==1200)
    {


	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==1202)
    {
        if(frame==0)
        {
            randSound0("chars/wolverine/attack3.wav", "chars/wolverine/attack4.wav");
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(3.5, NULL(), 0);
        }
        if(frame==4)
        {
            velo001(1, NULL(), 0);
        }
        if(frame==5)
        {
            velo001(0, NULL(), 0);
        }
        return;
    }
    if(animhandle==1204)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3.5, 0, 2.5);
        }
        if(frame==1)
        {
            randSound0("chars/wolverine/attack6.wav", "chars/wolverine/attack7.wav");
        }
        return;
    }
    if(animhandle==1205)
    {
        if(frame==0)
        {
            randSound("chars/wolverine/select00.wav", "chars/wolverine/intro1.wav", "chars/wolverine/select02.wav");
        }
        return;
    }
    if(animhandle==1208)
    {
        if(frame==0)
        {
            randSound0("chars/wolverine/special1.wav", "chars/wolverine/special2.wav");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/npc/Beast_Bot/Beast_Bot.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1215)
    {
        if(frame==4)
        {
            spawn000("sboom", 0, 20, 0);
        }
        return;
    }
    if(animhandle==1217)
    {
        if(frame==0)
        {
            rspeed();
        }
        return;
    }
    if(animhandle==1218)
    {
        if(frame==0)
        {
            velo001(-1.3, 0, 2.9);
        }
        return;
    }
    if(animhandle==1220)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(3.5, NULL(), 2);
        }
        return;
    }
    if(animhandle==1221)
    {
        if(frame==6)
        {
            shooter("beam", 54, 31, -1, 4, 0, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/beast/btrap/btrap.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1230)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);



	if(frame==0){

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

	}

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

	setentityvar(self, 1, NULL());

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

	}

	        if(frame==0)
        {
            dasher(0, 0, 0);
        }
        return;
    }
    if(animhandle==1231)
    {
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1232)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);



	if(frame==0){

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

	}

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

	setentityvar(self, 1, NULL());

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

	}

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

}

#### animationscript function main #####
# data/chars/beast/_nave/_beastnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1233)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            toss("beamNave", 85, 12, 1, 3, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1235)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1237)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1238)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1239)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	

void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            spawn01("btrap", 60, 9, 1);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1243)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1245)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1247)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/beast/beast.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1253)
    {
        if(frame==0)
        {
            randSound0("chars/beast/att1.wav", "chars/beast/att1b.wav");
        }
        return;
    }
    if(animhandle==1255)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        if(frame==2)
        {
            velo001(1, 0, 0);
        }
        if(frame==3)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1257)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        if(frame==1)
        {
            velo001(1, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1259)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==1260)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1264)
    {
        if(frame==0)
        {
            velo001(-1.3, 0, 2.9);
        }
        return;
    }
    if(animhandle==1265)
    {
        if(frame==1)
        {
            randSound0("chars/beast/VO_BEAST_EFFORT2.wav", "chars/beast/VO_BEAST_EFFORT4.wav");
        }
        if(frame==17)
        {
            randSound0("chars/beast/BEAST_ATTACK02.wav", "chars/beast/BEAST_ATTACK03.wav");
        }
        return;
    }
    if(animhandle==1266)
    {
        if(frame==0)
        {
            velo001(-1.3, 0, 3.9);
        }
        return;
    }
    if(animhandle==1267)
    {
        if(frame==0)
        {
            spawn01("super", 0, 40, 0);
        }
        if(frame==1)
        {
            randSound0("chars/beast/cmdattacktarget2.wav", "chars/beast/iseeyou1.wav");
        }
        if(frame==6)
        {
            spawnAni("Beast_Bot", 0, 200, 0, "ANI_FOLLOW1", 0, 0, -2.5);
        }
        return;
    }
    if(animhandle==1269)
    {


    void self = getlocalvar("self");

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

    if(x>=30)

    {

    changeentityproperty(self,"subject_to_screen",1);

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1270)
    {
        if(frame==0)
        {
            velo001(-2.3, 0, 2.5);
        }
        return;
    }
    if(animhandle==1271)
    {


    void self = getlocalvar("self");

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

    if(x>=0)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1272)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            randSound0("chars/beast/incoming2.wav", "chars/beast/free2.wav");
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4.5, 0, 2);
        }
        return;
    }
    if(animhandle==1273)
    {


    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==1274)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(6.5, 0, 2);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(4, 0, 0);
        }
        if(frame==11)
        {
            velo001(3, 0, 0);
        }
        if(frame==12)
        {
            velo001(2, 0, 0);
        }
        if(frame==13)
        {
            noplayerJoin(0);
        }
        if(frame==13)
        {
            subjectScreen(1);
        }
        if(frame==13)
        {
            subjectWall(1);
        }
        if(frame==13)
        {
            velo001(1, 0, 0);
        }
        if(frame==14)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1275)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/beast/incoming2.wav", "chars/beast/free2.wav");
        }
        if(frame==2)
        {
            velo001(6.5, 0, 2);
        }
        if(frame==18)
        {
            noplayerJoin(0);
        }
        if(frame==18)
        {
            subjectScreen(1);
        }
        if(frame==18)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1276)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1277)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1278)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1279)
    {


if(frame==1){

void self = getlocalvar("self");

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

changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

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



}

	        return;
    }
    if(animhandle==1280)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1281)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/beast/incoming2.wav", "chars/beast/free2.wav");
        }
        if(frame==2)
        {
            velo001(5.5, 0, 2);
        }
        return;
    }
    if(animhandle==1282)
    {
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/beast/free2a.wav", "chars/beast/free2b.wav");
        }
        if(frame==3)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1283)
    {


if(frame ==0)

{

	void self = getlocalvar("self");

 	setlocalvar("Beast_Bot_count" + self, 0);

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



	int i;

    	for (i = 0; i < openborvariant("count_entities"); ++i)

		{

		void ent = getentity(i);

		if ( getentityproperty(ent, "exists") )

		   {

                	if ( getentityproperty(ent, "type") == openborconstant("TYPE_NPC") &&

		     getentityproperty(ent,"model")== "Beast_Bot")

    			{

			setlocalvar("Beast_Bot_count" + self, getlocalvar("Beast_Bot_count" + self) +1);

			}

		   }

		}

         int Beast_Bot_count = getlocalvar("Beast_Bot_count" + self);

         if(Beast_Bot_count <1 && mp >=60 )



	 {

	  changeentityproperty(self,"mp", mp - 60);

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

	  }

         setlocalvar("Beast_Bot_count" + self, NULL());

         }

	        return;
    }
    if(animhandle==1284)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1285)
    {


    void self = getlocalvar("self");

    if(frame==0){

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

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

    }

	        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==0)
        {
            velo001(4, 0, 0.5);
        }
        return;
    }
    if(animhandle==1286)
    {
        if(frame==0)
        {
            randSound0("chars/beast/113iseeyou2.wav", "chars/beast/114iseeyou3.wav");
        }
        if(frame==15)
        {
            anichangeattack("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==1290)
    {
        if(frame==2)
        {
            velo001(1, 0, 0);
        }
        if(frame==3)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1291)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 36, 0, -1, 0);
        }
        if(frame==3)
        {
            position(1, 58, 55, -1, 0);
        }
        if(frame==4)
        {
            position(4, 29, 64, -1, 0);
        }
        if(frame==5)
        {
            antiwall(-15, 55, 0);
        }
        if(frame==5)
        {
            position(8, 0, 73, -1, 0);
        }
        if(frame==6)
        {
            antiwall(-15, 55, 0);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            throw(35, 2, 5, -4, 0, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1300)
    {


	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==1301)
    {


	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==1303)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(5, 0, 2);
        }
        return;
    }
    if(animhandle==1305)
    {
        if(frame==0)
        {
            randSound0("chars/beast/att3.wav", "chars/beast/free1a.wav");
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4, 0, 2);
        }
        return;
    }
    if(animhandle==1308)
    {
        if(frame==1)
        {
            randSound0("chars/beast/cmdattacktarget2.wav", "chars/beast/iseeyou3.wav");
        }
        return;
    }
    if(animhandle==1309)
    {
        if(frame==0)
        {
            randSound0("chars/beast/free2a.wav", "chars/beast/free2b.wav");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/emma_frost/eap.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1314)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1315)
    {


if(frame == 13){

void self = getlocalvar("self");

killentity(self);

}

	        if(frame==0)
        {
            stop();
        }
        return;
    }
    if(animhandle==1316)
    {
        if(frame==2)
        {
            spawnAni("astral2", 0, 0, 0, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==4)
        {
            spawnAni("astral2", 0, 0, 0, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==6)
        {
            spawnAni("astral2", 0, 0, 0, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==8)
        {
            spawnAni("astral2", 0, 0, 0, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==11)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==14)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/emma_frost/astral1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1317)
    {


    if(frame==0){

      int eTime = openborvariant("elapsed_time");

	void self = getlocalvar("self");

      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 4000);

      changeentityproperty(self,"blink",2);

    }

	        if(frame==1)
        {
            velo001(2, 0, 1.2);
        }
        if(frame==14)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/emma_frost/astral2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1318)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1319)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1320)
    {


    if(frame==0){

      int eTime = openborvariant("elapsed_time");

	void self = getlocalvar("self");

      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 4000);

      changeentityproperty(self,"blink",2);

    }

	        if(frame==2)
        {
            velo001(2, 0, 4);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/emma_frost/emma_frost_d.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1324)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==1326)
    {
        if(frame==1)
        {
            velo001(2, 0, 1);
        }
        return;
    }
    if(animhandle==1327)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1328)
    {
        if(frame==0)
        {
            spawn01("freezefx2", -2, 35, 2);
        }
        if(frame==8)
        {
            spawn01("freezefx2", 3, 50, 2);
        }
        return;
    }
    if(animhandle==1330)
    {
        if(frame==2)
        {
            velo001(1.0, 0, 0);
        }
        if(frame==3)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==3)
        {
            randSound("chars/emma_frost/catch1.wav", "chars/emma_frost/catch2.wav", "chars/emma_frost/catch3.wav");
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1331)
    {
        if(frame==2)
        {
            spawn01("stompfx", 0, 0, 1);
        }
        return;
    }
    if(animhandle==1332)
    {


	if(frame==2)

	{

         	    int SFX1 = loadsample("data/chars/emma_frost/dia1.wav");

	       int SFX2 = loadsample("data/chars/emma_frost/dia2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==2)
        {
            velo001(1.5, 0, 4);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==5)
        {
            velo001(1.5, 0, -4.5);
        }
        if(frame==6)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==6)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }
    if(animhandle==1333)
    {
        if(frame==2)
        {
            velo001(2.5, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1334)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==3)
        {
            randSound0("chars/emma_frost/call-1.wav", "chars/emma_frost/call-2.wav");
        }
        if(frame==3)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1335)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/emma_frost/god.wav");

	       int SFX2 = loadsample("data/chars/emma_frost/god2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

    			 setglobalvar("MindControl2", NULL());

        }

	        if(frame==0)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==7)
        {
            changeName("Emma_Frost");
        }
        return;
    }
    if(animhandle==1337)
    {
        if(frame==0)
        {
            block(1);
        }
        if(frame==1)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1342)
    {
        if(frame==0)
        {
            spawn01("freezefx2", -2, 35, 2);
        }
        if(frame==8)
        {
            spawn01("freezefx2", 3, 50, 2);
        }
        return;
    }
    if(animhandle==1348)
    {


	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==1350)
    {
        if(frame==3)
        {
            velo001(3, 0, 1.5);
        }
        return;
    }
    if(animhandle==1352)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/emma_frost/runa.wav");

	       int SFX2 = loadsample("data/chars/emma_frost/runa2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==1)
        {
            velo001(3.5, 0, 2.5);
        }
        return;
    }
    if(animhandle==1353)
    {
        if(frame==1)
        {
            changeName("Diamond_Emma");
        }
        if(frame==2)
        {
            anichangeattack("ANI_FOLLOW10");
        }
        return;
    }
    if(animhandle==1354)
    {
        if(frame==3)
        {
            spawn01("stompfx", 0, 0, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/nave/_bbird.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1357)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1358)
    {
 {

	checkParentHealth ("ANI_FOLLOW1");

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/emma_frost/_nave/_emmanave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1359)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("beamNave", 28, 28, 5, 3, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1362)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1363)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1364)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1365)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            randSound("chars/nave/shield.wav", "chars/nave/at4.wav", "chars/nave/at45.wav");
        }
        if(frame==1)
        {
            shooter2("eap", 48, 28, 5, 6, 0, 0);
        }
        return;
    }
    if(animhandle==1366)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1368)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1369)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1370)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1371)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1373)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1374)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1381)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1382)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1383)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        if(frame==1)
        {
            shooter2("astral2", 0, 0, 0, 2, 0, 0);
        }
        return;
    }
    if(animhandle==1387)
    {
        if(frame==1)
        {
            shooter2("astral1", 0, 0, 0, 0, 0, 0);
        }
        return;
    }
    if(animhandle==1389)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==1390)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==1391)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1394)
    {
        if(frame==1)
        {
            anichangeattack("ANI_FREESPECIAL4");
        }
        return;
    }
    if(animhandle==1397)
    {


    void self = getlocalvar("self");

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

    if(x>=25)

    {

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=25)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1399)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(0.75, 0, 0);
        }
        if(frame==1)
        {
            shooter2("astral1", 0, 0, 0, 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1400)
    {


    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==1401)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            shooter2("eap", 20, 0, 0, 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(1, 0, 0);
        }
        if(frame==19)
        {
            noplayerJoin(0);
        }
        if(frame==19)
        {
            subjectScreen(1);
        }
        if(frame==19)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1402)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            move(75, 0, 0);
        }
        if(frame==1)
        {
            velo001(1, 0, 0);
        }
        if(frame==15)
        {
            velo001(0, 0, 0);
        }
        if(frame==21)
        {
            noplayerJoin(0);
        }
        if(frame==21)
        {
            subjectScreen(1);
        }
        if(frame==21)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1403)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1404)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1405)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1407)
    {


	if(frame==1)

	{

	       int SFX1 = loadsample("data/chars/emma_frost/eap.wav");

	       int SFX2 = loadsample("data/chars/emma_frost/eap2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            shooter2("eap", 0, 0, 0, 3, 0, 0);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1408)
    {
        if(frame==6)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1409)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==3)
        {
            randSound0("chars/emma_frost/call-1.wav", "chars/emma_frost/call-2.wav");
        }
        if(frame==3)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1410)
    {
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1411)
    {


        setglobalvar("MindControl2", NULL());

	        if(frame==0)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==5)
        {
            refill(25);
        }
        if(frame==7)
        {
            changeName("Diamond_Emma");
        }
        return;
    }
    if(animhandle==1413)
    {
        if(frame==0)
        {
            block(1);
        }


    if(frame==1){

      setglobalvar("MindControl2", NULL());

    }

	        return;
    }
    if(animhandle==1414)
    {


	if(frame==2)

	{

	       int SFX1 = loadsample("data/chars/emma_frost/eap.wav");

	       int SFX2 = loadsample("data/chars/emma_frost/eap2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==2)
        {
            shooter2("eap", 0, 0, 0, 3, -2, 0);
        }
        return;
    }
    if(animhandle==1425)
    {


	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==1426)
    {


	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==1427)
    {
        if(frame==1)
        {
            changeName("Emma_Frost");
        }
        if(frame==2)
        {
            anichangeattack("ANI_FOLLOW9");
        }
        return;
    }
    if(animhandle==1429)
    {
        if(frame==3)
        {
            velo001(3, 0, 1.5);
        }
        return;
    }
    if(animhandle==1431)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/emma_frost/runa.wav");

	       int SFX2 = loadsample("data/chars/emma_frost/runa2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3.5, 0, 2.5);
        }
        return;
    }
    if(animhandle==1432)
    {
        if(frame==0)
        {
            randSound0("chars/emma_frost/select.wav", "chars/emma_frost/select2.wav");
        }
        return;
    }
    if(animhandle==1433)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==1434)
    {
        if(frame==1)
        {
            changeName("Emma_Frost");
        }
        if(frame==2)
        {
            anichangeattack("ANI_FOLLOW10");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/brand/misc/bombb.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1441)
    {
        if(frame==0)
        {
            spawn01("sboom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==1442)
    {
        if(frame==0)
        {
            spawn01("sboom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==1443)
    {


void self = getlocalvar("self");

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

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

        if(dir==1){ // Facing right?

        changeentityproperty(self, "direction", 0); // Face left

         }

         if(z < 200){

         changeentityproperty(self, "velocity", -0.25, 2, 0);

         }





if(z >= 200){

shooter2 ("splash",20,0,5,3,0,0);

killentity(self);

}

	        if(frame==0)
        {
            minZ(0);
        }
        if(frame==0)
        {
            maxZ(0);
        }
        if(frame==0)
        {
            spawn01("po", 0, 20, 0);
        }
        if(frame==1)
        {
            spawn01("po", 0, 22, 0);
        }
        if(frame==2)
        {
            spawn01("po", 0, 20, 0);
        }
        if(frame==3)
        {
            spawn01("po", 0, 22, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 20, 0);
        }
        return;
    }
    if(animhandle==1444)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            dasher(0, -12, 0);
        }
        if(frame==0)
        {
            spawn01("po", 0, 20, 0);
        }
        if(frame==1)
        {
            spawn01("po", 0, 22, 0);
        }
        if(frame==2)
        {
            spawn01("po", 0, 20, 0);
        }
        if(frame==3)
        {
            spawn01("po", 0, 22, 0);
        }
        if(frame==4)
        {
            spawn01("po", 0, 20, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/brand/misc/cburst/cburst.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1445)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            spawn01("faisca", 5, 0, 1);
        }
        if(frame==1)
        {
            spawn01("faisca", 5, -10, 1);
        }
        if(frame==2)
        {
            spawn01("faisca", 5, 10, 1);
        }
        if(frame==3)
        {
            spawn01("faisca", 5, 0, 1);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1446)
    {
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            spawn01("faisca", 5, 0, 1);
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            spawn01("faisca", -5, 10, 1);
        }
        if(frame==4)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==5)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==5)
        {
            spawn01("faisca", 5, 0, 1);
        }
        if(frame==6)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==7)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==7)
        {
            spawn01("faisca", 5, 15, 1);
        }
        if(frame==8)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==9)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/brand/misc/tmine/tmine.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1447)
    {
        if(frame==24)
        {
            spawn000("fboom", 0, 0, 0);
        }
        if(frame==25)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1448)
    {
        if(frame==0)
        {
            spawn000("sboom", 0, 0, 0);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1449)
    {
        if(frame==0)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==1)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==2)
        {
            antiwallturn(10, 5, 0);
        }
        return;
    }

}

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

}

#### animationscript function main #####
# data/chars/brand/misc/trickm/trickm.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1452)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1453)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1454)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==18)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==19)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==20)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==21)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==22)
        {
            setspeed(4);
        }
        if(frame==22)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==23)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==24)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==25)
        {
            spawn01("po", -22, 0, 0);
        }
        if(frame==25)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        if(frame==26)
        {
            antiwallCollide(30, "ANI_FOLLOW1");
        }
        return;
    }

}

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


    if(frame==0){

      int eTime = openborvariant("elapsed_time");

	void self = getlocalvar("self");

      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 4000);

      changeentityproperty(self,"blink",2);

    }

	        if(frame==1)
        {
            toss("bombb", 0, 240, 0);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1456)
    {
        if(frame==8)
        {
            toss("bombb", 0, 240, 0);
        }
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1457)
    {
        if(frame==8)
        {
            toss("bombb", 0, 240, 0);
        }
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/brand/misc/bburst/bburst.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1458)
    {
        if(frame==1)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==2)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==3)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==4)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==5)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==6)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==7)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==8)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==9)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==10)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==11)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==12)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==13)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==14)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==15)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==16)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==17)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==18)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==19)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==20)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==21)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==22)
        {
            antiwallturn(10, 5, 0);
        }
        if(frame==23)
        {
            antiwallturn(10, 5, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/brand/misc/bigball/bigball.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1459)
    {
        if(frame==0)
        {
            dasher(0, 0, 0);
        }
        if(frame==21)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1460)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);



	if(frame==0){

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

	}

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

	setentityvar(self, 1, NULL());

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

	}

	        return;
    }

}

#### animationscript function main #####
# data/chars/brand/brand_w.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1461)
    {


         if (frame==1){

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

         int ammoControl = getglobalvar("ammoControl");

        setglobalvar("ammoControl", ammoControl-1);

        }

	        if(frame==2)
        {
            shooter("balaP", 23, 48, 0, 5, 0, 0);
        }
        return;
    }
    if(animhandle==1462)
    {


         if (frame==1){

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

         int ammoControl = getglobalvar("ammoControl");

        setglobalvar("ammoControl", ammoControl-1);

        }

	        if(frame==2)
        {
            shooter("balaP", 23, 48, 0, 5, 0, 0);
        }
        return;
    }
    if(animhandle==1463)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;





      if(r > 0){

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

      }

}

if (frame==1){

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

         int ammoControl = getglobalvar("ammoControl");

        setglobalvar("ammoControl", ammoControl-1);

}

	        if(frame==2)
        {
            shooter("balaP", 23, 48, 0, 5, 0, 0);
        }
        if(frame==5)
        {
            randSound0("chars/brand/attack3.wav", "chars/brand/attack4.wav");
        }
        return;
    }
    if(animhandle==1464)
    {


         if (frame==1){

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

         int ammoControl = getglobalvar("ammoControl");

        setglobalvar("ammoControl", ammoControl-1);

        }

	        if(frame==2)
        {
            shooter("balaP", 23, 48, 0, 5, 0, 0);
        }
        return;
    }
    if(animhandle==1465)
    {


                if(frame==0)

                {

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

                }

	        return;
    }
    if(animhandle==1466)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1470)
    {


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

         int gunControl = getglobalvar("gunControl");





        if(gunControl==0 && frame==1){

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

        }else if(gunControl==1 && frame==1){

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

        }else if(gunControl==2 && frame==1){

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

        }else if(gunControl==3 && frame==1){

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

        }else if(gunControl==4 && frame==1){

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

        }else if(gunControl==5 && frame==1){

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

        }

	        return;
    }
    if(animhandle==1471)
    {


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

         int ammoControl = getglobalvar("ammoControl");

         if(frame==0 && ammoControl<2){

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

        }

         if (frame==2){

        setglobalvar("ammoControl", ammoControl-2);

        }

	        if(frame==2)
        {
            spawn01("gshot", 20, 0, 0);
        }
        if(frame==4)
        {
            spawn01("gshot", 50, 0, 0);
        }
        if(frame==6)
        {
            spawn01("gshot", 80, 0, 0);
        }
        if(frame==8)
        {
            spawn01("gshot", 110, 0, 0);
        }
        if(frame==10)
        {
            spawn01("gshot", 140, 0, 0);
        }
        if(frame==12)
        {
            spawn01("gshot", 170, 0, 0);
        }
        return;
    }
    if(animhandle==1472)
    {


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

         int ammoControl = getglobalvar("ammoControl");

         if(frame==0 && ammoControl<2){

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

        }

         if (frame==5){

        setglobalvar("ammoControl", ammoControl-2);

        }

	        if(frame==4)
        {
            spawn01("po", 25, 60, 1);
        }
        if(frame==4)
        {
            toss("tmine", 25, 60, 0);
        }
        return;
    }
    if(animhandle==1473)
    {


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

         int ammoControl = getglobalvar("ammoControl");

         if(frame==0 && ammoControl<2){

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

        }

         if (frame==5){

        setglobalvar("ammoControl", ammoControl-2);

        }

	        if(frame==4)
        {
            shooter("cburst", 23, 48, 0, 1.2, 0, 0);
        }
        return;
    }
    if(animhandle==1474)
    {


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

         int ammoControl = getglobalvar("ammoControl");

         if(frame==0 && ammoControl<2){

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

        }

         if (frame==5){

        setglobalvar("ammoControl", ammoControl-2);

        }

	        if(frame==4)
        {
            spawn01("po", 38, 50, 1);
        }
        if(frame==4)
        {
            toss("trickm", 48, 50, 0);
        }
        return;
    }
    if(animhandle==1475)
    {


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

         int ammoControl = getglobalvar("ammoControl");

         if(frame==0 && ammoControl<2){

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

        }

         if (frame==4){

        setglobalvar("ammoControl", ammoControl-2);

        }

	        return;
    }
    if(animhandle==1476)
    {


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

         int ammoControl = getglobalvar("ammoControl");

         if(frame==0 && ammoControl<2){

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

        }

         if (frame==16){

        setglobalvar("ammoControl", ammoControl-2);

        }

	        if(frame==14)
        {
            shooter("bburst", 23, 48, 0, 5, 0, 0);
        }
        if(frame==18)
        {
            velo001(-2, NULL(), NULL());
        }
        if(frame==18)
        {
            spawn01("pom", 0, 0, 0);
        }
        if(frame==19)
        {
            velo001(-1, NULL(), NULL());
        }
        if(frame==20)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1477)
    {


         if (frame==0){

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

        int gunControl = getglobalvar("gunControl"); // Get gunControld state

            if (gunControl<5){

            setglobalvar("gunControl", gunControl+1);

            } else {

            setglobalvar("gunControl",0);

            }

        }

	        return;
    }
    if(animhandle==1478)
    {
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1479)
    {
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(3, 0, 2);
        }
        if(frame==7)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==1480)
    {


         if (frame==0){

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

         int ammoControl = getglobalvar("ammoControl");

        setglobalvar("ammoControl", ammoControl-1);

        }

	        if(frame==0)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==0)
        {
            shooter("balaP", 23, 48, 0, 5, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==1481)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1482)
    {
        if(frame==9)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==10)
        {
            dasher(-2, 0, 0);
        }
        if(frame==10)
        {
            toss("bigball", 43, 44, 0);
        }
        if(frame==11)
        {
            dasher(-1, 0, 0);
        }
        if(frame==12)
        {
            dasher(-0.5, 0, 0);
        }
        if(frame==13)
        {
            dasher(0, 0, 0);
        }
        return;
    }
    if(animhandle==1483)
    {


         if (frame==4){

              void self = getlocalvar("self");

            setglobalvar("ammoControl", NULL());

            changeentityproperty(self, "weapon", 2);

            	int  iTime = openborvariant("elapsed_time");

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

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

        }

	        return;
    }
    if(animhandle==1484)
    {


         if (frame==4){

              void self = getlocalvar("self");

            setglobalvar("ammoControl", NULL());

            changeentityproperty(self, "weapon", 2);

        }

	        return;
    }
    if(animhandle==1485)
    {


         if (frame==0){

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

        int gunControl = getglobalvar("gunControl"); // Get gunControld state

            if (gunControl>0){

            setglobalvar("gunControl", gunControl-1);

            } else {

            setglobalvar("gunControl",5);

            }

        }

	        return;
    }
    if(animhandle==1487)
    {


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

         int ammoControl = getglobalvar("ammoControl");

            if(ammoControl<=0){

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

            }

	        if(frame==0)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1489)
    {


         if (frame==1){

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

         int ammoControl = getglobalvar("ammoControl");

        setglobalvar("ammoControl", ammoControl-1);

        }

	        if(frame==1)
        {
            shooter2("balaP", 21, 35, 0, 5, -5, 0);
        }
        if(frame==3)
        {
            shooter2("balaP", 23, 38, 0, 5, -5, 0);
        }
        return;
    }
    if(animhandle==1490)
    {


         if (frame==1){

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

         int ammoControl = getglobalvar("ammoControl");

        setglobalvar("ammoControl", ammoControl-1);

        }

	        if(frame==2)
        {
            shooter2("balaP", 22, 11, 0, 1.5, -5, 0);
        }
        return;
    }
    if(animhandle==1491)
    {


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

         int ammoControl = getglobalvar("ammoControl");

        if(ammoControl<=0 && frame==2){

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

        }

	        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==1493)
    {


	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==1495)
    {
        if(frame==4)
        {
            shooter2("balaP", 21, 35, 0, 5, -5, 0);
        }
        if(frame==6)
        {
            shooter2("balaP", 23, 38, 0, 5, -5, 0);
        }
        return;
    }
    if(animhandle==1498)
    {
        if(frame==0)
        {
            randSound0("chars/brand/special1.wav", "chars/brand/special2.wav");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/brand/_nave/_brandnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1501)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("balaP", 37, 28, 0, 5, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1503)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1504)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1505)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1506)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            shooter("bburst", 37, 28, 0, 5, 0, 0);
        }
        if(frame==8)
        {
            velo001(-2, 0, 0);
        }
        return;
    }
    if(animhandle==1507)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            velo001(2, 0, 0);
        }
        if(frame==0)
        {
            shooter("smb", -20, 28, -1, -2, 0, 0);
        }
        return;
    }
    if(animhandle==1510)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1512)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1514)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/Bala.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1520)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1521)
    {
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/brand/brand.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1523)
    {
        if(frame==0)
        {
            spawnAni("faisca", -13, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("faisca", 25, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1524)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;





      if(r > 0){

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

      }

    }

	        if(frame==1)
        {
            randSound0("chars/brand/attack3.wav", "chars/brand/attack4.wav");
        }
        return;
    }
    if(animhandle==1525)
    {
        if(frame==2)
        {
            velo001(2, 0, 1);
        }
        if(frame==2)
        {
            randSound0("chars/brand/attack3.wav", "chars/brand/attack4.wav");
        }
        return;
    }
    if(animhandle==1526)
    {


                if(frame==0)

                {

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

                }

	        return;
    }
    if(animhandle==1527)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1529)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==1)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1530)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==1)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1531)
    {
        if(frame==0)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/brand/attack2.wav", "chars/brand/attack3.wav");
        }
        if(frame==1)
        {
            spawnAni("cdust", 4, 39, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==2)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==4)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==6)
        {
            spawnAni("faisca", 30, 4, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==8)
        {
            spawnAni("faisca", 30, 4, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1532)
    {
        if(frame==0)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/brand/attack2.wav", "chars/brand/attack3.wav");
        }
        if(frame==1)
        {
            spawnAni("cdust", 4, 39, 1, "ANI_FOLLOW4", 0, 0, 0);
        }
        if(frame==1)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==2)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==4)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 4, 39, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==6)
        {
            spawnAni("faisca", 30, 4, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==8)
        {
            spawnAni("faisca", 30, 4, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1533)
    {


    void self = getlocalvar("self");

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

    if(x>=80)

    {

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=80)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1535)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(2.5, 0, 2.5);
        }
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1536)
    {


    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==1537)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            shooter("bburst", 23, 48, 0, 5, 0, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(5, 0, 2.5);
        }
        if(frame==10)
        {
            noplayerJoin(0);
        }
        if(frame==10)
        {
            subjectScreen(1);
        }
        if(frame==10)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1538)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, 0, 3);
        }
        if(frame==9)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==12)
        {
            noplayerJoin(0);
        }
        if(frame==12)
        {
            subjectScreen(1);
        }
        if(frame==12)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1539)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1540)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1541)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1542)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/brand/free10.wav", "chars/brand/free11.wav");
        }
        if(frame==2)
        {
            velo001(3.5, 0, 0);
        }
        if(frame==2)
        {
            spawnAni("faisca", 25, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==4)
        {
            spawnAni("faisca", 25, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            velo001(0.5, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 25, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==7)
        {
            spawnAni("faisca", 25, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==9)
        {
            velo001(0, 0, 0);
        }
        if(frame==9)
        {
            spawnAni("faisca", 25, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==11)
        {
            spawnAni("faisca", 25, 26, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==13)
        {
            spawnAni("faisca", 25, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==15)
        {
            spawnAni("faisca", 25, 26, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1544)
    {
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1545)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==7)
        {
            anichangeattack("ANI_FOLLOW2");
        }
        return;
    }
    if(animhandle==1546)
    {
        if(frame==8)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==9)
        {
            dasher(-2, 0, 0);
        }
        if(frame==9)
        {
            toss("bigball", 43, 44, 0);
        }
        if(frame==10)
        {
            dasher(-1, 0, 0);
        }
        if(frame==11)
        {
            dasher(-0.5, 0, 0);
        }
        if(frame==12)
        {
            dasher(0, 0, 0);
        }
        return;
    }
    if(animhandle==1548)
    {


        if (frame==1){

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

        int ammo = 20;

        setglobalvar("ammoControl", ammo);

   changeentityproperty(self, "aiflag", "running", 0); // added line

        }

	        if(frame==0)
        {
            velo001(0, 0, 0);
        }
        if(frame==3)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1549)
    {


    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==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==7)
        {
            anichangeattack("ANI_FOLLOW3");
        }
        return;
    }
    if(animhandle==1554)
    {
        if(frame==7)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1555)
    {
        if(frame==1)
        {
            slamstart(1);
        }
        if(frame==1)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==2)
        {
            position(1, 22, 45, -1, 0);
        }
        if(frame==3)
        {
            position(4, 18, 32, -1, 0);
        }
        if(frame==3)
        {
            randSound0("chars/brand/attack2.wav", "chars/brand/attack1.wav");
        }
        if(frame==4)
        {
            position(7, 7, 44, -1, 0);
        }
        if(frame==5)
        {
            antiwall(-15, 55, 0);
        }
        if(frame==5)
        {
            depost(0);
        }
        if(frame==5)
        {
            throw(30, 2, 6, -1, 0, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        if(frame==8)
        {
            anichange("ANI_FOLLOW1");
        }
        return;
    }
    if(animhandle==1556)
    {
        if(frame==0)
        {
            fixGrab("ANI_PAIN");
        }
        if(frame==1)
        {
            randSound0("chars/brand/grab1.wav", "chars/brand/grab2.wav");
        }
        if(frame==17)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1557)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==3)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==4)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 13, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==6)
        {
            spawnAni("faisca", 13, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1563)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==1)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1564)
    {


	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==1566)
    {
        if(frame==1)
        {
            randSound0("chars/brand/attack3.wav", "chars/brand/attack4.wav");
        }
        if(frame==3)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==4)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==6)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==7)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1568)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3.5, 0, 2.5);
        }
        return;
    }
    if(animhandle==1570)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1571)
    {
        if(frame==1)
        {
            toss("bombb", 100, 240, 0);
        }
        if(frame==1)
        {
            toss("bombb", 100, 240, 0);
        }
        if(frame==2)
        {
            toss("bombb", 100, 240, 0);
        }
        if(frame==3)
        {
            toss("bombb", 100, 240, 0);
        }
        return;
    }
    if(animhandle==1572)
    {
        if(frame==0)
        {
            randSound0("chars/brand/special1.wav", "chars/brand/special2.wav");
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==4)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==6)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==7)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==8)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==9)
        {
            velo001(1, 0, -2);
        }
        if(frame==9)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        if(frame==10)
        {
            spawnAni("faisca", 0, 46, 1, "ANI_FOLLOW1", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1574)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/nave/_nave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1576)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1577)
    {
 {

	checkParentHealth ("ANI_FOLLOW1");

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/blackcat/_nave/_catnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1578)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("beamNave", 65, 36, 1, 3, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1582)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1584)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1585)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1586)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            randSound("chars/nave/shield.wav", "chars/nave/at4.wav", "chars/nave/at45.wav");
        }
        if(frame==1)
        {
            toss("missile", 22, 60, -1);
        }
        if(frame==1)
        {
            toss("missile", 22, 16, -1);
        }
        return;
    }
    if(animhandle==1587)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1589)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1590)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1591)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1592)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1594)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1601)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1602)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1603)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==1611)
    {
        if(frame==2)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==5)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==6)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==7)
        {
            bmtFriction(2, 0, 0);
        }
        return;
    }
    if(animhandle==1612)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==1613)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1614)
    {
        if(frame==1)
        {
            velo001(NULL(), NULL(), 1);
        }
        return;
    }
    if(animhandle==1616)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1617)
    {
        if(frame==0)
        {
            cancelgrabMED("ANI_FOLLOW2");
        }
        if(frame==0)
        {
            slamstart(0);
        }
        if(frame==0)
        {
            position(0, 65, 0, -1, 0);
        }
        if(frame==0)
        {
            randSound0("chars/blackcat/gotcha1.wav", "chars/blackcat/gotcha2.wav");
        }
        if(frame==1)
        {
            position(0, 55, 0, -1, 0);
        }
        if(frame==2)
        {
            position(0, 50, 0, -1, 0);
        }
        if(frame==3)
        {
            position(0, 45, 0, -1, 0);
        }
        if(frame==4)
        {
            position(0, 40, 0, -1, 0);
        }
        if(frame==5)
        {
            position(0, 35, 0, -1, 0);
        }
        if(frame==6)
        {
            position(0, 30, 0, -1, 0);
        }
        if(frame==7)
        {
            position(0, 25, 0, -1, 0);
        }
        if(frame==8)
        {
            position(0, 25, 0, -1, 0);
        }
        if(frame==8)
        {
            throw(0, 1, 0, 1.2, 0, 0);
        }
        if(frame==8)
        {
            depost(0);
        }
        if(frame==8)
        {
            clearL();
        }
        if(frame==29)
        {
            velo001(1.5, 0, 2.0);
        }
        if(frame==36)
        {
            velo001(1.5, 0, 2.5);
        }
        if(frame==39)
        {
            slow(1);
        }
        if(frame==41)
        {
            slow(0);
        }
        if(frame==41)
        {
            randSound0("chars/blackcat/somer1.wav", "chars/blackcat/haha1.wav");
        }
        return;
    }
    if(animhandle==1618)
    {
        if(frame==2)
        {
            randSound0("chars/blackcat/somer1.wav", "chars/blackcat/somer2.wav");
        }
        if(frame==3)
        {
            velo001(1.5, 0, 4.5);
        }
        return;
    }
    if(animhandle==1620)
    {


    void self = getlocalvar("self");

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

    if(x>=60)

    {

      changeentityproperty(self,"subject_to_screen",1);

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

    }

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


    void self = getlocalvar("self");

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

    if(x>=80)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1622)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==2)
        {
            velo001(0.75, 0, 1);
        }
        if(frame==4)
        {
            velo001(0, 0, 0);
        }
        return;
    }
    if(animhandle==1623)
    {


    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==1624)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, 0, 1.75);
        }
        if(frame==7)
        {
            velo001(4, 0, 0);
        }
        if(frame==14)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==15)
        {
            dasher(0, 0, 0);
        }
        if(frame==17)
        {
            noplayerJoin(0);
        }
        if(frame==17)
        {
            subjectScreen(1);
        }
        if(frame==17)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1625)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, 0, 2.25);
        }
        if(frame==17)
        {
            noplayerJoin(0);
        }
        if(frame==17)
        {
            subjectScreen(1);
        }
        if(frame==17)
        {
            subjectWall(1);
        }
        if(frame==17)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1626)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1627)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==9)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1628)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==9)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1629)
    {
        if(frame==0)
        {
            spawn01("sdust", 15, 0, 0);
        }
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        if(frame==5)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==6)
        {
            velo001(0.2, NULL(), NULL());
        }
        if(frame==7)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1630)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "aiflag", "drop", 0);
        }
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "aiflag", "falling", 0);
        }
        return;
    }
    if(animhandle==1631)
    {
        if(frame==0)
        {
            spawn01("sdust", 15, 0, 0);
        }
        if(frame==0)
        {
            velo001(3, 0, 0);
        }
        if(frame==4)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==5)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==6)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1632)
    {
        if(frame==0)
        {
            spawn01("sdust", 15, 0, 0);
        }
        if(frame==0)
        {
            velo001(2.75, 0, 0);
        }
        if(frame==5)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==6)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==7)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==8)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1633)
    {
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==1)
        {
            randSound0("chars/blackcat/comeon1.wav", "chars/blackcat/comeon2.wav");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1634)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

    }



	        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            randSound0("chars/blackcat/somer1.wav", "chars/blackcat/haha1.wav");
        }
        if(frame==13)
        {
            velo001(1, 0, -2);
        }
        return;
    }
    if(animhandle==1636)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1637)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

    }



	        if(frame==0)
        {
            randSound0("chars/blackcat/somer1.wav", "chars/blackcat/somer2.wav");
        }
        return;
    }
    if(animhandle==1638)
    {
        if(frame==0)
        {
            spawn01("super", 0, 55, 0);
        }
        return;
    }
    if(animhandle==1639)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

    }

	        if(frame==3)
        {
            velo001(3, 0, -1);
        }
        if(frame==7)
        {
            velo001(3, 0, 1);
        }
        if(frame==11)
        {
            velo001(4, 0, 3);
        }
        return;
    }
    if(animhandle==1644)
    {
        if(frame==6)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==9)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==10)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==11)
        {
            bmtFriction(2, 0, 0);
        }
        return;
    }
    if(animhandle==1645)
    {
        if(frame==0)
        {
            randSound0("chars/blackcat/closer1.wav", "chars/blackcat/closer2.wav");
        }
        if(frame==5)
        {
            velo001(-1.5, 0, 2.5);
        }
        return;
    }
    if(animhandle==1646)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%4+4;



      if(r ==1){

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

      }

      if(r ==2){

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

      }

      if(r ==4){

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

      }

    }

	        return;
    }
    if(animhandle==1654)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1655)
    {


	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==1657)
    {
        if(frame==0)
        {
            velo001(3, 0, 0);
        }
        if(frame==7)
        {
            bmtFriction(2, 0, 0);
        }
        if(frame==8)
        {
            bmtFriction(2, 0, 0);
        }
        return;
    }
    if(animhandle==1659)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3.5, 0, 1.75);
        }
        return;
    }
    if(animhandle==1661)
    {
        if(frame==0)
        {
            randSound0("chars/blackcat/intro1.wav", "chars/blackcat/intro2.wav");
        }
        return;
    }
    if(animhandle==1662)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==1663)
    {
        if(frame==1)
        {
            anichangeattack("ANI_FOLLOW3");
        }
        return;
    }
    if(animhandle==1665)
    {
        if(frame==0)
        {
            randSound0("chars/blackcat/gotcha1.wav", "chars/blackcat/gotcha2.wav");
        }
        return;
    }
    if(animhandle==1667)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%4+4;



      if(r ==1){

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

      }

      if(r ==2){

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

      }

      if(r ==4){

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

      }

    }

	        return;
    }

}

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

}

#### animationscript function main #####
# data/chars/namor/wdash/wdash.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1674)
    {
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/waterd/waterd.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1675)
    {
        if(frame==0)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==0)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==1)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==3)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==3)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==5)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==5)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==7)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1676)
    {
        if(frame==0)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==2)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==3)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==4)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==5)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==6)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==7)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==8)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==9)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==10)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==11)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==12)
        {
            spawn01("waterfx", 10, 0, 7);
        }
        if(frame==13)
        {
            anichangeattack("ANI_FOLLOW1");
        }
        return;
    }
    if(animhandle==1677)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/geiser/geiser.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1678)
    {
        if(frame==2)
        {
            spawn01("waterfx", 10, 0, 0);
        }
        if(frame==3)
        {
            spawn01("waterfx", 10, 0, 0);
        }
        if(frame==4)
        {
            spawn01("waterfx", 10, 0, 0);
        }
        if(frame==6)
        {
            spawn01("waterfx", 10, 0, 0);
        }
        if(frame==8)
        {
            spawn01("waterfx", 10, 0, 0);
        }
        if(frame==10)
        {
            spawn01("waterfx", 10, 0, 0);
        }
        if(frame==11)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1679)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/namor/_nave/_namornave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1680)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("biospark", 48, 29, 1, 4, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1683)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1684)
    {


void self = getlocalvar("self");

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

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

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

    if(z != 200){ // Reached z limit

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

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

    }

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(3, 0.6);
        }
        if(frame==0)
        {
            shooter2("splash", 0, 0, 5, -3, 0, 0);
        }
        if(frame==1)
        {
            keymove(3, 0.6);
        }
        return;
    }
    if(animhandle==1685)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1686)
    {
        if(frame==4)
        {
            noplayerJoin(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1687)
    {


void self = getlocalvar("self");

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

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

if(z >= 180)

     {

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}

 if(z >=200)

 {

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

 }



	        if(frame==3)
        {
            velo001(4, 6, 0);
        }
        return;
    }
    if(animhandle==1688)
    {


void self = getlocalvar("self");

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

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

if(z >= 180)

     {

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}

	        if(frame==0)
        {
            velo001(3, -5, 0);
        }
        if(frame==0)
        {
            shooter2("splash", 0, 0, 5, -3, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/attack4.wav");
        }
        return;
    }
    if(animhandle==1689)
    {


void self = getlocalvar("self");

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

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

if(z >= 180)

     {

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}

	        if(frame==0)
        {
            velo001(-5, -3, 0);
        }
        if(frame==0)
        {
            shooter2("splash", 0, 0, 5, -3, 0, 0);
        }
        return;
    }
    if(animhandle==1691)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1693)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1695)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        if(frame==1)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/attack4.wav");
        }
        return;
    }
    if(animhandle==1704)
    {
        if(frame==1)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==2)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/attack4.wav");
        }
        if(frame==3)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1705)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1706)
    {
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1707)
    {
        if(frame==2)
        {
            spawn01("biospark", 48, 39, 0);
        }
        return;
    }
    if(animhandle==1709)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1710)
    {
        if(frame==0)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==1)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(3.5, NULL(), 4.5);
        }
        if(frame==5)
        {
            velo001(2.0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1711)
    {
        if(frame==0)
        {
            velo001(0, NULL(), 0);
        }
        return;
    }
    if(animhandle==1712)
    {
        if(frame==1)
        {
            velo001(0, 0, -4);
        }
        if(frame==3)
        {
            spawn01("sflash2", 8, 60, 0);
        }
        if(frame==4)
        {
            randSound0("chars/namor/begone.wav", "chars/namor/getout.wav");
        }
        if(frame==5)
        {
            spawn01("GRSpark", 46, 0, 0);
        }
        return;
    }
    if(animhandle==1713)
    {


	void self = getlocalvar("self");

    if(frame==0){

      int eTime = openborvariant("elapsed_time");



      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 90);

      changeentityproperty(self,"blink",1);

    }

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

    if (y>135){

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

    }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 1.5);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keyflip();
        }
        return;
    }
    if(animhandle==1714)
    {


    void self = getlocalvar("self");

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

    if(x>=15)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", -30, 0, 0);
        }
        return;
    }
    if(animhandle==1715)
    {


    void self = getlocalvar("self");

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

    if(x>=15)

    {

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

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        if(frame==3)
        {
            spawn01("po", -30, 0, 0);
        }
        return;
    }
    if(animhandle==1716)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(6.5, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==5)
        {
            slow(0);
        }
        return;
    }
    if(animhandle==1717)
    {


    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==1718)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(6.5, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==5)
        {
            noplayerJoin(0);
        }
        if(frame==5)
        {
            subjectScreen(1);
        }
        if(frame==5)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1719)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4.5, NULL(), NULL());
        }
        if(frame==1)
        {
            spawn01("po", -30, 0, 0);
        }
        if(frame==2)
        {
            spawn01("po", -30, 0, 0);
        }
        if(frame==3)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==7)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==8)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(0, 0, 0);
        }
        if(frame==22)
        {
            noplayerJoin(0);
        }
        if(frame==22)
        {
            subjectScreen(1);
        }
        if(frame==22)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1720)
    {


    void self = getlocalvar("self");

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

    if(y<=10)

    {

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

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1721)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1722)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1723)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==0)
        {
            velo001(-1.5, NULL(), NULL());
        }
        if(frame==0)
        {
            randSound0("chars/namor/attack2.wav", "chars/namor/attack4.wav");
        }
        if(frame==1)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(6.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==6)
        {
            slow(0);
        }
        return;
    }
    if(animhandle==1724)
    {


    void self = getlocalvar("self");



    if(frame==0){

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

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

        changeentityproperty(self, "subject_to_gravity", 1);

    }

	        if(frame==0)
        {
            velo001(3.5, NULL(), 0.5);
        }
        return;
    }
    if(animhandle==1725)
    {
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1726)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==2)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/attack2.wav");
        }
        if(frame==3)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==3)
        {
            shooter2("geiser", 20, 0, 0, 2.5, 0, 0);
        }
        return;
    }
    if(animhandle==1727)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1728)
    {
        if(frame==13)
        {
            spawn01("super", 0, 45, 0);
        }
        if(frame==18)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==18)
        {
            shooter2("waterd", 20, 0, 0, 3, 0, 0);
        }
        return;
    }
    if(animhandle==1729)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1730)
    {
        if(frame==0)
        {
            checkPal2("ANI_WALKOFF", 7);
        }
        if(frame==0)
        {
            velo001(3.5, NULL(), 0.5);
        }
        if(frame==0)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/attack4.wav");
        }
        return;
    }
    if(animhandle==1731)
    {
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 45, 0, -1, 0);
        }
        if(frame==1)
        {
            randSound0("chars/namor/nochance.wav", "chars/namor/stand.wav");
        }
        if(frame==2)
        {
            position(4, 57, 69, -1, 0);
        }
        if(frame==3)
        {
            position(7, 11, 73, -1, 0);
        }
        if(frame==4)
        {
            position(10, -60, 55, -1, 0);
        }
        if(frame==5)
        {
            antiwall(-15, 55, 0);
        }
        if(frame==5)
        {
            position(14, -44, 5, -1, 0);
        }
        if(frame==5)
        {
            spawn01("stompfx", -44, 0, 0);
        }
        if(frame==5)
        {
            spawn01("crack", -44, 0, -1);
        }
        if(frame==5)
        {
            hurt9(25);
        }
        if(frame==6)
        {
            position(4, -60, 55, -1, 1);
        }
        if(frame==7)
        {
            position(10, -15, 73, -1, 0);
        }
        if(frame==8)
        {
            position(4, -25, 71, -1, 0);
        }
        if(frame==9)
        {
            position(6, -45, 51, -1, 0);
        }
        if(frame==10)
        {
            position(6, 0, 40, -1, 0);
        }
        if(frame==11)
        {
            depost(0);
        }
        if(frame==11)
        {
            throw(25, 2, 8, -3, 0, 0);
        }
        if(frame==12)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1736)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 55, 0, -1, 0);
        }
        if(frame==1)
        {
            position(4, 43, 39, -1, 0);
        }
        if(frame==1)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/weakling.wav");
        }
        if(frame==2)
        {
            position(7, -8, 51, -1, 0);
        }
        if(frame==3)
        {
            position(7, -8, 30, -1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(45, 2, 8, 1, 0, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1737)
    {
        if(frame==0)
        {
            randSound0("chars/namor/stand.wav", "chars/namor/begone.wav");
        }
        return;
    }
    if(animhandle==1738)
    {
        if(frame==0)
        {
            slamstart(1);
        }
        if(frame==0)
        {
            position(0, 55, 0, -1, 0);
        }
        if(frame==1)
        {
            position(4, 43, 39, -1, 0);
        }
        if(frame==1)
        {
            randSound0("chars/namor/attack4.wav", "chars/namor/weakling.wav");
        }
        if(frame==2)
        {
            position(7, -8, 51, -1, 0);
        }
        if(frame==3)
        {
            position(7, -8, 30, -1, 0);
        }
        if(frame==4)
        {
            depost(0);
        }
        if(frame==4)
        {
            throw(45, 2, -8, 1, 0, 1);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1739)
    {
        if(frame==1)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/attack4.wav");
        }
        return;
    }
    if(animhandle==1746)
    {


	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==1747)
    {


	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==1749)
    {
        if(frame==1)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==2)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1750)
    {
        if(frame==2)
        {
            spawn01("po", -30, 0, 0);
        }
        return;
    }
    if(animhandle==1751)
    {
        if(frame==0)
        {
            spawn01("wdash", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==1)
        {
            randSound0("chars/namor/attack3.wav", "chars/namor/attack4.wav");
        }
        if(frame==2)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(1.5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(0.1, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1753)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1754)
    {
        if(frame==1)
        {
            anichange("ANI_FOLLOW3");
        }
        return;
    }
    if(animhandle==1755)
    {
        if(frame==2)
        {
            spawn01("sflash2", 8, 60, 0);
        }
        if(frame==2)
        {
            randSound0("chars/namor/begone.wav", "chars/namor/getout.wav");
        }
        if(frame==4)
        {
            spawn01("GRSpark", 46, 0, 0);
        }
        return;
    }

}

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

}

#### animationscript function main #####
# data/chars/nave/_heli.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1763)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1764)
    {
 {

	checkParentHealth ("ANI_FOLLOW1");

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/redhulk/_nave/_rednave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1765)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("balaP", 37, 28, 0, 5, 0, -0.3);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            shooter("balaP", 37, 28, 0, 5, 0, 0);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            shooter("balaP", 37, 28, 0, 5, 0, 0.3);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1768)
    {


void self = getlocalvar("self");

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

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1770)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1771)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1772)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            randSound("chars/nave/shield.wav", "chars/nave/at4.wav", "chars/nave/at45.wav");
        }
        if(frame==1)
        {
            shooter("cmissile", 37, 28, 10, 2, 0, 0);
        }
        return;
    }
    if(animhandle==1773)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1775)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1776)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1777)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1778)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1780)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

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

    if(x>=100)

    {

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

    }

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


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1787)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1788)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1789)
    {


void self = getlocalvar("self");

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

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

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

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

}

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


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

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

      }

    }

	        return;
    }
    if(animhandle==1795)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

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

		}

	        return;
    }
    if(animhandle==1796)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1799)
    {
        if(frame==0)
        {
            randSound("chars/redhulk/spec1.wav", "chars/redhulk/spec2.wav", "chars/redhulk/att5.wav");
        }
        return;
    }
    if(animhandle==1800)
    {


        if(frame==0){

        void vSelf = getlocalvar("self");

        int r = rand()%30;

        if(r > 0){

         changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW11"));

         }

        }

	        if(frame==0)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==1)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==2)
        {
            position(4, 18, 50, -1, 0);
        }
        if(frame==3)
        {
            position(19, 0, 71, -1, 0);
        }
        if(frame==4)
        {
            hurt2(15);
        }
        if(frame==4)
        {
            position(19, 0, 49, -2, 0);
        }
        if(frame==4)
        {
            spawn000("flash3", 0, 49, 0);
        }
        if(frame==5)
        {
            position(7, 0, 67, -1, 0);
        }
        if(frame==6)
        {
            antiwallanim(15, -65, -5, "ANI_FOLLOW6");
        }
        if(frame==6)
        {
            position(10, 4, 76, -1, 0);
        }
        if(frame==7)
        {
            position(10, 16, 67, -1, 0);
        }
        if(frame==8)
        {
            depost(0);
        }
        if(frame==8)
        {
            throw(25, 2, 6, -2, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1801)
    {
        if(frame==0)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==0)
        {
            slamstart2();
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==1)
        {
            antiwall(25, -35, 0);
        }
        if(frame==1)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==2)
        {
            antiwall(25, -35, 0);
        }
        if(frame==2)
        {
            position(1, 18, 50, -1, 0);
        }
        if(frame==3)
        {
            antiwall(25, -35, 0);
        }
        if(frame==3)
        {
            position(10, 8, 72, -1, 1);
        }
        if(frame==4)
        {
            antiwall(25, -35, 0);
        }
        if(frame==4)
        {
            move(-20, 2, 0);
        }
        if(frame==4)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==5)
        {
            antiwall(25, -35, 0);
        }
        if(frame==5)
        {
            position(14, 33, 2, -1, 0);
        }
        if(frame==5)
        {
            spawn01("stompfx", 10, 0, 0);
        }
        if(frame==5)
        {
            spawn01("crack", 10, 0, -1);
        }
        if(frame==6)
        {
            depost(0);
        }
        if(frame==6)
        {
            antiwall(15, -55, 0);
        }
        if(frame==6)
        {
            finish(50, 2, 2, 2, 0, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1802)
    {
        if(frame==0)
        {
            velo001(3, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1803)
    {
        if(frame==2)
        {
            dasher(0.75, -3.5, NULL());
        }
        if(frame==3)
        {
            anichangeattack("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==1805)
    {
        if(frame==5)
        {
            dasher(0.75, -2.5, NULL());
        }
        if(frame==5)
        {
            randSound("chars/redhulk/att4.wav", "chars/redhulk/att5.wav", "chars/redhulk/free1a.wav");
        }
        if(frame==6)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==9)
        {
            anichangeattack("ANI_FOLLOW4");
        }
        return;
    }
    if(animhandle==1807)
    {
        if(frame==0)
        {
            spawn01("mboom", 0, 0, 2);
        }
        if(frame==0)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==0)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }
    if(animhandle==1808)
    {


        void self = getlocalvar("self");

        int x = getentityproperty(self, "x");

        if(x>=50)

        {

        changeentityproperty(self,"subject_to_screen",1);

        performattack(getlocalvar("self"), openborconstant("ANI_CANT"));

        }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1809)
    {
        if(frame==0)
        {
            position(10, 4, 76, -1, 1);
        }
        if(frame==1)
        {
            position(10, 16, 67, -1, 0);
        }
        if(frame==2)
        {
            depost(0);
        }
        if(frame==2)
        {
            throw(25, 2, 4, -1, 0, 1);
        }
        if(frame==3)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1810)
    {


        void self = getlocalvar("self");

        int x = getentityproperty(self, "x");

        if(x>=5)

        {

        performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

        }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1811)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1812)
    {


    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_ATTACK4"));

    }

	        return;
    }
    if(animhandle==1813)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(5, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==5)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(0, 0, 0);
        }
        if(frame==18)
        {
            noplayerJoin(0);
        }
        if(frame==18)
        {
            subjectScreen(1);
        }
        if(frame==18)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1814)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==8)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==23)
        {
            noplayerJoin(0);
        }
        if(frame==23)
        {
            subjectScreen(1);
        }
        if(frame==23)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1815)
    {


    void self = getlocalvar("self");

    int y = getentityproperty(self, "y");

    if(y<=10)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW66"));

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1816)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==3)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1817)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==4)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1818)
    {
        if(frame==0)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==3)
        {
            cancelgrab("ANI_CANT");
        }
        if(frame==3)
        {
            anichangeattack("ANI_FOLLOW10");
        }
        return;
    }
    if(animhandle==1819)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==7)
        {
            velo001(2.5, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(0.75, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(0.25, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1820)
    {
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==4)
        {
            spawn01("super", 0, 50, 0);
        }
        if(frame==5)
        {
            shooter2("megamissile", 36, 47, 0, 1.5, 0, 0);
        }
        if(frame==7)
        {
            shooter2("megamissile", 36, 47, 0, 4, 0, 0);
        }
        return;
    }
    if(animhandle==1821)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==2)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1822)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/redhulk/free1a.wav");

	       int SFX2 = loadsample("data/chars/redhulk/free1b.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        return;
    }
    if(animhandle==1823)
    {
        if(frame==0)
        {
            checkPal2("ANI_CANT", 7);
        }
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==5)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==10)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==11)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==13)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1824)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1830)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 40, 0, -1, 0);
        }
        if(frame==1)
        {
            position(0, 38, 0, -1, 0);
        }
        if(frame==2)
        {
            position(5, 18, 70, -1, 0);
        }
        if(frame==3)
        {
            position(8, -4, 83, -1, 0);
        }
        if(frame==4)
        {
            position(11, -27, 77, -1, 0);
        }
        if(frame==5)
        {
            position(11, -43, 49, -1, 0);
        }
        if(frame==6)
        {
            move(0, 2, 0);
        }
        if(frame==6)
        {
            antiwall(-15, 55, 0);
        }
        if(frame==6)
        {
            position(14, -48, 3, -1, 0);
        }
        if(frame==6)
        {
            spawn01("stompfx", -48, 0, 0);
        }
        if(frame==6)
        {
            spawn01("crack", -48, 0, -1);
        }
        if(frame==7)
        {
            depost(0);
        }
        if(frame==7)
        {
            throw(50, 2, 6, -2, 0, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1831)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(0, 20, 0, -1, 0);
        }
        if(frame==1)
        {
            position(1, 21, 47, -1, 0);
        }
        if(frame==2)
        {
            position(4, 18, 50, -1, 0);
        }
        if(frame==3)
        {
            position(19, 0, 71, -1, 0);
        }
        if(frame==4)
        {
            position(19, 0, 49, -2, 0);
        }
        if(frame==5)
        {
            position(19, 0, 3, 1, 0);
        }
        if(frame==5)
        {
            hurt2(25);
        }
        if(frame==5)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==5)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==6)
        {
            position(19, 0, 49, -1, 0);
        }
        if(frame==7)
        {
            position(19, 0, 71, -1, 0);
        }
        if(frame==8)
        {
            position(19, 0, 49, -1, 0);
        }
        if(frame==9)
        {
            position(19, 0, 3, 1, 0);
        }
        if(frame==9)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==9)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==10)
        {
            depost(0);
        }
        if(frame==10)
        {
            throw(30, 1, 2, 1.5, 0, 0);
        }
        if(frame==10)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1832)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/redhulk/free1a.wav");

	       int SFX2 = loadsample("data/chars/redhulk/free1b.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==3)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==4)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==5)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==6)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==7)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==8)
        {
            spawn01("faisca", 0, 40, 0);
        }
        return;
    }
    if(animhandle==1838)
    {
        if(frame==2)
        {
            velo001(2.5, 0, -2.5);
        }
        return;
    }
    if(animhandle==1841)
    {


	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==1843)
    {
        if(frame==1)
        {
            dasher(2, 0, 0);
        }
        if(frame==2)
        {
            dasher(1, 0, 0);
        }
        if(frame==4)
        {
            dasher(0, 0, 0);
        }
        return;
    }
    if(animhandle==1845)
    {
        if(frame==2)
        {
            randSound0("chars/redhulk/att3.wav", "chars/redhulk/att2.wav");
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==2)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(1, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1848)
    {
        if(frame==2)
        {
            anichange("ANI_FOLLOW13");
        }
        return;
    }
    if(animhandle==1849)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/redhulk/att3.wav");

	       int SFX2 = loadsample("data/chars/redhulk/att4.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==1)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==2)
        {
            spawn01("faisca", 0, 30, 0);
        }
        if(frame==3)
        {
            spawn01("faisca", 0, 30, 0);
        }
        if(frame==4)
        {
            spawn01("faisca", 0, 40, 0);
        }
        if(frame==5)
        {
            spawn01("faisca", 0, 30, 0);
        }
        if(frame==6)
        {
            spawn01("mboom", 0, 0, 2);
        }
        if(frame==7)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("crack", 0, 0, -1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/net/netproj.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1855)
    {
        if(frame==4)
        {
            suicide();
        }
        return;
    }
    if(animhandle==1856)
    {
        if(frame==0)
        {
            ani0020(openborconstant("ANI_FOLLOW6"), openborconstant("ANI_PAIN3"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/spider-woman/_nave/_swnave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1857)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            shooter("biospark", 48, 29, 1, 4, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        if(frame==10)
        {
            keymove(2, 0.6);
        }
        if(frame==11)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1860)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==26)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1861)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1862)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    setglobalvar("SWNaveControl",NULL());

    if(x>=100)

    {



      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1863)
    {
        if(frame==1)
        {
            noplayerJoin(0);
        }
        if(frame==1)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1864)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            randSound("chars/nave/shield.wav", "chars/nave/at4.wav", "chars/nave/at45.wav");
        }
        return;
    }
    if(animhandle==1865)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1867)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1869)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     setglobalvar("SWNaveControl",NULL());

     changeentityproperty(self, "position", -200,150, 0);

     }

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1872)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     log("SPAWN \n");

     setglobalvar("SWNaveControl",NULL());

     changeentityproperty(self, "position", -200,150, 0);

     }

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1874)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

}

	        return;
    }
    if(animhandle==1875)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/spider-woman/_nave/_swnave2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1876)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==0)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            keymove(2, 0.6);
        }
        if(frame==1)
        {
            toss("laserp", 25, 25, 1, 4, 0, 0);
        }
        if(frame==2)
        {
            keymove(2, 0.6);
        }
        if(frame==3)
        {
            keymove(2, 0.6);
        }
        if(frame==4)
        {
            keymove(2, 0.6);
        }
        if(frame==5)
        {
            keymove(2, 0.6);
        }
        if(frame==6)
        {
            keymove(2, 0.6);
        }
        if(frame==7)
        {
            keymove(2, 0.6);
        }
        if(frame==8)
        {
            keymove(2, 0.6);
        }
        if(frame==9)
        {
            keymove(2, 0.6);
        }
        if(frame==10)
        {
            keymove(2, 0.6);
        }
        if(frame==11)
        {
            keymove(2, 0.6);
        }
        return;
    }
    if(animhandle==1879)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

setglobalvar("SWNaveControl",NULL());

if(z >= 180){

shooter2 ("waterfx",20,0,5,-6,0,0);

}

	        if(frame==0)
        {
            velo001(-4, 0, 0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==6)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==10)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==14)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==18)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==22)
        {
            spawnRandom("sboom", 10, 10);
        }
        if(frame==27)
        {
            spawnRandom("sboom", 10, 10);
        }
        return;
    }
    if(animhandle==1880)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1881)
    {


    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==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1882)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1883)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        if(frame==1)
        {
            toss("laserp", 25, 25, 1, 4, 0, 0);
        }
        if(frame==6)
        {
            toss("laserp", 25, 25, 1, -4, 0, 0);
        }
        return;
    }
    if(animhandle==1884)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1886)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }
    if(animhandle==1888)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1891)
    {


    void self = getlocalvar("self");

     if (frame==0)

     {

     changeentityproperty(self, "position", -200,150, 0);

     }

    int x = getentityproperty(self, "x");

    if(x>=100)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1894)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

int dir = getentityproperty(self, "direction");

if(z >= 180){

        if(dir==1){ // Facing right

           shooter2 ("waterfx",20,0,5,-6,0,0);

      } else {

      	   shooter2 ("waterfx",-30,0,5,6,0,0);

      }

	}	        return;
    }

}

#### animationscript function main #####
# data/chars/spider-woman/spiderwoman.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1896)
    {
        if(frame==0)
        {
            randSound0("chars/spider-woman/att2.wav", "chars/spider-woman/att6.wav");
        }
        return;
    }
    if(animhandle==1897)
    {


    if(frame==0){

      void vSelf = getlocalvar("self");

      int r = rand()%30;



      if(r > 0){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_ATTACK4"));

      }

    }

	        if(frame==0)
        {
            randSound0("chars/spider-woman/att7.wav", "chars/spider-woman/att4.wav");
        }
        return;
    }
    if(animhandle==1900)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        if(frame==0)
        {
            degravity(0);
        }
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1901)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1904)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }
    if(animhandle==1905)
    {
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            velo001(2, 0, 2.5);
        }
        if(frame==0)
        {
            clearL();
        }
        if(frame==7)
        {
            degravity(0);
        }
        if(frame==10)
        {
            randSound0("chars/spider-woman/lame.wav", "chars/spider-woman/easy.wav");
        }
        return;
    }
    if(animhandle==1907)
    {
        if(frame==0)
        {
            cancelgrabOBJ("ANI_FOLLOW3");
        }
        if(frame==0)
        {
            cancelgrabMED("ANI_FOLLOW3");
        }
        if(frame==0)
        {
            slamstart2(20);
        }
        if(frame==0)
        {
            antiwallanim(130, 0, 0, "ANI_FOLLOW6");
        }
        if(frame==0)
        {
            position(0, 119, 2, -1, 0);
        }
        if(frame==1)
        {
            antiwallanim(-130, 10, 0, "ANI_FOLLOW7");
        }
        if(frame==4)
        {
            position(30, 109, 3, -1, 0);
        }
        if(frame==5)
        {
            position(30, 109, 3, -1, 0);
        }
        if(frame==10)
        {
            antiwall(30, -35, 0);
        }
        if(frame==11)
        {
            antiwall(60, -65, 0);
        }
        if(frame==12)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==12)
        {
            spawn01("crack", 58, 0, -1);
        }
        if(frame==12)
        {
            hurt9(25);
        }
        if(frame==14)
        {
            position(30, 0, 3, -1, 0);
        }
        if(frame==17)
        {
            antiwall(60, -65, 0);
        }
        if(frame==18)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==18)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==18)
        {
            hurt9(25);
        }
        if(frame==23)
        {
            antiwall(60, -65, 0);
        }
        if(frame==24)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==24)
        {
            spawn01("crack", 58, 0, -1);
        }
        if(frame==24)
        {
            hurt9(25);
        }
        if(frame==29)
        {
            antiwall(60, -65, 0);
        }
        if(frame==30)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==30)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==30)
        {
            hurt9(25);
        }
        if(frame==35)
        {
            antiwall(60, -65, 0);
        }
        if(frame==36)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==36)
        {
            spawn01("crack", 58, 0, -1);
        }
        if(frame==36)
        {
            hurt9(25);
        }
        if(frame==36)
        {
            position(30, 58, 3, -1, 0);
        }
        if(frame==38)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==64)
        {
            move(0, 2, 0);
        }
        if(frame==64)
        {
            antiwall(60, -65, 0);
        }
        if(frame==65)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==65)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==65)
        {
            hurt9(25);
        }
        if(frame==65)
        {
            position(30, -58, 15, -1, 0);
        }
        if(frame==67)
        {
            depost(0);
        }
        if(frame==67)
        {
            throw(100, 2, 6, -4, 0, 0);
        }
        if(frame==68)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1908)
    {
        if(frame==0)
        {
            clearL();
        }
        if(frame==3)
        {
            velo001(3, 0, 0);
        }
        if(frame==4)
        {
            antiwall(60, -65, 0);
        }
        if(frame==4)
        {
            velo001(2, 0, 0);
        }
        if(frame==5)
        {
            velo001(0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==7)
        {
            spawn01("crack", 58, 0, -1);
        }
        if(frame==10)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1909)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound0("chars/spider-woman/att6.wav", "chars/spider-woman/att7.wav");
        }
        if(frame==0)
        {
            velo001(3.5, 0, 2.5);
        }
        return;
    }
    if(animhandle==1910)
    {


    void vSelf = getlocalvar("self");

    if(frame==0){

      changeentityproperty(vSelf, "aiflag", "jumping", 0);

      changeentityproperty(vSelf, "aiflag", "attacking", 1);

      int iTime = openborvariant("elapsed_time");

      changeentityproperty(vSelf, "velocity", 0, 0 , 0); // This is to stop entity from moving forward

      changeentityproperty(vSelf, "tosstime", iTime + 20);

    }

	        if(frame==3)
        {
            velo001(3, 0, -3);
        }
        return;
    }
    if(animhandle==1911)
    {


	void self = getlocalvar("self");

    if(frame==0){

      int eTime = openborvariant("elapsed_time");



      changeentityproperty(self, "invincible", 1);

      changeentityproperty(self, "invinctime", eTime + 60);

      changeentityproperty(self,"blink",1);

    }

    int y = getentityproperty(self,"y");

    if (y>135){

     performattack(getlocalvar("self"), openborconstant("ANI_FREESPECIAL12"));

    }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            keyflip();
        }
        if(frame==0)
        {
            velo001(0, 0, 1.5);
        }
        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL12", 2);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==2)
        {
            keyflip();
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keyflip();
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keyflip();
        }
        if(frame==5)
        {
            keymove(1.5);
        }
        if(frame==5)
        {
            keyflip();
        }
        if(frame==6)
        {
            keymove(1.5);
        }
        if(frame==6)
        {
            keyflip();
        }
        if(frame==7)
        {
            keymove(1.5);
        }
        if(frame==7)
        {
            velo001(0, 0, 1.5);
        }
        if(frame==7)
        {
            keyflip();
        }
        if(frame==8)
        {
            keymove(1.5);
        }
        if(frame==8)
        {
            keyflip();
        }
        if(frame==9)
        {
            keymove(1.5);
        }
        if(frame==9)
        {
            keyflip();
        }
        return;
    }
    if(animhandle==1912)
    {


    void self = getlocalvar("self");

     int x = getentityproperty(self, "x");

    if(x>=60)

    {

    changeentityproperty(self,"subject_to_screen",1);

    performattack(getlocalvar("self"), openborconstant("ANI_CANT"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1913)
    {
        if(frame==0)
        {
            slamstart2(20);
        }
        if(frame==0)
        {
            position(0, 55, 2, -1, 0);
        }
        if(frame==4)
        {
            position(30, 55, 3, -1, 0);
        }
        if(frame==5)
        {
            position(30, 50, 3, -1, 0);
        }
        if(frame==10)
        {
            antiwall(30, -15, 0);
        }
        if(frame==11)
        {
            antiwall(60, -15, 0);
        }
        if(frame==12)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==12)
        {
            spawn01("crack", 58, 0, -1);
        }
        if(frame==12)
        {
            hurt9(25);
        }
        if(frame==14)
        {
            position(30, 0, 3, -1, 0);
        }
        if(frame==17)
        {
            antiwall(60, -15, 0);
        }
        if(frame==18)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==18)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==18)
        {
            hurt9(25);
        }
        if(frame==23)
        {
            antiwall(60, -65, 0);
        }
        if(frame==24)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==24)
        {
            spawn01("crack", 58, 0, -1);
        }
        if(frame==24)
        {
            hurt9(25);
        }
        if(frame==29)
        {
            antiwall(60, -65, 0);
        }
        if(frame==30)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==30)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==30)
        {
            hurt9(25);
        }
        if(frame==35)
        {
            antiwall(60, -65, 0);
        }
        if(frame==36)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==36)
        {
            spawn01("crack", 58, 0, -1);
        }
        if(frame==36)
        {
            hurt9(25);
        }
        if(frame==36)
        {
            position(30, 58, 3, -1, 0);
        }
        if(frame==38)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==64)
        {
            move(0, 2, 0);
        }
        if(frame==64)
        {
            antiwall(60, -65, 0);
        }
        if(frame==65)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==65)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==65)
        {
            hurt9(25);
        }
        if(frame==65)
        {
            position(30, 0, 15, -1, 0);
        }
        if(frame==67)
        {
            depost(0);
        }
        if(frame==67)
        {
            throw(100, 2, 6, -4, 0, 0);
        }
        if(frame==68)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1914)
    {


    void self = getlocalvar("self");

     int x = getentityproperty(self, "x");

    if(x>=-60)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW61"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(2.75, 0, 0);
        }
        return;
    }
    if(animhandle==1915)
    {
        if(frame==0)
        {
            noplayerJoin(0);
        }
        if(frame==0)
        {
            subjectScreen(1);
        }
        if(frame==0)
        {
            velo001(4.5, 0, 0);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==8)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1916)
    {


    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_ATTACK3"));

    }

	        return;
    }
    if(animhandle==1917)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(5, 0, 2.5);
        }
        if(frame==8)
        {
            noplayerJoin(0);
        }
        if(frame==8)
        {
            subjectScreen(1);
        }
        if(frame==8)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1918)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            velo001(4, 0, 3);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("po", -17, 0, 0);
        }
        if(frame==11)
        {
            degravity(0);
        }
        if(frame==11)
        {
            noplayerJoin(0);
        }
        if(frame==11)
        {
            subjectScreen(1);
        }
        if(frame==11)
        {
            subjectWall(1);
        }
        return;
    }
    if(animhandle==1919)
    {


    void self = getlocalvar("self");

    int y = getentityproperty(self, "y");

    if(y<=10)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW66"));

    }

	        if(frame==0)
        {
            move(0, 0, 200);
        }
        if(frame==0)
        {
            degravity(1);
        }
        if(frame==0)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==1920)
    {
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1921)
    {
        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==2)
        {
            subjectScreen(1);
        }
        return;
    }
    if(animhandle==1922)
    {
        if(frame==0)
        {
            slamstart2(20);
        }
        if(frame==0)
        {
            position(0, 55, 2, -1, 0);
        }
        if(frame==4)
        {
            position(30, 55, 3, -1, 0);
        }
        if(frame==5)
        {
            position(30, 50, 3, -1, 0);
        }
        if(frame==10)
        {
            antiwall(30, -5, 0);
        }
        if(frame==11)
        {
            antiwall(60, -5, 0);
        }
        if(frame==12)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==12)
        {
            hurt9(25);
        }
        if(frame==14)
        {
            position(30, 0, 3, -1, 0);
        }
        if(frame==17)
        {
            antiwall(60, -5, 0);
        }
        if(frame==18)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==18)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==18)
        {
            hurt9(25);
        }
        if(frame==23)
        {
            antiwall(60, -5, 0);
        }
        if(frame==24)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==24)
        {
            hurt9(25);
        }
        if(frame==29)
        {
            antiwall(60, -5, 0);
        }
        if(frame==30)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==30)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==30)
        {
            hurt9(25);
        }
        if(frame==35)
        {
            antiwall(60, -5, 0);
        }
        if(frame==36)
        {
            spawn01("stompfx", 58, 0, 0);
        }
        if(frame==36)
        {
            hurt9(25);
        }
        if(frame==36)
        {
            position(30, 58, 3, -1, 0);
        }
        if(frame==38)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==64)
        {
            move(0, 2, 0);
        }
        if(frame==64)
        {
            antiwall(60, -5, 0);
        }
        if(frame==65)
        {
            spawn01("stompfx", -58, 0, 0);
        }
        if(frame==65)
        {
            spawn01("crack", -58, 0, -1);
        }
        if(frame==65)
        {
            hurt9(25);
        }
        if(frame==65)
        {
            position(30, 0, 15, -1, 0);
        }
        if(frame==67)
        {
            depost(0);
        }
        if(frame==67)
        {
            throw(100, 2, 6, -4, 0, 0);
        }
        if(frame==68)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1923)
    {
        if(frame==0)
        {
            cancelgrabOBJ("ANI_FOLLOW9");
        }
        if(frame==0)
        {
            cancelgrabMED("ANI_FOLLOW9");
        }
        if(frame==1)
        {
            slamstart2(20);
        }
        if(frame==1)
        {
            position(0, 50, 2, -1, 0);
        }
        if(frame==2)
        {
            position(0, 30, 2, -1, 0);
        }
        if(frame==3)
        {
            position(4, 12, 62, -1, 0);
        }
        if(frame==4)
        {
            position(8, 0, 70, -1, 0);
        }
        if(frame==5)
        {
            position(8, 0, 55, -1, 0);
        }
        if(frame==6)
        {
            position(8, 0, 35, 1, 0);
        }
        if(frame==6)
        {
            randSound("chars/spider-woman/att6.wav", "chars/spider-woman/att4.wav", "chars/spider-woman/att3.wav");
        }
        if(frame==7)
        {
            depost(0);
        }
        if(frame==7)
        {
            throw(40, 2, 6, 1, 0, 0);
        }
        if(frame==9)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1924)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==0)
        {
            randSound0("chars/spider-woman/att6.wav", "chars/spider-woman/att7.wav");
        }
        if(frame==0)
        {
            clearL();
        }
        if(frame==1)
        {
            velo001(3.5, 0, 2.5);
        }
        return;
    }
    if(animhandle==1925)
    {
        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL18", 2);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound("chars/spider-woman/att4.wav", "chars/spider-woman/shutup.wav", "chars/spider-woman/att5.wav");
        }
        if(frame==4)
        {
            spawn01("fxspark", 30, 25, 1);
        }
        if(frame==7)
        {
            spawn01("fxspark", 60, 25, 1);
        }
        if(frame==10)
        {
            spawn01("fxspark", 90, 25, 1);
        }
        return;
    }
    if(animhandle==1926)
    {
        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL18", 2);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound("chars/spider-woman/att4.wav", "chars/spider-woman/shutup.wav", "chars/spider-woman/att5.wav");
        }
        return;
    }
    if(animhandle==1927)
    {


    void self = getlocalvar("self");



    if(frame==0){

      changeentityproperty(self, "aiflag", "jumping", 0);

  changeentityproperty(self, "aiflag", "attacking", 1);

        changeentityproperty(self, "subject_to_gravity", 1);

    }

	        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL13", 2);
        }
        if(frame==1)
        {
            velo001(3, 0, -1);
        }
        if(frame==6)
        {
            velo001(4, 0, NULL());
        }
        if(frame==9)
        {
            velo001(4.5, 0, 1);
        }
        if(frame==10)
        {
            spawn01("cdust", 35, 35, 1);
        }
        if(frame==11)
        {
            velo001(6, 0, NULL());
        }
        if(frame==17)
        {
            velo001(6, 0, 2);
        }
        if(frame==21)
        {
            velo001(2, 0, 3);
        }
        return;
    }
    if(animhandle==1928)
    {


void self = getlocalvar("self");

changeentityproperty(self, "subject_to_gravity", 1);

	        return;
    }
    if(animhandle==1929)
    {


    void self = getlocalvar("self");



    if(frame==0){

      changeentityproperty(self, "aiflag", "jumping", 0);

  changeentityproperty(self, "aiflag", "attacking", 1);

  int iTime = openborvariant("elapsed_time");

      changeentityproperty(self, "velocity", 0, 0 , 0); // This is to stop entity from moving forward

      changeentityproperty(self, "tosstime", iTime + 20);

    }

	        return;
    }
    if(animhandle==1930)
    {


	void self = getlocalvar("self");

    int y = getentityproperty(self,"y");

    if (y>135){

     performattack(getlocalvar("self"), openborconstant("ANI_FREESPECIAL12"));

    }

	        if(frame==0)
        {
            checkStageType("truck", "ANI_FREESPECIAL12");
        }
        return;
    }
    if(animhandle==1931)
    {
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1934)
    {
        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL3", 2);
        }
        return;
    }
    if(animhandle==1935)
    {
        if(frame==3)
        {
            degravity(1);
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(2, 0, 2.5);
        }
        if(frame==7)
        {
            degravity(0);
        }
        return;
    }
    if(animhandle==1936)
    {
        if(frame==0)
        {
            checkStageType("bonus", "ANI_CANT");
        }
        if(frame==0)
        {
            checkStageType("truck", "ANI_CANT");
        }
        if(frame==0)
        {
            checkHelper("ANI_CANT");
        }
        if(frame==0)
        {
            antiwallanim(-15, 30, 0, "ANI_CANT");
        }
        if(frame==3)
        {
            spawnAni("aHelper", -40, 20, 1, "ANI_IDLE", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1939)
    {
        if(frame==0)
        {
            ani0020(openborconstant("ANI_RUNATTACK"), openborconstant("ANI_PAIN3"));
        }
        if(frame==4)
        {
            shooter("netproj", 22, 38, -1, 3.5, 0, 0);
        }
        return;
    }
    if(animhandle==1940)
    {


	if(frame==0)

	{

	       int SFX1 = loadsample("data/chars/spider-woman/hyper1.wav");

	       int SFX2 = loadsample("data/chars/spider-woman/hyper2.wav");

	       void vSelf = getlocalvar("self");

      	       int r = rand()%30;

      	       if(r > 0){

               playsample(SFX1, 0, 120, 120, 100, 0);

    			 }

    			 if(r <= 0){

               playsample(SFX2, 0, 120, 120, 100, 0);

    			 }

        }

	        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL9", 2);
        }
        if(frame==4)
        {
            spawn01("super", 0, 75, 0);
        }
        if(frame==6)
        {
            randSound0("chars/spider-woman/scream1.wav", "chars/spider-woman/scream2.wav");
        }
        if(frame==7)
        {
            spawn01("stompfx", -17, 0, 0);
        }
        if(frame==9)
        {
            spawn01("fxspark", 30, 25, 1);
        }
        if(frame==12)
        {
            spawn01("fxspark", 10, 55, 1);
        }
        if(frame==16)
        {
            spawn01("fxspark", 30, 25, 1);
        }
        if(frame==20)
        {
            spawn01("fxspark", 0, 35, 1);
        }
        return;
    }
    if(animhandle==1941)
    {
        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL16", 2);
        }
        if(frame==0)
        {
            block(1);
        }
        return;
    }
    if(animhandle==1942)
    {
        if(frame==3)
        {
            degravity(1);
        }
        if(frame==3)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            velo001(2, 0, 2.5);
        }
        if(frame==10)
        {
            degravity(0);
        }
        if(frame==13)
        {
            randSound0("chars/spider-woman/lame.wav", "chars/spider-woman/easy.wav");
        }
        if(frame==16)
        {
            anichangeattack("ANI_FOLLOW1");
        }
        return;
    }
    if(animhandle==1943)
    {


	void self = getlocalvar("self");

        void MPower = getentityproperty(self,"mp"); //get mp

	if (MPower <= 2){

    changeentityproperty(self, "animation", openborconstant("ANI_JUMP"));

	   }

	        if(frame==0)
        {
            keymove(1.5);
        }
        if(frame==0)
        {
            checkPal3("ANI_FREESPECIAL14", 2);
        }
        if(frame==2)
        {
            keymove(1.5);
        }
        if(frame==3)
        {
            keymove(1.5);
        }
        if(frame==4)
        {
            keymove(1.5);
        }
        if(frame==5)
        {
            keymove(1.5);
        }
        if(frame==6)
        {
            keymove(1.5);
        }
        if(frame==7)
        {
            keymove(1.5);
        }
        if(frame==8)
        {
            keymove(1.5);
        }
        if(frame==9)
        {
            keymove(1.5);
        }
        return;
    }
    if(animhandle==1944)
    {
        if(frame==1)
        {
            spawn01("super", 0, 35, 0);
        }
        return;
    }
    if(animhandle==1948)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        return;
    }
    if(animhandle==1949)
    {
        if(frame==0)
        {
            slamstart(10);
        }
        if(frame==0)
        {
            position(1, 30, 44, -1, 0);
        }
        if(frame==1)
        {
            position(0, 30, 0, -1, 0);
        }
        if(frame==2)
        {
            position(5, 39, 47, -1, 0);
        }
        if(frame==2)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==3)
        {
            position(8, 16, 65, -1, 0);
        }
        if(frame==4)
        {
            position(11, -29, 65, -1, 0);
        }
        if(frame==4)
        {
            velo001(NULL(), 0, -4.5);
        }
        if(frame==4)
        {
            randSound0("chars/spider-woman/shutup.wav", "chars/spider-woman/gotcha.wav");
        }
        if(frame==5)
        {
            position(14, -29, 47, -1, 0);
        }
        if(frame==6)
        {
            move(0, 2, 0);
        }
        if(frame==6)
        {
            antiwall(-30, 35, 0);
        }
        if(frame==6)
        {
            position(17, -17, 3, -1, 0);
        }
        if(frame==6)
        {
            spawn01("stompfx", -17, 0, 0);
        }
        if(frame==6)
        {
            spawn01("crack", -17, 0, -1);
        }
        if(frame==7)
        {
            depost(0);
        }
        if(frame==7)
        {
            throw(30, 2, 5, -4, 0, 0);
        }
        if(frame==7)
        {
            clearL();
        }
        return;
    }
    if(animhandle==1950)
    {
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==1)
        {
            randSound0("chars/spider-woman/done.wav", "chars/spider-woman/weak.wav");
        }
        return;
    }
    if(animhandle==1958)
    {


	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==1959)
    {


	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==1961)
    {
        if(frame==1)
        {
            velo001(0, -1.5, 2);
        }
        return;
    }
    if(animhandle==1962)
    {
        if(frame==3)
        {
            spawn01("po", -40, 0, 0);
        }
        return;
    }
    if(animhandle==1963)
    {
        if(frame==0)
        {
            checkPal3("ANI_FOLLOW4", 2);
        }
        if(frame==0)
        {
            randSound0("chars/spider-woman/att6.wav", "chars/spider-woman/att7.wav");
        }
        if(frame==1)
        {
            velo001(4.5, 0, 0);
        }
        if(frame==1)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==10)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==12)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==13)
        {
            velo001(0, NULL(), NULL());
        }
        return;
    }
    if(animhandle==1964)
    {
        if(frame==0)
        {
            randSound0("chars/spider-woman/intro1.wav", "chars/spider-woman/intro2.wav");
        }
        return;
    }
    if(animhandle==1965)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            degravity(0);
        }
        if(frame==0)
        {
            gravity(1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/huditem/huditem.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1973)
    {


	int myVar = getglobalvar("HelperControl");

	checkStageType("truck","ANI_FOLLOW2");

	checkStageType("bonus","ANI_FOLLOW2");

	if (myVar>0){

    	       void self = getlocalvar("self");

               performattack(self, openborconstant("ANI_IDLE"));

        }

	        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        return;
    }
    if(animhandle==1974)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        return;
    }
    if(animhandle==1975)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1976)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1977)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1978)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1979)
    {
        if(frame==1)
        {
            layer(2400);
        }
        if(frame==19)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1980)
    {
        if(frame==1)
        {
            layer(2400);
        }
        return;
    }
    if(animhandle==1981)
    {


	int myVar = getglobalvar("HelperControl");

	checkStageType("truck","ANI_FOLLOW2");

	checkStageType("bonus","ANI_FOLLOW2");

	if (myVar<1 || myVar==NULL()){

    	       void self = getlocalvar("self");

               performattack(self, openborconstant("ANI_FOLLOW1"));

        }



	        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/stompfx/stompfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1984)
    {
        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==1985)
    {
        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/stomprock/stomprock.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1986)
    {
        if(frame==0)
        {
            spawnRandEnt("debris1", "debris2", "debris3", "debris4", 0, 0, 0);
        }
        if(frame==0)
        {
            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);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/crack/crack.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1987)
    {




	     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==1988)
    {
        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==1989)
    {
        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==1990)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1991)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1992)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1993)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==1994)
    {
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/faisca/faiscah.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1995)
    {
        if(frame==1)
        {
            moveRandom(10, 10, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/gshock/gshock.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1996)
    {


if(frame == 54){

void self = getlocalvar("self");

killentity(self);

}

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fireball/fireball.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1997)
    {
        if(frame==0)
        {
            spawn01("faisca", 0, 0, 1);
        }
        if(frame==4)
        {
            spawn01("faisca", 0, 0, 1);
        }
        if(frame==8)
        {
            spawn01("faisca", 0, 0, 10);
        }
        if(frame==12)
        {
            spawn01("faisca", 0, 0, 1);
        }
        if(frame==16)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fireball/fireballp.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1998)
    {
        if(frame==0)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==2)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==4)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==6)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==8)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==10)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==12)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==14)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==16)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/aHelper/proj/shurr.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==1999)
    {


	void self = getlocalvar("self");

        void time = openborvariant("elapsed_time");

        void mTime = time - (openborvariant("elapsed_time")-100);

        float a,x,y;

        x = -sin(time/1.45)*2;

        y = -cos(time/1.45)/3;

        changeentityproperty(self, "velocity", x, y, 0) ;





        if(frame==0){

        //changeentityproperty(self,"blink",2);

         }

	        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2000)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);

        int time;



        float x,z;



        if(frame==0){

        //changeentityproperty(self,"blink",2);

        setentityvar(self, 1, openborvariant("elapsed_time"));

        time = 0;



        }

        if (frame==1){

        int Screen = openborvariant("hResolution")/2; // Get screen width

        int XPos = openborvariant("xpos");

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z")); // Get width

        changeentityproperty(self, "position", Screen+XPos-120, Width+1, 0);

        }

        if (frame>0)

        {

        x = sin(time/1.45)*2;

        z = cos(time/1.45)/2;

        changeentityproperty(self, "velocity", x, z, 0) ;

        time +=7;

        //setglobalvar("HelperControl", time);

        }



         if(Summon <= openborvariant("elapsed_time") - 1000){

         setentityvar(self, 1, NULL());

         performattack(self,openborconstant("ANI_FOLLOW2"));

         }





	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/magicpillar/magicpillar.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2001)
    {
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2002)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);



	if(frame==0){

	setentityvar(self, 1, openborvariant("elapsed_time"));

	}

	if(Summon <= openborvariant("elapsed_time") - 280){

	setentityvar(self, 1, NULL());

	performattack(self,openborconstant("ANI_FOLLOW1"));

	}

	        if(frame==9)
        {
            spawnAni("freezefx2", 0, 0, 2, "ANI_FOLLOW1", 0, -1, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bird/bird.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2005)
    {
        if(frame==0)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==1)
        {
            spawn01("faiscah", 10, 20, 1);
        }
        if(frame==2)
        {
            spawn01("faiscah", -15, -15, 1);
        }
        if(frame==3)
        {
            spawn01("faiscah", 5, 10, 1);
        }
        if(frame==4)
        {
            spawn01("faiscah", 0, 0, 1);
        }
        if(frame==5)
        {
            spawn01("faiscah", 10, 20, 1);
        }
        if(frame==6)
        {
            spawn01("faiscah", -15, -15, 1);
        }
        if(frame==7)
        {
            spawn01("faiscah", 9, 25, 1);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/aHelper/aHelper.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2006)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

  	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_wall",1);

	}

	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(1.5, 0, -3);
        }
        if(frame==1)
        {
            changepal(0);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==7)
        {
            shooter("balaP", 34, 47, 0, 5, 0, 0);
        }
        if(frame==7)
        {
            shooter("balaP", -43, 43, 0, -5, 0, 0);
        }
        if(frame==9)
        {
            shooter("balaP", 34, 47, 0, 5, 0, 0);
        }
        if(frame==9)
        {
            shooter("balaP", -43, 43, 0, -5, 0, 0);
        }
        if(frame==11)
        {
            shooter("balaP", 34, 47, 0, 5, 0, 0);
        }
        if(frame==11)
        {
            shooter("balaP", -43, 43, 0, -5, 0, 0);
        }
        if(frame==13)
        {
            shooter("balaP", 34, 47, 0, 5, 0, 0);
        }
        if(frame==13)
        {
            shooter("balaP", -43, 43, 0, -5, 0, 0);
        }
        if(frame==15)
        {
            shooter("balaP", 34, 47, 0, 5, 0, 0);
        }
        if(frame==15)
        {
            shooter("balaP", -43, 43, 0, -5, 0, 0);
        }
        if(frame==17)
        {
            shooter("balaP", 34, 47, 0, 5, 0, 0);
        }
        if(frame==17)
        {
            shooter("balaP", -43, 43, 0, -5, 0, 0);
        }
        if(frame==20)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==20)
        {
            velo001(4, 0, 6);
        }
        if(frame==21)
        {
            noplayerJoin(0);
        }
        if(frame==21)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2007)
    {


	void self = getlocalvar("self"); //Get calling entity.

	if(frame==0){

          }

	if (frame==1){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",1);

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos-20, Width+1, 70);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            velo001(3, NULL(), 0);
        }
        if(frame==1)
        {
            changepal(9);
        }
        if(frame==8)
        {
            velo001(0, NULL(), 0);
        }
        if(frame==15)
        {
            damage_all_enemies(2, 0, "ATK_NORMAL", "flash", "beat2.wav");
        }
        if(frame==21)
        {
            damage_all_enemies(2, 0, "ATK_NORMAL", "flash", "beat2.wav");
        }
        if(frame==27)
        {
            damage_all_enemies(2, 0, "ATK_NORMAL8", "eaph", "hiteap.wav");
        }
        if(frame==32)
        {
            damage_all_enemies(2, 1, "ATK_NORMAL", "flash", "beat2.wav");
        }
        if(frame==33)
        {
            velo001(-3, NULL(), 0);
        }
        if(frame==47)
        {
            noplayerJoin(0);
        }
        if(frame==47)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2008)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_wall",1);

	//changeentityproperty(self, "direction", 1);

        changeentityproperty(self, "position", NULL(),NULL(),0);

	}

	if (frame==1){

        setglobalvar("HelperControl", 0);

        }

	        if(frame==0)
        {
            changepal(10);
        }
        if(frame==31)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2009)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_wall",1);

	//changeentityproperty(self, "direction", 1);

        changeentityproperty(self, "position", NULL(),NULL(),0);

	}

	if (frame==1){

        setglobalvar("HelperControl", 0);

        }

	        if(frame==0)
        {
            changepal(11);
        }
        if(frame==56)
        {
            noplayerJoin(0);
        }
        if(frame==56)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2010)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

  	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_wall",1);

	}

	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-140, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(1.5, 0, -3);
        }
        if(frame==1)
        {
            changepal(12);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==6)
        {
            shooter("bird", 55, 42, 0, 3, 0, 0);
        }
        if(frame==10)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==10)
        {
            velo001(1, 0, 9);
        }
        if(frame==11)
        {
            noplayerJoin(0);
        }
        if(frame==11)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2011)
    {


	void self = getlocalvar("self"); //Get calling entity.

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	int P1 = getplayerproperty(0, "entity");

        int P2 = getplayerproperty(1, "entity");

  	int P1Name = getentityproperty(P1,"defaultmodel");

	int P2Name = getentityproperty(P2,"defaultmodel");

	changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Black_Widow" || P2Name == "Black_Widow")

           {

             performattack(self, openborconstant("ANI_FREESPECIAL2"));

	   }

	}

	if (frame==1){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",1);

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos-80, Width+1, 70);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            velo001(2.5, NULL(), 0);
        }
        if(frame==1)
        {
            changepal(13);
        }
        if(frame==9)
        {
            toss("bombb", 20, 340, 0);
        }
        if(frame==9)
        {
            toss("bombb", -20, 240, 50);
        }
        if(frame==15)
        {
            toss("bombb", 0, 290, -50);
        }
        if(frame==15)
        {
            toss("bombb", 40, 390, 50);
        }
        if(frame==19)
        {
            toss("bombb", 80, 290, -15);
        }
        if(frame==19)
        {
            toss("bombb", 140, 460, 15);
        }
        if(frame==23)
        {
            velo001(4, 0, 6);
        }
        if(frame==39)
        {
            noplayerJoin(0);
        }
        if(frame==39)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2012)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

  	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_wall",1);

	}

	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-150, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(1.5, 0, -3);
        }
        if(frame==1)
        {
            changepal(14);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==7)
        {
            spawn01("freezefx2", 70, 44, 2);
        }
        if(frame==8)
        {
            spawn01("freezefx2", 140, 34, 2);
        }
        if(frame==9)
        {
            spawn01("freezefx2", 210, 54, 2);
        }
        if(frame==10)
        {
            spawn01("freezefx2", 280, 54, 2);
        }
        if(frame==21)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==21)
        {
            velo001(4, 0, 6);
        }
        if(frame==23)
        {
            noplayerJoin(0);
        }
        if(frame==23)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2013)
    {


	void self = getlocalvar("self");

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	int P1 = getplayerproperty(0, "entity");

        int P2 = getplayerproperty(1, "entity");

	changeentityproperty(self,"subject_to_wall",1);

	changeentityproperty(self,"subject_to_obstacle",1);

	changeentityproperty(self,"subject_to_platform",1);

	changeentityproperty(self,"no_adjust_base",0);

        if (frame>=4){

	antiwallCollideDir(20);

	}

	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==0)
        {
            antiwallRandom(20);
        }
        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(1.5, 0, -3);
        }
        if(frame==1)
        {
            changepal(1);
        }
        if(frame==2)
        {
            changepal(1);
        }
        if(frame==4)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==6)
        {
            velo001(1.75, NULL(), NULL());
        }
        if(frame==7)
        {
            velo001(0.5, NULL(), NULL());
        }
        if(frame==9)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==10)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==11)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==13)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==13)
        {
            velo001(1, 0, 3);
        }
        if(frame==19)
        {
            noplayerJoin(0);
        }
        if(frame==19)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2014)
    {


	void self = getlocalvar("self"); //Get calling entity.

	int Summon = getentityvar(self, 1);

	if(frame==0){

        setentityvar(self, 1, openborvariant("elapsed_time"));

        }

	if (frame==1){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",1);

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos-20, Width+1, 70);

        }

        if(Summon <= openborvariant("elapsed_time") - 1300){

      setentityvar(self, 1, NULL());

      performattack(self,openborconstant("ANI_FOLLOW70"));

    }

    	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            velo001(3, NULL(), NULL());
        }
        if(frame==1)
        {
            changepal(2);
        }
        if(frame==2)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==3)
        {
            velo001(1, NULL(), NULL());
        }
        if(frame==4)
        {
            velo001(0, NULL(), NULL());
        }
        if(frame==4)
        {
            spawn01("shurr", 0, 0, 0);
        }
        return;
    }
    if(animhandle==2015)
    {


	void self = getlocalvar("self"); //Get calling entity.

	int Summon = getentityvar(self, 1);

	if (frame==1){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",0);

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos-20, openborvariant("PLAYER_MAX_Z"), 50);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            velo001(1.8, -0.25, 0.15);
        }
        if(frame==1)
        {
            changepal(3);
        }
        if(frame==6)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==9)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==12)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==15)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==18)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==21)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==24)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==27)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==30)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==33)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==36)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==39)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==42)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==45)
        {
            shooterCD("fireball", "TYPE_ENEMY", 20, 9, 0, 2.3, -12, 0, 0);
        }
        if(frame==48)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2016)
    {


	if (frame==0)

	{

	void self = getlocalvar("self");

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	int P1 = getplayerproperty(0, "entity");

        int P2 = getplayerproperty(1, "entity");

  	int P1Name = getentityproperty(P1,"defaultmodel");

	int P2Name = getentityproperty(P2,"defaultmodel");

	changeentityproperty(self,"subject_to_obstacle",1);

	changeentityproperty(self,"subject_to_platform",1);

	changeentityproperty(self,"no_adjust_base",0);

	changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Captain_America" || P2Name == "Captain_America")

           {

           performattack(self, openborconstant("ANI_FREESPECIAL2"));

	   }

}

	if(frame==3)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(3, 0, -3);
        }
        if(frame==1)
        {
            changepal(4);
        }
        if(frame==5)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==34)
        {
            velo001(3.5, NULL(), NULL());
        }
        if(frame==34)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==35)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==37)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==39)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==41)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==43)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==45)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==47)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==48)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==50)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==52)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==54)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==56)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==58)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==61)
        {
            velo001(1, 0, 3);
        }
        if(frame==62)
        {
            noplayerJoin(0);
        }
        if(frame==62)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2017)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {



	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	int P1 = getplayerproperty(0, "entity");

        int P2 = getplayerproperty(1, "entity");

  	int P1Name = getentityproperty(P1,"defaultmodel");

	int P2Name = getentityproperty(P2,"defaultmodel");

	changeentityproperty(self,"subject_to_obstacle",1);

	changeentityproperty(self,"subject_to_platform",1);

	changeentityproperty(self,"no_adjust_base",0);

	changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Hawkeye" || P2Name == "Hawkeye")

           {

           performattack(self, openborconstant("ANI_FREESPECIAL2"));

	   }

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(1.5, 0, -3);
        }
        if(frame==1)
        {
            changepal(5);
        }
        if(frame==5)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==8)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==11)
        {
            shooter("triarrow", 10, 42, -1, 8, 0, 0);
        }
        if(frame==14)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==14)
        {
            leaper(-3, 3.5, 0);
        }
        if(frame==29)
        {
            noplayerJoin(0);
        }
        if(frame==29)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2018)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	int P1 = getplayerproperty(0, "entity");

        int P2 = getplayerproperty(1, "entity");

  	int P1Name = getentityproperty(P1,"defaultmodel");

	int P2Name = getentityproperty(P2,"defaultmodel");





	if (P1Name == "Emma_Frost" || P2Name == "Emma_Frost")

           {

           performattack(self, openborconstant("ANI_FREESPECIAL2"));

	   }

        }

       	if (frame==1){

	changeentityproperty(self, "direction", 0);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos+500, Width+15, NULL());

       	//changeentityproperty(self,"subject_to_wall",1);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            move(-170, NULL(), 200);
        }
        if(frame==1)
        {
            velo001(3, 0, -3);
        }
        if(frame==1)
        {
            antiwall(20, 20, 80);
        }
        if(frame==1)
        {
            changepal(6);
        }
        if(frame==13)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==15)
        {
            flash_all_enemies("eaph", "hiteap.wav");
        }
        if(frame==19)
        {
            noplayerJoin(0);
        }
        if(frame==19)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2019)
    {


	void self = getlocalvar("self"); //Get calling entity.

	int Summon = getentityvar(self, 1);

	if (frame==0){

 	changeentityproperty(self,"subject_to_gravity",0);

	changeentityproperty(self,"subject_to_wall",0);

	changeentityproperty(self,"subject_to_obstacle",0);

	changeentityproperty(self,"subject_to_platform",0);

	changeentityproperty(self,"no_adjust_base",1);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==2)
        {
            velo001(4, NULL(), NULL());
        }
        if(frame==3)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2020)
    {


	void self = getlocalvar("self");

        void time = openborvariant("elapsed_time");

        void mTime = time - (openborvariant("elapsed_time")-100);

        float x,z;

        x = -sin(time/1.45)/2;

        z = -cos(time/1.45);

        changeentityproperty(self, "velocity", x, 0, z) ;



        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_gravity",0);

	int P1 = getplayerproperty(0, "entity");

        int P2 = getplayerproperty(1, "entity");

  	int P1Name = getentityproperty(P1,"defaultmodel");

	int P2Name = getentityproperty(P2,"defaultmodel");

	}

	if (frame==1){

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos+240, Width+1, 80);

        }

        	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

	        if(frame==1)
        {
            changepal(7);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==10)
        {
            spawn01("joh", 13, 23, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==12)
        {
            spawn01("joh", 10, 26, 0);
        }
        if(frame==21)
        {
            noplayerJoin(0);
        }
        if(frame==21)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2021)
    {


	void self = getlocalvar("self");

	if(frame==1)

	{

        setglobalvar("HelperControl", 0);

	}

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	int P1 = getplayerproperty(0, "entity");

        int P2 = getplayerproperty(1, "entity");

  	int P1Name = getentityproperty(P1,"defaultmodel");

	int P2Name = getentityproperty(P2,"defaultmodel");

	changeentityproperty(self,"subject_to_wall",1);



	if (P1Name == "Mighty_Thor" || P2Name == "Mighty_Thor")

           {

             performattack(self, openborconstant("ANI_FREESPECIAL2"));

	   }

	}

	if (frame==1){

	changeentityproperty(self, "direction", 1);

        int XPos = openborvariant("xpos"); // Get camera x position

        int Width = openborvariant("PLAYER_MIN_Z")+(openborvariant("PLAYER_MAX_Z") - openborvariant("PLAYER_MIN_Z"))/2; // Get playable area size center

        changeentityproperty(self, "position", XPos+240, Width+1, 120);

        }

	        if(frame==1)
        {
            velo001(NULL(), NULL(), -3);
        }
        if(frame==1)
        {
            changepal(8);
        }
        if(frame==2)
        {
            spawn01("stompfx", 0, 0, 0);
        }
        if(frame==3)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==22)
        {
            spawn01("stompfx", 0, 0, 2);
        }
        if(frame==22)
        {
            spawn01("crack", 0, 0, -1);
        }
        if(frame==22)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==22)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==23)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==23)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==23)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==24)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==24)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==25)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==25)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==25)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==26)
        {
            spawn01("gt", 0, 0, 0);
        }
        if(frame==31)
        {
            velo001(NULL(), NULL(), 7);
        }
        if(frame==32)
        {
            noplayerJoin(0);
        }
        if(frame==32)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2022)
    {


	void self = getlocalvar("self");

        if(frame ==0)

        {

	changeopenborvariant("nojoin", 1);

	changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

	changeentityproperty(self,"subject_to_wall",1);

	//changeentityproperty(self, "direction", 1);

        changeentityproperty(self, "position", NULL(),NULL(),0);

	}

	if (frame==1){

        setglobalvar("HelperControl", 0);

        }

	        if(frame==0)
        {
            changepal(12);
        }
        if(frame==8)
        {
            shooter("fireballp", 55, 42, 0, 3, 0, 0);
        }
        if(frame==16)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2023)
    {


        void vSelf = getlocalvar("self");

        int r = rand()%15;

	if (r <0)

	{

  	 r = r*-1;

	}

        if(frame==1){

        setglobalvar("HelperControl", r);

        //setglobalvar("ammoControl", r);



        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(r ==3){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW4"));

            }

        if(r ==4){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW12"));

            }

        if(r ==5){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW11"));

            }

        if(r ==6){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW7"));

            }

        if(r ==7){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW8"));

            }

        if(r ==8){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW9"));

            }

        if(r ==9){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW10"));

            }

        if(r ==10){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW6"));

            }

        if(r ==11){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW5"));

            }

        if(r ==12){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW13"));

            }

        if(r ==13){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW14"));

            }

        if(r ==14){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW15"));

            }

        }

	        return;
    }
    if(animhandle==2024)
    {


        void vSelf = getlocalvar("self");

        int r = rand()%15;

	if (r <0)

	{

  	 r = r*-1;

	}

        if(frame==1){

        setglobalvar("HelperControl", r);

        setglobalvar("ammoControl", r);



        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(r ==3){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW4"));

            }

        if(r ==4){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW12"));

            }

        if(r ==5){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW11"));

            }

        if(r ==6){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW7"));

            }

        if(r ==7){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW8"));

            }

        if(r ==8){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW9"));

            }

        if(r ==9){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW10"));

            }

        if(r ==10){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW6"));

            }

        if(r ==11){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW5"));

            }

        if(r ==12){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW13"));

            }

        if(r ==13){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW14"));

            }

        if(r ==14){

        changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW15"));

            }

        }

	        return;
    }
    if(animhandle==2025)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/thor/thunder/tthunder.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2026)
    {
        if(frame==0)
        {
            velo001(3, 0, 0);
        }
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==0)
        {
            spawn01("po", 0, 0, 1);
        }
        if(frame==2)
        {
            spawn01("fxspark", 0, 40, 1);
        }
        if(frame==2)
        {
            spawn01("po", 0, 0, 1);
        }
        return;
    }
    if(animhandle==2027)
    {
        if(frame==1)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==5)
        {
            spawn01("fxspark", 0, 40, 1);
        }
        if(frame==8)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2028)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);

if(frame==0){

	setentityvar(self, 1, openborvariant("elapsed_time"));

	}

	if(Summon <= openborvariant("elapsed_time") - 240){

	setentityvar(self, 1, NULL());

	performattack(self,openborconstant("ANI_FOLLOW1"));

	}

	        if(frame==1)
        {
            spawnAni("gshock2", 0, 0, 2, "ANI_FOLLOW3", 0, 0, 0);
        }
        if(frame==2)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        if(frame==4)
        {
            spawn01("fxspark", 0, 60, 1);
        }
        return;
    }
    if(animhandle==2029)
    {
        if(frame==0)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bubbles/bubbles.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2030)
    {


	if(frame==0){

	void vSelf = getlocalvar("self");

	int r = rand()%30;

	if(r > 0){

	velo001(0.55,-0.25,0);

	} else {

	velo001(0.35,-0.1,0);

	}

	}

	        return;
    }
    if(animhandle==2031)
    {


	if(frame==0){

	void vSelf = getlocalvar("self");

	int r = rand()%30;

	if(r > 0){

	velo001(0.55,-0.25,0);

	 changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW1"));

	} else {

	velo001(0.35,-0.1,0);

	}

	}

	        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fx/fx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2032)
    {
        if(frame==0)
        {
            randomJump(3, 4);
        }
        if(frame==6)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2033)
    {
        if(frame==16)
        {
            velo001(2, 0, 0);
        }
        if(frame==27)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2034)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

if(z >= 200){

shooter2 ("splash",20,0,5,-6,0,0);

killentity(self);

}

	        if(frame==0)
        {
            minZ(0);
        }
        if(frame==0)
        {
            maxZ(0);
        }
        if(frame==0)
        {
            velo001(2, 4, 4);
        }
        return;
    }
    if(animhandle==2035)
    {
        if(frame==0)
        {
            layer(900);
        }
        if(frame==1)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2036)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==21)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2037)
    {
        if(frame==0)
        {
            layer(900);
        }
        if(frame==1)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2038)
    {
        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==2039)
    {
        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==2040)
    {
        if(frame==0)
        {
            randomJump(2, 4);
        }
        if(frame==6)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2041)
    {


	void self = getlocalvar("self");

 	changeentityproperty(self, "position", 460,189,80);

	changeentityproperty(self, "direction", 0); //Face right

	        if(frame==0)
        {
            gravity(0);
        }
        if(frame==2)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", -6, 0, 0);
        }
        if(frame==3)
        {
            spawnAni("Sky_Ranger", 0, 50, 1, "ANI_FOLLOW3", -9, 0, 0);
        }
        if(frame==4)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", -8.5, 0, 0);
        }
        if(frame==5)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", -6, 0, 0);
        }
        if(frame==6)
        {
            spawnAni("Sky_Ranger", 0, 150, 1, "ANI_FOLLOW3", -7, 0, 0);
        }
        if(frame==7)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", -9, 0, 0);
        }
        if(frame==8)
        {
            spawnAni("Sky_Ranger", 0, 0, 1, "ANI_FOLLOW3", -8.5, 0, 0);
        }
        if(frame==9)
        {
            spawnAni("Sky_Ranger", 0, 200, 1, "ANI_FOLLOW3", -7.5, 0, 0);
        }
        if(frame==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2042)
    {
        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==2043)
    {
        if(frame==0)
        {
            randomJump(4, 4);
        }
        if(frame==6)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2044)
    {
        if(frame==7)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==7)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2045)
    {
        if(frame==28)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2046)
    {
        if(frame==1)
        {
            spawn01("crackG", 0, 0, -1);
        }
        if(frame==12)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2047)
    {


	void self = getlocalvar("self");

	int Summon = getentityvar(self, 1);



	if(frame==0){

	setentityvar(self, 1, openborvariant("elapsed_time"));

	}

	if(Summon <= openborvariant("elapsed_time") - 360){

	setentityvar(self, 1, NULL());

 	suicide();

	}

	        if(frame==0)
        {
            subjectWall(0);
        }
        if(frame==0)
        {
            minZ(0);
        }
        if(frame==0)
        {
            randSound("chars/bosses/tigershark/voices/GU-haha.wav", "chars/bosses/tigershark/voices/GU-haha2.wav", "chars/bosses/tigershark/voices/GU-hoho.wav");
        }
        if(frame==0)
        {
            velo001(2, NULL(), NULL());
        }
        if(frame==2)
        {
            spawn01("waterfx", 10, 0, 3);
        }
        return;
    }
    if(animhandle==2048)
    {
        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==2049)
    {
        if(frame==16)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/enemies/soldier/soldier.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2054)
    {
        if(frame==0)
        {
            checkPal("ANI_ATTACK3", 1);
        }
        return;
    }
    if(animhandle==2055)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        return;
    }
    if(animhandle==2056)
    {
        if(frame==4)
        {
            spawn000("sboom", 0, 20, 0);
        }
        return;
    }
    if(animhandle==2057)
    {
        if(frame==4)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==2058)
    {
        if(frame==9)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==11)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==2059)
    {
        if(frame==0)
        {
            spawn01("drum", 0, 20, 0);
        }
        if(frame==0)
        {
            spawn01("swfx", 0, 20, 3);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2060)
    {


	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==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2061)
    {


       void self = getlocalvar("self");

       changeentityproperty(self, "velocity", 0, 0, 0);

	        if(frame==1)
        {
            degravity(0);
        }
        return;
    }
    if(animhandle==2062)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        return;
    }
    if(animhandle==2063)
    {
        if(frame==0)
        {
            subjectWall(0);
        }
        return;
    }
    if(animhandle==2064)
    {
        if(frame==0)
        {
            subjectWall(1);
        }
        if(frame==4)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==2066)
    {


    if(frame==1){

      void self = getlocalvar("self");

      changeentityproperty(self, "hostile", "TYPE_PLAYER");

      changeentityproperty(self, "type", openborconstant("TYPE_ENEMY"));

      changeentityproperty(self, "candamage", "TYPE_PLAYER");

      setglobalvar("MindControl2", NULL());

       changeentityproperty(self,"subject_to_screen",0);

}

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==1)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==2067)
    {
        if(frame==0)
        {
            velo001(4, 0, 4);
        }
        if(frame==5)
        {
            velo001(2, 0, -2);
        }
        if(frame==6)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==2070)
    {


	void self = getlocalvar("self");

	int z = getentityproperty(self,"z"); //Get character's z coordinate

        int a = getentityproperty(self,"a"); //Get character's a coordinate

        changeentityproperty(self, "subject_to_maxz", 0);

        //changeentityproperty(self, "position", NULL(), 180, 0);

        int MaxZ = openborvariant("PLAYER_MAX_Z");

         if (z<160)

        {

        changeentityproperty(self, "subject_to_maxz", 1);

        }

	        if(frame==0)
        {
            randomX();
        }
        if(frame==1)
        {
            spawn01("splash", 0, 0, 40);
        }
        if(frame==1)
        {
            velo001(0, -1.5, 3.5);
        }
        if(frame==3)
        {
            anichange("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==2071)
    {
        if(frame==0)
        {
            minZ(0);
        }
        if(frame==0)
        {
            layer(-1);
        }
        if(frame==1)
        {
            velo001(0, 1, 4);
        }
        if(frame==11)
        {
            minZ(1);
        }
        if(frame==11)
        {
            layer(0);
        }
        if(frame==11)
        {
            anichangeattack("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==2072)
    {
        if(frame==3)
        {
            setglobalvar("MindControl2", NULL());
        }
        if(frame==3)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2073)
    {
        if(frame==0)
        {
            minZ(0);
        }
        if(frame==22)
        {
            anichangeattack("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==2074)
    {
        if(frame==0)
        {
            maxZ(1);
        }
        if(frame==2)
        {
            spawn01("splash2", 0, 0, 0);
        }
        return;
    }
    if(animhandle==2075)
    {
        if(frame==0)
        {
            maxZ(1);
        }
        if(frame==0)
        {
            minZ(1);
        }
        return;
    }
    if(animhandle==2076)
    {


	void self = getlocalvar("self");

	int z = getentityproperty(self,"z"); //Get character's z coordinate

        int a = getentityproperty(self,"a"); //Get character's a coordinate

        changeentityproperty(self, "subject_to_maxz", 0);

        int MaxZ = openborvariant("PLAYER_MAX_Z");

        int ypos = openborvariant("ypos");

        int zoom = 256 + (z - 160 - ypos-30) * 2;

        if(zoom < 0) {zoom = 0;}

        if(zoom > 256) {

        setdrawmethod(self, 1, zoom, zoom, 0, 0, 0, -1);

        }

        if(zoom == 256 || frame == 15) {

        setdrawmethod(self, 1, 256, 256, 0, 0, 0, -1);

        }

        if (z<160)

        {

        changeentityproperty(self, "subject_to_maxz", 1);

        setdrawmethod(self, 1, 256, 256, 0, 0, 0, -1);

        }

	        return;
    }
    if(animhandle==2077)
    {


void self = getlocalvar("self");

int z = getentityproperty(self,"z");

        int dir = getentityproperty(self, "direction");

        if(dir==1){ // Facing right?

        changeentityproperty(self, "direction", 0); // Face left

         }





if(z >= 200){

shooter2 ("splash",20,0,5,3,0,0);

killentity(self);

}

	        if(frame==0)
        {
            minZ(0);
        }
        if(frame==0)
        {
            maxZ(0);
        }
        return;
    }
    if(animhandle==2078)
    {
        if(frame==0)
        {
            antiwallanim(20, 0, 0, "ANI_FOLLOW11");
        }
        if(frame==0)
        {
            dasher(2, 0, 0);
        }
        return;
    }
    if(animhandle==2081)
    {
        if(frame==0)
        {
            spawn01("flash4", 0, 0, 1);
        }
        if(frame==9)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==11)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==2082)
    {


	void self = getlocalvar("self");

	int MindControl = getglobalvar("MindControl2");

	int BossKill = getglobalvar("BossKill");

	int Type = getentityproperty(self, "type");



	if(BossKill==2){

	performattack(self,openborconstant("ANI_FOLLOW30"));

	}

    if( MindControl==NULL() && Type==openborconstant("TYPE_NPC")){

      performattack(self,openborconstant("ANI_FOLLOW10"));

    }

    //int  pos  = openborvariant("xpos");

   //             int  selfx     = getentityproperty(self, "x");

     //           if ((selfx > pos + 480 )&&(frame == 0)){

       //         changeentityproperty(self, "direction", 0);

         //       performattack(self, openborconstant("ANI_FOLLOW9"));

  //    }

  //    if ((selfx < pos + 1 )&&(frame == 0)){

   //             changeentityproperty(self, "direction", 1);

   //             performattack(self, openborconstant("ANI_FOLLOW9"));

   //   }

	        return;
    }
    if(animhandle==2083)
    {


	void self = getlocalvar("self");

        changeentityproperty(self, "subject_to_maxz", 1);

	        return;
    }
    if(animhandle==2085)
    {


	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==2087)
    {


    if(frame==1){

      void self = getlocalvar("self");

      int MindControl = getglobalvar("MindControl2");

      if (MindControl==NULL()) {

      changeentityproperty(self, "hostile", "TYPE_ENEMY");

      changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

      changeentityproperty(self, "candamage", "TYPE_ENEMY");

      setglobalvar("MindControl2", 1);

      spawner("dizzyfx", 0, 55, 1);

       }

       changeentityproperty(self,"subject_to_screen",1);

}

	        return;
    }
    if(animhandle==2088)
    {
        if(frame==0)
        {
            rrise()();
        }
        return;
    }
    if(animhandle==2089)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==2090)
    {


	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;
    }
    if(animhandle==2091)
    {
        if(frame==0)
        {
            rspeed();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/BalaE.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2094)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==4)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2095)
    {
        if(frame==0)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==1)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==2)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        if(frame==3)
        {
            antiwallCollide(10, "ANI_FOLLOW1");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/enemies/gunner/gunner.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2096)
    {


    if(frame==0){

      void self = getlocalvar("self");

      int Atirar = getlocalvar("Atirar");

      if (getlocalvar("Atirar")==1) {

      performattack(self, openborconstant("ANI_FOLLOW20"));

       }

    }

	        if(frame==3)
        {
            shooter("bala", 23, 33, 0, 2, 0, 0);
        }
        return;
    }
    if(animhandle==2097)
    {


    if(frame==0){

      void self = getlocalvar("self");

      int Atirar = getlocalvar("Atirar");

      if (getlocalvar("Atirar")==1) {

      performattack(self, openborconstant("ANI_ATTACK4"));

       }

    }

	        if(frame==0)
        {
            checkPal("ANI_ATTACK1", 1);
        }
        if(frame==3)
        {
            shooter("bala", 23, 33, 0, 2, 0, 0);
        }
        if(frame==5)
        {
            shooter("bala", 23, 33, 0, 2, 0, 0);
        }
        return;
    }
    if(animhandle==2098)
    {


    if(frame==0){

      void self = getlocalvar("self");

      int Atirar = getlocalvar("Atirar");

      if (getlocalvar("Atirar")==NULL()) {

      performattack(self, openborconstant("ANI_ATTACK1"));

       }

    }

	        if(frame==0)
        {
            checkPal("ANI_ATTACK1", 1);
        }
        if(frame==3)
        {
            shooterCD("bala", "TYPE_ENEMY", 23, 33, 0, 8, 0, 0);
        }
        if(frame==5)
        {
            shooterCD("bala", "TYPE_ENEMY", 23, 33, 0, 8, 0, 0);
        }
        return;
    }
    if(animhandle==2099)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        return;
    }
    if(animhandle==2100)
    {
        if(frame==4)
        {
            spawn000("sboom", 0, 20, 0);
        }
        return;
    }
    if(animhandle==2101)
    {
        if(frame==4)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==2102)
    {
        if(frame==9)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==11)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==2103)
    {
        if(frame==0)
        {
            spawn01("cola", 0, 20, 0);
        }
        if(frame==0)
        {
            spawn01("swfx", 0, 20, 3);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2104)
    {


	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==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2105)
    {


       void self = getlocalvar("self");

       changeentityproperty(self, "velocity", 0, 0, 0);

	        if(frame==1)
        {
            degravity(0);
        }
        return;
    }
    if(animhandle==2106)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        return;
    }
    if(animhandle==2108)
    {
        if(frame==4)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==2110)
    {


    if(frame==1){

      void self = getlocalvar("self");

      changeentityproperty(self, "hostile", "TYPE_PLAYER");

      changeentityproperty(self, "type", openborconstant("TYPE_ENEMY"));

      changeentityproperty(self, "candamage", "TYPE_PLAYER");

      setglobalvar("MindControl2", NULL());

	  setlocalvar("Atirar",NULL());

      void vSpawn;

      vSpawn = spawn01("eaph", 0, 55, 1);

        changeentityproperty(self,"subject_to_screen",0);

 }

	        if(frame==2)
        {
            subjectScreen(0);
        }
        return;
    }
    if(animhandle==2112)
    {


	void self = getlocalvar("self");

	int z = getentityproperty(self,"z"); //Get character's z coordinate

        int a = getentityproperty(self,"a"); //Get character's a coordinate

        changeentityproperty(self, "subject_to_maxz", 0);

        //changeentityproperty(self, "position", NULL(), 180, 0);

        int MaxZ = openborvariant("PLAYER_MAX_Z");

         if (z<160)

        {

        changeentityproperty(self, "subject_to_maxz", 1);

        }

	        if(frame==0)
        {
            randomX();
        }
        if(frame==1)
        {
            spawn01("splash", 0, 0, 40);
        }
        if(frame==1)
        {
            velo001(0, -1.5, 3.5);
        }
        if(frame==3)
        {
            anichange("ANI_JUMP");
        }
        return;
    }
    if(animhandle==2113)
    {


    if(frame==0){

      void self = getlocalvar("self");

      int Atirar = getlocalvar("Atirar");

      if (getlocalvar("Atirar")==NULL()) {

      performattack(self, openborconstant("ANI_ATTACK1"));

       }

    }

	        if(frame==3)
        {
            shooterCD("bala", "TYPE_ENEMY", 23, 33, 0, 8, 0, 0);
        }
        return;
    }
    if(animhandle==2114)
    {


	void self = getlocalvar("self");

	if (frame==0)

	{

        changeentityproperty(self, "position", 150, 189, 0);

        }

	        if(frame==11)
        {
            shooter("bala", 23, 33, 0, 2, 0, 0);
        }
        return;
    }
    if(animhandle==2115)
    {
        if(frame==3)
        {
            setglobalvar("MindControl2", NULL());
        }
        if(frame==3)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2118)
    {
        if(frame==0)
        {
            dasher(2, 0, 0);
        }
        return;
    }
    if(animhandle==2121)
    {
        if(frame==0)
        {
            spawn01("flash4", 0, 0, 1);
        }
        if(frame==9)
        {
            spawn01("pom", 0, 0, 1);
        }
        if(frame==11)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==2122)
    {


	void self = getlocalvar("self");

	int MindControl = getglobalvar("MindControl2");

	int BossKill = getglobalvar("BossKill");

	int Type = getentityproperty(self, "type");



	if(BossKill==2){

	performattack(self,openborconstant("ANI_FOLLOW30"));

	}



    if(MindControl==NULL() && Type==openborconstant("TYPE_NPC")){

      performattack(self,openborconstant("ANI_FOLLOW10"));

    }

    //                int  pos  = openborvariant("xpos");

  //              int  selfx     = getentityproperty(self, "x");

    //            if ((selfx > pos + 480 )&&(frame == 0)){

      //         changeentityproperty(self, "direction", 0);

        //        performattack(self, openborconstant("ANI_FOLLOW9"));

      //}

 //     if ((selfx < pos + 1 )&&(frame == 0)){

 //               changeentityproperty(self, "direction", 1);

  //              performattack(self, openborconstant("ANI_FOLLOW9"));

  //    }

	        return;
    }
    if(animhandle==2123)
    {


	void self = getlocalvar("self");

        changeentityproperty(self, "subject_to_maxz", 1);

	        return;
    }
    if(animhandle==2125)
    {


	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==2127)
    {


    if(frame==1){

      void self = getlocalvar("self");

      int MindControl = getglobalvar("MindControl2");

      int Atirar = getlocalvar("Atirar");

      if (getglobalvar("MindControl2")==NULL()) {

      changeentityproperty(self, "hostile", "TYPE_ENEMY");

      changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

      changeentityproperty(self, "candamage", "TYPE_ENEMY");

      setglobalvar("MindControl2", 1);

      spawner("dizzyfx", 0, 55, 1);

       setlocalvar("Atirar", 1);

       }

       changeentityproperty(self,"subject_to_screen",1);

    }

	        return;
    }
    if(animhandle==2128)
    {


    if(frame==99){

      void self = getlocalvar("self");

      changeentityproperty(self, "hostile", "TYPE_PLAYER");

      changeentityproperty(self, "type", openborconstant("TYPE_ENEMY"));

      changeentityproperty(self, "candamage", "TYPE_PLAYER");

      setglobalvar("MindControl2", NULL());

      setlocalvar("Atirar", NULL());

    }

	        if(frame==0)
        {
            rrise()();
        }
        return;
    }
    if(animhandle==2129)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==2130)
    {


	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/enemies/flame/flame.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2133)
    {
        if(frame==2)
        {
            spawn01("faisca", 35, 20, 0);
        }
        if(frame==4)
        {
            spawn01("faisca", 45, 20, 0);
        }
        if(frame==6)
        {
            spawn01("faisca", 65, 20, 0);
        }
        if(frame==8)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==10)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==12)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==14)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==16)
        {
            spawn01("faisca", 75, 20, 0);
        }
        return;
    }
    if(animhandle==2134)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        return;
    }
    if(animhandle==2135)
    {
        if(frame==4)
        {
            spawn000("sboom", 0, 20, 0);
        }
        return;
    }
    if(animhandle==2136)
    {
        if(frame==3)
        {
            anichange("ANI_FOLLOW15", 0);
        }
        return;
    }
    if(animhandle==2137)
    {
        if(frame==9)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==2138)
    {
        if(frame==0)
        {
            spawn01("crate-fall", 0, 20, 0);
        }
        if(frame==0)
        {
            spawn01("swfx", 0, 20, 3);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2139)
    {


	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==10)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2140)
    {


       void self = getlocalvar("self");

       changeentityproperty(self, "velocity", 0, 0, 0);

	        if(frame==1)
        {
            degravity(0);
        }
        return;
    }
    if(animhandle==2141)
    {


		if(frame==0)

		{

    void self = getlocalvar("self");

    void e;

    clearspawnentry();

    setspawnentry("name", "burnP");

    e = spawn();

    bindentity(e, self,0,1,0,1,1);

		}

	        return;
    }
    if(animhandle==2143)
    {
        if(frame==3)
        {
            spawn01("pom", 0, 0, 1);
        }
        return;
    }
    if(animhandle==2145)
    {


    if(frame==1){

      void self = getlocalvar("self");

      changeentityproperty(self, "hostile", "TYPE_PLAYER");

      changeentityproperty(self, "type", openborconstant("TYPE_ENEMY"));

      changeentityproperty(self, "candamage", "TYPE_PLAYER");

      setglobalvar("MindControl2", NULL());

      void vSpawn;

      vSpawn = spawn01("eaph", 0, 55, 1);

            changeentityproperty(self,"subject_to_screen",0);

    }

	        return;
    }
    if(animhandle==2146)
    {
        if(frame==0)
        {
            velo001(4, 0, 4);
        }
        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        return;
    }
    if(animhandle==2149)
    {
        if(frame==0)
        {
            velo001(1, 0, 0);
        }
        return;
    }
    if(animhandle==2150)
    {


	void self = getlocalvar("self");

	int z = getentityproperty(self,"z"); //Get character's z coordinate

        int a = getentityproperty(self,"a"); //Get character's a coordinate

        changeentityproperty(self, "subject_to_maxz", 0);

        //changeentityproperty(self, "position", NULL(), 180, 0);

        int MaxZ = openborvariant("PLAYER_MAX_Z");

         if (z<160)

        {

        changeentityproperty(self, "subject_to_maxz", 1);

        }

	        if(frame==0)
        {
            randomX();
        }
        if(frame==1)
        {
            spawn01("splash", 0, 0, 40);
        }
        if(frame==1)
        {
            velo001(0, -1.5, 3.5);
        }
        if(frame==3)
        {
            anichange("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==2151)
    {
        if(frame==0)
        {
            minZ(0);
        }
        if(frame==1)
        {
            velo001(0, 1, 4);
        }
        if(frame==11)
        {
            minZ(1);
        }
        if(frame==11)
        {
            anichangeattack("ANI_FOLLOW5");
        }
        return;
    }
    if(animhandle==2152)
    {
        if(frame==3)
        {
            setglobalvar("MindControl2", NULL());
        }
        if(frame==3)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2153)
    {
        if(frame==0)
        {
            minZ(0);
        }
        if(frame==22)
        {
            anichangeattack("ANI_FOLLOW6");
        }
        return;
    }
    if(animhandle==2154)
    {
        if(frame==0)
        {
            maxZ(1);
        }
        return;
    }
    if(animhandle==2155)
    {


	void self = getlocalvar("self");

	int  pos  = openborvariant("xpos");

	int  selfx = getentityproperty(self, "x");

    if(frame==0){

	changeentityproperty(self, "direction", 1);

	changeentityproperty(self, "position", pos-100, NULL(), NULL()); //Set spawn location.

	changeentityproperty(self, "map", 1); //Set map.

	}

	        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("faisca", 35, 20, 0);
        }
        if(frame==9)
        {
            spawn01("faisca", 45, 20, 0);
        }
        if(frame==11)
        {
            spawn01("faisca", 65, 20, 0);
        }
        if(frame==13)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==15)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==17)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==19)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==21)
        {
            spawn01("faisca", 75, 20, 0);
        }
        return;
    }
    if(animhandle==2157)
    {


	void self = getlocalvar("self");

	int  pos  = openborvariant("xpos");

	int  selfx = getentityproperty(self, "x");

    if(frame==0){

	changeentityproperty(self, "direction", 0);

	changeentityproperty(self, "position", pos+580, NULL(), NULL()); //Set spawn location.

	}

	        if(frame==4)
        {
            spawn01("po", 0, 0, 0);
        }
        if(frame==7)
        {
            spawn01("faisca", 35, 20, 0);
        }
        if(frame==9)
        {
            spawn01("faisca", 45, 20, 0);
        }
        if(frame==11)
        {
            spawn01("faisca", 65, 20, 0);
        }
        if(frame==13)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==15)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==17)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==19)
        {
            spawn01("faisca", 75, 20, 0);
        }
        if(frame==21)
        {
            spawn01("faisca", 75, 20, 0);
        }
        return;
    }
    if(animhandle==2160)
    {


	void self = getlocalvar("self");

	int MindControl = getglobalvar("MindControl2");

	int BossKill = getglobalvar("BossKill");

	int Type = getentityproperty(self, "type");



	if(BossKill==2){

	performattack(self,openborconstant("ANI_FOLLOW30"));

	}



	if(MindControl==NULL() && Type==openborconstant("TYPE_NPC")){

      performattack(self,openborconstant("ANI_FOLLOW10"));

    }

	        return;
    }
    if(animhandle==2161)
    {


	void self = getlocalvar("self");

        changeentityproperty(self, "subject_to_maxz", 1);

	        return;
    }
    if(animhandle==2163)
    {


	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==2165)
    {


    if(frame==1){

      void self = getlocalvar("self");





      int MindControl = getglobalvar("MindControl2");

      if (getglobalvar("MindControl2")==NULL()) {

      changeentityproperty(self, "hostile", "TYPE_ENEMY");

      changeentityproperty(self, "type", openborconstant("TYPE_NPC"));

      changeentityproperty(self, "candamage", "TYPE_ENEMY");

      setglobalvar("MindControl2", 1);

      spawner("dizzyfx", 0, 55, 1);

      changeentityproperty(self,"subject_to_screen",1);

       }

    }

	        return;
    }
    if(animhandle==2166)
    {
        if(frame==0)
        {
            rrise()();
        }
        return;
    }
    if(animhandle==2167)
    {
        if(frame==0)
        {
            spawn01("fxspark", 0, 20, 1);
        }
        return;
    }
    if(animhandle==2168)
    {


	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;
    }
    if(animhandle==2169)
    {
        if(frame==0)
        {
            rspeed();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fx/fx2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2172)
    {


    if(frame==1){

      void self = getlocalvar("self");

      changeentityproperty(self, "candamage", "TYPE_NPC");

    }

	        if(frame==16)
        {
            velo001(2, 0, 0);
        }
        if(frame==27)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2173)
    {


	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==2174)
    {
        if(frame==0)
        {
            velo001(1, 0, 0);
        }
        return;
    }
    if(animhandle==2175)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==1)
        {
            randomJump(3, 3);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2176)
    {
        if(frame==1)
        {
            layer(1001001000);
        }
        if(frame==2)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2177)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==1)
        {
            randomJump(3, 3);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2178)
    {
        if(frame==0)
        {
            randomJump(3, 3);
        }
        if(frame==1)
        {
            randomJump(3, 3);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2179)
    {
        if(frame==2)
        {
            dasher(8, 0, 0);
        }
        if(frame==3)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2180)
    {


	if (frame==23)

	{

	playmusic("data/music/chase.ogg",1);

	}        if(frame==1)
        {
            layer(1001001000);
        }
        if(frame==28)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2181)
    {


	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==2182)
    {


	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==2183)
    {


	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==2187)
    {


    void self = getlocalvar("self");

    int x = getentityproperty(self, "x");

    if(x>=80)

    {

      performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW4"));

    }

	        if(frame==0)
        {
            subjectScreen(0);
        }
        if(frame==0)
        {
            velo001(2, 0, 0);
        }
        return;
    }
    if(animhandle==2188)
    {
        if(frame==0)
        {
            velo001(5, 0, 0);
        }
        if(frame==0)
        {
            spawn01("sdust", 0, 0, 0);
        }
        if(frame==10)
        {
            noplayerJoin(0);
        }
        if(frame==10)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2189)
    {
        if(frame==1)
        {
            spawnPosAni("textControl", 240, 0, 50, "ANI_FOLLOW14", 1);
        }
        if(frame==2)
        {
            playmusic("data/music/virtual.ogg", 1);
        }
        if(frame==6)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/gflash.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2193)
    {
        if(frame==3)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/bosses/trapster/glue/glueprojb.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2194)
    {
        if(frame==23)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2195)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==3)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2196)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==3)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2197)
    {
        if(frame==0)
        {
            stop();
        }
        if(frame==0)
        {
            dasher(0, 8, 0);
        }
        if(frame==7)
        {
            randomteleonscreen();
        }
        if(frame==7)
        {
            antiwallRandom(1);
        }
        if(frame==8)
        {
            dasher(0, -10, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/ashoutbox/ashoutbox.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2198)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==22)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2199)
    {
        if(frame==1)
        {
            gravity(0);
        }
        if(frame==22)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2200)
    {
        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==2201)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2202)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2203)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2204)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2205)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2206)
    {
        if(frame==0)
        {
            randSound("sounds/announcer/dp-1.wav", "sounds/announcer/dp-2.wav", "sounds/announcer/dp-3.wav");
        }
        if(frame==6)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2207)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2208)
    {
        if(frame==0)
        {
            dasher(0, 2, 0);
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2209)
    {
        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==2210)
    {
        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==2211)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==9)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2212)
    {
        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==2213)
    {


	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==2216)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2217)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/HitBack/hitback.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2219)
    {
        if(frame==1)
        {
            moveBack(1);
        }
        if(frame==2)
        {
            moveBack(0.4);
        }
        if(frame==3)
        {
            moveBack(0);
        }
        if(frame==4)
        {
            suicide();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/focus/focus.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2220)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2221)
    {
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2222)
    {


	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==2223)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2224)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2225)
    {
        if(frame==29)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2226)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2227)
    {
        if(frame==1)
        {
            playmusic("data/music/stage_clear.ogg", 0);
        }
        if(frame==15)
        {
            finishlevel();
        }
        if(frame==15)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2228)
    {
        if(frame==25)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2229)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2230)
    {
        if(frame==31)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2231)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2232)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2233)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2234)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2235)
    {
        if(frame==30)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2236)
    {
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/branch/branchArrow.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2239)
    {


    void self = getlocalvar("self");

    char Name = getentityproperty(self,"name");

    if(frame == 1){

      jumptobranch(Name, 1);

    }

	        return;
    }
    if(animhandle==2243)
    {
        if(frame==0)
        {
            layer(0);
        }
        return;
    }
    if(animhandle==2244)
    {
        if(frame==0)
        {
            layer(0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/enemies/bug/bug.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2247)
    {
        if(frame==0)
        {
            targetL(3, 0, 0);
        }
        if(frame==2)
        {
            leap(4.5);
        }
        return;
    }
    if(animhandle==2248)
    {
        if(frame==0)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==0)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2249)
    {
        if(frame==0)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==0)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2250)
    {
        if(frame==0)
        {
            targetL(3, 0, 0);
        }
        if(frame==1)
        {
            leap(1.5);
        }
        return;
    }
    if(animhandle==2251)
    {
        if(frame==1)
        {
            anichangeattack("ANI_FOLLOW1");
        }
        return;
    }
    if(animhandle==2254)
    {
        if(frame==0)
        {
            spawn000("sboom", 0, 20, 0);
        }
        if(frame==0)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2255)
    {


	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==2256)
    {
        if(frame==1)
        {
            anichangeattack("ANI_FOLLOW1");
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/fxpanel/fxpanel2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2258)
    {
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2259)
    {
        if(frame==0)
        {
            gravity(0);
        }
        return;
    }
    if(animhandle==2260)
    {
        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==2261)
    {
        if(frame==0)
        {
            spawnAni("sam", 0, 50, 1, "ANI_FOLLOW2", 0, 0, 0);
        }
        if(frame==1)
        {
            spawn01("afxpanel", 0, 50, 1);
        }
        return;
    }
    if(animhandle==2262)
    {


    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==2263)
    {
        if(frame==5)
        {
            suicide();
        }
        return;
    }
    if(animhandle==2264)
    {
        if(frame==0)
        {
            gravity(0);
        }
        return;
    }
    if(animhandle==2265)
    {
        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==2266)
    {
        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==2267)
    {
        if(frame==0)
        {
            layer(1000);
        }
        if(frame==1)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }
    if(animhandle==2268)
    {


    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/traps/traps.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2269)
    {
        if(frame==0)
        {
            clearL();
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bgfx/cover.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2270)
    {
        if(frame==0)
        {
            changeentityproperty(getlocalvar("self"), "direction", 1);
        }
        if(frame==7)
        {
            changeentityproperty(getlocalvar("self"), "velocity", 0, -2, 0);
        }
        return;
    }

}

#### animationscript function main #####
# data/chars/misc/bgfx/bgfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2271)
    {
        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==2272)
    {
        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==2273)
    {
        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==2274)
    {
        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/zoomblast.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==2275)
    {
        if(frame==0)
        {
            setglobalvar("zoomentity", getlocalvar("self"));
        }
        if(frame==0)
        {
            setglobalvar("zoomx", 0);
        }
        if(frame==0)
        {
            setglobalvar("zoomy", -80);
        }
        if(frame==0)
        {
            setglobalvar("zoomvalue", 250);
        }
        if(frame==1)
        {
            setglobalvar("zoomvalue", 240);
        }
        if(frame==2)
        {
            setglobalvar("zoomvalue", 250);
        }
        if(frame==3)
        {
            setglobalvar("zoomvalue", 260);
        }
        if(frame==4)
        {
            setglobalvar("zoomentity", NULL());
        }
        if(frame==5)
        {
            killentity(getlocalvar("self"));
        }
        return;
    }

}
