Frame 1
fscommand ("allowscale", false);
fscommand ("showmenu", false);
Frame 2
parcial = _root.getBytesLoaded();
total = _root.getBytesTotal();
if (parcial == total) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay (2);
Frame 435
stopAllSounds();
stop();
Frame 436
function buildMap(map) {
_root.attachMovie("empty", "tiles", 10);
_root.attachMovie("myMap" + game.currentMap, "background", 6);
_root.attachMovie(["sky" + myCielo[game.currentMap]], "sky", 5);
_root.attachMovie("empty", "weaponry", 50000);
_root.temp_d = 0;
_root.attachMovie("empty", "enemylair", 60000);
en = 0;
if (_root.musicaActual == _root.myMusic[game.currentMap]) {
} else {
_root.musicaActual = _root.myMusic[game.currentMap];
_root.sonido(4, ["musica" + [_root.myMusic[game.currentMap]]]);
}
_root.attachMovie("hud", "hud", 95000);
game.clip = _root.tiles;
var mapWidth = map[0].length;
var mapHeight = map.length;
var i = 0;
while (i < mapHeight) {
var j = 0;
while (j < mapWidth) {
var name = ((("t_" + i) + "_") + j);
game[name] = new game["Tile" + map[i][j]]();
game.clip.attachMovie("tile", name, (i * 100) + (j * 2));
game.clip[name]._x = j * game.tileW;
game.clip[name]._y = i * game.tileH;
game.clip[name].gotoAndStop(game[name].frame);
if (game[name].item != "") {
game.clip[name].attachMovie(game[name].item, "item", 1);
}
if (game[name].enemy == true) {
_root.enemylair.attachMovie(game[name].enemyType, "enemy" + en, en);
_root.enemylair["enemy" + en].clip.name = "enemy" + en;
_root.enemylair["enemy" + en].clip.dir = game[name].dir;
_root.enemylair["enemy" + en].clip.vel = game[name].vel;
_root.enemylair["enemy" + en].clip.life = game[name].life;
_root.enemylair["enemy" + en].clip.altura = game[name].altura;
_root.enemylair["enemy" + en].clip.score = game[name].score;
_root.enemylair["enemy" + en].clip.pain = game[name].pain;
_root.enemylair["enemy" + en]._x = (j * game.tileW) + 8;
_root.enemylair["enemy" + en]._y = (i * game.tileH) + 8;
en++;
}
j++;
}
i++;
}
var doors = myDoors[game.currentMap];
var i = 0;
while (i < doors.length) {
var name = ((("t_" + doors[i][0]) + "_") + doors[i][1]);
game[name].nextMap = doors[i][2];
game[name].nextY = doors[i][3];
game[name].nextX = doors[i][4];
i++;
}
game.clip.attachMovie("char", "char", 100000);
char.clip = game.clip.char;
char.width = (game.tileW / 2) - 2;
char.height = game.tileH / 2;
char.x = (char.xtile * game.tileW) + (game.tileW / 2);
char.y = ((char.ytile + 1) * game.tileH) - char.height;
char.clip._x = char.x;
char.clip._y = char.y;
char.clip.gotoAndStop(char.frame);
}
function detectKeys() {
var ob = _root.char;
var keyPressed = false;
if (Key.isDown(32) and (!ob.jump)) {
_root.sonido(1, "jump.wav");
ob.jump = true;
ob.jumpspeed = ob.jumpstart;
}
if (Key.isDown(17) & (accion != "escala")) {
if (accion == "saltando") {
_root.updateAnim(_root.char, dir, "dispara");
_root.vert = "up";
ob.disparando = true;
} else if (Key.isDown(40)) {
_root.updateAnim(_root.char, dir, "dispara_agacha");
_root.vert = "down";
ob.disparando = true;
} else if ((Key.isDown(38) & (_root.char.weapon != "")) & (_root.char.hearts > 0)) {
_root.char.clip.dir = dir;
_root.updateAnim(_root.char, dir, "dispara_especial");
ob.disparando = true;
} else {
_root.updateAnim(_root.char, dir, "dispara");
_root.vert = "up";
ob.disparando = true;
}
} else if (((ob.disparando == false) & key.isDown(40)) & (accion != "escala")) {
_root.updateAnim(_root.char, dir, "agacha");
} else if ((_root.char.disparando == false) & (accion != "escala")) {
_root.updateAnim(_root.char, dir, "depie");
ob.saltando = false;
}
if (Key.isDown(40) == true) {
if (ob.disparando == false) {
if ((!ob.jump) and checkDownLadder(ob)) {
keyPressed = _root.climb(ob, 1);
} else {
_root.updateAnim(_root.char, dir, "agacha");
}
}
} else if (Key.isDown(39)) {
if ((ob.disparando == false) or (ob.saltando == true)) {
_root.dir = "der";
getMyCorners(ob.x - ob.speed, ob.y, ob);
if ((!ob.climb) or (((ob.downleft and ob.upleft) and ob.upright) and ob.downright)) {
keyPressed = _root.moveChar(ob, 1, 0);
}
}
} else if (Key.isDown(37)) {
if ((ob.disparando == false) or (ob.saltando == true)) {
_root.dir = "izq";
getMyCorners(ob.x - ob.speed, ob.y, ob);
if ((!ob.climb) or (((ob.downleft and ob.upleft) and ob.upright) and ob.downright)) {
keyPressed = _root.moveChar(ob, -1, 0);
}
}
} else if (Key.isDown(38)) {
if (ob.disparando == false) {
if (ob.jump and checkUpLadder(ob)) {
keyPressed = _root.climb(ob, -1);
} else if ((!ob.jump) and checkUpLadder(ob)) {
keyPressed = _root.climb(ob, -1);
} else {
_root.updateAnim(_root.char, dir, "depie");
}
}
}
if (ob.jump == true) {
keyPressed = _root.jump(ob);
}
if (keyPressed != true) {
if (accion == "escala") {
ob.clip.gotoAndStop(10);
ob.clip.escala.gotoAndStop(1);
} else {
ob.clip.char.gotoAndStop(1);
}
} else {
ob.clip.char.play();
}
}
function moveChar(ob, dirx, diry, jump) {
if (Math.abs(jump) == 1) {
speed = ob.jumpspeed * jump;
} else {
speed = ob.speed;
}
getMyCorners(ob.x, ob.y + (speed * diry), ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + (speed * diry);
if (ob.disparando == false) {
accion = "saltando";
ob.saltando = true;
} else {
accion = "dispara";
}
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
ob.jumpspeed = 0;
accion = "puntocero";
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
ob.y = ob.y + (speed * diry);
if (ob.disparando == false) {
accion = "cayendo";
ob.saltando = true;
} else {
accion = "dispara";
}
} else {
accion = "depie";
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
ob.jump = false;
ob.disparando = false;
ob.saltando = false;
}
}
getMyCorners(ob.x + (ob.speed * dirx), ob.y, ob);
if (dirx == -1) {
if (ob.downleft and ob.upleft) {
ob.x = ob.x + (ob.speed * dirx);
fall(ob);
dir = "izq";
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
dir = "izq";
}
}
if (dirx == 1) {
if (ob.upright and ob.downright) {
ob.x = ob.x + (speed * dirx);
fall(ob);
dir = "der";
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
dir = "der";
}
}
updateChar(ob, dirx, diry);
return(true);
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
}
function changeMap(ob) {
var name = ((("t_" + ob.ytile) + "_") + ob.xtile);
game.currentMap = game[name].nextMap;
ob.ytile = game[name].nextY;
ob.xtile = game[name].nextX;
ob.frame = ob.clip._currentframe;
buildMap(_root["myMap" + game.currentMap]);
}
function jump(ob) {
ob.jumpspeed = ob.jumpspeed + ob.gravity;
if (ob.jumpspeed > game.tileH) {
ob.jumpspeed = game.tileH;
}
if (ob.jumpspeed < 0) {
moveChar(ob, 0, -1, -1);
} else if (ob.jumpspeed > 0) {
moveChar(ob, 0, 1, 1);
}
}
function fall(ob) {
ob.climb = false;
if (!ob.jump) {
getMyCorners(ob.x, ob.y + 1, ob);
if (ob.downleft and ob.downright) {
ob.jumpspeed = 0;
ob.jump = true;
}
}
}
function updateAnim(ob, dir, accion) {
if (accion == "depie") {
if (dir == "der") {
ob.clip.gotoAndStop(1);
} else {
ob.clip.gotoAndStop(21);
}
}
if (accion == "saltando") {
if (dir == "der") {
ob.clip.gotoAndStop(3);
} else {
ob.clip.gotoAndStop(23);
}
}
if (accion == "cayendo") {
if (dir == "der") {
ob.clip.gotoAndStop(4);
} else {
ob.clip.gotoAndStop(24);
}
}
if (accion == "agacha") {
if (dir == "der") {
ob.clip.gotoAndStop(2);
} else {
ob.clip.gotoAndStop(22);
}
}
if (accion == "dispara") {
if (dir == "der") {
ob.clip.gotoAndStop(5);
} else {
ob.clip.gotoAndStop(25);
}
}
if (accion == "dispara_agacha") {
if (dir == "der") {
ob.clip.gotoAndStop(6);
} else {
ob.clip.gotoAndStop(26);
}
}
if (accion == "dispara_especial") {
if (dir == "der") {
ob.clip.gotoAndStop(7);
} else {
ob.clip.gotoAndStop(27);
}
}
if (accion == "escala") {
if (dir == "der") {
ob.clip.gotoAndStop(30);
} else {
ob.clip.gotoAndStop(30);
}
}
if (accion == "pain") {
if (dir == "der") {
ob.clip.gotoAndStop(28);
} else {
ob.clip.gotoAndStop(8);
}
}
if (accion == "dead") {
if (dir == "der") {
ob.clip.gotoAndStop(29);
} else {
ob.clip.gotoAndStop(9);
}
}
}
function updateChar(ob, dirx, diry) {
ob.clip._x = ob.x;
ob.clip._y = ob.y;
if (_root.char.doliendo == false) {
_root.updateAnim(ob, dir, accion);
} else {
_root.updateAnim(ob, dir, "pain");
}
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
if (game[(("t_" + ob.ytile) + "_") + ob.xtile].door and (ob == _root.char)) {
changeMap(ob);
}
}
function checkUpLadder(ob) {
var downY = Math.floor((ob.y + ob.height) / game.tileH);
var upY = Math.floor((ob.y - ob.height) / game.tileH);
var upLadder = game[(("t_" + upY) + "_") + ob.xtile].ladder;
var downLadder = game[(("t_" + downY) + "_") + ob.xtile].ladder;
if (upLadder or downLadder) {
return(true);
}
fall(ob);
}
function checkDownLadder(ob) {
var downY = Math.floor(((ob.speed + ob.y) + ob.height) / game.tileH);
var downLadder = game[(("t_" + downY) + "_") + ob.xtile].ladder;
if (downLadder) {
return(true);
}
fall(ob);
}
function climb(ob, diry) {
ob.climb = true;
ob.jump = false;
ob.y = ob.y + ((ob.speed - 0.7) * diry);
accion = "escala";
ob.x = (ob.xtile * game.tileW) + (game.tileW / 2);
updateChar(ob, 0, diry);
return(true);
}
function candleHit(ob, vert) {
xtile = Math.floor(ob.clip._x / game.tileW);
ytile = Math.floor(ob.clip._y / game.tileH);
if (vert == "up") {
valor = 1;
} else {
valor = 0;
}
if (dir == "der") {
multiplicador = 1;
} else {
multiplicador = -1;
}
if (ob.disparando == true) {
var nextTile1 = game[(("t_" + (ytile - valor)) + "_") + (xtile + (1 * multiplicador))].candle;
var nextTile2 = game[(("t_" + (ytile - valor)) + "_") + (xtile + (2 * multiplicador))].candle;
var nextTile3 = game[(("t_" + (ytile - valor)) + "_") + (xtile + (3 * multiplicador))].candle;
i = 1;
while (i < 4) {
if ((((nextTile1 == true) & (i == 1)) or ((nextTile2 == true) & (i == 2))) or ((nextTile3 == true) & (i == 3))) {
name = [(("t_" + (ytile - valor)) + "_") + (xtile + (i * multiplicador))];
game.clip[name].item.removeMovieClip();
game.clip[name].attachMovie("exploss", "exploss", 1);
game.clip[name].exploss._x = game.clip[name].exploss._x + 8;
game.clip[name].exploss._y = game.clip[name].exploss._y + 8;
game[name].candle = false;
_root.sonido(3, "whip_impact.wav");
if (game[name].treasure != "") {
game.clip[name].attachMovie(game[name].treasure, "treasure", 10);
game.clip[name].treasure._x = game.clip[name].treasure._x + 8;
game.clip[name].treasure._y = game.clip[name].treasure._y + 8;
game.clip[name].treasure.nombrador.localxtile = xtile + (i * multiplicador);
game.clip[name].treasure.nombrador.localytile = ytile - valor;
game.clip[name].treasure.nombrador.nom = name;
game.clip[name].treasure.nombrador.temporizador = _root.delayItems;
}
}
i++;
}
}
}
function terrestreEnemy(ob, dir, vel) {
enemy = _root.enemylair[ob];
enemy.tileX = Math.floor(enemy._x / game.tileW);
enemy.tileY = Math.floor(enemy._y / game.tileH);
enemy.derX = Math.floor((enemy._x + 8) / game.tileW);
enemy.derY = Math.floor(enemy._y / game.tileH);
enemy.derDownX = Math.floor((enemy._x + 8) / game.tileW);
enemy.derDownY = Math.floor((enemy._y + 16) / game.tileH);
enemy.izqX = Math.floor((enemy._x - 8) / game.tileW);
enemy.izqY = Math.floor(enemy._y / game.tileH);
enemy.izqDownX = Math.floor((enemy._x - 8) / game.tileW);
enemy.izqDownY = Math.floor((enemy._y + 16) / game.tileH);
enemy.der = game[(("t_" + enemy.derY) + "_") + enemy.derX].walkable;
enemy.izq = game[(("t_" + enemy.izqY) + "_") + enemy.izqX].walkable;
enemy.derDown = game[(("t_" + enemy.derDownY) + "_") + enemy.derDownX].walkable;
enemy.izqDown = game[(("t_" + enemy.izqDownY) + "_") + enemy.izqDownX].walkable;
if (game[(("t_" + enemy.derY) + "_") + enemy.derX].door == true) {
enemy.der = false;
}
if (game[(("t_" + enemy.izqY) + "_") + enemy.izqX].door == true) {
enemy.izq = false;
}
if (game[(("t_" + enemy.derDownY) + "_") + enemy.derDownX].door == true) {
enemy.derDown = false;
}
if (game[(("t_" + enemy.izqDownY) + "_") + enemy.izqDownX].door == true) {
enemy.izqDown = false;
}
if ((enemy.der == false) & (enemy.izq == true)) {
enemy.clip.dir = -1;
} else if ((enemy.izq == false) & (enemy.der == true)) {
enemy.clip.dir = 1;
}
if ((enemy.derDown == false) & (enemy.izqDown == true)) {
enemy.clip.dir = 1;
} else if ((enemy.izqDown == false) & (enemy.derDown == true)) {
enemy.clip.dir = -1;
}
if (dir == 1) {
enemy.gotoAndStop(1);
}
if (dir == -1) {
enemy.gotoAndStop(21);
}
enemy._x = enemy._x + (vel * dir);
_root.testEnemyHits(enemy);
}
function testCharHits() {
xtile = Math.floor(_root.char.clip._x / game.tileW);
ytile = Math.floor(_root.char.clip._y / game.tileH);
i = 0;
while (i < 10) {
ob = _root.enemylair["enemy" + i];
enemyTileX = Math.floor(ob._x / game.tileW);
enemyTileY = Math.floor(ob._y / game.tileH);
if (((_root.vert == "up") & (enemyTileY == ytile)) or (enemyTileY == (ytile - (ob.clip.altura - 1)))) {
if (_root.dir == "der") {
if ((enemyTileX < (xtile + 4)) & (enemyTileX >= xtile)) {
ob.clip.life = ob.clip.life - 1;
if (ob.clip.life <= 0) {
_root.char.score = _root.char.score + ob.clip.score;
if (ob.clip.dir == 1) {
ob.gotoAndStop(9);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(29);
}
} else {
ob.clip.doliendo = true;
if (ob.clip.dir == 1) {
ob.gotoAndStop(8);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(28);
}
}
}
}
if (_root.dir == "izq") {
if ((enemyTileX > (xtile - 4)) & (enemyTileX <= xtile)) {
ob.clip.life = ob.clip.life - 1;
if (ob.clip.life <= 0) {
_root.char.score = _root.char.score + ob.clip.score;
if (ob.clip.dir == 1) {
ob.gotoAndStop(9);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(29);
}
} else {
ob.clip.doliendo = true;
if (ob.clip.dir == 1) {
ob.gotoAndStop(8);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(28);
}
}
}
}
}
if (((_root.vert == "down") & (enemyTileY == ytile)) or (enemyTileY == (ytile + (ob.clip.altura - 1)))) {
if (_root.dir == "der") {
if ((enemyTileX < (xtile + 4)) & (enemyTileX >= xtile)) {
ob.clip.life = ob.clip.life - 1;
if (ob.clip.life <= 0) {
_root.char.score = _root.char.score + ob.clip.score;
if (ob.clip.dir == 1) {
ob.gotoAndStop(9);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(29);
}
} else {
ob.clip.doliendo = true;
if (ob.clip.dir == 1) {
ob.gotoAndStop(8);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(28);
}
}
}
}
if (_root.dir == "izq") {
if ((enemyTileX > (xtile - 4)) & (enemyTileX <= xtile)) {
ob.clip.life = ob.clip.life - 1;
if (ob.clip.life <= 0) {
_root.char.score = _root.char.score + ob.clip.score;
if (ob.clip.dir == 1) {
ob.gotoAndStop(9);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(29);
}
} else {
ob.clip.doliendo = true;
if (ob.clip.dir == 1) {
ob.gotoAndStop(8);
}
if (ob.clip.dir == -1) {
ob.gotoAndStop(28);
}
}
}
}
}
i++;
}
}
function testEnemyHits(enemigo) {
if (_root.char.doliendo == false) {
xtile = Math.floor(_root.char.clip._x / game.tileW);
ytile = Math.floor(_root.char.clip._y / game.tileH);
enemyTileX = Math.floor(enemigo._x / game.tileW);
enemyTileY = Math.floor(enemigo._y / game.tileH);
if ((ytile <= enemyTileY) & (ytile >= (enemyTileY - (enemigo.clip.altura - 1)))) {
if ((enemigo._x > (_root.char.clip._x - 16)) & (enemigo._x < _root.char.clip._x)) {
_root.char.doliendo = true;
_root.char.life = _root.char.life - enemigo.clip.pain;
_root.sonido(1, "pain.wav");
_root.Pain(1);
}
if ((enemigo._x < (_root.char.clip._x + 16)) & (enemigo._x > _root.char.clip._x)) {
_root.char.doliendo = true;
_root.char.life = _root.char.life - enemigo.clip.pain;
_root.sonido(1, "pain.wav");
_root.Pain(-1);
}
}
}
}
function Pain(dir) {
if (contador < 15) {
alpha = alpha + 1;
multiplicador = Math.sin(alpha);
_root.char.clip._x = _root.char.clip._x + ((2 * multiplicador) * dir);
if (dir == 1) {
_root.updateAnim(_root.char, "der", "pain");
} else {
_root.updateAnim(_root.char, "esq", "pain");
}
contador++;
} else {
_root.char.doliendo = false;
contador = 0;
}
}
function dead() {
_root.updateAnim(_root.char, _root.dir, "dead");
}
function sonido(c, nombre) {
if (c == 1) {
channel_1 = new Sound();
channel_1.attachSound(nombre);
channel_1.setVolume(_root.volumenGlobal);
channel_1.start();
}
if (c == 2) {
channel_2 = new Sound();
channel_2.attachSound(nombre);
channel_2.setVolume(_root.volumenGlobal);
channel_2.start();
}
if (c == 3) {
channel_3 = new Sound();
channel_3.attachSound(nombre);
channel_3.setVolume(_root.volumenGlobal);
channel_3.start();
}
if (c == 4) {
stopAllSounds();
channel_4 = new Sound();
channel_4.attachSound(nombre);
channel_4.setVolume(_root.volumenGlobal);
channel_4.start(0, 99);
}
}
function aereoEnemy(ob, dir, vel) {
enemy = _root.enemylair[ob];
enemy.tileX = Math.floor(enemy._x / game.tileW);
enemy.tileY = Math.floor(enemy._y / game.tileH);
enemy.derX = Math.floor((enemy._x + 8) / game.tileW);
enemy.derY = Math.floor(enemy._y / game.tileH);
enemy.derDownX = Math.floor((enemy._x + 8) / game.tileW);
enemy.derDownY = Math.floor((enemy._y + 16) / game.tileH);
enemy.izqX = Math.floor((enemy._x - 8) / game.tileW);
enemy.izqY = Math.floor(enemy._y / game.tileH);
enemy.izqDownX = Math.floor((enemy._x - 8) / game.tileW);
enemy.izqDownY = Math.floor((enemy._y + 16) / game.tileH);
enemy.der = game[(("t_" + enemy.derY) + "_") + enemy.derX].walkable;
enemy.izq = game[(("t_" + enemy.izqY) + "_") + enemy.izqX].walkable;
enemy.derDown = game[(("t_" + enemy.derDownY) + "_") + enemy.derDownX].walkable;
enemy.izqDown = game[(("t_" + enemy.izqDownY) + "_") + enemy.izqDownX].walkable;
if (((enemy.der == false) & (enemy.izq == true)) & ((enemy._x + (vel * dir)) > 0)) {
enemy.clip.dir = -1;
} else if (((enemy.izq == false) & (enemy.der == true)) & ((enemy._x + (vel * dir)) < 320)) {
enemy.clip.dir = 1;
}
if (dir == 1) {
enemy.gotoAndStop(1);
}
if (dir == -1) {
enemy.gotoAndStop(21);
}
alpha = alpha + 0.2;
enemy._x = enemy._x + (vel * dir);
enemy._y = enemy._y + (2 * Math.sin(alpha));
_root.testEnemyHits(enemy);
}
function boss1Enemy(ob, dir, vel) {
enemy = _root.enemylair[ob];
if (dir == 1) {
if (((enemy._x + (vel * dir)) + 32) > 320) {
enemy.clip.dir = -1;
}
}
if (dir == -1) {
if (((enemy._x + (vel * dir)) - 32) < 0) {
enemy.clip.dir = 1;
}
}
if (dir == 1) {
enemy.gotoAndStop(1);
}
if (dir == -1) {
enemy.gotoAndStop(21);
}
alpha = alpha + 0.1;
enemy._x = enemy._x + (vel * dir);
enemy._y = enemy._y + (2 * Math.sin(alpha));
if (contador == 50) {
_root.boss1Attack(enemy);
contador = 0;
} else {
contador++;
}
}
function boss1Attack(enemigo) {
d++;
_root.enemylair.attachMovie("boss1_shot", "boss1_shot" + d, d);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1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
game = {tileW:16, tileH:16, currentMap:1};
_root.screenWidth = 320;
_root.screenHeight = 224;
game.Tile0 = function () {
};
game.Tile0.prototype.walkable = true;
game.Tile0.prototype.frame = 1;
game.Tile1 = function () {
};
game.Tile1.prototype.walkable = false;
game.Tile1.prototype.frame = 2;
game.Tile2 = function () {
};
game.Tile2.prototype.walkable = true;
game.Tile2.prototype.frame = 3;
game.Tile2.prototype.door = true;
game.Tile3 = function () {
};
game.Tile3.prototype.walkable = true;
game.Tile3.prototype.frame = 1;
game.Tile3.prototype.ladder = true;
game.Tile3.prototype.item = "ladder";
game.Tile4 = function () {
};
game.Tile4.prototype.walkable = false;
game.Tile4.prototype.frame = 2;
game.Tile4.prototype.ladder = true;
game.Tile4.prototype.item = "ladder";
game.Tile5 = function () {
};
game.Tile5.prototype.walkable = true;
game.Tile5.prototype.frame = 1;
game.Tile5.prototype.candle = true;
game.Tile5.prototype.item = "candle1";
game.Tile5.prototype.treasure = "heart1";
game.Tile6 = function () {
};
game.Tile6.prototype.walkable = true;
game.Tile6.prototype.frame = 1;
game.Tile6.prototype.candle = true;
game.Tile6.prototype.item = "candle1";
game.Tile6.prototype.treasure = "heart10";
game.Tile7 = function () {
};
game.Tile7.prototype.walkable = true;
game.Tile7.prototype.frame = 1;
game.Tile7.prototype.candle = true;
game.Tile7.prototype.item = "bigcandle1";
game.Tile7.prototype.treasure = "shuriken";
game.Tile8 = function () {
};
game.Tile8.prototype.walkable = true;
game.Tile8.prototype.frame = 1;
game.Tile8.prototype.candle = true;
game.Tile8.prototype.item = "bigcandle1";
game.Tile8.prototype.treasure = "axe";
game.Tile9 = function () {
};
game.Tile9.prototype.walkable = true;
game.Tile9.prototype.frame = 1;
game.Tile9.prototype.candle = true;
game.Tile9.prototype.item = "bigcandle1";
game.Tile9.prototype.treasure = "knife";
game.Tile10 = function () {
};
game.Tile10.prototype.walkable = true;
game.Tile10.prototype.frame = 1;
game.Tile10.prototype.candle = true;
game.Tile10.prototype.item = "candle1";
game.Tile10.prototype.treasure = "gold";
game.Tile11 = function () {
};
game.Tile11.prototype.walkable = true;
game.Tile11.prototype.frame = 1;
game.Tile11.prototype.enemy = true;
game.Tile11.prototype.dir = -1;
game.Tile11.prototype.vel = 1;
game.Tile11.prototype.life = 1;
game.Tile11.prototype.altura = 2;
game.Tile11.prototype.score = 125;
game.Tile11.prototype.pain = 5;
game.Tile11.prototype.enemyType = "mudman";
game.Tile12 = function () {
};
game.Tile12.prototype.walkable = true;
game.Tile12.prototype.frame = 1;
game.Tile12.prototype.enemy = true;
game.Tile12.prototype.dir = -1;
game.Tile12.prototype.vel = 1.5;
game.Tile12.prototype.life = 2;
game.Tile12.prototype.altura = 2;
game.Tile12.prototype.score = 205;
game.Tile12.prototype.pain = 10;
game.Tile12.prototype.enemyType = "knight";
game.Tile13 = function () {
};
game.Tile13.prototype.walkable = true;
game.Tile13.prototype.frame = 1;
game.Tile13.prototype.enemy = true;
game.Tile13.prototype.dir = -1;
game.Tile13.prototype.vel = 3;
game.Tile13.prototype.life = 1;
game.Tile13.prototype.altura = 1;
game.Tile13.prototype.score = 50;
game.Tile13.prototype.pain = 10;
game.Tile13.prototype.enemyType = "bat";
game.Tile14 = function () {
};
game.Tile14.prototype.walkable = true;
game.Tile14.prototype.frame = 1;
game.Tile14.prototype.enemy = true;
game.Tile14.prototype.dir = -1;
game.Tile14.prototype.vel = 3;
game.Tile14.prototype.life = 10;
game.Tile14.prototype.altura = 2;
game.Tile14.prototype.score = 1120;
game.Tile14.prototype.pain = 10;
game.Tile14.prototype.enemyType = "boss1";
char = {xtile:1, ytile:12, speed:2.5, jumpstart:-6, gravity:0.5, jump:false, climb:false};
myDoors = [[0], [[10, 19, 2, 10, 1]], [[10, 0, 1, 10, 18], [7, 19, 3, 5, 1]], [[5, 0, 2, 7, 18], [5, 19, 4, 6, 1]], [[6, 0, 3, 5, 18], [6, 19, 5, 12, 1]], [[12, 0, 4, 6, 18], [3, 19, 6, 3, 1]], [[3, 0, 5, 3, 18], [3, 19, 7, 4, 1], [12, 19, 8, 4, 1]], [[4, 0, 6, 3, 18]], [[4, 0, 6, 12, 18], [5, 19, 9, 4, 1]], [[4, 0, 8, 5, 18], [4, 19, 10, 8, 1]], [[8, 0, 9, 4, 18], [2, 19, 11, 11, 1]]];
_root.myCielo = [0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0];
_root.myMusic = [0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4];
_root.char.disparando = false;
_root.char.saltando = false;
_root.char.score = 0;
_root.char.life = 100;
_root.char.hearts = 0;
_root.char.weapon = "";
_root.dir = "der";
_root.delayItems = 100;
_root.char.doliendo = false;
_root.volumenGlobal = 75;
buildMap(_root["myMap" + game.currentMap]);
fall(_root.char);
stop();
Instance of Symbol 37 MovieClip [empty] in Frame 436
onClipEvent (enterFrame) {
if (_root.char.life > 0) {
if (_root.char.doliendo == false) {
_root.detectKeys();
} else {
_root.pain();
}
} else {
_root.dead();
}
}
Symbol 29 MovieClip [tile] Frame 1
stop();
Symbol 39 MovieClip Frame 1
_root.sonido(2, "bat.wav");
i = 0;
while (i < 2) {
d++;
distX = random(10);
distY = random(10);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 39 MovieClip Frame 3
i = 0;
while (i < 2) {
d++;
distX = random(10);
distY = random(10);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 39 MovieClip Frame 5
i = 0;
while (i < 2) {
d++;
distX = random(10);
distY = random(10);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 39 MovieClip Frame 11
stop();
Symbol 40 MovieClip [bat] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "clip" in Symbol 40 MovieClip [bat] Frame 1
onClipEvent (enterFrame) {
if (life > 0) {
_root.aereoEnemy(name, dir, vel);
}
}
Symbol 60 MovieClip Frame 1
_root.sonido(2, "edeath.wav");
ancho = 24;
alto = 32;
i = 0;
while (i < 3) {
d++;
distX = random(ancho);
distY = random(alto);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 60 MovieClip Frame 3
i = 0;
while (i < 4) {
d++;
distX = random(ancho);
distY = random(alto);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 60 MovieClip Frame 5
i = 0;
while (i < 3) {
d++;
distX = random(ancho);
distY = random(alto);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 60 MovieClip Frame 7
i = 0;
while (i < 2) {
d++;
distX = random(ancho);
distY = random(alto);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 60 MovieClip Frame 9
i = 0;
while (i < 2) {
d++;
distX = random(ancho);
distY = random(alto);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 60 MovieClip Frame 11
i = 0;
while (i < 2) {
d++;
distX = random(ancho);
distY = random(alto);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 60 MovieClip Frame 16
stop();
Symbol 61 MovieClip [boss1] Frame 1
stop();
Symbol 68 MovieClip Frame 1
_root.sonido(2, "edeath.wav");
i = 0;
while (i < 2) {
d++;
distX = random(15);
distY = random(15);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 68 MovieClip Frame 3
i = 0;
while (i < 2) {
d++;
distX = random(15);
distY = random(15);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 68 MovieClip Frame 5
i = 0;
while (i < 2) {
d++;
distX = random(15);
distY = random(15);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 68 MovieClip Frame 11
stop();
Symbol 69 MovieClip [knight] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "clip" in Symbol 69 MovieClip [knight] Frame 1
onClipEvent (enterFrame) {
if (life > 0) {
if (doliendo == true) {
doliendo = false;
} else {
_root.terrestreEnemy(name, dir, vel);
}
}
}
Symbol 78 MovieClip Frame 1
_root.sonido(2, "edeath.wav");
i = 0;
while (i < 2) {
d++;
distX = random(15);
distY = random(15);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 78 MovieClip Frame 3
i = 0;
while (i < 2) {
d++;
distX = random(15);
distY = random(15);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 78 MovieClip Frame 5
i = 0;
while (i < 2) {
d++;
distX = random(15);
distY = random(15);
dirX = random(2);
dirY = random(2);
if (dirX == 0) {
dirX = -1;
}
if (dirY == 0) {
dirY = -1;
}
attachMovie("exploss", "exploss" + d, d);
this["exploss" + d]._x = distX * dirX;
this["exploss" + d]._y = distY * dirY;
i++;
}
Symbol 78 MovieClip Frame 11
stop();
Symbol 79 MovieClip [mudman] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "clip" in Symbol 79 MovieClip [mudman] Frame 1
onClipEvent (enterFrame) {
if (life > 0) {
_root.terrestreEnemy(name, dir, vel);
}
}
Symbol 106 MovieClip Frame 4
_root.candleHit(_root.char, "up");
_root.testCharHits();
_root.sonido(1, "whip2.wav");
Symbol 106 MovieClip Frame 5
_root.candleHit(_root.char, "up");
Symbol 106 MovieClip Frame 6
_root.candleHit(_root.char, "up");
Symbol 106 MovieClip Frame 7
_root.candleHit(_root.char, "up");
_root.char.disparando = false;
Symbol 113 MovieClip Frame 4
_root.candleHit(_root.char, "down");
_root.testCharHits();
_root.sonido(1, "whip2.wav");
Symbol 113 MovieClip Frame 5
_root.candleHit(_root.char, "down");
Symbol 113 MovieClip Frame 6
_root.candleHit(_root.char, "down");
Symbol 113 MovieClip Frame 7
_root.candleHit(_root.char, "down");
_root.char.disparando = false;
Symbol 120 MovieClip Frame 1
Symbol 120 MovieClip Frame 5
if (_root.char.weapon == "shuriken") {
_root.temp_d++;
_root.weaponry.attachMovie("shurikenW", "shuriken" + _root.temp_d, 20000 + _root.temp_d);
_root.weaponry["shuriken" + _root.temp_d]._x = _root.char.clip._x;
_root.weaponry["shuriken" + _root.temp_d]._y = _root.char.clip._y - 11;
_root.sonido(1, "shuriken.wav");
}
if (_root.char.weapon == "axe") {
_root.temp_d++;
_root.weaponry.attachMovie("axeW", "axe" + _root.temp_d, 20000 + _root.temp_d);
_root.weaponry["axe" + _root.temp_d]._x = _root.char.clip._x;
_root.weaponry["axe" + _root.temp_d]._y = _root.char.clip._y - 11;
_root.sonido(1, "shuriken.wav");
}
if (_root.char.weapon == "knife") {
_root.temp_d++;
_root.weaponry.attachMovie("knifeW", "knife" + _root.temp_d, 20000 + _root.temp_d);
_root.weaponry["knife" + _root.temp_d]._x = _root.char.clip._x;
_root.weaponry["knife" + _root.temp_d]._y = _root.char.clip._y - 11;
_root.sonido(1, "knife.wav");
}
_root.char.hearts = _root.char.hearts - 1;
if (_root.temp_d >= 10) {
_root.temp_d = 0;
}
Symbol 120 MovieClip Frame 6
_root.char.disparando = false;
Symbol 126 MovieClip Frame 6
stop();
Symbol 133 MovieClip Frame 17
stop();
Symbol 139 MovieClip [char] Frame 1
stop();
_root.dir = "der";
Symbol 139 MovieClip [char] Frame 2
_root.dir = "der";
Symbol 139 MovieClip [char] Frame 5
_root.vert = "up";
_root.dir = "der";
Symbol 139 MovieClip [char] Frame 6
_root.vert = "down";
_root.dir = "der";
Symbol 139 MovieClip [char] Frame 21
_root.dir = "izq";
Symbol 139 MovieClip [char] Frame 22
_root.dir = "izq";
Symbol 139 MovieClip [char] Frame 25
_root.vert = "up";
_root.dir = "izq";
Symbol 139 MovieClip [char] Frame 26
_root.vert = "down";
_root.dir = "izq";
Symbol 148 MovieClip [bigcandle1] Frame 3
gotoAndPlay (1);
Symbol 148 MovieClip [bigcandle1] Frame 4
stop();
Symbol 151 MovieClip [candle1] Frame 3
gotoAndPlay (1);
Symbol 151 MovieClip [candle1] Frame 4
stop();
Symbol 156 MovieClip [exploss] Frame 7
removeMovieClip(this);
Symbol 160 MovieClip [heart10] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "nombrador" in Symbol 160 MovieClip [heart10] Frame 1
onClipEvent (enterFrame) {
xtile = Math.floor(_root.char.clip._x / _root.game.tileW);
ytile = Math.floor(_root.char.clip._y / _root.game.tileH);
if ((localxtile == xtile) & (localytile == ytile)) {
localxtile = 0;
localytile = 0;
_root.char.hearts = _root.char.hearts + 10;
_root.sonido(3, "heart_big_pickup.wav");
_root.game.clip[(("t_" + ytile) + "_") + xtile].treasure.gotoAndPlay(2);
}
if ((localxtile == xtile) & (localytile == (ytile - 1))) {
localxtile = 0;
localytile = 0;
_root.char.hearts = _root.char.hearts + 10;
_root.sonido(3, "heart_big_pickup.wav");
_root.game.clip[(("t_" + (ytile - 1)) + "_") + xtile].treasure.gotoAndPlay(2);
}
if (temporizador == 0) {
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure.gotoAndPlay(2);
} else {
temporizador--;
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha = _root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha - 0.5;
}
}
Symbol 160 MovieClip [heart10] Frame 5
removeMovieClip(this);
Symbol 165 MovieClip [knife] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "nombrador" in Symbol 165 MovieClip [knife] Frame 1
onClipEvent (enterFrame) {
xtile = Math.floor(_root.char.clip._x / _root.game.tileW);
ytile = Math.floor(_root.char.clip._y / _root.game.tileH);
if ((localxtile == xtile) & (localytile == ytile)) {
localxtile = 0;
localytile = 0;
_root.char.weapon = "knife";
_root.sonido(3, "pickup_weapon.wav");
_root.game.clip[(("t_" + ytile) + "_") + xtile].treasure.gotoAndPlay(2);
}
if ((localxtile == xtile) & (localytile == (ytile - 1))) {
localxtile = 0;
localytile = 0;
_root.char.weapon = "knife";
_root.sonido(3, "pickup_weapon.wav");
_root.game.clip[(("t_" + (ytile - 1)) + "_") + xtile].treasure.gotoAndPlay(2);
}
if (temporizador == 0) {
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure.gotoAndPlay(2);
} else {
temporizador--;
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha = _root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha - 0.5;
}
}
Symbol 165 MovieClip [knife] Frame 5
removeMovieClip(this);
Symbol 170 MovieClip [gold] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "nombrador" in Symbol 170 MovieClip [gold] Frame 1
onClipEvent (enterFrame) {
xtile = Math.floor(_root.char.clip._x / _root.game.tileW);
ytile = Math.floor(_root.char.clip._y / _root.game.tileH);
if ((localxtile == xtile) & (localytile == ytile)) {
localxtile = 0;
localytile = 0;
_root.char.score = _root.char.score + 500;
_root.sonido(3, "pickup_money.wav");
_root.game.clip[(("t_" + ytile) + "_") + xtile].treasure.gotoAndPlay(2);
}
if ((localxtile == xtile) & (localytile == (ytile - 1))) {
localxtile = 0;
localytile = 0;
_root.char.score = _root.char.score + 500;
_root.sonido(3, "pickup_money.wav");
_root.game.clip[(("t_" + (ytile - 1)) + "_") + xtile].treasure.gotoAndPlay(2);
}
if (temporizador == 0) {
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure.gotoAndPlay(2);
} else {
temporizador--;
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha = _root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha - 0.5;
}
}
Symbol 170 MovieClip [gold] Frame 5
removeMovieClip(this);
Symbol 175 MovieClip [axe] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "nombrador" in Symbol 175 MovieClip [axe] Frame 1
onClipEvent (enterFrame) {
xtile = Math.floor(_root.char.clip._x / _root.game.tileW);
ytile = Math.floor(_root.char.clip._y / _root.game.tileH);
if ((localxtile == xtile) & (localytile == ytile)) {
localxtile = 0;
localytile = 0;
_root.char.weapon = "axe";
_root.sonido(3, "pickup_weapon.wav");
_root.game.clip[(("t_" + ytile) + "_") + xtile].treasure.gotoAndPlay(2);
}
if ((localxtile == xtile) & (localytile == (ytile - 1))) {
localxtile = 0;
localytile = 0;
_root.char.weapon = "axe";
_root.sonido(3, "pickup_weapon.wav");
_root.game.clip[(("t_" + (ytile - 1)) + "_") + xtile].treasure.gotoAndPlay(2);
}
if (temporizador == 0) {
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure.gotoAndPlay(2);
} else {
temporizador--;
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha = _root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha - 0.5;
}
}
Symbol 175 MovieClip [axe] Frame 5
removeMovieClip(this);
Symbol 180 MovieClip [shuriken] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "nombrador" in Symbol 180 MovieClip [shuriken] Frame 1
onClipEvent (enterFrame) {
xtile = Math.floor(_root.char.clip._x / _root.game.tileW);
ytile = Math.floor(_root.char.clip._y / _root.game.tileH);
if ((localxtile == xtile) & (localytile == ytile)) {
localxtile = 0;
localytile = 0;
_root.char.weapon = "shuriken";
_root.sonido(3, "pickup_weapon.wav");
_root.game.clip[(("t_" + ytile) + "_") + xtile].treasure.gotoAndPlay(2);
}
if ((localxtile == xtile) & (localytile == (ytile - 1))) {
localxtile = 0;
localytile = 0;
_root.char.weapon = "shuriken";
_root.sonido(3, "pickup_weapon.wav");
_root.game.clip[(("t_" + (ytile - 1)) + "_") + xtile].treasure.gotoAndPlay(2);
}
if (temporizador == 0) {
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure.gotoAndPlay(2);
} else {
temporizador--;
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha = _root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha - 0.5;
}
}
Symbol 180 MovieClip [shuriken] Frame 5
removeMovieClip(this);
Symbol 182 MovieClip [heart1] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] "nombrador" in Symbol 182 MovieClip [heart1] Frame 1
onClipEvent (enterFrame) {
xtile = Math.floor(_root.char.clip._x / _root.game.tileW);
ytile = Math.floor(_root.char.clip._y / _root.game.tileH);
if ((localxtile == xtile) & (localytile == ytile)) {
localxtile = 0;
localytile = 0;
_root.char.hearts = _root.char.hearts + 1;
_root.sonido(3, "heart_pickup.wav");
_root.game.clip[(("t_" + ytile) + "_") + xtile].treasure.gotoAndPlay(2);
}
if ((localxtile == xtile) & (localytile == (ytile - 1))) {
localxtile = 0;
localytile = 0;
_root.char.hearts = _root.char.hearts + 1;
_root.sonido(3, "heart_pickup.wav");
_root.game.clip[(("t_" + (ytile - 1)) + "_") + xtile].treasure.gotoAndPlay(2);
}
if (temporizador == 0) {
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure.gotoAndPlay(2);
} else {
temporizador--;
_root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha = _root.game.clip[(("t_" + localytile) + "_") + localxtile].treasure._alpha - 0.5;
}
}
Symbol 182 MovieClip [heart1] Frame 5
removeMovieClip(this);
Symbol 184 MovieClip [shurikenW] Frame 1
velocity = 16;
accel = 1;
if (_root.char.clip.dir == "der") {
dir = 1;
}
if (_root.char.clip.dir == "izq") {
dir = -1;
}
Symbol 184 MovieClip [shurikenW] Frame 2
velocity = velocity - accel;
this._x = this._x + (velocity * dir);
this._rotation = this._rotation + (20 * dir);
if (velocity < -2) {
this._alpha = this._alpha - 10;
}
if (this._alpha <= 0) {
removeMovieClip(this);
}
i = 0;
while (i < 15) {
ob = _root.enemylair["enemy" + i];
if (ob.hitTest(this._x, this._y, true) == true) {
ob.clip.life = ob.clip.life - 2;
if (ob.clip.life <= 0) {
_root.char.score = _root.char.score + ob.clip.score;
if (ob.clip.dir == 1) {
ob.gotoAndStop(9);
} else {
ob.gotoAndStop(29);
}
}
}
i++;
}
Symbol 184 MovieClip [shurikenW] Frame 3
gotoAndPlay (2);
Symbol 186 MovieClip [axeW] Frame 1
velocity_x = 3;
velocity_y = -12;
accel = -1;
if (_root.char.clip.dir == "der") {
dir = 1;
}
if (_root.char.clip.dir == "izq") {
dir = -1;
}
Symbol 186 MovieClip [axeW] Frame 2
velocity_y = velocity_y - accel;
this._x = this._x + (velocity_x * dir);
this._y = this._y + velocity_y;
this._rotation = this._rotation + (20 * dir);
if (velocity_y > 5) {
this._alpha = this._alpha - 10;
}
if (this._alpha <= 0) {
removeMovieClip(this);
}
i = 0;
while (i < 15) {
ob = _root.enemylair["enemy" + i];
if (ob.hitTest(this._x, this._y, true) == true) {
ob.clip.life = ob.clip.life - 2;
if (ob.clip.life <= 0) {
_root.char.score = _root.char.score + ob.clip.score;
if (ob.clip.dir == 1) {
ob.gotoAndStop(9);
} else {
ob.gotoAndStop(29);
}
}
}
i++;
}
Symbol 186 MovieClip [axeW] Frame 3
gotoAndPlay (2);
Symbol 188 MovieClip [knifeW] Frame 1
velocity = 14;
contador = 0;
if (_root.char.clip.dir == "der") {
dir = 1;
}
if (_root.char.clip.dir == "izq") {
dir = -1;
this._xscale = -100;
}
Symbol 188 MovieClip [knifeW] Frame 2
this._x = this._x + (velocity * dir);
contador++;
if (contador > 10) {
this._alpha = this._alpha - 10;
}
if (this._alpha <= 0) {
removeMovieClip(this);
}
i = 0;
while (i < 15) {
ob = _root.enemylair["enemy" + i];
if (ob.hitTest(this._x, this._y, true) == true) {
ob.clip.life = ob.clip.life - 2;
if (ob.clip.life <= 0) {
_root.char.score = _root.char.score + ob.clip.score;
if (ob.clip.dir == 1) {
ob.gotoAndStop(9);
} else {
ob.gotoAndStop(29);
}
}
}
i++;
}
Symbol 188 MovieClip [knifeW] Frame 3
gotoAndPlay (2);
Symbol 195 MovieClip [mymap11] Frame 1
gotoAndPlay(random(100));
Symbol 195 MovieClip [mymap11] Frame 147
gotoAndPlay (1);
Symbol 240 MovieClip Frame 90
gotoAndPlay (1);
Symbol 243 MovieClip [gota] Frame 1
vel = 3;
if ((this._y + (vel * 2)) > 224) {
this.removeMovieClip();
}
if (this._x < 0) {
this.removeMovieClip();
}
this._x = this._x - vel;
this._y = this._y + (vel * 2);
Symbol 243 MovieClip [gota] Frame 2
gotoAndPlay (1);
Symbol 244 MovieClip [ambient_rain] Frame 1
stop();
Instance of Symbol 37 MovieClip [empty] in Symbol 244 MovieClip [ambient_rain] Frame 1
onClipEvent (enterFrame) {
d++;
posx = random(512);
attachMovie("gota", "gota" + d, d);
this["gota" + d]._x = posx;
}
Symbol 251 MovieClip Frame 1
stop();
Symbol 252 MovieClip [boss1_shot] Frame 1
xFinal = _root.tiles.char._x;
yFinal = _root.tiles.char._y;
xActual = this._x;
YActual = this._y;
multiplicador = 15;
contador = 0;
Symbol 252 MovieClip [boss1_shot] Frame 2
xActual = xActual + ((xFinal - xActual) / multiplicador);
yActual = yActual + ((yFinal - yActual) / multiplicador);
if (yActual > 200) {
this.removeMovieClip();
}
if (xActual == xFinal) {
this.removeMovieClip();
}
if (yActual == yFinal) {
this.removeMovieClip();
}
if (contador == 50) {
this.removeMovieClip();
}
contador++;
this._x = xActual;
this._y = yActual;
this._rotation = this._rotation - 10;
Symbol 252 MovieClip [boss1_shot] Frame 3
gotoAndPlay (2);
Symbol 265 MovieClip Frame 1
stop();
Symbol 267 MovieClip [hud] Frame 1
if (_root.char.weapon == "axe") {
_root.hud.iconero.gotoAndStop(2);
}
if (_root.char.weapon == "shuriken") {
_root.hud.iconero.gotoAndStop(4);
}
if (_root.char.weapon == "knife") {
_root.hud.iconero.gotoAndStop(3);
}
barra._xscale = _root.char.life;
Symbol 281 Button
on (release, keyPress "<Enter>") {
gotoAndPlay (435);
}
Symbol 310 Button
on (release, keyPress "<Enter>") {
gotoAndPlay (436);
}
Symbol 319 Button
on (release) {
getURL ("mailto:marc@nabboproject.com", "_blank");
}