Frame 1
function chat(text, textLimit, textMaxLine) {
if (userLog == null) {
userLog = new Array();
z_Infotext_input = new Array();
}
var linLimit = 30;
linOutput = text;
var count = (count + 1);
z_Infotext_input.push(((name + "") + text) + count);
if (userLine >= textLimit) {
delete userLog[userLine - textLimit];
ch_display++;
userLine++;
userLog[userLine] = userLog[userLine] + linOutput;
} else if (userLine >= textMaxLine) {
ch_display++;
userLine++;
userLog[userLine] = userLog[userLine] + linOutput;
} else {
userLine++;
userLog[userLine] = userLog[userLine] + linOutput;
}
ch_display = _root.ch_display;
ch_display = userLine - textMaxLine;
chatOutput = ((((((((((((((((((((((userLog[1 + ch_display] + "<br>") + userLog[2 + ch_display]) + "<br>") + userLog[3 + ch_display]) + "<br>") + userLog[4 + ch_display]) + "<br>") + userLog[5 + ch_display]) + "<br>") + userLog[6 + ch_display]) + "<br>") + userLog[7 + ch_display]) + "<br>") + userLog[8 + ch_display]) + "<br>") + userLog[9 + ch_display]) + "<br>") + userLog[10 + ch_display]) + "<br>") + userLog[11 + ch_display]) + "<br>") + userLog[12 + ch_display]) + "<br>";
}
function game_depth(obj, player) {
if (player._y > obj._y) {
player.swapDepths(260);
} else if (player._y < obj._y) {
player.swapDepths(201);
}
}
function game_hitDetect_dungeon(obj, atk, enemy, npc) {
hitDetect_dungeon(obj, atk, enemy, npc);
}
function game_hitDetect(obj, atk, enemy) {
hitDetect(obj, atk, enemy);
}
function game_enemy_castle(obj, spd, auto, aspd, player, provoke) {
enemy_attack_castle(obj, auto, aspd, player, provoke);
enemy_move_castle(obj, spd, player, provoke);
}
function enemy_attack_castle(obj, auto, aspd, player, provoke) {
if (obj.hitTest(player.hb)) {
if (obj.atk == 1) {
obj.enemTimer++;
if (obj.enemTimer >= aspd) {
delete obj.input;
delete obj.enemTimer;
}
if (obj.input == null) {
if (obj._currentframe > 10) {
obj.gotoAndStop(obj._currentFrame - 5);
obj.gotoAndStop(obj._currentFrame + 5);
} else if (obj._currentframe < 5) {
obj.gotoAndStop(obj._currentFrame + 10);
} else {
obj.gotoAndStop(obj._currentFrame + 5);
}
if (pl_ptsnum >= 10) {
pl_ptsnum = 1;
} else {
pl_ptsnum++;
}
enemy_hitRate = 1;
hitRate = (enemy_hitRate + Math.ceil(Math.random() * 100)) - (stats._agi + 10);
if (enemyLow == null) {
enemyLow = new Array();
enemyHigh = new Array();
enemyLow[0] = 5;
enemyHigh[0] = 0;
}
if (hitRate >= 60) {
playerDamage = Math.ceil((Math.random() * enemyLow[0]) + enemyHigh[0]);
_root.sound.gotoAndPlay(4);
} else {
playerDamage = "Miss!";
_root.sound.gotoAndPlay(3);
}
_root.player_hitpoints.duplicateMovieClip("player_hitpoints" + pl_ptsnum, 650 + pl_ptsnum);
if (_root["player_hitpoints" + pl_ptsnum].lx == null) {
_root["player_hitpoints" + pl_ptsnum]._x = player._x;
_root["player_hitpoints" + pl_ptsnum]._y = player._y;
_root["player_hitpoints" + pl_ptsnum].lx = 1;
_root["player_hitpoints" + pl_ptsnum].display = playerDamage;
}
if (playerDamage == "Miss!") {
player_health = player_health - 0;
} else {
_root.plyr_dam_mc.duplicateMovieClip("plyr_dam_mc" + pl_ptsnum, 700 + pl_ptsnum);
if (_root["plyr_dam_mc" + pl_ptsnum].lx == null) {
_root["plyr_dam_mc" + pl_ptsnum]._x = player._x;
_root["plyr_dam_mc" + pl_ptsnum]._y = player._y;
_root["plyr_dam_mc" + pl_ptsnum].lx = 1;
}
if (player_health <= 0) {
_root.damage_end.duplicateMovieClip("damage_end_pl" + pl_ptsnum, 800 + pl_ptsnum);
if (_root["damage_end_pl" + pl_ptsnum].lx == null) {
_root["damage_end_pl" + pl_ptsnum]._x = player._x;
_root["damage_end_pl" + pl_ptsnum]._y = player._y;
_root["damage_end_pl" + pl_ptsnum].lx = 1;
}
chat("You have died", 30, 5);
removeMovieClip(player);
delete obj.ht;
delete obj.static;
delete obj.atk;
delete enemy.ht_AI;
} else {
player_health = player_health - playerDamage;
}
}
obj.input = 1;
}
}
} else {
delete obj.input;
}
}
function enemy_move_castle(obj, spd, player) {
if (obj.lx == null) {
obj.gotoAndStop(obj._currentframe + 5);
obj.lx = 1;
}
if (obj.hitTest(player.hb)) {
} else if (obj.atk == 1) {
if (obj._x > player._x) {
obj._xscale = 100;
if (Math.abs(obj._y - player._y) < 20) {
obj.gotoAndStop(3);
obj._x = obj._x - spd;
} else if (Math.abs(obj._x - player._x) < 20) {
if (obj._y > player._y) {
obj.gotoAndStop(5);
obj._y = obj._y - spd;
} else {
obj.gotoAndStop(1);
obj._y = obj._y + spd;
}
} else if (obj._y > player._y) {
obj.gotoAndStop(4);
obj._y = obj._y - spd;
obj._x = obj._x - spd;
} else if (obj._y < player._y) {
obj.gotoAndStop(2);
obj._y = obj._y + spd;
obj._x = obj._x - spd;
}
}
if (obj._x < player._x) {
obj._xscale = -100;
if (Math.abs(obj._y - player._y) < 10) {
obj.gotoAndStop(3);
obj._x = obj._x + spd;
} else if (obj._y > player._y) {
obj.gotoAndStop(4);
obj._y = obj._y - spd;
obj._x = obj._x + spd;
} else if (obj._y < player._y) {
obj.gotoAndStop(2);
obj._y = obj._y + spd;
obj._x = obj._x + spd;
}
}
}
}
function hitDetect_castle(obj, atk, enemy, provoke) {
if (enemy._x > 240) {
enemy._x = 0;
enemy._y = Math.ceil(Math.random() * 240);
}
if (enemy._x < 0) {
enemy._x = 240;
}
if (enemy._y > 240) {
enemy._y = 0;
enemy._x = Math.ceil(Math.random() * 240);
}
if (enemy._y < 0) {
enemy._y = 240;
}
if (enemy.atk == null) {
if (enemy._x > 240) {
enemy._x = 0;
}
if (enemy._x < 0) {
enemy._x = 240;
}
if (enemy._y > 240) {
enemy._y = 0;
}
if (enemy._y < 0) {
enemy._y = 240;
}
spd = 2.5;
if (enemy.move == 1) {
enemy._y = enemy._y + spd;
animate(enemy, 1);
}
if (enemy.move == 2) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y + spd;
animate(enemy, 2);
enemy._xscale = -100;
}
if (enemy.move == 3) {
enemy._x = enemy._x + spd;
animate(enemy, 3);
enemy._xscale = -100;
}
if (enemy.move == 4) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y - spd;
animate(enemy, 4);
enemy._xscale = -100;
}
if (enemy.move == 5) {
enemy._y = enemy._y - spd;
animate(enemy, 5);
}
if (enemy.move == 6) {
enemy._y = enemy._y - spd;
enemy._x = enemy._x - spd;
animate(enemy, 4);
enemy._xscale = 100;
}
if (enemy.move == 7) {
enemy._x = enemy._x - spd;
animate(enemy, 3);
enemy._xscale = 100;
}
if (enemy.move == 8) {
enemy._x = enemy._x - spd;
enemy._y = enemy._y + spd;
animate(enemy, 2);
enemy._xscale = 100;
}
if (enemy.move >= 9) {
if (enemy._currentframe > 5) {
enemy.gotoAndStop(enemy._currentframe - 5);
enemy.gotoAndStop(enemy._currentframe + 5);
} else {
enemy.gotoAndStop(enemy._currentframe + 5);
}
}
}
if (enemy.ht_AI == null) {
enemy.ht_AI = Math.ceil((Math.random() * 80) + 120);
}
if (enemy.ht >= enemy.ht_AI) {
delete enemy.atk;
delete enemy.ht;
delete enemy.static;
if (enemy.atk == null) {
enemy.move = Math.ceil(Math.random() * 12);
}
if (enemy.atk == 1) {
delete enemy.move;
}
if (enemy._currentframe > 5) {
enemy.gotoAndStop(enemy._currentframe - 5);
enemy.gotoAndStop(enemy._currentframe + 5);
} else {
enemy.gotoAndStop(enemy._currentframe + 5);
}
} else {
enemy.ht++;
}
if (enemy.hitTest(obj) && (enemy.provoking >= 5)) {
enemy.atk = 1;
enemy.provoked = 1;
}
if (enemy.hitTest(provoke)) {
if (enemy.provoking >= 5) {
var provoked_nme;
while (provoked_nme < 6) {
_root["enemy" + provoked_nme].atk = 1;
_root["enemy" + provoked_nme].provoked = 1;
provoked_nme++;
}
enemy.atk = 1;
enemy.provoked = 1;
delete enemy.provoking;
}
if (enemy.provoking < 5) {
enemy.provoking++;
}
}
if (Math.abs(enemy._y - obj._y) < 60) {
if (Math.abs(enemy._x - obj._x) < 60) {
if (enemy.provoked == 1) {
enemy.atk = 1;
}
}
}
if (enemy.health == null) {
enemy.health = 30;
enemy.exp = 20;
}
if (atk.hitTest(enemy)) {
plhitRate = (player_hitRate + Math.ceil(Math.random() * 100)) + (stats_dex + base_dex);
player_hitRate = 40;
if (plhitRate >= 100) {
_root.sound.gotoAndPlay(2);
damage = Math.ceil(((Math.random() * weaponHigh[0]) + weaponLow[0]) + (stats_str + (base_str / 10)));
_root.enemyRO = _root.enemyRO + (((((damage + ":") + enemy.health) + "current ") + (enemy.health - damage)) + "<br>");
enemy.health = enemy.health - damage;
odometer = odometer + 1;
atk._x = -200;
atk._y = -200;
if (weaponarray == null) {
weaponLow = new Array();
weaponHigh = new Array();
weaponLow[0] = 1;
weaponHigh[0] = 5;
weaponarray = 1;
}
} else {
damage = "Miss!";
_root.enemyRO = _root.enemyRO + (((damage + ":") + enemy.health) + "<br>");
odometer = odometer + 1;
atk._x = -200;
atk._y = -200;
}
if (pointsnum == null) {
pointsnum = 1;
}
if (pointsnum >= 10) {
pointsnum = 1;
} else {
pointsnum++;
}
if (plhitRate >= 80) {
_root.damage_mc.duplicateMovieClip("damage_mc" + pointsnum, 500 + pointsnum);
if (_root["damage_mc" + pointsnum].lx == null) {
_root["damage_mc" + pointsnum]._x = enemy._x;
_root["damage_mc" + pointsnum]._y = enemy._y;
_root["damage_mc" + pointsnum].lx = 1;
}
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints" + pointsnum, 600 + pointsnum);
if (_root["nme_hitpoints" + pointsnum].lx == null) {
_root["nme_hitpoints" + pointsnum]._x = enemy._x;
_root["nme_hitpoints" + pointsnum]._y = enemy._y;
_root["nme_hitpoints" + pointsnum].lx = 1;
}
delete enemy.atk;
} else {
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints" + pointsnum, 600 + pointsnum);
if (_root["nme_hitpoints" + pointsnum].lx == null) {
_root["nme_hitpoints" + pointsnum]._x = enemy._x;
_root["nme_hitpoints" + pointsnum]._y = enemy._y;
_root["nme_hitpoints" + pointsnum].lx = 1;
}
}
if (enemy.health <= 0) {
_root.damage_end.duplicateMovieClip("damage_end" + pointsnum, 550 + pointsnum);
if (_root["damage_end" + pointsnum].lx == null) {
_root["damage_end" + pointsnum]._x = enemy._x;
_root["damage_end" + pointsnum]._y = enemy._y;
_root["damage_end" + pointsnum].lx = 1;
}
ItemSpawn();
value = 20;
if (level >= 99) {
stats_exp = tnl;
} else {
stats_exp = stats_exp + value;
}
chat(value + " Experience", 30, 5);
enemy._x = -100;
enemy._y = 240;
enemy.health = 30;
}
}
plimit = 10;
_root["nme_hitpoints" + pointsnum].display = damage;
}
function game_hitDetect_castle(obj, atk, enemy, provoke) {
hitDetect_castle(obj, atk, enemy, provoke);
}
function game_enemy(obj, spd, auto, aspd, player) {
enemy_attack(obj, auto, aspd, player);
enemy_move(obj, spd, player);
}
function enemy_attack(obj, auto, aspd, player) {
if (obj.hitTest(player.hb)) {
obj.enemTimer++;
if (obj.enemTimer >= aspd) {
delete obj.input;
delete obj.enemTimer;
}
if (obj.input == null) {
if (obj._currentframe > 10) {
obj.gotoAndStop(obj._currentFrame - 5);
obj.gotoAndStop(obj._currentFrame + 5);
} else if (obj._currentframe < 5) {
obj.gotoAndStop(obj._currentFrame + 10);
} else {
obj.gotoAndStop(obj._currentFrame + 5);
}
if (pl_ptsnum >= 10) {
pl_ptsnum = 1;
} else {
pl_ptsnum++;
}
enemy_hitRate = 1;
hitRate = (enemy_hitRate + Math.ceil(Math.random() * 100)) - (stats._agi + 10);
if (enemyLow == null) {
enemyLow = new Array();
enemyHigh = new Array();
enemyLow[0] = 5;
enemyHigh[0] = 0;
}
if (hitRate >= 60) {
playerDamage = Math.ceil((Math.random() * enemyLow[0]) + enemyHigh[0]);
_root.sound.gotoAndPlay(4);
} else {
playerDamage = "Miss!";
_root.sound.gotoAndPlay(3);
}
_root.player_hitpoints.duplicateMovieClip("player_hitpoints" + pl_ptsnum, 650 + pl_ptsnum);
if (_root["player_hitpoints" + pl_ptsnum].lx == null) {
_root["player_hitpoints" + pl_ptsnum]._x = player._x;
_root["player_hitpoints" + pl_ptsnum]._y = player._y;
_root["player_hitpoints" + pl_ptsnum].lx = 1;
_root["player_hitpoints" + pl_ptsnum].display = playerDamage;
}
if (playerDamage == "Miss!") {
player_health = player_health - 0;
} else {
_root.plyr_dam_mc.duplicateMovieClip("plyr_dam_mc" + pl_ptsnum, 700 + pl_ptsnum);
if (_root["plyr_dam_mc" + pl_ptsnum].lx == null) {
_root["plyr_dam_mc" + pl_ptsnum]._x = player._x;
_root["plyr_dam_mc" + pl_ptsnum]._y = player._y;
_root["plyr_dam_mc" + pl_ptsnum].lx = 1;
}
if (player_health <= 0) {
_root.damage_end.duplicateMovieClip("damage_end_pl" + pl_ptsnum, 800 + pl_ptsnum);
if (_root["damage_end_pl" + pl_ptsnum].lx == null) {
_root["damage_end_pl" + pl_ptsnum]._x = player._x;
_root["damage_end_pl" + pl_ptsnum]._y = player._y;
_root["damage_end_pl" + pl_ptsnum].lx = 1;
}
chat("You have died", 30, 5);
removeMovieClip(player);
delete obj.ht;
delete obj.static;
delete obj.atk;
delete enemy.ht_AI;
} else {
player_health = player_health - playerDamage;
}
}
obj.input = 1;
}
} else {
delete obj.input;
}
}
function enemy_move(obj, spd, player) {
if (obj.lx == null) {
obj.gotoAndStop(obj._currentframe + 5);
obj.lx = 1;
}
if (obj.hitTest(player.hb)) {
} else if (obj.atk == 1) {
if (obj._x > player._x) {
obj._xscale = 100;
if (Math.abs(obj._y - player._y) < 20) {
obj.gotoAndStop(3);
obj._x = obj._x - spd;
} else if (Math.abs(obj._x - player._x) < 20) {
if (obj._y > player._y) {
obj.gotoAndStop(5);
obj._y = obj._y - spd;
} else {
obj.gotoAndStop(1);
obj._y = obj._y + spd;
}
} else if (obj._y > player._y) {
obj.gotoAndStop(4);
obj._y = obj._y - spd;
obj._x = obj._x - spd;
} else if (obj._y < player._y) {
obj.gotoAndStop(2);
obj._y = obj._y + spd;
obj._x = obj._x - spd;
}
}
if (obj._x < player._x) {
obj._xscale = -100;
if (Math.abs(obj._y - player._y) < 10) {
obj.gotoAndStop(3);
obj._x = obj._x + spd;
} else if (obj._y > player._y) {
obj.gotoAndStop(4);
obj._y = obj._y - spd;
obj._x = obj._x + spd;
} else if (obj._y < player._y) {
obj.gotoAndStop(2);
obj._y = obj._y + spd;
obj._x = obj._x + spd;
}
}
}
}
function game_items_dungeon(char, item) {
function potionuse() {
_root.purge_effect_mc.duplicateMovieClip("purge" + itemuse, 990 + itemuse);
if (_root["purge" + itemuse].lx == null) {
_root["purge" + itemuse]._x = char._x;
_root["purge" + itemuse]._y = char._y;
_root.sounditem.gotoAndStop(4);
_root["purge" + itemuse].gotoAndPlay(1);
_root["purge" + itemuse].lx = 1;
}
}
function dropEngine(value) {
_root.t = _root.hud_mc1.macro._currentframe;
if (dropitem == null) {
if (_root.hud_mc1.macro._currentframe == value) {
if (ItemNum[value] <= 1) {
delete ItemArraynum[value];
delete ItemNum[value];
} else {
ItemNum[value] = ItemNum[value] - 1;
}
}
dropht = 1;
useitem = 1;
arraynum = 1;
}
}
function useEngine(value) {
_root.t = _root.hud_mc1.macro._currentframe;
if (useitem == null) {
if (_root.hud_mc1.macro._currentframe == value) {
if (ItemArraynum[value] == 1) {
beef_use = 1;
}
if (ItemArraynum[value] == 13) {
redpot_use = 1;
}
if (ItemArraynum[value] == 6) {
if (concpot_use == 1) {
delete concpotTimer;
}
concpot_use = 1;
}
ItemNum[value] = ItemNum[value] - 1;
if (ItemNum[value] <= 0) {
delete ItemArraynum[value];
delete ItemNum[value];
}
}
dropht = 1;
useitem = 1;
arraynum = 1;
}
}
function Inventory(KEY1, KEY2, KEY3, KEY4, KEY5, KEY6) {
if (Key.isDown(KEY1)) {
if (a_key == null) {
keys = 1;
useEngine(keys);
a_key = 1;
}
} else {
delete a_key;
delete useitem;
}
if (Key.isDown(KEY2)) {
if (b_key == null) {
keys = 2;
useEngine(keys);
b_key = 1;
}
} else {
delete b_key;
delete useitem;
}
if (Key.isDown(KEY3)) {
if (c_key == null) {
keys = 3;
useEngine(keys);
c_key = 1;
}
} else {
delete c_key;
delete useitem;
}
if (Key.isDown(KEY4)) {
if (x_key == null) {
keys = 4;
useEngine(keys);
x_key = 1;
}
} else {
delete x_key;
delete useitem;
}
if (Key.isDown(KEY5)) {
if (e_key == null) {
keys = 5;
useEngine(keys);
e_key = 1;
}
} else {
delete e_key;
delete useitem;
}
if (Key.isDown(KEY6)) {
if (d_key == null) {
if (ItemNum[1] < 1) {
} else {
dropEngine(keys);
d_key = 1;
}
}
} else {
delete d_key;
delete useitem;
delete dropitem;
}
}
function goldcollector(obj) {
if (enemyitem == 2) {
gold = gold + itemGold[1];
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemGold[1]) + ")", 30, 5);
removeMovieClip(obj);
delete enemyitem;
} else if (enemyitem == 3) {
gold = gold + itemGold[2];
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemGold[2]) + ")", 30, 5);
removeMovieClip(obj);
delete enemyitem;
} else if (enemyitem == 5) {
gold = gold + itemGold[3];
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemGold[3]) + ")", 30, 5);
removeMovieClip(obj);
delete enemyitem;
} else if (enemyitem == 10) {
gold = gold + itemGold[4];
_root.sounditem.gotoAndStop(3);
removeMovieClip(obj);
chat(((itemMsg[enemyItem] + "(") + itemGold[4]) + ")", 30, 5);
delete enemyitem;
}
}
function macrofiller(obj) {
if (itemArraynum[1] == enemyitem) {
itemNum[1] = itemNum[1] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[1]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[2] == enemyitem) {
itemNum[2] = itemNum[2] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[2]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[3] == enemyitem) {
itemNum[3] = itemNum[3] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[3]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[4] == enemyitem) {
itemNum[4] = itemNum[4] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[4]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[5] == enemyitem) {
itemNum[5] = itemNum[5] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[5]) + ")", 30, 5);
removeMovieClip(obj);
} else if (arraynum < 6) {
if ((((enemyitem == 2) || (enemyitem == 3)) || (enemyitem == 5)) || (enemyitem == 10)) {
goldcollector(obj);
removeMovieClip(obj);
} else {
itemArraynum[arraynum] = enemyitem;
itemNum[arraynum] = itemNum[arraynum] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[arraynum]) + ")", 30, 5);
removeMovieClip(obj);
}
} else {
goldcollector(obj);
}
}
function arrayfiller() {
if (ItemArraynum[1] == null) {
arraynum = 1;
} else if (ItemArraynum[2] == null) {
arraynum = 2;
} else if (ItemArraynum[3] == null) {
arraynum = 3;
} else if (ItemArraynum[4] == null) {
arraynum = 4;
} else if (ItemArraynum[5] == null) {
arraynum = 5;
} else {
arraynum = 6;
}
}
if (keys == null) {
keys = 1;
}
if (beef_use == 1) {
chat("Your ate Beef", 30, 5);
if (player_health >= stats_health) {
player_health = stats_health;
}
var i;
while ((player_health < stats_health) && (i < 50)) {
(player_health++) && (i++);
}
_root.sounditem.gotoAndStop(2);
delete beef_use;
}
if (redpot_use == 1) {
potionuse();
chat("Your drank a red potion", 30, 5);
player_health = stats_health;
delete redpot_use;
}
if (potUsage == null) {
potUsage = new Array();
potUsage[1] = 8;
potUsage[2] = 10;
potUsage[3] = 12;
}
if (concpot_use == 1) {
if (itemuse >= 10) {
itemuse = 1;
}
if (concpotTimer == null) {
itemuse++;
potionuse();
chat("Your drank a speed potion", 30, 5);
if (PotNum == 3) {
} else {
PotNum++;
}
concpotTimer = 10000 / PotNum;
}
if (concpotTimer <= 0) {
delete PotNum;
delete concpot_use;
delete concpotTimer;
chat("Your increased speed is gone", 30, 5);
} else {
if (stats_agi_full < 2) {
stats_agi_full = 2.96;
} else {
stats_agi_full = stats_agi - (potUsage[PotNum] + base_agi);
}
concpotTimer = concpotTimer - 10;
}
} else {
if (stats_agi_full == null) {
stats_agi_full = stats_agi - base_agi;
}
if (stats_agi_full < 2) {
stats_agi_full = 2.96;
} else {
stats_agi_full = stats_agi - base_agi;
}
}
if (PotNum == null) {
concpot_time = 10000;
} else {
concpot_time = 10000 / PotNum;
}
if (Key.isDown(70)) {
item_usage = 1;
} else {
delete item_usage;
}
if (itemArray == null) {
itemArraynum = new Array();
itemArray = new Array();
itemNum = new Array();
itemGold = new Array();
itemMsg = new Array();
itemGold[0] = null;
itemGold[1] = 10;
itemGold[2] = 1000;
itemGold[3] = 100;
itemGold[4] = 1;
itemMsg[0] = null;
itemMsg[1] = "Beef";
itemMsg[2] = "Coins";
itemMsg[3] = "Gold";
itemMsg[4] = "Red Ring";
itemMsg[5] = "Coins100";
itemMsg[6] = "Concentration potion";
itemMsg[7] = "Dark Amber";
itemMsg[8] = "Purple Ring";
itemMsg[9] = "Amber";
itemMsg[10] = "1 Coin";
itemMsg[11] = "Blue Ring";
itemMsg[12] = "Tiger Meat";
itemMsg[13] = "Red potion";
itemMsg[14] = "Wooden saber";
itemMsg[15] = "Sword";
itemMsg[16] = "Moonblade";
itemMsg[17] = "Dagger";
itemMsg[18] = "Blood";
itemMsg[19] = "Nimble Blade";
itemMsg[20] = "Star Scale Mail";
itemMsg[21] = "Moon Scale Mail";
itemMsg[22] = "Sun Scale Mail";
itemMsg[23] = "Star Armor";
itemMsg[24] = "Moon Armor";
itemMsg[25] = "Sun Armor";
itemMsg[26] = "Titanium Glove";
itemMsg[27] = "Whisper Bracelet";
itemMsg[28] = "Empty";
itemFillOrder = newArray();
itemNum[1] = 5;
itemArraynum[1] = 6;
itemNum[2] = 1;
itemArraynum[2] = 20;
itemNum[3] = 1;
itemArraynum[3] = 13;
itemNum[4] = 20;
itemArraynum[4] = 1;
}
if (item_usage == 1) {
if (sellpage == 1) {
} else {
Inventory(49, 50, 51, 52, 53, 68);
}
itembox1 = itemNum[1];
itembox2 = itemNum[2];
itembox3 = itemNum[3];
itembox4 = itemNum[4];
itembox5 = itemNum[5];
}
var i_sheet = 1;
while (i_sheet < 7) {
if (_root["item" + i_sheet].hitTest(char.hb)) {
enemyitem = _root["item" + i_sheet]._currentframe;
enemydeath = 1;
}
if (enemydeath == 1) {
if (arraynum >= 6) {
arrayfiller();
macrofiller(_root["item" + i_sheet]);
} else {
arrayfiller();
macrofiller(_root["item" + i_sheet]);
}
delete enemydeath;
}
i_sheet++;
}
}
function game_items_castle(char, item) {
function dropEngine_castle(value) {
_root.t = _root.hud_mc1.macro._currentframe;
if (dropitem == null) {
if (_root.hud_mc1.macro._currentframe == value) {
if (ItemNum[value] <= 1) {
delete ItemArraynum[value];
delete ItemNum[value];
} else {
ItemNum[value] = ItemNum[value] - 1;
}
}
dropht = 1;
useitem = 1;
arraynum = 1;
}
}
function useEngine_castle(value) {
_root.t = _root.hud_mc1.macro._currentframe;
if (useitem == null) {
if (_root.hud_mc1.macro._currentframe == value) {
if (ItemNum[value] <= 0) {
delete ItemArraynum[value];
delete ItemNum[value];
}
}
dropht = 1;
useitem = 1;
arraynum = 1;
}
}
function Inventory(KEY1, KEY2, KEY3, KEY4, KEY5, KEY6) {
if (Key.isDown(KEY1)) {
if (a_key == null) {
if (item.hitTest(char)) {
arraynum = 1;
} else {
keys = 1;
useEngine_castle(keys);
}
a_key = 1;
}
} else {
delete a_key;
delete useitem;
}
if (Key.isDown(KEY2)) {
if (b_key == null) {
if (item.hitTest(char)) {
arraynum = 2;
} else {
keys = 2;
useEngine_castle(keys);
}
b_key = 1;
}
} else {
delete b_key;
delete useitem;
}
if (Key.isDown(KEY3)) {
if (c_key == null) {
if (item.hitTest(char)) {
arraynum = 3;
} else {
keys = 3;
useEngine_castle(keys);
}
c_key = 1;
}
} else {
delete c_key;
delete useitem;
}
if (Key.isDown(KEY4)) {
if (x_key == null) {
if (item.hitTest(char)) {
arraynum = 4;
} else {
keys = 4;
useEngine_castle(keys);
}
x_key = 1;
}
} else {
delete x_key;
delete useitem;
}
if (Key.isDown(KEY5)) {
if (e_key == null) {
if (item.hitTest(char)) {
arraynum = 5;
} else {
keys = 5;
useEngine(keys);
}
e_key = 1;
}
} else {
delete e_key;
delete useitem;
}
if (Key.isDown(KEY6)) {
if (d_key == null) {
if (ItemNum[1] < 1) {
} else {
if (item.hitTest(char)) {
arraynum = 1;
} else {
dropEngine_castle(keys);
}
d_key = 1;
}
}
} else {
delete d_key;
delete dropitem;
}
}
if (keys == null) {
keys = 1;
}
itembox1 = itemNum[1];
itembox2 = itemNum[2];
itembox3 = itemNum[3];
itembox4 = itemNum[4];
itembox5 = itemNum[5];
stats_agi_full = stats_agi - base_agi;
if (itemArray == null) {
itemArraynum = new Array();
itemArray = new Array();
itemNum = new Array();
itemGold = new Array();
itemMsg = new Array();
itemGold[0] = null;
itemGold[1] = 10;
itemGold[2] = 1000;
itemGold[3] = 100;
itemGold[4] = 1;
itemMsg[1] = "Beef";
itemMsg[6] = "Concentration potion";
itemMsg[13] = "Red potion";
itemMsg[14] = "Wooden saber";
itemMsg[20] = "Star Scale Mail";
itemFillOrder = newArray();
itemNum[1] = 5;
itemArraynum[1] = 6;
itemNum[2] = 1;
itemArraynum[2] = 20;
itemNum[3] = 10;
itemArraynum[3] = 13;
itemNum[4] = 20;
itemArraynum[4] = 1;
}
}
function game_items(char, item) {
function dropEngine(value) {
_root.t = _root.hud_mc1.macro._currentframe;
if (dropitem == null) {
if (_root.hud_mc1.macro._currentframe == value) {
if (ItemNum[value] <= 1) {
delete ItemArraynum[value];
delete ItemNum[value];
} else {
ItemNum[value] = ItemNum[value] - 1;
}
}
dropht = 1;
useitem = 1;
arraynum = 1;
}
}
function useEngine(value) {
_root.t = _root.hud_mc1.macro._currentframe;
if (useitem == null) {
if (_root.hud_mc1.macro._currentframe == value) {
if (ItemArraynum[value] == 1) {
beef_use = 1;
}
if (ItemArraynum[value] == 13) {
redpot_use = 1;
}
if (ItemArraynum[value] == 6) {
if (concpot_use == 1) {
delete concpotTimer;
}
concpot_use = 1;
}
ItemNum[value] = ItemNum[value] - 1;
if (ItemNum[value] <= 0) {
delete ItemArraynum[value];
delete ItemNum[value];
}
}
dropht = 1;
useitem = 1;
arraynum = 1;
}
}
function Inventory(KEY1, KEY2, KEY3, KEY4, KEY5, KEY6) {
if (Key.isDown(KEY1)) {
if (a_key == null) {
if (item.hitTest(char)) {
arraynum = 1;
} else {
keys = 1;
useEngine(keys);
}
a_key = 1;
}
} else {
delete a_key;
delete useitem;
}
if (Key.isDown(KEY2)) {
if (b_key == null) {
if (item.hitTest(char)) {
arraynum = 2;
} else {
keys = 2;
useEngine(keys);
}
b_key = 1;
}
} else {
delete b_key;
delete useitem;
}
if (Key.isDown(KEY3)) {
if (c_key == null) {
if (item.hitTest(char)) {
arraynum = 3;
} else {
keys = 3;
useEngine(keys);
}
c_key = 1;
}
} else {
delete c_key;
delete useitem;
}
if (Key.isDown(KEY4)) {
if (x_key == null) {
if (item.hitTest(char)) {
arraynum = 4;
} else {
keys = 4;
useEngine(keys);
}
x_key = 1;
}
} else {
delete x_key;
delete useitem;
}
if (Key.isDown(KEY5)) {
if (e_key == null) {
if (item.hitTest(char)) {
arraynum = 5;
} else {
keys = 5;
useEngine(keys);
}
e_key = 1;
}
} else {
delete e_key;
delete useitem;
}
if (Key.isDown(KEY6)) {
if (d_key == null) {
if (ItemNum[1] < 1) {
} else {
if (item.hitTest(char)) {
arraynum = 1;
} else {
dropEngine(keys);
}
d_key = 1;
}
}
} else {
delete d_key;
delete dropitem;
}
}
function goldcollector() {
if (enemyitem == 2) {
gold = gold + itemGold[1];
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemGold[1]) + ")", 30, 5);
delete enemyitem;
} else if (enemyitem == 3) {
gold = gold + itemGold[2];
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemGold[2]) + ")", 30, 5);
delete enemyitem;
} else if (enemyitem == 5) {
gold = gold + itemGold[3];
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemGold[3]) + ")", 30, 5);
delete enemyitem;
} else if (enemyitem == 10) {
gold = gold + itemGold[4];
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemGold[4]) + ")", 30, 5);
delete enemyitem;
}
}
function macrofiller() {
if (itemArraynum[1] == enemyitem) {
itemNum[1] = itemNum[1] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[1]) + ")", 30, 5);
} else if (itemArraynum[2] == enemyitem) {
itemNum[2] = itemNum[2] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[2]) + ")", 30, 5);
} else if (itemArraynum[3] == enemyitem) {
itemNum[3] = itemNum[3] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[3]) + ")", 30, 5);
} else if (itemArraynum[4] == enemyitem) {
itemNum[4] = itemNum[4] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[4]) + ")", 30, 5);
} else if (itemArraynum[5] == enemyitem) {
itemNum[5] = itemNum[5] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[5]) + ")", 30, 5);
} else if (arraynum < 6) {
if ((((enemyitem == 2) || (enemyitem == 3)) || (enemyitem == 5)) || (enemyitem == 10)) {
goldcollector();
} else {
itemArraynum[arraynum] = enemyitem;
itemNum[arraynum] = itemNum[arraynum] + 1;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[arraynum]) + ")", 30, 5);
}
} else {
goldcollector();
}
}
function arrayfiller() {
if (ItemArraynum[1] == null) {
arraynum = 1;
} else if (ItemArraynum[2] == null) {
arraynum = 2;
} else if (ItemArraynum[3] == null) {
arraynum = 3;
} else if (ItemArraynum[4] == null) {
arraynum = 4;
} else if (ItemArraynum[5] == null) {
arraynum = 5;
} else {
arraynum = 6;
}
}
function potionuse() {
_root.purge_effect_mc.duplicateMovieClip("purge" + itemuse, 990 + itemuse);
if (_root["purge" + itemuse].lx == null) {
_root["purge" + itemuse]._x = char._x;
_root["purge" + itemuse]._y = char._y;
_root.sounditem.gotoAndStop(4);
_root["purge" + itemuse].gotoAndPlay(1);
_root["purge" + itemuse].lx = 1;
}
}
if (beef_use == 1) {
chat("Your ate Beef", 30, 5);
if (player_health >= stats_health) {
player_health = stats_health;
}
var i;
while ((player_health < stats_health) && (i < 50)) {
(player_health++) && (i++);
}
_root.sounditem.gotoAndStop(2);
delete beef_use;
}
if (redpot_use == 1) {
potionuse();
chat("Your drank a red potion", 30, 5);
player_health = stats_health;
delete redpot_use;
}
if (potUsage == null) {
potUsage = new Array();
potUsage[1] = 8;
potUsage[2] = 10;
potUsage[3] = 12;
}
if (concpot_use == 1) {
if (itemuse >= 10) {
itemuse = 1;
}
if (concpotTimer == null) {
itemuse++;
potionuse();
chat("Your drank a speed potion", 30, 5);
if (PotNum == 3) {
} else {
PotNum++;
}
concpotTimer = 10000 / PotNum;
}
if (concpotTimer <= 0) {
delete PotNum;
delete concpot_use;
delete concpotTimer;
chat("Your increased speed is gone", 30, 5);
} else {
if (stats_agi_full < 2) {
stats_agi_full = 2.96;
} else {
stats_agi_full = stats_agi - (potUsage[PotNum] + base_agi);
}
concpotTimer--;
}
} else {
if (stats_agi_full == null) {
stats_agi_full = stats_agi - base_agi;
}
if (stats_agi_full < 2) {
stats_agi_full = 2.96;
} else {
stats_agi_full = stats_agi - base_agi;
}
}
if (PotNum == null) {
concpot_time = 10000;
} else {
concpot_time = 10000 / PotNum;
}
if (keys == null) {
keys = 1;
}
Inventory(49, 50, 51, 52, 53, 68);
itembox1 = itemNum[1];
itembox2 = itemNum[2];
itembox3 = itemNum[3];
itembox4 = itemNum[4];
itembox5 = itemNum[5];
if (itemArray == null) {
itemArraynum = new Array();
itemArray = new Array();
itemNum = new Array();
itemGold = new Array();
itemMsg = new Array();
itemGold[0] = null;
itemGold[1] = 10;
itemGold[2] = 1000;
itemGold[3] = 100;
itemGold[4] = 1;
itemMsg[0] = null;
itemMsg[1] = "Beef";
itemMsg[2] = "Coins";
itemMsg[3] = "Gold";
itemMsg[4] = "Red Ring";
itemMsg[5] = "Coins100";
itemMsg[6] = "Concentration potion";
itemMsg[7] = "Dark Amber";
itemMsg[8] = "Purple Ring";
itemMsg[9] = "Amber";
itemMsg[10] = "1 Coin";
itemMsg[11] = "Blue Ring";
itemMsg[12] = "Tiger Meat";
itemMsg[13] = "Red potion";
itemMsg[14] = "Wooden saber";
itemMsg[15] = "Sword";
itemMsg[16] = "Moonblade";
itemMsg[17] = "Dagger";
itemMsg[18] = "Blood";
itemMsg[19] = "Nimble Blade";
itemMsg[20] = "Star Scale Mail";
itemMsg[21] = "Moon Scale Mail";
itemMsg[22] = "Sun Scale Mail";
itemMsg[23] = "Star Armor";
itemMsg[24] = "Moon Armor";
itemMsg[25] = "Sun Armor";
itemMsg[26] = "Titanium Glove";
itemMsg[27] = "Whisper Bracelet";
itemMsg[28] = "Empty";
itemFillOrder = newArray();
itemNum[1] = 5;
itemArraynum[1] = 6;
itemNum[2] = 1;
itemArraynum[2] = 20;
itemNum[3] = 10;
itemArraynum[3] = 13;
itemNum[4] = 20;
itemArraynum[4] = 1;
}
if (arraynum == null) {
arraynum = 0;
}
if (enemydeath == 1) {
if (arraynum >= 6) {
arrayfiller();
macrofiller();
} else {
arrayfiller();
macrofiller();
}
delete enemydeath;
}
}
function hitDetect_dungeon(obj, atk, enemy, npc) {
if (enemy.atk == null) {
spd = 2.5;
if (enemy.move == 1) {
enemy._y = enemy._y + spd;
animate(enemy, 1);
}
if (enemy.move == 2) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y + spd;
animate(enemy, 2);
enemy._xscale = -100;
}
if (enemy.move == 3) {
enemy._x = enemy._x + spd;
animate(enemy, 3);
enemy._xscale = -100;
}
if (enemy.move == 4) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y - spd;
animate(enemy, 4);
enemy._xscale = -100;
}
if (enemy.move == 5) {
enemy._y = enemy._y - spd;
animate(enemy, 5);
}
if (enemy.move == 6) {
enemy._y = enemy._y - spd;
enemy._x = enemy._x - spd;
animate(enemy, 4);
enemy._xscale = 100;
}
if (enemy.move == 7) {
enemy._x = enemy._x - spd;
animate(enemy, 3);
enemy._xscale = 100;
}
if (enemy.move == 8) {
enemy._x = enemy._x - spd;
enemy._y = enemy._y + spd;
animate(enemy, 2);
enemy._xscale = 100;
}
if (enemy.move >= 9) {
if (enemy._currentframe > 5) {
enemy.gotoAndStop(enemy._currentframe - 5);
enemy.gotoAndStop(enemy._currentframe + 5);
} else {
enemy.gotoAndStop(enemy._currentframe + 5);
}
}
}
if (enemy.ht_AI == null) {
enemy.ht_AI = Math.ceil((Math.random() * 80) + 120);
}
if (enemy.ht >= enemy.ht_AI) {
delete enemy.atk;
delete enemy.ht;
delete enemy.static;
if (enemy.atk == null) {
enemy.move = Math.ceil(Math.random() * 12);
}
if (enemy.atk == 1) {
delete enemy.move;
}
if (enemy._currentframe > 5) {
enemy.gotoAndStop(enemy._currentframe - 5);
enemy.gotoAndStop(enemy._currentframe + 5);
} else {
enemy.gotoAndStop(enemy._currentframe + 5);
}
} else {
enemy.ht++;
}
if (enemy.hitTest(obj)) {
enemy.atk = 1;
}
if (Math.abs(enemy._y - obj._y) < 100) {
if (Math.abs(enemy._x - obj._x) < 100) {
enemy.atk = 1;
}
}
if (enemy.health == null) {
enemy.health = 30;
enemy.exp = 125;
}
if (atk.hitTest(enemy)) {
plhitRate = (player_hitRate + Math.ceil(Math.random() * 100)) + (stats_dex + base_dex);
player_hitRate = 40;
if (plhitRate >= 100) {
_root.sound.gotoAndPlay(2);
damage = Math.ceil(((Math.random() * weaponHigh[0]) + weaponLow[0]) + (stats_str + (base_str / 10)));
_root.enemyRO = _root.enemyRO + (((((damage + ":") + enemy.health) + "current ") + (enemy.health - damage)) + "<br>");
enemy.health = enemy.health - damage;
odometer = odometer + 1;
atk._x = 999;
atk._y = 999;
if (weaponarray == null) {
weaponLow = new Array();
weaponHigh = new Array();
weaponLow[0] = 1;
weaponHigh[0] = 5;
weaponarray = 1;
}
} else {
damage = "Miss!";
_root.enemyRO = _root.enemyRO + (((damage + ":") + enemy.health) + "<br>");
odometer = odometer + 1;
atk._x = -200;
atk._y = -200;
}
if (pointsnum == null) {
pointsnum = 1;
}
if (pointsnum >= 10) {
pointsnum = 1;
} else {
pointsnum++;
}
if (plhitRate >= 80) {
_root.damage_mc.duplicateMovieClip("damage_mc" + pointsnum, 500 + pointsnum);
if (_root["damage_mc" + pointsnum].lx == null) {
_root["damage_mc" + pointsnum]._x = enemy._x;
_root["damage_mc" + pointsnum]._y = enemy._y;
_root["damage_mc" + pointsnum].lx = 1;
}
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints" + pointsnum, 600 + pointsnum);
if (_root["nme_hitpoints" + pointsnum].lx == null) {
_root["nme_hitpoints" + pointsnum]._x = enemy._x;
_root["nme_hitpoints" + pointsnum]._y = enemy._y;
_root["nme_hitpoints" + pointsnum].lx = 1;
}
delete enemy.atk;
} else {
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints" + pointsnum, 600 + pointsnum);
if (_root["nme_hitpoints" + pointsnum].lx == null) {
_root["nme_hitpoints" + pointsnum]._x = enemy._x;
_root["nme_hitpoints" + pointsnum]._y = enemy._y;
_root["nme_hitpoints" + pointsnum].lx = 1;
}
}
if (enemy.health <= 0) {
_root.damage_end.duplicateMovieClip("damage_end" + pointsnum, 550 + pointsnum);
if (_root["damage_end" + pointsnum].lx == null) {
_root["damage_end" + pointsnum]._x = enemy._x;
_root["damage_end" + pointsnum]._y = enemy._y;
_root["damage_end" + pointsnum].lx = 1;
}
enemydeath = 1;
enemyitem = Math.ceil(Math.random() * 27);
ItemSpawn(enemyitem);
value = enemy.exp;
if (level >= 99) {
stats_exp = tnl;
} else {
stats_exp = stats_exp + value;
}
chat(value + " Experience", 30, 5);
enemy._x = -100;
enemy._y = 240;
enemy.health = 30;
}
}
plimit = 10;
_root["nme_hitpoints" + pointsnum].display = damage;
if (npc_menu == 1) {
sellItem1 = sellArraynum[1];
sellItem2 = sellArraynum[2];
sellItem3 = sellArraynum[3];
sellItem4 = sellArraynum[4];
sellItem5 = sellArraynum[5];
if (sellArray == null) {
sellNum = new Array();
sellArraynum = new Array();
sellArray = new Array();
buyNum = new Array();
buyArraynum = new Array();
buyArray = new Array();
buyPriceList = new Array();
buyPriceList = [0, 50, 0, 0, 1200, 0, 200, 1600, 2000, 800, 0, 100, 300, 15000, 100, 200, 5000, 1000, 30000, 1000, 5000, 5000, 5000, 5000, 5000, 5000, 30000, 30000];
}
if (_root["npc_window_" + windowNum]._currentframe == 4) {
if (Key.isDown(68)) {
delete sellNum;
delete sellArraynum;
delete sellArray;
delete confirm;
delete s_move;
_root["npc_window_" + windowNum].gotoAndStop(1);
}
if (!Key.isDown(83)) {
confirm = 1;
}
if ((Key.isDown(83) && (confirm == 1)) && (_root["npc_window_" + windowNum]._currentframe == 4)) {
itemNum[1] = itemNum[1] - sellNum[1];
itemNum[2] = itemNum[2] - sellNum[2];
itemNum[3] = itemNum[3] - sellNum[3];
itemNum[4] = itemNum[4] - sellNum[4];
itemNum[5] = itemNum[5] - sellNum[5];
delete item_usage;
_root.sounditem.gotoAndStop(3);
gold = gold + sellgold;
delete sellgold;
if (itemNum[1] <= 0) {
itemArraynum[1] = null;
delete itemNum[1];
}
if (itemNum[2] <= 0) {
itemArraynum[2] = null;
delete itemNum[2];
}
if (itemNum[3] <= 0) {
itemArraynum[3] = null;
delete itemNum[3];
}
if (itemNum[4] <= 0) {
itemArraynum[4] = null;
delete itemNum[4];
}
if (itemNum[5] <= 0) {
itemArraynum[5] = null;
delete itemNum[5];
}
delete sellNum;
delete sellArraynum;
delete sellArray;
delete confirm;
delete s_move;
_root["npc_window_" + windowNum].gotoAndStop(1);
}
}
if (_root["npc_window_" + windowNum]._currentframe == 3) {
npc_msg = "What're you willing to sell today?";
item_usage = 1;
sellpage = 1;
sellboxp1 = (buyPricelist[sellArraynum[1]] * sellNum[1]) / 2;
sellboxp2 = (buyPricelist[sellArraynum[2]] * sellNum[2]) / 2;
sellboxp3 = (buyPricelist[sellArraynum[3]] * sellNum[3]) / 2;
sellboxp4 = (buyPricelist[sellArraynum[4]] * sellNum[4]) / 2;
sellboxp5 = (buyPricelist[sellArraynum[5]] * sellNum[5]) / 2;
sellnumx = sellNum[keys];
itembox1 = itemNum[1];
itembox2 = itemNum[2];
itembox3 = itemNum[3];
itembox4 = itemNum[4];
itembox5 = itemNum[5];
sellbox1 = sellNum[1];
sellbox2 = sellNum[2];
sellbox3 = sellNum[3];
sellbox4 = sellNum[4];
sellbox5 = sellNum[5];
if (!Key.isDown(83)) {
s_move = 1;
}
if ((s_move == 1) && (Key.isDown(83))) {
if (((((sellNum[1] >= 1) || (sellNum[2] >= 1)) || (sellNum[3] >= 1)) || (sellNum[4] >= 1)) || (sellNum[5] >= 1)) {
_root["npc_window_" + windowNum].gotoAndStop(4);
delete s_move;
}
}
if (Key.isDown(65)) {
if (sell_input == null) {
sellArraynum[keys] = itemArrayNum[keys];
if (itemNum[keys] <= 0) {
delete itemArraynum[keys];
delete itemNum[keys];
} else if (sellNum[keys] >= itemNum[keys]) {
} else {
sellgold = sellgold + (buyPriceList[itemArraynum[keys]] / 2);
sellNum[keys] = sellNum[keys] + 1;
}
sell_input = 1;
}
} else {
delete sell_input;
}
if (Key.isDown(39)) {
if (r_input == null) {
if (keys >= 5) {
keys = 1;
} else {
keys++;
}
r_input = 1;
}
} else {
delete r_input;
}
if (Key.isDown(37)) {
if (l_input == null) {
if (keys <= 1) {
keys = 5;
} else {
keys--;
}
l_input = 1;
}
} else {
delete l_input;
}
if (a_menu_input == 1) {
delete a_menu_input;
}
if (s_menu_input == 1) {
delete s_menu_input;
}
if (f_menu_input == 1) {
_root["npc_window_" + windowNum].gotoAndStop(1);
delete f_menu_input;
}
}
if (_root["npc_window_" + windowNum]._currentframe == 5) {
npc_msg2 = ("Are you sure you want to fill slot " + keys) + "?";
if (!Key.isDown(65)) {
buyedit = 1;
}
if (Key.isDown(65) && (buyedit == 1)) {
if (sell_input3 == null) {
if (gold > buyPricelist[buyshopSelect]) {
buyArraynum[keys] = itemArrayNum[keys];
itemArraynum[keys] = buyshopSelect;
itemNum[keys] = 1;
_root.sounditem.gotoAndStop(3);
_root["npc_window_" + windowNum].gotoAndStop(2);
gold = gold - buyPricelist[buyshopSelect];
delete buyedit;
sell_input3 = 1;
}
}
} else {
delete sell_input3;
}
if (Key.isDown(68)) {
if (f_input == null) {
_root["npc_window_" + windowNum].gotoAndStop(2);
f_input = 1;
}
}
}
if (_root["npc_window_" + windowNum]._currentframe == 2) {
npc_msg = "I think I can accomodate some of the things you need. What would you like?";
delete f_input;
item_usage = 1;
buypage = 1;
itembox1 = itemNum[1];
itembox2 = itemNum[2];
itembox3 = itemNum[3];
itembox4 = itemNum[4];
itembox5 = itemNum[5];
buybox1 = buyNum[1];
buybox2 = buyNum[2];
buybox3 = buyNum[3];
buybox4 = buyNum[4];
buybox5 = buyNum[5];
buyboxp1 = buyPricelist[buyArraynum[counter + 1]];
buyboxp2 = buyPricelist[buyArraynum[counter + 2]];
buyboxp3 = buyPricelist[buyArraynum[counter + 3]];
buyboxp4 = buyPricelist[buyArraynum[counter + 4]];
buyboxp5 = buyPricelist[buyArraynum[counter + 5]];
buynumx = itemNum[keys];
buyArraynum = [0, 6, 1, 13, 14, 17, 8, 4];
buyshopSelect = buyArraynum[shopselect + counter];
bdNum1 = buyArraynum[counter + 1];
bdNum2 = buyArraynum[counter + 2];
bdNum3 = buyArraynum[counter + 3];
bdNum4 = buyArraynum[counter + 4];
bdNum5 = buyArraynum[counter + 5];
if (bdNum1 == null) {
view = 5;
}
if (buyDisplaynum == null) {
buyDisplaynum = [buyArraynum[1], buyArraynum[2], buyArraynum[3], buyArraynum[4], buyArraynum[5]];
}
item_usage = 1;
if (!Key.isDown(65)) {
buyedit = 1;
}
if (Key.isDown(65) && (buyedit == 1)) {
if (sell_input == null) {
if (gold > buyPriceList[buyshopSelect]) {
buyArraynum[keys] = itemArrayNum[keys];
if (itemArraynum[keys] == buyshopSelect) {
itemNum[keys] = itemNum[keys] + 1;
delete buyedit;
gold = gold - buyPricelist[buyshopSelect];
_root.sounditem.gotoAndStop(3);
} else {
_root["npc_window_" + windowNum].gotoAndStop(5);
}
}
if (gold < buyPriceList[buyshopSelect]) {
if (cmsg == null) {
chat("You do not have enough gold", 30, 5);
cmsg = 1;
}
}
} else {
sell_input = 1;
}
} else {
delete sell_input;
delete cmsg;
}
if (Key.isDown(39)) {
if (r_input == null) {
if (keys >= 5) {
keys = 1;
} else {
keys++;
}
r_input = 1;
}
} else {
delete r_input;
}
if (Key.isDown(37)) {
if (l_input == null) {
if (keys <= 1) {
keys = 5;
} else {
keys--;
}
l_input = 1;
}
} else {
delete l_input;
}
if (Key.isDown(40)) {
if (up_input == null) {
if (keys2 >= 5) {
if (view == null) {
view = 6;
}
if (view < buyArraynum.length) {
bdNum1 = buyArraynum[view - 4];
bdNum2 = buyArraynum[view - 3];
bdNum3 = buyArraynum[view - 2];
bdNum4 = buyArraynum[view - 1];
bdNum5 = buyArraynum[view];
view++;
counter++;
}
} else {
keys2++;
}
up_input = 1;
}
} else {
delete up_input;
}
if (Key.isDown(38)) {
if (down_input == null) {
if (keys2 <= 1) {
if (view == null) {
view = 6;
}
if (view <= 6) {
} else {
bdNum1 = buyDisplaynum[view - 4];
bdNum2 = buyDisplaynum[view - 3];
bdNum3 = buyDisplaynum[view - 2];
bdNum4 = buyDisplaynum[view - 1];
bdNum5 = buyDisplaynum[view];
view--;
counter--;
}
} else {
keys2--;
}
down_input = 1;
}
} else {
delete down_input;
}
if (a_menu_input == 1) {
delete a_menu_input;
}
if (s_menu_input == 1) {
_root["npc_window_" + windowNum].gotoAndStop(3);
}
if (f_menu_input == 1) {
_root["npc_window_" + windowNum].gotoAndStop(1);
delete f_menu_input;
}
}
if (_root["npc_window_" + windowNum]._currentframe == 1) {
buyshopSelect = buyArraynum[shopselect + counter];
delete sellgold;
delete sellpage;
delete sellNum;
delete sellArraynum;
delete sellArray;
delete confirm;
delete s_move;
delete counter;
delete view;
delete buyedit;
npc_msg = "Hello, how can I help you today?";
if (a_menu_input == 1) {
_root["npc_window_" + windowNum].gotoAndStop(2);
delete a_menu_input;
}
if (s_menu_input == 1) {
_root["npc_window_" + windowNum].gotoAndStop(3);
delete s_menu_input;
}
if ((f_menu_input == 1) && (_root["npc_window_" + windowNum]._currentframe == 1)) {
removeMovieClip(_root["npc_window_" + windowNum]);
delete s_menu_input;
delete start_menu_input;
delete item_usage;
delete npc_menu;
delete f_menu_input;
}
}
if (Key.isDown(83)) {
if ((s_menu_input == null) && (_root["npc_window_" + windowNum]._currentframe == 1)) {
s_menu_input = 1;
}
} else {
delete s_menu_input;
}
if (Key.isDown(65)) {
if (a_menu_input == null) {
a_menu_input = 1;
}
} else {
delete a_menu_input;
}
if (Key.isDown(68)) {
if (f_menu_input == null) {
if ((_root["npc_window_" + windowNum]._currentframe == 2) || (_root["npc_window_" + windowNum]._currentframe == 3)) {
f_menu_input = 2;
_root["npc_window_" + windowNum].gotoAndStop(1);
} else {
f_menu_input = 1;
}
}
} else {
delete f_menu_input;
}
}
if ((!dun_Array_npcx[(dunmap * row) + col]) == null) {
}
if (npc.hitTest(obj.hb)) {
if (Key.isDown(83) && (npc_menu == null)) {
if (start_menu_input == null) {
windowNum++;
trace("hw");
_root.npc_window.duplicateMovieClip("npc_window_" + windowNum, 12000 + windowNum);
_root["npc_window_" + windowNum]._x = 64;
_root["npc_window_" + windowNum]._y = 48;
npc_menu = 1;
s_menu_input = 2;
start_menu_input = 1;
}
} else {
delete start_menu_input;
}
}
}
function hitDetect(obj, atk, enemy) {
if (enemy._x > 240) {
enemy._x = 0;
enemy._y = Math.ceil(Math.random() * 240);
}
if (enemy._x < 0) {
enemy._x = 240;
}
if (enemy._y > 240) {
enemy._y = 0;
enemy._x = Math.ceil(Math.random() * 240);
}
if (enemy._y < 0) {
enemy._y = 240;
}
if (enemy.atk == null) {
if (enemy._x > 240) {
enemy._x = 0;
}
if (enemy._x < 0) {
enemy._x = 240;
}
if (enemy._y > 240) {
enemy._y = 0;
}
if (enemy._y < 0) {
enemy._y = 240;
}
spd = 2.5;
if (enemy.move == 1) {
enemy._y = enemy._y + spd;
animate(enemy, 1);
}
if (enemy.move == 2) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y + spd;
animate(enemy, 2);
enemy._xscale = -100;
}
if (enemy.move == 3) {
enemy._x = enemy._x + spd;
animate(enemy, 3);
enemy._xscale = -100;
}
if (enemy.move == 4) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y - spd;
animate(enemy, 4);
enemy._xscale = -100;
}
if (enemy.move == 5) {
enemy._y = enemy._y - spd;
animate(enemy, 5);
}
if (enemy.move == 6) {
enemy._y = enemy._y - spd;
enemy._x = enemy._x - spd;
animate(enemy, 4);
enemy._xscale = 100;
}
if (enemy.move == 7) {
enemy._x = enemy._x - spd;
animate(enemy, 3);
enemy._xscale = 100;
}
if (enemy.move == 8) {
enemy._x = enemy._x - spd;
enemy._y = enemy._y + spd;
animate(enemy, 2);
enemy._xscale = 100;
}
if (enemy.move >= 9) {
if (enemy._currentframe > 5) {
enemy.gotoAndStop(enemy._currentframe - 5);
enemy.gotoAndStop(enemy._currentframe + 5);
} else {
enemy.gotoAndStop(enemy._currentframe + 5);
}
}
}
if (enemy.ht_AI == null) {
enemy.ht_AI = Math.ceil((Math.random() * 80) + 120);
}
if (enemy.ht >= enemy.ht_AI) {
delete enemy.atk;
delete enemy.ht;
delete enemy.static;
if (enemy.atk == null) {
enemy.move = Math.ceil(Math.random() * 12);
}
if (enemy.atk == 1) {
delete enemy.move;
}
if (enemy._currentframe > 5) {
enemy.gotoAndStop(enemy._currentframe - 5);
enemy.gotoAndStop(enemy._currentframe + 5);
} else {
enemy.gotoAndStop(enemy._currentframe + 5);
}
} else {
enemy.ht++;
}
if (enemy.hitTest(obj)) {
enemy.atk = 1;
}
if (Math.abs(enemy._y - obj._y) < 60) {
if (Math.abs(enemy._x - obj._x) < 60) {
enemy.atk = 1;
}
}
if (enemy.health == null) {
enemy.health = 30;
enemy.exp = 20;
}
if (atk.hitTest(enemy)) {
plhitRate = (player_hitRate + Math.ceil(Math.random() * 100)) + (stats_dex + base_dex);
player_hitRate = 40;
if (plhitRate >= 100) {
_root.sound.gotoAndPlay(2);
damage = Math.ceil(((Math.random() * weaponHigh[0]) + weaponLow[0]) + (stats_str + (base_str / 10)));
_root.enemyRO = _root.enemyRO + (((((damage + ":") + enemy.health) + "current ") + (enemy.health - damage)) + "<br>");
enemy.health = enemy.health - damage;
odometer = odometer + 1;
atk._x = -200;
atk._y = -200;
if (weaponarray == null) {
weaponLow = new Array();
weaponHigh = new Array();
weaponLow[0] = 1;
weaponHigh[0] = 5;
weaponarray = 1;
}
} else {
damage = "Miss!";
_root.enemyRO = _root.enemyRO + (((damage + ":") + enemy.health) + "<br>");
odometer = odometer + 1;
atk._x = -200;
atk._y = -200;
}
if (pointsnum == null) {
pointsnum = 1;
}
if (pointsnum >= 10) {
pointsnum = 1;
} else {
pointsnum++;
}
if (plhitRate >= 80) {
_root.damage_mc.duplicateMovieClip("damage_mc" + pointsnum, 500 + pointsnum);
if (_root["damage_mc" + pointsnum].lx == null) {
_root["damage_mc" + pointsnum]._x = enemy._x;
_root["damage_mc" + pointsnum]._y = enemy._y;
_root["damage_mc" + pointsnum].lx = 1;
}
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints" + pointsnum, 600 + pointsnum);
if (_root["nme_hitpoints" + pointsnum].lx == null) {
_root["nme_hitpoints" + pointsnum]._x = enemy._x;
_root["nme_hitpoints" + pointsnum]._y = enemy._y;
_root["nme_hitpoints" + pointsnum].lx = 1;
}
delete enemy.atk;
} else {
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints" + pointsnum, 600 + pointsnum);
if (_root["nme_hitpoints" + pointsnum].lx == null) {
_root["nme_hitpoints" + pointsnum]._x = enemy._x;
_root["nme_hitpoints" + pointsnum]._y = enemy._y;
_root["nme_hitpoints" + pointsnum].lx = 1;
}
}
if (enemy.health <= 0) {
_root.damage_end.duplicateMovieClip("damage_end" + pointsnum, 550 + pointsnum);
if (_root["damage_end" + pointsnum].lx == null) {
_root["damage_end" + pointsnum]._x = enemy._x;
_root["damage_end" + pointsnum]._y = enemy._y;
_root["damage_end" + pointsnum].lx = 1;
}
ItemSpawn();
value = 20;
if (level >= 99) {
stats_exp = tnl;
} else {
stats_exp = stats_exp + value;
}
chat(value + " Experience", 30, 5);
enemy._x = -100;
enemy._y = 240;
enemyitem = Math.ceil(Math.random() * 27);
enemydeath = 1;
enemy.health = 30;
}
}
plimit = 10;
_root["nme_hitpoints" + pointsnum].display = damage;
}
function game_map_exit() {
if (exit == 1) {
_root.exitfader.duplicateMovieClip("exitfader_mc1", 20000);
_root.exitfader_mc1.gotoAndPlay(2);
_root.exitfader_mc1._x = 0;
_root.exitfader_mc1._y = 0;
delete exit;
}
}
function game_map2(player, item, map, spd) {
if (player._y > 150) {
player._y = player._y - spd;
map._y = map._y - spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._y = _root["enemy" + map_move]._y - spd;
_root["item" + map_move]._y = _root["item" + map_move]._y - spd;
map_move++;
}
}
if (player._y < 100) {
player._y = player._y + spd;
map._y = map._y + spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._y = _root["enemy" + map_move]._y + spd;
_root["item" + map_move]._y = _root["item" + map_move]._y + spd;
map_move++;
}
}
if (player._x < 120) {
player._x = player._x + spd;
map._x = map._x + spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x + spd;
_root["item" + map_move]._x = _root["item" + map_move]._x + spd;
map_move++;
}
}
if (player._x > 130) {
player._x = player._x - spd;
map._x = map._x - spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x - spd;
_root["item" + map_move]._x = _root["item" + map_move]._x - spd;
map_move++;
}
}
if (map._x > -1.5) {
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._x = -215;
}
if (map._x < -216) {
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._x = -spd;
}
if (map._y < -1.5) {
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._y = 283.5;
}
if (map._y > 283.5) {
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._y = -1.5;
}
if (player._x > 240) {
player._x = 20;
mapnumx++;
mapset = (8 * mapnumx) + mapnumy;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x - 240;
_root["item" + map_move]._x = _root["item" + map_move]._x - 240;
map_move++;
}
}
if (player._x < 15) {
player._x = 235;
mapnumx--;
mapset = (8 * mapnumx) + mapnumy;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x + 240;
_root["item" + map_move]._x = _root["item" + map_move]._x + 240;
map_move++;
}
}
if (player._y < 0) {
mapnumy = mapnumy + 72;
mapset = (8 * mapnumx) + mapnumy;
player._y = 235;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._y = _root["enemy" + map_move]._y - 240;
_root["item" + map_move]._y = _root["item" + map_move]._y - 240;
map_move++;
}
}
if (player._y > 238) {
mapnumy = mapnumy - 72;
mapset = (8 * mapnumx) + mapnumy;
player._y = 5;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._y = _root["enemy" + map_move]._y + 240;
_root["item" + map_move]._y = _root["item" + map_move]._y - 240;
map_move++;
}
}
}
function game_map_dungeon(player, item, map, spd, spd2) {
function dungeonNPCLoad(strtx, strty) {
if (strtx == null) {
var npcLoadrem;
while (npcLoadrem < 2) {
removeMovieClip(_root["npc_" + npcLoadrem]);
npcLoadrem++;
}
} else if (dungeon_Npc_load == null) {
while (npcLoad < 2) {
_root.npc.duplicateMovieClip("npc_" + npcLoad, 40 + npcLoad);
_root.npc_1._x = 48 + strtx;
_root.npc_1._y = 24 + strty;
npcLoad++;
}
dungeon_Npc_load = 1;
}
}
function ItemSheet(strtx, strty) {
if (strtx == null) {
var rem;
while (rem < 7) {
removeMovieClip(_root["item" + rem]);
rem++;
}
} else if (itemload == null) {
while (sheet < 7) {
_root.item_.duplicateMovieClip("item" + sheet, 30 + sheet);
_root["item" + sheet].gotoAndStop(Math.ceil(Math.random() * 27));
_root.item1._x = 24 + strtx;
_root.item1._y = 24 + strty;
_root.item2._x = 48 + strtx;
_root.item2._y = 24 + strty;
_root.item3._x = 72 + strtx;
_root.item3._y = 24 + strty;
_root.item4._x = 24 + strtx;
_root.item4._y = 48 + strty;
_root.item5._x = 48 + strtx;
_root.item5._y = 48 + strty;
_root.item6._x = 72 + strtx;
_root.item6._y = 48 + strty;
sheet++;
}
itemload = 1;
}
}
if (dunmap == null) {
dun_Array_y = new Array();
dun_Array_y2 = new Array();
dun_Array_x = new Array();
dun_Array_x2 = new Array();
dun_Array_itemx = new Array();
dun_Array_itemy = new Array();
dun_Array_npcx = new Array();
dun_Array_npcy = new Array();
dun_visit = new Array();
dun_msg = new Array();
enem_ArrayX = new Array();
enem_ArrayY = new Array();
dun_Array_npcx[7] = 81;
dun_Array_npcy[7] = 60;
dun_Array_npcx[9] = 80;
dun_Array_npcy[9] = 60;
dun_msg[7] = "You found some items";
dun_msg[9] = "You found some items";
dun_msg[21] = "You found some items";
dun_msg[23] = "You found some items";
dun_msg[54] = "You found some items";
dun_msg[62] = "You found some items";
dun_Array_itemx[9] = 80;
dun_Array_itemy[9] = 100;
dun_Array_itemx[21] = 80;
dun_Array_itemy[21] = 100;
dun_Array_itemx[23] = 80;
dun_Array_itemy[23] = 100;
dun_Array_itemx[54] = 80;
dun_Array_itemy[54] = 100;
dun_Array_itemx[62] = 80;
dun_Array_itemy[62] = 100;
dun_Array_y[7] = 0;
dun_Array_y[9] = 0;
dun_Array_y[14] = 60;
dun_Array_y[15] = 0;
dun_Array_y[16] = 60;
dun_Array_y[17] = 0;
dun_Array_y[18] = 0;
dun_Array_y[19] = 0;
dun_Array_y[20] = 0;
dun_Array_y[21] = 10;
dun_Array_y[23] = 10;
dun_Array_y[27] = 10;
dun_Array_y[34] = 10;
dun_Array_y[41] = 10;
dun_Array_y[46] = 10;
dun_Array_y[47] = 10;
dun_Array_y[48] = 10;
dun_Array_y[53] = 10;
dun_Array_y[54] = 10;
dun_Array_y[55] = -20;
dun_Array_y[62] = 10;
dun_Array_y[69] = 10;
dun_Array_y[76] = 10;
dun_Array_y2[7] = 238;
dun_Array_y2[9] = 238;
dun_Array_y2[14] = 210;
dun_Array_y2[15] = 210;
dun_Array_y2[16] = 210;
dun_Array_y2[17] = 238;
dun_Array_y2[18] = 238;
dun_Array_y2[19] = 238;
dun_Array_y2[20] = 238;
dun_Array_y2[21] = 240;
dun_Array_y2[23] = 210;
dun_Array_y2[27] = 240;
dun_Array_y2[34] = 238;
dun_Array_y2[41] = 210;
dun_Array_y2[46] = 215;
dun_Array_y2[47] = 238;
dun_Array_y2[48] = 240;
dun_Array_y2[53] = 238;
dun_Array_y2[54] = 238;
dun_Array_y2[55] = 238;
dun_Array_y2[62] = 238;
dun_Array_y2[69] = 200;
dun_Array_y2[76] = 240;
dun_Array_x[7] = 10;
dun_Array_x[9] = 10;
dun_Array_x[14] = 10;
dun_Array_x[15] = 15;
dun_Array_x[16] = 15;
dun_Array_x[17] = 15;
dun_Array_x[18] = 15;
dun_Array_x[19] = 15;
dun_Array_x[20] = 15;
dun_Array_x[21] = 0;
dun_Array_x[23] = 0;
dun_Array_x[27] = 0;
dun_Array_x[34] = 0;
dun_Array_x[41] = 0;
dun_Array_x[46] = 0;
dun_Array_x[47] = 10;
dun_Array_x[48] = 10;
dun_Array_x[53] = 0;
dun_Array_x[54] = 10;
dun_Array_x[55] = 0;
dun_Array_x[62] = 0;
dun_Array_x[69] = 0;
dun_Array_x[76] = 0;
dun_Array_x2[7] = 210;
dun_Array_x2[9] = 210;
dun_Array_x2[14] = 210;
dun_Array_x2[15] = 210;
dun_Array_x2[16] = 210;
dun_Array_x2[17] = 240;
dun_Array_x2[18] = 210;
dun_Array_x2[19] = 210;
dun_Array_x2[20] = 240;
dun_Array_x2[21] = 240;
dun_Array_x2[23] = 240;
dun_Array_x2[27] = 240;
dun_Array_x2[34] = 240;
dun_Array_x2[41] = 240;
dun_Array_x2[46] = 210;
dun_Array_x2[47] = 210;
dun_Array_x2[48] = 240;
dun_Array_x2[53] = 240;
dun_Array_x2[54] = 210;
dun_Array_x2[55] = 245;
dun_Array_x2[62] = 240;
dun_Array_x2[69] = 240;
dun_Array_x2[76] = 240;
enem_ArrayX[7] = -999;
enem_ArrayY[7] = -999;
enem_ArrayX[9] = -999;
enem_ArrayY[9] = -999;
enem_ArrayX[14] = -999;
enem_ArrayY[14] = -999;
enem_ArrayX[15] = 100;
enem_ArrayY[15] = 100;
enem_ArrayX[16] = 100;
enem_ArrayY[16] = 100;
enem_ArrayX[17] = 100;
enem_ArrayY[17] = 100;
enem_ArrayX[18] = 74;
enem_ArrayY[18] = 77;
enem_ArrayX[19] = -999;
enem_ArrayY[19] = -999;
enem_ArrayX[21] = -999;
enem_ArrayY[21] = -999;
enem_ArrayX[23] = -999;
enem_ArrayY[23] = -999;
enem_ArrayX[41] = -999;
enem_ArrayY[41] = -999;
enem_ArrayX[48] = -999;
enem_ArrayY[48] = -999;
enem_ArrayX[54] = -999;
enem_ArrayY[54] = -999;
enem_ArrayX[62] = -999;
enem_ArrayY[62] = -999;
enem_ArrayX[20] = 120;
enem_ArrayY[20] = 120;
enem_ArrayX[27] = -999;
enem_ArrayY[27] = -999;
enem_ArrayX[48] = 120;
enem_ArrayY[48] = 120;
enem_ArrayX[47] = 120;
enem_ArrayY[47] = 120;
enem_ArrayX[46] = 120;
enem_ArrayY[46] = 120;
enem_ArrayX[53] = 120;
enem_ArrayY[53] = 120;
enem_ArrayX[55] = 120;
enem_ArrayY[55] = 120;
enem_ArrayX[69] = 120;
enem_ArrayY[69] = 120;
enem_ArrayX[76] = 120;
enem_ArrayY[76] = 120;
enem_ArrayX[34] = 120;
enem_ArrayY[34] = 120;
dun_Array = new Array();
map.gotoAndStop(7);
dunmap = 1;
col = 0;
}
var enemyht = 1;
while (enemyht < 5) {
if (map.hb.hitTest(["enemy" + enemyht]._x - 5, _root["enemy" + enemyht]._y, true)) {
root["enemy" + enemyht] = root["enemy" + enemyht] + spd2;
}
if (map.hb.hitTest(_root["enemy" + enemyht]._x - 5, _root["enemy" + enemyht]._y, true)) {
_root["enemy" + enemyht]._x = _root["enemy" + enemyht]._x + spd2;
}
if (map.hb.hitTest(_root["enemy" + enemyht]._x + 5, _root["enemy" + enemyht]._y, true)) {
_root["enemy" + enemyht]._x = _root["enemy" + enemyht]._x - spd2;
}
if (map.hb.hitTest(_root["enemy" + enemyht]._x, _root["enemy" + enemyht]._y - 5, true)) {
_root["enemy" + enemyht]._y = _root["enemy" + enemyht]._y + spd2;
}
if (map.hb.hitTest(_root["enemy" + enemyht]._x, _root["enemy" + enemyht]._y + 5, true)) {
_root["enemy" + enemyht]._y = _root["enemy" + enemyht]._y - spd2;
}
enemyht++;
}
if (map.hb.hitTest(player._x - 5, player._y, true)) {
player._x = player._x + spd;
}
if (map.hb.hitTest(player._x + 5, player._y, true)) {
player._x = player._x - spd;
}
if (map.hb.hitTest(player._x, player._y - 5, true)) {
player._y = player._y + spd;
}
if (map.hb.hitTest(player._x, player._y + 5, true)) {
player._y = player._y - spd;
}
if (player._x == null) {
} else {
if (lx == null) {
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = -999;
_root["enemy" + lay]._y = -999;
lay++;
}
map.gotoAndStop(7);
lx = 1;
}
readout = (dunmap * row) + col;
row = 7;
if (player._x > dun_Array_x2[(dunmap * row) + col]) {
if (dun_visit[(dunmap * row) + col] == 1) {
encounter = Math.ceil(Math.random() * 10);
enem_ArrayX[(dunmap * row) + col] = -999;
enem_ArrayY[(dunmap * row) + col] = -999;
while (sheetc < 7) {
_root["item" + sheetc]._x = -999;
_root["item" + sheetc]._y = -999;
sheetc++;
}
}
trace("addcol");
col++;
player._x = dun_Array_x[(dunmap * row) + col];
if (dun_visit[(dunmap * row) + col] == null) {
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[(dunmap * row) + col] + (20 * lay);
_root["enemy" + lay]._y = enem_ArrayY[(dunmap * row) + col] + (20 * lay);
lay++;
}
ItemSheet(dun_Array_itemx[(dunmap * row) + col], dun_Array_itemy[(dunmap * row) + col]);
delete itemload;
delete sheet;
delete sheetc;
if (dun_msg[(dunmap * row) + col] == null) {
} else {
chat(dun_msg[(dunmap * row) + col], 30, 5);
}
dun_visit[(dunmap * row) + col] = 1;
}
dungeonNPCLoad(dun_Array_npcx[(dunmap * row) + col], dun_Array_npcy[(dunmap * row) + col]);
delete npcLoad;
delete dungeon_Npc_load;
delete npcLoadrem;
map.gotoAndStop((dunmap * row) + col);
}
if (player._x < dun_Array_x[(dunmap * row) + col]) {
if (dun_visit[(dunmap * row) + col] == 1) {
encounter = Math.ceil(Math.random() * 10);
enem_ArrayX[(dunmap * row) + col] = -999;
enem_ArrayY[(dunmap * row) + col] = -999;
while (sheetc < 7) {
_root["item" + sheetc]._x = -999;
_root["item" + sheetc]._y = -999;
sheetc++;
}
}
trace("remcol");
col--;
player._x = dun_Array_x2[(dunmap * row) + col];
if (dun_visit[(dunmap * row) + col] == null) {
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[(dunmap * row) + col] + (10 * lay);
_root["enemy" + lay]._y = enem_ArrayY[(dunmap * row) + col] + (10 * lay);
lay++;
}
ItemSheet(dun_Array_itemx[(dunmap * row) + col], dun_Array_itemy[(dunmap * row) + col]);
delete itemload;
delete sheet;
delete sheetc;
if (dun_msg[(dunmap * row) + col] == null) {
} else {
chat(dun_msg[(dunmap * row) + col], 30, 5);
}
dun_visit[(dunmap * row) + col] = 1;
}
delete npcLoadrem;
delete npcLoad;
dungeonNPCLoad(dun_Array_npcx[(dunmap * row) + col], dun_Array_npcy[(dunmap * row) + col]);
delete dungeon_Npc_load;
map.gotoAndStop((dunmap * row) + col);
}
if (player._y < dun_Array_y[(dunmap * row) + col]) {
if (dun_visit[(dunmap * row) + col] == 1) {
encounter = Math.ceil(Math.random() * 10);
enem_ArrayX[(dunmap * row) + col] = -999;
enem_ArrayY[(dunmap * row) + col] = -999;
while (sheetc < 7) {
_root["item" + sheetc]._x = -999;
_root["item" + sheetc]._y = -999;
sheetc++;
}
}
trace("pullrow");
dunmap = dunmap - 1;
player._y = dun_Array_y2[(dunmap * row) + col];
if (dun_visit[(dunmap * row) + col] == null) {
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[(dunmap * row) + col] + (10 * lay);
_root["enemy" + lay]._y = enem_ArrayY[(dunmap * row) + col] + (10 * lay);
lay++;
}
ItemSheet(dun_Array_itemx[(dunmap * row) + col], dun_Array_itemy[(dunmap * row) + col]);
delete itemload;
delete sheet;
delete sheetc;
if (dun_msg[(dunmap * row) + col] == null) {
} else {
chat(dun_msg[(dunmap * row) + col], 30, 5);
}
dun_visit[(dunmap * row) + col] = 1;
}
dungeonNPCLoad(dun_Array_npcx[(dunmap * row) + col], dun_Array_npcy[(dunmap * row) + col]);
delete npcLoadrem;
delete dungeon_Npc_load;
delete npcLoad;
map.gotoAndStop((dunmap * row) + col);
}
if (player._y > dun_Array_y2[(dunmap * row) + col]) {
if (dun_visit[(dunmap * row) + col] == 1) {
enem_ArrayX[(dunmap * row) + col] = -999;
enem_ArrayY[(dunmap * row) + col] = -999;
while (sheetc < 7) {
_root["item" + sheetc]._x = -999;
_root["item" + sheetc]._y = -999;
sheetc++;
}
}
trace("addrow");
dunmap = dunmap + 1;
player._y = dun_Array_y[(dunmap * row) + col];
if (dun_visit[(dunmap * row) + col] == null) {
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[(dunmap * row) + col] + (10 * lay);
_root["enemy" + lay]._y = enem_ArrayY[(dunmap * row) + col] + (10 * lay);
lay++;
}
ItemSheet(dun_Array_itemx[(dunmap * row) + col], dun_Array_itemy[(dunmap * row) + col]);
delete itemload;
delete sheet;
delete sheetc;
if (dun_msg[(dunmap * row) + col] == null) {
} else {
chat(dun_msg[(dunmap * row) + col], 30, 5);
}
dun_visit[(dunmap * row) + col] = 1;
}
delete npcLoadrem;
dungeonNPCLoad(dun_Array_npcx[(dunmap * row) + col], dun_Array_npcy[(dunmap * row) + col]);
delete dungeon_Npc_load;
delete npcLoad;
map.gotoAndStop((dunmap * row) + col);
}
}
}
function game_map_castle(player, item, map, spd) {
if (((((map.a.hb.hitTest(player._x - 5, player._y, true) || (map.b.hb.hitTest(player._x - 5, player._y, true))) || (map.c.hb.hitTest(player._x - 5, player._y, true))) || (map.d.hb.hitTest(player._x - 5, player._y, true))) || (map.e.hb.hitTest(player._x - 5, player._y, true))) || (map.f.hb.hitTest(player._x - 5, player._y, true))) {
trace("hw");
player._x = player._x + spd;
}
if (((((map.a.hb.hitTest(player._x + 5, player._y, true) || (map.b.hb.hitTest(player._x + 5, player._y, true))) || (map.c.hb.hitTest(player._x + 5, player._y, true))) || (map.d.hb.hitTest(player._x + 5, player._y, true))) || (map.e.hb.hitTest(player._x + 5, player._y, true))) || (map.f.hb.hitTest(player._x + 5, player._y, true))) {
player._x = player._x - spd;
}
if (((((map.a.hb.hitTest(player._x, player._y - 5, true) || (map.b.hb.hitTest(player._x, player._y - 5, true))) || (map.c.hb.hitTest(player._x, player._y - 5, true))) || (map.d.hb.hitTest(player._x, player._y - 5, true))) || (map.e.hb.hitTest(player._x, player._y - 5, true))) || (map.f.hb.hitTest(player._x, player._y - 5, true))) {
player._y = player._y + spd;
}
if (((((map.a.hb.hitTest(player._x, player._y + 5, true) || (map.b.hb.hitTest(player._x, player._y + 5, true))) || (map.c.hb.hitTest(player._x, player._y + 5, true))) || (map.d.hb.hitTest(player._x, player._y + 5, true))) || (map.e.hb.hitTest(player._x, player._y + 5, true))) || (map.f.hb.hitTest(player._x, player._y + 5, true))) {
player._y = player._y - spd;
}
if (movex == null) {
_root.mapset = 16;
movec = 7;
movey = 1;
movex = 1;
movexLimit = 3;
moveyLimit = 2;
mapnumx = 2;
mapnumy = 0;
}
if (player._y > 150) {
if (movey < moveyLimit) {
player._y = player._y - spd;
map._y = map._y - spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._y = _root["enemy" + map_move]._y - spd;
_root["item" + map_move]._y = _root["item" + map_move]._y - spd;
map_move++;
}
}
}
if (player._y < 100) {
if (movey > 0) {
player._y = player._y + spd;
map._y = map._y + spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._y = _root["enemy" + map_move]._y + spd;
_root["item" + map_move]._y = _root["item" + map_move]._y + spd;
map_move++;
}
}
}
if (player._x < 120) {
if (movex > 0) {
player._x = player._x + spd;
map._x = map._x + spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x + spd;
_root["item" + map_move]._x = _root["item" + map_move]._x + spd;
map_move++;
}
}
}
if (player._x > 130) {
if (movex < movexLimit) {
player._x = player._x - spd;
map._x = map._x - spd;
var map_move = 1;
while (map_move < 11) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x - spd;
_root["item" + map_move]._x = _root["item" + map_move]._x - spd;
map_move++;
}
}
}
if (map._x > -1.5) {
movex--;
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._x = -215;
}
if (map._x < -216) {
movex++;
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._x = -spd;
}
if (map._y < -1.5) {
movey++;
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._y = 283.5;
}
if (map._y > 283.5) {
movey--;
map.a.gotoAndStop(((movey * (movec + 1)) + movex) - 1);
map.b.gotoAndStop((movey * (movec + 1)) + movex);
map.c.gotoAndStop(((movey * (movec + 1)) + movex) + 1);
map.d.gotoAndStop((((movey + 1) * (movec + 1)) + movex) - 1);
map.e.gotoAndStop(((movey + 1) * (movec + 1)) + movex);
map.f.gotoAndStop((((movey + 1) * (movec + 1)) + movex) + 1);
map._y = -1.5;
}
if (player._x > 240) {
player._x = 20;
movex = movex - 2;
mapnumx++;
mapset = (8 * mapnumx) + mapnumy;
var map_move = 1;
while (map_move < 10) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x - 240;
map_move++;
}
}
if (player._x < 15) {
player._x = 235;
movex = movex + 2;
mapnumx--;
mapset = (8 * mapnumx) + mapnumy;
var map_move = 1;
while (map_move < 10) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x - 240;
map_move++;
}
}
if (player._y < 0) {
mapnumy = mapnumy + 72;
mapset = (8 * mapnumx) + mapnumy;
player._y = 235;
movey++;
var map_move = 1;
while (map_move < 10) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x - 240;
map_move++;
}
}
if (player._y > 238) {
mapnumy = mapnumy - 72;
mapset = (8 * mapnumx) + mapnumy;
player._y = 5;
movey--;
var map_move = 1;
while (map_move < 10) {
_root["enemy" + map_move]._x = _root["enemy" + map_move]._x - 240;
map_move++;
}
}
}
function game_class() {
if (class == null) {
class = 2;
}
if (class == 1) {
if (hlthx == null) {
manax = 26;
hlthx = 66;
}
classoutput = "Rogue";
base_dex = 10;
base_str = 50;
base_agi = 10;
}
if (class == 2) {
if (hlthx == null) {
manax = 14;
hlthx = 135;
}
classoutput = "Warrior";
base_dex = 20;
base_str = 200;
base_agi = 6;
}
if (class == 3) {
if (hlthx == null) {
manax = 58;
hlthx = 47;
}
classoutput = "Poet";
base_dex = 20;
base_str = 10;
base_agi = 25;
}
if (class == 4) {
if (hlthx == null) {
manax = 58;
hlthx = 47;
}
classoutput = "Mage";
base_dex = 10;
base_str = 1;
base_agi = 25;
}
}
function game_level(player) {
if (stats_agi == null) {
stats_agi = 24;
}
if (level >= 99) {
tnl = 299582916 /* 0x11DB45C4 */;
}
tnl = Math.ceil(125 * level);
if (tnl == null) {
level = 0;
stats_exp = 0;
tnl = 2995830 /* 0x2DB676 */;
}
if ((stats_exp >= tnl) && (level < 99)) {
if (lvlup >= 10) {
lvlup = 1;
}
lvlup++;
trace(_root["levelup_mc" + lvlup]._name);
_root.levelup_mc.duplicateMovieClip("levelup_mc" + lvlup, 900 + lvlup);
if (_root["levelup_mc" + lvlup].lx == null) {
_root["levelup_mc" + lvlup]._x = player._x;
_root["levelup_mc" + lvlup]._y = player._y;
_root["levelup_mc" + lvlup].gotoAndPlay(2);
_root["levelup_mc" + lvlup].lx = 1;
}
if (class == 1) {
stats_mana = stats_mana + 26;
stats_health = stats_health + 66;
}
if (class == 2) {
stats_mana = stats_mana + 14;
stats_health = stats_health + 135;
}
if (class == 3) {
stats_mana = stats_mana + 58;
stats_health = stats_health + 47;
}
if (class == 4) {
stats_mana = stats_mana + 58;
stats_health = stats_health + 47;
}
player_health = stats_health;
player_mana = stats_mana;
level++;
levelmax = 9;
levelreadout = "LvL:" + level;
chat("You've gained an insight", 30, 5);
if (stats_agi_full < 3) {
} else {
stats_agi = stats_agi - 0.242424242424242;
}
stats_str = stats_str + Math.ceil(5 / levelmax);
stats_dex = stats_dex + Math.ceil(5 / levelmax);
input_agi = input_agi + 1;
delete stats_exp;
delete stats_ro_exp;
}
}
function game_stats() {
if (player_health == null) {
stats_health = hlthx;
stats_mana = manax;
player_health = stats_health;
player_mana = stats_mana;
stats_str = 5;
stats_dex = 5;
input_agi = 5;
}
agi_readout = stats_agi / 10;
}
function game_spells() {
}
function game_player(obj, spd, auto, aspd, atk) {
attack(obj, auto, aspd, atk);
move(obj, spd);
}
function animate(obj, vrb) {
obj.gotoAndStop(vrb);
}
function attack(obj, auto, aspd, atk) {
if (Key.isDown(65) || (Key.isDown(32))) {
if (auto == null) {
if (input == null) {
if (obj._currentframe > 10) {
obj.gotoAndStop(obj._currentframe - 5);
obj.gotoAndStop(obj._currentframe + 5);
} else {
obj.gotoAndStop(obj._currentframe + 5);
}
input = 1;
}
} else {
if (atimer < aspd) {
atimer++;
}
if (atimer >= aspd) {
if (input == null) {
atk._x = obj._x;
atk._y = obj._y;
if (obj._currentframe > 5) {
if (obj._currentframe > 10) {
obj.gotoAndStop(obj._currentframe - 5);
obj.gotoAndStop(obj._currentframe + 5);
} else {
obj.gotoAndStop(obj._currentframe + 5);
}
}
input = 1;
}
delete atimer;
delete input;
}
}
} else {
delete input;
delete atimer;
atk._x = -200;
atk._y = -200;
}
}
function move(obj, spd) {
if ((((!Key.isDown(38)) && (!Key.isDown(40))) && (!Key.isDown(37))) && (!Key.isDown(39))) {
if (obj.anim_stop == null) {
animate(obj, obj._currentframe + 5);
obj.anim_stop = 1;
}
}
if (Key.isDown(38) && (Key.isDown(37))) {
obj._xscale = 100;
obj._x = obj._x - spd;
obj._y = obj._y - spd;
animate(obj, 4);
delete obj.anim_stop;
} else if (Key.isDown(38) && (Key.isDown(39))) {
obj._xscale = -100;
obj._y = obj._y - spd;
obj._x = obj._x + spd;
animate(obj, 4);
delete obj.anim_stop;
} else if (Key.isDown(40) && (Key.isDown(39))) {
obj._xscale = -100;
obj._y = obj._y + spd;
obj._x = obj._x + spd;
animate(obj, 2);
delete obj.anim_stop;
} else if (Key.isDown(40) && (Key.isDown(37))) {
obj._xscale = 100;
obj._y = obj._y + spd;
obj._x = obj._x - spd;
animate(obj, 2);
delete obj.anim_stop;
} else {
if (Key.isDown(38)) {
obj._y = obj._y - spd;
Animate(obj, 5);
delete obj.anim_stop;
}
if (Key.isDown(40)) {
obj._y = obj._y + spd;
animate(obj, 1);
delete obj.anim_stop;
}
if (Key.isDown(37)) {
animate(obj, 3);
obj._x = obj._x - spd;
obj._xscale = 100;
delete obj.anim_stop;
}
if (Key.isDown(39)) {
animate(obj, 3);
obj._x = obj._x + spd;
obj._xscale = -100;
delete obj.anim_stop;
}
}
}
function dungeon_start(map, bgm) {
if (enemNum == null) {
enemNum = 1;
}
while (enemNum < enemy_spawn) {
_root.enemy.duplicateMovieClip("enemy" + enemNum, 250 + enemNum);
_root["enemy" + enemNum]._visible = true;
_root["enemy" + enemNum]._x = 20 * enemNum;
_root["enemy" + enemNum]._y = 200;
enemNum++;
}
_root.char.duplicateMovieClip("char1", 200);
_root.char1._visible = true;
_root.char1._x = 109;
_root.char1._y = 100;
_root.charatk.duplicateMovieClip("char_atk1", 400);
_root.char_atk1._visible = true;
_root.char_atk1._visible = true;
_root.dun_map.duplicateMovieClip("dun_map" + map, 10);
_root["dun_map" + map]._visible = true;
_root["dun_map" + map]._x = 0;
_root["dun_map" + map]._y = 0;
_root.fader.duplicateMovieClip("fader_mc1", 20000);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
_root.hud_mc.duplicateMovieClip("hud_mc1", 13000);
_root.hud_mc1._visible = true;
_root.hud_mc1._x = 0;
_root.hud_mc1._y = 0;
_root.soundbgm.duplicateMovieClip("soundbgm1", 102);
_root.soundbgm1.gotoAndStop(bgm);
_root.debug_mc.duplicateMovieClip("debug_mc11", 9000);
_root.debug_mc11._visible = true;
_root.debug_mc11._x = 0;
_root.debug_mc11._y = 0;
}
function game_start(map, bgm) {
if (enemNum == null) {
enemNum = 1;
}
while (enemNum < enemy_spawn) {
_root.enemy.duplicateMovieClip("enemy" + enemNum, 250 + enemNum);
_root["enemy" + enemNum]._visible = true;
_root["enemy" + enemNum]._x = Math.ceil(Math.random() * 240);
_root["enemy" + enemNum]._y = -200;
enemNum++;
}
_root.char.duplicateMovieClip("char1", 200);
_root.char1._visible = true;
_root.char1._x = 109;
_root.char1._y = 50;
_root.charatk.duplicateMovieClip("char_atk1", 400);
_root.char_atk1._visible = true;
_root.char_atk1._visible = true;
_root.map_mc.duplicateMovieClip("map_mc" + map, 10);
_root["map_mc" + map]._visible = true;
_root.fader.duplicateMovieClip("fader_mc1", 20000);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
_root.hud_mc.duplicateMovieClip("hud_mc1", 13000);
_root.hud_mc1._visible = true;
_root.hud_mc1._x = 0;
_root.hud_mc1._y = 0;
_root.soundbgm.duplicateMovieClip("soundbgm1", 102);
_root.soundbgm1.gotoAndStop(bgm);
_root.debug_mc.duplicateMovieClip("debug_mc11", 9000);
_root.debug_mc11._visible = true;
_root.debug_mc11._x = 0;
_root.debug_mc11._y = 0;
}
function game_gui() {
stats_exp_output = (stats_exp + "/") + tnl;
stat_readout = ((((("STR [" + stats_str) + "]AGI [") + (stats_agi_cover + base_agi)) + "]DEX [") + stats_dex) + "]";
if (stats_exp == null) {
stats_exp = 0;
}
}
function screen(mc, words) {
_root.titlescreen.duplicateMovieClip(mc, 1000);
_root[mc].gotoAndStop(2);
_root[mc]._x = 120;
_root[mc]._y = 120;
_root[mc].words = words;
}
_root.onLoad = function () {
_global.program = 1;
_root.char._visible = false;
_root.charatk._visible = false;
_root.enemy._visible = false;
_root.hud_mc._visible = false;
_root.map_mc._visible = false;
_root.full_titlescreen._visible = false;
_root.levelup_mc._visible = false;
_root.debug_mc._visible = false;
_root.damage_end._visible = false;
_root.damage_mc._visible = false;
_root.plyr_dam_mc._visible = false;
_root.npc._visible = false;
_root.purge_effect_mc._visible = false;
_root._quality = "low";
};
_root.onKeyDown = function () {
Inventory(49, 50, 51, 52, 53, 68);
};
_root.onEnterFrame = function () {
if (Key.isDown(79)) {
if (o_input == null) {
if (_root.shield >= 14) {
delete _root.shield;
} else {
_root.shield++;
}
o_input = 1;
}
} else {
delete o_input;
}
if (Key.isDown(13)) {
if (_global.program >= 11) {
_global.program = 1;
}
if (d_input == null) {
_global.program++;
delete scene_load;
d_input = 1;
}
} else {
delete d_input;
}
if (_global.program == 1) {
delete _global.titleinstance;
vrb = "title_screen";
if (scene_load == null) {
_root.full_titlescreen.duplicateMovieClip("full_titlescreen1", 2000);
_root.full_titlescreen1._x = 120;
_root.full_titlescreen1._y = 120;
screen(vrb, "[TITLE]");
scene_load = 1;
}
if (_root.full_titlescreen1._currentframe == 1) {
_root.full_titlescreen1.play();
}
} else if (_global.titleinstance == null) {
removeMovieClip(_root.full_titlescreen1);
_global.titleinstance = 1;
}
if (_global.program == 2) {
vrb = "options_screen";
if (scene_load == null) {
screen(vrb, "[OPTIONS]");
scene_load = 1;
}
}
if (_global.program == 3) {
delete _global.dungeoninstance1;
removeMovieClip(_root[vrb]);
enemy_spawn = 5;
game_music();
game_soundEffect();
if (npc_menu == 1) {
} else {
game_items_dungeon(_root.char1, _root.item2);
game_npc();
game_map_exit();
game_gui();
game_class();
game_level(_root.char1);
game_stats();
game_spell();
game_player(_root.char1, 3.8, 1, stats_agi_full, _root.char_atk1);
}
var map_move = 1;
while (map_move < 11) {
if (player_health <= 0) {
} else {
game_map_dungeon(_root.char1, _root["item" + map_move], _root.dun_map1, 3.8, 2.4);
}
map_move++;
}
var enemAi = 1;
while (enemAi < enemy_spawn) {
game_enemy(_root["enemy" + enemAi], 2.4, 1, 40, _root.char1, 1);
game_hitDetect_dungeon(_root.char1, _root.char_atk1, _root["enemy" + enemAi], _root.npc_1);
game_depth(_root["enemy" + enemAi], _root.char1);
enemAi++;
}
if (scene_load == null) {
dungeon_start(1, 4);
scene_load = 1;
}
} else if (_global.dungeoninstance1 == null) {
removeMovieClip(_root.char1);
while (enemRemove < 11) {
removeMovieClip(_root["enemy" + enemRemove]);
removeMovieClip(_root["nme_hitpoints" + enemRemove]);
removeMovieClip(_root["damage_mc" + enemRemove]);
removeMovieClip(_root["player_hitpoints" + enemRemove]);
removeMovieClip(_root["plyr_dam_mc" + enemRemove]);
removeMovieClip(_root["damage_end_pl" + enemRemove]);
removeMovieClip(_root["damage_end" + enemRemove]);
enemRemove++;
}
removeMovieClip(_root.hud_mc1);
delete enemNum;
delete enemRemove;
delete stats_health;
delete stats_mana;
delete stats_exp;
delete stats_str;
delete stats_agi;
delete stats_dex;
delete input_agi;
delete player_health;
delete player_mana;
delete tnl;
delete level;
delete stats_agi_cover;
delete userLog;
removeMovieClip(_root.dun_map1);
delete movex;
delete movec;
delete movey;
delete movexLimit;
delete moveyLimit;
delete mapnumx;
delete mapnumy;
delete mapset;
removeMovieClip(_root.soundbgm1);
stopAllSounds();
delete itemArray;
_global.dungeoninstance1 = 1;
}
if (_global.program == 5) {
delete _global.gameinstance1;
removeMovieClip(_root[vrb]);
enemy_spawn = 4;
game_music();
game_soundEffect();
if (player_health <= 0) {
} else {
game_map_castle(_root.char1, _root["item" + map_move], _root.map_mc1, 3.8);
}
game_items_castle(_root.char1, _root["item" + map_move], 27);
game_npc();
game_map_exit();
game_gui();
game_class();
game_level(_root.char1);
game_stats();
game_spell();
game_player(_root.char1, 3.8, 1, stats_agi_full, _root.char_atk1);
var enemAi = 1;
while (enemAi < enemy_spawn) {
game_enemy_castle(_root["enemy" + enemAi], 2.4, 1, 40, _root.char1, _root.char_atk1);
game_hitDetect_castle(_root.char1, _root.char_atk1, _root["enemy" + enemAi], _root.char_atk1);
game_depth(_root["enemy" + enemAi], _root.char1);
enemAi++;
}
if (scene_load == null) {
game_start(1, 2);
scene_load = 1;
}
} else if (_global.gameinstance1 == null) {
removeMovieClip(_root.char1);
while (enemRemove < 11) {
removeMovieClip(_root["enemy" + enemRemove]);
removeMovieClip(_root["nme_hitpoints" + enemRemove]);
removeMovieClip(_root["damage_mc" + enemRemove]);
removeMovieClip(_root["player_hitpoints" + enemRemove]);
removeMovieClip(_root["plyr_dam_mc" + enemRemove]);
removeMovieClip(_root["damage_end_pl" + enemRemove]);
removeMovieClip(_root["damage_end" + enemRemove]);
enemRemove++;
}
removeMovieClip(_root.hud_mc1);
delete enemNum;
delete enemRemove;
delete stats_health;
delete stats_mana;
delete stats_exp;
delete stats_str;
delete stats_agi;
delete stats_dex;
delete input_agi;
delete player_health;
delete player_mana;
delete tnl;
delete level;
delete stats_agi_cover;
delete userLog;
removeMovieClip(_root.map_mc1);
delete movex;
delete movec;
delete movey;
delete movexLimit;
delete moveyLimit;
delete mapnumx;
delete mapnumy;
delete mapset;
removeMovieClip(_root.soundbgm1);
stopAllSounds();
delete itemArray;
_global.gameinstance1 = 1;
}
if (_global.program == 6) {
delete _global.gameinstance2;
removeMovieClip(_root[vrb]);
enemy_spawn = 7;
game_music();
game_soundEffect();
if (player_health <= 0) {
} else {
game_map2(_root.char1, _root.item2, _root.map_mc2, 3.8);
}
game_items(_root.char1, _root.item2);
game_gui();
game_class();
game_level(_root.char1);
game_stats();
game_spell();
game_player(_root.char1, 3.8, 1, stats_agi_full, _root.char_atk1);
var enemAi = 1;
while (enemAi < enemy_spawn) {
game_enemy(_root["enemy" + enemAi], 2.4, 1, 40, _root.char1, 1);
game_hitDetect(_root.char1, _root.char_atk1, _root["enemy" + enemAi]);
game_depth(_root["enemy" + enemAi], _root.char1);
enemAi++;
}
if (scene_load == null) {
game_start(2, 3);
scene_load = 1;
}
} else if (_global.gameinstance2 == null) {
removeMovieClip(_root.char1);
while (enemRemove < 11) {
removeMovieClip(_root["enemy" + enemRemove]);
removeMovieClip(_root["nme_hitpoints" + enemRemove]);
removeMovieClip(_root["damage_mc" + enemRemove]);
removeMovieClip(_root["player_hitpoints" + enemRemove]);
removeMovieClip(_root["plyr_dam_mc" + enemRemove]);
removeMovieClip(_root["damage_end_pl" + enemRemove]);
removeMovieClip(_root["damage_end" + enemRemove]);
enemRemove++;
}
removeMovieClip(_root.hud_mc1);
delete enemNum;
delete enemRemove;
delete stats_health;
delete stats_mana;
delete stats_exp;
delete stats_str;
delete stats_agi;
delete stats_dex;
delete input_agi;
delete player_health;
delete player_mana;
delete tnl;
delete level;
delete stats_agi_cover;
delete userLog;
removeMovieClip(_root.map_mc2);
delete movex;
delete movec;
delete movey;
delete movexLimit;
delete moveyLimit;
delete mapnumx;
delete mapnumy;
delete mapset;
removeMovieClip(_root.soundbgm1);
stopAllSounds();
delete itemArray;
_global.gameinstance2 = 1;
}
if (_global.program == 7) {
delete _global.gameinstance3;
removeMovieClip(_root[vrb]);
enemy_spawn = 7;
game_music();
game_soundEffect();
var map_move = 1;
while (map_move < 11) {
if (player_health <= 0) {
} else {
game_map2(_root.char1, _root["item" + map_move], _root.map_mc3, 3.8);
}
game_items(_root.char1, _root["item" + map_move]);
map_move++;
}
game_gui();
game_class();
game_level(_root.char1);
game_stats();
game_spell();
game_player(_root.char1, 3.8, 1, stats_agi_full, _root.char_atk1);
var enemAi = 1;
while (enemAi < enemy_spawn) {
game_enemy(_root["enemy" + enemAi], 2.4, 1, 40, _root.char1, 1);
game_hitDetect(_root.char1, _root.char_atk1, _root["enemy" + enemAi]);
enemAi++;
}
if (scene_load == null) {
game_start(3, 4);
scene_load = 1;
}
} else if (_global.gameinstance3 == null) {
removeMovieClip(_root.char1);
while (enemRemove < 11) {
removeMovieClip(_root["enemy" + enemRemove]);
removeMovieClip(_root["nme_hitpoints" + enemRemove]);
removeMovieClip(_root["damage_mc" + enemRemove]);
removeMovieClip(_root["player_hitpoints" + enemRemove]);
removeMovieClip(_root["plyr_dam_mc" + enemRemove]);
removeMovieClip(_root["damage_end_pl" + enemRemove]);
removeMovieClip(_root["damage_end" + enemRemove]);
enemRemove++;
}
removeMovieClip(_root.hud_mc1);
delete enemNum;
delete enemRemove;
delete stats_health;
delete stats_mana;
delete stats_exp;
delete stats_str;
delete starts_agi;
delete stats_dex;
delete input_agi;
delete player_health;
delete player_mana;
delete tnl;
delete level;
delete stats_agi_cover;
delete userLog;
removeMovieClip(_root.map_mc3);
delete movex;
delete movec;
delete movey;
delete movexLimit;
delete moveyLimit;
delete mapnumx;
delete mapnumy;
delete mapset;
removeMovieClip(_root.soundbgm1);
stopAllSounds();
delete itemArray;
_global.gameinstance3 = 1;
}
if (_global.program == 8) {
attractMode();
replay();
vrb = "DUNGEON-1";
if (scene_load == null) {
screen(vrb, "[DUNGEON-2]");
scene_load = 1;
}
}
if (_global.program == 9) {
attractMode();
replay();
vrb = "attract_screen";
if (scene_load == null) {
screen(vrb, "[ATTRACT]");
scene_load = 1;
}
}
if (_global.program == 10) {
highscore();
vrb = "highscore_screen";
if (scene_load == null) {
screen(vrb, "[HIGHSCORE]");
scene_load = 1;
}
}
};
Symbol 57 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 2
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 2
stop();
Symbol 89 MovieClip Frame 3
stop();
Symbol 89 MovieClip Frame 4
stop();
Symbol 222 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 2
stop();
Symbol 222 MovieClip Frame 3
stop();
Symbol 222 MovieClip Frame 4
stop();
Symbol 222 MovieClip Frame 5
stop();
Symbol 222 MovieClip Frame 6
stop();
Instance of Symbol 89 MovieClip "npc" in Symbol 222 MovieClip Frame 22
onClipEvent (load) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
this.gotoAndStop(1);
}
Instance of Symbol 89 MovieClip "npc" in Symbol 222 MovieClip Frame 25
onClipEvent (enterFrame) {
this.gotoAndStop(2);
}
onClipEvent (load) {
this.gotoAndStop(2);
}
Instance of Symbol 89 MovieClip "npc" in Symbol 222 MovieClip Frame 25
onClipEvent (enterFrame) {
this.gotoAndStop(3);
}
onClipEvent (load) {
this.gotoAndStop(3);
}
Instance of Symbol 89 MovieClip "npc" in Symbol 222 MovieClip Frame 150
onClipEvent (enterFrame) {
this.gotoAndStop(4);
}
onClipEvent (load) {
this.gotoAndStop(4);
}
Symbol 272 MovieClip Frame 1
stop();
Symbol 272 MovieClip Frame 2
stop();
Symbol 272 MovieClip Frame 3
stop();
Symbol 272 MovieClip Frame 4
stop();
Symbol 272 MovieClip Frame 5
stop();
Symbol 272 MovieClip Frame 6
stop();
Symbol 272 MovieClip Frame 7
stop();
Symbol 272 MovieClip Frame 8
stop();
Instance of Symbol 226 MovieClip in Symbol 272 MovieClip Frame 18
onClipEvent (enterFrame) {
if (_root.stage1door == 1) {
this._x = -999999;
}
}
Instance of Symbol 258 MovieClip in Symbol 272 MovieClip Frame 103
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this)) {
_root.exit = 1;
this._y = -9999;
}
}
Symbol 274 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 10
gotoAndPlay (2);
Symbol 275 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 2
stop();
Instance of Symbol 222 MovieClip "x" in Symbol 275 MovieClip Frame 8
onClipEvent (load) {
this.gotoAndStop(1 + _root.mapset);
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 8
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 1);
}
Instance of Symbol 222 MovieClip "y" in Symbol 275 MovieClip Frame 9
onClipEvent (load) {
this.gotoAndStop(2 + _root.mapset);
}
Instance of Symbol 274 MovieClip in Symbol 275 MovieClip Frame 9
onClipEvent (enterFrame) {
if (_root.spTclr == 2) {
this._visible = true;
this.play();
} else {
this.stop();
this._visible = false;
}
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 9
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 2);
}
Instance of Symbol 222 MovieClip "z" in Symbol 275 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(3 + _root.mapset);
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 3);
}
Instance of Symbol 222 MovieClip "4" in Symbol 275 MovieClip Frame 11
onClipEvent (load) {
this.gotoAndStop(4 + _root.mapset);
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 11
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 4);
}
Instance of Symbol 222 MovieClip "t" in Symbol 275 MovieClip Frame 16
onClipEvent (load) {
this.gotoAndStop(5 + _root.mapset);
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 16
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 5);
}
Instance of Symbol 222 MovieClip "u" in Symbol 275 MovieClip Frame 17
onClipEvent (load) {
this.gotoAndStop(6 + _root.mapset);
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 17
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 6);
}
Instance of Symbol 222 MovieClip "v" in Symbol 275 MovieClip Frame 18
onClipEvent (load) {
this.gotoAndStop(7 + _root.mapset);
}
Instance of Symbol 274 MovieClip in Symbol 275 MovieClip Frame 18
onClipEvent (enterFrame) {
if (_root.spTclr == 2) {
this._visible = true;
this.play();
} else {
this.stop();
this._visible = false;
}
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 18
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 7);
}
Instance of Symbol 222 MovieClip "8" in Symbol 275 MovieClip Frame 19
onClipEvent (load) {
this.gotoAndStop(8 + _root.mapset);
}
Instance of Symbol 272 MovieClip "hb" in Symbol 275 MovieClip Frame 19
onClipEvent (load) {
this.gotoAndStop(((8 * _root.mapnumx) + _root.mapnumy) + 8);
}
Symbol 287 MovieClip Frame 10
removeMovieClip(this);
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 2
play();
Symbol 288 MovieClip Frame 10
_global.program++;
delete _root.scene_load;
removeMovieClip(this);
stop();
Symbol 315 MovieClip Frame 1
stop();
Symbol 315 MovieClip Frame 2
stop();
Symbol 315 MovieClip Frame 3
stop();
Symbol 315 MovieClip Frame 4
stop();
Symbol 315 MovieClip Frame 5
stop();
Symbol 315 MovieClip Frame 6
stop();
Symbol 315 MovieClip Frame 7
stop();
Symbol 315 MovieClip Frame 8
stop();
Symbol 360 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 2
stop();
Instance of Symbol 315 MovieClip "hb" in Symbol 360 MovieClip Frame 7
onClipEvent (load) {
gotoAndStop(_parent._currentframe);
}
onClipEvent (enterFrame) {
gotoAndStop(_parent._currentframe);
}
Symbol 363 MovieClip Frame 1
stop();
Symbol 363 MovieClip Frame 2
stop();
Instance of Symbol 367 MovieClip in Symbol 372 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._height > ((_root.concpotTimer * 17.8) / _root.concpot_time)) {
this._height = this._height - 1;
}
if (this._height < ((_root.concpotTimer * 17.8) / _root.concpot_time)) {
this._height = this._height + 1;
}
}
Instance of Symbol 386 MovieClip in Symbol 390 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._width > ((_root.player_health * 176) / _root.stats_health)) {
this._width = this._width - 0.5;
}
if (this._width < ((_root.player_health * 176) / _root.stats_health)) {
this._width = this._width + 0.5;
}
}
Instance of Symbol 389 MovieClip in Symbol 390 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._width > ((_root.player_health * 176) / _root.stats_health)) {
this._width = this._width - 10;
}
if (this._width < ((_root.player_health * 176) / _root.stats_health)) {
this._width = this._width + 10;
}
}
Instance of Symbol 386 MovieClip in Symbol 398 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._width > ((_root.plHp * 176) / _root.MaxplHp)) {
this._width = this._width - 0.3;
}
}
Instance of Symbol 389 MovieClip in Symbol 398 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = (_root.player_mana * 176) / _root.stats_mana;
}
Instance of Symbol 400 MovieClip in Symbol 401 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._width > ((_root.stats_exp * 176) / _root.tnl)) {
this._width = this._width - 10;
}
if (this._width < ((_root.stats_exp * 176) / _root.tnl)) {
this._width = this._width + 10;
}
}
Symbol 550 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 2
stop();
Symbol 550 MovieClip Frame 3
stop();
Symbol 550 MovieClip Frame 4
stop();
Symbol 550 MovieClip Frame 5
stop();
Symbol 550 MovieClip Frame 6
stop();
Symbol 550 MovieClip Frame 7
stop();
Symbol 550 MovieClip Frame 8
stop();
Symbol 550 MovieClip Frame 9
stop();
Symbol 550 MovieClip Frame 10
stop();
Symbol 550 MovieClip Frame 11
stop();
Symbol 550 MovieClip Frame 12
stop();
Symbol 550 MovieClip Frame 13
stop();
Symbol 550 MovieClip Frame 14
stop();
Symbol 550 MovieClip Frame 15
stop();
Symbol 550 MovieClip Frame 16
stop();
Symbol 550 MovieClip Frame 17
stop();
Symbol 550 MovieClip Frame 18
stop();
Symbol 550 MovieClip Frame 19
stop();
Symbol 550 MovieClip Frame 20
stop();
Symbol 550 MovieClip Frame 21
stop();
Symbol 550 MovieClip Frame 22
Instance of Symbol 550 MovieClip "item_" in Symbol 557 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[1] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.itemArraynum[1]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 557 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[2] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.itemArraynum[2]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 557 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[3] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.itemArraynum[3]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 557 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[4] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.itemArraynum[4]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 557 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[5] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.itemArraynum[5]);
}
}
Instance of Symbol 372 MovieClip in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.concpot_use == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 375 MovieClip in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
}
Instance of Symbol 378 MovieClip in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 381 MovieClip in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 557 MovieClip "macro" in Symbol 558 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.keys);
if (_root.item_usage == 1) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 657 MovieClip Frame 1
stop();
_root.shopselect = 1;
Symbol 657 MovieClip Frame 2
stop();
_root.shopselect = 2;
Symbol 657 MovieClip Frame 3
stop();
_root.shopselect = 3;
Symbol 657 MovieClip Frame 4
stop();
_root.shopselect = 4;
Symbol 657 MovieClip Frame 5
stop();
_root.shopselect = 5;
Symbol 719 MovieClip Frame 1
stop();
Symbol 719 MovieClip Frame 2
stop();
Instance of Symbol 650 MovieClip in Symbol 719 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(_root.buyshopSelect);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.buyshopSelect);
}
Instance of Symbol 657 MovieClip in Symbol 719 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(_root.keys2);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.keys2);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum1);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum2);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum3);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum4);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum5);
}
Symbol 719 MovieClip Frame 3
stop();
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
if (_root.sellNum[1] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.sellArraynum[1]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
if (_root.sellNum[2] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.sellArraynum[2]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
if (_root.sellNum[3] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.sellArraynum[3]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
if (_root.sellNum[4] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.sellArraynum[4]);
}
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
if (_root.sellNum[5] == null) {
this.gotoAndStop(28);
} else {
this.gotoAndStop(_root.sellArraynum[5]);
}
}
Instance of Symbol 650 MovieClip in Symbol 719 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(28);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.sellArraynum[_root.keys]);
}
Symbol 719 MovieClip Frame 4
stop();
Symbol 719 MovieClip Frame 5
stop();
Instance of Symbol 650 MovieClip in Symbol 719 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.buyshopSelect);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.buyshopSelect);
}
Instance of Symbol 657 MovieClip in Symbol 719 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.keys2);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.keys2);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum1);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum1);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum2);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum2);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum3);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum3);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum4);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum4);
}
Instance of Symbol 550 MovieClip "item_" in Symbol 719 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum5);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum5);
}
Symbol 748 MovieClip Frame 1
stop();
Symbol 748 MovieClip Frame 2
stop();
Symbol 748 MovieClip Frame 3
stop();
Symbol 748 MovieClip Frame 4
stop();
Symbol 748 MovieClip Frame 5
stop();
Symbol 748 MovieClip Frame 6
stop();
Symbol 748 MovieClip Frame 7
stop();
Symbol 748 MovieClip Frame 8
stop();
Symbol 748 MovieClip Frame 9
stop();
Symbol 748 MovieClip Frame 10
stop();
Symbol 748 MovieClip Frame 11
stop();
Symbol 748 MovieClip Frame 12
stop();
Instance of Symbol 748 MovieClip in Symbol 749 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 749 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 762 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 775 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 782 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 795 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 814 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 817 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 826 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 826 MovieClip Frame 6
stop();
Instance of Symbol 748 MovieClip in Symbol 837 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 837 MovieClip Frame 6
stop();
Instance of Symbol 748 MovieClip in Symbol 850 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 850 MovieClip Frame 6
stop();
Instance of Symbol 748 MovieClip in Symbol 861 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 861 MovieClip Frame 6
stop();
Instance of Symbol 748 MovieClip in Symbol 870 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 870 MovieClip Frame 5
stop();
Symbol 871 MovieClip Frame 1
stop();
Symbol 871 MovieClip Frame 2
stop();
Symbol 871 MovieClip Frame 3
stop();
Symbol 871 MovieClip Frame 4
stop();
Symbol 871 MovieClip Frame 5
stop();
Symbol 871 MovieClip Frame 6
stop();
Instance of Symbol 748 MovieClip in Symbol 871 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 871 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 871 MovieClip Frame 7
stop();
Instance of Symbol 748 MovieClip in Symbol 871 MovieClip Frame 7
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 871 MovieClip Frame 8
stop();
Instance of Symbol 748 MovieClip in Symbol 871 MovieClip Frame 8
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 871 MovieClip Frame 9
stop();
Instance of Symbol 748 MovieClip in Symbol 871 MovieClip Frame 9
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 871 MovieClip Frame 10
stop();
Symbol 871 MovieClip Frame 11
stop();
Symbol 871 MovieClip Frame 12
stop();
Symbol 871 MovieClip Frame 13
stop();
Symbol 871 MovieClip Frame 14
stop();
Symbol 871 MovieClip Frame 15
stop();
Symbol 871 MovieClip Frame 16
stop();
Symbol 871 MovieClip Frame 17
stop();
Symbol 871 MovieClip Frame 18
stop();
Symbol 871 MovieClip Frame 19
stop();
Symbol 871 MovieClip Frame 20
stop();
Symbol 872 MovieClip Frame 1
stop();
Symbol 872 MovieClip Frame 2
stop();
Symbol 872 MovieClip Frame 3
stop();
Symbol 872 MovieClip Frame 4
stop();
Symbol 872 MovieClip Frame 5
stop();
Symbol 872 MovieClip Frame 6
stop();
Instance of Symbol 748 MovieClip in Symbol 872 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 748 MovieClip in Symbol 872 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 872 MovieClip Frame 7
stop();
Instance of Symbol 748 MovieClip in Symbol 872 MovieClip Frame 7
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 872 MovieClip Frame 8
stop();
Instance of Symbol 748 MovieClip in Symbol 872 MovieClip Frame 8
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 872 MovieClip Frame 9
stop();
Instance of Symbol 748 MovieClip in Symbol 872 MovieClip Frame 9
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 872 MovieClip Frame 10
stop();
Symbol 872 MovieClip Frame 11
stop();
Symbol 872 MovieClip Frame 12
stop();
Symbol 872 MovieClip Frame 13
stop();
Symbol 872 MovieClip Frame 14
stop();
Symbol 872 MovieClip Frame 15
stop();
Symbol 872 MovieClip Frame 16
stop();
Symbol 872 MovieClip Frame 17
stop();
Symbol 872 MovieClip Frame 18
stop();
Symbol 872 MovieClip Frame 19
stop();
Symbol 872 MovieClip Frame 20
stop();
Symbol 893 MovieClip Frame 31
removeMovieClip(this);
Symbol 910 MovieClip Frame 25
removeMovieClip(this);
Symbol 915 MovieClip Frame 1
stop();
Symbol 915 MovieClip Frame 2
gotoAndStop (1);
Symbol 915 MovieClip Frame 3
gotoAndStop (1);
Symbol 915 MovieClip Frame 4
gotoAndStop (1);
Symbol 919 MovieClip Frame 1
stop();
Symbol 919 MovieClip Frame 2
gotoAndPlay (1);
Symbol 919 MovieClip Frame 3
gotoAndPlay (1);
Symbol 919 MovieClip Frame 4
stop();
Symbol 924 MovieClip Frame 1
gotoAndStop (1);
Symbol 924 MovieClip Frame 2
gotoAndStop (1);
Symbol 924 MovieClip Frame 3
gotoAndStop (1);
Symbol 924 MovieClip Frame 4
gotoAndStop (1);
Symbol 929 MovieClip Frame 15
removeMovieClip(this);
Symbol 932 MovieClip Frame 15
removeMovieClip(this);
Symbol 934 MovieClip Frame 25
removeMovieClip(this);
Symbol 935 MovieClip Frame 15
removeMovieClip(this);
Symbol 936 Button
on (keyPress "y") {
_root.stats_exp = _root.stats_exp + 1000;
}
on (keyPress "u") {
_root.concpot_use = 1;
}
Symbol 940 MovieClip Frame 421
stop();
removeMovieClip(this);
Instance of Symbol 938 MovieClip in Symbol 942 MovieClip Frame 1
onClipEvent (enterFrame) {
if (counter == null) {
counter = 1;
}
if (getTimer() >= (999 * counter)) {
counter++;
_root.fps = "FPS:" + rate;
delete rate;
} else {
rate++;
}
}
Symbol 946 MovieClip Frame 25
removeMovieClip(this);