Frame 1
stop();
function randomdungeon() {
if (dunstring_scan == null) {
dunstring_scan = 1;
}
if (fillmelater == 1) {
if (space_input == null) {
delete dun_visfull[floor][(dunmap * row) + col];
space_input = 1;
}
} else {
delete space_input;
}
if (_root.floorHigher == 1) {
if (dun_change2 == null) {
if (dunstring_scan >= (_root.dun_output.length + 1)) {
delete radm1;
delete dun_generator;
dunstring_scan = 1;
} else {
if (dunstring_scan == null) {
dunstring_scan = 1;
}
dunstring_scan--;
_root.dmap = _root.dun_output.slice(dunstring_scan - 1, dunstring_scan);
}
dun_change2 = 1;
}
} else {
delete dun_change2;
}
if (_root.floorLower == 1) {
if (dun_change == null) {
if (dunstring_scan >= (_root.dun_output.length + 1)) {
delete radm1;
delete dun_generator;
dunstring_scan = 1;
} else {
if (dunstring_scan == null) {
dunstring_scan = 1;
}
dunstring_scan++;
_root.dmap = _root.dun_output.slice(dunstring_scan - 1, dunstring_scan);
}
dun_change = 1;
}
} else {
delete dun_change;
}
limit = 2;
while (dun_generator < 5) {
trace((radm5 + " ") + radm1);
if (radm1 == null) {
radm1 = Math.ceil(Math.random() * limit);
radm2 = Math.ceil(Math.random() * limit);
radm3 = Math.ceil(Math.random() * limit);
radm4 = Math.ceil(Math.random() * limit);
radm5 = Math.ceil(Math.random() * limit);
radm6 = Math.ceil(Math.random() * limit);
radm7 = Math.ceil(Math.random() * limit);
radm8 = Math.ceil(Math.random() * limit);
radm9 = Math.ceil(Math.random() * limit);
radm10 = Math.ceil(Math.random() * limit);
radm11 = Math.ceil(Math.random() * limit);
radm12 = Math.ceil(Math.random() * limit);
radm13 = Math.ceil(Math.random() * limit);
radm14 = Math.ceil(Math.random() * limit);
radm15 = Math.ceil(Math.random() * limit);
radm16 = Math.ceil(Math.random() * limit);
radm17 = Math.ceil(Math.random() * limit);
radm18 = Math.ceil(Math.random() * limit);
radm19 = Math.ceil(Math.random() * limit);
radm20 = Math.ceil(Math.random() * limit);
radm21 = Math.ceil(Math.random() * limit);
radm22 = Math.ceil(Math.random() * limit);
radm23 = Math.ceil(Math.random() * limit);
radm24 = Math.ceil(Math.random() * limit);
radm25 = Math.ceil(Math.random() * limit);
radm26 = Math.ceil(Math.random() * limit);
radm27 = Math.ceil(Math.random() * limit);
radm28 = Math.ceil(Math.random() * limit);
radm29 = Math.ceil(Math.random() * limit);
radm30 = Math.ceil(Math.random() * limit);
radm31 = Math.ceil(Math.random() * limit);
radm32 = Math.ceil(Math.random() * limit);
radm33 = Math.ceil(Math.random() * limit);
radm34 = Math.ceil(Math.random() * limit);
radm35 = Math.ceil(Math.random() * limit);
} else if ((((((((((((radm1 == radm2) || (radm4 == radm5)) || (radm7 == radm8)) || (radm10 == radm11)) || (radm13 == radm14)) || (radm16 == radm17)) || (radm19 == radm20)) || (radm22 == radm23)) || (radm25 == radm26)) || (radm28 == radm29)) || (radm31 == radm32)) || (radm34 == radm35)) {
}
string1 = (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((radm1 + "") + radm2) + "") + radm3) + "") + radm4) + "") + radm5) + "") + radm6) + "") + radm7) + "") + radm8) + "") + radm9) + "") + radm10) + "") + radm11) + "") + radm12) + "") + radm13) + "") + radm14) + "") + radm15) + "") + radm16) + "") + radm17) + "") + radm18) + "") + radm19) + "") + radm20) + "") + radm21) + "") + radm22) + "") + radm23) + "") + radm24) + "") + radm25) + "") + radm26) + "") + radm27) + "") + radm28) + "") + radm29) + "") + radm30) + "") + radm31) + "") + radm32) + "") + radm33) + "") + radm34) + "") + radm35;
_root.dun_output = string1;
_root.dmap = string1.slice(0, 1);
dun_generator++;
}
}
function game_mouseControl(player, spd, atk, npc) {
if ((((Key.isDown(38) || (Key.isDown(40))) || (Key.isDown(37))) || (Key.isDown(39))) || (Key.isDown(65))) {
kb_input = 1;
delete m_command;
}
if (m_input == 1) {
delete kb_input;
}
if ((m_command == 1) && (player.hitTest(npc))) {
}
m_scan = m_command;
while (m_scan < enemy_spawn) {
if (_root["enemy" + m_scan].hitTest(player) && (kb_input == null)) {
if ((m_attack == null) && (m_ignore == null)) {
mouseD = 1;
m_attack = 1;
}
}
m_scan++;
}
if (m_ignore == 1) {
delete m_attack;
} else if (m_attack == 1) {
if (m_strike == null) {
if (player._currentframe > 5) {
if (player._currentframe > 10) {
player.gotoAndStop(player._currentframe - 5);
player.gotoAndStop(player._currentframe + 5);
if (spell == "ambush") {
ambush(player);
}
atk._x = player._x;
atk._y = player._y - 20;
} else {
player.gotoAndStop(player._currentframe + 5);
if (spell == "ambush") {
ambush(player);
}
atk._x = player._x;
atk._y = player._y - 20;
}
}
m_strike = 1;
}
if (m_timer >= stats_agi_full) {
if (player._currentframe > 5) {
if (player._currentframe > 10) {
player.gotoAndStop(player._currentframe - 5);
player.gotoAndStop(player._currentframe + 5);
if (spell == "ambush") {
ambush(player);
}
atk._x = player._x;
atk._y = player._y - 20;
} else {
player.gotoAndStop(player._currentframe + 5);
if (spell == "ambush") {
ambush(player);
}
atk._x = player._x;
atk._y = player._y - 20;
}
}
delete m_timer;
} else {
m_timer++;
}
delete m_attack;
} else {
delete m_strike;
}
if (((((m_command == 1) && (m_attack == null)) && (npc_menu == null)) && (!_root.hud_mc1.spell.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.equip.hitTest(_xmouse, _ymouse, true))) {
if (mouseD == null) {
mouseD = Math.abs(mousex - player._x) + Math.abs(mousey - (player._y - 20));
}
if (player._y >= mousey) {
player._y = player._y - spd;
value2y = 0;
} else {
value2y = 1;
}
if (player._y <= mousey) {
player._y = player._y + spd;
value1y = 0;
} else {
value1y = 1;
}
if (player._x >= mousex) {
player._x = player._x - spd;
value1x = 0;
} else {
value1x = 1;
}
if (player._x <= mousex) {
player._x = player._x + spd;
value2x = 0;
} else {
value2x = 1;
}
if (player._x <= mousex) {
player._xscale = -100;
}
if (player._x >= mousex) {
player._xscale = 100;
}
}
if (mouseD < 5) {
value1x = 0;
value2x = 0;
value1y = 0;
value2y = 0;
delete mouseD;
} else {
mouseD = mouseD - 4;
}
if ((value1x == 1) || (value2x == 1)) {
if (value1y == 1) {
player.gotoAndStop(4);
} else if (value2y == 1) {
player.gotoAndStop(2);
} else {
player.gotoAndStop(3);
}
} else if (value1y == 1) {
player.gotoAndStop(5);
} else if (value2y == 1) {
player.gotoAndStop(1);
} else if (m_command == 1) {
if (m_attack == null) {
delete value1x;
delete value2x;
delete value1y;
delete value2y;
if (player._currentframe <= 5) {
player.gotoAndStop(player._currentframe + 5);
}
delete m_command;
}
}
}
function game_minimap() {
function minimap_x1(obj, vrb, array, vrb2) {
if ((((((((((vrb2 == 13) || (vrb2 == 20)) || (vrb2 == 27)) || (vrb2 == 34)) || (vrb2 == 41)) || (vrb2 == 48)) || (vrb2 == 55)) || (vrb2 == 62)) || (vrb2 == 69)) || (vrb2 == 76)) {
obj.gotoAndStop(1);
} else {
obj.gotoAndStop(vrb);
}
if (array == null) {
obj.mapro = ".";
} else {
obj.mapro = "T";
}
}
function minimap_x2(obj, vrb, array, vrb2) {
if ((((((((((vrb2 == 14) || (vrb2 == 21)) || (vrb2 == 28)) || (vrb2 == 35)) || (vrb2 == 42)) || (vrb2 == 49)) || (vrb2 == 56)) || (vrb2 == 63)) || (vrb2 == 70)) || (vrb2 == 77)) {
obj.gotoAndStop(1);
} else {
obj.gotoAndStop(vrb);
}
if (array == null) {
obj.mapro = ".";
} else {
obj.mapro = "T";
}
}
function minimap_x(obj, vrb, array, vrb2) {
obj.gotoAndStop(vrb);
if (array == null) {
obj.mapro = ".";
} else {
obj.mapro = "T";
}
}
if (centermap == 1) {
cmx = -(120 - _root.char1._x);
cmy = -(120 - _root.char1._y);
} else {
delete cmx;
delete cmy;
}
if (minimapst == null) {
minimap = 3;
minimapst = 1;
}
if (minimap == null) {
while (minidrawx < 10) {
_root.minimapmc.duplicateMovieClip("minimap_" + minidrawx, 9200 + minidrawx);
_root.minimap_1._x = 200 + cmx;
_root.minimap_1._y = 20 + cmy;
_root.minimap_2._x = 210 + cmx;
_root.minimap_2._y = 20 + cmy;
_root.minimap_3._x = 220 + cmx;
_root.minimap_3._y = 20 + cmy;
_root.minimap_4._x = 200 + cmx;
_root.minimap_4._y = 30 + cmy;
_root.minimap_5._x = 210 + cmx;
_root.minimap_5._y = 30 + cmy;
_root.minimap_6._x = 220 + cmx;
_root.minimap_6._y = 30 + cmy;
_root.minimap_7._x = 200 + cmx;
_root.minimap_7._y = 40 + cmy;
_root.minimap_8._x = 210 + cmx;
_root.minimap_8._y = 40 + cmy;
_root.minimap_9._x = 220 + cmx;
_root.minimap_9._y = 40 + cmy;
minidrawx++;
}
delete minidrawx;
minimap = 1;
}
if (minimap == 1) {
if (centermap == 1) {
minimap = 2;
loader._x = 0;
loader._y = 0;
}
while (remdrawx < 77) {
removeMovieClip(_root["minimap__" + remdrawx]);
remdrawx++;
}
vrb_1 = ((_root.dunmap - 1) * _root.row) + (_root.col - 1);
vrb_4 = (_root.dunmap * _root.row) + (_root.col - 1);
vrb_7 = ((_root.dunmap + 1) * _root.row) + (_root.col - 1);
vrb_3 = ((_root.dunmap - 1) * _root.row) + (_root.col + 1);
vrb_6 = (_root.dunmap * _root.row) + (_root.col + 1);
vrb_9 = ((_root.dunmap + 1) * _root.row) + (_root.col + 1);
vrb1 = _root.dun_visfull[_root.floor][((_root.dunmap - 1) * _root.row) + (_root.col - 1)] + 1;
vrb4 = _root.dun_visfull[_root.floor][(_root.dunmap * _root.row) + (_root.col - 1)] + 1;
vrb7 = _root.dun_visfull[_root.floor][((_root.dunmap + 1) * _root.row) + (_root.col - 1)] + 1;
vrb3 = _root.dun_visfull[_root.floor][((_root.dunmap - 1) * _root.row) + (_root.col + 1)] + 1;
vrb6 = _root.dun_visfull[_root.floor][(_root.dunmap * _root.row) + (_root.col + 1)] + 1;
vrb9 = _root.dun_visfull[_root.floor][((_root.dunmap + 1) * _root.row) + (_root.col + 1)] + 1;
vrb2 = _root.dun_visfull[_root.floor][((_root.dunmap - 1) * _root.row) + _root.col] + 1;
vrb5 = _root.dun_visfull[_root.floor][(_root.dunmap * _root.row) + _root.col] + 1;
vrb8 = _root.dun_visfull[_root.floor][((_root.dunmap + 1) * _root.row) + _root.col] + 1;
minimap_x1(_root.minimap_1, vrb1, _root.dun_Array_itemx[((_root.dunmap - 1) * _root.row) + (_root.col - 1)], vrb_1);
minimap_x1(_root.minimap_4, vrb4, _root.dun_Array_itemx[(_root.dunmap * _root.row) + (_root.col - 1)], vrb_4);
minimap_x1(_root.minimap_7, vrb7, _root.dun_Array_itemx[((_root.dunmap + 1) * _root.row) + (_root.col - 1)], vrb_7);
minimap_x2(_root.minimap_3, vrb3, _root.dun_Array_itemx[((_root.dunmap - 1) * _root.row) + (_root.col + 1)], vrb_3);
minimap_x2(_root.minimap_6, vrb6, _root.dun_Array_itemx[(_root.dunmap * _root.row) + (_root.col + 1)], vrb_6);
minimap_x2(_root.minimap_9, vrb9, _root.dun_Array_itemx[((_root.dunmap + 1) * _root.row) + (_root.col + 1)], vrb_9);
minimap_x(_root.minimap_2, vrb2, _root.dun_Array_itemx[((_root.dunmap - 1) * _root.row) + _root.col], null);
minimap_x(_root.minimap_5, vrb5, _root.dun_Array_itemx[(_root.dunmap * _root.row) + _root.col], null);
minimap_x(_root.minimap_8, vrb8, _root.dun_Array_itemx[((_root.dunmap + 1) * _root.row) + _root.col], null);
delete remdrawx;
delete createmap;
delete drawset;
delete drawset2;
delete remmap2;
}
if (minimap == 3) {
if (remmap2 == null) {
while (remdrawx2 < 77) {
removeMovieClip(_root["minimap__" + remdrawx2]);
remdrawx2++;
}
remmap2 = 1;
}
delete remdrawx2;
}
if (minimap == 2) {
if (centermap == 1) {
loader._x = 0;
loader._y = 0;
}
while (remdrawx < 10) {
removeMovieClip(_root["minimap_" + remdrawx]);
remdrawx++;
}
if (createmap == null) {
if (minidrawx == null) {
minidrawx = 7;
}
while (minidrawx < 77) {
_root.minimapmc.duplicateMovieClip("minimap__" + minidrawx, 9300 + minidrawx);
if (drawset == 7) {
drawset = 1;
drawset2++;
} else {
drawset++;
}
_root["minimap__" + minidrawx]._x = ((drawset * 10) + 15) + cmx;
_root["minimap__" + minidrawx]._y = ((drawset2 * 10) + 15) + cmy;
minidrawx++;
}
createmap = 1;
}
if (minimapdraw == null) {
if (mapdraw == null) {
mapdraw = 7;
}
while (mapdraw < 77) {
vrb = _root.dun_visfull[_root.floor][mapdraw] + 1;
_root["minimap__" + mapdraw].gotoAndStop(vrb);
if (((_root.dunmap * _root.row) + _root.col) == mapdraw) {
_root["minimap__" + mapdraw].gotoAndStop(3);
} else if (_root.dun_Array_itemx[mapdraw] == null) {
_root["minimap__" + mapdraw].mapro = ".";
} else {
_root["minimap__" + mapdraw].mapro = "T";
}
mapdraw++;
}
minimapdraw = 1;
}
delete mapdraw;
delete minimapdraw;
delete remdrawx;
delete minidrawx;
}
if (Key.isDown(77) || (_root.hud_mc1.map.hitTest(_xmouse, _ymouse, true) && (m_input == 1))) {
if (minput == 1) {
} else {
if (minimap == 3) {
delete minimap;
} else if (minimap == 2) {
loader._x = -999;
minimap = 3;
} else if (minimap == 1) {
minimap = 2;
}
minput = 1;
}
} else {
delete minput;
}
}
function game_hud(player, obj) {
barDisplay(obj, player);
}
function barDisplay(obj, player) {
if (_root.plHpDis > 1) {
obj._visible = true;
obj._x = player._x;
obj._y = player._y - 45;
} else {
obj._visible = false;
}
}
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_rewind(obj, enemy, map) {
if (recordArrayCreate == null) {
rootx = new Array();
rooty = new Array();
menux = new Array();
menuy = new Array();
playerx = new Array();
playery = new Array();
playercf = new Array();
playerxscale = new Array();
playerh = new Array();
playerdown = new Array();
playerdowndiag = new Array();
playerside = new Array();
playerupdiag = new Array();
playerup = new Array();
playerdowna = new Array();
playerdowndiaga = new Array();
playersidea = new Array();
playerupdiaga = new Array();
playerupa = new Array();
mapvis = [[null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null]];
mapvis2 = new Array();
mapx = new Array();
mapy = new Array();
mapcf = new Array();
dunm = new Array();
dmapa = new Array();
floora = new Array();
rowa = new Array();
cola = new Array();
poolacf = new Array();
enema1x = new Array();
enema1y = new Array();
enema1cf = new Array();
enema2x = new Array();
enema2y = new Array();
enema2cf = new Array();
enema3x = new Array();
enema3y = new Array();
enema3cf = new Array();
enema4x = new Array();
enema4y = new Array();
enema4cf = new Array();
center1cf = new Array();
center2cf = new Array();
center3cf = new Array();
center4cf = new Array();
center6cf = new Array();
center7cf = new Array();
center8cf = new Array();
center9cf = new Array();
sounditemcf = new Array();
soundcf = new Array();
soundspellcf = new Array();
recordArrayCreate = 1;
}
if (time_use == 1) {
if (_root.char1._x == null) {
_root.go_screen1.removeMovieClip();
_root.char.duplicateMovieClip("char1", 200);
}
rewind = 1;
_root._x = rootx[play_];
_root._y = rooty[play_];
_root.hud_mc1._x = menux[play_];
_root.hud_mc1._y = menuy[play_];
obj._x = playerx[play_];
obj._y = playery[play_];
obj.gotoAndStop(playercf[play_]);
obj.down.gotoAndStop(playerdown[play_]);
obj.downdiag.gotoAndStop(playerdowndiag[play_]);
obj.side.gotoAndStop(playerside[play_]);
obj.updiag.gotoAndStop(playerupdiag[play_]);
obj.up.gotoAndStop(playerup[play_]);
obj.downa.gotoAndStop(playerdowna[play_]);
obj.downdiaga.gotoAndStop(playerdowndiaga[play_]);
obj.sidea.gotoAndStop(playersidea[play_]);
obj.updiaga.gotoAndStop(playerupdiaga[play_]);
obj.upa.gotoAndStop(playerupa[play_]);
obj._xscale = playerxscale[play_];
player_health = playerh[play_];
map._x = mapx[play_];
map._y = mapx[play_];
floor = floora[play_];
dunmap = dunm[play_];
row = rowa[play_];
col = cola[play_];
dmap = dmapa[play_];
map.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
pool.gotoAndStop(poolacf[play_]);
enemy1._x = enema1x[play_];
enemy1._y = enema1y[play_];
enemy1.gotoAndStop(enema1cf[play_]);
enemy2._x = enema2x[play_];
enemy2._y = enema2y[play_];
enemy2.gotoAndStop(enema2cf[play_]);
enemy3._x = enema3x[play_];
enemy3._y = enema3y[play_];
enemy3.gotoAndStop(enema3cf[play_]);
enemy4._x = enema4x[play_];
enemy4._y = enema4y[play_];
enemy4.gotoAndStop(enema4cf[play_]);
center1.gotoAndStop(center1cf[play_]);
center2.gotoAndStop(center2cf[play_]);
center3.gotoAndStop(center3cf[play_]);
center4.gotoAndStop(center4cf[play_]);
center6.gotoAndStop(center6cf[play_]);
center7.gotoAndStop(center7cf[play_]);
center8.gotoAndStop(center8cf[play_]);
center9.gotoAndStop(center9cf[play_]);
mapvis2[floora[play_]][(dunm[play_] * rowa[play_]) + cola[play_]] = null;
dun_visfull[floor][(dunmap * row) + col] = mapvis2[floor][(dunmap * row) + col];
revsounditem.gotoAndStop(sounditemcf[play_]);
revsound.gotoAndStop(soundcf[play_]);
revsoundspell.gotoAndStop(soundspellcf[play_]);
if (play_ == null) {
play_ = rec - 3;
play_tot = rec;
}
play_ro = (pro_m + ":") + pro_ts;
p_mast = Math.floor((play_ / 60) / 999);
pro_m = Math.floor(play_ / 60);
pro_ts = Math.floor(play_ - (pro_m * 60));
pro_ms = ms.toString().slice(4, 7);
ms = Math.abs((play_ * 1) / play_tot);
if (Key.isDown(39)) {
if (play_ >= (play_tot - 3)) {
play_ = play_tot - 3;
} else {
play_ = play_ + 1;
}
}
if (Key.isDown(37)) {
if (play_ <= 3) {
play_ = 3;
} else {
play_ = play_ - 1;
}
}
delete rec;
} else {
if (rec == null) {
stopAllSounds();
if (_root.floor == null) {
_root.soundbgm.duplicateMovieClip("soundbgm1", 104);
_root.soundbgm1.gotoAndStop(3);
_root.soundbgm1.gotoAndStop(1);
} else {
_root.soundbgm.duplicateMovieClip("soundbgm1", 104);
_root.soundbgm1.gotoAndStop(_root.floor + 2);
_root.soundbgm1.gotoAndStop(1);
}
recbgm = 1;
rec = 1;
}
delete rewind;
rootx[rec] = _root._x;
rooty[rec] = _root._y;
menux[rec] = _root.hud_mc1._x;
menuy[rec] = _root.hud_mc1._y;
playerx[rec] = obj._x;
playery[rec] = obj._y;
playercf[rec] = obj._currentframe;
playerxscale[rec] = obj._xscale;
playerh[rec] = player_health;
playerdown[rec] = obj.down._currentframe;
playerdowndiag[rec] = obj.downdiag._currentframe;
playerside[rec] = obj.side._currentframe;
playerupdiag[rec] = obj.updiag._currentframe;
playerup[rec] = obj.up._currentframe;
playerdowna[rec] = obj.downa._currentframe;
playerdowndiaga[rec] = obj.downdiaga._currentframe;
playersidea[rec] = obj.sidea._currentframe;
playerupdiaga[rec] = obj.updiaga._currentframe;
playerupa[rec] = obj.upa._currentframe;
mapvis2[floora[rec]][(dunm[rec] * rowa[rec]) + cola[rec]] = 1;
mapx[rec] = map._x;
mapy[rec] = map._y;
mapcf[rec] = map._currentframe;
floora[rec] = floor;
dunm[rec] = dunmap;
rowa[rec] = row;
cola[rec] = col;
poolacf[rec] = pool._currentframe;
dmapa[rec] = dmap;
enema1x[rec] = enemy1._x;
enema1y[rec] = enemy1._y;
enema1cf[rec] = enemy1._currentframe;
enema2x[rec] = enemy2._x;
enema2y[rec] = enemy2._y;
enema2cf[rec] = enemy2._currentframe;
enema3x[rec] = enemy3._x;
enema3y[rec] = enemy3._y;
enema3cf[rec] = enemy3._currentframe;
enema4x[rec] = enemy4._x;
enema4y[rec] = enemy4._y;
enema4cf[rec] = enemy4._currentframe;
center1cf[rec] = center1._currentframe;
center2cf[rec] = center2._currentframe;
center3cf[rec] = center3._currentframe;
center4cf[rec] = center4._currentframe;
center6cf[rec] = center6._currentframe;
center7cf[rec] = center7._currentframe;
center8cf[rec] = center8._currentframe;
center9cf[rec] = center9._currentframe;
sounditemcf[rec] = sounditem._currentframe;
soundcf[rec] = sound._currentframe;
soundspellcf[rec] = soundspell._currentframe;
rec++;
delete play_;
}
}
function game_slomo(obj, enemy) {
function slomo_cf(obj, vrb, vrb2) {
if (vrb2 == 1) {
if (obj.pt_frame >= 25) {
obj.pt_frame = 1;
} else {
obj.pt_frame++;
}
}
if (obj._currentframe == vrb) {
obj.gotoAndStop(1);
} else {
obj.gotoAndPlay(obj.pt_frame);
}
}
if (player_health <= 1) {
game_speed = 1;
} else {
if (player_health < (stats_health * 0.1)) {
game_speed = 3;
} else if (player_health < (stats_health * 0.4)) {
game_speed = 2;
}
if (player_health > (stats_health * 0.4)) {
game_speed = 1;
}
}
if ((game_speed == 1) && (gs_switch == 1)) {
obj.down.play();
obj.downdiag.play();
obj.side.play();
obj.updiag.play();
obj.up.play();
obj.downa.play();
obj.downdiaga.play();
obj.sidea.play();
obj.updiaga.play();
obj.upa.play();
enemy.down.play();
enemy.downdiag.play();
enemy.side.play();
enemy.updiag.play();
enemy.up.play();
enemy.downa.play();
enemy.downdiaga.play();
enemy.sidea.play();
enemy.updiaga.play();
enemy.upa.play();
var ptmc = 1;
while (ptmc < 12) {
_root["nme_hitpoints" + ptmc].play();
_root["player_hitpoints" + ptmc].play();
_root["plyr_dam_mc" + ptmc].play();
_root["damage_end_pl" + ptmc].play();
_root["damage_end" + ptmc].play();
ptmc++;
}
delete gs_switch;
}
if ((game_speed == 2) || (game_speed == 3)) {
gs_switch = 1;
if (enemy.slomoTimer >= (5 * game_speed)) {
enemy.down.gotoAndStop(frame);
enemy.downdiag.gotoAndStop(frame);
enemy.side.gotoAndStop(frame);
enemy.updiag.gotoAndStop(frame);
enemy.up.gotoAndStop(frame);
enemy.downa.gotoAndStop(frame);
enemy.downdiaga.gotoAndStop(frame);
enemy.sidea.gotoAndStop(frame);
enemy.updiaga.gotoAndStop(frame);
enemy.upa.gotoAndStop(frame);
if (frame >= 11) {
frame = 1;
} else {
frame++;
}
delete enemy.slomoTimer;
} else {
enemy.down.stop();
enemy.downdiag.stop();
enemy.side.stop();
enemy.updiag.stop();
enemy.up.stop();
enemy.downa.stop();
enemy.downdiaga.stop();
enemy.sidea.stop();
enemy.updiaga.stop();
enemy.upa.stop();
enemy.slomoTimer++;
}
if ((((!Key.isDown(38)) && (!Key.isDown(37))) && (!Key.isDown(39))) && (!Key.isDown(40))) {
delete p_frame;
}
if (particle_slomoTimer >= (5 * game_speed)) {
var ptmc = 1;
while (ptmc < 12) {
slomo_cf(_root["nme_hitpoints" + ptmc], 25, 1);
slomo_cf(_root["player_hitpoints" + ptmc], 25, 1);
slomo_cf(_root["plyr_dam_mc" + ptmc], 25, 1);
slomo_cf(_root["damage_end_pl" + ptmc], 25, 1);
slomo_cf(_root["damage_end" + ptmc], 25, 1);
ptmc++;
}
delete particle_slomoTimer;
} else {
var ptmc = 1;
while (ptmc < 12) {
_root["nme_hitpoints" + ptmc].stop();
_root["player_hitpoints" + ptmc].stop();
_root["plyr_dam_mc" + ptmc].stop();
_root["damage_end_pl" + ptmc].stop();
_root["damage_end" + ptmc].stop();
ptmc++;
}
particle_slomoTimer++;
}
if (player_slomoTimer >= (5 * game_speed)) {
obj.down.gotoAndStop(p_frame);
obj.downdiag.gotoAndStop(p_frame);
obj.side.gotoAndStop(p_frame);
obj.updiag.gotoAndStop(p_frame);
obj.up.gotoAndStop(p_frame);
obj.downa.gotoAndStop(p_frame);
obj.downdiaga.gotoAndStop(p_frame);
obj.sidea.gotoAndStop(p_frame);
obj.updiaga.gotoAndStop(p_frame);
obj.upa.gotoAndStop(p_frame);
if (p_frame >= 11) {
p_frame = 1;
} else {
p_frame++;
}
delete player_slomoTimer;
} else {
obj.down.stop();
obj.downdiag.stop();
obj.side.stop();
obj.updiag.stop();
obj.up.stop();
obj.downa.stop();
obj.downdiaga.stop();
obj.sidea.stop();
obj.updiaga.stop();
obj.upa.stop();
player_slomoTimer++;
}
}
}
function game_hitDetect(obj, atk, enemy) {
hitDetect(obj, atk, enemy);
}
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 (RO == null) {
defenseArray = new Array();
defenseitem = new Array();
defenseshield = new Array();
defenseshield[13] = 0;
defenseshield[1] = 5;
defenseshield[2] = 5;
defenseshield[3] = 6;
defenseshield[4] = 7;
defenseshield[5] = 8;
defenseshield[6] = 9;
defenseshield[7] = 3;
defenseshield[8] = 4;
defenseshield[9] = 5;
defenseshield[10] = 6;
defenseshield[11] = 7;
defenseitem[4] = 5;
defenseitem[8] = 5;
defenseitem[11] = 2;
defenseitem[20] = 36;
defenseitem[21] = 39;
defenseitem[22] = 44;
defenseitem[23] = 35;
defenseitem[24] = 38;
defenseitem[25] = 44;
defenseitem[26] = 6;
defenseitem[27] = 10;
}
RO = defense_total;
_root.ero1 = ("-" + defenseArray[1].toString()) + " AC";
_root.ero2 = ("-" + defenseArray[2].toString()) + " AC";
_root.ero3 = ("-" + defenseArray[3].toString()) + " AC";
_root.ero4 = (weaponLow[equipArray[4]].toString() + " ~ ") + weaponHigh[equipArray[4]].toString();
_root.ero5 = ("-" + defenseArray[4].toString()) + " AC";
defenseArray[1] = defenseitem[equipArray[1]];
defenseArray[2] = defenseitem[equipArray[2]];
defenseArray[3] = defenseitem[equipArray[3]];
defenseArray[4] = defenseshield[_root.shield];
defense_total = ((defenseArray[1] + defenseArray[2]) + defenseArray[3]) + defenseArray[4];
plarmorClass = defense_total * 0.01;
if (_root.plHpDis == null) {
} else if (_root.plHpDis > 1) {
_root.plHpDis--;
} else {
delete _root.plHpDis;
}
if (obj.hb.hitTest(player.hb) && (obj.stun == null)) {
obj.enemTimer++;
if (obj.enemTimer >= (aspd * game_speed)) {
delete obj.input;
delete obj.enemTimer;
}
if (obj.input == null) {
if (obj._currentframe > (10 + monanim)) {
obj.gotoAndStop(obj._currentframe - 5);
obj.gotoAndStop(obj._currentframe + 5);
} else if (obj._currentframe < (5 + monanim)) {
obj.gotoAndStop(obj._currentframe + 10);
} else {
obj.gotoAndStop(obj._currentframe + 5);
}
if (pl_ptsnum >= 10) {
pl_ptsnum = 1;
} else {
pl_ptsnum++;
}
enemy_hitRate = level * 5;
if (Key.isDown(83)) {
hitRate = (enemy_hitRate + Math.ceil(Math.random() * 100)) - ((stats._agi + 10) * 2);
} else {
hitRate = (enemy_hitRate + Math.ceil(Math.random() * 100)) - (stats._agi + 10);
}
enemyLow[0] = 5;
if (floor >= 2) {
enemyHigh[0] = 20 * floor;
} else {
enemyHigh[0] = (20 * floor) * 0.3;
}
if (enemyLow == null) {
enemyLow = new Array();
enemyHigh = new Array();
}
if (hitRate >= (60 + sf_buff)) {
playerDamage_calc = Math.ceil((Math.random() * enemyLow[0]) + enemyHigh[0]);
playerDamage_calc_total = Math.ceil(playerDamage_calc - (playerDamage_calc * plarmorClass));
if (playerDamage_calc_total > 0) {
playerDamage = playerDamage_calc_total;
} else {
playerDamage = 1;
}
_root.sound.gotoAndPlay(4);
} else {
playerDamage = "Miss!";
_root.sound.gotoAndPlay(3);
}
if (_root.plHpDis == null) {
_root.plHpDis = 500;
} else {
_root.plHpDis = 500;
}
_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 - 20;
_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 - 20;
_root["plyr_dam_mc" + pl_ptsnum].lx = 1;
}
if (player_health <= 1) {
_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 - 20;
_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;
_root.go_screen.duplicateMovieClip("go_screen1", 14000);
_root.go_screen1._x = 0;
_root.go_screen1._y = 0;
_root.go_screen1.gotoAndPlay(2);
} 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.hb.hitTest(player.hb)) {
if (class == 1) {
s_ambush = 1;
}
} else {
if (ambtimer >= 5) {
delete s_ambush;
delete ambtimer;
} else {
ambtimer++;
}
if ((obj.atk == 1) && (obj.stun == null)) {
if (obj._x > player._x) {
obj._xscale = 100;
if (Math.abs(obj._y - player._y) < 20) {
obj.gotoAndStop(3 + monanim);
obj._x = obj._x - spd;
} else if (Math.abs(obj._x - player._x) < 20) {
if (obj._y > player._y) {
obj.gotoAndStop(5 + monanim);
obj._y = obj._y - spd;
} else {
obj.gotoAndStop(1 + monanim);
obj._y = obj._y + spd;
}
} else if (obj._y > player._y) {
obj.gotoAndStop(4 + monanim);
obj._y = obj._y - spd;
obj._x = obj._x - spd;
} else if (obj._y < player._y) {
obj.gotoAndStop(2 + monanim);
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 + monanim);
obj._x = obj._x + spd;
} else if (obj._y > player._y) {
obj.gotoAndStop(4 + monanim);
obj._y = obj._y - spd;
obj._x = obj._x + spd;
} else if (obj._y < player._y) {
obj.gotoAndStop(2 + monanim);
obj._y = obj._y + spd;
obj._x = obj._x + spd;
}
}
}
}
}
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 - 20;
_root.sounditem.gotoAndStop(4);
_root["purge" + itemuse].gotoAndPlay(1);
_root["purge" + itemuse].lx = 1;
}
}
if (beef_use == 1) {
chat("You 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("You 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("You 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] = "Tall Shield";
itemMsg[29] = "Bamboo Shield";
itemMsg[30] = "Steel Shield";
itemMsg[31] = "Hide Shield";
itemMsg[32] = "Brass Shield";
itemMsg[33] = "Titanium Shield";
itemMsg[34] = "Light Buckler";
itemMsg[35] = "Basic Buckler";
itemMsg[36] = "Heavy Buckler";
itemMsg[37] = "Amber Buckler";
itemMsg[38] = "Enchanted Buckler";
itemMsg[39] = "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 charshadowfunc() {
if (high == null) {
_root.char1.duplicateMovieClip("charshadow" + pointsnum, 620 + pointsnum);
if (_root["charshadow" + pointsnum].lx == null) {
_root["charshadow" + pointsnum]._x = _root.char1._x;
_root["charshadow" + pointsnum]._y = _root.char1._y;
_root["charshadow" + pointsnum].gotoAndStop(_root.char1._currentframe);
_root["charshadow" + pointsnum]._alpha = 80;
_root["charshadow" + pointsnum].down.gotoAndStop(_root.char1.down._currentframe);
_root["charshadow" + pointsnum].downdiag.gotoAndStop(_root.char1.downdiag._currentframe);
_root["charshadow" + pointsnum].side.gotoAndStop(_root.char1.side._currentframe);
_root["charshadow" + pointsnum].updiag.gotoAndStop(_root.char1.updiag._currentframe);
_root["charshadow" + pointsnum].up.gotoAndStop(_root.char1.up._currentframe);
_root["charshadow" + pointsnum].downa.gotoAndStop(3);
_root["charshadow" + pointsnum].downdiaga.gotoAndStop(3);
_root["charshadow" + pointsnum].sidea.gotoAndStop(3);
_root["charshadow" + pointsnum].updiaga.gotoAndStop(3);
_root["charshadow" + pointsnum].upa.gotoAndStop(3);
_root["charshadow" + pointsnum].lx = 1;
}
}
}
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 + monanim);
}
if (enemy.move == 2) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y + spd;
animate(enemy, 2 + monanim);
enemy._xscale = -100;
}
if (enemy.move == 3) {
enemy._x = enemy._x + spd;
animate(enemy, 3 + monanim);
enemy._xscale = -100;
}
if (enemy.move == 4) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y - spd;
animate(enemy, 4 + monanim);
enemy._xscale = -100;
}
if (enemy.move == 5) {
enemy._y = enemy._y - spd;
animate(enemy, 5 + monanim);
}
if (enemy.move == 6) {
enemy._y = enemy._y - spd;
enemy._x = enemy._x - spd;
animate(enemy, 4 + monanim);
enemy._xscale = 100;
}
if (enemy.move == 7) {
enemy._x = enemy._x - spd;
animate(enemy, 3 + monanim);
enemy._xscale = 100;
}
if (enemy.move == 8) {
enemy._x = enemy._x - spd;
enemy._y = enemy._y + spd;
animate(enemy, 2 + monanim);
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() * (1 + _root.floor));
enemydeath = 1;
enemy.health = 30;
}
}
plimit = 10;
_root["nme_hitpoints" + pointsnum].display = damage;
}
function game_class() {
if (class == null) {
class = 1;
}
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(625 * level);
while (gamestrt < 4) {
level++;
chat("You've gained an insight", 30, 5);
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;
}
gamestrt++;
}
if (tnl == null) {
stats_exp = 0;
tnl = Math.ceil(625 * level);
}
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 - 20;
_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;
}
if ((stats_mana >= furyLevel[flvl + 1]) && (flvl < 3)) {
flvl++;
chat(("You've learned " + furyLeveltext[flvl]) + " Fury", 30, 5);
}
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;
}
if (class == 1) {
stats_str = stats_str + 1;
stats_dex = Math.ceil(stats_str / 3);
input_agi = input_agi + 1;
delete stats_exp;
delete stats_ro_exp;
}
if (class == 2) {
stats_str = stats_str + 1;
stats_dex = Math.ceil(stats_str / 3);
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;
}
if (class == 1) {
dex_readout = Math.ceil(4 + stats_dex);
str_readout = Math.ceil(4 + (stats_str / 2)) + m_buff;
agi_readout = Math.ceil(4 + stats_str);
}
if (class == 2) {
dex_readout = Math.ceil(4 + stats_dex);
str_readout = Math.ceil(4 + stats_str);
agi_readout = Math.ceil(4 + (stats_str / 2));
}
}
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 ambush(obj) {
if (((obj._currentframe == 2) || (obj._currentframe == 7)) || (obj._currentframe == 12)) {
obj._y = obj._y + 50;
if (obj._xscale == 100) {
obj._x = obj._x - 50;
obj._xscale = -100;
} else if (obj._xscale == -100) {
obj._x = obj._x + 50;
obj._xscale = 100;
}
obj.gotoAndStop(obj._currentframe + 2);
_root.sounditem.gotoAndStop(4);
} else if (((obj._currentframe == 4) || (obj._currentframe == 9)) || (obj._currentframe == 14)) {
obj._y = obj._y - 50;
if (obj._xscale == 100) {
obj._x = obj._x - 50;
obj._xscale = -100;
} else if (obj._xscale == -100) {
obj._x = obj._x + 50;
obj._xscale = 100;
}
obj.gotoAndStop(obj._currentframe - 2);
_root.sounditem.gotoAndStop(4);
}
if (((obj._currentframe == 1) || (obj._currentframe == 6)) || (obj._currentframe == 11)) {
obj._y = obj._y + 50;
obj.gotoAndStop(obj._currentframe + 4);
_root.sounditem.gotoAndStop(4);
} else if (((obj._currentframe == 5) || (obj._currentframe == 10)) || (obj._currentframe == 15)) {
obj._y = obj._y - 50;
obj.gotoAndStop(obj._currentframe - 4);
_root.sounditem.gotoAndStop(4);
}
if (((obj._currentframe == 3) || (obj._currentframe == 8)) || (obj._currentframe == 13)) {
if (obj._xscale == -100) {
obj._x = obj._x + 50;
if (obj._xscale == 100) {
obj._xscale = -100;
} else {
obj._xscale = 100;
_root.sounditem.gotoAndStop(4);
}
} else {
obj._x = obj._x - 50;
if (obj._xscale == 100) {
obj._xscale = -100;
} else {
obj._xscale = 100;
_root.sounditem.gotoAndStop(4);
}
}
}
}
function attack(obj, auto, aspd, atk) {
if (Key.isDown(83)) {
if (s_inputDelay == null) {
if (s_ambush == 1) {
if (obj._currentframe > 5) {
if (obj._currentframe > 10) {
obj.gotoAndStop(obj._currentframe - 5);
obj.gotoAndStop(obj._currentframe + 5);
ambush(obj);
atk._x = obj._x;
atk._y = obj._y - 20;
} else {
obj.gotoAndStop(obj._currentframe + 5);
ambush(obj);
atk._x = obj._x;
atk._y = obj._y - 20;
}
}
}
s_inputDelay = 1;
}
} else {
delete s_inputDelay;
}
if (atimer == null) {
} else {
atimer++;
}
if (atimer >= (aspd * game_speed)) {
delete inputDelay;
delete atimer;
if ((input == null) && (Key.isDown(65))) {
atk._x = obj._x;
atk._y = obj._y - 20;
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 input;
}
if (Key.isDown(65) || (Key.isDown(32))) {
if (atimer == null) {
atimer++;
}
if (inputDelay == null) {
if (obj._currentframe > 5) {
if (obj._currentframe > 10) {
obj.gotoAndStop(obj._currentframe - 5);
obj.gotoAndStop(obj._currentframe + 5);
} else {
obj.gotoAndStop(obj._currentframe + 5);
}
}
atk._x = obj._x;
atk._y = obj._y - 20;
inputDelay = 1;
}
if (auto == null) {
}
} else {
if (atimer > aspd) {
delete input;
delete atimer;
}
if (x == 8) {
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 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.gui_player_hbar.duplicateMovieClip("hp_bar1", 500);
_root.soundbgm.duplicateMovieClip("soundbgm1", 120);
_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 [" + str_readout) + "]AGI [") + agi_readout) + "]DEX [") + dex_readout) + "]";
if (stats_exp == null) {
stats_exp = 0;
}
}
_root.MRO4 = "HELLO" + dun_createdMap.toString();
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 (_root.plHpDis == null) {
} else if (_root.plHpDis > 1) {
_root.plHpDis--;
} else {
delete _root.plHpDis;
}
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);
}
if (_root.plHpDis == null) {
_root.plHpDis = 500;
} else {
_root.plHpDis = 500;
}
_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 - 20;
_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 - 20;
_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 - 20;
_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 - 20;
_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 - 20;
_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 - 20;
_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 - 20;
_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;
_root["ambushnme_hitpoints" + pointsnum].display = damage;
}
function game_hitDetect_castle(obj, atk, enemy, provoke) {
hitDetect_castle(obj, atk, enemy, provoke);
}
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_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_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 hitDetect_dungeon(obj, atk, enemy, npc) {
function enemy_end() {
if (enemy.health == null) {
} else if (enemy.health <= 0) {
if (pointsnum == null) {
pointsnum = 1;
}
if (pointsnum >= 10) {
pointsnum = 1;
} else {
pointsnum++;
}
_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 - 20;
_root["damage_end" + pointsnum].lx = 1;
}
if (order >= 4) {
order = 1;
} else {
order++;
}
ItemSpawn(enemyitem);
nmecreate++;
_root.item_.duplicateMovieClip("item" + nmecreate, 86 + nmecreate);
_root["item" + nmecreate].gotoAndStop(Math.ceil(Math.random() * (1 + _root.floor)));
_root["item" + nmecreate]._x = (Math.floor(enemy._x / 24) * 24) + 12;
_root["item" + nmecreate]._y = (Math.floor(enemy._y / 24) * 24) + 12;
value = enemy.exp;
if (level >= 99) {
stats_exp = tnl;
} else {
stats_exp = stats_exp + value;
}
chat(value + " Experience", 30, 5);
enemy._x = -999;
enemy._y = -999;
enemy.health = 30 * floor;
}
}
if (floor == null) {
floor = 1;
}
if (enemy.atk == null) {
spd = 2.5;
if (enemy.move == 1) {
enemy._y = enemy._y + spd;
animate(enemy, 1 + monanim);
}
if (enemy.move == 2) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y + spd;
animate(enemy, 2 + monanim);
enemy._xscale = -100;
}
if (enemy.move == 3) {
enemy._x = enemy._x + spd;
animate(enemy, 3 + monanim);
enemy._xscale = -100;
}
if (enemy.move == 4) {
enemy._x = enemy._x + spd;
enemy._y = enemy._y - spd;
animate(enemy, 4 + monanim);
enemy._xscale = -100;
}
if (enemy.move == 5) {
enemy._y = enemy._y - spd;
animate(enemy, 5 + monanim);
}
if (enemy.move == 6) {
enemy._y = enemy._y - spd;
enemy._x = enemy._x - spd;
animate(enemy, 4 + monanim);
enemy._xscale = 100;
}
if (enemy.move == 7) {
enemy._x = enemy._x - spd;
animate(enemy, 3 + monanim);
enemy._xscale = 100;
}
if (enemy.move == 8) {
enemy._x = enemy._x - spd;
enemy._y = enemy._y + spd;
animate(enemy, 2 + monanim);
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.stun == 1) {
enemy.move = 11;
delete enemy.atk;
delete enemy.ht;
if (enemy._currentframe > 5) {
enemy.gotoAndStop(enemy._currentframe - 5);
enemy.gotoAndStop(enemy._currentframe + 5);
} else {
enemy.gotoAndStop(enemy._currentframe + 5);
}
if (enemy.stunTimer >= (50 + enemy.thrownStun)) {
delete enemy.stun;
enemy.move = Math.ceil(Math.random() * 12);
delete enemy.thrownStun;
delete enemy.stunTimer;
} else {
enemy.stunTimer++;
}
}
if (enemy.ht >= enemy.ht_AI) {
delete enemy.atk;
delete enemy.ht;
delete enemy.static;
if ((enemy.atk == null) && (enemy.stun == 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.hb.hitTest(obj.hb) && (enemy.stun == null)) {
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.stat_health = 30 * floor;
enemy.health = enemy.stat_health;
}
enemy.exp = 30 * floor;
if (weaponarray == null) {
weaponLow = new Array();
weaponHigh = new Array();
weaponarray = 1;
}
weaponLow[14] = 5;
weaponHigh[14] = 10;
weaponLow[15] = 55;
weaponHigh[15] = 90;
weaponLow[16] = 50;
weaponHigh[16] = 85;
weaponLow[17] = 35;
weaponHigh[17] = 70;
weaponLow[18] = 150;
weaponHigh[18] = 200;
weaponLow[19] = 170;
weaponHigh[19] = 190;
if (equipArray[4] == null) {
weapon_abs = 100;
weapon_start = 100;
}
if ((class == 1) || (class == 2)) {
ptscan = 1;
while (ptscan < 11) {
if (_root["charshadow" + ptscan]._alpha <= 0) {
removeMovieClip(_root["charshadow" + ptscan]);
} else {
_root["charshadow" + ptscan]._alpha = _root["charshadow" + ptscan]._alpha - 0.001;
}
ptscan++;
}
}
damage2 = Math.ceil(damage * 0.2);
if (potencebuff == 1) {
} else {
po_buff = 0;
}
if (blessbuff == 1) {
bl_buff = 20;
} else {
bl_buff = 0;
}
if (shadowbuff == 1) {
sf_buff = 38;
} else {
sf_buff = 0;
}
if (mightbuff == 1) {
m_buff = 3;
} else {
m_buff = 0;
}
if (furybuff == 1) {
f_buff = lvl;
} else {
f_buff = 1;
}
if (invis_buff == 1) {
i_buff = 4;
} else {
i_buff = 1;
}
enemy_end();
ROU = (damage + "|") + enemy.health;
weapon_abs = Math.abs(weaponHigh[equipArray[4]] - weaponLow[equipArray[4]]);
weapon_start = weaponLow[equipArray[4]];
if (atk.hitTest(enemy)) {
plhitRate = (player_hitRate + Math.ceil(Math.random() * 100)) + (stats_dex + base_dex);
player_hitRate = 40;
if (plhitRate >= (100 - bl_buff)) {
_root.sound.gotoAndPlay(2);
if (Key.isDown(83)) {
damage = ((Math.ceil(((Math.random() * weapon_abs) + weapon_start) + ((stats_str + m_buff) + (base_str / 10))) * f_buff) * (2 + i_buff)) + po_buff;
po_buff = Math.ceil(damage * 0.2);
} else {
damage = (Math.ceil(((Math.random() * weapon_abs) + weapon_start) + ((stats_str + m_buff) + (base_str / 10))) * f_buff) + po_buff;
po_buff = Math.ceil(damage * 0.2);
}
_root.enemyRO = _root.enemyRO + (((((damage + ":") + enemy.health) + "current ") + (enemy.health - damage)) + "<br>");
_root.enemyRO2 = enemy.health;
enemy.health = enemy.health - damage;
if (class == 2) {
if (atkcounter >= meleenum) {
atk._x = 999;
atk._y = 999;
delete atkcounter;
} else {
atkcounter++;
}
} else {
atk._x = 999;
atk._y = 999;
}
delete invis_buff;
} else {
damage = "Miss!";
_root.enemyRO = _root.enemyRO + (((damage + ":") + enemy.health) + "<br>");
if (class == 2) {
if (atkcounter >= meleenum) {
atk._x = -200;
atk._y = -200;
delete atkcounter;
} else {
atkcounter++;
}
} else {
atk._x = -200;
atk._y = -200;
}
}
if (pointsnum == null) {
pointsnum = 1;
}
if (pointsnum >= 10) {
pointsnum = 1;
} else {
pointsnum++;
}
if (plhitRate >= 80) {
if (((s_ambush == 1) && (Key.isDown(83))) || (invis_buff == 1)) {
charshadowfunc();
_root.ambushnme_hitpoints.duplicateMovieClip("ambush_hitpoints" + pointsnum, 610 + pointsnum);
if (_root["ambush_hitpoints" + pointsnum].lx == null) {
_root["ambush_hitpoints" + pointsnum]._x = enemy._x;
_root["ambush_hitpoints" + pointsnum]._y = enemy._y - 20;
_root["ambush_hitpoints" + pointsnum].display = damage;
_root["ambush_hitpoints" + pointsnum].lx = 1;
}
_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 - 20;
_root["damage_mc" + pointsnum].lx = 1;
}
} else {
_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 - 20;
_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 - 20;
_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 - 20;
_root["nme_hitpoints" + pointsnum].lx = 1;
}
}
enemy_end();
}
plimit = 10;
_root["nme_hitpoints" + pointsnum].display = damage;
_root["ambushnme_hitpoints" + pointsnum].display = damage;
goldwindow = "GOLD:" + gold;
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, 6000, 7000, 5000, 6000, 7000, 30000, 30000, 10000, 20000, 30000, 40000, 50000, 10000, 20000, 30000, 40000, 50000, 60000, 0, 0, 0, 1, 2, 3, 20, 200, 400, 5, 150];
}
if (_root["npc_window_" + windowNum]._currentframe == 4) {
if ((Key.isDown(68) || ((m_input == 1) && (_root["npc_window_" + windowNum].button3.hitTest(_xmouse, _ymouse, true)))) || ((m_input == 1) && (_root["npc_window_" + windowNum].button5.hitTest(_xmouse, _ymouse, true)))) {
delete sellNum;
delete sellArraynum;
delete sellArray;
delete confirm;
delete s_move;
delete m_input;
_root["npc_window_" + windowNum].gotoAndStop(1);
}
if (!Key.isDown(83)) {
confirm = 1;
}
if ((((Key.isDown(83) && (confirm == 1)) && (_root["npc_window_" + windowNum]._currentframe == 4)) || (((m_input == 1) && (_root["npc_window_" + windowNum].button2.hitTest(_xmouse, _ymouse, true))) && (confirm == 1))) || (((m_input == 1) && (_root["npc_window_" + windowNum].button4.hitTest(_xmouse, _ymouse, true))) && (confirm == 1))) {
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);
delete m_input;
}
}
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))) || ((m_input == 1) && (_root["npc_window_" + windowNum].button2.hitTest(_xmouse, _ymouse, true)))) {
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;
delete m_input;
}
}
if (Key.isDown(65) || ((m_input == 1) && (_root["npc_window_" + windowNum].button1.hitTest(_xmouse, _ymouse, true)))) {
delete m_input;
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 (_root.hud_mc1.macro.button1.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 1;
}
if (_root.hud_mc1.macro.button2.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 2;
}
if (_root.hud_mc1.macro.button3.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 3;
}
if (_root.hud_mc1.macro.button4.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 4;
}
if (_root.hud_mc1.macro.button5.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 5;
}
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) || ((m_input == 1) && (_root["npc_window_" + windowNum].button1.hitTest(_xmouse, _ymouse, true)))) {
delete a_menu_input;
}
if ((s_menu_input == 1) || ((m_input == 1) && (_root["npc_window_" + windowNum].button2.hitTest(_xmouse, _ymouse, true)))) {
delete s_menu_input;
}
if ((f_menu_input == 1) || ((m_input == 1) && (_root["npc_window_" + windowNum].button3.hitTest(_xmouse, _ymouse, true)))) {
_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 ((!m_input) == 1) {
m_edit = 1;
}
if (!Key.isDown(65)) {
buyedit = 1;
}
if ((Key.isDown(65) && (buyedit == 1)) || (((m_input == 1) && (_root["npc_window_" + windowNum].button1.hitTest(_xmouse, _ymouse, true))) && (m_edit == 1))) {
if (sell_input3 == null) {
if (gold > buyPricelist[buyshopSelect]) {
buyArraynum[keys] = itemArrayNum[keys];
itemArraynum[keys] = buyshopSelect;
if (itemNum[keys] == null) {
itemNum[keys] = 1;
} else {
itemNum[keys] = 1;
}
_root.sounditem.gotoAndStop(3);
_root["npc_window_" + windowNum].gotoAndStop(2);
gold = gold - buyPricelist[buyshopSelect];
delete buyedit;
delete m_edit;
sell_input3 = 1;
}
}
} else {
delete sell_input3;
}
if (Key.isDown(68)) {
if ((f_input == null) || ((m_input == 1) && (_root["npc_window_" + windowNum].button3.hitTest(_xmouse, _ymouse, true)))) {
_root["npc_window_" + windowNum].gotoAndStop(2);
f_input = 1;
}
}
}
if (_root["npc_window_" + windowNum]._currentframe == 2) {
if (_root.hud_mc1.macro.button1.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 1;
}
if (_root.hud_mc1.macro.button2.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 2;
}
if (_root.hud_mc1.macro.button3.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 3;
}
if (_root.hud_mc1.macro.button4.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 4;
}
if (_root.hud_mc1.macro.button5.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
keys = 5;
}
if (view > 6) {
shopMenuArrowU = 1;
} else {
delete shopMenuArrowU;
}
if (view < buyArraynum.length) {
shopMenuArrowD = 1;
} else {
delete shopMenuArrowD;
}
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, 13, 45, 1, 48, 49, 46, 47, 14, 17, 20, 23, 15, 18, 21, 24, 16, 19, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38];
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 ((!m_input) == 1) {
m_edit = 1;
}
if (!Key.isDown(65)) {
buyedit = 1;
}
if ((Key.isDown(65) && (buyedit == 1)) || (((m_input == 1) && (_root["npc_window_" + windowNum].button1.hitTest(_xmouse, _ymouse, true))) && (m_edit == 1))) {
delete m_input;
if (sell_input == null) {
if (gold > buyPriceList[buyshopSelect]) {
buyArraynum[keys] = itemArrayNum[keys];
if (itemArraynum[keys] == buyshopSelect) {
itemNum[keys] = itemNum[keys] + 1;
delete buyedit;
delete m_edit;
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) || ((m_input == 1) && (_root["npc_window_" + windowNum].DOWN.hitTest(_xmouse, _ymouse, true)))) {
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) || ((m_input == 1) && (_root["npc_window_" + windowNum].UP.hitTest(_xmouse, _ymouse, true)))) {
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) || ((m_input == 1) && (_root["npc_window_" + windowNum].button3.hitTest(_xmouse, _ymouse, true)))) {
_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;
delete m_edit;
npc_msg = "Hello, how can I help you today?";
if ((a_menu_input == 1) || ((m_input == 1) && (_root["npc_window_" + windowNum].button1.hitTest(_xmouse, _ymouse, true)))) {
_root["npc_window_" + windowNum].gotoAndStop(2);
delete a_menu_input;
delete m_input;
}
if ((s_menu_input == 1) || ((m_input == 1) && (_root["npc_window_" + windowNum].button2.hitTest(_xmouse, _ymouse, true)))) {
_root["npc_window_" + windowNum].gotoAndStop(3);
delete s_menu_input;
delete m_input;
}
if (((f_menu_input == 1) && (_root["npc_window_" + windowNum]._currentframe == 1)) || ((m_input == 1) && (_root["npc_window_" + windowNum].button3.hitTest(_xmouse, _ymouse, true)))) {
removeMovieClip(_root["npc_window_" + windowNum]);
delete s_menu_input;
delete start_menu_input;
delete item_usage;
delete npc_menu;
delete f_menu_input;
delete m_input;
}
}
if (Key.isDown(83) || ((m_input == 1) && (_root["npc_window_" + windowNum].button2.hitTest(_xmouse, _ymouse, true)))) {
if ((s_menu_input == null) && (_root["npc_window_" + windowNum]._currentframe == 1)) {
s_menu_input = 1;
delete m_input;
}
} else {
delete s_menu_input;
}
if (Key.isDown(65) || ((m_input == 1) && (_root["npc_window_" + windowNum].button1.hitTest(_xmouse, _ymouse, true)))) {
if (a_menu_input == null) {
a_menu_input = 1;
}
} else {
delete a_menu_input;
}
if (Key.isDown(68) || ((m_input == 1) && (_root["npc_window_" + windowNum].button3.hitTest(_xmouse, _ymouse, true)))) {
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)) || ((m_command == 1) && (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 = 0;
_root["npc_window_" + windowNum]._y = 0;
npc_menu = 1;
s_menu_input = 2;
start_menu_input = 1;
if (obj._currentframe <= 5) {
obj.gotoAndStop(obj._currentframe + 5);
}
}
} else {
delete start_menu_input;
}
}
}
function game_hitDetect_dungeon(obj, atk, enemy, npc) {
hitDetect_dungeon(obj, atk, enemy, npc);
}
function game_items_dungeon(char) {
function thrower(spd, max, limit) {
function thrownarrayCreate(arrayfiller, spd) {
if (((_root.char1._currentframe == 1) || (_root.char1._currentframe == 6)) || (_root.char1._currentframe == 11)) {
thrownarrayx[arrayfiller] = 0;
thrownarrayy[arrayfiller] = spd;
}
if (((_root.char1._currentframe == 2) || (_root.char1._currentframe == 7)) || (_root.char1._currentframe == 12)) {
if (_root.char1._xscale == -100) {
thrownarrayx[arrayfiller] = spd;
} else {
thrownarrayx[arrayfiller] = -spd;
}
thrownarrayy[arrayfiller] = spd;
}
if (((_root.char1._currentframe == 3) || (_root.char1._currentframe == 8)) || (_root.char1._currentframe == 13)) {
if (_root.char1._xscale == -100) {
thrownarrayx[arrayfiller] = spd;
} else {
thrownarrayx[arrayfiller] = -spd;
}
thrownarrayy[arrayfiller] = 0;
}
if (((_root.char1._currentframe == 4) || (_root.char1._currentframe == 9)) || (_root.char1._currentframe == 14)) {
if (_root.char1._xscale == -100) {
thrownarrayx[arrayfiller] = spd;
} else {
thrownarrayx[arrayfiller] = -spd;
}
thrownarrayy[arrayfiller] = -spd;
}
if (((_root.char1._currentframe == 5) || (_root.char1._currentframe == 10)) || (_root.char1._currentframe == 15)) {
thrownarrayx[arrayfiller] = 0;
thrownarrayy[arrayfiller] = -spd;
}
}
if (thrownw == null) {
thrownw = 1;
thrownremCount = 1;
thrownI = 1;
thrownDamageArray = [0, 50, 0, 0, 1200, 0, 200, 1600, 2000, 800, 0, 100, 300, 15000, 100, 200, 5000, 1000, 30000, 1000, 5000, 6000, 7000, 5000, 6000, 7000, 30000, 30000, 10000, 20000, 30000, 40000, 50000, 10000, 20000, 30000, 40000, 50000, 60000, 0, 0, 0, 1, 2, 3, 20, 200, 400, 5, 150];
}
if (thrownArrayy == null) {
thrownArrayx = new Array();
thrownArrayy = new Array();
}
_root.thrownx._x = _root.char1._x;
_root.thrownx._y = _root.char1._y - 20;
thrownarrayCreate(thrownI, spd);
if (!Key.isDown(84)) {
delete thrownst;
delete thrownst2;
delete thrownTimer;
}
if (Key.isDown(84) && ((!ItemNum[keys]) <= 1)) {
if (thrownI >= limit) {
} else {
if (thrownst == null) {
thrownI++;
thrownst = 1;
delete secondfire;
}
if (thrownTimer >= max) {
thrownI++;
delete thrownTimer;
} else {
thrownTimer++;
}
delete thrownresetTimer;
}
}
if (_root.hud_mc1.macro._currentframe == keys) {
if (ItemNum[keys] <= 0) {
delete ItemNum[keys];
delete ItemArraynum[keys];
delete thrownht;
} else {
while (thrownw < thrownI) {
_root.thrownx.duplicateMovieClip("thrown" + thrownw, 40 + thrownw);
_root["thrown" + thrownw].item_.gotoAndStop(ItemArraynum[keys]);
ItemNum[keys] = ItemNum[keys] - 1;
thrownw++;
}
}
}
var thrownm;
while (thrownm < thrownI) {
_root["thrown" + thrownm]._y = _root["thrown" + thrownm]._y + thrownArrayy[thrownm];
_root["thrown" + thrownm]._x = _root["thrown" + thrownm]._x + thrownArrayx[thrownm];
thrownm++;
}
thrownRO = thrownArrayy[thrownI];
if (thrownremCount >= thrownI) {
var thrownrem = 1;
while (thrownrem < thrownI) {
removeMovieClip(_root["thrown" + thrownrem]);
thrownrem++;
}
delete thrownI;
delete thrownw;
delete thrownremCount;
}
var thrownht;
while (thrownht < (thrownI + 1)) {
if ((((_root["thrown" + thrownht]._x >= (240 + (_root["thrown" + thrownht]._width + spd))) || (_root["thrown" + thrownht]._y >= (240 + (_root["thrown" + thrownht]._width + spd)))) || (_root["thrown" + thrownht]._x < (-(_root["thrown" + thrownht]._width + spd)))) || (_root["thrown" + thrownht]._y < (-(_root["thrown" + thrownht]._width + spd)))) {
if (!Key.isDown(84)) {
secondfire = 1;
}
if (Key.isDown(84)) {
if (thrownremCount < 2) {
} else {
thrownremCount--;
}
if (thrownst2 == null) {
if (secondfire == 1) {
_root["thrown" + thrownht]._xscale = 100;
_root["thrown" + thrownht]._yscale = 100;
_root["thrown" + thrownht]._x = _root.char1._x + thrownArrayx[thrownht];
_root["thrown" + thrownht]._y = (_root.char1._y - 20) + thrownArrayy[thrownht];
delete secondfire;
}
thrownst2 = 1;
}
if (remthrownTimer >= max) {
if (secondfire == 1) {
_root["thrown" + thrownht]._xscale = 100;
_root["thrown" + thrownht]._yscale = 100;
_root["thrown" + thrownht]._x = _root.char1._x + thrownArrayx[thrownht];
_root["thrown" + thrownht]._y = (_root.char1._y - 20) + thrownArrayy[thrownht];
delete secondfire;
}
delete remthrownTimer;
} else {
remthrownTimer++;
}
thrownarrayCreate(thrownht, spd);
} else {
if (thrownremCount >= max) {
secondfire = 1;
}
thrownremCount++;
_root["thrown" + thrownht]._xscale = 1;
_root["thrown" + thrownht]._yscale = 1;
_root["thrown" + thrownht]._x = _root.char1._x;
_root["thrown" + thrownht]._y = _root.char1._y - 20;
}
}
var stunht = 1;
while (stunht < 5) {
if (_root["enemy" + stunht].hb.hitTest(_root["thrown" + thrownht])) {
thrownnme = 3;
thrownStun = Math.ceil(Math.random() * 2);
if (thrownStun >= 2) {
thrownDmg = 1;
_root["enemy" + stunht].stun = 1;
_root["enemy" + stunht].thrownStun = 100;
_root["enemy" + stunht].stunTimer = 1;
} else {
thrownDmg = thrownDamageArray[_root["thrown" + thrownht].item_._currentframe];
}
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
_root.sound.gotoAndPlay(2);
_root["enemy" + stunht].health = _root["enemy" + stunht].health - thrownDmg;
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints_mc" + itemuse, 650 + itemuse);
if (_root["nme_hitpoints_mc" + itemuse].lx == null) {
_root["nme_hitpoints_mc" + itemuse].display = thrownDmg;
_root["nme_hitpoints_mc" + itemuse].lx = 1;
}
_root["nme_hitpoints_mc" + itemuse]._x = _root["enemy" + stunht]._x;
_root["nme_hitpoints_mc" + itemuse]._y = _root["enemy" + stunht]._y - 20;
_root["thrown" + thrownht]._x = -999;
}
stunht++;
}
thrownht++;
}
}
function spells_target() {
function mousetarg(obj, value) {
if (obj.hitTest(_xmouse, _ymouse, true) && (m_input == 1)) {
order = value;
}
}
if (targuse >= 10) {
targuse = 1;
}
if (_root["targ" + targuse].lx == null) {
targuse = 1;
_root.targ.duplicateMovieClip("targ" + targuse, 90300 + targuse);
_root["targ" + targuse].lx = 1;
}
if (itemuse >= 10) {
itemuse = 1;
}
if (order == null) {
order = 0;
}
targloop = 1;
while (targloop < 4) {
if ((order >= 5) && (zap_t_use == null)) {
order = 0;
}
if (((order == 0) && (zap_t_use == 1)) || ((order == 5) && (zap_t_use == 1))) {
if ((left_input == null) && (right_input == null)) {
order = 1;
}
if (left_input == 1) {
order = 4;
}
if (right_input == 1) {
order = 1;
}
}
if (((((_root.enemy1._x >= 241) && (order == 1)) || ((_root.enemy1._x < 0) && (order == 1))) || ((root.enemy1._y >= 241) && (order == 1))) || ((_root.enemy1._y < 0) && (order == 1))) {
if ((left_input == null) && (right_input == null)) {
order++;
}
if (right_input == 1) {
order++;
}
if (left_input == 1) {
order--;
}
}
if (((((_root.enemy2._x >= 241) && (order == 2)) || ((_root.enemy2._x < 0) && (order == 2))) || ((_root.enemy2._y >= 241) && (order == 2))) || ((_root.enemy2._y < 0) && (order == 2))) {
if ((left_input == null) && (right_input == null)) {
order++;
}
if (right_input == 1) {
order++;
}
if (left_input == 1) {
order--;
}
}
if (((((_root.enemy3._x >= 241) && (order == 3)) || ((_root.enemy3._x < 0) && (order == 3))) || ((_root.enemy3._y >= 241) && (order == 3))) || ((_root.enemy3._y < 0) && (order == 3))) {
if ((left_input == null) && (right_input == null)) {
order++;
}
if (right_input == 1) {
order++;
}
if (left_input == 1) {
order--;
}
}
if (((((_root.enemy4._x >= 241) && (order == 4)) || ((_root.enemy4._x < 0) && (order == 4))) || ((_root.enemy4._y >= 241) && (order == 4))) || ((_root.enemy4._y < 0) && (order == 4))) {
if ((left_input == null) && (right_input == null)) {
order++;
}
if (right_input == 1) {
order++;
}
if (left_input == 1) {
order--;
}
}
targloop++;
}
if ((((_root.enemy1._x < 0) && (_root.enemy2._x < 0)) && (_root.enemy3._x < 0)) && (_root.enemy4._x < 0)) {
} else {
mousetarg(_root.enemy1, 1);
mousetarg(_root.enemy2, 2);
mousetarg(_root.enemy3, 3);
mousetarg(_root.enemy4, 4);
if (Key.isDown(37) || (Key.isDown(38))) {
if (left_input == null) {
if (order <= 0) {
order = 4;
} else {
order--;
}
left_input = 1;
}
} else {
delete left_input;
}
}
if (Key.isDown(39) || (Key.isDown(40))) {
if (right_input == null) {
if (order >= 4) {
order = 0;
} else {
order++;
}
right_input = 1;
}
} else {
delete right_input;
}
if (order == 0) {
_root.targ1._y = _root.char1._y - 20;
_root.targ1._x = _root.char1._x;
} else {
_root.targ1._y = _root["enemy" + order]._y - 20;
_root.targ1._x = _root["enemy" + order]._x;
_root.targ1._yscale = _root["enemy" + order]._yscale;
_root.targ1._xscale = _root["enemy" + order]._xscale;
}
}
function defense_target(obj) {
_root["targ" + targuse]._x = obj._x;
_root["targ" + targuse]._y = obj._y - 20;
_root["targ" + targuse]._xscale = obj._xscale;
_root["targ" + targuse]._yscale = obj._yscale;
}
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 - 20;
_root.sounditem.gotoAndStop(4);
_root["purge" + itemuse].gotoAndPlay(1);
_root["purge" + itemuse].lx = 1;
}
}
function zapuse(obj, multiple) {
zap = 25;
if (order == 0) {
if (multiple == 1) {
} else {
player_health = player_health - zap;
}
} else if (multiple == 1) {
} else {
_root["enemy" + order].health = _root["enemy" + order].health - zap;
}
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
_root.nme_hitpoints.duplicateMovieClip("nme_hitpoints_mc" + itemuse, 650 + itemuse);
_root.zap_effect_mc.duplicateMovieClip("zap" + itemuse, 1010 + itemuse);
if (_root["nme_hitpoints_mc" + itemuse].lx == null) {
_root["nme_hitpoints_mc" + itemuse].display = zap;
_root["nme_hitpoints_mc" + itemuse].lx = 1;
}
_root["nme_hitpoints_mc" + itemuse]._x = obj._x;
_root["nme_hitpoints_mc" + itemuse]._y = obj._y - 20;
if (_root["zap" + itemuse].lx == null) {
_root.soundspell.gotoAndStop(2);
_root["zap" + itemuse].gotoAndPlay(1);
_root["zap" + itemuse].lx = 1;
}
_root["zap" + itemuse]._x = obj._x;
_root["zap" + itemuse]._y = obj._y - 20;
}
function potenceuse(obj) {
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
if (_root["flank_mc" + itemuse].lx == null) {
_root.flank_mc.duplicateMovieClip("flank_mc" + itemuse, 770 + itemuse);
_root["flank_mc" + itemuse].gotoAndPlay(1);
_root.soundspell.gotoAndStop(4);
_root["flank_mc" + itemuse].lx = 1;
}
_root["flank_mc" + itemuse]._x = obj._x;
_root["flank_mc" + itemuse]._y = obj._y - 20;
}
function blessuse(obj) {
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
if (_root["flank_mc" + itemuse].lx == null) {
_root.flank_mc.duplicateMovieClip("flank_mc" + itemuse, 750 + itemuse);
_root["flank_mc" + itemuse].gotoAndPlay(1);
_root.soundspell.gotoAndStop(5);
_root["flank_mc" + itemuse].lx = 1;
}
_root["flank_mc" + itemuse]._x = obj._x;
_root["flank_mc" + itemuse]._y = obj._y - 20;
}
function shadowuse(obj) {
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
if (_root["flank_mc" + itemuse].lx == null) {
_root.flank_mc.duplicateMovieClip("flank_mc" + itemuse, 730 + itemuse);
_root["flank_mc" + itemuse].gotoAndPlay(1);
_root.soundspell.gotoAndStop(5);
_root["flank_mc" + itemuse].lx = 1;
}
_root["flank_mc" + itemuse]._x = obj._x;
_root["flank_mc" + itemuse]._y = obj._y - 20;
}
function mightuse(obj) {
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
if (_root["fury_effect_mc" + itemuse].lx == null) {
_root.fury_effect_mc.duplicateMovieClip("fury_effect_mc" + itemuse, 750 + itemuse);
_root["fury_effect_mc" + itemuse].gotoAndPlay(1);
_root.sounditem.gotoAndStop(4);
_root["fury_effect_mc" + itemuse].lx = 1;
}
_root["fury_effect_mc" + itemuse]._x = obj._x;
_root["fury_effect_mc" + itemuse]._y = obj._y - 20;
}
function furyuse(obj) {
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
if (_root["fury_effect_mc" + itemuse].lx == null) {
_root.fury_effect_mc.duplicateMovieClip("fury_effect_mc" + itemuse, 710 + itemuse);
_root["fury_effect_mc" + itemuse].gotoAndPlay(1);
_root.sounditem.gotoAndStop(4);
_root["fury_effect_mc" + itemuse].lx = 1;
}
_root["fury_effect_mc" + itemuse]._x = obj._x;
_root["fury_effect_mc" + itemuse]._y = obj._y - 20;
}
function flankuse(obj) {
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
if (order == 0) {
if (flank_buff == 1) {
if (meleenum >= 2) {
} else {
if (_root["flank_mc" + itemuse].lx == null) {
_root.flank_mc.duplicateMovieClip("flank_mc" + itemuse, 680 + itemuse);
_root.soundspell.gotoAndStop(4);
_root["flank_mc" + itemuse].gotoAndPlay(1);
_root["flank_mc" + itemuse].lx = 1;
}
_root["flank_mc" + itemuse]._x = obj._x;
_root["flank_mc" + itemuse]._y = obj._y - 20;
flanktimer = 6250;
meleenum = 2;
}
} else {
if (_root["flank_mc" + itemuse].lx == null) {
_root.flank_mc.duplicateMovieClip("flank_mc" + itemuse, 680 + itemuse);
_root.soundspell.gotoAndStop(4);
_root["flank_mc" + itemuse].gotoAndPlay(1);
_root["flank_mc" + itemuse].lx = 1;
}
_root["flank_mc" + itemuse]._x = obj._x;
_root["flank_mc" + itemuse]._y = obj._y - 20;
flanktimer = 6250;
flank_buff = 1;
meleenum = 1;
}
}
}
function invisuse(obj) {
if (order == 0) {
if (invis_buff == 1) {
delete auto_invis;
delete invis_buff;
} else {
if ((invistimer == null) || (invistimer < 1560)) {
invistimer = 1560;
}
invis_buff = 1;
auto_invis = 1;
}
}
}
function healuse(obj) {
_root.plHpDis = 500;
heal = 50;
if (order == 0) {
if ((player_health + heal) >= stats_health) {
player_health = stats_health;
} else {
player_health = player_health + heal;
}
} else if (_root["enemy" + order].health >= _root["enemy" + order].stats_health) {
_root["enemy" + order].health = _root["enemy" + order].stats_health;
} else {
_root["enemy" + order].health = _root["enemy" + order].health + heal;
}
if (itemuse >= 10) {
itemuse = 1;
} else {
itemuse++;
}
_root.healpoints_mc.duplicateMovieClip("healpoints_mc" + itemuse, 650 + itemuse);
_root.heal_effect_mc.duplicateMovieClip("heal" + itemuse, 1010 + itemuse);
if (_root["healpoints_mc" + itemuse].lx == null) {
_root["healpoints_mc" + itemuse].display = heal;
_root["healpoints_mc" + itemuse].lx = 1;
}
_root["healpoints_mc" + itemuse]._x = obj._x;
_root["healpoints_mc" + itemuse]._y = obj._y - 20;
if (_root["heal" + itemuse].lx == null) {
_root.sounditem.gotoAndStop(4);
_root["heal" + itemuse].gotoAndPlay(1);
_root["heal" + itemuse].lx = 1;
}
_root["heal" + itemuse]._x = obj._x;
_root["heal" + itemuse]._y = obj._y - 20;
}
function itemfiller(value) {
function create() {
_root.item_.duplicateMovieClip("item" + nmecreate, 88 + nmecreate);
_root["item" + nmecreate].gotoAndStop(ItemArraynum[value]);
_root["item" + nmecreate]._x = (Math.floor(_root.char1._x / 24) * 24) + 12;
_root["item" + nmecreate]._y = (Math.floor(_root.char1._y / 24) * 24) + 12;
}
if (_root.item1._x == null) {
nmecreate = 1;
create();
} else if (_root.item2._x == null) {
nmecreate = 2;
create();
} else if (_root.item3._x == null) {
nmecreate = 3;
create();
} else if (_root.item4._x == null) {
nmecreate = 4;
create();
} else if (_root.item5._x == null) {
nmecreate = 5;
create();
} else if (_root.item6._x == null) {
nmecreate = 6;
create();
} else if (_root.item7._x == null) {
nmecreate = 7;
create();
} else if (_root.item8._x == null) {
nmecreate = 8;
create();
} else if (_root.item9._x == null) {
nmecreate = 9;
create();
} else if (_root.item10._x == null) {
nmecreate = 10;
create();
}
}
function dropEngine(value) {
if (prevItem == value) {
if (ItemNum[value] <= 0) {
if ((!ItemArraynum[value]) == null) {
if (_root["item" + nmecreate]._x == null) {
if (nmecreate >= 10) {
chat("Cannot Drop More Items.", 30, 5);
} else {
ItemNum[value] = ItemNum[value] - 1;
chat(((("You dropped " + itemMsg[ItemArraynum[value]]) + "(") + "1") + ")", 30, 5);
itemfiller(value);
}
}
if (_root["item" + nmecreate].number == null) {
chat(((("You dropped " + itemMsg[ItemArraynum[value]]) + "(") + "1") + ")", 30, 5);
ItemNum[value] = ItemNum[value] - 1;
_root["item" + nmecreate].number = 2;
_root["item" + nmecreate].gotoAndStop(ItemArraynum[value]);
_root["item" + nmecreate]._x = (Math.floor(_root.char1._x / 24) * 24) + 12;
_root["item" + nmecreate]._y = (Math.floor(_root.char1._y / 24) * 24) + 12;
} else {
chat(((("You dropped " + itemMsg[ItemArraynum[value]]) + "(") + "1") + ")", 30, 5);
ItemNum[value] = ItemNum[value] - 1;
_root["item" + nmecreate].number++;
_root["item" + nmecreate].gotoAndStop(ItemArraynum[value]);
_root["item" + nmecreate]._x = (Math.floor(_root.char1._x / 24) * 24) + 12;
_root["item" + nmecreate]._y = (Math.floor(_root.char1._y / 24) * 24) + 12;
}
delete ItemArraynum[value];
delete ItemNum[value];
}
} else if (_root["item" + nmecreate].number == null) {
ItemNum[value] = ItemNum[value] - 1;
chat(((("You dropped " + itemMsg[ItemArraynum[value]]) + "(") + ItemNum[value]) + ")", 30, 5);
_root["item" + nmecreate].number = 2;
_root["item" + nmecreate].gotoAndStop(ItemArraynum[value]);
_root["item" + nmecreate]._x = (Math.floor(_root.char1._x / 24) * 24) + 12;
_root["item" + nmecreate]._y = (Math.floor(_root.char1._y / 24) * 24) + 12;
} else {
ItemNum[value] = ItemNum[value] - 1;
chat(((("You dropped " + itemMsg[ItemArraynum[value]]) + "(") + ItemNum[value]) + ")", 30, 5);
_root["item" + nmecreate].number++;
_root["item" + nmecreate].gotoAndStop(ItemArraynum[value]);
_root["item" + nmecreate]._x = (Math.floor(_root.char1._x / 24) * 24) + 12;
_root["item" + nmecreate]._y = (Math.floor(_root.char1._y / 24) * 24) + 12;
}
} else if (ItemNum[value] <= 0) {
if ((!ItemArraynum[value]) == null) {
if (nmecreate >= 10) {
chat("Cannot Drop More Items.", 30, 5);
} else {
ItemNum[value] = ItemNum[value] - 1;
chat(((("You dropped " + itemMsg[ItemArraynum[value]]) + "(") + "0") + ")", 30, 5);
itemfiller(value);
}
delete ItemArraynum[value];
delete ItemNum[value];
prevItem = value;
}
} else if (nmecreate >= 10) {
chat("Cannot Drop More Items.", 30, 5);
} else {
ItemNum[value] = ItemNum[value] - 1;
chat(((("You dropped " + itemMsg[ItemArraynum[value]]) + "(") + ItemNum[value]) + ")", 30, 5);
chat("Trace problem(0)", 30, 5);
itemfiller(value);
prevItem = value;
}
}
function spellUseEngine(value) {
if (spellArray[value] == 56) {
blesscombo = 1;
order = 0;
}
if (spellArray[value] == 55) {
potence_use = 1;
order = 0;
}
if (spellArray[value] == 54) {
bless_use = 1;
order = 0;
}
if (spellArray[value] == 53) {
mightcombo = 1;
order = 0;
}
if (spellArray[value] == 52) {
shadow_use = 1;
order = 0;
}
if (spellArray[value] == 51) {
might_use = 1;
order = 0;
}
if (spellArray[value] == 50) {
fury_use = 1;
order = 0;
}
if (spellArray[value] == 44) {
flank_use = 1;
order = 0;
}
if (spellArray[value] == 43) {
invis_use = 1;
order = 0;
}
if (spellArray[value] == 40) {
heal_use = 1;
order = 0;
}
if (spellArray[value] == 41) {
heal_t_use = 1;
}
if (spellArray[value] == 42) {
zap_t_use = 1;
}
}
function equipdropEngine(value) {
if (equipArray[value] == null) {
} else if (((((itemArraynum[1] == null) || (itemArraynum[2] == null)) || (itemArraynum[3] == null)) || (itemArraynum[4] == null)) || (itemArraynum[5] == null)) {
enemydeath = 1;
enemyitem = equipArray[value];
equipArray[value] = null;
} else {
chat("Can't Remove; Your Inventory is full", 30, 5);
}
}
function useEngine(value) {
_root.t = _root.hud_mc1.macro._currentframe;
if (useitem == null) {
if (_root.hud_mc1.macro._currentframe == value) {
if (ItemArraynum[value] == 42) {
zap_t_use = 1;
}
if (ItemArraynum[value] == 40) {
heal_use = 1;
}
if (ItemArraynum[value] == 41) {
heal_t_use = 1;
}
if (((ItemArraynum[value] == 7) || (ItemArraynum[value] == 9)) || (ItemArraynum[value] == 12)) {
craft_use = 1;
}
if ((((((((((((((((((((((((((((ItemArraynum[value] == 14) || (ItemArraynum[value] == 15)) || (ItemArraynum[value] == 16)) || (ItemArraynum[value] == 17)) || (ItemArraynum[value] == 18)) || (ItemArraynum[value] == 19)) || (ItemArraynum[value] == 20)) || (ItemArraynum[value] == 21)) || (ItemArraynum[value] == 22)) || (ItemArraynum[value] == 23)) || (ItemArraynum[value] == 24)) || (ItemArraynum[value] == 25)) || (ItemArraynum[value] == 4)) || (ItemArraynum[value] == 8)) || (ItemArraynum[value] == 11)) || (ItemArraynum[value] == 26)) || (ItemArraynum[value] == 27)) || (ItemArraynum[value] == 28)) || (ItemArraynum[value] == 29)) || (ItemArraynum[value] == 30)) || (ItemArraynum[value] == 31)) || (ItemArraynum[value] == 32)) || (ItemArraynum[value] == 33)) || (ItemArraynum[value] == 34)) || (ItemArraynum[value] == 35)) || (ItemArraynum[value] == 36)) || (ItemArraynum[value] == 37)) || (ItemArraynum[value] == 38)) {
armorNum = itemArraynum[value];
armor_use = 1;
}
if (ItemArraynum[value] == 48) {
wine_use = 1;
}
if (ItemArraynum[value] == 47) {
herbp_use = 1;
}
if (ItemArraynum[value] == 46) {
sonhip_use = 1;
}
if (ItemArraynum[value] == 45) {
liver_use = 1;
}
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;
}
if (craft_use == 1) {
} else {
ItemNum[value] = ItemNum[value] - 1;
}
if (ItemNum[value] <= 0) {
delete ItemArraynum[value];
delete ItemNum[value];
}
}
dropht = 1;
useitem = 1;
arraynum = 1;
}
}
function ArmorDrop(KEY1, KEY2, KEY3, KEY4, KEY5, KEY6) {
if (Key.isDown(KEY1)) {
if (a_key == null) {
keys = 1;
equipdropEngine(keys);
a_key = 1;
}
} else {
delete a_key;
}
if (Key.isDown(KEY2)) {
if (b_key == null) {
keys = 2;
equipdropEngine(keys);
b_key = 1;
}
} else {
delete b_key;
}
if (Key.isDown(KEY3)) {
if (c_key == null) {
keys = 3;
equipdropEngine(keys);
c_key = 1;
}
} else {
delete c_key;
}
if (Key.isDown(KEY4)) {
if (x_key == null) {
keys = 4;
equipdropEngine(keys);
x_key = 1;
}
} else {
delete x_key;
}
if (Key.isDown(KEY5)) {
if (e_key == null) {
keys = 5;
equipdropEngine(keys);
e_key = 1;
}
} else {
delete e_key;
}
}
function SpellUse(KEY1, KEY2, KEY3, KEY4, KEY5, KEY6) {
function mousehudspells(arg, mnum) {
if (arg) {
if (keys == mnum) {
if (_root.char1._currentframe <= 5) {
_root.char1.gotoAndStop(_root.char1._currentframe + 5);
}
spellUseEngine(keys);
delete m_input;
} else {
keys = mnum;
}
}
}
mousehudspells(_root.hud_mc1.spellList.item1.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 1);
mousehudspells(_root.hud_mc1.spellList.item2.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 2);
mousehudspells(_root.hud_mc1.spellList.item3.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 3);
mousehudspells(_root.hud_mc1.spellList.item4.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 4);
mousehudspells(_root.hud_mc1.spellList.item5.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 5);
if (Key.isDown(KEY1)) {
if (a_key == null) {
keys = 1;
spellUseEngine(keys);
a_key = 1;
}
} else {
delete a_key;
}
if (Key.isDown(KEY2)) {
if (b_key == null) {
keys = 2;
spellUseEngine(keys);
b_key = 1;
}
} else {
delete b_key;
}
if (Key.isDown(KEY3)) {
if (c_key == null) {
keys = 3;
spellUseEngine(keys);
c_key = 1;
}
} else {
delete c_key;
}
if (Key.isDown(KEY4)) {
if (x_key == null) {
keys = 4;
spellUseEngine(keys);
x_key = 1;
}
} else {
delete x_key;
}
if (Key.isDown(KEY5)) {
if (e_key == null) {
keys = 5;
spellUseEngine(keys);
e_key = 1;
}
} else {
delete e_key;
}
if (Key.isDown(KEY6)) {
if (s_key == null) {
keys = 6;
spellUseEngine(keys);
s_key = 1;
}
} else {
delete s_key;
}
}
function Inventory(KEY1, KEY2, KEY3, KEY4, KEY5, KEY6) {
function mousehud(arg, mnum) {
if (arg) {
if (keys == mnum) {
if (_root.char1._currentframe <= 5) {
_root.char1.gotoAndStop(_root.char1._currentframe + 5);
}
useEngine(keys);
delete m_input;
} else {
keys = mnum;
}
}
}
mousehud(_root.hud_mc1.macro.button1.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 1);
mousehud(_root.hud_mc1.macro.button2.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 2);
mousehud(_root.hud_mc1.macro.button3.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 3);
mousehud(_root.hud_mc1.macro.button4.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 4);
mousehud(_root.hud_mc1.macro.button5.hitTest(_xmouse, _ymouse, true) && (m_input == 1), 5);
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) {
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] + founditemnum;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[1]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[2] == enemyitem) {
itemNum[2] = itemNum[2] + founditemnum;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[2]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[3] == enemyitem) {
itemNum[3] = itemNum[3] + founditemnum;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[3]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[4] == enemyitem) {
itemNum[4] = itemNum[4] + founditemnum;
_root.sounditem.gotoAndStop(3);
chat(((itemMsg[enemyItem] + "(") + itemNum[4]) + ")", 30, 5);
removeMovieClip(obj);
} else if (itemArraynum[5] == enemyitem) {
itemNum[5] = itemNum[5] + founditemnum;
_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] + founditemnum;
_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;
}
}
thrower(12, 4, 5);
if (keys == null) {
keys = 1;
}
if (zap_t_use == 1) {
delete zapm;
delete zapnumber;
delete zap_m;
delete spell_input;
spells_target();
if (order >= 5) {
_root.targ1._y = -99999;
delete zap_t_use;
ItemNum[keys] = ItemNum[keys] + 1;
chat("Nothing to Attack", 30, 5);
}
if (Key.isDown(13) || (_root.targ1.hitTest(_xmouse, _ymouse, true) && (m_input == 1))) {
delete mousex;
delete mousey;
delete m_input;
delete m_command;
chat("You cast " + itemMsg[42], 30, 5);
spell_input = 1;
zap_m = 1;
}
}
if (zap_m == 1) {
if (spell_input == 1) {
delete zap_t_use;
if (order == 0) {
} else {
if (zapm >= 3) {
_root["enemy" + order].stun = 1;
_root["enemy" + order].stunTimer = 1;
_root.targ1._y = -99999;
_root["enemy" + order].health = _root["enemy" + order].health - zap;
zapuse(_root["enemy" + order], 1);
delete zapm;
zapnumber++;
} else if ((((_root.enemy1._x < 0) && (_root.enemy2._x < 0)) && (_root.enemy3._x < 0)) && (_root.enemy4._x < 0)) {
delete zapm;
delete zapnumber;
delete zap_m;
delete spell_input;
} else {
zapm++;
}
if (zapnumber >= 5) {
delete zapm;
delete zapnumber;
_root.targ1._y = -99999;
delete spell_input;
delete zap_m;
}
}
}
}
if (flanktimer == 1) {
if (meleenum == 1) {
chat("Side Attacks End", 30, 5);
} else {
chat("Back Attacks End", 30, 5);
chat("Side Attacks End", 30, 5);
}
delete meleenum;
delete flank_buff;
delete flanktimer;
} else {
flanktimer--;
}
if (invis_buff == 1) {
_root.char1._alpha = 25;
if (se_invis == null) {
_root.soundspell.gotoAndStop(3);
se_invis = 1;
}
} else {
delete invistimer;
_root.char1._alpha = 100;
delete se_invis;
if (auto_invis == 1) {
if ((invistimer == null) || (invistimer < 1560)) {
invistimer = 1560;
}
invis_buff = 1;
}
}
if (invistimer == null) {
} else if (invistimer <= 0) {
chat("You are no longer invisible", 30, 5);
delete invis_buff;
delete auto_invis;
delete invistimer;
} else {
invistimer--;
}
if (blesscombo == 1) {
if (blesstimer == null) {
bless_use = 1;
} else if (potencetimer == null) {
potence_use = 1;
} else if (meleenumber < 2) {
flank_use = 1;
}
delete blesscombo;
}
if (potence_use == 1) {
cost = 30;
if (player_mana > cost) {
if (potencetimer == null) {
potencetimer = 1850;
potencebuff = 1;
potenceuse(char);
chat("You cast " + itemMsg[55], 30, 5);
if (itemuse >= 10) {
itemuse = 1;
}
player_mana = player_mana - cost;
} else {
chat("You have already casted that", 30, 5);
}
} else {
chat("Not enough Mana", 30, 5);
}
delete potence_use;
}
if (potencetimer == null) {
} else if (potencetimer <= 0) {
chat("Your skill decreases", 30, 5);
delete potencebuff;
delete potencetimer;
} else {
potencetimer = potencetimer - 1;
}
if (bless_use == 1) {
cost = 60;
if (player_mana > cost) {
if (blesstimer == null) {
blesstimer = 3750;
blessbuff = 1;
blessuse(char);
chat("You cast " + itemMsg[54], 30, 5);
if (itemuse >= 10) {
itemuse = 1;
}
player_mana = player_mana - cost;
} else {
chat("You have already casted that", 30, 5);
}
} else {
chat("Not enough Mana", 30, 5);
}
delete bless_use;
}
if (blesstimer == null) {
} else if (blesstimer <= 0) {
chat("End of Blessing", 30, 5);
delete blessbuff;
delete blesstimer;
} else {
blesstimer = blesstimer - 1;
}
if (mightcombo == 1) {
if (mighttimer == null) {
might_use = 1;
} else if (shadowtimer == null) {
shadow_use = 1;
} else {
chat("You have already casted that", 30, 5);
}
delete mightcombo;
}
if (shadow_use == 1) {
cost = 60;
if (player_mana > cost) {
if (shadowtimer == null) {
shadowtimer = 6000;
shadowbuff = 1;
shadowuse(char);
chat("You cast " + itemMsg[52], 30, 5);
if (itemuse >= 10) {
itemuse = 1;
}
player_mana = player_mana - cost;
} else {
chat("You have already casted that", 30, 5);
}
} else {
chat("Not enough Mana", 30, 5);
}
delete shadow_use;
}
if (shadowtimer == null) {
} else if (shadowtimer <= 0) {
chat("Your speed decreases", 30, 5);
delete shadowbuff;
delete shadowtimer;
} else {
shadowtimer = shadowtimer - 1;
}
if (might_use == 1) {
cost = 30;
if (player_mana > cost) {
if (mighttimer == null) {
mighttimer = 1620;
mightbuff = 1;
mightuse(char);
chat("You cast " + itemMsg[51], 30, 5);
if (itemuse >= 10) {
itemuse = 1;
}
player_mana = player_mana - cost;
} else {
chat("You have already casted that", 30, 5);
}
} else {
chat("Not enough Mana", 30, 5);
}
delete might_use;
}
if (mighttimer == null) {
} else if (mighttimer <= 0) {
chat("Your muscles weaken", 30, 5);
delete mightbuff;
delete mighttimer;
} else {
mighttimer = mighttimer - 1;
}
if (furyLevel == null) {
furyLevel = new Array();
furyOutput = ["", 1, 2, 3];
furyPower = ["", 2, 3, 4];
furyLevel = [" ", 30, 90, 150];
furyLeveltext = [" ", "Wolf's ", "Tiger's ", "Dragon's "];
}
if (fury_use == 1) {
if (flvl == null) {
flvl = 1;
}
lvloutput = furyOutput[flvl];
lvl = furyPower[flvl];
cost = furyLevel[flvl];
if (player_mana > cost) {
if (furytimer == null) {
furytimer = 6250;
furybuff = 1;
furyuse(char);
chat(((((("You cast " + furyLeveltext[flvl]) + itemMsg[50]) + "") + "(Fury Level ") + flvl) + ")", 30, 5);
if (itemuse >= 10) {
itemuse = 1;
}
player_mana = player_mana - cost;
} else {
chat("You have already casted that", 30, 5);
}
} else {
chat("Not enough Mana", 30, 5);
}
delete fury_use;
}
if (furytimer == null) {
} else if (furytimer <= 0) {
chat("Special Attacks end", 30, 5);
delete furybuff;
delete furytimer;
} else {
furytimer = furytimer - 1;
}
if (flank_use == 1) {
cost = 90;
if (player_mana > cost) {
if (meleenum < 2) {
flankuse(char);
chat((("You cast " + itemMsg[44]) + "") + meleenum, 30, 5);
player_mana = player_mana - cost;
if (itemuse >= 10) {
itemuse = 1;
}
} else {
chat("You have already casted that", 30, 5);
}
} else {
chat("Not enough Mana", 30, 5);
}
delete flank_use;
}
if (invis_use == 1) {
chat("You cast " + itemMsg[43], 30, 5);
invisuse(char);
if (itemuse >= 10) {
itemuse = 1;
}
delete invis_use;
}
if (heal_use == 1) {
cost = 3;
if (cost < player_mana) {
chat("You cast " + itemMsg[40], 30, 5);
player_mana = player_mana - cost;
healuse(char);
if (itemuse >= 10) {
itemuse = 1;
}
delete heal_use;
} else {
chat("Not enough Mana", 30, 5);
delete heal_use;
}
}
if (heal_t_use == 1) {
spells_target();
if (Key.isDown(13) || (_root.targ1.hitTest(_xmouse, _ymouse, true) && (m_input == 1))) {
delete mousex;
delete mousey;
delete m_input;
delete m_command;
_root.targ1._y = -99999;
if (spell_input == null) {
chat("You cast " + itemMsg[41], 30, 5);
if (order == 0) {
healuse(_root.char1);
} else {
healuse(_root["enemy" + order]);
}
delete heal_t_use;
spell_input = 1;
}
} else {
delete spell_input;
}
}
if (craft_use == 1) {
chat((((("You cannot use that (" + itemMsg[itemArraynum[keys]]) + "(") + ItemNum[keys]) + ")") + ")", 30, 5);
delete craft_use;
}
if (armor_use == 1) {
if (((((armorNum == 4) || (armorNum == 8)) || (armorNum == 11)) || (armorNum == 26)) || (armorNum == 27)) {
if (equipArray[3] == null) {
equipArray[3] = armorNum;
chat("You equip (Right Hand) " + itemMsg[equipArray[3]], 30, 5);
_root.sounditem.gotoAndStop(3);
delete armor_use;
} else if (equipArray[2] == null) {
equipArray[2] = armorNum;
chat("You equip (Left Hand) " + itemMsg[equipArray[2]], 30, 5);
_root.sounditem.gotoAndStop(3);
delete armor_use;
} else if ((((((itemNum[keys] >= 1) && (itemNum[1] >= 1)) && (itemNum[2] >= 1)) && (itemNum[3] >= 1)) && (itemNum[4] >= 1)) && (itemNum[5] >= 1)) {
chat("Can't Equip; Your Inventory is full", 30, 5);
delete armor_use;
itemNum[keys] = itemNum[keys] + 1;
} else {
chat("You equip (Right Hand) " + itemMsg[armorNum], 30, 5);
enemydeath = 1;
enemyitem = equipArray[3];
equipArray[3] = armorNum;
_root.sounditem.gotoAndStop(3);
delete armor_use;
}
} else if (((((((((((armorNum == 28) || (armorNum == 29)) || (armorNum == 30)) || (armorNum == 31)) || (armorNum == 32)) || (armorNum == 33)) || (armorNum == 34)) || (armorNum == 35)) || (armorNum == 36)) || (armorNum == 37)) || (armorNum == 38)) {
if (equipArray[5] == null) {
equipArray[5] = armorNum;
_root.shield = armorNum - 27;
chat("You equip (Shield) " + itemMsg[equipArray[5]], 30, 5);
_root.sounditem.gotoAndStop(3);
delete armor_use;
} else if ((((((itemNum[keys] >= 1) && (itemNum[1] >= 1)) && (itemNum[2] >= 1)) && (itemNum[3] >= 1)) && (itemNum[4] >= 1)) && (itemNum[5] >= 1)) {
chat("Can't Equip; Your Inventory is full", 30, 5);
delete armor_use;
itemNum[keys] = itemNum[keys] + 1;
} else {
chat("You equip (Shield) " + itemMsg[armorNum], 30, 5);
enemydeath = 1;
enemyitem = equipArray[5];
equipArray[5] = armorNum;
_root.shield = armorNum - 27;
_root.sounditem.gotoAndStop(3);
delete armor_use;
}
} else if ((((((armorNum == 14) || (armorNum == 15)) || (armorNum == 16)) || (armorNum == 17)) || (armorNum == 18)) || (armorNum == 19)) {
if (equipArray[4] == null) {
equipArray[4] = armorNum;
chat("You equip (Weapon) " + itemMsg[equipArray[4]], 30, 5);
_root.sounditem.gotoAndStop(3);
delete armor_use;
} else if ((((((itemNum[keys] >= 1) && (itemNum[1] >= 1)) && (itemNum[2] >= 1)) && (itemNum[3] >= 1)) && (itemNum[4] >= 1)) && (itemNum[5] >= 1)) {
chat("Can't Equip; Your Inventory is full", 30, 5);
delete armor_use;
itemNum[keys] = itemNum[keys] + 1;
} else {
chat("You equip (Weapon) " + itemMsg[armorNum], 30, 5);
enemydeath = 1;
enemyitem = equipArray[4];
equipArray[4] = armorNum;
_root.sounditem.gotoAndStop(3);
delete armor_use;
}
} else if (equipArray[1] == null) {
equipArray[1] = armorNum;
chat("You equip (Armor) " + itemMsg[equipArray[1]], 30, 5);
_root.sounditem.gotoAndStop(3);
delete armor_use;
} else if ((((((itemNum[keys] >= 1) && (itemNum[1] >= 1)) && (itemNum[2] >= 1)) && (itemNum[3] >= 1)) && (itemNum[4] >= 1)) && (itemNum[5] >= 1)) {
chat("Can't Equip; Your Inventory is full", 30, 5);
delete armor_use;
itemNum[keys] = itemNum[keys] + 1;
} else {
chat("You equip (Armor) " + itemMsg[armorNum], 30, 5);
enemydeath = 1;
enemyitem = equipArray[1];
equipArray[1] = armorNum;
_root.sounditem.gotoAndStop(3);
delete armor_use;
}
}
if (wine_use == 1) {
_root.plHpDis = 500;
chat("You used Wine", 30, 5);
if (player_mana >= stats_mana) {
player_mana = stats_mana;
}
var i;
while ((player_mana < stats_mana) && (i < 25)) {
(player_mana++) && (i++);
}
_root.sounditem.gotoAndStop(5);
delete wine_use;
}
if (herbp_use == 1) {
_root.plHpDis = 500;
chat("You used Herb Pipe", 30, 5);
if (player_mana >= stats_mana) {
player_mana = stats_mana;
}
player_health = player_health - 50;
var i;
while ((player_mana < stats_mana) && (i < 300)) {
(player_mana++) && (i++);
}
_root.sounditem.gotoAndStop(5);
delete herbp_use;
}
if (sonhip_use == 1) {
_root.plHpDis = 500;
chat("You used Sonhi Pipe", 30, 5);
if (player_mana >= stats_mana) {
player_mana = stats_mana;
}
player_health = player_health - 50;
var i;
while ((player_mana < stats_mana) && (i < 450)) {
(player_mana++) && (i++);
}
_root.sounditem.gotoAndStop(5);
delete sonhip_use;
}
if (liver_use == 1) {
_root.plHpDis = 500;
chat("You ate Bear's Liver", 30, 5);
if (player_health >= stats_health) {
player_health = stats_health;
}
var i;
while ((player_health < stats_health) && (i < 500)) {
(player_health++) && (i++);
}
_root.sounditem.gotoAndStop(2);
delete liver_use;
}
if (beef_use == 1) {
_root.plHpDis = 500;
chat("You 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("You 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("You 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 (use_menu == null) {
use_menu = 1;
}
if (time_use == 1) {
t_usemenu = 1;
_root.hud_mc1.time.gotoAndStop(2);
} else {
_root.hud_mc1.time.gotoAndStop(1);
}
if (Key.isDown(90) || (_root.hud_mc1.time.hitTest(_xmouse, _ymouse, true) && (m_input == 1))) {
if (t_useinput == null) {
t_usemenu++;
t_useinput = 1;
}
if (t_usemenu == 1) {
time_use = 1;
}
if (t_usemenu == 2) {
delete time_use;
}
if (t_usemenu >= 3) {
time_use = 1;
t_usemenu = 1;
}
} else {
delete t_useinput;
}
if (Key.isDown(70) || (_root.hud_mc1.spell.hitTest(_xmouse, _ymouse, true) && (m_input == 1))) {
if (use_input == null) {
use_menu++;
use_input = 1;
}
if (use_menu == 1) {
delete spell_usage;
_root.hud_mc1.spell.gotoAndStop(1);
}
if (use_menu == 2) {
spell_usage = 1;
_root.hud_mc1.spell.gotoAndStop(2);
}
if (use_menu >= 3) {
delete spell_usage;
use_menu = 1;
}
} else {
delete use_input;
}
if (Key.isDown(71) || (_root.hud_mc1.equip.hitTest(_xmouse, _ymouse, true) && (m_input == 1))) {
equip_usage = 1;
} else {
delete equip_usage;
}
if (Key.isDown(68)) {
} else {
item_usage = 1;
}
_root.IO = ((((((((((((((((((((((((((((_root.item1._x + "| item1") + "<br>") + _root.item2._x) + "| item2") + "<br>") + _root.item3._x) + "| item3") + "<br>") + _root.item4._x) + "| item4") + "<br>") + _root.item5._x) + "| item5") + "<br>") + _root.item6._x) + "| item6") + "<br>") + _root.item7._x) + "| item7") + "<br>") + _root.item8._x) + "| item8") + "<br>") + _root.item9._x) + "| item9") + "<br>") + _root.item10._x) + "| item10") + "<br>";
if (itemArray == null) {
itemArraynum = new Array();
itemArray = new Array();
itemNum = new Array();
equipArray = new Array();
spellArray = 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] = "Tall Shield";
itemMsg[29] = "Bamboo Shield";
itemMsg[30] = "Steel Shield";
itemMsg[31] = "Hide Shield";
itemMsg[32] = "Brass Shield";
itemMsg[33] = "Titanium Shield";
itemMsg[34] = "Light Buckler";
itemMsg[35] = "Basic Buckler";
itemMsg[36] = "Heavy Buckler";
itemMsg[37] = "Amber Buckler";
itemMsg[38] = "Enchanted Buckler";
itemMsg[39] = "Empty";
itemMsg[40] = "Heal Scroll Lvl: 1";
itemMsg[41] = "Heal Scroll Target Lvl: 1";
itemMsg[42] = "Ignite Scroll Target Lvl: 1";
itemMsg[43] = "Invis Scroll Lvl: 1";
itemMsg[44] = "Flank/Backstab Scroll Lvl: " + meleenum;
itemMsg[45] = "Bear's Liver";
itemMsg[46] = "Sonhi pipe";
itemMsg[47] = "Herb pipe";
itemMsg[48] = "Wine";
itemMsg[49] = "Aged wine";
itemMsg[50] = "Fury";
itemMsg[51] = "Might Scroll Lvl: 1";
itemMsg[52] = "Shadow Figure Scroll Lvl: 1";
itemMsg[53] = "Might/ShadFig Scroll Lvl: 1";
itemMsg[54] = "Bless Scroll Lvl: 1";
itemMsg[55] = "Potence Scroll Lvl: 1";
itemMsg[56] = "Bless/Potence Scroll Lvl: 1";
itemFillOrder = newArray();
if (class == 2) {
itemNum[1] = 5;
itemArraynum[1] = 6;
itemNum[2] = 1;
itemArraynum[2] = 20;
itemNum[3] = 1;
itemArraynum[3] = 14;
itemNum[4] = 1;
itemArraynum[4] = 28;
itemNum[5] = 5;
itemArraynum[5] = 42;
spellArray[1] = 56;
spellArray[2] = 50;
spellArray[3] = 40;
spellArray[4] = 41;
}
if (class == 1) {
itemNum[1] = 5;
itemArraynum[1] = 6;
itemNum[2] = 1;
itemArraynum[2] = 23;
itemNum[3] = 1;
itemArraynum[3] = 14;
itemNum[4] = 1;
itemArraynum[4] = 34;
itemNum[5] = 20;
itemArraynum[5] = 42;
spellArray[1] = 53;
spellArray[2] = 50;
spellArray[3] = 43;
spellArray[4] = 40;
spellArray[5] = 41;
}
}
if (spell_usage == 1) {
delete item_usage;
if ((sellpage == 1) || (equip_usage == 1)) {
use_menu = 2;
delete spell_usage;
} else {
SpellUse(49, 50, 51, 52, 53, 68);
}
}
if (equip_usage == 1) {
delete item_usage;
if (sellpage == 1) {
} else {
ArmorDrop(49, 50, 51, 52, 53, 68);
}
}
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 < 11) {
if (armor_use == 1) {
} else if (_root["item" + i_sheet].hitTest(char.hb)) {
if (_root["item" + i_sheet].number == null) {
founditemnum = 1;
} else {
founditemnum = _root["item" + i_sheet].number;
}
delete prevItem;
enemyitem = _root["item" + i_sheet]._currentframe;
enemydeath = 1;
dun_create();
}
if (enemydeath == 1) {
if (arraynum >= 6) {
arrayfiller();
macrofiller(_root["item" + i_sheet]);
} else {
arrayfiller();
macrofiller(_root["item" + i_sheet]);
}
delete enemydeath;
}
i_sheet++;
}
}
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++;
}
player_health = stats_health;
player_mana = stats_mana;
delete _root.retry;
_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.gui_player_hbar.duplicateMovieClip("hp_bar1", 500);
if (recbgm == null) {
_root.soundbgm.duplicateMovieClip("soundbgm1", 104);
_root.soundbgm1.gotoAndStop(3);
_root.soundbgm1.gotoAndStop(1);
}
_root.debug_mc.duplicateMovieClip("debug_mc11", 9000);
_root.debug_mc11._visible = true;
_root.debug_mc11._x = 0;
_root.debug_mc11._y = 0;
_root.landmouse.swapDepths(190);
_root.mouseanim.swapDepths(189);
_root.floormouse.swapDepths(188);
_root.light.swapDepths(9100);
_root.lightbg.swapDepths(9199);
_root.pool.swapDepths(25);
}
function game_dun_lighting() {
if (_root.player_health >= 1) {
_root.light._x = _root.char1._x;
_root.light._y = _root.char1._y - 20;
_root.lightbg.gotoAndStop(2);
_root.lightbg._x = _root.char1._x;
_root.lightbg._y = _root.char1._y - 20;
} else {
_root.light._x = -9999;
_root.lightbg._x = -9999;
}
}
function game_map_center() {
function obj_center(obj) {
_root.hud_mc1._x = -(120 - obj._x);
_root.hud_mc1._y = -((120 - obj._y) + 20);
_root.debug_mc11._x = -(120 - obj._x);
_root.debug_mc11._y = -((120 - obj._y) + 20);
_root.floor_fader_mc1._x = -(120 - obj._x);
_root.floor_fader_mc1._y = -((120 - obj._y) + 20);
_root.fader_mc1._x = -(120 - obj._x);
_root.fader_mc1._y = -((120 - obj._y) + 20);
_root.exitfader_mc1._x = -(120 - obj._x);
_root.exitfader_mc1._y = -((120 - obj._y) + 20);
_root["npc_window_" + windownum]._x = -(120 - obj._x);
_root["npc_window_" + windownum]._y = -((120 - obj._y) + 20);
if (loaderT >= 1) {
_root.loader._x = -(120 - obj._x);
_root.loader._y = -((120 - obj._y) + 20);
}
}
if ((player_health <= 1) && (time_use == null)) {
delete centermap;
}
if (centermap == 1) {
while (centerm < 10) {
_root.dun_map.duplicateMovieClip("center" + centerm, 11 + centerm);
centerm++;
}
_root.center1._x = -240;
_root.center1._y = -240;
_root.center1.gotoAndStop((((dunmap - 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center2._x = 0;
_root.center2._y = -240;
_root.center2.gotoAndStop((((dunmap - 1) * row) + col) + ((dmap - 1) * 70));
_root.center3._x = 240;
_root.center3._y = -240;
_root.center3.gotoAndStop((((dunmap - 1) * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center4._x = -240;
_root.center4._y = 0;
_root.center4.gotoAndStop(((dunmap * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center6._x = 240;
_root.center6._y = 0;
_root.center6.gotoAndStop(((dunmap * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center7._x = -240;
_root.center7._y = 240;
_root.center7.gotoAndStop((((dunmap + 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center8._x = 0;
_root.center8._y = 240;
_root.center8.gotoAndStop((((dunmap + 1) * row) + col) + ((dmap - 1) * 70));
_root.center9._x = 240;
_root.center9._y = 240;
_root.center9.gotoAndStop((((dunmap + 1) * row) + (col + 1)) + ((dmap - 1) * 70));
if ((heal_t_use == null) && (zap_t_use == null)) {
_root._x = 120 - _root.char1._x;
_root._y = (120 - _root.char1._y) + 20;
obj_center(_root.char1);
} else {
_root._x = 120 - _root.targ1._x;
_root._y = (120 - _root.targ1._y) + 20;
obj_center(_root.targ1);
}
} else {
_root.debug_mc11._x = 0;
_root.debug_mc11._y = 0;
_root.floor_fader_mc1._x = 0;
_root.floor_fader_mc1._y = 0;
_root._x = 0;
_root._y = 0;
_root.hud_mc1._x = 0;
_root.hud_mc1._y = 0;
_root["npc_window_" + windowNum]._x = 0;
_root["npc_window_" + windowNum]._y = 0;
while (centerRem < 10) {
_root.center + centerRem.removeMovieClip();
centerRem++;
}
delete centerm;
delete centerRem;
}
if (centermapst == null) {
centermap = 1;
centermapst = 1;
}
if (Key.isDown(16) || (_root.hud_mc1.center.hitTest(_xmouse, _ymouse, true) && (m_input == 1))) {
if (centermap == 1) {
if (cm_input == 1) {
} else {
delete centermap;
cm_input = 1;
}
} else if (cm_input == 1) {
} else {
centermap = 1;
cm_input = 1;
}
} else {
delete cm_input;
}
}
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 dun_vanish() {
if (_root.item1._x == null) {
_root.item1._x = -999;
dun_item_create_x1[(dunmap * row) + col] = _root.item1._x;
}
if (_root.item2._x == null) {
_root.item2._x = -999;
dun_item_create_x2[(dunmap * row) + col] = _root.item2._x;
}
if (_root.item3._x == null) {
_root.item3._x = -999;
dun_item_create_x3[(dunmap * row) + col] = _root.item3._x;
}
if (_root.item4._x == null) {
_root.item4._x = -999;
dun_item_create_x4[(dunmap * row) + col] = _root.item4._x;
}
if (_root.item5._x == null) {
_root.item5._x = -999;
dun_item_create_x5[(dunmap * row) + col] = _root.item5._x;
}
if (_root.item6._x == null) {
_root.item6._x = -999;
dun_item_create_x6[(dunmap * row) + col] = _root.item6._x;
}
}
function dun_create() {
dun_item_create_x1[(dunmap * row) + col] = _root.item1._x;
dun_item_create_x2[(dunmap * row) + col] = _root.item2._x;
dun_item_create_x3[(dunmap * row) + col] = _root.item3._x;
dun_item_create_x4[(dunmap * row) + col] = _root.item4._x;
dun_item_create_x5[(dunmap * row) + col] = _root.item5._x;
dun_item_create_x6[(dunmap * row) + col] = _root.item6._x;
dun_item_create_y1[(dunmap * row) + col] = _root.item1._y;
dun_item_create_y2[(dunmap * row) + col] = _root.item2._y;
dun_item_create_y3[(dunmap * row) + col] = _root.item3._y;
dun_item_create_y4[(dunmap * row) + col] = _root.item4._y;
dun_item_create_y5[(dunmap * row) + col] = _root.item5._y;
dun_item_create_y6[(dunmap * row) + col] = _root.item6._y;
dun_item_create_cf1[(dunmap * row) + col] = _root.item1._currentframe;
dun_item_create_cf2[(dunmap * row) + col] = _root.item2._currentframe;
dun_item_create_cf3[(dunmap * row) + col] = _root.item3._currentframe;
dun_item_create_cf4[(dunmap * row) + col] = _root.item4._currentframe;
dun_item_create_cf5[(dunmap * row) + col] = _root.item5._currentframe;
dun_item_create_cf6[(dunmap * row) + col] = _root.item6._currentframe;
}
function dun_memory() {
var icreate = 1;
while (icreate < 7) {
_root.item_.duplicateMovieClip("item" + icreate, 80 + icreate);
_root.item1._x = dun_item_create_x1[(dunmap * row) + col];
_root.item2._x = dun_item_create_x2[(dunmap * row) + col];
_root.item3._x = dun_item_create_x3[(dunmap * row) + col];
_root.item4._x = dun_item_create_x4[(dunmap * row) + col];
_root.item5._x = dun_item_create_x5[(dunmap * row) + col];
_root.item6._x = dun_item_create_x6[(dunmap * row) + col];
_root.item1._y = dun_item_create_y1[(dunmap * row) + col];
_root.item2._y = dun_item_create_y2[(dunmap * row) + col];
_root.item3._y = dun_item_create_y3[(dunmap * row) + col];
_root.item4._y = dun_item_create_y4[(dunmap * row) + col];
_root.item5._y = dun_item_create_y5[(dunmap * row) + col];
_root.item6._y = dun_item_create_y6[(dunmap * row) + col];
_root.item1.gotoAndStop(dun_item_create_cf1[(dunmap * row) + col]);
_root.item2.gotoAndStop(dun_item_create_cf2[(dunmap * row) + col]);
_root.item3.gotoAndStop(dun_item_create_cf3[(dunmap * row) + col]);
_root.item4.gotoAndStop(dun_item_create_cf4[(dunmap * row) + col]);
_root.item5.gotoAndStop(dun_item_create_cf5[(dunmap * row) + col]);
_root.item6.gotoAndStop(dun_item_create_cf6[(dunmap * row) + col]);
icreate++;
}
}
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, 80 + sheet);
_root["item" + sheet].gotoAndStop(Math.ceil(Math.random() * (1 + _root.floor)));
_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;
}
}
monfloor = 0;
monvar = 6;
testme = ((_root.dunmap * _root.row) + _root.col) + ((_root.floor - 1) * 70);
if (dunmap == null) {
dun_item_create_z = [[null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null]];
dun_item_create_x1 = new Array();
dun_item_create_x2 = new Array();
dun_item_create_x3 = new Array();
dun_item_create_x4 = new Array();
dun_item_create_x5 = new Array();
dun_item_create_x6 = new Array();
dun_item_create_y1 = new Array();
dun_item_create_y2 = new Array();
dun_item_create_y3 = new Array();
dun_item_create_y4 = new Array();
dun_item_create_y5 = new Array();
dun_item_create_y6 = new Array();
dun_item_create_cf1 = new Array();
dun_item_create_cf2 = new Array();
dun_item_create_cf3 = new Array();
dun_item_create_cf4 = new Array();
dun_item_create_cf5 = new Array();
dun_item_create_cf6 = new Array();
dun_start_col = new Array();
dun_start_col[1] = 0;
dun_start_col[2] = 3;
dun_start_col[3] = 0;
dun_start_dunmap = new Array();
dun_start_dunmap[1] = 1;
dun_start_dunmap[2] = 1;
dun_start_dunmap[3] = 10;
dun_exit_col = new Array();
dun_exit_col[1] = 6;
dun_exit_col[2] = 3;
dun_exit_dunmap = new Array();
dun_exit_dunmap[1] = 10;
dun_exit_dunmap[2] = 10;
dun_createdMap = new Array();
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[9] = 80;
dun_Array_npcy[9] = 60;
dun_Array_npcx[88] = 80;
dun_Array_npcy[88] = 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_itemx[114] = 80;
dun_Array_itemy[114] = 100;
dun_Array_itemx[116] = 80;
dun_Array_itemy[116] = 100;
mapscan = 7;
while (mapscan < 217) {
if (dun_Array_y[mapscan] == null) {
dun_Array_y[mapscan] = 0;
dun_Array_y2[mapscan] = 240;
dun_Array_x[mapscan] = 0;
dun_Array_x2[mapscan] = 240;
enem_ArrayX[mapscan] = 100;
enem_ArrayY[mapscan] = 100;
}
mapscan++;
}
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_y[10] = 0;
dun_Array_y[77] = 0;
dun_Array_y[78] = 0;
dun_Array_y[79] = 0;
dun_Array_y[80] = 0;
dun_Array_y[81] = 0;
dun_Array_y[82] = 0;
dun_Array_y[83] = 0;
dun_Array_y[87] = 0;
dun_Array_y[88] = 0;
dun_Array_y[92] = 0;
dun_Array_y[93] = 0;
dun_Array_y[94] = 0;
dun_Array_y[95] = 0;
dun_Array_y[96] = 0;
dun_Array_y[99] = 0;
dun_Array_y[103] = 0;
dun_Array_y[106] = 0;
dun_Array_y[107] = 0;
dun_Array_y[108] = 0;
dun_Array_y[109] = 0;
dun_Array_y[110] = 0;
dun_Array_y[114] = 0;
dun_Array_y[115] = 0;
dun_Array_y[116] = 0;
dun_Array_y[120] = 0;
dun_Array_y[121] = 0;
dun_Array_y[122] = 0;
dun_Array_y[123] = 0;
dun_Array_y[124] = 0;
dun_Array_y[127] = 0;
dun_Array_y[131] = 0;
dun_Array_y[134] = 0;
dun_Array_y[135] = 0;
dun_Array_y[136] = 0;
dun_Array_y[137] = 0;
dun_Array_y[138] = 0;
dun_Array_y[143] = 0;
dun_Array_y2[7] = 210;
dun_Array_y2[9] = 210;
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] = 210;
dun_Array_y2[21] = 240;
dun_Array_y2[23] = 210;
dun_Array_y2[27] = 210;
dun_Array_y2[34] = 210;
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] = 220;
dun_Array_y2[62] = 220;
dun_Array_y2[69] = 200;
dun_Array_y2[76] = 240;
dun_Array_y2[10] = 240;
dun_Array_y2[77] = 240;
dun_Array_y2[78] = 240;
dun_Array_y2[79] = 240;
dun_Array_y2[80] = 240;
dun_Array_y2[81] = 240;
dun_Array_y2[82] = 240;
dun_Array_y2[83] = 240;
dun_Array_y2[87] = 240;
dun_Array_y2[88] = 240;
dun_Array_y2[92] = 240;
dun_Array_y2[93] = 240;
dun_Array_y2[94] = 240;
dun_Array_y2[95] = 240;
dun_Array_y2[96] = 240;
dun_Array_y2[99] = 240;
dun_Array_y2[103] = 240;
dun_Array_y2[106] = 240;
dun_Array_y2[107] = 240;
dun_Array_y2[108] = 240;
dun_Array_y2[109] = 240;
dun_Array_y2[110] = 240;
dun_Array_y2[114] = 240;
dun_Array_y2[115] = 240;
dun_Array_y2[116] = 240;
dun_Array_y2[120] = 240;
dun_Array_y2[121] = 240;
dun_Array_y2[122] = 240;
dun_Array_y2[123] = 240;
dun_Array_y2[124] = 240;
dun_Array_y2[127] = 240;
dun_Array_y2[131] = 240;
dun_Array_y2[134] = 240;
dun_Array_y2[135] = 240;
dun_Array_y2[136] = 240;
dun_Array_y2[137] = 240;
dun_Array_y2[138] = 240;
dun_Array_y2[143] = 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] = 20;
dun_Array_x[48] = 20;
dun_Array_x[53] = 0;
dun_Array_x[54] = 10;
dun_Array_x[55] = 10;
dun_Array_x[62] = 0;
dun_Array_x[69] = 0;
dun_Array_x[76] = 0;
dun_Array_x[10] = 0;
dun_Array_x[77] = 0;
dun_Array_x[78] = 0;
dun_Array_x[79] = 0;
dun_Array_x[80] = 0;
dun_Array_x[81] = 0;
dun_Array_x[82] = 0;
dun_Array_x[83] = 0;
dun_Array_x[87] = 0;
dun_Array_x[88] = 0;
dun_Array_x[92] = 0;
dun_Array_x[93] = 0;
dun_Array_x[94] = 0;
dun_Array_x[95] = 0;
dun_Array_x[96] = 0;
dun_Array_x[99] = 0;
dun_Array_x[103] = 0;
dun_Array_x[106] = 0;
dun_Array_x[107] = 0;
dun_Array_x[108] = 0;
dun_Array_x[109] = 0;
dun_Array_x[110] = 0;
dun_Array_x[114] = 0;
dun_Array_x[115] = 0;
dun_Array_x[116] = 0;
dun_Array_x[120] = 0;
dun_Array_x[121] = 0;
dun_Array_x[122] = 0;
dun_Array_x[123] = 0;
dun_Array_x[124] = 0;
dun_Array_x[127] = 0;
dun_Array_x[131] = 0;
dun_Array_x[134] = 0;
dun_Array_x[135] = 0;
dun_Array_x[136] = 0;
dun_Array_x[137] = 0;
dun_Array_x[138] = 0;
dun_Array_x[143] = 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] = 210;
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] = 210;
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;
dun_Array_x2[10] = 240;
dun_Array_x2[77] = 240;
dun_Array_x2[78] = 240;
dun_Array_x2[79] = 240;
dun_Array_x2[80] = 240;
dun_Array_x2[81] = 240;
dun_Array_x2[82] = 240;
dun_Array_x2[83] = 240;
dun_Array_x2[87] = 240;
dun_Array_x2[88] = 240;
dun_Array_x2[92] = 240;
dun_Array_x2[93] = 240;
dun_Array_x2[94] = 240;
dun_Array_x2[95] = 240;
dun_Array_x2[96] = 240;
dun_Array_x2[99] = 240;
dun_Array_x2[103] = 240;
dun_Array_x2[106] = 240;
dun_Array_x2[107] = 240;
dun_Array_x2[108] = 240;
dun_Array_x2[109] = 240;
dun_Array_x2[110] = 240;
dun_Array_x2[114] = 240;
dun_Array_x2[115] = 240;
dun_Array_x2[116] = 240;
dun_Array_x2[120] = 240;
dun_Array_x2[121] = 240;
dun_Array_x2[122] = 240;
dun_Array_x2[123] = 240;
dun_Array_x2[124] = 240;
dun_Array_x2[127] = 240;
dun_Array_x2[131] = 240;
dun_Array_x2[134] = 240;
dun_Array_x2[135] = 240;
dun_Array_x2[136] = 240;
dun_Array_x2[137] = 240;
dun_Array_x2[138] = 240;
dun_Array_x2[143] = 240;
enem_ArrayX[7] = -9999;
enem_ArrayY[7] = -9999;
enem_ArrayX[9] = -9999;
enem_ArrayY[9] = -9999;
enem_ArrayX[14] = -9999;
enem_ArrayY[14] = -9999;
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] = -9999;
enem_ArrayY[19] = -9999;
enem_ArrayX[21] = -9999;
enem_ArrayY[21] = -9999;
enem_ArrayX[23] = -9999;
enem_ArrayY[23] = -9999;
enem_ArrayX[41] = -9999;
enem_ArrayY[41] = -9999;
enem_ArrayX[48] = -9999;
enem_ArrayY[48] = -9999;
enem_ArrayX[54] = -9999;
enem_ArrayY[54] = -9999;
enem_ArrayX[62] = -9999;
enem_ArrayY[62] = -9999;
enem_ArrayX[20] = 120;
enem_ArrayY[20] = 120;
enem_ArrayX[27] = -9999;
enem_ArrayY[27] = -9999;
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[34] = 120;
enem_ArrayY[34] = 120;
enem_ArrayX[88] = -9999;
enem_ArrayY[88] = -9999;
enem_ArrayX[93] = -9999;
enem_ArrayY[93] = -9999;
enem_ArrayX[95] = -9999;
enem_ArrayY[95] = -9999;
enem_ArrayX[99] = -9999;
enem_ArrayY[99] = -9999;
enem_ArrayX[103] = -9999;
enem_ArrayY[103] = -9999;
enem_ArrayX[107] = -9999;
enem_ArrayY[107] = -9999;
enem_ArrayX[109] = -9999;
enem_ArrayY[109] = -9999;
enem_ArrayX[114] = -9999;
enem_ArrayY[114] = -9999;
enem_ArrayX[116] = -9999;
enem_ArrayY[116] = -9999;
enem_ArrayX[121] = -9999;
enem_ArrayY[121] = -9999;
enem_ArrayX[123] = -9999;
enem_ArrayY[123] = -9999;
enem_ArrayX[127] = -9999;
enem_ArrayY[127] = -9999;
enem_ArrayX[131] = -9999;
enem_ArrayY[131] = -9999;
enem_ArrayX[134] = -9999;
enem_ArrayY[134] = -9999;
enem_ArrayX[136] = -9999;
enem_ArrayY[136] = -9999;
enem_ArrayX[138] = -9999;
enem_ArrayY[138] = -9999;
enem_ArrayX[135] = 150;
enem_ArrayY[135] = 150;
enem_ArrayX[137] = 150;
enem_ArrayY[137] = 150;
dun_Array = new Array();
col = dun_start_col[dmap];
dunmap = dun_start_dunmap[dmap];
row = 7;
}
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 (s_ambush == 1) {
if (player._x <= 20) {
player._x = 20;
delete s_ambush;
}
if (player._x >= 200) {
player._x = 200;
delete s_ambush;
}
if (player._y <= 20) {
player._y = 20;
delete s_ambush;
}
if (player._y >= 200) {
player._y = 200;
delete s_ambush;
}
}
if ((s_ambush == 1) && (Key.isDown(83))) {
if (map.hb.hitTest(player._x - 5, player._y, true) || (player._x <= 0)) {
player._x = player._x + 50;
charshadowfunc();
}
if (map.hb.hitTest(player._x + 5, player._y, true) || (player._x >= 240)) {
player._x = player._x - 50;
charshadowfunc();
}
if (map.hb.hitTest(player._x, player._y - 5, true) || (player._y <= 0)) {
player._y = player._y + 50;
charshadowfunc();
}
if (map.hb.hitTest(player._x, player._y + 5, true) || (player._y >= 240)) {
player._y = player._y - 50;
charshadowfunc();
}
}
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;
}
dun_vanish(1, dun_item_create_x1[(dunmap * row) + col]);
_root.outputX = ((dunmap * row) + col) + ((dmap - 1) * 70);
if (player._x == null) {
} else {
if (lx == null) {
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = -9999;
_root["enemy" + lay]._y = -9999;
lay++;
}
floor = 1;
dun_visfull = [[null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null], [null]];
dun_visfull[floor][(dunmap * row) + col] = 1;
dun_ma[1] = 1;
map.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
_root.pool.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
debug1 = ((dunmap * row) + col) + ((dmap - 1) * 70);
debug2 = ((((dunmap + ":") + row) + ":") + ":") + col;
lx = 1;
}
readout = (dunmap * row) + col;
row = 7;
if (loaderT >= 1) {
loader._x = -999;
delete loaderT;
}
if (player._x > dun_Array_x2[((dunmap * row) + col) + ((dmap - 1) * 70)]) {
monanim = (Math.ceil(Math.random() * monvar) * 20) + monfloor;
delete nmecreate;
_root.char_atk1._x = -200;
_root.char_atk1._y = -200;
if (dun_visfull[floor][(dunmap * row) + col] == 1) {
if ((!dun_Array_itemx[((dunmap * row) + col) + ((dmap - 1) * 70)]) == null) {
dun_memory();
}
}
trace("addcol");
col++;
if (dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
_root.item1._x = -999;
_root.item2._x = -999;
_root.item3._x = -999;
_root.item4._x = -999;
_root.item5._x = -999;
_root.item6._x = -999;
} else {
dun_memory();
}
if (dun_visfull[floor][(dunmap * row) + col] == null) {
mc++;
dun_createdMap[mc] = mc;
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[((dunmap * row) + col) + ((dmap - 1) * 70)] + (20 * lay);
_root["enemy" + lay]._y = enem_ArrayY[((dunmap * row) + col) + ((dmap - 1) * 70)] + (20 * lay);
_root["enemy" + lay].gotoAndStop(monanim + 1);
lay++;
}
ItemSheet(dun_Array_itemx[((dunmap * row) + col) + ((dmap - 1) * 70)], dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)]);
delete itemload;
delete sheet;
delete sheetc;
delete lay;
if (dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
} else {
chat(dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)], 30, 5);
}
dun_visfull[floor][(dunmap * row) + col] = 1;
}
dungeonNPCLoad(dun_Array_npcx[((dunmap * row) + col) + ((dmap - 1) * 70)], dun_Array_npcy[((dunmap * row) + col) + ((dmap - 1) * 70)]);
delete npcLoad;
delete dungeon_Npc_load;
delete npcLoadrem;
dun_create();
loader._x = 0;
loader._y = 0;
loaderT++;
map.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
player._x = dun_Array_x[((dunmap * row) + col) + ((dmap - 1) * 70)];
_root.pool.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
if (centermap == 1) {
_root.center1._x = -240;
_root.center1._y = -240;
_root.center1.gotoAndStop((((dunmap - 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center2._x = 0;
_root.center2._y = -240;
_root.center2.gotoAndStop((((dunmap - 1) * row) + col) + ((dmap - 1) * 70));
_root.center3._x = 240;
_root.center3._y = -240;
_root.center3.gotoAndStop((((dunmap - 1) * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center4._x = -240;
_root.center4._y = 0;
_root.center4.gotoAndStop(((dunmap * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center6._x = 240;
_root.center6._y = 0;
_root.center6.gotoAndStop(((dunmap * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center7._x = -240;
_root.center7._y = 240;
_root.center7.gotoAndStop((((dunmap + 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center8._x = 0;
_root.center8._y = 240;
_root.center8.gotoAndStop((((dunmap + 1) * row) + col) + ((dmap - 1) * 70));
_root.center9._x = 240;
_root.center9._y = 240;
_root.center9.gotoAndStop((((dunmap + 1) * row) + (col + 1)) + ((dmap - 1) * 70));
}
}
if (player._x < dun_Array_x[((dunmap * row) + col) + ((dmap - 1) * 70)]) {
monanim = (Math.ceil(Math.random() * monvar) * 20) + monfloor;
delete nmecreate;
_root.char_atk1._x = -200;
_root.char_atk1._y = -200;
if (dun_visfull[floor][(dunmap * row) + col] == 1) {
}
trace("remcol");
col--;
if (dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
_root.item1._x = -999;
_root.item2._x = -999;
_root.item3._x = -999;
_root.item4._x = -999;
_root.item5._x = -999;
_root.item6._x = -999;
} else {
dun_memory();
}
if (dun_visfull[floor][(dunmap * row) + col] == null) {
mc++;
dun_createdMap[mc] = mc;
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[((dunmap * row) + col) + ((dmap - 1) * 70)] + (10 * lay);
_root["enemy" + lay]._y = enem_ArrayY[((dunmap * row) + col) + ((dmap - 1) * 70)] + (10 * lay);
_root["enemy" + lay].gotoAndStop(monanim + 1);
lay++;
}
ItemSheet(dun_Array_itemx[((dunmap * row) + col) + ((dmap - 1) * 70)], dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)]);
delete itemload;
delete sheet;
delete sheetc;
delete lay;
if (dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
} else {
chat(dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)], 30, 5);
}
dun_visfull[floor][(dunmap * row) + col] = 1;
}
delete npcLoadrem;
delete npcLoad;
dungeonNPCLoad(dun_Array_npcx[((dunmap * row) + col) + ((dmap - 1) * 70)], dun_Array_npcy[((dunmap * row) + col) + ((dmap - 1) * 70)]);
delete dungeon_Npc_load;
loader._x = 0;
loader._y = 0;
loaderT++;
map.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
player._x = dun_Array_x2[((dunmap * row) + col) + ((dmap - 1) * 70)];
_root.pool.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
dun_create();
if (centermap == 1) {
_root.center1._x = -240;
_root.center1._y = -240;
_root.center1.gotoAndStop((((dunmap - 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center2._x = 0;
_root.center2._y = -240;
_root.center2.gotoAndStop((((dunmap - 1) * row) + col) + ((dmap - 1) * 70));
_root.center3._x = 240;
_root.center3._y = -240;
_root.center3.gotoAndStop((((dunmap - 1) * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center4._x = -240;
_root.center4._y = 0;
_root.center4.gotoAndStop(((dunmap * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center6._x = 240;
_root.center6._y = 0;
_root.center6.gotoAndStop(((dunmap * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center7._x = -240;
_root.center7._y = 240;
_root.center7.gotoAndStop((((dunmap + 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center8._x = 0;
_root.center8._y = 240;
_root.center8.gotoAndStop((((dunmap + 1) * row) + col) + ((dmap - 1) * 70));
_root.center9._x = 240;
_root.center9._y = 240;
_root.center9.gotoAndStop((((dunmap + 1) * row) + (col + 1)) + ((dmap - 1) * 70));
}
}
if (player._y < dun_Array_y[((dunmap * row) + col) + ((dmap - 1) * 70)]) {
monanim = (Math.ceil(Math.random() * monvar) * 20) + monfloor;
delete nmecreate;
_root.char_atk1._x = -200;
_root.char_atk1._y = -200;
trace("pullrow");
dunmap = dunmap - 1;
if (dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
_root.item1._x = -999;
_root.item2._x = -999;
_root.item3._x = -999;
_root.item4._x = -999;
_root.item5._x = -999;
_root.item6._x = -999;
} else {
dun_memory();
}
if (dun_visfull[floor][(dunmap * row) + col] == null) {
mc++;
dun_createdMap[mc] = mc;
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[((dunmap * row) + col) + ((dmap - 1) * 70)] + (10 * lay);
_root["enemy" + lay]._y = enem_ArrayY[((dunmap * row) + col) + ((dmap - 1) * 70)] + (10 * lay);
_root["enemy" + lay].gotoAndStop(monanim + 1);
lay++;
}
ItemSheet(dun_Array_itemx[((dunmap * row) + col) + ((dmap - 1) * 70)], dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)]);
delete itemload;
delete sheet;
delete sheetc;
delete lay;
if (dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
} else {
chat(dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)], 30, 5);
}
dun_visfull[floor][(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;
loader._x = 0;
loader._y = 0;
loaderT++;
map.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
player._y = dun_Array_y2[((dunmap * row) + col) + ((dmap - 1) * 70)];
_root.pool.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
dun_create();
if (centermap == 1) {
_root.center1._x = -240;
_root.center1._y = -240;
_root.center1.gotoAndStop((((dunmap - 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center2._x = 0;
_root.center2._y = -240;
_root.center2.gotoAndStop((((dunmap - 1) * row) + col) + ((dmap - 1) * 70));
_root.center3._x = 240;
_root.center3._y = -240;
_root.center3.gotoAndStop((((dunmap - 1) * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center4._x = -240;
_root.center4._y = 0;
_root.center4.gotoAndStop(((dunmap * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center6._x = 240;
_root.center6._y = 0;
_root.center6.gotoAndStop(((dunmap * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center7._x = -240;
_root.center7._y = 240;
_root.center7.gotoAndStop((((dunmap + 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center8._x = 0;
_root.center8._y = 240;
_root.center8.gotoAndStop((((dunmap + 1) * row) + col) + ((dmap - 1) * 70));
_root.center9._x = 240;
_root.center9._y = 240;
_root.center9.gotoAndStop((((dunmap + 1) * row) + (col + 1)) + ((dmap - 1) * 70));
}
}
if (player._y > dun_Array_y2[((dunmap * row) + col) + ((dmap - 1) * 70)]) {
monanim = (Math.ceil(Math.random() * monvar) * 20) + monfloor;
delete nmecreate;
_root.char_atk1._x = -200;
_root.char_atk1._y = -200;
if (dun_visfull[floor][(dunmap * row) + col] == 1) {
}
trace("addrow");
dunmap = dunmap + 1;
if (dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
_root.item1._x = -999;
_root.item2._x = -999;
_root.item3._x = -999;
_root.item4._x = -999;
_root.item5._x = -999;
_root.item6._x = -999;
} else {
dun_memory();
}
if (dun_visfull[floor][(dunmap * row) + col] == null) {
mc++;
dun_createdMap[mc] = mc;
var lay = 1;
while (lay < 5) {
_root["enemy" + lay]._x = enem_ArrayX[((dunmap * row) + col) + ((dmap - 1) * 70)] + (10 * lay);
_root["enemy" + lay]._y = enem_ArrayY[((dunmap * row) + col) + ((dmap - 1) * 70)] + (10 * lay);
_root["enemy" + lay].gotoAndStop(monanim + 1);
lay++;
}
ItemSheet(dun_Array_itemx[((dunmap * row) + col) + ((dmap - 1) * 70)], dun_Array_itemy[((dunmap * row) + col) + ((dmap - 1) * 70)]);
delete itemload;
delete sheet;
delete sheetc;
delete lay;
if (dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)] == null) {
} else {
chat(dun_msg[((dunmap * row) + col) + ((dmap - 1) * 70)], 30, 5);
}
dun_visfull[floor][(dunmap * row) + col] = 1;
}
delete npcLoadrem;
dungeonNPCLoad(dun_Array_npcx[((dunmap * row) + col) + ((dmap - 1) * 70)], dun_Array_npcy[((dunmap * row) + col) + ((dmap - 1) * 70)]);
delete dungeon_Npc_load;
delete npcLoad;
loader._x = 0;
loader._y = 0;
loaderT++;
map.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
player._y = dun_Array_y[((dunmap * row) + col) + ((dmap - 1) * 70)];
_root.pool.gotoAndStop(((dunmap * row) + col) + ((dmap - 1) * 70));
dun_create();
if (centermap == 1) {
_root.center1._x = -240;
_root.center1._y = -240;
_root.center1.gotoAndStop((((dunmap - 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center2._x = 0;
_root.center2._y = -240;
_root.center2.gotoAndStop((((dunmap - 1) * row) + col) + ((dmap - 1) * 70));
_root.center3._x = 240;
_root.center3._y = -240;
_root.center3.gotoAndStop((((dunmap - 1) * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center4._x = -240;
_root.center4._y = 0;
_root.center4.gotoAndStop(((dunmap * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center6._x = 240;
_root.center6._y = 0;
_root.center6.gotoAndStop(((dunmap * row) + (col + 1)) + ((dmap - 1) * 70));
_root.center7._x = -240;
_root.center7._y = 240;
_root.center7.gotoAndStop((((dunmap + 1) * row) + (col - 1)) + ((dmap - 1) * 70));
_root.center8._x = 0;
_root.center8._y = 240;
_root.center8.gotoAndStop((((dunmap + 1) * row) + col) + ((dmap - 1) * 70));
_root.center9._x = 240;
_root.center9._y = 240;
_root.center9.gotoAndStop((((dunmap + 1) * row) + (col + 1)) + ((dmap - 1) * 70));
}
}
}
}
function game_map_exit() {
if (exit_dun == 1) {
_root.exitfader.duplicateMovieClip("exitfader_mc1", 20000);
_root.exitfader_mc1.gotoAndPlay(2);
_root.exitfader_mc1._x = 0;
_root.exitfader_mc1._y = 0;
exit_dunload = 1;
delete exit_dun;
}
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 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 () {
if (_global.program == 1) {
ROUrl = scan;
delete _global.titleinstance;
vrb = "title_screen";
if (scan == null) {
} else {
_root.preload = "ERROR";
}
if (scene_load == null) {
if (scan == null) {
_root.full_titlescreen.duplicateMovieClip("full_titlescreen1", 2000);
_root.full_titlescreen1._x = 120;
_root.full_titlescreen1._y = 120;
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;
}
_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.shield = 13;
};
_root.onKeyDown = function () {
Inventory(49, 50, 51, 52, 53, 68);
};
_root.onMouseUp = function () {
delete m_input;
confirm = 1;
delete end_attack;
delete m_attack;
delete mouseD;
delete i_attack;
delete m_ignore;
};
_root.onMouseDown = function () {
if (m_input == 1) {
mouseD = 20;
if ((heal_t_use == null) && (zap_t_use == null)) {
mousex = floormouse._x + 12;
mousey = floormouse._y + 12;
}
delete m_command;
}
m_input = 1;
delete mousex;
delete mousey;
delete m_command;
if (_global.program >= 6) {
if ((((((((m_command == null) && (!_root.hud_mc1.macro.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.spell.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.equip.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.center.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.map.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.spellList.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.time.hitTest(_xmouse, _ymouse, true))) {
if ((heal_t_use == null) && (zap_t_use == null)) {
mousex = floormouse._x + 12;
mousey = floormouse._y + 12;
}
landmouse._x = floormouse._x;
landmouse._y = floormouse._y;
mouseanim.gotoAndPlay(2);
mouseanim._x = floormouse._x;
mouseanim._y = floormouse._y;
m_ignore = 1;
if (m_attack == 1) {
}
m_command = 1;
}
i_attack = 1;
if (_root.hud_mc1.macro.hitTest(_xmouse, _ymouse, true)) {
mouseD = 1;
}
}
};
_root.onEnterFrame = function () {
if ((((((((m_input == 1) && (!_root.hud_mc1.macro.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.spell.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.equip.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.center.hitTest(_xmouse, _ymouse, true))) && (!_root.hud_mc1.map.hitTest(_xmouse, _ymouse, true))) && (true!_root.hud_mc1.spellList.hitTest(_xmouse, _ymouse, (heal_t_use == null) && (zap_t_use == null)))) && (!_root.hud_mc1.time.hitTest(_xmouse, _ymouse, true))) {
mouseD = 20;
if ((heal_t_use == null) && (zap_t_use == null)) {
mousex = floormouse._x + 12;
mousey = floormouse._y + 12;
}
m_command = 1;
mousex = floormouse._x + 12;
mousey = floormouse._y + 12;
landmouse._x = floormouse._x;
landmouse._y = floormouse._y;
mouseanim.gotoAndPlay(2);
mouseanim._x = floormouse._x;
mouseanim._y = floormouse._y;
}
randomdungeon();
debugger();
_root.stop();
if (((_root.getBytesLoaded() * 100) / _root.getBytesTotal()) == 100) {
_root.gotoAndStop(2);
} else {
loaderText = (_root.getBytesLoaded() * 100) / _root.getBytesTotal();
_root.preload = "LOADING " + loaderText;
}
if (Key.isDown(79)) {
if (o_input == null) {
_root.sounditem.gotoAndStop(3);
if (_root.shield >= 13) {
_root.shield = 1;
} else {
_root.shield++;
}
o_input = 1;
}
} else {
delete o_input;
}
if (Key.isDown(13) || (m_input == 1)) {
if ((e_input == null) && (scan == null)) {
if ((((_global.program == 4) || (_global.program == 3)) || (_global.program == 5)) || (_global.program == 6)) {
} else {
_global.program = 3;
delete scene_load;
e_input = 1;
}
}
} else if ((((_global.program == 4) || (_global.program == 3)) || (_global.program == 5)) || (_global.program == 6)) {
} else {
delete e_input;
}
if (Key.isDown(187)) {
if (h_input == null) {
if (high == 1) {
delete high;
} else if (high == null) {
high = 1;
}
h_input = 1;
}
} else {
delete h_input;
}
if (Key.isDown(192)) {
if (_global.program >= 12) {
_global.program = 1;
}
if (d_input == null) {
_global.program++;
delete scene_load;
d_input = 1;
}
} else {
delete d_input;
}
if (_global.program == 1) {
ROUrl = scan;
delete _global.titleinstance;
vrb = "title_screen";
if (scan == null) {
_root.preload = "OK";
} else {
_root.preload = "ERROR";
}
if (scene_load == null) {
if (scan == null) {
_root.full_titlescreen.duplicateMovieClip("full_titlescreen1", 2000);
_root.full_titlescreen1._x = 120;
_root.full_titlescreen1._y = 120;
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) {
_root.options.duplicateMovieClip("options1", 2050);
_root.options1._x = 0;
_root.options1._y = 0;
_root.soundbgm.duplicateMovieClip("soundbgm1", 103);
_root.soundbgm1.gotoAndStop(2);
scene_load = 1;
}
}
if (_global.program == 3) {
delete _global.howinstance;
if (scene_load == null) {
_root.howtoplay.duplicateMovieClip("howtoplay1", 2000);
_root.howtoplay1._x = 0;
_root.howtoplay1._y = 0;
scene_load = 1;
}
if (_root.howtoplay1._currentframe == 1) {
_root.howtoplay1.play();
}
} else if (_global.howinstance == null) {
removeMovieClip(_root.howtoplay1);
_global.howinstance = 1;
}
if (_global.program == 4) {
delete _global.charinstance;
if (scene_load == null) {
_root.cs_char_sel.duplicateMovieClip("cs_char_sel1", 2000);
_root.cs_char_sel1._x = 0;
_root.cs_char_sel1._y = 0;
_root.cs_char_sel1.gotoAndPlay(2);
scene_load = 1;
}
} else if (_global.charinstance == null) {
removeMovieClip(_root.cs_char_sel1);
_global.charinstance = 1;
}
if (_global.program == 5) {
delete _global.taleinstance;
if (scene_load == null) {
_root.tale.duplicateMovieClip("tale1", 3000);
_root.tale1._x = 0;
_root.tale1._y = 0;
scene_load = 1;
}
if (_root.tale1._currentframe == 1) {
_root.tale1.play();
}
} else if (_global.taleinstance == null) {
removeMovieClip(_root.tale1);
_global.taleinstance = 1;
}
if (_global.program == 6) {
delete _global.dungeoninstance1;
removeMovieClip(_root[vrb]);
enemy_spawn = 5;
game_music();
game_soundEffect();
if (npc_menu == 1) {
} else {
game_dun_lighting();
game_items_dungeon(_root.char1);
if (((heal_t_use == null) && (zap_t_use == null)) && (rewind == null)) {
game_minimap();
if ((minimap == 2) && (centermap == 1)) {
} else {
game_npc();
game_map_exit();
game_gui();
game_class();
game_level(_root.char1);
game_stats();
game_spell();
game_player(_root.char1, 3.8 / game_speed, 1, stats_agi_full * game_speed, _root.char_atk1);
game_hud(_root.char1, _root.hp_bar1);
}
}
}
game_map_center();
game_rewind(_root.char1, _root["enemy" + enemAi], _root.dun_map1);
if (((heal_t_use == null) && (zap_t_use == null)) && (rewind == null)) {
if (centermap == 1) {
if (minimap == 2) {
} else {
game_mouseControl(_root.char1, 3.8 / game_speed, _root.char_atk1, _root.npc_1);
}
} else {
game_mouseControl(_root.char1, 3.8 / game_speed, _root.char_atk1, _root.npc_1);
}
game_map_dungeon(_root.char1, _root["item" + map_move], _root.dun_map1, 3.8, 2.5);
var enemAi = 1;
while (enemAi < enemy_spawn) {
game_slomo(_root.char1, _root["enemy" + enemAi]);
game_enemy(_root["enemy" + enemAi], 2.4 / game_speed, 1, 40 / game_speed, _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, 3);
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++;
}
_root.shield = 13;
removeMovieClip(_root.hud_mc1);
delete enemNum;
delete enemRemove;
if (optiongold == 1) {
} else {
delete gold;
}
if (optionlevel == 1) {
} else {
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;
delete dunmap;
delete dun_generator;
delete lx;
delete dunstring_scan;
removeMovieClip(_root.soundbgm1);
removeMovieClip(_root.mini_map1);
delete itemArray;
_global.dungeoninstance1 = 1;
removeMovieClip(_root.debug_mc11);
delete gamestrt;
delete invis_buff;
delete mightbuff;
delete blessbuff;
delete potencebuff;
delete shadowbuff;
invistimer = -999;
mighttimer = -999;
blesstimer = -999;
potencetimer = -999;
shadowtimer = -999;
flanktimer = -999;
delete concpotTimer;
delete meleenum;
delete flvl;
delete furyLevel;
while (remdrawx < 77) {
removeMovieClip(_root["minimap__" + remdrawx]);
remdrawx++;
}
removeMovieClip(_root.debug_mc11);
}
if (_global.program == 7) {
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);
game_hud(_root.char1, _root.hp_bar1);
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, 4);
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++;
}
_root.shield = 13;
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();
removeMovieClip(_root.mini_map1);
delete itemArray;
_global.gameinstance1 = 1;
}
if (_global.program == 8) {
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);
game_hud(_root.char1, _root.hp_bar1);
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++;
}
_root.shield = 13;
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();
removeMovieClip(_root.mini_map1);
delete itemArray;
_global.gameinstance2 = 1;
}
if (_global.program == 9) {
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);
game_hud(_root.char1, _root.hp_bar1);
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++;
}
_root.shield = 13;
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.mini_map1);
removeMovieClip(_root.soundbgm1);
stopAllSounds();
delete itemArray;
_global.gameinstance3 = 1;
}
if (_global.program == 10) {
attractMode();
replay();
vrb = "DUNGEON-1";
if (scene_load == null) {
screen(vrb, "[DUNGEON-2]");
scene_load = 1;
}
}
if (_global.program == 11) {
attractMode();
replay();
vrb = "attract_screen";
if (scene_load == null) {
screen(vrb, "[ATTRACT]");
scene_load = 1;
}
}
if (_global.program == 12) {
highscore();
vrb = "highscore_screen";
if (scene_load == null) {
screen(vrb, "[HIGHSCORE]");
scene_load = 1;
}
}
};
Frame 2
stop();
stop();
delete scene_load;
Instance of Symbol 746 MovieClip "player_hitpoints" in Frame 2
onClipEvent (load) {
if (_root.high == 1) {
this._visible = false;
}
}
Instance of Symbol 750 MovieClip "nme_hitpoints" in Frame 2
onClipEvent (load) {
if (_root.high == 1) {
this._visible = false;
}
}
Instance of Symbol 753 MovieClip "ambushnme_hitpoints" in Frame 2
onClipEvent (load) {
if (_root.high == 1) {
this._visible = false;
}
}
Instance of Symbol 1321 MovieClip "floormouse" in Frame 2
onClipEvent (enterFrame) {
if (this._x < (_root._xmouse + 12)) {
this._x = this._x + 24;
}
if (this._x > (_root._xmouse - 12)) {
this._x = this._x - 24;
}
if (this._y < (_root._ymouse + 12)) {
this._y = this._y + 24;
}
if (this._y > (_root._ymouse - 12)) {
this._y = this._y - 24;
}
}
Instance of Symbol 1550 MovieClip "loader" in Frame 2
onClipEvent (load) {
this.swapDepths(9300);
}
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 2
stop();
Instance of Symbol 77 MovieClip in Symbol 80 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.cs_name_a == "Rogue") {
this.gotoAndStop(2);
} else if (_parent.cs_name_a == "Warrior") {
this.gotoAndStop(1);
}
}
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 5
gotoAndStop (1);
Symbol 82 MovieClip Frame 10
gotoAndStop (1);
Symbol 82 MovieClip Frame 25
stop();
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_root.cs_char_sel1.cs.choose = 2;
}
onClipEvent (enterFrame) {
if (_parent._parent._currentframe >= 15) {
if (Key.isDown(13) || ((_root.m_input == 1) && (_root.cs_char_sel1.cs.cs_char_sel.cs_b.hitTest(_root._xmouse, _root._ymouse, true)))) {
if (k_enter == null) {
_root.cs_char_sel1.cs.cs_char_sel.cs_b.cs_name_a = "Rogue";
if (_root.cs_char_sel1.cs.cs_char_sel._currentframe >= 25) {
_root.class = _root.cs_char_sel1.cs.choose;
stopAllSounds();
if (_root.retry == 1) {
_global.program = 6;
} else {
_global.program = 5;
}
delete _root.scene_load;
}
if (select == null) {
_root.cs_char_sel1.cs.cs_char_sel.gotoAndPlay(11);
select = 1;
_root.soundeffect.gotoAndStop(3);
}
k_enter = 1;
}
} else {
delete k_enter;
}
if (_root.cs_char_sel1.cs.choose == 1) {
_root.cs_char_sel1.cs.cs_char_sel.cs_a.cs_name_a = "Warrior";
_root.cs_char_sel1.cs.cs_char_sel.cs_b.cs_name_a = "Rogue";
_root.cs_char_sel1.cs.cs_char_sel.cs_c.cs_name_a = "Warrior";
_root.cs_char_sel1.cs.cs_char_sel.cs_d.cs_name_a = "Rogue";
}
if (_root.cs_char_sel1.cs.choose == 2) {
_root.cs_char_sel1.cs.cs_char_sel.cs_a.cs_name_a = "Rogue";
_root.cs_char_sel1.cs.cs_char_sel.cs_b.cs_name_a = "Warrior";
_root.cs_char_sel1.cs.cs_char_sel.cs_c.cs_name_a = "Rogue";
_root.cs_char_sel1.cs.cs_char_sel.cs_d.cs_name_a = "Warrior";
}
if (Key.isDown(37) || ((_root.m_input == 1) && (_root.cs_char_sel1.cs.cs_char_sel.cs_a.hitTest(_root._xmouse, _root._ymouse, true)))) {
delete select;
if (klrush == 1) {
if (klinput >= 5) {
delete k_l_input;
delete klinput;
} else {
klinput++;
}
} else if (klinput >= 30) {
delete k_l_input;
delete klinput;
klrush = 1;
} else {
klinput++;
}
if (k_l_input == null) {
if (_root.cs_char_sel1.cs.choose <= 1) {
_root.cs_char_sel1.cs.choose = 2;
} else {
_root.cs_char_sel1.cs.choose--;
}
_root.cs_char_sel1.cs.cs_char_sel.gotoAndPlay(6);
delete _root.cs_char_sel1.cs.select;
_root.soundeffect.gotoAndStop(2);
k_l_input = 1;
}
} else {
delete k_l_input;
delete klrush;
}
if (Key.isDown(39) || ((_root.m_input == 1) && (_root.cs_char_sel1.cs.cs_char_sel.cs_c.hitTest(_root._xmouse, _root._ymouse, true)))) {
delete select;
if (krrush == 1) {
if (krinput >= 5) {
delete k_r_input;
delete krinput;
} else {
krinput++;
}
} else if (krinput >= 30) {
delete k_r_input;
delete krinput;
krrush = 1;
} else {
krinput++;
}
if (k_r_input == null) {
if (_root.cs_char_sel1.cs.choose >= 2) {
_root.cs_char_sel1.cs.choose = 1;
} else {
_root.cs_char_sel1.cs.choose++;
}
_root.cs_char_sel1.cs.cs_char_sel.gotoAndPlay(2);
delete _root.cs_char_sel1.cs.select;
_root.soundeffect.gotoAndStop(2);
k_r_input = 1;
}
} else {
delete k_r_input;
delete krrush;
}
}
}
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 2
play();
Symbol 90 MovieClip Frame 16
stop();
Symbol 181 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 2
stop();
Symbol 181 MovieClip Frame 3
stop();
Symbol 181 MovieClip Frame 4
stop();
Symbol 181 MovieClip Frame 5
stop();
Symbol 181 MovieClip Frame 6
stop();
Symbol 181 MovieClip Frame 7
stop();
Symbol 181 MovieClip Frame 8
stop();
Symbol 181 MovieClip Frame 9
stop();
Symbol 181 MovieClip Frame 10
stop();
Symbol 181 MovieClip Frame 11
stop();
Symbol 181 MovieClip Frame 12
stop();
Instance of Symbol 181 MovieClip in Symbol 182 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 182 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 195 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 210 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 217 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 230 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 252 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 261 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 261 MovieClip Frame 6
stop();
Instance of Symbol 181 MovieClip in Symbol 272 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 272 MovieClip Frame 6
stop();
Instance of Symbol 181 MovieClip in Symbol 285 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 285 MovieClip Frame 6
stop();
Instance of Symbol 181 MovieClip in Symbol 296 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 296 MovieClip Frame 6
stop();
Instance of Symbol 181 MovieClip in Symbol 305 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 305 MovieClip Frame 5
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
stop();
Symbol 306 MovieClip Frame 3
stop();
Symbol 306 MovieClip Frame 4
stop();
Symbol 306 MovieClip Frame 5
stop();
Symbol 306 MovieClip Frame 6
stop();
Instance of Symbol 181 MovieClip in Symbol 306 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 306 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 306 MovieClip Frame 7
stop();
Instance of Symbol 181 MovieClip in Symbol 306 MovieClip Frame 7
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 306 MovieClip Frame 8
stop();
Instance of Symbol 181 MovieClip in Symbol 306 MovieClip Frame 8
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 306 MovieClip Frame 9
stop();
Instance of Symbol 181 MovieClip in Symbol 306 MovieClip Frame 9
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 306 MovieClip Frame 10
stop();
Symbol 306 MovieClip Frame 11
stop();
Symbol 306 MovieClip Frame 12
stop();
Symbol 306 MovieClip Frame 13
stop();
Symbol 306 MovieClip Frame 14
stop();
Symbol 306 MovieClip Frame 15
stop();
Symbol 306 MovieClip Frame 16
stop();
Symbol 306 MovieClip Frame 17
stop();
Symbol 306 MovieClip Frame 18
stop();
Symbol 306 MovieClip Frame 19
stop();
Symbol 306 MovieClip Frame 20
stop();
Instance of Symbol 306 MovieClip "char" in Symbol 315 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.char1._currentframe);
this._xscale = _root.char1._xscale;
}
Symbol 348 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 2
stop();
Symbol 348 MovieClip Frame 3
stop();
Symbol 348 MovieClip Frame 4
stop();
Symbol 348 MovieClip Frame 5
stop();
Symbol 348 MovieClip Frame 6
stop();
Symbol 348 MovieClip Frame 7
stop();
Symbol 352 MovieClip Frame 1
if (htpfd == null) {
if (_global.program == 3) {
_root.fader.duplicateMovieClip("fader_mc1", 20008);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
htpfd = 1;
}
}
stop();
Instance of Symbol 351 MovieClip in Symbol 352 MovieClip Frame 4
onClipEvent (enterFrame) {
if (_global.program == 3) {
if (Key.isDown(Key.getCode())) {
_parent.gotoAndPlay(200);
}
}
}
onClipEvent (mouseDown) {
if (_global.program == 3) {
_parent.gotoAndPlay(200);
}
}
Symbol 352 MovieClip Frame 206
if (card >= 6) {
_root.fader.duplicateMovieClip("fader_mc1", 20009);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
_global.program = 4;
delete _root.scene_load;
removeMovieClip(this);
stop();
} else {
_root.fader.duplicateMovieClip("fader_mc1", 20008);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
gotoAndPlay (2);
howtoplay.nextFrame();
card++;
}
Symbol 353 Button
on (keyPress "y") {
_root.stats_exp = _root.stats_exp + 1000;
}
on (keyPress "u") {
_root.concpot_use = 1;
}
on (keyPress "i") {
_root.gold = _root.gold + 10000;
}
on (keyPress "j") {
_root.player_health = _root.player_health - (_root.stats_health * 0.1);
}
Instance of Symbol 355 MovieClip in Symbol 356 MovieClip Frame 1
onClipEvent (enterFrame) {
if (counter == null) {
counter = 1;
}
if (getTimer() >= (999 * counter)) {
counter++;
_root.fps = "FPS:" + rate;
delete rate;
} else {
rate++;
}
}
Symbol 365 MovieClip Frame 10
removeMovieClip(this);
Symbol 432 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 2
stop();
Symbol 432 MovieClip Frame 3
stop();
Symbol 432 MovieClip Frame 4
stop();
Symbol 432 MovieClip Frame 5
stop();
Symbol 432 MovieClip Frame 6
stop();
Symbol 432 MovieClip Frame 7
stop();
Symbol 432 MovieClip Frame 8
stop();
Symbol 539 MovieClip Frame 1
stop();
Symbol 539 MovieClip Frame 2
stop();
Instance of Symbol 372 MovieClip in Symbol 539 MovieClip Frame 7
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
if (_root.floor > 1) {
_root.exit_dun = 1;
_root.floorHigher = 1;
this._y = -9999;
}
}
}
Instance of Symbol 376 MovieClip "exit" in Symbol 539 MovieClip Frame 7
onClipEvent (load) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
_root.findme = _parent._name;
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 432 MovieClip "hb" in Symbol 539 MovieClip Frame 7
onClipEvent (load) {
gotoAndStop(_parent._currentframe);
}
onClipEvent (enterFrame) {
gotoAndStop(_parent._currentframe);
}
Instance of Symbol 372 MovieClip in Symbol 539 MovieClip Frame 76
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
_root.exit_dun = 1;
if (_root.floor == null) {
_root.floor = 1;
}
_root.floorLower = 1;
this._y = -9999;
}
}
Instance of Symbol 372 MovieClip in Symbol 539 MovieClip Frame 80
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
if (_root.floor > 1) {
_root.exit_dun = 1;
_root.floorHigher = 1;
this._y = -9999;
}
}
}
Instance of Symbol 376 MovieClip "exit" in Symbol 539 MovieClip Frame 80
onClipEvent (load) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 372 MovieClip in Symbol 539 MovieClip Frame 143
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
_root.exit_dun = 1;
if (_root.floor == null) {
_root.floor = 1;
}
_root.floorLower = 1;
this._y = -9999;
}
}
Instance of Symbol 372 MovieClip in Symbol 539 MovieClip Frame 210
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this)) {
if (_root.floor > 1) {
_root.exit_dun = 1;
_root.floorHigher = 1;
this._y = -9999;
}
}
}
Instance of Symbol 376 MovieClip "exit" in Symbol 539 MovieClip Frame 210
onClipEvent (load) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 543 MovieClip in Symbol 548 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 543 MovieClip in Symbol 560 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._height > ((_root.invistimer * 17.8) / 1560)) {
this._height = this._height - 1;
}
if (this._height < ((_root.invistimer * 17.8) / 1560)) {
this._height = this._height + 1;
}
}
Instance of Symbol 543 MovieClip in Symbol 564 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._height > ((_root.furytimer * 17.8) / 6250)) {
this._height = this._height - 1;
}
if (this._height < ((_root.furytimer * 17.8) / 6250)) {
this._height = this._height + 1;
}
}
Symbol 650 MovieClip Frame 1
stop();
Symbol 650 MovieClip Frame 2
stop();
Symbol 650 MovieClip Frame 3
stop();
Symbol 650 MovieClip Frame 4
stop();
Symbol 650 MovieClip Frame 5
stop();
Symbol 650 MovieClip Frame 6
stop();
Symbol 650 MovieClip Frame 7
stop();
Symbol 650 MovieClip Frame 8
stop();
Symbol 650 MovieClip Frame 9
stop();
Symbol 650 MovieClip Frame 10
stop();
Symbol 650 MovieClip Frame 11
stop();
Symbol 650 MovieClip Frame 12
stop();
Symbol 650 MovieClip Frame 13
stop();
Symbol 650 MovieClip Frame 14
stop();
Symbol 650 MovieClip Frame 15
stop();
Symbol 650 MovieClip Frame 16
stop();
Symbol 650 MovieClip Frame 17
stop();
Symbol 650 MovieClip Frame 18
stop();
Symbol 650 MovieClip Frame 19
stop();
Symbol 650 MovieClip Frame 20
stop();
Symbol 650 MovieClip Frame 21
stop();
Symbol 650 MovieClip Frame 22
Instance of Symbol 306 MovieClip "char" in Symbol 668 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.char1._currentframe);
this._xscale = _root.char1._xscale;
}
Instance of Symbol 650 MovieClip in Symbol 668 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.equipArray[2] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.equipArray[2]);
}
}
Instance of Symbol 650 MovieClip in Symbol 668 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.equipArray[3] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.equipArray[3]);
}
}
Instance of Symbol 650 MovieClip "item_" in Symbol 668 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.equipArray[1] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.equipArray[1]);
}
}
Instance of Symbol 650 MovieClip in Symbol 668 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.equipArray[4] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.equipArray[4]);
}
}
Instance of Symbol 650 MovieClip in Symbol 668 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.equipArray[5] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.equipArray[5]);
}
}
Symbol 677 MovieClip Frame 1
stop();
Symbol 677 MovieClip Frame 2
stop();
Instance of Symbol 650 MovieClip "item1" in Symbol 678 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.spellArray[1] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.spellArray[1]);
}
}
Instance of Symbol 650 MovieClip "item2" in Symbol 678 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.spellArray[2] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.spellArray[2]);
}
}
Instance of Symbol 650 MovieClip "item3" in Symbol 678 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.spellArray[3] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.spellArray[3]);
}
}
Instance of Symbol 650 MovieClip "item4" in Symbol 678 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.spellArray[4] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.spellArray[4]);
}
}
Instance of Symbol 650 MovieClip "item5" in Symbol 678 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.spellArray[5] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.spellArray[5]);
}
}
Instance of Symbol 677 MovieClip in Symbol 678 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.spellMenuArrowD + 1);
}
Instance of Symbol 677 MovieClip "UP" in Symbol 678 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.spellMenuArrowU + 1);
}
Symbol 685 Button
on (press) {
m = 1;
}
on (release, releaseOutside) {
m = 0;
}
Instance of Symbol 686 MovieClip "head" in Symbol 687 MovieClip Frame 1
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
}
}
Instance of Symbol 687 MovieClip "player" in Symbol 689 MovieClip Frame 1
onClipEvent (load) {
function playhead(x) {
if (x.m == 1) {
if (_xmouse < 3) {
_xmouse = 3;
} else if (_xmouse > 285.1) {
_xmouse = 285.1;
} else {
x._x = _xmouse;
}
_root.time_input = 1;
_root.play_ = Math.floor((x._x * _root.play_tot) / 288.1);
p = 0;
} else {
if ((!p) == 1) {
p = 1;
}
delete _root.time_input;
x._x = (_root.play_ * 288.1) / _root.play_tot;
}
}
}
onClipEvent (enterFrame) {
playhead(_root.hud_mc1.timebar.player.head);
}
Instance of Symbol 650 MovieClip "item_1" in Symbol 699 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[1] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.itemArraynum[1]);
}
}
Instance of Symbol 650 MovieClip "item_2" in Symbol 699 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[2] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.itemArraynum[2]);
}
}
Instance of Symbol 650 MovieClip "item_3" in Symbol 699 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[3] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.itemArraynum[3]);
}
}
Instance of Symbol 650 MovieClip "item_4" in Symbol 699 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[4] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.itemArraynum[4]);
}
}
Instance of Symbol 650 MovieClip "item_5" in Symbol 699 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.itemNum[5] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.itemArraynum[5]);
}
}
Symbol 710 MovieClip Frame 1
stop();
Symbol 710 MovieClip Frame 2
stop();
Symbol 719 MovieClip Frame 1
stop();
Instance of Symbol 543 MovieClip in Symbol 743 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.class == 1) {
if (_root.mighttimer >= 1) {
if (this._height > ((_root.mighttimer * 17.8) / 1620)) {
this._height = this._height - 1;
}
if (this._height < ((_root.mighttimer * 17.8) / 1620)) {
this._height = this._height + 1;
}
} else if (_root.potencetimer >= 1) {
if (this._height > ((_root.potencetimer * 17.8) / 1850)) {
this._height = this._height - 1;
}
if (this._height < ((_root.potencetimer * 17.8) / 1850)) {
this._height = this._height + 1;
}
} else if (_root.shadowtimer >= 1) {
if (this._height > ((_root.shadowtimer * 17.8) / 6000)) {
this._height = this._height - 1;
}
if (this._height < ((_root.shadowtimer * 17.8) / 6000)) {
this._height = this._height + 1;
}
}
}
if (_root.class == 2) {
if (_root.blesstimer >= 1) {
if (this._height > ((_root.blesstimer * 17.8) / 3750)) {
this._height = this._height - 1;
}
if (this._height < ((_root.blesstimer * 17.8) / 3750)) {
this._height = this._height + 1;
}
} else if (_root.flanktimer >= 1) {
if (this._height > ((_root.flanktimer * 17.8) / 6250)) {
this._height = this._height - 1;
}
if (this._height < ((_root.flanktimer * 17.8) / 6250)) {
this._height = this._height + 1;
}
}
}
}
Instance of Symbol 728 MovieClip in Symbol 743 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.meleenum >= 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 743 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.meleenum >= 2) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 733 MovieClip in Symbol 743 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.blesstimer >= 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 735 MovieClip in Symbol 743 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.potencetimer >= 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 737 MovieClip in Symbol 743 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.mighttimer >= 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 739 MovieClip in Symbol 743 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.shadowtimer >= 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 548 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.concpot_use == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 551 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
}
Instance of Symbol 554 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 557 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 560 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.invis_buff == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 564 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.furybuff == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 668 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.equip_usage == 1) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 678 MovieClip "spellList" in Symbol 744 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.spell_usage == 1) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 689 MovieClip "timebar" in Symbol 744 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.time_use == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 699 MovieClip "macro" in Symbol 744 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.guiRO = ((((((((((((("HP:" + _root.player_health) + "/") + _root.stats_health) + "<br>") + "MP:") + _root.player_mana) + "/") + _root.stats_mana) + "<br>") + "EXP:") + _root.stats_exp_output) + "<br>") + "$:") + _root.gold;
_root.equipoutput1 = ((((((((((((((((((((((((((((((("HP:" + _root.player_health) + "/") + _root.stats_health) + "<br>") + "MP:") + _root.player_mana) + "/") + _root.stats_mana) + "<br>") + "EXP:") + _root.stats_exp_output) + "<br>") + "GOLD:") + _root.gold) + "<br>") + _root.classoutput) + "<br>") + "STR ") + _root.str_readout) + "<br>") + "AGI ") + _root.agi_readout) + "<br>") + "DEX ") + _root.dex_readout) + "<br>") + "LVL ") + _root.level) + "<br>") + "FLOOR ") + _root.floor) + "<br>";
this.gotoAndStop(_root.keys);
if (_root.item_usage == 1) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 743 MovieClip in Symbol 744 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.class == 1) {
if ((_root.shadowtimer >= 1) || (_root.mighttimer >= 1)) {
_visible = true;
} else {
_visible = false;
}
}
if (_root.class == 2) {
if (((_root.flanktimer >= 1) || (_root.blesstimer >= 1)) || (_root.potencetimer >= 1)) {
_visible = true;
} else {
_visible = false;
}
}
}
Symbol 746 MovieClip Frame 25
removeMovieClip(this);
Symbol 750 MovieClip Frame 25
removeMovieClip(this);
Symbol 753 MovieClip Frame 25
removeMovieClip(this);
Symbol 754 MovieClip Frame 1
stop();
Symbol 754 MovieClip Frame 2
play();
Symbol 754 MovieClip Frame 10
if (_root.exit_dunload == 1) {
if (_root.floorHigher == 1) {
if (_root.dmap == null) {
_root.dmap = _root.floor;
}
_root.floor--;
_root.col = _root.dun_exit_col[_root.dmap];
_root.dunmap = _root.dun_exit_dunmap[_root.dmap];
_root.row = 7;
_root.char1._x = 109;
_root.char1._y = 100;
_root.dun_map1.gotoAndStop(((_root.dunmap * _root.row) + _root.col) + ((_root.dmap - 1) * 70));
_root.pool.gotoAndStop(((_root.dunmap * _root.row) + _root.col) + ((_root.dmap - 1) * 70));
_root.floor_fader.duplicateMovieClip("floor_fader_mc1", 20001);
_root.floor_fader_mc1.gotoAndPlay(1);
_root.floor_fader_mc1._x = 0;
_root.floor_fader_mc1._y = 0;
_root.floorRO = "Floor " + _root.floor;
_root.fader.duplicateMovieClip("fader_mc1", 20002);
_root.fader_mc1.gotoAndPlay(1);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
_root.floorHAnim = 1;
stopAllSounds();
if ((_root.floor + 2) >= 10) {
_root.soundbgm1.gotoAndStop(11);
} else {
_root.soundbgm1.gotoAndStop(_root.floor + 2);
}
delete _root.floorHigher;
delete _root.exit_dunload;
}
if (_root.floorLower == 1) {
if (_root.dmap == null) {
_root.dmap = _root.floor;
}
_root.floor++;
_root.char1._x = 109;
_root.char1._y = 100;
_root.col = _root.dun_start_col[_root.dmap];
_root.dunmap = _root.dun_start_dunmap[_root.dmap];
_root.row = 7;
_root.dun_visfull[_root.floor][(_root.dunmap * _root.row) + _root.col] = 1;
_root.floor_fader.duplicateMovieClip("floor_fader_mc1", 20003);
_root.floor_fader_mc1.gotoAndPlay(1);
_root.floor_fader_mc1._x = 0;
_root.floor_fader_mc1._y = 0;
_root.floorRO = "Floor " + _root.floor;
_root.fader.duplicateMovieClip("fader_mc1", 20004);
_root.fader_mc1.gotoAndPlay(1);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
_root.floorLAnim = 1;
_root.dun_map1.gotoAndStop(((_root.dunmap * _root.row) + _root.col) + ((_root.dmap - 1) * 70));
_root.pool.gotoAndStop(((_root.dunmap * _root.row) + _root.col) + ((_root.dmap - 1) * 70));
stopAllSounds();
if ((_root.floor + 2) >= 14) {
_root.soundbgm1.gotoAndStop(13);
} else {
_root.soundbgm1.gotoAndStop(_root.floor + 2);
}
_root.soundbgm1.gotoAndStop(1);
delete _root.floorLower;
delete _root.exit_dunload;
}
} else {
_global.program++;
delete _root.scene_load;
removeMovieClip(this);
stop();
}
Instance of Symbol 759 MovieClip in Symbol 761 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.floorHAnim == 1) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 760 MovieClip in Symbol 761 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.floorLAnim == 1) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 761 MovieClip Frame 74
delete _root.floorHAnim;
delete _root.floorLAnim;
removeMovieClip(this);
Instance of Symbol 776 MovieClip in Symbol 777 MovieClip Frame 1
onClipEvent (enterFrame) {
this._alpha = Math.abs(Math.ceil(((_parent._parent._currentframe * 100) / _parent._parent._totalframes) - 100)) - 20;
}
Symbol 782 Button
on (release) {
restart++;
}
Symbol 783 Button
on (release) {
restart--;
}
Symbol 786 MovieClip Frame 1
stop();
stopAllSounds();
Instance of Symbol 763 MovieClip in Symbol 786 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = (_parent._currentframe * 240) / _parent._totalframes;
}
Symbol 786 MovieClip Frame 2
play();
Instance of Symbol 777 MovieClip in Symbol 786 MovieClip Frame 2
onClipEvent (enterFrame) {
if (Key.isDown(13) || (_root.m_input == 1)) {
if (coin == null) {
_parent.gotoAndPlay(518);
coin = 1;
}
}
this._x = (_parent._currentframe * 240) / 517;
this.percent = Math.abs(Math.ceil((_parent._currentframe * 100) / 517) - 100);
this.percentx = this.percent.toString().slice(1, 2);
per2 = Math.abs(((_parent._currentframe * 1) / 517) - 1);
this.percent2 = "." + per2.toString().slice(4, 7);
this.percent3 = this.percent.toString().slice(0, 1);
}
Symbol 786 MovieClip Frame 517
removeMovieClip(_root.debug_mc11);
delete _root.gamestrt;
delete _root.invis_buff;
delete _root.mightbuff;
delete _root.blessbuff;
delete _root.potencebuff;
delete _root.shadowbuff;
_root.furytimer = -999;
_root.invistimer = -999;
_root.mighttimer = -999;
_root.blesstimer = -999;
_root.potencetimer = -999;
_root.shadowtimer = -999;
_root.flanktimer = -999;
_root.bstabtimer = -999;
_root.concpotTimer = -999;
delete _root.meleenum;
while (_root.remdrawx < 77) {
removeMovieClip(_root["minimap__" + _root.remdrawx]);
_root.remdrawx++;
}
removeMovieClip(_root.debug_mc11);
_global.program = 1;
delete _root.scene_load;
removeMovieClip(this);
Symbol 786 MovieClip Frame 518
_root.soundbgm.duplicateMovieClip("soundbgm1", 104);
_root.soundbgm1.gotoAndStop(2);
_root.soundbgm1.gotoAndStop(1);
Symbol 786 MovieClip Frame 528
stop();
Instance of Symbol 785 MovieClip in Symbol 786 MovieClip Frame 528
onClipEvent (enterFrame) {
h = this._height;
if (restart == null) {
restart = 3;
}
if (Key.isDown(38)) {
if ((!kup_input) == 1) {
if (restart <= 1) {
restart = 4;
} else {
restart--;
}
kup_input = 1;
}
} else {
delete kup_input;
}
if (Key.isDown(40)) {
if ((!kdown_input) == 1) {
if (restart >= 4) {
restart = 1;
} else {
restart++;
}
kdown_input = 1;
}
} else {
delete kdown_input;
}
if (restart == 1) {
this.up._visible = false;
} else {
this.up._visible = true;
}
if (restart == 1) {
restart_text = "REWIND YOUR DEATH";
button_ = "A";
if (Key.isDown(65) || (Key.isDown(13))) {
_root.time_use = 1;
}
this._y = y + (h * -2);
}
if (restart == 2) {
restart_text = "RESTART WITH REMAINING GOLD";
button_ = "S";
if (Key.isDown(83) || (Key.isDown(13))) {
_root.optiongold = 1;
_root.retry = 1;
_parent.play();
}
this._y = y + (h * -1);
}
if (restart == 3) {
restart_text = "RESTART WITH YOUR LEVEL";
button_ = "D";
if (Key.isDown(68) || (Key.isDown(13))) {
_root.optionlevel = 1;
_root.retry = 1;
_parent.play();
}
if (y == null) {
y = this._y;
}
this._y = y;
}
if (restart == 4) {
restart_text = "START OVER (NO BONUS)";
button_ = "F";
if (Key.isDown(70) || (Key.isDown(13))) {
_root.retry = 1;
_parent.play();
}
this._y = y + (h * 1);
}
if (restart == 4) {
this.down._visible = false;
} else {
this.down._visible = true;
}
}
Symbol 786 MovieClip Frame 545
removeMovieClip(_root.debug_mc11);
_root.furytimer = -999;
_root.invistimer = -999;
_root.mighttimer = -999;
_root.blesstimer = -999;
_root.potencetimer = -999;
_root.shadowtimer = -999;
_root.flanktimer = -999;
_root.bstabtimer = -999;
_root.concpotTimer = -999;
delete _root.meleenum;
delete _root.gamestrt;
delete _root.invis_buff;
delete _root.mightbuff;
delete _root.blessbuff;
delete _root.potencebuff;
delete _root.shadowbuff;
while (_root.remdrawx < 77) {
removeMovieClip(_root["minimap__" + _root.remdrawx]);
_root.remdrawx++;
}
Symbol 786 MovieClip Frame 546
delete _root.scene_load;
delete _root.recbgm;
_root.centermap = 1;
_global.program = 4;
Symbol 786 MovieClip Frame 547
removeMovieClip(this);
Symbol 788 MovieClip Frame 25
removeMovieClip(this);
Symbol 793 MovieClip Frame 1
stop();
Symbol 818 MovieClip Frame 6
stop();
Symbol 823 MovieClip Frame 6
stop();
Symbol 824 MovieClip Frame 6
stop();
Symbol 825 MovieClip Frame 6
stop();
Symbol 830 MovieClip Frame 6
stop();
Symbol 858 MovieClip Frame 6
stop();
Symbol 863 MovieClip Frame 6
stop();
Symbol 864 MovieClip Frame 6
stop();
Symbol 865 MovieClip Frame 6
stop();
Symbol 870 MovieClip Frame 6
stop();
Symbol 903 MovieClip Frame 6
stop();
Symbol 912 MovieClip Frame 6
stop();
Symbol 913 MovieClip Frame 6
stop();
Symbol 914 MovieClip Frame 6
stop();
Symbol 923 MovieClip Frame 6
stop();
Symbol 955 MovieClip Frame 5
stop();
Symbol 964 MovieClip Frame 5
stop();
Symbol 965 MovieClip Frame 5
stop();
Symbol 966 MovieClip Frame 5
stop();
Symbol 975 MovieClip Frame 5
stop();
Symbol 1003 MovieClip Frame 6
stop();
Symbol 1008 MovieClip Frame 6
stop();
Symbol 1009 MovieClip Frame 6
stop();
Symbol 1010 MovieClip Frame 6
stop();
Symbol 1015 MovieClip Frame 6
stop();
Symbol 1043 MovieClip Frame 6
stop();
Symbol 1048 MovieClip Frame 6
stop();
Symbol 1049 MovieClip Frame 6
stop();
Symbol 1050 MovieClip Frame 6
stop();
Symbol 1055 MovieClip Frame 6
stop();
Symbol 1056 MovieClip Frame 1
gotoAndStop(_root.monanim);
stop();
Symbol 1056 MovieClip Frame 2
stop();
Symbol 1056 MovieClip Frame 3
stop();
Symbol 1056 MovieClip Frame 4
stop();
Symbol 1056 MovieClip Frame 5
stop();
Symbol 1056 MovieClip Frame 6
stop();
Instance of Symbol 181 MovieClip in Symbol 1056 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Instance of Symbol 181 MovieClip in Symbol 1056 MovieClip Frame 6
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 1056 MovieClip Frame 7
stop();
Instance of Symbol 181 MovieClip in Symbol 1056 MovieClip Frame 7
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 1056 MovieClip Frame 8
stop();
Instance of Symbol 181 MovieClip in Symbol 1056 MovieClip Frame 8
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 1056 MovieClip Frame 9
stop();
Instance of Symbol 181 MovieClip in Symbol 1056 MovieClip Frame 9
onClipEvent (load) {
this.gotoAndStop(_root.shield);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shield);
}
Symbol 1056 MovieClip Frame 10
stop();
Symbol 1056 MovieClip Frame 11
stop();
Symbol 1056 MovieClip Frame 12
stop();
Symbol 1056 MovieClip Frame 13
stop();
Symbol 1056 MovieClip Frame 14
stop();
Symbol 1056 MovieClip Frame 15
stop();
Symbol 1056 MovieClip Frame 16
stop();
Symbol 1056 MovieClip Frame 17
stop();
Symbol 1056 MovieClip Frame 18
stop();
Symbol 1056 MovieClip Frame 19
stop();
Symbol 1056 MovieClip Frame 20
stop();
Symbol 1056 MovieClip Frame 21
stop();
Symbol 1056 MovieClip Frame 22
stop();
Symbol 1056 MovieClip Frame 23
stop();
Symbol 1056 MovieClip Frame 24
stop();
Symbol 1056 MovieClip Frame 25
stop();
Symbol 1056 MovieClip Frame 26
stop();
Symbol 1056 MovieClip Frame 27
stop();
Symbol 1056 MovieClip Frame 28
stop();
Symbol 1056 MovieClip Frame 29
stop();
Symbol 1056 MovieClip Frame 30
stop();
Symbol 1056 MovieClip Frame 31
stop();
Symbol 1056 MovieClip Frame 32
stop();
Symbol 1056 MovieClip Frame 33
stop();
Symbol 1056 MovieClip Frame 34
stop();
Symbol 1056 MovieClip Frame 35
stop();
Symbol 1056 MovieClip Frame 36
stop();
Symbol 1056 MovieClip Frame 37
stop();
Symbol 1056 MovieClip Frame 38
stop();
Symbol 1056 MovieClip Frame 39
stop();
Symbol 1056 MovieClip Frame 40
stop();
Symbol 1056 MovieClip Frame 41
stop();
Symbol 1056 MovieClip Frame 42
stop();
Symbol 1056 MovieClip Frame 43
stop();
Symbol 1056 MovieClip Frame 44
stop();
Symbol 1056 MovieClip Frame 45
stop();
Symbol 1056 MovieClip Frame 46
stop();
Symbol 1056 MovieClip Frame 47
stop();
Symbol 1056 MovieClip Frame 48
stop();
Symbol 1056 MovieClip Frame 49
stop();
Symbol 1056 MovieClip Frame 50
stop();
Symbol 1056 MovieClip Frame 51
stop();
Symbol 1056 MovieClip Frame 52
stop();
Symbol 1056 MovieClip Frame 53
stop();
Symbol 1056 MovieClip Frame 54
stop();
Symbol 1056 MovieClip Frame 55
stop();
Symbol 1056 MovieClip Frame 56
stop();
Symbol 1056 MovieClip Frame 57
stop();
Symbol 1056 MovieClip Frame 58
stop();
Symbol 1056 MovieClip Frame 59
stop();
Symbol 1056 MovieClip Frame 60
stop();
Symbol 1056 MovieClip Frame 61
stop();
Symbol 1056 MovieClip Frame 62
stop();
Symbol 1056 MovieClip Frame 63
stop();
Symbol 1056 MovieClip Frame 64
stop();
Symbol 1056 MovieClip Frame 65
stop();
Symbol 1056 MovieClip Frame 66
stop();
Symbol 1056 MovieClip Frame 67
stop();
Symbol 1056 MovieClip Frame 68
stop();
Symbol 1056 MovieClip Frame 69
stop();
Symbol 1056 MovieClip Frame 70
stop();
Symbol 1056 MovieClip Frame 71
stop();
Symbol 1056 MovieClip Frame 72
stop();
Symbol 1056 MovieClip Frame 73
stop();
Symbol 1056 MovieClip Frame 74
stop();
Symbol 1056 MovieClip Frame 75
stop();
Symbol 1056 MovieClip Frame 76
stop();
Symbol 1056 MovieClip Frame 77
stop();
Symbol 1056 MovieClip Frame 78
stop();
Symbol 1056 MovieClip Frame 79
stop();
Symbol 1056 MovieClip Frame 80
stop();
Symbol 1056 MovieClip Frame 81
stop();
Symbol 1056 MovieClip Frame 82
stop();
Symbol 1056 MovieClip Frame 83
stop();
Symbol 1056 MovieClip Frame 84
stop();
Symbol 1056 MovieClip Frame 85
stop();
Symbol 1056 MovieClip Frame 86
stop();
Symbol 1056 MovieClip Frame 87
stop();
Symbol 1056 MovieClip Frame 88
stop();
Symbol 1056 MovieClip Frame 89
stop();
Symbol 1056 MovieClip Frame 90
stop();
Symbol 1056 MovieClip Frame 91
stop();
Symbol 1056 MovieClip Frame 92
stop();
Symbol 1056 MovieClip Frame 93
stop();
Symbol 1056 MovieClip Frame 94
stop();
Symbol 1056 MovieClip Frame 95
stop();
Symbol 1056 MovieClip Frame 96
stop();
Symbol 1056 MovieClip Frame 97
stop();
Symbol 1056 MovieClip Frame 98
stop();
Symbol 1056 MovieClip Frame 99
stop();
Symbol 1056 MovieClip Frame 100
stop();
Symbol 1056 MovieClip Frame 101
stop();
Symbol 1056 MovieClip Frame 102
stop();
Symbol 1056 MovieClip Frame 103
stop();
Symbol 1056 MovieClip Frame 104
stop();
Symbol 1056 MovieClip Frame 105
stop();
Symbol 1056 MovieClip Frame 106
stop();
Symbol 1056 MovieClip Frame 107
stop();
Symbol 1056 MovieClip Frame 108
stop();
Symbol 1056 MovieClip Frame 109
stop();
Symbol 1056 MovieClip Frame 110
stop();
Symbol 1056 MovieClip Frame 111
stop();
Symbol 1056 MovieClip Frame 112
stop();
Symbol 1056 MovieClip Frame 113
stop();
Symbol 1056 MovieClip Frame 114
stop();
Symbol 1056 MovieClip Frame 115
stop();
Symbol 1056 MovieClip Frame 116
stop();
Symbol 1056 MovieClip Frame 117
stop();
Symbol 1056 MovieClip Frame 118
stop();
Symbol 1056 MovieClip Frame 119
stop();
Symbol 1056 MovieClip Frame 120
stop();
Symbol 1104 MovieClip Frame 1
stop();
Symbol 1104 MovieClip Frame 2
stop();
Symbol 1104 MovieClip Frame 3
stop();
Symbol 1104 MovieClip Frame 4
stop();
Symbol 1104 MovieClip Frame 5
stop();
Symbol 1104 MovieClip Frame 6
stop();
Symbol 1104 MovieClip Frame 7
stop();
Symbol 1104 MovieClip Frame 8
stop();
Symbol 1106 MovieClip Frame 1
if (htpfd == null) {
if (_global.program == 5) {
_root.fader.duplicateMovieClip("fader_mc1", 20008);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
htpfd = 1;
}
}
stop();
Instance of Symbol 351 MovieClip in Symbol 1106 MovieClip Frame 4
onClipEvent (enterFrame) {
if (_global.program == 5) {
if (Key.isDown(Key.getCode())) {
_parent.gotoAndPlay(200);
}
}
}
onClipEvent (mouseDown) {
if (_global.program == 5) {
_parent.gotoAndPlay(200);
}
}
Symbol 1106 MovieClip Frame 206
if (card >= 7) {
_root.fader.duplicateMovieClip("fader_mc1", 20009);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
stopAllSounds();
_global.program = 6;
delete _root.scene_load;
removeMovieClip(this);
stop();
} else {
_root.fader.duplicateMovieClip("fader_mc1", 20008);
_root.fader_mc1._x = 0;
_root.fader_mc1._y = 0;
howtoplay.nextFrame();
gotoAndPlay (2);
card++;
}
Symbol 1109 MovieClip Frame 15
removeMovieClip(this);
Symbol 1110 MovieClip Frame 15
removeMovieClip(this);
Symbol 1115 MovieClip Frame 1
stop();
Symbol 1115 MovieClip Frame 2
gotoAndStop (1);
Symbol 1115 MovieClip Frame 3
gotoAndStop (1);
Symbol 1115 MovieClip Frame 4
gotoAndStop (1);
Symbol 1127 MovieClip Frame 1
stop();
Symbol 1127 MovieClip Frame 2
stop();
Symbol 1127 MovieClip Frame 3
stop();
Symbol 1127 MovieClip Frame 4
stop();
Symbol 1127 MovieClip Frame 5
stop();
Symbol 1127 MovieClip Frame 6
stop();
Symbol 1127 MovieClip Frame 7
stop();
Symbol 1127 MovieClip Frame 8
stop();
Symbol 1127 MovieClip Frame 9
stop();
Symbol 1127 MovieClip Frame 10
stop();
Symbol 1127 MovieClip Frame 11
stop();
Symbol 1127 MovieClip Frame 12
stop();
Symbol 1127 MovieClip Frame 13
stop();
Symbol 1127 MovieClip Frame 14
gotoAndStop (13);
Symbol 1133 MovieClip Frame 1
gotoAndStop (1);
Symbol 1133 MovieClip Frame 2
gotoAndStop (1);
Symbol 1133 MovieClip Frame 3
gotoAndStop (1);
Symbol 1133 MovieClip Frame 4
gotoAndStop (1);
Symbol 1133 MovieClip Frame 5
gotoAndStop (1);
Symbol 1136 MovieClip Frame 1
stop();
Symbol 1136 MovieClip Frame 2
gotoAndStop (1);
Symbol 1136 MovieClip Frame 3
gotoAndStop (1);
Symbol 1153 MovieClip Frame 25
removeMovieClip(this);
Symbol 1168 MovieClip Frame 1
stop();
Symbol 1168 MovieClip Frame 2
stop();
Symbol 1168 MovieClip Frame 3
stop();
Symbol 1168 MovieClip Frame 4
stop();
Symbol 1174 MovieClip Frame 1
stop();
Symbol 1174 MovieClip Frame 2
stop();
Symbol 1174 MovieClip Frame 3
stop();
Symbol 1177 MovieClip Frame 15
removeMovieClip(this);
Symbol 1198 MovieClip Frame 31
removeMovieClip(this);
Instance of Symbol 1201 MovieClip in Symbol 1208 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._width > ((_root.player_mana * 39) / _root.stats_mana)) {
this._width = this._width - 0.3;
}
}
Instance of Symbol 1203 MovieClip in Symbol 1208 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = (_root.player_mana * 39) / _root.stats_mana;
}
Instance of Symbol 1201 MovieClip in Symbol 1208 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._width > ((_root.player_health * 39) / _root.stats_health)) {
this._width = this._width - 0.3;
}
}
Instance of Symbol 1201 MovieClip in Symbol 1208 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = (_root.player_health * 39) / _root.stats_health;
}
Symbol 1225 MovieClip Frame 18
removeMovieClip(this);
Symbol 1244 MovieClip Frame 38
stop();
Symbol 1250 MovieClip Frame 1
gotoAndStop (1);
Symbol 1250 MovieClip Frame 2
gotoAndStop (1);
Symbol 1250 MovieClip Frame 3
gotoAndStop (1);
Symbol 1250 MovieClip Frame 4
gotoAndStop (1);
Symbol 1250 MovieClip Frame 5
gotoAndStop (1);
Symbol 1250 MovieClip Frame 6
gotoAndStop (1);
Symbol 1275 MovieClip Frame 25
removeMovieClip(this);
Symbol 1292 MovieClip Frame 17
removeMovieClip(this);
Symbol 1298 MovieClip Frame 1
gotoAndStop (1);
Symbol 1298 MovieClip Frame 2
gotoAndStop (1);
Symbol 1298 MovieClip Frame 3
gotoAndStop (1);
Symbol 1298 MovieClip Frame 4
gotoAndStop (1);
Symbol 1298 MovieClip Frame 5
gotoAndStop (1);
Symbol 1302 MovieClip Frame 1
stop();
Symbol 1302 MovieClip Frame 2
gotoAndStop (1);
Symbol 1302 MovieClip Frame 3
gotoAndStop (1);
Symbol 1302 MovieClip Frame 4
gotoAndStop (1);
Symbol 1308 MovieClip Frame 1
gotoAndStop (1);
Symbol 1308 MovieClip Frame 2
gotoAndStop (1);
Symbol 1308 MovieClip Frame 3
gotoAndStop (1);
Symbol 1308 MovieClip Frame 4
gotoAndStop (1);
Symbol 1308 MovieClip Frame 5
gotoAndStop (1);
Symbol 1308 MovieClip Frame 6
gotoAndStop (1);
Symbol 1310 MovieClip Frame 1
stop();
Symbol 1310 MovieClip Frame 2
stop();
Symbol 1316 MovieClip Frame 1
stop();
Symbol 1316 MovieClip Frame 12
removeMovieClip(this);
Instance of Symbol 372 MovieClip in Symbol 1319 MovieClip Frame 7
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
if (_root.floor > 1) {
_root.exit_dun = 1;
_root.floorHigher = 1;
this._y = -9999;
}
}
}
Instance of Symbol 376 MovieClip "exit" in Symbol 1319 MovieClip Frame 7
onClipEvent (load) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
_root.findme = _parent._name;
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 432 MovieClip "hb" in Symbol 1319 MovieClip Frame 7
onClipEvent (load) {
gotoAndStop(_parent._currentframe);
}
onClipEvent (enterFrame) {
gotoAndStop(_parent._currentframe);
}
Instance of Symbol 1318 MovieClip "ripplebox" in Symbol 1319 MovieClip Frame 7
onClipEvent (enterFrame) {
_root.pool.pool_char._xscale = _root.char1._xscale;
_root.pool.pool_char._x = _root.char1._x;
_root.pool.pool_char._y = _root.char1._y;
_root.pool.pool_char.gotoAndStop(_root.char1._currentframe);
if ((this.hitTest(_root.char1.hb) && (_root.char1._currentframe <= 5)) || (this.hitTest(_root.char1.hb) && (_root.char1._currentframe >= 11))) {
if (_root.pool.pool_effect._currentframe >= 3) {
_root.pool.pool_effect3.play();
}
if (_root.pool.pool_effect._currentframe >= 2) {
_root.pool.pool_effect2.play();
}
if (_root.pool.pool_effect._currentframe == 1) {
_root.pool.pool_effect.play();
}
_root.pool.pool_effect._x = _root.char1._x;
_root.pool.pool_effect._y = _root.char1._y;
_root.pool.pool_effect2._x = _root.char1._x;
_root.pool.pool_effect2._y = _root.char1._y;
_root.pool.pool_effect3._x = _root.char1._x;
_root.pool.pool_effect3._y = _root.char1._y;
}
}
Instance of Symbol 372 MovieClip in Symbol 1319 MovieClip Frame 76
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
_root.exit_dun = 1;
if (_root.floor == null) {
_root.floor = 1;
}
_root.floorLower = 1;
this._y = -9999;
}
}
Instance of Symbol 372 MovieClip in Symbol 1319 MovieClip Frame 80
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
if (_root.floor > 1) {
_root.exit_dun = 1;
_root.floorHigher = 1;
this._y = -9999;
}
}
}
Instance of Symbol 376 MovieClip "exit" in Symbol 1319 MovieClip Frame 80
onClipEvent (load) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 372 MovieClip in Symbol 1319 MovieClip Frame 143
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this) && (_root.time_use == null)) {
_root.exit_dun = 1;
if (_root.floor == null) {
_root.floor = 1;
}
_root.floorLower = 1;
this._y = -9999;
}
}
Instance of Symbol 372 MovieClip in Symbol 1319 MovieClip Frame 210
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this)) {
if (_root.floor > 1) {
_root.exit_dun = 1;
_root.floorHigher = 1;
this._y = -9999;
}
}
}
Instance of Symbol 376 MovieClip "exit" in Symbol 1319 MovieClip Frame 210
onClipEvent (load) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (_root.floor == 1) {
this._visible = false;
} else {
this._visible = true;
}
}
Symbol 1483 MovieClip Frame 1
stop();
_root.shopselect = 1;
Symbol 1483 MovieClip Frame 2
stop();
_root.shopselect = 2;
Symbol 1483 MovieClip Frame 3
stop();
_root.shopselect = 3;
Symbol 1483 MovieClip Frame 4
stop();
_root.shopselect = 4;
Symbol 1483 MovieClip Frame 5
stop();
_root.shopselect = 5;
Symbol 1548 MovieClip Frame 1
stop();
Symbol 1548 MovieClip Frame 2
stop();
Instance of Symbol 1476 MovieClip in Symbol 1548 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(_root.buyshopSelect);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.buyshopSelect);
}
Instance of Symbol 1483 MovieClip in Symbol 1548 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(_root.keys2);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.keys2);
}
Instance of Symbol 650 MovieClip "item_1" in Symbol 1548 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum1);
}
Instance of Symbol 650 MovieClip "item_2" in Symbol 1548 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum2);
}
Instance of Symbol 650 MovieClip "item_3" in Symbol 1548 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum3);
}
Instance of Symbol 650 MovieClip "item_4" in Symbol 1548 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum4);
}
Instance of Symbol 650 MovieClip "item_5" in Symbol 1548 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum5);
}
Instance of Symbol 677 MovieClip "DOWN" in Symbol 1548 MovieClip Frame 2
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shopMenuArrowD + 1);
}
Instance of Symbol 677 MovieClip "UP" in Symbol 1548 MovieClip Frame 2
onClipEvent (enterFrame) {
this.gotoAndStop(_root.shopMenuArrowU + 1);
}
Symbol 1548 MovieClip Frame 3
stop();
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
if (_root.sellNum[1] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.sellArraynum[1]);
}
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
if (_root.sellNum[2] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.sellArraynum[2]);
}
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
if (_root.sellNum[3] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.sellArraynum[3]);
}
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
if (_root.sellNum[4] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.sellArraynum[4]);
}
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
if (_root.sellNum[5] == null) {
this.gotoAndStop(39);
} else {
this.gotoAndStop(_root.sellArraynum[5]);
}
}
Instance of Symbol 1476 MovieClip in Symbol 1548 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(39);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.sellArraynum[_root.keys]);
}
Symbol 1548 MovieClip Frame 4
stop();
Symbol 1548 MovieClip Frame 5
stop();
Instance of Symbol 1476 MovieClip in Symbol 1548 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.buyshopSelect);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.buyshopSelect);
}
Instance of Symbol 1483 MovieClip in Symbol 1548 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.keys2);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.keys2);
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum1);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum1);
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum2);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum2);
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum3);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum3);
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum4);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum4);
}
Instance of Symbol 650 MovieClip "item_" in Symbol 1548 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(_root.bdNum5);
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.bdNum5);
}