Frame 1
var savefile = SharedObject.getLocal("bot");
_root.kongregateServices.connect();
play.gotoAndStop(2);
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 25;
System.security.allowDomain("server.cpmstar.com");
ads.adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
stop();
_root.menu = new ContextMenu();
_root.menu.hideBuiltInItems();
onEnterFrame = function () {
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar._xscale = percentLoaded;
if (bar._xscale == 100) {
play.gotoAndStop(1);
}
};
Instance of Symbol 36 MovieClip "play" in Frame 1
on (press) {
if (_root.play._currentframe == 1) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 44 MovieClip in Frame 2
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Frame 3
songPlaying = true;
waitOpen = 0;
onEnterFrame = function () {
if (cover1._currentframe == 20) {
waitOpen++;
cover1.stop();
if (waitOpen > 10) {
_root.gotoAndStop("menu");
cover1.gotoAndPlay(21);
}
}
};
Instance of Symbol 60 MovieClip in Frame 3
on (release) {
getURL ("http://coolio-niato.newgrounds.com/", _blank);
}
Frame 4
commands = 0;
level = -1;
Instance of Symbol 102 MovieClip in Frame 4
on (press) {
if (_root.songPlaying) {
_root.songPlaying = false;
_root.song.stop();
} else {
_root.songPlaying = true;
_root.song.play();
}
}
onClipEvent (enterFrame) {
if (_root.songPlaying) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Frame 5
removeMovieClip(_root.cover);
credits._visible = false;
stop();
onEnterFrame = function () {
if (_root.cover1._currentframe == 20) {
cover1.swapDepths(99);
removeMovieClip(cover1);
_root.gotoAndStop("game");
}
};
Frame 6
function deleteLevel() {
draw.swapDepths(99);
removeMovieClip(draw);
x = 0;
while (x < _root["sceneryArray" + _root.level].length) {
_root["c" + (x + 1000)].swapDepths(99);
removeMovieClip(_root["c" + (x + 1000)]);
x = x + 3;
}
x = 1;
while (x <= lightNum) {
_root["d" + x].swapDepths(99);
removeMovieClip(_root["d" + x]);
x++;
}
lights = 0;
lightNum = 0;
}
function resetPositions() {
lights = lightNum;
stepName = "steps";
mcName = "stepsArray";
steps = 0;
steps1 = 0;
steps2 = 0;
min = 0;
base = 0;
lastMin = new Array();
i = 1;
while (i <= lightNum) {
_root["d" + i].layer.gotoAndStop(1);
i++;
}
wait = 0;
charPos[0] = _root["startPos" + _root.level][0];
charPos[1] = _root["startPos" + _root.level][1];
charPos[2] = _root["startPos" + _root.level][2];
char._x = (((draw._x + xCenter) + (charPos[0] * squareSize)) + squareSize) + (charPos[1] * squareSize);
char._y = ((draw._y + yCenter) + ((charPos[1] * squareSize) / 2)) - ((charPos[0] * squareSize) / 2);
char._visible = true;
char.swapDepths((((char._y + 10) + 500) * 500) + 1499);
char.char.gotoAndStop(charPos[2]);
char.char._y = startchary;
char.shadow._y = startshadowy;
}
function reset() {
stepsArray = new Array();
i = 1;
while (i < 13) {
_root["h" + i].gotoAndStop(1);
i++;
}
stepsArrayMin1 = new Array();
stepsArrayMin2 = new Array();
i = 1;
while (i < 9) {
_root["m" + i].gotoAndStop(1);
_root["n" + i].gotoAndStop(1);
i++;
}
resetPositions();
goBot = false;
}
function createArrays() {
currentC = 0;
if (!goBot) {
goBot = true;
stepsArray = new Array();
i = 1;
while (i < 13) {
if (_root["h" + i]._currentframe != 1) {
stepsArray.push(_root["h" + i]._currentframe - 1);
currentC++;
}
i++;
}
stepsArrayMin1 = new Array();
i = 1;
while (i < 9) {
if (_root["m" + i]._currentframe != 1) {
stepsArrayMin1.push(_root["m" + i]._currentframe - 1);
currentC++;
}
i++;
}
stepsArrayMin2 = new Array();
i = 1;
while (i < 9) {
if (_root["n" + i]._currentframe != 1) {
stepsArrayMin2.push(_root["n" + i]._currentframe - 1);
currentC++;
}
i++;
}
} else {
resetPositions();
goBot = false;
}
}
function createGrid(rows, cols) {
lights = 0;
this.createEmptyMovieClip("draw", 2);
draw.lineStyle(30, 16711935, 100);
drawbase.moveTo(0, 0);
draw.lineStyle(1, 0, 50);
x = 0;
while (x < cols) {
y = 0;
while (y < rows) {
gridArray[y][x] = 0;
y++;
}
x++;
}
x = 0;
while (x < cols) {
y = 0;
while (y < rows) {
lightsArray[y][x] = 0;
y++;
}
x++;
}
x = 0;
while (x <= rows) {
y = x * squareSize;
draw.moveTo(xCenter + y, yCenter - (y / 2));
draw.lineTo((xCenter + (cols * squareSize)) + y, yCenter + (((cols * squareSize) - y) / 2));
x = x + 1;
}
x = 0;
while (x <= cols) {
y = x * squareSize;
draw.moveTo(xCenter + y, yCenter + (y / 2));
draw.lineTo((xCenter + (rows * squareSize)) + y, yCenter + ((((-rows) * squareSize) + y) / 2));
x = x + 1;
}
draw._alpha = 70;
cursor.swapDepths(draw.getDepth() + 100000);
draw._x = draw._x + 55;
draw._y = draw._y + 40;
x = 0;
while (x < _root["sceneryArray" + _root.level].length) {
duplicateMovieClip (_root.wall, "c" + (x + 1000), _root.getNextHighestDepth());
xpos = _root["sceneryArray" + _root.level][x];
ypos = _root["sceneryArray" + _root.level][x + 1];
_root["c" + (x + 1000)]._x = (((draw._x + xCenter) + (xpos * squareSize)) + squareSize) + (ypos * squareSize);
_root["c" + (x + 1000)]._y = ((draw._y + yCenter) + ((ypos * squareSize) / 2)) - ((xpos * squareSize) / 2);
_root["c" + (x + 1000)]._visible = true;
_root["c" + (x + 1000)].swapDepths(((_root["c" + (x + 1000)]._y + 500) * 500) + (x + 1000));
gridArray[xpos][ypos] = _root["sceneryArray" + _root.level][x + 2] - 3;
_root["c" + (x + 1000)].gotoAndStop(_root["sceneryArray" + _root.level][x + 2]);
x = x + 3;
}
x = 0;
while (x < _root["tilesArray" + _root.level].length) {
lightNum++;
duplicateMovieClip (_root.wall, "d" + lightNum, _root.getNextHighestDepth());
xpos = _root["tilesArray" + _root.level][x];
ypos = _root["tilesArray" + _root.level][x + 1];
_root["d" + lightNum]._x = (((draw._x + xCenter) + (xpos * squareSize)) + squareSize) + (ypos * squareSize);
_root["d" + lightNum]._y = (((draw._y + yCenter) + ((ypos * squareSize) / 2)) - ((xpos * squareSize) / 2)) + 1;
_root["d" + lightNum]._visible = true;
if (gridArray[xpos][ypos] > 0) {
_root["d" + lightNum].swapDepths(((((_root["d" + lightNum]._y + 500) + 1) * 500) + lightNum) + 1001);
} else {
_root["d" + lightNum].swapDepths((((_root["d" + lightNum]._y + 500) * 15) + lightNum) + 1001);
}
lightsArray[xpos][ypos] = lightNum;
_root["d" + lightNum].gotoAndStop(_root["tilesArray" + _root.level][x + 2]);
_root["d" + lightNum].layer._y = _root["d" + lightNum].layer._y - (gridArray[xpos][ypos] * 18);
lights++;
x = x + 3;
}
char._x = (((draw._x + xCenter) + (charPos[0] * squareSize)) + squareSize) + (charPos[1] * squareSize);
char._y = ((draw._y + yCenter) + ((charPos[1] * squareSize) / 2)) - ((charPos[0] * squareSize) / 2);
char._visible = true;
char.swapDepths((((char._y + 10) + 500) * 500) + 1499);
char.char.gotoAndStop(charPos[2]);
}
cover.gotoAndStop(20);
i = 0;
currentC = 0;
startPos0 = new Array(4, 2, 1);
sceneryArray0 = new Array(0, 0, 5, 0, 1, 5, 0, 2, 5, 0, 3, 5, 0, 4, 5, 0, 5, 5, 0, 6, 5, 0, 7, 5, 7, 0, 5, 7, 1, 5, 7, 2, 5, 7, 3, 5, 7, 4, 5, 7, 5, 5, 7, 6, 5, 7, 7, 5);
tilesArray0 = new Array(4, 4, 2);
startPos1 = new Array(4, 2, 1);
sceneryArray1 = new Array(4, 4, 5, 0, 0, 6, 0, 1, 5, 0, 2, 4, 0, 3, 4, 0, 4, 4, 0, 5, 4, 0, 6, 5, 0, 7, 6, 7, 0, 6, 7, 1, 5, 7, 2, 4, 7, 3, 4, 7, 4, 4, 7, 5, 4, 7, 6, 5, 7, 7, 6);
tilesArray1 = new Array(4, 6, 2);
startPos2 = new Array(3, 0, 1);
sceneryArray2 = new Array(0, 2, 4, 1, 2, 4, 2, 2, 4, 3, 2, 4, 4, 2, 4, 5, 2, 4, 6, 2, 4, 7, 2, 4);
tilesArray2 = new Array(3, 4, 2, 4, 4, 2, 5, 4, 2);
startPos3 = new Array(1, 2, 4);
sceneryArray3 = new Array(3, 2, 4, 4, 2, 5, 5, 2, 5, 5, 3, 5, 5, 4, 5, 5, 5, 5, 5, 6, 5, 5, 7, 5);
tilesArray3 = new Array(5, 7, 2);
startPos4 = new Array(2, 3, 1);
sceneryArray4 = new Array(2, 4, 4, 2, 5, 4, 2, 6, 4, 3, 6, 4, 4, 6, 4, 5, 6, 4, 5, 5, 5, 5, 4, 6, 5, 3, 7);
tilesArray4 = new Array(5, 3, 2);
startPos5 = new Array(1, 2, 4);
sceneryArray5 = new Array(3, 2, 4, 4, 2, 5, 4, 3, 6, 4, 4, 7, 2, 5, 5, 1, 5, 5, 3, 5, 5, 4, 5, 5, 5, 5, 5, 6, 5, 5, 7, 5, 5);
tilesArray5 = new Array(1, 5, 2, 7, 5, 2, 4, 4, 2);
startPos6 = new Array(4, 0, 1);
sceneryArray6 = new Array();
tilesArray6 = new Array(4, 1, 2, 4, 2, 2, 4, 3, 2, 4, 4, 2, 4, 5, 2, 4, 6, 2, 4, 7, 2, 3, 1, 2, 3, 2, 2, 3, 3, 2, 3, 4, 2, 3, 5, 2, 3, 6, 2, 3, 7, 2);
startPos7 = new Array(2, 2, 4);
sceneryArray7 = new Array(3, 2, 4, 3, 6, 4, 5, 6, 4, 2, 5, 4, 4, 5, 4, 6, 5, 4, 5, 2, 4, 6, 3, 4, 4, 3, 4, 2, 4, 4, 3, 4, 4, 5, 4, 4, 2, 6, 4, 4, 6, 4, 4, 4, 4, 4, 2, 4, 6, 2, 4, 6, 4, 4, 6, 6, 4);
tilesArray7 = new Array(2, 4, 2, 2, 6, 2, 4, 6, 2, 4, 4, 2, 4, 2, 2, 6, 2, 2, 6, 4, 2, 6, 6, 2);
startPos8 = new Array(2, 1, 1);
sceneryArray8 = new Array(3, 1, 4, 2, 2, 4, 3, 2, 5, 4, 2, 4, 3, 3, 4, 6, 1, 4, 5, 2, 4, 6, 2, 5, 7, 2, 4, 6, 3, 4, 6, 4, 4, 5, 5, 4, 6, 5, 5, 7, 5, 4, 6, 6, 4, 3, 4, 4, 2, 5, 4, 3, 5, 5, 4, 5, 4, 3, 6, 4);
tilesArray8 = new Array(3, 2, 2, 3, 5, 2, 6, 2, 2, 6, 5, 2, 4, 2, 2, 5, 2, 2, 6, 3, 2, 6, 4, 2, 3, 3, 2, 3, 4, 2, 4, 5, 2, 5, 5, 2);
startPos9 = new Array(1, 0, 1);
sceneryArray9 = new Array(3, 6, 5, 3, 5, 7, 3, 7, 5, 3, 4, 6, 3, 3, 7, 2, 3, 7, 2, 4, 5, 2, 5, 6, 2, 6, 5, 1, 4, 4, 2, 2, 5, 2, 1, 5, 2, 0, 5);
tilesArray9 = new Array(2, 0, 2, 3, 7, 2);
startPos10 = new Array(0, 0, 1);
sceneryArray10 = new Array();
tilesArray10 = new Array();
i = 0;
while (i < 6) {
j = 0;
while (j < 8) {
if (!((i == 0) && (j == 0))) {
tilesArray10.push(i, j, 2);
if ((i % 2) == 1) {
sceneryArray10.push(i, j, 4);
}
}
j++;
}
i++;
}
j = 0;
while (j < 8) {
sceneryArray10.push(6, j, 5);
sceneryArray10.push(7, j, 6);
j++;
}
startPos11 = new Array(0, 4, 4);
sceneryArray11 = new Array(2, 2, 5, 2, 3, 6, 2, 1, 4, 3, 1, 5, 4, 1, 6, 5, 1, 7, 5, 2, 6, 5, 3, 5, 5, 4, 4, 4, 4, 5, 3, 4, 6, 2, 4, 7, 2, 5, 6, 2, 6, 5, 2, 7, 4, 3, 7, 5, 4, 7, 6, 5, 7, 7, 5, 6, 6, 5, 5, 5);
tilesArray11 = new Array();
i = 0;
while (i < sceneryArray11.length) {
sceneryArray11[i] = 7 - sceneryArray11[i];
tilesArray11.push(sceneryArray11[i], sceneryArray11[i + 1], 2);
i = i + 3;
}
lights = 0;
charPos = new Array(0, 1, 1);
lightNum = 0;
goBot = true;
xCenter = -30;
yCenter = Stage.height / 2;
stepsArray = new Array();
stepsArrayMin1 = new Array();
stepsArrayMin2 = new Array();
gridArray = new Array([999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999]);
lightsArray = new Array([999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999], [999]);
squareSize = 27;
i = 1;
while (i <= 7) {
_root["select" + i].gotoAndStop(i + 1);
i++;
}
i = 1;
while (i <= 12) {
_root["h" + i].gotoAndStop(1);
i++;
}
i = 1;
while (i <= 8) {
_root["m" + i].gotoAndStop(1);
_root["n" + i].gotoAndStop(1);
i++;
}
hang = false;
clicked = false;
goBot = false;
lastMin = new Array();
l = 1;
while (l < 8) {
_root["use" + l].gotoAndStop(l);
l++;
}
onMouseDown = function () {
clicked = true;
};
onMouseUp = function () {
clicked = false;
};
steps = 0;
steps1 = 0;
steps2 = 0;
wait = 0;
speed = 13;
xspd = 0;
yspd = 0;
min = 0;
base = 0;
baseHeight = 0;
startchary = char.char._y;
startshadowy = char.shadow._y;
command = 0;
num = 3;
onEnterFrame = function () {
example.gotoAndStop(_root.level + 1);
commandShow = _root.commands;
if (cover._currentframe == 1) {
if (goBot) {
goBtn.word.gotoAndStop(2);
} else {
goBtn.word.gotoAndStop(1);
}
if (!hang) {
if (clicked) {
selected = false;
i = 1;
while (i < 8) {
if (_root["select" + i].hitTest(_xmouse, _ymouse, true)) {
hang = true;
_root.selectmc.gotoAndStop(i + 1);
selected = true;
break;
}
i++;
}
if (!selected) {
i = 1;
while (i <= 12) {
if (_root["h" + i]._currentframe > 1) {
if (_root["h" + i].hitTest(_xmouse, _ymouse, true)) {
hang = true;
_root.selectmc.gotoAndStop(_root["h" + i]._currentframe);
_root["h" + i].gotoAndStop(1);
selected = true;
break;
}
}
i++;
}
}
if (!selected) {
i = 1;
while (i <= 8) {
if (_root["m" + i]._currentframe > 1) {
if (_root["m" + i].hitTest(_xmouse, _ymouse, true)) {
hang = true;
_root.selectmc.gotoAndStop(_root["m" + i]._currentframe);
_root["m" + i].gotoAndStop(1);
selected = true;
break;
}
}
if (_root["n" + i]._currentframe > 1) {
if (_root["n" + i].hitTest(_xmouse, _ymouse, true)) {
hang = true;
_root.selectmc.gotoAndStop(_root["n" + i]._currentframe);
_root["n" + i].gotoAndStop(1);
selected = true;
break;
}
}
i++;
}
}
}
} else {
selectmc.swapDepths(_root.getNextHighestDepth() + 10);
selectmc._x = _xmouse;
selectmc._y = _ymouse;
if (!clicked) {
hang = false;
selected = false;
i = 1;
while (i < 9) {
if (_root["select" + i].hitTest(_xmouse, _ymouse, true)) {
hang = true;
_root.selectmc.gotoAndStop(i + 1);
selected = true;
break;
}
i++;
}
if (!selected) {
i = 1;
while (i <= 12) {
if (_root["h" + i].hitTest(_xmouse, _ymouse, true)) {
_root._root["h" + i].gotoAndStop(selectmc._currentframe);
selected = true;
break;
}
i++;
}
}
if (!selected) {
i = 1;
while (i <= 8) {
if (_root["m" + i].hitTest(_xmouse, _ymouse, true)) {
_root._root["m" + i].gotoAndStop(selectmc._currentframe);
selected = true;
break;
}
if (_root["n" + i].hitTest(_xmouse, _ymouse, true)) {
_root._root["n" + i].gotoAndStop(selectmc._currentframe);
selected = true;
break;
}
i++;
}
}
}
}
if (!clicked) {
selectmc._x = -1000;
}
if (!goBot) {
char.char.gotoAndStop(charPos[2]);
char.char.char.gotoAndStop(1);
if (!hold) {
if (clicked) {
l = 1;
while (l < 8) {
if (_root["use" + l].hitTest(_xmouse, _ymouse, true)) {
hold = true;
num++;
command = num;
if (num > 500) {
num = 1;
}
duplicateMovieClip (_root["use" + l], "btn" + num, num);
_root["btn" + num].gotoAndStop(_root["use" + l]._currentframe);
break;
}
l++;
}
}
} else {
_root["btn" + command]._x = _xmouse - (_root["btn" + command]._width / 2);
_root["btn" + command]._y = _ymouse - (_root["btn" + command]._height / 2);
if (!clicked) {
hit = false;
if (!hit) {
removeMovieClip(_root["btn" + command]);
if (command == num) {
num--;
}
}
hold = false;
}
}
} else if (goBot) {
baseHeight = (base * -18) + startchary;
if (char.char._y < baseHeight) {
char.char._y = char.char._y + 9;
char.shadow._y = char.shadow._y + 9;
} else if (char.char._y > baseHeight) {
char.char._y = char.char._y - 9;
char.shadow._y = char.shadow._y - 9;
}
char.swapDepths((((char._y + 10) + 500) * 500) + 1);
if (min == 0) {
mcName = "stepsArray";
stepName = "steps";
} else {
mcName = "stepsArrayMin" + min;
stepName = "steps" + min;
}
if (_root[mcName][_root[stepName]] == 1) {
if (wait == 0) {
lastpos = charPos[0];
lastpos2 = charPos[1];
char.char.gotoAndStop(charPos[2]);
if (charPos[2] == 1) {
charPos[1]++;
} else if (charPos[2] == 3) {
charPos[1]--;
} else if (charPos[2] == 2) {
charPos[0]--;
} else if (charPos[2] == 4) {
charPos[0]++;
}
if ((gridArray[charPos[0]][charPos[1]] == base) && (gridArray[charPos[0]][charPos[1]] != undefined)) {
xspd = (((((draw._x + xCenter) + (charPos[0] * squareSize)) + squareSize) + (charPos[1] * squareSize)) - char._x) / speed;
yspd = ((((draw._y + yCenter) + ((charPos[1] * squareSize) / 2)) - ((charPos[0] * squareSize) / 2)) - char._y) / speed;
} else {
xspd = 0;
yspd = 0;
charPos[0] = lastpos;
charPos[1] = lastpos2;
}
}
char.char.char.play();
char._x = char._x + xspd;
char._y = char._y + yspd;
if (wait == 7) {
if ((gridArray[charPos[0]][charPos[1]] < base) && (gridArray[charPos[0]][charPos[1]] != undefined)) {
while (base != gridArray[charPos[0]][charPos[1]]) {
base--;
}
}
}
wait++;
if (wait == speed) {
wait = 0;
_root[stepName]++;
}
} else if (_root[mcName][_root[stepName]] == 2) {
if (charPos[2] == 1) {
charPos[2]++;
} else if (charPos[2] == 3) {
charPos[2]++;
} else if (charPos[2] == 2) {
charPos[2]++;
} else if (charPos[2] == 4) {
charPos[2] = 1;
}
char.char.gotoAndStop(charPos[2]);
char.char.char.gotoAndStop(1);
_root[stepName]++;
} else if (_root[mcName][_root[stepName]] == 3) {
if (charPos[2] == 1) {
charPos[2] = 4;
} else if (charPos[2] == 3) {
charPos[2]--;
} else if (charPos[2] == 2) {
charPos[2]--;
} else if (charPos[2] == 4) {
charPos[2]--;
}
char.char.gotoAndStop(charPos[2]);
char.char.char.gotoAndStop(1);
_root[stepName]++;
} else if (_root[mcName][_root[stepName]] == 4) {
if (wait == 0) {
char.char.gotoAndStop(charPos[2] + 8);
char.char.char.gotoAndStop(1);
}
char.char.char.play();
wait++;
if (wait == 1) {
gridPos = lightsArray[charPos[0]][charPos[1]];
if (gridPos > 0) {
if (_root["d" + gridPos].layer._currentframe == 1) {
_root["d" + gridPos].layer.gotoAndStop(2);
lights--;
} else if (_root["d" + gridPos].layer._currentframe == 2) {
_root["d" + gridPos].layer.gotoAndStop(1);
lights++;
}
}
}
if (wait == 14) {
wait = 0;
_root[stepName]++;
}
} else if (_root[mcName][_root[stepName]] == 5) {
steps1 = 0;
lastMin.push(min);
min = 1;
} else if (_root[mcName][_root[stepName]] == 6) {
steps2 = 0;
lastMin.push(min);
min = 2;
} else if (_root[mcName][_root[stepName]] == 7) {
if (wait == 0) {
char.char.gotoAndStop(charPos[2] + 4);
char.char.char.gotoAndStop(1);
char.char.gotoAndStop(charPos[2] + 4);
char.char.char.gotoAndStop(1);
lastpos = charPos[0];
lastpos2 = charPos[1];
if (charPos[2] == 1) {
charPos[1]++;
} else if (charPos[2] == 3) {
charPos[1]--;
} else if (charPos[2] == 2) {
charPos[0]--;
} else if (charPos[2] == 4) {
charPos[0]++;
}
if (((gridArray[charPos[0]][charPos[1]] == (base + 1)) || (gridArray[charPos[0]][charPos[1]] < base)) && (gridArray[charPos[0]][charPos[1]] != undefined)) {
xspd = (((((draw._x + xCenter) + (charPos[0] * squareSize)) + squareSize) + (charPos[1] * squareSize)) - char._x) / speed;
yspd = ((((draw._y + yCenter) + ((charPos[1] * squareSize) / 2)) - ((charPos[0] * squareSize) / 2)) - char._y) / speed;
} else {
xspd = 0;
yspd = 0;
charPos[0] = lastpos;
charPos[1] = lastpos2;
}
}
char.char.char.play();
char._x = char._x + xspd;
char._y = char._y + yspd;
if (wait == 1) {
if ((gridArray[charPos[0]][charPos[1]] == (base + 1)) && (gridArray[charPos[0]][charPos[1]] != undefined)) {
base++;
}
}
if (wait == 7) {
if ((gridArray[charPos[0]][charPos[1]] < base) && (gridArray[charPos[0]][charPos[1]] != undefined)) {
while (base != gridArray[charPos[0]][charPos[1]]) {
base--;
}
}
}
wait++;
if (wait == speed) {
wait = 0;
_root[stepName]++;
}
} else if (_root[mcName][_root[stepName]] == 0) {
_root[stepName]++;
char.char.gotoAndStop(charPos[2]);
char.char.char.gotoAndStop(1);
} else {
if (lastMin.length != 0) {
min = lastMin[lastMin.length - 1];
lastMin.splice(lastMin.length - 1, 1);
trace(min);
if (min == 0) {
steps++;
} else if (min == 1) {
steps1++;
} else if (min == 2) {
steps2++;
}
}
char.char.gotoAndStop(charPos[2]);
char.char.char.gotoAndStop(1);
if ((lights == 0) && (wait == 0)) {
cover.play();
goBot = false;
_root.commands = _root.commands + currentC;
savefile.data.moves = _root.commands;
currentC = 0;
}
}
}
} else {
if (cover._currentframe <= 20) {
cover.level.gotoAndStop(_root.level + 2);
}
if (cover._currentframe == 20) {
if (Key.isDown(32)) {
if (_root.level < 11) {
goBot = false;
deleteLevel();
_root.level++;
trace(_root.level);
if (_root.level != 0) {
if ((_root.level != 12) && (_root.level != 0)) {
savefile.data.level = _root.level;
}
}
createGrid(8, 8);
reset();
cover.play();
} else {
deleteLevel();
_root.gotoAndStop("end");
}
}
}
cover.swapDepths(_root.getNextHighestDepth());
}
};
stop();
Instance of Symbol 177 MovieClip "goBtn" in Frame 6
on (press) {
_root.createArrays();
}
Frame 7
_root.cover.play();
removeMovieClip(_root.char);
removeMovieClip(_root.selectmc);
onEnterFrame = function () {
if (_root.cover._currentframe == 1) {
removeMovieClip(_root.cover);
}
};
commandShower = _root.commands;
Symbol 29 Button
on (press) {
getURL ("http://www.armorgames.com/", _blank);
}
Symbol 44 MovieClip Frame 126
_root.nextFrame();
Symbol 60 MovieClip Frame 94
_root.cover1.play();
_root.cover1.level._visible = false;
_root.cover1.blackthing.gotoAndStop(1);
stop();
Symbol 68 MovieClip Frame 10
stop();
Symbol 95 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 20
stop();
Symbol 110 Button
on (press) {
getURL ("http://coolio-niato.newgrounds.com/", _blank);
}
Symbol 111 Button
on (rollOver) {
_root.credits._visible = true;
}
on (rollOut) {
_root.credits._visible = false;
}
Symbol 112 Button
on (press) {
savefile.data.moves = 0;
savefile.data.level = -1;
_root.commands = 0;
_root.level = -1;
_root.cover1.play();
}
Symbol 113 Button
on (press) {
getURL ("http://www.armorgames.com", _blank);
}
Symbol 114 Button
on (press) {
trace(savefile.data.level);
if (((savefile.data.level != undefined) && (savefile.data.level > -1)) && (savefile.data.moves != undefined)) {
_root.level = savefile.data.level - 1;
if (savefile.data.moves != 0) {
_root.commands = savefile.data.moves;
} else {
_root.commands = 0;
}
} else {
savefile.data.moves = 0;
savefile.data.level = -1;
_root.commands = 0;
_root.level = -1;
}
_root.cover1.play();
}
Symbol 130 MovieClip Frame 6
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 21
gotoAndPlay (4);
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 21
gotoAndPlay (4);
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 13
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 13
stop();
Symbol 151 MovieClip Frame 14
stop();
Symbol 152 MovieClip Frame 14
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 179 Button
on (release) {
_root.reset();
}
Symbol 200 Button
on (release) {
_root.gotoAndStop("menu");
}