Frame 1
function loadInstr() {
ifFrameLoaded (3) {
instrReady = true;
gotoAndStop (3);
}
}
baseFPS = 15;
instrReady = false;
playReady = false;
testing = false;
audioOn = true;
overRide = false;
if (getBytesLoaded() == getBytesTotal()) {
}
function initSound(soundVar) {
Set("sound_" + soundVar, new Sound(_root));
_root["sound_" + soundVar].attachSound(soundVar);
}
function playSound(soundVar) {
if (audioOn) {
_root["sound_" + soundVar].start();
}
}
function restartMusic() {
music_loader.gotoAndPlay("fadein");
}
function setQuality(q) {
_quality = q;
}
function doubleMap(whichMap) {
i = 0;
while (i < whichMap.length) {
i++;
}
}
i = 1;
while (i <= 5) {
Set("gameMap" + i, new Array());
Set("frontMap" + i, new Array());
Set("backMap" + i, new Array());
Set("endMap" + i, new Array());
Set("frontEnd" + i, new Array());
Set("backEnd" + i, new Array());
Set("addMap" + i, new Array());
Set("frontAdd" + i, new Array());
Set("backAdd" + i, new Array());
Set("startMap" + i, new Array());
i++;
}
Frame 2
stop();
gameMap1[0] = [1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap1[1] = [1, 1, 1, 1, 1, 46, 53, 50, 23, 22, 22, 22, 22, 24, 44, 39, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 53, 50, 23, 22, 22, 22, 22, 22, 22, 24, 44, 39, 45, 1, 1, 1, 1, 1, 46, 53, 50, 23, 24, 44, 39, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap1[2] = [2, 2, 2, 4, 54, 49, 57, 58, 21, 21, 21, 21, 21, 21, 47, 48, 5, 41, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 57, 58, 21, 21, 21, 21, 21, 21, 21, 21, 47, 48, 43, 40, 34, 2, 4, 54, 49, 57, 58, 21, 21, 47, 48, 5, 41, 1, 1, 1, 1, 1, 1, 1, 1, 46];
gameMap1[3] = [22, 22, 22, 22, 57, 58, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 31, 25, 25, 25, 60, 59, 21, 21, 21, 21, 47, 48, 22, 22, 22, 57, 58, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 42, 53, 49];
gameMap1[4] = [21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 5, 45, 1, 1, 1, 1, 46, 9, 29, 21, 21, 31, 52, 32, 1, 33, 62, 63, 77, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 5, 45, 1, 1, 1, 46, 9, 57, 58];
gameMap1[5] = [21, 21, 21, 21, 21, 21, 21, 21, 21, 70, 69, 25, 25, 60, 59, 21, 21, 21, 28, 43, 40, 34, 4, 54, 49, 29, 21, 21, 21, 55, 67, 40, 34, 2, 4, 51, 29, 21, 21, 21, 21, 21, 21, 70, 69, 25, 25, 60, 59, 21, 21, 21, 21, 21, 21, 28, 43, 40, 73, 54, 49, 29, 21, 21];
gameMap1[6] = [21, 21, 21, 21, 21, 21, 21, 70, 69, 71, 76, 32, 33, 62, 65, 30, 21, 21, 21, 47, 48, 22, 22, 57, 58, 21, 21, 21, 21, 21, 47, 48, 22, 22, 22, 29, 21, 21, 21, 21, 21, 70, 69, 71, 76, 32, 33, 62, 65, 60, 59, 21, 21, 21, 21, 21, 47, 48, 22, 57, 58, 21, 21, 21];
gameMap1[7] = [25, 25, 25, 25, 25, 25, 27, 72, 75, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 70, 69, 25, 25, 27, 72, 75, 1, 1, 1, 1, 1, 1, 61, 66, 26, 25, 60, 59, 21, 21, 21, 21, 21, 21, 21, 70, 69];
gameMap1[8] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 60, 59, 21, 21, 21, 21, 21, 21, 70, 69, 25, 25, 25, 25, 25, 25, 25, 25, 27, 72, 76, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 62, 65, 60, 59, 21, 21, 21, 70, 69, 71, 75];
gameMap1[9] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 61, 66, 26, 25, 25, 25, 25, 27, 72, 76, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 61, 66, 26, 25, 27, 72, 75, 1, 1];
gameMap1[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
safePath1 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.5, 4, 4, 4, 4, 4, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6.5, 6, 6, 6, 5.5, 5, 4.5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7, 7, 6.5, 6, 6, 6, 6];
startMap1[0] = [1, 1, 1, 1, 1];
startMap1[1] = [1, 1, 1, 1, 1];
startMap1[2] = [2, 2, 2, 2, 2];
startMap1[3] = [22, 22, 22, 22, 22];
startMap1[4] = [21, 21, 21, 21, 21];
startMap1[5] = [21, 21, 21, 21, 21];
startMap1[6] = [21, 21, 21, 21, 21];
startMap1[7] = [25, 25, 25, 25, 25];
startMap1[8] = [1, 1, 1, 1, 1];
startMap1[9] = [1, 1, 1, 1, 1];
startMap1[10] = [1, 1, 1, 1, 1];
k = 0;
while (k < gameMap1.length) {
m = 0;
while (m < 3) {
gameMap1[k].unshift(startMap1[k][m]);
m++;
}
k++;
}
gameMap2[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 35, 1, 1, 1, 1];
gameMap2[1] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 53, 50, 23, 22, 22, 22, 24, 44, 39, 45, 1, 1, 1, 1, 46, 53, 50, 23, 22, 22, 22, 22, 22, 24, 44, 39, 45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 53, 50, 23, 24, 44, 39, 45, 1];
gameMap2[2] = [2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 57, 58, 21, 21, 21, 21, 21, 47, 48, 43, 40, 34, 4, 54, 49, 57, 58, 21, 21, 21, 21, 21, 21, 21, 47, 48, 43, 39, 45, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 57, 58, 21, 21, 47, 48, 43, 39];
gameMap2[3] = [22, 22, 24, 44, 39, 45, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 21, 21, 21, 21, 21, 21, 47, 48, 22, 22, 57, 58, 70, 69, 25, 25, 25, 30, 21, 21, 21, 21, 21, 47, 48, 43, 39, 45, 1, 1, 1, 1, 1, 46, 9, 29, 21, 21, 21, 21, 21, 21, 47, 48];
gameMap2[4] = [21, 21, 21, 47, 48, 43, 39, 45, 1, 1, 1, 1, 1, 46, 9, 29, 21, 21, 21, 70, 69, 25, 25, 25, 60, 59, 21, 21, 21, 21, 21, 78, 64, 76, 32, 1, 33, 16, 30, 21, 21, 21, 21, 21, 21, 47, 48, 43, 40, 34, 2, 4, 54, 49, 29, 21, 21, 21, 21, 21, 21, 21, 21, 21];
gameMap2[5] = [21, 21, 21, 21, 21, 47, 48, 43, 40, 34, 2, 4, 54, 49, 29, 21, 21, 21, 31, 71, 76, 32, 1, 33, 62, 65, 60, 59, 21, 21, 21, 28, 8, 34, 2, 4, 54, 68, 56, 21, 21, 21, 21, 21, 21, 21, 21, 47, 48, 22, 22, 22, 57, 58, 21, 70, 69, 25, 25, 60, 59, 21, 21, 21];
gameMap2[6] = [21, 21, 21, 21, 21, 21, 21, 47, 48, 22, 22, 22, 57, 58, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 61, 65, 30, 21, 21, 21, 28, 22, 22, 22, 57, 58, 21, 21, 70, 69, 60, 59, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 31, 71, 76, 32, 33, 62, 66, 60, 59, 21];
gameMap2[7] = [25, 25, 25, 60, 59, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21, 31, 71, 76, 62, 65, 60, 59, 21, 21, 21, 21, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 61, 66, 26];
gameMap2[8] = [1, 1, 33, 62, 65, 60, 59, 21, 21, 21, 21, 21, 21, 21, 70, 69, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 60, 59, 21, 21, 21, 21, 21, 70, 69, 17, 1, 1, 1, 1, 61, 65, 60, 59, 21, 21, 21, 70, 69, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap2[9] = [1, 1, 1, 1, 1, 61, 66, 26, 25, 25, 25, 25, 25, 27, 72, 75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 61, 66, 26, 25, 25, 25, 27, 72, 75, 1, 1, 1, 1, 1, 1, 1, 61, 66, 26, 25, 27, 72, 75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap2[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
safePath2 = [6, 6, 6, 6, 6, 6.5, 7, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7, 6.5, 6, 5, 4, 3.5, 3, 3, 3, 3, 3, 3, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7, 7, 7, 7, 6.5, 6, 5.5, 5, 5, 5, 5, 5, 5.5, 6, 6.5, 6.5, 6.5, 6.5, 6, 5.5, 5, 4.5, 4, 4, 4, 4, 4, 4.5, 5, 5];
endMap2[0] = [1, 1, 1];
endMap2[1] = [39, 41, 1];
endMap2[2] = [48, 5, 41];
endMap2[3] = [21, 28, 7];
endMap2[4] = [21, 21, 28];
endMap2[5] = [21, 21, 21];
endMap2[6] = [26, 25, 25];
endMap2[7] = [1, 1, 1];
endMap2[8] = [1, 1, 1];
endMap2[9] = [1, 1, 1];
endMap2[10] = [1, 1, 1];
k = 0;
while (k < gameMap2.length) {
gameMap2[k].splice(gameMap2[k].length - endMap2[k].length);
gameMap2[k] = gameMap2[k].concat(endMap2[k]);
k++;
}
gameMap3[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap3[1] = [1, 1, 1, 1, 1, 1, 1, 42, 10, 23, 22, 22, 22, 22, 24, 6, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 10, 23, 22, 22, 22, 22, 22, 24, 6, 41, 1, 1, 1, 1, 1, 1, 42, 10, 23, 22, 22, 24, 6, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap3[2] = [1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap3[3] = [34, 2, 2, 2, 2, 4, 11, 29, 21, 21, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 42, 9, 29, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 3, 2, 2];
gameMap3[4] = [22, 22, 22, 22, 22, 22, 29, 21, 21, 31, 25, 25, 25, 25, 30, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 21, 21, 31, 25, 25, 30, 21, 21, 28, 7, 34, 4, 11, 29, 21, 21, 21, 21, 21, 21, 21, 21, 28, 5, 41, 1, 1, 42, 10, 23, 22, 22];
gameMap3[5] = [21, 21, 21, 21, 21, 21, 21, 21, 31, 18, 32, 1, 1, 33, 14, 30, 21, 21, 28, 5, 41, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 21, 21, 31, 108, 32, 33, 14, 30, 21, 21, 28, 22, 22, 29, 21, 31, 25, 25, 30, 21, 21, 21, 21, 21, 28, 7, 34, 4, 11, 29, 21, 21, 21];
gameMap3[6] = [25, 25, 25, 25, 25, 25, 25, 27, 19, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 28, 7, 34, 2, 2, 4, 11, 29, 21, 21, 21, 21, 21, 21, 28, 107, 41, 1, 1, 74, 30, 21, 21, 21, 21, 21, 31, 18, 32, 33, 37, 26, 25, 25, 30, 21, 21, 28, 22, 22, 29, 21, 21, 21, 31];
gameMap3[7] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 28, 22, 22, 22, 22, 29, 21, 31, 25, 25, 30, 21, 21, 21, 28, 7, 34, 4, 51, 29, 21, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 33, 14, 30, 21, 21, 21, 21, 21, 21, 21, 31, 18];
gameMap3[8] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 31, 18, 32, 33, 14, 30, 21, 21, 21, 28, 22, 22, 29, 21, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 31, 17, 1];
gameMap3[9] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 26, 25, 25, 25, 25, 25, 27, 19, 1, 1, 1, 1, 15, 26, 25, 25, 25, 25, 25, 25, 25, 25, 25, 27, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 26, 25, 25, 25, 27, 19, 1, 1];
gameMap3[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 42, 9, 29, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 7, 34, 4, 110, 23, 22, 22, 29, 21, 31, 25, 25, 25, 25, 30, 21, 21, 28, 5, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 21, 28, 5, 41];
gameMap4[3] = [2, 2, 2, 35, 1, 1, 1, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 31, 25, 25, 25, 25, 25, 30, 21, 21, 28, 22, 22, 29, 21, 21, 21, 21, 31, 108, 32, 1, 1, 33, 16, 30, 21, 21, 28, 7, 34, 2, 2, 2, 2, 2, 2, 2, 4, 11, 29, 31, 25, 25, 25, 30, 28, 7];
gameMap4[4] = [22, 22, 22, 24, 6, 41, 1, 1, 1, 1, 1, 42, 9, 29, 21, 21, 31, 18, 32, 1, 1, 1, 33, 14, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 8, 34, 1, 1, 1, 12, 29, 21, 21, 21, 28, 22, 22, 22, 115, 111, 114, 22, 22, 22, 29, 31, 18, 32, 1, 33, 14, 30, 28];
gameMap4[5] = [21, 21, 21, 21, 28, 5, 41, 1, 1, 1, 42, 9, 29, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 24, 109, 73, 11, 29, 21, 21, 21, 21, 21, 21, 21, 31, 108, 36, 16, 30, 21, 21, 31, 17, 1, 1, 1, 1, 1, 13, 30];
gameMap4[6] = [25, 25, 30, 21, 21, 28, 7, 34, 2, 4, 11, 29, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 22, 29, 21, 31, 25, 25, 25, 30, 21, 21, 28, 8, 73, 51, 29, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 15];
gameMap4[7] = [32, 33, 14, 30, 21, 21, 28, 22, 22, 22, 29, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 31, 18, 32, 1, 33, 14, 30, 21, 21, 28, 22, 29, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap4[8] = [1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 13, 30, 21, 21, 21, 21, 31, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap4[9] = [1, 1, 1, 1, 15, 26, 25, 25, 25, 25, 25, 27, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 26, 25, 25, 25, 25, 25, 25, 25, 25, 27, 19, 1, 1, 1, 1, 1, 1, 1, 15, 26, 25, 25, 27, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
gameMap4[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
safePath4 = [5, 5, 5, 5.5, 6.5, 7.5, 8, 8, 8, 8, 8, 7.5, 7, 6, 5, 4, 3.5, 3, 3, 3, 3, 3, 3, 3, 3, 3.5, 4, 4.5, 5, 5, 5, 5, 5, 5.5, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 6, 7, 7, 7, 7, 7, 7, 6.5, 5.5, 4.5, 3.5, 3, 3, 3, 3, 3, 3.5, 4, 5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5];
endMap4[0] = [1, 1];
endMap4[1] = [41, 1];
endMap4[2] = [5, 41];
endMap4[3] = [28, 5];
endMap4[4] = [30, 28];
endMap4[5] = [13, 30];
endMap4[6] = [1, 15];
endMap4[7] = [1, 1];
endMap4[8] = [1, 1];
endMap4[9] = [1, 1];
endMap4[10] = [1, 1];
addMap4[0] = [1, 1, 141, 142, 143, 144, 145];
addMap4[1] = [1, 1, 148, 149, 150, 151, 152];
addMap4[2] = [1, 1, 155, 156, 157, 158, 159];
addMap4[3] = [41, 1, 162, 163, 164, 165, 166];
addMap4[4] = [7, 168, 169, 170, 171, 172, 173];
addMap4[5] = [28, 175, 176, 177, 178, 179, 180];
addMap4[6] = [26, 182, 183, 184, 185, 186, 187];
addMap4[7] = [1, 1, 1, 1, 1, 1, 1];
addMap4[8] = [1, 196, 197, 198, 199, 200, 201];
addMap4[9] = [1, 203, 204, 205, 206, 207, 208];
addMap4[10] = [1, 210, 211, 212, 213, 214, 215];
k = 0;
while (k < gameMap4.length) {
gameMap4[k].splice(gameMap4[k].length - endMap4[k].length);
gameMap4[k] = gameMap4[k].concat(endMap4[k], addMap4[k]);
k++;
}
gameMap5[0] = [146, 80, 80, 80, 80, 80, 80, 82, 81, 81, 81, 87, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 82, 81, 87, 80, 80, 80, 80, 80, 80, 80, 80, 80, 82, 81, 81, 87, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 82, 81, 81, 87, 80, 80, 80, 80, 80, 80];
gameMap5[1] = [153, 80, 80, 80, 80, 123, 94, 23, 22, 22, 22, 24, 90, 122, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 123, 94, 23, 22, 24, 90, 122, 80, 80, 80, 80, 80, 123, 94, 23, 22, 22, 24, 90, 122, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 123, 94, 23, 115, 111, 135, 116, 86, 87, 80, 80, 80];
gameMap5[2] = [160, 80, 80, 80, 123, 93, 29, 21, 21, 21, 21, 21, 28, 89, 122, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 123, 93, 29, 21, 21, 21, 28, 89, 122, 80, 80, 80, 123, 93, 29, 21, 31, 25, 30, 28, 89, 122, 80, 80, 80, 80, 82, 81, 81, 87, 80, 80, 80, 80, 80, 80, 80, 82, 81, 83, 95, 29, 31, 103, 126, 98, 133, 22, 24, 90, 122, 80];
gameMap5[3] = [80, 80, 80, 123, 93, 29, 21, 31, 25, 25, 25, 30, 21, 28, 89, 122, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 123, 93, 29, 31, 25, 25, 30, 21, 28, 91, 86, 81, 83, 95, 29, 21, 31, 103, 126, 98, 30, 28, 91, 86, 81, 83, 118, 23, 22, 22, 24, 90, 122, 80, 80, 80, 123, 94, 23, 22, 22, 29, 31, 105, 80, 80, 80, 99, 127, 30, 28, 89, 122];
gameMap5[4] = [86, 81, 83, 95, 29, 21, 31, 103, 124, 80, 125, 98, 30, 21, 28, 89, 122, 80, 80, 80, 80, 80, 80, 82, 81, 87, 80, 80, 80, 80, 80, 80, 80, 80, 123, 93, 29, 31, 121, 124, 125, 98, 30, 21, 28, 22, 22, 22, 29, 21, 31, 102, 80, 80, 80, 97, 30, 28, 22, 22, 22, 29, 31, 25, 30, 21, 28, 91, 86, 81, 83, 95, 29, 21, 21, 31, 25, 133, 92, 86, 87, 80, 80, 125, 98, 30, 28, 91];
gameMap5[5] = [22, 22, 22, 29, 21, 31, 102, 80, 80, 80, 80, 80, 97, 30, 21, 28, 89, 122, 80, 80, 80, 123, 94, 23, 22, 24, 90, 122, 80, 80, 80, 80, 80, 123, 93, 29, 21, 28, 92, 131, 80, 80, 97, 30, 21, 21, 21, 31, 25, 128, 104, 80, 80, 80, 80, 80, 97, 30, 21, 21, 21, 31, 121, 126, 98, 30, 21, 28, 22, 22, 22, 29, 21, 21, 31, 121, 126, 100, 133, 22, 24, 90, 122, 80, 80, 120, 30, 28];
gameMap5[6] = [25, 25, 25, 25, 128, 104, 80, 80, 80, 80, 80, 80, 80, 97, 30, 21, 28, 91, 86, 81, 83, 95, 29, 31, 25, 30, 28, 89, 122, 80, 80, 80, 123, 93, 29, 21, 21, 21, 28, 24, 90, 80, 80, 120, 30, 21, 31, 103, 84, 80, 80, 80, 80, 80, 80, 80, 80, 97, 30, 21, 21, 28, 117, 80, 80, 120, 30, 21, 21, 21, 31, 25, 30, 21, 28, 92, 130, 119, 132, 25, 30, 28, 89, 122, 80, 137, 134, 31];
gameMap5[7] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 97, 30, 21, 28, 22, 22, 22, 29, 31, 103, 126, 98, 30, 28, 91, 86, 81, 83, 95, 29, 31, 25, 25, 30, 21, 21, 28, 91, 130, 119, 29, 31, 102, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 97, 30, 21, 21, 28, 91, 130, 119, 29, 21, 21, 31, 103, 126, 101, 127, 25, 112, 111, 113, 106, 126, 98, 30, 28, 91, 130, 119, 132, 103];
gameMap5[8] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 97, 30, 21, 21, 21, 21, 31, 102, 80, 80, 80, 97, 30, 28, 22, 22, 22, 29, 31, 103, 124, 125, 98, 30, 21, 21, 28, 22, 29, 31, 102, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 97, 30, 21, 21, 28, 22, 29, 21, 21, 31, 102, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 97, 30, 28, 22, 132, 102, 80];
gameMap5[9] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 99, 127, 25, 25, 128, 104, 80, 80, 80, 80, 80, 99, 127, 25, 25, 25, 128, 104, 80, 80, 80, 80, 99, 127, 25, 25, 25, 128, 104, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 99, 127, 25, 25, 25, 25, 25, 128, 104, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 99, 127, 128, 104, 80, 80];
gameMap5[10] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
safePath5 = [5.5, 5.5, 5.5, 5, 4.5, 4, 3.5, 3, 3, 3, 3, 3, 3, 4, 5, 6, 6.5, 7, 7, 7, 7, 7, 6.5, 5.5, 5.5, 5.5, 6.5, 7.5, 8, 8, 8, 8, 8, 7.5, 6.5, 6, 6, 6, 7, 7, 7.5, 8, 8, 8, 7.5, 6.5, 5.5, 4.5, 4.5, 4, 3, 2.5, 2.5, 2.5, 2.5, 2.5, 3.5, 4.5, 5, 5, 5, 4.5, 3.5, 3.5, 3.5, 4, 5, 6, 6, 6, 5.5, 5.5, 5, 5, 4.5, 3.5, 3.5, 3.5, 4.5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
endMap5[0] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
endMap5[1] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
endMap5[2] = [81, 81, 87, 80, 80, 80, 80, 82, 81, 81, 81, 81, 81];
endMap5[3] = [22, 22, 24, 116, 86, 83, 118, 23, 22, 22, 22, 22, 22];
endMap5[4] = [31, 25, 30, 28, 22, 22, 29, 21, 21, 21, 21, 21, 21];
endMap5[5] = [121, 126, 100, 30, 21, 21, 21, 21, 21, 21, 21, 21, 21];
endMap5[6] = [92, 130, 119, 132, 25, 25, 30, 21, 21, 21, 21, 21, 21];
endMap5[7] = [112, 111, 113, 106, 124, 125, 101, 127, 25, 25, 25, 25, 25];
endMap5[8] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
endMap5[9] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
endMap5[10] = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
addMap5[0] = [80, 80];
addMap5[1] = [80, 80];
addMap5[2] = [81, 81];
addMap5[3] = [22, 22];
addMap5[4] = [21, 21];
addMap5[5] = [21, 21];
addMap5[6] = [21, 21];
addMap5[7] = [25, 25];
addMap5[8] = [80, 80];
addMap5[9] = [80, 80];
addMap5[10] = [80, 80];
k = 0;
while (k < gameMap5.length) {
gameMap5[k].splice(gameMap5[k].length - endMap5[k].length);
gameMap5[k] = gameMap5[k].concat(endMap5[k]);
k++;
}
frontMap1[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontMap1[1] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
front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57, 65, 116, 87, 93, 113, 118, 29, 34, 35, 1, 99, 133, 116, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 113, 116, 1, 11, 19, 25, 132, 1, 1, 69, 74, 123, 153, 117, 87, 94, 116, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1];
frontMap1[8] = [218, 127, 71, 76, 127, 99, 105, 123, 127, 41, 45, 49, 1, 109, 142, 153, 117, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 1, 57, 63, 113, 116, 1, 87, 94, 116, 1, 124, 127, 132, 29, 34, 35, 1, 1, 1, 1, 1, 1, 122, 127, 99, 106, 127, 1, 1, 1, 1, 1, 1, 1, 113, 116, 132];
frontMap1[9] = [219, 1, 81, 84, 1, 109, 111, 1, 1, 1, 1, 1, 1, 1, 1, 122, 153, 118, 57, 63, 113, 116, 1, 11, 18, 149, 153, 118, 71, 32, 123, 127, 132, 99, 106, 127, 132, 1, 1, 1, 41, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 109, 111, 1, 132, 114, 116, 11, 18, 26, 116, 124, 127, 1];
frontMap1[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 71, 32, 123, 127, 132, 29, 34, 35, 123, 127, 81, 84, 1, 1, 1, 109, 111, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 29, 34, 38, 127, 1, 1, 1];
backMap1[0] = [1, 1, 1, 1, 86, 89, 132, 69, 78, 127, 124, 42, 47, 52, 132, 99, 105, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 123, 127, 69, 78, 127, 124, 127, 42, 45, 53, 132, 126, 133, 1, 1, 1, 1, 29, 34, 38, 127, 123, 127, 132, 99, 105, 1, 1, 1, 1, 1, 1, 1, 11, 18, 23];
backMap1[1] = [1, 209, 208, 62, 97, 102, 1, 8, 1, 1, 1, 1, 1, 6, 1, 109, 157, 116, 1, 1, 1, 1, 1, 1, 1, 113, 116, 134, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 136, 141, 132, 56, 66, 116, 151, 45, 49, 1, 6, 1, 1, 109, 145, 116, 1, 1, 1, 1, 1, 1, 29, 34, 35];
backMap1[2] = [1, 212, 73, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 56, 62, 1, 1, 1, 1, 87, 125, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 78, 127, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 1, 1, 1, 1, 1, 113, 43, 45, 53];
backMap1[3] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 79, 11, 18, 26, 116, 99, 105, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 132, 56, 62, 1, 113, 154, 127, 1, 1];
backMap1[4] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 29, 34, 38, 127, 139, 111, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 75, 116, 123, 127, 1, 1, 1];
backMap1[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 45, 53, 1, 1, 1, 1, 1, 1, 1, 1, 41, 45, 51, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 1, 1, 1, 1, 1];
backMap1[6] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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 2, 1];
frontMap2[5] = [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 29, 34, 38, 127, 147, 116, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 63, 113, 116, 1, 1, 1, 1];
frontMap2[6] = [1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 118, 151, 45, 49, 1, 122, 127, 59, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 113, 116, 71, 32, 123, 153, 116, 1, 1, 1];
frontMap2[7] = [57, 65, 116, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 86, 92, 127, 1, 1, 1, 1, 1, 1, 71, 77, 116, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 113, 116, 56, 62, 113, 116, 1, 1, 1, 2, 1, 1, 4, 1, 1, 124, 127, 81, 84, 1, 122, 127, 110, 93, 1];
frontMap2[8] = [71, 76, 127, 132, 113, 116, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 97, 102, 1, 1, 1, 1, 1, 1, 1, 81, 85, 129, 116, 1, 1, 1, 1, 1, 1, 1, 113, 116, 124, 127, 69, 74, 123, 153, 116, 1, 1, 1, 1, 1, 1, 11, 18, 24, 1, 1, 1, 1, 1, 1, 99, 105, 134];
frontMap2[9] = [81, 84, 1, 1, 124, 13, 18, 26, 116, 1, 87, 93, 113, 116, 56, 64, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 110, 93, 113, 116, 1, 11, 18, 159, 127, 1, 1, 1, 1, 1, 122, 127, 134, 87, 94, 116, 113, 116, 29, 34, 35, 1, 1, 1, 1, 1, 1, 109, 111, 1];
frontMap2[10] = [1, 1, 1, 1, 1, 29, 34, 38, 127, 132, 99, 105, 123, 127, 69, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 99, 105, 124, 127, 1, 29, 34, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 99, 106, 127, 123, 127, 41, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontEnd2[0] = [1, 1, 1];
frontEnd2[1] = [1, 1, 1];
frontEnd2[2] = [1, 1, 1];
frontEnd2[3] = [1, 1, 1];
frontEnd2[4] = [1, 1, 1];
frontEnd2[5] = [1, 2, 1];
frontEnd2[6] = [1, 1, 1];
frontEnd2[7] = [87, 93, 1];
frontEnd2[8] = [99, 105, 134];
frontEnd2[9] = [109, 111, 1];
frontEnd2[10] = [1, 1, 1];
backMap2[0] = [1, 11, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 123, 127, 97, 104, 127, 124, 127, 45, 50, 1, 87, 93, 1, 29, 34, 35, 123, 127, 124, 127, 69, 78, 127, 132, 97, 21, 116, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 132, 134, 69, 78, 127, 29, 34, 35];
backMap2[1] = [113, 31, 34, 35, 87, 93, 1, 1, 1, 1, 1, 1, 1, 1, 56, 62, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 132, 99, 133, 116, 44, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 132, 56, 62, 1, 1, 1, 1, 1, 1, 87, 125, 127, 1, 1, 1, 1, 1, 41, 45, 50];
backMap2[2] = [124, 42, 45, 50, 99, 133, 116, 1, 1, 1, 1, 1, 1, 113, 70, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 109, 142, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 69, 74, 113, 116, 11, 18, 23, 1, 99, 105, 1, 1, 1, 1, 1, 1, 7, 1, 1];
backMap2[3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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap2[9] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap2[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd2[0] = [29, 34, 35];
backEnd2[1] = [41, 46, 150];
backEnd2[2] = [1, 122, 52];
backEnd2[3] = [1, 1, 1];
backEnd2[4] = [1, 1, 1];
backEnd2[5] = [1, 1, 1];
backEnd2[6] = [1, 1, 1];
backEnd2[7] = [1, 1, 1];
backEnd2[8] = [1, 1, 1];
backEnd2[9] = [1, 1, 1];
backEnd2[10] = [1, 1, 1];
k = 0;
while (k < frontMap2.length) {
frontMap2[k].splice(frontMap2[k].length - frontEnd2[k].length);
frontMap2[k] = frontMap2[k].concat(frontEnd2[k]);
backMap2[k].splice(backMap2[k].length - backEnd2[k].length);
backMap2[k] = backMap2[k].concat(backEnd2[k]);
k++;
}
arrayMarks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 2, 3, 4, 5, 6, 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 1, 1, 1, 113, 116, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 63, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontMap3[5] = [1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 56, 64, 127, 134, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 134, 71, 32, 113, 116, 1, 1, 1, 1, 1, 1, 113, 116, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1];
frontMap3[6] = [1, 113, 116, 1, 87, 93, 1, 11, 19, 25, 69, 74, 1, 86, 91, 116, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 129, 119, 116, 132, 87, 94, 116, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2];
frontMap3[7] = [56, 64, 127, 134, 99, 105, 132, 29, 34, 35, 1, 1, 1, 97, 15, 20, 24, 1, 5, 1, 1, 1, 1, 1, 1, 1, 2, 11, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 56, 64, 128, 127, 1, 99, 106, 127, 132, 1, 1, 1, 1, 2, 1, 1, 1, 1, 118];
frontMap3[8] = [69, 74, 1, 1, 109, 111, 1, 41, 45, 49, 1, 1, 1, 1, 29, 34, 36, 116, 1, 1, 1, 1, 1, 1, 1, 1, 113, 31, 34, 36, 117, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 134, 70, 74, 1, 1, 1, 109, 111, 1, 57, 39, 1, 4, 1, 1, 1, 113, 116, 88, 90];
frontMap3[9] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 45, 51, 127, 132, 57, 65, 116, 3, 87, 94, 116, 124, 42, 45, 51, 127, 59, 65, 116, 113, 116, 87, 93, 1, 1, 11, 18, 26, 116, 123, 127, 1, 1, 1, 1, 1, 1, 1, 71, 77, 116, 11, 18, 26, 116, 122, 127, 97, 102];
frontMap3[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 134, 71, 76, 127, 132, 99, 106, 127, 132, 1, 1, 1, 1, 71, 76, 127, 123, 127, 99, 105, 134, 132, 29, 34, 38, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 85, 127, 29, 34, 38, 127, 132, 1, 1, 1];
backMap3[0] = [1, 1, 1, 1, 1, 1, 1, 1, 132, 97, 104, 127, 44, 45, 123, 127, 56, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 104, 127, 132, 69, 78, 127, 97, 104, 127, 1, 1, 1, 1, 1, 1, 1, 1, 132, 97, 104, 127, 124, 127, 56, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap3[1] = [12, 18, 23, 1, 1, 113, 116, 134, 1, 1, 1, 1, 1, 1, 1, 1, 69, 75, 116, 1, 1, 1, 1, 1, 1, 1, 11, 18, 24, 134, 1, 1, 1, 1, 1, 1, 1, 1, 1, 114, 116, 1, 1, 1, 56, 62, 134, 1, 1, 1, 1, 1, 1, 72, 79, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap3[2] = [29, 34, 36, 116, 56, 64, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 124, 13, 18, 23, 1, 1, 1, 1, 1, 29, 34, 35, 1, 1, 6, 1, 1, 1, 1, 1, 1, 7, 122, 127, 12, 18, 23, 69, 74, 1, 1, 1, 1, 1, 1, 1, 122, 127, 11, 18, 23, 1, 113, 116, 56, 66, 116];
backMap3[3] = [41, 45, 53, 127, 69, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 30, 34, 35, 1, 1, 1, 1, 113, 43, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, 34, 37, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, 34, 35, 86, 92, 127, 69, 78, 127];
backMap3[4] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 46, 50, 1, 1, 1, 56, 64, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 47, 52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 46, 50, 97, 102, 1, 1, 1, 1];
backMap3[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 86, 89, 1, 70, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 134, 1, 1, 1, 1, 1];
backMap3[6] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 102, 124, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 67, 95, 122, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap3[7] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap3[8] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 2, 1, 113, 116, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1];
frontMap4[3] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 1, 11, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 114, 116, 12, 19, 25, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 1, 2, 1, 1];
frontMap4[4] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 154, 127, 132, 29, 34, 36, 116, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 4, 113, 116, 3, 1, 1, 1, 113, 116, 124, 127, 147, 116, 1, 1];
frontMap4[5] = [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 124, 127, 1, 1, 41, 45, 51, 153, 117, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 114, 154, 127, 1, 1, 1, 1, 88, 90, 1, 1, 152, 20, 23, 1];
frontMap4[6] = [57, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 56, 62, 1, 1, 1, 1, 1, 1, 1, 22, 63, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 87, 94, 116, 1, 1, 2, 1, 1, 1, 1, 1, 2, 113, 116, 97, 102, 1, 1, 29, 34, 35, 1];
frontMap4[7] = [71, 77, 116, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 74, 1, 1, 1, 1, 1, 1, 1, 71, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 99, 106, 127, 1, 1, 1, 1, 1, 2, 1, 1, 113, 154, 127, 1, 1, 1, 1, 41, 45, 49, 132];
frontMap4[8] = [81, 85, 127, 1, 1, 1, 1, 1, 2, 1, 1, 1, 113, 116, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 84, 134, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 113, 154, 127, 109, 145, 1, 114, 116, 1, 1, 1, 1, 1, 1, 124, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontMap4[9] = [1, 1, 1, 132, 113, 116, 11, 18, 26, 116, 1, 87, 125, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 86, 91, 116, 113, 116, 1, 11, 18, 26, 116, 113, 116, 57, 54, 127, 132, 1, 1, 1, 122, 13, 18, 26, 116, 113, 116, 56, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontMap4[10] = [1, 1, 1, 1, 124, 127, 29, 34, 38, 127, 132, 99, 102, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 104, 127, 123, 127, 134, 29, 34, 38, 127, 123, 127, 71, 32, 1, 1, 1, 1, 1, 1, 29, 34, 38, 127, 123, 127, 69, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap4[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, 34, 38, 127, 124, 127, 97, 104, 127, 69, 78, 127, 132, 1, 11, 18, 26, 116, 86, 89, 123, 127, 124, 127, 127, 69, 127, 134, 97, 104, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 78, 127, 136, 141, 29, 34, 37];
backMap4[1] = [1, 11, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 114, 31, 34, 38, 127, 97, 102, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 132, 11, 18, 23, 1, 1, 1, 1, 1, 1, 1, 134, 1, 1, 1, 1, 1, 41, 47, 52];
backMap4[2] = [113, 31, 34, 36, 116, 1, 1, 1, 1, 1, 1, 113, 116, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 42, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 29, 34, 36, 116, 147, 116, 86, 91, 116, 132, 1, 1, 1, 1, 1, 1, 1, 1, 132];
backMap4[3] = [124, 42, 45, 51, 127, 1, 1, 1, 1, 1, 56, 64, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 45, 51, 127, 124, 127, 97, 104, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap4[4] = [1, 1, 1, 1, 1, 132, 86, 89, 1, 1, 69, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 29, 34, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap4[5] = [1, 1, 1, 1, 1, 1, 98, 103, 113, 116, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 41, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backMap4[6] = [1, 1, 1, 1, 1, 1, 122, 127, 124, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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1];
frontEnd4[10] = [1, 1];
backEnd4[0] = [37, 1];
backEnd4[1] = [153, 116];
backEnd4[2] = [122, 127];
backEnd4[3] = [1, 1];
backEnd4[4] = [1, 1];
backEnd4[5] = [1, 1];
backEnd4[6] = [1, 1];
backEnd4[7] = [1, 1];
backEnd4[8] = [1, 1];
backEnd4[9] = [1, 1];
backEnd4[10] = [1, 1];
frontAdd4[0] = [1, 1, 1, 1, 1, 1, 1];
frontAdd4[1] = [1, 1, 1, 1, 1, 1, 1];
frontAdd4[2] = [1, 1, 1, 1, 1, 1, 1];
frontAdd4[3] = [1, 1, 1, 1, 1, 1, 1];
frontAdd4[4] = [1, 1, 1, 1, 1, 1, 1];
frontAdd4[5] = [1, 3, 1, 1, 3, 1, 1];
frontAdd4[6] = [1, 193, 194, 195, 196, 197, 198];
frontAdd4[7] = [1, 201, 202, 203, 204, 205, 206];
frontAdd4[8] = [1, 1, 1, 1, 1, 1, 1];
frontAdd4[9] = [1, 1, 1, 1, 1, 1, 1];
frontAdd4[10] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[0] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[1] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[2] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[3] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[4] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[5] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[6] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[7] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[8] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[9] = [1, 1, 1, 1, 1, 1, 1];
backAdd4[10] = [1, 1, 1, 1, 1, 1, 1];
k = 0;
while (k < frontMap4.length) {
frontMap4[k].splice(frontMap4[k].length - frontEnd4[k].length);
frontMap4[k] = frontMap4[k].concat(frontEnd4[k], frontAdd4[k]);
backMap4[k].splice(backMap4[k].length - backEnd4[k].length);
backMap4[k] = backMap4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 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 87, 93, 1, 1, 1, 1, 1, 1];
frontMap5[3] = [1, 1, 1, 1, 1, 2, 1, 1, 11, 18, 23, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 87, 93, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 11, 19, 25, 132, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 156, 148, 99, 133, 116, 1, 2, 1, 1, 1];
frontMap5[4] = [1, 1, 1, 1, 1, 1, 113, 118, 29, 34, 36, 117, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 114, 130, 133, 116, 1, 1, 1, 1, 1, 1, 1, 1, 113, 31, 34, 35, 114, 116, 1, 1, 1, 1, 1, 2, 113, 116, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 4, 1, 1, 1, 1, 148, 147, 116, 1, 1, 1];
frontMap5[5] = [1, 2, 1, 1, 1, 87, 115, 127, 41, 45, 51, 22, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 116, 1, 1, 1, 1, 113, 116, 113, 154, 42, 45, 49, 122, 22, 63, 2, 1, 1, 1, 1, 124, 153, 116, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 122, 127, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1];
frontMap5[6] = [113, 116, 57, 65, 116, 99, 105, 1, 1, 1, 1, 71, 77, 116, 3, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 132, 1, 1, 2, 124, 127, 123, 127, 1, 1, 1, 1, 71, 77, 116, 1, 1, 1, 1, 1, 1, 148, 132, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2];
frontMap5[7] = [123, 127, 71, 76, 127, 109, 111, 1, 1, 1, 1, 81, 85, 107, 115, 1, 1, 1, 1, 1, 1, 2, 1, 152, 20, 23, 1, 1, 1, 1, 1, 1, 1, 2, 11, 18, 23, 1, 1, 1, 2, 1, 1, 1, 1, 113, 117, 132, 1, 1, 1, 1, 1, 1, 1, 81, 85, 153, 117, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 117, 57, 65, 116, 3, 87, 94, 116, 11, 18, 23, 1, 2, 1, 1, 1, 3, 132];
frontMap5[8] = [1, 1, 81, 84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 99, 133, 116, 2, 1, 2, 1, 1, 113, 119, 29, 34, 36, 116, 2, 1, 1, 1, 1, 1, 113, 31, 34, 36, 117, 1, 1, 1, 1, 1, 3, 113, 154, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 153, 116, 1, 1, 1, 1, 2, 1, 1, 113, 116, 124, 127, 71, 76, 127, 132, 99, 106, 127, 29, 34, 36, 116, 1, 1, 3, 1, 56, 62];
frontMap5[9] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 109, 142, 127, 1, 1, 1, 113, 116, 88, 90, 41, 45, 51, 127, 58, 65, 116, 1, 3, 87, 125, 42, 45, 51, 153, 117, 57, 63, 113, 116, 1, 88, 90, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 88, 90, 116, 3, 113, 116, 113, 116, 11, 19, 25, 132, 1, 81, 85, 1, 1, 109, 111, 1, 41, 45, 51, 127, 147, 116, 113, 116, 69, 74];
frontMap5[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 134, 56, 62, 123, 127, 97, 102, 1, 1, 1, 1, 71, 76, 127, 132, 134, 99, 105, 1, 1, 1, 122, 127, 71, 32, 124, 127, 132, 97, 102, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 104, 127, 132, 124, 127, 123, 127, 29, 34, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 124, 127, 123, 127, 1, 1];
backMap5[0] = [1, 1, 1, 1, 87, 93, 132, 69, 78, 127, 124, 127, 29, 24, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, 34, 35, 124, 127, 69, 75, 116, 1, 1, 1, 1, 29, 34, 38, 127, 124, 127, 69, 75, 116, 1, 1, 1, 1, 11, 19, 25, 1, 1, 1, 1, 1, 1, 1, 11, 18, 23, 1, 1, 1, 69, 74, 127, 124, 127, 29, 34, 37, 1, 1, 1];
backMap5[1] = [1, 1, 1, 1, 130, 105, 1, 8, 1, 1, 1, 1, 41, 46, 150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 45, 49, 1, 1, 1, 122, 127, 1, 1, 1, 113, 43, 45, 49, 1, 1, 1, 1, 122, 127, 1, 1, 1, 113, 31, 34, 36, 116, 56, 62, 1, 1, 1, 1, 29, 34, 37, 113, 116, 132, 1, 1, 1, 1, 1, 41, 47, 52, 132, 57, 63];
backMap5[2] = [1, 11, 18, 149, 137, 111, 1, 1, 1, 1, 1, 1, 1, 122, 127, 86, 89, 1, 1, 1, 1, 1, 11, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 113, 116, 132, 1, 1, 1, 1, 1, 1, 1, 132, 86, 89, 122, 127, 1, 1, 1, 1, 1, 1, 1, 1, 147, 116, 86, 92, 42, 45, 156, 127, 69, 75, 116, 1, 87, 94, 43, 47, 52, 124, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 71, 32];
backMap5[3] = [113, 31, 34, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 21, 116, 1, 1, 1, 1, 29, 34, 36, 116, 1, 1, 1, 1, 1, 1, 1, 87, 125, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 102, 134, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 97, 102, 1, 1, 1, 1, 1, 122, 127, 1, 99, 108, 127, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 101];
backMap5[4] = [124, 42, 45, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 123, 22, 63, 1, 87, 93, 151, 45, 51, 127, 147, 116, 1, 1, 1, 1, 1, 99, 105, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 132, 109, 111, 1, 1, 1, 1, 1, 1, 1, 122, 127, 109, 157, 1, 1, 1, 1, 1, 1];
backMap5[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 71, 77, 116, 99, 105, 1, 1, 1, 1, 122, 127, 57, 63, 1, 113, 116, 138, 111, 1, 1, 1, 122, 137, 142, 153, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 122, 127, 122, 127, 1, 1, 1];
backMap5[6] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 85, 127, 138, 111, 1, 1, 1, 1, 1, 1, 71, 32, 147, 154, 127, 1, 1, 1, 1, 1, 1, 1, 1, 155, 148, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
arrayMarks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 2, 3];
frontEnd5[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontEnd5[1] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontEnd5[2] = [1, 1, 1, 1, 1, 1, 1, 211, 1, 1, 1, 1, 1, 1];
frontEnd5[3] = [2, 1, 1, 1, 1, 1, 1, 213, 1, 1, 1, 1, 1, 1];
frontEnd5[4] = [1, 113, 116, 1, 1, 1, 1, 214, 1, 1, 1, 1, 1, 1];
frontEnd5[5] = [1, 122, 127, 1, 1, 1, 1, 215, 1, 1, 1, 1, 1, 1];
frontEnd5[6] = [1, 1, 1, 1, 1, 113, 116, 216, 1, 1, 1, 1, 1, 1];
frontEnd5[7] = [3, 87, 94, 116, 56, 64, 127, 217, 1, 11, 18, 23, 1, 1];
frontEnd5[8] = [132, 99, 106, 127, 59, 74, 1, 218, 1, 29, 34, 36, 116, 1];
frontEnd5[9] = [1, 109, 111, 1, 1, 1, 1, 219, 1, 41, 45, 51, 127, 1];
frontEnd5[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[1] = [113, 116, 147, 116, 1, 1, 113, 209, 210, 116, 56, 62, 113, 116];
backEnd5[2] = [124, 127, 122, 127, 132, 86, 92, 212, 1, 127, 69, 74, 122, 127];
backEnd5[3] = [1, 1, 1, 1, 1, 97, 102, 1, 1, 1, 1, 1, 1, 1];
backEnd5[4] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[6] = [1, 1, 134, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[7] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[8] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[9] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
backEnd5[10] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
frontAdd5[0] = [1, 1];
frontAdd5[1] = [1, 1];
frontAdd5[2] = [1, 1];
frontAdd5[3] = [1, 1];
frontAdd5[4] = [1, 1];
frontAdd5[5] = [1, 1];
frontAdd5[6] = [1, 1];
frontAdd5[7] = [116, 1];
frontAdd5[8] = [127, 134];
frontAdd5[9] = [1, 1];
frontAdd5[10] = [1, 1];
backAdd5[0] = [1, 1];
backAdd5[1] = [1, 1];
backAdd5[2] = [1, 1];
backAdd5[3] = [1, 1];
backAdd5[4] = [1, 1];
backAdd5[5] = [1, 1];
backAdd5[6] = [1, 1];
backAdd5[7] = [1, 1];
backAdd5[8] = [1, 1];
backAdd5[9] = [1, 1];
backAdd5[10] = [1, 1];
k = 0;
while (k < frontMap5.length) {
frontMap5[k].splice(frontMap5[k].length - frontEnd5[k].length);
frontMap5[k] = frontMap5[k].concat(frontEnd5[k], frontAdd5[k]);
backMap5[k].splice(backMap5[k].length - backEnd5[k].length);
backMap5[k] = backMap5[k].concat(backEnd5[k], backAdd5[k]);
k++;
}
Instance of Symbol 28 MovieClip "playbtn" in Frame 2
onClipEvent (load) {
function checkLoaded() {
if ((_parent.getBytesLoaded() == _parent.getBytesTotal()) && (_parent.playReady == true)) {
labelTxt = "play";
gfcroll.gotoAndPlay(7);
gfc.loadbar._visible = false;
gotoAndStop(_totalframes);
}
}
function setLoadbar() {
gfc.loadbar._width = (targWidth * _parent.getBytesLoaded()) / _parent.getBytesTotal();
}
targWidth = 116;
labelTxt = "loading";
}
Frame 3
initSound("wingame");
initSound("btnOver");
startMap = 1;
endMap = 5;
gameMap = this["gameMap" + startMap];
frontMap = this["frontMap" + startMap];
backMap = this["backMap" + startMap];
safePath = this["safePath" + startMap];
i = startMap + 1;
while (i <= endMap) {
j = 0;
while (j < gameMap.length) {
gameMap[j] = gameMap[j].concat(this["gameMap" + i][j]);
frontMap[j] = frontMap[j].concat(this["frontMap" + i][j]);
backMap[j] = backMap[j].concat(this["backMap" + i][j]);
j++;
}
safePath = safePath.concat(this["safePath" + i]);
i++;
}
Frame 4
initSound("countdown");
initSound("scoreSm");
initSound("scoreLg");
initSound("smack");
initSound("btn_over");
initSound("music");
setQuality("MEDIUM");
Instance of Symbol 725 MovieClip "game" in Frame 4
onClipEvent (load) {
gameMap = _parent.gameMap;
frontMap = _parent.frontMap;
backMap = _parent.backMap;
safePath = _parent.safePath;
j = 0;
while (j < gameMap.length) {
j++;
}
}
Instance of Symbol 751 MovieClip "timerClip" in Frame 4
onClipEvent (load) {
function initTimer() {
startTime = getTimer() + 1000;
lastTime = getTimer();
gameTime = 180;
seconds = gameTime;
elapsed = 0;
bonusTime = 0;
bonusPause = false;
advInterval = seconds / (_totalframes - 1);
hour = Math.floor(seconds / 60);
minutes = seconds % 60;
if (minutes < 10) {
minutes = "0" + minutes;
}
gotoAndStop (1);
}
function timeBonus() {
bonusTracker.addBonusTime();
bonusTracker.gotoAndPlay("startBonus");
bonusPause = true;
}
function displayTime() {
hour = Math.floor(seconds / 60);
minutes = seconds % 60;
if (minutes < 10) {
minutes = "0" + minutes;
if ((hour == 0) && (_parent.playing)) {
_parent.playSound("countdown");
digits.gotoAndPlay("countdown");
}
}
}
initTimer();
stop();
}
onClipEvent (enterFrame) {
if ((elapsed < gameTime) && (_parent.playing)) {
nowTime = getTimer();
fps = 1000 / (nowTime - lastTime);
if (fps >= 15) {
}
if ((((nowTime - startTime) - bonusTime) > (elapsed * 1000)) && (!bonusPause)) {
elapsed++;
seconds--;
displayTime();
if ((elapsed == gameTime) && (!_parent.overRide)) {
_parent.playing = false;
gotoAndStop(_totalframes);
_root.playSound("smack");
_parent.game.gotoAndStop("loseGame");
} else {
gotoAndStop(1 + Math.floor((elapsed / gameTime) * (_totalframes - 1)));
}
}
}
}
Instance of Symbol 759 MovieClip "distance" in Frame 4
onClipEvent (load) {
function setMarker(distElapsed) {
distancebar._width = (targWidth * distElapsed) / _parent.totalCols;
}
targWidth = 100;
}
Instance of Symbol 766 MovieClip "scoreClip" in Frame 4
onClipEvent (load) {
score = 0;
}
Frame 5
stop();
Symbol 8 MovieClip Frame 1
stop();
Symbol 8 MovieClip Frame 7
stop();
Symbol 15 MovieClip Frame 11
stop();
Symbol 22 MovieClip Frame 1
gotoAndStop(_totalframes - 2);
Symbol 22 MovieClip Frame 6
stop();
Symbol 22 MovieClip Frame 11
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 1
gotoAndStop(_totalframes - 2);
Instance of Symbol 16 MovieClip [empty] in Symbol 26 MovieClip Frame 2
onClipEvent (load) {
_parent.blink.play();
}
Symbol 26 MovieClip Frame 6
stop();
Symbol 26 MovieClip Frame 11
stop();
Symbol 27 Button
on (release) {
_parent.gotoAndPlay("startGame");
}
on (rollOver) {
_root.playSound("btnOver");
tellTarget ("txtroll") {
if (_currentframe > (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
tellTarget ("gfcroll") {
if (_currentframe > (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
}
on (rollOut, dragOut) {
_root.buttonSpark = false;
tellTarget ("txtroll") {
if (_currentframe < (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
tellTarget ("gfcroll") {
if (_currentframe < (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
}
Instance of Symbol 16 MovieClip [empty] in Symbol 28 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.setLoadBar();
}
Symbol 28 MovieClip Frame 11
stop();
Instance of Symbol 16 MovieClip [empty] in Symbol 28 MovieClip Frame 11
onClipEvent (enterFrame) {
if (_parent._parent.instrReady == false) {
_parent._parent.loadInstr();
}
_parent.checkLoaded();
}
Symbol 28 MovieClip Frame 12
stop();
Symbol 66 Button
on (release) {
nextFrame();
}
Instance of Symbol 72 MovieClip "thin" in Symbol 73 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (23);
}
Instance of Symbol 72 MovieClip "thin2" in Symbol 73 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (12);
}
Symbol 73 MovieClip Frame 60
gotoAndPlay (30);
Instance of Symbol 72 MovieClip "thin" in Symbol 73 MovieClip Frame 61
onClipEvent (load) {
gotoAndPlay (24);
}
Instance of Symbol 72 MovieClip "thin2" in Symbol 73 MovieClip Frame 61
onClipEvent (load) {
gotoAndPlay (17);
}
Instance of Symbol 16 MovieClip [empty] "spark" in Symbol 78 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent._parent.collision) {
_parent._x = _parent._x - _parent._parent._parent._parent.tileSpeedX;
_parent._y = _parent._y - _parent._parent._parent._parent.tileSpeedY;
}
}
Symbol 78 MovieClip Frame 11
removeMovieClip("");
Symbol 78 MovieClip Frame 12
stop();
Symbol 79 MovieClip Frame 1
function magicSpark(placeX, placeY, scale) {
duplicateMovieClip ("spark", "spark" + sparkNum, sparkNum);
setProperty(["spark" + sparkNum], _x , placeX);
setProperty(["spark" + sparkNum], _y , placeY);
setProperty(["spark" + sparkNum], _xscale , scale);
setProperty(["spark" + sparkNum], _yscale , scale);
sparkNum++;
}
sparkNum = 1;
stop();
Symbol 80 MovieClip Frame 1
function catchBonus() {
_root.playSound("scoreSm");
_root.scoreClip.addPoints(1);
_parent.caught = true;
play();
}
stop();
Instance of Symbol 16 MovieClip [empty] in Symbol 80 MovieClip Frame 2
onClipEvent (enterFrame) {
if ((elapsed % 3) == 0) {
_parent.sparksClip.magicSpark(random(Math.floor(_parent.icon._width * 3)) - (_parent.icon._width * 1.5), (_parent.icon._y + random(Math.floor(_parent.icon._height))) - (_parent.icon._height / 2), (random(10) * 6) + 60);
}
elapsed++;
}
onClipEvent (load) {
elapsed = 0;
}
Symbol 80 MovieClip Frame 13
stop();
Symbol 84 MovieClip Frame 1
function catchBonus() {
_root.playSound("scoreLg");
_root.scoreClip.addPoints(10);
_parent.caught = true;
play();
}
stop();
Instance of Symbol 16 MovieClip [empty] in Symbol 84 MovieClip Frame 2
onClipEvent (enterFrame) {
if ((elapsed % 2) == 0) {
_parent.sparksClip.magicSpark(random(Math.floor(_parent.icon._width)) - (_parent.icon._width / 2), (_parent.icon._y + random(Math.floor(_parent.icon._height))) - (_parent.icon._height / 2), (random(10) * 6) + 60);
}
elapsed++;
}
onClipEvent (load) {
elapsed = 0;
}
Symbol 84 MovieClip Frame 13
stop();
Symbol 88 MovieClip Frame 1
function catchBonus() {
_root.playSound("scoreLg");
_root.game.turboCharger.gotoAndPlay("speedUp");
_parent.caught = true;
play();
}
stop();
Instance of Symbol 16 MovieClip [empty] in Symbol 88 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.sparksClip.magicSpark(random(Math.floor(_parent.icon._width)) - (_parent.icon._width / 2), (_parent.icon._y + random(Math.floor(_parent.icon._height))) - (_parent.icon._height / 2), (random(10) * 6) + 60);
}
Symbol 88 MovieClip Frame 13
stop();
Symbol 92 MovieClip Frame 1
function catchBonus() {
_root.playSound("scoreLg");
_root.timerClip.timeBonus();
_parent.caught = true;
play();
}
stop();
Instance of Symbol 16 MovieClip [empty] in Symbol 92 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.sparksClip.magicSpark(random(Math.floor(_parent.icon._width)) - (_parent.icon._width / 2), (_parent.icon._y + random(Math.floor(_parent.icon._height))) - (_parent.icon._height / 2), (random(10) * 6) + 60);
}
Symbol 92 MovieClip Frame 13
stop();
Symbol 106 Button
on (release) {
prevFrame();
}
Symbol 107 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 2
_parent.playSound("wingame");
Symbol 115 MovieClip Frame 21
_parent.playReady = true;
_parent.audioCtrl.gotoAndPlay("in");
stop();
Symbol 117 Button
on (rollOver) {
if (_currentframe > (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
}
on (rollOut, dragOut) {
if (_currentframe < (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
}
on (release) {
if (_root.audioOn) {
_parent.setAudio(false);
icon.gotoAndStop("off");
} else {
_parent.setAudio(true);
icon.gotoAndStop("on");
}
}
Symbol 124 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 7
stop();
Symbol 126 MovieClip Frame 1
gotoAndStop(_totalframes - 2);
Instance of Symbol 124 MovieClip "icon" in Symbol 126 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Symbol 126 MovieClip Frame 6
stop();
Symbol 126 MovieClip Frame 11
stop();
Symbol 127 MovieClip Frame 1
function setAudio(onoff) {
_root.audioOn = onOff;
if (onoff == true) {
_root.restartMusic();
} else if (onoff == false) {
stopAllSounds();
}
}
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 12
stop();
Symbol 138 MovieClip [horses] Frame 1
stop();
Instance of Symbol 137 MovieClip [horses2] "char" in Symbol 138 MovieClip [horses] Frame 1
onClipEvent (load) {
if (_parent._name == "char2") {
gotoAndPlay (3);
}
}
Symbol 138 MovieClip [horses] Frame 4
stop();
Symbol 138 MovieClip [horses] Frame 6
stop();
Symbol 161 MovieClip Frame 8
stop();
Symbol 162 MovieClip Frame 11
removeMovieClip("");
Symbol 162 MovieClip Frame 12
stop();
Symbol 163 MovieClip Frame 1
function magicSpark(scale) {
duplicateMovieClip ("spark", "spark" + sparkNum, sparkNum);
this["spark" + sparkNum]._rotation = random(360);
this["spark" + sparkNum]._xscale = scale;
this["spark" + sparkNum]._yscale = scale;
sparkNum++;
}
sparkNum = 1;
spark.gotoAndStop(spark._totalframes);
stop();
Symbol 164 MovieClip [carriage] Frame 1
stop();
Symbol 164 MovieClip [carriage] Frame 3
play();
Instance of Symbol 16 MovieClip [empty] in Symbol 164 MovieClip [carriage] Frame 3
onClipEvent (enterFrame) {
_parent.sparksClip._x = _x;
_parent.sparksClip._y = _y;
_parent.sparksClip.magicSpark((random(10) * 6) + 60);
_parent.sparksClip.magicSpark((random(10) * 6) + 60);
}
Symbol 164 MovieClip [carriage] Frame 19
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 6
stop();
Symbol 214 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 5
stop();
Symbol 231 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 5
stop();
Symbol 234 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 5
stop();
Symbol 380 MovieClip [item] Frame 1
stop();
Symbol 380 MovieClip [item] Frame 2
caught = false;
Symbol 380 MovieClip [item] Frame 3
caught = false;
Symbol 380 MovieClip [item] Frame 4
caught = false;
Symbol 380 MovieClip [item] Frame 5
caught = false;
Symbol 380 MovieClip [item] Frame 6
broken = false;
Symbol 380 MovieClip [item] Frame 7
broken = false;
Symbol 380 MovieClip [item] Frame 8
broken = false;
Symbol 380 MovieClip [item] Frame 9
broken = false;
Symbol 703 MovieClip [tile] Frame 135
trace("frame 135");
Symbol 705 MovieClip Frame 1
function magicSpark(placeX, placeY, scale) {
duplicateMovieClip ("spark", "spark" + sparkNum, sparkNum);
this["spark" + sparkNum]._x = placeX;
this["spark" + sparkNum]._y = placeY;
this["spark" + sparkNum]._xscale = scale;
this["spark" + sparkNum]._yscale = scale;
sparkNum++;
}
sparkNum = 1;
spark.gotoAndStop(spark._totalframes);
stop();
Symbol 706 MovieClip Frame 1
stop();
turboInt = 0.05;
turboMax = 1.4;
Symbol 706 MovieClip Frame 2
stop();
Instance of Symbol 16 MovieClip [empty] in Symbol 706 MovieClip Frame 2
onClipEvent (enterFrame) {
elapsed++;
_parent._x = _parent._parent.char._x;
_parent._y = _parent._parent.char._y;
_parent.sparksClip.magicSpark(random(60) - 30, random(60) - 30, (random(10) * 6) + 60);
}
onClipEvent (load) {
elapsed = 0;
}
Instance of Symbol 16 MovieClip [empty] in Symbol 706 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_parent._parent.accRate >= _parent.turboMax) {
_parent._parent.accRate = _parent.turboMax;
_parent.gotoAndStop("coast");
} else {
_parent._parent.accRate = _parent._parent.accRate + _parent.turboInt;
}
}
Instance of Symbol 16 MovieClip [empty] in Symbol 706 MovieClip Frame 6
onClipEvent (load) {
startTime = getTimer();
}
onClipEvent (enterFrame) {
elapsed = getTimer() - startTime;
if (elapsed > (_parent._parent.recoverTime * 4000)) {
_parent.gotoAndStop("slowDown");
}
}
Instance of Symbol 16 MovieClip [empty] in Symbol 706 MovieClip Frame 10
onClipEvent (enterFrame) {
if (_parent._parent.accRate <= 1) {
_parent._parent.accRate = 1;
_parent.gotoAndStop(1);
} else {
_parent._parent.accRate = _parent._parent.accRate - _parent.turboInt;
}
}
Symbol 707 MovieClip Frame 1
momentum = Math.sqrt((_parent.momentumX * _parent.momentumX) + (_parent.momentumY * _parent.momentumY));
speedX2 = Math.cos(_parent.char2_rad) * momentum;
speedY2 = Math.sin(_parent.char2_rad) * momentum;
speedX3 = Math.cos(_parent.char3_rad) * momentum;
speedY3 = Math.sin(_parent.char3_rad) * momentum;
_parent.char.speedX = 0;
_parent.char.speedY = 0;
_parent.char_rad = 0;
_parent.char.gotoAndStop("hit1");
_parent.char2.gotoAndStop("hit2");
_parent.char3.gotoAndPlay("hit");
_parent.char2._x = _parent.char2._x + speedX2;
_parent.char2._y = _parent.char2._y + speedY2;
_parent.char3._x = _parent.char3._x + speedX3;
_parent.char3._y = _parent.char3._y + speedY3;
_parent.accRate = 1;
_parent.turboCharger.gotoAndStop(1);
if (_root.timerClip.bonusPause) {
trace("stop the clock");
_root.timerClip.bonusTracker.addBonusTime();
_root.timerClip.bonusTracker.gotoAndStop(1);
}
play();
Symbol 707 MovieClip Frame 2
_parent.char3._x = _parent.char3._x + speedX3;
_parent.char3._y = _parent.char3._y + speedY3;
Symbol 707 MovieClip Frame 3
_parent.char3._x = _parent.char3._x + speedX3;
_parent.char3._y = _parent.char3._y + speedY3;
_parent.char2_lastRad = (_parent.char2._rotation * Math.PI) / 180;
_parent.char2_frontX = _parent.char2._x + (Math.cos(_parent.char2_lastRad) * _parent.char.spacing);
_parent.char2_frontY = _parent.char2._y + (Math.sin(_parent.char2_lastRad) * _parent.char.spacing);
_parent.char.speedY = 0;
_parent.char.lastSpeedY = 0;
_parent.char2.speedY = 0;
_parent.char2.lastSpeedY = 0;
_parent.char3.speedY = 0;
_parent.char3.lastSpeedY = 0;
_parent.char2.link = false;
_parent.char3.link = false;
_parent.char3.gotoAndStop("hit");
stop();
Symbol 713 Button
on (release) {
_parent._parent.restartGame();
}
on (rollOver) {
_root.playSound("btnOver");
tellTarget ("txtroll") {
if (_currentframe > (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
tellTarget ("gfcroll") {
if (_currentframe > (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
}
on (rollOut, dragOut) {
_root.buttonSpark = false;
tellTarget ("txtroll") {
if (_currentframe < (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
tellTarget ("gfcroll") {
if (_currentframe < (_totalframes / 2)) {
gotoAndPlay(_totalframes - _currentframe);
}
};
}
Symbol 714 MovieClip Frame 1
labelTxt = "play again";
Instance of Symbol 15 MovieClip "gfc" in Symbol 714 MovieClip Frame 1
onClipEvent (enterFrame) {
loadbar._visible = false;
}
Symbol 714 MovieClip Frame 11
_root.playSound("wingame");
stop();
Symbol 714 MovieClip Frame 12
stop();
Symbol 718 MovieClip Frame 1
endPoints = _root.scoreClip.score;
endMessage = ("The clock struck midnight before you got Cinderella home! But you picked up " + endPoints) + " points before time ran out. Try again to see if you can make it all the way!";
Symbol 718 MovieClip Frame 13
_root.sound_losegame.setVolume(100);
_root.sound_btnOver.setVolume(100);
_root.playSound("losegame");
_root.setQuality("HIGH");
Symbol 718 MovieClip Frame 17
_parent.char3.blink.gfc.stop();
stop();
Symbol 724 MovieClip Frame 1
countdownInc = Math.floor(_root.timerClip.seconds / 30);
if (countdownInc < 5) {
countdownInc = 5;
}
trace("countdownInc=" + countdownInc);
timeScoreMult = 1;
if (_root.timerClip.hour > 0) {
seconds = (_root.timerClip.hour + " minutes and ") + _root.timerClip.minutes;
} else {
seconds = _root.timerClip.minutes;
}
endPoints = _root.scoreClip.score + (_root.timerClip.seconds * timeScoreMult);
endMessage = ("Well done! You got Cinderella home with time to spare, and picked up " + endPoints) + " points along the way. You're a great carriage driver! \r\rTry again to see if you can score more points next time!";
Symbol 724 MovieClip Frame 11
_root.setQuality("BEST");
Symbol 724 MovieClip Frame 18
_root.sound_wingame.setVolume(100);
_root.sound_btnOver.setVolume(100);
_root.sound_scoreSm.setVolume(100);
_root.sound_scoreLg.setVolume(100);
_root.playSound("wingame");
stop();
Instance of Symbol 16 MovieClip [empty] in Symbol 724 MovieClip Frame 18
onClipEvent (enterFrame) {
if (_root.timerClip.seconds < _parent.countdownInc) {
_root.scoreClip.score = _root.scoreClip.score + (_root.timerClip.seconds * _parent.timeScoreMult);
_root.timerClip.seconds = 0;
_root.timerClip.displayTime();
_root.playSound("scoreLg");
_parent.gotoAndStop("end");
} else {
_root.scoreClip.score = _root.scoreClip.score + (_parent.countdownInc * _parent.timeScoreMult);
_root.timerClip.seconds = _root.timerClip.seconds - _parent.countdownInc;
_root.timerClip.displayTime();
_root.playSound("scoreSm");
}
}
Symbol 724 MovieClip Frame 19
stop();
Symbol 725 MovieClip Frame 1
function restartGame() {
_quality = "MEDIUM";
_root.timerClip.initTimer();
_root.distance.setMarker(0);
_root.scoreClip.score = 0;
gotoAndPlay (1);
char.gotoAndStop("run");
char2.gotoAndStop("run");
char3.gotoAndStop("run");
}
_parent.music_loader.gotoAndPlay("fadein");
function safeSnap() {
safeTile = Math.floor((char._x - tiles._x) / game.tileW);
char2OffsetY = char._y - char2._y;
char3OffsetY = char._y - char3._y;
if (safePath[safeTile] != safePath[safeTile + 1]) {
safeDiffX = (-(tiles._x % game.tileW)) / game.tileW;
safeDiffY = safePath[safeTile + 1] - safePath[safeTile];
safeSpot._rotation = safeDiffY * 45;
char._rotation = safeDiffY * 45;
safePathY = (safePath[safeTile] + (safeDiffX * safeDiffY)) + 0.5;
if (safeDiffY != 0) {
char.speedY = ((safeDiffY * baseSpeed) * 2) * accRate;
}
} else {
safePathY = safePath[safeTile] + 0.5;
safeSpot._rotation = 0;
char._rotation = 0;
}
safeSpotY = tiles._y + (safePathY * game.tileH);
safeShiftY = char._y - safeSpotY;
if (safePathY < 2.5) {
tiles._y = -safetyZone;
char._y = safeSpotY;
} else if (safePathY > 8.5) {
tiles._y = safetyZone - ((game.mapheight - game.visy) * game.tileH);
char._y = safeSpotY;
} else {
char._y = game.centery;
safeSpotCharDiffY = (game.centery - tiles._y) + (safePathY * game.tileH);
tiles._y = game.centery - (safePathY * game.tileH);
}
char2._y = char._y - char2OffsetY;
char3._y = char._y - char3OffsetY;
frontItems._y = tiles._y;
backItems._y = tiles._y;
if (tiles._y < ((-(topRow + 1)) * game.tileH)) {
while (tiles._y < ((-(topRow + 1)) * game.tileH)) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow, j, (topRow + game.visY) + 1);
j++;
}
topRow = topRow + 1;
}
} else if (tiles._y > ((-topRow) * game.tileH)) {
while (tiles._y > ((-topRow) * game.tileH)) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow + game.visY, j, topRow - 1);
j++;
}
topRow = topRow - 1;
}
}
safeSpot._x = char._x;
safeSpot._y = tiles._y + (safePathY * game.tileH);
}
function safeTest() {
safeTile = Math.floor((char._x - tiles._X) / game.tileW);
safeSpot._x = char._x;
if (safePath[safeTile] != safePath[safeTile + 1]) {
safeDiffX = (-(tiles._x % game.tileW)) / game.tileW;
safeDiffY = safePath[safeTile + 1] - safePath[safeTile];
safeSpot._rotation = safeDiffY * 45;
safePathY = (safePath[safeTile] + (safeDiffX * safeDiffY)) + 0.5;
} else {
safePathY = safePath[safeTile] + 0.5;
safeSpot._rotation = 0;
}
safeSpot._y = tiles._y + (safePathY * game.tileH);
safeDetect = (Math.floor((char._y - tiles._y) / game.tileH) + "_") + Math.floor((char._x - tiles._X) / game.tileW);
}
function safePoint() {
safeTile = Math.floor((char._x - tiles._X) / game.tileW);
safeSpot._x = char._x;
if (safePath[safeTile] != safePath[safeTile + 1]) {
safeDiffX = (-(tiles._x % game.tileW)) / game.tileW;
safeDiffY = safePath[safeTile + 1] - safePath[safeTile];
safeSpot._rotation = safeDiffY * 45;
safePathY = (safePath[safeTile] + (safeDiffX * safeDiffY)) + 0.5;
char.speedY = (safeDiffY * scrollSpeed) * fpsMult;
} else {
char.speedY = 0;
safePathY = safePath[safeTile] + 0.5;
safeSpot._rotation = 0;
}
safeSpot._y = tiles._y + (safePathY * game.tileH);
}
char.xtile = 1;
char.ytile = 5;
char.speedX = 0;
char.speedY = 0;
char2.speedY = 0;
char3.speedY = 0;
char2.lastSpeedY = 0;
char3.lastSpeedY = 0;
char2.link = true;
char3.link = true;
char.spacing = 43;
char.safe = false;
char._y = game.centery;
hitSpacing = 38;
recoverTime = 3;
baseSpeed = 5;
scrollSpeed = baseSpeed * 2;
accRate = 1;
turbo = 1;
fpsMult = 1;
jumpDif = 0;
_parent.playing = true;
followSafePath = false;
safetyZone = 150;
_quality = "MEDIUM";
function detectKeys() {
if (Key.isDown(39) && (char.speedX < (((baseSpeed * 2) * accRate) * fpsMult))) {
char.speedX = char.speedX + ((accRate * accRate) * fpsMult);
if (followSafePath) {
followSafePath = false;
}
} else if (Key.isDown(37) && (char.speedX > (((-baseSpeed) * accRate) * fpsMult))) {
char.speedX = char.speedX - ((accRate * accRate) * fpsMult);
if (followSafePath) {
followSafePath = false;
}
} else if ((!Key.isDown(37)) && (!Key.isDown(39))) {
if (((char.speedX > 0) && ((char.speedX - ((accRate * accRate) * fpsMult)) < 0)) || ((char.speedX < 0) && ((char.speedX + ((accRate * accRate) * fpsMult)) > 0))) {
char.speedX = 0;
} else if (char.speedX > 0) {
char.speedX = char.speedX - ((accRate * accRate) * fpsMult);
} else if (char.speedX < 0) {
char.speedX = char.speedX + ((accRate * accRate) * fpsMult);
}
}
if ((Key.isDown(38) && (char.speedY > ((((-baseSpeed) * 2) * accRate) * fpsMult))) && (char._y > game.tileH)) {
char.speedY = char.speedY - ((accRate * accRate) * fpsMult);
if (followSafePath) {
followSafePath = false;
}
} else if ((Key.isDown(40) && (char.speedY < (((baseSpeed * 2) * accRate) * fpsMult))) && (char._y < ((game.visY - 1) * game.tileH))) {
char.speedY = char.speedY + ((accRate * accRate) * fpsMult);
if (followSafePath) {
followSafePath = false;
}
} else if ((((!Key.isDown(40)) && (!Key.isDown(38))) || (char._y == ((game.visY - 1) * game.tileH))) || (char._y == game.tileH)) {
if (followSafePath) {
safePoint();
} else if ((((!collision) && (char.speedY > 0)) && ((char.speedY - ((accRate * accRate) * fpsMult)) < 0)) || (((!collision) && (char.speedY < 0)) && ((char.speedY + ((accRate * accRate) * fpsMult)) > 0))) {
char.speedY = 0;
} else if ((char.speedY > 0) && (!collision)) {
char.speedY = char.speedY - ((accRate * accRate) * fpsMult);
} else if ((char.speedY < 0) && (!collision)) {
char.speedY = char.speedY + ((accRate * accRate) * fpsMult);
}
}
if (char.speedX > (((baseSpeed * 2) * accRate) * fpsMult)) {
char.speedX = ((baseSpeed * 2) * accRate) * fpsMult;
}
if (char.speedY < ((((-baseSpeed) * 2) * accRate) * fpsMult)) {
char.speedY = (((-baseSpeed) * 2) * accRate) * fpsMult;
} else if (char.speedY > (((baseSpeed * 2) * accRate) * fpsMult)) {
char.speedY = ((baseSpeed * 2) * accRate) * fpsMult;
}
if (!followSafePath) {
safeTest();
}
tileSpeedX = (scrollSpeed * accRate) + char.speedX;
collision = false;
checkCollision();
if ((!collision) || (char.safe)) {
moveTiles();
} else {
gotoAndPlay (3);
}
}
function checkCollision() {
charOverlap = false;
hitNum = 1;
while (hitNum < 3) {
Set("hitTestY" + hitNum, char._y + (Math.sin((char_rad + 0.81) - (0.54 * hitNum)) * hitSpacing));
Set("hitTestX" + hitNum, char._x + (Math.cos((char_rad + 0.81) - (0.54 * hitNum)) * hitSpacing));
Set("hitTestY" + Number(hitNum + 3), char._y + ((Math.sin((char_rad + 1.5) - hitNum) * (0.4 + (hitNum * 0.2))) * hitSpacing));
Set("hitTestX" + Number(hitNum + 3), char._x + ((Math.cos((char_rad + 1.5) - hitNum) * (0.4 + (hitNum * 0.2))) * hitSpacing));
hitNum++;
}
hitTestX3 = (hitTestX1 + hitTestX2) / 2;
hitTestY3 = (hitTestY1 + hitTestY2) / 2;
k = 1;
while (k < 6) {
k++;
}
hitNum = 1;
while (hitNum < 6) {
Set("detect" + hitNum, (Math.floor((eval ("hitTestY" + hitNum) - tiles._y) / game.tileH) + "_") + Math.floor((eval ("hitTestX" + hitNum) - tiles._X) / game.tileW));
for (i in tiles["t_" + eval ("detect" + hitNum)]) {
if (typeof(tiles["t_" + eval ("detect" + hitNum)][i]) == "movieclip") {
if (tiles["t_" + eval ("detect" + hitNum)][i].hitTest(eval ("hitTestX" + hitNum), eval ("hitTestY" + hitNum), true)) {
collision = true;
}
}
}
for (i in backItems["item_" + eval ("detect" + hitNum)]) {
if (backItems["item_" + eval ("detect" + hitNum)].hitSpot && (!backItems["item_" + eval ("detect" + hitNum)].broken)) {
if (backItems["item_" + eval ("detect" + hitNum)].hitSpot.hitTest(eval ("hitTestX" + hitNum), eval ("hitTestY" + hitNum), true)) {
backItems["item_" + eval ("detect" + hitNum)].item.play();
backItems["item_" + eval ("detect" + hitNum)].hitSpot._visible = false;
backItems["item_" + eval ("detect" + hitNum)].broken = true;
collision = true;
}
}
}
if ((!collision) && (!char.safe)) {
for (i in frontItems["item_" + eval ("detect" + hitNum)]) {
if (frontItems["item_" + eval ("detect" + hitNum)].bonus && (!frontItems["item_" + eval ("detect" + hitNum)].caught)) {
if (frontItems["item_" + eval ("detect" + hitNum)].hitSpot.hitTest(char)) {
frontItems["item_" + eval ("detect" + hitNum)].bonus.catchBonus();
}
}
}
}
hitNum++;
}
}
function moveTiles() {
if (collision && (char.safe)) {
collisionTile = (Math.floor((char._y - tiles._y) / game.tileH) + "_") + Math.floor((char._x - tiles._X) / game.tileW);
for (i in tiles["t_" + collisionTile]) {
if (typeof(tiles["t_" + collisionTile][i]) == "movieclip") {
if (tiles["t_" + collisionTile][i].hitTest(char._x, char._y, true)) {
charOverlap = true;
}
}
}
}
if (((tiles._x - tileSpeedX) < ((-(leftCol + 1)) * game.tileW)) && (!collision)) {
if (((leftCol + game.visX) + 1) == rightCol) {
gotoAndStop (7);
tileSpeedX = 0;
} else {
var i = topRow;
while (i <= (topRow + game.visY)) {
changeTile(leftCol, i, (leftCol + game.visX) + 1, i);
i++;
}
_parent.distance.setMarker(leftCol);
leftCol = leftCol + 1;
}
}
if ((char._y < game.centery) && (tiles._y > -30)) {
if ((char._y + char.speedY) <= game.tileH) {
char._y = game.tileH;
tileSpeedY = 0;
if (char.speedY >= 0) {
}
} else if ((char._y + char.speedY) > game.centery) {
tileSpeedY = game.centery - char._y;
char._y = game.centery;
} else {
if ((!charOverlap) || (char.speedY > 0)) {
char._y = char._y + char.speedY;
}
tileSpeedY = 0;
}
} else if ((char._y > game.centery) && (tiles._y < -330)) {
if ((char._y + char.speedY) >= ((game.visY - 1) * game.tileH)) {
char._y = (game.visY - 1) * game.tileH;
tileSpeedY = 0;
if (char.speedY <= 0) {
}
} else if ((char._y + char.speedY) < game.centery) {
tileSpeedY = game.centery - char._y;
char._y = game.centery;
} else {
if ((!charOverlap) || (char.speedY < 0)) {
char._y = char._y + char.speedY;
}
tileSpeedY = 0;
}
} else if (((tiles._y - tileSpeedY) < ((-(topRow + 1)) * game.tileH)) && (tileSpeedY > 0)) {
if (topRow < ((gameMap.length - game.visY) - 1)) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow, j, (topRow + game.visY) + 1);
j++;
}
topRow = topRow + 1;
tileSpeedY = char.speedY;
} else {
if (!charOverlap) {
char._y = char._y + char.speedY;
}
tileSpeedY = 0;
}
} else if (((tiles._y - tileSpeedY) > ((-topRow) * game.tileH)) && (tileSpeedY < 0)) {
if (topRow > 0) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow + game.visY, j, topRow - 1);
j++;
}
topRow = topRow - 1;
tileSpeedY = char.speedY;
} else {
if (!charOverlap) {
char._y = char._y + char.speedY;
}
tileSpeedY = 0;
}
} else {
tileSpeedY = char.speedY;
}
if ((char.speedY + tileSpeedY) == 0) {
char._rotation = 0;
} else {
char_rad = Math.atan2(char.speedY, tileSpeedX);
char._rotation = (char_rad * 180) / Math.Pi;
}
lastMapX = tiles._x;
lastMapY = tiles._y;
if (!collision) {
tiles._x = tiles._x - tileSpeedX;
tiles._y = tiles._y - tileSpeedY;
frontItems._x = tiles._x;
frontItems._y = tiles._y;
backItems._x = tiles._x;
backItems._y = tiles._y;
if (!char2.link) {
char2_dist = Math.sqrt(Math.pow(char._y - char2._y, 2) + Math.pow(char._x - char2._x, 2));
char2_lastRad = (char2._rotation * Math.PI) / 180;
char2_frontX = char._x - ((Math.cos(char2_lastRad) * char2_dist) / char.spacing);
char2_frontY = char._y - ((Math.sin(char2_lastRad) * char2_dist) / char.spacing);
char2_rad = Math.atan2(char2_frontY - char2._y, char2_frontX - char2._x);
char2._rotation = (char2_rad * 180) / Math.Pi;
char2_addY = Math.sqrt(Math.pow(tileSpeedX, 2) + Math.pow(tileSpeedY, 2));
if ((char2_dist + char2_addY) >= char.spacing) {
char2._x = char._x - (Math.cos(char2_rad) * char.spacing);
char2._y = char._y - (Math.sin(char2_rad) * char.spacing);
char2.lastSpeedY = char2_addY;
char2.link = true;
} else {
char2._x = char2._x - tileSpeedX;
char2._y = char2._y - tileSpeedY;
}
} else {
pullDist = Math.sqrt(Math.pow(tileSpeedX, 2) + Math.pow(tileSpeedY, 2));
nextX = (char2._x + (Math.cos(char2_rad) * pullDist)) - tileSpeedX;
nextY = (char2._y + (Math.sin(char2_rad) * pullDist)) - tileSpeedY;
char2_rad = Math.atan2(char._y - nextY, char._x - nextX);
char2._rotation = (char2_rad * 180) / Math.Pi;
char2._x = char._x - (Math.cos(char2_rad) * char.spacing);
char2._y = char._y - (Math.sin(char2_rad) * char.spacing);
if (!char3.link) {
if ((char3._x - tileSpeedX) > char2._x) {
char3._x = char3._x - tileSpeedX;
char3._y = char3._y - tileSpeedY;
} else {
char3Rot();
char3._x = char2._x;
char3._y = char2._y;
char3.link = true;
}
} else {
char3Rot();
char3._x = char2._x;
char3._y = char2._y;
}
}
if (Math.abs(char.speedY) > Math.abs(tileSpeedY)) {
momentumY = (lastMapY - tiles._y) + (char.speedY - tileSpeedY);
} else {
momentumY = lastMapY - tiles._y;
}
} else {
momentumY = lastMapY - tiles._y;
}
momentumX = lastMapX - tiles._x;
}
function char3Rot() {
if ((char2._y != char3._y) || (char2._x != char3._x)) {
char3_radDif = char3_rad - Math.atan2((char2._y - char3._y) + tileSpeedY, (char2._x - char3._x) + tileSpeedX);
if (Math.abs(char3_radDif) > (Math.PI/4)) {
char3_rad = char2_rad;
} else {
char3_rad = Math.atan2((char2._y - char3._y) + tileSpeedY, (char2._x - char3._x) + tileSpeedX);
}
char3._rotation = (char3_rad * 180) / Math.Pi;
}
}
function changeTile(xold, yold, xnew, ynew) {
var nameold = ((yold + "_") + xold);
var namenew = ((ynew + "_") + xnew);
if ((((ynew >= 0) and (xnew >= 0)) and (ynew <= (gameMap.length - 1))) and (xnew <= (gameMap[0].length - 1))) {
game["t_" + namenew] = new game["Tile" + gameMap[ynew][xnew]]();
tiles["t_" + nameold]._name = "t_" + namenew;
tiles["t_" + namenew].gotoAndStop(game["t_" + namenew].frame);
tiles["t_" + namenew]._x = xnew * game.tileW;
tiles["t_" + namenew]._y = ynew * game.tileH;
front["item_" + namenew] = new items["item" + frontMap[ynew][xnew]]();
frontItems["item_" + nameold]._name = "item_" + namenew;
frontItems["item_" + namenew].gotoAndStop(frontMap[ynew][xnew]);
frontItems["item_" + namenew]._x = xnew * game.tileW;
frontItems["item_" + namenew]._y = ynew * game.tileH;
back["item_" + namenew] = new items["item" + backMap[ynew][xnew]]();
backItems["item_" + nameold]._name = "item_" + namenew;
backItems["item_" + namenew].gotoAndStop(backMap[ynew][xnew]);
backItems["item_" + namenew]._x = xnew * game.tileW;
backItems["item_" + namenew]._y = ynew * game.tileH;
} else {
game["t_" + namenew] = new game.Tile0();
tiles["t_" + nameold]._name = "t_" + namenew;
tiles["t_" + namenew].gotoAndStop(game["t_" + namenew].frame);
}
}
function buildMap(map) {
game.mapwidth = map[0].length;
game.mapheight = map.length;
game.halfvisx = int(game.visx / 2);
game.halfvisy = int(game.visy / 2);
if (game.halfvisx > char.xtile) {
var fixx = (char.xtile - game.halfvisx);
} else if (char.xtile > (game.mapwidth - game.halfvisx)) {
var fixx = (game.mapwidth - char.xtile);
}
if (game.halfvisy > char.ytile) {
var fixy = (char.ytile - game.halfvisy);
} else if (char.ytile > ((game.mapheight - game.halfvisy) - 1)) {
var fixy = ((game.mapheight - char.ytile) - 1);
}
tiles._x = game.centerx - ((char.xtile - fixx) * game.tileW);
tiles._y = (game.centery - ((char.ytile - fixy) * game.tileH)) - (game.tileH / 2);
frontItems._x = tiles._x;
frontItems._y = tiles._y;
backItems._x = tiles._x;
backItems._y = tiles._y;
leftCol = 0;
rightCol = gameMap[0].length;
topRow = (char.ytile - game.halfvisy) - fixy;
var y = ((char.ytile - game.halfvisy) - fixy);
while (y <= (((char.ytile + game.halfvisy) + 1) - fixy)) {
var x = ((char.xtile - game.halfvisx) - fixx);
while (x <= ((char.xtile + game.halfvisx) - fixx)) {
var name = ((("t_" + y) + "_") + x);
var itemName = ((("item_" + y) + "_") + x);
if ((((y >= 0) and (x >= 0)) and (y <= (map.length - 1))) and (x <= (map[0].length - 1))) {
front[itemName] = new items["item" + frontMap[y][x]]();
back[itemName] = new items["item" + backMap[y][x]]();
game[name] = new game["Tile" + map[y][x]]();
} else {
front[itemName] = new items["item" + frontMap[y][x]]();
back[itemName] = new items["item" + backMap[y][x]]();
game[name] = new game.Tile0();
}
tiles.attachMovie("tile", name, (1 + (y * 100)) + (x * 2));
tiles[name]._x = x * game.tileW;
tiles[name]._y = y * game.tileH;
frontItems.attachMovie("item", itemName, (1 + (y * 100)) + (x * 2));
frontItems[itemName]._x = x * game.tileW;
frontItems[itemName]._y = y * game.tileH;
backItems.attachMovie("item", itemName, (1 + (y * 100)) + (x * 2));
backItems[itemName]._x = x * game.tileW;
backItems[itemName]._y = y * game.tileH;
tiles[name].gotoAndStop(map[y][x]);
frontItems[itemName].gotoAndStop(frontMap[y][x]);
backItems[itemName].gotoAndStop(backMap[y][x]);
x++;
}
y++;
}
_parent.totalCols = (gameMap[0].length - game.visX) - 1;
}
if (((typeof(game) != "object") || (game.reset)) || (game.youwon)) {
game = {tileW:60, tileH:60, currentMap:1, bulletcounter:0, points:0, visx:8, visy:5, centerx:242, centery:153, paused:true, reset:false};
}
items = new Object();
i = 1;
while (i <= 220) {
game["Tile" + i] = function () {
};
game["Tile" + i].prototype.walkable = true;
game["Tile" + i].prototype.frame = i;
items["item" + i] = function () {
};
items["item" + i].prototype.walkable = true;
if (i == 1) {
items["item" + i].prototype.solid = false;
} else {
items["item" + i].prototype.solid = true;
}
items["item" + i].prototype.frame = i;
i++;
}
buildMap(gameMap);
Instance of Symbol 138 MovieClip [horses] "char" in Symbol 725 MovieClip Frame 1
onClipEvent (load) {
_visible = true;
}
Instance of Symbol 138 MovieClip [horses] "char2" in Symbol 725 MovieClip Frame 1
onClipEvent (load) {
_visible = true;
}
Instance of Symbol 164 MovieClip [carriage] "char3" in Symbol 725 MovieClip Frame 1
onClipEvent (load) {
_visible = true;
}
Instance of Symbol 380 MovieClip [item] in Symbol 725 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 703 MovieClip [tile] in Symbol 725 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 16 MovieClip [empty] "controller" in Symbol 725 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.detectKeys();
}
Symbol 725 MovieClip Frame 2
stop();
Instance of Symbol 706 MovieClip "turboCharger" in Symbol 725 MovieClip Frame 2
onClipEvent (enterFrame) {
baseFPS = 15;
fps = 1000 / (getTimer() - lastTime);
if (fps >= _parent._parent.baseFPS) {
_parent.fpsMult = 1;
} else if (fps < (_parent._parent.baseFPS / 2)) {
_parent.fpsMult = 2;
} else {
_parent.fpsMult = _parent._parent.baseFPS / fps;
}
lastTime = getTimer();
if (!_parent.game.paused) {
}
}
onClipEvent (load) {
lastTime = getTimer();
}
Symbol 725 MovieClip Frame 3
_root.playSound("smack");
Instance of Symbol 707 MovieClip "controller" in Symbol 725 MovieClip Frame 3
onClipEvent (load) {
startTime = getTimer();
}
onClipEvent (enterFrame) {
elapsed = getTimer() - startTime;
if (elapsed > (_parent.recoverTime * 1000)) {
_parent.play();
}
}
Symbol 725 MovieClip Frame 4
stop();
Symbol 725 MovieClip Frame 5
collision = false;
scrollSpeed = accRate;
char.safe = true;
char.gotoAndStop("run");
char2.gotoAndStop("run");
char3.gotoAndStop("run");
safeSnap();
followSafePath = true;
stop();
Instance of Symbol 16 MovieClip [empty] "controller" in Symbol 725 MovieClip Frame 5
onClipEvent (load) {
function blinkChar() {
avatar = ["char", "char2", "char3"];
if (!charVis) {
for (i in avatar) {
_parent[avatar[i]]._visible = true;
}
charVis = true;
} else {
for (i in avatar) {
_parent[avatar[i]]._visible = false;
}
charVis = false;
}
blinkPeriod = (1.5 * _parent.recoverTime) - Math.floor(elapsed / 750);
blinkElapsed = 0;
}
startTime = getTimer();
blinkPeriod = 2 * _parent.recoverTime;
blinkElapsed = 0;
avatar = ["char", "char2", "char3"];
for (i in avatar) {
_parent[avatar[i]]._visible = false;
charVis = false;
}
}
onClipEvent (enterFrame) {
elapsed = getTimer() - startTime;
if (elapsed > (_parent.recoverTime * 1500)) {
_parent.gotoAndStop("resume2");
}
_parent.detectKeys();
if (_parent.scrollSpeed < (_parent.baseSpeed * 2)) {
_parent.scrollSpeed++;
}
if (blinkElapsed >= blinkPeriod) {
blinkChar();
} else {
blinkElapsed++;
}
}
onClipEvent (unload) {
avatar = ["char", "char2", "char3"];
for (i in avatar) {
_parent[avatar[i]]._visible = true;
}
}
Symbol 725 MovieClip Frame 6
char.safe = false;
followSafePath = false;
Instance of Symbol 16 MovieClip [empty] "controller" in Symbol 725 MovieClip Frame 6
onClipEvent (enterFrame) {
_parent.detectKeys();
}
Symbol 725 MovieClip Frame 7
function autoMove() {
if (((char.speedX > 0) && ((char.speedX - (accRate * accRate)) < 0)) || ((char.speedX < 0) && ((char.speedX + (accRate * accRate)) > 0))) {
char.speedX = 0;
} else if (char.speedX > 0) {
char.speedX = char.speedX - (accRate * accRate);
} else if (char.speedX < 0) {
char.speedX = char.speedX + (accRate * accRate);
}
if (((char._y - tiles._y) + char.speedY) > ((char.ytile + 1) * game.tileH)) {
trace("move up");
char.speedY = char.speedY - (accRate * accRate);
} else if (((char._y - tiles._y) + char.speedY) < ((char.ytile - 1) * game.tileH)) {
char.speedY = char.speedY + (accRate * accRate);
trace("move down");
} else if (((char.speedY > 0) && ((char.speedY - (accRate * accRate)) < 0)) || ((char.speedY < 0) && ((char.speedY + (accRate * accRate)) > 0))) {
char.speedY = 0;
} else if (char.speedY > 0) {
char.speedY = char.speedY - (accRate * accRate);
} else if (char.speedY < 0) {
char.speedY = char.speedY + (accRate * accRate);
}
tileSpeedX = (scrollSpeed * accRate) + char.speedX;
if (char._y < game.centery) {
if ((char._y + char.speedY) <= game.tileH) {
char._y = game.tileH;
tileSpeedY = 0;
} else if ((char._y + char.speedY) > game.centery) {
tileSpeedY = game.centery - char._y;
char._y = game.centery;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else if (char._y > game.centery) {
if ((char._y + char.speedY) >= ((game.visY - 1) * game.tileH)) {
char._y = (game.visY - 1) * game.tileH;
tileSpeedY = 0;
} else if ((char._y + char.speedY) < game.centery) {
tileSpeedY = game.centery - char._y;
char._y = game.centery;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else if ((tiles._y - tileSpeedY) < ((-(topRow + 1)) * game.tileH)) {
if (topRow < ((gameMap.length - game.visY) - 1)) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow, j, (topRow + game.visY) + 1);
j++;
}
topRow = topRow + 1;
tileSpeedY = char.speedY;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else if ((tiles._y - tileSpeedY) > ((-topRow) * game.tileH)) {
if (topRow > 0) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow + game.visY, j, topRow - 1);
j++;
}
topRow = topRow - 1;
tileSpeedY = char.speedY;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else {
tileSpeedY = char.speedY;
}
if ((char.speedY + tileSpeedY) == 0) {
char_rad = 0;
char._rotation = 0;
} else {
char_rad = Math.atan2(char.speedY, tileSpeedX);
char._rotation = (char_rad * 180) / Math.Pi;
}
char._x = char._x + tileSpeedX;
tiles._y = tiles._y - tileSpeedY;
frontItems._y = tiles._y;
backItems._y = tiles._y;
if (!char2.link) {
char2_dist = Math.sqrt(Math.pow(char._y - char2._y, 2) + Math.pow(char._x - char2._x, 2));
char2_lastRad = (char2._rotation * Math.PI) / 180;
char2_frontX = char._x - ((Math.cos(char2_lastRad) * char2_dist) / char.spacing);
char2_frontY = char._y - ((Math.sin(char2_lastRad) * char2_dist) / char.spacing);
char2_rad = Math.atan2(char2_frontY - char2._y, char2_frontX - char2._x);
char2._rotation = (char2_rad * 180) / Math.Pi;
char2_addY = Math.sqrt(Math.pow(tileSpeedX, 2) + Math.pow(tileSpeedY, 2));
if ((char2_dist + char2_addY) >= char.spacing) {
char2._x = char._x - (Math.cos(char2_rad) * char.spacing);
char2._y = char._y - (Math.sin(char2_rad) * char.spacing);
char2.lastSpeedY = char2_addY;
char2.link = true;
} else {
char2._x = char2._x - tileSpeedX;
char2._y = char2._y - tileSpeedY;
}
} else {
pullDist = Math.sqrt(Math.pow(tileSpeedX, 2) + Math.pow(tileSpeedY, 2));
nextX = (char2._x + (Math.cos(char2_rad) * pullDist)) - tileSpeedX;
nextY = (char2._y + (Math.sin(char2_rad) * pullDist)) - tileSpeedY;
char2_rad = Math.atan2(char._y - nextY, char._x - nextX);
char2._rotation = (char2_rad * 180) / Math.Pi;
char2._x = char._x - (Math.cos(char2_rad) * char.spacing);
char2._y = char._y - (Math.sin(char2_rad) * char.spacing);
if (!char3.link) {
if ((char3._x - tileSpeedX) > char2._x) {
char3._x = char3._x - tileSpeedX;
char3._y = char3._y - tileSpeedY;
} else {
char3Rot();
char3._x = char2._x;
char3._y = char2._y;
char3.link = true;
}
} else {
char3Rot();
char3._x = char2._x;
char3._y = char2._y;
}
}
if ((char3._x - char3._width) > (2 * game.centerx)) {
gotoAndStop (28);
}
}
_parent.playing = false;
if (accRate > 1) {
turboCharger.gotoAndStop("slowDown");
} else if (scrollSpeed < (baseSpeed * 2)) {
scrollSpeed++;
}
Instance of Symbol 16 MovieClip [empty] "controller" in Symbol 725 MovieClip Frame 7
onClipEvent (enterFrame) {
_parent.autoMove();
}
Symbol 725 MovieClip Frame 13
_parent.playing = false;
_parent.music_loader.gotoAndPlay("fadeout");
Instance of Symbol 707 MovieClip "controller" in Symbol 725 MovieClip Frame 13
onClipEvent (load) {
trace("fall down");
}
Symbol 725 MovieClip Frame 20
function userMove(xDist, yDist) {
if (xDist > 20) {
tileSpeedX = 20;
} else if (xDist < 0) {
tileSpeedX = 0;
} else {
tileSpeedX = xDist;
}
if (yDist > 59) {
char.speedY = 20;
} else if (yDist < -20) {
char.speedY = -20;
} else {
char.speedY = yDist;
}
if ((tiles._x - tileSpeedX) < ((-(leftCol + 1)) * game.tileW)) {
if ((leftCol + game.visX) == rightCol) {
tileSpeedX = 0;
} else {
var i = topRow;
while (i <= (topRow + game.visY)) {
changeTile(leftCol, i, (leftCol + game.visX) + 1, i);
i++;
}
_parent.distance.setMarker(leftCol);
leftCol = leftCol + 1;
}
}
moveTiles();
}
function moveTiles() {
if (char._y < game.centery) {
if ((char._y + char.speedY) <= game.tileH) {
char._y = game.tileH;
tileSpeedY = 0;
} else if ((char._y + char.speedY) > game.centery) {
tileSpeedY = game.centery - char._y;
char._y = game.centery;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else if (char._y > game.centery) {
if ((char._y + char.speedY) >= ((game.visY - 1) * game.tileH)) {
char._y = (game.visY - 1) * game.tileH;
tileSpeedY = 0;
} else if ((char._y + char.speedY) < game.centery) {
tileSpeedY = game.centery - char._y;
char._y = game.centery;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else if ((tiles._y - tileSpeedY) < ((-(topRow + 1)) * game.tileH)) {
if (topRow < ((gameMap.length - game.visY) - 1)) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow, j, (topRow + game.visY) + 1);
j++;
}
topRow = topRow + 1;
tileSpeedY = char.speedY;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else if ((tiles._y - tileSpeedY) > ((-topRow) * game.tileH)) {
if (topRow > 0) {
var j = leftCol;
while (j <= (leftCol + game.visX)) {
changeTile(j, topRow + game.visY, j, topRow - 1);
j++;
}
topRow = topRow - 1;
tileSpeedY = char.speedY;
} else {
char._y = char._y + char.speedY;
tileSpeedY = 0;
}
} else {
tileSpeedY = char.speedY;
}
if ((char.speedY + tileSpeedY) == 0) {
char._rotation = 0;
} else {
char_rad = Math.atan2(char.speedY, tileSpeedX);
char._rotation = (char_rad * 180) / Math.Pi;
}
if (!collision) {
tiles._x = tiles._x - tileSpeedX;
tiles._y = tiles._y - tileSpeedY;
frontItems._x = tiles._x;
frontItems._y = tiles._y;
backItems._x = tiles._x;
backItems._y = tiles._y;
if (!char2.link) {
char2_dist = Math.sqrt(Math.pow(char._y - char2._y, 2) + Math.pow(char._x - char2._x, 2));
char2_lastRad = (char2._rotation * Math.PI) / 180;
char2_frontX = char._x - ((Math.cos(char2_lastRad) * char2_dist) / char.spacing);
char2_frontY = char._y - ((Math.sin(char2_lastRad) * char2_dist) / char.spacing);
char2_rad = Math.atan2(char2_frontY - char2._y, char2_frontX - char2._x);
char2._rotation = (char2_rad * 180) / Math.Pi;
char2_addY = Math.sqrt(Math.pow(tileSpeedX, 2) + Math.pow(tileSpeedY, 2));
if ((char2_dist + char2_addY) >= char.spacing) {
char2._x = char._x - (Math.cos(char2_rad) * char.spacing);
char2._y = char._y - (Math.sin(char2_rad) * char.spacing);
char2.lastSpeedY = char2_addY;
char2.link = true;
} else {
char2._x = char2._x - tileSpeedX;
char2._y = char2._y - tileSpeedY;
}
} else {
pullDist = Math.sqrt(Math.pow(tileSpeedX, 2) + Math.pow(tileSpeedY, 2));
nextX = (char2._x + (Math.cos(char2_rad) * pullDist)) - tileSpeedX;
nextY = (char2._y + (Math.sin(char2_rad) * pullDist)) - tileSpeedY;
char2_rad = Math.atan2(char._y - nextY, char._x - nextX);
char2._rotation = (char2_rad * 180) / Math.Pi;
char2._x = char._x - (Math.cos(char2_rad) * char.spacing);
char2._y = char._y - (Math.sin(char2_rad) * char.spacing);
if (!char3.link) {
if ((char3._x - tileSpeedX) > char2._x) {
char3._x = char3._x - tileSpeedX;
char3._y = char3._y - tileSpeedY;
} else {
char3Rot();
char3._x = char2._x;
char3._y = char2._y;
char3.link = true;
}
} else {
char3Rot();
char3._x = char2._x;
char3._y = char2._y;
}
}
}
}
baseSpeed = 5;
scrollSpeed = baseSpeed * 2;
accRate = 1;
turbo = 1;
jumpDif = 0;
_parent.overRide = true;
_parent.music_loader.gotoAndPlay("fadeout");
Instance of Symbol 16 MovieClip [empty] in Symbol 725 MovieClip Frame 20
onClipEvent (enterFrame) {
if (dragging) {
_parent.userMove((_xmouse - setX) / 5, (_ymouse - setY) / 5);
}
}
onClipEvent (mouseDown) {
dragging = true;
setX = _xmouse;
setY = _ymouse;
}
Symbol 725 MovieClip Frame 28
_parent.music_loader.gotoAndPlay("fadeout");
_parent.playing = false;
Symbol 744 MovieClip Frame 1
stop();
Symbol 749 MovieClip Frame 1
function addBonusTime() {
if (_parent.bonusPause) {
_parent.bonusTime = _parent.bonusTime + (getTimer() - bonusStart);
}
}
_parent.bonusPause = false;
stop();
Symbol 749 MovieClip Frame 2
bonusStart = getTimer();
Instance of Symbol 16 MovieClip [empty] in Symbol 749 MovieClip Frame 2
onClipEvent (enterFrame) {
elapsed++;
angle = (Math.PI/180) * random(360);
distance = 15 + random(10);
_parent.sparksClip.magicSpark(Math.cos(angle) * distance, Math.sin(angle) * distance, (random(10) * 6) + 60);
}
onClipEvent (load) {
elapsed = 0;
}
Symbol 749 MovieClip Frame 152
addBonusTime();
Symbol 766 MovieClip Frame 1
function addPoints(points) {
score = score + points;
gotoAndPlay (2);
}
stop();
Symbol 774 MovieClip Frame 1
volumeStep = 5;
playing = false;
sound_jingle = new Sound(this);
sound_jingle.attachSound("jingle");
stop();
Symbol 774 MovieClip Frame 2
stop();
Symbol 774 MovieClip Frame 3
if (!_root.audioOn) {
gotoAndStop (2);
} else if (!playing) {
sound_jingle.setVolume(0);
sound_jingle.start(0, 1000);
playing = true;
}
Symbol 774 MovieClip Frame 4
stop();
Instance of Symbol 769 MovieClip in Symbol 774 MovieClip Frame 4
onClipEvent (enterFrame) {
if (jingleVol >= _root.currVolume) {
_parent.sound_jingle.setVolume(_root.currVolume);
_parent.gotoAndStop("static");
} else {
_parent.sound_jingle.setVolume(jingleVol);
jingleVol = jingleVol + _parent.volumeStep;
}
}
onClipEvent (load) {
jingleVol = _parent.sound_jingle.getVolume() + _parent.volumeStep;
}
Instance of Symbol 769 MovieClip in Symbol 774 MovieClip Frame 5
onClipEvent (enterFrame) {
if ((_parent.sound_jingle.getVolume() - _parent.volumeStep) <= 0) {
_parent.sound_jingle.setVolume(0);
_parent.sound_jingle.stop();
_parent.playing = false;
_parent.gotoAndStop("static");
} else {
_parent.sound_jingle.setVolume(_parent.sound_jingle.getVolume() - _parent.volumeStep);
}
}
Symbol 774 MovieClip Frame 6
stop();
Symbol 774 MovieClip Frame 7
stop();
Symbol 774 MovieClip Frame 13
stop();
Symbol 780 MovieClip Frame 1
volumeStep = 5;
maxVol = 100;
audioOn = true;
musicAllow = true;
playing = false;
section = "main";
stop();
Symbol 780 MovieClip Frame 4
if (playing || (!_root.audioOn)) {
gotoAndStop (2);
} else if (_root.audioOn) {
_parent.sound_music.setVolume(volumeStep);
_parent.sound_music.start(0, 1000);
playing = true;
}
play();
Symbol 780 MovieClip Frame 5
stop();
Instance of Symbol 775 MovieClip in Symbol 780 MovieClip Frame 5
onClipEvent (enterFrame) {
musicVol = musicVol + _parent.volumeStep;
if (musicVol >= _parent.maxVol) {
_parent._parent.sound_music.setVolume(_parent.maxVol);
_parent.gotoAndStop("static");
} else {
_parent._parent.sound_music.setVolume(musicVol);
}
}
onClipEvent (load) {
musicVol = _parent.volumeStep;
}
Instance of Symbol 775 MovieClip in Symbol 780 MovieClip Frame 6
onClipEvent (enterFrame) {
if ((_parent._parent.sound_music.getVolume() - (2 * _parent.volumeStep)) <= 0) {
_parent._parent.sound_music.stop();
_parent._parent.sound_music.setVolume(100);
_parent.playing = false;
_parent.gotoAndStop("static");
} else {
_parent._parent.sound_music.setVolume(_parent._parent.sound_music.getVolume() - (2 * _parent.volumeStep));
}
}
Symbol 780 MovieClip Frame 7
stop();
Symbol 780 MovieClip Frame 10
stop();