Frame 1
_parent.sounds = true;
sfx = 100;
ftoyi = 0;
stop();
Instance of Symbol 43 MovieClip [control] "control" in Frame 1
onClipEvent (load) {
totalBytes = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
c1 = _url.indexOf("://") + 3;
c2 = _url.indexOf("/", c1);
domain = _url.substring(c1, c2);
c3 = domain.lastIndexOf(".") - 1;
c4 = domain.lastIndexOf(".", c3) + 1;
domain = domain.substring(c4, domain.length);
bytesL = _root.getBytesLoaded();
amountLoaded = bytesL / totalBytes;
_root.read = ((int(bytesL / 1000) + "kb/") + int(totalBytes / 1000)) + "kb";
if (amountLoaded >= 1) {
_root.gotoAndPlay(2);
}
}
Frame 121
if (ftoyi == 0) {
_parent.sounds = true;
sfx = 100;
ftoyi = 1;
}
stop();
Instance of Symbol 43 MovieClip [control] "control" in Frame 121
onClipEvent (load) {
_root.read = "";
sound1 = new Sound();
sound1.attachSound("filler");
timer = 0;
}
onClipEvent (enterFrame) {
function exit() {
sound1.attachSound("exit");
sound1.start();
}
sound1.setVolume(_root.sfx);
if (timer == 0) {
timer = 90;
if (_parent.sounds == true) {
sound1.attachSound("filler");
sound1.start();
}
} else {
timer = timer - 1;
}
}
Instance of Symbol 76 MovieClip "TOGGLE" in Frame 121
onClipEvent (load) {
if (_parent.sounds == false) {
this.gotoAndPlay("OFF");
}
}
Frame 122
function addfloor(worf, xfloor, yfloor, rfloor, tfloor) {
if (worf == 0) {
attachMovie("flor", "flor" + n, n);
_root["flor" + n]._x = xfloor;
_root["flor" + n]._y = yfloor;
_root["flor" + n].gotoAndStop(tfloor);
n++;
}
if (worf == 1) {
attachMovie("wall", "wall" + m, m);
_root["wall" + m]._x = xfloor;
_root["wall" + m]._y = yfloor;
_root["wall" + m]._rotation = rfloor * 90;
_root["wall" + m].gotoAndStop(tfloor);
m++;
}
}
stop();
Instance of Symbol 43 MovieClip [control] "control" in Frame 122
onClipEvent (load) {
level = 1;
partv = 0;
FTO = 0;
Dead = 0;
Timer = 0;
XOld = 0;
YOld = 0;
XNew = 0;
YNew = 0;
Anim = 0;
Sft = 0;
Foft = 0;
_root.n = 0;
_root.m = 0;
_root.keys = 0;
_root.swords = 0;
_root.torches = 0;
_root.shields = 0;
_root.kills = 0;
_root.life = 3;
_root.score = 0;
sound1 = new Sound();
sound1.attachSound("mino");
tiem = 0;
indicator = 0;
}
onClipEvent (enterFrame) {
function createmaze() {
if (_root.multiplier == 0) {
xgrid = (level + 3) + int(Math.random() * 2);
ygrid = (level + 3) + int(Math.random() * 2);
}
if (_root.multiplier == 1) {
xgrid = (level + 6) + int(Math.random() * level);
ygrid = (level + 6) + int(Math.random() * level);
}
quota = level;
if (foft == 0) {
if (_root.torches > 0) {
_root.torches = _root.torches - 1;
}
}
foft = 0;
StepArr = new Array(xgrid + 2);
ErosArr = new Array(xgrid + 2);
DiscArr = new Array(xgrid + 2);
ForkArr = new Array(xgrid + 2);
SpecArr = new Array(xgrid + 2);
i = 0;
while (i < (xgrid + 2)) {
StepArr[i] = new Array(ygrid + 2);
ErosArr[i] = new Array(ygrid + 2);
DiscArr[i] = new Array(ygrid + 2);
ForkArr[i] = new Array(ygrid + 2);
SpecArr[i] = new Array(ygrid + 2);
i++;
}
i = 0;
while (i < (xgrid + 2)) {
j = 0;
while (j < (ygrid + 2)) {
ErosArr[i][j] = 0;
DiscArr[i][j] = 0;
ForkArr[i][j] = -1;
SpecArr[i][j] = 0;
if (i == 0) {
StepArr[i][j] = -1;
} else if (i == (xgrid + 1)) {
StepArr[i][j] = -1;
} else if (j == 0) {
StepArr[i][j] = -1;
} else if (j == (ygrid + 1)) {
StepArr[i][j] = -1;
} else {
StepArr[i][j] = 0;
}
j++;
}
i++;
}
XStart = int(Math.random() * (xgrid - 2)) + 2;
YStart = int(Math.random() * (ygrid - 2)) + 2;
Random = int(Math.random() * 4);
if (Random == 0) {
XEnd = 1;
YEnd = int(Math.random() * ygrid) + 1;
}
if (Random == 1) {
XEnd = xgrid;
YEnd = int(Math.random() * ygrid) + 1;
}
if (Random == 2) {
XEnd = int(Math.random() * xgrid) + 1;
YEnd = 1;
}
if (Random == 3) {
XEnd = int(Math.random() * xgrid) + 1;
YEnd = ygrid;
}
IG = 1;
i = 0;
while (i < IG) {
XEnd = int(Math.random() * (xgrid - 2)) + 2;
YEnd = int(Math.random() * (ygrid - 2)) + 2;
if (XEnd == XStart) {
if (YEnd == YStart) {
IG = IG + 1;
}
}
i++;
}
IG = 0;
Count = 0;
ExitEnt = 0;
CX = XStart;
CY = YStart;
TSteps = int(xgrid * ygrid) + level;
i = 1;
while (i < TSteps) {
XDistance = XEnd - CX;
YDistance = YEnd - CY;
LC = 0;
RC = 0;
UC = 0;
DC = 0;
LD = 0;
RD = 0;
UD = 0;
DD = 0;
IO = 0;
Count = Count + 1;
if (IG == 1) {
i = i - 1;
} else {
LM = 0;
RM = 0;
UM = 0;
DM = 0;
StepArr[CX][CY] = i;
}
IG = 0;
Type = 0;
if (CX == XEnd) {
if (CY == YEnd) {
ExitEnt = 1;
}
}
if (XDistance > 0) {
if (Math.abs(XDistance) >= Math.abs(YDistance)) {
RM = 2;
}
}
if (XDistance < 0) {
if (Math.abs(XDistance) >= Math.abs(YDistance)) {
LM = 2;
}
}
if (YDistance > 0) {
if (Math.abs(YDistance) >= Math.abs(XDistance)) {
DM = 2;
}
}
if (YDistance < 0) {
if (Math.abs(YDistance) >= Math.abs(XDistance)) {
UM = 2;
}
}
if (ExitEnt == 0) {
if (StepArr[CX + 1][CY] == 0) {
RC = 1;
if (int(Math.random() * (4 - RM)) == 0) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 2;
ErosArr[CX + 1][CY] = ErosArr[CX + 1][CY] + 8;
CX = CX + 1;
IO = 1;
RD = 1;
}
}
if (IO == 0) {
if (StepArr[CX - 1][CY] == 0) {
LC = 1;
if (int(Math.random() * (4 - LM)) == 0) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 8;
ErosArr[CX - 1][CY] = ErosArr[CX - 1][CY] + 2;
CX = CX - 1;
IO = 1;
LD = 1;
}
}
}
if (IO == 0) {
if (StepArr[CX][CY - 1] == 0) {
UC = 1;
if (int(Math.random() * (4 - UM)) == 0) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 1;
ErosArr[CX][CY - 1] = ErosArr[CX][CY - 1] + 4;
CY = CY - 1;
IO = 1;
UD = 1;
}
}
}
if (IO == 0) {
if (StepArr[CX][CY + 1] == 0) {
DC = 1;
if (int(Math.random() * (4 - DM)) == 0) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 4;
ErosArr[CX][CY + 1] = ErosArr[CX][CY + 1] + 1;
CY = CY + 1;
IO = 1;
DD = 1;
}
}
}
} else {
LC = 0;
DC = 0;
UC = 0;
RC = 0;
ExitEnt = 0;
}
if ((((LC + DC) + UC) + RC) == 0) {
if (StepArr[CX][CY + 1] == (i - 1)) {
CY = CY + 1;
i = i - 1;
IO = 1;
IG = 1;
}
if (IO == 0) {
if (StepArr[CX][CY - 1] == (i - 1)) {
CY = CY - 1;
i = i - 1;
IO = 1;
IG = 1;
}
}
if (IO == 0) {
if (StepArr[CX + 1][CY] == (i - 1)) {
CX = CX + 1;
i = i - 1;
IO = 1;
IG = 1;
}
}
if (IO == 0) {
if (StepArr[CX - 1][CY] == (i - 1)) {
CX = CX - 1;
i = i - 1;
IO = 1;
IG = 1;
}
}
if (IO == 0) {
TSteps = i + 1;
}
} else if (IO == 0) {
if (RC == 1) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 2;
ErosArr[CX + 1][CY] = ErosArr[CX + 1][CY] + 8;
CX = CX + 1;
IO = 1;
}
if (IO == 0) {
if (LC == 1) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 8;
ErosArr[CX - 1][CY] = ErosArr[CX - 1][CY] + 2;
CX = CX - 1;
IO = 1;
}
}
if (IO == 0) {
if (UC == 1) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 1;
ErosArr[CX][CY - 1] = ErosArr[CX][CY - 1] + 4;
CY = CY - 1;
IO = 1;
}
}
if (IO == 0) {
if (DC == 1) {
ErosArr[CX][CY] = ErosArr[CX][CY] + 4;
ErosArr[CX][CY + 1] = ErosArr[CX][CY + 1] + 1;
CY = CY + 1;
IO = 1;
}
}
}
if (StepArr[XEnd][YEnd] < 1) {
if (i == (TSteps - 1)) {
XEnd = CX;
YEnd = CY;
}
}
i++;
}
Fork = 0;
FO = 0;
Torches = _root.torches;
Keys = _root.keys;
Doors = 0;
Swords = _root.swords;
Minotaurs = 0;
Shields = _root.shields;
Traps = 0;
Bad = 0;
Count = xgrid * ygrid;
if (XEnd == XStart) {
if (YEnd == YStart) {
partv = 0;
FTO = 0;
XNew = 0;
YNew = 0;
indicator = 1;
foft = 1;
createmaze();
}
}
i = 1;
while (i < Count) {
if (i == 1) {
CX = XStart;
CY = YStart;
}
if (ForkArr[CX][CY] >= 0) {
Bad = 1;
if (IG == 0) {
i = i - 1;
}
}
IG = 0;
ForkArr[CX][CY] = i;
TWall = 0;
BWall = 0;
LWall = 0;
RWall = 0;
ToWall = 0;
Temp = ErosArr[CX][CY];
if (Temp > 7) {
Temp = Temp - 8;
LWall = 1;
}
if (Temp > 3) {
Temp = Temp - 4;
BWall = 1;
}
if (Temp > 1) {
Temp = Temp - 2;
RWall = 1;
}
if (Temp > 0) {
Temp = Temp - 1;
TWall = 1;
}
IO = 0;
ToWall = ((TWall + RWall) + LWall) + BWall;
if (CX == XStart) {
if (CY == YStart) {
IO = 1;
}
}
if (Keys > Doors) {
if (SpecArr[XEnd][YEnd] == 0) {
SpecArr[XEnd][YEnd] = 3;
Doors = Doors + 1;
}
}
if (CX == XEnd) {
if (CY == YEnd) {
IO = 1;
}
}
if (IO == 0) {
if (ToWall == 1) {
if (FO == 0) {
SpecArr[CX][CY] = 2;
Keys = Keys + 1;
} else {
if (IO == 0) {
if (int(Math.random() * 16) == 0) {
if (Torches < 2) {
SpecArr[CX][CY] = 1;
IO = 1;
Torches = Torches + 1;
}
}
}
if (IO == 0) {
if (int(Math.random() * 5) == 0) {
SpecArr[CX][CY] = 2;
Keys = Keys + 1;
IO = 1;
}
}
if (IO == 0) {
if (int(Math.random() * 5) == 0) {
if (Keys > Doors) {
SpecArr[CX][CY] = 3;
Doors = Doors + 0.75;
IO = 1;
}
}
}
if (IO == 0) {
if (int(Math.random() * 6) == 0) {
SpecArr[CX][CY] = 4;
Swords = Swords + 1;
IO = 1;
}
}
if (IO == 0) {
if (int(Math.random() * 6) == 0) {
if (Swords > Minotaurs) {
SpecArr[CX][CY] = 5;
Minotaurs = Minotaurs + 0.75;
IO = 1;
}
}
}
if (IO == 0) {
if (int(Math.random() * 6) == 0) {
SpecArr[CX][CY] = 6;
Shields = Shields + 1;
IO = 1;
}
}
if (IO == 0) {
if (int(Math.random() * 6) == 0) {
if (Shields > Traps) {
SpecArr[CX][CY] = 7;
Traps = Traps + 0.5;
IO = 1;
}
}
}
if (IO == 0) {
if (int(Math.random() * 24) == 0) {
SpecArr[CX][CY] = 8;
IO = 1;
}
}
if (IO == 0) {
SpecArr[CX][CY] = int(Math.random() * 7) + 1;
if (SpecArr[CX][CY] == 1) {
Torches = Torches + 1;
}
if (SpecArr[CX][CY] == 2) {
Keys = Keys + 1;
}
if (SpecArr[CX][CY] == 3) {
Doors = Doors + 1;
}
if (SpecArr[CX][CY] == 4) {
Swords = Swords + 1;
}
if (SpecArr[CX][CY] == 5) {
Minotaurs = Minotaurs + 1;
}
if (SpecArr[CX][CY] == 6) {
Shields = Shields + 1;
}
if (SpecArr[CX][CY] == 7) {
Traps = Traps + 1;
}
IO = 1;
}
}
FO = 1;
}
}
if (ToWall > 2) {
if (IO == 0) {
if (Bad == 0) {
if (int(Math.random() * 8) == 0) {
if (Keys > Doors) {
SpecArr[CX][CY] = 3;
Doors = Doors + 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (Bad == 0) {
if (int(Math.random() * 8) == 0) {
if (Swords > Minotaurs) {
SpecArr[CX][CY] = 5;
Minotaurs = Minotaurs + 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (Bad == 0) {
if (int(Math.random() * 8) == 0) {
if (Shields > Traps) {
SpecArr[CX][CY] = 7;
Traps = Traps + 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (Bad == 0) {
if (Keys > Doors) {
SpecArr[CX][CY] = 3;
Doors = Doors + 1;
IO = 1;
}
}
}
if (IO == 0) {
if (Bad == 0) {
if (Swords > Minotaurs) {
SpecArr[CX][CY] = 5;
Minotaurs = Minotaurs + 1;
IO = 1;
}
}
}
if (IO == 0) {
if (Bad == 0) {
if (Shields > Traps) {
SpecArr[CX][CY] = 7;
Traps = Traps + 1;
IO = 1;
}
}
}
FO = 1;
Bad = 0;
}
IO = 0;
if (i > 1) {
if (ToWall < 3) {
if (TWall == 1) {
if (ForkArr[CX][CY - 1] == -1) {
CY = CY - 1;
IO = 1;
}
}
if (IO == 0) {
if (RWall == 1) {
if (ForkArr[CX + 1][CY] == -1) {
CX = CX + 1;
IO = 1;
}
}
}
if (IO == 0) {
if (LWall == 1) {
if (ForkArr[CX - 1][CY] == -1) {
CX = CX - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (BWall == 1) {
if (ForkArr[CX][CY + 1] == -1) {
CY = CY + 1;
IO = 1;
}
}
}
}
if (ToWall > 2) {
if (TWall == 1) {
if (ForkArr[CX][CY - 1] == -1) {
if (int(Math.random() * 4) == 0) {
CY = CY - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (RWall == 1) {
if (ForkArr[CX + 1][CY] == -1) {
if (int(Math.random() * 4) == 0) {
CX = CX + 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (LWall == 1) {
if (ForkArr[CX - 1][CY] == -1) {
if (int(Math.random() * 4) == 0) {
CX = CX - 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (BWall == 1) {
if (ForkArr[CX][CY + 1] == -1) {
if (int(Math.random() * 4) == 0) {
CY = CY + 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (TWall == 1) {
if (ForkArr[CX][CY - 1] == -1) {
CY = CY - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (RWall == 1) {
if (ForkArr[CX + 1][CY] == -1) {
CX = CX + 1;
IO = 1;
}
}
}
if (IO == 0) {
if (LWall == 1) {
if (ForkArr[CX - 1][CY] == -1) {
CX = CX - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (BWall == 1) {
if (ForkArr[CX][CY + 1] == -1) {
CY = CY + 1;
IO = 1;
}
}
}
}
}
if (i == 1) {
if (ToWall < 2) {
if (TWall == 1) {
if (ForkArr[CX][CY - 1] == -1) {
CY = CY - 1;
IO = 1;
}
}
if (IO == 0) {
if (RWall == 1) {
if (ForkArr[CX + 1][CY] == -1) {
CX = CX + 1;
IO = 1;
}
}
}
if (IO == 0) {
if (LWall == 1) {
if (ForkArr[CX - 1][CY] == -1) {
CX = CX - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (BWall == 1) {
if (ForkArr[CX][CY + 1] == -1) {
CY = CY + 1;
IO = 1;
}
}
}
}
if (ToWall > 1) {
if (TWall == 1) {
if (ForkArr[CX][CY - 1] == -1) {
if (int(Math.random() * 4) == 0) {
CY = CY - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (RWall == 1) {
if (ForkArr[CX + 1][CY] == -1) {
if (int(Math.random() * 4) == 0) {
CX = CX + 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (LWall == 1) {
if (ForkArr[CX - 1][CY] == -1) {
if (int(Math.random() * 4) == 0) {
CX = CX - 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (BWall == 1) {
if (ForkArr[CX][CY + 1] == -1) {
if (int(Math.random() * 4) == 0) {
CY = CY + 1;
IO = 1;
}
}
}
}
if (IO == 0) {
if (TWall == 1) {
if (ForkArr[CX][CY - 1] == -1) {
CY = CY - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (RWall == 1) {
if (ForkArr[CX + 1][CY] == -1) {
CX = CX + 1;
IO = 1;
}
}
}
if (IO == 0) {
if (LWall == 1) {
if (ForkArr[CX - 1][CY] == -1) {
CX = CX - 1;
IO = 1;
}
}
}
if (IO == 0) {
if (BWall == 1) {
if (ForkArr[CX][CY + 1] == -1) {
CY = CY + 1;
IO = 1;
}
}
}
}
}
if (IO == 0) {
if ((StepArr[CX + 1][CY] + 1) == StepArr[CX][CY]) {
CX = CX + 1;
IO = 1;
}
if (IO == 0) {
if ((StepArr[CX - 1][CY] + 1) == StepArr[CX][CY]) {
CX = CX - 1;
IO = 1;
}
}
if (IO == 0) {
if ((StepArr[CX][CY + 1] + 1) == StepArr[CX][CY]) {
CY = CY + 1;
IO = 1;
}
}
if (IO == 0) {
if ((StepArr[CX][CY - 1] + 1) == StepArr[CX][CY]) {
CY = CY - 1;
IO = 1;
}
}
i = i - 1;
IG = 1;
if (IO == 0) {
i = Count;
}
}
i++;
}
}
function playmaze() {
_root.read = "Level " + level;
CX = XStart;
CY = YStart;
update();
}
function update() {
i = 0;
while (i < _root.m) {
_root["wall" + i].removeMovieClip();
i++;
}
_root.n = 0;
_root.m = 0;
DiscArr[CX][CY] = 1;
BW = 0;
RW = 0;
LW = 0;
TW = 0;
Temp = ErosArr[CX][CY];
RWall = 1;
LWall = 1;
TWall = 1;
BWall = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWall = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWall = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWall = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWall = 0;
}
RW = RWall;
LW = LWall;
TW = TWall;
BW = BWall;
if (XNew == CX) {
if (YNew == CY) {
XNew = XOld;
YNew = YOld;
if (_root.swords < 1) {
if (_root.shields < 1) {
_root.life = _root.life - 1;
if (_root.life == 0) {
_root.read = "The minotaur got you! You are dead...";
Dead = 1;
sound1.attachSound("youhit");
sound1.start();
}
if (_root.life > 0) {
_root.read = "The minotaur hurt you! Run if at all possible.";
sound1.attachSound("youhit");
sound1.start();
Anim = 1;
}
}
if (_root.shields > 0) {
_root.read = "The minotaur broke your shield. Isn't it time to run?";
_root.shields = _root.shields - 1;
sound1.attachSound("shield");
sound1.start();
Anim = 2;
}
} else {
_root.swords = _root.swords - 1;
_root.read = "Your sword killed the minotaur, but broke.";
_root.kills = _root.kills + 1;
SpecArr[XOld][YOld] = 0;
XNew = 0;
YNew = 0;
if (_root.multiplier == 0) {
_root.score = _root.score + 2;
} else {
_root.score = _root.score + 3;
}
sound1.attachSound("strap");
sound1.start();
Anim = 3;
}
timer = 5;
if (Dead == 1) {
timer = 120;
}
}
}
if (SpecArr[XNew][YNew] == 7) {
_root.read = "The trap killed the minotaur, and the trap broke.";
SpecArr[XOld][YOld] = 0;
SpecArr[XNew][YNew] = 9;
_root.kills = _root.kills + 1;
XNew = 0;
YNew = 0;
if (_root.multiplier == 0) {
_root.score = _root.score + 2;
} else {
_root.score = _root.score + 3;
}
sound1.attachSound("strap");
sound1.start();
}
SpecArr[XOld][YOld] = 0;
SpecArr[XNew][YNew] = 5;
if (LW == 0) {
if (SpecArr[CX - 1][CY] == 3) {
LW = 2;
}
}
if (RW == 0) {
if (SpecArr[CX + 1][CY] == 3) {
RW = 2;
}
}
if (TW == 0) {
if (SpecArr[CX][CY - 1] == 3) {
TW = 2;
}
}
if (BW == 0) {
if (SpecArr[CX][CY + 1] == 3) {
BW = 2;
}
}
if (LW == 2) {
}
if (BW == 2) {
}
if (RW == 2) {
}
if (TW == 2) {
}
if (SpecArr[CX][CY] == 1) {
_root.torches = _root.torches + 1;
SpecArr[CX][CY] = 0;
_root.read = "You found a torch!";
timer = 5;
sound1.attachSound("torch");
sound1.start();
_root.score = _root.score + 1;
}
if (SpecArr[CX][CY] == 2) {
_root.keys = _root.keys + 1;
SpecArr[CX][CY] = 0;
_root.read = "You found a key!";
timer = 5;
sound1.attachSound("key");
sound1.start();
_root.score = _root.score + 1;
}
if (SpecArr[CX][CY] == 4) {
_root.swords = _root.swords + 1;
SpecArr[CX][CY] = 0;
_root.read = "You found a sword!";
timer = 5;
_root.score = _root.score + 1;
sound1.attachSound("sword");
sound1.start();
}
if (SpecArr[CX][CY] == 6) {
_root.shields = _root.shields + 1;
SpecArr[CX][CY] = 0;
_root.read = "You found a shield!";
timer = 5;
_root.score = _root.score + 1;
sound1.attachSound("shield");
sound1.start();
}
if (SpecArr[CX][CY] == 7) {
if (_root.shields < 1) {
_root.life = _root.life - 1;
if (_root.life == 0) {
_root.read = "You hit a trap! You are dead...";
Dead = 1;
SpecArr[CX][CY] = 10;
sound1.attachSound("youhit");
sound1.start();
}
if (_root.life > 0) {
_root.read = "You hit a trap! Loss of life...";
sound1.attachSound("youhit");
sound1.start();
Anim = 1;
}
} else {
_root.shields = _root.shields - 1;
_root.read = "Your shield stopped a trap, and both broke.";
SpecArr[CX][CY] = 9;
sound1.attachSound("btrap");
sound1.start();
Anim = 2;
if (_root.multiplier == 1) {
_root.score = _root.score + 1;
}
}
timer = 5;
if (Dead == 1) {
timer = 120;
}
}
if (SpecArr[CX][CY] == 8) {
_root.life = _root.life + 1;
SpecArr[CX][CY] = 0;
_root.read = "You found a potion!";
timer = 5;
sound1.attachSound("potion");
sound1.start();
_root.score = _root.score + 1;
}
if (_root.torches > 0) {
if (RW == 0) {
DiscArr[CX + 1][CY] = 1;
}
if (LW == 0) {
DiscArr[CX - 1][CY] = 1;
}
if (TW == 0) {
DiscArr[CX][CY - 1] = 1;
}
if (BW == 0) {
DiscArr[CX][CY + 1] = 1;
}
}
i = -3;
while (i < 4) {
j = -3;
while (j < 4) {
if (DiscArr[CX + i][CY + j] == 1) {
Temp = ErosArr[CX + i][CY + j];
RWall = 1;
LWall = 1;
TWall = 1;
BWall = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWall = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWall = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWall = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWall = 0;
}
if (RWall == 0) {
if (SpecArr[(CX + i) + 1][CY + j] == 3) {
RWall = 2;
}
}
if (LWall == 0) {
if (SpecArr[(CX + i) - 1][CY + j] == 3) {
LWall = 2;
}
}
if (TWall == 0) {
if (SpecArr[CX + i][(CY + j) - 1] == 3) {
TWall = 2;
}
}
if (BWall == 0) {
if (SpecArr[CX + i][(CY + j) + 1] == 3) {
BWall = 2;
}
}
if (i == 0) {
if (j == 0) {
if (RWall == 0) {
if (_root.torches < 1) {
if (DiscArr[CX + 1][CY] == 0) {
DiscArr[CX + 1][CY] = 2;
}
}
if (SpecArr[CX + 1][CY] == 1) {
_root.addfloor(1, 240 + (i * 50), 190 + (j * 50), 0, "torch");
}
if (SpecArr[CX + 1][CY] == 2) {
_root.addfloor(1, 240 + (i * 50), 190 + (j * 50), 0, "key");
}
if (SpecArr[CX + 1][CY] == 4) {
_root.addfloor(1, 240 + (i * 50), 190 + (j * 50), 0, "sword");
}
if (SpecArr[CX + 1][CY] == 5) {
_root.addfloor(1, 240 + (i * 50), 190 + (j * 50), 0, "minotaur");
XOld = CX + 1;
YOld = CY;
XNew = CX;
YNew = CY;
RW = -1;
if (Sft == 0) {
sound1.attachSound("mino");
sound1.start();
}
}
if (SpecArr[CX + 1][CY] == 6) {
_root.addfloor(1, 240 + (i * 50), 190 + (j * 50), 0, "shield");
}
if (SpecArr[CX + 1][CY] == 8) {
_root.addfloor(1, 240 + (i * 50), 190 + (j * 50), 0, "potion");
}
if ((CX + 1) == XEnd) {
if (CY == YEnd) {
_root.addfloor(1, 240 + (i * 50), 190 + (j * 50), 0, "exit");
if (_root.torches < 1) {
DiscArr[CX + 1][CY] = 2;
}
}
}
}
if (LWall == 0) {
if (_root.torches < 1) {
if (DiscArr[CX - 1][CY] == 0) {
DiscArr[CX - 1][CY] = 2;
}
}
if (SpecArr[CX - 1][CY] == 1) {
_root.addfloor(1, 140 + (i * 50), 190 + (j * 50), 0, "torch");
}
if (SpecArr[CX - 1][CY] == 2) {
_root.addfloor(1, 140 + (i * 50), 190 + (j * 50), 0, "key");
}
if (SpecArr[CX - 1][CY] == 4) {
_root.addfloor(1, 140 + (i * 50), 190 + (j * 50), 0, "sword");
}
if (SpecArr[CX - 1][CY] == 5) {
_root.addfloor(1, 140 + (i * 50), 190 + (j * 50), 0, "minotaur");
XOld = CX - 1;
YOld = CY;
XNew = CX;
YNew = CY;
LW = -1;
if (Sft == 0) {
sound1.attachSound("mino");
sound1.start();
}
}
if (SpecArr[CX - 1][CY] == 6) {
_root.addfloor(1, 140 + (i * 50), 190 + (j * 50), 0, "shield");
}
if (SpecArr[CX - 1][CY] == 8) {
_root.addfloor(1, 140 + (i * 50), 190 + (j * 50), 0, "potion");
}
if ((CX - 1) == XEnd) {
if (CY == YEnd) {
_root.addfloor(1, 140 + (i * 50), 190 + (j * 50), 0, "exit");
if (_root.torches < 1) {
DiscArr[CX - 1][CY] = 2;
}
}
}
}
if (TWall == 0) {
if (_root.torches < 1) {
if (DiscArr[CX][CY - 1] == 0) {
DiscArr[CX][CY - 1] = 2;
}
}
if (SpecArr[CX][CY - 1] == 1) {
_root.addfloor(1, 190 + (i * 50), 140 + (j * 50), 0, "torch");
}
if (SpecArr[CX][CY - 1] == 2) {
_root.addfloor(1, 190 + (i * 50), 140 + (j * 50), 0, "key");
}
if (SpecArr[CX][CY - 1] == 4) {
_root.addfloor(1, 190 + (i * 50), 140 + (j * 50), 0, "sword");
}
if (SpecArr[CX][CY - 1] == 5) {
_root.addfloor(1, 190 + (i * 50), 140 + (j * 50), 0, "minotaur");
TW = -1;
XOld = CX;
YOld = CY - 1;
XNew = CX;
YNew = CY;
if (Sft == 0) {
sound1.attachSound("mino");
sound1.start();
}
}
if (SpecArr[CX][CY - 1] == 6) {
_root.addfloor(1, 190 + (i * 50), 140 + (j * 50), 0, "shield");
}
if (SpecArr[CX][CY - 1] == 8) {
_root.addfloor(1, 190 + (i * 50), 140 + (j * 50), 0, "potion");
}
if (CX == XEnd) {
if ((CY - 1) == YEnd) {
_root.addfloor(1, 190 + (i * 50), 140 + (j * 50), 0, "exit");
if (_root.torches < 1) {
DiscArr[CX][CY - 1] = 2;
}
}
}
}
if (BWall == 0) {
if (_root.torches < 1) {
if (DiscArr[CX][CY + 1] == 0) {
DiscArr[CX][CY + 1] = 2;
}
}
if (SpecArr[CX][CY + 1] == 1) {
_root.addfloor(1, 190 + (i * 50), 240 + (j * 50), 0, "torch");
}
if (SpecArr[CX][CY + 1] == 2) {
_root.addfloor(1, 190 + (i * 50), 240 + (j * 50), 0, "key");
}
if (SpecArr[CX][CY + 1] == 4) {
_root.addfloor(1, 190 + (i * 50), 240 + (j * 50), 0, "sword");
}
if (SpecArr[CX][CY + 1] == 5) {
_root.addfloor(1, 190 + (i * 50), 240 + (j * 50), 0, "minotaur");
BW = -1;
XOld = CX;
YOld = CY + 1;
XNew = CX;
YNew = CY;
if (Sft == 0) {
sound1.attachSound("mino");
sound1.start();
}
}
if (SpecArr[CX][CY + 1] == 6) {
_root.addfloor(1, 190 + (i * 50), 240 + (j * 50), 0, "shield");
}
if (SpecArr[CX][CY + 1] == 8) {
_root.addfloor(1, 190 + (i * 50), 240 + (j * 50), 0, "potion");
}
if (CX == XEnd) {
if ((CY + 1) == YEnd) {
_root.addfloor(1, 190 + (i * 50), 240 + (j * 50), 0, "exit");
if (_root.torches < 1) {
DiscArr[CX][CY + 1] = 2;
}
}
}
}
Tft = 0;
if (RW == -1) {
Sft = 1;
Tft = 1;
}
if (LW == -1) {
Sft = 1;
Tft = 1;
}
if (TW == -1) {
Sft = 1;
Tft = 1;
}
if (BW == -1) {
Sft = 1;
Tft = 1;
}
if (Tft == 0) {
Sft = 0;
}
if (SpecArr[CX][CY] == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "torch");
}
if (SpecArr[CX][CY] == 2) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "key");
}
if (SpecArr[CX][CY] == 4) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "sword");
}
if (SpecArr[CX][CY] == 6) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "shield");
}
if (CX == XEnd) {
if (CY == YEnd) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "exit");
}
}
}
}
if (TWall == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, 0);
if (DiscArr[(CX + i) - 1][CY + j] == 1) {
Temp = ErosArr[(CX + i) - 1][CY + j];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (RWallt == 0) {
if (TWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "left");
}
}
}
if (DiscArr[(CX + i) + 1][CY + j] == 1) {
Temp = ErosArr[(CX + i) + 1][CY + j];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (LWallt == 0) {
if (TWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "right");
}
}
}
}
if (RWall == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 1, 0);
if (DiscArr[CX + i][(CY + j) - 1] == 1) {
Temp = ErosArr[CX + i][(CY + j) - 1];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (BWallt == 0) {
if (RWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 1, "left");
}
}
}
if (DiscArr[CX + i][(CY + j) + 1] == 1) {
Temp = ErosArr[CX + i][(CY + j) + 1];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (TWallt == 0) {
if (RWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 1, "right");
}
}
}
}
if (BWall == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 2, 0);
if (DiscArr[(CX + i) - 1][CY + j] == 1) {
Temp = ErosArr[(CX + i) - 1][CY + j];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (RWallt == 0) {
if (BWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 2, "right");
}
}
}
if (DiscArr[(CX + i) + 1][CY + j] == 1) {
Temp = ErosArr[(CX + i) + 1][CY + j];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (LWallt == 0) {
if (BWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 2, "left");
}
}
}
}
if (LWall == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 3, 0);
if (DiscArr[CX + i][(CY + j) - 1] == 1) {
Temp = ErosArr[CX + i][(CY + j) - 1];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (BWallt == 0) {
if (LWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 3, "right");
}
}
}
if (DiscArr[CX + i][(CY + j) + 1] == 1) {
Temp = ErosArr[CX + i][(CY + j) + 1];
RWallt = 1;
LWallt = 1;
TWallt = 1;
BWallt = 1;
if (Temp > 7) {
Temp = Temp - 8;
LWallt = 0;
}
if (Temp > 3) {
Temp = Temp - 4;
BWallt = 0;
}
if (Temp > 1) {
Temp = Temp - 2;
RWallt = 0;
}
if (Temp > 0) {
Temp = Temp - 1;
TWallt = 0;
}
if (TWallt == 0) {
if (LWallt == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 3, "left");
}
}
}
}
if (TWall == 2) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "door");
}
if (RWall == 2) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 1, "door");
}
if (BWall == 2) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 2, "door");
}
if (LWall == 2) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 3, "door");
}
if (SpecArr[CX + i][CY + j] == 7) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "trap");
}
if (SpecArr[CX + i][CY + j] == 10) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "strap");
}
if (SpecArr[CX + i][CY + j] == 9) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "btrap");
}
if (i == 0) {
if (j == 0) {
if (Dead == 0) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "you");
}
}
}
}
if (DiscArr[CX + i][CY + j] > 0) {
if ((CX + i) == XEnd) {
if ((CY + j) == YEnd) {
numb = 0;
if (i == 0) {
if (j == 0) {
numb = 1;
}
}
if (numb == 0) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "exit");
}
}
}
}
if (DiscArr[CX + i][CY + j] > 0) {
numb = 0;
if (i == 0) {
if (j == 0) {
numb = 1;
}
}
if (numb == 0) {
if (SpecArr[CX + i][CY + j] == 1) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "torch");
}
if (SpecArr[CX + i][CY + j] == 2) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "key");
}
if (SpecArr[CX + i][CY + j] == 4) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "sword");
}
if (SpecArr[CX + i][CY + j] == 6) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "shield");
}
if (SpecArr[CX + i][CY + j] == 8) {
_root.addfloor(1, 190 + (i * 50), 190 + (j * 50), 0, "potion");
}
}
}
j++;
}
i++;
}
if (Anim == 0) {
} else {
if (Anim == 1) {
mem = _root.m;
_root.addfloor(1, 190, 190, 0, "wound");
}
if (Anim == 2) {
mem = _root.m;
_root.addfloor(1, 190, 190, 0, "defend");
}
if (Anim == 3) {
mem = _root.m;
_root.addfloor(1, 190, 190, 0, "attack");
}
}
i = 0;
while (i < _root.m) {
if (_root.torches == 0) {
if (_root["wall" + i]._x == 190) {
if (_root["wall" + i]._y == 190) {
_root["wall" + i]._alpha = 100;
}
} else {
_root["wall" + i]._alpha = 75;
}
if (_root["wall" + i]._y != 190) {
_root["wall" + i]._alpha = 75;
}
}
if (_root.torches > 0) {
IO = 0;
if (_root["wall" + i]._x == 190) {
if (_root["wall" + i]._y == 190) {
_root["wall" + i]._alpha = 100;
IO = 1;
}
if (_root["wall" + i]._y == 140) {
if (TW < 1) {
_root["wall" + i]._alpha = 100;
IO = 1;
}
}
if (_root["wall" + i]._y == 240) {
if (BW < 1) {
_root["wall" + i]._alpha = 100;
IO = 1;
}
}
}
if (_root["wall" + i]._y == 190) {
if (_root["wall" + i]._x == 140) {
if (LW < 1) {
_root["wall" + i]._alpha = 100;
IO = 1;
}
}
if (_root["wall" + i]._x == 240) {
if (RW < 1) {
_root["wall" + i]._alpha = 100;
IO = 1;
}
}
}
if (IO == 0) {
_root["wall" + i]._alpha = 75;
}
}
if (Timer == 0) {
Timer = 5;
}
i++;
}
}
function compute(xam, yam) {
XNew = XOld;
YNew = YOld;
if (_root.swords < 1) {
if (_root.shields < 1) {
_root.life = _root.life - 1;
if (_root.life == 0) {
_root.read = "The minotaur got you! You are dead...";
Dead = 1;
sound1.attachSound("youhit");
sound1.start();
}
if (_root.life > 0) {
_root.read = "As you dodged past the minotaur, it wounded you!";
sound1.attachSound("youhit");
sound1.start();
SpecArr[CX + xam][CY + yam] = 0;
CX = CX + xam;
CY = CY + yam;
SpecArr[CX - xam][CY - yam] = 5;
XNew = 0;
YNew = 0;
Anim = 1;
}
}
if (_root.shields > 0) {
_root.read = "As you dashed past the minotaur, it broke your shield.";
_root.shields = _root.shields - 1;
sound1.attachSound("shield");
sound1.start();
SpecArr[CX + xam][CY + yam] = 0;
CX = CX + xam;
CY = CY + yam;
SpecArr[CX - xam][CY - yam] = 5;
XNew = 0;
YNew = 0;
Anim = 2;
}
} else {
_root.swords = _root.swords - 1;
_root.read = "Your sword killed the minotaur, but broke.";
_root.kills = _root.kills + 1;
SpecArr[CX + xam][CY + yam] = 0;
XNew = 0;
YNew = 0;
if (_root.multiplier == 0) {
_root.score = _root.score + 2;
} else {
_root.score = _root.score + 3;
}
sound1.attachSound("strap");
sound1.start();
Anim = 3;
}
timer = 5;
if (Dead == 1) {
timer = 120;
}
update();
}
sound1.setVolume(_root.sfx);
if (partv == 0) {
createmaze();
partv = 1;
}
if (partv == 1) {
playmaze();
partv = 2;
}
if (Timer == 0) {
if (Anim == 0) {
mem = -1;
}
Anim = 0;
_root["wall" + mem].removeMovieClip();
if (Dead == 1) {
Dead = 0;
XNew = 0;
YNew = 0;
i = 0;
while (i < _root.m) {
_root["wall" + i].removeMovieClip();
i++;
}
_root.n = 0;
_root.m = 0;
_root.level = level;
_root.read = ((("Your score was " + _root.score) + " and your level was ") + level) + ".";
_root.prevFrame();
}
if (Dead == 0) {
if (Key.isDown(37)) {
Move = 0;
if (LW == 2) {
if (_root.keys < 1) {
_root.read = "The door's locked, and you don't have a key.";
Timer = 5;
} else {
_root.read = "You unlocked the door.";
Timer = 5;
_root.keys = _root.keys - 1;
SpecArr[CX - 1][CY] = 0;
update();
Move = 1;
sound1.attachSound("unlock");
sound1.start();
}
}
if (LW == -1) {
compute(-1, 0);
Move = 1;
}
if (Move == 0) {
if (LW == 0) {
CX = CX - 1;
_root.read = "Level " + level;
update();
}
}
}
if (Key.isDown(39)) {
Move = 0;
if (RW == 2) {
if (_root.keys < 1) {
_root.read = "The door's locked, and you don't have a key.";
Timer = 5;
} else {
_root.keys = _root.keys - 1;
_root.read = "You unlocked the door.";
Timer = 5;
SpecArr[CX + 1][CY] = 0;
update();
Move = 1;
sound1.attachSound("unlock");
sound1.start();
}
}
if (RW == -1) {
compute(1, 0);
Move = 1;
}
if (Move == 0) {
if (RW == 0) {
CX = CX + 1;
_root.read = "Level " + level;
update();
}
}
}
if (Key.isDown(38)) {
Move = 0;
if (TW == 2) {
if (_root.keys < 1) {
_root.read = "The door's locked, and you don't have a key.";
Timer = 5;
} else {
_root.read = "You unlocked the door.";
Timer = 5;
SpecArr[CX][CY - 1] = 0;
_root.keys = _root.keys - 1;
update();
Move = 1;
sound1.attachSound("unlock");
sound1.start();
}
}
if (TW == -1) {
compute(0, -1);
Move = 1;
}
if (Move == 0) {
if (TW == 0) {
CY = CY - 1;
_root.read = "Level " + level;
update();
}
}
}
if (Key.isDown(40)) {
Move = 0;
if (BW == 2) {
if (_root.keys < 1) {
_root.read = "The door's locked, and you don't have a key.";
Timer = 5;
} else {
_root.read = "You unlocked the door.";
Timer = 5;
SpecArr[CX][CY + 1] = 0;
_root.keys = _root.keys - 1;
update();
Move = 1;
sound1.attachSound("unlock");
sound1.start();
}
}
if (BW == -1) {
compute(0, 1);
Move = 1;
}
if (Move == 0) {
if (BW == 0) {
CY = CY + 1;
_root.read = "Level " + level;
update();
}
}
}
}
}
if (Timer > 0) {
Timer = Timer - 1;
}
if (CX == XEnd) {
if (CY == YEnd) {
_root.read = "You found the staircase!";
if (FTO == 0) {
Timer = 60;
FTO = 1;
sound1.attachSound("exit");
sound1.start();
}
if (Timer == 1) {
level = level + 1;
partv = 0;
FTO = 0;
XNew = 0;
YNew = 0;
_root.score = _root.score + _root.life;
_root.read = "Loading Level...";
}
}
}
if (tiem == 0) {
tiem = 90;
sound1.attachSound("filler");
sound1.start();
} else {
tiem = tiem - 1;
}
}
Instance of Symbol 76 MovieClip "TOGGLE" in Frame 122
onClipEvent (load) {
if (_parent.sounds == false) {
this.gotoAndPlay("OFF");
}
}
Symbol 32 MovieClip [wall] Frame 1
stop();
Symbol 32 MovieClip [wall] Frame 2
stop();
Symbol 32 MovieClip [wall] Frame 3
stop();
Symbol 32 MovieClip [wall] Frame 4
stop();
Symbol 32 MovieClip [wall] Frame 5
stop();
Symbol 32 MovieClip [wall] Frame 6
stop();
Symbol 32 MovieClip [wall] Frame 7
stop();
Symbol 32 MovieClip [wall] Frame 8
stop();
Symbol 32 MovieClip [wall] Frame 9
stop();
Symbol 32 MovieClip [wall] Frame 10
stop();
Symbol 32 MovieClip [wall] Frame 11
stop();
Symbol 32 MovieClip [wall] Frame 12
stop();
Symbol 32 MovieClip [wall] Frame 13
stop();
Symbol 32 MovieClip [wall] Frame 14
stop();
Symbol 32 MovieClip [wall] Frame 15
stop();
Symbol 32 MovieClip [wall] Frame 16
stop();
Symbol 32 MovieClip [wall] Frame 17
stop();
Symbol 32 MovieClip [wall] Frame 18
stop();
Symbol 32 MovieClip [wall] Frame 19
stop();
Symbol 41 MovieClip [flor] Frame 1
stop();
Symbol 41 MovieClip [flor] Frame 2
stop();
Symbol 41 MovieClip [flor] Frame 3
stop();
Symbol 41 MovieClip [flor] Frame 4
stop();
Symbol 41 MovieClip [flor] Frame 5
stop();
Symbol 41 MovieClip [flor] Frame 6
stop();
Symbol 41 MovieClip [flor] Frame 7
stop();
Symbol 41 MovieClip [flor] Frame 8
stop();
Symbol 50 Button
on (release) {
getURL ("http://www.lilgames.com", "_self");
}
Symbol 51 Button
on (release) {
getURL ("http://www.lilgames.com", "_blank");
}
Symbol 59 Button
on (release) {
_root.control.exit();
_root.multiplier = 0;
_root.nextFrame();
}
Symbol 61 Button
on (release) {
_root.control.exit();
_root.multiplier = 1;
_root.nextFrame();
}
Symbol 70 Button
on (release) {
getURL ("http://www.lilgames.com", "_blank");
}
Symbol 73 Button
on (release) {
_parent.sounds = false;
this.globalsound.setVolume(0);
gotoAndPlay (7);
}
Symbol 75 Button
on (release) {
this.globalsound.setVolume(100);
_parent.sounds = true;
gotoAndPlay (1);
}
Symbol 76 MovieClip Frame 1
if (_root.sounds == false) {
gotoAndPlay (7);
}
Symbol 76 MovieClip Frame 2
_root.sfx = 100;
stop();
Symbol 76 MovieClip Frame 7
_root.sfx = 0;
stop();
Symbol 96 Button
on (release) {
if (_root.control.Dead == 0) {
_root.control.Dead = 1;
_root.control.timer = 60;
_root.read = "You died of starvation...";
} else {
_root.control.timer = 0;
}
}