Frame 1
Stage.showMenu = false;
Frame 2
_root.Board_Configure._visible = false;
_root.animSetting = true;
_root.alphaSetting = true;
_root.NameInput.Btn_Apply.gotoAndStop(2);
_root.LoadGame_Bar.DataSlot1.index = 1;
_root.LoadGame_Bar.DataSlot2.index = 2;
_root.LoadGame_Bar.DataSlot3.index = 3;
_root.LoadGame_Bar.DataSlot4.index = 4;
_root.LoadGame_Bar.DataSlot5.index = 5;
_root.LoadGame_Bar._visible = false;
_root.NameInput._visible = false;
_root.gameDataE = new Array();
_quality = "HIGH";
MovieClip.prototype.setCookie = function (loc, obj, info) {
save = SharedObject.getLocal(loc, "/");
save.data[obj] = info;
save.flush();
};
MovieClip.prototype.getCookie = function (loc, obj, i) {
var save = SharedObject.getLocal(loc, "/");
_root.gameData[i] = save.data[obj];
};
MovieClip.prototype.setCookieEnable = function (loc, obj, info) {
save = SharedObject.getLocal(loc, "/");
save.data[obj] = info;
save.flush();
};
MovieClip.prototype.getCookieEnable = function (loc, obj, i) {
var save = SharedObject.getLocal(loc, "/");
_root.gameDataE[i] = save.data[obj];
};
_global.LoadGameData = function (index) {
_root.gameData = new Array();
i = -1;
while (i < 100) {
_root.getCookie("SGdata" + index, "file" + i, i);
i++;
}
_root.gameIsLoad = true;
_root.Board_Configure.removeMovieClip();
_root.NameInput.removeMovieClip();
_root.LoadGame_Bar.removeMovieClip();
gotoAndPlay (5);
};
Frame 3
_root.Btn_LoadGame.onRelease = function () {
_root.Board_Configure._visible = false;
_root.NameInput._visible = false;
if (_root.loadPercent >= 100) {
_root.LoadGame_Bar.Title.text = "LOAD GAME";
_root.getCookieEnable("SGdata1", "slot", 1);
_root.getCookieEnable("SGdata2", "slot", 2);
_root.getCookieEnable("SGdata3", "slot", 3);
_root.getCookieEnable("SGdata4", "slot", 4);
_root.getCookieEnable("SGdata5", "slot", 5);
i = 1;
while (i < 6) {
if (_root.gameDataE[i] != undefined) {
_root.LoadGame_Bar["DataSlot" + i].Name.text = _root.gameDataE[i];
} else {
_root.LoadGame_Bar["DataSlot" + i].Name.text = "Empty Slot";
}
i++;
}
_root.LoadGame_Bar._visible = true;
}
};
_root.Btn_BetaTest.onRelease = function () {
_root.Board_Configure._visible = false;
_root.LoadGame_Bar._visible = false;
_root.NameInput.NameText.text = "BLADE";
_root.NameInput.Title.text = "ENTER NAME";
Selection.setFocus(_root.NameInput.NameText);
_root.NameInput._visible = true;
};
_root.Btn_Tutorial.onRelease = function () {
if (_root.loadPercent >= 100) {
gotoAndPlay (6);
}
};
_root.Btn_Configuration.onRelease = function () {
_root.NameInput._visible = false;
_root.LoadGame_Bar._visible = false;
_root.Board_Configure.Title.text = "CONFIGURATION";
_root.Board_Configure._visible = !_root.Board_Configure._visible;
};
_root.Board_Configure.Btn_AnimationSet.onRelease = function () {
if (_root.animSetting) {
_root.Board_Configure.Btn_AnimationSet.AnimText.text = "OFF";
} else {
_root.Board_Configure.Btn_AnimationSet.AnimText.text = "ON";
}
_root.animSetting = !_root.animSetting;
};
_root.Board_Configure.Btn_AlphaSet.onRelease = function () {
if (_root.alphaSetting) {
_root.Board_Configure.Btn_AlphaSet.AnimText.text = "OFF";
} else {
_root.Board_Configure.Btn_AlphaSet.AnimText.text = "ON";
}
_root.alphaSetting = !_root.alphaSetting;
};
_root.LoadGame_Bar.Btn_Apply.onRelease = function () {
_root.LoadGame_Bar._visible = false;
};
_root.Board_Configure.Btn_Apply.onRelease = function () {
_root.Board_Configure._visible = false;
};
_root.NameInput.Btn_Apply.onRelease = function () {
if (_root.NameInput.NameText.text == "") {
_root.NameInput.NameText.text = "BLADE";
}
_global.playerName = _root.NameInput.NameText.text;
if (_root.loadPercent >= 100) {
_root.gameIsLoad = false;
_root.Board_Configure.removeMovieClip();
_root.NameInput.removeMovieClip();
_root.LoadGame_Bar.removeMovieClip();
gotoAndPlay (5);
}
};
_root.loadPercent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
_root.Loading.text = ("Loading... " + int(_root.loadPercent)) + " %";
_root.Bar.Mask._xscale = _root.loadPercent;
Frame 4
gotoAndPlay (3);
Frame 5
function HackBeta() {
_root.player.exTemp = _root.player.exTemp + (_root.player.expMax * 5);
_root.expBoost = true;
_root.player.hp = _root.player.hpmax;
_root.player.mp = _root.player.mpmax;
_root.player.sp = _root.player.spmax;
_root.player.multiplyChance = 100;
_root.cheater = true;
RefreshStatus();
}
function HackMoney() {
_root.itemsArray[0] = _root.itemsArray[0] + 1000;
_root.cheater = true;
RefreshStatus();
}
function HackSword() {
_root.weaponType = 2;
_root.Status.Picture_Weapon.gotoAndStop("Type2");
_root.player.Sword.gotoAndStop("Stop2");
_root.player.Sword2.gotoAndStop("Stop2");
_root.player.atkRange = 30;
_root.player.minatkRange = -10;
_root.cheater = true;
_root.player.Ef1.gotoAndPlay("Hack");
_root.player.Ef2.gotoAndPlay("Hack");
RefreshStatus();
}
function HackArmor() {
_root.armorType = 99;
_root.Status.Picture_Armor.gotoAndStop("Type99");
_root.player.Armor1.gotoAndStop("Type99");
_root.player.Armor2.gotoAndStop("Type99");
_root.cheater = true;
RefreshStatus();
}
function HackSuicide() {
_root.player.hp = 0;
_global.playerSuicide = true;
RefreshStatus();
}
function HackPicture() {
_root.playerPicture++;
if (_root.playerPicture >= 5) {
_root.playerPicture = 1;
}
RefreshStatus();
_root.Status.gotoAndStop("Items");
_root.Status.gotoAndStop("Profile");
}
function AllowItemUse() {
clearInterval(_root.allowDelay);
_root.allowUse = true;
}
function TakeItems() {
var msgAdd = "";
var itemobtained = new Array();
var itemsum = new Array();
for (i in _root.dropItemArray) {
playerHitRangeX = _root.dropItemArray[i]._x - _root.player._x;
playerHitRangeY = _root.dropItemArray[i]._y - _root.player._y;
switch (_root.playerFacing) {
case 1 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 2 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 3 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = playerHitRangeY;
break;
case 4 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = playerHitRangeY;
}
if ((((playerHitRangeX > _root.player.minPickRange) and (playerHitRangeX < _root.player.pickRange)) and (playerHitRangeY > _root.player.minPickRange)) and (playerHitRangeY < _root.player.pickRange)) {
var itemdata = ReceiveItems(_root.dropItemArray[i], i);
var itemfound = false;
for (var o in itemObtained) {
if (itemObtained[o] == itemdata[1]) {
itemfound = true;
var index = itemObtained[o];
itemsum[index] = itemsum[index] + itemdata[0];
break;
}
}
if (!itemfound) {
itemObtained.push(itemdata[1]);
itemsum.push(itemdata[0]);
}
}
}
for (var i in itemObtained) {
if (i == (itemObtained.length - 1)) {
msgAdd = msgAdd + (((" " + itemsum[i]) + " ") + itemObtained[i]);
} else {
msgAdd = msgAdd + (((", " + itemsum[i]) + " ") + itemObtained[i]);
}
}
if (itemObtained.length != 0) {
All2MessageShow("Obtained" + msgAdd);
}
}
function ReceiveItems(item, index) {
itemName = _root.itemsArrayName[item.itemIndex];
itemQuan = item.itemQuan;
if (item.itemIndex == 13) {
_root.key1Pick = true;
}
_root.itemsArray[item.itemIndex] = _root.itemsArray[item.itemIndex] + itemQuan;
if (_root.statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
_global.RefreshingStatus();
}
RemoveItems(item, index);
return([itemQuan, itemName]);
}
function RemoveItems(item, index) {
delete _root.dropItemArray[item.index];
item.removeMovieClip();
}
function DropItems(unit) {
if (_root.areaIndex != 9) {
if (unit.keyItem) {
itemIndex = 1;
itemCreateIndex = unit.itemCarry[itemIndex];
minSize = _root.itemsSizeMin;
minQuan = unit.itemQuanMin[1];
maxQuan = unit.itemQuanMax[1] - minQuan;
numQuan = random(maxQuan) + minQuan;
itemCreateIndex = unit.itemCarry[1];
minSize = _root.itemsSizeMin;
fullQuan = _root.itemQuanFull[itemCreateIndex];
_root.itemIndexMax++;
duplicateMovieClip (_root["DropItem" + itemCreateIndex], "DroppedItem" + _root.itemIndexMax, _root.itemIndexMax + 5000);
setProperty("DroppedItem" + _root.itemIndexMax, _x , unit._x);
setProperty("DroppedItem" + _root.itemIndexMax, _y , unit._y);
_root.dropItemArray[_root.itemIndexMax] = _root["DroppedItem" + _root.itemIndexMax];
_root.dropItemArray[_root.itemIndexMax].index = _root.itemIndexMax;
_root.dropItemArray[_root.itemIndexMax].itemIndex = itemCreateIndex;
_root.dropItemArray[_root.itemIndexMax].itemQuan = numQuan;
numSize = (numQuan * (100 / fullQuan)) + minSize;
if (numSize > 1000) {
numSize = 100;
}
_root.dropItemArray[_root.itemIndexMax]._xscale = numSize;
_root.dropItemArray[_root.itemIndexMax]._yscale = _root.dropItemArray[_root.itemIndexMax]._xscale;
} else {
var chance = random(100);
var chanceindex = 0;
for (var i in unit.itemChance) {
chanceindex = chanceindex + unit.itemChance[i];
if (chance <= chanceindex) {
itemIndex = i;
minQuan = unit.itemQuanMin[i];
maxQuan = unit.itemQuanMax[i] - minQuan;
numQuan = random(maxQuan) + minQuan;
itemCreateIndex = unit.itemCarry[i];
minSize = _root.itemsSizeMin;
fullQuan = _root.itemQuanFull[itemCreateIndex];
_root.itemIndexMax++;
duplicateMovieClip (_root["DropItem" + itemCreateIndex], "DroppedItem" + _root.itemIndexMax, _root.itemIndexMax + 5000);
setProperty("DroppedItem" + _root.itemIndexMax, _x , unit._x);
setProperty("DroppedItem" + _root.itemIndexMax, _y , unit._y);
_root.dropItemArray[_root.itemIndexMax] = _root["DroppedItem" + _root.itemIndexMax];
_root.dropItemArray[_root.itemIndexMax].index = _root.itemIndexMax;
_root.dropItemArray[_root.itemIndexMax].itemIndex = unit.itemCarry[i];
_root.dropItemArray[_root.itemIndexMax].itemQuan = numQuan;
numSize = (numQuan * (100 / fullQuan)) + minSize;
if (numSize > 1000) {
numSize = 100;
}
_root.dropItemArray[_root.itemIndexMax]._xscale = numSize;
_root.dropItemArray[_root.itemIndexMax]._yscale = _root.dropItemArray[_root.itemIndexMax]._xscale;
break;
}
}
}
}
}
function AddSp(unit) {
if (unit.sp < unit.spmax) {
unit.sp = unit.sp + Math.ceil(unit.spgen);
if (unit.sp >= unit.spmax) {
unit.sp = unit.spmax;
if (unit == _root.player) {
unit.SpMessage.text = "SP MAXOUT";
}
}
}
RefreshStatus();
}
function SpChecking(index, enemy) {
enemy.buff[2] = false;
switch (index) {
case 4 :
if (_root.weaponType == 4) {
dmgDealt = (_root.player.atp * 7) - enemy.dfp;
} else {
dmgDealt = (_root.player.atp * 5) - enemy.dfp;
}
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
_root.spCasting = false;
_root.totalDmg = "";
_root.playerSpIndex = "";
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.SpEffects._x = _root.player._x;
_root.SpEffects._y = _root.player._y;
_root.SpEffects.swapDepths(_root.playerDepth + 1);
_root.SpEffects.gotoAndPlay("Sp1");
return;
case 5 :
dmgDealt = (_root.player.atp * 1.2) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
return;
case 6 :
dmgDealt = (_root.player.atp * 0.8) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
return;
case 7 :
dmgDealt = (_root.player.atp * 0.9) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
return;
case 8 :
dmgDealt = (_root.player.atp * 1.1) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
return;
case 9 :
dmgDealt = _root.totalDmg;
if (dmgDealt <= 0) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
_root.spCasting = false;
_root.sp2Casting = false;
_root.totalDmg = "";
_root.playerSpIndex = "";
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
}
}
function PlayerSpUseCheck() {
if (Key.isDown(38) && (_root.spLastIndex != "1")) {
_root.playerSpIndex = _root.playerSpIndex + "1";
_root.spLastIndex = "1";
SetKeyInterval(1);
} else if (Key.isDown(40) && (_root.spLastIndex != "3")) {
_root.playerSpIndex = _root.playerSpIndex + "3";
_root.spLastIndex = "3";
SetKeyInterval(1);
} else if (Key.isDown(37) && (_root.spLastIndex != "4")) {
_root.playerSpIndex = _root.playerSpIndex + "4";
_root.spLastIndex = "4";
SetKeyInterval(1);
} else if (Key.isDown(39) && (_root.spLastIndex != "2")) {
_root.playerSpIndex = _root.playerSpIndex + "2";
_root.spLastIndex = "2";
SetKeyInterval(1);
}
RefreshStatus();
}
function Mg23Release() {
CheckMgIndex(1);
}
function CheckSpIndex() {
frc = _root.player.frc;
if (_root.playerSpIndex == _root.playerSp1Index) {
spRequire = 100;
if (frc >= 0) {
maxlv = 1;
if (_root.player.sp >= spRequire) {
_root.spCasting = true;
CreateSp(_root.playerFacing, maxlv, spRequire, _root.sp1Caption);
} else {
All2MessageShow((("More " + int(spRequire - _root.player.sp)) + " SP Is Required To Perform ") + _root.sp1Caption);
}
}
}
if (_root.playerSpIndex == _root.playerSp2Index) {
spRequire = _root.sp2requireSp;
if (frc >= _root.sp2requireFrc) {
maxlv = 2;
if (_root.player.sp >= spRequire) {
_root.spCasting = true;
_root.detecting = true;
_root.gamePause = true;
_root.sp2Casting = true;
CreateSp(_root.playerFacing, maxlv, spRequire, _root.sp2Caption);
} else {
All2MessageShow((("More " + int(spRequire - _root.player.sp)) + " SP Is Required To Perform ") + _root.sp2Caption);
}
}
}
if (_root.playerSpIndex == _root.playerSp98Index) {
HackSword();
All2MessageShow(_root.sp98Caption);
}
if (_root.playerSpIndex == _root.playerSp99Index) {
HackBeta();
All2MessageShow(_root.sp99Caption);
}
if (_root.playerSpIndex == _root.playerSp97Index) {
HackArmor();
All2MessageShow(_root.sp97Caption);
}
if (_root.playerSpIndex == _root.playerSp96Index) {
HackSuicide();
All2MessageShow(_root.sp96Caption);
}
if (_root.playerSpIndex == _root.playerSp95Index) {
HackPicture();
All2MessageShow(_root.sp95Caption);
}
if (_root.playerSpIndex == _root.playerSp94Index) {
HackMoney();
All2MessageShow(_root.sp94Caption);
}
spRequire = 0;
maxlv = 0;
_root.playerSpIndex = "";
RefreshStatus();
}
function CreateSp(faceIndex, lv, sp, caption) {
_root.playerAtkInd = 0;
_root.playerSpMove = true;
faceNum = faceIndex;
switch (faceIndex) {
case 1 :
faceIndex = "LT";
break;
case 2 :
faceIndex = "RT";
break;
case 3 :
faceIndex = "RB";
break;
case 4 :
faceIndex = "LB";
}
_root.faceIndex = faceIndex;
_root.playerSpIndex = "";
_root.player.sp = _root.player.sp - sp;
_root.player.SpMessage.text = caption;
_root.player.gotoAndPlay((faceNum + "Sp") + lv);
}
function LeaveTrading() {
if (_root.shopBrowsing == 1) {
rndTxt = random(3) + 1;
switch (rndTxt) {
case 1 :
All2MessageShow("Bye Bye!");
break;
case 2 :
All2MessageShow("See ya!");
break;
case 3 :
All2MessageShow("Please come again!");
}
}
_root.shopSellReady = false;
_root.sellingItem = false;
_root.CreateBar._visible = false;
clearInterval(_root.playerTrading1Delay);
_root.createTool = false;
_root.playerTrading1 = false;
_root.playerTrading1Enabled = true;
_root.ShopBar._visible = false;
clearInterval(_root.playerTrading2Delay);
_root.shopTool = false;
_root.playerTrading2 = false;
_root.playerTrading2Enabled = true;
_root.CreateBar.Item1Text.text = "0";
_root.CreateBar.Item2Text.text = "0";
_root.CreateBar.Item3Text.text = "0";
_root.CreateBar.Item4Text.text = "0";
_root.ShopBar.Casher._visible = false;
_root.playerTrading2Calc = false;
_root.playerTrading3Calc = false;
_root.ShopBar.SellMsg.text = "";
}
function EnableTrading(index) {
switch (index) {
case 1 :
clearInterval(_root.playerTrading1Delay);
_root.playerTrading1Enabled = true;
return;
case 2 :
clearInterval(_root.playerTrading2Delay);
_root.playerTrading2Enabled = true;
}
}
function CreateBarShow(bool) {
switch (bool) {
case true :
_root.CreateBar._visible = true;
_root.CreateBar.Message.text = "Please input amount. D to exit.";
Selection.setFocus(_root.CreateBar.Item1text);
return;
case false :
_root.CreateBar._visible = false;
_root.CreateBar.Message.text = "";
}
}
function ShopBarShow(bool) {
switch (bool) {
case true :
_root.ShopBar._visible = true;
_root.ShopBar.Message.text = "Welcome. S to exit.";
return;
case false :
_root.ShopBar._visible = false;
_root.ShopBar.Message.text = "";
_root.playerTrading2Calc = false;
_root.playerTrading3Calc = false;
}
}
function CreateMoreItem(item1, item2, item3, item4) {
_root.itemsArray[1] = _root.itemsArray[1] + item1;
_root.itemsArray[2] = _root.itemsArray[2] + item2;
_root.itemsArray[6] = _root.itemsArray[6] + item3;
_root.itemsArray[7] = _root.itemsArray[7] + item4;
SetCreateMessage("Here you go");
if (_root.statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
_global.RefreshingStatus();
}
}
function SetCreateMessage(caption) {
clearInterval(_root.clearCreateMessage);
delay = (caption.length * 50) + 500;
_root.CreateBar.Message.text = caption;
_root.clearCreateMessage = setInterval(ClearCreatedMessage, delay);
}
function ClearCreatedMessage() {
clearInterval(_root.clearCreateMessage);
_root.CreateBar.Message.text = "Please input amount. D to exit.";
}
function HillAreaCheck(unit) {
touchIndex = 0;
if (unit == _root.player) {
for (i in _root.hillArea) {
if (_root.hillArea[i].hitTest(unit._x, unit._y, true)) {
touchIndex++;
switch (_root.hillArea[i].index) {
case 1 :
_root.speedYFactor = 1.75;
break;
case 2 :
_root.speedYFactor = 0.25;
break;
case 3 :
if (unit.downHill) {
break;
}
unit._y = unit._y + _root.hillArea[i].depth;
unit.newDepth = _root.hillArea[i].depth;
unit.downHill = true;
}
}
}
if (touchIndex == 0) {
if (unit.downHill) {
unit.downHill = false;
unit._y = unit._y - unit.newDepth;
}
_root.speedYFactor = 1;
}
shopBrowse = 0;
for (i in _root.shopArray) {
if (_root.shopArray[i].DetectArea.hitTest(_root.player._x, _root.player._y, true)) {
if (_root.playerSlash and (!_root.shopArray[i].afraid)) {
_root.shopArray[i].gotoAndPlay("Scared");
_root.shopArray[i].afraid = true;
}
}
}
if ((_root.shopBrowsing == undefined) or (_root.shopBrowsing == 0)) {
for (i in _root.shopArray) {
if (_root.shopArray[i].DetectArea.hitTest(_root.player._x, _root.player._y, true)) {
_root.shopBrowsing = _root.shopArray[i].index;
shopBrowse++;
if (_root.shopArray[i].index == 1) {
if (_root.sprSwordPicking and (!_root.sprSwordTaken)) {
_root.player.gotoAndStop("LTStand");
_root.shopArray[i].gotoAndPlay("Sword");
_root.sprSwordPicking = false;
_root.sprSwordPick = false;
_root.sprSwordTaken = true;
_root.gamePause = true;
} else {
_root.shopArray[i].gotoAndPlay("Trading");
}
} else if (_root.shopArray[i].index == 2) {
CheckDialogIndex(_root.shopArray[i]);
}
}
}
}
for (i in _root.shopArray) {
if (!_root.shopArray[i].DetectArea.hitTest(_root.player._x, _root.player._y, true)) {
if ((shopBrowse == 0) and (_root.shopBrowsing == _root.shopArray[i].index)) {
LeaveTrading();
_root.wisemanHelp = false;
_root.shopBrowsing = 0;
_root.shopArray[i].gotoAndPlay("Stand");
}
}
}
}
}
function AddAttributeCheck() {
if (_root.player.ext > 0) {
_root.Status.Btn_Attributes._visible = true;
_root.Status.AddFcs._visible = true;
_root.Status.AddFrc._visible = true;
_root.Status.AddVit._visible = true;
_root.Status.AddKno._visible = true;
_root.Status.AddSpr._visible = true;
} else {
_root.Status.Btn_Attributes._visible = false;
_root.Status.AddFcs._visible = false;
_root.Status.AddFrc._visible = false;
_root.Status.AddVit._visible = false;
_root.Status.AddKno._visible = false;
_root.Status.AddSpr._visible = false;
}
}
function Regenerate() {
with (_root.player) {
if (!_root.gamePause) {
if (hp < hpmax) {
hp = hp + Math.ceil(hpgen);
}
if (mp < mpmax) {
mp = mp + Math.ceil(mpgen);
}
if (hp > hpmax) {
hp = hpmax;
}
if (mp > mpmax) {
mp = mpmax;
}
}
}
RefreshStatus();
}
function PlayerDieCheck() {
RefreshStatus();
}
function PlayerDie() {
_root.playerDying = true;
_root.levelScr = _root.player.lv;
_root.expScr = _root.player.ex;
_root.playerName = _root.Status.PlayerName.text;
_global.compleText = _root.playerName + ", is it too hard for you? ";
_root.player.gotoAndPlay("Die");
}
function HitUp() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y + _root.veloSpeedY;
_root.player._x = _root.player._x + _root.veloSpeedX;
}
}
}
function HitDown() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y - _root.veloSpeedY;
_root.player._x = _root.player._x - _root.veloSpeedX;
}
}
}
function HitLeft() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y - _root.veloSpeedY;
_root.player._x = _root.player._x + _root.veloSpeedX;
}
}
}
function HitRight() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y + _root.veloSpeedY;
_root.player._x = _root.player._x - _root.veloSpeedX;
}
}
}
function RefreshStatus() {
with (_root.player) {
atw = (frc + lv) * 2;
armor = playerArmorNum[_root.armorType];
playerWeaponNum[2] = ((atw + 40) * 2) - atw;
weapon = playerWeaponNum[_root.weaponType];
if (weapon == -16) {
weapon = Math.round(vit / 2);
}
_root.Status.FireLv.text = _root.mg1Lv;
_root.Status.LightningLv.text = _root.mg2Lv;
_root.Status.LightLv.text = _root.mg4Lv;
for (i in _root.player.buff) {
if (_root.player.buff[i]) {
_root.Status.BuffMsg.text = _root.referBuffArray[i];
}
}
bats = (buff[1] * 0.5) + 1;
hpmax = ((vit * 20) + (lv * 50)) + playerAccessNum[_root.accessType];
mpmax = ((kno + lv) * 6) + playerAccessNum[_root.accessType];
atp = ((frc + lv) * 2) + weapon;
dfp = ((vit + lv) * 0.4) + armor;
ats = ((kno + lv) * 2) * bats;
avo = fcs + lv;
hit = fcs + lv;
spmax = ((frc + lv) * 5) + 100;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spgen = ((spr + frc) + lv) / 10;
if (!_root.spCasting) {
if (sp >= spmax) {
sp = spmax;
SpMessage.text = "SP MAXOUT";
} else {
SpMessage.text = "";
}
}
if (hp > hpmax) {
hp = hpmax;
}
if (mp > mpmax) {
mp = mpmax;
}
if (((hp / hpmax) * 100) <= 10) {
if (_root.player.hp <= 0) {
clearInterval(_root.playerRegenerate);
_root.player.hp = 0;
_root.player.buff[1] = false;
_root.player.buff[2] = false;
_root.player.buff[3] = false;
_root.spCasting = false;
_root.sp2Casting = false;
_root.mgCasting = false;
if (!_root.playerDying) {
_global.ReferItem("");
_root.gamePause = true;
PlayerDie();
}
}
_root.player.LowHpMessage.text = "LOW HP";
} else {
_root.player.LowHpMessage.text = "";
}
if (_root.player.ext != 0) {
if (_root.Status.Btn_pAttributes.Anim._currentframe == 1) {
_root.Status.Btn_pAttributes.Anim.play();
}
} else {
_root.Status.Btn_pAttributes.Anim.gotoAndStop(1);
}
if ((!_root.selfCreateEnable) and (_root.player.vit >= 30)) {
_root.selfCreateEnable = true;
All2MessageShow("You can now Self-Create Items. Press D to Create Items.");
}
if ((_root.spLevel == 1) and (_root.player.frc >= _root.sp2requireFrc)) {
_root.spLevel = 2;
All2MessageShow((("Special Attack Level 2, " + _root.sp2Caption) + " Gained.") + _root.sp2Usage);
}
if ((_root.mg1Lv == 0) and (_root.player.kno >= mg1lv1requireKno)) {
_root.mg1Lv = 1;
All2MessageShow((("Fire Attack Level 1, " + _root.mg1Caption) + " Gained.") + _root.mg1Usage);
}
if ((_root.mg1Lv <= 1) and (_root.player.kno >= mg1lv2requireKno)) {
_root.mg1Lv = 2;
All2MessageShow((("Fire Attack Level 2, " + _root.mg2Caption) + " Gained.") + _root.mg2Usage);
}
if ((_root.mg1Lv <= 2) and (_root.player.kno >= mg1lv3requireKno)) {
_root.mg1Lv = 3;
All2MessageShow((("Fire Attack Level 3, " + _root.mg3Caption) + " Gained.") + _root.mg3Usage);
}
if ((_root.mg2Lv <= 0) and (_root.player.kno >= mg2lv1requireKno)) {
_root.mg2Lv = 1;
All2MessageShow((("Lightning Attack Level 1, " + _root.mg21Caption) + " Gained.") + _root.mg21Usage);
}
if ((_root.mg2Lv <= 1) and (_root.player.kno >= mg2lv2requireKno)) {
_root.mg2Lv = 2;
All2MessageShow((("Lightning Attack Level 2, " + _root.mg22Caption) + " Gained.") + _root.mg22Usage);
}
if ((_root.mg2Lv <= 2) and (_root.player.kno >= mg2lv3requireKno)) {
_root.mg2Lv = 3;
All2MessageShow((("Lightning Attack Level 3, " + _root.mg23Caption) + " Gained.") + _root.mg23Usage);
}
if (_root.mg4lv == 1.5) {
_root.mg4lv = 1;
All2MessageShow((("Heal Spell Level 1, " + _root.mg41Caption) + " Gained.") + _root.mg41Usage);
}
_root.player.Armor1.gotoAndStop("Type" + _root.armorType);
_root.player.Armor2.gotoAndStop("Type" + _root.armorType);
_root.Status.HpMsg.text = (("HP : " + Math.ceil(hp)) + " / ") + hpmax;
_root.Status.MpMsg.text = (("MP : " + Math.ceil(mp)) + " / ") + mpmax;
_root.Status.SpMsg.text = (("SP : " + sp) + " / ") + spmax;
_root.Status.LvMsg.text = "LEVEL : " + lv;
_root.Status.ExpMsg.text = (("EXP : " + ex) + " / ") + expmax;
_root.Status.FrcMsg.text = "FORCE :" + frc;
_root.Status.FcsMsg.text = "FOCUS :" + fcs;
_root.Status.VitMsg.text = "VITALITY :" + vit;
_root.Status.SprMsg.text = "SPIRIT :" + spr;
_root.Status.KnoMsg.text = "KNOWLEDGE :" + kno;
_root.Status.AtpMsg.text = (("ATTACK :" + int(Math.floor(atp) - weapon)) + " + ") + weapon;
_root.Status.AtsMsg.text = "SPELL :" + ats;
_root.Status.SpgenMsg.text = "SP GAIN :" + Math.ceil(spgen);
_root.Status.AvoMsg.text = "AVOIDANCE :" + (avo * 2);
_root.Status.HitMsg.text = "HIT RATIO :" + (hit * 2);
_root.Status.DfpMsg.text = (("DEFEND :" + int(Math.floor(dfp) - armor)) + " + ") + armor;
_root.Status.HpgenMsg.text = "HP REGEN : " + Math.ceil(hpgen);
_root.Status.MpgenMsg.text = "MP REGEN : " + Math.ceil(mpgen);
_root.Status.Btn_Attributes.ExtPts.text = ext;
}
_root.Status.HpBar.Mask._xscale = (_root.player.hp * 100) / _root.player.hpmax;
_root.Status.MpBar.Mask._xscale = (_root.player.mp * 100) / _root.player.mpmax;
_root.Status.SpBar.Mask._xscale = (_root.player.sp * 100) / _root.player.spmax;
_root.Status.ExpBar.Mask._xscale = (_root.player.ex * 100) / _root.player.expmax;
AddAttributeCheck();
}
function AttackChecking(index, unit, i) {
if (unit.hp > 0) {
hitRatio = _root.player.hit * 2;
if (weaponType == 5) {
critBoost = 50;
} else {
critBoost = 0;
}
critChance = (_root.player.hit * 2) + critBoost;
hitCrit = random(critChance);
hitConfirm = random(hitRatio);
hitAvo = random(unit.avo);
if (hitConfirm < hitAvo) {
dmgDealt = "miss";
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage(dmgDealt);
} else {
AttackUnit(index, unit, i, hitConfirm, hitCrit);
}
}
}
function AttackUnit(atkType, enemy, i, hitConfirm, hitCrit) {
enemy.buff[2] = false;
switch (atkType) {
case 1 :
if (hitCrit >= (enemy.lv * 10)) {
dmgMultiplier = ((weaponType == 5) ? 5 : 3);
} else {
dmgMultiplier = 1;
}
dmgDealt = (_root.player.atp * dmgMultiplier) - enemy.dfp;
break;
case 2 :
dmgDealt = (_root.player.atp * 1.5) - enemy.dfp;
break;
case 3 :
dmgDealt = (_root.player.atp * 2) - enemy.dfp;
break;
}
if (_root.player.buff[3]) {
dmgDealt = dmgDealt + _root.player.ats;
_root.ShockAnim.duplicateMovieClip("CShockAnim" + _root.Count_Anim, enemy.getDepth() + 1);
_root["CShockAnim" + _root.Count_Anim]._x = enemy._x;
_root["CShockAnim" + _root.Count_Anim]._y = enemy._y;
_root["CShockAnim" + _root.Count_Anim].gotoAndPlay("Anim1");
_root.Count_Anim++;
}
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
AddSp(_root.player);
if ((hitCrit >= (enemy.lv * 10)) and (atkType == 1)) {
dmgDealt = int(dmgDealt) + "!!";
} else {
dmgDealt = int(dmgDealt);
}
EnemyMessageShow(enemy, dmgDealt);
EnemyStatusCheck(enemy, enemy.hp, i);
}
function ClearDmgMessage(unit) {
clearInterval(unit.clearDmgInterval);
i = 0;
while (i < 9) {
unit.Message["Message" + i].text = "";
i++;
}
}
function ExpGain(unit) {
if (_root.expBonus) {
unit.expGain = unit.expGain + (unit.expGain * unit.expBonus);
}
_root.player.exTemp = _root.player.exTemp + unit.expGain;
_root.player.exTemp2 = _root.player.exTemp2 + unit.expGain;
if ((unit.expBonus != 0) and (unit.expBonus != undefined)) {
_root.expBonus = true;
}
unit.expGain = 0;
if (_root.player.exTemp2 != 0) {
MessageShow("EXP+" + _root.player.exTemp2);
}
if (unit.boss) {
_root.bossScr = _root.bossScr + 2000;
}
if (unit == _root.warleader) {
CreateEnemy(-1, -1, 275, 130, 5, undefined, _root.player.lv);
}
_root.player.Message.move = true;
_root.expBoost = true;
RefreshStatus();
}
function ExpBoosting() {
if (_root.player.ex < _root.player.exTemp) {
_root.player.ex = _root.player.ex + int((_root.player.expMax + _root.player.exTemp) / 100);
} else {
_root.player.ex = _root.player.exTemp;
_root.expBoost = false;
_root.expBonus = false;
_root.player.exTemp2 = 0;
}
if ((_root.player.ex >= _root.player.expMax) and (_root.player.exTemp >= _root.player.expMax)) {
_root.player.ex = 0;
_root.player.exTemp = _root.player.exTemp - _root.player.expMax;
_root.player.expMax = _root.player.expMax + ((_root.player.lv + 1) * 100);
LevelUp();
}
RefreshStatus();
}
function LevelUp() {
AddAttributes();
if (_root.player.ex >= _root.player.expMax) {
ExpGain(0);
}
if (_root.player.LevelUpAnim._currentframe == 1) {
_root.player.LevelUpAnim.gotoAndPlay(2);
}
RefreshStatus();
}
function SetKeyInterval(index) {
clearInterval(_root.setKeyDelay);
_root.setKeyDelay = setInterval(ClearLastKey, _root.lastKeyDelay, index);
}
function ClearLastKey(index) {
clearInterval(_root.setKeyDelay);
_root.spLastIndex = "";
_root.MgLastIndex = "";
}
function ArmorPosition() {
if (_root.player.Body._alpha == 0) {
_root.playerArmor._alpha = 0;
} else {
_root.playerArmor._alpha = 100;
}
if (_root.playerFacing == 1) {
_root.player.Armor1._visible = false;
_root.player.Armor2._visible = true;
_root.playerArmor = _root.player.Armor2;
_root.playerArmor._xscale = -100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
} else if (_root.playerFacing == 2) {
_root.player.Armor1._visible = false;
_root.player.Armor2._visible = true;
_root.playerArmor = _root.player.Armor2;
_root.playerArmor._xscale = 100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
} else if (_root.playerFacing == 4) {
_root.player.Armor2._visible = false;
_root.player.Armor1._visible = true;
_root.playerArmor = _root.player.Armor1;
_root.playerArmor._xscale = -100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
} else {
_root.player.Armor2._visible = false;
_root.player.Armor1._visible = true;
_root.playerArmor = _root.player.Armor1;
_root.playerArmor._xscale = 100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
}
}
function KeyPressing() {
if (Key.isToggled(20)) {
_root.player.armed = true;
} else {
_root.player.armed = false;
}
if ((((!_root.playerSlash) and (!_root.playerSpUse)) and (!_root.playerMgUse)) and (!_root.playerCreateUse)) {
if ((((Key.isDown(38) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._y = _root.player._y - _root.veloSpeedY;
_root.player._x = _root.player._x - _root.veloSpeedX;
if (!_root.playerWalking) {
_root.playerFacing = 1;
_root.playerWalk = true;
}
if (_root.playerFacing != 1) {
_root.playerWalking = false;
}
HitUp();
} else if ((((Key.isDown(39) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._x = _root.player._x + _root.veloSpeedX;
_root.player._y = _root.player._y - _root.veloSpeedY;
if (!_root.playerWalking) {
_root.playerFacing = 2;
_root.playerWalk = true;
}
if (_root.playerFacing != 2) {
_root.playerWalking = false;
}
HitRight();
} else if ((((Key.isDown(37) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._x = _root.player._x - _root.veloSpeedX;
_root.player._y = _root.player._y + _root.veloSpeedY;
if (!_root.playerWalking) {
_root.playerFacing = 4;
_root.playerWalk = true;
}
if (_root.playerFacing != 4) {
_root.playerWalking = false;
}
HitLeft();
} else if ((((Key.isDown(40) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._y = _root.player._y + _root.veloSpeedY;
_root.player._x = _root.player._x + _root.veloSpeedX;
if (!_root.playerWalking) {
_root.playerFacing = 3;
_root.playerWalk = true;
}
if (_root.playerFacing != 3) {
_root.playerWalking = false;
}
HitDown();
} else if ((Key.isDown(_root.KeyAttack) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.player.armed) {
if (_root.weaponType != 1) {
_root.playerWeapon.gotoAndPlay("Slash" + _root.weaponType);
} else {
_root.playerWeapon.gotoAndPlay("Slash");
}
SlashDirection(_root.playerFacing);
_root.playerSlash = true;
}
} else if ((Key.isDown(_root.KeySp) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.player.armed) {
_root.playerSpUse = true;
}
} else if ((Key.isDown(_root.KeyCreate) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.playerTrading1 and _root.playerTrading1Enabled) {
_root.playerTrading1Enabled = false;
_root.createTool = !_root.createTool;
CreateBarShow(_root.createTool);
_root.playerTrading1Delay = setInterval(EnableTrading, 500, 1);
} else if ((_root.selfCreateEnable and _root.playerTrading1Enabled) and (!_root.playerTrading1)) {
_root.playerTrading1 = !_root.playerTrading1;
_root.createTool = !_root.createTool;
CreateBarShow(_root.createTool);
_root.playerTrading1Delay = setInterval(EnableTrading, 500, 1);
}
} else if ((Key.isDown(_root.KeyMg) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.player.armed) {
if (_root.player.buff[3]) {
_global.RemoveUnitStatus(_root.player, 3);
_global.RemoveUnitStatus(_root.player, 2);
_global.RemoveUnitStatus(_root.player, 1);
Mg23Release();
} else {
_root.playerMgUse = true;
}
}
} else if ((Key.isDown(_root.KeyShiftItem) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.statusLoc != "Items") {
_root.statusLoc = "Items";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
if (_root.selectHotkeyItem) {
_root.selectHotkeyItem = false;
_root.selectHIobj.gotoAndStop(1);
_global.ReferItem("");
}
} else if ((Key.isDown(_root.KeyTakeItem) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.playerTrading2 and _root.playerTrading2Enabled) {
_root.playerTrading2Enabled = false;
_root.shopTool = !_root.shopTool;
ShopBarShow(_root.shopTool);
_root.playerTrading2Delay = setInterval(EnableTrading, 500, 2);
} else if (_root.wisemanHelp) {
_root.targetedShop.gotoAndPlay("Heal");
_root.gamePause = true;
} else {
TakeItems();
}
} else {
for (i in _root.hotKeyArray) {
if (((((((Key.isDown(_root.hotKeyArray[i]) and (!_root.dying)) and _root.itemReady) and (_root.statusLoc == "Items")) and _root.allowUse) and (!_root.createTool)) and (!_root.playerTrading2Calc)) and (!_root.playerTrading3Calc)) {
_global.UseItem("", _root.Status["HotKey" + i].index);
_root.allowDelay = setInterval(AllowItemUse, 500);
_root.allowUse = false;
}
}
if ((_root.playerWalking && (!_root.playerSpUse)) && (!_root.playerMgUse)) {
_root.playerWalking = false;
}
}
} else {
if (_root.playerSpUse) {
if ((!Key.isDown(_root.KeySp)) and (!_root.playerWalking)) {
CheckSpIndex();
_root.playerSpUse = false;
_root.spLastIndex = "";
}
PlayerSpUseCheck();
}
if (_root.playerMgUse) {
if ((!Key.isDown(_root.KeyMg)) and (!_root.playerWalking)) {
CheckMgIndex();
_root.playerMgUse = false;
_root.mgLastIndex = "";
}
PlayerMgUseCheck();
}
if (_root.playerCreateUse) {
if (!Key.isDown(_root.KeyCreate)) {
CheckCreateIndex();
_root.playerCreateUse = false;
}
PlayerCreateUseCheck();
}
}
_global.WeaponPosition();
if (!_root.playerSlash) {
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
} else if (!_root.spCasting) {
for (i in _root.monsters) {
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.playerFacing) {
case 1 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 2 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 3 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case 4 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((_root.playerAtkInd != 0) and (!_root.spCasting)) {
if ((((_root.playerHitRangeX > _root.player.minatkRange) and (_root.playerHitRangeX < _root.player.atkRange)) and (_root.playerHitRangeY > _root.player.minatkRange)) and (_root.playerHitRangeY < _root.player.atkRange)) {
AttackChecking(_root.playerAtkInd, _root.monsters[i], i);
}
}
}
_root.playerAtkInd = 0;
}
}
function AddAttributes() {
with (_root.player) {
lv = lv + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
hp = hpmax;
mp = mpmax;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = (frc + lv) * 3;
spmax = (frc * 5) + 100;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
ext = ext + 5;
}
}
function MgChecking(index, enemy, lv) {
enemy.buff[2] = false;
switch (index) {
case 1 :
dmgDealt = (_root.player.ats * (((lv - 1) / 2) + 1)) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
EnemyMessageShow(enemy, dmgDealt);
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.playerFacing = _root.faceIndexNum;
break;
case 2 :
if (lv == 22) {
dmgDealt = enemy.hpTemp;
enemy.hp = enemy.hp - enemy.hpTemp;
_root.damageScr = _root.damageScr + dmgDealt;
EnemyMessageShow(enemy, dmgDealt);
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.playerFacing = _root.faceIndexNum;
} else if (lv == 3) {
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
_root.playerFacing = _root.faceIndexNum;
} else if (lv == 4) {
dmgDealt = (_root.player.ats * (((lv - 2) / 2) + 1)) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
EnemyMessageShow(enemy, dmgDealt);
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.playerFacing = _root.faceIndexNum;
} else {
dmgDealt = ((_root.player.ats * (lv - 20)) * 2) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
EnemyMessageShow(enemy, dmgDealt);
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.playerFacing = _root.faceIndexNum;
}
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
EnemyStatusCheck(enemy, enemy.hp);
}
function PlayerMgUseCheck() {
if (Key.isDown(38) && (_root.mgLastIndex != "1")) {
_root.playerMgIndex = _root.playerMgIndex + "1";
_root.MgLastIndex = "1";
SetKeyInterval(2);
} else if (Key.isDown(40) && (_root.mgLastIndex != "3")) {
_root.playerMgIndex = _root.playerMgIndex + "3";
_root.MgLastIndex = "3";
SetKeyInterval(2);
} else if (Key.isDown(37) && (_root.mgLastIndex != "4")) {
_root.playerMgIndex = _root.playerMgIndex + "4";
_root.MgLastIndex = "4";
SetKeyInterval(2);
} else if (Key.isDown(39) && (_root.mgLastIndex != "2")) {
_root.playerMgIndex = _root.playerMgIndex + "2";
_root.MgLastIndex = "2";
SetKeyInterval(2);
}
RefreshStatus();
}
function CheckMgIndex(cast) {
kno = _root.player.kno;
if (cast == 1) {
_root.playerMgIndex = "";
mpRequire = 0;
index = 2;
lv = 4;
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg24Caption, 3);
}
if (kno >= _root.player.mg1lv1requireKno) {
if (_root.playerMgIndex == _root.playerMg1Index) {
mpRequire = _root.player.mg1lv1requireMp;
index = 1;
lv = 1;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg1Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg1Caption);
}
}
}
if (kno >= _root.player.mg1lv2requireKno) {
if (_root.playerMgIndex == _root.playerMg2Index) {
mpRequire = _root.player.mg1lv2requireMp;
index = 1;
lv = 2;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg2Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg2Caption);
}
}
}
if (kno >= _root.player.mg1lv3requireKno) {
if (_root.playerMgIndex == _root.playerMg3Index) {
mpRequire = _root.player.mg1lv3requireMp;
index = 1;
lv = 3;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
_root.playerPhoenixUse = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg3Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg3Caption);
}
}
}
if (kno >= _root.player.mg2lv1requireKno) {
if (_root.playerMgIndex == _root.playerMg21Index) {
mpRequire = _root.player.mg2lv1requireMp;
index = 2;
lv = 1;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg21Caption, _root.playerFacing);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg21Caption);
}
}
}
if (kno >= _root.player.mg2lv2requireKno) {
if (_root.playerMgIndex == _root.playerMg22Index) {
mpRequire = _root.player.mg2lv2requireMp;
index = 2;
lv = 2;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg22Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg22Caption);
}
}
}
if (kno >= _root.player.mg2lv3requireKno) {
if (_root.playerMgIndex == _root.playerMg23Index) {
mpRequire = _root.player.mg2lv3requireMp;
index = 2;
lv = 3;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg23Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg23Caption);
}
}
}
if (_root.mg4lv == 1) {
if (_root.playerMgIndex == _root.playerMg41Index) {
mpRequire = _root.player.mg4lv1requireMp;
index = 4;
lv = 1;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg41Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg41Caption);
}
}
}
_root.playerMgIndex = "";
_root.playerMgUse = false;
RefreshStatus();
}
function CreateMg(faceIndex, index, lv, mp, caption, facingNow) {
_root.player.stop();
_root.player.mp = _root.player.mp - mp;
switch (faceIndex) {
case 1 :
faceIndex = "LT";
break;
case 2 :
faceIndex = "RT";
break;
case 3 :
faceIndex = "RB";
break;
case 4 :
faceIndex = "LB";
}
_root.playerFacing = facingNow;
if ((index == 1) or (index == 4)) {
_root.player.gotoAndPlay((index + "Mg") + lv);
} else if ((index == 2) and (lv == 2)) {
_root.player.gotoAndPlay((index + "Mg") + lv);
} else if ((index == 2) and (lv == 3)) {
_root.player.gotoAndPlay((index + "Mg") + lv);
} else if ((index == 2) and (lv == 4)) {
_root.player.gotoAndPlay((index + "Mg") + lv);
} else {
_root.player.gotoAndPlay(((index + "Mg") + lv) + faceIndex);
}
_root.playerMgMove = true;
_root.faceIndex = faceIndex;
_root.playerMgIndex = "";
_root.player.MgMessage.text = caption;
}
function SlashDirection(number) {
switch (number) {
case 1 :
_root.player.gotoAndPlay("LTSlash");
return;
case 2 :
_root.player.gotoAndPlay("RTSlash");
_root.playerWeapon._xscale = -100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 180;
return;
case 3 :
_root.player.gotoAndPlay("RBSlash");
return;
case 4 :
_root.player.gotoAndPlay("LBSlash");
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
}
}
function ReferAttach(caption) {
_root.Message_Refer.ReferText.text = caption;
if (caption != undefined) {
_root.Message_Refer.y = _root.Message_Refer.minY;
_root.Message_Refer.moveUp = true;
_root.Message_Refer.moveDown = false;
} else {
_root.Message_Refer.y = _root.Message_Refer.maxY;
_root.Message_Refer.moveDown = true;
_root.Message_Refer.moveUp = false;
}
}
function ClearRefer() {
_root.Message_Refer.ReferText.text = "";
}
function CheckDialogIndex(targeted) {
clearInterval(_root.wisemanDelay);
_root.targetedShop = targeted;
if (_root.wisemanDialog == 0) {
All2MessageShow(("Hello, " + _global.playerName) + " cough cough...");
_root.wisemanDialog++;
_root.waitWisemanDialog = true;
_root.Status._visible = false;
_root.player.gotoAndStop("RTStand");
_root.gamePause = true;
} else if (_root.wisemanDialog == 1) {
All2MessageShow("Can you help me find my stick ?");
_root.wisemanDialog++;
} else if (_root.wisemanDialog == 2) {
All2MessageShow("Cough... I can't move freely without it...");
_root.wisemanDialog++;
} else if (_root.wisemanDialog == 3) {
if (_root.itemsArray[13] == 1) {
_root.itemsArray[13] = 0;
if (_root.statusLoc == "Items") {
_root.Status.gotoAndStop(11);
_root.Status.gotoAndStop("Items");
}
All2MessageShow(("Oh... what a kind of you, " + _global.playerName) + ". You found my rod.");
_root.wisemanDialog++;
_root.Status._visible = false;
_root.waitWisemanDialog = true;
_root.player.gotoAndStop("RTStand");
_root.gamePause = true;
RefreshStatus();
} else {
All2MessageShow("I lost it when I was crossing the bridge... Maybe it fell down and went to the DOWNSTREAM...");
_root.waitWisemanDialog = false;
_root.Status._visible = true;
_root.gamePause = false;
_global.UnpauseEnemy();
}
} else if (_root.wisemanDialog == 4) {
All2MessageShow("..................................................................................");
targeted.gotoAndPlay("PowerUp");
_root.powerUpMode = true;
_root.wisemanDialog++;
} else if (_root.wisemanDialog == 5) {
All2MessageShow("Thank you. I am the one you are looking for - The Mountain Wiseman. ");
_root.wisemanDialog++;
} else if (_root.wisemanDialog == 6) {
All2MessageShow("To leave Mountain Of Desserts, you must get through the DUNGEON OF ANCIENT DESSERT at the west.");
_root.wisemanDialog++;
} else if (_root.wisemanDialog == 7) {
All2MessageShow("I have the ability to Heal. Come to me each time you needed help, and I shall help you to recover with no cost.");
_root.wisemanDialog++;
_root.Status._visible = true;
_root.waitWisemanDialog = false;
_root.gamePause = false;
_global.UnpauseEnemy();
} else if (_root.wisemanDialog == 8) {
if ((_root.player.spr >= 20) and (_root.mg4lv == 0)) {
All2MessageShow("Hmm... I see you have inhale enough spirit to learn HEAL ...");
_root.wisemanDialog++;
_root.Status._visible = false;
_root.waitWisemanDialog = true;
_root.player.gotoAndStop("RTStand");
_root.gamePause = true;
RefreshStatus();
} else {
All2MessageShow(("Greetings, " + _global.playerName) + ". Press S to RECOVER. ");
_root.wisemanHelp = true;
}
} else if (_root.wisemanDialog == 9) {
All2MessageShow("I shall give you this.......................");
_root.wisemanDialog++;
_root.targetedShop.gotoAndPlay("HealGive");
} else if (_root.wisemanDialog == 10) {
All2MessageShow("Make good use of it...");
_root.wisemanDialog = 8;
_root.Status._visible = true;
_root.waitWisemanDialog = false;
_root.gamePause = false;
_global.UnpauseEnemy();
}
}
function BossDialog(targeted) {
clearInterval(_root.bossDelay);
if (_root.boss1Intro == 0) {
All2MessageShow(("He...He...He...He...Hee... Is it " + _global.playerName) + " ? ");
_root.boss1Intro++;
_root.waitBossDialog = true;
} else if (_root.boss1Intro == 1) {
All2MessageShow("You're going to look for the stick ? ");
_root.boss1Intro++;
targeted.Ef5.gotoAndPlay("Anger");
} else if (_root.boss1Intro == 2) {
All2MessageShow("Maybe I had took it ? ");
_root.boss1Intro++;
} else if (_root.boss1Intro == 3) {
All2MessageShow("Then come and get it if you dare...");
_root.boss1Intro++;
targeted.Ef5.gotoAndStop(1);
_root.waitBossDialog = false;
_root.Status._visible = true;
_root.gamePause = false;
_global.UnpauseEnemy();
} else if (_root.boss1Intro == 4) {
All2MessageShow("You again ? Every time you escape I will restore myself to full health.");
}
}
function AllMessageSet(index, maxIndex) {
index++;
if (index == maxIndex) {
clearInterval(_root.allMessages);
_root.Message_Title.MessageBackA._visible = false;
_root.Message_Title.AllMessage._visible = false;
} else {
delay = (_root.arenaMessage[index].length * 50) + 500;
_root.Message_Title.AllMessage._visible = true;
_root.Message_Title.AllMessage.text = _root.arenaMessage[index];
_root.allMessages = setInterval(AllMessageView, delay, index, maxIndex);
}
}
function All2MessageShow(caption) {
clearInterval(_root.clearMessage);
_root.Message_Title.Message.text = caption;
_root.Message_Title.MessageBack._visible = true;
delay = (caption.length * 50) + 1000;
_root.clearMessage = setInterval(Clear2Message, delay);
}
function Clear2Message() {
clearInterval(_root.clearMessage);
_root.Message_Title.Message.text = "";
_root.Message_Title.MessageBack._visible = false;
if (_root.waitWisemanDialog) {
CheckDialogIndex(_root.targetedShop);
}
if (_root.waitBossDialog) {
BossDialog(_root.targeted);
}
}
function AllMessageView(index, maxIndex) {
clearInterval(_root.allMessages);
AllMessageSet(index, maxIndex);
}
function MessageShow(caption) {
_root.player.Message.text = caption;
}
function EnemyMessageShow(unit, caption) {
unit.Message.Message.text = caption;
}
function PlayerDamageMessage(caption) {
if ((caption * 0) == 0) {
caption = int(caption);
}
_root.player.DamageMessage.text = caption;
_root.player.DamageMessage.move = true;
}
function DetectAlpha() {
if (((!_root.waitBossDialog) and (!_root.waitWisemanDialog)) and (!_root.statusMove)) {
if (_root.Status.hitTest(_root.player._x, _root.player._y, true)) {
if (_root.Status._alpha > 0) {
_root.Status._alpha = _root.Status._alpha - _root.alphaSpeed;
} else {
_root.Status._y = _root.statusCloseY;
_root.statusPosition = 0;
}
} else if (_root.Status._alpha < 100) {
_root.Status._visible = true;
_root.Status._alpha = _root.Status._alpha + _root.alphaSpeed;
} else if ((_root.player._y < _root.statusMinY) and (_root.Status.Btn_CloseStatus._currentframe == 1)) {
_root.Status._y = _root.statusDefY;
_root.statusPosition = 1;
}
}
}
function MoveStatus(pos) {
switch (pos) {
case true :
_root.statusShow = false;
_root.Status.y = _root.statusCloseY;
_root.statusMove = true;
_root.statusDir = 0;
_root.Status.Btn_CloseStatus.gotoAndStop("Up");
return;
case false :
_root.statusShow = true;
_root.Status.y = _root.statusDefY;
_root.statusMove = true;
_root.statusDir = 1;
_root.Status.Btn_CloseStatus.gotoAndStop("Down");
}
}
function ScoreCheck() {
with (_root.player) {
if ((((frc > fcs) and (frc > vit)) and (frc > spr)) and (frc > kno)) {
_root.rankScr = "Fast Killer";
} else if ((((fcs > frc) and (fcs > vit)) and (fcs > spr)) and (fcs > kno)) {
_root.rankScr = "Shadow";
} else if ((((vit > fcs) and (vit > frc)) and (vit > spr)) and (vit > kno)) {
_root.rankScr = "Defender";
} else if ((((spr > frc) and (spr > vit)) and (spr > fcs)) and (spr > kno)) {
_root.rankScr = "Regenerator";
} else if ((((kno > fcs) and (kno > vit)) and (kno > spr)) and (kno > frc)) {
_root.rankScr = "Spell Caster";
} else {
_root.rankScr = "Normal Guy";
}
if ((ext / 5) == lv) {
_root.rankScr = "Lazy Guy";
}
}
}
function DepthSwapping() {
_root.player.swapDepths(_root.playerDepth);
}
function MissleDetecting(enemy) {
enemyMissleRangeX = ((enemy.Missle._x + enemy._x) + enemy.Boomerang._x) - _root.player._x;
enemyMissleRangeY = ((enemy.Missle._y + enemy._y) + enemy.Boomerang._y) - _root.player._y;
if (enemyMissleRangeX > 5) {
enemy.Missle._x = enemy.Missle._x - enemy.missleSpeed;
} else if (enemyMissleRangeX < -5) {
enemy.Missle._x = enemy.Missle._x + enemy.missleSpeed;
} else {
enemy.targetLockX = true;
}
if (enemyMissleRangeY > 5) {
enemy.Missle._y = enemy.Missle._y - enemy.missleSpeed;
} else if (enemyMissleRangeY < -5) {
enemy.Missle._y = enemy.Missle._y + enemy.missleSpeed;
} else {
enemy.targetLockY = true;
}
if (enemy.targetLockX and enemy.targetLockY) {
MissleAttackPlayer(enemy);
}
}
function MoreMissleDetecting(enemy) {
for (i in enemy.missleArray) {
enemyMissleRangeX = ((enemy.missleArray[i]._x + enemy.Boomerang._x) + enemy._x) - _root.player._x;
enemyMissleRangeY = ((enemy.missleArray[i]._y + enemy.Boomerang._y) + enemy._y) - _root.player._y;
if (enemyMissleRangeX > 5) {
enemy.missleArray[i]._x = enemy.missleArray[i]._x - enemy.missleSpeed;
} else if (enemyMissleRangeX < -5) {
enemy.missleArray[i]._x = enemy.missleArray[i]._x + enemy.missleSpeed;
} else {
enemy.missleArray[i].targetLockX = true;
}
if (enemyMissleRangeY > 5) {
enemy.missleArray[i]._y = enemy.missleArray[i]._y - enemy.missleSpeed;
} else if (enemyMissleRangeY < -5) {
enemy.missleArray[i]._y = enemy.missleArray[i]._y + enemy.missleSpeed;
} else {
enemy.missleArray[i].targetLockY = true;
}
if (enemy.missleArray[i].targetLockX and enemy.missleArray[i].targetLockY) {
MoreMissleAttackPlayer(enemy, i);
}
}
}
function MissleAttackPlayer(enemy) {
enemyMissleRangeX = (enemy.Missle._x + enemy._x) - _root.player._x;
enemyMissleRangeY = (enemy.Missle._y + enemy._y) - _root.player._y;
if ((((enemyMissleRangeX > -5) and (enemyMissleRangeX < 5)) and (enemyMissleRangeY > -5)) and (enemyMissleRangeX < 5)) {
hitRatio = enemy.hit * 2;
hitConfirm = random(hitRatio);
hitAvo = random(_root.player.avo);
if (hitConfirm >= hitAvo) {
EnemyMessageShow(enemy, "");
dmgDealt = enemy.atp - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
enemy.sp = enemy.sp + 5;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
} else {
EnemyMessageShow(enemy, "miss");
}
} else {
EnemyMessageShow(enemy, "miss");
}
enemy.missleAttacking = false;
enemy.targetLockX = false;
enemy.targetLockY = false;
}
function MoreMissleAttackPlayer(enemy, i) {
enemyMissleRangeX = (enemy.missleArray[i]._x + enemy._x) - _root.player._x;
enemyMissleRangeY = (enemy.missleArray[i]._y + enemy._y) - _root.player._y;
if ((((enemyMissleRangeX > -5) and (enemyMissleRangeX < 5)) and (enemyMissleRangeY > -5)) and (enemyMissleRangeX < 5)) {
hitRatio = enemy.hit * 2;
hitAvo = random(_root.player.avo);
hitConfirm = random(hitRatio);
if (hitConfirm >= hitAvo) {
EnemyMessageShow(enemy, "");
dmgDealt = enemy.atp - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
} else {
EnemyMessageShow(enemy, "miss");
}
} else {
EnemyMessageShow(enemy, "miss");
}
delete enemy.missleArray[i];
enemy.missleArray[i].targetLockX = false;
enemy.missleArray[i].targetLockY = false;
}
function MonsHit(unit) {
switch (unit.moveIndex) {
case "11" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y + unit.SpeedY;
unit._x = unit._x + unit.SpeedX;
}
}
break;
case "22" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y - unit.SpeedY;
unit._x = unit._x - unit.SpeedX;
}
}
break;
case "12" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y - unit.SpeedY;
unit._x = unit._x + unit.SpeedX;
}
}
break;
case "21" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y + unit.SpeedY;
unit._x = unit._x - unit.SpeedX;
}
}
}
enemy.moveIndex = "";
}
function EnemyStatusCheck(unit, hp) {
if (hp <= 0) {
_root.dying = true;
ExpGain(unit);
Die(unit);
return([1]);
}
if (hp > 0) {
unit.Missle.play();
for (i in unit.missleArray) {
unit.missleArray[i].play();
}
unit.play();
return([0]);
}
}
function CreateEnemy(index, enemyIndex, posx, posy, stat, targeted, params) {
RefreshEnemyIndex();
if (_root.enemyQuan < _root.enemyNumMax[_root.currentIndex]) {
if (posx) {
numx = posx;
numy = posy;
} else if (_root.areaIndex == 9) {
numx = random(300) + 200;
numy = random(100);
} else {
numx = random(550);
numy = random(400);
}
if (enemyIndex == -1) {
rndNum = _root.monsterAreaArray[_root.areaIndex].length;
rndIndex = random(rndNum);
nume = _root.monsterAreaArray[_root.areaIndex][rndIndex];
} else {
nume = enemyIndex;
}
stuck = 0;
for (i in _root.buildings) {
if (numy == Math.floor(_root.buildings[i]._y)) {
stuck++;
}
}
if ((_root["FoodEnemy" + nume]._visible and (numy != Math.floor(_root.player._y))) and (stuck == 0)) {
_root.enemyIndexMax = _root.enemyIndexMax + 1;
duplicateMovieClip (_root["FoodEnemy" + nume], "enemy" + _root.enemyIndexMax, _root.enemyIndexMax + 1000);
setProperty("enemy" + _root.enemyIndexMax, _x , numx + 0.3);
setProperty("enemy" + _root.enemyIndexMax, _y , numy + 0.1);
if (targeted == 1) {
_root.targeted = _root["enemy" + _root.enemyIndexMax];
}
for (i in _root.area) {
if (_root.area[i].hitTest(_root["enemy" + _root.enemyIndexMax]._x, _root["enemy" + _root.enemyIndexMax]._y, true)) {
_root["enemy" + _root.enemyIndexMax].removeMovieClip();
return(undefined);
}
}
if (stat == 5) {
_root.warLeader = _root["enemy" + _root.enemyIndexMax];
_root["enemy" + _root.enemyIndexMax]._xscale = 120;
_root["enemy" + _root.enemyIndexMax]._yscale = 120;
SetStatus(_root["enemy" + _root.enemyIndexMax], nume, params);
} else {
SetStatus(_root["enemy" + _root.enemyIndexMax], nume);
}
if (stat) {
switch (stat) {
case 2 :
_root["enemy" + _root.enemyIndexMax].buff[stat] = true;
return;
case 3 :
_root["enemy" + _root.enemyIndexMax].sightRange = 999;
return;
case 4 :
_root["enemy" + _root.enemyIndexMax].sightRange = 999;
_root["enemy" + _root.enemyIndexMax].expGain = 0;
}
}
}
}
}
function MoveToPlayer(enemy) {
_root.enemyDetectRangeX = _root.player._x - _root.monsters[i]._x;
_root.enemyDetectRangeY = _root.player._y - _root.monsters[i]._y;
if (_root.enemyDetectRangeX > 0) {
enemy._x = enemy._x + enemy.SpeedX;
enemy.moveIndex = "2";
}
if (_root.enemyDetectRangeX < 0) {
enemy._x = enemy._x - enemy.SpeedX;
enemy.moveIndex = "1";
}
if (_root.enemyDetectRangeY > 0) {
enemy._y = enemy._y + enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "2";
}
if (_root.enemyDetectRangeY < 0) {
enemy._y = enemy._y - enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "1";
}
MonsHit(enemy);
}
function EnemyAttackChecking(enemy) {
hitRatio = enemy.hit * 2;
hitAvo = random(_root.player.avo);
hitConfirm = random(hitRatio);
enemyDetectRangeX = _root.player._x - enemy._x;
enemyDetectRangeY = _root.player._y - enemy._y;
detectX = Math.sqrt(enemyDetectRangeX * enemyDetectRangeX);
detectY = Math.sqrt(enemyDetectRangeY * enemyDetectRangeY);
if (((((hitConfirm >= hitAvo) and (_root.detectX > enemy.minatkRange)) and (_root.detectX < enemy.atkRange)) and (_root.detectY > enemy.minatkRange)) and (_root.detectY < enemy.atkRange)) {
EnemyMessageShow(enemy, "");
return([enemy]);
}
EnemyMessageShow(enemy, "miss");
return([" "]);
}
function Die(enemy) {
enemy.dying = true;
_root.gamePause = true;
enemy.stop();
enemy.gotoAndPlay("Die");
}
function SetStatus(unit, nume, lv) {
tellTarget (unit) {
buff = new Array();
switch (nume) {
case 1 :
unit.lv = (lv ? (lv) : 1);
lv = unit.lv;
expGain = 20 * lv;
frc = (2 * lv) + 1;
fcs = (1 * lv) + 1;
vit = (2 * lv) + 1;
spr = (2 * lv) + 1;
kno = (1 * lv) + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 1;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 50;
atkRange = 15;
minatkRange = 0;
mg = 1;
mgRange = 15;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3);
itemChance = new Array(0, 25);
itemQuanMin = new Array(0, 1);
itemQuanMax = new Array(0, 5);
break;
case 2 :
unit.lv = (lv ? (lv) : 2);
lv = unit.lv;
expGain = 25 * lv;
frc = (2 * lv) + 3;
fcs = (2 * lv) + 1;
vit = (2 * lv) + 1;
spr = (2 * lv) + 1;
kno = (1 * lv) + 2;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0.5;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 50;
atkRange = 10;
minatkRange = -5;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3);
itemChance = new Array(0, 50);
itemQuanMin = new Array(0, 3);
itemQuanMax = new Array(0, 15);
break;
case 3 :
unit.lv = (lv ? (lv) : 4);
lv = unit.lv;
expGain = 22 * lv;
frc = (1 * lv) + 2;
fcs = (1 * lv) + 1;
vit = (2 * lv) + 2;
spr = 2 * lv;
kno = 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 1;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 80;
atkRange = 20;
minatkRange = 0;
mgRange = 15;
mg = 2;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3, 8, 2);
itemChance = new Array(0, 30, 20, 10);
itemQuanMin = new Array(0, 5, 1, 1);
itemQuanMax = new Array(0, 20, 5, 1);
break;
case 4 :
unit.lv = (lv ? (lv) : 6);
lv = unit.lv;
expGain = 25 * lv;
frc = (1 * lv) + 1;
fcs = (1 * lv) + 1;
vit = (3 * lv) + 2;
spr = (0.5 * lv) + 0;
kno = (2 * lv) + 2;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0.5;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 60;
atkRange = 40;
minatkRange = 0;
mgRange = 30;
mg = 3;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3, 4, 9);
itemChance = new Array(0, 50, 30, 20);
itemQuanMin = new Array(0, 3, 1, 1);
itemQuanMax = new Array(0, 15, 5, 5);
break;
case 5 :
unit.lv = (lv ? (lv) : 6);
lv = unit.lv;
expGain = 30 * lv;
frc = (2 * lv) + 3;
fcs = (1 * lv) + 2;
vit = (2 * lv) + 1;
spr = (1 * lv) + 2;
kno = (1 * lv) + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0.8;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 50;
atkRange = 20;
minatkRange = 0;
index = _root.enemyIndexMax;
mg = 4;
mgRange = 0;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3, 4, 9);
itemChance = new Array(0, 30, 20, 20);
itemQuanMin = new Array(0, 3, 2, 2);
itemQuanMax = new Array(0, 15, 10, 10);
break;
case 6 :
unit.lv = (lv ? (lv) : 10);
lv = unit.lv;
expGain = 22 * lv;
frc = (1 * lv) + 2;
fcs = (1 * lv) + 2;
vit = (3 * lv) + 2;
spr = (1 * lv) + 2;
kno = (3 * lv) + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0.5;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 50;
atkRange = 30;
minatkRange = 0;
index = _root.enemyIndexMax;
mgRange = 30;
mg = 5;
missleSpeed = 5;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3, 8, 1);
itemChance = new Array(0, 60, 30, 10);
itemQuanMin = new Array(0, 20, 5, 1);
itemQuanMax = new Array(0, 40, 10, 1);
break;
case 7 :
unit.lv = (lv ? (lv) : 15);
lv = unit.lv;
expGain = 20 * lv;
frc = (1.5 * lv) + 2;
fcs = (0.5 * lv) + 2;
vit = (3 * lv) + 5;
spr = 0.2 * lv;
kno = (0.5 * lv) + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 1;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 50;
atkRange = 20;
minatkRange = -5;
boss = true;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 8, 9);
itemChance = new Array(0, 100, 100);
itemQuanMin = new Array(0, 5, 5);
itemQuanMax = new Array(0, 10, 10);
break;
case 8 :
unit.lv = (lv ? (lv) : 2);
lv = unit.lv;
expGain = 20 * lv;
expBonus = 0.2;
frc = (1.5 * lv) + 2;
fcs = (2 * lv) + 2;
vit = (2 * lv) + 1;
spr = 2 * lv;
kno = (2 * lv) + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
mg = 6;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 1;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 70;
atkRange = 20;
minatkRange = -5;
mgRange = 20;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3, 4);
itemChance = new Array(0, 20, 20);
itemQuanMin = new Array(0, 1, 1);
itemQuanMax = new Array(0, 5, 5);
break;
case 9 :
unit.lv = (lv ? (lv) : 5);
lv = unit.lv;
boss = true;
boss1 = true;
expGain = (20 * lv) * 10;
frc = (2 * lv) + 1;
fcs = (2 * lv) + 1;
vit = (2 * lv) + 1;
spr = (2 * lv) + 1;
kno = (2 * lv) + 1;
hpmax = ((vit * 20) + (lv * 50)) * 3;
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0.5;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 200;
atkRange = 20;
GoRange = 70;
minGoRange = 0;
minatkRange = 0;
mgRange = 200;
mgHitRange = 40;
mg = 7;
keyItem = true;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 13);
itemChance = new Array(0, 100);
itemQuanMin = new Array(0, 1);
itemQuanMax = new Array(0, 1);
break;
case 10 :
if (_root.player.lv < 10) {
lv = 10;
} else {
lv = _root.player.lv + 1;
}
boss = true;
boss2 = true;
expGain = (20 * lv) * 5;
frc = (1.5 * lv) + 1;
fcs = (1 * lv) + 1;
vit = (2 * lv) + 1;
spr = (2 * lv) + 1;
kno = (2 * lv) + 1;
hpmax = ((vit * 20) + (lv * 50)) * 10;
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 999;
atkRange = 150;
minatkRange = 0;
mgRange = 999;
mgHitRange = 999;
mg = 10;
mgCooled = false;
coolTime = 15000;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0);
itemChance = new Array(0);
itemQuanMin = new Array(0);
itemQuanMax = new Array(0);
}
};
}
function RefreshEnemyIndex() {
_root.enemyQuan = 0;
for (i in _root.monsters) {
_root.enemyQuan++;
}
}
function RestoreMove() {
if (!_root.gamePause) {
if ((_root.playerSlash or _root.playerSpMove) or _root.playerMgMove) {
_root.player.play();
if (_root.playerSlash) {
_root.playerWeapon.play();
}
if (_root.playerSpMove) {
_root.player.SpMessage.text = "";
}
if (_root.playerMgMove) {
_root.player.MgMessage.text = "";
}
_root.playerSpMove = false;
_root.playerMgMove = false;
_root.spCasting = false;
_root.playerSpIndex = "";
_root.playerSpUse = false;
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_root.sp2Casting = false;
_root.sp2Target = undefined;
_root.detecting = false;
}
}
}
function CheckDyingInShop(unit) {
for (i in _root.shopArray) {
if (_root.shopArray[i].DetectArea.hitTest(unit._x, unit._y, true)) {
_root.shopArray[i].afraid = true;
_root.shopArray[i].gotoAndPlay("Cry");
}
}
}
function AIScript() {
for (i in _root.monsters) {
_root.enemyDetectRangeX = _root.player._x - _root.monsters[i]._x;
_root.enemyDetectRangeY = _root.player._y - _root.monsters[i]._y;
_root.detectX = Math.sqrt(_root.enemyDetectRangeX * _root.enemyDetectRangeX);
_root.detectY = Math.sqrt(_root.enemyDetectRangeY * _root.enemyDetectRangeY);
if (!_root.monsters[i].buff[2]) {
if ((!_root.monsters[i].moreMissling) and _root.monsters[i].missleAttacking) {
MissleDetecting(_root.monsters[i]);
} else if (_root.monsters[i].moreMissling) {
MoreMissleDetecting(_root.monsters[i]);
}
if (((!_root.monsters[i].attacking) and (!_root.monsters[i].moreMissling)) and (!_root.monsters[i].mgCasting)) {
PassiveMagic(_root.monsters[i]);
if (((((rangeX >= 0) and (rangeX <= _root.monsters[i].mgRange)) and (rangeY >= 0)) and (rangeY <= _root.monsters[i].mgRange)) and (_root.monsters[i].mgRange != undefined)) {
EnemyAttackType(_root.monsters[i], _root.detectX, _root.detectY);
}
if ((((_root.detectX > _root.monsters[i].minatkRange) and (_root.detectX < _root.monsters[i].atkRange)) and (_root.detectY > _root.monsters[i].minatkRange)) and (_root.detectY < _root.monsters[i].atkRange)) {
if (!_root.monsters[i].mgCasting) {
_root.monsters[i].gotoAndPlay("Attack");
_root.monsters[i].attacking = true;
}
} else if ((((_root.detectX > 0) and (_root.detectX < _root.monsters[i].sightRange)) and (_root.detectY > 0)) and (_root.detectY < _root.monsters[i].sightRange)) {
MoveToPlayer(_root.monsters[i]);
}
}
}
}
}
function EnemyMgRangeChecking(enemy) {
enemyDetectRangeX = _root.player._x - enemy._x;
enemyDetectRangeY = _root.player._y - enemy._y;
detectX = Math.sqrt(enemyDetectRangeX * enemyDetectRangeX);
detectY = Math.sqrt(enemyDetectRangeY * enemyDetectRangeY);
if ((((_root.detectX > 0) and (_root.detectX < enemy.mgRange)) and (_root.detectY > 0)) and (_root.detectY < enemy.mgRange)) {
EnemyMessageShow(enemy, "");
return([enemy]);
}
EnemyMessageShow(enemy, "miss");
return([" "]);
}
function MoveToTarget(enemy, targeted) {
_root.enemyDetectRangeX = targeted._x - enemy._x;
_root.enemyDetectRangeY = targeted._y - enemy._y;
if (_root.enemyDetectRangeX > 0) {
enemy._x = enemy._x + enemy.SpeedX;
enemy.moveIndex = "2";
}
if (_root.enemyDetectRangeX < 0) {
enemy._x = enemy._x - enemy.SpeedX;
enemy.moveIndex = "1";
}
if (_root.enemyDetectRangeY > 0) {
enemy._y = enemy._y + enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "2";
}
if (_root.enemyDetectRangeY < 0) {
enemy._y = enemy._y - enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "1";
}
MonsHit(enemy);
}
function EnemyAttackType(enemy, rangeX, rangeY) {
if (((!enemy.dying) and (!_root.spCasting)) and (!_root.mgCasting)) {
if ((!enemy.mgCasting) and (!enemy.attacking)) {
switch (enemy.mg) {
case 1 :
if (((enemy.hp * 100) / enemy.hpmax) <= 25) {
enemy.gotoAndPlay("Mg" + "1");
enemy.explodeTime = 1;
enemy.mgCasting = true;
}
return;
case 2 :
if (enemy.sp >= 10) {
enemy.gotoAndPlay("Mg" + "2");
enemy.sp = enemy.sp - 30;
enemy.mgCasting = true;
}
return;
case 3 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.mp >= 20)) {
enemy.gotoAndPlay("Mg" + "3");
enemy.mp = enemy.mp - 20;
enemy.mgCasting = true;
}
return;
case 5 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.sp >= 20)) {
enemy.gotoAndPlay("Mg" + "5");
enemy.sp = enemy.sp - 20;
enemy.mgCasting = true;
}
return;
case 6 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.sp >= 10)) {
enemy.gotoAndPlay("Mg" + "6");
enemy.sp = enemy.sp - 10;
enemy.mgCasting = true;
}
return;
case 7 :
if ((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) {
if ((((rangeX > enemy.minGoRange) and (rangeX < enemy.GoRange)) and (rangeY > enemy.minGoRange)) and (_root.detectY < enemy.GoRange)) {
if ((((rangeX > enemy.minatkRange) and (rangeX < enemy.atkRange)) and (rangeY > enemy.minatkRange)) and (_root.detectY < enemy.atkRange)) {
enemy.mgCasting = false;
} else {
MoveToPlayer(enemy);
}
} else {
enemy.gotoAndPlay("Mg" + "7");
enemy.mgCasting = true;
}
}
return;
case 10 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.sp >= 100)) {
enemy.gotoAndPlay("Mg" + "10");
enemy.sp = enemy.sp - 100;
enemy.mgCasting = true;
}
return;
default :
enemy.mgCasting = false;
}
}
}
}
function PassiveMagic(enemy) {
if (((!enemy.dying) and (!_root.spCasting)) and (!_root.mgCasting)) {
switch (enemy.mg) {
case 4 :
if ((((enemy.hp * 100) / enemy.hpmax) <= 50) and (enemy.mp >= 10)) {
enemy.gotoAndPlay("Mg" + "4");
enemy.mp = enemy.mp - 10;
enemy.mgCasting = true;
}
return;
case 7 :
if (((((enemy.hp * 100) / enemy.hpmax) <= 50) and (enemy.mp >= 20)) and (!enemy.buff[3])) {
enemy.gotoAndPlay("Mg" + "8");
enemy.mp = enemy.mp - 20;
enemy.mgCasting = true;
}
return;
case 10 :
if (!(enemy.mgCooled and (_root.enemyQuan < _root.enemyNumMax[_root.currentIndex]))) {
break;
}
enemy.mgCooled = false;
enemy.setCooled = setInterval(CooldownMg, enemy.coolTime, enemy);
enemy.gotoAndPlay("Mg" + "9");
enemy.mgCasting = true;
}
}
}
function CooldownMg(enemy) {
clearInterval(enemy.setCooled);
enemy.mgCooled = true;
}
function CheckPath() {
for (i in _root.pathWay) {
if (_root.pathWay[i].Door.hitTest(_root.player._x, _root.player._y, true)) {
GotoPath(_root.pathWay[i].index);
}
}
}
function GotoPath(index) {
_root.areaIndex = index;
_root.SprSword.removeMovieClip;
for (i in _root.shopArray) {
shop = _root.shopArray[i];
delete _root.shopArray[i];
shop.removeMovieClip();
}
for (i in _root.dropItemArray) {
item = _root.dropItemArray[i];
delete _root.dropItemArray[i];
item.removeMovieClip();
}
for (i in _root.monsters) {
unit = _root.monsters[i];
delete _root.monsters[i];
unit.removeMovieClip();
}
for (i in _root.pathWay) {
path = _root.pathWay[i];
delete _root.pathWay[i];
path.removeMovieClip();
}
for (i in _root.buildings) {
building = _root.buildings[i];
delete _root.buildings[i];
building.removeMovieClip();
}
_root.enemyQuan = 0;
_root.Background.gotoAndStop(index + 1);
for (i in _root.buildingArray[index]) {
if (!((_root.wisemanDialog == 8) and (_root.areaArray[index][i][4] == 1))) {
duplicateMovieClip (_root.buildingArray[index][i], "DupBuilding" + i, -100);
_root["DupBuilding" + i]._x = _root.areaArray[index][i][0] + _root.adjX;
_root["DupBuilding" + i]._y = _root.areaArray[index][i][1] + _root.adjY;
if (_root.areaArray[index][i][2] != undefined) {
_root["DupBuilding" + i].swapDepths(_root.areaArray[index][i][2]);
} else {
_root["DupBuilding" + i].swapDepths((_root["DupBuilding" + i]._y * 600) + _root["DupBuilding" + i]._x);
}
_root.buildings[i] = _root["DupBuilding" + i];
_root.area[i] = _root["DupBuilding" + i].Area;
_root.hillArea[i] = _root["DupBuilding" + i].HillArea1;
_root.hillArea[i + 1] = _root["DupBuilding" + i].HillArea2;
_root.hillArea[i]._visible = false;
_root.hillArea[i + 1]._visible = false;
if (_root.areaArray[index][i][3]) {
_root.shopArray[i] = _root["DupBuilding" + i];
_root.shopArray[i].index = _root.areaArray[index][i][3];
_root.shopArray[i].DetectArea._visible = false;
}
}
}
_root.area[99] = _root.Site1_Area;
for (i in _root.area) {
_root.area[i]._visible = false;
}
for (i in _root.pathArray[index]) {
duplicateMovieClip (_root.ArenaPath, ("DupPath" + index) + i, -100);
_root[("DupPath" + index) + i]._x = _root.pathArray[index][i][0] + _root.adjX;
_root[("DupPath" + index) + i]._y = _root.pathArray[index][i][1] + _root.adjY;
_root[("DupPath" + index) + i].swapDepths((_root.pathArray[index][i][1] * 600) + _root.pathArray[index][i][0]);
_root.pathWay[i] = _root[("DupPath" + index) + i];
_root.pathWay[i].index = _root.pathArray[index][i][2];
}
_root.areaEnemyRegen = _root.areaEnemyRegenArray[index];
_root.currentIndex = index;
switch (int(index)) {
case 0 :
if (_root.lastAreaIndex == 2) {
_root.player._x = _root.screenXMin;
_root.player.swapDepths(_root.playerDepth);
} else {
_root.player._x = _root.screenXMax;
_root.player.swapDepths(_root.playerDepth);
All2MessageShow("-----DUNGEON OF THE ANCIENT DESSERT-----");
}
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 1 :
if (_root.lastAreaIndex == 3) {
_root.player._x = _root.screenXMax;
_root.player._y = 100;
_root.player.swapDepths(_root.playerDepth);
} else if (_root.lastAreaIndex == 5) {
_root.player._x = _root.player._x - 200;
_root.player._y = _root.screenYMax + 10;
All2MessageShow("-----CREAMY BOMB RIVER-----");
_root.player.swapDepths(_root.playerDepth);
} else {
_root.player._x = _root.screenXMin;
_root.player.swapDepths(_root.playerDepth);
All2MessageShow("-----CREAMY BOMB RIVER-----");
}
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 2 :
if (_root.lastAreaIndex == 8) {
_root.player._x = _root.screenXMin;
_root.player.swapDepths(_root.playerDepth);
} else if (_root.lastAreaIndex == 9) {
_root.player._y = _root.screenYMin + 40;
_root.player.swapDepths(_root.playerDepth);
} else {
_root.player._x = _root.screenXMax;
_root.player.swapDepths(_root.playerDepth);
}
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 3 :
if (_root.lastAreaIndex == 4) {
_root.player._x = 513;
_root.player._y = 90;
All2MessageShow("-----CREAMY BOMB RIVER-----");
_root.player.swapDepths(_root.playerDepth);
} else {
_root.player._x = _root.screenXMin;
_root.player.swapDepths(_root.playerDepth);
}
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 4 :
if (((_root.player.spr >= 40) and (!_root.sprSwordPick)) and (!_root.sprSwordTaken)) {
duplicateMovieClip (_root.DropItem10, "SprSword", -1);
setProperty("SprSword", _x , 75);
setProperty("SprSword", _y , 180);
_root.SprSword.swapDepths((_root.SprSword._y * 600) + _root.SprSword._x);
_root.sprSwordPicking = true;
}
All2MessageShow("-----CLEAR SITE WATERFALL-----");
_root.player._x = 234;
_root.player._y = _root.screenYMax + 10;
_root.player.swapDepths(_root.playerDepth);
num = random(5);
if (num == 1) {
enemy = -1;
} else {
enemy = undefined;
}
CreateEnemy(-1, enemy, 135, 184, 2);
break;
case 5 :
if (_root.lastAreaIndex == 6) {
_root.player._y = _root.screenYMax + 10;
_root.player.swapDepths(_root.playerDepth);
} else {
_root.player._x = _root.player._x + 200;
_root.player._y = _root.screenYMin + 40;
_root.player.swapDepths(_root.playerDepth);
All2MessageShow("-----BAKERY RUIN DOWNSTREAM-----");
}
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
if (!_root.boss1Clear) {
if (_root.boss1Intro == 0) {
_root.Status._visible = false;
_root.player.gotoAndStop("LBStand");
_root.gamePause = true;
}
CreateEnemy(-1, 9, 145, 364, undefined, 1);
BossDialog(_root.targeted);
} else if (!_root.key1Pick) {
CreateEnemy(-1, 9, 145, 364, undefined, 1);
_global.RemoveUnit(_root.targeted);
}
break;
case 6 :
if (_root.lastAreaIndex == 1) {
All2MessageShow("-----DUNGEON ENTRANCE-----");
_root.player._x = _root.screenXMax;
_root.player.swapDepths(_root.playerDepth);
} else {
_root.player._x = _root.screenXMin;
_root.player._y = _root.player._y + 20;
_root.player.swapDepths(_root.playerDepth);
}
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 7 :
All2MessageShow("-----WARNING-----POWERFUL ENEMY AHEAD-----");
_root.player._x = _root.screenXMax + 0.25;
_root.player.swapDepths(_root.playerDepth);
CreateEnemy(-1, 10, 150, 130, undefined, 1);
_root.battlingBoss2 = true;
break;
case 8 :
_root.player._x = _root.screenXMax + 0.25;
_root.player.swapDepths(_root.playerDepth);
All2MessageShow(("Do not let " + _global.playerName) + " get through our Boss Gate !!");
CreateEnemy(-1, 1, 100, 340, 3);
CreateEnemy(-1, 2, 110, 330, 3);
CreateEnemy(-1, 3, 120, 320, 3);
CreateEnemy(-1, 4, 115, 300, 3);
CreateEnemy(-1, 5, 134, 301, 3);
CreateEnemy(-1, 6, 124, 324, 3);
CreateEnemy(-1, 8, 125, 333, 3);
CreateEnemy(-1, 9, 180, 130, 3);
CreateEnemy(-1, 9, 200, 110, 3);
CreateEnemy(-1, 9, 350, 380, 3);
CreateEnemy(-1, 9, 500, 350, 3);
break;
case 9 :
_root.player._y = _root.screenYMax;
_root.player.swapDepths(_root.playerDepth);
All2MessageShow("----------------------------------------------THE WAR ROOM( FUN EH? )----------------------------------------------");
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1, 275, 130, 5, undefined, _root.player.lv);
}
_root.currentIndex = index;
_root.lastAreaIndex = index;
}
function GameOver() {
_global.RemoveUnitStatus(_root.player, 3);
_global.RemoveUnitStatus(_root.player, 2);
_global.RemoveUnitStatus(_root.player, 1);
_root.levelScr = _root.player.lv;
_root.expScr = _root.player.ex;
_root.playerName = _root.Status.PlayerName.text;
ScoreCheck();
_root.SprSword.removeMovieClip();
_root.FloorMatA.removeMovieClip();
_root.BMissle.removeMovieClip();
_root.Sp1Anim.removeMovieClip();
_root.SpEffects.removeMovieClip();
_root.Mg1Anim.removeMovieClip();
_root.MgSpark.removeMovieClip();
_root.MgShock.removeMovieClip();
_root.Shock1.removeMovieClip();
_root.Shock2.removeMovieClip();
_root.Shock3.removeMovieClip();
_root.Message_Title.removeMovieClip();
_root.FoodEnemy1.removeMovieClip();
_root.FoodEnemy2.removeMovieClip();
_root.FoodEnemy3.removeMovieClip();
_root.FoodEnemy4.removeMovieClip();
_root.FoodEnemy5.removeMovieClip();
_root.FoodEnemy6.removeMovieClip();
_root.FoodEnemy7.removeMovieClip();
_root.FloorC.removeMovieClip();
_root.ArenaPath.removeMovieClip();
_root.StatueA.removeMovieClip();
_root.DropItem1.removeMovieClip();
_root.DropItem2.removeMovieClip();
_root.DropItem3.removeMovieClip();
_root.DropItem4.removeMovieClip();
_root.DropItem5.removeMovieClip();
_root.DropItem6.removeMovieClip();
_root.DropItem7.removeMovieClip();
_root.DropItem8.removeMovieClip();
_root.DropItem9.removeMovieClip();
_root.DropItem10.removeMovieClip();
_root.DropItem11.removeMovieClip();
_root.DropItem12.removeMovieClip();
_root.DropItem13.removeMovieClip();
_root.DropItem14.removeMovieClip();
_root.Status.removeMovieClip();
_root.Animation_Sp2.removeMovieClip();
_root.ShopBar.removeMovieClip();
_root.Status.removeMovieClip();
_root.Message_Title.removeMovieClip();
_root.Message_Refer.removeMovieClip();
_root.CreateBar.removeMovieClip();
_root.SaveGame_Bar.removeMovieClip();
for (i in _root.pathWay) {
_root.pathWay[i].removeMovieClip();
}
for (i in _root.shopArray) {
_root.shopArray[i].removeMovieClip();
}
for (i in _root.monsters) {
_root.monsters[i].removeMovieClip();
}
for (i in _root.buildings) {
_root.buildings[i].removeMovieClip();
}
for (i in _root.itemsArray) {
_root.itemsArray[i].removeMovieClip();
}
for (i in _root.dropItemArray) {
_root.dropItemArray[i].removeMovieClip();
}
delete _root.shopArray;
delete _root.mg6MonsterArray;
delete _root.dropItemArray;
delete _root.remObjects;
delete _root.itemsArray;
delete _root.buildings;
delete _root.monsters;
delete _root.pathWay;
clearInterval(_root.playerRegenerate);
_root.player.removeMovieClip();
if (!_root.boss2Defeated) {
gotoAndStop (157);
} else {
gotoAndPlay (7);
}
}
function Initialize() {
clearInterval(_root.initCall);
tellTarget (_root.player) {
buff = new Array();
playerArmorNum = new Array();
playerArmorNum = [0, 5, 2];
playerArmorNum[99] = 99999 /* 0x01869F */;
playerWeaponNum = new Array();
playerWeaponNum = [0, 0, 0, 10, 15, 0, -16];
playerAccessNum = new Array();
playerAccessNum = [0, 100];
lv = 1;
expmax = 100;
ex = 0;
frc = 5;
fcs = 5;
vit = 5;
spr = 5;
kno = 5;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
hp = hpmax;
mp = mpmax;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
atkRange = 20;
minatkRange = -5;
minspRange = -5;
minPickRange = -5;
pickRange = 20;
spRange = 30;
minsp2Range = 0;
sp2Range = 20;
mg1 = 30;
minmg1 = -mg1;
mg2 = 30;
minmg2 = -mg2;
mg4 = 40;
minmg4 = -mg4;
mg21 = 30;
minmg21 = -5;
mg22 = 30;
minmg22 = mg - 22;
mg41 = 0;
minmg41 = 0;
mg1lv1requireKno = 10;
mg1lv1requireMp = 20;
mg1lv2requireKno = 20;
mg1lv2requireMp = 50;
mg1lv3requireKno = 40;
mg1lv3requireMp = 200;
mg2lv1requireKno = 15;
mg2lv1requireMp = 20;
mg2lv2requireKno = 23;
mg2lv2requireMp = 80;
mg2lv3requireKno = 45;
mg2lv3requireMp = 200;
mg4lv1requireMp = 50;
};
GotoPath(4);
_root.Status.PlayerName.text = _global.playerName;
_root.referSetting = true;
_root.referSettingText = "ON";
AllMessageSet(-1, _root.arenaMessage.length);
_root.Message_Title.swapDepths(500000);
_root.Status.swapDepths(400000);
_root.CreateBar.swapDepths(510000);
_root.ShopBar.swapDepths(520000);
_root.SaveGame_Bar.swapDepths(530000);
_root.player.swapDepths(_root.playerDepth);
_root.playerRegenerate = setInterval(Regenerate, _root.playerRegenDelay);
RefreshStatus();
}
clearInterval(_root.allMessages);
_root.accessType = 0;
_root.Count_Anim = 0;
_root.warLeader = undefined;
_global.compleText = "";
_root.selfCreateEnable = false;
_root.tutorialRunning = false;
_root.player = _root.Player_SwordUser;
_root.bossScr = 0;
_root.playerDying = false;
_global.playerSuicide = false;
_root.statusPosition = 1;
_root.createTool = false;
_root.playerPicture = 1;
_root.CreateBar._visible = false;
_root.playerTrading1 = false;
_root.playerTrading1Enabled = true;
_root.ShopBar._visible = false;
_root.ShopBar.Casher._visible = false;
_root.shopTool = false;
_root.playerTrading2Enabled = true;
_root.playerTrading2 = false;
_root.spCasting = false;
_root.sp2Casting = false;
_root.SaveGame_Bar._visible = false;
_root.boss1Clear = false;
_root.targeted = undefined;
_root.powerUpMode = false;
_root.wisemanHelp = false;
_root.key1Pick = false;
_root.sprSwordPick = false;
_root.sprSwordTalked = false;
_root.earthQuaking = false;
_root.earthQuakeNum = 0;
_root.quakeUp = false;
_root.quakeDown = false;
_root.sprSwordPicking = false;
_root.battlingBoss2 = false;
_root.sprSwordTaken = false;
_root.statusLoc = "Profile";
_root.allowUse = true;
_root.itemsSizeMin = 30;
_root.itemsArray = new Array();
_root.itemsArrayName = new Array();
_root.itemsCostArray = new Array();
_root.itemWeaponArray = new Array();
_root.itemWeaponArray[1] = 14;
_root.itemWeaponArray[3] = 10;
_root.itemWeaponArray[4] = 15;
_root.itemWeaponArray[5] = 5;
_root.itemWeaponArray[6] = 17;
_root.itemWeaponArray[2] = 19;
_root.itemArmorArray = new Array();
_root.itemArmorArray[1] = 12;
_root.itemArmorArray[2] = 11;
_root.itemArmorArray[99] = 18;
_root.itemAccessArray = new Array();
_root.itemAccessArray[1] = 16;
_root.itemsCostArray[0] = 1;
_root.itemsCostArray[1] = 15;
_root.itemsCostArray[2] = 30;
_root.itemsCostArray[3] = 1;
_root.itemsCostArray[4] = 2;
_root.itemsCostArray[5] = 300;
_root.itemsCostArray[6] = 75;
_root.itemsCostArray[7] = 120;
_root.itemsCostArray[8] = 3;
_root.itemsCostArray[9] = 5;
_root.itemsCostArray[10] = 0;
_root.itemsCostArray[11] = 150;
_root.itemsCostArray[12] = 350;
_root.itemsCostArray[13] = 0;
_root.itemsCostArray[15] = 400;
_root.itemsCostArray[16] = 300;
_root.itemsCostArray[17] = 500;
_root.itemsCostArray[18] = 0;
_root.itemsCostArray[19] = 0;
_root.itemQuanFull = new Array(99999, 1, 1, 50, 50, 10, 1, 1, 20, 20, 1, 1);
_root.itemsArrayName[0] = "Cash";
_root.itemsArrayName[1] = "Light Vital Drink";
_root.itemsArrayName[2] = "Magic Potion";
_root.itemsArrayName[3] = "Low Sugar Glucose";
_root.itemsArrayName[4] = "Magical Sugar Glucose";
_root.itemsArrayName[5] = "Shadow Blow";
_root.itemsArrayName[6] = "Battle Drink ";
_root.itemsArrayName[7] = "Sorceror's Source";
_root.itemsArrayName[8] = "99.9% Sugar Glucose";
_root.itemsArrayName[9] = "Mind Glucose";
_root.itemsArrayName[10] = "Spirit Sword";
_root.itemsArrayName[11] = "Wig";
_root.itemsArrayName[12] = "Steel Helmet";
_root.itemsArrayName[13] = "Wiseman Rod";
_root.itemsArrayName[14] = "Spirit Sword";
_root.itemsArrayName[15] = "Zyngon Sword";
_root.itemsArrayName[16] = "Bracelet";
_root.itemsArrayName[17] = "Shining Blade";
_root.itemsArrayName[18] = "Shi...";
_root.itemsArrayName[19] = "Super Sword";
_root.dropItemArray = new Array();
_global.UnequipWeapon = function (index) {
if (index != 1) {
_root.Status.Picture_Weapon.gotoAndStop(1);
_root.weaponType = 1;
_root.itemsArray[14]--;
_root.player.Sword.gotoAndStop(1);
_root.player.Sword2.gotoAndStop(1);
itemWeapon = _root.itemWeaponArray[index];
_root.itemsArray[itemWeapon]++;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
if (index == 3) {
clearInterval(_root.playerRegenerate);
_root.playerRegenerate = setInterval(Regenerate, 5000);
}
}
};
_global.UnequipArmor = function (index) {
if (index != 0) {
_root.Status.Picture_Armor.gotoAndStop(1);
_root.armorType = 0;
_root.player.Armor1.gotoAndStop(1);
_root.player.Armor2.gotoAndStop(1);
itemArmor = _root.itemArmorArray[index];
_root.itemsArray[itemArmor]++;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
};
_global.UnequipAccess = function (index) {
if (index != 0) {
_root.Status.Picture_Others.gotoAndStop(1);
_root.accessType = 0;
itemAccess = _root.itemAccessArray[index];
_root.itemsArray[itemAccess]++;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
};
_global.ChooseKeyItem = function (obj) {
obj.gotoAndStop(2);
obj.index = 0;
obj.Data.removeMovieClip();
_root.selectHIObj = obj;
_root.selectHotkeyItem = true;
};
_global.ReferSp = function (sp) {
ReferAttach(_root.spArrayRefer[sp.index]);
};
_global.ReferSpIndex = function (sp) {
ReferAttach(_root.spIndexArrayRefer[sp.index]);
};
_global.ReferMg = function (mg) {
ReferAttach(_root.mgArrayRefer[mg.index][mg.lv]);
};
_global.ReferMgIndex = function (mg) {
ReferAttach(_root.mgIndexArrayRefer[mg.index][mg.lv]);
};
_global.ReferItem = function (item) {
ReferAttach(_root.itemsArrayRefer[item.index]);
};
_global.ReferWeapon = function (index) {
ReferAttach(_root.weaponArrayRefer[index]);
};
_global.ReferArmor = function (index) {
ReferAttach(_root.armorArrayRefer[index]);
};
_global.ReferAccess = function (index) {
ReferAttach(_root.accessArrayRefer[index]);
};
_global.UseItem = function (item, index) {
if (!_root.gamePause) {
if (!_root.selectHotkeyItem) {
if (item != "") {
typed = item.index;
} else {
typed = index;
}
if (_root.itemsArray[typed] != 0) {
switch (typed) {
case 1 :
if (!_root.shopSellReady) {
if (_root.player.hp == _root.player.hpmax) {
All2MessageShow("My HP is full. It is not necessary to use this now.");
} else {
_root.player.hp = _root.player.hp + 200;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim" + typed);
}
} else {
_global.SellItem(typed);
}
break;
case 2 :
if (!_root.shopSellReady) {
if (_root.player.mp == _root.player.mpmax) {
All2MessageShow("My MP is full. It is not necessary to use this now.");
} else {
_root.player.mp = _root.player.mp + 200;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim" + typed);
}
} else {
_global.SellItem(typed);
}
break;
case 3 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 4 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 5 :
if (!_root.shopSellReady) {
if (_root.player.fcs < 40) {
All2MessageShow("I must have at least 40 FOCUS to equip that.");
} else {
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
} else {
_global.SellItem(typed);
}
break;
case 6 :
if (!_root.shopSellReady) {
if (_root.player.hp == _root.player.hpmax) {
All2MessageShow("My HP is full. It is not necessary to use this now.");
} else {
_root.player.hp = _root.player.hp + 800;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim1");
}
} else {
_global.SellItem(typed);
}
break;
case 7 :
if (!_root.shopSellReady) {
if (_root.player.mp == _root.player.mpmax) {
All2MessageShow("My MP is full. It is not necessary to use this now.");
} else {
_root.player.mp = _root.player.mp + 800;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim2");
}
} else {
_global.SellItem(typed);
}
break;
case 8 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 9 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 10 :
if (!_root.shopSellReady) {
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
clearInterval(_root.playerRegenerate);
_root.playerRegenerate = setInterval(Regenerate, 4000);
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
break;
case 11 :
if (!_root.shopSellReady) {
if (_root.player.vit < item.vit) {
All2MessageShow(("I must have at least " + item.vit) + " VITALITY to equip that.");
} else {
if ((_root.armorType != 0) and (_root.armorType != undefined)) {
remArmor = _root.armorType;
itemArmor = _root.itemArmorArray[remArmor];
_root.itemsArray[itemArmor]++;
}
_root.armorType = item.armorType;
_root.Status.Picture_Armor.gotoAndStop("Type" + item.armorType);
_root.player.Armor1.gotoAndStop("Type" + item.armorType);
_root.player.Armor2.gotoAndStop("Type" + item.armorType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
} else {
_global.SellItem(typed);
}
break;
case 12 :
if (!_root.shopSellReady) {
if (_root.player.vit < item.vit) {
All2MessageShow(("I must have at least " + item.vit) + " VITALITY to equip that.");
} else {
if ((_root.armorType != 0) and (_root.armorType != undefined)) {
remArmor = _root.armorType;
itemArmor = _root.itemArmorArray[remArmor];
_root.itemsArray[itemArmor]++;
}
_root.armorType = item.armorType;
_root.Status.Picture_Armor.gotoAndStop("Type" + item.armorType);
_root.player.Armor1.gotoAndStop("Type" + item.armorType);
_root.player.Armor2.gotoAndStop("Type" + item.armorType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
}
break;
case 14 :
if (!_root.shopSellReady) {
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
break;
case 15 :
if (!_root.shopSellReady) {
if (_root.player.frc < 40) {
All2MessageShow("I must have at least 40 FORCE to equip that.");
} else {
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
} else {
_global.SellItem(typed);
}
break;
case 16 :
if (!_root.shopSellReady) {
if (_root.player.kno < 30) {
All2MessageShow("I must have at least 30 KNOWLEDGE to equip that.");
} else {
if ((_root.accessType != 0) and (_root.accessType != undefined)) {
remAccess = _root.accessType;
itemAccess = _root.itemAccessArray[remAccess];
_root.itemsArray[itemAccess]++;
}
_root.accessType = item.accessType;
_root.Status.Picture_Others.gotoAndStop("Type" + item.accessType);
trace("Type" + item.accessType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
} else {
_global.SellItem(typed);
}
break;
case 17 :
if (!_root.shopSellReady) {
if (_root.player.vit < 40) {
All2MessageShow("I must have at least 40 VITALITY to equip that.");
} else {
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
} else {
_global.SellItem(typed);
}
break;
case 18 :
if (!_root.shopSellReady) {
if ((_root.armorType != 0) and (_root.armorType != undefined)) {
remArmor = _root.armorType;
itemArmor = _root.itemArmorArray[remArmor];
_root.itemsArray[itemArmor]++;
}
_root.armorType = item.armorType;
_root.Status.Picture_Armor.gotoAndStop("Type" + item.armorType);
_root.player.Armor1.gotoAndStop("Type" + item.armorType);
_root.player.Armor2.gotoAndStop("Type" + item.armorType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
All2MessageShow("... ...");
RefreshStatus();
}
break;
case 19 :
if (!_root.shopSellReady) {
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
All2MessageShow("Hey, please don't do this Man...");
RefreshStatus();
} else {
_global.SellItem(typed);
}
}
}
} else {
_root.selectHotkeyItem = false;
_root.selectHIObj.index = item.index;
_root.selectHIObj.usable = item.usable;
if (((_root.selectHIObj.index != undefined) and (_root.selectHIObj.index != 0)) and _root.selectHIObj.usable) {
_root.selectHIObj.gotoAndStop(_root.selectHIObj.index + 2);
} else {
if (!_root.selectHIObj.usable) {
All2MessageShow(_root.hotKeyRefer[2]);
}
_root.selectHIObj.gotoAndStop(1);
}
}
RefreshStatus();
_root.Status.prevFrame();
_root.Status.nextFrame();
}
};
_root.spLevel = 1;
_root.mg1Lv = 0;
_root.mg2Lv = 0;
_root.area = new Array();
_root.buildings = new Array();
_root.areaArray = new Array();
_root.enemyNumMax = new Array();
_root.pathWay = new Array();
_root.pathArray = new Array();
_root.areaEnemyRegenArray = new Array();
_root.hillArea = new Array();
_root.buildingArray = new Array();
_root.shopArray = new Array();
_root.areaEnemyRegenArray[0] = 2;
_root.areaEnemyRegenArray[1] = 4;
_root.areaEnemyRegenArray[2] = 3;
_root.areaEnemyRegenArray[3] = 2;
_root.areaEnemyRegenArray[4] = 0;
_root.areaEnemyRegenArray[5] = 4;
_root.areaEnemyRegenArray[6] = 2;
_root.areaEnemyRegenArray[7] = 0;
_root.areaEnemyRegenArray[8] = 0;
_root.areaEnemyRegenArray[9] = 5;
_root.enemyNumMax[0] = 10;
_root.enemyNumMax[1] = 8;
_root.enemyNumMax[2] = 7;
_root.enemyNumMax[3] = 7;
_root.enemyNumMax[4] = 1;
_root.enemyNumMax[5] = 10;
_root.enemyNumMax[6] = 6;
_root.enemyNumMax[7] = 5;
_root.enemyNumMax[8] = 10;
_root.enemyNumMax[9] = 10;
_root.pathArray[0] = [[530, 150, 6], [3, 100, 2]];
_root.pathArray[1] = [[3, 203, 6], [530, 50, 3], [275, 330, 5]];
_root.pathArray[2] = [[530, 100, 0], [3, 53, 8], [400, 10, 9]];
_root.pathArray[3] = [[3, 50, 1], [513, 30, 4]];
_root.pathArray[4] = [[201, 340, 3]];
_root.pathArray[5] = [[475, 20, 1]];
_root.pathArray[6] = [[530, 203, 1], [3, 150, 0]];
_root.pathArray[7] = [];
_root.pathArray[8] = [[3, 303, 7], [530, 53, 2]];
_root.pathArray[9] = [[400, 330, 2]];
_root.buildingArray[0] = [_root.StatueA, _root.StatueA, _root.StatueA, _root.StatueA, _root.StatueA, _root.StatueA];
_root.buildingArray[1] = [_root.RiverA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA];
_root.buildingArray[2] = [_root.StatueA, _root.StatueA, _root.StatueA, _root.StatueA, _root.StatueA, _root.FloorC, _root.FloorC, _root.FloorC];
_root.buildingArray[3] = [_root.RiverB, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA];
_root.buildingArray[4] = [_root.WiseMan, _root.WaterFallA, _root.RiverC, _root.Carpet, _root.JellyPudding, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA];
_root.buildingArray[5] = [_root.RiverD, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA, _root.GrassA];
_root.buildingArray[6] = [_root.HugeTopping, _root.Portal, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.TreeA, _root.ShadowA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA, _root.LTreeA];
_root.buildingArray[7] = [_root.BossBase];
_root.buildingArray[8] = [_root.Space1, _root.FloorMatA, _root.FloorMatA, _root.FloorMatA, _root.FloorMatA, _root.FloorMatA];
_root.buildingArray[9] = [_root.StatueA, _root.StatueA, _root.StatueA, _root.StatueA, _root.StatueA, _root.FloorC, _root.FloorC, _root.FloorC, _root.FloorC];
_root.areaArray[0] = [[270, 40], [100, 115], [340, 150], [455, 120], [455, 160], [170, 225]];
_root.areaArray[1] = [[265, 150, 1], [104, 313], [197, 189], [51, 111], [420, 257], [200, 270], [100, 102], [490, 211], [50, 10], [30, 30], [10, 50], [90, 1], [130, 11], [170, 3], [210, 13], [270, 2], [350, 4], [-10, 5]];
_root.areaArray[2] = [[69, 38], [462, 62], [267, 169], [400, 221], [66, 278], [337, 76, 2], [54, 192, 3], [316, 325, 4]];
_root.areaArray[3] = [[265, 150, 1], [392, 72], [125, 121], [256, 153], [421, 230], [62, 312], [22, 112], [500, 238], [262, 42], [134, 334], [500, 10]];
_root.areaArray[4] = [[483, 195, undefined, 2], [400, 100], [265, 150, 1], [93, 130, 10], [93, 130, undefined, 1], [30, 60], [120, 60], [210, 60], [300, 60], [390, 60], [10, 25], [100, 25], [190, 25], [280, 25], [370, 25], [510, 25], [135, 345], [487, 313], [67, 189], [376, 256], [176, 136]];
_root.areaArray[5] = [[265, 150, 1], [350, 239], [430, 123], [475, 239], [520, 50], [35, 195], [105, 58], [176, 315], [13, 96], [24, 11], [227, 304]];
_root.areaArray[6] = [[60, 180, undefined, undefined, 1], [10, 160], [267, 145], [174, 356], [252, 278], [486, 339], [348, 70], [163, 203], [10, 160, 3], [273, 3], [363, 10], [453, 27], [473, 5], [533, 30]];
_root.areaArray[7] = [[140, 105, 1]];
_root.areaArray[8] = [[265, 150, 1], [500, 70, 10], [416, 112, 11], [332, 154, 12], [248, 196, 13], [164, 238, 14]];
_root.areaArray[9] = [[75, 100], [150, 200], [225, 300], [375, 200], [450, 100], [200, 50, 1], [100, 25, 2], [300, 25, 3], [400, 50, 4]];
_root.monsterAreaArray = new Array();
_root.monsterAreaArray[0] = [1, 2, 3];
_root.monsterAreaArray[1] = [1];
_root.monsterAreaArray[2] = [3, 4, 5, 6];
_root.monsterAreaArray[3] = [1, 2];
_root.monsterAreaArray[4] = [1, 2, 4, 8];
_root.monsterAreaArray[5] = [1, 2, 3, 8];
_root.monsterAreaArray[6] = [1, 2, 3, 8];
_root.monsterAreaArray[7] = [4, 5, 6];
_root.monsterAreaArray[8] = [1, 2, 3, 4, 5, 6, 8, 9];
_root.monsterAreaArray[9] = [1, 2, 3, 4, 5, 6, 8, 1, 2, 3, 4, 5, 6, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9];
_root.sp2Caption = "MIRAGE SLASHER";
_root.sp1Caption = "STEEL STRIKE";
_root.sp2Usage = "\tSP Consume : 200 Attack : 20 Times Attack Usage : Hold X, Press LEFT, RIGHT, UP, DOWN, LEFT, RIGHT, Release X.";
_root.mg1Usage = "\tMP Consume : 20 Attack : SPELL x 1 Usage : Hold C, Press LEFT, DOWN, UP, RIGHT, Release C.";
_root.mg2Usage = "\tMP Consume : 50 Attack : SPELL x 2 Usage : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, Release C.";
_root.mg3Usage = "\tMP Consume : 200 Attack : SPELL x 4 Usage : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, LEFT, RIGHT, Release C.";
_root.mg21Usage = "\tMP Consume : 20 Attack : SPELL x 2 Usage : Hold C, Press UP, UP, DOWN, UP, Release C.";
_root.mg22Usage = "\tMP Consume : 80 Attack : SPELL x 2 x 3 Target Usage : Hold C, Press UP, UP, DOWN, UP, DOWN, UP, Release C.";
_root.mg23Usage = "\tMP Consume : 200 Attack : SPELL Usage : Hold C, Press UP, UP, DOWN, UP, DOWN, UP, UP, UP, Release C\tPress C again for maximum Thunder release.";
_root.mg41Usage = "\tMP Consume : 50 Heal HP : SPIRIT x 5 Usage : Hold C, Press UP, DOWN, LEFT, RIGHT, Release C.";
_root.sp2requireFrc = 30;
_root.sp2requireSp = 200;
_root.sp99Caption = "Cheat: HackBeta (EXP + ?????, HP FULL, MP FULL, SP FULL)";
_root.sp98Caption = "Cheat: HackSword (Sword (ATP + 40) x 2)";
_root.sp97Caption = "Cheat: HackArmor (Armor (DFP ?????))";
_root.sp96Caption = "Cheat: Suicide";
_root.sp95Caption = "Cheat: Change Display Picture";
_root.sp94Caption = "Cheat: Money (Money + 1000)";
_root.sp2RepeatMax = 5;
_root.spLastIndex = "";
_root.playerSp1Index = "11133";
_root.playerSp2Index = "421342";
_root.playerSp99Index = "41213131";
_root.playerSp98Index = "31323334";
_root.playerSp97Index = "21222324";
_root.playerSp96Index = "42424242";
_root.playerSp95Index = "34321133";
_root.playerSp94Index = "3342421313";
_root.playerSpIndex = "";
_root.sellRatio = 0.75;
_global.CancelTrading = function () {
_root.playerTrading2Calc = false;
_root.playerTrading3Calc = false;
_root.ShopBar.Casher._visible = false;
};
_global.CheckBuy = function () {
num1 = int(_root.ShopBar.Casher.AmountText.text);
num2 = int(_root.ShopBar.Casher.BalanceText.text);
_root.itemsArray[_root.tradingTarget] = _root.itemsArray[_root.tradingTarget] + num1;
_root.itemsArray[0] = num2;
_root.ShopBar.Casher._visible = false;
_root.Status.gotoAndStop(17);
_root.Status.gotoAndStop("Items");
};
_global.CheckSell = function () {
num1 = int(_root.ShopBar.Casher.AmountText.text);
num2 = int(_root.ShopBar.Casher.BalanceText.text);
_root.itemsArray[_root.tradingTarget] = _root.itemsArray[_root.tradingTarget] - num1;
_root.itemsArray[0] = num2;
_root.ShopBar.Casher._visible = false;
_root.Status.gotoAndStop(17);
_root.Status.gotoAndStop("Items");
};
_global.SellReady = function () {
_root.shopSellReady = true;
if (_root.statusLoc != "Items") {
_root.statusLoc = "Items";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
_root.sellingItem = true;
_root.ShopBar.SellMsg.text = "Please choose an item to be sold";
};
_global.BuyReady = function () {
_root.shopSellReady = false;
_root.playerTrading3Calc = false;
_root.ShopBar.SellMsg.text = "";
_root.sellingItem = false;
};
_global.ReferCost = function (item) {
num = _root.itemsCostArray[item.index];
if (_root.sellingItem) {
num = Math.ceil(num * _root.sellRatio);
}
if (num) {
_root.ShopBar.Message.text = "Cost : " + num;
} else {
_root.ShopBar.Message.text = "Welcome. S to exit.";
}
};
_global.BuyItem = function (item) {
if (_root.sellingItem) {
_global.SellItem(item.index);
} else {
_root.ShopBar.Casher._visible = true;
_root.ShopBar.Casher.ActionText.text = "BUY ITEM : " + _root.itemsArrayName[item.index];
_root.tradingTarget = item.index;
_root.ShopBar.Casher.Message.text = "Please input amount";
_root.ShopBar.Casher.AmountText.text = "1";
_root.playerTrading2Calc = true;
_root.playerTrading3Calc = false;
_root.ShopBar.Casher.CashText.text = _root.itemsArray[0];
_root.ShopBar.Casher.CostText.text = _root.itemsCostArray[item.index];
Selection.setFocus(_root._root.ShopBar.Casher.AmountText);
}
};
_global.SellItem = function (item) {
quan = _root.itemsArray[item];
_root.ShopBar.Casher._visible = true;
_root.ShopBar.Casher.ActionText.text = "SELL ITEM : " + _root.itemsArrayName[item];
_root.tradingTarget = item;
_root.ShopBar.Casher.Message.text = "Please input amount";
_root.ShopBar.Casher.AmountText.text = "0";
_root.playerTrading3Calc = true;
_root.playerTrading2Calc = false;
_root.ShopBar.Casher.CashText.text = _root.itemsArray[0];
_root.ShopBar.Casher.CostText.text = Math.ceil(_root.itemsCostArray[item] * _root.sellRatio);
Selection.setFocus(_root._root.ShopBar.Casher.AmountText);
};
_global.ShopTrading = function (index) {
if (!(index === 1)) {
} else {
All2MessageShow("Welcome to Jelly-Pudding Trading Store !!! Press S to Trade, D to Create Item. ");
_root.playerTrading1 = true;
_root.playerTrading2 = true;
}
};
_global.CreateBarShow = function (bool) {
CreateBarShow(bool);
};
_global.CheckCreate = function () {
itemA = int(_root.CreateBar.Atext.text);
itemB = int(_root.CreateBar.Btext.text);
itemC = int(_root.CreateBar.Ctext.text);
itemD = int(_root.CreateBar.Dtext.text);
itemNum1 = int(_root.CreateBar.Item1text.text);
itemNum2 = int(_root.CreateBar.Item2text.text);
itemNum3 = int(_root.CreateBar.Item3text.text);
itemNum4 = int(_root.CreateBar.Item4text.text);
if ((((_root.itemsArray[3] >= itemA) and (_root.itemsArray[4] >= itemB)) and (_root.itemsArray[8] >= itemC)) and (_root.itemsArray[9] >= itemD)) {
_root.itemsArray[3] = _root.itemsArray[3] - itemA;
_root.itemsArray[4] = _root.itemsArray[4] - itemB;
_root.itemsArray[8] = _root.itemsArray[8] - itemC;
_root.itemsArray[9] = _root.itemsArray[9] - itemD;
CreateMoreItem(itemNum1, itemNum2, itemNum3, itemNum4);
_root.CreateBar.Item1text.text = "0";
_root.CreateBar.Item2text.text = "0";
_root.CreateBar.Item3text.text = "0";
_root.CreateBar.Item4text.text = "0";
_root.CreateBar.Btn_Apply.gotoAndStop(1);
} else {
SetCreateMessage("Not enough source");
_root.CreateBar.Item1text.text = "0";
_root.CreateBar.Item2text.text = "0";
_root.CreateBar.Item3text.text = "0";
_root.CreateBar.Item4text.text = "0";
}
};
_root.armorType = 0;
_root.weaponType = 1;
_root.playerArmor = _root.player.Armor1;
_root.player.Armor1.gotoAndStop("Type" + _root.armorType);
_root.player.Armor2.gotoAndStop("Type" + _root.armorType);
_root.dead = false;
_root.player.Sword3._visible = false;
_root.player.Sword4._visible = false;
_root.playerSize = 10;
_root.playerSlash = false;
_root.playerFacing = 3;
_global.WeaponSlash = function () {
if (_root.weaponType != 1) {
_root.playerWeapon.gotoAndPlay("Slash" + _root.weaponType);
} else {
_root.playerWeapon.gotoAndPlay("Slash");
}
};
_global.RefreshingStatus = function () {
RefreshStatus();
};
_root.KeyCreate = 68;
_root.KeyMg = 67;
_root.KeyAttack = 90;
_root.KeySp = 88;
_root.KeyShiftItem = 65;
_root.KeyTakeItem = 83;
_root.hotKeyArray = new Array(0, 49, 50, 51, 52, 53, 54);
_root.lastKeyDelay = 150;
_global.WeaponPosition = function () {
if (!_root.spCasting) {
if (_root.playerFacing == 1) {
_root.playerWeapon = _root.player.Sword2;
_root.player.Ef1._visible = false;
_root.player.Ef2._visible = true;
_root.player.Sword._visible = false;
_root.player.Sword2._visible = true;
_root.playerWeapon._x = _root.player.LHand._x;
_root.playerWeapon._y = _root.player.LHand._y;
} else if (_root.playerFacing == 2) {
_root.playerWeapon = _root.player.Sword2;
_root.player.Sword._visible = false;
_root.player.Sword2._visible = true;
_root.player.Ef1._visible = false;
_root.player.Ef2._visible = true;
_root.playerWeapon._x = _root.player.LHand._x;
_root.playerWeapon._y = _root.player.LHand._y;
} else if (_root.playerFacing == 4) {
_root.playerWeapon = _root.player.Sword;
_root.player.Sword2._visible = false;
_root.player.Sword._visible = true;
_root.player.Ef1._visible = true;
_root.player.Ef2._visible = false;
_root.playerWeapon._x = _root.player.RHand._x;
_root.playerWeapon._y = _root.player.RHand._y;
} else {
_root.playerWeapon = _root.player.Sword;
_root.player.Ef1._visible = true;
_root.player.Ef2._visible = false;
_root.player.Sword2._visible = false;
_root.player.Sword._visible = true;
_root.playerWeapon._x = _root.player.RHand._x;
_root.playerWeapon._y = _root.player.RHand._y;
}
} else {
_root.player.Sword._visible = false;
_root.player.Sword2._visible = false;
}
_root.player.Ef1._x = _root.playerWeapon._x;
_root.player.Ef1._y = _root.playerWeapon._y;
_root.player.Ef2._x = _root.playerWeapon._x;
_root.player.Ef2._y = _root.playerWeapon._y;
};
_root.mg1lv = 0;
_root.mg2lv = 0;
_root.mg4lv = 0;
_root.MgLastIndex = "";
_root.mg1Caption = "SPARK";
_root.mg2Caption = "INCENDIARY";
_root.mg3Caption = "PHOENIX";
_root.mg21Caption = "CHARGE";
_root.mg22Caption = "LIGHTNING ZAP";
_root.mg23Caption = "THUNDER STORM";
_root.mg24Caption = "STORM ZAP";
_root.mg41Caption = "HEAL";
_root.playerMg1Index = "4312";
_root.playerMg2Index = "431213";
_root.playerMg3Index = "43121342";
_root.playerMg21Index = "1131";
_root.playerMg22Index = "113131";
_root.playerMg23Index = "11313111";
_root.playerMg41Index = "1342";
_global.CheckMagic = function (index, lv, maxUnitHit) {
num = 0;
if (index != 0) {
do {
if ((in _root.monsters) == null) {
break;
}
i = in _root.monsters;
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.faceIndex) {
case "LT" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RT" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RB" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case "LB" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((((_root.playerHitRangeX > _root.player["minmg" + lv]) and (_root.playerHitRangeX < _root.player["mg" + lv])) and (_root.playerHitRangeY > _root.player["minmg" + lv])) and (_root.playerHitRangeY < _root.player["mg" + lv])) {
MgChecking(index, _root.monsters[i], lv);
unitHit++;
num++;
}
} while (unitHit != maxUnitHit);
do {
} while ("CheckMagic" != null);
if (num == 0) {
_root.gamePause = false;
RestoreMove();
_global.UnpauseEnemy();
}
_root.playerMgInd = 0;
unitHit = 0;
}
};
_global.HealSpell = function (lv) {
if (!(lv === 1)) {
} else {
dmgDealt = _root.player.spr * 5;
_root.player.hp = _root.player.hp + dmgDealt;
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
_root.playerFacing = _root.faceIndexNum;
RefreshStatus();
}
};
_root.detecting = false;
_root.playerRegenDelay = 5000;
_global.SetUnitStatus = function (unit, index, interval) {
clearInterval(unit.SetFireDelay);
switch (index) {
case 1 :
_global.RemoveUnitStatus(_root.player, 3);
_global.RemoveUnitStatus(_root.player, 2);
_global.RemoveUnitStatus(_root.player, 1);
unit.Ef1.gotoAndPlay("Hack");
unit.Ef2.gotoAndPlay("Hack");
unit.buff[1] = 1;
unit.SetFireDelay = setInterval(_global.RemoveUnitStatus, interval, unit, index);
break;
case 2 :
unit.Ef3.gotoAndPlay("Frost");
unit.Ef4.gotoAndPlay("Frost");
unit.buff[2] = 1;
unit.SetFrostDelay = setInterval(_global.RemoveUnitStatus, interval, unit, index);
break;
case 3 :
_global.RemoveUnitStatus(_root.player, 3);
_global.RemoveUnitStatus(_root.player, 2);
_global.RemoveUnitStatus(_root.player, 1);
unit.Ef1.gotoAndPlay("Lightning");
unit.Ef2.gotoAndPlay("Lightning");
unit.buff[3] = 1;
unit.SetLightningDelay = setInterval(_global.RemoveUnitStatus, interval, unit, index);
}
RefreshStatus();
};
_global.RemoveUnitStatus = function (unit, index) {
switch (index) {
case 1 :
unit.Ef1.gotoAndStop(1);
unit.Ef2.gotoAndStop(1);
unit.buff[1] = 0;
if (unit == _root.player) {
_root.Status.BuffMsg.text = "";
}
clearInterval(unit.SetFireDelay);
break;
case 2 :
unit.Ef3.gotoAndStop(1);
unit.Ef4.gotoAndStop(1);
unit.buff[2] = 0;
if (unit == _root.player) {
_root.Status.BuffMsg.text = "";
}
clearInterval(unit.SetFrostDelay);
break;
case 3 :
unit.Ef1.gotoAndStop(1);
unit.Ef2.gotoAndStop(1);
unit.buff[3] = 0;
if (unit == _root.player) {
_root.Status.BuffMsg.text = "";
}
clearInterval(unit.SetLightningDelay);
}
RefreshStatus();
};
_root.boss1Intro = 0;
_root.wisemanDialog = 0;
_root.Message_Title.MessageBack._visible = false;
_root.Message_Refer.minY = _root.Message_Refer._y;
_root.Message_Refer.maxY = 410;
_root.Message_Refer.speed = 5;
_root.Message_Refer._y = _root.Message_Refer.maxY;
_root.Message_Refer.swapDepths(550000);
_root.player.DamageMessage.y = 0;
_root.player.Message.y = 0;
_root.messageStartX = -75;
_root.messageStartY = -38;
_root.messageCheckDelay = 50;
_root.messageSpeed = 3;
_root.defaultMessageY = -20;
_root.defaultExpMessageY = -30;
_root.arenaMessage = new Array();
_root.arenaMessage[0] = ("Hello. " + _global.playerName) + ". Welcome To Sky Guardian : Mountain Of Desserts.";
_root.arenaMessage[1] = "In this game, your main mission is to find the Mountain Wiseman, and he'll show you the way to escape Mountain Of Desserts.";
_root.arenaMessage[2] = "You MUST arm yourself with a sword with CAPS LOCK toggled if you wish to attack. ";
_root.arenaMessage[3] = "Try to Attack with Key Z, Special Move with Key X, Magical Attack with Key C, and Create Item with Key D.";
_root.arenaMessage[4] = "You can switch to inventory while pressing Key A. Pressing Key S allows you to pick up items upon enemy's death. ";
_root.arenaMessage[5] = "For more help about the game, go to the Tutorial at the main menu. ";
_global.ShowMessage = function (caption) {
All2MessageShow(caption);
};
_global.TotalDamage = function (enemy) {
totalDmg = -enemy.hpTemp;
_root.totalDmg = totalDmg;
_root.sp2Target = undefined;
SpChecking(9, enemy);
};
_root.SaveGame_Bar.DataSlot1.index = 1;
_root.SaveGame_Bar.DataSlot2.index = 2;
_root.SaveGame_Bar.DataSlot3.index = 3;
_root.SaveGame_Bar.DataSlot4.index = 4;
_root.SaveGame_Bar.DataSlot5.index = 5;
_global.SaveGameData = function (slotName, slot) {
_global.ShowMessage("Game Saving...");
_root.gameData[0] = _root.player.lv;
_root.gameData[1] = _root.player.expmax;
_root.gameData[2] = _root.player.ex;
_root.gameData[3] = _root.player.frc;
_root.gameData[4] = _root.player.fcs;
_root.gameData[5] = _root.player.vit;
_root.gameData[6] = _root.player.spr;
_root.gameData[7] = _root.player.kno;
_root.gameData[8] = _root.player.sp;
_root.gameData[9] = _root.player.ext;
_root.gameData[10] = _root.player.hp;
_root.gameData[11] = _root.player.mp;
_root.gameData[12] = _root.lastAreaIndex;
_root.gameData[20] = _root.player._x;
_root.gameData[21] = _root.player._y;
_root.gameData[30] = _root.armorType;
_root.gameData[31] = _root.weaponType;
_root.gameData[32] = _root.spLevel;
_root.gameData[33] = _root.mg1lv;
_root.gameData[34] = _root.mg2lv;
_root.gameData[35] = _root.player.exTemp;
_root.gameData[36] = _root.player.exTemp2;
_root.gameData[37] = _root.currentIndex;
_root.gameData[38] = _root.playerFacing;
_root.gameData[40] = _root.animSetting;
_root.gameData[41] = _root.referSetting;
_root.gameData[42] = _root.exScr;
_root.gameData[43] = _root.levelScr;
_root.gameData[44] = _root.damageScr;
_root.gameData[45] = _root.bossScr;
_root.gameData[46] = _root.rankScr;
_root.gameData[47] = _root.cheater;
_root.gameData[48] = _root.aek;
_root.gameData[49] = _root.expBoost;
_root.gameData[50] = _root.boss1Clear;
_root.gameData[51] = _root.waitWisemanDialog;
_root.gameData[52] = _global.playerName;
_root.gameData[53] = _root.boss1Intro;
_root.gameData[54] = _root.powerUpMode;
_root.gameData[55] = _root.key1Pick;
_root.gameData[56] = _root.wisemanDialog;
_root.gameData[61] = _root.Status.HotKey1.index;
_root.gameData[62] = _root.Status.HotKey2.index;
_root.gameData[63] = _root.Status.HotKey3.index;
_root.gameData[64] = _root.Status.HotKey4.index;
_root.gameData[65] = _root.Status.HotKey5.index;
_root.gameData[66] = _root.Status.HotKey6.index;
_root.gameData[67] = _root.mg4lv;
_root.gameData[68] = _root.sprSwordPick;
_root.gameData[69] = _root.sprSwordTaken;
_root.gameData[70] = _root.selfCreateEnable;
_root.gameData[71] = _root.accessType;
_root.gameData[80] = _root.itemsArray[0];
_root.gameData[81] = _root.itemsArray[1];
_root.gameData[82] = _root.itemsArray[2];
_root.gameData[83] = _root.itemsArray[3];
_root.gameData[84] = _root.itemsArray[4];
_root.gameData[85] = _root.itemsArray[5];
_root.gameData[86] = _root.itemsArray[6];
_root.gameData[87] = _root.itemsArray[7];
_root.gameData[88] = _root.itemsArray[8];
_root.gameData[89] = _root.itemsArray[9];
_root.gameData[90] = _root.itemsArray[10];
_root.gameData[91] = _root.itemsArray[11];
_root.gameData[92] = _root.itemsArray[12];
_root.gameData[93] = _root.itemsArray[13];
_root.gameData[94] = _root.itemsArray[14];
_root.gameData[95] = _root.itemsArray[15];
_root.gameData[96] = _root.itemsArray[16];
_root.gameData[97] = _root.itemsArray[17];
for (i in _root.gameData) {
_root.setCookie("SGdata" + slot, "file" + i, _root.gameData[i]);
}
_root.setCookieEnable("SGdata" + slot, "slot", slotName);
i = 1;
while (i < 6) {
_root.SaveGame_Bar["DataSlot" + i].gotoAndStop(1);
i++;
}
_root.gamePause = false;
_global.UnpauseEnemy();
_global.ShowMessage("Game Saved.");
_root.SaveGame_Bar._visible = false;
};
_root.quality = 3;
_root.alphaSpeed = 8 + ((1 - _root.animSetting) * 100);
_root.alphaStatus = true;
_root.statusShow = true;
_root.statusMoveSpeed = 5;
_root.statusDefY = _root.Status._y;
_root.statusMinY = _root.Status._y - (_root.Status._height / 2);
_root.statusCloseY = 439;
_root.screenXMax = 510.2;
_root.screenXMin = 40.4;
_root.screenYMax = 360.2;
_root.screenYMin = 40.3;
_root.bossScr = 0;
_root.gamePause = false;
_root.veloXbase = 2;
_root.veloYbase = 1;
_root.speedXFactor = 1;
_root.speedYFactor = _root.speedXFactor;
_root.veloSpeedX = _root.veloXbase * _root.speedXFactor;
_root.veloSpeedY = _root.veloYbase * _root.speedYFactor;
_global.EarthQuake = function (index) {
_root.earthQuakeNum = index;
_root.earthQuaking = true;
_root.quakeUp = true;
};
_global.ToggleRefer = function () {
if (_root.referSetting) {
_root.referSettingText = "ON";
} else {
_root.referSettingText = "OFF";
}
_root.Message_Refer._visible = _root.referSetting;
_root.Status.Btn_Refer.ReferText.text = _root.referSettingText;
};
_global.ToggleQuality = function () {
switch (_root.quality) {
case 1 :
_quality = "LOW";
break;
case 2 :
_quality = "MEDIUM";
break;
case 3 :
_quality = "HIGH";
break;
case 4 :
_quality = "BEST";
}
_root.Status.Btn_Quality.QualityText.text = _quality;
};
_global.UnpauseEnemy = function () {
dieNum = 0;
for (i in _root.monsters) {
dieIndex = EnemyStatusCheck(_root.monsters[i], _root.monsters[i].hp);
dieNum = dieNum + dieIndex[0];
}
if (dieNum == 0) {
_root.dying = false;
_root.gamePause = false;
}
};
_root.mg6MonsterArray = new Array();
_root.enemyQuan = 0;
_root.monsters = new Array();
_root.enemyIndexMax = 0;
_global.AttackPlayer = function (enemy) {
targetingUnit = EnemyAttackChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = enemy.atp - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
AddSp(enemy);
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
};
_global.MissleAttackPlayer = function (enemy, num) {
if (num) {
if (!(num === 1)) {
} else {
enemy.missleArray = new Array();
enemy.moreMissling = true;
}
enemy.missleArray.push(enemy.Boomerang["Missle" + num]);
} else {
enemy.missleAttacking = true;
}
};
_global.RestoreMove = function () {
RestoreMove();
};
_global.RemoveUnit = function (unit) {
CheckDyingInShop(unit);
if (unit.boss1) {
_root.boss1Clear = true;
}
if (unit.boss2) {
_root.gamePause = true;
_root.boss2Defeated = true;
GameOver();
}
if (_root.areaEnemyRegen != 0) {
switch (_root.areaEnemyRegen) {
case 1 :
CreateEnemy(-1, -1);
break;
case 2 :
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 3 :
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 4 :
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
break;
case 5 :
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
case 10 :
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
CreateEnemy(-1, -1);
}
}
DropItems(unit);
delete _root.monsters[unit.index];
unit.removeMovieClip();
_global.UnpauseEnemy();
RefreshEnemyIndex();
RestoreMove();
if (_root.enemyQuan == 100) {
if (_root.player.lv <= 3) {
CreateEnemy(-1, -1);
} else {
GameOver();
}
}
};
_global.Suicide = function (unit) {
unit.hp = 0;
unit.dying = true;
_root.gamePause = true;
_global.RemoveUnit(unit);
};
_global.AttackPlayerMg = function (enemy, mgType, lv) {
switch (mgType) {
case 1 :
targetingUnit = EnemyAttackChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = (enemy.ats * 5) - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 2 :
targetingUnit = EnemyAttackChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = (enemy.atp * 3) - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 3 :
targetingUnit = EnemyMgRangeChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = enemy.ats - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 4 :
dmgDealt = enemy.ats * 2;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp + dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
EnemyMessageShow(enemy, "+" + dmgDealt);
enemy.mgCasting = false;
return;
case 6 :
PlayerDieCheck();
enemy.mgCasting = false;
return;
case 7 :
trangeX = (enemy._x + enemy.PMissle._x) - _root.player._x;
trangeY = (enemy._y + enemy.PMissle._y) - _root.player._y;
mrangeX = Math.sqrt(trangeX * trangeX);
mrangeY = Math.sqrt(trangeY * trangeY);
if ((((mrangeX >= 0) and (mrangeX <= enemy.mgHitRange)) and (mrangeY >= 0)) and (mrangeY <= enemy.mgHitRange)) {
dmgDealt = enemy.ats - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 8 :
dmgDealt = enemy.ats;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.Ef5.gotoAndPlay("Anger");
enemy.buff[3] = true;
enemy.atp = enemy.atp + dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
EnemyMessageShow(enemy, "ATP +" + dmgDealt);
enemy.mgCasting = false;
return;
case 9 :
CreateEnemy(-1, -1, _root.targeted._x + 1.3, _root.targeted._y - 1.3, 4);
CreateEnemy(-1, -1, _root.targeted._x - 1.3, _root.targeted._y, 4);
CreateEnemy(-1, -1, _root.targeted._x, _root.targeted._y + 1.3, 4);
enemy.mgCasting = false;
return;
case 10 :
targetingUnit = EnemyMgRangeChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = (enemy.ats * 2) - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player._x = 500;
_root.player._y = 370;
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
}
};
_root.SaveGame_Bar.Btn_Apply.onRelease = function () {
i = 1;
while (i < 6) {
_root.SaveGame_Bar["DataSlot" + i].gotoAndStop(1);
i++;
}
_root.gamePause = false;
_global.UnpauseEnemy();
_root.SaveGame_Bar._visible = false;
};
_root.Btn_CloseMessage.onRelease = function () {
clearInterval(_root.allMessages);
this._visible = false;
_root.Message_Title._visible = false;
};
_root.Status.Btn_pAttributes.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Attributes") {
_root.statusLoc = "Attributes";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_pAttributes.onRollOver = function () {
_root.Status.Btn_pAttributes.gotoAndPlay(2);
};
_root.Status.Btn_pAttributes.onRollOut = function () {
_root.Status.Btn_pAttributes.gotoAndPlay(1);
};
_root.Status.Btn_Spell.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Spell") {
_root.statusLoc = "Spell";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Spell.onRollOver = function () {
_root.Status.Btn_Spell.gotoAndPlay(2);
};
_root.Status.Btn_Spell.onRollOut = function () {
_root.Status.Btn_Spell.gotoAndPlay(1);
};
_root.Status.Btn_Special.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Special") {
_root.statusLoc = "Special";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Special.onRollOver = function () {
_root.Status.Btn_Special.gotoAndPlay(2);
};
_root.Status.Btn_Special.onRollOut = function () {
_root.Status.Btn_Special.gotoAndPlay(1);
};
_root.Status.Btn_Items.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Items") {
_root.statusLoc = "Items";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Items.onRollOver = function () {
_root.Status.Btn_Items.gotoAndPlay(2);
};
_root.Status.Btn_Items.onRollOut = function () {
_root.Status.Btn_Items.gotoAndPlay(1);
};
_root.Status.Btn_Options.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Options") {
_root.statusLoc = "Options";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Options.onRollOver = function () {
_root.Status.Btn_Options.gotoAndPlay(2);
};
_root.Status.Btn_Options.onRollOut = function () {
_root.Status.Btn_Options.gotoAndPlay(1);
};
_root.Status.Btn_Profile.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Profile") {
_root.statusLoc = "Profile";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Profile.onRollOver = function () {
_root.Status.Btn_Profile.gotoAndPlay(2);
};
_root.Status.Btn_Profile.onRollOut = function () {
_root.Status.Btn_Profile.gotoAndPlay(1);
};
_root.Status.Btn_CloseStatus.onRelease = function () {
MoveStatus(_root.statusShow);
};
_root.adjX = 10;
_root.adjY = 50;
_root.accessArrayRefer = new Array();
_root.statArrayRefer = new Array();
_root.calcArrayRefer = new Array();
_root.weaponArrayRefer = new Array();
_root.referBuffArray = new Array();
_root.referBuffArray[1] = "PHOENIX FLAME";
_root.referBuffArray[2] = "FROZEN";
_root.referBuffArray[3] = "LIGHTNING";
_root.weaponArrayRefer[0] = "Nothing. You haven't equip anything. ";
_root.weaponArrayRefer[1] = "Trainee Sword : A sword for beginner. Suitable to any user. ";
_root.weaponArrayRefer[2] = "Hack Sword : The sword that comes with a Cheat. Please don't make this a habit... ";
_root.weaponArrayRefer[3] = "Spirit Sword : The sword that had trapped the mountain spirits for centuries. ATTACK + 10, Regen Speed 4 Seconds. ";
_root.weaponArrayRefer[4] = "Zyngon Sword : Power up STEEL STRIKE's damage from 5 to 7 times. ATTACK + 15. 40 FORCE is required.";
_root.weaponArrayRefer[5] = "Shadow Blow : Critical Hit Ratio increase. Critical Damage Multiple raise from 3 to 5. 40 FOCUS is required.";
_root.weaponArrayRefer[6] = "Shining Blade : Converts half of VITALITY into ATTACK. 40 VITALITY is required.";
_root.hotKeyRefer = new Array();
_root.hotKeyRefer[1] = "Set Hotkey : Click on one of the items to be set. Press A to cancel.";
_root.hotKeyRefer[2] = "Unable to Set Hotkey : Current selection is unusable item. ";
_root.accessArrayRefer[0] = "Nothing. You haven't equip anything. ";
_root.accessArrayRefer[1] = "Bracelet : Maximum MP + 100, Maximum HP + 100. 30 KNOWLEDGE is required.";
_root.itemsArrayRefer = new Array();
_root.itemsArrayRefer[1] = _root.itemsArrayName[1] + " : Restore HP by 200. Gone after use.";
_root.itemsArrayRefer[2] = _root.itemsArrayName[2] + " : Restore MP by 200. Gone after use.";
_root.itemsArrayRefer[3] = _root.itemsArrayName[3] + " : Source. Glucose in low sugar. Can be sold or use to create Item.";
_root.itemsArrayRefer[4] = _root.itemsArrayName[4] + " : Source. Glucose in green colour. Can be sold or use to create Item.";
_root.itemsArrayRefer[6] = _root.itemsArrayName[6] + " : Restore HP by 800. Gone after use.";
_root.itemsArrayRefer[7] = _root.itemsArrayName[7] + " : Restore MP by 800. Gone after use.";
_root.itemsArrayRefer[8] = _root.itemsArrayName[8] + " : Source. 99.9% pure Glucose. Can be sold or use to create Item.";
_root.itemsArrayRefer[9] = _root.itemsArrayName[9] + " : Source. Rare Magical Glucose. Can be sold or use to create Item.";
_root.itemsArrayRefer[10] = _root.weaponArrayRefer[3];
_root.itemsArrayRefer[14] = _root.weaponArrayRefer[1];
_root.itemsArrayRefer[15] = _root.weaponArrayRefer[4];
_root.itemsArrayRefer[16] = _root.accessArrayRefer[1];
_root.itemsArrayRefer[17] = _root.weaponArrayRefer[6];
_root.itemsArrayRefer[18] = _root.armorArrayRefer[99];
_root.itemsArrayRefer[19] = _root.weaponArrayRefer[6];
_root.itemsArrayRefer[5] = _root.weaponArrayRefer[5];
_root.armorArrayRefer = new Array();
_root.armorArrayRefer[0] = "Nothing. You haven't equip anything. ";
_root.armorArrayRefer[1] = "Steel Helmet : A strong helmet made of steel, DEFEND + 5, 40 VITALITY is required.";
_root.armorArrayRefer[2] = "Wig : DEFEND + 2, 15 VITALITY is required.";
_root.armorArrayRefer[99] = "SHI... : No way! I'm not going to complete this name -_-||...";
_root.spArrayRefer = new Array();
_root.mgArrayRefer = new Array();
_root.spArrayRefer[0] = "STEEL STRIKE : Strike all foes in range. Damage x 5, SP Consume 100";
_root.spArrayRefer[1] = "MIRAGE SLASHER : Create 4 mirages and do damage to 1 enemy. Damage x 20, SP Consume 200";
_root.mgArrayRefer[1] = [[""], ["SPARK : Create Fire and do damage to enemies around user. SPELL x 1, MP Consume 20"], ["INCENDIARY : Create Explosion and do damage to enemies around user. SPELL x 1.5, MP Consume 50"], ["PHOENIX : After Phoenix attacked, special attack burst to 150%. SPELL x 4, MP Consume 200"]];
_root.mgArrayRefer[2] = [[""], ["CHARGE : User's sword charged with lightning does damage to 1 enemy. SPELL x 2, MP Consume 20"], ["LIGHTNING ZAP : 3 lightning strikes to enemies in range. SPELL x 2 x 3, MP Consume 80"], ["THUNDER STORM : Deal lightning spell damage on basic attacks for 10 seconds. MP Consume 200"]];
_root.mgArrayRefer[4] = [[""], ["HEAL : A unique spell taught by the Wiseman. Can recover HP. HP + (SPIRIT x 5), MP Consume 50"]];
_root.spIndexArrayRefer = new Array();
_root.mgIndexArrayRefer = new Array();
_root.spIndexArrayRefer[0] = "Method : Hold X, Press UP, UP, UP, DOWN, DOWN, Release X";
_root.spIndexArrayRefer[1] = "Method : Hold X, Press LEFT, RIGHT, UP, DOWN, LEFT, RIGHT, Release X";
_root.mgIndexArrayRefer[1] = [[""], ["Method : Hold C, Press LEFT, DOWN, UP, RIGHT, Release C"], ["Method : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, Release C"], ["Method : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, LEFT, RIGHT, Release C"]];
_root.mgIndexArrayRefer[2] = [[""], ["Method : Hold C, Press UP, UP, DOWN, UP, Release C"], ["Method : Hold C, Press UP, UP, DOWN, UP, DOWN, UP, Release C"], ["Method : Hold C, Press UP, UP, DOWN, UP, DOWN, UP, UP, UP, Release C, Press C again to release Storm"]];
_root.mgIndexArrayRefer[4] = [[""], ["Method : Hold C, Press UP, DOWN, LEFT, RIGHT Release C"]];
_root.itemsArrayRefer[11] = _root.armorArrayRefer[2];
_root.itemsArrayRefer[12] = _root.armorArrayRefer[1];
_root.itemsArrayRefer[13] = "WISEMAN ROD : A weird rod lost by the oldman that stays near the Waterfall. ";
_root.statArrayRefer[1] = "ATTACK : Your normal damage dealt to enemy. Number after \"+\" indicates your equipment bonus.";
_root.statArrayRefer[2] = "DEFEND : Your resistance to enemy's attack. Number after \"+\" indicates your equipment bonus.";
_root.statArrayRefer[3] = "HIT RATIO : Dexterity or chance to hit enemy. Higher HIT RATIO gives less chance to do miss attack.";
_root.statArrayRefer[4] = "AVOIDANCE : Chance to avoid an attack. Higher AVOIDANCE gives more chance to avoid an attack.";
_root.statArrayRefer[5] = "SPELL : Magical attack damage or Heal spell factor. Higher SPELL causes heavier magical attack damage.";
_root.statArrayRefer[6] = "HP REGEN : Your Hit Point regeneration rate. The higher HP REGEN the more HP recovers every 5 seconds.";
_root.statArrayRefer[7] = "MP REGEN : Your Mana Point regeneration rate. The higher MP REGEN the more MP recovers every 5 seconds.";
_root.statArrayRefer[8] = "SP GAIN : Your special attack point gain rate with each normal attack.";
_root.calcArrayRefer[1] = "ATTACK = (FORCE + LEVEL) x 2 + WEAPON EFFECT";
_root.calcArrayRefer[2] = "DEFEND = (VITALITY + LEVEL) x 0.4 + ARMOUR EFFECT";
_root.calcArrayRefer[3] = "HIT RATIO = (FOCUS + LEVEL) x 2";
_root.calcArrayRefer[4] = "AVOIDANCE = (FOCUS + LEVEL) x 2";
_root.calcArrayRefer[5] = "SPELL = (KNOWLEDGE + LEVEL) x 2 x EFFECT";
_root.calcArrayRefer[6] = "HP REGEN : (SPIRIT + VITALITY + LEVEL) x 0.5";
_root.calcArrayRefer[7] = "MP REGEN : (SPIRIT + KNOWLEDGE + LEVEL) x 0.25";
_root.calcArrayRefer[8] = "SP GAIN : (SPIRIT + FORCE + LEVEL) / 10";
_global.ReferStat = function (obj) {
ReferAttach(_root.statArrayRefer[obj.index]);
};
_global.ReferCalc = function (obj) {
ReferAttach(_root.calcArrayRefer[obj.index]);
};
RestoreMove();
_global.UnpauseEnemy();
if (_root.gameIsLoad) {
_root.armorType = _root.gameData[30];
_root.weaponType = _root.gameData[31];
_root.spLevel = _root.gameData[32];
_root.mg1lv = _root.gameData[33];
_root.mg2lv = _root.gameData[34];
_root.player.exTemp = _root.gameData[35];
_root.player.exTemp2 = _root.gameData[36];
_root.currentIndex = _root.gameData[37];
_root.playerFacing = _root.gameData[38];
_root.exScr = _root.gameData[42];
_root.levelScr = _root.gameData[43];
_root.damageScr = _root.gameData[44];
_root.bossScr = _root.gameData[45];
_root.rankScr = _root.gameData[46];
_root.cheater = _root.gameData[47];
_root.aek = _root.gameData[48];
_root.expBoost = _root.gameData[49];
_root.boss1Clear = _root.gameData[50];
_root.waitWisemanDialog = _root.gameData[51];
_global.playerName = _root.gameData[52];
_root.boss1Intro = _root.gameData[53];
_root.powerUpMode = _root.gameData[54];
_root.key1Pick = _root.gameData[55];
_root.wisemanDialog = _root.gameData[56];
_root.Status.HotKey1.index = _root.gameData[61];
_root.Status.HotKey2.index = _root.gameData[62];
_root.Status.HotKey3.index = _root.gameData[63];
_root.Status.HotKey4.index = _root.gameData[64];
_root.Status.HotKey5.index = _root.gameData[65];
_root.Status.HotKey6.index = _root.gameData[66];
_root.mg4lv = _root.gameData[67];
_root.sprSwordPick = _root.gameData[68];
_root.sprSwordTaken = _root.gameData[69];
_root.selfCreateEnable = _root.gameData[70];
_root.accessType = _root.gameData[71];
_root.itemsArray[0] = _root.gameData[80];
_root.itemsArray[1] = _root.gameData[81];
_root.itemsArray[2] = _root.gameData[82];
_root.itemsArray[3] = _root.gameData[83];
_root.itemsArray[4] = _root.gameData[84];
_root.itemsArray[5] = _root.gameData[85];
_root.itemsArray[6] = _root.gameData[86];
_root.itemsArray[7] = _root.gameData[87];
_root.itemsArray[8] = _root.gameData[88];
_root.itemsArray[9] = _root.gameData[89];
_root.itemsArray[10] = _root.gameData[90];
_root.itemsArray[11] = _root.gameData[91];
_root.itemsArray[12] = _root.gameData[92];
_root.itemsArray[13] = _root.gameData[93];
_root.itemsArray[14] = _root.gameData[94];
_root.itemsArray[15] = _root.gameData[95];
_root.itemsArray[16] = _root.gameData[96];
_root.itemsArray[17] = _root.gameData[97];
tellTarget (_root.player) {
buff = new Array();
playerArmorNum = new Array();
playerArmorNum = [0, 5, 2];
playerArmorNum[99] = 99999 /* 0x01869F */;
playerWeaponNum = new Array();
playerWeaponNum = [0, 0, 0, 10, 15, 0, -16];
playerAccessNum = new Array();
playerAccessNum = [0, 100];
lv = _root.gameData[0];
expmax = _root.gameData[1];
ex = _root.gameData[2];
frc = _root.gameData[3];
fcs = _root.gameData[4];
vit = _root.gameData[5];
spr = _root.gameData[6];
kno = _root.gameData[7];
spmax = ((frc + lv) * 5) + 100;
sp = _root.gameData[8];
ext = _root.gameData[9];
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
hp = _root.gameData[10];
mp = _root.gameData[11];
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = ((spr + frc) + lv) / 10;
ats = (kno + lv) * 2;
avo = fcs + lv;
hit = fcs + lv;
hpgen = ((spr + vit) + lv) / 2;
mpgen = ((spr + kno) + lv) / 4;
atkRange = 20;
minatkRange = -5;
minspRange = -5;
minPickRange = -5;
pickRange = 20;
spRange = 30;
minsp2Range = 0;
sp2Range = 20;
mg1 = 30;
minmg1 = -mg1;
mg2 = 30;
minmg2 = -mg2;
mg4 = 40;
minmg4 = -mg4;
mg21 = 30;
minmg21 = 0;
mg22 = 30;
minmg22 = -mg22;
mg23 = 0;
minmg23 = -mg23;
mg24 = 60;
minmg24 = -mg24;
mg1lv1requireKno = 10;
mg1lv1requireMp = 20;
mg1lv2requireKno = 20;
mg1lv2requireMp = 50;
mg1lv3requireKno = 40;
mg1lv3requireMp = 200;
mg2lv1requireKno = 15;
mg2lv1requireMp = 20;
mg2lv2requireKno = 23;
mg2lv2requireMp = 80;
mg2lv3requireKno = 45;
mg2lv3requireMp = 200;
mg4lv1requireMp = 50;
};
GotoPath(_root.gameData[12]);
_root.Status.PlayerName.text = _global.playerName;
_root.animSetting = _root.gameData[40];
_root.referSetting = _root.gameData[41];
_root.alphaSpeed = 8 + ((1 - _root.animSetting) * 100);
if (_root.referSetting == true) {
_root.referSettingText = "ON";
} else {
_root.referSettingText = "OFF";
}
_root.Message_Title.swapDepths(500000);
_root.Status.swapDepths(400000);
_root.CreateBar.swapDepths(510000);
_root.ShopBar.swapDepths(520000);
_root.SaveGame_Bar.swapDepths(530000);
_root.player.swapDepths(_root.playerDepth);
if (_root.weaponType == 3) {
_root.playerRegenerate = setInterval(Regenerate, 4000);
} else {
_root.playerRegenerate = setInterval(Regenerate, _root.playerRegenDelay);
}
_root.player._x = _root.gameData[20];
_root.player._y = _root.gameData[21];
switch (_root.playerFacing) {
case 1 :
_root.player.gotoAndStop("LTStand");
break;
case 2 :
_root.player.gotoAndStop("RTStand");
break;
case 3 :
_root.player.gotoAndStop("RBStand");
break;
case 4 :
_root.player.gotoAndStop("LBStand");
}
RefreshStatus();
_root.Message_Title.MessageBackA._visible = false;
_global.ShowMessage("Game Loaded.");
} else {
_root.gameData = new Array();
_root.itemsArray[0] = 0;
_root.itemsArray[1] = 5;
_root.itemsArray[2] = 3;
_root.initCall = setInterval(Initialize, 10);
}
_root.onEnterFrame = function () {
_root.playerLoc._x = _root.player.Body._x + _root.player._x;
_root.playerLoc._y = _root.player.Body._y + _root.player._y;
_root.playerDepth = (_root.player._y * 600) + _root.player._x;
DepthSwapping();
if (!_root.playerDying) {
if (_root.expBoost) {
ExpBoosting();
}
for (i in _root.monsters) {
_root.monsters[i].swapDepths((_root.monsters[i]._y * 600) + _root.monsters[i]._x);
}
ArmorPosition();
if (!_root.gamePause) {
HillAreaCheck(_root.player);
_root.veloSpeedX = _root.veloXbase * (_root.speedXFactor + (((1 - Key.isToggled(20)) * _root.speedXFactor) * 1));
_root.veloSpeedY = _root.veloYbase * (_root.speedYFactor + (((1 - Key.isToggled(20)) * _root.speedyFactor) * 1));
KeyPressing();
AIScript();
CheckPath();
if (_root.alphaStatus) {
DetectAlpha();
}
_root.playerWeapon._visible = _root.player.armed;
if (_root.playerWalk) {
switch (_root.playerFacing) {
case 1 :
_root.player.gotoAndPlay("LTWalk");
break;
case 2 :
_root.player.gotoAndPlay("RTWalk");
break;
case 3 :
_root.player.gotoAndPlay("RBWalk");
break;
case 4 :
_root.player.gotoAndPlay("LBWalk");
}
_root.playerWalk = false;
}
} else {
for (i in _root.monsters) {
if (!_root.monsters[i].dying) {
_root.monsters[i].stop();
if (_root.monsters[i].moreMissling) {
MoreMissleDetecting(_root.monsters[i]);
} else {
_root.monsters[i].Missle.stop();
}
}
}
if (_root.spCasting) {
if (_root.sp2Target) {
SpChecking(_root.playerAtkInd, _root.sp2Target);
_root.playerAtkInd = 0;
} else if (!_root.sp2Casting) {
if (_root.playerAtkInd != 0) {
num = 0;
for (i in _root.monsters) {
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.playerFacing) {
case 1 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 2 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 3 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case 4 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((((_root.playerHitRangeX > _root.player.minspRange) and (_root.playerHitRangeX < _root.player.spRange)) and (_root.playerHitRangeY > _root.player.minspRange)) and (_root.playerHitRangeY < _root.player.spRange)) {
num++;
SpChecking(_root.playerAtkInd, _root.monsters[i]);
}
}
if (num == 0) {
_root.gamePause = false;
RestoreMove();
_global.UnpauseEnemy();
}
}
_root.playerAtkInd = 0;
}
} else if (!_root.mgCasting) {
_root.player.stop();
_root.playerWeapon.stop();
}
}
if (_root.player.DamageMessage.move) {
if (_root.player.DamageMessage.y > -50) {
_root.player.DamageMessage.y = _root.player.DamageMessage.y - _root.messageSpeed;
_root.player.DamageMessage._y = _root.player.DamageMessage._y - _root.messageSpeed;
} else {
_root.player.DamageMessage.text = "";
_root.player.DamageMessage.move = false;
}
}
if (_root.player.Message.move) {
if (_root.player.Message.y > -50) {
_root.player.Message.y = _root.player.Message.y - _root.messageSpeed;
_root.player.Message._y = _root.player.Message._y - _root.messageSpeed;
} else {
_root.player.Message.text = "";
_root.player.Message.move = false;
_root.player.Message.y = 0;
_root.player.Message._y = _root.defaultExpMessageY;
_root.player.Message._alpha = 100;
}
}
}
if (_root.detecting) {
for (i in _root.monsters) {
playerHitRangeX = _root.monsters[i]._x - _root.playerLoc._x;
playerHitRangeY = _root.monsters[i]._y - _root.playerLoc._y;
switch (_root.playerFacing) {
case 1 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 2 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 3 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = playerHitRangeY;
break;
case 4 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = playerHitRangeY;
}
if ((((playerHitRangeX > _root.player.minsp2Range) and (playerHitRangeX < _root.player.sp2Range)) and (playerHitRangeY > _root.player.minsp2Range)) and (playerHitRangeY < _root.player.sp2Range)) {
_root.sp2Target = _root.monsters[i];
_root.sp2Target.hpTemp = 0;
_root.sp2PosX = _root.sp2Target._x;
_root.sp2PosY = _root.sp2Target._y;
_root.detecting = false;
}
}
}
if (_root.Message_Refer.moveUp) {
if ((_root.Message_Refer._y > _root.Message_Refer.y) and _root.animSetting) {
_root.Message_Refer._y = _root.Message_Refer._y - _root.Message_Refer.speed;
} else {
_root.Message_Refer.moveUp = false;
_root.Message_Refer._y = _root.Message_Refer.y;
}
}
if (_root.Message_Refer.moveDown) {
if ((_root.Message_Refer._y < _root.Message_Refer.y) and _root.animSetting) {
_root.Message_Refer._y = _root.Message_Refer._y + _root.Message_Refer.speed;
} else {
_root.Message_Refer.moveDown = false;
_root.Message_Refer._y = _root.Message_Refer.y;
}
}
if (_root.statusMove) {
if (_root.statusDir == 0) {
if ((_root.Status._y < _root.Status.y) and _root.animSetting) {
_root.Status._y = _root.Status._y + _root.statusMoveSpeed;
} else {
_root.Status._y = _root.statusCloseY;
_root.statusPosition = 0;
_root.statusMove = false;
}
} else if ((_root.Status._y > _root.Status.y) and _root.animSetting) {
_root.Status._y = _root.Status._y - _root.statusMoveSpeed;
} else {
_root.Status._y = _root.statusDefY;
_root.statusPosition = 1;
_root.statusMove = false;
}
}
if (_root.playerTrading1) {
num1 = int(_root.CreateBar.Item1text.text);
num2 = int(_root.CreateBar.Item2text.text);
num3 = int(_root.CreateBar.Item3text.text);
num4 = int(_root.CreateBar.Item4text.text);
if ((((num1 == 0) and (num2 == 0)) and (num3 == 0)) and (num4 == 0)) {
_root.CreateBar.Atext.text = "";
_root.CreateBar.Btext.text = "";
_root.CreateBar.Ctext.text = "";
_root.CreateBar.Dtext.text = "";
_root.CreateBar.Item1text.text = "0";
_root.CreateBar.Item2text.text = "0";
_root.CreateBar.Item3text.text = "0";
_root.CreateBar.Item4text.text = "0";
_root.CreateBar.Btn_Apply.gotoAndStop(1);
} else if ((((num1 >= 0) and (num2 >= 0)) and (num3 >= 0)) and (num4 >= 0)) {
req10 = num1 * 10;
req20 = num2 * 10;
req12 = num3 * 20;
req22 = num4 * 20;
req11 = num3 * 10;
req21 = num4 * 10;
_root.CreateBar.Atext.text = req10 + req12;
_root.CreateBar.Btext.text = req20 + req22;
_root.CreateBar.Ctext.text = req11;
_root.CreateBar.Dtext.text = req21;
_root.CreateBar.Btn_Apply.gotoAndStop(2);
} else {
_root.CreateBar.Atext.text = "";
_root.CreateBar.Btext.text = "";
_root.CreateBar.Ctext.text = "";
_root.CreateBar.Dtext.text = "";
_root.CreateBar.Item1text.text = "0";
_root.CreateBar.Item2text.text = "0";
_root.CreateBar.Item3text.text = "0";
_root.CreateBar.Item4text.text = "0";
_root.CreateBar.Btn_Apply.gotoAndStop(1);
}
}
if (_root.playerTrading2Calc) {
num1 = int(_root.ShopBar.Casher.CashText.text);
num2 = int(_root.ShopBar.Casher.CostText.text);
num3 = int(_root.ShopBar.Casher.AmountText.text);
num4 = num2 * num3;
num5 = num1 - num4;
_root.ShopBar.Casher.TotalText.text = num4;
_root.ShopBar.Casher.BalanceText.text = num5;
if (((num3 > 0) and (num3 != undefined)) and (num5 >= 0)) {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(2);
} else {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(1);
}
}
if (_root.playerTrading3Calc) {
num1 = int(_root.ShopBar.Casher.CashText.text);
num2 = int(_root.ShopBar.Casher.CostText.text);
num3 = int(_root.ShopBar.Casher.AmountText.text);
if (num3 > _root.itemsArray[_root.tradingTarget]) {
num3 = _root.itemsArray[_root.tradingTarget];
_root.ShopBar.Casher.AmountText.text = num3;
}
num4 = num2 * num3;
num5 = num1 + num4;
_root.ShopBar.Casher.TotalText.text = num4;
_root.ShopBar.Casher.BalanceText.text = num5;
if (((num3 > 0) and (num3 != undefined)) and (num3 <= _root.itemsArray[_root.tradingTarget])) {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(2);
} else {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(1);
}
}
if (_root.dead) {
GameOver();
_root.dead = false;
}
if (_root.selectHotKeyItem) {
ReferAttach(_root.hotKeyRefer[1]);
}
if (_root.statusPosition == 0) {
_root.Status.HpBMsg.text = _root.Status.HpMsg.text;
_root.Status.MpBMsg.text = _root.Status.MpMsg.text;
} else {
_root.Status.HpBMsg.text = "";
_root.Status.MpBMsg.text = "";
}
if (_root.earthQuaking) {
if (_root.quakeUp) {
if (_root.earthQuakeNum != 0) {
_root._y = _root._y - 6;
_root.quakeUp = false;
_root.quakeDown = true;
_root.earthQuakeNum--;
} else {
_root.earthQuaking = false;
}
} else if (_root.quakeDown) {
_root._y = _root._y + 6;
_root.quakeUp = true;
_root.quakeDown = false;
}
}
};
stop();
Frame 6
function HackBeta() {
_root.player.exTemp = _root.player.exTemp + (_root.player.expMax * 5);
_root.expBoost = true;
_root.player.hp = _root.player.hpmax;
_root.player.mp = _root.player.mpmax;
_root.player.sp = _root.player.spmax;
_root.player.multiplyChance = 100;
_root.cheater = true;
RefreshStatus();
}
function HackSword() {
_root.weaponType = 2;
_root.Status.Picture_Weapon.gotoAndStop("Type2");
_root.player.Sword.gotoAndStop("Stop2");
_root.player.Sword2.gotoAndStop("Stop2");
_root.player.atkRange = 30;
_root.player.minatkRange = -10;
_root.cheater = true;
_root.player.Ef1.gotoAndPlay("Hack");
_root.player.Ef2.gotoAndPlay("Hack");
RefreshStatus();
}
function HackArmor() {
_root.armorType = 99;
_root.Status.Picture_Armor.gotoAndStop("Type99");
_root.player.Armor1.gotoAndStop("Type99");
_root.player.Armor2.gotoAndStop("Type99");
_root.cheater = true;
RefreshStatus();
}
function HackSuicide() {
_root.player.hp = 0;
_global.playerSuicide = true;
RefreshStatus();
}
function HackPicture() {
_root.playerPicture++;
_root.Status.gotoAndStop("Items");
_root.Status.gotoAndStop("Profile");
RefreshStatus();
}
function AllowItemUse() {
clearInterval(_root.allowDelay);
_root.allowUse = true;
}
function TakeItems() {
for (i in _root.dropItemArray) {
playerHitRangeX = _root.dropItemArray[i]._x - _root.player._x;
playerHitRangeY = _root.dropItemArray[i]._y - _root.player._y;
switch (_root.playerFacing) {
case 1 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 2 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 3 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = playerHitRangeY;
break;
case 4 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = playerHitRangeY;
}
if ((((playerHitRangeX > _root.player.minPickRange) and (playerHitRangeX < _root.player.pickRange)) and (playerHitRangeY > _root.player.minPickRange)) and (playerHitRangeY < _root.player.pickRange)) {
ReceiveItems(_root.dropItemArray[i], i);
}
}
}
function ReceiveItems(item, index) {
itemName = _root.itemsArrayName[item.itemIndex];
itemQuan = item.itemQuan;
if (item.itemIndex == 13) {
_root.key1Pick = true;
}
if (((item.itemIndex == 3) and _root.ZUpStartCheck) and (_root.tutIndex == 23)) {
_root.ZUpStartCheck = false;
}
_root.itemsArray[item.itemIndex] = _root.itemsArray[item.itemIndex] + itemQuan;
All2MessageShow((("Obtained " + itemQuan) + " ") + itemName);
if (_root.statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
_global.RefreshingStatus();
}
RemoveItems(item, index);
}
function RemoveItems(item, index) {
delete _root.dropItemArray[item.index];
item.removeMovieClip();
}
function CreateItem(posx, posy, itemCreateIndex) {
_root.itemIndexMax++;
duplicateMovieClip (_root["DropItem" + itemCreateIndex], "DroppedItem" + _root.itemIndexMax, _root.itemIndexMax + 5000);
setProperty("DroppedItem" + _root.itemIndexMax, _x , posx);
setProperty("DroppedItem" + _root.itemIndexMax, _y , posy);
_root.dropItemArray[_root.itemIndexMax] = _root["DroppedItem" + _root.itemIndexMax];
_root.dropItemArray[_root.itemIndexMax].index = _root.itemIndexMax;
_root.dropItemArray[_root.itemIndexMax].itemIndex = itemCreateIndex;
_root.dropItemArray[_root.itemIndexMax].itemQuan = 10;
_root.dropItemArray[_root.itemIndexMax]._xscale = 100;
_root.dropItemArray[_root.itemIndexMax]._yscale = _root.dropItemArray[_root.itemIndexMax]._xscale;
}
function DropItems(unit) {
if (unit.keyItem) {
itemIndex = 1;
itemCreateIndex = unit.itemCarry[itemIndex];
chance = 100;
minChance = 0;
minSize = _root.itemsSizeMin;
numQuan = 10;
fullQuan = 20;
} else {
itemNum = unit.itemCarry.length;
itemIndex = random(itemNum);
minQuan = unit.itemQuanMin[itemIndex];
maxQuan = unit.itemQuanMax[itemIndex];
chance = random(100);
numQuan = random(maxQuan) + minQuan;
minChance = 100 - unit.itemChance[itemIndex];
itemCreateIndex = unit.itemCarry[itemIndex];
minSize = _root.itemsSizeMin;
fullQuan = _root.itemQuanFull[itemCreateIndex];
}
if ((unit.itemCarry[itemIndex] == 0) and (chance < minChance)) {
DropItems(unit);
} else if ((chance >= minChance) and (unit.itemCarry[itemIndex] != undefined)) {
_root.itemIndexMax++;
duplicateMovieClip (_root["DropItem" + itemCreateIndex], "DroppedItem" + _root.itemIndexMax, _root.itemIndexMax + 5000);
setProperty("DroppedItem" + _root.itemIndexMax, _x , unit._x);
setProperty("DroppedItem" + _root.itemIndexMax, _y , unit._y);
_root.dropItemArray[_root.itemIndexMax] = _root["DroppedItem" + _root.itemIndexMax];
_root.dropItemArray[_root.itemIndexMax].index = _root.itemIndexMax;
_root.dropItemArray[_root.itemIndexMax].itemIndex = unit.itemCarry[itemIndex];
_root.dropItemArray[_root.itemIndexMax].itemQuan = numQuan;
numSize = (numQuan * (100 / fullQuan)) + minSize;
_root.dropItemArray[_root.itemIndexMax]._xscale = numSize;
_root.dropItemArray[_root.itemIndexMax]._yscale = _root.dropItemArray[_root.itemIndexMax]._xscale;
}
}
function AddSp(unit) {
if (unit.sp < unit.spmax) {
unit.sp = unit.sp + Math.ceil(unit.spgen);
if (unit.sp >= unit.spmax) {
unit.sp = unit.spmax;
if (unit == _root.player) {
unit.SpMessage.text = "SP MAXOUT";
}
}
}
RefreshStatus();
}
function SpChecking(index, enemy) {
enemy.buff[2] = false;
switch (index) {
case 4 :
dmgDealt = (_root.player.atp * 5) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
_root.spCasting = false;
_root.totalDmg = "";
_root.playerSpIndex = "";
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.SpEffects._x = _root.player._x;
_root.SpEffects._y = _root.player._y;
_root.SpEffects.swapDepths(_root.playerDepth + 1);
_root.SpEffects.gotoAndPlay("Sp1");
return;
case 5 :
hitRatio = (_root.player.hit * 100) / (unit.avo + 1);
hitCrit = random(_root.player.hit);
hitConfirm = random(hitRatio);
if (hitConfirm >= 10) {
dmgDealt = (_root.player.atp * 0.8) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
} else {
EnemyMessageShow(enemy, "miss");
}
return;
case 6 :
hitRatio = (_root.player.hit * 100) / (unit.avo + 1);
hitCrit = random(_root.player.hit);
hitConfirm = random(hitRatio);
if (hitConfirm >= 10) {
dmgDealt = (_root.player.atp * 0.4) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
} else {
EnemyMessageShow(enemy, "miss");
}
return;
case 7 :
hitRatio = (_root.player.hit * 100) / (unit.avo + 1);
hitCrit = random(_root.player.hit);
hitConfirm = random(hitRatio);
if (hitConfirm >= 10) {
dmgDealt = (_root.player.atp * 0.5) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
} else {
EnemyMessageShow(enemy, "miss");
}
return;
case 8 :
hitRatio = (_root.player.hit * 100) / (unit.avo + 1);
hitCrit = random(_root.player.hit);
hitConfirm = random(hitRatio);
if (hitConfirm >= 10) {
dmgDealt = (_root.player.atp * 0.7) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hpTemp = enemy.hpTemp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
} else {
EnemyMessageShow(enemy, "miss");
}
return;
case 9 :
dmgDealt = _root.totalDmg;
if (dmgDealt <= 0) {
dmgDealt = 1;
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
_root.spCasting = false;
_root.sp2Casting = false;
_root.totalDmg = "";
_root.playerSpIndex = "";
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
}
}
function PlayerSpUseCheck() {
if (Key.isDown(38) && (_root.spLastIndex != "1")) {
_root.playerSpIndex = _root.playerSpIndex + "1";
_root.spLastIndex = "1";
SetKeyInterval(1);
} else if (Key.isDown(40) && (_root.spLastIndex != "3")) {
_root.playerSpIndex = _root.playerSpIndex + "3";
_root.spLastIndex = "3";
SetKeyInterval(1);
} else if (Key.isDown(37) && (_root.spLastIndex != "4")) {
_root.playerSpIndex = _root.playerSpIndex + "4";
_root.spLastIndex = "4";
SetKeyInterval(1);
} else if (Key.isDown(39) && (_root.spLastIndex != "2")) {
_root.playerSpIndex = _root.playerSpIndex + "2";
_root.spLastIndex = "2";
SetKeyInterval(1);
}
RefreshStatus();
}
function CheckSpIndex() {
frc = _root.player.frc;
if (_root.playerSpIndex == _root.playerSp1Index) {
spRequire = 100;
if (frc >= 0) {
maxlv = 1;
if (_root.player.sp >= spRequire) {
_root.spCasting = true;
CreateSp(_root.playerFacing, maxlv, spRequire, _root.sp1Caption);
} else {
All2MessageShow((("More " + int(spRequire - _root.player.sp)) + " SP Is Required To Perform ") + _root.sp1Caption);
}
}
}
if (_root.playerSpIndex == _root.playerSp2Index) {
spRequire = _root.sp2requireSp;
if (frc >= _root.sp2requireFrc) {
maxlv = 2;
if (_root.player.sp >= spRequire) {
_root.spCasting = true;
_root.detecting = true;
_root.gamePause = true;
_root.sp2Casting = true;
CreateSp(_root.playerFacing, maxlv, spRequire, _root.sp2Caption);
} else {
All2MessageShow((("More " + int(spRequire - _root.player.sp)) + " SP Is Required To Perform ") + _root.sp2Caption);
}
}
}
if (_root.playerSpIndex == _root.playerSp98Index) {
HackSword();
All2MessageShow(_root.sp98Caption);
}
if (_root.playerSpIndex == _root.playerSp95Index) {
HackPicture();
All2MessageShow(_root.sp95Caption);
}
if (_root.playerSpIndex == _root.playerSp99Index) {
HackBeta();
All2MessageShow(_root.sp99Caption);
}
if (_root.playerSpIndex == _root.playerSp97Index) {
HackArmor();
All2MessageShow(_root.sp97Caption);
}
if (_root.playerSpIndex == _root.playerSp96Index) {
HackSuicide();
All2MessageShow(_root.sp96Caption);
}
spRequire = 0;
maxlv = 0;
_root.playerSpIndex = "";
RefreshStatus();
}
function CreateSp(faceIndex, lv, sp, caption) {
_root.playerAtkInd = 0;
_root.playerSpMove = true;
faceNum = faceIndex;
switch (faceIndex) {
case 1 :
faceIndex = "LT";
break;
case 2 :
faceIndex = "RT";
break;
case 3 :
faceIndex = "RB";
break;
case 4 :
faceIndex = "LB";
}
_root.faceIndex = faceIndex;
_root.playerSpIndex = "";
_root.player.sp = _root.player.sp - sp;
_root.player.SpMessage.text = caption;
_root.player.gotoAndPlay((faceNum + "Sp") + lv);
}
function LeaveTrading() {
if (_root.shopBrowsing == 1) {
rndTxt = random(3) + 1;
switch (rndTxt) {
case 1 :
All2MessageShow("Bye Bye!");
break;
case 2 :
All2MessageShow("See ya!");
break;
case 3 :
All2MessageShow("Please come again!");
}
}
_root.shopSellReady = false;
_root.sellingItem = false;
_root.CreateBar._visible = false;
clearInterval(_root.playerTrading1Delay);
_root.createTool = false;
_root.playerTrading1 = false;
_root.playerTrading1Enabled = true;
_root.ShopBar._visible = false;
clearInterval(_root.playerTrading2Delay);
_root.shopTool = false;
_root.playerTrading2 = false;
_root.playerTrading2Enabled = true;
_root.CreateBar.Item1Text.text = "0";
_root.CreateBar.Item2Text.text = "0";
_root.CreateBar.Item3Text.text = "0";
_root.CreateBar.Item4Text.text = "0";
_root.ShopBar.Casher._visible = false;
_root.playerTrading2Calc = false;
_root.playerTrading3Calc = false;
_root.ShopBar.SellMsg.text = "";
}
function EnableTrading(index) {
switch (index) {
case 1 :
clearInterval(_root.playerTrading1Delay);
_root.playerTrading1Enabled = true;
return;
case 2 :
clearInterval(_root.playerTrading2Delay);
_root.playerTrading2Enabled = true;
}
}
function CreateBarShow(bool) {
switch (bool) {
case true :
_root.CreateBar._visible = true;
_root.CreateBar.Message.text = "Please input amount. D to exit.";
Selection.setFocus(_root.CreateBar.Item1text);
return;
case false :
_root.CreateBar._visible = false;
_root.CreateBar.Message.text = "";
}
}
function ShopBarShow(bool) {
switch (bool) {
case true :
_root.ShopBar._visible = true;
_root.ShopBar.Message.text = "Welcome. S to exit.";
return;
case false :
_root.ShopBar._visible = false;
_root.ShopBar.Message.text = "";
_root.playerTrading2Calc = false;
_root.playerTrading3Calc = false;
}
}
function CreateMoreItem(item1, item2, item3, item4) {
_root.itemsArray[1] = _root.itemsArray[1] + item1;
_root.itemsArray[2] = _root.itemsArray[2] + item2;
_root.itemsArray[6] = _root.itemsArray[6] + item3;
_root.itemsArray[7] = _root.itemsArray[7] + item4;
SetCreateMessage("Here you go");
if (_root.statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
_global.RefreshingStatus();
}
}
function SetCreateMessage(caption) {
clearInterval(_root.clearCreateMessage);
delay = (caption.length * 50) + 500;
_root.CreateBar.Message.text = caption;
_root.clearCreateMessage = setInterval(ClearCreatedMessage, delay);
}
function ClearCreatedMessage() {
clearInterval(_root.clearCreateMessage);
_root.CreateBar.Message.text = "Please input amount. D to exit.";
}
function HillAreaCheck(unit) {
touchIndex = 0;
if (unit == _root.player) {
for (i in _root.hillArea) {
if (_root.hillArea[i].hitTest(unit._x, unit._y, true)) {
touchIndex++;
switch (_root.hillArea[i].index) {
case 1 :
_root.speedYFactor = 1.75;
break;
case 2 :
_root.speedYFactor = 0.25;
break;
case 3 :
if (unit.downHill) {
break;
}
unit._y = unit._y + _root.hillArea[i].depth;
unit.newDepth = _root.hillArea[i].depth;
unit.downHill = true;
}
}
}
if (touchIndex == 0) {
if (unit.downHill) {
unit.downHill = false;
unit._y = unit._y - unit.newDepth;
}
_root.speedYFactor = 1;
}
shopBrowse = 0;
for (i in _root.shopArray) {
if (_root.shopArray[i].DetectArea.hitTest(_root.player._x, _root.player._y, true)) {
if (_root.playerSlash and (!_root.shopArray[i].afraid)) {
_root.shopArray[i].gotoAndPlay("Scared");
_root.shopArray[i].afraid = true;
}
}
}
if ((_root.shopBrowsing == undefined) or (_root.shopBrowsing == 0)) {
for (i in _root.shopArray) {
if (_root.shopArray[i].DetectArea.hitTest(_root.player._x, _root.player._y, true)) {
_root.shopBrowsing = _root.shopArray[i].index;
shopBrowse++;
if (_root.shopArray[i].index == 1) {
if (_root.sprSwordPicking and (!_root.sprSwordTaken)) {
_root.player.gotoAndStop("LTStand");
_root.shopArray[i].gotoAndPlay("Sword");
_root.sprSwordPicking = false;
_root.sprSwordPick = false;
_root.sprSwordTaken = true;
_root.gamePause = true;
} else {
_root.shopArray[i].gotoAndPlay("Trading");
}
} else if (_root.shopArray[i].index == 2) {
CheckDialogIndex(_root.shopArray[i]);
}
}
}
}
for (i in _root.shopArray) {
if (!_root.shopArray[i].DetectArea.hitTest(_root.player._x, _root.player._y, true)) {
if ((shopBrowse == 0) and (_root.shopBrowsing == _root.shopArray[i].index)) {
LeaveTrading();
_root.wisemanHelp = false;
_root.shopBrowsing = 0;
_root.shopArray[i].gotoAndPlay("Stand");
}
}
}
}
}
function AddAttributeCheck() {
if (_root.player.ext > 0) {
_root.Status.Btn_Attributes._visible = true;
_root.Status.AddFcs._visible = true;
_root.Status.AddFrc._visible = true;
_root.Status.AddVit._visible = true;
_root.Status.AddKno._visible = true;
_root.Status.AddSpr._visible = true;
} else if ((_root.player.kno == 10) and (_root.tutCurrentIndex >= 56)) {
_root.Status.Btn_Attributes._visible = false;
_root.Status.AddFcs._visible = false;
_root.Status.AddFrc._visible = false;
_root.Status.AddVit._visible = false;
_root.Status.AddKno._visible = false;
_root.Status.AddSpr._visible = false;
} else {
All2MessageShow("Please follow the Tutorial process.");
_root.player.ext = 5;
_root.player.frc = 5;
_root.player.fcs = 5;
_root.player.spr = 5;
_root.player.vit = 5;
_root.player.kno = 5;
_root.mg1lv = 0;
_root.Status.Btn_Attributes._visible = true;
_root.Status.AddFcs._visible = true;
_root.Status.AddFrc._visible = true;
_root.Status.AddVit._visible = true;
_root.Status.AddKno._visible = true;
_root.Status.AddSpr._visible = true;
RefreshStatus();
}
}
function Regenerate() {
with (_root.player) {
if (hp < hpmax) {
hp = hp + Math.ceil(hpgen);
}
if (mp < mpmax) {
mp = mp + Math.ceil(mpgen);
}
if (hp > hpmax) {
hp = hpmax;
}
if (mp > mpmax) {
mp = mpmax;
}
}
RefreshStatus();
}
function PlayerDieCheck() {
RefreshStatus();
}
function PlayerDie() {
RestoreMove();
_root.playerDying = true;
_root.levelScr = _root.player.lv;
_root.expScr = _root.player.ex;
_root.playerName = _root.Status.PlayerName.text;
_global.compleText = _root.playerName + ", is it too hard for you? ";
_root.player.gotoAndPlay("Die");
}
function HitUp() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y + _root.veloSpeedY;
_root.player._x = _root.player._x + _root.veloSpeedX;
}
}
}
function HitDown() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y - _root.veloSpeedY;
_root.player._x = _root.player._x - _root.veloSpeedX;
}
}
}
function HitLeft() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y - _root.veloSpeedY;
_root.player._x = _root.player._x + _root.veloSpeedX;
}
}
}
function HitRight() {
for (i in _root.area) {
if (_root.area[i].hitTest(_root.player._x, _root.player._y, true)) {
_root.player._y = _root.player._y + _root.veloSpeedY;
_root.player._x = _root.player._x - _root.veloSpeedX;
}
}
}
function RefreshStatus() {
with (_root.player) {
atw = (frc + lv) * 2;
armor = playerArmorNum[_root.armorType];
playerWeaponNum[2] = ((atw + 40) * 2) - atw;
weapon = playerWeaponNum[_root.weaponType];
_root.Status.FireLv.text = _root.mg1Lv;
_root.Status.LightningLv.text = _root.mg2Lv;
_root.Status.LightLv.text = _root.mg4Lv;
bats = (buff[1] * 0.5) + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = ((frc + lv) * 2) + weapon;
dfp = ((vit + lv) * 0.4) + armor;
ats = ((kno + lv) * 2) * bats;
avo = (fcs + lv) * 5;
hit = (fcs + lv) * 2;
spmax = ((frc + lv) * 5) + 100;
hpgen = spr + lv;
mpgen = ((spr + kno) + lv) / 4;
spgen = (spr + lv) / 5;
if (!_root.spCasting) {
if (sp >= spmax) {
sp = spmax;
SpMessage.text = "SP MAXOUT";
} else {
SpMessage.text = "";
}
}
if (hp > hpmax) {
hp = hpmax;
}
if (mp > mpmax) {
mp = mpmax;
}
if (((hp / hpmax) * 100) <= 10) {
if (_root.player.hp <= 0) {
clearInterval(_root.playerRegenerate);
_root.player.hp = 0;
if (!_root.playerDying) {
_global.ReferItem("");
_root.gamePause = true;
PlayerDie();
}
}
_root.player.LowHpMessage.text = "LOW HP";
if (!fcsUp) {
_root.player.fcsAdd = Math.floor(fcs / 2);
_root.player.fcs = fcs + fcsAdd;
_root.player.fcsUp = true;
}
} else {
_root.player.LowHpMessage.text = "";
if (fcsUp) {
_root.player.fcs = _root.player.fcs - fcsAdd;
_root.player.fcsUp = false;
}
}
if (_root.player.ext != 0) {
if (_root.Status.Btn_pAttributes.Anim._currentframe == 1) {
_root.Status.Btn_pAttributes.Anim.play();
}
} else {
_root.Status.Btn_pAttributes.Anim.gotoAndStop(1);
}
if ((!_root.selfCreateEnable) and (vit >= 30)) {
_root.selfCreateEnable = true;
}
if ((_root.spLevel == 1) and (_root.player.frc >= _root.sp2requireFrc)) {
_root.spLevel = 2;
All2MessageShow((("Special Attack Level 2, " + _root.sp2Caption) + " Gained.") + _root.sp2Usage);
}
if ((_root.mg1Lv == 0) and (_root.player.kno >= mg1lv1requireKno)) {
_root.mg1Lv = 1;
All2MessageShow((("Fire Attack Level 1, " + _root.mg1Caption) + " Gained.") + _root.mg1Usage);
}
if ((_root.mg1Lv <= 1) and (_root.player.kno >= mg1lv2requireKno)) {
_root.mg1Lv = 2;
All2MessageShow((("Fire Attack Level 2, " + _root.mg2Caption) + " Gained.") + _root.mg2Usage);
}
if ((_root.mg1Lv <= 2) and (_root.player.kno >= mg1lv3requireKno)) {
_root.mg1Lv = 3;
All2MessageShow((("Fire Attack Level 3, " + _root.mg3Caption) + " Gained.") + _root.mg3Usage);
}
if ((_root.mg2Lv <= 0) and (_root.player.kno >= mg2lv1requireKno)) {
_root.mg2Lv = 1;
All2MessageShow((("Lightning Attack Level 1, " + _root.mg21Caption) + " Gained.") + _root.mg21Usage);
}
if ((_root.mg2Lv <= 1) and (_root.player.kno >= mg2lv2requireKno)) {
_root.mg2Lv = 2;
All2MessageShow((("Lightning Attack Level 2, " + _root.mg22Caption) + " Gained.") + _root.mg22Usage);
}
if (_root.mg4lv == 1.5) {
_root.mg4lv = 1;
All2MessageShow((("Heal Spell Level 1, " + _root.mg41Caption) + " Gained.") + _root.mg41Usage);
}
_root.player.Armor1.gotoAndStop("Type" + _root.armorType);
_root.player.Armor2.gotoAndStop("Type" + _root.armorType);
_root.Status.HpMsg.text = (("HP : " + Math.ceil(hp)) + " / ") + hpmax;
_root.Status.MpMsg.text = (("MP : " + Math.ceil(mp)) + " / ") + mpmax;
_root.Status.SpMsg.text = (("SP : " + sp) + " / ") + spmax;
_root.Status.LvMsg.text = "LEVEL : " + lv;
_root.Status.ExpMsg.text = (("EXP : " + ex) + " / ") + expmax;
_root.Status.FrcMsg.text = "FORCE :" + frc;
_root.Status.FcsMsg.text = "FOCUS :" + fcs;
_root.Status.VitMsg.text = "VITALITY :" + vit;
_root.Status.SprMsg.text = "SPIRIT :" + spr;
_root.Status.KnoMsg.text = "KNOWLEDGE :" + kno;
_root.Status.AtpMsg.text = (("ATTACK :" + int(Math.floor(atp) - weapon)) + " + ") + weapon;
_root.Status.AtsMsg.text = "SPELL :" + ats;
_root.Status.SpgenMsg.text = "SP GAIN :" + Math.ceil(spgen);
_root.Status.AvoMsg.text = "AVOIDANCE :" + ((fcs + lv) * 2);
_root.Status.HitMsg.text = "HIT RATIO :" + hit;
_root.Status.DfpMsg.text = (("DEFEND :" + int(Math.floor(dfp) - armor)) + " + ") + armor;
_root.Status.HpgenMsg.text = "HP REGEN : " + Math.ceil(hpgen);
_root.Status.MpgenMsg.text = "MP REGEN : " + Math.ceil(mpgen);
_root.Status.Btn_Attributes.ExtPts.text = ext;
}
_root.Status.HpBar.Mask._xscale = (_root.player.hp * 100) / _root.player.hpmax;
_root.Status.MpBar.Mask._xscale = (_root.player.mp * 100) / _root.player.mpmax;
_root.Status.SpBar.Mask._xscale = (_root.player.sp * 100) / _root.player.spmax;
_root.Status.ExpBar.Mask._xscale = (_root.player.ex * 100) / _root.player.expmax;
AddAttributeCheck();
}
function AttackChecking(index, unit, i) {
if (unit.hp > 0) {
hitRatio = (_root.player.hit * 100) / (unit.avo + 1);
hitCrit = random(_root.player.hit);
hitConfirm = random(hitRatio);
if (hitConfirm >= 10) {
AttackUnit(index, unit, i, hitConfirm, hitCrit);
} else {
PlayerDamageMessage("miss");
}
}
}
function AttackUnit(atkType, enemy, i, hitConfirm, hitCrit) {
enemy.buff[2] = false;
switch (atkType) {
case 1 :
if (hitCrit >= (enemy.lv * 10)) {
dmgMultiplier = 3;
} else {
dmgMultiplier = 1;
}
dmgDealt = (_root.player.atp * dmgMultiplier) - enemy.dfp;
dmgDealt = dmgDealt;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
AddSp(_root.player);
break;
case 2 :
dmgDealt = (_root.player.atp * 1.5) - enemy.dfp;
dmgDealt = dmgDealt;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
AddSp(_root.player);
break;
case 3 :
dmgDealt = (_root.player.atp * 2) - enemy.dfp;
dmgDealt = dmgDealt;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
AddSp(_root.player);
break;
}
if ((hitCrit >= (enemy.lv * 10)) and (atkType == 1)) {
dmgDealt = int(dmgDealt) + "!!";
} else {
dmgDealt = int(dmgDealt);
}
EnemyMessageShow(enemy, dmgDealt);
EnemyStatusCheck(enemy, enemy.hp, i);
}
function ClearDmgMessage(unit) {
clearInterval(unit.clearDmgInterval);
i = 0;
while (i < 9) {
unit.Message["Message" + i].text = "";
i++;
}
}
function ExpGain(unit) {
if (_root.expBonus) {
unit.expGain = unit.expGain + (unit.expGain * unit.expBonus);
}
_root.player.exTemp = _root.player.exTemp + unit.expGain;
_root.player.exTemp2 = _root.player.exTemp2 + unit.expGain;
if ((unit.expBonus != 0) and (unit.expBonus != undefined)) {
_root.expBonus = true;
}
unit.expGain = 0;
if (_root.player.exTemp2 != 0) {
MessageShow("EXP+" + _root.player.exTemp2);
}
if (unit.boss) {
_root.bossScr = _root.bossScr + 2000;
}
_root.player.Message.move = true;
_root.expBoost = true;
RefreshStatus();
}
function ExpBoosting() {
if (_root.player.ex < _root.player.exTemp) {
_root.player.ex = _root.player.ex + int((_root.player.expMax + _root.player.exTemp) / 100);
} else {
_root.player.ex = _root.player.exTemp;
_root.expBoost = false;
_root.expBonus = false;
_root.player.exTemp2 = 0;
}
if ((_root.player.ex >= _root.player.expMax) and (_root.player.exTemp >= _root.player.expMax)) {
_root.player.ex = 0;
_root.player.exTemp = _root.player.exTemp - _root.player.expMax;
_root.player.expMax = _root.player.expMax + ((_root.player.lv + 1) * 100);
LevelUp();
}
RefreshStatus();
}
function LevelUp() {
AddAttributes();
if (_root.player.ex >= _root.player.expMax) {
ExpGain(0);
}
if (_root.player.LevelUpAnim._currentframe == 1) {
_root.player.LevelUpAnim.gotoAndPlay(2);
}
RefreshStatus();
}
function SetKeyInterval(index) {
clearInterval(_root.setKeyDelay);
_root.setKeyDelay = setInterval(ClearLastKey, _root.lastKeyDelay, index);
}
function ClearLastKey(index) {
clearInterval(_root.setKeyDelay);
_root.spLastIndex = "";
_root.MgLastIndex = "";
}
function ArmorPosition() {
if (_root.player.Body._alpha == 0) {
_root.playerArmor._alpha = 0;
} else {
_root.playerArmor._alpha = 100;
}
if (_root.playerFacing == 1) {
_root.player.Armor1._visible = false;
_root.player.Armor2._visible = true;
_root.playerArmor = _root.player.Armor2;
_root.playerArmor._xscale = -100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
} else if (_root.playerFacing == 2) {
_root.player.Armor1._visible = false;
_root.player.Armor2._visible = true;
_root.playerArmor = _root.player.Armor2;
_root.playerArmor._xscale = 100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
} else if (_root.playerFacing == 4) {
_root.player.Armor2._visible = false;
_root.player.Armor1._visible = true;
_root.playerArmor = _root.player.Armor1;
_root.playerArmor._xscale = -100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
} else {
_root.player.Armor2._visible = false;
_root.player.Armor1._visible = true;
_root.playerArmor = _root.player.Armor1;
_root.playerArmor._xscale = 100;
_root.playerArmor._x = _root.player.Body._x;
_root.playerArmor._y = _root.player.Body._y - 8;
}
}
function KeyPressing() {
if (Key.isToggled(20)) {
_root.player.armed = true;
if (_root.ZUpStartCheck and (_root.tutCurrentIndex == 6)) {
_root.ZUpStartCheck = false;
}
} else {
_root.player.armed = false;
}
if ((((!_root.playerSlash) and (!_root.playerSpUse)) and (!_root.playerMgUse)) and (!_root.playerCreateUse)) {
if ((((Key.isDown(38) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._y = _root.player._y - _root.veloSpeedY;
_root.player._x = _root.player._x - _root.veloSpeedX;
if (!_root.playerWalking) {
_root.playerFacing = 1;
_root.playerWalk = true;
}
if (_root.playerFacing != 1) {
_root.playerWalking = false;
}
HitUp();
} else if ((((Key.isDown(39) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._x = _root.player._x + _root.veloSpeedX;
_root.player._y = _root.player._y - _root.veloSpeedY;
if (!_root.playerWalking) {
_root.playerFacing = 2;
_root.playerWalk = true;
}
if (_root.playerFacing != 2) {
_root.playerWalking = false;
}
HitRight();
} else if ((((Key.isDown(37) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._x = _root.player._x - _root.veloSpeedX;
_root.player._y = _root.player._y + _root.veloSpeedY;
if (!_root.playerWalking) {
_root.playerFacing = 4;
_root.playerWalk = true;
}
if (_root.playerFacing != 4) {
_root.playerWalking = false;
}
HitLeft();
} else if ((((Key.isDown(40) && (!Key.isDown(_root.KeyAttack))) && (!_root.createTool)) && (!_root.playerTrading2Calc)) && (!_root.playerTrading3Calc)) {
_root.player._y = _root.player._y + _root.veloSpeedY;
_root.player._x = _root.player._x + _root.veloSpeedX;
if (!_root.playerWalking) {
_root.playerFacing = 3;
_root.playerWalk = true;
}
if (_root.playerFacing != 3) {
_root.playerWalking = false;
}
HitDown();
} else if ((Key.isDown(_root.KeyAttack) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.player.armed) {
if (_root.weaponType != 1) {
_root.playerWeapon.gotoAndPlay("Slash" + _root.weaponType);
} else {
_root.playerWeapon.gotoAndPlay("Slash");
}
SlashDirection(_root.playerFacing);
_root.playerSlash = true;
}
} else if ((Key.isDown(_root.KeySp) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.player.armed) {
_root.playerSpUse = true;
}
} else if ((Key.isDown(_root.KeyCreate) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.playerTrading1 and _root.playerTrading1Enabled) {
_root.playerTrading1Enabled = false;
_root.createTool = !_root.createTool;
CreateBarShow(_root.createTool);
_root.playerTrading1Delay = setInterval(EnableTrading, 250, 1);
} else if (_root.selfCreateEnable) {
_root.playerTrading1Enabled = false;
_root.createTool = !_root.createTool;
CreateBarShow(_root.createTool);
_root.playerTrading1Delay = setInterval(EnableTrading, 250, 1);
}
} else if ((Key.isDown(_root.KeyMg) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.player.armed) {
_root.playerMgUse = true;
}
} else if ((Key.isDown(_root.KeyShiftItem) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.statusLoc != "Items") {
_root.statusLoc = "Items";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
if (_root.selectHotkeyItem) {
_root.selectHotkeyItem = false;
_root.selectHIobj.gotoAndStop(1);
_global.ReferItem("");
}
} else if ((Key.isDown(_root.KeyTakeItem) and (!_root.dying)) and (!_root.playerWalking)) {
if (_root.playerTrading2 and _root.playerTrading2Enabled) {
_root.playerTrading2Enabled = false;
_root.shopTool = !_root.shopTool;
ShopBarShow(_root.shopTool);
_root.playerTrading2Delay = setInterval(EnableTrading, 250, 2);
} else if (_root.wisemanHelp) {
_root.targetedShop.gotoAndPlay("Heal");
_root.gamePause = true;
} else {
TakeItems();
}
} else {
for (i in _root.hotKeyArray) {
if ((((((Key.isDown(_root.hotKeyArray[i]) and (!_root.dying)) and _root.itemReady) and _root.allowUse) and (!_root.createTool)) and (!_root.playerTrading2Calc)) and (!_root.playerTrading3Calc)) {
_global.UseItem("", _root.Status["HotKey" + i].index);
_root.allowDelay = setInterval(AllowItemUse, 1000);
_root.allowUse = false;
}
}
if ((_root.playerWalking && (!_root.playerSpUse)) && (!_root.playerMgUse)) {
_root.playerWalking = false;
}
}
} else {
if (_root.playerSpUse) {
if ((!Key.isDown(_root.KeySp)) and (!_root.playerWalking)) {
CheckSpIndex();
_root.playerSpUse = false;
_root.spLastIndex = "";
}
PlayerSpUseCheck();
}
if (_root.playerMgUse) {
if ((!Key.isDown(_root.KeyMg)) and (!_root.playerWalking)) {
CheckMgIndex();
_root.playerMgUse = false;
_root.mgLastIndex = "";
}
PlayerMgUseCheck();
}
if (_root.playerCreateUse) {
if (!Key.isDown(_root.KeyCreate)) {
CheckCreateIndex();
_root.playerCreateUse = false;
}
PlayerCreateUseCheck();
}
}
_global.WeaponPosition();
if (!_root.playerSlash) {
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
} else if (!_root.spCasting) {
for (i in _root.monsters) {
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.playerFacing) {
case 1 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 2 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 3 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case 4 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((_root.playerAtkInd != 0) and (!_root.spCasting)) {
if ((((_root.playerHitRangeX > _root.player.minatkRange) and (_root.playerHitRangeX < _root.player.atkRange)) and (_root.playerHitRangeY > _root.player.minatkRange)) and (_root.playerHitRangeY < _root.player.atkRange)) {
AttackChecking(_root.playerAtkInd, _root.monsters[i], i);
}
}
}
_root.playerAtkInd = 0;
}
}
function AddAttributes() {
with (_root.player) {
lv = lv + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
hp = hpmax;
mp = mpmax;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = (spr + lv) / 5;
ats = (kno + lv) * 2;
avo = (fcs + lv) * 5;
hit = (frc + lv) * 3;
spmax = (frc * 5) + 100;
hpgen = spr + lv;
mpgen = ((spr + kno) + lv) / 4;
ext = ext + 5;
}
}
function MgChecking(index, enemy, lv) {
enemy.buff[2] = false;
switch (index) {
case 1 :
dmgDealt = (_root.player.ats * (((lv - 1) / 2) + 1)) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
EnemyMessageShow(enemy, dmgDealt);
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.playerFacing = _root.faceIndexNum;
break;
case 2 :
if (lv == 22) {
dmgDealt = enemy.hpTemp;
enemy.hp = enemy.hp - enemy.hpTemp;
_root.damageScr = _root.damageScr + dmgDealt;
EnemyMessageShow(enemy, dmgDealt);
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.playerFacing = _root.faceIndexNum;
} else {
dmgDealt = ((_root.player.ats * (lv - 20)) * 2) - enemy.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp - dmgDealt;
_root.damageScr = _root.damageScr + dmgDealt;
EnemyMessageShow(enemy, dmgDealt);
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
EnemyStatusCheck(enemy, enemy.hp);
_root.playerFacing = _root.faceIndexNum;
}
}
dmgDealt = int(dmgDealt);
EnemyMessageShow(enemy, dmgDealt);
EnemyStatusCheck(enemy, enemy.hp);
}
function PlayerMgUseCheck() {
if (Key.isDown(38) && (_root.mgLastIndex != "1")) {
_root.playerMgIndex = _root.playerMgIndex + "1";
_root.MgLastIndex = "1";
SetKeyInterval(2);
} else if (Key.isDown(40) && (_root.mgLastIndex != "3")) {
_root.playerMgIndex = _root.playerMgIndex + "3";
_root.MgLastIndex = "3";
SetKeyInterval(2);
} else if (Key.isDown(37) && (_root.mgLastIndex != "4")) {
_root.playerMgIndex = _root.playerMgIndex + "4";
_root.MgLastIndex = "4";
SetKeyInterval(2);
} else if (Key.isDown(39) && (_root.mgLastIndex != "2")) {
_root.playerMgIndex = _root.playerMgIndex + "2";
_root.MgLastIndex = "2";
SetKeyInterval(2);
}
RefreshStatus();
}
function CheckMgIndex() {
kno = _root.player.kno;
if ((kno >= _root.player.mg1lv1requireKno) and _root.ZUpStartCheck) {
if (_root.playerMgIndex == _root.playerMg1Index) {
mpRequire = _root.player.mg1lv1requireMp;
index = 1;
lv = 1;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg1Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg1Caption);
}
}
}
if (kno >= _root.player.mg1lv2requireKno) {
if (_root.playerMgIndex == _root.playerMg2Index) {
mpRequire = _root.player.mg1lv2requireMp;
index = 1;
lv = 2;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg2Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg2Caption);
}
}
}
if (kno >= _root.player.mg1lv3requireKno) {
if (_root.playerMgIndex == _root.playerMg3Index) {
mpRequire = _root.player.mg1lv3requireMp;
index = 1;
lv = 3;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
_root.playerPhoenixUse = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg3Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg3Caption);
}
}
}
if (kno >= _root.player.mg2lv1requireKno) {
if (_root.playerMgIndex == _root.playerMg21Index) {
mpRequire = _root.player.mg2lv1requireMp;
index = 2;
lv = 1;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg21Caption, _root.playerFacing);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg21Caption);
}
}
}
if (kno >= _root.player.mg2lv2requireKno) {
if (_root.playerMgIndex == _root.playerMg22Index) {
mpRequire = _root.player.mg2lv2requireMp;
index = 2;
lv = 2;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg22Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg22Caption);
}
}
}
if (_root.mg4lv == 1) {
if (_root.playerMgIndex == _root.playerMg41Index) {
mpRequire = _root.player.mg4lv1requireMp;
index = 4;
lv = 1;
if (_root.player.mp >= mpRequire) {
_root.mgCasting = true;
CreateMg(_root.playerFacing, index, lv, mpRequire, _root.mg41Caption, 3);
} else {
All2MessageShow((("More " + (mpRequire - _root.player.mp)) + " MP Is Required To Perform ") + _root.mg41Caption);
}
}
}
_root.playerMgIndex = "";
_root.playerMgUse = false;
RefreshStatus();
}
function CreateMg(faceIndex, index, lv, mp, caption, facingNow) {
_root.player.stop();
_root.player.mp = _root.player.mp - mp;
switch (faceIndex) {
case 1 :
faceIndex = "LT";
break;
case 2 :
faceIndex = "RT";
break;
case 3 :
faceIndex = "RB";
break;
case 4 :
faceIndex = "LB";
}
_root.playerFacing = facingNow;
if ((index == 1) or (index == 4)) {
_root.player.gotoAndPlay((index + "Mg") + lv);
} else if ((index == 2) and (lv == 2)) {
_root.player.gotoAndPlay((index + "Mg") + lv);
} else {
_root.player.gotoAndPlay(((index + "Mg") + lv) + faceIndex);
}
_root.playerMgMove = true;
_root.faceIndex = faceIndex;
_root.playerMgIndex = "";
_root.player.MgMessage.text = caption;
}
function SlashDirection(number) {
switch (number) {
case 1 :
_root.player.gotoAndPlay("LTSlash");
return;
case 2 :
_root.player.gotoAndPlay("RTSlash");
_root.playerWeapon._xscale = -100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 180;
return;
case 3 :
_root.player.gotoAndPlay("RBSlash");
return;
case 4 :
_root.player.gotoAndPlay("LBSlash");
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
}
}
function AllMessageSet(index, maxIndex) {
index++;
if (index == 4) {
_root.Sp1Anim._x = _root.player._x;
_root.Sp1Anim._y = _root.player._y;
_root.Sp1Anim.swapDepths(_root.Sp1Anim._y + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
}
if (index == 5) {
All2MessageShow("Section 1 : Basic Controls >>>");
_root.FloorB.gotoAndPlay("Appear");
}
if (index == 7) {
_root.Controller.gotoAndPlay("Anim1");
}
if (index == 8) {
_root.Controller.gotoAndPlay("UpPress");
}
if (index == 9) {
_root.Controller.gotoAndPlay("DownPress");
}
if (index == 10) {
_root.Controller.gotoAndPlay("LeftPress");
}
if (index == 11) {
_root.Controller.gotoAndPlay("RightPress");
}
if (index == 12) {
_root.Controller.gotoAndPlay("Repeat");
}
if (index == 14) {
_root.Model.gotoAndPlay("Revive");
}
if (index == 15) {
_root.Controller.gotoAndPlay("ZPress");
_root.Model.gotoAndPlay("RBSlash");
}
if (index == 16) {
_root.Model.gotoAndStop("RBStand");
_root.Controller.gotoAndPlay("Repeat");
}
if (index == 17) {
_root.Controller.gotoAndPlay("ZUp");
}
if (index == 18) {
_root.Model.gotoAndPlay("RBSlash2");
}
if (index == 20) {
_root.Model.gotoAndStop("RBStand");
_root.Controller.gotoAndPlay("Repeat");
}
if (index == 22) {
_root.Model.gotoAndPlay("RBSlash2b");
_root.Controller.gotoAndPlay("ZUp");
}
if (index == 25) {
_root.Model.gotoAndPlay("RBSlash2c");
_root.Controller.gotoAndPlay("ZDown");
}
if (index == 26) {
_root.Model.gotoAndPlay("RBSlash2d");
_root.Controller.gotoAndPlay("ZUpDown");
}
if (index == 27) {
_root.Model.gotoAndPlay("RBStand");
_root.Controller.gotoAndPlay("Repeat");
}
if (index == 28) {
All2MessageShow("Section 2 : Battle With Enemy >>>");
}
if (index == 32) {
CreateEnemy(-1, 1, 300, 180);
}
if (index == 39) {
_root.tutEnemyNum = 2;
CreateEnemy(-1, 1, 300, 150);
CreateEnemy(-1, 1, 350, 150);
_root.phase2Enemy = 2;
}
if (index == 48) {
All2MessageShow("Section 3 : Special Attack >>>");
}
if (index == 49) {
_root.Controller.gotoAndPlay("XPress");
}
if (index == 50) {
_root.Controller.gotoAndPlay("Sp1Press");
}
if (index == 51) {
_root.Controller.gotoAndPlay("XRelease");
_root.Model.gotoAndPlay("Sp1");
}
if (index == 52) {
_root.player.sp = 100;
RefreshStatus();
_root.Controller.gotoAndPlay("Sp1PressRepeat");
}
if (index == 53) {
_root.Controller.gotoAndStop(1);
}
if (index == 54) {
All2MessageShow("Section 3 : Status Understanding >>>");
}
if (index == 65) {
All2MessageShow("Section 4 : Items Functions >>>");
}
if (index == 69) {
CreateItem(301, 179, 3);
}
if (index == 84) {
GameOver();
}
_root.tutCurrentIndex = index;
if ((index == 6) and (_root.tutIndex == 0)) {
_root.tutPause = true;
_root.tutCurrentIndex = 6;
}
if ((index == 19) and (_root.tutIndex == 0)) {
_root.tutPause = true;
_root.tutCurrentIndex = 19;
}
if ((index == 26) and (_root.tutIndex == 2)) {
_root.tutPause = true;
_root.tutCurrentIndex = 26;
}
if ((index == 32) and (_root.tutIndex == 4)) {
_root.tutPause = true;
_root.tutCurrentIndex = 32;
}
if ((index == 39) and (_root.tutIndex == 6)) {
_root.tutPause = true;
_root.tutCurrentIndex = 39;
}
if ((index == 52) and (_root.tutIndex == 8)) {
_root.tutPause = true;
_root.tutCurrentIndex = 52;
}
if ((index == 54) and (_root.tutIndex == 10)) {
_root.tutPause = true;
_root.tutCurrentIndex = 54;
}
if ((index == 56) and (_root.tutIndex == 12)) {
_root.tutPause = true;
_root.tutCurrentIndex = 56;
}
if ((index == 58) and (_root.tutIndex == 14)) {
if (_root.statusLoc == "Spell") {
_root.tutIndex = 16;
clearInterval(_root.clearMessage);
AllMessageSet(58, _root.arenaMessage.length);
} else {
_root.tutPause = true;
_root.tutCurrentIndex = 58;
}
}
if ((index == 61) and (_root.tutIndex == 16)) {
_root.tutPause = true;
_root.tutCurrentIndex = 61;
}
if ((index == 63) and (_root.tutIndex == 18)) {
_root.tutPause = true;
_root.tutCurrentIndex = 63;
}
if ((index == 65) and (_root.tutIndex == 20)) {
if (_root.statusLoc == "Items") {
_root.tutIndex = 22;
clearInterval(_root.clearMessage);
AllMessageSet(65, _root.arenaMessage.length);
} else {
_root.tutPause = true;
_root.tutCurrentIndex = 65;
}
}
if ((index == 72) and (_root.tutIndex == 22)) {
_root.tutPause = true;
_root.tutCurrentIndex = 72;
}
if ((index == 75) and (_root.tutIndex == 24)) {
_root.tutPause = true;
_root.tutCurrentIndex = 75;
}
if ((index == 76) and (_root.tutIndex == 26)) {
_root.tutPause = true;
_root.tutCurrentIndex = 76;
}
if (_root.tutPause) {
_root.Message_Title.AllMessage._visible = true;
_root.Message_Title.AllMessage.text = _root.arenaMessage[index];
_root.tutIndex = _root.tutIndex + 1;
_root.ZUpStartCheck = true;
} else if (index == maxIndex) {
clearInterval(_root.allMessages);
_root.Message_Title.AllMessage._visible = false;
} else {
delay = ((_root.arenaMessage[index].length * _root.tutSkipDelay) + 500) * _root.tutMessageSpeed;
_root.Message_Title.AllMessage._visible = true;
_root.Message_Title.AllMessage.text = _root.arenaMessage[index];
_root.allMessages = setInterval(AllMessageView, delay, index, maxIndex);
}
}
function All2MessageShow(caption) {
clearInterval(_root.clearMessage);
_root.Message_Title.Message.text = caption;
_root.Message_Title.MessageBack._visible = true;
delay = (caption.length * 50) + 1000;
_root.clearMessage = setInterval(Clear2Message, delay);
}
function Clear2Message() {
clearInterval(_root.clearMessage);
_root.Message_Title.Message.text = "";
_root.Message_Title.MessageBack._visible = false;
if (_root.waitWisemanDialog) {
CheckDialogIndex(_root.targetedShop);
}
if (_root.waitBossDialog) {
BossDialog(_root.targeted);
}
}
function AllMessageView(index, maxIndex) {
clearInterval(_root.allMessages);
AllMessageSet(index, maxIndex);
}
function MessageShow(caption) {
_root.player.Message.text = caption;
}
function EnemyMessageShow(unit, caption) {
unit.Message.Message.text = caption;
}
function PlayerDamageMessage(caption) {
if ((caption * 0) == 0) {
caption = int(caption);
}
_root.player.DamageMessage.text = caption;
_root.player.DamageMessage.move = true;
}
function DetectAlpha() {
if ((!_root.waitBossDialog) and (!_root.waitWisemanDialog)) {
if (_root.Status.hitTest(_root.player._x, _root.player._y, true)) {
if (_root.Status._alpha > 0) {
_root.Status._alpha = _root.Status._alpha - _root.alphaSpeed;
} else {
_root.Status._visible = false;
}
} else if (_root.Status._alpha < 100) {
_root.Status._visible = true;
_root.Status._alpha = _root.Status._alpha + _root.alphaSpeed;
}
}
}
function MoveStatus(pos) {
switch (pos) {
case true :
_root.statusShow = false;
_root.Status.y = _root.statusCloseY;
_root.statusMove = true;
_root.statusDir = 0;
_root.Status.Btn_CloseStatus.gotoAndStop("Up");
return;
case false :
_root.statusShow = true;
_root.Status.y = _root.statusDefY;
_root.statusMove = true;
_root.statusDir = 1;
_root.Status.Btn_CloseStatus.gotoAndStop("Down");
}
}
function ScoreCheck() {
_root.rankScr = "Beginner";
}
function DepthSwapping() {
_root.player.swapDepths(_root.playerDepth);
}
function MissleDetecting(enemy) {
enemyMissleRangeX = ((enemy.Missle._x + enemy._x) + enemy.Boomerang._x) - _root.player._x;
enemyMissleRangeY = ((enemy.Missle._y + enemy._y) + enemy.Boomerang._y) - _root.player._y;
if (enemyMissleRangeX > 5) {
enemy.Missle._x = enemy.Missle._x - enemy.missleSpeed;
} else if (enemyMissleRangeX < -5) {
enemy.Missle._x = enemy.Missle._x + enemy.missleSpeed;
} else {
enemy.targetLockX = true;
}
if (enemyMissleRangeY > 5) {
enemy.Missle._y = enemy.Missle._y - enemy.missleSpeed;
} else if (enemyMissleRangeY < -5) {
enemy.Missle._y = enemy.Missle._y + enemy.missleSpeed;
} else {
enemy.targetLockY = true;
}
if (enemy.targetLockX and enemy.targetLockY) {
MissleAttackPlayer(enemy);
}
}
function MoreMissleDetecting(enemy) {
for (i in enemy.missleArray) {
enemyMissleRangeX = ((enemy.missleArray[i]._x + enemy.Boomerang._x) + enemy._x) - _root.player._x;
enemyMissleRangeY = ((enemy.missleArray[i]._y + enemy.Boomerang._y) + enemy._y) - _root.player._y;
if (enemyMissleRangeX > 5) {
enemy.missleArray[i]._x = enemy.missleArray[i]._x - enemy.missleSpeed;
} else if (enemyMissleRangeX < -5) {
enemy.missleArray[i]._x = enemy.missleArray[i]._x + enemy.missleSpeed;
} else {
enemy.missleArray[i].targetLockX = true;
}
if (enemyMissleRangeY > 5) {
enemy.missleArray[i]._y = enemy.missleArray[i]._y - enemy.missleSpeed;
} else if (enemyMissleRangeY < -5) {
enemy.missleArray[i]._y = enemy.missleArray[i]._y + enemy.missleSpeed;
} else {
enemy.missleArray[i].targetLockY = true;
}
if (enemy.missleArray[i].targetLockX and enemy.missleArray[i].targetLockY) {
MoreMissleAttackPlayer(enemy, i);
}
}
}
function MissleAttackPlayer(enemy) {
enemyMissleRangeX = (enemy.Missle._x + enemy._x) - _root.player._x;
enemyMissleRangeY = (enemy.Missle._y + enemy._y) - _root.player._y;
if ((((enemyMissleRangeX > -5) and (enemyMissleRangeX < 5)) and (enemyMissleRangeY > -5)) and (enemyMissleRangeX < 5)) {
hitRatio = (enemy.hit * 100) / _root.player.avo;
hitConfirm = random(hitRatio);
if (hitConfirm >= 10) {
EnemyMessageShow(enemy, "");
dmgDealt = enemy.atp - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
enemy.sp = enemy.sp + 5;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
} else {
EnemyMessageShow(enemy, "miss");
}
} else {
EnemyMessageShow(enemy, "miss");
}
enemy.missleAttacking = false;
enemy.targetLockX = false;
enemy.targetLockY = false;
}
function MoreMissleAttackPlayer(enemy, i) {
enemyMissleRangeX = (enemy.missleArray[i]._x + enemy._x) - _root.player._x;
enemyMissleRangeY = (enemy.missleArray[i]._y + enemy._y) - _root.player._y;
if ((((enemyMissleRangeX > -5) and (enemyMissleRangeX < 5)) and (enemyMissleRangeY > -5)) and (enemyMissleRangeX < 5)) {
hitRatio = (enemy.hit * 100) / _root.player.avo;
hitConfirm = random(hitRatio);
if (hitConfirm >= 10) {
EnemyMessageShow(enemy, "");
dmgDealt = enemy.atp - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
} else {
EnemyMessageShow(enemy, "miss");
}
} else {
EnemyMessageShow(enemy, "miss");
}
delete enemy.missleArray[i];
enemy.missleArray[i].targetLockX = false;
enemy.missleArray[i].targetLockY = false;
}
function MonsHit(unit) {
switch (unit.moveIndex) {
case "11" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y + unit.SpeedY;
unit._x = unit._x + unit.SpeedX;
}
}
break;
case "22" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y - unit.SpeedY;
unit._x = unit._x - unit.SpeedX;
}
}
break;
case "12" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y - unit.SpeedY;
unit._x = unit._x + unit.SpeedX;
}
}
break;
case "21" :
for (i in _root.area) {
if (_root.area[i].hitTest(unit._x, unit._y, true)) {
unit._y = unit._y + unit.SpeedY;
unit._x = unit._x - unit.SpeedX;
}
}
}
enemy.moveIndex = "";
}
function EnemyStatusCheck(unit, hp) {
if (hp <= 0) {
_root.dying = true;
ExpGain(unit);
Die(unit);
return([1]);
}
if (hp > 0) {
unit.Missle.play();
for (i in unit.missleArray) {
unit.missleArray[i].play();
}
unit.play();
return([0]);
}
}
function CreateEnemy(index, enemyIndex, posx, posy, stat, targeted) {
RefreshEnemyIndex();
if (posx) {
numx = posx;
numy = posy;
} else {
numx = random(550);
numy = random(400);
}
if (enemyIndex == -1) {
rndNum = _root.monsterAreaArray[_root.areaIndex].length;
rndIndex = random(rndNum);
nume = _root.monsterAreaArray[_root.areaIndex][rndIndex];
} else {
nume = enemyIndex;
}
stuck = 0;
for (i in _root.buildings) {
if (numy == Math.floor(_root.buildings[i]._y)) {
stuck++;
}
}
if ((_root["FoodEnemy" + nume]._visible and (numy != Math.floor(_root.player._y))) and (stuck == 0)) {
_root.enemyIndexMax = _root.enemyIndexMax + 1;
duplicateMovieClip (_root["FoodEnemy" + nume], "enemy" + _root.enemyIndexMax, _root.enemyIndexMax + 1000);
setProperty("enemy" + _root.enemyIndexMax, _x , numx + 0.3);
setProperty("enemy" + _root.enemyIndexMax, _y , numy + 0.1);
if (targeted == 1) {
_root.targeted = _root["enemy" + _root.enemyIndexMax];
}
for (i in _root.area) {
if (_root.area[i].hitTest(_root["enemy" + _root.enemyIndexMax]._x, _root["enemy" + _root.enemyIndexMax]._y, true)) {
_root["enemy" + _root.enemyIndexMax].removeMovieClip();
return(undefined);
}
}
SetStatus(_root["enemy" + _root.enemyIndexMax], nume);
if (stat) {
switch (stat) {
case 2 :
_root["enemy" + _root.enemyIndexMax].buff[stat] = true;
return;
case 3 :
_root["enemy" + _root.enemyIndexMax].sightRange = 999;
}
}
}
}
function MoveToPlayer(enemy) {
_root.enemyDetectRangeX = _root.player._x - _root.monsters[i]._x;
_root.enemyDetectRangeY = _root.player._y - _root.monsters[i]._y;
if (_root.enemyDetectRangeX > 0) {
enemy._x = enemy._x + enemy.SpeedX;
enemy.moveIndex = "2";
}
if (_root.enemyDetectRangeX < 0) {
enemy._x = enemy._x - enemy.SpeedX;
enemy.moveIndex = "1";
}
if (_root.enemyDetectRangeY > 0) {
enemy._y = enemy._y + enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "2";
}
if (_root.enemyDetectRangeY < 0) {
enemy._y = enemy._y - enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "1";
}
MonsHit(enemy);
}
function EnemyAttackChecking(enemy) {
hitRatio = (enemy.hit * 100) / _root.player.avo;
hitConfirm = random(hitRatio);
enemyDetectRangeX = _root.player._x - enemy._x;
enemyDetectRangeY = _root.player._y - enemy._y;
detectX = Math.sqrt(enemyDetectRangeX * enemyDetectRangeX);
detectY = Math.sqrt(enemyDetectRangeY * enemyDetectRangeY);
if (((((hitConfirm >= 10) and (_root.detectX > enemy.minatkRange)) and (_root.detectX < enemy.atkRange)) and (_root.detectY > enemy.minatkRange)) and (_root.detectY < enemy.atkRange)) {
EnemyMessageShow(enemy, "");
return([enemy]);
}
EnemyMessageShow(enemy, "miss");
return([" "]);
}
function Die(enemy) {
enemy.dying = true;
_root.gamePause = true;
enemy.stop();
enemy.gotoAndPlay("Die");
}
function SetStatus(unit, nume) {
tellTarget (unit) {
buff = new Array();
switch (nume) {
case 1 :
lv = 1;
expGain = 20 * lv;
frc = (2 * lv) + 1;
fcs = (1 * lv) + 1;
vit = (2 * lv) + 1;
spr = (2 * lv) + 1;
kno = (1 * lv) + 1;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = (spr + lv) / 5;
ats = (kno + lv) * 2;
avo = (fcs + lv) * 5;
hit = (fcs + lv) * 2;
hpgen = spr + lv;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 1;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 50;
atkRange = 15;
minatkRange = 0;
mg = 0;
mgRange = 15;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0);
itemChance = new Array(0);
itemQuanMin = new Array(0);
itemQuanMax = new Array(0);
break;
case 4 :
lv = 6;
expGain = 20 * lv;
frc = (1 * lv) + 1;
fcs = (1 * lv) + 1;
vit = (3 * lv) + 2;
spr = (0.5 * lv) + 0;
kno = (2 * lv) + 2;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = (spr + lv) / 5;
ats = (kno + lv) * 2;
avo = (fcs + lv) * 5;
hit = (fcs + lv) * 2;
hpgen = spr + lv;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0.5;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 60;
atkRange = 40;
minatkRange = 0;
mgRange = 30;
mg = 3;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3, 4, 9);
itemChance = new Array(0, 50, 20, 10);
itemQuanMin = new Array(0, 3, 1, 1);
itemQuanMax = new Array(0, 15, 5, 5);
break;
case 9 :
lv = 5;
boss = true;
boss1 = true;
expGain = (20 * lv) * 10;
frc = (2 * lv) + 1;
fcs = (2 * lv) + 1;
vit = (2 * lv) + 1;
spr = (2 * lv) + 1;
kno = (2 * lv) + 1;
hpmax = ((vit * 20) + (lv * 50)) * 3;
mpmax = (kno + lv) * 6;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = (spr + lv) / 5;
ats = (kno + lv) * 2;
avo = (fcs + lv) * 5;
hit = (fcs + lv) * 2;
hpgen = spr + lv;
mpgen = ((spr + kno) + lv) / 4;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hp = hpmax;
mp = mpmax;
speed = 0.5;
SpeedX = _root.veloXbase * speed;
SpeedY = _root.veloYbase * speed;
sightRange = 200;
atkRange = 20;
GoRange = 70;
minGoRange = 0;
minatkRange = 0;
mgRange = 200;
mgHitRange = 40;
mg = 7;
keyItem = true;
index = _root.enemyIndexMax;
_root.monsters[index] = _root["enemy" + _root.enemyIndexMax];
itemCarry = new Array(0, 3);
itemChance = new Array(0, 100);
itemQuanMin = new Array(0, 5);
itemQuanMax = new Array(0, 20);
}
};
}
function RefreshEnemyIndex() {
_root.enemyQuan = 0;
for (i in _root.monsters) {
_root.enemyQuan++;
}
}
function RestoreMove() {
if (!_root.gamePause) {
if ((_root.playerSlash or _root.playerSpMove) or _root.playerMgMove) {
_root.player.play();
if (_root.playerSlash) {
_root.playerWeapon.play();
}
if (_root.playerSpMove) {
_root.player.SpMessage.text = "";
}
if (_root.playerMgMove) {
_root.player.MgMessage.text = "";
}
_root.playerSpMove = false;
_root.playerMgMove = false;
_root.spCasting = false;
_root.playerSpIndex = "";
_root.playerSpUse = false;
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_root.sp2Casting = false;
_root.sp2Target = undefined;
_root.detecting = false;
}
}
}
function CheckDyingInShop(unit) {
for (i in _root.shopArray) {
if (_root.shopArray[i].DetectArea.hitTest(unit._x, unit._y, true)) {
_root.shopArray[i].afraid = true;
_root.shopArray[i].gotoAndPlay("Cry");
}
}
}
function AIScript() {
for (i in _root.monsters) {
_root.enemyDetectRangeX = _root.player._x - _root.monsters[i]._x;
_root.enemyDetectRangeY = _root.player._y - _root.monsters[i]._y;
_root.detectX = Math.sqrt(_root.enemyDetectRangeX * _root.enemyDetectRangeX);
_root.detectY = Math.sqrt(_root.enemyDetectRangeY * _root.enemyDetectRangeY);
if (!_root.monsters[i].buff[2]) {
if ((!_root.monsters[i].moreMissling) and _root.monsters[i].missleAttacking) {
MissleDetecting(_root.monsters[i]);
} else if (_root.monsters[i].moreMissling) {
MoreMissleDetecting(_root.monsters[i]);
}
if (((!_root.monsters[i].attacking) and (!_root.monsters[i].moreMissling)) and (!_root.monsters[i].mgCasting)) {
PassiveMagic(_root.monsters[i]);
if (((((rangeX >= 0) and (rangeX <= _root.monsters[i].mgRange)) and (rangeY >= 0)) and (rangeY <= _root.monsters[i].mgRange)) and (_root.monsters[i].mgRange != undefined)) {
EnemyAttackType(_root.monsters[i], _root.detectX, _root.detectY);
}
if ((((_root.detectX > _root.monsters[i].minatkRange) and (_root.detectX < _root.monsters[i].atkRange)) and (_root.detectY > _root.monsters[i].minatkRange)) and (_root.detectY < _root.monsters[i].atkRange)) {
if (!_root.monsters[i].mgCasting) {
_root.monsters[i].gotoAndPlay("Attack");
_root.monsters[i].attacking = true;
}
} else if ((((_root.detectX > 0) and (_root.detectX < _root.monsters[i].sightRange)) and (_root.detectY > 0)) and (_root.detectY < _root.monsters[i].sightRange)) {
MoveToPlayer(_root.monsters[i]);
}
}
}
}
}
function EnemyMgRangeChecking(enemy) {
enemyDetectRangeX = _root.player._x - enemy._x;
enemyDetectRangeY = _root.player._y - enemy._y;
detectX = Math.sqrt(enemyDetectRangeX * enemyDetectRangeX);
detectY = Math.sqrt(enemyDetectRangeY * enemyDetectRangeY);
if ((((_root.detectX > 0) and (_root.detectX < enemy.mgRange)) and (_root.detectY > 0)) and (_root.detectY < enemy.mgRange)) {
EnemyMessageShow(enemy, "");
return([enemy]);
}
EnemyMessageShow(enemy, "miss");
return([" "]);
}
function MoveToTarget(enemy, targeted) {
_root.enemyDetectRangeX = targeted._x - enemy._x;
_root.enemyDetectRangeY = targeted._y - enemy._y;
if (_root.enemyDetectRangeX > 0) {
enemy._x = enemy._x + enemy.SpeedX;
enemy.moveIndex = "2";
}
if (_root.enemyDetectRangeX < 0) {
enemy._x = enemy._x - enemy.SpeedX;
enemy.moveIndex = "1";
}
if (_root.enemyDetectRangeY > 0) {
enemy._y = enemy._y + enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "2";
}
if (_root.enemyDetectRangeY < 0) {
enemy._y = enemy._y - enemy.SpeedY;
enemy.moveIndex = enemy.moveIndex + "1";
}
MonsHit(enemy);
}
function EnemyAttackType(enemy, rangeX, rangeY) {
if (((!enemy.dying) and (!_root.spCasting)) and (!_root.mgCasting)) {
if ((!enemy.mgCasting) and (!enemy.attacking)) {
switch (enemy.mg) {
case 1 :
if (((enemy.hp * 100) / enemy.hpmax) <= 25) {
enemy.gotoAndPlay("Mg" + "1");
enemy.explodeTime = 1;
enemy.mgCasting = true;
}
return;
case 2 :
if (enemy.sp >= 10) {
enemy.gotoAndPlay("Mg" + "2");
enemy.sp = enemy.sp - 30;
enemy.mgCasting = true;
}
return;
case 3 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.mp >= 20)) {
enemy.gotoAndPlay("Mg" + "3");
enemy.mp = enemy.mp - 20;
enemy.mgCasting = true;
}
return;
case 5 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.sp >= 20)) {
enemy.gotoAndPlay("Mg" + "5");
enemy.sp = enemy.sp - 20;
enemy.mgCasting = true;
}
return;
case 6 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.sp >= 10)) {
enemy.gotoAndPlay("Mg" + "6");
enemy.sp = enemy.sp - 10;
enemy.mgCasting = true;
}
return;
case 7 :
if ((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) {
if ((((rangeX > enemy.minGoRange) and (rangeX < enemy.GoRange)) and (rangeY > enemy.minGoRange)) and (_root.detectY < enemy.GoRange)) {
if ((((rangeX > enemy.minatkRange) and (rangeX < enemy.atkRange)) and (rangeY > enemy.minatkRange)) and (_root.detectY < enemy.atkRange)) {
enemy.mgCasting = false;
} else {
MoveToPlayer(enemy);
}
} else {
enemy.gotoAndPlay("Mg" + "7");
enemy.mgCasting = true;
}
}
return;
case 10 :
if (((((rangeX >= 0) and (rangeX <= enemy.mgRange)) and (rangeY >= 0)) and (rangeY <= enemy.mgRange)) and (enemy.sp >= 100)) {
enemy.gotoAndPlay("Mg" + "10");
enemy.sp = enemy.sp - 100;
enemy.mgCasting = true;
}
return;
default :
enemy.mgCasting = false;
}
}
}
}
function PassiveMagic(enemy) {
if (((!enemy.dying) and (!_root.spCasting)) and (!_root.mgCasting)) {
switch (enemy.mg) {
case 4 :
if ((((enemy.hp * 100) / enemy.hpmax) <= 50) and (enemy.mp >= 10)) {
enemy.gotoAndPlay("Mg" + "4");
enemy.mp = enemy.mp - 10;
enemy.mgCasting = true;
}
return;
case 7 :
if (((((enemy.hp * 100) / enemy.hpmax) <= 50) and (enemy.mp >= 20)) and (!enemy.buff[3])) {
enemy.gotoAndPlay("Mg" + "8");
enemy.mp = enemy.mp - 20;
enemy.mgCasting = true;
}
return;
case 10 :
if (!(enemy.mgCooled and (_root.enemyQuan < _root.enemyNumMax[_root.currentIndex]))) {
break;
}
enemy.mgCooled = false;
enemy.setCooled = setInterval(CooldownMg, enemy.coolTime, enemy);
enemy.gotoAndPlay("Mg" + "9");
enemy.mgCasting = true;
}
}
}
function CooldownMg(enemy) {
clearInterval(enemy.setCooled);
enemy.mgCooled = true;
}
function ReferAttach(caption) {
_root.Message_Refer.ReferText.text = caption;
if (caption != undefined) {
_root.Message_Refer.y = _root.Message_Refer.minY;
_root.Message_Refer.moveUp = true;
_root.Message_Refer.moveDown = false;
} else {
_root.Message_Refer.y = _root.Message_Refer.maxY;
_root.Message_Refer.moveDown = true;
_root.Message_Refer.moveUp = false;
}
}
function ClearRefer() {
_root.Message_Refer.ReferText.text = "";
}
function GameOver() {
_root.playerName = _global.playerName;
ScoreCheck();
_root.Site2_Area.removeMovieClip();
_root.FloorMatA.removeMovieClip();
_root.BMissle.removeMovieClip();
_root.Sp1Anim.removeMovieClip();
_root.SpEffects.removeMovieClip();
_root.Mg1Anim.removeMovieClip();
_root.MgSpark.removeMovieClip();
_root.MgShock.removeMovieClip();
_root.Shock1.removeMovieClip();
_root.Shock2.removeMovieClip();
_root.Shock3.removeMovieClip();
_root.Message_Title.removeMovieClip();
_root.FoodEnemy1.removeMovieClip();
_root.FoodEnemy2.removeMovieClip();
_root.FoodEnemy3.removeMovieClip();
_root.FoodEnemy4.removeMovieClip();
_root.FoodEnemy5.removeMovieClip();
_root.FoodEnemy6.removeMovieClip();
_root.FoodEnemy7.removeMovieClip();
_root.FloorC.removeMovieClip();
_root.ArenaPath.removeMovieClip();
_root.StatueA.removeMovieClip();
_root.DropItem1.removeMovieClip();
_root.DropItem2.removeMovieClip();
_root.DropItem3.removeMovieClip();
_root.DropItem4.removeMovieClip();
_root.DropItem5.removeMovieClip();
_root.DropItem6.removeMovieClip();
_root.DropItem7.removeMovieClip();
_root.DropItem8.removeMovieClip();
_root.DropItem9.removeMovieClip();
_root.DropItem10.removeMovieClip();
_root.DropItem11.removeMovieClip();
_root.DropItem12.removeMovieClip();
_root.DropItem13.removeMovieClip();
_root.DropItem14.removeMovieClip();
_root.Status.removeMovieClip();
_root.Animation_Sp2.removeMovieClip();
_root.ShopBar.removeMovieClip();
_root.Status.removeMovieClip();
_root.Message_Title.removeMovieClip();
_root.Message_Refer.removeMovieClip();
_root.CreateBar.removeMovieClip();
_root.SaveGame_Bar.removeMovieClip();
for (i in _root.pathWay) {
_root.pathWay[i].removeMovieClip();
}
for (i in _root.shopArray) {
_root.shopArray[i].removeMovieClip();
}
for (i in _root.monsters) {
_root.monsters[i].removeMovieClip();
}
for (i in _root.buildings) {
_root.buildings[i].removeMovieClip();
}
for (i in _root.itemsArray) {
_root.itemsArray[i].removeMovieClip();
}
for (i in _root.dropItemArray) {
_root.dropItemArray[i].removeMovieClip();
}
delete _root.shopArray;
delete _root.mg6MonsterArray;
delete _root.dropItemArray;
delete _root.remObjects;
delete _root.itemsArray;
delete _root.buildings;
delete _root.monsters;
delete _root.pathWay;
clearInterval(_root.playerRegenerate);
_root.player.removeMovieClip();
if (!_root.boss2Defeated) {
gotoAndStop (157);
} else {
gotoAndPlay (7);
}
}
function Initialize() {
clearInterval(_root.initCall);
tellTarget (_root.player) {
buff = new Array();
playerArmorNum = new Array();
playerArmorNum = [0, 5, 2];
playerArmorNum[99] = 99999 /* 0x01869F */;
playerWeaponNum = new Array();
playerWeaponNum = [0, 0, 0, 5];
lv = 1;
expmax = 100;
ex = 0;
frc = 5;
fcs = 5;
vit = 5;
spr = 5;
kno = 5;
spmax = ((frc + lv) * 5) + 100;
sp = 0;
ext = 5;
hpmax = (vit * 20) + (lv * 50);
mpmax = (kno + lv) * 6;
hp = hpmax;
mp = mpmax;
atp = (frc + lv) * 2;
dfp = (vit + lv) * 0.4;
spgen = (spr + lv) / 5;
ats = (kno + lv) * 2;
avo = (fcs + lv) * 5;
hit = (fcs + lv) * 2;
hpgen = spr + lv;
mpgen = ((spr + kno) + lv) / 4;
atkRange = 20;
minatkRange = -5;
minspRange = -5;
minPickRange = -5;
pickRange = 20;
spRange = 30;
minsp2Range = 0;
sp2Range = 20;
mg1 = 30;
minmg1 = -mg1;
mg2 = 30;
minmg2 = -mg2;
mg4 = 40;
minmg4 = -mg4;
mg21 = 30;
minmg21 = 0;
mg22 = 30;
minmg22 = mg - 22;
mg41 = 0;
minmg41 = 0;
mg1lv1requireKno = 10;
mg1lv1requireMp = 20;
mg1lv2requireKno = 20;
mg1lv2requireMp = 50;
mg1lv3requireKno = 40;
mg1lv3requireMp = 200;
mg2lv1requireKno = 15;
mg2lv1requireMp = 20;
mg2lv2requireKno = 23;
mg2lv2requireMp = 60;
mg4lv1requireMp = 50;
};
_root.Status.PlayerName.text = _global.playerName;
_root.referSetting = true;
_root.referSettingText = "ON";
AllMessageSet(-1, _root.arenaMessage.length);
_root.Message_Title.swapDepths(500000);
_root.Status.swapDepths(400000);
_root.CreateBar.swapDepths(510000);
_root.ShopBar.swapDepths(520000);
_root.SaveGame_Bar.swapDepths(530000);
_root.player.swapDepths(_root.playerDepth);
_root.playerRegenerate = setInterval(Regenerate, _root.playerRegenDelay);
RefreshStatus();
}
_root.player = _root.Player_SwordUser;
_global.compleText = "";
_root.selfCreateEnable = false;
_root.tutorialRunning = true;
_root.player = _root.Player_SwordUser;
_root.bossScr = 0;
_root.playerDying = false;
_global.playerSuicide = false;
_root.statusPosition = 1;
_root.createTool = false;
_root.CreateBar._visible = false;
_root.playerTrading1Enabled = true;
_root.ShopBar._visible = false;
_root.ShopBar.Casher._visible = false;
_root.shopTool = false;
_root.playerTrading2Enabled = true;
_root.spCasting = false;
_root.sp2Casting = false;
_root.SaveGame_Bar._visible = false;
_root.boss1Clear = false;
_root.targeted = undefined;
_root.powerUpMode = false;
_root.wisemanHelp = false;
_root.key1Pick = false;
_root.sprSwordPick = false;
_root.sprSwordTalked = false;
_root.earthQuaking = false;
_root.earthQuakeNum = 0;
_root.quakeUp = false;
_root.quakeDown = false;
_root.sprSwordPicking = false;
_root.battlingBoss2 = false;
_root.sprSwordTaken = false;
_global.PlayerName = "Beginner";
_root.allowUse = true;
_root.itemsSizeMin = 30;
_root.itemsArray = new Array();
_root.itemsArrayName = new Array();
_root.itemsCostArray = new Array();
_root.itemWeaponArray = new Array();
_root.itemWeaponArray[1] = 14;
_root.itemWeaponArray[2] = 15;
_root.itemWeaponArray[3] = 10;
_root.itemArmorArray = new Array();
_root.itemArmorArray[1] = 12;
_root.itemArmorArray[2] = 11;
_root.itemsCostArray[0] = 1;
_root.itemsCostArray[1] = 15;
_root.itemsCostArray[2] = 30;
_root.itemsCostArray[3] = 1;
_root.itemsCostArray[4] = 2;
_root.itemsCostArray[6] = 75;
_root.itemsCostArray[7] = 120;
_root.itemsCostArray[8] = 3;
_root.itemsCostArray[9] = 5;
_root.itemsCostArray[10] = 0;
_root.itemsCostArray[11] = 120;
_root.itemsCostArray[12] = 180;
_root.itemsCostArray[13] = 0;
_root.itemQuanFull = new Array(99999, 1, 1, 50, 50, 10, 1, 1, 20, 20, 1, 1);
_root.itemsArrayName[0] = "Cash";
_root.itemsArrayName[1] = "Light Vital Drink";
_root.itemsArrayName[2] = "Magic Potion";
_root.itemsArrayName[3] = "Low Sugar Glucose";
_root.itemsArrayName[4] = "Magical Sugar Glucose";
_root.itemsArrayName[5] = "High Quality Glucose";
_root.itemsArrayName[6] = "Battle Drink ";
_root.itemsArrayName[7] = "Sorceror's Source";
_root.itemsArrayName[8] = "99.9% Sugar Glucose";
_root.itemsArrayName[9] = "Mind Glucose";
_root.itemsArrayName[10] = "Spirit Sword";
_root.itemsArrayName[11] = "Wig";
_root.itemsArrayName[12] = "Steel Helmet";
_root.itemsArrayName[13] = "Wiseman Rod";
_root.dropItemArray = new Array();
_global.UnequipWeapon = function (index) {
if (index != 1) {
_root.Status.Picture_Weapon.gotoAndStop(1);
_root.weaponType = 1;
_root.itemsArray[14]--;
_root.player.Sword.gotoAndStop(1);
_root.player.Sword2.gotoAndStop(1);
itemWeapon = _root.itemWeaponArray[index];
_root.itemsArray[itemWeapon]++;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
if (index == 3) {
clearInterval(_root.playerRegenerate);
_root.playerRegenerate = setInterval(Regenerate, 5000);
}
}
};
_global.UnequipArmor = function (index) {
if (index != 0) {
_root.Status.Picture_Armor.gotoAndStop(1);
_root.armorType = 0;
_root.player.Armor1.gotoAndStop(1);
_root.player.Armor2.gotoAndStop(1);
itemArmor = _root.itemArmorArray[index];
_root.itemsArray[itemArmor]++;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
};
_global.ChooseKeyItem = function (obj) {
obj.gotoAndStop(2);
obj.index = 0;
obj.Data.removeMovieClip();
_root.selectHIObj = obj;
_root.selectHotkeyItem = true;
};
_global.ReferSp = function (sp) {
ReferAttach(_root.spArrayRefer[sp.index]);
};
_global.ReferSpIndex = function (sp) {
ReferAttach(_root.spIndexArrayRefer[sp.index]);
};
_global.ReferMg = function (mg) {
ReferAttach(_root.mgArrayRefer[mg.index][mg.lv]);
};
_global.ReferMgIndex = function (mg) {
ReferAttach(_root.mgIndexArrayRefer[mg.index][mg.lv]);
};
_global.ReferItem = function (item) {
ReferAttach(_root.itemsArrayRefer[item.index]);
};
_global.ReferWeapon = function (index) {
ReferAttach(_root.weaponArrayRefer[index]);
};
_global.ReferArmor = function (index) {
ReferAttach(_root.armorArrayRefer[index]);
};
_global.UseItem = function (item, index) {
if (!_root.gamePause) {
if (!_root.selectHotkeyItem) {
if (item != "") {
typed = item.index;
} else {
typed = index;
}
if (_root.itemsArray[typed] != 0) {
switch (typed) {
case 1 :
if (!_root.shopSellReady) {
if (_root.player.hp == _root.player.hpmax) {
All2MessageShow("My HP is full. It is not necessary to use this now.");
} else {
_root.player.hp = _root.player.hp + 200;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim" + typed);
}
} else {
_global.SellItem(typed);
}
break;
case 2 :
if (!_root.shopSellReady) {
if (_root.player.mp == _root.player.mpmax) {
All2MessageShow("My MP is full. It is not necessary to use this now.");
} else {
_root.player.mp = _root.player.mp + 200;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim" + typed);
}
} else {
_global.SellItem(typed);
}
break;
case 3 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 4 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 6 :
if (!_root.shopSellReady) {
if (_root.player.hp == _root.player.hpmax) {
All2MessageShow("My HP is full. It is not necessary to use this now.");
} else {
_root.player.hp = _root.player.hp + 800;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim" + typed);
}
} else {
_global.SellItem(typed);
}
break;
case 7 :
if (!_root.shopSellReady) {
if (_root.player.mp == _root.player.mpmax) {
All2MessageShow("My MP is full. It is not necessary to use this now.");
} else {
_root.player.mp = _root.player.mp + 800;
_root.itemsArray[typed]--;
_root.player.ItemsAnim.gotoAndPlay("Anim" + typed);
}
} else {
_global.SellItem(typed);
}
break;
case 8 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 9 :
if (_root.shopSellReady) {
_global.SellItem(typed);
}
break;
case 10 :
if (!_root.shopSellReady) {
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
clearInterval(_root.playerRegenerate);
_root.playerRegenerate = setInterval(Regenerate, 4000);
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
break;
case 11 :
if (!_root.shopSellReady) {
if (_root.player.vit < item.vit) {
All2MessageShow(("I must have at least " + item.vit) + " VITALITY to equip that.");
} else {
if ((_root.armorType != 0) and (_root.armorType != undefined)) {
remArmor = _root.armorType;
itemArmor = _root.itemArmorArray[remArmor];
_root.itemsArray[itemArmor]++;
}
_root.armorType = item.armorType;
_root.Status.Picture_Armor.gotoAndStop("Type" + item.armorType);
_root.player.Armor1.gotoAndStop("Type" + item.armorType);
_root.player.Armor2.gotoAndStop("Type" + item.armorType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
} else {
_global.SellItem(typed);
}
break;
case 12 :
if (!_root.shopSellReady) {
if (_root.player.vit < item.vit) {
All2MessageShow(("I must have at least " + item.vit) + " VITALITY to equip that.");
} else {
if ((_root.armorType != 0) and (_root.armorType != undefined)) {
remArmor = _root.armorType;
itemArmor = _root.itemArmorArray[remArmor];
_root.itemsArray[itemArmor]++;
}
_root.armorType = item.armorType;
_root.Status.Picture_Armor.gotoAndStop("Type" + item.armorType);
_root.player.Armor1.gotoAndStop("Type" + item.armorType);
_root.player.Armor2.gotoAndStop("Type" + item.armorType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
} else {
_global.SellItem(typed);
}
break;
case 14 :
if (_root.shopSellReady) {
break;
}
if ((_root.weaponType != 0) and (_root.weaponType != undefined)) {
remWeapon = _root.weaponType;
itemWeapon = _root.itemWeaponArray[remWeapon];
_root.itemsArray[itemWeapon]++;
}
_root.weaponType = item.weaponType;
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.player.Sword.gotoAndStop("Stop" + item.weaponType);
_root.player.Sword2.gotoAndStop("Stop" + item.weaponType);
_root.itemsArray[typed]--;
if (statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
RefreshStatus();
}
}
} else {
_root.selectHotkeyItem = false;
_root.selectHIObj.index = item.index;
_root.selectHIObj.usable = item.usable;
if (((_root.selectHIObj.index != undefined) and (_root.selectHIObj.index != 0)) and _root.selectHIObj.usable) {
_root.selectHIObj.gotoAndStop(_root.selectHIObj.index + 2);
if ((_root.tutIndex == 27) and _root.ZUpStartCheck) {
_root.ZUpStartCheck = false;
}
} else {
if (!_root.selectHIObj.usable) {
All2MessageShow(_root.hotKeyRefer[2]);
}
_root.selectHIObj.gotoAndStop(1);
}
}
RefreshStatus();
_root.Status.prevFrame();
_root.Status.nextFrame();
}
};
_root.spLevel = 1;
_root.mg1Lv = 0;
_root.mg2Lv = 0;
_root.sp2Caption = "MIRAGE SLASHER";
_root.sp1Caption = "STEEL STRIKE";
_root.sp2Usage = "\tSP Consume : 150 Attack : 12 Times Attack Usage : Hold X, Press LEFT, RIGHT, UP, DOWN, LEFT, RIGHT, Release X.";
_root.mg1Usage = "\tMP Consume : 20 Attack : SPELL x 1 Usage : Hold C, Press LEFT, DOWN, UP, RIGHT, Release C.";
_root.mg2Usage = "\tMP Consume : 50 Attack : SPELL x 2 Usage : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, Release C.";
_root.mg3Usage = "\tMP Consume : 200 Attack : SPELL x 4 Usage : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, LEFT, RIGHT, Release C.";
_root.mg21Usage = "\tMP Consume : 20 Attack : SPELL x 2 Usage : Hold C, Press UP, UP, DOWN, UP, Release C.";
_root.mg22Usage = "\tMP Consume : 60 Attack : SPELL x 2 x 3 Target Usage : Hold C, Press UP, UP, DOWN, UP, DOWN, UP, Release C.";
_root.mg41Usage = "\tMP Consume : 50 Heal HP : SPIRIT x 2 Usage : Hold C, Press UP, DOWN, LEFT, RIGHT, Release C.";
_root.sp2requireFrc = 30;
_root.sp2requireSp = 150;
_root.sp99Caption = "Cheat: HackBeta (EXP + ?????, HP FULL, MP FULL, SP FULL)";
_root.sp98Caption = "Cheat: HackSword (Sword (ATP + 40) x 2)";
_root.sp97Caption = "Cheat: HackArmor (Armor (DFP ?????))";
_root.sp96Caption = "Cheat: Suicide";
_root.sp2RepeatMax = 5;
_root.spLastIndex = "";
_root.playerSp1Index = "11133";
_root.playerSp2Index = "421342";
_root.playerSp99Index = "41213131";
_root.playerSp98Index = "31323334";
_root.playerSp97Index = "21222324";
_root.playerSp96Index = "42424242";
_root.playerSpIndex = "";
_root.sellRatio = 0.75;
_global.CancelTrading = function () {
_root.playerTrading2Calc = false;
_root.playerTrading3Calc = false;
_root.ShopBar.Casher._visible = false;
};
_global.CheckBuy = function () {
num1 = int(_root.ShopBar.Casher.AmountText.text);
num2 = int(_root.ShopBar.Casher.BalanceText.text);
_root.itemsArray[_root.tradingTarget] = _root.itemsArray[_root.tradingTarget] + num1;
_root.itemsArray[0] = num2;
_root.ShopBar.Casher._visible = false;
_root.Status.gotoAndStop(17);
_root.Status.gotoAndStop("Items");
};
_global.CheckSell = function () {
num1 = int(_root.ShopBar.Casher.AmountText.text);
num2 = int(_root.ShopBar.Casher.BalanceText.text);
_root.itemsArray[_root.tradingTarget] = _root.itemsArray[_root.tradingTarget] - num1;
_root.itemsArray[0] = num2;
_root.ShopBar.Casher._visible = false;
_root.Status.gotoAndStop(17);
_root.Status.gotoAndStop("Items");
};
_global.SellReady = function () {
_root.shopSellReady = true;
if (_root.statusLoc != "Items") {
_root.statusLoc = "Items";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
_root.sellingItem = true;
_root.ShopBar.SellMsg.text = "Please choose an item to be sold";
};
_global.BuyReady = function () {
_root.shopSellReady = false;
_root.playerTrading3Calc = false;
_root.ShopBar.SellMsg.text = "";
_root.sellingItem = false;
};
_global.ReferCost = function (item) {
num = _root.itemsCostArray[item.index];
if (_root.sellingItem) {
num = Math.ceil(num * _root.sellRatio);
}
if (num) {
_root.ShopBar.Message.text = "Cost : " + num;
} else {
_root.ShopBar.Message.text = "Welcome. S to exit.";
}
};
_global.BuyItem = function (item) {
if (_root.sellingItem) {
_global.SellItem(item.index);
} else {
_root.ShopBar.Casher._visible = true;
_root.ShopBar.Casher.ActionText.text = "BUY ITEM : " + _root.itemsArrayName[item.index];
_root.tradingTarget = item.index;
_root.ShopBar.Casher.Message.text = "Please input amount";
_root.ShopBar.Casher.AmountText.text = "1";
_root.playerTrading2Calc = true;
_root.playerTrading3Calc = false;
_root.ShopBar.Casher.CashText.text = _root.itemsArray[0];
_root.ShopBar.Casher.CostText.text = _root.itemsCostArray[item.index];
Selection.setFocus(_root._root.ShopBar.Casher.AmountText);
}
};
_global.SellItem = function (item) {
quan = _root.itemsArray[item];
_root.ShopBar.Casher._visible = true;
_root.ShopBar.Casher.ActionText.text = "SELL ITEM : " + _root.itemsArrayName[item];
_root.tradingTarget = item;
_root.ShopBar.Casher.Message.text = "Please input amount";
_root.ShopBar.Casher.AmountText.text = "0";
_root.playerTrading3Calc = true;
_root.playerTrading2Calc = false;
_root.ShopBar.Casher.CashText.text = _root.itemsArray[0];
_root.ShopBar.Casher.CostText.text = Math.ceil(_root.itemsCostArray[item] * _root.sellRatio);
Selection.setFocus(_root._root.ShopBar.Casher.AmountText);
};
_global.ShopTrading = function (index) {
if (!(index === 1)) {
} else {
All2MessageShow("Welcome to Jelly-Pudding Trading Store !!! Press S to Trade, D to Create Item. ");
_root.playerTrading1 = true;
_root.playerTrading2 = true;
}
};
_global.CheckCreate = function () {
itemA = int(_root.CreateBar.Atext.text);
itemB = int(_root.CreateBar.Btext.text);
itemC = int(_root.CreateBar.Ctext.text);
itemD = int(_root.CreateBar.Dtext.text);
itemNum1 = int(_root.CreateBar.Item1text.text);
itemNum2 = int(_root.CreateBar.Item2text.text);
itemNum3 = int(_root.CreateBar.Item3text.text);
itemNum4 = int(_root.CreateBar.Item4text.text);
if ((((_root.itemsArray[3] >= itemA) and (_root.itemsArray[4] >= itemB)) and (_root.itemsArray[8] >= itemC)) and (_root.itemsArray[9] >= itemD)) {
_root.itemsArray[3] = _root.itemsArray[3] - itemA;
_root.itemsArray[4] = _root.itemsArray[4] - itemB;
_root.itemsArray[8] = _root.itemsArray[8] - itemC;
_root.itemsArray[9] = _root.itemsArray[9] - itemD;
CreateMoreItem(itemNum1, itemNum2, itemNum3, itemNum4);
} else {
SetCreateMessage("Not enough source");
_root.CreateBar.Item1text.text = "0";
_root.CreateBar.Item2text.text = "0";
_root.CreateBar.Item3text.text = "0";
_root.CreateBar.Item4text.text = "0";
}
};
_root.armorType = 0;
_root.weaponType = 1;
_root.playerArmor = _root.player.Armor1;
_root.player.Armor1.gotoAndStop("Type" + _root.armorType);
_root.player.Armor2.gotoAndStop("Type" + _root.armorType);
_root.dead = false;
_root.player.Sword3._visible = false;
_root.player.Sword4._visible = false;
_root.playerSize = 10;
_root.playerSlash = false;
_root.playerFacing = 3;
_global.WeaponSlash = function () {
if (_root.weaponType != 1) {
_root.playerWeapon.gotoAndPlay("Slash" + _root.weaponType);
} else {
_root.playerWeapon.gotoAndPlay("Slash");
}
};
_global.RefreshingStatus = function () {
RefreshStatus();
};
_root.KeyCreate = 68;
_root.KeyMg = 67;
_root.KeyAttack = 90;
_root.KeySp = 88;
_root.KeyShiftItem = 65;
_root.KeyTakeItem = 83;
_root.hotKeyArray = new Array(0, 49, 50, 51, 52, 53, 54);
_root.lastKeyDelay = 150;
_global.WeaponPosition = function () {
if (!_root.spCasting) {
if (_root.playerFacing == 1) {
_root.playerWeapon = _root.player.Sword2;
_root.player.Ef1._visible = false;
_root.player.Ef2._visible = true;
_root.player.Sword._visible = false;
_root.player.Sword2._visible = true;
_root.playerWeapon._x = _root.player.LHand._x;
_root.playerWeapon._y = _root.player.LHand._y;
} else if (_root.playerFacing == 2) {
_root.playerWeapon = _root.player.Sword2;
_root.player.Sword._visible = false;
_root.player.Sword2._visible = true;
_root.player.Ef1._visible = false;
_root.player.Ef2._visible = true;
_root.playerWeapon._x = _root.player.LHand._x;
_root.playerWeapon._y = _root.player.LHand._y;
} else if (_root.playerFacing == 4) {
_root.playerWeapon = _root.player.Sword;
_root.player.Sword2._visible = false;
_root.player.Sword._visible = true;
_root.player.Ef1._visible = true;
_root.player.Ef2._visible = false;
_root.playerWeapon._x = _root.player.RHand._x;
_root.playerWeapon._y = _root.player.RHand._y;
} else {
_root.playerWeapon = _root.player.Sword;
_root.player.Ef1._visible = true;
_root.player.Ef2._visible = false;
_root.player.Sword2._visible = false;
_root.player.Sword._visible = true;
_root.playerWeapon._x = _root.player.RHand._x;
_root.playerWeapon._y = _root.player.RHand._y;
}
} else {
_root.player.Sword._visible = false;
_root.player.Sword2._visible = false;
}
_root.player.Ef1._x = _root.playerWeapon._x;
_root.player.Ef1._y = _root.playerWeapon._y;
_root.player.Ef2._x = _root.playerWeapon._x;
_root.player.Ef2._y = _root.playerWeapon._y;
};
_root.mg1lv = 0;
_root.mg2lv = 0;
_root.mg4lv = 0;
_root.MgLastIndex = "";
_root.mg1Caption = "SPARK";
_root.mg2Caption = "INCENDIARY";
_root.mg3Caption = "PHOENIX";
_root.mg21Caption = "CHARGE";
_root.mg22Caption = "LIGHTNING ZAP";
_root.mg41Caption = "HEAL";
_root.playerMg1Index = "4312";
_root.playerMg2Index = "431213";
_root.playerMg3Index = "43121342";
_root.playerMg21Index = "1131";
_root.playerMg22Index = "113131";
_root.playerMg23Index = "11313111";
_root.playerMg41Index = "1342";
_global.CheckMagic = function (index, lv, maxUnitHit) {
num = 0;
if (index != 0) {
do {
if ((in _root.monsters) == null) {
break;
}
i = in _root.monsters;
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.faceIndex) {
case "LT" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RT" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RB" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case "LB" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((((_root.playerHitRangeX > _root.player["minmg" + lv]) and (_root.playerHitRangeX < _root.player["mg" + lv])) and (_root.playerHitRangeY > _root.player["minmg" + lv])) and (_root.playerHitRangeY < _root.player["mg" + lv])) {
MgChecking(index, _root.monsters[i], lv);
unitHit++;
num++;
}
} while (unitHit != maxUnitHit);
do {
} while ("CheckMagic" != null);
if (num == 0) {
_root.gamePause = false;
RestoreMove();
_global.UnpauseEnemy();
}
_root.playerMgInd = 0;
unitHit = 0;
}
};
_global.HealSpell = function (lv) {
if (!(lv === 1)) {
} else {
dmgDealt = _root.player.spr * 5;
_root.player.hp = _root.player.hp + dmgDealt;
_root.mgCasting = false;
_root.playerMgIndex = "";
_root.playerMgUse = false;
_global.UnpauseEnemy();
_root.playerFacing = _root.faceIndexNum;
RefreshStatus();
}
};
_root.detecting = false;
_root.playerRegenDelay = 5000;
_global.SetUnitStatus = function (unit, index, interval) {
clearInterval(unit.SetFireDelay);
switch (index) {
case 1 :
unit.Ef1.gotoAndPlay("Hack");
unit.Ef2.gotoAndPlay("Hack");
unit.buff[1] = 1;
if (unit == _root.player) {
_root.Status.BuffMsg.text = "PHOENIX FLAME";
}
unit.SetFireDelay = setInterval(_global.RemoveUnitStatus, interval, unit, index);
return;
case 2 :
unit.Ef3.gotoAndPlay("Frost");
unit.Ef4.gotoAndPlay("Frost");
unit.buff[2] = 1;
if (unit == _root.player) {
_root.Status.BuffMsg.text = "FROZEN";
}
unit.SetFrostDelay = setInterval(_global.RemoveUnitStatus, interval, unit, index);
}
};
_global.RemoveUnitStatus = function (unit, index) {
switch (index) {
case 1 :
unit.Ef1.gotoAndStop(1);
unit.Ef2.gotoAndStop(1);
unit.buff[1] = 0;
if (unit == _root.player) {
_root.Status.BuffMsg.text = "";
}
clearInterval(unit.SetFireDelay);
break;
case 2 :
unit.Ef3.gotoAndStop(1);
unit.Ef4.gotoAndStop(1);
unit.buff[2] = 0;
if (unit == _root.player) {
_root.Status.BuffMsg.text = "";
}
clearInterval(unit.SetFrostDelay);
}
RefreshStatus();
};
_root.tutSkipDelay = 60;
_root.tutMessageSpeed = 1;
_root.tutIndex = 0;
_root.messageCheckDelay = 50;
_root.messageSpeed = 3;
_root.defaultMessageY = -20;
_root.defaultExpMessageY = -30;
_root.Message_Title.MessageBack._visible = false;
_root.Message_Refer.minY = _root.Message_Refer._y;
_root.Message_Refer.maxY = 410;
_root.Message_Refer.speed = 5;
_root.Message_Refer._y = _root.Message_Refer.maxY;
_root.Message_Refer.swapDepths(600000);
_root.player.DamageMessage.y = 0;
_root.player.Message.y = 0;
_root.messageStartX = -75;
_root.messageStartY = -38;
_root.arenaMessage = new Array();
_root.arenaMessage[0] = "Hello. Welcome To Sky Guardian : Mountain Of Desserts.";
_root.arenaMessage[1] = "This is the Tutorial section. If you are new in this, then you've come to the right place.";
_root.arenaMessage[2] = "During the tutorial, you will be given some advices and some help on the controller and the game. ";
_root.arenaMessage[3] = "So, please !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Give some attention on this message during the lesson.";
_root.arenaMessage[4] = "As you can see, there is a small green ball standing at the center of the screen. That is your currently using character.";
_root.arenaMessage[5] = "First, we will start from the basic controls. ";
_root.arenaMessage[6] = "Please have the CAPS LOCK toggled, basically meaning that the \"CAPS LOCK\" light on your keyboard lights up. Press \"CAPS LOCK\" on your keyboard to do that.";
_root.arenaMessage[7] = "Allright. Pretend these are the controls on your keyboard.";
_root.arenaMessage[8] = "Up.";
_root.arenaMessage[9] = "Down.";
_root.arenaMessage[10] = "Left.";
_root.arenaMessage[11] = "And Right.";
_root.arenaMessage[12] = "These are the Movement Controls. ";
_root.arenaMessage[13] = "Try to press and your character will move. In some circumstances like spell casting and special attack, your character may not move.";
_root.arenaMessage[14] = "OK, let's know more about basic attacks. Basic attacks do not cost any MP or SP, but techniques of performing are required.";
_root.arenaMessage[15] = "Press or Hold Z to Attack. This is called Basic Slash. Your character might perform triple times damage in Basic Slashes.";
_root.arenaMessage[16] = "Now we will do some advanced move. ";
_root.arenaMessage[17] = "While holding Z, Hold Up too. ";
_root.arenaMessage[18] = "This will do the Advanced Slash. Advanced Slashes deal more damage to the enemies.";
_root.arenaMessage[19] = "Try to do this. Hold Z and Hold Up.";
_root.arenaMessage[20] = "Very well. Let's proceed. ";
_root.arenaMessage[21] = "Now, we'll try more powerful attack. ";
_root.arenaMessage[22] = "While holding Z, Hold up. ";
_root.arenaMessage[23] = "When your character started to do Advanced Attack, ";
_root.arenaMessage[24] = "do not release the Key Z. ";
_root.arenaMessage[25] = "Hold Down and Hold Key Z, and your character will perform Jump Strike. ";
_root.arenaMessage[26] = "This is the whole process. Try to do this. ";
_root.arenaMessage[27] = "Excellent! That's all for basic attacks. ";
_root.arenaMessage[28] = "Now we are going to face some enemies. ";
_root.arenaMessage[29] = "REMEMBER----- The enemy you are attacking ONLY receives damage IF the damage integer appears on that enemy. Basic attacks may miss, but Special Attacks will not.";
_root.arenaMessage[30] = "You can attack with CAPS LOCK toggled. Without CAPS LOCK toggled, you may run faster but attacking or magic casting is not allowed.";
_root.arenaMessage[31] = "So, a monster is approaching. The pal trainee of fantastic Juniors, Creamy Bomb, be careful of it's explosion in Story Mode...";
_root.arenaMessage[32] = "Go ahead and attack it! ";
_root.arenaMessage[33] = "Good! What a great job! ";
_root.arenaMessage[34] = "Look at the bottom. This indicates your status. ";
_root.arenaMessage[35] = "Try to click on the buttons at the upper right of the Status Bar. This will cause a change on it. ";
_root.arenaMessage[36] = "Do you notice that there is a gauge labeled HP ? HP means your life points (hit points). ";
_root.arenaMessage[37] = "HP will decrease every time you get hurt when fighting with monsters. This Game is over if it reaches 0. ";
_root.arenaMessage[38] = "Oh, more monsters are approaching. There are a gang of Creamy Bombs looking for their pal. ";
_root.arenaMessage[39] = "Defeat them all! Good Luck ... ";
_root.arenaMessage[40] = "Wow! Amazing!";
_root.arenaMessage[41] = "Did you notice the appearance of \"EXP + 20\" when you kill the monsters ?";
_root.arenaMessage[42] = "That is your EXPERIENCE POINT. When EXP at the status bar maxout, your level will increase. The increment of your level will cause your character to become stronger. ";
_root.arenaMessage[43] = "Now is the time for Special Attack, the favourite moves of FORCE based users. FORCE based users have a huge amount of FORCE. ";
_root.arenaMessage[44] = "Did you notice that your SP increases everytime you hit an enemy ? The increment of SP depends on the SP REGEN of your character. ";
_root.arenaMessage[45] = "When the SP matches specific condition, you may perform Special Attacks that were learnt. ";
_root.arenaMessage[46] = "You now have only one type of Special Attack, that is Steel Strike.";
_root.arenaMessage[47] = "Steel Strike : Strike all foes in range, 5 times damage multiple. SP consume : 100 ";
_root.arenaMessage[48] = "All right, let's begin. ";
_root.arenaMessage[49] = "While Holding X (do not release Key X),";
_root.arenaMessage[50] = "Press UP, UP, UP, DOWN, DOWN. ";
_root.arenaMessage[51] = "Release X, and your character will perform Steel Strike. ";
_root.arenaMessage[52] = "Go ahead and try it. While Holding X, Press UP, UP, UP, DOWN, DOWN, then Release X. ";
_root.arenaMessage[53] = "Looks like you had mastered the Steel Strike technique. ";
_root.arenaMessage[54] = "Now we're going to look at the Status. Try to switch to the \"ATTRIBUTES\" tab by clicking the second button on the upper right of the Status Bar.";
_root.arenaMessage[55] = "The circle on the lower right shows the attribute points left that can be added to your status. ";
_root.arenaMessage[56] = "Try to add KNOWLEDGE by clicking the button next to the label \"KNOWLEDGE\" to 10";
_root.arenaMessage[57] = "All right! You now have the Spell, SPARK!!! Well, Spells too are powerful moves and were known as the everyday meals of KNOWLEDGE based users.";
_root.arenaMessage[58] = "Try to shift to the \"SPELL\" tab by clicking the forth button on the upper right of the Status Bar";
_root.arenaMessage[59] = "Now you can see many gridboxes on the right of the Status bar, and Labels of Elements and Level on the left.";
_root.arenaMessage[60] = "When you hover your mouse over the Fire Symbol at the first grid, the Reference bar will pop up.";
_root.arenaMessage[61] = "Click on the Fire Symbol of the first box.";
_root.arenaMessage[62] = "The Referrence bar changed its title into Method. The Method shows how the ability can be performed by pressing keyboard buttons.";
_root.arenaMessage[63] = "Let's perform the SPARK Spell. Try to perform SPARK with the Method given.";
_root.arenaMessage[64] = "Let's proceed. We're going to look at the items function.";
_root.arenaMessage[65] = "Shift to the \"INVENTORY\" tab by clicking the fifth button on the upper right of the Status Bar";
_root.arenaMessage[66] = "The left column shows the equipment of yours. You can hover your mouse over to view Reference, or click on it to remove.";
_root.arenaMessage[67] = "The boxes on the right indicates your Items. To use item, click on the item that you wish to use. ";
_root.arenaMessage[68] = "You can also shift to \"INVENTORY\" Bar by Pressing Key A on your Keyboard.";
_root.arenaMessage[69] = "But then, we can also...";
_root.arenaMessage[70] = "Whoa! What was that? Oh ok, it's fine. It is a Glucose dropped by enemy.";
_root.arenaMessage[71] = "You may pick up items by Pressing S in front of the item you wish to pick.";
_root.arenaMessage[72] = "Pick up the Glucose by Pressing S in front of it, of course, in the correct direction.";
_root.arenaMessage[73] = "Notice that the third box is now contained with the item you had just picked. The item's quantity is displayed on the lower right of the icon.";
_root.arenaMessage[74] = "To use the hotkeys at the right, you must Set the items to use when you pressed the hotkey specified.";
_root.arenaMessage[75] = "Click on any box on the \"HOTKEYS\" tab.";
_root.arenaMessage[76] = "The box selected at the \"HOTKEY\" tab turned into blue colour. Now, simply click on the items you wish to Set Hotkey on.";
_root.arenaMessage[77] = "Now the Hotkey is set for current item. You cannot use Hotkey without matching these two conditions: ";
_root.arenaMessage[78] = "1. The \"INVENTORY\" tab must be shown at the Status Bar.\n2. Your character must not perform any action when Hotkey is pressed.";
_root.arenaMessage[79] = "Which means you must not press anything or move anywhere when you are pressing Hotkey to use item.";
_root.arenaMessage[80] = "If you wish to activate the Hotkey, simply press on one button from the row of Number Buttons(The second row of buttons at the top of your keyboard) to use item.";
_root.arenaMessage[81] = "Well, the Tutorial is going to complete.";
_root.arenaMessage[82] = "Try to find out more in the Story Mode. It may be fun.";
_root.arenaMessage[83] = "-----Until then, GOOD BYE ^_^-----";
_root.arenaMessage[84] = "";
_global.ShowMessage = function (caption) {
All2MessageShow(caption);
};
_global.TotalDamage = function (enemy) {
totalDmg = -enemy.hpTemp;
_root.totalDmg = totalDmg;
_root.sp2Target = undefined;
SpChecking(9, enemy);
};
_root.SaveGame_Bar.DataSlot1.index = 1;
_root.SaveGame_Bar.DataSlot2.index = 2;
_root.SaveGame_Bar.DataSlot3.index = 3;
_root.SaveGame_Bar.DataSlot4.index = 4;
_root.SaveGame_Bar.DataSlot5.index = 5;
_global.SaveGameData = function (slotName, slot) {
};
_root.quality = 3;
_root.alphaSpeed = 8 + ((1 - _root.animSetting) * 100);
_root.alphaStatus = true;
_root.statusShow = true;
_root.statusMoveSpeed = 5;
_root.statusDefY = _root.Status._y;
_root.statusCloseY = 439;
_root.screenXMax = 510.2;
_root.screenXMin = 40.4;
_root.screenYMax = 360.2;
_root.screenYMin = 40.3;
_root.bossScr = 0;
_root.gamePause = false;
_root.veloXbase = 2;
_root.veloYbase = 1;
_root.speedXFactor = 1;
_root.speedYFactor = _root.speedXFactor;
_root.veloSpeedX = _root.veloXbase * _root.speedXFactor;
_root.veloSpeedY = _root.veloYbase * _root.speedYFactor;
fscommand ("hideMenu", true);
_global.EarthQuake = function () {
_root.earthQuakeNum = 5;
_root.earthQuaking = true;
_root.quakeUp = true;
};
_global.ToggleRefer = function () {
if (_root.referSetting) {
_root.referSettingText = "ON";
} else {
_root.referSettingText = "OFF";
}
_root.Message_Refer._visible = _root.referSetting;
_root.Status.Btn_Refer.ReferText.text = _root.referSettingText;
};
_global.ToggleQuality = function () {
switch (_root.quality) {
case 1 :
_quality = "LOW";
break;
case 2 :
_quality = "MEDIUM";
break;
case 3 :
_quality = "HIGH";
break;
case 4 :
_quality = "BEST";
}
_root.Status.Btn_Quality.QualityText.text = _quality;
};
_global.UnpauseEnemy = function () {
dieNum = 0;
for (i in _root.monsters) {
dieIndex = EnemyStatusCheck(_root.monsters[i], _root.monsters[i].hp);
dieNum = dieNum + dieIndex[0];
}
if (dieNum == 0) {
_root.dying = false;
_root.gamePause = false;
}
};
_root.mg6MonsterArray = new Array();
_root.enemyQuan = 0;
_root.monsters = new Array();
_root.enemyIndexMax = 0;
_global.AttackPlayer = function (enemy) {
targetingUnit = EnemyAttackChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = enemy.atp - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
AddSp(enemy);
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
};
_global.MissleAttackPlayer = function (enemy, num) {
if (num) {
if (!(num === 1)) {
} else {
enemy.missleArray = new Array();
enemy.moreMissling = true;
}
enemy.missleArray.push(enemy.Boomerang["Missle" + num]);
} else {
enemy.missleAttacking = true;
}
};
_global.RestoreMove = function () {
RestoreMove();
};
_global.RemoveUnit = function (unit) {
_root.tutEnemyNum--;
if (unit.index == 1) {
_root.ZupStartCheck = false;
_root.tutIndex = 5;
}
if ((_root.tutEnemyNum == 0) and (_root.tutIndex == 7)) {
_root.ZupStartCheck = false;
_root.tutIndex = 7;
}
CheckDyingInShop(unit);
if (unit.boss1) {
_root.boss1Clear = true;
}
if (unit.boss2) {
_root.gamePause = true;
_root.boss2Defeated = true;
GameOver();
}
DropItems(unit);
delete _root.monsters[unit.index];
unit.removeMovieClip();
_global.UnpauseEnemy();
RefreshEnemyIndex();
RestoreMove();
if (_root.enemyQuan == 100) {
if (_root.player.lv <= 3) {
CreateEnemy(-1, -1);
} else {
GameOver();
}
}
};
_global.Suicide = function (unit) {
unit.hp = 0;
unit.dying = true;
_root.gamePause = true;
_global.RemoveUnit(unit);
};
_global.AttackPlayerMg = function (enemy, mgType, lv) {
switch (mgType) {
case 1 :
targetingUnit = EnemyAttackChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = (enemy.ats * 5) - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 2 :
targetingUnit = EnemyAttackChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = (enemy.atp * 3) - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 3 :
targetingUnit = EnemyMgRangeChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = enemy.ats - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 4 :
dmgDealt = enemy.ats * 2;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.hp = enemy.hp + dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
EnemyMessageShow(enemy, "+" + dmgDealt);
enemy.mgCasting = false;
return;
case 6 :
PlayerDieCheck();
enemy.mgCasting = false;
return;
case 7 :
trangeX = (enemy._x + enemy.PMissle._x) - _root.player._x;
trangeY = (enemy._y + enemy.PMissle._y) - _root.player._y;
mrangeX = Math.sqrt(trangeX * trangeX);
mrangeY = Math.sqrt(trangeY * trangeY);
if ((((mrangeX >= 0) and (mrangeX <= enemy.mgHitRange)) and (mrangeY >= 0)) and (mrangeY <= enemy.mgHitRange)) {
dmgDealt = enemy.ats - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
return;
case 8 :
dmgDealt = enemy.ats;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
enemy.Ef5.gotoAndPlay("Anger");
enemy.buff[3] = true;
enemy.atp = enemy.atp + dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
EnemyMessageShow(enemy, "ATP +" + dmgDealt);
enemy.mgCasting = false;
return;
case 9 :
CreateEnemy(-1, -1, _root.targeted._x + 1.3, _root.targeted._y - 1.3, 3);
CreateEnemy(-1, -1, _root.targeted._x - 1.3, _root.targeted._y, 3);
CreateEnemy(-1, -1, _root.targeted._x, _root.targeted._y + 1.3, 3);
enemy.mgCasting = false;
return;
case 10 :
targetingUnit = EnemyMgRangeChecking(enemy);
if (targetingUnit[0] != " ") {
dmgDealt = (enemy.ats * 2) - _root.player.dfp;
if (dmgDealt <= 1) {
dmgDealt = 1;
}
_root.player._x = 500;
_root.player._y = 370;
_root.player.hp = _root.player.hp - dmgDealt;
_root.player.DamageMessage.y = 0;
_root.player.DamageMessage._y = _root.defaultMessageY;
_root.player.DamageMessage._alpha = 100;
PlayerDamageMessage("-" + dmgDealt);
PlayerDieCheck();
}
enemy.mgCasting = false;
}
};
_root.statusLoc = "Profile";
_root.SaveGame_Bar.Btn_Apply.onRelease = function () {
i = 1;
while (i < 6) {
_root.SaveGame_Bar["DataSlot" + i].gotoAndStop(1);
i++;
}
_root.gamePause = false;
_global.UnpauseEnemy();
_root.SaveGame_Bar._visible = false;
};
_root.Btn_CloseMessage.onRelease = function () {
clearInterval(_root.allMessages);
this._visible = false;
_root.Message_Title._visible = false;
};
_root.Status.Btn_pAttributes.onRelease = function () {
if (_root.statusLoc != "Attributes") {
_root.statusLoc = "Attributes";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
if (_root.tutIndex == 11) {
_root.ZUpStartCheck = false;
}
};
_root.Status.Btn_pAttributes.onRollOver = function () {
_root.Status.Btn_pAttributes.gotoAndPlay(2);
};
_root.Status.Btn_pAttributes.onRollOut = function () {
_root.Status.Btn_pAttributes.gotoAndPlay(1);
};
_root.Status.Btn_Spell.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Spell") {
_root.statusLoc = "Spell";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
if ((_root.tutIndex == 15) and _root.ZUpStartCheck) {
_root.ZUpStartCheck = false;
}
};
_root.Status.Btn_Spell.onRollOver = function () {
_root.Status.Btn_Spell.gotoAndPlay(2);
};
_root.Status.Btn_Spell.onRollOut = function () {
_root.Status.Btn_Spell.gotoAndPlay(1);
};
_root.Status.Btn_Special.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Special") {
_root.statusLoc = "Special";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Special.onRollOver = function () {
_root.Status.Btn_Special.gotoAndPlay(2);
};
_root.Status.Btn_Special.onRollOut = function () {
_root.Status.Btn_Special.gotoAndPlay(1);
};
_root.Status.Btn_Items.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Items") {
_root.statusLoc = "Items";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
if (_root.tutIndex == 21) {
_root.ZUpStartCheck = false;
}
};
_root.Status.Btn_Items.onRollOver = function () {
_root.Status.Btn_Items.gotoAndPlay(2);
};
_root.Status.Btn_Items.onRollOut = function () {
_root.Status.Btn_Items.gotoAndPlay(1);
};
_root.Status.Btn_Options.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Options") {
_root.statusLoc = "Options";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Options.onRollOver = function () {
_root.Status.Btn_Options.gotoAndPlay(2);
};
_root.Status.Btn_Options.onRollOut = function () {
_root.Status.Btn_Options.gotoAndPlay(1);
};
_root.Status.Btn_Profile.onRelease = function () {
if (!_root.gamePause) {
if (_root.statusLoc != "Profile") {
_root.statusLoc = "Profile";
_root.Status.gotoAndPlay("Anim1");
_global.RefreshingStatus();
}
}
};
_root.Status.Btn_Profile.onRollOver = function () {
_root.Status.Btn_Profile.gotoAndPlay(2);
};
_root.Status.Btn_Profile.onRollOut = function () {
_root.Status.Btn_Profile.gotoAndPlay(1);
};
_root.Status.Btn_CloseStatus.onRelease = function () {
MoveStatus(_root.statusShow);
};
_root.statArrayRefer = new Array();
_root.calcArrayRefer = new Array();
_root.weaponArrayRefer = new Array();
_root.weaponArrayRefer[0] = "Nothing. You haven't equip anything. ";
_root.weaponArrayRefer[1] = "Trainee Sword : A sword for beginner. Suitable to any user. ";
_root.weaponArrayRefer[2] = "Hack Sword : The sword that comes with a Cheat. Please don't make this a habit... ";
_root.weaponArrayRefer[3] = "Spirit Sword : The sword that had trapped the mountain spirits for centuries. ATTACK +5, Regen Speed 4 Seconds. ";
_root.hotKeyRefer = new Array();
_root.hotKeyRefer[1] = "Set Hotkey : Click on one of the items to be set. Press A to cancel.";
_root.hotKeyRefer[2] = "Unable to Set Hotkey : Current selection is unusable item. ";
_root.itemsArrayRefer = new Array();
_root.itemsArrayRefer[1] = _root.itemsArrayName[1] + " : Restore HP by 200. Gone after use.";
_root.itemsArrayRefer[2] = _root.itemsArrayName[2] + " : Restore MP by 200. Gone after use.";
_root.itemsArrayRefer[3] = _root.itemsArrayName[3] + " : Source. Glucose in low sugar. Can be sold or use to create Item.";
_root.itemsArrayRefer[4] = _root.itemsArrayName[4] + " : Source. Glucose in green colour. Can be sold or use to create Item.";
_root.itemsArrayRefer[5] = _root.itemsArrayName[5] + " : Source. The best glucose of all. Can be sold at high price or use to create powerful Item.";
_root.itemsArrayRefer[6] = _root.itemsArrayName[6] + " : Restore HP by 800. Gone after use.";
_root.itemsArrayRefer[7] = _root.itemsArrayName[7] + " : Restore MP by 800. Gone after use.";
_root.itemsArrayRefer[8] = _root.itemsArrayName[8] + " : Source. 99.9% pure Glucose. Can be sold or use to create Item.";
_root.itemsArrayRefer[9] = _root.itemsArrayName[9] + " : Source. Rare Magical Glucose. Can be sold or use to create Item.";
_root.itemsArrayRefer[10] = _root.weaponArrayRefer[3];
_root.itemsArrayRefer[14] = _root.weaponArrayRefer[1];
_root.armorArrayRefer = new Array();
_root.armorArrayRefer[0] = "Nothing. You haven't equip anything. ";
_root.armorArrayRefer[1] = "Steel Helmet : A strong helmet made of steel, DEFEND + 5, 40 VITALITY is required.";
_root.armorArrayRefer[2] = "Wig : DEFEND + 2, 15 VITALITY is required.";
_root.armorArrayRefer[99] = "SHI... : No way! I'm not going to complete this name -_-||...";
_root.spArrayRefer = new Array();
_root.mgArrayRefer = new Array();
_root.spArrayRefer[0] = "STEEL STRIKE : Strike all foes in range. Damage x 5, SP Consume 100";
_root.spArrayRefer[1] = "MIRAGE SLASHER : Create 4 mirages and do damage to 1 enemy. Damage x 12, SP Consume 150";
_root.mgArrayRefer[1] = [[""], ["SPARK : Create Fire and do damage to enemies around user. SPELL x 1, MP Consume 20"], ["INCENDIARY : Create Explosion and do damage to enemies around user. SPELL x 1.5, MP Consume 50"], ["PHOENIX : After Phoenix attacked, special attack burst to 150%. SPELL x 4, MP Consume 200"]];
_root.mgArrayRefer[2] = [[""], ["CHARGE : User's sword charged with lightning does damage to 1 enemy. SPELL x 2, MP Consume 20"], ["LIGHTNING ZAP : 3 lightning strikes to enemies in range. SPELL x 2 x 3, MP Consume 60"]];
_root.mgArrayRefer[4] = [[""], ["HEAL : A unique spell taught by the Wiseman. Can recover HP. HP + (SPIRIT x 5), MP Consume 50"]];
_root.spIndexArrayRefer = new Array();
_root.mgIndexArrayRefer = new Array();
_root.spIndexArrayRefer[0] = "Method : Hold X, Press UP, UP, UP, DOWN, DOWN, Release X";
_root.spIndexArrayRefer[1] = "Method : Hold X, Press LEFT, RIGHT, UP, DOWN, LEFT, RIGHT, Release X";
_root.mgIndexArrayRefer[1] = [[""], ["Method : Hold C, Press LEFT, DOWN, UP, RIGHT, Release C"], ["Method : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, Release C"], ["Method : Hold C, Press LEFT, DOWN, UP, RIGHT, UP, DOWN, LEFT, RIGHT, Release C"]];
_root.mgIndexArrayRefer[2] = [[""], ["Method : Hold C, Press UP, UP, DOWN, UP, Release C"], ["Method : Hold C, Press UP, UP, DOWN, UP, DOWN, UP, Release C"]];
_root.mgIndexArrayRefer[4] = [[""], ["Method : Hold C, Press UP, DOWN, LEFT, RIGHT Release C"]];
_root.itemsArrayRefer[11] = _root.armorArrayRefer[2];
_root.itemsArrayRefer[12] = _root.armorArrayRefer[1];
_root.itemsArrayRefer[13] = "WISEMAN ROD : A weird rod lost by the oldman that stays near the Waterfall. ";
_root.statArrayRefer[1] = "ATTACK : Your normal damage dealt to enemy. Number after \"+\" indicates your equipment bonus.";
_root.statArrayRefer[2] = "DEFEND : Your resistance to enemy's attack. Number after \"+\" indicates your equipment bonus.";
_root.statArrayRefer[3] = "HIT RATIO : Dexterity or chance to hit enemy. Higher HIT RATIO gives less chance to do miss attack.";
_root.statArrayRefer[4] = "AVOIDANCE : Chance to avoid an attack. Higher AVOIDANCE gives more chance to avoid an attack.";
_root.statArrayRefer[5] = "SPELL : Magical attack damage or Heal spell factor. Higher SPELL causes heavier magical attack damage.";
_root.statArrayRefer[6] = "HP REGEN : Your Hit Point regeneration rate. The higher HP REGEN the more HP recovers every 5 seconds.";
_root.statArrayRefer[7] = "MP REGEN : Your Mana Point regeneration rate. The higher MP REGEN the more MP recovers every 5 seconds.";
_root.statArrayRefer[8] = "SP GAIN : Your special attack point gain rate with each normal attack.";
_root.calcArrayRefer[1] = "ATTACK = (FORCE + LEVEL) x 2 + WEAPON EFFECT";
_root.calcArrayRefer[2] = "DEFEND = (VITALITY + LEVEL) x 0.4 + ARMOUR EFFECT";
_root.calcArrayRefer[3] = "HIT RATIO = (FOCUS + LEVEL) x 2";
_root.calcArrayRefer[4] = "AVOIDANCE = (FOCUS + LEVEL) x 2";
_root.calcArrayRefer[5] = "SPELL = (KNOWLEDGE + LEVEL) x 2 x EFFECT";
_root.calcArrayRefer[6] = "HP REGEN : (SPIRIT + LEVEL)";
_root.calcArrayRefer[7] = "MP REGEN : (SPIRIT + KNOWLEDGE + LEVEL) x 0.25";
_root.calcArrayRefer[8] = "SP GAIN : (SPIRIT + LEVEL) x 0.2";
_global.ReferStat = function (obj) {
ReferAttach(_root.statArrayRefer[obj.index]);
};
_global.ReferCalc = function (obj) {
ReferAttach(_root.calcArrayRefer[obj.index]);
};
_root.area = new Array();
_root.area[1] = _root.Site2_Area;
_root.area[1]._visible = false;
RestoreMove();
_global.UnpauseEnemy();
_root.gameData = new Array();
_root.itemsArray[0] = 0;
_root.itemsArray[1] = 5;
_root.itemsArray[2] = 3;
_root.initCall = setInterval(Initialize, 10);
_root.onEnterFrame = function () {
_root.playerLoc._x = _root.player.Body._x + _root.player._x;
_root.playerLoc._y = _root.player.Body._y + _root.player._y;
_root.playerDepth = (_root.player._y * 600) + _root.player._x;
DepthSwapping();
if (!_root.playerDying) {
if (_root.expBoost) {
ExpBoosting();
}
for (i in _root.monsters) {
_root.monsters[i].swapDepths((_root.monsters[i]._y * 600) + _root.monsters[i]._x);
}
ArmorPosition();
if (!_root.gamePause) {
HillAreaCheck(_root.player);
_root.veloSpeedX = _root.veloXbase * (_root.speedXFactor + (((1 - Key.isToggled(20)) * _root.speedXFactor) * 1));
_root.veloSpeedY = _root.veloYbase * (_root.speedYFactor + (((1 - Key.isToggled(20)) * _root.speedyFactor) * 1));
KeyPressing();
AIScript();
CheckPath();
if (_root.alphaStatus) {
DetectAlpha();
}
_root.playerWeapon._visible = _root.player.armed;
if (_root.playerWalk) {
switch (_root.playerFacing) {
case 1 :
_root.player.gotoAndPlay("LTWalk");
break;
case 2 :
_root.player.gotoAndPlay("RTWalk");
break;
case 3 :
_root.player.gotoAndPlay("RBWalk");
break;
case 4 :
_root.player.gotoAndPlay("LBWalk");
}
_root.playerWalk = false;
}
} else {
for (i in _root.monsters) {
if (!_root.monsters[i].dying) {
_root.monsters[i].stop();
if (_root.monsters[i].moreMissling) {
MoreMissleDetecting(_root.monsters[i]);
} else {
_root.monsters[i].Missle.stop();
}
}
}
if (_root.spCasting) {
if (_root.sp2Target) {
SpChecking(_root.playerAtkInd, _root.sp2Target);
_root.playerAtkInd = 0;
} else if (!_root.sp2Casting) {
if (_root.playerAtkInd != 0) {
num = 0;
for (i in _root.monsters) {
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.playerFacing) {
case 1 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 2 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case 3 :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case 4 :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((((_root.playerHitRangeX > _root.player.minspRange) and (_root.playerHitRangeX < _root.player.spRange)) and (_root.playerHitRangeY > _root.player.minspRange)) and (_root.playerHitRangeY < _root.player.spRange)) {
num++;
SpChecking(_root.playerAtkInd, _root.monsters[i]);
}
}
if (num == 0) {
_root.gamePause = false;
RestoreMove();
_global.UnpauseEnemy();
}
}
_root.playerAtkInd = 0;
}
} else if (!_root.mgCasting) {
_root.player.stop();
_root.playerWeapon.stop();
}
}
if (_root.player.DamageMessage.move) {
if (_root.player.DamageMessage.y > -50) {
_root.player.DamageMessage.y = _root.player.DamageMessage.y - _root.messageSpeed;
_root.player.DamageMessage._y = _root.player.DamageMessage._y - _root.messageSpeed;
} else {
_root.player.DamageMessage.text = "";
_root.player.DamageMessage.move = false;
}
}
if (_root.player.Message.move) {
if (_root.player.Message.y > -50) {
_root.player.Message.y = _root.player.Message.y - _root.messageSpeed;
_root.player.Message._y = _root.player.Message._y - _root.messageSpeed;
} else {
_root.player.Message.text = "";
_root.player.Message.move = false;
_root.player.Message.y = 0;
_root.player.Message._y = _root.defaultExpMessageY;
_root.player.Message._alpha = 100;
}
}
}
if (_root.detecting) {
for (i in _root.monsters) {
playerHitRangeX = _root.monsters[i]._x - _root.playerLoc._x;
playerHitRangeY = _root.monsters[i]._y - _root.playerLoc._y;
switch (_root.playerFacing) {
case 1 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 2 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = -playerHitRangeY;
break;
case 3 :
playerHitRangeX = playerHitRangeX;
playerHitRangeY = playerHitRangeY;
break;
case 4 :
playerHitRangeX = -playerHitRangeX;
playerHitRangeY = playerHitRangeY;
}
if ((((playerHitRangeX > _root.player.minsp2Range) and (playerHitRangeX < _root.player.sp2Range)) and (playerHitRangeY > _root.player.minsp2Range)) and (playerHitRangeY < _root.player.sp2Range)) {
_root.sp2Target = _root.monsters[i];
_root.sp2Target.hpTemp = 0;
_root.sp2PosX = _root.sp2Target._x;
_root.sp2PosY = _root.sp2Target._y;
_root.detecting = false;
}
}
}
if (_root.Message_Refer.moveUp) {
if ((_root.Message_Refer._y > _root.Message_Refer.y) and _root.animSetting) {
_root.Message_Refer._y = _root.Message_Refer._y - _root.Message_Refer.speed;
} else {
_root.Message_Refer.moveUp = false;
_root.Message_Refer._y = _root.Message_Refer.y;
}
}
if (_root.Message_Refer.moveDown) {
if ((_root.Message_Refer._y < _root.Message_Refer.y) and _root.animSetting) {
_root.Message_Refer._y = _root.Message_Refer._y + _root.Message_Refer.speed;
} else {
_root.Message_Refer.moveDown = false;
_root.Message_Refer._y = _root.Message_Refer.y;
}
}
if (_root.statusMove) {
if (_root.statusDir == 0) {
if ((_root.Status._y < _root.Status.y) and _root.animSetting) {
_root.Status._y = _root.Status._y + _root.statusMoveSpeed;
} else {
_root.Status._y = _root.statusCloseY;
_root.statusPosition = 0;
_root.statusMove = false;
}
} else if ((_root.Status._y > _root.Status.y) and _root.animSetting) {
_root.Status._y = _root.Status._y - _root.statusMoveSpeed;
} else {
_root.Status._y = _root.statusDefY;
_root.statusPosition = 1;
_root.statusMove = false;
}
}
if (_root.playerTrading1) {
num1 = int(_root.CreateBar.Item1text.text);
num2 = int(_root.CreateBar.Item2text.text);
num3 = int(_root.CreateBar.Item3text.text);
num4 = int(_root.CreateBar.Item4text.text);
if ((((num1 == 0) and (num2 == 0)) and (num3 == 0)) and (num4 == 0)) {
_root.CreateBar.Atext.text = "";
_root.CreateBar.Btext.text = "";
_root.CreateBar.Ctext.text = "";
_root.CreateBar.Dtext.text = "";
_root.CreateBar.Item1text.text = "0";
_root.CreateBar.Item2text.text = "0";
_root.CreateBar.Item3text.text = "0";
_root.CreateBar.Item4text.text = "0";
_root.CreateBar.Btn_Apply.gotoAndStop(1);
} else if ((((num1 >= 0) and (num2 >= 0)) and (num3 >= 0)) and (num4 >= 0)) {
req10 = num1 * 10;
req20 = num2 * 10;
req12 = num3 * 20;
req22 = num4 * 20;
req11 = num3 * 10;
req21 = num4 * 10;
_root.CreateBar.Atext.text = req10 + req12;
_root.CreateBar.Btext.text = req20 + req22;
_root.CreateBar.Ctext.text = req11;
_root.CreateBar.Dtext.text = req21;
_root.CreateBar.Btn_Apply.gotoAndStop(2);
} else {
_root.CreateBar.Atext.text = "";
_root.CreateBar.Btext.text = "";
_root.CreateBar.Ctext.text = "";
_root.CreateBar.Dtext.text = "";
_root.CreateBar.Item1text.text = "0";
_root.CreateBar.Item2text.text = "0";
_root.CreateBar.Item3text.text = "0";
_root.CreateBar.Item4text.text = "0";
_root.CreateBar.Btn_Apply.gotoAndStop(1);
}
}
if (_root.playerTrading2Calc) {
num1 = int(_root.ShopBar.Casher.CashText.text);
num2 = int(_root.ShopBar.Casher.CostText.text);
num3 = int(_root.ShopBar.Casher.AmountText.text);
num4 = num2 * num3;
num5 = num1 - num4;
_root.ShopBar.Casher.TotalText.text = num4;
_root.ShopBar.Casher.BalanceText.text = num5;
if (((num3 > 0) and (num3 != undefined)) and (num5 >= 0)) {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(2);
} else {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(1);
}
}
if (_root.playerTrading3Calc) {
num1 = int(_root.ShopBar.Casher.CashText.text);
num2 = int(_root.ShopBar.Casher.CostText.text);
num3 = int(_root.ShopBar.Casher.AmountText.text);
if (num3 > _root.itemsArray[_root.tradingTarget]) {
num3 = _root.itemsArray[_root.tradingTarget];
_root.ShopBar.Casher.AmountText.text = num3;
}
num4 = num2 * num3;
num5 = num1 + num4;
_root.ShopBar.Casher.TotalText.text = num4;
_root.ShopBar.Casher.BalanceText.text = num5;
if (((num3 > 0) and (num3 != undefined)) and (num3 <= _root.itemsArray[_root.tradingTarget])) {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(2);
} else {
_root.ShopBar.Casher.Btn_Apply.gotoAndStop(1);
}
}
if (_root.dead) {
GameOver();
_root.dead = false;
}
if (_root.selectHotKeyItem) {
ReferAttach(_root.hotKeyRefer[1]);
}
if (_root.statusPosition == 0) {
_root.Status.HpBMsg.text = _root.Status.HpMsg.text;
_root.Status.MpBMsg.text = _root.Status.MpMsg.text;
} else {
_root.Status.HpBMsg.text = "";
_root.Status.MpBMsg.text = "";
}
if (_root.earthQuaking) {
if (_root.quakeUp) {
if (_root.earthQuakeNum != 0) {
_root._y = _root._y - 6;
_root.quakeUp = false;
_root.quakeDown = true;
_root.earthQuakeNum--;
} else {
_root.earthQuaking = false;
}
} else if (_root.quakeDown) {
_root._y = _root._y + 6;
_root.quakeUp = true;
_root.quakeDown = false;
}
}
if (_root.tutPause) {
if (((!_root.ZUpStartCheck) and (_root.tutIndex == 1)) and (_root.tutCurrentIndex == 6)) {
_root.tutIndex = 0;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(6, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 10)) and (_root.tutCurrentIndex == 19)) {
_root.tutIndex = 2;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(19, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 30)) and (_root.tutCurrentIndex == 26)) {
_root.tutIndex = 4;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(26, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 5)) and (_root.tutCurrentIndex == 32)) {
_root.tutIndex = 6;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(32, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 7)) and (_root.tutCurrentIndex == 39)) {
_root.tutIndex = 8;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(39, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 9)) and (_root.tutCurrentIndex == 52)) {
_root.tutIndex = 10;
_root.tutPause = false;
clearInterval(_root.clearMessage);
_root.player.gotoAndStop(1);
AllMessageSet(52, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 11)) and (_root.tutCurrentIndex == 54)) {
_root.tutIndex = 12;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(54, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 13)) and (_root.tutCurrentIndex == 56)) {
_root.tutIndex = 14;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(56, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 15)) and (_root.tutCurrentIndex == 58)) {
_root.tutIndex = 16;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(58, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 17)) and (_root.tutCurrentIndex == 61)) {
_root.tutIndex = 18;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(61, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 19)) and (_root.tutCurrentIndex == 63)) {
_root.tutIndex = 20;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(63, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 21)) and (_root.tutCurrentIndex == 65)) {
_root.tutIndex = 22;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(65, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 23)) and (_root.tutCurrentIndex == 72)) {
_root.tutIndex = 24;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(72, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 25)) and (_root.tutCurrentIndex == 75)) {
_root.tutIndex = 26;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(75, _root.arenaMessage.length);
} else if (((!_root.ZUpStartCheck) and (_root.tutIndex == 27)) and (_root.tutCurrentIndex == 76)) {
_root.tutIndex = 28;
_root.tutPause = false;
clearInterval(_root.clearMessage);
AllMessageSet(76, _root.arenaMessage.length);
}
}
};
stop();
Frame 126
function FinishMessage() {
if (_root.finishMsgIndex != 10) {
_root.finishMsgIndex++;
_root.FinishMessageA.text = _root.finishArray[_root.finishMsgIndex];
_root.FinishMessageB.text = _root.finishArray2[_root.finishMsgIndex];
} else {
clearInterval(_root.finishMsgSet);
gotoAndPlay (127);
}
}
_root.finishMsgIndex = 0;
_root.finishArray = new Array();
_root.finishArray2 = new Array();
_root.finishArray[1] = "PRESENTED BY";
_root.finishArray[2] = "TEACHER";
_root.finishArray[3] = "BETA TESTER AND TECHNICAL SUPPORTER";
_root.finishArray[4] = "BETA TESTER";
_root.finishArray[5] = "STORY, GRAPHIC, AND SCRIPTING";
_root.finishArray[6] = "SUPPORTING FRIENDS";
_root.finishArray[7] = "SPECIAL THANKS TO";
_root.finishArray[8] = "SUGGESTIONS AND COMPLAINS?";
_root.finishArray[9] = "SKY GUARDIAN : MOUNTAIN OF DESSERTS";
_root.finishArray[10] = "THE END";
_root.finishArray2[1] = "DESSERTS COMMUNITY";
_root.finishArray2[2] = "MADAM WEE SOON JOO";
_root.finishArray2[3] = "KHOR SHUQI";
_root.finishArray2[4] = "CHU CHIN HUEI\nSER YI KHE";
_root.finishArray2[5] = "LEE XING YAO";
_root.finishArray2[6] = "TAI YI HWANG\nLOO XIAN LIANG\nIVAN WONG\nCHAI YI SHIUN";
_root.finishArray2[7] = "MAXIS COMMUNITIES, HOTLINK, THE STAR";
_root.finishArray2[8] = "PLS EMAIL ME AT snaillxy@hotmail.com";
_root.finishArray2[9] = "COPYRIGHT DESSERTS COMMUNITY 2004";
_root.finishArray2[10] = "LET'S TRY OTHER GAMES TOO ^_^";
_root.finishDelay = 5000;
_root.finishMsgSet = setInterval(FinishMessage, _root.finishDelay);
stop();
Frame 156
stop();
Frame 157
if (_global.playerSuicide) {
_global.compleText = ("Hey, why did you do that to " + _root.playerName) + "?";
}
if (_root.aek) {
_root.bossScr = _root.bossScr + 3000;
}
_root.CompleteScore.text = _global.compleText;
_root.BossScore.text = int(_root.bossScr);
_root.LevelScore.text = int((_root.levelScr * 1000) + _root.exScr);
_root.DamageScore.text = int(_root.damageScr);
_root.totalScr = ((_root.bossScr + (_root.levelScr * 1000)) + _root.exScr) + _root.damageScr;
_root.TotalScore.text = int(_root.totalScr);
if (!_root.cheater) {
_root.RankScore.text = _root.rankScr;
} else {
_root.RankScore.text = "Cheater!";
}
if (_global.playerSuicide) {
_root.RankScore.text = "......";
}
_root.Btn_Restart.onRelease = function () {
_root.exScr = 0;
_root.levelScr = 0;
_root.damageScr = 0;
_root.bossScr = 0;
_root.rankScr = "";
_root.cheater = false;
_root.aek = false;
_global.PlayerSuicide = false;
gotoAndPlay (1);
};
Symbol 39 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 1
stop();
this.onRelease = function () {
if (_root.LoadGame_Bar.Title.text == "LOAD GAME") {
if (_root.gameDataE[this.index] != undefined) {
_global.LoadGameData(this.index);
} else {
_root.LoadGame_Bar.Message.text = "Unable To Load Game";
}
} else {
_root.getCookieEnable("SGdata1", "slot", 1);
_root.getCookieEnable("SGdata2", "slot", 2);
_root.getCookieEnable("SGdata3", "slot", 3);
_root.getCookieEnable("SGdata4", "slot", 4);
_root.getCookieEnable("SGdata5", "slot", 5);
i = 1;
while (i < 6) {
if (_root.gameDataE[i] != undefined) {
_root.SaveGame_Bar["DataSlot" + i].Name.text = _root.gameDataE[i];
} else {
_root.SaveGame_Bar["DataSlot" + i].Name.text = "Empty Slot";
}
_root.SaveGame_Bar["DataSlot" + i].gotoAndStop(1);
i++;
}
_root.SaveGame_Bar["DataSlot" + this.index].gotoAndStop(2);
Selection.setFocus(_root.SaveGame_Bar["DataSlot" + this.index].Input);
}
};
Symbol 40 MovieClip Frame 2
stop();
_root.SaveGame_Bar["DataSlot" + this.index].Input.text = _root.gameDataE[this.index];
delete this.onRelease;
this.Btn_Apply.gotoAndStop(2);
index = this.index;
this.Btn_Apply.onRelease = function () {
if (_root.SaveGame_Bar["DataSlot" + index].Input.text == "") {
_root.SaveGame_Bar["DataSlot" + index].Input.text = "Guardian";
}
txt = _root.SaveGame_Bar["DataSlot" + index].Input.text;
_global.SaveGameData(txt, index);
i = 0;
while (i < 6) {
_root.SaveGame_Bar["DataSlot" + i].gotoAndStop(1);
i++;
}
};
Symbol 53 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
stop();
Symbol 66 MovieClip Frame 3
stop();
Symbol 66 MovieClip Frame 4
stop();
Symbol 66 MovieClip Frame 5
stop();
Symbol 66 MovieClip Frame 6
stop();
Symbol 66 MovieClip Frame 7
stop();
Symbol 66 MovieClip Frame 8
stop();
Symbol 66 MovieClip Frame 9
stop();
Symbol 66 MovieClip Frame 10
stop();
Symbol 80 MovieClip Frame 1
this.HillArea1.index = 1;
this.HillArea2.index = 2;
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 80 MovieClip Frame 2
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 80 MovieClip Frame 80
gotoAndPlay (2);
Symbol 93 MovieClip Frame 1
if (!_root.animSetting) {
stop();
}
Symbol 108 MovieClip Frame 12
this.swapDepths(this._y - 5);
stop();
Symbol 112 MovieClip Frame 12
this.swapDepths(this._y - 5);
stop();
Symbol 116 MovieClip Frame 12
this.swapDepths(this._y - 5);
stop();
Symbol 120 MovieClip Frame 12
this.swapDepths(this._y - 5);
stop();
Symbol 124 MovieClip Frame 12
this.swapDepths(this._y - 5);
stop();
Symbol 128 MovieClip Frame 12
this.swapDepths(this._y - 5);
stop();
Symbol 139 MovieClip Frame 11
stop();
Symbol 142 MovieClip Frame 1
if (!_root.animSetting) {
stop();
}
Symbol 155 MovieClip Frame 1
if (!_root.animSetting) {
stop();
}
Symbol 165 MovieClip Frame 1
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 165 MovieClip Frame 7
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 165 MovieClip Frame 36
gotoAndPlay (7);
Symbol 170 MovieClip Frame 1
if (!_root.alphaSetting) {
gotoAndStop (2);
} else {
stop();
}
Symbol 170 MovieClip Frame 2
stop();
Symbol 188 MovieClip Frame 1
this.HillArea1.index = 3;
this.HillArea1.depth = 3;
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 188 MovieClip Frame 5
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 188 MovieClip Frame 100
gotoAndPlay (5);
Symbol 197 MovieClip Frame 1
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 197 MovieClip Frame 2
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 197 MovieClip Frame 80
gotoAndPlay (2);
Symbol 245 MovieClip Frame 1
this.afraid = false;
Symbol 245 MovieClip Frame 25
gotoAndPlay (1);
Symbol 245 MovieClip Frame 26
this.crying = true;
Symbol 245 MovieClip Frame 50
this.crying = false;
this.afraid = false;
gotoAndPlay (1);
Symbol 245 MovieClip Frame 69
_global.ShopTrading(1);
stop();
Symbol 245 MovieClip Frame 70
this.frightNum = 5;
Symbol 245 MovieClip Frame 75
if (this.frightNum != 0) {
this.frightNum--;
gotoAndPlay (71);
} else {
this.afraid = false;
gotoAndPlay (1);
}
Symbol 245 MovieClip Frame 141
_global.EarthQuake(5);
Symbol 245 MovieClip Frame 160
_root.SprSword.removeMovieClip();
Symbol 245 MovieClip Frame 170
_root.itemsArray[10]++;
if (_root.statusLoc == "Items") {
_root.Status.gotoAndStop(10);
_root.Status.gotoAndStop("Items");
}
Symbol 245 MovieClip Frame 171
_global.RefreshStatus();
Symbol 245 MovieClip Frame 180
gotoAndPlay (1);
_root.gamePause = true;
_global.UnpauseEnemy();
Symbol 257 MovieClip Frame 1
if (!_root.animSetting) {
gotoAndStop (5);
}
Symbol 257 MovieClip Frame 5
if (!_root.animSetting) {
gotoAndStop (5);
}
Symbol 257 MovieClip Frame 100
gotoAndPlay (5);
Symbol 292 MovieClip Frame 1
if (_root.powerUpMode) {
gotoAndPlay (116);
}
Symbol 292 MovieClip Frame 50
gotoAndPlay (1);
Symbol 292 MovieClip Frame 115
gotoAndPlay (116);
Symbol 292 MovieClip Frame 155
gotoAndPlay (116);
Symbol 292 MovieClip Frame 177
_root.player.ItemsAnim.gotoAndPlay("Anim1");
_root.player.hp = _root.player.hpmax;
_root.player.mp = _root.player.mpmax;
_global.RefreshingStatus();
Symbol 292 MovieClip Frame 185
_root.gamePause = false;
_global.UnpauseEnemy();
gotoAndPlay (116);
Symbol 292 MovieClip Frame 210
_root.player.ItemsAnim.gotoAndPlay("Anim1");
_root.mg4lv = 1.5;
_global.RefreshingStatus();
Symbol 292 MovieClip Frame 220
gotoAndPlay (116);
Symbol 296 MovieClip Frame 1
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 296 MovieClip Frame 2
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 296 MovieClip Frame 21
gotoAndPlay (2);
Symbol 311 MovieClip Frame 1
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 311 MovieClip Frame 5
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 311 MovieClip Frame 35
gotoAndPlay (5);
Symbol 317 MovieClip Frame 2
if (this.hitTest(_root.player._x, _root.player._y, true)) {
this.gotoAndPlay("Anim1");
}
Symbol 317 MovieClip Frame 3
gotoAndPlay (2);
Symbol 317 MovieClip Frame 23
gotoAndPlay (4);
Symbol 324 MovieClip Frame 1
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 324 MovieClip Frame 2
if (!_root.animSetting) {
gotoAndStop (2);
}
Symbol 324 MovieClip Frame 50
gotoAndPlay (2);
Symbol 382 MovieClip Frame 1
_root.playerSlash = false;
gotoAndStop("Stop" + _root.weaponType);
Symbol 382 MovieClip Frame 13
gotoAndStop (1);
Symbol 382 MovieClip Frame 14
_root.playerSlash = false;
gotoAndStop("Stop" + _root.weaponType);
Symbol 382 MovieClip Frame 26
gotoAndStop (14);
Symbol 382 MovieClip Frame 27
_root.playerSlash = false;
Symbol 382 MovieClip Frame 28
_root.playerSlash = false;
gotoAndStop("Stop" + _root.weaponType);
Symbol 382 MovieClip Frame 40
gotoAndStop (28);
Symbol 382 MovieClip Frame 41
_root.playerSlash = false;
gotoAndStop("Stop" + _root.weaponType);
Symbol 382 MovieClip Frame 53
gotoAndStop (41);
Symbol 382 MovieClip Frame 54
_root.playerSlash = false;
gotoAndStop("Stop" + _root.weaponType);
Symbol 382 MovieClip Frame 66
gotoAndStop (54);
Symbol 382 MovieClip Frame 67
_root.playerSlash = false;
gotoAndStop("Stop" + _root.weaponType);
Symbol 382 MovieClip Frame 79
gotoAndStop (41);
Symbol 400 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 40
gotoAndPlay (6);
Symbol 400 MovieClip Frame 60
gotoAndPlay (41);
Symbol 411 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 2
stop();
Symbol 411 MovieClip Frame 3
stop();
Symbol 411 MovieClip Frame 10
gotoAndStop (3);
Symbol 411 MovieClip Frame 11
stop();
Symbol 411 MovieClip Frame 22
gotoAndStop (11);
Symbol 419 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 2
stop();
Symbol 419 MovieClip Frame 3
stop();
Symbol 419 MovieClip Frame 10
gotoAndStop (3);
Symbol 419 MovieClip Frame 11
stop();
Symbol 419 MovieClip Frame 12
stop();
Symbol 419 MovieClip Frame 23
gotoAndStop (12);
Symbol 431 MovieClip Frame 10
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 441 MovieClip Frame 1
stop();
Symbol 441 MovieClip Frame 25
gotoAndStop (1);
Symbol 441 MovieClip Frame 46
gotoAndStop (1);
Symbol 471 MovieClip Frame 16
stop();
stop();
stop();
Symbol 486 MovieClip Frame 39
gotoAndPlay (5);
Symbol 490 MovieClip Frame 76
_root.MgSpark._x = _root.player._x;
_root.MgSpark._y = _root.player._y;
_root.MgSpark.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.MgSpark.gotoAndPlay("Anim2");
_global.SetUnitStatus(_root.player, 1, 30000);
Symbol 490 MovieClip Frame 105
_global.CheckMagic(1, 4, 99999);
_root.player.MgMessage.text = "";
_root.player.gotoAndStop(_root.faceIndex + "Stand");
Symbol 549 MovieClip Frame 1
_root.playerFacing = 3;
_root.playerWeapon._xscale = 100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
_root.MessageShow("");
_root.EnemyMessageShow("");
_root.playerWalking = false;
this.Sword._visible = false;
this.Sword2._visible = false;
this.Sword3._visible = false;
this.Sword4._visible = false;
stop();
Symbol 549 MovieClip Frame 4
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
if (!Key.isDown(_root.KeyAttack)) {
gotoAndStop (1);
}
Symbol 549 MovieClip Frame 8
_root.playerAtkInd = 1;
Symbol 549 MovieClip Frame 13
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(38))) && (!Key.isDown(40))) {
_global.WeaponSlash();
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 60;
if (_root.tutIndex == 1) {
_root.ZupStartCheck = false;
_root.tutIndex = 10;
}
} else {
gotoAndStop (1);
}
Symbol 549 MovieClip Frame 17
_root.playerAtkInd = 2;
Symbol 549 MovieClip Frame 22
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(40))) && (!Key.isDown(38))) {
_global.WeaponSlash();
_root.playerWeapon._rotation = (_root.playerFacing * 90) + 180;
_root.playerArmor.gotoAndPlay(("Type" + _root.armorType) + "Fly");
if (_root.tutIndex == 3) {
_root.ZupStartCheck = false;
_root.tutIndex = 30;
}
} else {
gotoAndStop (1);
}
Symbol 549 MovieClip Frame 26
_root.playerAtkInd = 3;
Symbol 549 MovieClip Frame 31
gotoAndStop (1);
Symbol 549 MovieClip Frame 32
_root.playerWalking = true;
Symbol 549 MovieClip Frame 42
if (!Key.isDown(40)) {
gotoAndStop (1);
}
_root.playerWalking = true;
Symbol 549 MovieClip Frame 52
if (Key.isDown(40)) {
_root.playerWalking = true;
gotoAndPlay (32);
} else {
gotoAndStop (1);
}
Symbol 549 MovieClip Frame 53
_root.playerFacing = 4;
_root.playerWeapon._xscale = 100;
_root.EnemyMessageShow("");
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
_root.MessageShow("");
_root.playerWalking = false;
stop();
Symbol 549 MovieClip Frame 56
_root.playerWeapon._xscale = -100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) + 180;
if (!Key.isDown(_root.KeyAttack)) {
gotoAndStop (53);
}
Symbol 549 MovieClip Frame 60
_root.playerAtkInd = 1;
Symbol 549 MovieClip Frame 65
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(38))) && (!Key.isDown(40))) {
_global.WeaponSlash();
_root.playerWeapon._rotation = (_root.playerFacing * 90) + 120;
if (_root.tutIndex == 1) {
_root.ZupStartCheck = false;
_root.tutIndex = 10;
}
} else {
gotoAndStop (53);
}
Symbol 549 MovieClip Frame 69
_root.playerAtkInd = 2;
Symbol 549 MovieClip Frame 74
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(40))) && (!Key.isDown(38))) {
_global.WeaponSlash();
_root.playerWeapon._xscale = -100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 100;
_root.playerArmor.gotoAndPlay(("Type" + _root.armorType) + "Fly");
if (_root.tutIndex == 3) {
_root.ZupStartCheck = false;
_root.tutIndex = 30;
}
} else {
gotoAndStop (53);
}
Symbol 549 MovieClip Frame 78
_root.playerAtkInd = 3;
Symbol 549 MovieClip Frame 83
gotoAndStop (53);
Symbol 549 MovieClip Frame 84
_root.playerWalking = true;
Symbol 549 MovieClip Frame 94
if (!Key.isDown(37)) {
gotoAndStop (53);
}
_root.playerWalking = true;
Symbol 549 MovieClip Frame 104
if (Key.isDown(37)) {
_root.playerWalking = true;
gotoAndPlay (84);
} else {
gotoAndStop (53);
}
Symbol 549 MovieClip Frame 105
_root.playerFacing = 1;
_root.playerWeapon._xscale = 100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
_root.MessageShow("");
_root.EnemyMessageShow("");
_root.playerWalking = false;
stop();
Symbol 549 MovieClip Frame 108
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
if (!Key.isDown(_root.KeyAttack)) {
gotoAndStop (105);
}
Symbol 549 MovieClip Frame 112
_root.playerAtkInd = 1;
Symbol 549 MovieClip Frame 117
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(38))) && (!Key.isDown(40))) {
_global.WeaponSlash();
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 110;
if (_root.tutIndex == 1) {
_root.ZupStartCheck = false;
_root.tutIndex = 10;
}
} else {
gotoAndStop (105);
}
Symbol 549 MovieClip Frame 121
_root.playerAtkInd = 2;
Symbol 549 MovieClip Frame 126
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(40))) && (!Key.isDown(38))) {
_global.WeaponSlash();
_root.playerWeapon._xscale = -100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 150;
_root.playerArmor.gotoAndPlay(("Type" + _root.armorType) + "Fly");
if (_root.tutIndex == 3) {
_root.ZupStartCheck = false;
_root.tutIndex = 30;
}
} else {
gotoAndStop (105);
}
Symbol 549 MovieClip Frame 130
_root.playerAtkInd = 3;
Symbol 549 MovieClip Frame 135
gotoAndStop (105);
Symbol 549 MovieClip Frame 136
_root.playerWalking = true;
Symbol 549 MovieClip Frame 146
if (!Key.isDown(38)) {
gotoAndStop (105);
}
_root.playerWalking = true;
Symbol 549 MovieClip Frame 156
if (Key.isDown(38)) {
_root.playerWalking = true;
gotoAndPlay (136);
} else {
gotoAndStop (105);
}
Symbol 549 MovieClip Frame 157
_root.playerFacing = 2;
_root.playerWeapon._xscale = 100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 90;
_root.MessageShow("");
_root.EnemyMessageShow("");
_root.playerWalking = false;
stop();
Symbol 549 MovieClip Frame 160
if (!Key.isDown(_root.KeyAttack)) {
gotoAndStop (157);
}
Symbol 549 MovieClip Frame 164
_root.playerAtkInd = 1;
Symbol 549 MovieClip Frame 169
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(38))) && (!Key.isDown(40))) {
_global.WeaponSlash();
_root.playerWeapon._xscale = -100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 130;
if (_root.tutIndex == 1) {
_root.ZupStartCheck = false;
_root.tutIndex = 10;
}
} else {
gotoAndStop (157);
}
Symbol 549 MovieClip Frame 173
_root.playerAtkInd = 2;
Symbol 549 MovieClip Frame 178
if ((Key.isDown(_root.KeyAttack) && (Key.isDown(40))) && (!Key.isDown(38))) {
_global.WeaponSlash();
_root.playerWeapon._xscale = 100;
_root.playerWeapon._rotation = (_root.playerFacing * 90) - 120;
_root.playerArmor.gotoAndPlay(("Type" + _root.armorType) + "Fly");
if (_root.tutIndex == 3) {
_root.ZupStartCheck = false;
_root.tutIndex = 30;
}
} else {
gotoAndStop (157);
}
Symbol 549 MovieClip Frame 182
_root.playerAtkInd = 3;
Symbol 549 MovieClip Frame 187
gotoAndStop (157);
Symbol 549 MovieClip Frame 188
_root.playerWalking = true;
Symbol 549 MovieClip Frame 198
if (!Key.isDown(39)) {
gotoAndStop (157);
}
_root.playerWalking = true;
Symbol 549 MovieClip Frame 208
if (Key.isDown(39)) {
_root.playerWalking = true;
gotoAndPlay (188);
} else {
gotoAndStop (157);
}
Symbol 549 MovieClip Frame 209
_root.playerWeapon._visible = false;
_root.spCasting = true;
_root.gamePause = true;
_root.Sp1Anim._x = _root.player._x;
_root.Sp1Anim._y = _root.player._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 246
_root.playerAtkInd = 4;
_root.playerSpRange = 40;
_root.playerSpTargetNum = 99;
if (_root.tutCurrentIndex == 52) {
_root.ZUpStartCheck = false;
}
Symbol 549 MovieClip Frame 254
_root.playerSpIndex = "";
_root.playerSpUse = false;
_root.player.SpMessage.text = "";
_root.spCasting = false;
gotoAndStop (105);
Symbol 549 MovieClip Frame 255
_root.playerWeapon._visible = false;
_root.spCasting = true;
_root.gamePause = true;
_root.Sp1Anim._x = _root.player._x;
_root.Sp1Anim._y = _root.player._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 292
_root.playerAtkInd = 4;
_root.playerSpRange = 40;
_root.playerSpTargetNum = 99;
if (_root.tutCurrentIndex == 52) {
_root.ZUpStartCheck = false;
}
Symbol 549 MovieClip Frame 300
_root.playerSpIndex = "";
_root.playerSpUse = false;
_root.player.SpMessage.text = "";
_root.spCasting = false;
gotoAndStop (157);
Symbol 549 MovieClip Frame 301
_root.playerWeapon._visible = false;
_root.spCasting = true;
_root.gamePause = true;
_root.Sp1Anim._x = _root.player._x;
_root.Sp1Anim._y = _root.player._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 338
_root.playerAtkInd = 4;
_root.playerSpRange = 40;
_root.playerSpTargetNum = 99;
if (_root.tutCurrentIndex == 52) {
_root.ZUpStartCheck = false;
}
Symbol 549 MovieClip Frame 346
_root.playerSpIndex = "";
_root.playerSpUse = false;
_root.player.SpMessage.text = "";
_root.spCasting = false;
gotoAndStop (1);
Symbol 549 MovieClip Frame 347
_root.playerWeapon._visible = false;
_root.spCasting = true;
_root.gamePause = true;
_root.Sp1Anim._x = _root.player._x;
_root.Sp1Anim._y = _root.player._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 384
_root.playerAtkInd = 4;
_root.playerSpRange = 40;
_root.playerSpTargetNum = 99;
if (_root.tutCurrentIndex == 52) {
_root.ZUpStartCheck = false;
}
Symbol 549 MovieClip Frame 392
_root.playerSpIndex = "";
_root.playerSpUse = false;
_root.player.SpMessage.text = "";
_root.spCasting = false;
gotoAndStop (53);
Symbol 549 MovieClip Frame 394
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 426
_root.MgSpark._x = _root.player._x;
_root.MgSpark._y = _root.player._y;
_root.MgSpark.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.MgSpark.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 434
if (_root.ZUpStartCheck and (_root.tutCurrentIndex == 63)) {
_root.ZUpStartCheck = false;
}
stop();
Symbol 549 MovieClip Frame 435
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 467
_root.MgSpark._x = _root.player._x;
_root.MgSpark._y = _root.player._y;
_root.MgSpark.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.MgSpark.gotoAndPlay("Anim2");
Symbol 549 MovieClip Frame 475
stop();
Symbol 549 MovieClip Frame 476
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.player.swapDepths(_root.player._y);
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 495
_root.Mg3Spin = 0;
Symbol 549 MovieClip Frame 500
if (_root.Mg3Spin != 10) {
_root.Mg3Spin++;
gotoAndPlay (496);
}
Symbol 549 MovieClip Frame 501
stop();
Symbol 549 MovieClip Frame 502
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 520
_root.player.Sword2.gotoAndStop("Charge1");
Symbol 549 MovieClip Frame 541
_global.CheckMagic(2, 21, 1);
_root.player.Sword2.gotoAndStop("Stop" + _root.weaponType);
_root.player.MgMessage.text = "";
Symbol 549 MovieClip Frame 545
_root.player.gotoAndStop(_root.faceIndex + "Stand");
Symbol 549 MovieClip Frame 546
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 564
_root.player.Sword2.gotoAndStop("Charge1");
Symbol 549 MovieClip Frame 585
_global.CheckMagic(2, 21, 1);
_root.player.Sword2.gotoAndStop("Stop" + _root.weaponType);
_root.player.MgMessage.text = "";
Symbol 549 MovieClip Frame 589
_root.player.gotoAndStop(_root.faceIndex + "Stand");
Symbol 549 MovieClip Frame 590
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 608
_root.player.Sword.gotoAndStop("Charge1");
Symbol 549 MovieClip Frame 629
_global.CheckMagic(2, 21, 1);
_root.player.Sword.gotoAndStop("Stop" + _root.weaponType);
_root.player.MgMessage.text = "";
Symbol 549 MovieClip Frame 633
_root.player.gotoAndStop(_root.faceIndex + "Stand");
Symbol 549 MovieClip Frame 634
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 652
_root.player.Sword.gotoAndStop("Charge1");
Symbol 549 MovieClip Frame 673
_global.CheckMagic(2, 21, 1);
_root.player.Sword.gotoAndStop("Stop" + _root.weaponType);
_root.player.MgMessage.text = "";
Symbol 549 MovieClip Frame 677
_root.player.gotoAndStop(_root.faceIndex + "Stand");
Symbol 549 MovieClip Frame 678
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 710
_root.MgShock._x = _root.player._x;
_root.MgShock._y = _root.player._y;
_root.MgShock.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.MgShock.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 718
stop();
Symbol 549 MovieClip Frame 719
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 751
_root.MgShock._x = _root.player._x;
_root.MgShock._y = _root.player._y;
_root.MgShock.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.MgShock.gotoAndPlay("Anim2");
Symbol 549 MovieClip Frame 759
stop();
Symbol 549 MovieClip Frame 760
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 800
_root.MgShock._x = _root.player._x;
_root.MgShock._y = _root.player._y;
_root.MgShock.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.MgShock.gotoAndPlay("Anim3");
Symbol 549 MovieClip Frame 820
stop();
Symbol 549 MovieClip Frame 821
_root.playerWeapon._visible = false;
_root.mgCasting = true;
_root.gamePause = true;
_root.Mg1Anim._x = _root.player._x;
_root.Mg1Anim._y = _root.player._y;
_root.Mg1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Mg1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 853
this.ItemsAnim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 858
_global.HealSpell(1);
_root.player.MgMessage.text = "";
_root.player.gotoAndStop(_root.faceIndex + "Stand");
Symbol 549 MovieClip Frame 861
stop();
Symbol 549 MovieClip Frame 862
_root.playerWeapon._visible = false;
_root.Sp1Anim._x = _root.playerLoc._x;
_root.Sp1Anim._y = _root.playerLoc._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 887
if (!_root.detecting) {
_root.SpEffects._x = _root.sp2PosX;
_root.SpEffects._y = _root.sp2PosY;
_root.Animation_Sp2._x = _root.sp2PosX;
_root.Animation_Sp2._y = _root.sp2PosY;
_root.sp2Repeat = 1;
_root.SpEffects.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.SpEffects.gotoAndPlay("Sp2");
_root.Animation_Sp2.swapDepths(((_root.Animation_Sp2._y * 600) + _root.Animation_Sp2._x) + 1);
_root.Animation_Sp2.LBSlash.gotoAndPlay("LBSlash");
_root.Animation_Sp2.LTSlash.gotoAndPlay("LTSlash");
_root.Animation_Sp2.RBSlash.gotoAndPlay("RBSlash");
_root.Animation_Sp2.RTSlash.gotoAndPlay("RTSlash");
stop();
} else {
_root.playerSpIndex = "";
_global.UnpauseEnemy();
_root.spCasting = false;
_root.detecting = false;
_root.player.SpMessage.text = "";
_root.player.Sword._visible = false;
_root.player.Sword2._visible = false;
_global.RestoreMove();
gotoAndStop(_root.faceIndex + "Stand");
}
Symbol 549 MovieClip Frame 888
_root.playerWeapon._visible = false;
_root.Sp1Anim._x = _root.playerLoc._x;
_root.Sp1Anim._y = _root.playerLoc._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 913
if (!_root.detecting) {
_root.SpEffects._x = _root.sp2PosX;
_root.SpEffects._y = _root.sp2PosY;
_root.Animation_Sp2._x = _root.sp2PosX;
_root.Animation_Sp2._y = _root.sp2PosY;
_root.sp2Repeat = 1;
_root.SpEffects.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.SpEffects.gotoAndPlay("Sp2");
_root.Animation_Sp2.swapDepths(((_root.Animation_Sp2._y * 600) + _root.Animation_Sp2._x) + 1);
_root.Animation_Sp2.LBSlash.gotoAndPlay("LBSlash");
_root.Animation_Sp2.LTSlash.gotoAndPlay("LTSlash");
_root.Animation_Sp2.RBSlash.gotoAndPlay("RBSlash");
_root.Animation_Sp2.RTSlash.gotoAndPlay("RTSlash");
stop();
} else {
_root.playerSpIndex = "";
_global.UnpauseEnemy();
_root.spCasting = false;
_root.detecting = false;
_root.player.SpMessage.text = "";
_root.player.Sword._visible = false;
_root.player.Sword2._visible = false;
_global.RestoreMove();
gotoAndStop(_root.faceIndex + "Stand");
}
Symbol 549 MovieClip Frame 914
_root.playerWeapon._visible = false;
_root.Sp1Anim._x = _root.playerLoc._x;
_root.Sp1Anim._y = _root.playerLoc._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 939
if (!_root.detecting) {
_root.SpEffects._x = _root.sp2PosX;
_root.SpEffects._y = _root.sp2PosY;
_root.Animation_Sp2._x = _root.sp2PosX;
_root.Animation_Sp2._y = _root.sp2PosY;
_root.sp2Repeat = 1;
_root.SpEffects.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.SpEffects.gotoAndPlay("Sp2");
_root.Animation_Sp2.swapDepths(((_root.Animation_Sp2._y * 600) + _root.Animation_Sp2._x) + 1);
_root.Animation_Sp2.LBSlash.gotoAndPlay("LBSlash");
_root.Animation_Sp2.LTSlash.gotoAndPlay("LTSlash");
_root.Animation_Sp2.RBSlash.gotoAndPlay("RBSlash");
_root.Animation_Sp2.RTSlash.gotoAndPlay("RTSlash");
stop();
} else {
_root.playerSpIndex = "";
_global.UnpauseEnemy();
_root.spCasting = false;
_root.detecting = false;
_root.player.SpMessage.text = "";
_root.player.Sword._visible = false;
_root.player.Sword2._visible = false;
_global.RestoreMove();
gotoAndStop(_root.faceIndex + "Stand");
}
Symbol 549 MovieClip Frame 940
_root.playerWeapon._visible = false;
_root.Sp1Anim._x = _root.playerLoc._x;
_root.Sp1Anim._y = _root.playerLoc._y;
_root.Sp1Anim.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.Sp1Anim.gotoAndPlay("Anim1");
Symbol 549 MovieClip Frame 965
if (!_root.detecting) {
_root.SpEffects._x = _root.sp2PosX;
_root.SpEffects._y = _root.sp2PosY;
_root.Animation_Sp2._x = _root.sp2PosX;
_root.Animation_Sp2._y = _root.sp2PosY;
_root.sp2Repeat = 1;
_root.SpEffects.swapDepths(((_root.player._y * 600) + _root.player._x) + 1);
_root.SpEffects.gotoAndPlay("Sp2");
_root.Animation_Sp2.swapDepths(((_root.Animation_Sp2._y * 600) + _root.Animation_Sp2._x) + 1);
_root.Animation_Sp2.LBSlash.gotoAndPlay("LBSlash");
_root.Animation_Sp2.LTSlash.gotoAndPlay("LTSlash");
_root.Animation_Sp2.RBSlash.gotoAndPlay("RBSlash");
_root.Animation_Sp2.RTSlash.gotoAndPlay("RTSlash");
stop();
} else {
_root.playerSpIndex = "";
_global.UnpauseEnemy();
_root.spCasting = false;
_root.detecting = false;
_root.player.SpMessage.text = "";
_root.player.Sword._visible = false;
_root.player.Sword2._visible = false;
_global.RestoreMove();
gotoAndStop(_root.faceIndex + "Stand");
}
Symbol 549 MovieClip Frame 1015
_root.dead = true;
Symbol 552 MovieClip Frame 1
stop();
Symbol 563 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 563 MovieClip Frame 20
gotoAndPlay (1);
Symbol 563 MovieClip Frame 30
_global.AttackPlayer(this);
Symbol 563 MovieClip Frame 40
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (51);
}
Symbol 563 MovieClip Frame 43
if (explodeTime != 10) {
explodeTime++;
gotoAndPlay (41);
}
Symbol 563 MovieClip Frame 50
_global.AttackPlayerMg(this, 1, 1);
_global.Suicide(this);
Symbol 563 MovieClip Frame 70
_global.RemoveUnit(this);
stop();
Symbol 570 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 570 MovieClip Frame 20
gotoAndPlay (1);
Symbol 570 MovieClip Frame 30
_global.AttackPlayer(this);
Symbol 570 MovieClip Frame 40
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (41);
}
Symbol 570 MovieClip Frame 60
_global.RemoveUnit(this);
Symbol 574 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 574 MovieClip Frame 20
gotoAndPlay (1);
Symbol 574 MovieClip Frame 30
_global.AttackPlayer(this);
Symbol 574 MovieClip Frame 40
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (41);
}
Symbol 574 MovieClip Frame 60
_global.RemoveUnit(this);
Symbol 608 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 608 MovieClip Frame 20
gotoAndPlay (1);
Symbol 608 MovieClip Frame 33
_global.AttackPlayer(this);
Symbol 608 MovieClip Frame 40
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (82);
}
Symbol 608 MovieClip Frame 68
_global.AttackPlayerMg(this, 2, 1);
gotoAndPlay (1);
Symbol 608 MovieClip Frame 101
_global.RemoveUnit(this);
Symbol 635 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 635 MovieClip Frame 20
gotoAndPlay (1);
Symbol 635 MovieClip Frame 45
_global.AttackPlayer(this);
Symbol 635 MovieClip Frame 50
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (87);
}
Symbol 635 MovieClip Frame 86
_global.AttackPlayerMg(this, 3, 1);
gotoAndPlay (1);
Symbol 635 MovieClip Frame 106
_global.RemoveUnit(this);
Symbol 654 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 654 MovieClip Frame 20
gotoAndPlay (1);
Symbol 654 MovieClip Frame 27
_global.AttackPlayer(this);
Symbol 654 MovieClip Frame 36
_global.AttackPlayer(this);
Symbol 654 MovieClip Frame 60
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (91);
}
Symbol 654 MovieClip Frame 84
_global.AttackPlayerMg(this, 4, 1);
Symbol 654 MovieClip Frame 90
gotoAndPlay (1);
Symbol 654 MovieClip Frame 110
_global.RemoveUnit(this);
Symbol 666 MovieClip Frame 21
stop();
Symbol 677 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 677 MovieClip Frame 20
gotoAndPlay (1);
Symbol 677 MovieClip Frame 31
_global.MissleAttackPlayer(this);
Symbol 677 MovieClip Frame 45
this.missleAttacking = false;
Symbol 677 MovieClip Frame 50
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (91);
}
Symbol 677 MovieClip Frame 61
_global.MissleAttackPlayer(this, 1);
Symbol 677 MovieClip Frame 63
_global.MissleAttackPlayer(this, 2);
Symbol 677 MovieClip Frame 65
_global.MissleAttackPlayer(this, 3);
Symbol 677 MovieClip Frame 67
_global.MissleAttackPlayer(this, 4);
Symbol 677 MovieClip Frame 69
_global.MissleAttackPlayer(this, 5);
Symbol 677 MovieClip Frame 90
if (!this.dying) {
this.attacking = false;
this.mgCasting = false;
this.moreMissling = false;
delete this.missleArray;
gotoAndPlay (1);
} else {
gotoAndPlay (91);
}
Symbol 677 MovieClip Frame 110
_global.RemoveUnit(this);
Symbol 700 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 700 MovieClip Frame 20
gotoAndPlay (1);
Symbol 700 MovieClip Frame 32
_global.AttackPlayer(this);
Symbol 700 MovieClip Frame 40
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (71);
}
Symbol 700 MovieClip Frame 60
_global.AttackPlayer(this);
Symbol 700 MovieClip Frame 63
_global.AttackPlayer(this);
Symbol 700 MovieClip Frame 65
_global.AttackPlayer(this);
Symbol 700 MovieClip Frame 70
_global.AttackPlayerMg(this, 6);
gotoAndPlay (1);
Symbol 700 MovieClip Frame 90
_global.RemoveUnit(this);
stop();
Symbol 706 MovieClip Frame 1
stop();
Symbol 706 MovieClip Frame 12
gotoAndPlay (2);
Symbol 714 MovieClip Frame 36
stop();
Symbol 719 MovieClip Frame 1
this.Message.Message.text = "";
Symbol 719 MovieClip Frame 20
gotoAndPlay (1);
Symbol 719 MovieClip Frame 45
this.PMissle._x = _root.player._x - this._x;
this.PMissle._y = _root.player._y - this._y;
Symbol 719 MovieClip Frame 60
_global.AttackPlayerMg(this, 7, 1);
Symbol 719 MovieClip Frame 90
gotoAndPlay (1);
Symbol 719 MovieClip Frame 105
_global.AttackPlayerMg(this, 8, 1);
Symbol 719 MovieClip Frame 111
gotoAndPlay (1);
Symbol 719 MovieClip Frame 121
_global.AttackPlayer(this);
Symbol 719 MovieClip Frame 131
if (!this.dying) {
this.attacking = false;
gotoAndPlay (1);
} else {
gotoAndPlay (132);
}
Symbol 719 MovieClip Frame 151
_global.RemoveUnit(this);
Symbol 732 MovieClip Frame 12
stop();
Symbol 757 MovieClip Frame 49
this.mgCooled = true;
Symbol 757 MovieClip Frame 50
this.Message.Message.text = "";
Symbol 757 MovieClip Frame 70
gotoAndPlay (50);
Symbol 757 MovieClip Frame 88
_root.BMissle._x = _root.player._x;
_root.BMissle._y = _root.player._y;
_root.BMissle.swapDepths(((_root.BMissle._y + 1) * 600) + _root.BMissle._x);
_root.BMissle.gotoAndPlay("Anim1");
_global.AttackPlayer(this);
Symbol 757 MovieClip Frame 105
if (!this.dying) {
this.attacking = false;
gotoAndPlay (50);
} else {
gotoAndPlay (215);
}
Symbol 757 MovieClip Frame 120
_global.AttackPlayerMg(this, 9, 1);
Symbol 757 MovieClip Frame 126
gotoAndPlay (50);
Symbol 757 MovieClip Frame 210
_global.AttackPlayerMg(this, 10, 1);
Symbol 757 MovieClip Frame 214
gotoAndPlay (50);
Symbol 757 MovieClip Frame 225
_global.EarthQuake(20);
Symbol 757 MovieClip Frame 290
_global.RemoveUnit(this);
Symbol 765 MovieClip Frame 1
stop();
Symbol 765 MovieClip Frame 14
if (_root.sp2Repeat == _root.sp2RepeatMax) {
_root.player.SpMessage.text = "";
_root.playerAtkInd = 0;
_root.spCasting = false;
_root.sp2PosX = undefined;
_root.sp2PosY = undefined;
_root.Player_SwordUser.gotoAndStop(_root.faceIndex + "Stand");
_root.Animation_Sp2.LBSlash.gotoAndStop(1);
_root.Animation_Sp2.RBSlash.gotoAndStop(1);
_root.Animation_Sp2.LTSlash.gotoAndStop(1);
_root.Animation_Sp2.RTSlash.gotoAndStop(1);
_global.TotalDamage(_root.sp2Target);
} else {
_root.sp2Repeat++;
_root.playerAtkInd = 6;
_root.playerSpRange = 9999;
_root.playerSpTargetNum = 1;
gotoAndPlay (2);
}
Symbol 768 MovieClip Frame 1
stop();
Symbol 768 MovieClip Frame 11
_root.playerAtkInd = 7;
_root.playerSpRange = 9999;
_root.playerSpTargetNum = 1;
gotoAndPlay (2);
Symbol 773 MovieClip Frame 1
stop();
Symbol 773 MovieClip Frame 13
_root.playerAtkInd = 8;
_root.playerSpRange = 9999;
_root.playerSpTargetNum = 1;
gotoAndPlay (2);
Symbol 778 MovieClip Frame 1
stop();
Symbol 778 MovieClip Frame 8
_root.playerAtkInd = 5;
_root.playerSpRange = 9999;
_root.playerSpTargetNum = 1;
gotoAndPlay (2);
Symbol 789 MovieClip Frame 51
stop();
Symbol 794 MovieClip Frame 1
stop();
Symbol 794 MovieClip Frame 43
_global.CheckMagic(1, 1, 99999);
_root.player.MgMessage.text = "";
_root.player.gotoAndStop(_root.faceIndex + "Stand");
gotoAndStop (1);
Symbol 794 MovieClip Frame 110
if (!_root.playerPhoenixUse) {
_global.CheckMagic(1, 2, 99999);
_root.player.MgMessage.text = "";
_root.player.gotoAndStop(_root.faceIndex + "Stand");
}
_root.playerPhoenixUse = false;
Symbol 800 MovieClip Frame 1
stop();
Symbol 800 MovieClip Frame 20
gotoAndStop (1);
Symbol 800 MovieClip Frame 80
gotoAndStop (1);
Symbol 805 MovieClip Frame 1
stop();
Symbol 805 MovieClip Frame 2
play();
Symbol 805 MovieClip Frame 21
stop();
Symbol 810 MovieClip Frame 1
stop();
Symbol 810 MovieClip Frame 2
play();
Symbol 810 MovieClip Frame 21
stop();
Symbol 857 MovieClip Frame 1
stop();
Symbol 857 MovieClip Frame 2
play();
Symbol 857 MovieClip Frame 20
this.removeMovieClip();
Symbol 890 MovieClip Frame 1
stop();
Symbol 890 MovieClip Frame 10
num = 0;
lv = 22;
_root.MgShock.unitHit = 0;
_root.MgShock.maxUnitHit = 3;
_root.MgShock.animIndex = 10;
_root.MgShock.animArray = new Array();
_root.MgShock.animArray[11] = -100;
_root.MgShock.animArray[12] = -100;
_root.MgShock.animArray[21] = -101;
_root.MgShock.animArray[22] = -101;
_root.MgShock.animArray[31] = -102;
_root.MgShock.animArray[32] = -102;
do {
if ((in _root.monsters) == null) {
break;
}
i = in _root.monsters;
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.faceIndex) {
case "LT" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RT" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RB" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case "LB" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((((_root.playerHitRangeX > _root.player["minmg" + lv]) and (_root.playerHitRangeX < _root.player["mg" + lv])) and (_root.playerHitRangeY > _root.player["minmg" + lv])) and (_root.playerHitRangeY < _root.player["mg" + lv])) {
_root.MgShock.animArray[_root.MgShock.animIndex + 1] = _root.monsters[i]._x;
_root.MgShock.animArray[_root.MgShock.animIndex + 2] = _root.monsters[i]._y;
_root.monsters[i].hpTemp = 0;
_root.monsters[i].hpTemp = _root.monsters[i].hpTemp + ((_root.player.ats * 2) - _root.monsters[i].dfp);
_root.MgShock.animIndex = _root.MgShock.animIndex + 10;
_root.MgShock.unitHit++;
num++;
}
} while (_root.MgShock.unitHit != _root.MgShock.maxUnitHit);
do {
} while (() != null);
if (num == 0) {
_root.gamePause = false;
_global.RestoreMove();
this.gotoAndPlay(30);
}
Symbol 890 MovieClip Frame 11
num = 0;
lv = 22;
if (_root.MgShock.unitHit != _root.MgShock.maxUnitHit) {
do {
if ((in _root.monsters) == null) {
break;
}
i = in _root.monsters;
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.faceIndex) {
case "LT" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RT" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RB" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case "LB" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((((_root.playerHitRangeX > _root.player["minmg" + lv]) and (_root.playerHitRangeX < _root.player["mg" + lv])) and (_root.playerHitRangeY > _root.player["minmg" + lv])) and (_root.playerHitRangeY < _root.player["mg" + lv])) {
_root.MgShock.animArray[_root.MgShock.animIndex + 1] = _root.monsters[i]._x;
_root.MgShock.animArray[_root.MgShock.animIndex + 2] = _root.monsters[i]._y;
_root.MgShock.animIndex = _root.MgShock.animIndex + 10;
_root.monsters[i].hpTemp = _root.monsters[i].hpTemp + ((_root.player.ats * 2) - _root.monsters[i].dfp);
unitHit++;
num++;
}
} while (_root.MgShock.unitHit != _root.MgShock.maxUnitHit);
do {
} while (() != null);
}
Symbol 890 MovieClip Frame 12
num = 0;
lv = 22;
if (_root.MgShock.unitHit != _root.MgShock.maxUnitHit) {
do {
if ((in _root.monsters) == null) {
break;
}
i = in _root.monsters;
_root.playerHitRangeX = _root.monsters[i]._x - _root.player._x;
_root.playerHitRangeY = _root.monsters[i]._y - _root.player._y;
switch (_root.faceIndex) {
case "LT" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RT" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = -_root.playerHitRangeY;
break;
case "RB" :
_root.playerHitRangeX = _root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
break;
case "LB" :
_root.playerHitRangeX = -_root.playerHitRangeX;
_root.playerHitRangeY = _root.playerHitRangeY;
}
if ((((_root.playerHitRangeX > _root.player["minmg" + lv]) and (_root.playerHitRangeX < _root.player["mg" + lv])) and (_root.playerHitRangeY > _root.player["minmg" + lv])) and (_root.playerHitRangeY < _root.player["mg" + lv])) {
_root.MgShock.animArray[_root.MgShock.animIndex + 1] = _root.monsters[i]._x;
_root.MgShock.animArray[_root.MgShock.animIndex + 2] = _root.monsters[i]._y;
_root.MgShock.animIndex = _root.MgShock.animIndex + 10;
_root.monsters[i].hpTemp = _root.monsters[i].hpTemp + ((_root.player.ats * 2) - _root.monsters[i].dfp);
unitHit++;
num++;
}
} while (_root.MgShock.unitHit != _root.MgShock.maxUnitHit);
do {
} while (() != null);
}
Symbol 890 MovieClip Frame 15
_root.Shock1._x = _root.MgShock.animArray[11];
_root.Shock1._y = _root.MgShock.animArray[12];
_root.Shock1.swapDepths(((_root.Shock1._y * 600) + _root.Shock1._x) + 1);
_root.Shock1.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 18
_root.Shock2._x = _root.MgShock.animArray[21];
_root.Shock2._y = _root.MgShock.animArray[22];
_root.Shock2.swapDepths(((_root.Shock2._y * 600) + _root.Shock2._x) + 1);
_root.Shock2.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 29
_root.Shock3._x = _root.MgShock.animArray[31];
_root.Shock3._y = _root.MgShock.animArray[32];
_root.Shock3.swapDepths(((_root.Shock3._y * 600) + _root.Shock3._x) + 1);
_root.Shock3.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 40
_global.CheckMagic(2, 22, 99999);
_root.player.MgMessage.text = "";
_root.player.gotoAndStop(_root.faceIndex + "Stand");
delete _root.MgShock.animArray;
Symbol 890 MovieClip Frame 57
gotoAndStop (1);
Symbol 890 MovieClip Frame 86
this.Shock1.gotoAndPlay("Anim1");
this.Shock2.gotoAndPlay("Anim1");
this.Shock3.gotoAndPlay("Anim1");
this.Shock4.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 113
_global.CheckMagic(2, 3, 99999);
_global.SetUnitStatus(_root.player, 3, 10000);
_root.player.MgMessage.text = "";
_root.player.gotoAndStop(_root.faceIndex + "Stand");
gotoAndStop (1);
Symbol 890 MovieClip Frame 120
this.Shock1.gotoAndPlay("Anim1");
this.Shock2.gotoAndPlay("Anim1");
this.Shock3.gotoAndPlay("Anim1");
this.Shock4.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 130
this.Shock1.gotoAndPlay("Anim1");
this.Shock2.gotoAndPlay("Anim1");
this.Shock3.gotoAndPlay("Anim1");
this.Shock4.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 140
this.Shock1.gotoAndPlay("Anim1");
this.Shock2.gotoAndPlay("Anim1");
this.Shock3.gotoAndPlay("Anim1");
this.Shock4.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 150
this.Shock1.gotoAndPlay("Anim1");
this.Shock2.gotoAndPlay("Anim1");
this.Shock3.gotoAndPlay("Anim1");
this.Shock4.gotoAndPlay("Anim1");
Symbol 890 MovieClip Frame 169
_global.CheckMagic(2, 4, 99999);
_root.player.MgMessage.text = "";
_root.player.gotoAndStop(_root.faceIndex + "Stand");
gotoAndStop (1);
Symbol 894 MovieClip Frame 1
stop();
Symbol 901 MovieClip Frame 1
this.onRollOver = function () {
_global.ReferStat(this);
};
this.onRollOut = function () {
_global.ReferStat("");
};
this.onRelease = function () {
_global.ReferCalc(this);
};
Symbol 926 MovieClip Frame 1
this.onRelease = function () {
if (_root.selectHotkeyItem) {
_root.selectHotkeyItem = false;
_root.selectHIobj.index = 0;
_root.selectHIobj.gotoAndStop(1);
}
if (_root.ZUpStartCheck and (_root.tutIndex == 25)) {
_root.ZUpStartCheck = false;
}
_global.ChooseKeyItem(this);
};
this.onRollOver = function () {
_global.ReferHotKey(this);
};
this.onRollOut = function () {
_global.ReferHotKey("");
};
stop();
Symbol 926 MovieClip Frame 3
this.onRelease = function () {
if (_root.ZUpStartCheck and (_root.tutIndex == 25)) {
_root.ZUpStartCheck = false;
}
_global.ChooseKeyItem(this);
};
this.onRollOver = function () {
_global.ReferHotKey(this);
};
this.onRollOut = function () {
_global.ReferHotKey("");
};
stop();
Symbol 927 MovieClip Frame 1
stop();
Symbol 927 MovieClip Frame 2
stop();
Symbol 927 MovieClip Frame 3
stop();
Symbol 927 MovieClip Frame 4
stop();
Symbol 927 MovieClip Frame 5
stop();
Symbol 938 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 2
stop();
Symbol 942 MovieClip Frame 1
stop();
Symbol 942 MovieClip Frame 2
stop();
Symbol 946 MovieClip Frame 1
stop();
Symbol 946 MovieClip Frame 2
stop();
Symbol 950 MovieClip Frame 1
stop();
Symbol 950 MovieClip Frame 2
stop();
Symbol 954 MovieClip Frame 1
stop();
Symbol 954 MovieClip Frame 2
stop();
Symbol 958 MovieClip Frame 1
stop();
Symbol 958 MovieClip Frame 31
gotoAndPlay (2);
Symbol 962 MovieClip Frame 1
stop();
Symbol 962 MovieClip Frame 2
stop();
Symbol 966 MovieClip Frame 1
stop();
Symbol 966 MovieClip Frame 2
stop();
Symbol 995 MovieClip Frame 1
stop();
Symbol 995 MovieClip Frame 2
this.index = 1;
this.lv = 1;
this.onRollOver = function () {
_global.ReferMg(this);
};
this.onRollOut = function () {
_global.ReferMg("");
};
this.onRelease = function () {
if (_root.ZUpStartCheck and (_root.tutIndex == 17)) {
_root.ZUpStartCheck = false;
}
_global.ReferMgIndex(this);
};
stop();
Symbol 997 MovieClip Frame 1
stop();
Symbol 997 MovieClip Frame 2
this.index = 1;
this.lv = 2;
this.onRollOver = function () {
_global.ReferMg(this);
};
this.onRollOut = function () {
_global.ReferMg("");
};
this.onRelease = function () {
_global.ReferMgIndex(this);
};
stop();
Symbol 999 MovieClip Frame 1
stop();
Symbol 999 MovieClip Frame 2
this.index = 1;
this.lv = 3;
this.onRollOver = function () {
_global.ReferMg(this);
};
this.onRollOut = function () {
_global.ReferMg("");
};
this.onRelease = function () {
_global.ReferMgIndex(this);
};
stop();
Symbol 1001 MovieClip Frame 1
stop();
Symbol 1001 MovieClip Frame 2
this.index = 2;
this.lv = 1;
this.onRollOver = function () {
_global.ReferMg(this);
};
this.onRollOut = function () {
_global.ReferMg("");
};
this.onRelease = function () {
_global.ReferMgIndex(this);
};
stop();
Symbol 1003 MovieClip Frame 1
stop();
Symbol 1003 MovieClip Frame 2
this.index = 2;
this.lv = 2;
this.onRollOver = function () {
_global.ReferMg(this);
};
this.onRollOut = function () {
_global.ReferMg("");
};
this.onRelease = function () {
_global.ReferMgIndex(this);
};
stop();
Symbol 1005 MovieClip Frame 1
stop();
Symbol 1005 MovieClip Frame 2
this.index = 4;
this.lv = 1;
this.onRollOver = function () {
_global.ReferMg(this);
};
this.onRollOut = function () {
_global.ReferMg("");
};
this.onRelease = function () {
_global.ReferMgIndex(this);
};
stop();
Symbol 1007 MovieClip Frame 1
stop();
Symbol 1007 MovieClip Frame 2
this.index = 2;
this.lv = 3;
this.onRollOver = function () {
_global.ReferMg(this);
};
this.onRollOut = function () {
_global.ReferMg("");
};
this.onRelease = function () {
_global.ReferMgIndex(this);
};
stop();
Symbol 1013 MovieClip Frame 1
stop();
Symbol 1016 MovieClip Frame 1
stop();
Symbol 1018 MovieClip Frame 1
stop();
Symbol 1029 MovieClip Frame 1
this.index = 1;
this.usable = true;
with (this) {
if (_root.itemsArray[1] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[1];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1032 MovieClip Frame 1
this.index = 4;
this.usable = false;
with (this) {
if (_root.itemsArray[4] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[4];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1035 MovieClip Frame 1
this.index = 5;
this.usable = false;
this.weaponType = 5;
with (this) {
if (_root.itemsArray[5] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[5];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1038 MovieClip Frame 1
this.index = 3;
this.usable = false;
with (this) {
if (_root.itemsArray[3] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[3];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1041 MovieClip Frame 1
this.index = 2;
this.usable = true;
with (this) {
if (_root.itemsArray[2] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[2];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1044 MovieClip Frame 1
this.index = 9;
this.usable = false;
with (this) {
if (_root.itemsArray[9] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[9];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1047 MovieClip Frame 1
this.index = 8;
this.usable = false;
with (this) {
if (_root.itemsArray[8] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[8];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1050 MovieClip Frame 1
this.index = 7;
this.usable = true;
with (this) {
if (_root.itemsArray[7] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[7];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1053 MovieClip Frame 1
this.index = 6;
this.usable = true;
with (this) {
if (_root.itemsArray[6] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[6];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1056 MovieClip Frame 1
this.index = 12;
this.armorType = 1;
this.vit = 40;
with (this) {
if (_root.itemsArray[12] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[12];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1059 MovieClip Frame 1
this.index = 11;
this.armorType = 2;
this.vit = 15;
with (this) {
if (_root.itemsArray[11] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[11];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1061 MovieClip Frame 1
this.index = 13;
this.keyItem = true;
this.usable = false;
with (this) {
if (_root.itemsArray[13] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[13];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1063 MovieClip Frame 1
this.index = 10;
this.usable = false;
this.weaponType = 3;
with (this) {
if (_root.itemsArray[10] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[10];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1065 MovieClip Frame 1
this.index = 14;
this.usable = false;
this.weaponType = 1;
with (this) {
if (_root.itemsArray[14] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[14];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1068 MovieClip Frame 1
this.index = 15;
this.usable = false;
this.weaponType = 4;
with (this) {
if (_root.itemsArray[15] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[15];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1071 MovieClip Frame 1
this.index = 17;
this.usable = false;
this.weaponType = 6;
with (this) {
if (_root.itemsArray[17] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[17];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1074 MovieClip Frame 1
this.index = 16;
this.usable = false;
this.accessType = 1;
with (this) {
if (_root.itemsArray[16] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[16];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1077 MovieClip Frame 1
this.index = 18;
this.usable = false;
this.armorType = 99;
with (this) {
if (_root.itemsArray[18] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[18];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1080 MovieClip Frame 1
this.index = 19;
this.usable = false;
this.weaponType = 99;
with (this) {
if (_root.itemsArray[19] > 0) {
vision = true;
} else {
vision = false;
}
_visible = vision;
Quantext.text = _root.itemsArray[19];
}
this.onRelease = function () {
_global.UseItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
};
this.onRollOut = function () {
_global.ReferItem("");
};
Symbol 1099 MovieClip Frame 1
stop();
Symbol 1099 MovieClip Frame 2
stop();
Symbol 1099 MovieClip Frame 3
stop();
Symbol 1099 MovieClip Frame 4
stop();
Symbol 1099 MovieClip Frame 5
stop();
Symbol 1099 MovieClip Frame 6
stop();
Symbol 1101 MovieClip Frame 1
stop();
Symbol 1101 MovieClip Frame 2
stop();
Symbol 1105 MovieClip Frame 1
stop();
Symbol 1105 MovieClip Frame 2
stop();
Symbol 1105 MovieClip Frame 3
stop();
Symbol 1105 MovieClip Frame 4
stop();
Symbol 1107 MovieClip Frame 1
stop();
Symbol 1109 MovieClip Frame 1
stop();
Symbol 1116 MovieClip Frame 1
stop();
Symbol 1116 MovieClip Frame 2
this.index = 0;
this.onRollOver = function () {
_global.ReferSp(this);
};
this.onRollOut = function () {
_global.ReferSp("");
};
this.onRelease = function () {
_global.ReferSpIndex(this);
};
stop();
Symbol 1117 MovieClip Frame 1
stop();
Symbol 1117 MovieClip Frame 2
this.index = 1;
this.onRollOver = function () {
_global.ReferSp(this);
};
this.onRollOut = function () {
_global.ReferSp("");
};
this.onRelease = function () {
_global.ReferSpIndex(this);
};
stop();
Symbol 1132 MovieClip Frame 1
stop();
switch (_root.playerPicture) {
default :
_root.Status.Picture_Player.gotoAndStop("Type0");
break;
case 1 :
_root.Status.Picture_Player.gotoAndStop("Type1");
break;
case 2 :
_root.Status.Picture_Player.gotoAndStop("Type2");
break;
case 3 :
_root.Status.Picture_Player.gotoAndStop("Type3");
break;
case 4 :
_root.Status.Picture_Player.gotoAndStop("Type4");
break;
case 5 :
_root.Status.Picture_Player.gotoAndStop("Type5");
}
_root.Status.Refer1.index = 1;
_root.Status.Refer2.index = 2;
_root.Status.Refer3.index = 3;
_root.Status.Refer4.index = 4;
_root.Status.Refer5.index = 5;
_root.Status.Refer6.index = 6;
_root.Status.Refer7.index = 7;
_root.Status.Refer8.index = 8;
Symbol 1132 MovieClip Frame 2
stop();
_root.Status.AddFrc.onRelease = function () {
if (_root.Status.Btn_Attributes._visible) {
_root.player.frc++;
_root.player.ext--;
}
_global.RefreshingStatus();
};
_root.Status.AddFcs.onRelease = function () {
if (_root.Status.Btn_Attributes._visible) {
_root.player.fcs++;
_root.player.ext--;
}
_global.RefreshingStatus();
};
_root.Status.AddSpr.onRelease = function () {
if (_root.Status.Btn_Attributes._visible) {
_root.player.spr++;
_root.player.ext--;
}
_global.RefreshingStatus();
};
_root.Status.AddKno.onRelease = function () {
if (_root.Status.Btn_Attributes._visible) {
_root.player.kno++;
_root.player.ext--;
if ((_root.ZUPStartCheck and (_root.tutIndex == 13)) and (_root.player.kno == 10)) {
_root.ZUPStartCheck = false;
}
}
_global.RefreshingStatus();
};
_root.Status.AddVit.onRelease = function () {
if (_root.Status.Btn_Attributes._visible) {
_root.player.vit++;
_root.player.ext--;
}
_global.RefreshingStatus();
};
Symbol 1132 MovieClip Frame 3
if (_root.mg1Lv >= 1) {
_root.Status.Picture_MgSpark.gotoAndStop(2);
}
if (_root.mg1Lv >= 2) {
_root.Status.Picture_MgIncendiary.gotoAndStop(2);
}
if (_root.mg1Lv >= 3) {
_root.Status.Picture_MgPhoenix.gotoAndStop(2);
}
if (_root.mg2Lv >= 1) {
_root.Status.Picture_MgCharge.gotoAndStop(2);
}
if (_root.mg2Lv >= 2) {
_root.Status.Picture_MgLightningZap.gotoAndStop(2);
}
if (_root.mg2Lv >= 3) {
_root.Status.Picture_MgStorm.gotoAndStop(2);
}
if (_root.mg4Lv >= 1) {
_root.Status.Picture_MgHeal.gotoAndStop(2);
}
stop();
Symbol 1132 MovieClip Frame 4
stop();
_root.Status.Btn_Quality.QualityText.text = _quality;
_root.Status.Btn_Quality.onRelease = function () {
if (_root.quality != 4) {
_root.quality++;
} else {
_root.quality = 1;
}
_global.ToggleQuality();
};
_root.Status.Btn_Refer.ReferText.text = _root.referSettingText;
_root.Status.Btn_Refer.onRelease = function () {
_root.referSetting = !_root.referSetting;
_global.ToggleRefer();
};
if (_root.animSetting) {
_root.Status.Btn_AnimationSet.AnimText.text = "ON";
} else {
_root.Status.Btn_AnimationSet.AnimText.text = "OFF";
}
_root.Status.Btn_AnimationSet.onRelease = function () {
_root.animSetting = !_root.animSetting;
if (_root.animSetting) {
_root.Status.Btn_AnimationSet.AnimText.text = "ON";
} else {
_root.Status.Btn_AnimationSet.AnimText.text = "OFF";
}
_root.alphaSpeed = 8 + ((1 - _root.animSetting) * 100);
};
_root.Status.Btn_MainMenu.onRelease = function () {
_root.dead = true;
};
if (_root.alphaSetting) {
_root.Status.Btn_AlphaSet.AnimText.text = "ON";
} else {
_root.Status.Btn_AlphaSet.AnimText.text = "OFF";
}
_root.Status.Btn_AlphaSet.onRelease = function () {
_root.alphaSetting = !_root.alphaSetting;
if (_root.alphaSetting) {
_root.Status.Btn_AlphaSet.AnimText.text = "ON";
} else {
_root.Status.Btn_AlphaSet.AnimText.text = "OFF";
}
};
_root.Status.Btn_SaveGame.onRelease = function () {
if (!_root.gamePause) {
if (_root.tutorialRunning) {
_global.ShowMessage("Unable to save game during tutorial.");
} else {
_root.SaveGame_Bar.Title.text = "SAVE GAME";
_root.getCookieEnable("SGdata1", "slot", 1);
_root.getCookieEnable("SGdata2", "slot", 2);
_root.getCookieEnable("SGdata3", "slot", 3);
_root.getCookieEnable("SGdata4", "slot", 4);
_root.getCookieEnable("SGdata5", "slot", 5);
i = 0;
while (i < 6) {
if (_root.gameDataE[i] != undefined) {
_root.SaveGame_Bar["DataSlot" + i].Name.text = _root.gameDataE[i];
} else {
_root.SaveGame_Bar["DataSlot" + i].Name.text = "Empty Slot";
}
i++;
}
_root.SaveGame_Bar._visible = true;
_root.gamePause = true;
}
}
};
Symbol 1132 MovieClip Frame 5
_root.Status.Picture_Armor.gotoAndStop("Type" + _root.armorType);
_root.Status.Picture_Weapon.gotoAndStop("Type" + _root.weaponType);
_root.Status.Picture_Others.gotoAndStop("Type" + _root.accessType);
_root.Status.Items.index = 1;
_root.Status.Items.minIndex = 1;
_root.Status.Items.maxIndex = 4;
_root.Status.CashText.text = "$ " + _root.itemsArray[0];
_root.Status.Next.onRelease = function () {
_root.Status.Next.gotoAndPlay(2);
if (_root.Status.Items.index != _root.Status.Items.maxIndex) {
_root.Status.Items.index++;
_root.Status.Items.Frame._x = _root.Status.Items.Frame._x - 21.6;
}
};
_root.Status.Prev.onRelease = function () {
_root.Status.Prev.gotoAndPlay(2);
if (_root.Status.Items.index != _root.Status.Items.minIndex) {
_root.Status.Items.index--;
_root.Status.Items.Frame._x = _root.Status.Items.Frame._x + 21.6;
}
};
_root.Status.Picture_Weapon.onRollOver = function () {
_global.ReferWeapon(_root.weaponType);
};
_root.Status.Picture_Weapon.onRollOut = function () {
_global.ReferWeapon("");
};
_root.Status.Picture_Weapon.onRelease = function () {
_global.UnequipWeapon(_root.weaponType);
};
_root.Status.Picture_Armor.onRollOver = function () {
_global.ReferArmor(_root.armorType);
};
_root.Status.Picture_Armor.onRollOut = function () {
_global.ReferArmor("");
};
_root.Status.Picture_Armor.onRelease = function () {
_global.UnequipArmor(_root.armorType);
};
_root.Status.Picture_Others.onRollOver = function () {
_global.ReferAccess(_root.accessType);
};
_root.Status.Picture_Others.onRollOut = function () {
_global.ReferAccess("");
};
_root.Status.Picture_Others.onRelease = function () {
_global.UnequipAccess(_root.accessType);
};
i = 1;
while (i < 7) {
_root.Status["HotKey" + i].IndexText.text = i;
if ((_root.Status["HotKey" + i].index != undefined) and (_root.Status["HotKey" + i].index != 0)) {
_root.Status["HotKey" + i].gotoAndStop(_root.Status["HotKey" + i].index + 2);
} else {
_root.Status["HotKey" + i].gotoAndStop(1);
}
i++;
}
_root.itemReady = true;
stop();
Instance of Symbol 1084 MovieClip in Symbol 1132 MovieClip Frame 5
on (rollOver) {
this.useHandCursor = false;
}
Symbol 1132 MovieClip Frame 6
if (_root.spLevel >= 1) {
_root.Status.Picture_Sp1.gotoAndStop(2);
}
if (_root.spLevel >= 2) {
_root.Status.Picture_Sp2.gotoAndStop(2);
}
stop();
Symbol 1132 MovieClip Frame 7
_root.itemReady = false;
_root.selectHotkeyItem = false;
_global.ReferItem("");
if (!_root.animSetting) {
gotoAndPlay (16);
}
Symbol 1132 MovieClip Frame 17
switch (_root.statusLoc) {
case "Attributes" :
gotoAndStop (2);
_global.RefreshingStatus();
break;
case "Profile" :
gotoAndStop (1);
_global.RefreshingStatus();
break;
case "Spell" :
gotoAndStop (3);
_global.RefreshingStatus();
break;
case "Options" :
gotoAndStop (4);
_global.RefreshingStatus();
break;
case "Items" :
gotoAndStop (5);
_global.RefreshingStatus();
break;
case "Special" :
gotoAndStop (6);
_global.RefreshingStatus();
}
Symbol 1157 MovieClip Frame 1
_root.CreateBar.Btn_Apply.onRelease = function () {
if (_root.CreateBar.Btn_Apply._currentframe == 2) {
_global.CheckCreate();
} else {
_root.createTool = !_root.createTool;
_global.CreateBarShow(_root.createTool);
}
};
Symbol 1165 MovieClip Frame 1
this.index = 2;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1166 MovieClip Frame 1
this.index = 1;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1168 MovieClip Frame 1
this.index = 6;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1170 MovieClip Frame 1
this.index = 7;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1172 MovieClip Frame 1
this.index = 12;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1174 MovieClip Frame 1
this.index = 11;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1176 MovieClip Frame 1
this.index = 17;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1178 MovieClip Frame 1
this.index = 16;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1180 MovieClip Frame 1
this.index = 5;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1182 MovieClip Frame 1
this.index = 15;
this.onRelease = function () {
_global.BuyItem(this);
};
this.onRollOver = function () {
_global.ReferItem(this);
_global.ReferCost(this);
};
this.onRollOut = function () {
_global.ReferItem("");
_global.ReferCost("");
};
stop();
Symbol 1200 MovieClip Frame 1
_root.ShopBar.Casher.Btn_Apply.onRelease = function () {
if (_root.ShopBar.Casher.Btn_Apply._currentframe == 2) {
if (_root.playerTrading2Calc) {
_global.CheckBuy();
} else if (_root.playerTrading3Calc) {
_global.CheckSell();
}
} else {
_global.CancelTrading();
}
};
Symbol 1201 MovieClip Frame 1
_root.ShopBar.Btn_Sell.onRelease = function () {
_global.SellReady();
};
_root.ShopBar.Btn_Buy.onRelease = function () {
_root.sellingItem = false;
_global.BuyReady();
};
Symbol 1232 MovieClip Frame 1
stop();
Symbol 1232 MovieClip Frame 36
gotoAndPlay (21);
Symbol 1232 MovieClip Frame 42
stop();
Symbol 1232 MovieClip Frame 48
stop();
Symbol 1232 MovieClip Frame 54
stop();
Symbol 1232 MovieClip Frame 60
stop();
Symbol 1232 MovieClip Frame 66
stop();
Symbol 1232 MovieClip Frame 75
stop();
Symbol 1232 MovieClip Frame 84
stop();
Symbol 1232 MovieClip Frame 112
gotoAndPlay (85);
Symbol 1232 MovieClip Frame 118
stop();
Symbol 1232 MovieClip Frame 173
stop();
Symbol 1232 MovieClip Frame 179
stop();
Symbol 1232 MovieClip Frame 246
gotoAndPlay (180);
Symbol 1244 MovieClip Frame 1
stop();
Symbol 1244 MovieClip Frame 14
stop();
Symbol 1247 MovieClip Frame 1
stop();
Symbol 1247 MovieClip Frame 11
stop();
Symbol 1247 MovieClip Frame 21
gotoAndPlay (15);
Symbol 1247 MovieClip Frame 28
stop();
Symbol 1247 MovieClip Frame 36
stop();
Symbol 1247 MovieClip Frame 50
gotoAndPlay (37);
Symbol 1247 MovieClip Frame 70
stop();
Symbol 1247 MovieClip Frame 85
stop();
Symbol 1247 MovieClip Frame 113
gotoAndPlay (86);
Symbol 1247 MovieClip Frame 159
gotoAndStop (11);