Frame 1
fscommand ("fullscreen", "true");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
Frame 11
stop();
Frame 12
play();
Frame 15
isgameover = false;
stop();
flute = new Sound();
flute.attachSound("softMusic");
flute.start(0, 100);
Instance of Symbol 99 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root._framesloaded >= 60) {
_root.gotoAndStop("complete");
}
}
Frame 16
isgameover = false;
stop();
Frame 28
gameMode = 20;
difficulty = "medium";
Frame 29
play();
Frame 30
chapter = 0;
currentChapter = 0;
tempScrb01 = 0;
tempScrb02 = 0;
tempScrb03 = 0;
tempScrb04 = 0;
scrb01 = 0;
scrb02 = 0;
scrb03 = 0;
scrb04 = 0;
scarabFound = false;
gemsNum = 0;
goldGemFound = 0;
blueGemFound = 0;
pinkGemFound = 0;
newLifeFound = false;
score = 0;
totalScore = 0;
tempScore = 0;
totalLives = 3;
SPupdate = 0;
HPupdate = 0;
IPupdate = 0;
chptr1 = false;
chptr2 = false;
chptr3 = false;
chptr4 = false;
chptr5 = false;
newPotion = false;
bonuses = 0;
myMusic = 1;
startedGame = 0;
portalOpp = 0;
puzzleDone = false;
invisibleON = 0;
wormDead = 0;
Frame 31
if (isgameover) {
gotoAndStop ("complete");
}
Frame 44
stop();
currentChapter = 0;
tab1.gotoAndStop(1);
tab2.gotoAndStop(2);
tab3.gotoAndStop(2);
tab4.gotoAndStop(2);
tab5.gotoAndStop(2);
if (chptr1) {
one.gotoAndStop(3);
}
if (chptr2) {
two.gotoAndStop(3);
}
if (chptr3) {
three.gotoAndStop(3);
}
if (chptr4) {
four.gotoAndStop(3);
}
if (chptr5) {
five.gotoAndStop(3);
}
_root.myMusic = 1;
tempHP = 0;
tempSP = 0;
tempIP = 0;
HmeterUpdate = 100;
SmeterUpdate = 100;
Frame 45
tab1.gotoAndStop(2);
tab2.gotoAndStop(1);
tab3.gotoAndStop(2);
tab4.gotoAndStop(2);
tab5.gotoAndStop(2);
stop();
Frame 46
tab1.gotoAndStop(2);
tab2.gotoAndStop(2);
tab3.gotoAndStop(1);
tab4.gotoAndStop(2);
tab5.gotoAndStop(2);
stop();
Frame 47
function changeMyMode() {
if (newSetting == "newEasy") {
gameMode = 35;
difficulty = "easy";
} else if (newSetting == "newMedium") {
gameMode = 20;
difficulty = "medium";
} else if (newSetting == "newHard") {
gameMode = 5;
difficulty = "Hard";
}
newSetting = "none";
gotoAndPlay ("settings");
}
tab1.gotoAndStop(2);
tab2.gotoAndStop(2);
tab3.gotoAndStop(2);
tab4.gotoAndStop(1);
tab5.gotoAndStop(2);
stop();
Instance of Symbol 307 MovieClip "badGuy" in Frame 47
onClipEvent (load) {
if (_root.difficulty == "easy") {
this.gotoAndStop(1);
} else if (_root.difficulty == "medium") {
this.gotoAndStop(2);
} else if (_root.difficulty == "hard") {
this.gotoAndStop(3);
}
}
Instance of Symbol 342 MovieClip "a1" in Frame 47
onClipEvent (enterFrame) {
if (_root.difficulty == "easy") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 342 MovieClip "a2" in Frame 47
onClipEvent (enterFrame) {
if (_root.difficulty == "medium") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 342 MovieClip "a3" in Frame 47
onClipEvent (enterFrame) {
if (_root.difficulty == "hard") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 48
tab1.gotoAndStop(2);
tab2.gotoAndStop(2);
tab3.gotoAndStop(2);
tab4.gotoAndStop(2);
tab5.gotoAndStop(1);
stop();
Frame 49
flute.setVolume(65);
Instance of Symbol 351 MovieClip in Frame 49
onClipEvent (load) {
myHint = random(4);
if (myHint == 0) {
this.gotoAndStop(5);
} else if (myHint == 1) {
this.gotoAndStop(4);
} else if (myHint == 2) {
this.gotoAndStop(3);
} else if (myHint == 3) {
this.gotoAndStop(2);
} else if (myHint == 4) {
this.gotoAndStop(1);
}
}
Frame 73
flute.setVolume(45);
Frame 98
flute.setVolume(30);
Frame 118
flute.setVolume(25);
Frame 142
flute.setVolume(20);
Frame 165
flute.setVolume(15);
Frame 203
flute.setVolume(10);
Frame 238
flute.stop();
flute.setVolume(100);
Frame 268
startedGame = 1;
if (chapter == 1) {
gotoAndStop ("begin1");
} else if (chapter == 2) {
gotoAndStop ("begin2");
} else if (chapter == 3) {
gotoAndStop ("begin3");
} else if (chapter == 4) {
gotoAndStop ("begin4");
} else if (chapter == 5) {
gotoAndStop ("begin5");
}
Frame 269
stop();
Frame 270
stop();
levelTune = new Sound();
levelTune.attachSound("fightJamz");
levelTune.setVolume(100);
levelTune.start(0, 100);
Instance of Symbol 482 MovieClip in Frame 270
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 271
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 3) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if ((!_local1["enemy" + i].meBlock) || (!_local1["enemy" + i].meSwing)) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
fadeMusic.gotoAndPlay(2);
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
if (faceRight) {
player._x = player._x - 3;
} else if (faceLeft) {
player._x = player._x + 3;
}
}
}
function allEnemyDead() {
if (enemyCount == 3) {
fadeMusic.gotoAndPlay(2);
movieStrips.gotoAndPlay(2);
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 3) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
stop();
tempScore = 0;
currentChapter = 1;
playerTargetX = player._x;
playerTargetY = player._y;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
iterations = 5;
HUD.staminaP = 0;
HUD.healthP = 0;
HUD.invisibleP = 0;
sceneDone = false;
gameOver = 0;
Instance of Symbol 463 MovieClip "enemy1" in Frame 271
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if (!_root.pauseGame) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 140)) && (!_root.playerHigh)) && (robberHealth > 55)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 140)) && (!_root.playerHigh)) && (robberHealth > 55)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (!_root.playerHigh) {
var robbersMove = random(45);
if ((robbersMove > 0) && (robbersMove <= 10)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
if (this.hitTest(_root.player)) {
_root.enemyAttack();
} else if ((robbersMove > 10) && (robbersMove < 22)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if ((robbersMove >= 22) && (robbersMove <= 26)) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
}
}
}
}
}
}
}
Instance of Symbol 463 MovieClip "enemy0" in Frame 271
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if (!_root.pauseGame) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if ((_x > (p._x + 140)) && ((!_root.playerHigh) && (robberHealth > 40))) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 140)) && (!_root.playerHigh)) && (robberHealth > 40)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (!_root.playerHigh) {
var robbersMove = random(45);
if ((robbersMove > 0) && (robbersMove <= 10)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
if (this.hitTest(_root.player)) {
_root.enemyAttack();
} else if ((robbersMove > 10) && (robbersMove < 22)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if ((robbersMove >= 22) && (robbersMove <= 26)) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
}
}
}
}
}
}
}
Instance of Symbol 463 MovieClip "enemy2" in Frame 271
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy2";
}
if (_x < 80) {
_x = 80;
} else if (_x > 480) {
_x = 480;
}
if (!_root.pauseGame) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if ((_x > (p._x + 140)) && (_root.playerHigh)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if ((_x < (p._x - 140)) && (_root.playerHigh)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (!_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (_root.playerHigh) {
var robbersMove = random(45);
if ((robbersMove > 0) && (robbersMove <= 18)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
if (this.hitTest(_root.player)) {
_root.enemyAttack();
} else if ((robbersMove > 18) && (robbersMove < 22)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if ((robbersMove >= 22) && (robbersMove <= 26)) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 271
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if (_x > 520) {
_x = 520;
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
}
Instance of Symbol 573 MovieClip in Frame 271
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 271
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 271
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 271
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Frame 272
stop();
Frame 273
stop();
chptr1 = true;
Instance of Symbol 635 MovieClip in Frame 273
onClipEvent (load) {
_root.myReaction = random(30);
if (_root.myReaction > 26) {
this.gotoAndPlay(2);
}
}
Instance of Symbol 636 MovieClip "fadeOut" in Frame 273
/* no clip actions */
Frame 274
stop();
Frame 275
stop();
levelTune = new Sound();
levelTune.attachSound("fightJamz2");
levelTune.setVolume(100);
if (myMusic) {
levelTune.start(0, 100);
}
Instance of Symbol 482 MovieClip in Frame 275
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 276
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
fadeMusic.gotoAndPlay(2);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
stop();
tempScore = 0;
currentChapter = 2;
playerTargetX = player._x;
playerTargetY = player._y;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 735 MovieClip "enemy0" in Frame 276
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 735 MovieClip "enemy1" in Frame 276
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 276
onClipEvent (enterFrame) {
if (_x < 50) {
_x = 50;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 490) && (_root.sceneDone == true)) {
_x = 50;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
}
Instance of Symbol 573 MovieClip in Frame 276
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 276
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 276
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 276
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Frame 277
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
fadeMusic.gotoAndPlay(2);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 3) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
Hpotions._visible = 0;
newPotion = true;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
highKick = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 757 MovieClip "bonus" in Frame 277
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true) == true) {
this.gotoAndStop(2);
this._name = "empty";
if (_root.difficulty == "easy") {
this.bonusAmount.gotoAndStop(1);
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
} else if (_root.difficulty == "medium") {
this.bonusAmount.gotoAndStop(2);
_parent.tempScore = _parent.tempScore + 5000;
_parent.score = _parent.score + 5000;
} else if (_root.difficulty == "hard") {
this.bonusAmount.gotoAndStop(3);
_parent.tempScore = _parent.tempScore + 10000;
_parent.score = _parent.score + 10000;
}
}
}
Instance of Symbol 735 MovieClip "enemy0" in Frame 277
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 758 MovieClip "enemy1" in Frame 277
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 277
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 277
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP++;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate++;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 277
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 277
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 277
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 277
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 482 MovieClip in Frame 277
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 278
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
if (_local1.Boss.hitTest(player)) {
if (_local1.Boss.meBlock || (_local1.Boss.meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1.Boss._x = _local1.Boss._x - (_local1.Boss.dx * 5);
}
if (!_local1.Boss.meBlock) {
_local1.Boss.gotoAndStop(5);
_local1.Boss.meHit;
}
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - 15;
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
fadeMusic.gotoAndPlay(2);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if ((enemyCount == 1) && (blueGemFound == 1)) {
fadeMusic.gotoAndPlay(2);
movieStrips.gotoAndPlay(2);
}
}
function gameIsOver() {
if (!sceneDone) {
gameOverScreen.gotoAndPlay(2);
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
newPotion = true;
duplicateMovieClip (Hpotion, "healthPotion", 5);
healthPotion._x = crateBroke._x;
healthPotion._y = crateBroke._y - 15;
}
function findGem() {
duplicateMovieClip (gem, "newGem", 10);
newGem._x = dead._x;
newGem._y = dead._y - 50;
}
stop();
Hpotions._visible = 0;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
playerTargetX = player._x;
playerTargetY = player._y;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
highKick = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 793 MovieClip "Boss" in Frame 278
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "Boss";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 50)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 50)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 278
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.HPupdate = _root.HUD.healthP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
}
Instance of Symbol 798 MovieClip "crate" in Frame 278
onClipEvent (load) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(5);
if (potionChance > 2) {
_root.newPotion = true;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this._name = "crateBroke";
this.gotoAndStop(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 278
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate++;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 278
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
}
}
Instance of Symbol 805 MovieClip "gem" in Frame 278
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.blueGemFound = 1;
_root.blueGem._visible = 1;
this.gotoAndPlay(2);
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 278
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 278
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 278
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 482 MovieClip in Frame 278
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 279
stop();
removeMovieClip(_root.healthPotion);
player._name = "actor";
actor.gotoAndStop(1);
chptr2 = true;
Frame 280
stop();
levelTune = new Sound();
levelTune.attachSound("fightJamz2");
levelTune.setVolume(100);
if (myMusic) {
levelTune.start(0, 100);
}
Instance of Symbol 835 MovieClip in Frame 280
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 798 MovieClip in Frame 280
onClipEvent (load) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(5);
if (potionChance > 2) {
_root.newPotion = true;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this._name = "crateBroke";
this.gotoAndStop(2);
}
}
Instance of Symbol 482 MovieClip in Frame 280
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 281
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = crateBroke._x;
healthPotion._y = crateBroke._y - 50;
}
}
stop();
tempScore = 0;
currentChapter = 3;
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 837 MovieClip "enemy0" in Frame 281
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 837 MovieClip "enemy1" in Frame 281
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 281
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 281
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 281
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 281
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 281
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 281
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Frame 282
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 3) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
brokenStuff = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 869 MovieClip "enemy0" in Frame 282
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 230) {
_y = (_y + 10);
this.gotoAndStop(7);
if (_y > 430) {
this._y = 500;
}
} else if (_x > 420) {
_x = 420;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 300)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 300)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 869 MovieClip "enemy1" in Frame 282
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 230) {
_y = (_y + 10);
this.gotoAndStop(7);
if (_y > 430) {
this._y = 500;
}
} else if (_x > 375) {
_x = 375;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 300)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 300)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 282
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 540) && (_root.sceneDone == false)) {
_x = 540;
} else if ((_x > 540) && (_root.sceneDone == true)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 450) {
_y = 450;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 573 MovieClip in Frame 282
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 282
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 282
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 282
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 482 MovieClip in Frame 282
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 283
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 3) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
brokenStuff = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 886 MovieClip "vase" in Frame 283
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this._name = "vaseBroke";
this.gotoAndStop(2);
}
}
Instance of Symbol 869 MovieClip "enemy0" in Frame 283
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 150) {
_x = 150;
} else if (_x > 385) {
_x = 385;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 300)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 300)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 60)) || (_x >= (p._x - 60))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 869 MovieClip "enemy1" in Frame 283
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 150) {
_x = 150;
} else if (_x > 385) {
_x = 385;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 300)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 300)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 283
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 540) && (_root.sceneDone == false)) {
_x = 540;
} else if (((_x > 540) && (_root.sceneDone == true)) && (_y > 200)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 450) {
_y = 450;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 573 MovieClip in Frame 283
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 283
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 283
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 283
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 890 MovieClip "scarabPiece1" in Frame 283
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.scarabFound) {
this.gotoAndStop(3);
}
}
}
Instance of Symbol 482 MovieClip in Frame 283
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 284
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 1) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (itemsBroken == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Spotion, "staminaPotion", 5);
newPotion = false;
staminaPotion._x = crateBroke._x;
staminaPotion._y = crateBroke._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
itemsBroken = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 898 MovieClip in Frame 284
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 798 MovieClip in Frame 284
onClipEvent (load) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(5);
if (potionChance > 3) {
_root.newPotion = true;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this._name = "crateBroke";
this.gotoAndStop(2);
}
}
Instance of Symbol 898 MovieClip in Frame 284
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 837 MovieClip "enemy0" in Frame 284
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 390) {
_x = 390;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 284
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 500) && (_root.sceneDone == false)) {
_x = 500;
} else if ((_x > 420) && (_root.sceneDone == true)) {
_x = 420;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.movieStrips.gotoAndPlay(2);
gotoAndStop (285);
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
}
Instance of Symbol 899 MovieClip "Spotion" in Frame 284
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.staminaP = _root.HUD.staminaP + 1;
_root.HUD.potionS.gotoAndPlay(2);
_root.tempSP++;
_root.SPupdate = _root.SPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 284
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 284
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 284
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 284
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 482 MovieClip in Frame 284
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 285
stop();
chptr3 = true;
Instance of Symbol 915 MovieClip "player" in Frame 285
onClipEvent (enterFrame) {
if (_x < 50) {
_x = 50;
}
if ((_x > 490) && (_root.sceneDone == false)) {
_x = 490;
} else if ((_x > 490) && (_root.sceneDone == true)) {
_x = 50;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.removeMovieClip("healthPotion");
_root.removeMovieClip("staminaPotion");
_root.removeMovieClip("invisiblityPotion");
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Frame 286
stop();
levelTune = new Sound();
levelTune.attachSound("fightJamz4");
levelTune.setVolume(100);
if (myMusic) {
levelTune.start(0, 100);
}
Instance of Symbol 482 MovieClip in Frame 286
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 287
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 3) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 3) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 3) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
stop();
tempScore = 0;
currentChapter = 4;
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 946 MovieClip "enemy0" in Frame 287
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 35;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 35) {
_x = 35;
} else if (_x > 180) {
_x = 180;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 60)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 60)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 946 MovieClip "enemy1" in Frame 287
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 35;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 245) {
_x = 245;
} else if (_x > 500) {
_x = 500;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 30)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 30)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 946 MovieClip "enemy2" in Frame 287
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 35;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy2";
}
if (_x < 250) {
_x = 250;
} else if (_x > 500) {
_x = 500;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 40)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 40)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 287
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 65;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_root.FX.gotoAndStop(2);
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 573 MovieClip in Frame 287
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 287
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 287
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 287
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Frame 288
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 1) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
scarabFound = true;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 962 MovieClip in Frame 288
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.puzzleDone != true)) {
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.removeMovieClip("healthPotion");
_root.removeMovieClip("staminaPotion");
_root.removeMovieClip("invisiblityPotion");
_root.gotoAndStop("candleP");
}
}
Instance of Symbol 963 MovieClip "enemy0" in Frame 288
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_root.puzzleDone && (_root.wormDead)) {
this.gotoAndStop(8);
_root.sceneDone = true;
_root.continueMC.gotoAndStop(2);
} else {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 420) {
_x = 420;
} else if (_x > 530) {
_x = 530;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 288
onClipEvent (load) {
if (_root.puzzleDone == true) {
_y = 365;
_x = 150;
}
}
onClipEvent (enterFrame) {
if (_x < 65) {
_x = 65;
}
if ((_x > 540) && (_root.sceneDone == false)) {
_x = 540;
} else if (((_x > 540) && (_root.sceneDone == true)) && (_y > 200)) {
_x = 540;
} else if (((_x > 540) && (_root.sceneDone == true)) && (_y < 300)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_root.FX.gotoAndStop(2);
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 288
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 288
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 288
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 288
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 288
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 966 MovieClip "scarabPiece4" in Frame 288
onClipEvent (load) {
if (_root.scrb04) {
this._name = "done";
this._visible = 0;
}
}
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true)) {
if (_root.scarabFound) {
this.gotoAndStop(3);
}
}
}
Instance of Symbol 482 MovieClip in Frame 288
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 289
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
ship.gotoAndPlay(2);
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
healthPotion._x = bossDead._x;
healthPotion._y = bossDead._y - 80;
newPotion = false;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = true;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 979 MovieClip in Frame 289
onClipEvent (load) {
myLightning = random(5);
if (myLightning < 3) {
this.gotoAndStop(2);
}
}
Instance of Symbol 1016 MovieClip "enemy1" in Frame 289
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
_root.newPotions = true;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
_root.newPotions = true;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 235) {
_x = 235;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 946 MovieClip "enemy0" in Frame 289
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 420) {
_x = 420;
} else if (_x > 530) {
_x = 530;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 289
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.nextFrame();
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
gotoAndStop (290);
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_root.FX.gotoAndStop(2);
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 289
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 289
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 289
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 289
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 289
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 482 MovieClip in Frame 289
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 1026 MovieClip "portal" in Frame 289
onClipEvent (enterFrame) {
if ((_root.player.hitTest(this._x, this._y, true) == true) && (_root.portalOpp == 1)) {
stopAllSounds();
removeMovieClip(_root.healthPotion);
_root.gotoAndStop("introGhost");
}
}
Frame 290
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 1) {
chptr4 = true;
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Spotion, "staminaPotion", 5);
staminaPotion._x = crateBroke._x;
staminaPotion._y = crateBroke._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.invisibilityMeter._yscale = 0;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
brokenStuff = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 898 MovieClip in Frame 290
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 798 MovieClip in Frame 290
onClipEvent (load) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(20);
if (potionChance > 12) {
_root.newPotion = true;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this._name = "crateBroke";
this.gotoAndStop(2);
}
}
Instance of Symbol 946 MovieClip "enemy0" in Frame 290
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 35;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 40) {
_x = 40;
} else if (_x > 400) {
_x = 400;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 60)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 60)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 290
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
stopAllSounds();
_root.gotoAndStop("chapters");
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_root.FX.gotoAndStop(2);
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 899 MovieClip "Spotion" in Frame 290
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.staminaP = _root.HUD.staminaP + 1;
_root.HUD.potionS.gotoAndPlay(2);
_root.tempSP++;
_root.SPupdate = _root.SPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 290
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 290
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 290
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 290
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 482 MovieClip in Frame 290
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 291
stop();
portalOpp = 0;
myMusic = 1;
Frame 292
stop();
portalOpp = 0;
myMusic = 1;
Frame 293
stop();
levelTune = new Sound();
levelTune.attachSound("fightJamz2");
levelTune.setVolume(100);
if (myMusic) {
levelTune.start(0, 100);
}
Instance of Symbol 1057 MovieClip in Frame 293
onClipEvent (load) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(5);
if (potionChance > 3) {
_root.newPotion = true;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this._name = "barrelBroke";
this.gotoAndStop(2);
_root.bonusPotions();
}
}
Instance of Symbol 482 MovieClip in Frame 293
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 294
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
sceneDone = true;
continueMC.gotoAndStop(2);
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = barrelBroke._x;
healthPotion._y = barrelBroke._y - 50;
}
}
stop();
currentChapter = 4;
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 1086 MovieClip "enemy0" in Frame 294
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 65;
} else if (_root.difficulty == "medium") {
var robberHealth = 85;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 227) {
_x = 227;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 1086 MovieClip "enemy1" in Frame 294
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 65;
} else if (_root.difficulty == "medium") {
var robberHealth = 85;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 250) {
_x = 250;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 294
onClipEvent (enterFrame) {
if (_x < 50) {
_x = 50;
}
if ((_x > 540) && (_root.sceneDone == false)) {
_x = 540;
} else if ((_x > 540) && (_root.sceneDone == true)) {
_x = 30;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 294
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 294
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 294
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 294
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 294
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Frame 295
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 3) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = barrelBroke._x;
healthPotion._y = barrelBroke._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
brokenStuff = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 979 MovieClip in Frame 295
onClipEvent (load) {
myLightning = random(5);
if (myLightning < 3) {
this.gotoAndStop(2);
}
}
Instance of Symbol 1057 MovieClip in Frame 295
onClipEvent (load) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(5);
if (potionChance > 3) {
_root.newPotion = true;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this._name = "barrelBroke";
this.gotoAndStop(2);
}
}
Instance of Symbol 1091 MovieClip in Frame 295
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
this._name = "broke";
}
}
Instance of Symbol 1086 MovieClip "enemy0" in Frame 295
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 65;
} else if (_root.difficulty == "medium") {
var robberHealth = 85;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 1086 MovieClip "enemy1" in Frame 295
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 65;
} else if (_root.difficulty == "medium") {
var robberHealth = 85;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 295
onClipEvent (enterFrame) {
if (_x < 30) {
_x = 30;
}
if ((_x > 540) && (_root.sceneDone == false)) {
_x = 540;
} else if ((_x > 540) && (_root.sceneDone == true)) {
_x = 30;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 450) {
_y = 450;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 295
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 295
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 295
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 295
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 295
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 482 MovieClip in Frame 295
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 296
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 1) {
portal.gotoAndStop(2);
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Ipotion, "invisiblePotion", 5);
newPotion = false;
invisiblePotion._x = dead._x;
invisiblePotion._y = dead._y - 50;
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = true;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
brokenStuff = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 1098 MovieClip in Frame 296
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 1091 MovieClip in Frame 296
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
this._name = "broke";
}
}
Instance of Symbol 1123 MovieClip "enemy0" in Frame 296
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 65;
} else if (_root.difficulty == "medium") {
var robberHealth = 75;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 390) {
_x = 390;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 20)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 20)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 296
onClipEvent (enterFrame) {
if (_x < 30) {
_x = 30;
}
if ((_x > 480) && (_root.sceneDone == false)) {
_x = 480;
} else if ((_x > 480) && (_root.sceneDone == true)) {
_x = 480;
_root.sceneDone = false;
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_root.FX.gotoAndStop(2);
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 1125 MovieClip "Ipotion" in Frame 296
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.invisibleP = _root.HUD.invisibleP + 1;
_root.HUD.potionI.gotoAndPlay(2);
_root.tempIP++;
_root.IPupdate = _root.IPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 573 MovieClip in Frame 296
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
_root.allEnemyDead();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 296
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 296
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 296
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 1128 MovieClip "scarabPiece2" in Frame 296
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.scarabFound) {
this.gotoAndStop(3);
}
}
}
Instance of Symbol 1026 MovieClip "portal" in Frame 296
onClipEvent (enterFrame) {
if ((_root.player.hitTest(this._x, this._y, true) == true) && (_root.portalOpp == 1)) {
stopAllSounds();
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.invisiblePotion);
removeMovieClip(_root.staminaPotion);
_root.gotoAndStop("leaveGhost");
}
}
Instance of Symbol 482 MovieClip in Frame 296
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 297
stop();
Frame 298
stop();
Frame 299
function checkCandles() {
if (candlesLit == 6) {
if (myArray eq ["c3", "c4", "c6", "c5", "c2", "c1"]) {
gotoAndPlay (299);
} else {
goAgain.gotoAndStop(2);
}
}
}
stop();
myArray = new Array();
puzzleAnswer = ["c3", "c4", "c6", "c5", "c2", "c1"];
candlesLit = 0;
Frame 356
stop();
Frame 357
stop();
Instance of Symbol 482 MovieClip in Frame 357
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 358
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
if (_local1.Boss.hitTest(player)) {
if (_local1.Boss.meBlock || (_local1.Boss.meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1.Boss._x = _local1.Boss._x - (_local1.Boss.dx * 5);
}
if (!_local1.Boss.meBlock) {
_local1.Boss.gotoAndStop(5);
_local1.Boss.meHit;
}
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 3) {
player.gotoAndStop(12);
fadeMusic.gotoAndPlay(2);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 1) {
stoneGoblin.gotoAndPlay(2);
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
stop();
currentChapter = 4;
playerTargetX = player._x;
playerTargetY = player._y;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 1244 MovieClip in Frame 358
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true) == true) {
this.gotoAndStop(2);
this._name = "empty";
if (_root.difficulty == "easy") {
this.bonusAmount.gotoAndStop(1);
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
} else if (_root.difficulty == "medium") {
this.bonusAmount.gotoAndStop(2);
_parent.tempScore = _parent.tempScore + 5000;
_parent.score = _parent.score + 5000;
} else if (_root.difficulty == "hard") {
this.bonusAmount.gotoAndStop(3);
_parent.tempScore = _parent.tempScore + 10000;
_parent.score = _parent.score + 10000;
}
}
}
Instance of Symbol 1244 MovieClip in Frame 358
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true) == true) {
this.gotoAndStop(2);
this._name = "empty";
if (_root.difficulty == "easy") {
this.bonusAmount.gotoAndStop(1);
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
} else if (_root.difficulty == "medium") {
this.bonusAmount.gotoAndStop(2);
_parent.tempScore = _parent.tempScore + 5000;
_parent.score = _parent.score + 5000;
} else if (_root.difficulty == "hard") {
this.bonusAmount.gotoAndStop(3);
_parent.tempScore = _parent.tempScore + 10000;
_parent.score = _parent.score + 10000;
}
}
}
Instance of Symbol 1244 MovieClip in Frame 358
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true) == true) {
this.gotoAndStop(2);
this._name = "empty";
if (_root.difficulty == "easy") {
this.bonusAmount.gotoAndStop(1);
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
} else if (_root.difficulty == "medium") {
this.bonusAmount.gotoAndStop(2);
_parent.tempScore = _parent.tempScore + 5000;
_parent.score = _parent.score + 5000;
} else if (_root.difficulty == "hard") {
this.bonusAmount.gotoAndStop(3);
_parent.tempScore = _parent.tempScore + 10000;
_parent.score = _parent.score + 10000;
}
}
}
Instance of Symbol 1262 MovieClip "Boss" in Frame 358
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "Boss";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if ((!_root.pauseGame) && (_name != "dead")) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 10)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 10)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 358
onClipEvent (enterFrame) {
if ((_x < 50) && (_root.sceneDone != true)) {
_x = 50;
} else if ((_x < 50) && (_root.sceneDone == true)) {
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
if (_root.myMusic == 1) {
_root.levelTune = new Sound();
_root.levelTune.attachSound("fightJamz4");
_root.levelTune.setVolume(100);
_root.levelTune.start(0, 100);
}
_root.puzzleDone = true;
_root.gotoAndStop("secretCave");
}
if (_x > 450) {
_x = 450;
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 1264 MovieClip "newLife" in Frame 358
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true)) {
if (_root.newLifeFound) {
this.gotoAndStop(3);
}
}
}
Instance of Symbol 573 MovieClip in Frame 358
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 358
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 358
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 358
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Frame 359
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 3) {
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function playerInvisible() {
if (invisibleON) {
if (HUD.invisibilityMeter._yscale > 0) {
player._alpha = 45;
HUD.invisibilityMeter._yscale = HUD.invisibilityMeter._yscale - 0.1;
} else if (HUD.invisibilityMeter._yscale <= 0) {
HUD.invisibilityMeter._yscale = 0;
player._alpha = 100;
invisibleON = 0;
}
}
}
function newDart() {
if (timeSinceLastDart > 20) {
if (Math.random() < 0.2) {
lastDart++;
attachMovie("dart", "dart" + lastDart, lastDart);
_root["dart" + lastDart]._x = spitter._x;
_root["dart" + lastDart]._y = spitter._y;
timeSinceLastDart = 0;
}
}
timeSinceLastDart++;
}
function moveDart() {
var _local1 = _root;
i = firstDart;
while (i <= lastDart) {
x = _local1["dart" + i]._x - 6;
y = _local1["dart" + i]._y + 10;
if (y > 380) {
removeDart(i);
} else if (player.hitTest(_local1["dart" + i]._x, _local1["dart" + i]._y, true)) {
removeDart(i);
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 3) {
player.gotoAndStop(12);
gameOver = 1;
gameOverScreen.gotoAndPlay(2);
}
} else {
_local1["dart" + i]._y = y;
_local1["dart" + i]._x = x;
}
i++;
}
}
function removeDart(n) {
_root["dart" + n].removeMovieClip();
firstDart = n + 1;
}
function removeAll() {
var _local1 = _root;
i = firstDart;
while (i <= lastDart) {
_local1["dart" + i].removeMovieClip();
i++;
}
}
stop();
levelTune = new Sound();
levelTune.attachSound("fightJamz2");
levelTune.setVolume(100);
if (myMusic) {
levelTune.start(0, 100);
}
hint.gotoAndStop(2);
tempScore = 0;
currentChapter = 5;
playerTargetX = player._x;
playerTargetY = player._y;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.invisibilityMeter._yscale = 0;
HUD.myLives = totalLives - 1;
HUD.invisibleP = IPupdate;
HUD.healthP = HPupdate;
HUD.staminaP = SPupdate;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 1;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
ImeterUpdate = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
firstDart = 1;
lastDart = 0;
timeSinceLastDart = 0;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
iterations = 5;
sceneDone = true;
gameOver = 0;
Instance of Symbol 550 MovieClip "player" in Frame 359
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.sceneDone = false;
_root.removeAll();
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.ImeterUpdate = _root.HUD.invisibilityMeter._yscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
removeMovieClip(_root.invisiblePotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
}
Instance of Symbol 573 MovieClip in Frame 359
onClipEvent (enterFrame) {
if ((!_root.pauseGame) && (_root.gameOver != 1)) {
_root.playerMove();
_root.playerFight();
_root.playerInvisible();
_root.newDart();
_root.moveDart();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 359
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 359
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 359
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 1273 MovieClip "scarabPiece3" in Frame 359
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.scarabFound) {
this.gotoAndStop(3);
}
}
}
Frame 360
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 2) {
caveHole.gotoAndPlay(2);
}
}
function throwFlame() {
duplicateMovieClip (flameOut, "flameOn", 20);
flameOn._x = player._x;
flameOn._y = 345;
flameOn.gotoAndPlay(2);
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 3) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
function playerInvisible() {
if (invisibleON) {
if (HUD.invisibilityMeter._yscale > 0) {
player._alpha = 45;
HUD.invisibilityMeter._yscale = HUD.invisibilityMeter._yscale - 0.1;
} else if (HUD.invisibilityMeter._yscale <= 0) {
HUD.invisibilityMeter._yscale = 0;
player._alpha = 100;
invisibleON = 0;
}
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.invisibilityMeter._yscale = ImeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
brokenStuff = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
if (invisibleON) {
sceneDone = true;
} else {
sceneDone = false;
}
gameOver = 0;
Instance of Symbol 1320 MovieClip "enemy0" in Frame 360
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 1320 MovieClip "enemy1" in Frame 360
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 60) {
_x = 60;
} else if (_x > 480) {
_x = 480;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 360
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.ImeterUpdate = _root.HUD.invisibilityMeter._yscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 400) {
_y = 400;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 1323 MovieClip "flameOut" in Frame 360
onClipEvent (enterFrame) {
_name = "flameOn";
if ("flameOn" && (!_root.Jumping)) {
_x = _root.player._x;
} else {
_x = 345;
}
}
Instance of Symbol 573 MovieClip in Frame 360
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.playerInvisible();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 360
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 360
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 360
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 1273 MovieClip "scarabPiece3" in Frame 360
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.scarabFound) {
this.gotoAndStop(3);
}
}
}
Frame 361
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if ((enemyCount == 1) && (pinkGemFound == 1)) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function findGem() {
duplicateMovieClip (gem, "newGem", 10);
newGem._x = dead._x;
newGem._y = dead._y - 50;
}
function playerInvisible() {
if (invisibleON) {
if (HUD.invisibilityMeter._yscale > 0) {
player._alpha = 45;
HUD.invisibilityMeter._yscale = HUD.invisibilityMeter._yscale - 0.1;
} else if (HUD.invisibilityMeter._yscale <= 0) {
HUD.invisibilityMeter._yscale = 0;
player._alpha = 100;
invisibleON = 0;
}
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.invisibilityMeter._yscale = ImeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
brokenStuff = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
if (invisibleON) {
sceneDone = true;
} else {
sceneDone = false;
}
gameOver = 0;
Instance of Symbol 1348 MovieClip in Frame 361
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 70;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 400) {
_x = 400;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 60)) || (_x >= (p._x - 60))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 361
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.ImeterUpdate = _root.HUD.invisibilityMeter._yscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 361
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 361
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 361
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 361
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 803 MovieClip "gem" in Frame 361
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.pinkGemFound = 1;
_root.pinkGem._visible = 1;
this.gotoAndPlay(2);
}
}
Instance of Symbol 573 MovieClip in Frame 361
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.playerInvisible();
_root.collisionTests();
}
}
Instance of Symbol 482 MovieClip in Frame 361
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 362
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 1) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
function playerInvisible() {
if (invisibleON) {
if (HUD.invisibilityMeter._yscale > 0) {
player._alpha = 45;
HUD.invisibilityMeter._yscale = HUD.invisibilityMeter._yscale - 0.1;
} else if (HUD.invisibilityMeter._yscale <= 0) {
HUD.invisibilityMeter._yscale = 0;
player._alpha = 100;
invisibleON = 0;
}
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = true;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.invisibilityMeter._yscale = ImeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
if (invisibleON) {
sceneDone = true;
} else {
sceneDone = false;
}
gameOver = 0;
Instance of Symbol 1355 MovieClip in Frame 362
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 70;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 360) {
_x = 360;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 100)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 60)) || (_x >= (p._x - 60))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 362
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 520) && (_root.sceneDone == true)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.ImeterUpdate = _root.HUD.invisibilityMeter._yscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 450) {
_y = 450;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 362
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 362
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 362
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 362
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 573 MovieClip in Frame 362
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.playerInvisible();
_root.collisionTests();
}
}
Instance of Symbol 482 MovieClip in Frame 362
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 363
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if ((HUD.healthMeter._xscale <= 5) && (onPlatform)) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if (enemyCount == 1) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = done._x;
healthPotion._y = done._y - 50;
}
}
function shootLavaBall() {
if (getTimer() > nextLavaBallTime) {
myX = int(Math.random() * 20);
lava.start(0, 1);
volcano.splash.gotoAndPlay(2);
attachMovie("lavaBall", "lavaBall" + nextLavaBall, nextLavaBall + 9999);
lavaBall = _root["lavaBall" + nextLavaBall];
lavaBall._x = volcano._x;
lavaBall._y = volcano._y;
lavaBalls.push({clip:lavaBall, down:0});
nextLavaBall++;
nextLavaBallTime = getTimer() + 1500;
}
}
function moveLavaBall() {
i = lavaBalls.length - 1;
while (i >= 0) {
lavaBall = lavaBalls[i].clip;
lavaBall._x = lavaBall._x - myX;
lavaBall._y = lavaBall._y - 17;
lavaBall._y = lavaBall._y + lavaBalls[i].down;
lavaBalls[i].down = lavaBalls[i].down + 0.7;
if (lavaBall._y > 350) {
lavaBall.gotoAndStop(2);
lavaBall._y = 350;
}
if (lavaBall._x < 10) {
lavaBall.removeMovieClip();
lavaBalls.splice(i, 1);
}
if (lavaBall.hitTest(player)) {
jumping = false;
fallMC.gotoAndPlay(2);
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - 2;
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameOverScreen.gotoAndPlay(2);
lavaBall.removeMovieClip();
}
}
i--;
}
}
function playerInvisible() {
if (invisibleON) {
if (HUD.invisibilityMeter._yscale > 0) {
player._alpha = 45;
HUD.invisibilityMeter._yscale = HUD.invisibilityMeter._yscale - 0.1;
} else if (HUD.invisibilityMeter._yscale <= 0) {
HUD.invisibilityMeter._yscale = 0;
player._alpha = 100;
invisibleON = 0;
}
}
}
stop();
potionChance = random(5) + 1;
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
nextLavaBallTime = 0;
nextLavaBall = 0;
lavaBalls = [];
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.invisibilityMeter._yscale = ImeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
lava = new Sound();
lava.attachSound("blow");
iterations = 5;
sceneDone = true;
gameOver = 0;
Instance of Symbol 1371 MovieClip in Frame 363
onClipEvent (load) {
if (_root.potionChance <= 2) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(20);
if (potionChance > 12) {
_root.newPotion = true;
}
}
}
}
onClipEvent (enterFrame) {
if (this.blueVase.hitTest(_root.player) && (_root.attack == 1)) {
if (_root.potionChance <= 2) {
this._name = "done";
_root.bonusPotions();
} else {
this._name = "done1";
}
this.gotoAndStop(2);
this.blueVase.gotoAndStop(2);
}
}
Instance of Symbol 1371 MovieClip in Frame 363
onClipEvent (load) {
if (_root.potionChance > 2) {
if (_root.difficulty == "easy") {
_root.newPotion = true;
} else if (_root.difficulty != "easy") {
var potionChance = random(20);
if (potionChance > 12) {
_root.newPotion = true;
}
}
}
}
onClipEvent (enterFrame) {
if (this.blueVase.hitTest(_root.player) && (_root.attack == 1)) {
if (_root.potionChance > 2) {
this._name = "done";
_root.bonusPotions();
} else {
this._name = "done2";
}
this.gotoAndStop(2);
this.blueVase.gotoAndStop(2);
}
}
Instance of Symbol 1377 MovieClip "volcano" in Frame 363
onClipEvent (enterFrame) {
if ((_root.gameOver != 1) && (_root.pauseGame != 1)) {
_root.shootLavaBall();
_root.moveLavaBall();
}
}
Instance of Symbol 550 MovieClip "player" in Frame 363
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 530) && (_root.sceneDone == false)) {
_x = 530;
} else if ((_x > 530) && (_root.sceneDone == true)) {
j = _root.lavaBalls.length - 1;
while (j >= 0) {
_root.lavaBall = _root.lavaBalls[j].clip;
_root.lavaBall.removeMovieClip();
j--;
}
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.ImeterUpdate = _root.HUD.invisibilityMeter._yscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 355) {
_y = 355;
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 363
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 363
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 363
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 363
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 573 MovieClip in Frame 363
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.playerInvisible();
_root.collisionTests();
}
}
Instance of Symbol 482 MovieClip in Frame 363
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 364
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 4) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
sceneDone = false;
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if ((enemyCount == 4) && (goldGemFound)) {
continueMC.gotoAndStop(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 4) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (Hpotion, "healthPotion", 5);
newPotion = false;
healthPotion._x = dead._x;
healthPotion._y = dead._y - 50;
}
}
function findGem() {
duplicateMovieClip (gem, "newGem", 10);
newGem._x = broken._x;
newGem._y = broken._y - 50;
}
function playerInvisible() {
if (invisibleON) {
if (HUD.invisibilityMeter._yscale > 0) {
player._alpha = 45;
HUD.invisibilityMeter._yscale = HUD.invisibilityMeter._yscale - 0.1;
} else if (HUD.invisibilityMeter._yscale <= 0) {
HUD.invisibilityMeter._yscale = 0;
player._alpha = 100;
invisibleON = 0;
}
}
}
stop();
potionChance = random(5) + 1;
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = false;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.invisibilityMeter._yscale = ImeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
if (invisibleON) {
sceneDone = true;
} else {
sceneDone = false;
}
gameOver = 0;
Instance of Symbol 1390 MovieClip in Frame 364
onClipEvent (enterFrame) {
if (this.blueVase.hitTest(_root.player) && (_root.attack == 1)) {
this.gotoAndStop(2);
this._name = "broken";
this.blueVase.gotoAndStop(2);
_root.findGem();
}
}
Instance of Symbol 869 MovieClip "enemy0" in Frame 364
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 30) {
_x = 30;
} else if (_x > 500) {
_x = 500;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 300)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 300)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 946 MovieClip "enemy3" in Frame 364
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy3";
}
if (_x < 30) {
_x = 30;
} else if (_x > 520) {
_x = 520;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 735 MovieClip "enemy2" in Frame 364
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy2";
}
if (_x < 60) {
_x = 60;
} else if (_x > 500) {
_x = 500;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 50)) || (_x >= (p._x - 50))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 946 MovieClip "enemy1" in Frame 364
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 45;
} else if (_root.difficulty == "medium") {
var robberHealth = 65;
} else if (_root.difficulty == "hard") {
var robberHealth = 100;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy1";
}
if (_x < 50) {
_x = 50;
} else if (_x > 520) {
_x = 520;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 60)) && (_root.playerHigh)) && (robberHealth > 35)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if ((_x <= (p._x + 20)) || (_x >= (p._x - 20))) {
if (this.hitTest(_root.player)) {
if (_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 364
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 530) && (_root.sceneDone == false)) {
_x = 530;
} else if ((_x > 530) && (_root.sceneDone == true)) {
_x = 20;
_root.sceneDone = false;
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
_root.SPupdate = _root.HUD.staminaP;
_root.IPupdate = _root.HUD.invisibleP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 450) {
_y = 450;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 759 MovieClip "Hpotion" in Frame 364
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.HUD.healthP = _root.HUD.healthP + 1;
_root.HUD.potionH.gotoAndPlay(2);
_root.tempHP++;
_root.HPupdate = _root.HPupdate + 1;
this.removeMovieClip();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 364
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 364
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 364
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 801 MovieClip "gem" in Frame 364
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.potions.start();
_root.goldGemFound = 1;
_root.goldGem._visible = 1;
this.gotoAndPlay(2);
}
}
Instance of Symbol 573 MovieClip in Frame 364
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.playerInvisible();
_root.collisionTests();
}
}
Instance of Symbol 482 MovieClip in Frame 364
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 365
function playerMove() {
if (!playerBusy) {
if (Key.isDown(39) && (!jumping)) {
dx = 10;
player._xscale = Math.abs(player._xscale);
faceRight = 1;
faceLeft = 0;
running = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
player.gotoAndStop("hop");
}
} else if (Key.isDown(40)) {
fallMC.gotoAndPlay(2);
} else if (Key.isDown(37) && (!jumping)) {
dx = -10;
player._xscale = -Math.abs(player._xscale);
running = 1;
faceRight = 0;
faceLeft = 1;
player.gotoAndStop("run");
playerTargetX = player._x + dx;
if (Key.isDown(38)) {
jumping = 1;
spinning = true;
isRelaxed = false;
player.gotoAndStop("hop");
}
} else if (Key.isDown(38)) {
jumping = 1;
running = 0;
isRelaxed = false;
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (!running)) {
jumping = 0;
running = 0;
block = 1;
player.gotoAndStop("block");
staminaBuild();
} else {
running = 0;
block = 0;
dx = 0;
if ((((dx == 0) && (!jumping)) && (!running)) && (!playerBusy)) {
player.gotoAndStop("ready");
staminaBuild();
}
}
}
}
function playerFight() {
if (!playerBusy) {
if (((!jumping) && (!running)) && (!block)) {
if (Key.isDown(65) && (faceLeft)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(65) && (faceRight)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceRight)) {
player.gotoAndStop("slash");
attack = 1;
playerAttack();
} else if (Key.isDown(68) && (faceLeft)) {
player.gotoAndStop("backSlash");
attack = 1;
playerAttack();
} else if (Key.isDown(83)) {
player.gotoAndStop("upperSlash");
attack = 1;
playerAttack();
}
}
}
if ((Key.isDown(65) && (jumping)) || (Key.isDown(68) && (jumping))) {
player.meJump.midAir.gotoAndStop(2);
}
}
function playerAttack() {
var _local1 = _root;
i = 0;
while (i < 2) {
if (_local1["enemy" + i].hitTest(player)) {
if (_local1["enemy" + i].meBlock || (_local1["enemy" + i].meSwing)) {
player.sparks.gotoAndPlay(2);
swordSound.start();
_local1["enemy" + i]._x = _local1["enemy" + i]._x - (_local1["enemy" + i].dx * 5);
}
if (!_local1["enemy" + i].meBlock) {
_local1["enemy" + i].gotoAndStop(5);
_local1["enemy" + i].meHit;
}
}
i++;
}
}
function enemyAttack() {
if ((!block) && (!playerBusy)) {
player.gotoAndStop(11);
HUD.healthMeter._xscale = HUD.healthMeter._xscale - (gameMode / 2);
if (HUD.healthMeter._xscale <= 5) {
HUD.healthMeter._xscale = 5;
player.gotoAndStop(12);
gameOver = 1;
gameIsOver();
}
} else if (block) {
swordSound.start();
player.sparks.gotoAndPlay(2);
}
}
function allEnemyDead() {
if ((enemyCount == 1) && (foundKey == 1)) {
continueMC.gotoAndStop(2);
fadeMusic.gotoAndPLay(2);
sceneDone = true;
}
}
function gameIsOver() {
var _local1 = _root;
if (!sceneDone) {
i = 0;
while (i < 2) {
_local1["enemy" + i].gotoAndStop(10);
gameOverScreen.gotoAndPlay(2);
i++;
}
}
}
function collisionTests() {
if ((!jumping) && (!mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
onPlatform = false;
isRelaxed = false;
doGravity();
}
if (!onPlatform) {
var yTest1 = player._y;
var yTest2 = playerTargetY;
var totalLength = (yTest1 - yTest2);
var _local1 = 0;
while (_local1 < iterations) {
var _local2 = yTest1 - (_local1 * (totalLength / iterations));
if (mcPlatforms.hitTest(playerTargetX, _local2, true)) {
playerTargetY = _local2;
break;
}
_local1++;
}
}
if ((!jumping) && (mcPlatforms.hitTest(playerTargetX, playerTargetY, true))) {
var pixelsDiff = 0;
var _local3 = playerTargetY;
while (mcPlatforms.hitTest(playerTargetX, _local3, true)) {
_local3--;
}
playerTargetY = _local3 + 1;
onPlatform = true;
spinning = false;
if (!isRelaxed) {
player.gotoAndStop("ready");
isRelaxed = true;
}
gravity = gravityOrig;
}
player._x = playerTargetX;
player._y = playerTargetY;
}
function doGravity() {
if (!spinning) {
player.gotoAndStop("jump");
}
gravity = gravity * 1.15;
playerTargetY = playerTargetY + gravity;
}
function ninjaStamina() {
HUD.staminaMeter._xscale--;
if (HUD.staminaMeter._xscale < 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16711680);
} else if (HUD.staminaMeter._xscale <= 0) {
HUD.staminaMeter = 0;
} else {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function staminaBuild() {
if (HUD.staminaMeter._xscale < 100) {
HUD.staminaMeter._xscale = HUD.staminaMeter._xscale + 0.2;
if (HUD.staminaMeter._xscale >= 100) {
HUD.staminaMeter._xscale = 100;
}
}
if (HUD.staminaMeter._xscale >= 30) {
myColor = new Color(HUD.staminaMeter);
myColor.setRGB(16750848);
}
}
function allBroke() {
if (brokenStuff == 3) {
mcPlatforms.gotoAndStop(2);
}
}
function bonusPotions() {
if (newPotion == true) {
duplicateMovieClip (castleKey, "myKey", 5);
myKey._x = dead._x;
myKey._y = dead._y - 80;
newPotion == false;
}
}
function playerInvisible() {
if (invisibleON) {
if (HUD.invisibilityMeter._yscale > 0) {
player._alpha = 45;
HUD.invisibilityMeter._yscale = HUD.invisibilityMeter._yscale - 0.1;
} else if (HUD.invisibilityMeter._yscale <= 0) {
HUD.invisibilityMeter._yscale = 0;
player._alpha = 100;
invisibleON = 0;
}
}
}
stop();
playerTargetX = player._x;
playerTargetY = player._y;
newPotion = true;
goldKey._visible = 0;
foundKey = 0;
HUD.healthMeter._xscale = HmeterUpdate;
HUD.staminaMeter._xscale = SmeterUpdate;
HUD.myLives = totalLives - 1;
HUD.staminaP = SPupdate;
HUD.healthP = HPupdate;
HUD.invisibleP = IPupdate;
HUD.invisibilityMeter._yscale = 0;
faceRight = 1;
faceLeft = 0;
dx = 0;
running = 0;
jumping = 0;
attack = 0;
pauseGame = 0;
playerBusy = 0;
playerHigh = 0;
groundAbs = ground;
block = 0;
blockChance = 0;
gravity = 10;
gravityOrig = gravity;
enemyCount = 0;
HmeterUpdate = 0;
SmeterUpdate = 0;
brokenStuff = 0;
scrb01 = tempScrb01;
scrb02 = tempScrb02;
scrb03 = tempScrb03;
scrb04 = tempScrb04;
if (!scrb01) {
bug1._visible = 0;
} else {
bug1._visible = 1;
}
if (!scrb02) {
bug2._visible = 0;
} else {
bug2._visible = 1;
}
if (!scrb03) {
bug3._visible = 0;
} else {
bug3._visible = 1;
}
if (!scrb04) {
bug4._visible = 0;
} else {
bug4._visible = 1;
}
swordSound = new Sound();
swordSound.attachSound("swordsClank");
potions = new Sound();
potions.attachSound("potionPicked");
iterations = 5;
sceneDone = false;
gameOver = 0;
Instance of Symbol 1424 MovieClip "enemy0" in Frame 365
onClipEvent (load) {
var p = _root.player;
var dx = 0;
if (_root.difficulty == "easy") {
var robberHealth = 65;
} else if (_root.difficulty == "medium") {
var robberHealth = 85;
} else if (_root.difficulty == "hard") {
var robberHealth = 120;
}
var meBusy = 0;
var meBlock = 0;
var meSwing = 0;
var meHit = 0;
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
_name = "enemy0";
}
if (_x < 60) {
_x = 60;
} else if (_x > 450) {
_x = 450;
}
if (((!_root.pauseGame) && (_name != "dead")) && (!_root.invisibleON)) {
if (((!meBusy) && (!meHit)) && (!meBlock)) {
if (p._x <= _x) {
dx = -10;
_xscale = Math.abs(_xscale);
} else if (p._x > _x) {
dx = 10;
_xscale = (-Math.abs(_xscale));
}
if (((_x > (p._x + 120)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x - ((Math.random() * 5) + 3));
} else if (((_x < (p._x - 120)) && (!_root.playerHigh)) && (robberHealth > 15)) {
this.gotoAndStop(2);
var meBlock = 0;
var meSwing = 0;
_x = (_x + ((Math.random() * 5) + 3));
} else if (_root.playerHigh) {
this.gotoAndStop(1);
} else if ((_x <= (p._x + 100)) || (_x >= (p._x - 100))) {
if (this.hitTest(_root.player)) {
if (!_root.playerHigh) {
if (_root.gameMode != 35) {
var robbersMove = (random(60) + 15);
if ((robbersMove >= 0) && (robbersMove <= 20)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if ((robbersMove > 20) && (robbersMove <= 45)) {
this.gotoAndStop(6);
var meBlock = 1;
var meSwing = 0;
} else if (robbersMove > 45) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
}
} else if (_root.gameMode == 35) {
var robbersMove = random(40);
if ((robbersMove >= 0) && (robbersMove <= 5)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(3);
_root.enemyAttack();
} else if ((robbersMove > 5) && (robbersMove <= 12)) {
var meBlock = 1;
var meSwing = 0;
this.gotoAndStop(6);
} else if ((robbersMove > 12) && (robbersMove <= 16)) {
var meBusy = 1;
var meSwing = 1;
var meBlock = 0;
this.gotoAndStop(4);
_root.enemyAttack();
} else if (robbersMove > 16) {
var meBusy = 0;
var meSwing = 0;
var meBlock = 0;
this.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
Instance of Symbol 550 MovieClip "player" in Frame 365
onClipEvent (enterFrame) {
if (_x < 20) {
_x = 20;
}
if ((_x > 520) && (_root.sceneDone == false)) {
_x = 520;
} else if ((_x > 450) && (_root.sceneDone == true)) {
_root.HmeterUpdate = _root.HUD.healthMeter._xscale;
_root.SmeterUpdate = _root.HUD.staminaMeter._xscale;
_root.HPupdate = _root.HUD.healthP;
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.staminaPotion);
_root.sceneDone = false;
_root.nextFrame();
}
if (_y <= 200) {
_root.playerHigh = 1;
} else {
_root.playerHigh = 0;
}
if (_y > 450) {
_y = 450;
_visible = 0;
_name = "playerdead";
_root.gameOverScreen.gotoAndPlay(2);
}
}
Instance of Symbol 835 MovieClip in Frame 365
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true) && (_root.attack == 1)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 835 MovieClip in Frame 365
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true) && (_root.attack == 1)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 573 MovieClip in Frame 365
onClipEvent (enterFrame) {
if (!_root.pauseGame) {
_root.playerMove();
_root.playerFight();
_root.playerInvisible();
_root.collisionTests();
}
}
Instance of Symbol 578 MovieClip "blueGem" in Frame 365
onClipEvent (load) {
if (_root.blueGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 580 MovieClip "goldGem" in Frame 365
onClipEvent (load) {
if (_root.goldGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 582 MovieClip "pinkGem" in Frame 365
onClipEvent (load) {
if (_root.pinkGemFound != 1) {
this._visible = 0;
}
}
Instance of Symbol 1427 MovieClip "castleKey" in Frame 365
onClipEvent (enterFrame) {
if (_root.player.hitTest(this._x, this._y, true) == true) {
_root.potions.start();
_root.goldKey._visible = 1;
_root.foundKey = 1;
_root.allEnemyDead();
this.removeMovieClip();
}
}
Instance of Symbol 482 MovieClip in Frame 365
onClipEvent (load) {
if (_root.myMusic == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 366
play();
Frame 1335
stop();
stopAllSounds();
gotoAndStop (1336);
Frame 1336
function myFinalScore() {
if (blueGemFound == 1) {
gemsNum = gemsNum + 1000;
points1 = "1,000";
check1.gotoAndStop(2);
} else {
points1 = "0";
}
if (goldGemFound == 1) {
gemsNum = gemsNum + 1000;
points2 = "1,000";
check2.gotoAndStop(2);
} else {
points2 = "0";
}
if (pinkGemFound == 1) {
gemsNum = gemsNum + 1000;
points3 = "1,000";
check3.gotoAndStop(2);
} else {
points3 = "0";
}
if (scrb01 == 1) {
allScarabPieces++;
bonuses = bonuses + 5000;
points4 = "5,000";
check4.gotoAndStop(2);
} else {
points4 = "0";
}
if (scrb02 == 1) {
allScarabPieces++;
bonuses = bonuses + 5000;
points5 = "5,000";
check5.gotoAndStop(2);
} else {
points5 = "0";
}
if (scrb03 == 1) {
allScarabPieces++;
bonuses = bonuses + 5000;
points6 = "5,000";
check6.gotoAndStop(2);
} else {
points6 = "0";
}
if (scrb04 == 1) {
allScarabPieces++;
bonuses = bonuses + 5000;
points7 = "5,000";
check7.gotoAndStop(2);
} else {
points7 = "0";
}
if (difficulty == "easy") {
diffBonusTxt = "2,500";
diffBonus = 2500;
} else if (_root.difficulty == "medium") {
diffBonusTxt = "5,500";
diffBonus = 5500;
} else if (_root.difficulty == "hard") {
diffBonusTxt = "10,000";
diffBonus = 10000;
}
totalScore = ((score + bonuses) + gemsNum) + diffBonus;
}
stop();
allScarabPieces = 0;
flute = new Sound();
flute.attachSound("softMusic");
flute.start(0, 100);
myFinalScore();
isgameover = true;
Instance of Symbol 1479 MovieClip in Frame 1336
onClipEvent (load) {
if (_root.allScarabPieces == 4) {
this.gotoAndStop(2);
}
}
Frame 1337
stop();
Instance of Symbol 1479 MovieClip in Frame 1337
onClipEvent (load) {
if (_root.allScarabPieces == 4) {
this.gotoAndStop(2);
}
}
Instance of Symbol 1511 MovieClip "comHighscores" in Frame 1337
//component parameters
onClipEvent (initialize) {
scoreLocation = "_root.score";
gamename = "ninja2";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
}
Symbol 13 MovieClip Frame 16
_parent.removeMovieClip();
_root.lavaBalls.splice(i, 1);
Symbol 14 MovieClip [lavaBall] Frame 1
stop();
Symbol 14 MovieClip [lavaBall] Frame 2
stop();
Symbol 47 MovieClip Frame 100
stop();
Symbol 57 MovieClip Frame 40
stop();
Symbol 58 MovieClip Frame 280
_parent.gotoAndPlay("begin");
stop();
Symbol 74 Button
on (release) {
getURL ("http://www.miniclip.com/Homepage.htm", "_blank");
}
Symbol 75 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 1
stop();
Instance of Symbol 78 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
chanceOfAppearing = 10;
chance = 0;
}
onClipEvent (enterFrame) {
chance++;
if (random(chanceOfAppearing) < chance) {
this._x = random(550);
this._y = random(400);
chance = 0;
} else {
this._x = -100;
}
}
Instance of Symbol 80 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
chanceOfAppearing = 10;
chance = 0;
}
onClipEvent (enterFrame) {
chance++;
if (random(chanceOfAppearing) < chance) {
this._x = random(550);
this._y = random(400);
chance = 0;
} else {
this._x = -100;
}
}
Instance of Symbol 82 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
chanceOfAppearing = 5;
chance = 0;
}
onClipEvent (enterFrame) {
chance++;
if (random(chanceOfAppearing) < chance) {
this._x = random(550);
this._y = random(400);
chance = 0;
} else {
this._x = -100;
}
}
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
wanderAmount = 400;
leftLimit = 10;
rightLimit = 540;
chanceOfJump = 50;
xPosition = 510;
speed = 15;
chanceOfChange = 0;
}
onClipEvent (enterFrame) {
xPosition = xPosition + speed;
this._x = xPosition;
chanceOfChange++;
if ((((Math.random() * wanderAMount) < chanceOfChange) || (xPosition < leftLimit)) || (xPosition > rightLimit)) {
speed = -speed;
chanceOfChange = 0;
}
if ((Math.random() * chanceOfJump) == 1) {
xPosition = (Math.random() * (rightLimit - leftLimit)) + leftLimit;
}
}
Instance of Symbol 78 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
chanceOfAppearing = 10;
chance = 0;
}
onClipEvent (enterFrame) {
chance++;
if (random(chanceOfAppearing) < chance) {
this._x = random(550);
this._y = random(400);
chance = 0;
} else {
this._x = -100;
}
}
Symbol 90 Button
on (release) {
getURL ("http://www.miniclip.com/Homepage.htm", "_blank");
}
Symbol 93 Button
on (release) {
getURL ("http://www.miniclip.com/signup2.htm", "_blank");
}
Symbol 96 Button
on (release) {
getURL ("http://www.miniclip.com/download_ninja2.htm", "_blank");
}
Symbol 114 Button
on (release) {
gotoAndPlay (19);
}
Symbol 126 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 2
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 2
stop();
Symbol 140 Button
on (release) {
gotoAndStop ("instructions");
}
Symbol 141 Button
on (release) {
gotoAndStop ("chapters");
}
Symbol 142 Button
on (release) {
gotoAndStop ("story");
}
Symbol 143 Button
on (release) {
gotoAndStop ("options");
}
Symbol 144 Button
on (release) {
gotoAndStop ("info");
}
Symbol 151 Button
on (rollOver) {
nextFrame();
}
on (rollOut) {
prevFrame();
}
on (press) {
if (_root._framesloaded >= 94) {
stillLoad.gotoAndStop(1);
_root.chapter = 1;
_root.gotoAndPlay("gameSet");
} else {
stillLoad.gotoAndStop(2);
}
}
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 2
stop();
Symbol 157 MovieClip Frame 3
stop();
Symbol 164 Button
on (rollOver) {
nextFrame();
}
on (rollOut) {
prevFrame();
}
on (press) {
if (_root.chptr1) {
if (_root._framesloaded >= 96) {
stillLoad.gotoAndStop(1);
_root.chapter = 2;
_root.gotoAndPlay("gameSet");
} else {
stillLoad.gotoAndStop(2);
}
} else {
locked.play();
}
}
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 2
play();
Symbol 170 MovieClip Frame 1
stop();
Symbol 170 MovieClip Frame 2
stop();
Symbol 170 MovieClip Frame 3
stop();
Symbol 177 Button
on (rollOver) {
nextFrame();
}
on (rollOut) {
prevFrame();
}
on (press) {
if (_root.chptr2) {
if (_root._framesloaded >= 102) {
_root.chapter = 3;
_root.gotoAndPlay("gameSet");
}
} else {
locked.play();
}
}
Symbol 181 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 2
stop();
Symbol 181 MovieClip Frame 3
stop();
Symbol 188 Button
on (rollOver) {
nextFrame();
}
on (rollOut) {
prevFrame();
}
on (press) {
if (_root.chptr3) {
if (_root._framesloaded >= 106) {
_root.chapter = 4;
_root.gotoAndPlay("gameSet");
}
} else {
locked.play();
}
}
Symbol 192 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 2
stop();
Symbol 192 MovieClip Frame 3
stop();
Symbol 199 Button
on (rollOver) {
nextFrame();
}
on (rollOut) {
prevFrame();
}
on (press) {
if (_root.chptr4) {
if (_root._framesloaded >= 110) {
_root.chapter = 5;
_root.gotoAndPlay("gameSet");
}
} else {
locked.play();
}
}
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 2
stop();
Symbol 203 MovieClip Frame 3
stop();
Symbol 211 Button
on (press) {
gotoAndPlay (2);
}
Symbol 235 Button
on (press) {
gotoAndPlay (11);
}
Symbol 236 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 2
_parent.PI._visible = 0;
_parent.OI._visible = 0;
_parent.EI._visible = 0;
Symbol 236 MovieClip Frame 10
stop();
Symbol 236 MovieClip Frame 20
_parent.PI._visible = 1;
_parent.OI._visible = 1;
_parent.EI._visible = 1;
gotoAndStop (1);
Symbol 237 Button
on (press) {
gotoAndPlay (2);
}
Symbol 246 Button
on (press) {
gotoAndPlay (11);
}
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 2
_parent.KI._visible = 0;
_parent.OI._visible = 0;
_parent.EI._visible = 0;
Symbol 247 MovieClip Frame 10
stop();
Symbol 247 MovieClip Frame 20
_parent.KI._visible = 1;
_parent.OI._visible = 1;
_parent.EI._visible = 1;
gotoAndStop (1);
Symbol 248 Button
on (press) {
gotoAndPlay (2);
}
Symbol 259 Button
on (press) {
gotoAndPlay (11);
}
Symbol 260 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 2
_parent.PI._visible = 0;
_parent.KI._visible = 0;
_parent.EI._visible = 0;
Symbol 260 MovieClip Frame 10
stop();
Symbol 260 MovieClip Frame 20
_parent.PI._visible = 1;
_parent.KI._visible = 1;
_parent.EI._visible = 1;
gotoAndStop (1);
Symbol 261 Button
on (press) {
gotoAndPlay (2);
}
Symbol 273 Button
on (press) {
gotoAndPlay (11);
}
Symbol 274 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 2
_parent.KI._visible = 0;
_parent.OI._visible = 0;
_parent.PI._visible = 0;
Symbol 274 MovieClip Frame 10
stop();
Symbol 274 MovieClip Frame 20
_parent.KI._visible = 1;
_parent.OI._visible = 1;
_parent.PI._visible = 1;
gotoAndStop (1);
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 2
stop();
Symbol 280 Button
on (release) {
text.gotoAndStop(1);
images.gotoAndStop(1);
p1.gotoAndStop(2);
p2.gotoAndStop(1);
p3.gotoAndStop(1);
}
Symbol 281 Button
on (release) {
text.gotoAndStop(2);
images.gotoAndStop(2);
p1.gotoAndStop(1);
p2.gotoAndStop(2);
p3.gotoAndStop(1);
}
Symbol 282 Button
on (release) {
text.gotoAndStop(3);
images.gotoAndStop(3);
p1.gotoAndStop(1);
p2.gotoAndStop(1);
p3.gotoAndStop(2);
}
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 2
stop();
Symbol 294 MovieClip Frame 3
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 2
stop();
Symbol 298 MovieClip Frame 3
stop();
Symbol 299 MovieClip Frame 1
stop();
p1.gotoAndStop(2);
p2.gotoAndStop(1);
p3.gotoAndStop(1);
Symbol 307 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 2
stop();
Symbol 307 MovieClip Frame 3
stop();
Symbol 311 Button
on (release) {
if (!startedGame) {
gameMode = 35;
difficulty = "easy";
badGuy.gotoAndStop(1);
} else {
newSetting = "newEasy";
changeModeRequest.gotoAndStop(2);
}
}
Symbol 314 Button
on (release) {
if (!startedGame) {
gameMode = 20;
difficulty = "medium";
badGuy.gotoAndStop(2);
} else {
newSetting = "newMedium";
changeModeRequest.gotoAndStop(2);
}
}
Symbol 317 Button
on (release) {
if (!startedGame) {
gameMode = 5;
difficulty = "hard";
badGuy.gotoAndStop(3);
} else {
newSetting = "newHard";
changeModeRequest.gotoAndStop(2);
}
}
Symbol 321 Button
on (release) {
setProperty(_root, _quality , "LOW");
}
Symbol 324 Button
on (release) {
setProperty(_root, _quality , "MEDIUM");
}
Symbol 327 Button
on (release) {
setProperty(_root, _quality , "BEST");
}
Symbol 330 Button
on (release) {
setProperty(_root, _quality , "HIGH");
}
Symbol 336 Button
on (release) {
_root.changeMyMode();
gotoAndStop (1);
}
Symbol 339 Button
on (release) {
gotoAndStop (1);
}
Symbol 340 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 2
stop();
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 2
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 2
stop();
Symbol 351 MovieClip Frame 3
stop();
Symbol 351 MovieClip Frame 4
stop();
Symbol 351 MovieClip Frame 5
stop();
Symbol 365 MovieClip Frame 124
stop();
Symbol 376 MovieClip Frame 70
stop();
Symbol 381 MovieClip Frame 14
stop();
_parent.nextFrame();
Symbol 389 MovieClip Frame 96
_parent.nextFrame();
stop();
Symbol 392 MovieClip Frame 16
_parent.nextFrame();
stop();
Symbol 406 MovieClip Frame 130
stopAllSounds();
_root.nextFrame();
stop();
Symbol 407 MovieClip Frame 287
stop();
Symbol 407 MovieClip Frame 288
stop();
Symbol 407 MovieClip Frame 289
stop();
Symbol 407 MovieClip Frame 290
stop();
Symbol 412 Button
on (release) {
stopAllSounds();
gotoAndStop ("L1");
}
Symbol 415 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 6
thisGuyFly = 1;
Symbol 433 MovieClip Frame 14
thisGuyFly = 0;
Symbol 433 MovieClip Frame 21
stop();
_parent.gotoAndStop(1);
Symbol 436 MovieClip Frame 14
stop();
_parent.gotoAndStop(1);
Symbol 451 MovieClip Frame 1
play();
Symbol 451 MovieClip Frame 4
thisGuyFly = 1;
Symbol 451 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 50;
_root.score = _root.score + 50;
Symbol 451 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 451 MovieClip Frame 20
play();
Symbol 451 MovieClip Frame 50
stop();
_parent.gotoAndStop(1);
Symbol 454 MovieClip Frame 40
stop();
_parent.gotoAndStop(1);
Symbol 461 MovieClip Frame 100
_root.enemyCount = _root.enemyCount + 1;
_root.allEnemyDead();
stop();
Symbol 463 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 463 MovieClip Frame 2
stop();
Symbol 463 MovieClip Frame 3
stop();
_name = "e1-Busy";
Instance of Symbol 433 MovieClip in Symbol 463 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 463 MovieClip Frame 4
stop();
Symbol 463 MovieClip Frame 5
stop();
robberHealth = robberHealth - _root.gameMode;
_name = "e1-Busy";
Instance of Symbol 451 MovieClip in Symbol 463 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 463 MovieClip Frame 6
stop();
Symbol 463 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 100;
_root.score = _root.score + 100;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 250;
_root.score = _root.score + 250;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_root.score = _root.score + 350;
}
Symbol 463 MovieClip Frame 10
stop();
Symbol 473 MovieClip Frame 20
stop();
Symbol 475 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 10
stop();
Symbol 477 MovieClip Frame 105
_parent.movieStrips.gotoAndPlay(2);
Symbol 477 MovieClip Frame 120
stop();
_parent.nextFrame();
Symbol 479 Button
on (press) {
_root.myMusic = 0;
_root.levelTune.stop();
gotoAndStop (2);
}
Symbol 481 Button
on (press) {
_root.myMusic = 1;
_root.levelTune.start(0, 100);
gotoAndStop (1);
}
Symbol 482 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 2
stop();
Symbol 484 MovieClip Frame 1
stop();
Symbol 496 MovieClip Frame 10
_parent.gotoAndStop(1);
stop();
Symbol 500 MovieClip Frame 15
_parent.gotoAndStop(1);
Symbol 501 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 2
stop();
Symbol 504 MovieClip Frame 1
stop();
_name = "sparks";
Symbol 504 MovieClip Frame 2
_name = "sparksFly";
Symbol 511 MovieClip Frame 13
_parent.gotoAndStop(1);
stop();
Symbol 512 MovieClip Frame 1
stop();
_root.highKick = 0;
Symbol 512 MovieClip Frame 2
stop();
_root.highKick = 1;
Symbol 514 MovieClip Frame 5
stop();
Symbol 514 MovieClip Frame 6
play();
Symbol 514 MovieClip Frame 10
stop();
Symbol 524 MovieClip Frame 22
stop();
_parent.gotoAndStop(1);
Symbol 526 MovieClip Frame 10
stop();
_parent.gotoAndStop(1);
Symbol 532 MovieClip Frame 1
play();
Symbol 532 MovieClip Frame 17
if (_root.faceLeft) {
_parent._x = _parent._x - (_root.dx - 50);
} else {
_parent._x = _parent._x + (_root.dx - 50);
}
Symbol 532 MovieClip Frame 21
if (_root.faceLeft) {
_parent._x = _parent._x - (_root.dx - 50);
} else {
_parent._x = _parent._x + (_root.dx - 50);
}
Symbol 532 MovieClip Frame 25
if (_root.faceLeft) {
_parent._x = _parent._x - (_root.dx - 50);
} else {
_parent._x = _parent._x + (_root.dx - 50);
}
Symbol 532 MovieClip Frame 29
if (_root.faceLeft) {
_parent._x = _parent._x - (_root.dx - 50);
} else {
_parent._x = _parent._x + (_root.dx - 50);
}
Symbol 532 MovieClip Frame 32
if (_root.faceLeft) {
_parent._x = _parent._x - (_root.dx - 40);
} else {
_parent._x = _parent._x + (_root.dx - 40);
}
Symbol 532 MovieClip Frame 35
if (_root.faceLeft) {
_parent._x = _parent._x - (_root.dx - 25);
} else {
_parent._x = _parent._x + (_root.dx - 25);
}
Symbol 532 MovieClip Frame 38
if (_root.faceLeft) {
_parent._x = _parent._x - (_root.dx - 10);
} else {
_parent._x = _parent._x + (_root.dx - 10);
}
Symbol 532 MovieClip Frame 43
stop();
_parent.gotoAndStop(1);
Symbol 536 MovieClip Frame 3
stop();
Symbol 537 MovieClip Frame 12
stop();
Symbol 544 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 547 MovieClip Frame 60
stop();
Symbol 549 MovieClip Frame 1
if (_root.faceRight) {
_parent._x = _parent._x - 20;
} else {
_parent._x = _parent._x + 20;
}
Symbol 549 MovieClip Frame 4
if (_root.faceRight) {
_parent._x = _parent._x - 20;
} else {
_parent._x = _parent._x + 20;
}
Symbol 549 MovieClip Frame 7
if (_root.faceRight) {
_parent._x = _parent._x - 10;
} else {
_parent._x = _parent._x + 10;
}
Symbol 549 MovieClip Frame 11
stop();
Symbol 550 MovieClip Frame 1
stop();
_name = "player";
_root.attack = 0;
_root.block = 0;
_root.playerBusy = 0;
Symbol 550 MovieClip Frame 2
stop();
Symbol 550 MovieClip Frame 3
stop();
_root.playerBusy = 1;
if ((_root.S - potion) != true) {
_root.ninjaStamina();
}
Symbol 550 MovieClip Frame 4
stop();
if ((_root.S - potion) != true) {
_root.ninjaStamina();
}
Instance of Symbol 501 MovieClip in Symbol 550 MovieClip Frame 4
onClipEvent (load) {
_root.blockChance = random(10);
if (_root.blockChance <= 6) {
this.gotoAndStop(1);
} else if (_root.blockChance > 6) {
this.gotoAndStop(2);
}
}
Symbol 550 MovieClip Frame 5
stop();
if ((_root.S - potion) != true) {
_root.ninjaStamina();
}
_root.playerBusy = 1;
Instance of Symbol 514 MovieClip "meJump" in Symbol 550 MovieClip Frame 5
onClipEvent (load) {
thrust = 50;
}
onClipEvent (enterFrame) {
if ((thrust > 5) && (_parent._parent.jumping)) {
_parent._parent.falling = false;
_parent._parent.playerTargetY = _parent._parent.playerTargetY - thrust;
thrust = thrust / 1.4;
} else if (!_parent._parent.falling) {
_parent._parent.jumping = false;
_parent._parent.falling = true;
gotoAndPlay ("falling");
}
}
Symbol 550 MovieClip Frame 6
stop();
_root.playerBusy = 1;
if ((_root.S - potion) != true) {
_root.ninjaStamina();
}
Symbol 550 MovieClip Frame 7
stop();
_root.playerBusy = 1;
if ((_root.S - potion) != true) {
_root.ninjaStamina();
}
Symbol 550 MovieClip Frame 8
stop();
_root.playerBusy = 1;
Symbol 550 MovieClip Frame 9
stop();
_root.playerBusy = 1;
Instance of Symbol 536 MovieClip in Symbol 550 MovieClip Frame 9
onClipEvent (load) {
thrust = 70;
}
onClipEvent (enterFrame) {
if (_root.faceRight) {
_parent._parent.playerTargetX = _parent._parent.player._x + 15;
} else if (_root.faceLeft) {
_parent._parent.playerTargetX = _parent._parent.player._x - 15;
}
if ((thrust > 5) && (_parent._parent.jumping)) {
_parent._parent.falling = false;
_parent._parent.playerTargetY = _parent._parent.playerTargetY - thrust;
thrust = thrust / 1.4;
} else if (!_parent._parent.falling) {
_parent.gotoAndStop(_parent._currentframe + 1);
}
}
Symbol 550 MovieClip Frame 10
stop();
Instance of Symbol 537 MovieClip in Symbol 550 MovieClip Frame 10
onClipEvent (load) {
thrust = 3;
}
onClipEvent (enterFrame) {
if (_root.faceRight) {
_parent._parent.playerTargetX = _parent._parent.player._x + 10;
} else if (_root.faceLeft) {
_parent._parent.playerTargetX = _parent._parent.player._x - 10;
}
if (thrust < 35) {
_parent._parent.jumping = false;
_parent._parent.playerTargetY = _parent._parent.playerTargetY + thrust;
thrust = thrust * 1.001;
} else {
gotoAndStop ("ready");
}
}
Symbol 550 MovieClip Frame 11
stop();
_root.playerBusy = 1;
Symbol 550 MovieClip Frame 12
stop();
_root.playerBusy = 1;
_root.totalLives--;
this._name = "playerDead";
this._alpha = 100;
Symbol 558 MovieClip Frame 1
stop();
Symbol 559 MovieClip Frame 1
stop();
Symbol 560 MovieClip Frame 1
stop();
Symbol 570 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 1
stop();
_root.noPlatforms._name = "mcPlatforms";
Symbol 575 MovieClip Frame 2
if (_root.player._y < 300) {
_root.mcPlatforms._name = "noPlatforms";
}
Symbol 575 MovieClip Frame 5
_root.noPlatforms._name = "mcPlatforms";
Symbol 583 MovieClip Frame 1
stop();
Symbol 583 MovieClip Frame 2
_parent.nextFrame();
Symbol 583 MovieClip Frame 6
stop();
Symbol 583 MovieClip Frame 7
stop();
Symbol 583 MovieClip Frame 15
_parent.gotoAndStop("chapters");
Symbol 586 MovieClip Frame 1
stop();
Symbol 586 MovieClip Frame 2
stop();
Symbol 593 Button
on (release) {
_parent.gotoAndStop("bird");
}
Symbol 596 Button
on (release) {
_parent.gotoAndStop("settings");
}
Symbol 597 MovieClip Frame 1
stop();
Symbol 597 MovieClip Frame 5
removeMovieClip(_root.healthPotion);
removeMovieClip(_root.invisiblePotion);
removeMovieClip(_root.staminaPotion);
removeMovieClip(_root.myKey);
j = _root.lavaBalls.length - 1;
while (j >= 0) {
_root.lavaBall = _root.lavaBalls[j].clip;
_root.lavaBall.removeMovieClip();
j--;
}
_root.removeDart(n);
_root.SPupdate = _root.SPupdate - _root.tempSP;
_root.HPupdate = _root.HPupdate - _root.tempHP;
_root.IPupdate = _root.IPupdate - _root.tempIP;
if (_root.HUD.staminaP <= 0) {
_root.HUD.staminaP = 0;
}
if (_root.HUD.healthP <= 0) {
_root.HUD.healthP = 0;
}
if (_root.HUD.invisibleP <= 0) {
_root.HUD.invisibleP = 0;
}
if (_root.currentChapter == 2) {
_root.blueGemFound = 0;
}
if (_root.currentChapter == 3) {
_root.tempScrb01 = 0;
}
if (_root.currentChapter == 5) {
_root.tempScrb03 = 0;
_root.pinkGemFound = 0;
_root.goldGemFound = 0;
}
if (_root.currentChapter == 4) {
_root.tempScrb02 = 0;
_root.tempScrb04 = 0;
}
_root.score = _root.score - _root.tempScore;
_root.tempScore = 0;
Symbol 597 MovieClip Frame 70
_root.fadeMusic.gotoAndPlay(2);
Instance of Symbol 586 MovieClip in Symbol 597 MovieClip Frame 70
onClipEvent (load) {
if (_root.totalLives == 0) {
this.gotoAndStop(2);
}
}
Symbol 597 MovieClip Frame 224
stop();
if (_root.totalLives > 0) {
_root.puzzleDone = false;
_parent.gotoAndStop("chapters");
_parent.isgameover = false;
} else {
cat._visible = false;
_parent.isgameover = true;
gotoAndStop(_currentframe + 1);
}
Symbol 599 Button
on (keyPress "p") {
_root.pauseGame = true;
_root.myPause.gotoAndStop(2);
nextFrame();
}
Symbol 600 Button
on (keyPress "p") {
_root.pauseGame = false;
_root.myPause.gotoAndStop(1);
prevFrame();
}
Symbol 601 MovieClip Frame 1
stop();
Symbol 601 MovieClip Frame 2
stop();
Symbol 603 MovieClip Frame 1
stop();
Symbol 603 MovieClip Frame 2
stop();
Symbol 605 MovieClip Frame 1
stop();
Symbol 605 MovieClip Frame 2
_root.levelTune.setVolume(65);
Symbol 605 MovieClip Frame 4
_root.levelTune.setVolume(45);
Symbol 605 MovieClip Frame 6
_root.levelTune.setVolume(35);
Symbol 605 MovieClip Frame 8
_root.levelTune.setVolume(25);
Symbol 605 MovieClip Frame 10
_root.levelTune.setVolume(0);
Symbol 605 MovieClip Frame 12
_root.levelTune.stop();
_root.levelTune.setVolume(100);
_root.myMusic = 0;
Symbol 609 MovieClip Frame 64
stop();
_root.blackFade.gotoAndPlay(2);
Symbol 611 MovieClip Frame 1
stop();
Symbol 611 MovieClip Frame 60
stop();
_root.nextFrame();
Symbol 624 MovieClip Frame 60
gotoAndPlay (16);
Symbol 635 MovieClip Frame 1
stop();
Symbol 635 MovieClip Frame 2
play();
Symbol 635 MovieClip Frame 120
gotoAndStop (1);
Symbol 636 MovieClip Frame 1
stop();
Symbol 636 MovieClip Frame 30
stopAllSounds();
stop();
_parent.gotoAndStop("chapters");
Symbol 640 MovieClip Frame 586
stop();
_parent.fadeOut.gotoAndPlay(2);
Symbol 641 Button
on (release) {
stopAllSounds();
gotoAndStop ("chapters");
}
Symbol 644 MovieClip Frame 1
stop();
Symbol 669 MovieClip Frame 35
stop();
Symbol 674 MovieClip Frame 30
stop();
Symbol 693 MovieClip Frame 336
stop();
_parent.nextFrame();
Symbol 698 MovieClip Frame 81
stop();
Symbol 699 Button
on (release) {
stopAllSounds();
gotoAndStop ("L2");
}
Symbol 701 MovieClip Frame 1
stop();
Symbol 706 MovieClip Frame 26
stop();
Symbol 709 MovieClip Frame 20
stop();
Symbol 714 MovieClip Frame 14
stop();
_parent.gotoAndStop(1);
Symbol 717 MovieClip Frame 11
stop();
_parent.gotoAndStop(1);
Symbol 721 MovieClip Frame 1
play();
Symbol 721 MovieClip Frame 4
thisGuyFly = 1;
Symbol 721 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 50;
_root.score = _root.score + 50;
Symbol 721 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 721 MovieClip Frame 20
play();
Symbol 721 MovieClip Frame 50
stop();
_parent.gotoAndStop(1);
Symbol 724 MovieClip Frame 25
var puffChance = random(10);
if (puffChance < 6) {
nextFrame();
} else {
gotoAndPlay (1);
}
Symbol 724 MovieClip Frame 26
play();
Symbol 726 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 734 MovieClip Frame 35
stop();
_root.enemyCount = _root.enemyCount + 1;
_root.bonusPotions();
Symbol 735 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 735 MovieClip Frame 2
stop();
Symbol 735 MovieClip Frame 3
stop();
Instance of Symbol 714 MovieClip in Symbol 735 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 735 MovieClip Frame 4
stop();
Instance of Symbol 717 MovieClip in Symbol 735 MovieClip Frame 4
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 735 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Instance of Symbol 721 MovieClip in Symbol 735 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 735 MovieClip Frame 6
stop();
Symbol 735 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 100;
_parent.score = _parent.score + 100;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 250;
_parent.score = _parent.score + 250;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
}
Symbol 735 MovieClip Frame 10
stop();
Symbol 739 MovieClip Frame 1
stop();
Symbol 739 MovieClip Frame 2
stop();
Symbol 747 MovieClip Frame 31
stop();
Symbol 751 MovieClip Frame 31
stop();
Symbol 755 MovieClip Frame 31
stop();
Symbol 756 MovieClip Frame 1
stop();
Symbol 756 MovieClip Frame 2
stop();
Symbol 756 MovieClip Frame 3
stop();
Symbol 757 MovieClip Frame 1
stop();
Symbol 757 MovieClip Frame 2
stop();
Symbol 758 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 758 MovieClip Frame 2
stop();
Symbol 758 MovieClip Frame 3
stop();
_name = "e1-Busy";
Instance of Symbol 714 MovieClip in Symbol 758 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 758 MovieClip Frame 4
stop();
Instance of Symbol 717 MovieClip in Symbol 758 MovieClip Frame 4
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 758 MovieClip Frame 5
stop();
robberHealth = robberHealth - _root.gameMode;
_name = "e1-Busy";
Instance of Symbol 721 MovieClip in Symbol 758 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 758 MovieClip Frame 6
stop();
Symbol 758 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 100;
_parent.score = _parent.score + 100;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 250;
_parent.score = _parent.score + 250;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
}
Symbol 758 MovieClip Frame 10
stop();
Symbol 759 MovieClip Frame 1
stop();
Symbol 763 MovieClip Frame 1
stop();
Symbol 763 MovieClip Frame 2
play();
Symbol 763 MovieClip Frame 10
_root.HUD.healthMeter._xscale = _root.HUD.healthMeter._xscale + 25;
Symbol 765 Button
on (keyPress "1") {
if (HUD.staminaP > 0) {
regainStamina.gotoAndPlay(2);
HUD.staminaP--;
}
}
on (keyPress "2") {
if (HUD.healthP > 0) {
regainHealth.gotoAndPlay(2);
HUD.healthP--;
}
}
on (keyPress "3") {
if (HUD.invisibleP > 0) {
regainInvisibility.gotoAndPlay(2);
HUD.staminaI--;
}
}
Symbol 779 MovieClip Frame 1
play();
Symbol 779 MovieClip Frame 4
_parent._x = _parent._x - (_parent.dx * 2);
Symbol 779 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 782 MovieClip Frame 25
stop();
_parent.gotoAndStop(1);
Symbol 787 MovieClip Frame 1
play();
Symbol 787 MovieClip Frame 4
thisGuyFly = 1;
Symbol 787 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 100;
_root.score = _root.score + 100;
Symbol 787 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 787 MovieClip Frame 20
play();
Symbol 787 MovieClip Frame 40
stop();
_parent.gotoAndStop(1);
Symbol 789 MovieClip Frame 15
_parent.gotoAndStop(1);
Symbol 792 MovieClip Frame 1
play();
Symbol 792 MovieClip Frame 4
thisGuyFly = 1;
Symbol 792 MovieClip Frame 18
thisGuyFly = 0;
Symbol 792 MovieClip Frame 50
_root.findGem();
Symbol 792 MovieClip Frame 99
stop();
Symbol 793 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 793 MovieClip Frame 2
stop();
Symbol 793 MovieClip Frame 3
stop();
_name = "e1-Busy";
Symbol 793 MovieClip Frame 4
stop();
Symbol 793 MovieClip Frame 5
stop();
robberHealth = robberHealth - (_root.gameMode / 2);
_name = "e1-Busy";
Instance of Symbol 787 MovieClip in Symbol 793 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 793 MovieClip Frame 6
stop();
Symbol 793 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 250;
_parent.score = _parent.score + 250;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 500;
_parent.score = _parent.score + 500;
}
_parent.enemyCount = _parent.enemyCount + 1;
Instance of Symbol 792 MovieClip in Symbol 793 MovieClip Frame 7
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 793 MovieClip Frame 10
stop();
Symbol 797 MovieClip Frame 55
stop();
Symbol 798 MovieClip Frame 1
stop();
Symbol 798 MovieClip Frame 2
stop();
_root.itemsBroken = _root.itemsBroken + 1;
_root.bonusPotions();
_root.allBroke();
Symbol 801 MovieClip Frame 1
stop();
Symbol 801 MovieClip Frame 3
_name = "empty";
Symbol 801 MovieClip Frame 90
_root.allEnemyDead();
_parent.removeMovieClip();
stop();
Symbol 803 MovieClip Frame 1
stop();
Symbol 803 MovieClip Frame 3
_name = "empty";
Symbol 803 MovieClip Frame 90
_root.allEnemyDead();
_parent.removeMovieClip();
stop();
Symbol 805 MovieClip Frame 1
stop();
Symbol 805 MovieClip Frame 3
_name = "empty";
Symbol 805 MovieClip Frame 90
_root.allEnemyDead();
_parent.removeMovieClip();
stop();
Symbol 823 MovieClip Frame 238
stop();
Symbol 826 MovieClip Frame 300
stop();
_root.gotoAndStop("chapters");
Symbol 830 MovieClip Frame 1
stop();
Symbol 834 MovieClip Frame 55
stop();
Symbol 835 MovieClip Frame 1
stop();
Symbol 835 MovieClip Frame 2
stop();
_name = "barrelBroke";
Symbol 836 MovieClip Frame 35
stop();
_root.enemyCount = _root.enemyCount + 1;
Symbol 837 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 837 MovieClip Frame 2
stop();
Symbol 837 MovieClip Frame 3
stop();
_name = "e1-Busy";
Instance of Symbol 714 MovieClip in Symbol 837 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 837 MovieClip Frame 4
stop();
Instance of Symbol 717 MovieClip in Symbol 837 MovieClip Frame 4
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 837 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Instance of Symbol 721 MovieClip in Symbol 837 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 837 MovieClip Frame 6
stop();
Symbol 837 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 100;
_parent.score = _parent.score + 100;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 250;
_parent.score = _parent.score + 250;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
}
Symbol 837 MovieClip Frame 10
stop();
Symbol 842 MovieClip Frame 1
stop();
Symbol 847 MovieClip Frame 55
stop();
_parent.gotoAndStop(1);
Symbol 848 MovieClip Frame 1
stop();
Symbol 848 MovieClip Frame 2
stop();
Symbol 854 MovieClip Frame 24
stop();
_parent.gotoAndStop(1);
Symbol 865 MovieClip Frame 1
play();
Symbol 865 MovieClip Frame 4
thisGuyFly = 1;
Symbol 865 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 50;
_root.score = _root.score + 50;
Symbol 865 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 865 MovieClip Frame 20
play();
Symbol 865 MovieClip Frame 50
stop();
_parent.gotoAndStop(1);
Symbol 867 MovieClip Frame 20
_parent.gotoAndStop(1);
Symbol 868 MovieClip Frame 5
stop();
_root.enemyCount = _root.enemyCount + 1;
Symbol 869 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 869 MovieClip Frame 2
stop();
Symbol 869 MovieClip Frame 3
stop();
_name = "e1-Busy";
Instance of Symbol 854 MovieClip in Symbol 869 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 869 MovieClip Frame 4
stop();
Symbol 869 MovieClip Frame 5
stop();
robberHealth = robberHealth - _root.gameMode;
_name = "e1-Busy";
Instance of Symbol 865 MovieClip in Symbol 869 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 869 MovieClip Frame 6
stop();
Symbol 869 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 150;
_parent.score = _parent.score + 150;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 250;
_parent.score = _parent.score + 250;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
}
Symbol 869 MovieClip Frame 10
stop();
Symbol 874 MovieClip Frame 1
stop();
Symbol 885 MovieClip Frame 15
_root.scarabFound = true;
_root.scarabPiece1.gotoAndStop(2);
Symbol 885 MovieClip Frame 40
stop();
Symbol 886 MovieClip Frame 1
stop();
Symbol 886 MovieClip Frame 2
stop();
_name = "vaseBroke";
Symbol 889 MovieClip Frame 40
_root.scrb01 = 1;
_root.bug1._visible = true;
_root.scarabFound = false;
Symbol 889 MovieClip Frame 83
stop();
Symbol 890 MovieClip Frame 1
stop();
Symbol 890 MovieClip Frame 2
stop();
Symbol 890 MovieClip Frame 3
stop();
_root.tempScrb01 = 1;
_name = "done";
Symbol 897 MovieClip Frame 1
stop();
Symbol 897 MovieClip Frame 2
stop();
Symbol 898 MovieClip Frame 1
stop();
Symbol 898 MovieClip Frame 2
stop();
_root.itemsBroken = _root.itemsBroken + 1;
_root.allBroke();
_name = "broke";
Symbol 899 MovieClip Frame 1
stop();
Symbol 901 Button
on (keyPress "1") {
if ((HUD.staminaP > 0) && (HUD.staminaMeter._xscale < 100)) {
regainStamina.gotoAndPlay(2);
HUD.staminaP--;
}
}
on (keyPress "2") {
if ((HUD.healthP > 0) && (HUD.healthMeter._xscale < 100)) {
regainHealth.gotoAndPlay(2);
HUD.healthP--;
}
}
on (keyPress "3") {
if ((HUD.invisibleP > 0) && (HUD.InvisibleMeter._xscale < 100)) {
regainInvisibility.gotoAndPlay(2);
HUD.invisibleP--;
}
}
Symbol 903 MovieClip Frame 1
stop();
Symbol 903 MovieClip Frame 2
play();
Symbol 903 MovieClip Frame 10
_root.HUD.staminaMeter._xscale = _root.HUD.staminaMeter._xscale + 25;
Symbol 906 MovieClip Frame 1
stop();
Symbol 906 MovieClip Frame 2
stop();
Symbol 915 MovieClip Frame 40
_root.fadeMusic.gotoAndPlay(2);
_root.movieStrips.gotoAndPlay(8);
Symbol 915 MovieClip Frame 120
stop();
stopAllSounds();
_root.gotoAndStop("chapters");
Symbol 923 MovieClip Frame 4
stop();
Symbol 925 MovieClip Frame 1
stop();
Symbol 935 MovieClip Frame 25
_parent.gotoAndStop(1);
stop();
Symbol 936 MovieClip Frame 1
play();
Symbol 936 MovieClip Frame 4
thisGuyFly = 1;
Symbol 936 MovieClip Frame 23
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 50;
_root.score = _root.score + 50;
Symbol 936 MovieClip Frame 28
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 936 MovieClip Frame 29
play();
Symbol 936 MovieClip Frame 43
stop();
_parent.gotoAndStop(1);
Symbol 942 MovieClip Frame 22
_parent.gotoAndStop(1);
stop();
Symbol 945 MovieClip Frame 37
stop();
_root.allEnemyDead();
Symbol 946 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 946 MovieClip Frame 2
stop();
Symbol 946 MovieClip Frame 3
stop();
Symbol 946 MovieClip Frame 4
stop();
Symbol 946 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Symbol 946 MovieClip Frame 6
stop();
Symbol 946 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 100;
_parent.score = _parent.score + 100;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 200;
_parent.score = _parent.score + 200;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
}
Set(_parent.enemyCount, (_parent.enemyCount = _parent.enemyCount + 1));
Symbol 946 MovieClip Frame 8
stop();
_name = "rollerDead";
Symbol 946 MovieClip Frame 10
stop();
Symbol 950 MovieClip Frame 45
_parent.gotoAndStop(1);
Symbol 951 MovieClip Frame 1
stop();
Symbol 951 MovieClip Frame 2
stop();
_root.totalLives--;
Symbol 951 MovieClip Frame 3
stop();
Symbol 951 MovieClip Frame 4
stop();
Symbol 951 MovieClip Frame 5
stop();
Symbol 951 MovieClip Frame 6
stop();
Symbol 951 MovieClip Frame 7
stop();
Symbol 951 MovieClip Frame 8
stop();
Symbol 951 MovieClip Frame 9
stop();
Symbol 951 MovieClip Frame 10
stop();
Symbol 952 Button
on (keyPress "1") {
if (HUD.staminaP > 0) {
regainStamina.gotoAndPlay(2);
HUD.staminaP--;
}
}
on (keyPress "2") {
if (HUD.healthP > 0) {
regainHealth.gotoAndPlay(2);
HUD.healthP--;
}
}
on (keyPress "3") {
if (HUD.invisibleP > 0) {
invisibleON = 1;
HUD.invisibleP--;
}
}
Symbol 959 MovieClip Frame 1
stop();
Symbol 961 MovieClip Frame 1
stop();
Symbol 963 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 963 MovieClip Frame 2
stop();
Symbol 963 MovieClip Frame 3
stop();
Symbol 963 MovieClip Frame 4
stop();
Symbol 963 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Symbol 963 MovieClip Frame 6
stop();
Symbol 963 MovieClip Frame 7
stop();
_root.wormDead = 1;
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 100;
_parent.score = _parent.score + 100;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 200;
_parent.score = _parent.score + 200;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
}
Set(_parent.enemyCount, (_parent.enemyCount = _parent.enemyCount + 1));
Symbol 963 MovieClip Frame 8
stop();
_name = "rollerDead";
Symbol 963 MovieClip Frame 10
stop();
Symbol 965 MovieClip Frame 40
_root.scrb04 = 1;
_root.bug4._visible = true;
_root.scarabFound = false;
Symbol 965 MovieClip Frame 86
stop();
Symbol 966 MovieClip Frame 1
stop();
Symbol 966 MovieClip Frame 2
stop();
Symbol 966 MovieClip Frame 3
stop();
_root.tempScrb04 = 1;
_name = "done";
Symbol 973 MovieClip Frame 5
stop();
Symbol 978 MovieClip Frame 41
stop();
Symbol 979 MovieClip Frame 1
stop();
Symbol 979 MovieClip Frame 2
stop();
Symbol 981 MovieClip Frame 1
stop();
Symbol 981 MovieClip Frame 30
_root.whiteFlash.play();
Symbol 981 MovieClip Frame 35
_root.portal.gotoAndStop(2);
_root.portalOpp = 1;
Symbol 981 MovieClip Frame 175
_root.portalOpp = 0;
_root.portal.gotoAndStop(1);
_root.continueMC.gotoAndStop(2);
_root.sceneDone = true;
Symbol 981 MovieClip Frame 206
stop();
Symbol 983 MovieClip Frame 1
stop();
Symbol 998 MovieClip Frame 35
stop();
_parent.gotoAndStop(1);
Symbol 1001 MovieClip Frame 35
stop();
_parent.gotoAndStop(1);
Symbol 1005 MovieClip Frame 1
play();
Symbol 1005 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1005 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 100;
_root.score = _root.score + 100;
Symbol 1005 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 1005 MovieClip Frame 20
play();
Symbol 1005 MovieClip Frame 40
stop();
_parent.gotoAndStop(1);
Symbol 1015 MovieClip Frame 30
stop();
_root.allEnemyDead();
Symbol 1016 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1016 MovieClip Frame 2
stop();
Symbol 1016 MovieClip Frame 3
stop();
Symbol 1016 MovieClip Frame 4
stop();
Symbol 1016 MovieClip Frame 5
stop();
robberHealth = robberHealth - _root.gameMode;
_name = "e1-Busy";
Symbol 1016 MovieClip Frame 6
stop();
Symbol 1016 MovieClip Frame 7
stop();
_name = "bossDead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 300;
_parent.score = _parent.score + 300;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 400;
_parent.score = _parent.score + 400;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 550;
_parent.score = _parent.score + 550;
}
Set(_parent.enemyCount, (_parent.enemyCount = _parent.enemyCount + 1));
_root.bonusPotions();
Symbol 1016 MovieClip Frame 10
stop();
Symbol 1018 Button
on (keyPress "1") {
if (HUD.staminaP > 0) {
regainStamina.gotoAndPlay(2);
HUD.staminaP--;
}
}
on (keyPress "2") {
if (HUD.healthP > 0) {
regainHealth.gotoAndPlay(2);
HUD.healthP--;
}
}
on (keyPress "3") {
if (HUD.invisibleP > 0) {
invisibleON = 1;
HUD.invisibleP--;
}
}
Symbol 1026 MovieClip Frame 1
stop();
Symbol 1026 MovieClip Frame 2
stop();
Symbol 1028 MovieClip Frame 1
stop();
Symbol 1043 MovieClip Frame 120
_root.gotoAndStop("ghostA");
Symbol 1044 MovieClip Frame 120
_root.gotoAndStop("fourD");
Symbol 1047 MovieClip Frame 60
stop();
Symbol 1056 MovieClip Frame 55
stop();
Symbol 1057 MovieClip Frame 1
stop();
Symbol 1057 MovieClip Frame 2
stop();
_root.bonusPotions();
Symbol 1059 MovieClip Frame 1
stop();
Symbol 1076 MovieClip Frame 20
stop();
_parent.gotoAndStop(1);
Symbol 1077 MovieClip Frame 1
play();
Symbol 1077 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1077 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 50;
_root.score = _root.score + 50;
Symbol 1077 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_root.enemyCount = _root.enemyCount + 1;
_parent.gotoAndStop(7);
}
Symbol 1077 MovieClip Frame 20
play();
Symbol 1077 MovieClip Frame 30
stop();
_parent.gotoAndStop(1);
Symbol 1079 MovieClip Frame 20
_parent.gotoAndStop(1);
Symbol 1085 MovieClip Frame 35
stop();
Symbol 1086 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1086 MovieClip Frame 2
stop();
Symbol 1086 MovieClip Frame 3
stop();
Symbol 1086 MovieClip Frame 4
stop();
Symbol 1086 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Instance of Symbol 1077 MovieClip in Symbol 1086 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1086 MovieClip Frame 6
stop();
Symbol 1086 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 100;
_parent.score = _parent.score + 100;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 200;
_parent.score = _parent.score + 200;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
}
Symbol 1086 MovieClip Frame 10
stop();
Symbol 1090 MovieClip Frame 1
stop();
Symbol 1091 MovieClip Frame 1
stop();
Symbol 1091 MovieClip Frame 2
stop();
Symbol 1097 MovieClip Frame 10
_root.scarabFound = true;
_root.scarabPiece2.gotoAndStop(2);
Symbol 1097 MovieClip Frame 30
stop();
Symbol 1098 MovieClip Frame 1
stop();
Symbol 1098 MovieClip Frame 2
stop();
_name = "chestBroke";
Symbol 1100 MovieClip Frame 1
stop();
Symbol 1111 MovieClip Frame 14
stop();
_parent.gotoAndStop(1);
Symbol 1114 MovieClip Frame 11
stop();
_parent.gotoAndStop(1);
Symbol 1117 MovieClip Frame 1
play();
Symbol 1117 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1117 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 500;
_root.score = _root.score + 500;
Symbol 1117 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_root.enemyCount = _root.enemyCount + 1;
_parent.gotoAndStop(7);
}
Symbol 1117 MovieClip Frame 20
play();
Symbol 1117 MovieClip Frame 38
stop();
_parent.gotoAndStop(1);
Symbol 1118 MovieClip Frame 20
_parent.gotoAndStop(1);
Symbol 1122 MovieClip Frame 94
_root.bonusPotions();
Symbol 1122 MovieClip Frame 180
stop();
_root.portalOpp = 1;
Symbol 1123 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1123 MovieClip Frame 2
stop();
Symbol 1123 MovieClip Frame 3
stop();
_name = "e1-Busy";
Instance of Symbol 1111 MovieClip in Symbol 1123 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1123 MovieClip Frame 4
stop();
Instance of Symbol 1114 MovieClip in Symbol 1123 MovieClip Frame 4
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1123 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Instance of Symbol 1117 MovieClip in Symbol 1123 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1123 MovieClip Frame 6
stop();
Symbol 1123 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 2000;
_parent.score = _parent.score + 2000;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 5000;
_parent.score = _parent.score + 5000;
}
Symbol 1123 MovieClip Frame 10
stop();
Symbol 1125 MovieClip Frame 1
stop();
Symbol 1127 MovieClip Frame 62
_root.scrb02 = 1;
_root.bug2._visible = true;
_root.scarabFound = false;
Symbol 1127 MovieClip Frame 105
stop();
Symbol 1128 MovieClip Frame 1
stop();
Symbol 1128 MovieClip Frame 2
stop();
Symbol 1128 MovieClip Frame 3
stop();
_root.tempScrb02 = 1;
_name = "done";
Symbol 1145 Button
on (release) {
_root.nextFrame();
}
Symbol 1146 MovieClip Frame 1
stop();
Symbol 1148 MovieClip Frame 1
stop();
Symbol 1155 Button
on (release) {
_root.nextFrame();
}
Symbol 1156 MovieClip Frame 1
stop();
Symbol 1157 MovieClip Frame 1
play();
Symbol 1157 MovieClip Frame 2
_root.levelTune.setVolume(65);
Symbol 1157 MovieClip Frame 5
_root.levelTune.setVolume(45);
Symbol 1157 MovieClip Frame 10
_root.levelTune.setVolume(35);
Symbol 1157 MovieClip Frame 15
_root.levelTune.setVolume(25);
Symbol 1157 MovieClip Frame 20
_root.levelTune.setVolume(0);
Symbol 1157 MovieClip Frame 25
_root.levelTune.stop();
_root.levelTune.setVolume(100);
_root.myMusic = 1;
Symbol 1157 MovieClip Frame 26
stop();
Symbol 1159 Button
on (release) {
gotoAndPlay (2);
}
Symbol 1162 MovieClip Frame 1
stop();
Symbol 1164 Button
on (press) {
_root.myArray.splice(0);
_root.candles.candle1.gotoAndPlay(4);
_root.candles.candle2.gotoAndPlay(4);
_root.candles.candle3.gotoAndPlay(4);
_root.candles.candle4.gotoAndPlay(4);
_root.candles.candle5.gotoAndPlay(4);
_root.candles.candle6.gotoAndPlay(4);
_root.candlesLit = 0;
}
Symbol 1165 MovieClip Frame 1
stop();
Symbol 1169 Button
on (press) {
_root.levelTune = new Sound();
_root.levelTune.attachSound("fightJamz4");
_root.levelTune.setVolume(100);
_root.levelTune.start(0, 100);
_root.myMusic = 1;
}
on (release) {
_root.gotoAndStop("secretCave");
}
Symbol 1171 Button
on (press) {
s6.gotoAndPlay(2);
gotoAndStop (2);
}
Symbol 1173 MovieClip Frame 1
stop();
Symbol 1181 Button
on (press) {
s6.gotoAndPlay(2);
}
Symbol 1188 MovieClip Frame 1
stop();
flame1.useHandCursor = false;
Symbol 1188 MovieClip Frame 2
stop();
flame1.useHandCursor = false;
_root.myArray.push("c1");
_root.candlesLit++;
_root.checkCandles();
Symbol 1188 MovieClip Frame 3
_root.candlesLit--;
Symbol 1189 Button
on (press) {
s3.gotoAndPlay(2);
gotoAndStop (2);
}
Symbol 1191 MovieClip Frame 1
stop();
Symbol 1192 Button
on (press) {
s3.gotoAndPlay(2);
}
Symbol 1193 MovieClip Frame 1
stop();
flame1.useHandCursor = false;
Symbol 1193 MovieClip Frame 2
stop();
flame1.useHandCursor = false;
_root.myArray.push("c6");
_root.candlesLit++;
_root.checkCandles();
Symbol 1193 MovieClip Frame 3
_root.candlesLit--;
Symbol 1194 Button
on (press) {
s4.gotoAndPlay(2);
gotoAndStop (2);
}
Symbol 1196 MovieClip Frame 1
stop();
Symbol 1197 Button
on (press) {
s4.gotoAndPlay(2);
}
Symbol 1198 MovieClip Frame 1
stop();
flame1.useHandCursor = false;
Symbol 1198 MovieClip Frame 2
stop();
flame1.useHandCursor = false;
_root.myArray.push("c5");
_root.candlesLit++;
_root.checkCandles();
Symbol 1198 MovieClip Frame 3
_root.candlesLit--;
Symbol 1199 Button
on (press) {
s1.gotoAndPlay(2);
gotoAndStop (2);
}
Symbol 1201 MovieClip Frame 1
stop();
Symbol 1202 Button
on (press) {
s1.gotoAndPlay(2);
}
Symbol 1203 MovieClip Frame 1
stop();
flame1.useHandCursor = false;
Symbol 1203 MovieClip Frame 2
stop();
flame1.useHandCursor = false;
_root.myArray.push("c3");
_root.candlesLit++;
_root.checkCandles();
Symbol 1203 MovieClip Frame 3
_root.candlesLit--;
Symbol 1204 Button
on (press) {
s2.gotoAndPlay(2);
gotoAndStop (2);
}
Symbol 1206 MovieClip Frame 1
stop();
Symbol 1207 Button
on (press) {
s2.gotoAndPlay(2);
}
Symbol 1208 MovieClip Frame 1
stop();
flame1.useHandCursor = false;
Symbol 1208 MovieClip Frame 2
stop();
flame1.useHandCursor = false;
_root.myArray.push("c4");
_root.candlesLit++;
_root.checkCandles();
Symbol 1208 MovieClip Frame 3
_root.candlesLit--;
Symbol 1209 Button
on (press) {
s5.gotoAndPlay(2);
gotoAndStop (2);
}
Symbol 1211 MovieClip Frame 1
stop();
Symbol 1212 Button
on (press) {
s5.gotoAndPlay(2);
}
Symbol 1213 MovieClip Frame 1
stop();
flame1.useHandCursor = false;
Symbol 1213 MovieClip Frame 2
stop();
flame1.useHandCursor = false;
_root.myArray.push("c2");
_root.candlesLit++;
_root.checkCandles();
Symbol 1213 MovieClip Frame 3
_root.candlesLit--;
Symbol 1214 MovieClip Frame 1
stop();
Symbol 1218 MovieClip Frame 210
stop();
_parent.nextFrame();
Symbol 1237 MovieClip Frame 1
stop();
Symbol 1237 MovieClip Frame 2
_name = "done";
play();
Symbol 1237 MovieClip Frame 49
_root.newLife.gotoAndStop(2);
_root.newLifeFound = true;
Symbol 1237 MovieClip Frame 86
gotoAndStop (1);
stop();
Symbol 1243 MovieClip Frame 10
stop();
Symbol 1244 MovieClip Frame 1
stop();
Symbol 1244 MovieClip Frame 2
stop();
Symbol 1245 MovieClip Frame 1
stop();
Symbol 1253 MovieClip Frame 1
play();
Symbol 1253 MovieClip Frame 5
_parent._x = _parent._x - (_parent.dx * 2);
Symbol 1253 MovieClip Frame 24
stop();
_parent.gotoAndStop(1);
Symbol 1255 MovieClip Frame 30
stop();
_parent.gotoAndStop(1);
Symbol 1256 MovieClip Frame 1
play();
Symbol 1256 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1256 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 100;
_root.score = _root.score + 100;
Symbol 1256 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 1256 MovieClip Frame 20
play();
Symbol 1256 MovieClip Frame 40
stop();
_parent.gotoAndStop(1);
Symbol 1258 MovieClip Frame 15
_parent.gotoAndStop(1);
Symbol 1261 MovieClip Frame 1
play();
Symbol 1261 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1261 MovieClip Frame 18
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 500;
_root.score = _root.score + 500;
Symbol 1261 MovieClip Frame 85
stop();
_root.allEnemyDead();
Symbol 1262 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1262 MovieClip Frame 2
stop();
Symbol 1262 MovieClip Frame 3
stop();
_name = "e1-Busy";
Symbol 1262 MovieClip Frame 4
stop();
Symbol 1262 MovieClip Frame 5
stop();
robberHealth = robberHealth - (_root.gameMode / 2);
_name = "e1-Busy";
Instance of Symbol 1256 MovieClip in Symbol 1262 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1262 MovieClip Frame 6
stop();
Symbol 1262 MovieClip Frame 7
stop();
_name = "dead";
_parent.enemyCount = _parent.enemyCount + 1;
Instance of Symbol 1261 MovieClip in Symbol 1262 MovieClip Frame 7
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1262 MovieClip Frame 10
stop();
Symbol 1263 MovieClip Frame 11
stop();
_root.sceneDone = true;
Symbol 1264 MovieClip Frame 1
stop();
Symbol 1264 MovieClip Frame 2
stop();
Symbol 1264 MovieClip Frame 3
stop();
_name = "done";
_root.tempLife++;
_root.totalLives = _root.totalLives + 1;
_root.HUD.myLives = _root.HUD.myLives + 1;
_root.newLifeFound = false;
Symbol 1271 Button
on (keyPress "1") {
if (HUD.staminaP > 0) {
regainStamina.gotoAndPlay(2);
HUD.staminaP--;
}
}
on (keyPress "2") {
if (HUD.healthP > 0) {
regainHealth.gotoAndPlay(2);
HUD.healthP--;
}
}
on (keyPress "3") {
if (HUD.invisibleP > 0) {
HUD.invisibilityMeter._yscale = 100;
invisibleON = 1;
HUD.invisibleP--;
sceneDone = true;
}
}
Symbol 1272 MovieClip Frame 27
_root.scrb03 = 1;
_root.bug3._visible = true;
_root.scarabFound = false;
Symbol 1272 MovieClip Frame 70
stop();
_root.continueMC.gotoAndStop(2);
_root.sceneDone = true;
Symbol 1273 MovieClip Frame 1
stop();
Symbol 1273 MovieClip Frame 2
stop();
Symbol 1273 MovieClip Frame 3
stop();
_root.tempScrb03 = 1;
_name = "done";
Symbol 1276 Button
on (release) {
_root.pauseGame = 0;
gotoAndStop (1);
}
Symbol 1277 MovieClip Frame 1
stop();
Symbol 1277 MovieClip Frame 2
stop();
Symbol 1295 MovieClip Frame 1
stop();
Symbol 1295 MovieClip Frame 2
_name = "caveHoleOpen";
_root.scarabFound = true;
Symbol 1295 MovieClip Frame 11
_root.scarabPiece3.gotoAndStop(2);
Symbol 1295 MovieClip Frame 60
stop();
continueMC.gotoAndStop(2);
Symbol 1306 MovieClip Frame 17
stop();
_parent.gotoAndStop(1);
Symbol 1310 MovieClip Frame 30
stop();
_parent.gotoAndStop(1);
Symbol 1314 MovieClip Frame 1
play();
Symbol 1314 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1314 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 50;
_root.score = _root.score + 50;
Symbol 1314 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 1314 MovieClip Frame 20
play();
Symbol 1314 MovieClip Frame 50
stop();
_parent.gotoAndStop(1);
Symbol 1316 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 1319 MovieClip Frame 21
stop();
_root.allEnemyDead();
_root.bonusPotions();
Symbol 1320 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1320 MovieClip Frame 2
stop();
Symbol 1320 MovieClip Frame 3
stop();
Instance of Symbol 1306 MovieClip in Symbol 1320 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1320 MovieClip Frame 4
stop();
_root.throwFlame();
Instance of Symbol 1310 MovieClip in Symbol 1320 MovieClip Frame 4
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1320 MovieClip Frame 5
stop();
robberHealth = robberHealth - _root.gameMode;
_name = "e1-Busy";
Instance of Symbol 1314 MovieClip in Symbol 1320 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1320 MovieClip Frame 6
stop();
Symbol 1320 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 250;
_parent.score = _parent.score + 250;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 350;
_parent.score = _parent.score + 350;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 500;
_parent.score = _parent.score + 500;
}
Set(_parent.enemyCount, (_parent.enemyCount = _parent.enemyCount + 1));
Symbol 1320 MovieClip Frame 10
stop();
Symbol 1320 MovieClip Frame 15
stop();
Symbol 1323 MovieClip Frame 1
stop();
Symbol 1323 MovieClip Frame 2
_root.enemyAttack();
Instance of Symbol 1322 MovieClip in Symbol 1323 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.difficulty != "easy") {
_root.HUD.healthMeter._xscale = _root.HUD.healthMeter._xscale - 1;
} else {
_root.HUD.healthMeter._xscale = _root.HUD.healthMeter._xscale - 0.05;
}
}
Symbol 1323 MovieClip Frame 40
removeMovieClip(this);
Symbol 1340 MovieClip Frame 14
stop();
_parent.gotoAndStop(1);
Symbol 1342 MovieClip Frame 14
stop();
_parent.gotoAndStop(1);
Symbol 1345 MovieClip Frame 1
play();
Symbol 1345 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1345 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 100;
_root.score = _root.score + 100;
Symbol 1345 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 1345 MovieClip Frame 20
play();
Symbol 1345 MovieClip Frame 32
stop();
_parent.gotoAndStop(1);
Symbol 1346 MovieClip Frame 20
_parent.gotoAndStop(1);
Symbol 1347 MovieClip Frame 52
stop();
_root.allEnemyDead();
Symbol 1348 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1348 MovieClip Frame 2
stop();
Symbol 1348 MovieClip Frame 3
stop();
_name = "e1-Busy";
Instance of Symbol 1340 MovieClip in Symbol 1348 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1348 MovieClip Frame 4
stop();
Instance of Symbol 1342 MovieClip in Symbol 1348 MovieClip Frame 4
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1348 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Instance of Symbol 1345 MovieClip in Symbol 1348 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1348 MovieClip Frame 6
stop();
Symbol 1348 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 500;
_parent.score = _parent.score + 500;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 2500;
_parent.score = _parent.score + 2500;
}
Set(_parent.enemyCount, (_parent.enemyCount = _parent.enemyCount + 1));
_root.findGem();
Symbol 1348 MovieClip Frame 10
stop();
Symbol 1354 MovieClip Frame 1
stop();
Symbol 1355 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1355 MovieClip Frame 2
stop();
Symbol 1355 MovieClip Frame 3
stop();
_name = "e1-Busy";
Instance of Symbol 1340 MovieClip in Symbol 1355 MovieClip Frame 3
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1355 MovieClip Frame 4
stop();
Instance of Symbol 1342 MovieClip in Symbol 1355 MovieClip Frame 4
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1355 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Instance of Symbol 1345 MovieClip in Symbol 1355 MovieClip Frame 5
onClipEvent (load) {
var thisGuyFly = 0;
}
onClipEvent (enterFrame) {
if (thisGuyFly) {
_parent._x = _parent._x - _parent.dx;
}
}
Symbol 1355 MovieClip Frame 6
stop();
Symbol 1355 MovieClip Frame 7
stop();
_name = "dead";
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
Set(_parent.enemyCount, (_parent.enemyCount = _parent.enemyCount + 1));
_root.bonusPotions();
Symbol 1355 MovieClip Frame 10
stop();
Symbol 1367 MovieClip Frame 20
stop();
Symbol 1368 MovieClip Frame 1
stop();
Symbol 1368 MovieClip Frame 2
stop();
_name = "broken";
Symbol 1371 MovieClip Frame 1
stop();
Symbol 1371 MovieClip Frame 2
stop();
Symbol 1376 MovieClip Frame 1
stop();
Symbol 1377 MovieClip Frame 1
stop();
Symbol 1379 MovieClip Frame 1
stop();
Symbol 1387 MovieClip Frame 20
stop();
Symbol 1388 MovieClip Frame 1
stop();
Symbol 1388 MovieClip Frame 2
stop();
Symbol 1390 MovieClip Frame 1
stop();
Symbol 1390 MovieClip Frame 2
stop();
Symbol 1392 MovieClip Frame 1
stop();
Symbol 1398 MovieClip Frame 1
stop();
Symbol 1398 MovieClip Frame 2
stop();
Symbol 1400 MovieClip Frame 1
stop();
Symbol 1413 MovieClip Frame 16
stop();
_parent.gotoAndStop(1);
Symbol 1417 MovieClip Frame 1
play();
Symbol 1417 MovieClip Frame 4
thisGuyFly = 1;
Symbol 1417 MovieClip Frame 13
thisGuyFly = 0;
_root.tempScore = _root.tempScore + 150;
_root.score = _root.score + 150;
Symbol 1417 MovieClip Frame 19
if (_parent.robberHealth > 10) {
nextFrame();
} else {
_parent.gotoAndStop(7);
}
Symbol 1417 MovieClip Frame 20
play();
Symbol 1417 MovieClip Frame 35
stop();
_parent.gotoAndStop(1);
Symbol 1421 MovieClip Frame 25
_parent.gotoAndStop(1);
stop();
Symbol 1423 MovieClip Frame 56
stop();
_root.bonusPotions();
_root.allEnemyDead();
Symbol 1424 MovieClip Frame 1
stop();
meBusy = 0;
meBlock = 0;
meSwing = 0;
meHit = 0;
Symbol 1424 MovieClip Frame 2
stop();
Symbol 1424 MovieClip Frame 3
stop();
Symbol 1424 MovieClip Frame 4
stop();
Symbol 1424 MovieClip Frame 5
stop();
if (_root.HUD.staminaMeter._xscale > 60) {
robberHealth = robberHealth - _root.gameMode;
} else {
robberHealth = robberHealth - 5;
}
_name = "e1-Busy";
Symbol 1424 MovieClip Frame 6
stop();
Symbol 1424 MovieClip Frame 7
stop();
_name = "dead";
if (_root.difficulty == "easy") {
_parent.tempScore = _parent.tempScore + 1000;
_parent.score = _parent.score + 1000;
} else if (_root.difficulty == "medium") {
_parent.tempScore = _parent.tempScore + 2500;
_parent.score = _parent.score + 2500;
} else if (_root.difficulty == "hard") {
_parent.tempScore = _parent.tempScore + 3500;
_parent.score = _parent.score + 3500;
}
Set(_parent.enemyCount, (_parent.enemyCount = _parent.enemyCount + 1));
Symbol 1424 MovieClip Frame 10
stop();
Symbol 1427 MovieClip Frame 1
stop();
Symbol 1429 MovieClip Frame 1
stop();
Symbol 1430 Button
on (keyPress "1") {
if (HUD.staminaP > 0) {
regainStamina.gotoAndPlay(2);
HUD.staminaP--;
}
}
on (keyPress "2") {
if (HUD.healthP > 0) {
regainHealth.gotoAndPlay(2);
HUD.healthP--;
}
}
on (keyPress "3") {
if (HUD.invisibleP > 0) {
HUD.invisibilityMeter._yscale = 100;
invisibleON = 1;
HUD.invisibleP--;
sceneDone = true;
continueMC.gotoAndStop(2);
}
}
Symbol 1464 MovieClip Frame 1
stop();
Symbol 1464 MovieClip Frame 2
stop();
Symbol 1478 Button
on (release) {
getURL ("http://www.miniclip.com/Flash/3fn2_wallpaper.zip", "_blank");
}
Symbol 1479 MovieClip Frame 1
stop();
Symbol 1479 MovieClip Frame 2
stop();
Symbol 1480 Button
on (release) {
_root.score = totalScore;
gotoAndStop (1337);
}
Symbol 1482 Button
on (release) {
gotoAndStop ("settings");
}
Symbol 1483 Button
on (release) {
gotoAndStop ("settings");
}
Symbol 1490 MovieClip Frame 1
this._visible = false;
Symbol 1505 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Instance of Symbol 1490 MovieClip "mcHighscores" in Symbol 1511 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1511 MovieClip Frame 2
if (((_url.slice(0, 23) != "http://www.miniclip.com") and (_url.slice(0, 19) != "http://miniclip.com")) and (_url.slice(0, 20) != "http://66.132.254.49")) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?" + noCache);
stop();
}
Symbol 1511 MovieClip Frame 3
stop();