Frame 1
var wait = 75;
Frame 2
perc = int(this.getBytesLoaded()) / (this.getBytesTotal() / 100);
bar.ene._width = perc * 2;
if (perc >= 99.99) {
gotoAndPlay ("pepworks");
}
Frame 3
gotoAndPlay ("stream");
Frame 4
wait--;
if (wait <= 0) {
gotoAndStop ("start");
}
Frame 5
gotoAndPlay ("pepworks");
Frame 6
var count = 0;
if (!locked) {
var locked = new Array();
var locked = [0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
var tipblink = 1;
}
var xoff = 0;
var yoff = 0;
var pepx = 0;
var pepy = 0;
var pushx = 0;
var pushy = 0;
var ishit = 0;
var invul = 0;
var firsttime = 0;
var gargoy = 0;
var isground = 0;
var flamelen = 1;
var magicice = 0;
var drawloaded = 0;
var selectweapon = 0;
var mouse = 0;
var longfire = 0;
var isfalling = 0;
var high = 0;
var ghost = 0;
var fireballing = 0;
var fireballs = 0;
var rainbowing = 0;
var rainbows = 0;
var isground = 0;
var guardian = 0;
var ghostframe = 1;
var levels = 0;
var selectlev = 1;
main._x = 240;
main._y = 160;
black.gotoAndPlay("maskout");
_quality = "medium";
music.gotoAndStop(1);
stop();
Frame 9
thegame._xscale = 100;
thegame._yscale = 100;
stop();
Instance of Symbol 1592 MovieClip in Frame 9
onClipEvent (mouseDown) {
_root.mouse = 1;
}
onClipEvent (mouseUp) {
_root.mouse = 0;
}
Frame 13
music.gotoAndStop(5);
black.gotoAndPlay("maskout");
Frame 17
black.gotoAndPlay("maskout");
music.gotoAndStop(1);
stop();
Symbol 4 MovieClip Frame 10
stop();
Symbol 12 MovieClip Frame 20
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 15
stop();
Symbol 170 MovieClip Frame 1
stop();
Symbol 173 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("mask");
camx = 0;
camy = 400;
fade = 10;
selectmode = 1;
}
Symbol 175 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 2
gotoAndStop (1);
Symbol 177 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 2
gotoAndStop (1);
Symbol 178 Button
on (release) {
bback.nextFrame();
_parent.black.gotoAndPlay("mask");
camx = 0;
camy = 0;
fade = 10;
}
Symbol 179 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = 0;
camy = -400;
fade = 10;
}
Symbol 180 Button
on (release) {
bback.nextFrame();
_parent.black.gotoAndPlay("mask");
camx = 0;
camy = 0;
fade = 10;
}
Symbol 181 Button
on (release) {
bback.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = 0;
camy = -400;
fade = 10;
}
Symbol 182 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = -500;
camy = -400;
fade = 10;
}
Symbol 183 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = -1000;
camy = 0;
fade = 10;
}
Symbol 184 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = -500;
camy = -800;
fade = 10;
}
Symbol 185 Button
on (release) {
but.nextFrame();
camx = -1000;
camy = -800;
zoom = 5;
}
Symbol 186 Button
on (release) {
but.nextFrame();
camx = -1500;
camy = -800;
zoom = 5;
}
Symbol 187 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = 0;
camy = -800;
fade = 10;
}
Symbol 188 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = 500;
camy = -800;
fade = 10;
}
Symbol 189 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("papyr");
camx = -1000;
camy = -400;
fade = 10;
}
Symbol 190 Button
on (release) {
but.nextFrame();
camx = -1500;
camy = -400;
zoom = 5;
}
Symbol 191 Button
on (release) {
but.nextFrame();
camx = -2000;
camy = -400;
zoom = 5;
}
Symbol 192 Button
on (release) {
but.nextFrame();
camx = -2500;
camy = -400;
zoom = 5;
}
Symbol 193 Button
on (release) {
but.nextFrame();
camx = -3000;
camy = -400;
zoom = 5;
}
Symbol 194 Button
on (release) {
but.nextFrame();
getURL ("http://www.pep-the-dragon.com/", "_dragon");
}
Symbol 198 MovieClip Frame 15
stop();
Symbol 199 Button
on (release) {
pres.nextFrame();
_root.levels = _root.selectlev - 1;
_root.firsttime = 1;
_parent._parent.gotoAndStop("game");
}
Symbol 200 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 2
gotoAndStop (1);
Symbol 204 MovieClip Frame 15
stop();
Symbol 208 MovieClip Frame 15
stop();
Symbol 209 MovieClip Frame 1
stop();
Symbol 210 Button
on (release) {
but.nextFrame();
getURL ("http://itunes.apple.com/us/app/pep-the-dragon/id376580891?mt=8#", "_dragon");
}
Symbol 215 Button
on (release) {
if (_root.selectlev < 10) {
ping.nextFrame();
_root.selectlev++;
_parent.heads.head.gotoAndStop(_root.selectlev);
_parent.heads.gotoAndPlay(1);
}
if (_root.selectlev == 2) {
gotoAndStop (2);
_parent.sl.gotoAndStop(2);
}
if (_root.selectlev == 9) {
gotoAndStop (2);
}
if (_root.selectlev == 10) {
gotoAndStop (3);
}
}
Symbol 216 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 2
gotoAndStop (1);
Symbol 217 MovieClip Frame 15
stop();
Symbol 218 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 15
stop();
Symbol 223 MovieClip Frame 15
stop();
Symbol 224 Button
on (release) {
if (_root.selectlev > 1) {
ping.nextFrame();
_root.selectlev--;
if (_root.selectlev == 9) {
_parent.sr.gotoAndStop(2);
}
_parent.heads.head.gotoAndStop(_root.selectlev);
_parent.heads.gotoAndPlay(1);
}
if (_root.selectlev == 1) {
gotoAndStop (1);
}
}
Symbol 225 MovieClip Frame 1
stop();
Symbol 226 MovieClip Frame 1
var camx = 0;
var camy = 0;
var zoom = 0;
var fade = 0;
var selectmode = 0;
Symbol 226 MovieClip Frame 2
if (fade > 0) {
zoom = 0;
fade--;
if (fade == 0) {
_x = (camx + 240);
_y = (camy + 160);
}
}
if (zoom > 0) {
zoom * 0.75;
_x = (_x - ((_x - (camx + 240)) / zoom));
_y = (_y - ((_y - (camy + 160)) / zoom));
}
if ((fade == 0) && (selectmode == 1)) {
if (_root.locked[_root.selectlev] == 0) {
startbut.gotoAndStop(1);
}
if (_root.locked[_root.selectlev] == 1) {
startbut.gotoAndStop(2);
}
if (_root.locked[_root.selectlev] == 2) {
startbut.gotoAndStop(3);
}
if (_root.locked[2] == 0) {
iphonepad.k2.gotoAndStop(2);
}
if (_root.locked[3] == 0) {
iphonepad.k3.gotoAndStop(2);
}
all._x = all._x - ((all._x - ((-all["d" + _root.selectlev]._x) - 240)) / 5);
iphonepad._x = all._x;
}
Symbol 226 MovieClip Frame 3
gotoAndPlay ("loop");
Symbol 236 MovieClip Frame 13
stop();
Symbol 236 MovieClip Frame 33
stop();
Symbol 236 MovieClip Frame 43
stop();
Symbol 236 MovieClip Frame 68
stop();
Symbol 236 MovieClip Frame 93
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 24
stop();
Symbol 262 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 10
stop();
Symbol 364 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 2
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 11
stop();
Symbol 378 MovieClip Frame 1
stop();
Symbol 378 MovieClip Frame 11
stop();
Symbol 381 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 11
stop();
Symbol 383 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 1;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = this._rotation;
Symbol 383 MovieClip Frame 2
stop();
Symbol 386 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 2;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 386 MovieClip Frame 2
stop();
Symbol 389 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 3;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 389 MovieClip Frame 2
stop();
Symbol 392 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 8;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = this._rotation;
Symbol 392 MovieClip Frame 2
stop();
Symbol 395 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 4;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 395 MovieClip Frame 2
stop();
Symbol 398 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 6;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 398 MovieClip Frame 2
stop();
Symbol 401 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 7;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 401 MovieClip Frame 2
stop();
Symbol 402 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 9;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 402 MovieClip Frame 2
stop();
Symbol 405 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 10;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 2;
Symbol 405 MovieClip Frame 2
stop();
Symbol 408 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 11;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 408 MovieClip Frame 2
stop();
Symbol 409 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 12;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 409 MovieClip Frame 2
stop();
Symbol 413 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 13;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][5] = _rotation;
Symbol 413 MovieClip Frame 2
stop();
Symbol 414 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 14;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 414 MovieClip Frame 2
stop();
Symbol 417 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 15;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = this._height;
Symbol 417 MovieClip Frame 2
stop();
Symbol 420 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 17;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 420 MovieClip Frame 2
stop();
Symbol 423 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 19;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 423 MovieClip Frame 2
stop();
Symbol 426 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 20;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = this._rotation;
Symbol 426 MovieClip Frame 2
stop();
Symbol 427 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 21;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 427 MovieClip Frame 2
stop();
Symbol 430 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 5;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 430 MovieClip Frame 2
stop();
Symbol 433 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 22;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = _rotation;
Symbol 433 MovieClip Frame 2
stop();
Symbol 436 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 18;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 436 MovieClip Frame 2
stop();
Symbol 439 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 25;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = this._height * 0.5;
Symbol 439 MovieClip Frame 2
stop();
Symbol 442 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 26;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 2;
Symbol 442 MovieClip Frame 2
stop();
Symbol 445 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 30;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = _height;
Symbol 445 MovieClip Frame 2
stop();
Symbol 448 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 34;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = this._height;
Symbol 448 MovieClip Frame 2
stop();
Symbol 480 MovieClip Frame 12
_parent.gotoAndStop(1);
Symbol 485 MovieClip Frame 1
stop();
Symbol 485 MovieClip Frame 2
play();
Symbol 485 MovieClip Frame 7
stop();
Symbol 486 MovieClip Frame 1
stop();
Symbol 559 MovieClip Frame 1
stop();
Symbol 559 MovieClip Frame 18
gotoAndPlay ("run");
Symbol 559 MovieClip Frame 19
play();
Symbol 559 MovieClip Frame 61
gotoAndPlay ("fly");
Symbol 559 MovieClip Frame 72
gotoAndPlay ("urgs");
Symbol 560 MovieClip Frame 1
stop();
Symbol 566 MovieClip Frame 16
stop();
Symbol 582 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 2
play();
Symbol 582 MovieClip Frame 19
gotoAndPlay ("replay");
Symbol 586 MovieClip Frame 1
stop();
Symbol 617 MovieClip Frame 27
gotoAndPlay (1);
Symbol 617 MovieClip Frame 34
gotoAndPlay (1);
Symbol 617 MovieClip Frame 45
gotoAndPlay (1);
Symbol 618 MovieClip Frame 1
stop();
Symbol 650 MovieClip Frame 11
gotoAndPlay ("run");
Symbol 650 MovieClip Frame 12
play();
Symbol 651 MovieClip Frame 1
stop();
Symbol 653 MovieClip Frame 2
stop();
Symbol 675 MovieClip Frame 1
var xdrift = 0;
var g = 0;
var lifetime = (60 + random(25));
xdrift = random(10) - 5;
g = 5 + random(5);
var ran = (random(25) + 50);
ball._xscale = ran;
ball._yscale = ran;
Symbol 675 MovieClip Frame 2
_x = (_x + xdrift);
xdrift = xdrift * 0.98;
if (xdrift < -1) {
if (_root.thegame.front.hitTest((_root.xoff + _x) - 10, (_root.yoff + _y) + 10, 1)) {
xdrift = xdrift * -1;
}
}
if (_root.thegame.front.hitTest(_root.xoff + _x, (_root.yoff + _y) + 1, 1) && (!_root.thegame.front.hitTest(_root.xoff + _x, (_root.yoff + _y) - 1, 1))) {
} else if (_root.thegame.front.hitTest(_root.xoff + _x, _root.yoff + _y, 1)) {
_y = (_y-1);
g = 0;
} else {
g = g - 0.5;
_y = (_y - g);
}
lifetime--;
if (lifetime <= 0) {
gotoAndPlay ("puff");
}
if ((_root.pepx > (_x - 20)) && (_root.pepx < (_x + 20))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.score++;
gotoAndPlay ("pickup");
}
}
Symbol 675 MovieClip Frame 3
gotoAndPlay (2);
Symbol 675 MovieClip Frame 13
stop();
Symbol 691 MovieClip Frame 1
if (this._name == "fire") {
gotoAndStop ("done");
}
Symbol 691 MovieClip Frame 13
stop();
Symbol 699 MovieClip Frame 1
stop();
Symbol 699 MovieClip Frame 2
play();
Symbol 699 MovieClip Frame 22
stop();
Symbol 699 MovieClip Frame 43
stop();
Symbol 703 MovieClip Frame 1
if (this._name == "smoke") {
gotoAndStop ("done");
}
var sin = ((random(100) - 50) / 10);
var xdrift = ((random(50) + 25) * 0.025);
var upspeed = ((random(50) + 25) * 0.02);
var alph = (50 + random(25));
var ran = (random(50) + 25);
smoke._xscale = ran;
smoke._yscale = ran;
Symbol 703 MovieClip Frame 2
sin = sin + 0.025;
_x = (_x + (Math.sin(sin) * xdrift));
_y = (_y - upspeed);
_alpha = alph;
xdrift = xdrift * 0.99;
alph = alph - 0.5;
if (alph <= 0) {
gotoAndStop ("done");
}
Symbol 703 MovieClip Frame 3
gotoAndPlay (2);
Symbol 703 MovieClip Frame 4
stop();
Symbol 705 MovieClip Frame 1
stop();
Symbol 706 MovieClip Frame 1
stop();
Symbol 722 MovieClip Frame 1
var lifetime = 50;
if (this._name == "slugblast") {
gotoAndStop ("done");
}
Symbol 722 MovieClip Frame 2
_x = (_x - 7.5);
lifetime--;
if (lifetime <= 0) {
gotoAndStop ("done");
}
if (_root.invul <= 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 40))) {
_root.ishit = -1;
_root.lifes--;
gotoAndPlay ("puff");
}
}
}
Symbol 722 MovieClip Frame 3
gotoAndPlay (2);
Symbol 722 MovieClip Frame 11
stop();
Symbol 727 MovieClip Frame 1
stop();
Symbol 727 MovieClip Frame 2
gotoAndStop (1);
Symbol 739 MovieClip Frame 1
if (_parent._name == "bee") {
gotoAndStop ("dead");
}
var sin = 0;
var sx = _parent._x;
var sy = _parent._y;
var bx = sx;
var by = sy;
var tx = 0;
var ty = 0;
var pdown = 0;
var downflo = 0;
var mission = 0;
Symbol 739 MovieClip Frame 2
if (_root.invul <= 0) {
if ((_root.pepx > (bx - 30)) && (_root.pepx < (bx + 30))) {
if ((_root.pepy > (by - 10)) && (_root.pepy < (by + 30))) {
gotoAndPlay ("attack");
if (_root.pepx < _parent._x) {
_root.ishit = -0.5;
} else {
_root.ishit = 0.5;
}
if (mission == 1) {
mission = 2;
}
}
}
}
if (mission == 0) {
sin = sin + 0.1;
bx = bx - ((bx - (sx + (Math.sin(sin) * 10))) / 4);
by = by - ((by - (sy + (Math.cos(sin) * 20))) / 4);
if ((_root.pepx > (sx - 140)) && (_root.pepx < (sx + 140))) {
if ((_root.pepy > (_parent._y - 150)) && (_root.pepy < (_parent._y + 150))) {
tx = _root.pepx;
ty = _root.pepy + 15;
downflo = 5;
pdown = 25;
mission = 1;
atta.nextFrame();
}
}
}
if (mission == 1) {
downflo = downflo * 0.9;
by = by + downflo;
bx = bx - ((bx - tx) / 15);
by = by - (((by - ty) - downflo) / 15);
if ((bx > (tx - 10)) && (bx < (tx + 10))) {
mission = 2;
}
down = down * 0.9;
}
if (mission == 2) {
if (pdown > 1) {
pdown--;
}
bx = bx - ((bx - sx) / pdown);
by = by - ((by - sy) / pdown);
if ((bx > (sx - 1)) && (bx < (sx + 1))) {
if ((by > (sy - 2)) && (by < (sy + 2))) {
mission = 0;
sin = 0;
}
}
}
_parent._x = bx;
_parent._y = by;
Symbol 739 MovieClip Frame 3
gotoAndPlay (2);
Symbol 739 MovieClip Frame 14
gotoAndPlay (2);
Symbol 740 MovieClip Frame 1
stop();
Symbol 745 MovieClip Frame 1
stop();
Symbol 748 MovieClip Frame 1
stop();
Symbol 748 MovieClip Frame 2
gotoAndStop (1);
Symbol 749 MovieClip Frame 1
var ani = 0;
var speed = 0;
var sy = _y;
var wait = 0;
Symbol 749 MovieClip Frame 2
if (ani == 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 15)) && (_root.pepy < (_y - 10))) {
sink.nextFrame();
sound_elev.nextFrame();
speed = 0;
ani = 1;
}
}
} else {
if (ani == 1) {
if (speed < 15) {
speed = speed + 0.2;
}
_y = (_y + speed);
if (_root.isfalling <= 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
}
if (_y > (sy + high)) {
speed = 0;
ani = 2;
}
}
if (ani == 2) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
if ((((_root.pepx < (_x - 30)) or (_root.pepx > (_x + 30))) or (_root.pepy < (_y - 60))) or (_root.pepy > (_y + 60))) {
ani = 3;
}
}
if (ani == 3) {
if (speed < 5) {
speed = speed + 0.2;
}
_y = (_y - speed);
if (_y < sy) {
_y = sy;
ani = 0;
}
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 50)) && (_root.pepy < (_y + 50))) {
sink.nextFrame();
speed = 0;
ani = 1;
}
}
}
}
_parent._parent.front.plats[_name]._x = _x;
_parent._parent.front.plats[_name]._y = _y;
Symbol 749 MovieClip Frame 3
gotoAndPlay (2);
Symbol 770 MovieClip Frame 1
stop();
Symbol 770 MovieClip Frame 18
stop();
Symbol 771 MovieClip Frame 1
stop();
Symbol 771 MovieClip Frame 18
stop();
Symbol 772 MovieClip Frame 1
stop();
Symbol 772 MovieClip Frame 18
stop();
Symbol 773 MovieClip Frame 1
stop();
Symbol 773 MovieClip Frame 18
stop();
Symbol 774 MovieClip Frame 1
stop();
Symbol 774 MovieClip Frame 18
stop();
Symbol 775 MovieClip Frame 1
stop();
Symbol 775 MovieClip Frame 18
stop();
Symbol 801 MovieClip Frame 1
stop();
Symbol 801 MovieClip Frame 2
play();
Symbol 801 MovieClip Frame 26
gotoAndPlay ("fly");
Symbol 802 MovieClip Frame 1
stop();
Symbol 805 MovieClip Frame 1
stop();
Symbol 805 MovieClip Frame 2
gotoAndStop (1);
Symbol 805 MovieClip Frame 3
gotoAndStop (1);
Symbol 806 MovieClip Frame 1
if (_name == "vult") {
gotoAndStop ("dead");
}
var sx = _x;
var sy = _y;
var bx = sx;
var by = sy;
var speed = 0;
var tx = 0;
var ty = 0;
var pushx = 0;
var wait = 0;
var mission = 0;
Symbol 806 MovieClip Frame 2
if (_root.invul <= 0) {
if ((_root.pepx > (bx - 40)) && (_root.pepx < (bx + 40))) {
if ((_root.pepy > (by - 20)) && (_root.pepy < (by + 20))) {
atta.gotoAndStop(3);
tx = bx;
if (flip._currentframe == 1) {
_root.ishit = -1.25;
} else {
_root.ishit = 1.25;
}
}
}
}
if ((mission == 0) && (wait <= 0)) {
if (_root.pepx < (sx - 5)) {
flip.gotoAndStop(1);
}
if (_root.pepx > (sx + 5)) {
flip.gotoAndStop(2);
}
flip.ani.gotoAndStop(1);
if ((_root.pepx > (sx - 280)) && (_root.pepx < (sx + 280))) {
if ((_root.pepy > (sy - 150)) && (_root.pepy < (sy + 150))) {
tx = _root.pepx;
ty = _root.pepy + 15;
downflo = 5;
pdown = 25;
speed = 0;
if (_root.pepx < sx) {
flip.gotoAndStop(1);
mission = 1;
} else {
flip.gotoAndStop(2);
mission = 3;
}
flip.ani.gotoAndPlay("fly");
atta.gotoAndStop(2);
}
}
}
if (mission == 1) {
if (speed < 10) {
speed = speed + 0.25;
}
downflo = downflo * 0.9;
if (_root.pepy > (_y - 50)) {
by = by + downflo;
}
bx = bx - speed;
by = by - (((by - ty) - downflo) / 15);
if (bx < (tx - 10)) {
mission = 2;
flip.gotoAndStop(2);
speed = 0;
}
down = down * 0.9;
if (_root.thegame.front.hitTest(_root.xoff + _x, (_root.yoff + _y) + 5, 1)) {
by = by - 1;
}
}
if (mission == 2) {
if (pdown > 1) {
pdown--;
}
if (speed > -5) {
speed = speed - 0.25;
}
bx = bx - speed;
by = by - ((by - sy) / pdown);
if (bx > sx) {
bx = sx;
if ((by > (sy - 2)) && (by < (sy + 2))) {
mission = 0;
wait = 20;
if (_root.pepx < (sx - 5)) {
flip.gotoAndStop(1);
}
if (_root.pepx > (sx + 5)) {
flip.gotoAndStop(2);
}
flip.ani.gotoAndStop(1);
pushx = 0;
}
}
}
if (mission == 3) {
if (speed < 10) {
speed = speed + 0.25;
}
downflo = downflo * 0.9;
if (_root.pepy > (_y - 50)) {
by = by - downflo;
}
bx = bx + speed;
by = by - (((by - ty) - downflo) / 15);
if (bx > (tx + 10)) {
mission = 4;
flip.gotoAndStop(1);
speed = 0;
}
down = down * 0.9;
if (_root.thegame.front.hitTest(_root.xoff + _x, (_root.yoff + _y) + 5, 1)) {
by = by - 1;
}
}
if (mission == 4) {
if (pdown > 1) {
pdown--;
}
if (speed > -5) {
speed = speed - 0.25;
}
bx = bx + speed;
by = by - ((by - sy) / pdown);
if (bx < sx) {
bx = sx;
if ((by > (sy - 2)) && (by < (sy + 2))) {
mission = 0;
wait = 20;
if (_root.pepx < (sx - 5)) {
flip.gotoAndStop(1);
}
if (_root.pepx > (sx + 5)) {
flip.gotoAndStop(2);
}
flip.ani.gotoAndStop(1);
pushx = 0;
}
}
}
wait--;
bx = bx + (pushx * 0.75);
by = by - Math.abs(pushx * 0.25);
pushx = pushx * 0.98;
_x = bx;
_y = by;
Symbol 806 MovieClip Frame 3
gotoAndPlay (2);
Symbol 825 MovieClip Frame 10
stop();
Symbol 827 MovieClip Frame 1
stop();
Symbol 827 MovieClip Frame 2
gotoAndStop (1);
Symbol 831 MovieClip Frame 1
var ani = 0;
var speed = 0;
var sy = _y;
var wait = 0;
_parent._parent.front.plats.elev._x = _x;
_parent._parent.front.plats.elev._y = _y;
if (this._name == "elevator") {
gotoAndStop ("done");
}
Symbol 831 MovieClip Frame 2
if (ani == 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 10)) && (_root.pepy < (_y + 10))) {
sound_elev.nextFrame();
ani = 1;
}
}
} else {
if (ani == 1) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y - speed);
_parent._parent.front.plats.elev._x = _x;
_parent._parent.front.plats.elev._y = _y;
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
if (_y < (sy - high)) {
ani = 2;
}
}
if (ani == 2) {
if ((((_root.pepx > (_x - 30)) && (_root.pepy < (_x - 30))) && (_root.pepy > (_y - 10))) && (_root.pepy < (_y + 10))) {
} else {
wait = 50;
ani = 3;
}
}
if (ani == 3) {
wait--;
if (wait < 0) {
speed = 0;
ani = 4;
}
}
if (ani == 4) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y + speed);
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
_parent._parent.front.plats.elev._x = _x;
_parent._parent.front.plats.elev._y = _y;
if (_y >= sy) {
ani = 0;
}
}
}
Symbol 831 MovieClip Frame 3
gotoAndPlay (2);
Symbol 832 MovieClip Frame 1
stop();
Symbol 844 MovieClip Frame 2
stop();
Symbol 851 MovieClip Frame 1
stop();
Symbol 851 MovieClip Frame 10
stop();
Symbol 852 MovieClip Frame 1
stop();
Symbol 855 MovieClip Frame 2
stop();
Symbol 858 MovieClip Frame 1
stop();
Symbol 879 MovieClip Frame 1
wait = 50;
stop();
Symbol 879 MovieClip Frame 22
wait--;
if (wait <= 0) {
gotoAndPlay ("rebuild");
}
Symbol 879 MovieClip Frame 23
gotoAndPlay ("loop");
Symbol 898 MovieClip Frame 1
stop();
Symbol 898 MovieClip Frame 39
stop();
Symbol 898 MovieClip Frame 40
gotoAndStop ("loop");
Symbol 899 MovieClip Frame 1
g = 0;
stop();
Symbol 899 MovieClip Frame 2
if (!_root.thegame.front.hitTest(_root.xoff + _x, (_root.yoff + _y) + 2, 1)) {
g++;
_y = (_y + g);
} else {
gotoAndStop (1);
}
Symbol 899 MovieClip Frame 3
gotoAndPlay (2);
Symbol 901 MovieClip Frame 1
stop();
Symbol 903 MovieClip Frame 1
var dir = 1;
var speed = 0;
var syu = (_y - high);
var syd = (_y + high);
if (this._name == "hoverupdown") {
gotoAndStop ("done");
}
Symbol 903 MovieClip Frame 2
if (speed < 2) {
speed = speed + 0.2;
}
if (dir == 1) {
_y = (_y + speed);
if (_y > syd) {
dir = -1;
speed = 0;
}
}
if (dir == -1) {
_y = (_y - speed);
if (_y < syu) {
dir = 1;
speed = 0;
}
}
if (_root.isfalling <= 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
}
Symbol 903 MovieClip Frame 3
gotoAndPlay (2);
Symbol 906 MovieClip Frame 1
stop();
Symbol 909 MovieClip Frame 1
stop();
Symbol 909 MovieClip Frame 2
gotoAndStop (1);
Symbol 911 MovieClip Frame 1
var ani = 0;
var speed = 0;
var wait = 0;
var sy = _y;
Symbol 911 MovieClip Frame 2
if (ani == 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
sound_elev.nextFrame();
ani = 1;
}
}
} else {
if (ani == 1) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y + speed);
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
if (_y > (sy + high)) {
ani = 2;
}
}
if (ani == 2) {
if ((((_root.pepx > (_x - 30)) && (_root.pepy < (_x - 30))) && (_root.pepy > (_y - 20))) && (_root.pepy < (_y + 20))) {
} else {
wait = 50;
ani = 3;
}
}
if (ani == 3) {
wait--;
if (wait < 0) {
speed = 0;
sound_elev.nextFrame();
ani = 4;
}
}
if (ani == 4) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y - speed);
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
if (_y <= sy) {
ani = 0;
}
}
}
Symbol 911 MovieClip Frame 3
gotoAndPlay (2);
Symbol 913 MovieClip Frame 1
var ani = 0;
var speed = 0;
var wait = 0;
var sy = _y;
Symbol 913 MovieClip Frame 2
if (ani == 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
sound_elev.nextFrame();
ani = 1;
}
}
} else {
if (ani == 1) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y - speed);
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
if (_y < (sy + high)) {
ani = 2;
}
}
if (ani == 2) {
if ((((_root.pepx > (_x - 30)) && (_root.pepy < (_x - 30))) && (_root.pepy > (_y - 20))) && (_root.pepy < (_y + 20))) {
} else {
wait = 50;
ani = 3;
}
}
if (ani == 3) {
wait--;
if (wait < 0) {
speed = 0;
sound_elev.nextFrame();
ani = 4;
}
}
if (ani == 4) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y + speed);
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
if (_y >= sy) {
ani = 0;
}
}
}
Symbol 913 MovieClip Frame 3
gotoAndPlay (2);
Symbol 916 MovieClip Frame 2
stop();
Symbol 919 MovieClip Frame 2
stop();
Symbol 928 MovieClip Frame 2
stop();
Symbol 941 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 23;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 941 MovieClip Frame 2
stop();
Symbol 945 MovieClip Frame 10
stop();
Symbol 947 MovieClip Frame 1
stop();
Symbol 947 MovieClip Frame 2
stop();
Symbol 947 MovieClip Frame 12
stop();
Symbol 956 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 2
gotoAndStop (1);
Symbol 956 MovieClip Frame 3
gotoAndStop (1);
Symbol 956 MovieClip Frame 4
gotoAndStop (1);
Symbol 956 MovieClip Frame 5
gotoAndStop (1);
Symbol 956 MovieClip Frame 6
gotoAndStop (1);
Symbol 956 MovieClip Frame 7
gotoAndStop (1);
Symbol 956 MovieClip Frame 8
gotoAndStop (1);
Symbol 956 MovieClip Frame 9
gotoAndStop (1);
Symbol 956 MovieClip Frame 10
gotoAndStop (1);
Symbol 964 MovieClip Frame 1
stop();
Symbol 964 MovieClip Frame 2
gotoAndStop (1);
Symbol 964 MovieClip Frame 3
gotoAndStop (1);
Symbol 964 MovieClip Frame 4
gotoAndStop (1);
Symbol 964 MovieClip Frame 5
gotoAndStop (1);
Symbol 964 MovieClip Frame 6
gotoAndStop (1);
Symbol 964 MovieClip Frame 7
gotoAndStop (1);
Symbol 964 MovieClip Frame 8
gotoAndStop (1);
Symbol 964 MovieClip Frame 9
gotoAndStop (1);
Symbol 966 MovieClip Frame 1
stop();
Symbol 966 MovieClip Frame 2
gotoAndStop (1);
Symbol 1039 MovieClip Frame 1
stop();
Symbol 1039 MovieClip Frame 11
stop();
Symbol 1042 MovieClip Frame 1
stop();
Symbol 1042 MovieClip Frame 11
stop();
Symbol 1045 MovieClip Frame 1
stop();
Symbol 1045 MovieClip Frame 11
stop();
Symbol 1048 MovieClip Frame 1
stop();
Symbol 1048 MovieClip Frame 11
stop();
Symbol 1051 MovieClip Frame 1
stop();
Symbol 1051 MovieClip Frame 11
stop();
Symbol 1054 MovieClip Frame 1
stop();
Symbol 1054 MovieClip Frame 11
stop();
Symbol 1061 MovieClip Frame 1
stop();
Symbol 1062 MovieClip Frame 1
stop();
Symbol 1066 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 16;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1066 MovieClip Frame 2
stop();
Symbol 1067 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 29;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1067 MovieClip Frame 2
stop();
Symbol 1069 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 31;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = _height;
Symbol 1069 MovieClip Frame 2
stop();
Symbol 1070 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 32;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1070 MovieClip Frame 2
stop();
Symbol 1071 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 28;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1071 MovieClip Frame 2
stop();
Symbol 1073 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 35;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
_parent.ai[_root.count][6] = this._height;
Symbol 1073 MovieClip Frame 2
stop();
Symbol 1076 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 36;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = this._height;
Symbol 1076 MovieClip Frame 2
stop();
Symbol 1110 MovieClip Frame 27
gotoAndPlay ("run");
Symbol 1111 MovieClip Frame 1
stop();
Symbol 1147 MovieClip Frame 29
gotoAndPlay ("run");
Symbol 1147 MovieClip Frame 43
gotoAndPlay ("run");
Symbol 1148 MovieClip Frame 1
stop();
Symbol 1150 MovieClip Frame 1
var ani = 0;
var speed = 0;
var sy = _y;
var wait = 0;
_parent._parent.front.plats.elev._x = _x;
_parent._parent.front.plats.elev._y = _y;
if (this._name == "elevatordown") {
gotoAndStop ("done");
}
Symbol 1150 MovieClip Frame 2
if (ani == 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 10)) && (_root.pepy < (_y + 10))) {
sound_elev.nextFrame();
ani = 1;
}
}
} else {
if (ani == 1) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y + speed);
_parent._parent.front.plats.elev._x = _x;
_parent._parent.front.plats.elev._y = _y;
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
if (_y > (sy + high)) {
ani = 2;
}
}
if (ani == 2) {
if ((((_root.pepx > (_x - 30)) && (_root.pepy < (_x - 30))) && (_root.pepy > (_y - 10))) && (_root.pepy < (_y + 10))) {
} else {
wait = 50;
ani = 3;
}
}
if (ani == 3) {
wait--;
if (wait < 0) {
speed = 0;
ani = 4;
}
}
if (ani == 4) {
if (speed < 2) {
speed = speed + 0.1;
}
_y = (_y - speed);
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 20))) {
_root.pushy = _y;
}
}
_parent._parent.front.plats.elev._x = _x;
_parent._parent.front.plats.elev._y = _y;
if (_y <= sy) {
ani = 0;
}
}
}
Symbol 1150 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1152 MovieClip Frame 1
var sin = 0;
var lastx = 0;
if (this._name == "swing") {
gotoAndStop ("done");
}
Symbol 1152 MovieClip Frame 2
sin = sin + 0.04;
angle = Math.sin(sin) * 25;
swing._rotation = angle;
poy = Math.cos((angle * Math.PI) / 180) * 243;
pox = (-Math.sin((angle * Math.PI) / 180)) * 243;
_parent._parent.front.plats.swingplat._x = pox + _x;
_parent._parent.front.plats.swingplat._y = poy + _y;
_parent._parent.front.plats.swingplat._rotation = angle;
if (_root.isground > 0) {
if ((_root.pepx > ((pox + _x) - 50)) && (_root.pepx < ((pox + _x) + 50))) {
if ((_root.pepy > ((poy + _y) - 50)) && (_root.pepy < ((poy + _y) + 50))) {
_root.pushx = pox - lastx;
}
}
}
lastx = pox;
Symbol 1152 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1266 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 33;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1266 MovieClip Frame 2
stop();
Symbol 1267 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 27;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1267 MovieClip Frame 2
stop();
Symbol 1273 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 37;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1273 MovieClip Frame 2
stop();
Symbol 1276 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 38;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1276 MovieClip Frame 2
stop();
Symbol 1279 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 39;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 1;
Symbol 1279 MovieClip Frame 2
stop();
Symbol 1318 MovieClip Frame 23
gotoAndPlay ("run");
Symbol 1319 MovieClip Frame 1
stop();
Symbol 1353 MovieClip Frame 23
gotoAndPlay ("run");
Symbol 1354 MovieClip Frame 1
stop();
Symbol 1365 MovieClip Frame 1
stop();
Symbol 1365 MovieClip Frame 2
play();
Symbol 1365 MovieClip Frame 17
stop();
Symbol 1372 MovieClip Frame 1
stop();
Symbol 1375 MovieClip Frame 1
stop();
Symbol 1375 MovieClip Frame 2
prevFrame();
Symbol 1376 MovieClip Frame 1
if (_name == "stoney2") {
gotoAndStop ("dead");
}
thetime = getTimer();
Symbol 1376 MovieClip Frame 2
if ((_root.pepx > (_x - 300)) && (_root.pepx < (_x + 10))) {
if (getTimer() > thetime) {
thetime = getTimer() + 1750;
elektro.gotoAndPlay(2);
elewav.nextFrame();
if ((_root.pepx > (_x - 180)) && (_root.pepx < (_x + 10))) {
if ((_root.pepy > (_y - 40)) && (_root.pepy < (_y + 40))) {
if (_root.ishit == 0) {
_root.ishit = -2;
}
}
}
}
}
Symbol 1376 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1397 MovieClip Frame 1
stop();
Symbol 1397 MovieClip Frame 2
play();
Symbol 1397 MovieClip Frame 17
stop();
Symbol 1399 MovieClip Frame 1
stop();
Symbol 1399 MovieClip Frame 2
prevFrame();
Symbol 1400 MovieClip Frame 1
if (_name == "piranha") {
gotoAndStop ("dead");
}
thetime = getTimer();
sx = _x;
sy = _y;
g = 0;
ani = 0;
angle = 0;
Symbol 1400 MovieClip Frame 2
if (ani == 0) {
if ((_root.pepx > (_x - 300)) && (_root.pepx < (_x + 300))) {
if ((_root.pepy > (_y - 300)) && (_root.pepy < (_y + 300))) {
if (getTimer() > thetime) {
thetime = getTimer() + 3000;
g = 16;
pira._y = sy;
angle = 0;
ani = 1;
splash.gotoAndPlay(2);
}
}
}
}
if (ani == 1) {
pira._y = pira._y - g;
g = g - 0.5;
if (g > 0) {
angle = angle - (g * 0.5);
} else if (angle > -160) {
angle = angle - ((-g) * 0.5);
}
pira._rotation = angle;
if ((_root.pepx > (_x - 40)) && (_root.pepx < (_x + 40))) {
if ((_root.pepy > ((pira._y + _y) - 40)) && (_root.pepy < ((pira._y + _y) + 40))) {
if ((_root.ishit == 0) && (_root.invul <= 0)) {
pirafx.nextFrame();
if (_root.pepx < _x) {
_root.ishit = -1;
} else {
_root.ishit = 1;
}
}
}
}
if (pira._y > sy) {
pira._y = sy;
ani = 0;
}
}
Symbol 1400 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1400 MovieClip Frame 4
g = 0;
ani = 0;
angle = 0;
thetime = getTimer() + 3500;
pira._y = sy;
Symbol 1400 MovieClip Frame 5
gotoAndPlay (2);
Symbol 1401 MovieClip Frame 1
stop();
Symbol 1401 MovieClip Frame 3
gotoAndStop (1);
Symbol 1407 MovieClip Frame 1
if (_name == "stoney2") {
gotoAndStop ("dead");
}
var depth = 0;
var pox = 0;
var poy = 0;
var pushx = 8;
var lifetime = 100;
var thetime = getTimer();
Symbol 1407 MovieClip Frame 2
if ((_root.pepx > (_x - 500)) && (_root.pepx < (_x + 60))) {
if (getTimer() > thetime) {
thetime = getTimer() + 1750;
depth++;
if (depth > 3) {
depth = 1;
}
duplicateMovieClip (_parent.gargoyleshot, "obj" + depth, depth);
_parent["obj" + depth]._x = pox + _x;
_parent["obj" + depth]._y = poy + _y;
gfx.nextFrame();
}
}
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 60))) {
if ((_root.pepy > ((poy + _y) - 50)) && (_root.pepy < ((poy + _y) + 50))) {
if (_root.ishit <= 0) {
_root.ishit = -2;
}
}
}
if ((_root.pepx > (_x - 200)) && (_root.pepx < (_x + 60))) {
rota = ((_x - _root.pepx) - 200) * 0.2;
gargo._rotation = rota;
poy = (-Math.cos(((rota - 90) * Math.PI) / 180)) * 110;
pox = (Math.sin(((rota - 90) * Math.PI) / 180) * 110) + 90;
}
Symbol 1407 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1407 MovieClip Frame 4
g = 0;
gfx.nextFrame();
Symbol 1407 MovieClip Frame 5
g = g + 0.2;
rota = rota - g;
gargo._rotation = rota;
gargo._x = gargo._x - pushx;
gargo._y = gargo._y + g;
pushx = pushx * 0.98;
lifetime--;
_parent._parent.front.gitter._y = _parent._parent.front.gitter._y + g;
if (lifetime <= 0) {
gotoAndStop ("done");
}
Symbol 1407 MovieClip Frame 6
gotoAndPlay ("fall");
Symbol 1410 MovieClip Frame 1
var lifetime = 150;
g = 0;
rota = 0;
bums = 2;
if (this._name == "gargoyleshot") {
gotoAndStop ("done");
}
Symbol 1410 MovieClip Frame 2
g = g + 0.5;
rota = rota - 10;
_x = (_x - 6);
_y = (_y + g);
if (_y > (_root.gargoy - 25)) {
_y = (_root.gargoy - 25);
if (g > 0) {
bums--;
g = -g;
_parent._parent.depth++;
duplicateMovieClip (_parent._parent.objectsfront.fire, "fire" + depth, depth);
_parent._parent.objectsfront["fire" + depth]._x = _x;
_parent._parent.objectsfront["fire" + depth]._y = _y + 5;
if (bums <= 0) {
gotoAndPlay ("puff");
}
}
}
_rotation = rota;
if (_root.invul <= 0) {
if ((_root.pepx > (_x - 30)) && (_root.pepx < (_x + 30))) {
if ((_root.pepy > (_y - 20)) && (_root.pepy < (_y + 40))) {
_root.ishit = -1;
_root.lifes--;
duplicateMovieClip (_parent._parent.objectsfront.fire, "fire" + depth, depth);
_parent._parent.objectsfront["fire" + depth]._x = _x;
_parent._parent.objectsfront["fire" + depth]._y = _y + 5;
gotoAndPlay ("puff");
}
}
}
lifetime--;
if (lifetime <= 0) {
gotoAndStop ("done");
}
Symbol 1410 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1410 MovieClip Frame 12
stop();
Symbol 1414 MovieClip Frame 1
_root.count = _root.count + 1;
_parent.ai[_root.count][0] = 40;
_parent.ai[_root.count][1] = this._x;
_parent.ai[_root.count][2] = this._y;
_parent.ai[_root.count][3] = 0;
_parent.ai[_root.count][4] = 7;
_parent.ai[_root.count][6] = 8;
Symbol 1414 MovieClip Frame 2
stop();
Symbol 1469 MovieClip Frame 1
var cx = new Array();
var cy = new Array();
var cg = new Array();
var cp = new Array();
var clife = new Array();
var wait = 5;
var cmax = 1;
i = 0;
while (i < 13) {
cx[i] = 0;
cy[i] = 0;
cg[i] = random(5) + 5;
cp[i] = random(16) - 8;
clife[i] = 20;
i++;
}
Symbol 1469 MovieClip Frame 2
wait--;
if (wait == 0) {
wait = 5;
if (_root.crystals > 0) {
if (cmax < 13) {
cmax++;
}
}
}
i = 0;
while (i < cmax) {
cx[i] = cx[i] + cp[i];
cp[i] = cp[i] * 0.95;
cy[i] = cy[i] - cg[i];
cg[i] = cg[i] - 0.5;
if (clife[i] > 0) {
clife[i] = clife[i] - 0.5;
}
this["bc" + i]._x = cx[i];
this["bc" + i]._y = cy[i];
if (clife[i] < 10) {
this["bc" + i]._alpha = clife[i] * 10;
}
i++;
}
Symbol 1469 MovieClip Frame 3
gotoAndPlay ("loop");
Symbol 1477 MovieClip Frame 11
stop();
Symbol 1479 MovieClip Frame 1
function distance(x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function angle(x1, y1, x2, y2) {
return(Math.atan2((y1 - y2) - (x1 - x2)));
}
levelscreens.gotoAndStop(_root.levels + 1);
var screensizex = 240;
var screensizey = 200;
var centery = 160;
var isalive = 1;
var asin = 0;
var drawx = 0;
var aspeed = 0;
var icy = 0;
var g = 0;
var rundir = 1;
var jump = 0;
var onbottom = 0;
var onejump = 0;
var onefire = 0;
var maxi = 0;
var ani = 0;
var scalef = 1;
var ra = 0;
var grot = 0;
var waitfly = 0;
var fameover = 0;
var waitsome = 0;
var isfalling = 0;
_parent.scoretable._y = 380;
var lavasin = 0;
var gspeed = 0;
var washit = 0;
var calcboxes = 0;
_root.score = 0;
_root.crystals = 0;
_root.lifes = 15;
var flipit = 1;
var weapon = 1;
var mde = 0;
var ghostx = 0;
var ghosty = 0;
var linedraw = 0;
var drawloaded = 1;
var calcboxes = 0;
var jdelay = 0;
var eh = 0;
var ew = 0;
var isburn = 0;
var extrax = 0;
var rebirthwait = 0;
_root.longfire = 0;
var weapon = 0;
checker = 0;
gotoAndPlay ("init");
Symbol 1479 MovieClip Frame 2
_parent.scoretable._y = 380;
_root.count = 0;
_x = screensizex;
_y = centery;
if (_root.firsttime == 0) {
_parent.black.gotoAndPlay("out");
}
_root.firsttime = 0;
_root.levels++;
if (_root.levels < 4) {
_root.locked[_root.levels] = 0;
}
levelscreens.gotoAndStop(_root.levels);
loading.speech.counter.gotoAndStop(_root.levels);
var wait = 100;
var invul = 0;
var xpos = 0;
var ypos = 0;
var xspeed = 0;
var px = 0;
var py = 0;
var rebirthx = 0;
var rebirthy = 0;
var rebirthstation = 0;
var depth = 0;
var lastmx = 0;
var lastmy = 0;
var exiter = 0;
var fireball = new Array();
var firex = new Array();
var firey = new Array();
var fireg = new Array();
fireball = [0, 0, 0, 0, 0, 0];
ai = new Array();
i = 1;
while (i < 100) {
ai[i] = [0, 0, 0, 0, 0, 0, 0, 0];
i++;
}
enem = new Array();
ways = new Array();
Symbol 1479 MovieClip Frame 3
wait--;
if (wait == 10) {
_parent.black.gotoAndPlay("fadein");
}
if (wait <= 0) {
_x = screensizex;
_y = screensizey;
_parent.black.gotoAndPlay("out");
if (_root.levels == 1) {
gotoAndPlay ("init01");
}
if (_root.levels == 2) {
gotoAndPlay ("init02");
}
if (_root.levels == 3) {
gotoAndPlay ("init03");
}
}
Symbol 1479 MovieClip Frame 4
gotoAndPlay ("levelscreens");
Symbol 1479 MovieClip Frame 8
enem[1] = [1, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[1] = [1, 2, 3, 4, 3, 2];
enem[2] = [2, 1, 0, 0, 0, 5, 0, 0, 25, 0, 3, 15, 0];
ways[2] = [5, 6, 7, 8, 9, 10, 11, -1];
enem[3] = [1, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[3] = [12, 13, 14, 15, 16, -1];
enem[4] = [2, 1, 0, 0, 0, 5, 0, 0, 25, 0, 3, 15, 0];
ways[4] = [17, 18];
maxe = enem.length;
n = 1;
while (n < (maxe + 1)) {
enem[n][1] = enemies["e" + n]._x;
enem[n][2] = enemies["e" + n]._y;
enem[n][3] = ways[n][0];
n++;
}
pep._y = -20;
ypos = -20;
py = -20;
drawx = 0;
_parent.music.gotoAndStop(2);
Symbol 1479 MovieClip Frame 9
_parent.scoretable._y = _parent.scoretable._y - ((_parent.scoretable._y - 301) / 10);
jdelay--;
waitfly--;
_root.isground--;
_root.rainbowing--;
if ((_root.lifes <= 0) && (isalive == 1)) {
_root.lifes = 0;
pep.gotoAndStop(3);
angel._x = pep._x;
angel._y = pep._y;
unloadMovieNum (1);
angel.gotoAndPlay("loop");
fameover = 120;
_root.pepx = -1000;
isalive = 2;
}
if (isalive == 1) {
if (_root.ishit != 0) {
_root.lifes--;
xspeed = xspeed - (_root.ishit * 12);
_root.ishit = 0;
ypos = ypos + 10;
onejump = 1;
jump = 1;
g = 5;
ani = 7;
waitsome = 5;
_root.invul = 75;
pep.ani.gotoAndPlay("shocked");
pw.gotoAndStop(5);
}
if ((_root.pushy != 0) && (jump == 0)) {
ypos = -_root.pushy;
}
_root.pushy = 0;
if ((_root.pushx != 0) && (jump == 0)) {
xpos = xpos - _root.pushx;
}
_root.pushx = 0;
if (Key.isDown(37) or Key.isDown(65)) {
if (!front.hitTest((screensizex + xoff) - 22, (screensizey + yoff) - 20, 1)) {
rundir = -1;
xspeed = xspeed + 1;
}
if (ani < 1) {
ani = 1;
pep.ani.gotoAndPlay("run");
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (!front.hitTest((screensizex + xoff) + 22, (screensizey + yoff) - 20, 1)) {
rundir = 1;
xspeed = xspeed - 1;
}
if (ani < 1) {
ani = 1;
pep.ani.gotoAndPlay("run");
}
}
if (Key.isDown(32)) {
if (onefire == 0) {
onefire = 1;
if (weapon == 0) {
if (_root.longfire == 1) {
pep.ani.fire.gotoAndStop(3);
} else {
pep.ani.fire.gotoAndStop(2);
}
flame = 15;
if ((drawx > (pep._x - 500)) && (drawx < (pep._x + 500))) {
if (rundir == 1) {
i = 0;
while (i < 21) {
if ((front.ice["ice" + i]._x > (pep._x - 10)) && (front.ice["ice" + i]._x < (pep._x + 50))) {
if ((front.ice["ice" + i]._y > (pep._y - 40)) && (front.ice["ice" + i]._y < (pep._y + 40))) {
removeMovieClip(this.front.ice["ice" + i]);
}
}
i++;
}
}
if (rundir == -1) {
i = 0;
while (i < 21) {
if ((front.ice["ice" + i]._x > (pep._x - 50)) && (front.ice["ice" + i]._x < (pep._x + 10))) {
if ((front.ice["ice" + i]._y > (pep._y - 40)) && (front.ice["ice" + i]._y < (pep._y + 40))) {
removeMovieClip(this.front.ice["ice" + i]);
}
}
i++;
}
}
}
}
if (weapon == 1) {
i = 1;
while (i < 6) {
if (fireball[i] == 0) {
if (rundir == -1) {
fireball[i] = -1;
fire["fireball" + i].gotoAndStop(1);
firex[i] = pep._x - 25;
} else {
fire["fireball" + i].gotoAndStop(2);
fireball[i] = 1;
firex[i] = pep._x + 25;
}
pw.gotoAndStop(10);
firey[i] = pep._y - 25;
fireg[i] = 1;
_root.fireballs--;
if (_root.fireballs <= 0) {
_parent.scoretable.gui.firedisplay.gotoAndStop(1);
_parent.scoretable.gui.platte.icon2.gotoAndStop(1);
weapon = 0;
} else {
_parent.scoretable.gui.firedisplay.gotoAndStop(2);
}
if (_root.fireballs >= 50) {
_parent.scoretable.gui.firedisplay._y = 0;
} else {
_parent.scoretable.gui.firedisplay._y = (50 - _root.fireballs) * 0.45;
}
_root.fireballing++;
break;
}
i++;
}
if ((drawx > (pep._x - 500)) && (drawx < (pep._x + 500))) {
if (rundir == 1) {
i = 0;
while (i < 21) {
if ((front.ice["ice" + i]._x > (pep._x - 10)) && (front.ice["ice" + i]._x < (pep._x + 70))) {
if ((front.ice["ice" + i]._y > (pep._y - 40)) && (front.ice["ice" + i]._y < (pep._y + 40))) {
removeMovieClip(this.front.ice["ice" + i]);
}
}
i++;
}
}
if (rundir == -1) {
i = 0;
while (i < 21) {
if ((front.ice["ice" + i]._x > (pep._x - 70)) && (front.ice["ice" + i]._x < (pep._x + 10))) {
if ((front.ice["ice" + i]._y > (pep._y - 40)) && (front.ice["ice" + i]._y < (pep._y + 40))) {
removeMovieClip(this.front.ice["ice" + i]);
}
}
i++;
}
}
}
}
if (weapon == 2) {
_root.rainbowing = 5;
_root.rainbows--;
pep.ani.fire.gotoAndStop(4);
pep.ani.fire.rainbow.gotoAndPlay(2);
if (_root.rainbows <= 0) {
_parent.scoretable.gui.firedisplay.gotoAndStop(1);
weapon = 0;
_parent.scoretable.gui.platte.icon2.gotoAndStop(1);
} else {
_parent.scoretable.gui.firedisplay.gotoAndStop(3);
}
if (_root.rainbows >= 50) {
_parent.scoretable.gui.firedisplay._y = 0;
} else {
_parent.scoretable.gui.firedisplay._y = (50 - _root.rainbows) * 0.45;
}
if ((drawx > (pep._x - 500)) && (drawx < (pep._x + 500))) {
if (rundir == 1) {
i = 0;
while (i < 21) {
if ((front.ice["ice" + i]._x > (pep._x - 10)) && (front.ice["ice" + i]._x < (pep._x + 350))) {
if ((front.ice["ice" + i]._y > (pep._y - 40)) && (front.ice["ice" + i]._y < (pep._y + 40))) {
removeMovieClip(this.front.ice["ice" + i]);
}
}
i++;
}
}
if (rundir == -1) {
i = 0;
while (i < 21) {
if ((front.ice["ice" + i]._x > (pep._x - 350)) && (front.ice["ice" + i]._x < (pep._x + 10))) {
if ((front.ice["ice" + i]._y > (pep._y - 40)) && (front.ice["ice" + i]._y < (pep._y + 40))) {
removeMovieClip(this.front.ice["ice" + i]);
}
}
i++;
}
}
}
}
}
} else {
onefire = 0;
}
if (_root.selectweapon != 0) {
if (_root.selectweapon == -1) {
_parent.scoretable.gui.firedisplay.gotoAndStop(1);
weapon = 0;
}
if (_root.selectweapon == 1) {
_parent.scoretable.gui.firedisplay.gotoAndStop(2);
if (_root.fireballs >= 50) {
_parent.scoretable.gui.firedisplay._y = 0;
} else {
_parent.scoretable.gui.firedisplay._y = (50 - _root.fireballs) * 0.45;
}
weapon = 1;
}
if (_root.selectweapon == 2) {
_parent.scoretable.gui.firedisplay.gotoAndStop(3);
if (_root.rainbows >= 50) {
_parent.scoretable.gui.firedisplay._y = 0;
} else {
_parent.scoretable.gui.firedisplay._y = (50 - _root.rainbows) * 0.45;
}
weapon = 2;
}
_root.selectweapon = 0;
}
flame--;
xoff = (_x - (xpos * scalef)) - screensizex;
yoff = (_y - (ypos * scalef)) - screensizey;
if (front.hitTest((screensizex + xoff) - 20, (screensizey + yoff) - 20, 1)) {
if (xspeed > 0) {
xspeed = xspeed * 0.25;
}
xpos--;
}
if (front.hitTest((screensizex + xoff) + 20, (screensizey + yoff) - 20, 1)) {
if (xspeed < 0) {
xspeed = xspeed * 0.25;
}
xpos++;
}
onbottom = 0;
if (front.col.hitTest(screensizex + xoff, (screensizey + yoff) - 30, 1)) {
g = 0;
}
setup = 0;
if (front.hitTest(screensizex + xoff, (screensizey + yoff) + 1, 1)) {
_root.isground = 5;
onbottom = 1;
waitfly = 8;
jdelay = 5;
jump = 0;
if (g < -3) {
pw.gotoAndStop("land");
}
g = 0;
}
i = 0;
while (i < 10) {
if (front.hitTest(screensizex + xoff, (screensizey + yoff) - i, 1)) {
setup++;
onbottom = 1;
g = 0;
}
i++;
}
if ((setup == 0) && (onbottom == 0)) {
if (!front.hitTest(screensizex + xoff, (screensizey + yoff) + 2, 1)) {
maxi = 0;
i = 1;
while (i < 10) {
if (front.hitTest(screensizex + xoff, (screensizey + yoff) + i, 1)) {
maxi = i - 1;
break;
}
i++;
}
ypos = ypos - maxi;
}
}
if ((onbottom != 1) && (setup == 0)) {
g = g - 0.5;
if (g < -2) {
if (waitfly < 0) {
if ((ani == 0) or (ani == 1)) {
ani = 3;
pep.ani.gotoAndPlay("fly");
}
}
}
} else {
ypos = ypos - ((ypos - (ypos + setup)) / 2);
}
if (ani != 4) {
if ((((onbottom == 1) && (Math.abs(xspeed) < 3)) or ((onbottom == 1) && (ani == 2))) or ((onbottom == 1) && (ani == 3))) {
ani = 0;
pep.ani.gotoAndStop("stand");
}
}
if (Key.isDown(38) or Key.isDown(87)) {
if ((jump == 0) && (jdelay > 0)) {
if (onejump == 0) {
ypos = ypos + 10;
onejump = 1;
jump = 1;
g = 10;
pw.gotoAndStop("jump");
ani = 2;
waitsome = 5;
pep.ani.gotoAndPlay("jump");
if (random(3) == 1) {
ra = random(6) + 2;
pw.gotoAndStop(ra);
}
}
}
} else {
onejump = 0;
if (jump == 1) {
if (g > 0) {
g = g * 0.9;
}
}
}
ypos = ypos + g;
xpos = xpos + xspeed;
xspeed = xspeed * 0.85;
px = -xpos;
pep._x = px;
pep._y = pep._y - ((pep._y + ypos) / 2);
py = pep._y;
_x = (_x - ((_x - (((xpos * scalef) + screensizex) + (xspeed * 12))) / 10));
if (_root.isfalling == 0) {
_y = (_y - ((_y - ((ypos * scalef) + screensizey)) / 8));
} else {
_root.isfalling = _root.isfalling + 10;
if (inlava == 1) {
g = g * 0.75;
}
_y = (_y - ((_y - ((ypos * scalef) + screensizey)) / (8 + _root.isfalling)));
if (_root.isfalling > 260) {
rebirthwait = 5;
xpos = -rebirthx;
ypos = -rebirthy;
this.objectsfront["obj" + rebirthstation].gotoAndPlay("rebirth");
_y = ypos;
_x = xpos;
pep._x = xpos;
pep._y = ypos;
_root.invul = 75;
pw.gotoAndStop("jump");
ani = 2;
xspeed = 0;
g = 1;
_root.isfalling = 0;
}
}
backdrop._x = (-_x) * 0.2;
backdrop._y = (-_y) * 0.2;
heaven._x = (-_x) * 0.75;
heaven._y = -_y;
if (rundir == 1) {
pep.gotoAndStop(1);
} else {
pep.gotoAndStop(2);
}
_root.xoff = _x;
_root.yoff = _y;
_root.pepx = pep._x;
_root.pepy = pep._y;
if (_root.invul > 0) {
_root.invul--;
pep._alpha = (Math.abs(Math.cos(_root.invul * 0.1)) * 75) + 25;
}
lavasin = lavasin + 0.025;
lava._x = Math.sin(lavasin) * 10;
if (_root.ghost > 0) {
objects.ghost._x = objects.ghost._x - ((objects.ghost._x - pep._x) / 10);
objects.ghost._y = objects.ghost._y - ((objects.ghost._y - pep._y) / 10);
if (rundir == 1) {
if (gspeed < 5) {
gspeed++;
}
grot = grot + gspeed;
if (_root.ghostframe > 0) {
_root.ghostframe--;
}
} else {
if (gspeed > -5) {
gspeed--;
}
grot = grot + gspeed;
if (_root.ghostframe < 10) {
_root.ghostframe++;
}
}
objects.ghost.ray._rotation = grot;
objects.ghost.ray.rayflip.gotoAndStop(_root.ghostframe);
ghostx = objects.ghost._x + (Math.cos(((grot - 90) * Math.PI) / 180) * 137.5);
ghosty = objects.ghost._y + (Math.sin(((grot - 90) * Math.PI) / 180) * 103);
} else {
ghostx = -1000;
objects.ghost._x = -1000;
}
} else {
xspeed = xspeed * 0.5;
_x = (_x - ((_x - (((xpos * scalef) + screensizex) + (xspeed * 12))) / 10));
_y = (_y - ((_y - ((ypos * scalef) + screensizey)) / 8));
backdrop._x = (-_x) * 0.2;
backdrop._y = (-_y) * 0.2;
heaven._x = (-_x) * 0.75;
heaven._y = -_y;
if (aspeed < 3) {
aspeed = aspeed + 0.05;
}
angel._y = angel._y - aspeed;
asin = asin + 0.05;
angel._rotation = Math.sin(asin) * 10;
angel._x = angel._x - (Math.sin(asin) * 3);
fameover--;
if (fameover == 10) {
_parent.black.gotoAndPlay("fadein");
}
if (fameover <= 0) {
_parent.gotoAndStop("gameover");
}
}
function dorun() {
wpi = enem[n][3];
wpx = enemies["w" + wpi]._x;
wpy = enemies["w" + wpi]._y;
if (enem[n][6] < enem[n][5]) {
enem[n][6] = enem[n][6] + 0.25;
}
if (enemies["e" + n]._x > wpx) {
if (enem[n][7] == 1) {
enem[n][6] = 0;
}
enemies["e" + n].gotoAndStop(1);
enem[n][7] = -1;
} else {
if (enem[n][7] == -1) {
enem[n][6] = 0;
}
enemies["e" + n].gotoAndStop(2);
enem[n][7] = 1;
}
radians = Math.atan2(enemies["e" + n]._y - wpy, enemies["e" + n]._x - wpx);
angle = (radians * 180) / Math.PI;
pox = Math.cos((angle * Math.PI) / 180);
poy = Math.sin((angle * Math.PI) / 180);
enemies["e" + n]._x = enemies["e" + n]._x - (pox * enem[n][6]);
enemies["e" + n]._y = enemies["e" + n]._y - (poy * enem[n][6]);
enemies["e" + n]._x = enemies["e" + n]._x - enem[n][9];
enem[n][9] = enem[n][9] * 0.9;
if (angle <= 0) {
angle = angle + 180;
}
if (angle >= 100) {
angle = angle - 180;
}
if ((enemies["e" + n]._x > (wpx - 5)) && (enemies["e" + n]._x < (wpx + 5))) {
enem[n][4]++;
if (enem[n][4] >= ways[n].length) {
enem[n][4] = 0;
}
enem[n][3] = ways[n][enem[n][4]];
if (enem[n][3] < -1) {
enem[n][4] = -enem[n][3];
enem[n][3] = ways[n][enem[n][4]];
wpi = enem[n][3];
wpx = enemies["w" + wpi]._x;
wpy = enemies["w" + wpi]._y;
}
}
if ((pep._x > (enemies["e" + n]._x - 200)) && (pep._x < (enemies["e" + n]._x + 200))) {
if ((pep._y > (enemies["e" + n]._y - 150)) && (pep._y < (enemies["e" + n]._y + 150))) {
if (!_root.thegame.front.hitTest(_root.xoff + enemies["e" + n]._x, (_root.yoff + enemies["e" + n]._y) + 3, 1)) {
enem[n][12] = enem[n][12] + 0.5;
enemies["e" + n]._y = enemies["e" + n]._y + enem[n][12];
enemies["e" + n]._rotation = enemies["e" + n]._rotation * 0.8;
enem[n][9] = enem[n][9] * 0.75;
} else {
enem[n][12] = 0;
if (_root.thegame.front.hitTest(_root.xoff + enemies["e" + n]._x, (_root.yoff + enemies["e" + n]._y) - 2, 1)) {
enemies["e" + n]._y = enemies["e" + n]._y - 1;
}
enemies["e" + n]._rotation = enemies["e" + n]._rotation - ((enemies["e" + n]._rotation - angle) / 10);
}
}
}
}
function dofall() {
enem[n][12] = enem[n][12] + 0.5;
enemies["e" + n]._y = enemies["e" + n]._y + enem[n][12];
if (_root.thegame.col.lava.hitTest(_root.xoff + enemies["e" + n]._x, (_root.yoff + enemies["e" + n]._y) - 10, 1)) {
depth++;
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = enemies["e" + n]._x;
this.objectsfront["fire" + depth]._y = enemies["e" + n]._y - 10;
enemies["e" + n]._x = -1000;
enemies["e" + n].gotoAndStop(1);
}
}
function doburn() {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = enemies["e" + n]._x;
this.objectsfront["gold" + depth]._y = enemies["e" + n]._y;
flame = 0;
_root.rainbowing = _root.rainbowing - 1;
enem[n][10]--;
if (pep._x > enemies["e" + n]._x) {
enem[n][9] = enem[n][11];
enem[n][6] = 0;
} else {
enem[n][9] = -enem[n][11];
enem[n][6] = 0;
}
if (enem[n][10] > 0) {
enemies["e" + n].ani.gotoAndPlay("burn");
}
}
function doroll() {
if (enem[n][10] == 1) {
if (pep._x > (front["e" + n]._x - 500)) {
enem[n][10] = 0;
fx.gotoAndStop(7);
}
}
if (enem[n][10] == 0) {
if (enem[n][6] > 0.1) {
if (Math.abs(enem[n][6]) > 1) {
if ((pep._x > (front["e" + n]._x - 50)) && (pep._x < (front["e" + n]._x + 50))) {
if ((pep._y > (front["e" + n]._y - 50)) && (pep._y < (front["e" + n]._y + 50))) {
if (_root.invul <= 0) {
if ((pep._x < front["e" + n]._x) && (enem[n][7] == -1)) {
_root.ishit = -1;
}
if ((pep._x > front["e" + n]._x) && (enem[n][7] == 1)) {
_root.ishit = -1;
}
}
}
}
}
wpi = enem[n][3];
wpx = enemies["w" + wpi]._x;
wpy = enemies["w" + wpi]._y;
enem[n][6] = enem[n][6] * 0.996;
enem[n][5] = enem[n][5] * 0.996;
if (ways[n][enem[n][4] + 1] == -3) {
enem[n][12] = enem[n][12] + 0.25;
front["e" + n]._y = front["e" + n]._y + enem[n][12];
if (front["e" + n]._y > wpy) {
enem[n][0] = -99;
}
}
if (front["e" + n]._x > wpx) {
if (enem[n][7] == 1) {
fx.gotoAndStop(8);
}
front["e" + n].gotoAndStop(1);
enem[n][7] = -1;
} else {
if (enem[n][7] == -1) {
fx.gotoAndStop(8);
enem[n][5] = -enem[n][5];
}
front["e" + n].gotoAndStop(2);
enem[n][7] = 1;
}
radians = Math.atan2(front["e" + n]._y - wpy, front["e" + n]._x - wpx);
angle = (radians * 180) / Math.PI;
pox = Math.cos((angle * Math.PI) / 180);
poy = Math.sin((angle * Math.PI) / 180);
front["e" + n]._x = front["e" + n]._x - (pox * enem[n][6]);
front["e" + n]._y = front["e" + n]._y - (poy * enem[n][6]);
front["e" + n]._x = front["e" + n]._x - enem[n][9];
enem[n][9] = enem[n][9] * 0.9;
front["e" + n].ball._rotation = front["e" + n].ball._rotation - (enem[n][5] * 1.5);
if ((front["e" + n]._x > (wpx - 5)) && (front["e" + n]._x < (wpx + 5))) {
enem[n][4]++;
if (enem[n][4] >= ways[n].length) {
enem[n][4] = 0;
}
enem[n][3] = ways[n][enem[n][4]];
if (enem[n][3] < -1) {
enem[n][4] = -enem[n][3];
enem[n][3] = ways[n][enem[n][4]];
wpi = enem[n][3];
wpx = enemies["w" + wpi]._x;
wpy = enemies["w" + wpi]._y;
}
}
}
}
}
n = 1;
while (n < (maxe + 1)) {
if (enem[n][0] == -1) {
doroll();
}
if ((enem[n][0] > 0) && (enem[n][10] > 0)) {
if ((pep._x > (enemies["e" + n]._x - 600)) && (pep._x < (enemies["e" + n]._x + 600))) {
if (enem[n][3] != -1) {
dorun();
} else {
dofall();
}
if ((pep._x > (enemies["e" + n]._x - enem[n][8])) && (pep._x < (enemies["e" + n]._x + enem[n][8]))) {
if ((pep._y > (enemies["e" + n]._y - enem[n][8])) && (pep._y < (enemies["e" + n]._y + enem[n][8]))) {
enemies["e" + n].ani.gotoAndPlay("attack");
if (pep._x > enemies["e" + n]._x) {
_root.ishit = 1;
enem[n][9] = 10;
enem[n][6] = 0;
} else {
_root.ishit = -1;
enem[n][9] = -10;
enem[n][6] = 0;
}
}
}
isburn = 0;
if (_root.fireballing > 0) {
ew = enemies["e" + n]._width * 0.5;
eh = enemies["e" + n]._height;
i = 1;
while (i < 6) {
if (fireball[i] != 0) {
if ((firex[i] > (enemies["e" + n]._x - ew)) && (firex[i] < (enemies["e" + n]._x + ew))) {
if ((firey[i] > (enemies["e" + n]._y - eh)) && (firey[i] < enemies["e" + n]._y)) {
doburn();
depth++;
duplicateMovieClip (objectsfront.polahr, "obj" + depth, depth);
objectsfront["obj" + depth]._x = firex[i];
objectsfront["obj" + depth]._y = firey[i];
fx.gotoAndStop(6);
_root.fireballing--;
fire["fireball" + i]._x = -1000;
fireball[i] = 0;
}
}
}
i++;
}
}
if (_root.ghost > 0) {
eh = enemies["e" + n]._height;
if ((ghosty > ((enemies["e" + n]._y - eh) - 10)) && (ghosty < (enemies["e" + n]._y + 30))) {
if ((enemies["e" + n]._x > (ghostx - 40)) && (enemies["e" + n]._x < (ghostx + 40))) {
_root.ghost--;
doburn();
}
}
}
if (_root.rainbowing > 0) {
eh = enemies["e" + n]._height;
if ((pep._y > ((enemies["e" + n]._y - eh) - 20)) && (pep._y < (enemies["e" + n]._y + 30))) {
if (((rundir == -1) && (enemies["e" + n]._x > (pep._x - 350))) && (enemies["e" + n]._x < pep._x)) {
doburn();
}
if (((rundir == 1) && (enemies["e" + n]._x < (pep._x + 350))) && (enemies["e" + n]._x > pep._x)) {
doburn();
}
}
}
if (flame > 0) {
if ((pep._y > (enemies["e" + n]._y - enem[n][8])) && (pep._y < (enemies["e" + n]._y + enem[n][8]))) {
if ((((rundir == 1) && (px > (enemies["e" + n]._x - (100 * _root.flamelen)))) && (px < (enemies["e" + n]._x + 20))) or (((rundir == -1) && (px > (enemies["e" + n]._x - 20))) && (px < (enemies["e" + n]._x + (100 * _root.flamelen))))) {
doburn();
}
}
}
if (enem[n][10] <= 0) {
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = enemies["e" + n]._x;
this.objectsfront["gold" + depth]._y = enemies["e" + n]._y;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = enemies["e" + n]._x;
this.objectsfront["fire" + depth]._y = enemies["e" + n]._y - 10;
enemies["e" + n]._x = -1000;
enemies["e" + n].gotoAndStop(1);
}
}
}
n++;
}
function checkfireballs(nx, ny) {
washit = 0;
if (_root.fireballing > 0) {
ew = enemies["e" + n]._width * 0.5;
eh = enemies["e" + n]._height;
i = 1;
while (i < 6) {
if (fireball[i] != 0) {
if ((firex[i] > ((nx - 40) - extrax)) && (firex[i] < ((nx + 40) + extrax))) {
if ((firey[i] > (ny - 60)) && (firey[i] < (ny + 60))) {
depth++;
duplicateMovieClip (objectsfront.polahr, "obj" + depth, depth);
objectsfront["obj" + depth]._x = firex[i];
objectsfront["obj" + depth]._y = firey[i];
fx.gotoAndStop(6);
_root.fireballing--;
fire["fireball" + i]._x = -1000;
fireball[i] = 0;
washit = 1;
}
}
}
i++;
}
}
if (_root.rainbowing > 0) {
if ((pep._y > (ny - 60)) && (pep._y < (ny + 60))) {
if (((rundir == -1) && (nx > (pep._x - 350))) && (nx < pep._x)) {
washit = 1;
}
if (((rundir == 1) && (nx < (pep._x + 350))) && (nx > pep._x)) {
washit = 1;
}
}
}
}
extrax = 0;
n = 0;
while (n < 10) {
checker++;
if (checker > _root.count) {
checker = 1;
}
if (distance(ai[checker][1], ai[checker][2], px, py) < 360) {
if (ai[checker][0] < 11) {
if (ai[checker][0] == 1) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.truhe, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
this.objects["obj" + depth]._rotation = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
checkfireballs(ai[checker][1], ai[checker][2]);
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (flame > 0) {
if ((py > (ai[checker][2] - 40)) && (py < (ai[checker][2] + 10))) {
if ((((rundir == 1) && (px > (ai[checker][1] - (100 * _root.flamelen)))) && (px < (ai[checker][1] + 20))) or (((rundir == -1) && (px > (ai[checker][1] - 20))) && (px < (ai[checker][1] + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (washit == 1) {
this.objects["obj" + ai[checker][5]].gotoAndStop(2);
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = ai[checker][1];
this.objectsfront["gold" + depth]._y = ai[checker][2] - 50;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = ai[checker][1];
this.objectsfront["fire" + depth]._y = ai[checker][2] - 10;
ai[checker][4] = 0;
}
}
}
if ((ai[checker][0] > 1) && (ai[checker][0] < 8)) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront["crys" + (ai[checker][0] - 1)], "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 45)) && (py < (ai[checker][2] + 45))) {
if ((px > (ai[checker][1] - 45)) && (px < (ai[checker][1] + 45))) {
this.objectsfront["obj" + ai[checker][5]].gotoAndPlay(2);
_root.crystals++;
ai[checker][4] = 0;
}
}
}
}
if (ai[checker][0] == 8) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.nest, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
this.objectsfront["obj" + depth]._rotation = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((px > (ai[checker][1] - 80)) && (px < (ai[checker][1] + 80))) {
if ((py > (ai[checker][2] - 80)) && (py < (ai[checker][2] + 80))) {
rebirthx = ai[checker][1];
rebirthy = ai[checker][2];
rebirthstation = ai[checker][5];
this.objectsfront["obj" + ai[checker][5]].gotoAndPlay(2);
ai[checker][4] = 0;
}
}
}
}
if (ai[checker][0] == 9) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.sack, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
checkfireballs(ai[checker][1], ai[checker][2]);
if (flame > 0) {
if ((py > (ai[checker][2] - 40)) && (py < (ai[checker][2] + 10))) {
if ((((rundir == 1) && (px > (ai[checker][1] - (100 * _root.flamelen)))) && (px < (ai[checker][1] + 20))) or (((rundir == -1) && (px > (ai[checker][1] - 20))) && (px < (ai[checker][1] + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
this.objects["obj" + ai[checker][5]].gotoAndStop(2);
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = ai[checker][1];
this.objectsfront["gold" + depth]._y = ai[checker][2] - 50;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = ai[checker][1];
this.objectsfront["fire" + depth]._y = ai[checker][2] - 10;
ai[checker][4] = 0;
}
}
}
if (ai[checker][0] == 10) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.schneck, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
if ((px > (ai[checker][1] - 30)) && (px < (ai[checker][1] + 30))) {
if ((py > (ai[checker][2] - 50)) && (py < (ai[checker][2] - 5))) {
ai[checker][4] = -1;
g = 5;
jump = 1;
} else if ((py > (ai[checker][2] - 5)) && (py < (ai[checker][2] + 30))) {
if (px > ai[checker][1]) {
_root.ishit = 1;
} else {
_root.ishit = -1;
}
_root.lifes--;
}
}
if (px < (ai[checker][1] - 5)) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop(1);
}
if (px > (ai[checker][1] + 5)) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop(2);
}
if (px > (ai[checker][1] - 250)) {
if (getTimer() > ai[checker][6]) {
if (px < (ai[checker][1] - 5)) {
depth++;
duplicateMovieClip (objectsfront.slugblast, "blast" + depth, depth);
this.objectsfront["blast" + depth]._x = ai[checker][1] - 10;
this.objectsfront["blast" + depth]._y = ai[checker][2] - 10;
ai[checker][6] = getTimer() + 1500;
slugsound.gotoAndPlay(2);
}
}
}
checkfireballs(ai[checker][1], ai[checker][2]);
if (flame > 0) {
if ((py > (ai[checker][2] - 20)) && (py < (ai[checker][2] + 30))) {
if ((((rundir == 1) && (px > (ai[checker][1] - (100 * _root.flamelen)))) && (px < (ai[checker][1] + 20))) or (((rundir == -1) && (px > (ai[checker][1] - 20))) && (px < (ai[checker][1] + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
flame = 0;
ai[checker][4]--;
depth++;
this.objectsfront["obj" + ai[checker][5]].ani.gotoAndPlay("jump");
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = ai[checker][1];
this.objectsfront["gold" + depth]._y = ai[checker][2] - 50;
}
if (ai[checker][4] <= 0) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop("dead");
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = ai[checker][1];
this.objectsfront["gold" + depth]._y = ai[checker][2] - 50;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = ai[checker][1];
this.objectsfront["fire" + depth]._y = ai[checker][2] - 10;
}
}
}
}
if ((ai[checker][0] > 10) and (ai[checker][0] < 21)) {
if (ai[checker][0] == 11) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.bee, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
bx = this.objectsfront["obj" + ai[checker][5]]._x;
by = this.objectsfront["obj" + ai[checker][5]]._y;
if (px < bx) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop(1);
}
if (px > bx) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop(2);
}
checkfireballs(bx, by);
if (flame > 0) {
if ((py > (by - 40)) && (py < (by + 40))) {
if ((((rundir == 1) && (px > (bx - (100 * _root.flamelen)))) && (px < (bx + 20))) or (((rundir == -1) && (px > (bx - 20))) && (px < (bx + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
flame = 0;
ai[checker][4]--;
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx;
this.objectsfront["gold" + depth]._y = by - 50;
if (ai[checker][4] <= 0) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop("dead");
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx;
this.objectsfront["gold" + depth]._y = by - 50;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = bx;
this.objectsfront["fire" + depth]._y = by + 5;
}
}
}
}
if (ai[checker][0] == 12) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.bonusIce, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 55)) && (py < (ai[checker][2] + 55))) {
if ((px > (ai[checker][1] - 55)) && (px < (ai[checker][1] + 55))) {
this.objects["obj" + ai[checker][5]].gotoAndPlay(2);
_root.magicice = _root.magicice + 5;
ai[checker][4] = 0;
_parent.scoretable.gui.silver.fx.gotoAndPlay(2);
if (_root.tipblink == 1) {
_parent.scoretable.tipblink.gotoAndPlay(2);
}
}
}
}
}
if (ai[checker][0] == 13) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.jumper, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
this.objectsfront["obj" + depth]._rotation = ai[checker][5];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 45)) && (py < (ai[checker][2] + 45))) {
if ((px > (ai[checker][1] - 45)) && (px < (ai[checker][1] + 45))) {
this.objectsfront["obj" + ai[checker][5]].gotoAndPlay(2);
ypos = ypos + 10;
onejump = 1;
jump = 2;
g = 18;
pw.gotoAndStop("jump");
ani = 2;
waitsome = 5;
pep.ani.gotoAndPlay("jump");
ra = random(6) + 2;
pw.gotoAndStop(ra);
}
}
}
}
if (ai[checker][0] == 14) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.bonusLongfire, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 55)) && (py < (ai[checker][2] + 55))) {
if ((px > (ai[checker][1] - 55)) && (px < (ai[checker][1] + 55))) {
this.objects["obj" + ai[checker][5]].gotoAndPlay(2);
_root.longfire = 1;
_root.flamelen = 1.5;
ai[checker][4] = 0;
_parent.scoretable.gui.silver.fx.gotoAndPlay(2);
}
}
}
}
if (ai[checker][0] == 15) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (front.plats.fall, "obj" + depth, depth);
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
duplicateMovieClip (this.objectsfront.fall, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
this.objectsfront["obj" + depth].high = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
}
if ((ai[checker][0] > 15) && (ai[checker][0] < 19)) {
if (ai[checker][3] == 0) {
depth++;
if (ai[checker][0] == 16) {
duplicateMovieClip (front.plats.vase1, "obj" + depth, depth);
}
if (ai[checker][0] == 17) {
duplicateMovieClip (front.plats.vase2, "obj" + depth, depth);
}
if (ai[checker][0] == 18) {
duplicateMovieClip (front.plats.vase3, "obj" + depth, depth);
}
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
extrax = 32;
checkfireballs(ai[checker][1], ai[checker][2]);
if (flame > 0) {
if ((py > (ai[checker][2] - 40)) && (py < (ai[checker][2] + 40))) {
if ((((rundir == 1) && (px > (ai[checker][1] - 100))) && (px < (ai[checker][1] + 20))) or (((rundir == -1) && (px > (ai[checker][1] - 20))) && (px < (ai[checker][1] + 100)))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
this.front.plats["obj" + ai[checker][5]].gotoAndStop(2);
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = ai[checker][1];
this.objectsfront["gold" + depth]._y = ai[checker][2] - 50;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = ai[checker][1];
this.objectsfront["fire" + depth]._y = ai[checker][2] + 20;
ai[checker][4] = 0;
}
}
}
extrax = 0;
if (ai[checker][0] == 19) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (front.plats.away, "obj" + depth, depth);
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
if (ai[checker][4] == 1) {
if ((px > (ai[checker][1] - 54)) && (px < (ai[checker][1] + 54))) {
if ((py > (ai[checker][2] - 10)) && (py < (ai[checker][2] + 5))) {
if (this.front.plats["obj" + ai[checker][5]]._currentframe == 1) {
this.front.plats["obj" + ai[checker][5]].gotoAndPlay(2);
ai[checker][4] = 5;
}
}
}
}
if (ai[checker][4] > 1) {
ai[checker][4]--;
}
}
}
if (ai[checker][0] == 20) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (front.plats.woodbreak, "obj" + depth, depth);
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
this.front.plats["obj" + depth]._rotation = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
if ((((px > (ai[checker][1] - 30)) && (px < (ai[checker][1] + 30))) && (py > (ai[checker][2] - 25))) && (py < (ai[checker][2] + 15))) {
if (this.front.plats["obj" + ai[checker][5]]._currentframe < 39) {
this.front.plats["obj" + ai[checker][5]].play();
if (ai[checker][4] == 1) {
fx.gotoAndStop(5);
ai[checker][4] = 2;
}
}
} else {
this.front.plats["obj" + ai[checker][5]].stop();
ai[checker][4] = 1;
}
}
}
}
if ((ai[checker][0] > 20) && (ai[checker][0] < 31)) {
if (ai[checker][0] == 21) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.bonusheart, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 55)) && (py < (ai[checker][2] + 55))) {
if ((px > (ai[checker][1] - 55)) && (px < (ai[checker][1] + 55))) {
this.objects["obj" + ai[checker][5]].gotoAndPlay(2);
_root.lifes++;
ai[checker][4] = 0;
_parent.scoretable.gui.silver.fx.gotoAndPlay(2);
}
}
}
}
if (ai[checker][0] == 22) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (front.plats.box, "obj" + depth, depth);
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
this.front.plats["obj" + depth]._rotation = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
checkfireballs(this.front.plats["obj" + ai[checker][5]]._x, this.front.plats["obj" + ai[checker][5]]._y);
if (flame > 0) {
ai[checker][2] = this.front.plats["obj" + ai[checker][5]]._y;
if ((py > (ai[checker][2] - 40)) && (py < (ai[checker][2] + 40))) {
if ((((rundir == 1) && (px > (ai[checker][1] - 100))) && (px < (ai[checker][1] + 20))) or (((rundir == -1) && (px > (ai[checker][1] - 20))) && (px < (ai[checker][1] + 100)))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
if (calcboxes == 0) {
calcboxes = 5;
}
i = 1;
while (i < 7) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = ai[checker][1];
this.objectsfront["gold" + depth]._y = ai[checker][2] - 50;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = ai[checker][1];
this.objectsfront["fire" + depth]._y = ai[checker][2] + 2;
ai[checker][4] = 0;
this.front.plats["obj" + ai[checker][5]].gotoAndStop("done");
}
if (ai[checker][4] == 1) {
if (calcboxes > 0) {
calcboxes--;
this.front.plats["obj" + ai[checker][5]].gotoAndPlay(2);
}
}
}
}
if (ai[checker][0] == 23) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.pickel, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
bx = this.objectsfront["obj" + ai[checker][5]]._x;
by = this.objectsfront["obj" + ai[checker][5]]._y;
if ((px > (bx - 40)) && (px < (bx + 40))) {
if ((py > (by - 25)) && (py < (by + 25))) {
if (px > bx) {
_root.ishit = 1;
} else {
_root.ishit = -1;
}
}
}
}
}
if (ai[checker][0] == 25) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (this.front.plats.hoverupdown, "obj" + depth, depth);
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
this.front.plats["obj" + depth].high = ai[checker][4];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
}
if (ai[checker][0] == 26) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.vult, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
bx = this.objectsfront["obj" + ai[checker][5]]._x;
by = this.objectsfront["obj" + ai[checker][5]]._y;
checkfireballs(bx, by);
if (flame > 0) {
if ((py > (by - 40)) && (py < (by + 40))) {
if ((((rundir == 1) && (px > (bx - (100 * _root.flamelen)))) && (px < (bx + 20))) or (((rundir == -1) && (px > (bx - 20))) && (px < (bx + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
flame = 0;
ai[checker][4]--;
if (px < bx) {
this.objectsfront["obj" + ai[checker][5]].pushx = 20;
} else {
this.objectsfront["obj" + ai[checker][5]].pushx = -20;
}
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx;
this.objectsfront["gold" + depth]._y = by - 50;
if (ai[checker][4] <= 0) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop("dead");
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx;
this.objectsfront["gold" + depth]._y = by - 50;
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = bx;
this.objectsfront["fire" + depth]._y = by + 5;
}
}
}
}
if ((ai[checker][0] > 26) && (ai[checker][0] < 30)) {
if (ai[checker][3] == 0) {
depth++;
if (ai[checker][0] == 27) {
duplicateMovieClip (objects.coin1, "obj" + depth, depth);
}
if (ai[checker][0] == 28) {
duplicateMovieClip (objects.coin2, "obj" + depth, depth);
}
if (ai[checker][0] == 29) {
duplicateMovieClip (objects.coin3, "obj" + depth, depth);
}
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 45)) && (py < (ai[checker][2] + 45))) {
if ((px > (ai[checker][1] - 45)) && (px < (ai[checker][1] + 45))) {
this.objects["obj" + ai[checker][5]].gotoAndPlay(2);
if (ai[checker][0] == 27) {
_root.score = _root.score + 50;
}
if (ai[checker][0] == 28) {
_root.score = _root.score + 75;
}
if (ai[checker][0] == 29) {
_root.score = _root.score + 100;
}
ai[checker][4] = 0;
}
}
}
}
if (ai[checker][0] == 30) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (this.front.plats.hoverdown, "obj" + depth, depth);
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
this.front.plats["obj" + depth].high = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
}
}
if ((ai[checker][0] > 30) && (ai[checker][0] < 41)) {
if (ai[checker][0] == 31) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (this.front.plats.hoverup, "obj" + depth, depth);
this.front.plats["obj" + depth]._x = ai[checker][1];
this.front.plats["obj" + depth]._y = ai[checker][2];
this.front.plats["obj" + depth].high = -ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
}
if (ai[checker][0] == 32) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.bonusFire, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 55)) && (py < (ai[checker][2] + 55))) {
if ((px > (ai[checker][1] - 55)) && (px < (ai[checker][1] + 55))) {
this.objects["obj" + ai[checker][5]].gotoAndPlay(2);
_root.fireballs = _root.fireballs + 50;
weapon = 1;
_parent.scoretable.gui.firedisplay.gotoAndStop(2);
if (_root.fireballs >= 50) {
_parent.scoretable.gui.firedisplay._y = 0;
} else {
_parent.scoretable.gui.firedisplay._y = (50 - _root.fireballs) * 0.45;
}
ai[checker][4] = 0;
_parent.scoretable.gui.silver.fx.gotoAndPlay(2);
_parent.scoretable.gui.platte.icon2.gotoAndStop(2);
}
}
}
}
if (ai[checker][0] == 33) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.bonusrainbow, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 55)) && (py < (ai[checker][2] + 55))) {
if ((px > (ai[checker][1] - 55)) && (px < (ai[checker][1] + 55))) {
this.objects["obj" + ai[checker][5]].gotoAndPlay(2);
_root.rainbows = _root.rainbows + 50;
weapon = 2;
_parent.scoretable.gui.firedisplay.gotoAndStop(3);
if (_root.rainbows >= 50) {
_parent.scoretable.gui.firedisplay._y = 0;
} else {
_parent.scoretable.gui.firedisplay._y = (50 - _root.rainbows) * 0.45;
}
ai[checker][4] = 0;
_parent.scoretable.gui.silver.fx.gotoAndPlay(2);
_parent.scoretable.gui.platte.icon3.gotoAndStop(2);
if (_root.tipblink == 1) {
_parent.scoretable.tipblink.gotoAndPlay(2);
}
}
}
}
}
if (ai[checker][0] == 34) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (this.objectsfront.elevator, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
this.objectsfront["obj" + depth].high = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
}
if (ai[checker][0] == 35) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (this.objectsfront.elevatordown, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
this.objectsfront["obj" + depth].high = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
}
if (ai[checker][0] == 36) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (this.objectsfront.swing, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2] - 258;
this.objectsfront["obj" + depth].high = ai[checker][6];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
}
if (ai[checker][0] == 37) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objects.bonusball, "obj" + depth, depth);
this.objects["obj" + depth]._x = ai[checker][1];
this.objects["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] == 1) {
if ((py > (ai[checker][2] - 55)) && (py < (ai[checker][2] + 55))) {
if ((px > (ai[checker][1] - 55)) && (px < (ai[checker][1] + 55))) {
this.objects["obj" + ai[checker][5]].gotoAndPlay(2);
_root.guardian = _root.guardian + 3;
ai[checker][4] = 0;
_parent.scoretable.gui.silver.fx.gotoAndPlay(2);
_parent.scoretable.gui.platte.icon5.gotoAndStop(2);
}
}
}
}
if (ai[checker][0] == 38) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.stoney2l, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
bx = this.objectsfront["obj" + ai[checker][5]]._x;
by = this.objectsfront["obj" + ai[checker][5]]._y;
checkfireballs(bx, by);
if (flame > 0) {
if ((py > (by - 40)) && (py < (by + 40))) {
if ((((rundir == 1) && (px > (bx - (100 * _root.flamelen)))) && (px < (bx + 20))) or (((rundir == -1) && (px > (bx - 20))) && (px < (bx + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
flame = 0;
ai[checker][4]--;
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx;
this.objectsfront["gold" + depth]._y = by - 50;
if (ai[checker][4] <= 0) {
this.objectsfront["obj" + ai[checker][5]].gotoAndStop("dead");
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx;
this.objectsfront["gold" + depth]._y = by - 50;
i++;
}
depth++;
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = bx;
this.objectsfront["fire" + depth]._y = by + 5;
}
}
}
}
if (ai[checker][0] == 39) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.piranha, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
bx = this.objectsfront["obj" + ai[checker][5]]._x;
by = this.objectsfront["obj" + ai[checker][5]]._y;
checkfireballs(bx, by);
if (flame > 0) {
if ((py > (by - 40)) && (py < (by + 40))) {
if ((((rundir == 1) && (px > (bx - (100 * _root.flamelen)))) && (px < (bx + 20))) or (((rundir == -1) && (px > (bx - 20))) && (px < (bx + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (washit == 1) {
flame = 0;
depth++;
this.objectsfront["obj" + ai[checker][5]].gotoAndPlay("dead");
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = bx;
this.objectsfront["fire" + depth]._y = by + 5;
}
}
}
if (ai[checker][0] == 40) {
if (ai[checker][3] == 0) {
depth++;
duplicateMovieClip (objectsfront.gargoyle, "obj" + depth, depth);
this.objectsfront["obj" + depth]._x = ai[checker][1];
this.objectsfront["obj" + depth]._y = ai[checker][2];
ai[checker][3] = 1;
ai[checker][5] = depth;
}
if (ai[checker][4] > 0) {
bx = this.objectsfront["obj" + ai[checker][5]]._x;
by = this.objectsfront["obj" + ai[checker][5]]._y;
checkfireballs(bx, by);
if (flame > 0) {
if ((py > (by - 40)) && (py < (by + 40))) {
if ((((rundir == 1) && (px > (bx - (100 * _root.flamelen)))) && (px < (bx + 20))) or (((rundir == -1) && (px > (bx - 20))) && (px < (bx + (100 * _root.flamelen))))) {
washit = 1;
}
}
}
if (_root.ghost > 0) {
if ((ghosty > (ai[checker][2] - 60)) && (ghosty < (ai[checker][2] + 30))) {
if ((ghostx > (ai[checker][1] - 60)) && (ghostx < (ai[checker][1] + 60))) {
_root.ghost--;
washit = 1;
}
}
}
if (washit == 1) {
fx.gotoAndStop(9);
flame = 0;
ai[checker][4]--;
depth++;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx;
this.objectsfront["gold" + depth]._y = by - 25;
depth++;
duplicateMovieClip (objectsfront.polahr, "obj" + depth, depth);
objectsfront["obj" + depth]._x = (bx + random(50)) - 25;
objectsfront["obj" + depth]._y = (by + random(50)) - 25;
if (ai[checker][4] <= 0) {
this.objectsfront["obj" + ai[checker][5]].gotoAndPlay("dead");
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = bx;
this.objectsfront["fire" + depth]._y = by + 5;
}
}
}
if (ai[checker][4] <= 0) {
if (ai[checker][6] > 0) {
if (ai[checker][6] == 3) {
fx.gotoAndStop(9);
}
i = 1;
while (i < 3) {
depth++;
ai[checker][6]--;
duplicateMovieClip (objectsfront.gold, "gold" + depth, depth);
this.objectsfront["gold" + depth]._x = bx - ((9 - ai[checker][6]) * 10);
this.objectsfront["gold" + depth]._y = (by + (9 - ai[checker][6])) - 25;
i++;
}
depth++;
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = bx - ((9 - ai[checker][6]) * 10);
this.objectsfront["fire" + depth]._y = by + ((9 - ai[checker][6]) * 10);
}
}
}
}
}
n++;
}
flipit = flipit * -1;
if (flipit == 1) {
rebirthwait--;
if ((_root.isfalling == 0) && (rebirthwait < 0)) {
if (col.hitTest(screensizex + xoff, (screensizey + yoff) + 10, 1)) {
if (col.lava.hitTest(screensizex + xoff, (screensizey + yoff) + 10, 1)) {
pep.ani.gotoAndPlay("shocked");
ani = 4;
i = 1;
while (i < 5) {
depth++;
duplicateMovieClip (objectsfront.smoke, "smoke" + depth, depth);
this.objectsfront["smoke" + depth]._x = px - (random(50) - 25);
this.objectsfront["smoke" + depth]._y = py - (random(50) - 25);
i++;
}
duplicateMovieClip (objectsfront.fire, "fire" + depth, depth);
this.objectsfront["fire" + depth]._x = px;
this.objectsfront["fire" + depth]._y = py + 10;
fx.gotoAndStop(2);
_root.isfalling = 1;
speedx = speedx * 0.25;
inlava = 1;
_root.lifes--;
}
if (col.water.hitTest(screensizex + xoff, (screensizey + yoff) + 10, 1)) {
pep.ani.gotoAndPlay("shocked");
ani = 4;
depth++;
duplicateMovieClip (objectsfront.splash, "splash" + depth, depth);
this.objectsfront["splash" + depth]._x = px;
this.objectsfront["splash" + depth]._y = py;
this.objectsfront["splash" + depth].gotoAndPlay(2);
_root.isfalling = 1;
speedx = speedx * 0.25;
inlava = 1;
_root.lifes--;
}
if (col.fall.hitTest(screensizex + xoff, (screensizey + yoff) + 10, 1)) {
pep.ani.gotoAndPlay("shocked");
ani = 4;
inlava = 0;
_root.isfalling = 1;
speedx = speedx * 0.25;
_root.lifes--;
}
if (col.spikes.hitTest(screensizex + xoff, (screensizey + yoff) + 10, 1)) {
if (_root.invul <= 0) {
fx.gotoAndStop(3);
_root.invul = 75;
_root.ishit = 1;
}
}
}
}
if (exiter == 0) {
if ((pep._x > (exit._x - 30)) && (pep._x < (exit._x + 30))) {
if ((pep._y > (exit._y - 60)) && (pep._y < (exit._y + 60))) {
_parent.black.gotoAndPlay("in");
exiter = 1;
}
}
} else {
exiter++;
if (exiter > 16) {
gotoAndPlay ("nextlevel");
}
}
}
if (_root.fireballing > 0) {
i = 1;
while (i < 6) {
if (fireball[i] != 0) {
if (fireball[i] == -1) {
firex[i] = firex[i] - 10;
}
if (fireball[i] == 1) {
firex[i] = firex[i] + 10;
}
fireg[i] = fireg[i] - 0.2;
firey[i] = firey[i] - fireg[i];
fire["fireball" + i]._x = firex[i];
fire["fireball" + i]._y = firey[i];
if (front.hitTest((firex[i] + _x) + (6 * fireball[i]), firey[i] + _y, 1)) {
depth++;
duplicateMovieClip (objectsfront.polahr, "obj" + depth, depth);
objectsfront["obj" + depth]._x = firex[i] - (6 * fireball[i]);
objectsfront["obj" + depth]._y = firey[i];
fire["fireball" + i]._x = -1000;
fireball[i] = 0;
_root.fireballing--;
} else if ((((firex[i] < (pep._x - 300)) or (firex[i] > (pep._x + 300))) or (firey[i] < (pep._y - 300))) or (firey[i] > (pep._y + 300))) {
fire["fireball" + i]._x = -1000;
fireball[i] = 0;
_root.fireballing--;
}
}
i++;
}
}
if (_root.drawloaded == 1) {
i = 1;
while (i < 5) {
this["icem" + i]._x = this["icem" + i]._x - ((this["icem" + i]._x - _xmouse) / (3 * i));
this["icem" + i]._y = this["icem" + i]._y - ((this["icem" + i]._y - _ymouse) / (3 * i));
this["icem" + i].gotoAndStop(2);
i++;
}
if (_root.mouse == 1) {
if (linedraw == 0) {
drawx = _xmouse;
linedraw = 1;
i = 0;
while (i < 21) {
removeMovieClip(this.front.ice["ice" + i]);
i++;
}
mde = 0;
fx.gotoAndStop(4);
}
if (linedraw == 1) {
dis = distance(_xmouse, _ymouse, lastmx, lastmy);
if (dis > 16) {
mde++;
duplicateMovieClip (front.ice.ice, "ice" + mde, mde);
this.front.ice["ice" + mde]._x = _xmouse;
this.front.ice["ice" + mde]._y = _ymouse;
angle = (Math.atan2(_ymouse - lastmy, _xmouse - lastmx) / Math.PI) * 180;
this.front.ice["ice" + (mde - 1)]._rotation = angle;
this.front.ice["ice" + (mde - 1)].gotoAndPlay(2);
this.front.ice["ice" + (mde - 1)]._xscale = (dis / 16) * 100;
lastmx = _xmouse;
lastmy = _ymouse;
}
if (mde > 20) {
linedraw = 0;
_root.drawloaded = 0;
i = 1;
while (i < 5) {
this["icem" + i].gotoAndPlay(3);
i++;
}
}
}
}
}
if (linedraw == 1) {
if ((((_root._xmouse > 470) or (_root._xmouse < 1)) or (_root._ymouse > 310)) or (_root._ymouse < 10)) {
_root.drawloaded = 0;
linedraw = 0;
i = 1;
while (i < 5) {
this["icem" + i].gotoAndPlay(3);
i++;
}
}
if (_root.mouse == 0) {
_root.drawloaded = 0;
linedraw = 0;
i = 1;
while (i < 5) {
this["icem" + i].gotoAndPlay(3);
i++;
}
}
}
Symbol 1479 MovieClip Frame 10
gotoAndPlay ("engine");
Symbol 1479 MovieClip Frame 14
enem[1] = [3, 1, 0, 0, 0, 2, 0, 0, 25, 0, 3, 10, 0];
ways[1] = [1, 2, 3, 4, 3, 2];
enem[2] = [4, 1, 0, 0, 0, 6, 0, 0, 25, 0, 3, 10, 0];
ways[2] = [5, 6, 7, 8, 9, 10, -4];
enem[3] = [4, 1, 0, 0, 0, 6, 0, 0, 25, 0, 3, 10, 0];
ways[3] = [11, 12, 13, 14, 15, 16, 17, -5];
enem[4] = [4, 1, 0, 0, 0, 6, 0, 0, 25, 0, 3, 10, 0];
ways[4] = [18, 19, 20, 19];
enem[5] = [3, 1, 0, 0, 0, 2.5, 0, 0, 25, 0, 3, 10, 0];
ways[5] = [21, 22];
enem[6] = [3, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[6] = [21, 22];
enem[7] = [3, 1, 0, 0, 0, 2.5, 0, 0, 25, 0, 3, 10, 0];
ways[7] = [23, 24, 25, 24];
maxe = enem.length;
n = 1;
while (n < (maxe + 1)) {
enem[n][1] = enemies["e" + n]._x;
enem[n][2] = enemies["e" + n]._y;
enem[n][3] = ways[n][0];
n++;
}
drawx = 0;
_parent.music.gotoAndStop(3);
Symbol 1479 MovieClip Frame 15
call("engine");
Symbol 1479 MovieClip Frame 16
gotoAndPlay ("stage02");
Symbol 1479 MovieClip Frame 20
_root.gargoy = -212;
enem[1] = [5, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[1] = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2];
enem[2] = [4, 1, 0, 0, 0, 6, 0, 0, 25, 0, 3, 10, 0];
ways[2] = [7, 8, 9, 10, 11, 10, 9, 8];
enem[3] = [5, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[3] = [12, 13, 14, 15, 14, 13];
enem[4] = [5, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[4] = [16, 17, 18, 19, 20, 21, 22, -1];
enem[5] = [5, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[5] = [23, 24, 25];
enem[6] = [5, 1, 0, 0, 0, 3, 0, 0, 25, 0, 3, 10, 0];
ways[6] = [26, 27, 28, 29, 30, 31, -1];
enem[7] = [-1, 1, 0, 0, 0, 7, 7, 0, 25, 0, 1, 10, 0];
ways[7] = [26, 27, 28, 29, 30, 31, -3];
enem[8] = [4, 1, 0, 0, 0, 6, 0, 0, 25, 0, 3, 10, 0];
ways[8] = [32, 33, 34, 35, 34, 33];
enem[9] = [4, 1, 0, 0, 0, 6, 0, 0, 25, 0, 3, 10, 0];
ways[9] = [36, 37, 38, 39, 38, 37];
enem[10] = [4, 1, 0, 0, 0, 5.5, 0, 0, 25, 0, 3, 10, 0];
ways[10] = [36, 37, 38, 39, 38, 37];
enem[11] = [4, 1, 0, 0, 0, 5.5, 0, 0, 25, 0, 3, 10, 0];
ways[11] = [40, 41];
enem[12] = [6, 1, 0, 0, 0, 6, 0, 0, 25, 0, 7, 10, 0];
ways[12] = [42, 43, 44, 43];
enem[13] = [6, 1, 0, 0, 0, 6, 0, 0, 25, 0, 7, 10, 0];
ways[13] = [45, 46, 47, 48, 47, 46];
enem[14] = [6, 1, 0, 0, 0, 6, 0, 0, 25, 0, 7, 10, 0];
ways[14] = [49, 50];
maxe = enem.length;
n = 1;
while (n < (maxe + 1)) {
enem[n][1] = enemies["e" + n]._x;
enem[n][2] = enemies["e" + n]._y;
enem[n][3] = ways[n][0];
n++;
}
drawx = 0;
_parent.music.gotoAndStop(4);
Symbol 1479 MovieClip Frame 21
call("engine");
Symbol 1479 MovieClip Frame 22
gotoAndPlay ("stage03");
Symbol 1479 MovieClip Frame 45
_x = screensizex;
_y = centery;
var soff = 0;
_root.bonus = 0;
wait = 200;
var count = 10;
_parent.black.gotoAndStop("empty");
_parent.music.gotoAndStop(5);
Symbol 1479 MovieClip Frame 46
wait--;
if (wait < 20) {
soff++;
if (_parent.scoretable._y < 380) {
_parent.scoretable._y = _parent.scoretable._y + soff;
}
}
if (wait == 10) {
_parent.black.gotoAndPlay("fadein");
}
if (wait <= 0) {
if (_root.levels == 3) {
_parent.gotoAndStop("outro");
} else {
gotoAndPlay ("init");
}
}
count--;
if (count <= 0) {
if (_root.crystals > 0) {
_root.crystals--;
_root.bonus = _root.bonus + 50;
_root.score = _root.score + 50;
}
}
Symbol 1479 MovieClip Frame 47
gotoAndPlay ("waitnext");
Symbol 1489 Button
on (release) {
pressshort.nextFrame();
_parent.gotoAndPlay("out");
}
Symbol 1491 MovieClip Frame 1
stop();
Symbol 1491 MovieClip Frame 2
gotoAndStop (1);
Symbol 1501 Button
on (release) {
_root.magicice--;
_root.drawloaded = 1;
_parent._parent.gotoAndPlay("out");
_parent._parent.wav.gotoAndStop(4);
if (_root.magicice == 0) {
gotoAndStop (1);
}
}
Symbol 1502 MovieClip Frame 1
stop();
Symbol 1509 Button
on (release) {
if (_root.ghost <= 0) {
_root.ghost = 5;
_root.guardian--;
_parent._parent.gotoAndPlay("out");
_parent._parent._parent._parent.thegame.objects.ghost._x = _root.pepx;
_parent._parent._parent._parent.thegame.objects.ghost._y = _root.pepy;
if (_root.guardian == 0) {
gotoAndStop (1);
}
} else {
buzz.nextFrame();
}
}
Symbol 1511 MovieClip Frame 1
stop();
Symbol 1511 MovieClip Frame 2
gotoAndStop (1);
Symbol 1512 MovieClip Frame 1
stop();
Symbol 1517 MovieClip Frame 1
stop();
Symbol 1524 Button
on (release) {
_root.selectweapon = 2;
_parent._parent.gotoAndPlay("out");
}
Symbol 1525 MovieClip Frame 1
stop();
Symbol 1532 Button
on (release) {
_root.selectweapon = 1;
_parent._parent.gotoAndPlay("out");
}
Symbol 1533 MovieClip Frame 1
stop();
Symbol 1536 Button
on (release) {
_root.selectweapon = -1;
_parent._parent.gotoAndPlay("out");
}
Symbol 1569 MovieClip Frame 1
stop();
Symbol 1576 MovieClip Frame 1
stop();
Symbol 1577 Button
on (press) {
call("wait");
fade = -fade;
if (fade == 1) {
wav.gotoAndStop(3);
gotoAndPlay ("in");
}
if (fade == -1) {
wav.gotoAndStop(2);
gotoAndPlay ("out");
}
_root.tipblink = 0;
}
Symbol 1578 MovieClip Frame 1
stop();
Symbol 1578 MovieClip Frame 2
gotoAndStop (1);
Symbol 1578 MovieClip Frame 3
gotoAndStop (1);
Symbol 1578 MovieClip Frame 4
gotoAndStop (1);
Symbol 1579 MovieClip Frame 1
var fade = -1;
var faster = 1;
stop();
Symbol 1579 MovieClip Frame 2
fade = 1;
platte._y = platte._y - ((platte._y + 122) / 8);
Symbol 1579 MovieClip Frame 3
gotoAndPlay ("in");
Symbol 1579 MovieClip Frame 6
fade = -1;
platte._y = platte._y + faster;
faster = faster + 1;
if (platte._y > 170) {
gotoAndStop ("wait");
}
Symbol 1579 MovieClip Frame 7
gotoAndPlay ("out");
Symbol 1579 MovieClip Frame 9
if (_root.longfire == 1) {
platte.icon1.gotoAndStop(2);
}
if (_root.magicice > 0) {
platte.icon6.gotoAndStop(2);
}
Symbol 1583 MovieClip Frame 1
stop();
Symbol 1604 Button
on (release) {
ping.nextFrame();
_parent._parent.black.gotoAndPlay("fadein");
play();
}
Symbol 1605 MovieClip Frame 1
stop();
Symbol 1605 MovieClip Frame 10
_parent._parent.gotoAndPlay("start");
Symbol 1613 MovieClip Frame 1
var wait = 0;
var sin = 0;
var flmode = 0;
Symbol 1613 MovieClip Frame 2
if (flmode == 0) {
pep._y = pep._y - ((pep._y - -73.5) / 5);
if (pep._y <= -73) {
flmode = 1;
}
}
if (flmode == 1) {
sin = sin + 0.05;
pep._y = -73.5 + (Math.sin(sin) * 10);
}
Symbol 1613 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1623 MovieClip Frame 1
stop();
Symbol 1623 MovieClip Frame 2
gotoAndStop (1);
Symbol 1624 Button
on (release) {
but.nextFrame();
_parent.black.gotoAndPlay("fadein");
play();
}
Symbol 1625 MovieClip Frame 1
stop();
Symbol 1625 MovieClip Frame 10
_parent.gotoAndStop("start");