Frame 1
do {
// swfAction0x73 // Unknown action
// swfAction0x74 // Unknown action
while (_local1 < patches.length) {
var _local2 = patches[_local1];
if (_local2[0] > _local3) {
applyPatch(_local2[1]);
}
_local1++;
}
patchLog = (("[Patch] Version " + _local3) + " >> Version ") + gameVersion;
function applyPatch(myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
var _local2 = myArray[_local1];
activeStage[_local2] = gameStage[_local2];
_local1++;
}
}
function setStatArray(myArray) {
currentArray = myArray;
}
function addNewStat(stat) {
currentArray.push(stat);
}
function getVarArray(myType, myGenre) {
if (myType == "equip") {
if (myGenre == 3) {
return("var_weapon");
}
return("var_equip");
}
if (myType == "use") {
if (myGenre == 0) {
return("var_iPotion");
}
if (myGenre == 1) {
return("var_pPotion");
}
if (myGenre == 2) {
return("var_shuriken");
}
}
}
function replaceStat(myStat) {
switch (myStat) {
case "maxHealth" :
return("Max Health");
case "maxMana" :
return("Max Mana");
case "defense" :
return("Defense");
case "speedBonus" :
return("Speed");
case "basicJumpPower" :
return("Jump");
case "weapon_minDamage" :
return("Minimum Damage");
case "weapon_maxDamage" :
return("Maximum Damage");
case "element_minDamage" :
return("Element Minimum Damage");
case "element_maxDamage" :
return("Element Maximum Damage");
case "elementChance" :
return("Side Effect Rate");
case "elementDuration" :
return("Side Effect Duration");
case "accuracy" :
return("Accuracy");
case "avoidability" :
return("Avoidability");
case "critChance" :
return("Critical Hit");
case "Fire_res" :
return("Fire Resistance");
case "Ice_res" :
return("Ice Resistance");
case "Lightning_res" :
return("Lightning Resistance");
case "str" :
return("Strength");
case "dex" :
return("Dexterity");
case "wis" :
return("Wisdom");
case "luk" :
return("Luck");
case "damage" :
return("Damage");
case "elementDamage" :
return("Element Damage");
case "health" :
return("Health");
case "mana" :
return("Mana");
case "starSpeed" :
return("Speed");
case "starDamage" :
return("Damage");
case "level" :
return("Level");
}
}
function moveFrame(frameNumber) {
onEnterFrame = null;
_root.gotoAndStop(frameNumber);
}
function loadData() {
gameStage = new Array();
monsterData = new Array([], []);
itemData = new Array([], []);
objectData = new Array([], []);
storeData = new Array([], []);
skillData = new Array([], []);
npcData = new Array([], []);
} while (isWeb != true);
soundString = "~Menu, Character Creation|explosion, swing1, swing2, swing3, punch1, punch2, punch3, punch4, hardpunch1, hardpunch2, hardpunch3, splitBlood, putEquip, shurikenHit, shurikenThrow1, shurikenThrow2, meteor, gold, pick_gold, scroll_success, jump, levelUp, portal, investPoint, quest_begin, quest_abort, quest_taskComplete, quest_complete, quest_end, pick_item, drop_item, heal~Forest, Courtyard, Village, Cave, Monastery";
soundSizeString = "2539189, 12818286";
stageString = "Objects Bin, 1, 1, 0, -1~~~|Forest, 1, 1, 0, 0~~51, 240, -174^15, 284, -156^15, -270, -52^35, 207, -158^35, -333, -198^37, 25, -27^37, 386, -210~8, 126, -204, 1, 0|Forest 2, 1, 2, 0, 0~7, 320, -153^0, 544, -153~8, -301, -24^9, -241, -215^12, 261, -28^11, -47, -87^6, -346, -169^32, 109, -203^32, -293, -166^32, -26, -74^13, 1213, -216^14, 585, -34^49, 559, -209^12, 908, -125^52, 728, -224^52, 1208, -166^50, 1070, -15~|Forest 3, 1, 1, 0, 0~1, 161, -173^1, 80, -173^1, 243, -174~51, -75, -213^51, 337, -203^51, 435, -43^49, -239, -199^49, 291, -219^49, 274, -14^52, 199, -222^50, -123, -12^50, 125, -226^13, -379, -223^15, -66, -198^15, 326, -189^15, -24, -18~|Forest 4, 1, 1, 0, 0~~0, -12, -138, 6, -274, -164, 0^12, -155, -66^12, 88, -194^10, 216, -134^10, -38, -207^10, -42, -50^10, 128, -78^11, 196, -97^11, -212, -129^12, -182, -169^9, -115, -196^9, 158, -170^9, 39, -202^9, -99, -50^9, -180, -99^9, -276, -171^9, 275, -116^32, -405, -125^32, 249, -219^32, 380, -51^32, 286, -22^35, -221, -24^35, -390, -216^35, -151, -176^35, 408, -193~|Training Zone, 8, 2, 0, 1~58, 614, -162~61, -180, -206^61, 257, -183^62, 561, -30^62, 1228, -232^33, 121, -153^9, 1174, -224^65, 227, -35^63, 857, -218~57, 841, -176, 1, 1|Ruined Village, 15, 2, 0, -1~~68, 99, -39^69, 894, -203^70, -58, -63^71, -207, -213^72, 1320, -48^70, 1249, -164^73, 624, -182~10, 535, -192, 0, 0|Village, 3, 4, 0, 2~~0, 1841, -59, 11, -449, -165, 0^0, 876, -164, 8, 1364.9, -165, 0^27, 453, -123^31, 345, -97^31, -435, -38^31, 1716, -217^31, 2049, -55^32, 2863, -18^52, -122, -231^51, 1958, -188^35, 1460, -52^35, 3290, -55^67, -282, -117^74, 3041, -123^77, 798, -163^78, 1747, -57^80, 563, -92^45, 127, -191^79, 41, -173^46, 2692, -209^27, 1554, -182^76, 1173, -64^46, 2350, -113^81, 2455, -88^0, 449, -89, 16, 407.2, -165, 0^0, 1171, -30, 20, 407.2, -165, 0^0, 2349, -79, 19, 407.2, -165, 0^0, 3041, -88, 18, -449, -165, 0^0, -285, -82, 15, -449, -165, 0^0, 2709, -46, 14, -449, -165, 0^82, 2816, -49^0, 1556, -145, 21, -449, -165, 0^0, 127, -154, 17, 407.2, -165, 0~13, 1479, -164, 1, 0^4, -156, -100, 0, 0|Woods 1, 1, 2, 0, 0~~0, -446, -126, 9, 1364.9, -165, 0^0, 1367.9, -126, 7, 873, -203, 0^17, 214, -33^3, 710, -218^6, 1043, -41^7, 1365, -228^66, -89, -125^65, 696, -166^8, -212, -209^4, 228, -226^40, 1150, -126^40, 483, -227^32, 854, -221^32, 253, -134^32, 111, -81^35, -2, 24~|Woods 2, 1, 2, 0, 0~~0, -446, -126, 10, -426, -56, 0^0, 1367.9, -126, 8, -449, -165, 0^49, -244, -207^49, 336, -65^49, 1010, -220^50, 879, -91^50, -159, -45^13, 249, -228^13, 1126, -20^15, 780, -224^15, 1051, -7^15, 155, -211^15, -257, -44^11, -130, -209^63, 456, -209~|Woods 3, 1, 1, 0, 0~~28, 0, -235^60, -196, -206^60, 188, -210^63, 355, -160^52, 282, -217^52, -350, -227^52, 439, -97^51, 289, -30^15, 366, -15^15, -292, -226^40, 241, -208^40, 450, -79^31, 329, -224^31, 260, -16^10, -217, -169^11, 114, -103^0, -423, -17, 9, -449, -165, 0^51, -430, -149^40, -357, -133^18, -102, -35^0, -3, -190, 12, -449, -165, 0~|Cemetery, 11, 2, 0, -1~~0, -446, -126, 7, 1838, -98, 0^29, -217, -218^29, 220, -219^29, 722, -205^30, 1212, -221^43, 393, -183^43, 912, -188^43, 1359, -229^44, -213, -38^44, 404, -45^29, 1041, -26^30, 70, -35^43, 632, -14^43, -95, -225~|Cave 1, 2, 2, 20:53, 3~14, 1079, -230^14, 732, -74^14, -136, -168^14, 233, -246~0, -446, -126, 10, -6, -229, 0^0, 1367.9, -126, 13, -449, -165, 0^53, 13, -226^56, 226, -28^56, 1251, -212^57, 688, -220^57, 1052, -33^57, -320, -211^58, 209, -143^58, 847, -162~|Cave 2, 2, 2, 22:05, 3~14, -139, -97^14, 127, -236^15, 380, -91^15, 1168, -239^14, 723, -231^14, 1000, -112~0, -446, -126, 12, 1364.9, -165, 0^54, -285, -216^54, 362, -210^54, 788, -18^57, 582, -154^57, 1172, -158^57, -54, -20^58, 67, -173^58, 1311, -227~62, 1321, -165, 1, 0|Swamp, 7, 3, 0, -1~4, -194, -196^4, 337, -69^4, 823, -233^4, 966, -118^4, 1706, -60^4, 1631, -248^4, 2163, -171~0, -446, -126, 7, 2706, -85, 0^16, 1233, -149^16, 258, -227^15, 1390, -84^15, 110, -169^15, -175, -32^23, -3, -125^23, 2289, -83^16, 2184, -228^15, 2196, -193^66, 2063, -43^66, 584, -101^5, -218, -212^5, 1532, -203^21, 747, -21^21, 1793, -225^23, 48, -235^24, 1749, -162^20, 2033, -19^20, -110, -221~|Prison, 13, 1, 04:34, -1~~0, -446, -126, 7, -288, -121, 0^75, -13, -216~34, 10, -235, 0, 0^51, -250, -235, 0, 0^58, 250, -235, 1, 0|Weapon Shop, 6, 1, 05:02, 2~~0, 410.2, -126, 7, 446, -128, 0^87, 299, -232^87, -193, -235^87, -275, -236^86, -380, -235^85, 18, -197^86, 209, -226^86, -175, -19~30, -292, -172, 0, 0^61, -372, -124, 0, 0|Potion Shop, 6, 1, 05:02, 2~~0, 410.2, -126, 7, 124, -193, 0^83, -325, -230^83, 313, -232^84, -130, -231^84, 105, -230~5, -291, -100, 0, 0^63, -200, -130, 0, 0|Temple, 14, 2, 05:02, -1~~0, -446, -126, 7, 3038, -127, 0~35, -330, -258, 0, 0^36, 764, -90, 1, 0^2, 1226, -198, 1, 0^37, 10, -171, 1, 0^31, 394, -244, 0, 0|General Store, 6, 1, 05:02, 2~~0, 410.2, -126, 7, 2346, -118, 0^83, -107, -234^88, 239, -234^88, -400, -232^85, -157, -73^87, 11, -232^84, 363, -236^86, -251, -235~6, -296, -168, 0, 0^9, 151, -233, 1, 0|Lord Qian's Hut, 13, 1, 05:02, 2~~0, 410.2, -126, 7, 1168, -69, 0^84, 193, -236^89, -335, -183^85, -434, -157^92, 272, -15^90, -386, -27^90, 52, -229^91, -258, -24^91, -115, -226^86, 328, -231~7, -297, -153, 0, 0^20, 62, -207, 0, 0^21, -29, -89, 0, 0|Damien's Hut, 13, 1, 05:02, 2~~0, -446, -126, 7, 1553, -184, 0^89, 323, -212^85, 411, -187^86, -361, -230^86, -45, -233^87, -286, -225^87, 196, -227^88, 18, -231^92, 215, -213^90, -253, -230^90, 56, -234^90, 271, -161^90, 416, -121^90, 289, -93^91, 360, -50^91, -36, -18~3, 153, -167, 1, 0|Assassins' Tunnels, 12, 2, 05:02, -1~41, 1397, -218~93, 1400, -193~28, 948, -222, 0, 1|Assassins' Tunnel, 12, 1, 05:02, -1~~~|Lord Qian's Empty Hut, 13, 1, 05:02, 2~~84, 193, -236^89, -335, -183^85, -434, -157^92, 272, -15^90, -386, -27^90, 52, -229^91, -258, -24^91, -115, -226^86, 328, -231~|Clearing, 8, 2, 0, -1~5, 1203, -155~~";
monsterString = "Block, Certain monsters have to be killed in order to remove this^ used in Quests., block, 1, 0, 0, 0, 1, None, 0, 1~0, 0, 0, 99999999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|Box, A wooden box. Usually empty but may sometimes store food., box, 2, 0, 0, 0, 1, None, 0, 1~0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|Dark Wolf, A peaceful wolf that has shown the first signs of mutation.#n#It's opaque fur reflecting well^ what it may later become., Dark Wolf, 3, 0, 4, 0, 1, None, 1, 0~3-6, 20-30, 1, 30, 0, 3, 2, 4, 0, 0, 20, 0, 0, 0, 0, 0~~|Silver Wolf, A highly mutated wolf.#n#Can be found at dark places or wandering during the night.#n#Silver for it is found that its bite leaves a silver sliver., Silver Wolf, 4, 0, 4, 0, 1, Rage, 1, 0~10-20, 40-60, 2, 100, 0, 4, 5, 7, 0, 0, 20, 0, 0, 0, 0, 0~~|Toxic Armadillo, Equipped with natural toxic^ this mutated monster can cause very bad injuries.#n#Hunted by potion masters^ for it's toxin is very vaulable., Toxic Armadillo, 5, 0, 3, 0, 2-500, None, 0, 0~8-12, 30-45, 2, 80, 200, 2, 1, 3, 1, 1, 20, 0, 30, 0, 0, 0~10, 20, 0, 0, toxic, none, toxic, 100, 100, 100, 1, 20, 5, 0~111*a|Red Beast, A highly dangerous beast^ for the wolf's veins run deep with ice.#n#It's red fur shows well what atrocities it has gone through in order to become such a creature of horror., Red Beast, 6, 0, 4, 2-25-5, 0-500, Berserk, 1, 0~700-1000, 1000, 10, 600, 100, 4, 30, 50, 0, 0, 1000, 1, 50, 0, 0, 0~10, 20, 10, 20, energy, none, none, 100, 100, 100, 1, 10, 5, 0~|Merchant's Box, Contains the stock for a merchant's sales., box, 2, 0, 0, 0, 1, None, 1, 1~0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~75*a, 47*a, 94*a, 60*a|Weak Wolf, A very weak wolf.#n#Often found in woods^ these beasts can cause little damage., Dark Wolf, 3, 0, 1, 0, 1, None, 1, 0~0, 5, 1, 10, 0, 2, 1, 1, 0, 0, 30, 0, 0, 0, 0, 0~~|Wooden Target, Training Tool., Wooden Target, 7, 0, 0, 0, 1, None, 0, 1~0, 0, 0, 999999999999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|Wooden Dummy, Training Tool^ able to endure any damage., Wooden Dummy, 8, 0, 0, 0, 1, None, 0, 1~0, 0, 0, 999999999999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|Bullseye, Training Tool^ used by ranged warriors., Bullseye, 9, 0, 0, 0, 1, None, 0, 1~0, 0, 0, 999999999999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|Scarecrow, Training Tool^ which has many uses., Scarecrow, 10, 0, 0, 0, 1, None, 0, 1~0, 0, 0, 999999999999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|Night Beast, Only seen at night^ this beast can be highly dangerous.#n#Its fur acts as camouflage making it hard for its opponent to harm it., Silver Wolf, 4, 0, 0, 0, 1, None, 1, 0~0, 100-150, 5, 200, 100, 4, 10, 15, 0, 0, 200, 2, 50, 0, 0, 0~~|Rare Armadillo, More deadly than it's predecessors. this creature carries a toxin so rare that many die trying to collect it., Toxic Armadillo, 5, 0, 0, 0, 2-500, Defense Up, 1, 0~15-20, 60-120, 5, 200, 200, 3, 1, 3, 1, 1, 100, 1, 20, 0, 0, 0~10, 20, 0, 0, toxic, none, toxic, 100, 100, 100, 1, 20, 5, 10@10, 20, 0, 0, toxic, none, toxic, 100, 100, 100, 1, 20, 5, 0~|Cave Dark Wolf, A peaceful wolf that has shown the first signs of mutation.#n#These prefer the humid and dark places such as caves., Dark Wolf, 3, 0, 0, 0, 1, None, 0, 0~2-5, 5-9, 1, 20, 0, 3, 2, 4, 0, 0, 20, 0, 0, 5, 0, 0~~|Cave Silver Wolf, A highly mutated wolf.#n#Can be found at dark places or wandering during the night., Silver Wolf, 4, 0, 0, 0, 1, None, 0, 0~6-9, 15-20, 2, 50, 0, 4, 5, 7, 0, 0, 20, 0, 0, 0, 5, 0~~3*a|Weak Armadillo, Although not as deadly as his brothers.#n#The weak armadillo can still harm one if not prepared^ and his solid armor protects him from all sorts of damage., Toxic Armadillo, 5, 0, 3, 0, 2-500, None, 1, 0~2-5, 10-15, 2, 50, 40, 2, 1, 3, 1, 1, 20, 0, 10, 0, 0, 0~5, 10, 0, 0, toxic, none, toxic, 50, 50, 50, 1, 20, 5, 0~|12, Friend of Meru^ affected by a power stronger than him^ he died defending a cause he didn't know., , , 0, 4, 0, 1, Berserk, 0, 0~2-5, 200, 5, 200, 0, 5, 15, 20, 0, 0, 200, 0, 0, 0, 0, 0~~76*a, 48*a, 95*a, 61*a|17, Warden to the village prison.#n#This man is tough and can be quite a challenge when in a fight., , , 2, 0, 0, 1, None, 0, 0~0, 60-80, 5, 100, 0, 3, 7, 15, 0, 0, 100, 0, 10, 0, 0, 0~~24*a|18, Target on Tarreal's list^ he is a victim of higher decisions., , , 0, 0, 0, 1, None, 0, 0~1-2, 5, 1, 10, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0~~75*a, 47*a, 94*a, 60*a, 76*a, 48*a, 95*a, 61*a|19, Second target^ he is told to be a harmful soul to the village., , , 0, 0, 0, 1, None, 0, 0~1-3, 10, 1, 20, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0~~75*a, 47*a, 94*a, 60*a, 76*a, 48*a, 95*a, 61*a|65, Lord of the village. He has defended and protected it valiantly.#n#Although was manipulated^ like many by forces stronger than him., , , 0, 0, 0, 1, None, 0, 0~100, 80, 3, 250, 0, 2, 5, 10, 0, 0, 100, 1, 0, 0, 0, 0~~|20, Loyal knight to Qian^ he is a strong opponent., , , 0, 4, 0, 1, None, 0, 0~0, 100-200, 3, 300, 0, 2, 10, 15, 0, 0, 100, 0, 20, 0, 0, 0~~42*4, 89*4, 69*4, 55*4, 88*a, 41*a, 68*a, 54*a|21, Tyanallo has fought many battles^ but has taken up the task of protecting Qian with his life., , , 0, 4, 0, 1, None, 0, 0~0, 200-300, 4, 200, 0, 2, 15, 30, 0, 0, 100, 0, 50, 0, 0, 0~~42*4, 89*4, 69*4, 55*4, 88*a, 41*a, 68*a, 54*a|22, Robber of the village. They are often guided by the sight of money., , , 0, 4, 0, 1, None, 0, 0~8-15, 50-70, 2, 100, 0, 2, 5, 10, 0, 0, 20, 0, 0, 0, 0, 0~~76*3, 48*3, 95*3, 61*3|23, Like his friend^ they have been ruffians from a young age., , , 0, 4, 0, 1, None, 0, 0~8-15, 50-70, 2, 100, 0, 2, 5, 10, 0, 0, 20, 0, 0, 0, 0, 0~~76*3, 48*3, 95*3, 61*3|24, Assassins guided by their leader^ they act without question., , , 0, 0, 0, 1, None, 0, 0~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|25, Assassins guided by their leader^ they act without question., , , 0, 0, 0, 1, None, 0, 0~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|26, Assassins guided by their leader^ they act without question., , , 0, 0, 0, 1, None, 0, 0~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|27, Assassins guided by their leader^ they act without question., , , 0, 0, 0, 1, None, 0, 0~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|28, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~2-7, 80-100, 3, 120, 0, 3, 10, 15, 0, 0, 100, 2, 0, 0, 0, 0~~1*a, 0*a, 77*a, 66*a, 52*a, 39*a, 86*a, 2*a|29, Surrendered when the life of his son was threatened., , , 0, 0, 0, 1, None, 0, 0~50, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|32, Paid guard^ he defend his master's stock., , , 0, 4, 0, 1, None, 0, 0~10-13, 90-120, 3, 150, 0, 3, 12, 17, 0, 0, 100, 1, 30, 0, 0, 0~~24*a|Lord Qian's Box, It contained the lord's key., box, 2, 0, 0, 0, 1, None, 1, 1~0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~~|3, Rich of the village^ he has control through money and corruption.#n#Although was led astray by his own greed., , , 0, 4, 0, 1, Berserk, 0, 0~200, 400-475, 5, 500, 0, 5, 15, 30, 0, 0, 100, 1, 0, 0, 0, 0~~75*20, 47*20, 94*20, 60*20, 32*a|39, Caught up by his own proud^ he fought valiantly for his own code., , , 0, 4, 0, 1, None, 0, 0~80, 300-350, 5, 100, 0, 3, 20, 30, 0, 0, 100, 0, 80, 0, 0, 0~~42*7, 89*7, 69*7, 55*7|40, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~2-8, 75-150, 3, 120, 0, 3, 10, 15, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|41, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~2-8, 75-150, 3, 120, 0, 3, 10, 15, 0, 0, 100, 0, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|42, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~2-8, 75-150, 3, 120, 0, 3, 10, 15, 0, 0, 100, 0, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|43, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~2-8, 75-150, 3, 120, 0, 3, 10, 15, 0, 0, 100, 0, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|44, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~2-8, 75-150, 3, 120, 0, 3, 10, 15, 0, 0, 100, 0, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|Dam, , dam, 1, 0, 0, 0, 1, None, 1, 1~0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 90~~|9, Victim of the beast of night^ and bearer of a missing piece.#n#He was destined to die., , , 0, 0, 0, 1, None, 0, 0~5-7, 80-100, 3, 130, 0, 4, 10, 15, 0, 0, 100, 0, 0, 0, 0, 0~~|64, Loyal servant to Damien^ he got caught up in his master's work., , , 0, 0, 0, 1, None, 0, 0~30, 120-150, 3, 250, 0, 2, 15, 20, 0, 0, 100, 0, 10, 0, 0, 0~~75*10, 47*10, 94*10, 60*10|47, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~5-12, 120-170, 3, 150, 0, 4, 15, 20, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|48, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~5-12, 120-170, 3, 150, 0, 4, 15, 20, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|49, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~5-12, 120-170, 3, 150, 0, 4, 15, 20, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|50, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~5-12, 120-170, 3, 150, 0, 4, 15, 20, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|63, Hunter Lomua has always lived apart from the village.#n#Relying upon his wits and knowledge of nature^ he has thrived and survived for a long time.#n#He spends his time collecting various objects around the woods^ but his true affinity lies with beasts^ and summons., , , 0, 4, 0, 1, None, 0, 0~20-30, 50-70, 2, 150, 0, 2, 5, 10, 0, 0, 50, 1, 0, 0, 0, 0~~|52, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~8-15, 150-200, 3, 200, 0, 4, 15, 25, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|53, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~8-15, 150-200, 3, 200, 0, 4, 15, 25, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|54, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~8-15, 150-200, 3, 200, 0, 4, 15, 25, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|55, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~8-15, 150-200, 3, 200, 0, 4, 15, 25, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|56, Assassins guided by their leader^ they act without question., , , 0, 4, 0, 1, None, 0, 0~8-15, 150-200, 3, 200, 0, 4, 15, 25, 0, 0, 100, 1, 0, 0, 0, 0~~1*a, 0*a, 2*a, 157*a, 154*a, 156*a, 155*a, 158*a|33, Leader of the dreaded assassins.#n#He has held the post for long years until he got defeated by a mortal stronger than him., , , 0, 4, 0, 1, Absolute Defense, 0, 0~120, 650-800, 6, 400, 0, 4, 20, 35, 0, 0, 100, 2, 60, 0, 0, 0~~42*10, 89*10, 69*10, 55*10, 36*a|59, A high ranked assassin in his cult^ he is the brother of Kushio of who tried to save him.#n#Kushio failed^ leaving Guard Zhao to persecute them both. Waiting for their execution^ the brothers were planning together their escape!, , , 0, 4, 0, 1, None, 0, 0~20-30, 200-300, 4, 300, 0, 4, 10, 15, 0, 0, 100, 2, 0, 0, 0, 0~~|60, Assassin and brother of Toyo^ he is the stronger one^ although his sibling will take every opportunity to prove him wrong., , , 0, 4, 0, 1, None, 0, 0~7-10, 200-300, 4, 400, 0, 2, 20, 35, 0, 0, 30, 0, 0, 0, 0, 0~~|57, Recently respected as the tamer. Zensa excels in the arts of magic and taming while being an adept assassin., , , 0, 4, 0, 1, None, 0, 0~60-70, 400-450, 5, 500, 0, 2, 15, 30, 0, 0, 100, 1, 0, 0, 0, 0~~31*a|Tamed Beast, Wolf tamed by it's master.#n#it has no more free will than a common pet and protects its owner with its life., Silver Wolf, 4, 0, 4, 0, 1, Rage, 1, 0~0, 150-250, 3, 150, 0, 5, 10, 15, 0, 0, 200, 3, 10, 0, 0, 0~~|4, , , , 0, 0, 0, 1, None, 0, 0~0, 0, 3, 300, 0, 4, 15, 25, 0, 0, 100, 0, 0, 0, 0, 0~~";
itemString = "Kunai, use, A heavy shuriken^ If used with accuracy can cause lethal damage.#n# Used from far^ it's elegant curves make often the preffered choice of the ninjas., 2~300, 3, 0~10, 3|Bo Shuriken, use, A very light shuriken.#n# Its main strength resting upon rapidity and the agility in which it is used., 2~1000, 3, 0~17, 0|Shuriken, use, Balanced between damage and speed^ it is the equilibrium of the ninja's way., 2~500, 5, 0~13, 1|Health Potion, use, Instantly increase your health.#n# These can be handy^ when times are desperate!, 0~50, 4, 10~10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|Mana Potion, use, Instantly increase your mana.#n# A caster's best friend., 0~50, 15, 10~0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|Defense Potion, use, Increases one's defence for a fixed period of time.#n# When times get tough^ never under estimate the power of this brew!, 1~20, 10, 30, 90~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 3, 0, 0|Attack Potion, use, Increases attack for a fixed period of time.#n# It's purple appearance reflecting well it's lurid purpose., 1~20, 10, 50, 30~0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0|Glove's attack enhancement, use, Enhances gloves with an attack bonus. #n#For those who desire more than just gardening., 3, 4~10, 10, 500, 30~0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|Shoe's speed enhancement, use, Enhances one's shoes with a speed bonus.#n# Preferable for quick escapes., 3, 5~10, 10, 200, 60~0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|Shirt resistance enhancement, use, Enhances a shirt with a resistance bonus. #n#With this^ you will not tary from entering battle^ for your very armour will not submit to damage., 3, 1~10, 10, 200, 80~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0|Weapon attack enhancement, use, Increases the damage done by a weapon.#n# When your attack's simply bruise^ you might as well give this devilish scroll a go!, 3, 3~10, 10, 200, 70~0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|Steel Katana, equip, A sword^ used for medium range combat. #n#Quicker than a broadsword yet^ less deadly., 3~25, 50, 7~0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 1, Sword, 2|Steel Spear, equip, A spear^ used for medium range combat. #n#Can do heavy damage in the right hands. Although speed is limited., 3~25, 50, 7~0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 2, Spear, 1|Steel Dagger, equip, A dagger^ used for close range combat. The soul mate of assassins.#n# This weapon is made for one purpose only. #n#Let your hatred and spite flow as this blade sings through the air., 3~25, 50, 7~0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Soul Hunter, None, 3, Dagger, 3|Wooden Staff, equip, A staff^ used for casting spells.#n# Needed by sages for any incantations., 3~25, 50, 7~0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Sage, None, 4, Staff, 2|Steel Claw, equip, A claw^ used for throwing shurikens. #n#A ingenious invention^ even the deadliest snakes are jealous of these fangs!, 3~25, 50, 7~0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Skyborn, None, 5, Claw, 2|Broadsword, equip, Slow^ yet powerful.#n# It's long handle enables for tight grips., 3~20, 80, 7~0, 0, 0, 0, 1-2, 3-6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 6, Sword, 1|Swashbuckler, equip, A jewel among swords^ it is a balance between speed and damage.#n# It's clever and exquisite appearance makes up for it's price., 3~15, 150, 7~0, 0, 0, 0, 3-4, 5-7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0-10, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 7, Sword, 2|Shirasaya, equip, Faster than most sword. #n#This weapon should be chosen by accurate hands., 3~10, 250, 7~0, 0, 0, 0, 7-8, 9-10, 0, 0, 0, 0, 20-40, 0, 10-20, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 8, Sword, 3|Dark Flamberge, equip, Like an eclipse^ it's opaque pose will leave your enemies blind! #n#Does moderate damage^ and is easily used., 3~2, 500, 7~0, 0, 0, 0, 9-15, 15-20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 9, Sword, 2|Serrated Dagger, equip, A hunter is never fully in his element without this. #n#It's incredibly fast speed makes up for it's damage., 3~20, 80, 7~0, 0, 0, 0, 1-2, 2-3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Soul Hunter, None, 10, Dagger, 4|Sai, equip, Usually used in pairs^ this weapon shines in both speed and damage., 3~15, 170, 7~0, 0, 0, 0, 2-3, 3-4, 0, 0, 0, 0, 0, 0, 5-10, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Soul Hunter, None, 11, Dagger, 3|Curved Dagger, equip, A dagger among others^ this weapon is used for speed., 3~10, 200, 7~0, 0, 0, 0, 3-4, 4-5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0-7, 0, 0, 0~0, 0, 0, 0, 0~Soul Hunter, None, 12, Dagger, 3|Wind Dagger, equip, A avatar among daggers.#n# This mistral is known for its furry in battle.#n# There is no faster dagger out there., 3~5, 375, 10~0, 0, 0, 0, 5-8, 8-12, 0, 0, 0, 0, 80-100, 0, 10-20, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Soul Hunter, None, 13, Dagger, 4|Three-pronged Spear, equip, A trinity of steel^ this weapon can do heavy damage.#n# Although speed is extremely limited., 3~20, 80, 7~0, 0, 0, 0, 4-5, 5-8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 14, Spear, 0|Straight Spear, equip, A favourite among many^ for its solid frame and unbroken physique work well together., 3~20, 150, 7~0, 0, 0, 0, 5-8, 10-12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 15, Spear, 1|Dark Steel Spear, equip, It's opaque appearance reflects well it's sinister secret.#n# Unlike other spears^ this one is as light as a sword., 3~10, 500, 7~0, 0, 0, 0, 10-13, 17-20, 0, 0, 0, 0, 30-50, 0, 0, 0, 0, 0, 0, 0, 10-15, 0, 0~0, 0, 0, 0, 0~Executioner, None, 16, Spear, 2|Harpoon Spear, equip, Accurate and precise.#n# This weapon can do heavy damage^ although there is faster., 3~5, 700, 10~0, 0, 0, 0, 18-20, 23-30, 0, 0, 0, 0, 0, 0, 10-20, 0, 0, 0, 0, 0-15, 0, 0, 0~0, 0, 0, 0, 0~Executioner, None, 17, Spear, 1|Jeweled Staff, equip, This rod bears incredible powers^ for those who have the wisdom to use it., 3~25, 80, 7~0, 0, 0, 0, 3-4, 6-8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Sage, None, 18, Staff, 2|Crystal Staff, equip, A favourite among magistrates. #n#This staff holds power beyond reckoning. Its solid frame is near unbreakable. , 3~20, 120, 7~0, 50-200, 0, 0, 4-6, 8-12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5-25, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Sage, None, 19, Staff, 2|Thorned Staff, equip, Less commonly used staff. #n#This one has a mind of it's own. , 3~15, 200, 7~0, 0, 0, 0, 6-7, 10-18, 0, 0, 0, 0, 0, 0, 5-10, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Sage, None, 20, Staff, 2|Witchdoctor's Staff, equip, This staff gives many attributes^ although wisdom is its first., 3~7, 300, 7~50-100, 50, 0, 0, 8-12, 20-25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5-20, 0~0, 0, 0, 0, 0~Sage, None, 21, Staff, 1|Snakecharmer, equip, A extrememly powerful staff. Death sings where it goes., 3~5, 600, 10~0, 0, 0, 0, 11-15, 22-30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20-50, 20-50~0, 0, 0, 0, 0~Sage, None, 22, Staff, 1|Armored Claw, equip, A useful apparatus. Throws blades at a limited speed., 3~10, 80, 7~0, 0, 0, 0, 1-2, 4-6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Skyborn, None, 23, Claw, 1|Ruby Claw, equip, Worn my lead ninjas. This weapon is faster than its precessesor., 3~15, 130, 7~0, 0, 0, 0, 2-4, 5-8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Skyborn, None, 24, Claw, 2|Emerald Claw, equip, A fast ranged weapon., 3~5, 250, 7~10-50, 0, 0, 0, 3-5, 7-10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0-10~0, 0, 0, 0, 0~Skyborn, None, 25, Claw, 3|Typhoon Claw, equip, A genuis invention. This weapon is accurate and has deadly speed., 3~5, 600, 10~0, 0, 2, 1, 4-7, 12-15, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Skyborn, None, 26, Claw, 4|Civilian Shirt, equip, Worn by common villagers and farmers., 1~0, 5, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 1|Steel Breastplate, equip, A heavy clothing^ although recommended for it's protection., 1~0, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0~2, 5, 0, 0, 0~All, None, 2|Shinobi Shirt, equip, Worn by assassins^ this shirt guaranties a hit., 1~5, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 3|Dark Breastplate, equip, A master piece when it comes to armors. This jewel will block most weapons., 1~0, 40, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0~3, 10, 0, 0, 0~All, None, 4|Warrior's Breastplate, equip, Very heavy^ although it's strength is to be reckoned with., 1~10, 80, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0~5, 20, 0, 0, 0~Executioner, None, 5|Sapphire Plate Body Armor, equip, Made from jewels and the strongest metal. This armor is worth more than it's price., 1~0, 150, 7~0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0~9, 35, 5, 0, 0~Executioner, None, 6|Rogue Top, equip, Enables any kind of movement while worn. This top allows quick maneuvers., 1~0, 40, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 5~4, 0, 0, 0, 10~All, None, 7|Traditional Vest, equip, Stronger than a common shirt. This clothing fits well it's price., 1~0, 30, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0~5, 15, 0, 0, 0~All, None, 8|Buckled Top, equip, Fashionable and effective.#n# This top gives both armour and dexterity., 1~0, 40, 7~0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0~4, 5, 5, 0, 0~All, None, 9|Wrapped Top, equip, When worn^ one is a flux of agitation., 1~0, 80, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 0, 0, 0, 0, 0, 0, 10~7, 0, 0, 0, 20~All, None, 10|Adventurer's Jacket, equip, Worn by most adventurers^ for it gives easy mobilty., 1~3, 80, 7~100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0~8, 0, 10, 0, 0~All, None, 11|Ruffian's Jacket, equip, A amazing piece of clothing. #n#Suits every possible occasion., 1~5, 30, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 5, 5, 5, 5~6, 0, 0, 0, 0~All, None, 12|Fighter's Top, equip, Gives a considerate amount of strength when worn. #n#This top is not to be dismissed easily., 1~0, 90, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0~6, 15, 0, 0, 0~Soul Hunter, None, 13|Civilian Shorts, equip, Worn by most citizens. This clothing suits well it's purpose., 2~0, 5, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 1|Steel Greaves, equip, Gives moderate armor while being limited in the other areas., 2~0, 10, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0~2, 7, 0, 0, 0~All, None, 2|Shinobi Pants, equip, Traditional pants. Camouflage when worn at night., 2~5, 10, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 3|Dark Greaves, equip, As dark as the night^ these greaves are made for defence., 2~0, 30, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0~3, 10, 0, 0, 0~All, None, 4|Warrior's Greaves, equip, Tougher than the dark greaves^ these are for real warriors., 2~10, 80, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0~5, 20, 0, 0, 0~Executioner, None, 5|Sapphire Plate Greaves, equip, Worn for serious battles. #n#These protect against almost any damage., 2~0, 150, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0~9, 35, 0, 0, 0~Executioner, None, 6|Rogue Shorts, equip, Although the resistance is limited.#n# These shorts guaranty dexterity., 2~0, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 5~4, 0, 0, 0, 10~All, None, 7|Traditional Pants, equip, Enhances one's strength while making them tougher., 2~0, 30, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0~5, 15, 0, 0, 0~All, None, 8|Buckled Shorts, equip, Although provides minor armor^ these shorts also have another odd addition., 2~0, 40, 7~0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0~4, 5, 5, 0, 0~All, None, 9|Wrapped Shorts, equip, Gives defence while allowing for stronger damage., 2~0, 80, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 0, 0, 0, 0, 0, 0, 10~7, 0, 0, 0, 20~All, None, 10|Adventurer's Shorts, equip, Provides health and armor. These are a a good choice. , 2~3, 80, 7~50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0~8, 0, 10, 0, 0~All, None, 11|Ruffian's Shorts, equip, Gives the wearer a taste of all attributes. These shorts are commonly worn by robbers and law breaker., 2~5, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 5, 5, 5, 5~6, 0, 0, 0, 0~All, None, 12|Fighter's Shorts, equip, Although these don't provide protection^ they guaranty damage., 2~0, 80, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0~6, 15, 0, 0, 0~Soul Hunter, None, 13|Martial Arts Pants, equip, Useful pants when dealing quick damage., 2~0, 90, 7~0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~8, 20, 10, 0, 0~All, None, 14|Civilian Gloves, equip, Typical gloves worn by villagers., 4~0, 5, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 1|Steel Gauntlets, equip, tough defensive gloves. Useful when figthing, 4~0, 10, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0~2, 10, 0, 0, 0~All, None, 2|Shinobi Gloves, equip, Very supple gloves., 4~5, 10, 7~0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 3|Dark Gauntlets, equip, Tough pair of gloves., 4~0, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0~3, 10, 0, 0, 0~All, None, 4|Warrior's Gauntlets, equip, To be worn when using heavy weapons. #n#Also useful when taking damage., 4~10, 100, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0~4, 10, 0, 0, 0~Executioner, None, 5|Sapphire Plate Gauntlets, equip, Increase one's chakra^ while giving bonus defence., 4~0, 150, 7~0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0~9, 35, 0, 0, 0~Executioner, None, 6|Rogue Gauntlets, equip, Grants limited defence^ although enhances one's dexterity., 4~0, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 2~4, 0, 0, 0, 10~All, None, 7|Shinobi Sleeves, equip, A must when dealing with accuracy. These gloves are often worn by ninjas., 4~0, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~5, 15, 5, 0, 0~All, None, 8|Martial Arts Gauntlets, equip, Increases the damage emitted while worn.#n# Although it doesn't give any defense. #n#These are always seen on the ninjas fighting at close distances., 4~0, 40, 7~0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0~8, 20, 10, 0, 0~All, None, 9|Fighter's Gauntlets, equip, Enhances the wearers strength although not granting any defence what so ever., 4~0, 50, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0~6, 20, 0, 0, 0~Soul Hunter, None, 10|Wrapped Gloves, equip, A useful pair of gloves.#n# These consist of finally cut cloth wrapped around one's hands., 4~0, 30, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0~7, 0, 0, 0, 20~All, None, 11|Adventurer's Gloves, equip, Always seen on adventure's^ these grant health while also giving bonus defence., 4~3, 30, 7~20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0~8, 0, 10, 0, 0~All, None, 12|Ruffian's Gloves, equip, These gloves give a variation of different attributes. , 4~5, 30, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2~6, 0, 0, 0, 0~All, None, 13|Shinobi Facemask, equip, A favourite among ninjas. #n#This mask allows for easy camouflage., 0~5, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 1, 0|Surgical Mask, equip, Often used by doctors and other surgeons. This mask is a original piece of equipement^ although still granting health., 0~0, 20, 7~20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~2, 0, 0, 0, 0~All, None, 2, 0|Bandage Mask, equip, Giving both mana and health^ this item is useful in every single circumstance., 0~0, 20, 7~10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~2, 0, 0, 0, 0~All, None, 3, 0|Porcelain Mask, equip, Most commonly worn by casters. This jewel adds both mana and wisdom., 0~0, 130, 7~0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 10, 0~6, 0, 0, 0, 0~All, None, 4, 0|Shinobi Headband, equip, Always seen on leader ninjas^ this headband grants the wearer protection., 0~0, 40, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0~4, 0, 0, 0, 0~All, None, 5, 0|Shinobi Headband (Alt. Position), equip, Like the shinobi headband^ although it is worn in a different way.#n# Some find it fashionable although not everyone tolerates it., 0~0, 40, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0~4, 0, 0, 0, 0~All, None, 6, 0|Cloth Headband, equip, Although not granting any protection what so ever.#n# This headband consisting of a special cloth enhances the wearers mind and agility., 0~0, 50, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20~5, 0, 0, 0, 0~All, None, 7, 0|Civilian Shoes, equip, Like other low quality clothing^ these give minor if any bonus to the wearer., 5~0, 5, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 1|Steel Boots, equip, Unlike the civilian boots. These brant minor protection., 5~0, 10, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0~2, 10, 0, 0, 0~All, None, 2|Shinobi Tabi, equip, Often seen on ninjas. These allow for quick escapes or rapid interventions., 5~5, 10, 7~0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 3|Dark Boots, equip, Like the steel boots. These grant minor protection against damage., 5~0, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0~3, 10, 0, 0, 0~All, None, 4|Warrior's Boots, equip, Most commonly seen in battle. These are useful when taking damage., 5~10, 100, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0~4, 20, 0, 0, 0~Executioner, None, 5|Sapphire Plate Boots, equip, A strong pair of boots. These protect against strong damage., 5~0, 100, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0~9, 35, 0, 0, 0~Executioner, None, 6|Rogue Boots, equip, Granting both defence and agility. #n#This pair of boots is not to be dismissed easily, 5~0, 40, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 3~4, 0, 0, 0, 10~All, None, 7|Shinobi Geta, equip, These light pair of shoes allow for quicker mobilty. Often worn by ninjas., 5~0, 70, 7~0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~5, 15, 5, 0, 0~All, None, 8|Buckled Boots, equip, Like the Shinobi sandals^ these grant speed., 5~0, 70, 7~0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~4, 5, 5, 0, 0~All, None, 9|Wrapped Shoes, equip, A original pair of shoes. These enhance one's accuracy while fighting., 5~0, 70, 7~0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~7, 0, 0, 0, 20~All, None, 10|Adventurer's Sandals, equip, Useful for any type of activity. #n#These sandals give the wearer bonus health and armour., 5~3, 30, 7~20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0~8, 0, 10, 0, 0~All, None, 11|Ruffian's Shoes, equip, As all Ruffian clothing. These shoes are a advisable pair.#n# Granting all types of attributes^ these are not to be neglected., 5~5, 20, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3, 3, 3, 3~6, 0, 0, 0, 0~All, None, 12|Fighter's Boots, equip, Although not granting speed of accuracy. #n#These are made finely and do give a strength bonus., 5~0, 60, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0~6, 20, 0, 0, 0~Soul Hunter, None, 13|Martial Arts Shoes, equip, Worn by most ninjas^ these always guaranty a quick escape., 5~0, 90, 7~0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~8, 20, 10, 0, 0~All, None, 14|Apple, etc, A delicious apple.~1, 0, 0|Fallen Star, etc, Said it brings luck.~50, 25, 0|Lost Scroll, etc, A lost scroll?~5, 10, 0|Iron Ore, etc, Used to craft weapons and armor.~50, 50, 0|The Cult's Plan, etc, That's terrible! I should hurry up and bring this to Master Tizu!~1, 100, 0|Shard of Night, etc, Extremely valuable and rare material.~3, 100, 0|Medical Supplies, etc, A pack of medical supplies.~1, 0, 20|New Weaponry, etc, A pack of new weaponry.~1, 0, 90|Priceless Scroll, etc, Some sort of unreadable words are written in this scroll.~8, 10, 0|Stolen Goods, etc, Goods stolen from Shop-Owner Saito.~2, 0, 0|Ice Resistance Potion, use, A frozen brew. Protects the wearer from serious cold.#n#To be used wisely for they are rare., 1~1, 0, 100, 180~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0|Martial Arts Top, equip, A elegant top.#n# Made from the finest cloth^ this shirt enhances the wearers accuracy and damage., 1~0, 0, 7~0, 0, 0, 0, 3, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~8, 20, 10, 0, 0~All, None, 14|Apples, etc, Delicious apples.~1, 0, 0|Amarillo toxin, etc, A key ingredient when it comes to making potions.#n# Although it's horrid smell and lucid colour are far more off putting.~20, 20, 2|Rare Armadillo toxin, etc, Used by potion masters. #n#This toxin can be extremely dangerous in the right hands.#n# Although its use is restricted in some areas.~1, 0, 0|Rare Artifact, etc, A old artifact bearing a number of unreadable sentences. ~1, 0, 0|Rare Artifact II, etc, An old artfifact^ which as already started to crumble...~1, 0, 0|Wolf\u2019s Head, etc, Not always advisable to carry around you.#n# For its smell will keep anyone at bay.~1, 0, 0|Key, etc, A key belonging to the warden. ~1, 0, 0|Message, etc, ~1, 0, 0|Lord\u2019s ring, etc, A ring which bears power in its own name. #n#Carried by the lords of most villages. #n#This ring decides who has control.~1, 0, 0|Boat Pass, etc, Needed to board a ship.#n# Although this one is for a special ship.~1, 0, 0|Wooden Sword, equip, Used often for entertainment or playing.#n#The wooden sword is light while causing minimal damage., 3~0, 0, 0~0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 27, Sword, 2|Cape Headwear, equip, Worn often by priests or mysterious travelers hiding their identity., 0~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 17, 1|s1, equip, , 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 16|s2, equip, , 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 17|s3, equip, , 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 18|s4, equip, , 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 19|Prisoner Shirt, equip, Shirt given to prisoners while they occupy a cell., 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 20|Guard's Shirt, equip, Shirt worn by Guard Zhao^ defender of the village., 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 21|Civillian Shirt 2, equip, Shirt commonly worn by civilians^ it gives no useful bonuses except against the cold., 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 22|Civillian Shirt 3, equip, Shirt commonly worn by civilians^ it gives no useful bonuses except against the cold., 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 23|Blood stained villager shirt, equip, Shirt containing the remnants horrors of battle., 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 24|s10, equip, , 1~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 25|p1, equip, , 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 16|p2, equip, , 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 17|p3, equip, , 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 18|p4, equip, , 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 19|Prisoner Pants, equip, Worn by prisoners., 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 20|Guard's Pants, equip, , 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 21|Civillian Pants 2, equip, Clothing giving minor if any defence., 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 22|Civillian Pants 3, equip, Clothing giving minor if any defence., 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 23|Blood stained villager pants, equip, Stained with blood^ they once belonged to a victim., 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 24|p10, equip, , 2~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 25|Ring, equip, A ring of power granting it's bearer minor enhancements., 4~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 18|Tough Gloves, equip, Strong gloves giving the wearer a nice grip^ increasing his accuracy., 4~0, 0, 2~0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0~0, 0, 0, 0, 0~All, None, 22|g3, equip, , 4~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 25|Villager Sandals, equip, Light sandals allowing the wearer to run faster and jump higher., 5~0, 0, 0~0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 16|Brown Shoes, equip, Leather shoes made of fine quality material., 5~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 18|Red White Shoes, equip, Elegant white shoes., 5~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 19|sh4, equip, , 5~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 20|Black Shoes, equip, Pure black shoes; giving both comfort and a slight advantage at night., 5~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 21|Priest Hat, equip, Worn by priests^ this hat grants wisdom and knowledge., 0~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0~4, 0, 0, 7, 0~Sage, None, 19, 0|Cop Hat, equip, , 0~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 21, 1|Rough Hat, equip, Seen often on villagers^ this hat is made from cheap tissu and other materials., 0~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 5~0, 0, 0, 0, 0~All, None, 22, 1|h4, equip, , 0~0, 0, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 25, 1|Traditional Ninja Mask, equip, Made from tissue as fine as silk^ this mask not only protects#n#but grants the wearer a chance to avoid attacks., 0~5, 50, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 26, 1|Traditional Ninja Shirt, equip, Made from tissue as fine as silk^ this shirt not only protects#n#but grants the wearer a chance to avoid attacks., 1~5, 50, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 26|Traditional Ninja Pants, equip, Made from tissue as fine as silk^ these pants not only protect#n#but grant the wearer a chance to avoid attacks., 2~5, 50, 7~0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 26|Traditional Ninja Gloves, equip, Made from tissue as fine as silk^ these gloves not only protect#n#but grant the wearer a chance to avoid attacks., 4~5, 50, 7~0, 0, 0, 0, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 26|Traditional Ninja Shoes, equip, Made from tissue as fine as silk^ these shoes not only protect#n#but grant the wearer a chance to avoid attacks., 5~5, 50, 7~0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, None, 26|Rare Artifact III, etc, Artifact belonging to Lord Qian^#n#an inscription is just about readable on the surface.#n#Vita Eyun Mortiferae~1, 0, 0|Interesting Object, etc, Stolen from Lord Qian^#n#these objects are of incredible value.~1, 0, 0|Village Artifact, etc, Owned by a village^#n#Tarreal wanted it and got it.~1, 0, 0|Sky Piercer, equip, Charged with lightning^ this spear is a discharge of electricity#n#accompanied by a vivid flash of light., 3~0, 0, 0~0, 0, 0, 0, 15, 20, 10, 20, 80, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, Lightning, 28, Spear, 1|Frost Edge, equip, This sword's blade is pure ice^#n#leaving a deathly chill on its victims., 3~0, 0, 0~0, 0, 0, 0, 10, 15, 7, 15, 70, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Executioner, Ice, 29, Sword, 2|Swift Flame, equip, Lighting the air before you^ this weapon is an#n#unstoppable flame leaping from victim to victim., 3~0, 0, 0~0, 0, 0, 0, 4, 7, 2, 5, 50, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Soul Hunter, Fire, 30, Dagger, 4|Frozen Rod, equip, Used by master sages^ this staff calls forth#n#the spirit of winter to freeze its enemies., 3~0, 0, 0~0, 0, 0, 0, 10, 20, 10, 20, 50, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Sage, Ice, 31, Staff, 1|Hell Fangs, equip, Used to purge evil^ these flaming fangs send forth an infernal fire#n#to consume enemies in a single blaze., 3~0, 0, 0~0, 0, 0, 0, 5, 15, 5, 8, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~Skyborn, Fire, 32, Claw, 3|Winter Crown, equip, Worn by kings and warriors against the glacial beasts of old^#n#this crown is a living memory of power.#n#For even within the depths of a freezing blizzard#n#will the bearer feel but little cold., 0~0, 0, 0~0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 70, 0, 0, 0, 0, 0~0, 0, 0, 0, 0~All, Ice, 27, 0";
objectString = "teleport, Teleports the character from one place to another., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|message box, Passes a message to the players., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Grave, Appears when you die., 1, 0, 0, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Purple Berries, Berries often found in that region.#n#They are part of a big berry family^ in which they are many colours.#n#Although not all are eaten., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Light Purple Berries, Berries often found in that region.#n#They are part of a big berry family^ in which they are many colours.#n#Although not all are eaten., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Cyan Berries, Berries often found in that region.#n#They are part of a big berry family^ in which they are many colours.#n#Although not all are eaten., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Light Blue Berries, Berries often found in that region.#n#They are part of a big berry family^ in which they are many colours.#n#Although not all are eaten., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Pink Berries, Berries often found in that region.#n#They are part of a big berry family^ in which they are many colours.#n#Although not all are eaten., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Dark Pink Berries, Berries often found in that region.#n#They are part of a big berry family^ in which they are many colours.#n#Although not all are eaten., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Rock 1, Most often found in the woods^ or near mountains^ they can be useful offensive elements., 0, 0, -2, 0, 1, 1, 0, 0, None, 0, 0, 0, 0|Rock 2, Most often found in the woods^ or near mountains^ they can be useful offensive elements., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Rock 3, Most often found in the woods^ or near mountains^ they can be useful offensive elements., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Rock 4, Most often found in the woods^ or near mountains^ they can be useful offensive elements., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Wooden Log 1, Once a tree^ it can carry clues to what has caused its death., 0, 0, -2, 0, 0, 0, 0, 0, None, None, 0, 0, 0|Wooden Log 2, Once a tree^ it can carry clues to what has caused its death., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Forest Mushrooms, Collected as food^ these mushrooms may well take over a whole forest., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Enormous Tree, Older than many still living^ this tree carries memories of beasts and death., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Rock 5, Most often found in the woods^ or near mountains^ they can be useful offensive elements., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Rock 6, Most often found in the woods^ or near mountains^ they can be useful offensive elements., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Rock 7, Most often found in the woods^ or near mountains^ they can be useful offensive elements., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Swamp Tree 1, Unlike other trees^ this one thrives for water and humidity.#n#It is often found around swamps or even rivers., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Swamp Tree 2, Unlike other trees^ this one thrives for water and humidity.#n#It is often found around swamps or even rivers., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Broken Swamp Tree, Once a healthy tree^ giving shade in damp swamps., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Swamp Grass 1, Although rare^ some grass manages to grow in the humid swamp land., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Swamp Grass 2, Although rare^ some grass manages to grow in the humid swamp land., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Tree 1, Tree most often found among many in deep forests., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Tree 2, Tree most often found among many in deep forests., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Straw Hut 1, Hut belonged to a village^ used as shelter or store house., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Cave, A dark cave overrun by night beasts^ and other horrors.#n#Not to be entered by any common man. , 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Grave 1, A grave thriving to keep the memory of a man for ever.#n#Although rare are the people to remember the heroes of old., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Grave 2, A common man might lie in its depths^ although you are never sure if you might be the next one to take his place., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 1, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 2, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 3, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 4, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 5, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 6, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 7, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 8, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 9, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Plant 10, Plant growing in any land^ although rare they are to live in the harsh desert kingdom., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Column 1, A man made column used to support heavy objects^ Often found in tunnels., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Column 2, A man made column used to support heavy objects^ Often found in tunnels., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Grave 3, Graves are there to be remembered.,, 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Grave 4, Graves are there to be remembered., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Straw Hut 2, Hut belonged to a village^ used as shelter or store house., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Straw Hut 3, Hut belonged to a village^ used as shelter or store house., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Bamboo 1, A repeatable sight in those lands.#n#They have many uses for they are said to be both strong and flexible., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Bamboo 2, A repeatable sight in those lands.#n#They have many uses for they are said to be both strong and flexible., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Bush 1, A hiding place for rabbits and birds^ but even then they are easy preys for the dark wolves., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Bush 2, A hiding place for rabbits and birds^ but even then they are easy preys for the dark wolves., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Forest Tree 1, Tree most often found among many in deep forests., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Forest Tree 2, Tree most often found among many in deep forests., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Cave Rock 1, A rock only found in caves and other dark places., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Cave Rock 2, A rock only found in caves and other dark places., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Cave Rock 3, A rock only found in caves and other dark places., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Dripstone 1, Floor belonging to a cave.#n#They have a soft yet slippery surface making it dangerous when tread upon., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Dripstone 2, Floor belonging to a cave.#n#They have a soft yet slippery surface making it dangerous when tread upon., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Dripstone 3, Floor belonging to a cave.#n#They have a soft yet slippery surface making it dangerous when tread upon., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Anvil, Used by blacksmiths^ they are key to sword making., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Torch, Useful in dark places such as tunnels or caves., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Hay 1, , 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Hay 2, , 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Throw-able Rock 1, Solid rock., 1, 1, -1, 0, 3, 5, 7, 0, None, 0, 0, 0, 0|Throw-able Rock 2, Heavy rock used to stun or even kill enemies., 1, 1, -1, 0, 7, 10, 3, 0, None, 0, 0, 0, 0|Throw-able Rock 3, Heavy rock used to stun or even kill enemies., 1, 1, -1, 0, 2, 3, 10, 0, None, 0, 0, 0, 0|Throw-able Rock 4, Heavy rock used to stun or even kill enemies., 1, 1, -1, 0, 4, 5, 10, 0, None, 0, 0, 0, 0|Prison, Used as a cage for prisoners and ruffians.#n# Yet not all bars are able to restrain some monsters., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Village Ruin 1, Once the birth place and childhood memories.#n#The village was the hiding place for lost souls., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Village Ruin 2, A peaceful village who suffered a attack like many from beasts., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Village Ruin 3, Unable to defend itself the village fell^ leaving few survivors., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Village Ruin 4, The last memory of one's mother^ slowly burning and dying like many others., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Village Ruin 5, A village ruin^ leaving the map bear^ for it's neighbours also have fallen., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Village Ruin 6, Soon to be home for lost travellers or shelter for wolves., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Temple, A temple build in the name of the god of life^ and the trinity., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Prison Wall, A wall keeping prisoners contained., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Lord's Hut, Passed on by lord to lord.#n#This hut last belonged to Lord Qian,, 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Woods Sign, Sign giving directions., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Cemetery Sign, A sign leading to the dead., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Potion Sign, Potion master Qao painted it himself., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Weapon Sign, Sign leading to the trusted smith and tailor., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Cog Sign, Leading to the general store., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Swamp Sign, Sign leading to the treacherous swamps.#n#Beware for they are filled with armadillos., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Potion Shelf 1, Containing many of Potion master Qao's secret brews., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Potion Shelf 2, Containing many of Potion master Qao's secret brews., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Lantern, A beacon used to illuminate the night., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Weapon Shelf, A shelf to store various items., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Wall Weapon 1, A wall to display proudly weapons and trinkets., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Wall Weapon 2, A wall to display proudly weapons and trinkets., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Bed, Not all are the ones now to possess the luxury of a bed., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Opened Treasure Chest, Storing the treasure of the village., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Treasure Chest, Storing the treasure of the village., 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Golden Rack, , 1, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0|Dam, A dam keeping the tunnels from flooding.#n#How long it has stood is unknown^ but it has served its purpose well., 0, 0, -2, 0, 0, 0, 0, 0, None, 0, 0, 0, 0";
questString = "Mysterious encounter, 8, -1, Ah hello^ yes you there! I hear something up ahead. A beast of some sort^ quick! Kill it before it comes any closer! , Hmm do I know you? A yes the wolf of course... Yes well done., Odd to find wolves in this area..., That old man seems to want to speak to me., I'd better kill that thing fast.~Eliminate 1 7~5 EXP@@@@~Level 1 - 1~2^ -242^ -150, none, 1^ -242^ -150~I will try my best..., Why can't you take care of it?, Thanks., Hope this won't take too long...., , 1, 0, 0~~0*8*2*743*-152*1@@~~@@|On demand, 8, -1, Hello again... It seems I need your help once more. Well you see I have been travelling... Don't pull that face! Where was I...? Oh yes well I haven't eaten a thing and I'm starving! The people keep food in boxes around here somewhere... Could you retrieve something for me?, A finally^ took you long enough! I guess you want something for your troubles. Here have a weapon... By the way if I were you boy^ I would head home quick! there seems to be something up in the village. As for me I'm going south... Nice meeting you..., It seems the old man was right... Something is up in the village!, Looks like the old man wants something again..., I'd better find that food. ~Collect 1 98~@1 11@1 13@1 15, 500 2@1 14~Quest 0, Level 3 - 200, !Quest 2~3^ -150^ -150, none, 2^ 440^ -160~I'll fetch you something, Not right now..., You're right, , , 1, 0, 0~1-1-98-33~0*8*3*-242*-150*0@@~~@@|What once was, 10, -1, Wolves! They attacked the village^ we had no one to protect us... I hid! they didn't find me!#n#But everyone else...Dead^ my daughter...You better hide too^ there are many of them left..., I followed you boy!.. Your eyes were a burning fire that even death could not extinguish...#n#I saw you massacre those vile beast^ and for that I am grateful. Which way are you heading? You will need something to keep you going..., The village is gone.. And so has my mother, A villager is hiding in the village^ he might know what happened..., Need to find my mother! And kill every single one of those beasts!~Eliminate 10 7~100 Gold, 1 3@@@@~~none, 7^ -29^ -100, none~Hide!? My mother...I need to look for her., , South... I am going south., , , 1, 0, 0~~~7*6*-286*-200, 7*6*-129*-141, 7*6*232*-258, 7*6*294*-159, 7*6*630*-129, 7*6*989*-185, 7*6*1307*-262, 7*6*1059*-260, 7*6*0*-250, 7*6*651*-270@@~@@|Wolf hunting, 4, -1, We need your help again. Wolves have once more been seen roaming the woods and need to be dealt with quickly! You will be rewarded for your troubles of course., You have done us great service^ speak to me again if you wish to get rid of the wolves once and for all!, We won't be seeing those beasts no more!, The guard seems to have the need of help., Better finish off those wolves.~Eliminate 2 2~25 Gold, 25 EXP@@@@~Quest 2~none, none, none~Sure., Not now..., I will see., , , 0, 0, 0~~~2*8*783*-150, 2*8*265*-256@@~|Wolf hunting part II, 4, -1, It seems there are still wolves hiding in the woods. Get rid of them quick!, Ah! Well done^ as usual you will claim a reward., Four wolves down!, If you are looking for work^ the village guard seems to have some for you..., That should be the last of them! ~Eliminate 4 2~40 Gold, 25 EXP@@@@~Quest 3~none, none, none~I will deal with them quickly., Now Isn't the time., Thank you., , , 0, 0, 0~~~2*8*633*-264, 2*8*1166*-124, 2*8*-173*-133, 2*8*54*-188@@~|Down with the leader, 4, -1, It seems someone has spotted the leader of the pack. Get rid of it for us^ and you will be doing the village a great favour., By the Trinity! You are stronger than you look. , That beast was tougher than the others!, The village guard seems eager for help., Once their leader is down^ it will be their end!~Eliminate 1 3~50 Gold, 30 EXP@@@@~Quest 4~none, none, none~I will try my best., Not now., I did what I had to do., , , 0, 0, 0~~@1*11*7*2035*-181*1@~3*8*423*-184@@~|Wolf hunting part III, 4, -1, By the trinity! Those beasts are back again^ run into the forest and get rid of them!, Finally. We won't be seeing those around any time soon!, Six wolves down!, The village guard is looking for help once more, Those beast will never go!~Eliminate 6 2~50 Gold, 20 EXP@@@@~Quest 5, Quest 19~none, none, none~Of course., Later..., Hopefully., , , 0, 0, 0~~~2*8*781*-143, 2*8*643*-268, 2*8*-57*-290, 2*8*1260*-273, 2*8*347*-117, 2*8*63*-185@@~|Wolf hunting part IV, 4, -1, It seems wolves have once more gathered in the woods. Go in and finish them off!, That should be all of them..., Hopefully the last..., The guard might have a quest., Eight more wolves to kill!~Eliminate 8 2~60 Gold, 20 EXP@@@@~Quest 6~none, none, none~This time for good!, I'm busy, Yes..., , , 0, 0, 0~~~2*8*616*-174, 2*8*343*-168, 2*8*-126*-202, 2*8*939*-254, 2*9*768*-196, 2*9*314*-229, 2*9*1009*-113, 2*9*684*-234@@~|Down with the leader part II, 4, -1, A leader has once more appeared in the woods. You know the drill..., Thank you^ once again you have done this village great service., That should be the last of it., The village guard has need of help, Should kill that beast before it reaches the village.~Eliminate 1 3, Eliminate 5 2~80 Gold@@@@~Quest 7~none, none, none~I will be quick., Not right now., Any time., , , 0, 0, 0~~~2*8*172*-127, 2*8*690*-181, 2*9*529*-158, 2*9*98*-188, 2*9*674*-227, 3*9*344*-203@@~|More than ever, 4, -1, We have a curse upon us! Those woods are packed with wolves^ and we need you to get rid of them!, Those won't be the last^ but for now it will do. Come back to me when you can^ those wolves will keep on coming!, Not the last., The village guard is looking for help, Ten wolves to kill...~Eliminate 2 3, Eliminate 8 2~100 Gold@@@@~Quest 8~none, none, none~I will hurry., Later..., I sure will., , , 0, 1, 0~~~3*9*164*-220, 2*9*316*-192, 2*9*475*-120, 2*9*871*-179, 2*9*-162*-118, 3*8*540*-160, 2*8*918*-220, 2*8*673*-150, 2*8*545*-224, 2*8*179*-194@@~|Toxic encounter, 5, -1, Ah. Hello you there. It seems I am low on stock and would be very grateful if you could collect some Toxin for me?, Ah^ Thank you^ here is your reward., Strange ingredient., A merchant needs help., Four armadillo's toxin to gather.~Collect 4 111~50 Gold, 25 EXP@@@@~Quest 2~none, none, none~Yes of course., I'm busy., Thank you., , , 0, 0, 0~~~~|Toxic encounter part II, 5, -1, Hello once again! Could you collect some more toxin for me?, Ah yes^ the very right ingredients!, Six toxins collected., The merchant is looking for help once more., More toxin to gather...~Collect 6 111~100 Gold, 50 EXP@@@@~Quest 10~none, none, none~Easily done, Not right now, My reward?, , , 0, 0, 0~~~~|Rare and precious, 5, -1, It was only yesterday while I was in the woods that I spotted a rare beast. Would it be possible for you to gather some toxin from it?, Ah^ thank you once more., Toxin collected., The potion master has need of help., Only one toxin to get.~Collect 1 112~100 Gold, 50 EXP, 1 6@@@@~Quest 11~none, none, none~Of course., Not now..., Any time., , , 0, 0, 0~13-1-112-100~~13*14*2285*-91@@~|Toxic feast, 5, -1, My stock has gone so quickly! Could you gather more toxin?, Remarkable! You have done me great service once more. If you have need of money or potions^ come straight to me! I will always have the need of toxin to be collected., That shoud keep the potion master occupied., The potion master is out of stock., More toxin to gather.~Collect 10 111~150 Gold@1 17@1 21@1 34@1 29~Quest 12~none, none, none~Sure., Not right now..., I will see, , , 0, 0, 0~~@0*7*7*977*-72*1@~~|Eliminate the competition, 6, -1, Hello there! I am looking for someone to do some work for me. You see^ my sales have gone down. I want you to go and destroy my competition's stock. You do this and I'll reward you with money., Ah! Well done. Here is your reward., That merchant was desperate!, A merchant needs help., Only four boxes to destroy.~Eliminate 5 6~50 Gold@@@@~Quest 2~none, none, none~I will try my best., Not now., Any time., , , 0, 0, 0~~2*5, 2*63@1*5*17*-291*-100*0, 1*63*17*-200*-130*0@~6*17*-287*-90, 6*17*-434*-218, 6*17*-147*-247, 6*17*-29*-262, 6*17*213*-88@@~|Eliminate the competition part II, 6, -1, Ah^ I have need of you once more. It seems there are still merchants out there trying to bring me down! I need you to break everything they've got^ but beware this one has guards., Things should go well now. I thank you., That merchant should be happy now., The village merchant seems to be looking for help once more., Once more breaking boxes.~Eliminate 4 6~80 Gold@@@@~Quest 14~none, none, none~I'll do it., I'm busy., No problem., , , 0, 0, 0~~1*32*16*16*-167*0, 4*32, 2*30, 2*61@1*30*16*-272*-172*0, 1*61*16*-372*-124*0@~6*16*18*-76, 6*16*-350*-106, 6*16*-159*-273, 6*16*-370*-130@@~|Aim high, 6, -1, There is one last thing I want you to do. The lord of the city has a very interesting object he keeps in his house. I want you to retrieve it for me. Do this and I will pay you grandly!, Finally^ I hold it in my hands. Your reward will exceed any you will ever receive!, That merchant pays loads!, The Viallge merchant has need of one last thing, This will be harder than I thought.~Collect 1 160~50 Gold@@@@~Quest 15~none, none, none~I'll try., Not now..., Thank you., , , 0, 0, 0~33-1-160-100~~33*20*135*-91@@~|Beast in the night, 9, -1, Please I need your help. You see ^ I was out yesertay when I got attacked! Luckily I saw what did it. I t was a beast at night^ when the village is still and empty., Ah you have saved me. I will give you something for your troubles., That beast was tough^ I wonder how the villager survived., A villager is in need of help!, Need to kill that beast before it attacks again.~Eliminate 1 12~200 EXP, 20 Gold@@@@~Quest 15, Level 6 - 200~none, none, none~It won't live the night!, Not right now..., Any time., , , 0, 0, 0~~~12*7*1954*-175@@~0, 23:00@@|Infestation, 7, -1, There seems to be a terrible amadillo infestation in my house! I want you to get rid of every single one of them!, Well done^ of course you will be rewarded for your troubles., We won't be seeing those any time soon!, The village lord has a quest available., I should quickly get rid of those beasts!~Eliminate 7 16~200 Gold, 300 EXP@@@@~Quest 13~none, none, none~I will try my best., No sorry., Thank you., , , 0, 0, 0~~@0*7*20*-297*-153*0@~16*20*241*-228, 16*20*192*-130, 16*20*98*-211, 16*20*14*-141, 16*20*-167*-206, 16*20*-383*-150, 16*20*-330*-257@@~|Off into the night, 11, 12, Please help! I saw my friend run into the woods. The whole village knows how dangerous it is^ especially at night! Please find him and bring him back., I see now... I am free... You have come to take me back? You are wrong^ these beasts are driven by something stronger^ I see it and It tells me to kill you!, What happened to that man!?, A man is desperate for help!, Where is that man!~~50 EXP@@@@~Quest 5~none, none, none~I will save him., I'm busy sorry, So it will be..., , , 0, 0, 0~~1*12*9*-15*-175*0@@~2*9*163*-202, 2*9*90*-121, 2*9*-161*-125, 2*9*-152*-234, 2*9*15*-101, 2*9*-16*-245@@~0, 23:00@@|Driven to die, 12, 11, Are you ready to die? For now is the time!, I don't know what happened to him^ He's been acting strange for a while now... Thank you for your help anyway., He was completely mad!, , He needs to die!~Eliminate 1 17~100 EXP@@@@~Quest 19~none, none, none~We shall see., , I'm sorry for your friend..., , , 0, 0, 0~~4*12@2*11@~~|Action by fear, 4, 34, Hello there. You see we are short on staff^ and could do with a little help. Easy job^ we simply need you to look after a prisoner. Can you do that for me?, Hello^ my name is Xian. I need your help! You see this village^ it has suffered terribly... Wolves have been on the people's heels since the beginning. They blame me for the attacks and are ready to execute me to save them. But it won't... Please I need your help^ I have a friend in the village. His name is Talluis. Speak to him if you wish to save me!, Lucky I was there., The village guard has a quest available., Better see what this is about.~~50 EXP@@@@~Quest 3~none, none, none~Yes^ of course., Not now., I will try my best., , , 1, 0, 0~~@1*1*7*828*-151*1@~~|When times are desperate, 1, 34, I knew you would come. Xian will be executed soon^ and if you truly wish to save him do as I say. Tonight you will get the keys from the warden^ be careful not to bring to much attention to yourself. Then go quick to Xian's cell and free him. By then the town guard will be after you^ don't worry about Xian he will be fine by then. But remember^ get the keys by any means necessary..., Thank you so much! I'll go another way^ meet me in the village., Xian is safe now., Talluis is waiting for you in the village., I need to save Xian quick!~Collect 1 116~100 EXP, 10 Gold@@@@~Quest 21~none, none, none~I will try my best., Not right now..., It's ok, , , 1, 0, 0~18-1-116-100~1*17*15*97*-145*1, 4*17@2*34, 0*1*7*3223*-111*1, 1*0*7*2185*-100*1@~~0, 23:00@@|A beginning, 0, 1, Ah^ here you are. I will explain more clearly now... You see^ this village has been under constant threat of wolves for a long time. Soon the people were getting weak^ and they were ready to give in. When suddenly the attacks ended.. The village was still and the people thought it a miracle. But they didn't realize something more sinister was going on... People^ especially children started to disappear. But soon the attacks on the village once more began. That was when I arrived. The people thought me a warlock who cursed their village. But I know something more evil is going on. Speak to Talluis he has work for you. But I have work of my own! Also there are many quests available around the village. I would be very grateful if you were to help these people., Good day to you. We must move quickly! My suspicions lie with Damien. He is a rich of the city and controls nearly everything. He also was the one to first point out Xian. I need you to gain his trust. Fortunately^ he has recently wanted to do business with the temple. Go to his house^ you are now a messenger for the temple of life., I wonder what work Xian is doing..., Xian is waiting for you., Need to find Talluis.~~50 EXP@@@@~Quest 22~none, none, none~I see^ I will speak to him., , Lets see what he hides!, , , 1, 0, 0~~@2*0@~~|A message, 13, 2, Well hello^ I am Zhian^ servant of the household of Damien. Your first job is to deliver this message to High priest Tarreal. If this message is tempered with in any way^ you will be killed. Is That clear? Now go!, You're late! It better not happen again..., Those robbers were a nuisance!, Servant Zhian is waiting for you., Tarreal needs that letter.~~18 Gold@@@@~Quest 23~none, none, none~Yes^ of course., , it won't., , , 1, 0, 0~~1*22*7*2598*-186*1, 1*23*7*2567*-123*1, 4*22, 4*23@2*22, 2*23@~~|His artifact, 2, -1, I have a quest for you. You will be rewarded of course. I want you to get an important artifact for me. One that belongs to the village. I have talked to the merchant before^ I will give you enough money^ but if he doesn't accept the given price... Well^ do what you must to bring back that artifact., Well done^ Damien wishes to meet you. He is waiting at his house..., He has it now..., Talluis has an important quest., I need that artifact!~Collect 1 161~80 Gold@@@@~Quest 24, Quest 14~none, none, none~I will try my best., Not now., I will go quickly., , , 1, 0, 0~48-1-161-100~4*63@@~~|A ring to rule, 3, 7, Well you're even better than I thought you would be! I think it's a waste of your time^ sending you from door to door giving messages. I have work for you^ a more fulfilling work... You see the lord of the city has something I want^ A ring! Get it for me and you will be greatly rewarded..., Well am I pleasantly surprised. Here I was^ expecting Damien to send his gang of assassins to... Why the look of surprise on your face? Let me explain. You see this ring that Damien so dearly wants. It represents power... Me^ being lord of this village own it^ but what troubles me is this^ I have no more power than a mere peasant! He is the one that owns every house and shop in the streets. He is the one that has assassins and robbers at his mercy. Now^ why would someone who owns all and even has the people?s good will have the need of my ring? I am no threat ever since he took my daughter as a warning... Now you can have this ring if you wish it^ but let me say this. Only Damien will win^ but that is if he is the true puppeteer., Damien has high needs!, Damien has a quest for you., Damien wants that ring.~~@@@@~Quest 25~none, none, none~Easily done., , I see., , , 0, 0, 0~~~~|A ring to give, 7, 3, The ring is in the box. Quick take it and bring it to Damien... Before he gets impatient..., A well done^ I'm impressed. , That lord was desperate., Lord Qian has something to give to you., Damien wants that ring!~Collect 1 118~50 Gold, 70 EXP@@@@~Quest 26~none, none, none~Thank you., , Thank you., , , 0, 0, 0~33-1-118-100~~33*20*-156*-160@@~|Flood and burn, 3, 38, There is one last thing I need of you. You see my spies have located the entry to the assassin's layer. I want you to go there as one of them. You see there is a dam down there and behind it contains a large quantity of water. I want you to flood those tunnels! Those assassins have caused enough trouble for now^ and it will do the world a great favour if they simply disappeared... Make sure not to arouse any suspicion. I want you out of there once the dam has been damaged. Although if killing is needed^ don't think twice! One last thing^ before you enter those tunnels^ make sure you have completed everything before., Well^ what have we got here? You better come with me... You and I will be having some fun!, If only I knew..., Damien has a very important quest available., Those assassins have done enough damage already!~Eliminate 1 41~200 EXP@@@@~Quest 27, Level 8 - 200, Quest 52~22^ -414^ -141, 23^ 101^ -168, 8^ 101^ -168~You are right., Actually there is something I wish to finish., I don't see any other options..., , , 1, 0, 1~~@0*38*23*-122*-168*0@1*38*22*279*-155*0, 1*24*22*103*-221*0, 1*25*22*114*-108*0, 1*26*22*-3*-171*0, 1*27*22*190*-202*0, 3*28~@@~|The final escape, 38, -1, What the hell are you doing here? You could blow my cover; you do realize it's me Xian? Anyway ever since you freed me I've been working hard on infiltrating the assassins^ and there is a lot I have found out. Talluis was right; Damien is behind the disappearances of the children. He used the Assassins to kidnap them to what end I don't know but we need^ wait let me finish then I'll let you speak. What I'm saying is that we need to get to Damien^ I'm meeting Talluis tonight. Now you^ why the hell are you here?, Oh great... Damien sent you? Unfortunately we can't go out via the entrance^ it's blocked. Hmm meet Talluis for me tell him what's happened. I've got a few things I need to do here before I leave. Don't worry I'll be fine^ I'll meet you in the woods once you've dealt with Damien. Me and Talluis are leaving^ our work is done..., Thanks to Xian, Speak to Xian., Need to find Talluis quick!~~@@@@~Quest 28~none, 9^ -167^ -99, none~The dam..., , Ok^ be careful!, , , 1, 0, 0~~@0*1*8*-298*-168*1@~~@0, 02:00@|What makes sense, 1, 3, Damien is in his house^ I have arrange for his staff to be away so he is entirely yours. Once that is done^ me and Xian will have gone. Good luck..., Ah! I knew you would come... You have come to kill me for kidnapping the children^ for creating murder and thievery in this village. For accusing Xian of cursing us... I know^ I have done well^ but please do not give me all the credit. After all it was Talluis's brilliant idea to have Xian given the name of warlock and lock him up. This after all gave the people someone to throw their anger at^ leaving me their saver. The murders the thieves all his ideas^ I just put them in place. He doubled my money^ and for a what? Well kidnapping children wasn't my idea^ but who knows what he hides in the woods. Shame you came and mess things up though. Luckily he promised to double my money for your head. I accepted gladly..., if Only I knew..., Talluis is waiting for you., Damien needs to die!~~250 EXP@@@@~Quest 29~none, none, none~Farewell., , What!?, , , 1, 0, 0~~2*13@4*3, 2*1, 2*0, 1*66*9*-28*-133*0@~~|Truth hurts, 66, 4, It wasn't Damien! He was simply Talluis' puppet! And we were Talluis' chess pieces...He's left^ Talluis left and the village is doomed!... Talluis was keeping a beast in this cave... He was nurturing it too strength and the children... You can't stop Talluis now. Save the village while there is still time. As for me^ you will have to do something. There is a boat awaiting me^ not far from here. Take this pass and say I sent you instead^ that you must complete What I started. Farewell..., It seems we were attacked. Hundred of wolves stormed the village and My men weren't enough to prevent them... A giant red beast^ came stomping in soon after them^ I was lucky to be only stunned under a building. But the rest of the village... , Talluis will pay for this!, Find Xian in the woods!, Must save the village.~~@@@@~Quest 30~none, none, none~He will pay!, , What!?, , , 1, 0, 0~undefined~@2*66@~~|Bereft of life, 2, -1, The temple has need of you. You see there are... Certain individuals that threaten this village. As quick deaths seem your god given talent^ kill them for me. I want it to be quick and silent! Any problems and you might be the next one on the list!, Sufficient^ yes. Here is your reward. I Might have need of you later on., It needed to be done., Tarreal has need of you., For the good.~Eliminate 1 19~1 8@@@@~Quest 24, Class Soul Hunter, Level 7 - 200~none, none, none~Yes^ High priest Tarreal., Not now^ High priest Tarreal., Thank you High priest Tarreal., , , 0, 0, 0~~1*18*11*392*-184*1, 4*18@@~~|Expired, 2, -1, It seems the temple of life has need of you once more. Quick and silent., You prove useful. Here is your reward., I needed the gold..., Tarreal has need of you., Quick and silent...~Eliminate 1 20~1 22@@@@~Class Soul Hunter, Quest 32~none, none, none~Yes^ High Priest Tarreal, Later^ High Priest Tarreal, Thank you^ High Priest Tarreal., , , 0, 0, 0~~1*19*9*849*-254*0, 4*19@@~~|Death crown, 2, -1, A more difficult quest for you. It seems we have no need of our lord now. He has done his duties and needs to die. It shouldn't be too hmm complicated for you? I don't care either way! Do this and you will get an adequate reward., Well^ I'm nearly impressed. The lord was dying anyway... Here is your reward as promised., The lord had done what needed to be done..., Tarreal has an important quest for you., He has done his duty.~Eliminate 1 21~@@@@~Quest 27, Class Soul Hunter, Quest 33~none, none, none~Right^ yes of course..., No!, Thank you..., , , 0, 0, 0~~4*7, 2*20, 2*21@@~~|Duel, 7, -1, Well you see^ in my village there is a code. If you Wish to keep that sword^ you need to prove it! There will be a duel between you and one of my knights^ if you win you will get a large sum of gold. Also^ this fight ... Well there is no getting up if you lose. Do you accept?, Well impressed. You win a large sum of gold^ I lose a knight., That was a foolish knight!, Lord Qian has need of you., I will win!~Eliminate 1 22~1 10@@@@~Class Executioner, Level 7 - 200~none, none, none~Yes^ I do!, Maybe not..., Any time., , , 0, 0, 1~~4*20@@~~|Animus, 7, -1, Well you see the man you killed... A friend^ a good friend desires revenge. He challenges you to a duel^ and if you have any honour you would accept... Be warned this man is no mere knight! He is my best!, Well it seems you have once more defeated me. Here is your reward...., Shame he had to die..., Lord Qian is looking for you., If it must be...~Eliminate 1 23~1 41@@@@~Class Executioner, Quest 35~none, none, none~Then he too shall die!, Not now..., Thank you., , , 0, 0, 1~~4*21@@~~|Noble death, 7, 45, You have defeated every Knight I have sent at you! Your strength is one I have not seen in many many years... There is one more challenge you must do. One last duel. I lord Qian^ challenge you in a combat to the death. If you win^ you get my sword^ a very powerful sword. Do you accept?, I salute you! Sorry I haven't introduced myself... I am Lo'i^ Qian' son. I am here to give you your reward seeing that my father is no longer able to present it to you himself. But it seems now that what once was his job^ is mine... Thank you., He was old anyway., Lord Qian has one last quest to give to you., If it must be so.~Eliminate 1 35~1 18@@@@~Class Executioner, Quest 27, Quest 36~none, none, none~Yes I do!, I cannot!, I see., , , 0, 0, 1~~2*7, 1*39*20*-297*-153*0, 4*39@2*45, 1*46*20*-297*-153*0@1*45*7*1385*-85*1~~|Lurid task, 2, -1, Well hello once again. You see^ I knew there was something different about you... Like me^ you control forbidden powers. Now what harm can it do to help one another? I have this artifact here^ but there are pieces missing. I want you to retrieve these for me. And also^ the artifact will only work as long as the bearer of these pieces no longer lives... The man himself is in the general store^ it should be easy to find him., Ah well done. Yes two more to go! Here is your reward my friend., For the better., High Priest Tarreal has need of you., I need to do this...~Eliminate 1 42, Collect 1 113~@@@@~Class Sage, Quest 24, Level 7 - 200, Quest 17~none, none, none~Yes^ of course., No!, Any time., , , 0, 0, 0~42-1-113-100~4*9@@~~|Puzzle, 2, -1, We are missing still two pieces. Could you retrieve the next one please? It turns out that the next bearer is none other than servant Zhian. Damien has instructed me that he as fled into the woods. Find him and bring me back this artifact!, Ah yes! I thank you once more my friend., The artifact must be worth it., Tarreal is looking for you., Two more to go.~Eliminate 1 43, Collect 1 114~1 30@@@@~Class Sage, Quest 38~none, none, none~I shouldn't be long., No!, It was my pleasure., , , 0, 0, 0~43-1-114-100~2*13, 1*64*10*-36*-147*1, 4*64@@~~|Together, 2, -1, Now^ the last belongs to the snivelling coward of a lord. He is near his death anyway. You need not worry^ simply do as for the others and bring back this prize! Make sure he is dead! You will receive a great gift!, AH finally! Yes! Yes! You have been more than useful. A shame... Here is your reward anyway., It was worth it., Hight Priest Tarreal is looking for you., The last piece!~Eliminate 1 21, Collect 1 159~1 80@@@@~Class Sage, Quest 27, Quest 39~none, none, none~For power!, Not now..., Thank you., , , 0, 0, 0~21-1-159-100~2*7, 1*65*20*-297*-153*0, 4*65@@~@@~|Maintain, 7, -1, I need your help! Assassins are trying to kill me. Help me^ and keep them away from me. If you accept you are putting your life at risk and will not be permitted to leave my side until I am safe., Thank you so much., Qian is safe... For now., Lord Qian has an important and urgent quest for you!, Need to protect the lord.~Eliminate 1 36, Eliminate 1 37~1 7@@@@~Class Skyborn, Level 7 - 200~24^ -187^ -140, 20^ -187^ -140, 20^ -187^ -140~I accept., Not now., It was my duty., , , 0, 0, 0~~0*7*24*-297*-153*0, 1*40*24*338*-222*1, 1*41*24*186*-85*1, 4*40, 4*41@0*7*20*-297*-153*0@~~|Sustain, 7, -1, They are back for me! Help me once more I beg you!, Thank you^ thank you. I would be dead without your help., He is safe once more., Lord Qian is waiting for you., They really want Qian!~Eliminate 1 38, Eliminate 1 39, Eliminate 1 40~1000 1@@@@~Class Skyborn, Quest 41~24^ -187^ -140, 20^ -187^ -140, 20^ -187^ -140~I will!, Later..., I had to., , , 0, 0, 0~~0*7*24*-297*-153*0, 1*42*24*416*-228*1, 1*43*24*427*-173*1, 1*44*24*403*-101*1, 4*42, 4*43, 4*44@0*7*20*-297*-153*0@~~|Swords down, 7, 16, They have my son! They say if I want him to live^ I must give myself in. Worst of all they want you to bring my head as proof. Look you have to do it. They will kill us both otherwise. You have no choice^ I order you!, Well done. Unfortunately our leader wasn't able to be here. Here is your reward., He was going to die anyway..., Lord Qian is desperate for help!, What must be done.~Eliminate 1 31~1 35@@@@~Quest 27, Class Skyborn, Quest 42~none, none, none~I will hunt down their leader!, I can't!..., He shall pay!, , , 0, 0, 0~~2*7, 1*29*20*-297*-153*0, 4*29@2*20, 2*21, 2*16@1*16*7*1385*-85*1~~|Dead end, 31, 18, Well hello. You look like someone that could help me! You see^ I am a chronicler. I am deeply interested in the vaults under the temple. There is one vault especially^ that intrigues me greatly. There is one problem...When I came to ask politely Tarreal whether he could give me a free tour^ he over exaggerated completely! I mean^ chucking a simple chronicler like me outside is appalling! This is why I am dressed as a priest. As for the vault. You will need to talk to someone far older than Tarreal. There is an old man in the village by the name of Gian. He might know of this vault., The vault? Of course Tarreal wouldn't know! It was built before the temple^ before the village! Listen to me carefully. There are things in this world best left alone. But if you truly wish to enter that forsaken tomb! Only when the past has been completed and the future seen will it open!, What a waste of time!, , Need to find that old man.~~@@@@~Quest 49, !Quest 0~none, none, none~I will find him., I do not wish to waste my time!, I see..., , , 0, 0, 0~~~~|Sentinel's Sorrow, 17, 19, It's open! It's open! The vault! You must go in^ I can't too dangerous..., I am the sentinel...I never sleep I never move. My only purpose is yours^ but that is up to you to prove., I will one day find out about this sentinel., , What hides in that vault.~~@@@@~Quest 31, Quest 53, Quest 44~none, none, none~Stay here., I am not interested., What do you guard?, , , 0, 0, 0~~~~|Destiny, 19, 17, If asked I must not answer^ only kill for the better..., Did you find something?! What you mean none of my business!, What secrets has this orb?, , I want to know what he guards so dearly!~Eliminate 1 undefined~@@@@~Quest 45~none, none, none~So it must be, , Farewell friend!, , , 0, 0, 0~~~~|Apprehend, 4, -1, Ah you're here! I need your help... You see^ the cult of assassins have decided to attack the temple. For what reason I don't know^ but we need to act quick! I have sent two guards ahead but they won't be enough. Meet me there if you wish to help us., Good you've come. , Those assassins aim high attacking the temple., Guard Zhao has urgent need of you., Need to help the temple.~~50 EXP@@@@~Quest 24, Level 8 - 200~none, none, none~I will see you there., I can't..., Yes., , , 1, 0, 0~~0*4*7*2939*-114*1@@~~|Sacred violation, 4, -1, The assassins will arrive soon^ go into the temple and stop them from doing harm. As for me^ there are prisoners that still need guarding. Oh^ and don't worry about your friend Tarreal... The priests have been warned and are safe., Well done! Those assassins will think twice before showing their faces! God knows why they decided to move^ but these are mad days. And hopefully their last., I wonder how Zhao knew..., Guard Zhao is waiting for you at the temple., The temple needs protecting.~Eliminate 1 44, Eliminate 1 45, Eliminate 1 46, Eliminate 1 47~@@@@~Quest 47~none, none, none~I will try my best., Not now..., Yes^ hopefully..., , , 1, 0, 0~~2*35, 2*36, 2*37, 2*31, 2*2, 1*47*18*984*-215*1, 1*48*18*853*-83*1, 1*49*18*289*-181*1, 1*50*18*114*-225*1, 4*47, 4*48, 4*49, 4*50, 0*4*7*-156*-100*0@1*35*18*-330*-258*0, 1*36*18*764*-90*1, 1*2*18*1226*-198*1, 1*37*18*10*-171*1, 1*31*18*394*-244*0@~~|Lockup, 4, -1, I have need of your help once more. I have business to do in the woods^ and I need someone to guard those prisoners. Also^ be careful. They might try something knowing I'm away., I knew those criminals were up to something! Anyway I thank you once again friend., Those Assassins are acting quick!, Guard Zhao has a quest., Need to stop those prisoners escaping.~Eliminate 1 55, Eliminate 1 56~380 Gold, 1 9@@@@~Quest 48~none, none, none~Don't worry., Sorry I can't., Any time., , , 1, 0, 0~~2*51, 2*58, 1*59*15*-113*-173*1, 1*60*15*105*-173*1, 4*59, 4*60, 0*4*8*1031*-158*0@@~~|Compliant, 4, -1, I have found out where the assassins train. I want you to go there and find out any more clues., A beast you say? Those assassins will do anything for power. As for the clues let me have them. I might be able to find out something., Those assassins always have a trick up their sleeve., Guard Zhao has need of you., Need to find that clearing.~Eliminate 1 57, Eliminate 1 58~@@@@~Quest 49~5^ -381^ -148, 7^ -29^ -100, none~Of course., Not now..., Here., , , 1, 0, 0~~@0*4*7*-156*-100*0@0*4*5*-381*-148*0~~|Rendezvous, 4, -1, It seems there will be a large meeting of assassins in the cemetery. Come with me^ together we will finish off those criminals!, Well^ I'm impressed., The last of them hopefully., Guard Zhao, End the reign of those assassins.~Eliminate 1 49, Eliminate 1 50, Eliminate 1 51, Eliminate 1 52, Eliminate 1 53~@@@@~Quest 50~none, none, none~Let's end this!, Another day..., Your turn now!, , , 1, 0, 0~~1*52*11*933*-84*1, 1*53*11*813*-209*0, 1*54*11*782*-68*0, 1*55*11*1047*-226*1, 1*56*11*1199*-203*1, 4*52, 4*53, 4*54, 4*55, 4*56, 5*4@0*4*7*-156*-100*0, 1*33*11*1270*-173*1@2*4, 1*4*11*-308*-161*0~2*12*226*-116@@~|Vainglorious, 33, 4, Now let's see what you are truly capable of. I propose a fight between me and you only. Do you accept?, The death of the leader^ will be a severe blow to the assassins. It usually is a while before another leader strong enough is able to present himself. I thank you once again^ I hope our work will not go unheeded., That should be the end of those assassins., Leader Ukane is waiting., Ukane will die!~Eliminate 1 54~@@@@~Quest 51~none, none, none~Yes., , It will not., , , 1, 0, 1~~4*33@@~~|Final battle, 4, -1, The beast has left the village and its horrors behind him. It has left for the woods... Find it and revenge this village! Also there seems to be a boat waiting for someone., You are a stranger to us all^ and yet are still^ but you have saved the village from a terrible doom. We thank you., The work and troubles of the village ended with one mistake. The making of a beast and the trust of those who serve others..., Guard Zhao is waiting for you., Need to kill that beast!~Eliminate 1 5~@1 27@1 23@1 36@1 32~Quest 31~25^ -352^ -155, 7^ -29^ -100, 7^ -29^ -100~I will!, , Good bye^ friend., , , 1, 0, 1~~@0*4*7*-156*-100*0@0*4*25*1289*-161*1~~";
storeString = "62^19, 1000^23, 1000^27, 1000^32, 1250^36, 1000^154, 400^155, 400^156, 400^157, 400^158, 400|2^7, 300^8, 200^9, 150^10, 300^28, 200^29, 400^30, 600^31, 800^150, 350|5^3, 30^4, 30^5, 70^6, 100^108, 300|6^2, 1^1, 3^0, 5^11, 50^12, 50^13, 50^15, 50^14, 50|63^2:0, 500^5:1, 5000000|30^16, 200^17, 400^18, 600^20, 200^21, 400^22, 600^24, 200^25, 400^26, 600^33, 200^34, 400^35, 600|61^37, 20^38, 80^39, 80^40, 120^41, 200^43, 150^44, 130^45, 150^46, 200^47, 200^48, 100^49, 220^109, 280^50, 20^51, 70^52, 80^53, 100^54, 200^56, 100^57, 130^58, 150^59, 200^60, 200^61, 100^62, 220^63, 280^64, 20^65, 60^66, 80^67, 90^68, 200^70, 100^71, 130^72, 180^73, 200^74, 120^75, 100^76, 100^77, 80^78, 80^79, 80^80, 300^81, 120^82, 120^83, 150^84, 20^85, 60^86, 80^87, 90^88, 200^90, 100^91, 150^92, 150^93, 150^94, 120^95, 100^96, 160^97, 200^145, 110^143, 170^152, 90";
skillString = "Sharp Thrower, Enhancing the skyborn@ this ability#n#allows for a longer range when using shurikens., 1^^^starDistance^0, 0, 0, 200~0, 0, 0, 238~0, 0, 0, 275~0, 0, 0, 313~0, 0, 0, 350~0, 0, 0, 388~0, 0, 0, 425~0, 0, 0, 500|Twin Spin, Allows the skyborn to throw two shurikens while getting extended damage., 0^Claw^0-2^doubleDamage^0, 4, 0, 50~0, 10, 0, 75~0, 14, 0, 100~0, 20, 0, 110~0, 30, 0, 120~0, 24, 0, 150~0, 20, 0, 160~0, 16, 0, 180~0, 10, 0, 190~0, 6, 0, 200~0, 6, 0, 210~0, 8, 0, 220~0, 10, 0, 230~0, 12, 0, 240~0, 12, 0, 250~0, 14, 0, 260~0, 14, 0, 270~0, 14, 0, 280~0, 14, 0, 290~0, 16, 0, 300|Fiery Shuriken, The skyborn sends an inferno shuriken towards his enemies@ #n#making them explode and burn as this shuriken sings through the air., 0^Claw^0-5, 1-1^exploDamage, maxexplo^1, 2, 0, 50, 2~1, 5, 0, 60, 2~1, 7, 0, 70, 2~1, 10, 0, 75, 3~1, 12, 0, 80, 3~1, 15, 0, 85, 3~1, 17, 0, 90, 3~1, 20, 0, 100, 4~1, 22, 0, 105, 4~1, 25, 0, 110, 4~1, 27, 0, 115, 4~1, 28, 0, 120, 4~1, 30, 0, 130, 4~2, 30, 0, 140, 4~2, 30, 0, 150, 4~2, 35, 0, 160, 5~2, 40, 0, 170, 5~2, 40, 0, 180, 5~2, 45, 0, 190, 5~2, 50, 0, 200, 6|Attack, Attack with your current weapon., 0^^^^0, 0, 0, undefined|Multiple Strike, Concentrating himself@ the executioner lashes out#n#at his enemies crushing multiple targets in a single hit., 0^Spear, Sword^23-4^maxHit, multipleStrike_damage^0, 2, 0, 2, 50~0, 5, 0, 2, 60~0, 4, 0, 2, 70~0, 3, 0, 2, 80~0, 10, 0, 3, 85~0, 9, 0, 3, 90~0, 8, 0, 3, 100~0, 7, 0, 3, 105~0, 15, 0, 4, 110~0, 14, 0, 4, 120~0, 13, 0, 4, 125~0, 12, 0, 4, 130~0, 20, 0, 5, 132~0, 19, 0, 5, 134~0, 18, 0, 5, 136~0, 17, 0, 5, 140~0, 16, 0, 5, 145~0, 20, 0, 6, 150|Panic, The skyborn spreads fear across monsters and beasts alike@ causing them to flee hopelessly.#n#Although the stronger the beast the higher it will counter this spell., 0^^^panic_vision^1, 1, 0, 25~1, 1, 0, 50~1, 1, 0, 60~1, 1, 0, 80~2, 1, 0, 100~1, 1, 0, 120~2, 1, 0, 150~2, 2, 0, 170~3, 2, 0, 180~3, 2, 0, 200|Underground, Move under the ground at a high speed@ where monsters can't reach.#n#Mana consumed is per minute., 0^^^underground_strength^0, 1, 0, 1~0, 2, 0, 2~0, 3, 0, 3~0, 4, 0, 4~0, 5, 0, 5~0, 6, 0, 6~0, 7, 0, 7~0, 8, 0, 8~0, 9, 0, 9~0, 10, 0, 10~0, 11, 0, 11~0, 12, 0, 12~0, 13, 0, 13~0, 14, 0, 14~0, 15, 0, 15~0, 16, 0, 16~0, 17, 0, 17~0, 18, 0, 18~0, 19, 0, 19~0, 20, 0, 20|Dash, The skyborn dashes forward at such a speed@#n#allowing him to surprise his enemies., 0^^^dash^1, 2, 0, 4~1, 8, 0, 5~1, 5, 0, 5~1, 10, 0, 6~2, 8, 0, 6~2, 12, 0, 7~2, 10, 0, 7~2, 11, 0, 8~2, 12, 0, 9~3, 13, 0, 10~3, 14, 0, 11~3, 15, 0, 12~3, 16, 0, 13~3, 17, 0, 14~4, 18, 0, 15~4, 19, 0, 16~4, 20, 0, 17~5, 22, 0, 18~5, 23, 0, 19~5, 25, 0, 20|Summon Fire Ball, The sage reaches in himself@ finding his inner flame he causes the very sky to drop fire on his foes., 0^^^^10, 0, 0, undefined|Sacrifice Object, Sacrifice this object to the gods., 0^^^^0, 0, 0, undefined|Throw Object, Send this object thundering down upon your enemies., 0^^^^0, 0, 0, undefined|Summon Ice Ball, Summon an Ice Ball from the sky upon monsters.#n#Lands nearby in case there are no monsters within sight., 0^^^^0, 0, 0, undefined|Summon Lightning Ball, Summon a Lightning Ball from the sky upon monsters.#n#Summon an Ice Ball from the sky upon monsters.#n#Lands nearby in case there are no monsters within sight., 0^^^^0, 0, 0, undefined|Fire Ball, , 0^^^^0, 0, 0, undefined|Ice Ball, , 0^^^^0, 0, 0, undefined|Lightning Ball, , 0^^^^0, 0, 0, undefined|Feral Wakening, All humans have their inner animal.#n#The sage has the ability to summon it@ creating a wolf from his very spirit., 4^Staff^^nowSummoning, s_health, s_mana, s_damage, s_elementDamage, s_accuracy, s_avoidability, s_defense, s_fRes, s_iRes, s_lRes^0, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 10, 0, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0~0, 15, 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0~0, 20, 0, 2, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0~0, 25, 0, 2, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0~0, 30, 0, 2, 5, 0, 4, 0, 0, 0, 0, 0, 0, 0~0, 35, 0, 2, 7, 0, 4, 0, 0, 0, 0, 0, 0, 0~0, 40, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~0, 45, 0, 3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0~0, 50, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0~0, 55, 0, 3, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0~0, 60, 0, 3, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0~0, 65, 0, 3, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0~0, 70, 0, 3, 7, 0, 3, 0, 0, 0, 0, 0, 0, 0~0, 75, 0, 3, 10, 0, 4, 0, 0, 0, 0, 0, 0, 0|Worm Summon, Summon Worms., 4^Staff^undefined-5, 19-1^nowSummoning, s_health, s_mana, s_damage, s_elementDamage, s_accuracy, s_avoidability, s_defense, s_fRes, s_iRes, s_lRes^0, 0, 0, 4, 10, 0, 2, 0, 1, 0, 2, 5, 0, 0~0, 0, 0, 4, 20, 0, 5, 0, 2, 1, 10, 20, 0, 0|Chain Lightning, Feeling the thunder inside you@ flowing through your veins.#n#You are able to send it out scorching your enemies and sending those close enough damage.#n#This barrage of magic is hard to master@ and may cause often the death of those who try to control it., 0^Staff^^chainDamage, chainRange, maxChain^20, 5, 0, 70, 50, 2~19, 8, 0, 80, 60, 2~18, 20, 0, 90, 70, 3~17, 25, 0, 100, 80, 3~16, 28, 0, 110, 90, 3~15, 40, 0, 130, 100, 4~14, 45, 0, 140, 100, 4~13, 48, 0, 160, 110, 4~12, 55, 0, 170, 120, 5~11, 60, 0, 190, 130, 5~10, 62, 0, 200, 140, 5~9, 65, 0, 210, 140, 5~8, 69, 0, 220, 140, 6~7, 72, 0, 230, 150, 6~6, 74, 0, 240, 160, 6~5, 75, 0, 250, 170, 6~4, 76, 0, 260, 180, 6~4, 78, 0, 270, 180, 6~4, 79, 0, 280, 190, 6~3, 80, 0, 300, 200, 7|Summon Mastery, Mastering this ability allows you to split your spirit to form more than one beast., 1^^16-6, 34-5^maxSummons^0, 0, 0, 2~0, 0, 0, 3~0, 0, 0, 4|Heart Mastery, Gives the executioner his life back over time.#n#Allowing him to fight a greater battle@ and still feeling in full health., 1^^^health_reg_amount^0, 0, 0, 2~0, 0, 0, 5~0, 0, 0, 7~0, 0, 0, 10~0, 0, 0, 12~0, 0, 0, 15~0, 0, 0, 17~0, 0, 0, 20~0, 0, 0, 22~0, 0, 0, 25~0, 0, 0, 27~0, 0, 0, 30~0, 0, 0, 32~0, 0, 0, 35~0, 0, 0, 40|Breathing Mastery, Heal a greater amount of mana., 1^^^mana_reg_amount^0, 0, 0, 2~0, 0, 0, 3~0, 0, 0, 4~0, 0, 0, 5~0, 0, 0, 7~0, 0, 0, 8~0, 0, 0, 10~0, 0, 0, 11~0, 0, 0, 12~0, 0, 0, 13~0, 0, 0, 15~0, 0, 0, 16~0, 0, 0, 17~0, 0, 0, 19~0, 0, 0, 20|Disciplined Mind, Reaching inside the mind of his prey@ the sage knows all and controls all.#n#Making him the master and his victim his pet., 0^Staff^19-3^controlSuccess, controlTime^2, 5, 0, 10, 5~3, 10, 0, 14, 10~4, 20, 0, 17, 15~5, 25, 0, 21, 20~6, 30, 0, 24, 22~7, 35, 0, 28, 28~8, 40, 0, 31, 60~9, 45, 0, 35, 35~10, 50, 0, 38, 40~11, 55, 0, 42, 45~12, 60, 0, 45, 50~13, 65, 0, 49, 55~13, 70, 0, 52, 60~14, 75, 0, 56, 65~15, 80, 0, 59, 70~16, 85, 0, 63, 75~17, 87, 0, 66, 80~18, 90, 0, 70, 82~19, 95, 0, 73, 87~20, 100, 0, 80, 90|Power Blow, Conserving his energy@ the executioner sends#n#a powerful blow crushing on his enemy., 0^Sword, Spear, Dagger^^powerBlow_damage^0, 5, 0, 110~0, 5, 0, 120~0, 6, 0, 130~0, 7, 0, 140~0, 7, 0, 150~0, 7, 0, 160~0, 8, 0, 170~0, 8, 0, 180~0, 9, 0, 190~0, 10, 0, 200~0, 10, 0, 210~0, 11, 0, 220~0, 12, 0, 230~0, 13, 0, 240~0, 14, 0, 250~0, 15, 0, 260~0, 16, 0, 270~0, 18, 0, 280~0, 19, 0, 290~0, 20, 0, 300|Pressure Crush, Crush the monsters around you with an enourmous amount of pressure.#n#Drains your health. Can only perform when health is above 30%., 0^^^pressureCrush_damage, pressureCrush_multi, pressureCrush_health^10, 10, 0, 50, 1, 1~15, 20, 0, 60, 1, 2~20, 30, 0, 70, 2, 3~25, 40, 0, 80, 2, 4~30, 50, 0, 90, 3, 5~35, 55, 0, 100, 3, 6~40, 60, 0, 110, 4, 7~45, 65, 0, 120, 4, 8~50, 70, 0, 125, 5, 9~60, 80, 0, 130, 5, 10~65, 90, 0, 135, 6, 11~70, 95, 0, 140, 6, 12~75, 100, 0, 145, 7, 13~80, 105, 0, 150, 7, 14~85, 110, 0, 160, 8, 15~90, 115, 0, 170, 8, 16~95, 120, 0, 180, 9, 17~100, 130, 0, 185, 9, 18~110, 140, 0, 190, 9, 19~120, 150, 0, 200, 10, 20|Combat Dash, Being light@ the Soul Hunter dashes forward at an unbeatable speed., 0^^^combatDash^10, 1, 0, 25~9, 4, 0, 35~9, 5, 0, 40~8, 6, 0, 45~7, 8, 0, 55~6, 10, 0, 65~5, 12, 0, 75~5, 13, 0, 85~4, 14, 0, 90~4, 15, 0, 95~4, 16, 0, 100~3, 17, 0, 105~3, 18, 0, 110~2, 19, 0, 115~1, 20, 0, 125|Element Clash, Apply a side effect on the closest monster.#n#Side effect is depended on your element., 0^Staff^^elementClash_chance, elementClash_duration^30, 20, 0, 10, 1~29, 30, 0, 12, 1~28, 40, 0, 15, 2~27, 50, 0, 18, 2~26, 60, 0, 20, 2~25, 70, 0, 22, 3~24, 80, 0, 25, 3~23, 90, 0, 28, 3~22, 100, 0, 30, 3~21, 105, 0, 32, 4~20, 110, 0, 35, 4~20, 115, 0, 38, 4~19, 120, 0, 40, 4~19, 125, 0, 42, 4~18, 130, 0, 45, 5~18, 135, 0, 48, 5~17, 140, 0, 50, 5~17, 145, 0, 52, 5~16, 150, 0, 55, 6~16, 155, 0, 58, 6~15, 160, 0, 60, 6~15, 165, 0, 62, 7~14, 170, 0, 65, 7~14, 175, 0, 68, 7~13, 180, 0, 70, 8~13, 185, 0, 80, 8~12, 190, 0, 85, 8~12, 192, 0, 92, 9~11, 197, 0, 95, 9~10, 200, 0, 100, 10|Broken Mind, Reaching into its mind@ the sage sends the beast images of death and dread#n#sending it wild with fear and killing everything in its path., 0^Staff^22-3^captureChance, captureEnpower, captureTime^2, 5, 0, 5, 100, 2~4, 10, 0, 7, 105, 3~6, 15, 0, 10, 110, 4~8, 20, 0, 12, 115, 5~10, 25, 0, 15, 120, 5~12, 30, 0, 20, 125, 6~14, 35, 0, 23, 130, 6~16, 40, 0, 25, 135, 7~18, 45, 0, 27, 140, 8~20, 50, 0, 30, 145, 8~21, 55, 0, 32, 150, 9~22, 60, 0, 35, 155, 9~23, 65, 0, 37, 160, 10~24, 70, 0, 40, 165, 10~25, 75, 0, 45, 170, 11~27, 80, 0, 50, 175, 11~30, 85, 0, 52, 180, 11~32, 90, 0, 55, 185, 12~33, 95, 0, 57, 190, 12~36, 100, 0, 60, 195, 13~40, 105, 0, 62, 200, 14~42, 110, 0, 67, 210, 15~45, 115, 0, 70, 220, 15~47, 120, 0, 75, 230, 16~50, 125, 0, 80, 240, 17~52, 130, 0, 82, 250, 18~55, 135, 0, 85, 260, 18~56, 140, 0, 90, 270, 18~57, 145, 0, 92, 280, 19~60, 150, 0, 100, 300, 20|Hyper Body, Allows the executioner to become more than human@#n#enhancing his store of health and mana. , 2^^20-5^supportDuration, t_health, t_mana, t_speed, t_jump, t_damage, t_elementDamage, t_seRate, t_seDuration, t_accuracy, t_avoidability, t_crit, t_defense, t_fRes, t_iRes, t_lRes, t_str, t_dex, t_wis, t_luk^20, 5, 0, 10, 1%, 1%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~40, 10, 0, 20, 2%, 2%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~60, 15, 0, 30, 4%, 4%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~100, 20, 0, 40, 5%, 5%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~150, 25, 0, 45, 6%, 6%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~160, 30, 0, 50, 8%, 8%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~190, 35, 0, 55, 10%, 10%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~220, 40, 0, 60, 11%, 11%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~250, 45, 0, 70, 12%, 12%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~270, 50, 0, 80, 15%, 15%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~300, 55, 0, 90, 17%, 17%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~320, 60, 0, 100, 18%, 18%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~340, 65, 0, 110, 20%, 20%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~360, 70, 0, 130, 21%, 21%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~380, 75, 0, 150, 22%, 22%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~400, 80, 0, 160, 27%, 27%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~420, 85, 0, 170, 30%, 30%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~460, 90, 0, 175, 32%, 32%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~500, 95, 0, 180, 34%, 34%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~520, 100, 0, 190, 35%, 35%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~540, 105, 0, 200, 37%, 37%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~550, 110, 0, 220, 40%, 40%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~560, 115, 0, 240, 42%, 42%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~570, 120, 0, 260, 45%, 45%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~600, 125, 0, 300, 50%, 50%, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|Wind Cut, Wind being the avatar of speed@#n#the soul hunter's blades cut through the air#n#striking his opponent with accuracy., 0^Dagger^^windCut_damage, maxQuickAttacks^0, 5, 0, 70, 2~0, 7, 0, 75, 2~0, 10, 0, 80, 2~0, 12, 0, 90, 2~0, 20, 0, 95, 3~0, 22, 0, 100, 3~0, 25, 0, 105, 3~0, 27, 0, 110, 3~0, 30, 0, 115, 3~0, 32, 0, 120, 3~0, 40, 0, 125, 4~0, 42, 0, 130, 4~0, 45, 0, 135, 4~0, 47, 0, 140, 4~0, 50, 0, 142, 4~0, 52, 0, 145, 4~0, 60, 0, 150, 5~0, 62, 0, 152, 5~0, 65, 0, 157, 5~0, 70, 0, 160, 5~0, 75, 0, 162, 5~0, 80, 0, 165, 5~0, 90, 0, 170, 6~0, 100, 0, 172, 6~0, 110, 0, 175, 6~0, 115, 0, 180, 6~0, 120, 0, 182, 6~0, 130, 0, 185, 7~0, 140, 0, 190, 7~0, 160, 0, 200, 8|Battle Bear, The executioner is granted strength that is beyond reckoning.#n#Defense that will disable any blade.#n#While in this form@ the executioner's speed is greatly lowered@#n#but giving his attacks a crushing damage., 3^^28-4^transformTo, bodySize, supportDuration, t_health, t_mana, t_speed, t_jump, t_damage, t_elementDamage, t_seRate, t_seDuration, t_accuracy, t_avoidability, t_crit, t_defense, t_fRes, t_iRes, t_lRes, t_str, t_dex, t_wis, t_luk^10, 30, 0, Battle Bear, 100, 5, 0, 0, -2%, -2%, 25%, 0, 0, 0, 0, 0, 0, 2%, 0, 0, 0, 0, 0, 0, 0~12, 42, 0, Battle Bear, 101, 7, 0, 0, -3%, -3%, 34%, 0, 0, 0, 0, 0, 0, 4%, 0, 0, 0, 0, 0, 0, 0~14, 54, 0, Battle Bear, 101, 9, 0, 0, -4%, -4%, 43%, 0, 0, 0, 0, 0, 0, 5%, 0, 0, 0, 0, 0, 0, 0~16, 66, 0, Battle Bear, 102, 11, 0, 0, -4%, -4%, 53%, 0, 0, 0, 0, 0, 0, 7%, 0, 0, 0, 0, 0, 0, 0~18, 78, 0, Battle Bear, 103, 12, 0, 0, -5%, -5%, 62%, 0, 0, 0, 0, 0, 0, 8%, 0, 0, 0, 0, 0, 0, 0~20, 90, 0, Battle Bear, 103, 14, 0, 0, -6%, -6%, 71%, 0, 0, 0, 0, 0, 0, 10%, 0, 0, 0, 0, 0, 0, 0~22, 102, 0, Battle Bear, 104, 16, 0, 0, -7%, -7%, 80%, 0, 0, 0, 0, 0, 0, 12%, 0, 0, 0, 0, 0, 0, 0~24, 114, 0, Battle Bear, 105, 18, 0, 0, -7%, -7%, 89%, 0, 0, 0, 0, 0, 0, 13%, 0, 0, 0, 0, 0, 0, 0~26, 126, 0, Battle Bear, 105, 20, 0, 0, -8%, -8%, 98%, 0, 0, 0, 0, 0, 0, 15%, 0, 0, 0, 0, 0, 0, 0~28, 138, 0, Battle Bear, 106, 22, 0, 0, -9%, -9%, 108%, 0, 0, 0, 0, 0, 0, 16%, 0, 0, 0, 0, 0, 0, 0~30, 150, 0, Battle Bear, 107, 23, 0, 0, -10%, -10%, 117%, 0, 0, 0, 0, 0, 0, 18%, 0, 0, 0, 0, 0, 0, 0~32, 162, 0, Battle Bear, 107, 25, 0, 0, -10%, -10%, 126%, 0, 0, 0, 0, 0, 0, 20%, 0, 0, 0, 0, 0, 0, 0~34, 174, 0, Battle Bear, 108, 27, 0, 0, -11%, -11%, 135%, 0, 0, 0, 0, 0, 0, 21%, 0, 0, 0, 0, 0, 0, 0~36, 186, 0, Battle Bear, 109, 29, 0, 0, -12%, -12%, 144%, 0, 0, 0, 0, 0, 0, 23%, 0, 0, 0, 0, 0, 0, 0~38, 198, 0, Battle Bear, 109, 31, 0, 0, -13%, -13%, 153%, 0, 0, 0, 0, 0, 0, 24%, 0, 0, 0, 0, 0, 0, 0~40, 210, 0, Battle Bear, 110, 33, 0, 0, -13%, -13%, 163%, 0, 0, 0, 0, 0, 0, 26%, 0, 0, 0, 0, 0, 0, 0~42, 222, 0, Battle Bear, 111, 34, 0, 0, -14%, -14%, 172%, 0, 0, 0, 0, 0, 0, 28%, 0, 0, 0, 0, 0, 0, 0~44, 234, 0, Battle Bear, 111, 36, 0, 0, -15%, -15%, 181%, 0, 0, 0, 0, 0, 0, 29%, 0, 0, 0, 0, 0, 0, 0~46, 246, 0, Battle Bear, 112, 38, 0, 0, -16%, -16%, 190%, 0, 0, 0, 0, 0, 0, 31%, 0, 0, 0, 0, 0, 0, 0~48, 258, 0, Battle Bear, 113, 40, 0, 0, -17%, -17%, 199%, 0, 0, 0, 0, 0, 0, 32%, 0, 0, 0, 0, 0, 0, 0~50, 270, 0, Battle Bear, 113, 42, 0, 0, -17%, -17%, 208%, 0, 0, 0, 0, 0, 0, 34%, 0, 0, 0, 0, 0, 0, 0~52, 282, 0, Battle Bear, 114, 44, 0, 0, -18%, -18%, 218%, 0, 0, 0, 0, 0, 0, 36%, 0, 0, 0, 0, 0, 0, 0~54, 294, 0, Battle Bear, 115, 45, 0, 0, -19%, -19%, 227%, 0, 0, 0, 0, 0, 0, 37%, 0, 0, 0, 0, 0, 0, 0~56, 306, 0, Battle Bear, 115, 47, 0, 0, -20%, -20%, 236%, 0, 0, 0, 0, 0, 0, 39%, 0, 0, 0, 0, 0, 0, 0~58, 318, 0, Battle Bear, 116, 49, 0, 0, -20%, -20%, 245%, 0, 0, 0, 0, 0, 0, 40%, 0, 0, 0, 0, 0, 0, 0~60, 330, 0, Battle Bear, 117, 51, 0, 0, -21%, -21%, 254%, 0, 0, 0, 0, 0, 0, 42%, 0, 0, 0, 0, 0, 0, 0~62, 342, 0, Battle Bear, 117, 53, 0, 0, -22%, -22%, 263%, 0, 0, 0, 0, 0, 0, 44%, 0, 0, 0, 0, 0, 0, 0~64, 354, 0, Battle Bear, 118, 55, 0, 0, -23%, -23%, 273%, 0, 0, 0, 0, 0, 0, 45%, 0, 0, 0, 0, 0, 0, 0~66, 366, 0, Battle Bear, 119, 56, 0, 0, -23%, -23%, 282%, 0, 0, 0, 0, 0, 0, 47%, 0, 0, 0, 0, 0, 0, 0~70, 400, 0, Battle Bear, 120, 60, 0, 0, -25%, -25%, 300%, 0, 0, 0, 0, 0, 0, 50%, 0, 0, 0, 0, 0, 0, 0|Backstab, Honour and loyalty is not part of the soul hunter's rules.#n#When the opportunity for him to attack arises he seizes it without a second thought., 1^^^backDamage^0, 0, 0, 120~0, 0, 0, 122~0, 0, 0, 125~0, 0, 0, 127~0, 0, 0, 130~0, 0, 0, 135~0, 0, 0, 140~0, 0, 0, 150~0, 0, 0, 160~0, 0, 0, 170~0, 0, 0, 175~0, 0, 0, 180~0, 0, 0, 185~0, 0, 0, 190~0, 0, 0, 200|Soul's Dance, Never understimate the soul hunter@#n#for when his enemies count many@ he is able to send his blade dancing around him#n#flowing swiftly through the air cutting and jabbing at his enemies., 0^Dagger, Sword^29-10, 31-3^bloodshed_damage, bloodshed_max, bloodshed_backChance^10, 70, 0, 50, 2, 5~12, 80, 0, 60, 2, 8~15, 100, 0, 70, 2, 12~17, 120, 0, 75, 2, 15~20, 140, 0, 80, 3, 18~22, 180, 0, 85, 3, 21~25, 200, 0, 90, 3, 25~27, 210, 0, 95, 3, 28~30, 220, 0, 100, 4, 31~32, 240, 0, 105, 4, 34~35, 260, 0, 110, 4, 38~37, 280, 0, 115, 5, 41~40, 300, 0, 120, 5, 44~42, 320, 0, 122, 5, 47~45, 340, 0, 125, 5, 51~47, 360, 0, 127, 6, 54~50, 370, 0, 130, 6, 57~52, 380, 0, 135, 7, 60~55, 390, 0, 140, 7, 64~60, 400, 0, 150, 8, 70|Sneak, Merging with the shadows@ the soul hunter becomes one with the environment.#n#Enhancing his movement and avoid-ability skills., 3^^32-2^transformTo, bodySize, supportDuration, t_health, t_mana, t_speed, t_jump, t_damage, t_elementDamage, t_seRate, t_seDuration, t_accuracy, t_avoidability, t_crit, t_defense, t_fRes, t_iRes, t_lRes, t_str, t_dex, t_wis, t_luk^10, 30, 0, Sneak, 100, 5, 0, 0, 5%, -5%, 0, 0, 0, 0, -5%, 10%, 0, 0, 0, 0, 0, 0, 0, 0, 0~11, 36, 0, Sneak, 100, 6, 0, 0, 6%, -10%, 0, 0, 0, 0, -10%, 20%, 0, 0, 0, 0, 0, 0, 0, 0, 0~12, 42, 0, Sneak, 100, 7, 0, 0, 7%, -14%, 0, 0, 0, 0, -14%, 29%, 0, 0, 0, 0, 0, 0, 0, 0, 0~13, 48, 0, Sneak, 100, 7, 0, 0, 8%, -19%, 0, 0, 0, 0, -19%, 39%, 0, 0, 0, 0, 0, 0, 0, 0, 0~14, 54, 0, Sneak, 100, 8, 0, 0, 9%, -24%, 0, 0, 0, 0, -24%, 48%, 0, 0, 0, 0, 0, 0, 0, 0, 0~15, 60, 0, Sneak, 100, 9, 0, 0, 10%, -29%, 0, 0, 0, 0, -29%, 58%, 0, 0, 0, 0, 0, 0, 0, 0, 0~16, 66, 0, Sneak, 100, 10, 0, 0, 11%, -33%, 0, 0, 0, 0, -33%, 67%, 0, 0, 0, 0, 0, 0, 0, 0, 0~17, 72, 0, Sneak, 100, 10, 0, 0, 12%, -38%, 0, 0, 0, 0, -38%, 77%, 0, 0, 0, 0, 0, 0, 0, 0, 0~18, 78, 0, Sneak, 100, 11, 0, 0, 13%, -43%, 0, 0, 0, 0, -43%, 86%, 0, 0, 0, 0, 0, 0, 0, 0, 0~19, 84, 0, Sneak, 100, 12, 0, 0, 14%, -48%, 0, 0, 0, 0, -48%, 96%, 0, 0, 0, 0, 0, 0, 0, 0, 0~20, 90, 0, Sneak, 100, 13, 0, 0, 15%, -52%, 0, 0, 0, 0, -52%, 105%, 0, 0, 0, 0, 0, 0, 0, 0, 0~21, 96, 0, Sneak, 100, 13, 0, 0, 16%, -57%, 0, 0, 0, 0, -57%, 115%, 0, 0, 0, 0, 0, 0, 0, 0, 0~22, 102, 0, Sneak, 100, 14, 0, 0, 17%, -62%, 0, 0, 0, 0, -62%, 124%, 0, 0, 0, 0, 0, 0, 0, 0, 0~23, 108, 0, Sneak, 100, 15, 0, 0, 18%, -67%, 0, 0, 0, 0, -67%, 134%, 0, 0, 0, 0, 0, 0, 0, 0, 0~24, 114, 0, Sneak, 100, 16, 0, 0, 19%, -71%, 0, 0, 0, 0, -71%, 143%, 0, 0, 0, 0, 0, 0, 0, 0, 0~25, 120, 0, Sneak, 100, 16, 0, 0, 20%, -76%, 0, 0, 0, 0, -76%, 153%, 0, 0, 0, 0, 0, 0, 0, 0, 0~26, 126, 0, Sneak, 100, 17, 0, 0, 21%, -81%, 0, 0, 0, 0, -81%, 162%, 0, 0, 0, 0, 0, 0, 0, 0, 0~27, 132, 0, Sneak, 100, 18, 0, 0, 22%, -86%, 0, 0, 0, 0, -86%, 172%, 0, 0, 0, 0, 0, 0, 0, 0, 0~28, 138, 0, Sneak, 100, 19, 0, 0, 23%, -90%, 0, 0, 0, 0, -90%, 181%, 0, 0, 0, 0, 0, 0, 0, 0, 0~30, 150, 0, Sneak, 100, 20, 0, 0, 25%, -100%, 0, 0, 0, 0, -100%, 200%, 0, 0, 0, 0, 0, 0, 0, 0, 0|Enthralment, The sage becomes deeply absorbed in his concentration increasing his spells range., 1^^^starDistance^0, 0, 0, 170~0, 0, 0, 196~0, 0, 0, 222~0, 0, 0, 248~0, 0, 0, 300";
npcString = "Xian, 100, 6, 4, 3, 1, 4, 1, 1, 1, 1, 333333, ECC893, C2F2FF^-1, 123, 133, -1, -1, 149|Talluis, 100, 9, 1, 7, 1, 4, 1, 1, 2, 1, FFCC66, ECC893, 66CCFF^121, 123, 133, 23, 142, 145|High Priest Tarreal, 100, 21, 2, 2, 1, 4, 1, 1, 1, 1, CCCCCC, ECC893, 00CC00^-1, 122, 132, -1, -1, 145|Damien, 100, 18, 1, 7, 1, 1, 1, 3, 2, 2, FFFF66, ECC893, 00CC00^-1, 45, 52, 11, -1, 92|Guard Zhao, 100, 4, 1, 3, 1, 12, 1, 1, 1, 1, 000000, ECC893, 000000^151, 127, 138, -1, 143, 149|Potion Master Qao, 100, 13, 17, 1, 1, 22, 1, 1, 1, 1, CCCCCC, ECC893, 0066FF^-1, 129, 139, -1, -1, -1|Master Of Trade Shao, 100, 8, 4, 5, 1, 21, 6, 1, 1, 1, 333333, ECC893, 000000^-1, 125, 135, -1, -1, 145|Lord Qian, 100, 20, 14, 3, 8, 3, 2, 1, 1, 1, 825300, ECC893, 00CC00^-1, 125, 135, -1, 142, 149|Old Man, 100, 8, 17, 3, 1, 4, 10, 1, 1, 1, CCCCCC, EFD1A7, FFFFFF^153, 131, 141, -1, 144, 146|Saro, 100, 9, 1, 1, 3, 1, 2, 1, 1, 1, FFFFCC, ECC893, 00CCFF^-1, 129, 139, -1, -1, -1|Roma, 100, 5, 4, 4, 4, 13, 1, 1, 1, 1, 333333, ECC893, 333333^-1, 130, 140, -1, -1, -1|Meru, 100, 5, 14, 3, 1, 6, 1, 1, 1, 1, 333333, ECC893, 000000^-1, 128, 138, -1, -1, -1|Mifu, 100, 5, 3, 2, 1, 6, 1, 3, 1, 1, 825300, ECC893, 009900^-1, -1, 139, -1, -1, -1|Servant Zhian, 100, 21, 2, 1, 2, 1, 3, 1, 1, 1, 825300, ECC893, 432100^-1, 128, 132, -1, -1, 91|Eterith, 100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 825300, ECC893, 00CC00^-1, -1, -1, -1, -1, -1|Luo, 100, 10, 1, 3, 2, 1, 1, 1, 1, 1, 825300, ECC893, 663333^-1, 38, 51, 17, 65, 85|Leiku'm, 100, 1, 1, 2, 1, 8, 1, 1, 1, 1, 000000, ECC893, 000000^83, 39, 52, 18, 66, 86|Warden, 100, 5, 14, 1, 1, 1, 1, 2, 1, 1, 333333, ECC893, 000000^-1, 127, 136, 12, -1, 145|Zhialiann, 100, 2, 1, 3, 1, 1, 1, 1, 1, 1, 4B3000, ECC893, 865E35^-1, 128, 138, -1, -1, -1|Xuo, 100, 11, 1, 4, 1, 1, 1, 1, 1, 1, 333333, ECC893, 835A31^-1, 129, 139, -1, -1, -1|Knight Taisur, 100, 18, 1, 2, 1, 1, 1, 1, 1, 1, 825300, ECC893, 000000^-1, 38, 51, 11, 65, 85|Knight Tyanallo, 100, 10, 2, 2, 1, 20, 1, 1, 1, 1, 666666, ECC893, 00CC00^-1, 40, 53, 16, 67, 87|Robber Haopian, 100, 12, 1, 2, 1, 1, 1, 1, 1, 1, 825300, ECC893, 00CC00^79, 48, 57, 13, -1, 90|Robber Wouqao, 100, 10, 1, 8, 1, 2, 1, 1, 1, 1, 663300, ECC893, 00CC00^152, 109, 63, 11, 76, -1|Assassin Shou, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CC00^77, 39, 52, 18, 66, 86|Assassin Shaobou, 100, 3, 1, 1, 1, 1, 1, 1, 1, 1, 333333, ECC893, 000000^77, 39, 52, 16, 66, 86|Assassin Hiamian, 100, 1, 3, 2, 1, 1, 1, 1, 1, 1, 825300, ECC893, 000000^77, 39, 52, 20, 66, 86|Assassin Hialuo, 100, 1, 4, 5, 1, 1, 1, 1, 1, 1, 825300, ECC893, 000000^77, 39, 52, 21, 66, 86|Assassin Quomaon, 100, 4, 6, 8, 1, 1, 1, 1, 1, 1, 666666, ECC893, 000000^77, 39, 52, 25, 66, 86|Humbled Lord Qian, 100, 20, 3, 4, 8, 13, 2, 1, 1, 1, 825300, ECC893, 00CC00^-1, 125, 135, -1, 142, 149|Blacksmith Huo, 100, 1, 2, 2, 1, 21, 1, 1, 1, 1, 333333, ECC893, 000000^-1, 128, 138, -1, -1, 149|Aerthemiss, 100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 825300, ECC893, 00CC00^121, 123, 133, 22, -1, 146|Shop Guard Okin, 100, 15, 4, 5, 5, 2, 1, 1, 1, 1, 999999, ECC893, 000000^-1, 41, 54, 18, 68, 88|Leader Ukane, 100, 19, 6, 2, 1, 5, 1, 1, 1, 1, FFFFCC, ECC893, 33CC99^-1, 42, 55, 19, 69, 89|Prisoner Xian, 100, 6, 4, 1, 1, 1, 1, 1, 1, 1, 333333, ECC893, C2F2FF^-1, 126, 136, -1, -1, 148|Priest Anguos, 100, 22, 2, 3, 1, 4, 2, 1, 1, 1, 825300, ECC893, 00CC00^-1, 124, 134, -1, -1, 147|Priest Entheos, 100, 22, 1, 1, 1, 5, 1, 1, 1, 1, 825300, ECC893, 000000^-1, 124, 134, -1, -1, 147|Priest Fianeos, 100, 22, 4, 3, 1, 8, 1, 1, 1, 1, 825300, ECC893, 0099FF^-1, 124, 134, -1, -1, 147|Assassins' Leader, 100, 6, 4, 1, 1, 4, 1, 1, 1, 1, 333333, ECC893, C2F2FF^154, 155, 156, 18, 157, 158|Knight Lord Qian, 100, 20, 15, 2, 8, 6, 2, 1, 1, 1, 825300, ECC893, 00CC00^-1, 42, 55, 18, 69, 149|Assassin Kai, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CC00^154, 155, 156, 18, 157, 158|Assassin Neu, 100, 4, 3, 3, 1, 1, 1, 1, 1, 1, 000000, ECC893, 000000^154, 155, 156, 18, 157, 158|Assassin Neik, 100, 4, 4, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 000000^154, 155, 156, 18, 157, 158|Assassin Hulkal, 100, 4, 6, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 0099FF^154, 155, 156, 18, 157, 158|Assassin Mauk, 100, 4, 11, 6, 1, 1, 1, 1, 1, 1, 000000, ECC893, 000000^154, 155, 156, 18, 157, 158|Lo'i, 100, 2, 15, 4, 8, 10, 2, 1, 1, 1, 825300, ECC893, 00CC00^-1, 125, 135, -1, 142, 149|Lord Lo'i, 100, 2, 2, 1, 8, 15, 2, 1, 1, 1, 825300, ECC893, 00CC00^-1, 125, 135, -1, 142, 149|Assassin Saki, 100, 4, 2, 3, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CCFF^154, 155, 156, 18, 157, 158|Assassin Noharu, 100, 4, 3, 7, 1, 1, 1, 1, 1, 1, 000000, ECC893, 442200^154, 155, 156, 18, 157, 158|Assassin Tawa, 100, 4, 5, 5, 1, 1, 1, 1, 1, 1, 000000, ECC893, 000000^154, 155, 156, 18, 157, 158|Assassin Kei, 100, 4, 1, 6, 1, 1, 1, 1, 1, 1, 000000, ECC893, 000000^154, 155, 156, 18, 157, 158|Prisoner Toyo, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 000000^154, 126, 136, -1, -1, 148|Assassin Kuro, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CC00^154, 155, 156, 18, 157, 158|Assassin Shiroka, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CC00^154, 155, 156, 18, 157, 158|Assassin Zawa, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CC00^154, 155, 156, 18, 157, 158|Assassin Matsu, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CC00^154, 155, 156, 18, 157, 158|Assassin Dao, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 00CC00^154, 155, 156, 18, 157, 158|Tamer Zensa, 100, 4, 4, 2, 1, 1, 1, 3, 3, 1, 000000, ECC893, 0099CC^154, -1, 156, 27, -1, 158|Prisoner Kushio, 100, 4, 4, 2, 1, 1, 1, 4, 4, 1, 000000, ECC893, 000000^154, -1, 136, -1, -1, 148|Assassin Toyo, 100, 4, 2, 2, 1, 1, 1, 1, 1, 1, 000000, ECC893, 000000^154, 126, 136, 20, -1, -1|Assassin Kushio, 100, 4, 4, 2, 1, 1, 1, 4, 4, 1, 000000, ECC893, 000000^154, -1, 136, -1, -1, -1|Tailor Eopi, 100, 22, 15, 3, 1, 7, 1, 1, 1, 1, 000000, ECC893, 000000^-1, 47, 60, -1, -1, -1|???, 100, 22, 9, 2, 1, 4, 1, 1, 1, 1, 593800, ECC893, 0066CC^153, 131, 141, -1, 144, -1|Hunter Lomua, 100, 22, 4, 1, 1, 1, 1, 4, 4, 1, 825300, ECC893, 00CCFF^-1, -1, 140, 21, -1, -1|Servant Zhian, 100, 21, 2, 1, 2, 1, 3, 1, 1, 1, 825300, ECC893, 432100^-1, 128, 138, -1, -1, 91|Lord Qian, 100, 20, 14, 3, 8, 3, 2, 1, 1, 1, 825300, ECC893, 00CC00^-1, 125, 52, -1, 142, 149|Injured Xian, 100, 6, 4, 4, 1, 6, 1, 1, 1, 1, 333333, ECC893, C2F2FF^-1, 130, 140, -1, -1, -1";
quest = new Array();
inProgress = new Array();
completed = new Array();
elimination = new Array();
collection = new Array();
questDrops = new Array();
tempData = monsterString.split("|");
tempData2 = itemString.split("|");
tempData3 = objectString.split("|");
tempData4 = questString.split("|");
tempData5 = skillString.split("|");
tempData6 = npcString.split("|");
storeData = storeString.split("|");
gameStage = stageString.split("|");
soundsList = soundString.split("|");
soundsSize = soundSizeString.split(", ");
i = 0;
while (i < tempData.length) {
monsterData[i] = tempData[i].split("~");
i++;
}
i = 0;
while (i < tempData2.length) {
itemData[i] = insertAmount(tempData2[i].split("~"));
i++;
}
i = 0;
while (i < tempData3.length) {
objectData[i] = tempData3[i].split(", ");
i++;
}
i = 0;
while (i < tempData4.length) {
newQuest(tempData4[i].split("~"));
i++;
}
_root.questCopy = copyArray(quest);
i = 0;
while (i < tempData5.length) {
skillData[i] = tempData5[i].split("^");
cooldown[i] = 0;
i++;
}
i = 0;
while (i < tempData6.length) {
npcData[i] = tempData6[i].split("^");
i++;
}
monsterStats = new Array();
var i = 0;
while (i < monsterData.length) {
monsterStats.push(-1);
i++;
}
objectStats = new Array();
var i = 0;
while (i < objectData.length) {
objectStats.push(-1);
i++;
}
itemStats = new Array();
var i = 0;
while (i < itemData.length) {
itemStats.push(-1);
i++;
}
}
function newQuest(questArray) {
quest.push(quest.length);
quest[quest.length - 1] = questArray;
}
function insertAmount(myArray) {
var _local1 = myArray.concat();
_local1.push("1");
return(_local1);
}
function resetInventory() {
equip_item = new Array();
use_item = new Array();
etc_item = new Array();
updateInventorySlots();
}
function updateInventorySlots() {
addSlotsToInventory(equip_item, equip_slots);
addSlotsToInventory(use_item, use_slots);
addSlotsToInventory(etc_item, etc_slots);
}
function addSlotsToInventory(inv, totalSlots) {
var _local1 = 0;
while (_local1 < totalSlots) {
if (inv[_local1] == undefined) {
inv[_local1] = ["Empty"];
}
_local1++;
}
}
function resetEquips() {
equips = new Array();
var _local1 = 0;
while (_local1 < 6) {
equips[_local1] = ["Empty"];
_local1++;
}
}
function bookToNumbers(myArray) {
var _local3 = new Array();
_local3.push(myArray[0]);
var _local1 = 1;
while (_local1 < myArray.length) {
_local3.push(getSkillNum(myArray[_local1]));
_local1++;
}
return(_local3.join(", "));
}
function getSkillNum(myName) {
var _local1 = 0;
while (_local1 < skillData.length) {
if (skillData[_local1][0].split(", ")[0] == myName) {
return(_local1);
}
_local1++;
}
}
function getSkillArray(myName) {
return(skillData[getSkillNum(myName)]);
}
function applySkillPoint(myNum, myLevel) {
var _local6 = skillData[myNum];
var _local3 = _local6[3].split(", ");
var _local7 = _local6[4].split("~");
var _local4 = _local7[myLevel - 1].split(", ");
var _local2 = 0;
while (_local2 < _local3.length) {
if (myLevel == 0) {
if (_root[_local3[_local2]] == undefined) {
_root[_local3[_local2]] = 0;
}
} else {
_root[_local3[_local2]] = _local4[_local2 + 3];
}
_local2++;
}
}
function getStageNum(stageName) {
var _local1 = 0;
while (_local1 < gameStage.length) {
if (gameStage[_local1].split("~")[0].split(", ")[0] == stageName) {
return(_local1);
}
_local1++;
}
}
function addBook(myBook) {
currentBook++;
_root["book" + currentBook] = myBook.concat();
_root["sp" + currentBook] = 0;
if (boosted == true) {
_root["sp" + currentBook] = 100;
}
_root[("book" + currentBook) + "_skills"] = new Array();
var _local2 = 0;
while (_local2 < (_root["book" + currentBook].length - 1)) {
_root[("book" + currentBook) + "_skills"].push(0);
_local2++;
}
}
function resetBooks(amount) {
currentBook = 0;
var _local2 = 1;
while (_local2 <= amount) {
_root["book" + _local2] = undefined;
_root["sp" + _local2] = undefined;
_root[("book" + _local2) + "_skills"] = undefined;
_local2++;
}
}
function boostSkills() {
var _local3 = 1;
while (_local3 <= 3) {
var _local4 = _root[("book" + _local3) + "_skills"];
var _local2 = 0;
while (_local2 < _local4.length) {
_local4[_local2] = skillData[_root["book" + _local3][_local2 + 1]][4].split("~").length;
_local2++;
}
_local3++;
}
skill = [3, 18, 16, 33, 7, 6, -1, -1];
}
function sitelock(urls_allowed) {
var _local5 = _url.split("://");
var _local3 = _local5[1].split("/");
for (var _local4 in urls_allowed) {
if ((urls_allowed[_local4] == _local3[0]) || (("www." + urls_allowed[_local4]) == _local3[0])) {
_root.lockGame = false;
}
}
if (_root.lockGame) {
_root._visible = false;
}
}
function appearInArray(myValue, myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (myValue == myArray[_local1]) {
return(true);
}
_local1++;
}
return(false);
}
function appearInCodeArray(myValue, myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (myValue == myArray[_local1][0].split(", ")[0]) {
return(true);
}
_local1++;
}
return(false);
}
function saveGame(saveAction, slotNumber, noPic) {
saveObject = SharedObject.getLocal("saveData" + slotNumber, "/");
var _local3 = saveObject.data;
var _local4 = 0;
while (_local4 < saveVars.length) {
var _local2 = saveVars[_local4];
var _local5 = (_local2 == "charX") || (_local2 == "charY");
if (_local5) {
} else if (saveAction == 0) {
_local3[_local2] = _root[_local2];
if (_root[_local2] instanceof Array) {
_local3[_local2] = copyArray(_root[_local2]);
} else {
_local3[_local2] = _root[_local2];
}
} else if (saveAction == 1) {
if (_local3[_local2] != undefined) {
if (_local3[_local2] instanceof Array) {
_root[_local2] = copyArray(_local3[_local2]);
} else {
_root[_local2] = _local3[_local2];
}
}
}
_local4++;
}
if (saveAction == 0) {
_local3.charX = field.character._x;
if (jumping) {
_local3.charY = jY;
} else {
_local3.charY = field.character._y;
}
} else if (saveAction == 1) {
tempLoadX = _local3.charX + 6;
tempLoadY = _local3.charY + teleportGap;
}
if (saveAction == 0) {
saveObject.onStatus = layout.fix_save.so.onStatus;
var _local8 = saveObject.flush(10000000);
if (_local8 == true) {
layout.fix_save.isSaving = true;
if (noPic != true) {
duplicateSavePic();
}
if (tutorialCounter == 25) {
setTimeout(nextTutorial, 5);
if (currentStage != 4) {
moveMap(4, -242, -150);
}
}
} else {
layout.fix_save.isSaving = false;
layout.fix_save.pauseOn = layout.options_menu._visible;
removeUI("options_menu");
promptOptions();
addUI("options_bg");
layout.fix_save._visible = true;
gamePause = true;
layout.fix_save.saveAllow._visible = true;
layout.fix_save.checkFixed();
layout.fix_save.saveError._visible = false;
mochi.as2.MochiEvents.trackEvent("Save", "Space Issue");
}
}
if (saveAction == 1) {
_root.isNewGame = false;
patchLog = "";
var _local7 = _local3.gameVersion;
if (_local7 == undefined) {
_local7 = 1;
}
if (_local7 < _root.gameVersion) {
patchGame(_local7);
}
mochi.as2.MochiEvents.trackEvent("Save", "Load");
} else {
mochi.as2.MochiEvents.trackEvent("Save", "Save");
}
}
function copyArray(myArray) {
var _local2 = new Array();
for (var _local3 in myArray) {
if (myArray[_local3] instanceof Array) {
_local2[_local3] = copyArray(myArray[_local3]);
} else {
_local2[_local3] = myArray[_local3];
}
}
return(_local2);
}
function saveConfig(saveAction, justMenu) {
var _local5;
if (justMenu == true) {
_local5 = 1;
} else {
_local5 = configVars.length;
}
var _local6 = SharedObject.getLocal("configData", "/");
saveData = _local6.data;
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = configVars[_local3];
if (saveAction == 0) {
saveData[_local2] = _root[_local2];
} else if (saveAction == 1) {
if (saveData[_local2] != undefined) {
_root[_local2] = saveData[_local2];
}
}
_local3++;
}
_local6.flush();
}
function defaultConfig(saveAction, configType) {
var _local4 = 0;
while (_local4 < configVars.length) {
var _local2 = configVars[_local4];
if ((saveAction == 0) && (_local2 != "firstPlay")) {
configObject[_local2] = _root[_local2];
} else if (saveAction == 1) {
if (configObject[_local2] != undefined) {
var _local5 = (_local2 == "maxMusic") || (_local2 == "maxSoundFX");
var _local3 = _local2 == "command";
if (((_local5 && (configType == 0)) || (_local3 && (configType == 2))) || (((!_local5) && (!_local3)) && (configType == 1))) {
if (_local3) {
_root[_local2] = copyArray(configObject[_local2]);
} else {
_root[_local2] = configObject[_local2];
}
}
}
}
_local4++;
}
if (saveAction == 1) {
updateConfiguration();
}
}
function copyObject(myObject) {
var _local2 = new Object();
for (var _local3 in myObject) {
_local2[_local3] = myObject[_local3];
}
return(_local2);
}
function toBarArray(myNum) {
return([myNum, myNum, false]);
}
stop();
var urls_allowed = ["coolroystudio.com"];
lockGame = false;
isWeb = true;
var gameVersion = 1;
_root.createEmptyMovieClip("mochiMc", _root.getNextHighestDepth());
mochi.as2.MochiServices.connect("b2e21a0b11e13d3e", mochiMc, onConnectError);
Security.allowDomain("www.mochiads.com");
mochi.as2.MochiSocial.addEventListener(mochi.as2.MochiSocial.LOGGED_IN, loggedIn);
mochi.as2.MochiSocial.addEventListener(mochi.as2.MochiSocial.LOGGED_OUT, loggedOut);
mochi.as2.MochiCoins.addEventListener(mochi.as2.MochiCoins.ITEM_OWNED, registerMochiItem);
mochi.as2.MochiCoins.addEventListener(mochi.as2.MochiCoins.ITEM_NEW, newMochiItem);
var mochi_login = false;
var mochi_store = false;
var mochi_items = new Array();
var mochi_user;
var mochi_coins = false;
Stage.showMenu = false;
_root._focusrect = false;
var step = 1;
onEnterFrame = function () {
if (lockGame == true) {
onEnterFrame = null;
}
if (step == 1) {
var _local1 = Math.round((getBytesLoaded() / getBytesTotal()) * 100);
if (_local1 == 100) {
step++;
} else {
gamePer.text = _local1 + "%";
bar.bar._xscale = _local1;
}
} else if (step == 2) {
gamePer.text = "";
bar._visible = false;
loadData();
if (lockGame != true) {
moveFrame(7);
}
}
};
currentStage = 1;
var platformWidth = 957.7;
var backWidth = 957.7;
tempLoadX = undefined;
command = [38, 39, 37, 40, 32, 90, 88, 67, 86, 16, 80, 73, 17, 81, 75, 69, 83, 49, 50, 51];
var skill = [3, -1, -1, -1, -1, -1, -1, -1];
var quickUse = [-1, -1, -1];
if (loadNext == undefined) {
var soundLoadingTimes = 0;
var soundsTotal = 0;
}
var firstPlay = true;
var maxMusic = 100;
var maxSoundFX = 100;
var maxMenuMusic = toBarArray(100);
var maxFX = 20;
var maxFilter = 1;
var screenShaking = 1;
var screenBlurring = 0;
var showBars = 1;
_root._quality = "MEDIUM";
var basicCharacterScale = 130;
var charData;
var tranData;
var tranSize = basicCharacterScale;
var transformation = false;
var monster_frames = ["idle", "cooldown", "move", "hit", "charge", "attack", "rangeattack"];
var npc_frames = ["idle", "walk", "jump", "hit", "atk_claw", "atk_sword", "atk_spear", "atk_dagger", "atk_staff"];
var i = 0;
while (i < monster_frames.length) {
_root["monster_" + monster_frames[i]] = i + 1;
i++;
}
var i = 0;
while (i < npc_frames.length) {
_root["npc_" + npc_frames[i]] = i + 1;
i++;
}
var monster_idle_duration = "1-3";
var monster_idle_timeout = "2-4";
var monsterSaveVars = ["gold", "exp", "level", "health", "startHealth", "mana", "startMana", "defense", "speed", "minDmg", "maxDmg", "eMinDmg", "eMaxDmg", "accuracy", "avoidability", "resistance_Fire", "resistance_Ice", "resistance_Lightning", "timeZone", "isBoss", "skill", "skillTimer", "controlTimer", "startControlTimer", "behavior", "myPosition", "realPet", "maxExp", "base_level", "base_startHealth", "startMana", "base_defense", "base_speed", "base_minDmg", "base_maxDmg", "base_eMinDmg", "base_eMaxDmg", "base_resistance_Fire", "base_resistance_Ice", "base_resistance_Lightning", "base_gold", "base_exp"];
var teleportGap = 62;
var hiddenObjects = new Array();
var hiddenNpcs = new Array();
var hiddenPlatforms = new Array();
var objectDepths = new Array();
var objectWidth;
var object = false;
var builder_y_fix = 11;
level = 1;
exp = 0;
expToNextLevel = 10;
gold = 0;
speedBonus = 0;
critChance = 10;
weapon_minDamage = 0;
weapon_maxDamage = 0;
element_minDamage = 0;
element_maxDamage = 0;
accuracy = 1;
avoidability = 0;
sideRight = true;
backupObject = false;
var winArrayString = new Array();
var layoutArray = [[309.4, 3.3], [-210.4, 16.6], [228.1, -71.6], [22.5, -21.5], [17.9, -20.1], [-213.5, 6], [200, -38.2], [50, -11.7]];
var optionsPlaceArray = [[0, 0], [-3.6, -29.3], [10.8, -22.3], [10.5, -23.3], [6.5, -18.6], [3.3, -80], [0, 0], [0, 0], [0, 0]];
str = 0;
dex = 0;
wis = 0;
luk = 0;
defense = 0;
Fire_res = 0;
Ice_res = 0;
Lightning_res = 0;
var timeString = "11:00";
var miliTimer = 0;
var hour = Number(timeString.split(":")[0]);
var minute = Number(timeString.split(":")[1]);
var hourTxt;
var minuteTxt;
var tutorialCounter = -1;
var holding = true;
var cooldown = new Array();
var statSquare = new Array();
var announcments = new Array();
var npcChanges = new Array();
var exitNow;
var exitTimer;
var maskHair = false;
var currentArray;
var var_weapon = new Array();
setStatArray(var_weapon);
addNewStat("maxHealth");
addNewStat("maxMana");
addNewStat("speedBonus");
addNewStat("basicJumpPower");
addNewStat("weapon_minDamage");
addNewStat("weapon_maxDamage");
addNewStat("element_minDamage");
addNewStat("element_maxDamage");
addNewStat("elementChance");
addNewStat("elementDuration");
addNewStat("accuracy");
addNewStat("avoidability");
addNewStat("critChance");
addNewStat("defense");
addNewStat("Fire_res");
addNewStat("Ice_res");
addNewStat("Lightning_res");
addNewStat("str");
addNewStat("dex");
addNewStat("wis");
addNewStat("luk");
var var_equip = new Array();
setStatArray(var_equip);
addNewStat("maxHealth");
addNewStat("maxMana");
addNewStat("speedBonus");
addNewStat("basicJumpPower");
addNewStat("damage");
addNewStat("elementDamage");
addNewStat("elementChance");
addNewStat("elementDuration");
addNewStat("accuracy");
addNewStat("avoidability");
addNewStat("critChance");
addNewStat("defense");
addNewStat("Fire_res");
addNewStat("Ice_res");
addNewStat("Lightning_res");
addNewStat("str");
addNewStat("dex");
addNewStat("wis");
addNewStat("luk");
var var_req = new Array();
setStatArray(var_req);
addNewStat("level");
addNewStat("str");
addNewStat("dex");
addNewStat("wis");
addNewStat("luk");
var var_iPotion = new Array();
setStatArray(var_iPotion);
addNewStat("health");
addNewStat("mana");
addNewStat("speedBonus");
addNewStat("basicJumpPower");
addNewStat("damage");
addNewStat("elementDamage");
addNewStat("accuracy");
addNewStat("avoidability");
addNewStat("critChance");
addNewStat("defense");
addNewStat("Fire_res");
addNewStat("Ice_res");
addNewStat("Lightning_res");
addNewStat("str");
addNewStat("dex");
addNewStat("wis");
addNewStat("luk");
var var_pPotion = new Array();
setStatArray(var_pPotion);
addNewStat("maxHealth");
addNewStat("maxMana");
addNewStat("speedBonus");
addNewStat("basicJumpPower");
addNewStat("damage");
addNewStat("elementDamage");
addNewStat("elementChance");
addNewStat("elementDuration");
addNewStat("accuracy");
addNewStat("avoidability");
addNewStat("critChance");
addNewStat("defense");
addNewStat("Fire_res");
addNewStat("Ice_res");
addNewStat("Lightning_res");
addNewStat("str");
addNewStat("dex");
addNewStat("wis");
addNewStat("luk");
var var_shuriken = new Array();
setStatArray(var_shuriken);
addNewStat("starSpeed");
addNewStat("starDamage");
var equip_slots = 10;
var use_slots = 10;
var etc_slots = 15;
var equip_item;
var use_item;
var etc_slots;
var equip_scroll = 0;
var use_scroll = 0;
var etc_scroll = 0;
var inventoryShowing = "etc";
var inventory_squareSize = 37;
var inventory_perRow = 5;
var inventory_spaceBetween = 10;
resetInventory();
resetEquips();
doubleClick_timer = 5;
slowMotion_level = 15;
sacrifices = 200;
sacrifice_power = 0;
atkSpeedBoost = 2;
damage = 1;
elementDamage = 0;
elementChance = 0;
elementDuration = 0;
health = 30;
maxHealth = health;
mana = 20;
maxMana = mana;
var health_reg_amount = 1;
var mana_reg_amount = 1;
var starDistance = 150;
var maxSummons = 1;
var maxQuickAttacks = 0;
var backDamage = 110;
var basicSpeed = 5;
var basicHSpeed = 4;
var basicJumpPower = 70;
var jumpPower = basicJumpPower;
var atkFrame = 4;
var maxY = 60;
var perspectiveSize = 6;
var maxCloseY = 30;
var enc_nowShowing = "monsters";
var element = "None";
var petPowerGrow = 25;
var petNames = new Array();
var activeStage = new Array();
var maxElementAttach = 10;
var elementAttachTimer = 60;
var elementAttach = 0;
var sparkCounter = 0;
var sparkTimer = 30;
var maxSpark = 3;
var sparkDamage = 5;
var sparkRange = 100;
var spb = 0;
var currentBook = 0;
resetBooks(3);
var book_test1 = ["Begginer", 3, 0, 25, 26, 28, 29, 30, 33, 31, 32];
var book_test2 = ["Ninja", 1, 2, 4, 19, 20, 21, 22, 27, 23, 24];
var book_test3 = ["Advanced", 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18];
var book_unknown = ["Unknown", 3, 26, 24, 18, 8, 11, 12, 13, 14, 15];
var book_executioner = ["Executioner", 3, 20, 28, 23, 4, 30];
var book_soulHunter = ["Soul Hunter", 3, 31, 25, 29, 32, 33];
var book_skyborn = ["Skyborn", 3, 0, 7, 1, 5];
var book_sage = ["Sage", 3, 34, 19, 16, 22, 27];
saveVars = ["gameVersion", "skill", "quickUse", "cooldown", "hour", "minute", "charData", "etc_item", "use_item", "equip_item", "etc_slots", "use_slots", "equip_slots", "etc_scroll", "use_scroll", "equip_scroll", "equips", "gold", "completed", "inProgress", "elimination", "collection", "questDrops", "level", "exp", "expToNextLevel", "health", "maxHealth", "mana", "maxMana", "currentStage", "book1", "book1_skills", "sp1", "book2", "book2_skills", "sp2", "book3", "book3_skills", "sp3", "book4", "book4_skills", "sp4", "spb", "statSquare", "str", "dex", "wis", "luk", "ninjaClass", "element", "speedBonus", "damage", "weapon_minDamage", "weapon_maxDamage", "element_minDamage", "element_minDamage", "element_maxDamage", "elementDamage", "elementChance", "elementDuration", "accuracy", "avoidability", "critChance", "defense", "Fire_res", "Ice_res", "Lightning_res", "basicJumpPower", "monsterStats", "objectStats", "itemStats", "atkFrame", "atkSpeedBoost", "charX", "charY", "sideRight", "petNames", "activeStage", "announcments", "npcChanges", "backupObject", "quest_section_showing", "lastIndexes", "inventoryShowing", "tranData", "transformation", "tranSize", "tutorialCounter", "layoutArray", "winArrayString", "maskHair", "enc_nowShowing", "enc_itemShowing_monsters", "enc_itemShowing_objects", "enc_itemShowing_items", "quest", "holding"];
configVars = ["firstPlay", "maxMenuMusic", "command", "_quality", "maxMusic", "maxSoundFX", "maxFX", "maxFilter", "screenShaking", "screenBlurring", "showBars"];
var saveObject;
var configObject = new Object();
defaultConfig(0);
_root._quality = "HIGH";
loadData();
if (loadNext != undefined) {
moveFrame(3);
}
Frame 3
function updateLoadButton(mySlot) {
var _local3 = _root["slot" + mySlot];
var _local5 = SharedObject.getLocal("saveData" + mySlot, "/").data;
var _local4 = _local3.character.walk;
_local3.mySlot = mySlot;
updateCharacterEquips(mySlot);
if (_local5.level != undefined) {
_local3.charName.text = restrictText(_local5.charData[0], 6);
_local3.charLevel.text = "Level " + _local5.level;
_local3.character._visible = true;
_local3.newGame._visible = false;
} else {
_local3.charName.text = "";
_local3.charLevel.text = "";
_local3.character._visible = false;
_local3.newGame._visible = true;
}
_local3.btn.onRollOver = function () {
this._parent.isRolled = true;
};
_local3.btn.onRollOut = (_local3.btn.onReleaseOutside = function () {
this._parent.isRolled = false;
});
if (_local3.isRolled) {
_local3.character.gotoAndStop(2);
updateCharacterEquips(mySlot);
if (_local4._currentframe == _local4._totalframes) {
_local4.gotoAndStop(6);
} else {
_local4.nextFrame();
}
} else {
_local3.character.gotoAndStop(1);
updateCharacterEquips(mySlot);
}
_local3.deleteSave.onRelease = function () {
var _local3 = SharedObject.getLocal("saveData" + this._parent.mySlot, "/").data;
_root.deleteWarning.mySlot = this._parent.mySlot;
_root.deleteWarning.warnText.text = ((((("Are you sure you want to delete this save?\n\n" + _local3.charData[0]) + " [ ") + _local3.ninjaClass) + " ] [ Level ") + _local3.level) + " ]";
_root.deleteWarning._visible = true;
};
_local3.deleteSave._visible = !_local3.newGame._visible;
_local3.btn.onRelease = function () {
var _local3 = this._parent.mySlot;
_root.savingSlot = _local3;
if (this._parent.newGame._visible) {
moveFrame(5);
} else {
loadSlot(_local3);
}
};
}
function loadSlot(mySlot) {
_root.saveGame(1, mySlot);
if ((soundLoadingTimes == 2) || (loadNext != undefined)) {
loadNext = undefined;
moveFrame(8);
} else {
moveFrame(7);
}
}
function stopSaveSlots(saveSlots) {
var _local2 = 1;
while (_local2 <= saveSlots) {
_root["slot" + _local2].isRolled = false;
_local2++;
}
}
function toEquipsNames(namesArray) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < namesArray.length) {
if (Number(namesArray[_local1]) == -1) {
_local3.push("Empty");
} else {
_local3.push(itemData[Number(namesArray[_local1])][0].split(", ")[0]);
}
_local1++;
}
return(_local3);
}
function toEquipsFrames(namesArray) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < namesArray.length) {
if (Number(namesArray[_local1]) == -1) {
_local3.push(1);
} else {
_local3.push(Number(itemData[Number(namesArray[_local1])][4].split(", ")[2]) + 1);
}
_local1++;
}
return(_local3);
}
function updateCharacterEquips(mySlot, npcMC, isDirectMC, noEquips) {
var _local4 = SharedObject.getLocal("saveData" + mySlot, "/").data;
var _local9 = _root["slot" + mySlot];
var _local2;
var _local3;
var _local12;
if ((mySlot == undefined) || (mySlot == -1)) {
_local2 = getCharMc();
_local3 = getEquipsFrames();
if (mySlot == -1) {
_local4 = new Object();
_local4.charData = charData;
}
} else if (npcMC != undefined) {
if (isDirectMC == true) {
_local2 = npcMC;
} else if (npcMC.isNPC == true) {
_local2 = getCharMc(npcMC);
} else {
_local2 = npcMC.character;
}
var _local10 = npcData[mySlot];
_local4 = new Object();
_local4.charData = _local10[0].split(", ");
_local3 = toEquipsFrames(_local10[1].split(", "));
_local12 = toEquipsNames(_local10[1].split(", "));
} else {
if (_local9.isRolled) {
_local2 = _local9.character.walk;
} else {
_local2 = _local9.character.idle;
}
_local3 = getEquipsFrames(_local4.equips);
_local12 = getEquipsFrames(_local4.equips);
}
if (mySlot == -1) {
if (isDirectMC == true) {
_local2 = npcMC;
} else {
_local2 = npcMC.character;
}
}
if (noEquips == true) {
_local3 = [1, 1, 1, 1, 1, 1];
}
var _local14 = _local2._parent._currentframe;
var _local13 = 0;
if (jumping) {
_local13 = field.character._y;
field.character._y = ground;
jumping = false;
}
if (mySlot == undefined) {
customCharacter();
colorCharacter();
setCharSize();
} else {
var _local8 = _local4.charData;
customCharacter(_local8, _local2, _local3);
if (npcMC.isNPC == true) {
setCharSize(npcMC);
}
colorHair(_local8[11], _local2);
colorSkin(_local8[12], _local2);
reColor(_local2.head.bodyPart_eyes.part, _local8[13]);
}
if (_local13 != 0) {
field.character._y = _local13;
jumping = true;
}
var _local7 = atkFrame;
var _local11 = maskHair;
if ((mySlot != undefined) && (mySlot != -1)) {
if (npcMC != undefined) {
_local7 = getAtkNum(itemData[findNum(_local12[3], itemData)][4].split(", ")[3]);
_local11 = Number(itemData[findNum(_local12[0], itemData)][4].split(", ")[3]) == 1;
} else {
_local7 = _local4.atkFrame;
_local11 = _local4.maskHair;
}
}
_local2.head.headwear.gotoAndStop(_local3[0]);
_local2.body.shirt.gotoAndStop(_local3[1]);
_local2.rightArm_upper.shirt.gotoAndStop(_local3[1]);
_local2.rightArm_lower.shirt.gotoAndStop(_local3[1]);
_local2.leftArm_upper.shirt.gotoAndStop(_local3[1]);
_local2.leftArm_lower.shirt.gotoAndStop(_local3[1]);
_local2.body.pants.gotoAndStop(_local3[2]);
_local2.rightLeg_upper.pants.gotoAndStop(_local3[2]);
_local2.rightLeg_lower.pants.gotoAndStop(_local3[2]);
_local2.leftLeg_upper.pants.gotoAndStop(_local3[2]);
_local2.leftLeg_lower.pants.gotoAndStop(_local3[2]);
_local2.rightArm_lower.glove.gotoAndStop(_local3[4]);
_local2.leftArm_lower.glove.gotoAndStop(_local3[4]);
_local2.rightLeg_lower.shoe.gotoAndStop(_local3[5]);
_local2.leftLeg_lower.shoe.gotoAndStop(_local3[5]);
_local2.rightArm_lower.weapon_claw.gotoAndStop(_local3[3]);
_local2.rightArm_lower.weapon_claw._visible = _local7 == getAtkNum("Claw");
if (_local11) {
_local2.head.bodyPart_hair.setMask(_local2.head.bodyPart_faceMask);
} else {
_local2.head.bodyPart_hair.setMask(null);
_local2.head.bodyPart_faceMask._visible = false;
}
if (((object != false) && (object != undefined)) && (_local2._parent == field.character)) {
_local2.rightArm_upper._x = -10;
_local2.rightArm_upper._y = _local2.body._y + 25;
_local2.rightArm_upper._rotation = -75;
_local2.rightArm_lower._x = _local2.rightArm_upper._x + 19.7;
_local2.rightArm_lower._y = _local2.rightArm_upper._y + 4.5;
_local2.rightArm_lower._rotation = -90;
}
if (_local14 > 4) {
_local2.weapon.gotoAndStop(_local3[3]);
_local2.weapon._visible = _local7 != getAtkNum("Claw");
} else {
_local2.weapon_sword.gotoAndStop(_local3[3]);
_local2.weapon_spear.gotoAndStop(_local3[3]);
_local2.weapon_dagger.gotoAndStop(_local3[3]);
_local2.weapon_staff.gotoAndStop(_local3[3]);
_local2.weapon_sword._visible = false;
_local2.weapon_spear._visible = false;
_local2.weapon_dagger._visible = false;
_local2.weapon_staff._visible = false;
switch (_local7) {
case getAtkNum("Sword") :
_local2.weapon_sword._visible = true;
break;
case getAtkNum("Spear") :
_local2.weapon_spear._visible = true;
break;
case getAtkNum("Dagger") :
_local2.weapon_dagger._visible = true;
break;
case getAtkNum("Staff") :
_local2.weapon_staff._visible = true;
}
}
}
function getAtkNum(myAtk) {
switch (myAtk) {
case "Claw" :
return(6);
case "Sword" :
return(7);
case "Spear" :
return(8);
case "Dagger" :
return(9);
case "Staff" :
return(10);
}
return(5);
}
function getAttackExtension(e) {
switch (getNpcAtkName(e)) {
case "Claw" :
return(0);
case "Sword" :
return(50);
case "Spear" :
return(110);
case "Dagger" :
return(0);
case "Staff" :
return(0);
}
return(20);
}
function getEquipsFrames(myArray) {
if (myArray == undefined) {
myArray = equips;
}
var _local3 = new Array();
var _local1 = 0;
while (_local1 < myArray.length) {
if (myArray[_local1][4].split(", ")[2] == undefined) {
_local3.push(1);
} else {
_local3.push(Number(myArray[_local1][4].split(", ")[2]) + 1);
}
_local1++;
}
return(_local3);
}
function setSlashColor(myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local2 = NormalSlash;
if ((myMc == field.character) && ((elementDamage + element_minDamage) > 0)) {
_local2 = _root[element + "Slash"];
} else if ((myMc != field.character) && (myMc.eMinDmg > 0)) {
_local2 = _root[myMc.myElement + "Slash"];
}
var _local5 = myMc.atk.slash;
if (_local2 == normalSlash) {
_local5.filters = [_local2];
} else {
var _local4 = _local2.clone();
_local4.inner = true;
_local4.strength = 1;
_local5.filters = [_local4, _local2];
}
}
function fadeSlash(myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local1 = myMc.atk.slash;
if (_local1 == undefined) {
return(undefined);
}
if (_local1._alpha > 0) {
_local1._alpha = _local1._alpha - 10;
}
}
function customCharacter(myArray, charMC, equipsArray) {
var _local2;
var _local3;
if (myArray == undefined) {
_local2 = getCharArray().concat();
_local3 = getCharMc();
e = getEquipsFrames();
} else {
_local2 = myArray.concat();
_local3 = charMC;
e = equipsArray.concat();
}
convertToNumbers(_local2, 2, 10);
if (e[0] != 1) {
_local2[7] = 1;
}
if (e[1] != 1) {
_local2[8] = 1;
}
if ((e[1] != 1) || (e[4] != 1)) {
_local2[9] = 1;
}
if (e[2] != 1) {
_local2[10] = 1;
}
if ((((_local3._parent == field.character) && (_root.damageCounter < _root.damageTimer)) && (missedAttack != true)) || (_local3._parent.isNPC && ((_local3._parent._currentframe == npc_hit) || ((_local3._parent.damageCounter < _local3._parent.damageTimer) && (_local3._parent.missedAttack != true))))) {
_local2[3] = 13;
_local2[4] = 9;
_local2[6] = 18;
}
_local3.head.bodyPart_hair.gotoAndStop(_local2[2]);
_local3.head.bodyPart_eyes.gotoAndStop(_local2[3]);
_local3.head.bodyPart_eyebrows.gotoAndStop(_local2[4]);
_local3.head.bodyPart_nose.gotoAndStop(_local2[5]);
_local3.head.bodyPart_mouth.gotoAndStop(_local2[6]);
_local3.head.bodyPart_face.gotoAndStop(_local2[7]);
_local3.head.bodyPart_faceMask.gotoAndStop(_local2[7]);
_local3.body.bodyPart.gotoAndStop(_local2[8]);
_local3.rightArm_upper.bodyPart.gotoAndStop(_local2[9]);
_local3.rightArm_lower.bodyPart.gotoAndStop(_local2[9]);
_local3.leftArm_upper.bodyPart.gotoAndStop(_local2[9]);
_local3.leftArm_lower.bodyPart.gotoAndStop(_local2[9]);
_local3.rightLeg_upper.bodyPart.gotoAndStop(_local2[10]);
_local3.rightLeg_lower.bodyPart.gotoAndStop(_local2[10]);
_local3.leftLeg_upper.bodyPart.gotoAndStop(_local2[10]);
_local3.leftLeg_lower.bodyPart.gotoAndStop(_local2[10]);
}
function reColor(mc, myColor, optionalAlpha) {
if (optionalAlpha == undefined) {
optionalAlpha = 0;
} else {
optionalAlpha = 100 - optionalAlpha;
}
var _local4 = new Color(mc);
var _local2 = new Object();
if (myColor == "reset") {
myRGB = {r:0, g:0, b:0};
} else if (myColor.r != undefined) {
myRGB = myColor;
} else {
myRGB = hexToRGB(myColor);
}
_local2 = {rb:myRGB.r, gb:myRGB.g, bb:myRGB.b, ra:optionalAlpha, ga:optionalAlpha, ba:optionalAlpha};
_local4.setTransform(_local2);
}
function hexToRGB(hex) {
var _local2 = new Object();
var _local3 = Math.max(hex.length - 4, 0);
var _local4 = Math.max(hex.length - 2, 0);
_local2.r = parseInt(hex.substring(0, _local3), 16);
_local2.g = parseInt(hex.substring(_local3, _local4), 16);
_local2.b = parseInt(hex.substring(_local4, hex.length), 16);
return(_local2);
}
function rgbToHSV(red, grn, blu) {
var _local2;
var _local1;
var _local9;
var _local8;
var _local7;
var _local6;
red = red / 255;
grn = grn / 255;
blu = blu / 255;
_local2 = Math.min(Math.min(red, grn), blu);
_local1 = Math.max(Math.max(red, grn), blu);
if (_local2 == _local1) {
return({h:undefined, s:0, v:_local1 * 100});
}
_local9 = ((red == _local2) ? (grn - blu) : (((grn == _local2) ? (blu - red) : (red - grn))));
_local8 = ((red == _local2) ? 3 : (((grn == _local2) ? 5 : 1)));
_local7 = Math.floor((_local8 - (_local9 / (_local1 - _local2))) * 60) % 360;
_local6 = Math.floor(((_local1 - _local2) / _local1) * 100);
_local1 = Math.floor(_local1 * 100);
return({h:_local7, s:_local6, v:_local1});
}
function hsvToRGB(hue, sat, val) {
var _local2;
var _local4;
var _local3;
var _local5;
var _local11;
var _local6;
var _local8;
var _local7;
hue = hue % 360;
if (val == 0) {
return({r:0, g:0, v:0});
}
sat = sat / 100;
val = val / 100;
hue = hue / 60;
_local5 = Math.floor(hue);
_local11 = hue - _local5;
_local6 = val * (1 - sat);
_local8 = val * (1 - (sat * _local11));
_local7 = val * (1 - (sat * (1 - _local11)));
if (_local5 == 0) {
_local2 = val;
_local4 = _local7;
_local3 = _local6;
} else if (_local5 == 1) {
_local2 = _local8;
_local4 = val;
_local3 = _local6;
} else if (_local5 == 2) {
_local2 = _local6;
_local4 = val;
_local3 = _local7;
} else if (_local5 == 3) {
_local2 = _local6;
_local4 = _local8;
_local3 = val;
} else if (_local5 == 4) {
_local2 = _local7;
_local4 = _local6;
_local3 = val;
} else if (_local5 == 5) {
_local2 = val;
_local4 = _local6;
_local3 = _local8;
}
_local2 = Math.floor(_local2 * 255);
_local4 = Math.floor(_local4 * 255);
_local3 = Math.floor(_local3 * 255);
return({r:_local2, g:_local4, b:_local3});
}
function darkerRGB(myHex, darkness) {
var _local2 = hexToRGB(myHex);
var _local1 = rgbToHSV(_local2.r, _local2.g, _local2.b);
return(hsvToRGB(_local1.h, _local1.s, _local1.v - darkness));
}
function colorSkin(myColor, charMC) {
var _local3;
if (charMC == undefined) {
if (_currentframe == 6) {
_local3 = character;
} else {
_local3 = getCharMc();
}
} else {
_local3 = charMC;
}
var _local5 = darkerRGB(myColor, 40);
var _local4 = [_local3.rightArm_upper.bodyPart, _local3.rightArm_lower.bodyPart, _local3.leftArm_upper.bodyPart, _local3.leftArm_lower.bodyPart, _local3.rightLeg_upper.bodyPart, _local3.rightLeg_lower.bodyPart, _local3.leftLeg_upper.bodyPart, _local3.leftLeg_lower.bodyPart, _local3.body.bodyPart, _local3.head.bodyPart_face];
var _local1 = 0;
while (_local1 < _local4.length) {
var _local2 = _local4[_local1];
reColor(_local2.part1, myColor);
reColor(_local2.part2, _local5);
_local1++;
}
}
function colorHair(myColor, charMC) {
var _local1;
if (charMC == undefined) {
if (_currentframe == 6) {
_local1 = character;
} else {
_local1 = getCharMc();
}
} else {
_local1 = charMC;
}
reColor(_local1.head.bodyPart_hair.part1, myColor);
reColor(_local1.head.bodyPart_hair.part2, darkerRGB(myColor, 30));
reColor(_local1.head.bodyPart_hair.part3, darkerRGB(myColor, 60));
reColor(_local1.head.bodyPart_eyebrows.part, myColor);
}
function getPartMc(partName) {
switch (partName) {
case "hair" :
return(character.head.bodyPart_hair);
case "eyebrows" :
return(character.head.bodyPart_eyebrows);
case "eyes" :
return(character.head.bodyPart_eyes);
case "nose" :
return(character.head.bodyPart_nose);
case "mouth" :
return(character.head.bodyPart_mouth);
case "face" :
return(character.head.bodyPart_face);
case "faceMask" :
return(character.head.bodyPart_faceMask);
case "body" :
return(character.body.bodyPart);
case "hands" :
return(character.rightArm_upper.bodyPart);
case "legs" :
return(character.rightLeg_upper.bodyPart);
}
}
function restrictText(txt, restriction) {
if (txt.length <= restriction) {
return(txt);
}
return((substring(txt, 0, restriction)) + "...");
}
function analyzeObjectWidth() {
myObject.gotoAndStop(1);
objectWidth = new Array();
while (myObject._currentframe < myObject._totalframes) {
objectWidth.push(myObject._width);
myObject.nextFrame();
}
myObject._visible = false;
}
analyzeObjectWidth();
if (loadNext != undefined) {
loadSlot(loadNext);
}
playLoop("Menu");
musicBar.myVar = "maxMenuMusic";
saveConfig(1, true);
versionText.text = "Version " + gameVersion;
stopSaveSlots(3);
updateLoadButton(1);
updateLoadButton(2);
updateLoadButton(3);
onEnterFrame = function () {
updateLoadButton(1);
updateLoadButton(2);
updateLoadButton(3);
if (myLoop.getVolume() < maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() + 1);
} else if (myLoop.getVolume() > maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() - 1);
}
sl = 0;
while (sl < mySoundNames.length) {
sLoop = mySounds[mySoundNames[sl]];
if ((sLoop != myLoop) && (sLoop.getVolume() > 0)) {
sLoop.setVolume(sLoop.getVolume() - 1);
if (sLoop.getVolume() == 0) {
sLoop.stop();
}
}
sl++;
}
musicBar.updateAll(maxMenuMusic);
};
credits.onRelease = function () {
moveFrame(4);
};
deleteWarning.bg.onRelease = function () {
};
deleteWarning.bg.useHandCursor = false;
deleteWarning._visible = false;
deleteWarning.yesBtn.onRelease = function () {
SharedObject.getLocal("saveData" + this._parent.mySlot, "/").clear();
this._parent._visible = false;
};
deleteWarning.noBtn.onRelease = function () {
this._parent._visible = false;
};
saveConfig(1);
_root._quality = "HIGH";
Frame 4
musicBar.myVar = "maxMenuMusic";
onEnterFrame = function () {
if (myLoop.getVolume() < maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() + 1);
} else if (myLoop.getVolume() > maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() - 1);
}
sl = 0;
while (sl < mySoundNames.length) {
sLoop = mySounds[mySoundNames[sl]];
if ((sLoop != myLoop) && (sLoop.getVolume() > 0)) {
sLoop.setVolume(sLoop.getVolume() - 1);
if (sLoop.getVolume() == 0) {
sLoop.stop();
}
}
sl++;
}
musicBar.updateAll(maxMenuMusic);
};
goBack.onRelease = function () {
moveFrame(3);
};
mochi.as2.MochiEvents.trackEvent("Viewed Credits");
mochi.as2.MochiServices.addLinkEvent("http://x.mochiads.com/link/9eec05bf12ce92cb", "http://www.coolroystudio.com", visitWebsite);
mochi.as2.MochiServices.addLinkEvent("http://x.mochiads.com/link/288ae8638d0bc28a", "http://plusonetocharisma.tumblr.com/", visitZack);
mochi.as2.MochiServices.addLinkEvent("http://x.mochiads.com/link/3be1d0755cc5051e", "http://www.coolroystudio.com", visitMichael);
Frame 5
function showDesc(myNum) {
txt1.text = txt1Array[myNum - 1];
txt2.text = txt2Array[myNum - 1];
bg._visible = true;
}
function hideDesc() {
txt1.text = "";
txt2.text = "";
bg._visible = false;
}
function chooseClass(myNum) {
ninjaClass = classNames[myNum - 1];
}
musicBar.myVar = "maxMenuMusic";
var classNames = ["Skyborn", "Executioner", "Sage", "Soul Hunter"];
var txt1Array = new Array();
var txt2Array = new Array();
txt1Array.push("\u201CDeath from Afar\u201D");
txt1Array.push("\u201CPure Fury\u201D");
txt1Array.push("\u201CAspects of the Old Ways\u201D");
txt1Array.push("\u201CCold, deadly, precise...\u201D");
txt2Array.push("Some men charge head-on at an opponent, others silently creep around to its back and plant a dagger. Few have the skill to strike an opponent's front, from 100 yards away. It is always a fatal mistake to underestimate a Skyborn's accuracy.");
txt2Array.push("Executioners are a raging typhoon of rage upon the battlefield. Relying on instinct and decades of brutal combat training, they dice their way across the field of battle, their anger rising with every killing blow.");
txt2Array.push("Sages utilize ancient powers born from a time when the God of All Gods first walked the world. By communion with the spirits of nature, they grow aware of the world beyond our view, and the power it contains.");
txt2Array.push("To earn the scorn of a Soul Hunter is to antagonize Death itself. To them, the hunt is more than the kill, it is an oath. An oath dedicated to removing a life from the mortal plane, and sending their soul wailing to the Underworld. They are the embodiment of discipline, vowing to pursue a kill with unrelenting passion, or die trying.");
var i = 1;
while (i <= 4) {
var myBtn = this["btn" + i];
myBtn.onRollOver = function () {
var _local2 = Number(this._name.charAt(3));
showDesc(_local2);
};
myBtn.onRollOut = (myBtn.onReleaseOutside = function () {
hideDesc();
});
myBtn.onRelease = function () {
var _local2 = Number(this._name.charAt(3));
chooseClass(_local2);
moveFrame(6);
};
i++;
}
onEnterFrame = function () {
if (myLoop.getVolume() < maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() + 1);
} else if (myLoop.getVolume() > maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() - 1);
}
sl = 0;
while (sl < mySoundNames.length) {
sLoop = mySounds[mySoundNames[sl]];
if ((sLoop != myLoop) && (sLoop.getVolume() > 0)) {
sLoop.setVolume(sLoop.getVolume() - 1);
if (sLoop.getVolume() == 0) {
sLoop.stop();
}
}
sl++;
}
musicBar.updateAll(maxMenuMusic);
};
Frame 6
function selectFrame(myNum) {
var _local2 = 1;
while (_local2 <= 4) {
this["frame" + _local2]._visible = false;
this["btn" + _local2]._visible = true;
_local2++;
}
this["frame" + myNum]._visible = true;
this["btn" + myNum]._visible = false;
}
function getClassNum(className) {
var _local1 = 0;
while (_local1 < classNames.length) {
if (classNames[_local1] == className) {
return(_local1 + 1);
}
_local1++;
}
}
function resetCharacterEquips() {
var _local1 = character;
_local1.head.headwear.gotoAndStop(1);
_local1.body.shirt.gotoAndStop(1);
_local1.rightArm_upper.shirt.gotoAndStop(1);
_local1.rightArm_lower.shirt.gotoAndStop(1);
_local1.leftArm_upper.shirt.gotoAndStop(1);
_local1.leftArm_lower.shirt.gotoAndStop(1);
_local1.body.pants.gotoAndStop(1);
_local1.rightLeg_upper.pants.gotoAndStop(1);
_local1.rightLeg_lower.pants.gotoAndStop(1);
_local1.leftLeg_upper.pants.gotoAndStop(1);
_local1.leftLeg_lower.pants.gotoAndStop(1);
_local1.rightArm_lower.glove.gotoAndStop(1);
_local1.leftArm_lower.glove.gotoAndStop(1);
_local1.rightLeg_lower.shoe.gotoAndStop(1);
_local1.leftLeg_lower.shoe.gotoAndStop(1);
_local1.rightArm_lower.weapon_claw._visible = false;
_local1.weapon_sword._visible = false;
_local1.weapon_spear._visible = false;
_local1.weapon_dagger._visible = false;
_local1.weapon_staff._visible = false;
}
function stopAllParts() {
stopPart("hair");
stopPart("eyebrows");
stopPart("eyes");
stopPart("nose");
stopPart("mouth");
stopPart("face");
stopPart("body");
stopPart("hands");
stopPart("legs");
}
function stopPart(partName) {
getPartMc(partName).gotoAndStop(closestValidFrame(partName, 1));
_root[partName + "_right"].onRelease = function () {
_root.toRight(this._name.split("_")[0]);
_root.colorAll();
};
_root[partName + "_left"].onRelease = function () {
_root.toLeft(this._name.split("_")[0]);
_root.colorAll();
};
}
function closestValidFrame(mcName, startIndex, backwards) {
var _local4 = _root["invalid_" + mcName];
var _local5 = getPartMc(mcName);
while (appearInArray(startIndex, _local4)) {
if (backwards == true) {
startIndex--;
} else {
startIndex++;
}
}
if ((backwards == true) && (startIndex == 0)) {
return(closestValidFrame(mcName, _local5._totalframes, backwards));
}
if (startIndex > _local5._totalframes) {
return(closestValidFrame(mcName, 1, backwards));
}
return(startIndex);
}
function toRight(mcName) {
var _local4 = _root["invalid_" + mcName];
var _local2 = getPartMc(mcName);
if (_local2._currentframe == _local2._totalframes) {
_local2.gotoAndStop(closestValidFrame(mcName, 1));
} else {
_local2.gotoAndStop(closestValidFrame(mcName, _local2._currentframe + 1));
}
}
function toLeft(mcName) {
var _local4 = _root["invalid_" + mcName];
var _local2 = getPartMc(mcName);
if (_local2._currentframe == 1) {
_local2.gotoAndStop(closestValidFrame(mcName, _local2._totalframes, true));
} else {
_local2.gotoAndStop(closestValidFrame(mcName, _local2._currentframe - 1, true));
}
}
function colorPicked(myPicker) {
var _local1 = myPicker.getRGB();
switch (myPicker) {
case picker_hair :
colorHair(_local1);
break;
case picker_skin :
colorSkin(_local1);
break;
case picker_eyes :
reColor(character.head.bodyPart_eyes.part, _local1);
}
}
function colorAll() {
var _local1 = character.rightArm_upper.bodyPart._currentframe;
character.rightArm_lower.bodyPart.gotoAndStop(_local1);
character.leftArm_upper.bodyPart.gotoAndStop(_local1);
character.leftArm_lower.bodyPart.gotoAndStop(_local1);
_local1 = character.rightLeg_upper.bodyPart._currentframe;
character.rightLeg_lower.bodyPart.gotoAndStop(_local1);
character.leftLeg_upper.bodyPart.gotoAndStop(_local1);
character.leftLeg_lower.bodyPart.gotoAndStop(_local1);
colorHair(picker_hair.getRGB());
colorSkin(picker_skin.getRGB());
reColor(character.head.bodyPart_eyes.part, picker_eyes.getRGB());
}
function getCharData() {
var _local1 = character;
return([charName, basicCharacterScale, _local1.head.bodyPart_hair._currentframe, _local1.head.bodyPart_eyes._currentframe, _local1.head.bodyPart_eyebrows._currentframe, _local1.head.bodyPart_nose._currentframe, _local1.head.bodyPart_mouth._currentframe, _local1.head.bodyPart_face._currentframe, _local1.body.bodyPart._currentframe, _local1.rightArm_upper.bodyPart._currentframe, _local1.rightLeg_upper.bodyPart._currentframe, picker_hair.getRGB(), picker_skin.getRGB(), picker_eyes.getRGB()]);
}
playLoop("Character Creation");
musicBar.myVar = "maxMenuMusic";
var i = 1;
while (i <= 4) {
var myButton = this["btn" + i];
myButton.onRelease = function () {
var _local2 = Number(this._name.charAt(3));
chooseClass(_local2);
selectFrame(_local2);
};
i++;
}
selectFrame(getClassNum(ninjaClass));
charData = ["Shinobi", basicCharacterScale, 1, 1, 1, 1, 1, 1, 1, 1, "825300", "ECC893", "00CC00"];
resetBooks(4);
stopAllParts();
colorAll();
resetCharacterEquips();
getPartMc("faceMask")._visible = false;
charName = charData[0];
var invalid_hair = [];
var invalid_eyebrows = [9];
var invalid_eyes = [19];
var invalid_nose = [];
var invalid_mouth = [18];
var invalid_face = [];
var invalid_body = [];
var invalid_hands = [];
var invalid_legs = [];
picker_hair.color = Number("0x" + charData[10]);
picker_hair.direction = org.sepy.ColorPicker.ColorPicker.DOWN_RIGHT;
picker_hair.useAdvancedColorSelector = true;
picker_hair.useNoColorSelector = false;
picker_hair.addListener(this);
colorPicked(picker_hair);
picker_skin.color = Number("0x" + charData[11]);
picker_skin.direction = org.sepy.ColorPicker.ColorPicker.DOWN_RIGHT;
picker_skin.useAdvancedColorSelector = true;
picker_skin.useNoColorSelector = false;
picker_skin.addListener(this);
colorPicked(picker_skin);
picker_eyes.color = Number("0x" + charData[12]);
picker_eyes.direction = org.sepy.ColorPicker.ColorPicker.DOWN_RIGHT;
picker_eyes.useAdvancedColorSelector = true;
picker_eyes.useNoColorSelector = false;
picker_eyes.addListener(this);
colorPicked(picker_eyes);
picker_skin.colors = [13484979, 15517843, 6697728];
a_fillType = "linear";
a_alphas = [100, 100, 100];
a_ratios = [30, 100, 200];
picker_skin.setAdvancedColorsMatrix(a_fillType, picker_skin.colors, a_alphas, a_ratios);
this.change = function (evt) {
colorPicked(evt);
};
onEnterFrame = function () {
if (myLoop.getVolume() < maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() + 1);
} else if (myLoop.getVolume() > maxMenuMusic[0]) {
myLoop.setVolume(myLoop.getVolume() - 1);
}
sl = 0;
while (sl < mySoundNames.length) {
sLoop = mySounds[mySoundNames[sl]];
if ((sLoop != myLoop) && (sLoop.getVolume() > 0)) {
sLoop.setVolume(sLoop.getVolume() - 1);
if (sLoop.getVolume() == 0) {
sLoop.stop();
}
}
sl++;
}
musicBar.updateAll(maxMenuMusic);
};
goBack.onRelease = function () {
moveFrame(3);
};
createChar.onRelease = function () {
_root.charData = _root.getCharData();
var _local2 = getClassNum(ninjaClass) - 1;
if (_local2 == 0) {
addBook(book_skyborn);
} else if (_local2 == 1) {
addBook(book_executioner);
} else if (_local2 == 2) {
addBook(book_sage);
} else if (_local2 == 3) {
addBook(book_soulHunter);
}
mochi.as2.MochiEvents.trackEvent("Class", ninjaClass);
book1_skills[0] = 1;
_root.isNewGame = true;
if (soundLoadingTimes == 2) {
moveFrame(8);
} else {
moveFrame(7);
}
};
Instance of Symbol 1533 MovieClip [AdvColorPicker] "picker_skin" in Frame 6
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 39372;
columns = 21;
direction = "DR";
useAdvancedColorSelector = false;
useNoColorSelector = true;
}
Instance of Symbol 1533 MovieClip [AdvColorPicker] "picker_eyes" in Frame 6
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 39372;
columns = 21;
direction = "DR";
useAdvancedColorSelector = false;
useNoColorSelector = true;
}
Instance of Symbol 1533 MovieClip [AdvColorPicker] "picker_hair" in Frame 6
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 39372;
columns = 21;
direction = "DR";
useAdvancedColorSelector = false;
useNoColorSelector = true;
}
Frame 7
function adLoaded() {
ad_loaded = true;
ad_timer = 240;
}
function loadSound(soundName) {
var _local2 = "";
if (isWeb) {
_local2 = "http://games.mochiads.com/c/g/age-of-shurikens_v386639/";
}
mySound = new Sound();
if (soundName.split("/").length == 1) {
mySound.loadSound((_local2 + soundName) + ".mp3");
} else {
mySound.loadSound(soundName);
}
mySounds[soundName] = mySound;
mySoundLoaded[soundName] = false;
}
function addSound(soundName) {
mySoundNames.push(soundName);
}
function addLoop(soundName) {
mySoundLoops.push(soundName);
}
function setSoundsPriority(stageCode) {
var _local1;
var _local7 = stageCode.split("~");
var _local9 = _local7[0].split(", ")[0];
var _local6 = _local7[2].split("^");
var _local8 = getStageSound(stageCode);
var _local2 = new Array();
_local2.push(mySoundLoops[_local8]);
_local1 = 0;
while (_local1 < (_local6.length - 1)) {
var _local3 = _local6[_local1].split(", ");
if (Number(_local3[0]) == 0) {
var _local4 = mySoundLoops[getStageSound(gameStage[Number(_local3[3])])];
if (!appearInArray(_local4, _local2)) {
_local2.push(_local4);
}
}
_local1++;
}
_local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] != undefined) {
mySoundNames.push(_local2[_local1]);
}
_local1++;
}
_local1 = 0;
while (_local1 < mySoundLoops.length) {
var _local5 = mySoundLoops[_local1];
if (!appearInArray(_local5, _local2)) {
mySoundNames.push(_local5);
}
_local1++;
}
}
function getStageSound(myStage) {
return(Number(myStage.split("~")[0].split(", ")[4]));
}
function addSoundList(listNum) {
var _local5 = soundsList[listNum];
var _local4 = _local5.split("~");
var _local3 = new Array();
var _local2 = new Array();
if (_local4[0] != "") {
_local3 = _local4[0].split(", ");
}
if (_local4[1] != "") {
_local2 = _local4[1].split(", ");
}
var _local1 = 0;
while (_local1 < _local3.length) {
addSound(_local3[_local1]);
_local1++;
}
_local1 = 0;
while (_local1 < _local2.length) {
addLoop(_local2[_local1]);
_local1++;
}
soundsTotal = Number(soundsSize[listNum]);
}
function newSound(soundName, vol, spkPan) {
mySound = mySounds[soundName];
mySound.setVolume(vol);
mySound.setPan(spkPan);
mySound.start();
return(mySound);
}
function playSound(soundName, mc) {
if (mc == undefined) {
myVol = maxSoundFX;
myPan = 0;
} else {
myVol = 100 - (Math.abs(mc._x - field.character._x) / 5);
myPan = (mc._x - field.character._x) / 5;
if (myVol > 100) {
myVol = 100;
} else if (myVol < 0) {
myVol = 0;
}
myVol = Math.round((myVol * maxSoundFX) / 100);
if (myPan > 100) {
myPan = 100;
} else if (myPan < -100) {
myPan = -100;
}
}
newSound(soundName, myVol, myPan);
}
function playLoop(soundName, soundMissing) {
if ((myLoopName != soundName) || (soundMissing == true)) {
myLoop = mySounds[soundName];
myLoop.stop();
myLoop.start(0, 99999999);
myLoop.setVolume(0);
myLoopName = soundName;
}
}
mochi.as2.MochiAd.showClickAwayAd({clip:mochiAds, id:"b2e21a0b11e13d3e", ad_loaded:adLoaded, ad_failed:adLoaded, ad_skipped:adLoaded});
var ad_loaded = false;
var ad_timer = 240;
adText.text = "Loading Ads...";
soundLoadingTimes++;
for (i in mySounds) {
mySounds[i].stop();
}
_quality = "HIGH";
mySounds = new Array();
mySoundNames = new Array();
mySoundLoops = new Array();
mySoundLoaded = new Array();
if (soundLoadingTimes == 1) {
addSoundList(0);
} else if (soundLoadingTimes == 2) {
addSoundList(1);
}
setSoundsPriority(gameStage[currentStage]);
currentlyLoading = 0;
loadSound(mySoundNames[currentlyLoading]);
loadingComplete = 50;
skipLoading.onRelease = function () {
mochi.as2.MochiEvents.trackEvent("Skipped Sounds Preloader");
moveFrame(8);
};
onEnterFrame = function () {
if ((ad_loaded || ((soundsLoaded == soundsTotal) && (loadingComplete <= 0))) && (ad_timer > 0)) {
ad_timer--;
adText.text = "";
}
skipLoading._visible = (skipLoading_glowing._visible = soundLoadingTimes == 2);
(i = 0);
(soundsLoaded = 0);
while (i < mySoundNames.length) {
tempSound = mySounds[mySoundNames[i]];
if (tempSound.getBytesLoaded() != undefined) {
soundsLoaded = soundsLoaded + tempSound.getBytesLoaded();
currentlyLoading = i;
}
i++;
}
var _local2 = Math.round((soundsLoaded / soundsTotal) * 100);
bar.bar._xscale = _local2;
soundLoading = mySounds[mySoundNames[currentlyLoading]];
if ((currentlyLoading < mySoundNames.length) && (soundLoading.getBytesLoaded() == soundLoading.getBytesTotal())) {
mySoundLoaded[mySoundNames[currentlyLoading]] = true;
if (currentlyLoading < (mySoundNames.length - 1)) {
currentlyLoading++;
loadSound(mySoundNames[currentlyLoading]);
loadingComplete = 50;
}
}
var _local1 = Math.round((soundLoading.getBytesLoaded() / soundLoading.getBytesTotal()) * 100);
fileLoading.text = ((((((((("[ " + (currentlyLoading + 1)) + " / ") + mySoundNames.length) + " ] ") + "\"") + mySoundNames[currentlyLoading]) + "\"") + " Loaded: ") + _local1) + "%";
if (isNaN(_local1)) {
fileLoading.text = ("Initializing \"" + mySoundNames[currentlyLoading]) + "\"";
}
bar_file.bar._xscale = _local1;
totalFiles.text = ("Total Loaded: " + _local2) + "%";
if (soundsLoaded == soundsTotal) {
if (loadingComplete <= 0) {
if (ad_timer == 0) {
if (soundLoadingTimes == 1) {
moveFrame(3);
} else if (soundLoadingTimes == 2) {
moveFrame(8);
}
} else {
var _local3 = Math.ceil(ad_timer / 24);
if (!ad_loaded) {
adText.text = "Loading Ads... Skipping in";
} else {
adText.text = "Playing game in";
}
adText.text = adText.text + ((" " + Math.ceil(ad_timer / 24)) + " second");
if (_local3 != 1) {
adText.text = adText.text + "s";
}
adText.text = adText.text + "...";
}
} else {
loadingComplete--;
}
}
};
Frame 8
function startUp() {
moveMap(currentStage, -180, -100, true);
swapInventory(inventoryShowing);
clearTimeout(myTimeout);
}
function updateScrollers() {
var _local1 = 0;
while (_local1 < scrollers.length) {
var _local2 = layout[scrollers[_local1]].scroller;
_local2.updateWin();
_local1++;
}
if (etc_scroll == 0) {
etc_scroll = layout.inventory.scroller.dragger._y;
use_scroll = layout.inventory.scroller.dragger._y;
equip_scroll = layout.inventory.scroller.dragger._y;
}
}
function winWithScroller(myWin) {
var _local1 = 0;
while (_local1 < scrollers.length) {
if (scrollers[_local1] == myWin._name) {
return(true);
}
_local1++;
}
return(false);
}
function restrictText(txt, restriction) {
if (txt.length <= restriction) {
return(txt);
}
return((substring(txt, 0, restriction)) + "...");
}
function operateStage(stageCode) {
var _local1 = stageCode.split("~");
layout.stageName.text = _local1[0].split(", ")[0];
array_enemy = _local1[1].split("^");
array_object = _local1[2].split("^");
array_npc = _local1[3].split("^");
array_inv = _local1[4].split("|");
var _local2 = _local1[0].split(", ");
Platform = Number(_local2[1]);
Size = Number(_local2[2]);
closedArea = _local2[3];
stageLoop = Number(_local2[4]);
if (stageLoop != myLoopNum) {
playLoop(mySoundLoops[stageLoop]);
if (mySoundLoaded[mySoundLoops[stageLoop]] == true) {
soundMissing = false;
} else {
soundMissing = true;
}
myLoopNum = stageLoop;
}
}
function newPlatform() {
if ((Platform == 7) || (Platform == 11)) {
sky.gotoAndStop(2);
} else {
sky.gotoAndStop(1);
}
var _local3 = 0;
var _local2 = 0;
while (_local3 != undefined) {
_local3 = field.platforms["platform_" + _local2];
_local3.removeMovieClip();
_local2++;
}
field.fieldFloor.removeMovieClip();
var _local1 = 0;
while (_local1 < (platforms + 1)) {
createPlatform(_local1);
_local1++;
}
field.platforms.platform_0.swapDepths(field.platforms.getNextHighestDepth());
back.cacheAsBitmap = true;
field.createEmptyMovieClip("fieldFloor", field.getNextHighestDepth());
field.fieldFloor.attachMovie("character_shadow", "character_shadow", field.fieldFloor.getNextHighestDepth());
}
function getPlatformX(myNum) {
return(field.limitStart._x + (platformWidth * myNum));
}
function createPlatform(myNum, ignoreBackground) {
removePlatform(myNum, ignoreBackground);
myPlatform = field.platforms.attachMovie("background_platform", "platform_" + myNum, field.platforms.getNextHighestDepth());
myPlatform.cacheAsBitmap = true;
myPlatform.gotoAndStop(Platform);
myPlatform._x = platformWidth * myNum;
myPlatform._y = 0;
if ((myNum != platforms) && (ignoreBackground != true)) {
field.limitEnd._x = ((getPlatformX(myNum) + platformWidth) + (field.limitEnd._width / 2)) - 40;
}
if (ignoreBackground != true) {
myPlatform = back.attachMovie("background_landscape", "platform_" + myNum, back.getNextHighestDepth());
myPlatform.cacheAsBitmap = true;
myPlatform.gotoAndStop(Platform);
myPlatform._x = (backWidth * myNum) - 160;
myPlatform._y = 0;
}
myPlatform = middle.attachMovie("background_middle", "platform_" + myNum, middle.getNextHighestDepth());
myPlatform.cacheAsBitmap = true;
myPlatform.gotoAndStop(Platform);
myPlatform._x = (platformWidth * myNum) - 160;
myPlatform._y = 0;
}
function removePlatform(myNum, ignoreBackground, ignorePlatform) {
if (ignorePlatform != true) {
field.platforms["platform_" + myNum].removeMovieClip();
}
if (ignoreBackground != true) {
back["platform_" + myNum].removeMovieClip();
}
if (ignorePlatform != true) {
middle["platform_" + myNum].removeMovieClip();
}
}
function getName(oType, index) {
if (oType == "enemy") {
return(monsterData[index][0].split(", ")[0]);
}
if (oType == "object") {
return(objectData[index][0]);
}
if (oType == "npc") {
return(npcData[index][0].split(", ")[0]);
}
}
function getMonsterName(myName, isCheck) {
var _local1;
var _local2;
if (!isNaN(Number(myName))) {
_local1 = npcData[Number(myName)][0].split(", ")[0];
_local2 = true;
} else {
_local1 = myName;
_local2 = false;
}
if (isCheck == true) {
return(!_local2);
}
return(_local1);
}
function buildStage() {
var _local1;
var _local6;
hiddenObjects = new Array();
hiddenNpcs = new Array();
hiddenPlatforms = new Array();
stageBlock = new Array();
stageBlock[0] = new Array();
stageSlot = 0;
_local1 = 0;
while (_local1 < array_enemy.length) {
var _local3 = Number(array_enemy[_local1].split(", ")[0]);
var _local4 = monsterData[_local3][0].split(", ")[2];
if (_local4 == undefined) {
} else if (_local4 == "block") {
stageSlot++;
stageBlock[stageSlot] = new Array();
} else {
stageBlock[stageSlot].push(_local3);
}
_local1++;
}
platforms = Size;
newPlatform();
reduplicateMonsters(true);
_local1 = 0;
while (_local1 < array_inv.length) {
var _local2 = array_inv[_local1].split("@");
var _local5 = _local2[1].split(", ");
if (_local2[0] != "") {
newPickItem(_local2[0].split("*"), Number(_local5[0]), Number(_local5[1]), false, true);
}
_local1++;
}
needToDuplicate = getNeedToDuplicate();
field.fieldFloor.character_shadow.swapDepths(field.getNextHighestDepth());
field.character.swapDepths(field.getNextHighestDepth());
}
function buildObjects() {
var _local3 = 0;
while (_local3 < array_object.length) {
var _local1 = array_object[_local3].split(", ");
if (_local1[0] != "") {
var _local2 = getName("object", Number(_local1[0]));
var _local5 = ((_local1[3] != undefined) && (!isNaN(Number(_local1[3])))) && ((((_local2 != "teleport") && (_local2 != "message box")) || ((_local2 == "teleport") && (_local1.length > 7))) || ((_local2 == "message box") && (_local1.length > 4)));
if ((Math.abs(getCameraX() - Number(_local1[1])) - objectWidth[Number(_local1[0])]) > 480) {
if (_local5) {
hiddenObjects.push(_local1.join(", "));
} else {
hiddenObjects.push(_local1.slice(0, 3).concat([currentStage, _local3]).concat(_local1.slice(3, _local1.length)).join(", "));
}
} else {
var _local4;
if (_local5) {
_local4 = [_local2, Number(_local1[3]), Number(_local1[4])];
_local1.splice(3, 2);
} else {
_local4 = [_local2, undefined, _local3];
}
if (_local2 == "teleport") {
newObject(_local4, Number(_local1[1]), Number(_local1[2]), undefined, Number(_local1[3]), Number(_local1[4]), Number(_local1[5]), Number(_local1[6]), undefined);
} else if (_local2 == "message box") {
newObject(_local4, Number(_local1[1]), Number(_local1[2]), undefined, undefined, undefined, undefined, undefined, _local1[3]);
} else {
newObject(_local4, Number(_local1[1]), Number(_local1[2]));
}
}
}
_local3++;
}
}
function cancelLimit(prevLimit) {
var _local4 = new Array();
if (prevLimit != field.limitEnd) {
removeEnemy(prevLimit);
var _local3 = field.limitEnd;
var _local2 = 0;
while (_local2 < enemies.length) {
var _local1 = enemies[_local2];
if (_local1.linkage == "block") {
_local4.push(_local1);
if (_local1._x < _local3._x) {
_local3 = _local1;
}
}
_local2++;
}
blockLimit = _local3;
}
}
function getEnemyLimits(e) {
var _local6 = new Object();
var _local5 = [field.limitStart];
var _local4 = [field.limitEnd];
var _local2 = 0;
while (_local2 < blocksArray.length) {
var _local1 = blocksArray[_local2];
if (e._x > _local1._x) {
_local5.push(_local1);
} else if (e._x < _local1._x) {
_local4.push(_local1);
}
_local2++;
}
_local6.limitStart = getClosestEnemy(e, _local5).getBounds(field).xMax;
_local6.limitEnd = getClosestEnemy(e, _local4).getBounds(field).xMin;
return(_local6);
}
function fixEnemyTargetX(e) {
var _local2 = getEnemyLimits(e);
if (e.targetX < (_local2.limitStart + (e._width / 2))) {
e.targetX = _local2.limitStart + (e._width / 2);
} else if (e.targetX > (_local2.limitEnd - (e._width / 2))) {
e.targetX = _local2.limitEnd - (e._width / 2);
}
}
function enemyOnEdge(e) {
var _local2 = getEnemyLimits(e);
return((e.targetX == (_local2.limitStart + (e._width / 2))) || (e.targetX == (_local2.limitEnd - (e._width / 2))));
}
function getRandomX(e) {
var _local1 = getEnemyLimits(e);
return((_local1.limitStart + (e._width / 2)) + random((_local1.limitEnd - (e._width / 2)) - (_local1.limitStart + (e._width / 2))));
}
function getRandomY() {
return(minHeight - random(maxWide));
}
function updateInventoryWin() {
layout.inventory.equip.gotoAndStop(1);
layout.inventory.use.gotoAndStop(1);
layout.inventory.etc.gotoAndStop(1);
layout.inventory.list[inventoryShowing].gotoAndStop(2);
layout.inventory.gold.text = stringNum(gold);
}
function getCommandName(myNum) {
return(("[ " + keyName(command[myNum])) + " ]");
}
function getLayoutButtonNumber(myButton) {
return(Number(myButton._name.charAt(myButton._name.length - 1)) - 1);
}
function setLayoutButtons() {
var _local5 = 1;
while (_local5 <= lbtnName.length) {
var _local3 = layout["lbtn" + _local5];
_local3.onRelease = function () {
var _local3 = _root.getLayoutButtonNumber(this);
_root.toggleWindow(_root.lbtnName[_local3]);
_root.layout.chat._visible = false;
};
_local3.onRollOver = function () {
var _local3 = _root.getLayoutButtonNumber(this);
if (_local3 != 5) {
_root.displayCommand((_root.lbtnCommand[_local3] + " ") + _root.getCommandName(_root.lbtnCommands[_local3]));
} else {
_root.displayCommand(_root.lbtnCommand[_local3]);
}
_root.layout.chat.win = this;
};
_local3.onRollOut = (_local3.onReleaseOutside = function () {
_root.layout.chat._visible = false;
});
_local5++;
}
}
function setLayoutMButtons() {
var _local5 = 1;
while (_local5 <= 4) {
var _local3 = layout["mbtn" + _local5];
_local3.onRollOver = function () {
var _local3 = _root.getLayoutButtonNumber(this);
if (_local3 == 0) {
_root.displayCommand((_root.mbtnCommand[_local3] + " ") + _root.getCommandName(10));
} else {
_root.displayCommand(_root.mbtnCommand[_local3]);
}
_root.layout.chat.win = this;
};
_local3.onRollOut = (_local3.onReleaseOutside = function () {
_root.layout.chat._visible = false;
});
_local5++;
}
}
function setTutorialStep(fromLookup) {
pointOn.filters = [pointOnFilters];
var _local2 = tutorialCounter;
if (_local2 == 0) {
pointOn = lookupMc("Old Man", npcs);
} else if (_local2 == 1) {
pointOn = layout.quests_pop.btn1;
} else if (_local2 == 2) {
pointOn = lookupMc("Weak Wolf", enemies);
} else if (_local2 == 3) {
pointOn = lookupMc("Old Man", npcs);
} else if (_local2 == 4) {
pointOn = layout.quests_pop.btn1;
} else if (_local2 == 5) {
pointOn = layout.quests_pop.finishQuest;
} else if (_local2 == 6) {
layout.expbar.bar._xscale = 99;
pointOn = undefined;
} else if (_local2 == 7) {
pointOn = layout.lbtn1;
} else if (_local2 == 8) {
if ((_root.ninjaClass == "Executioner") || (_root.ninjaClass == "Soul Hunter")) {
pointOn = layout.statsWin.increaseStr;
} else if (_root.ninjaClass == "Sage") {
pointOn = layout.statsWin.increaseWis;
} else if (_root.ninjaClass == "Skyborn") {
pointOn = layout.statsWin.increaseLuk;
}
} else if (_local2 == 9) {
layout.statsWin._visible = false;
pointOn = layout.lbtn4;
} else if (_local2 == 10) {
if (_root.ninjaClass == "Skyborn") {
tutorialSkill = 2;
} else {
tutorialSkill = 3;
}
pointOn = layout.skills.list["item" + tutorialSkill].increaseBtn;
} else if (_local2 == 11) {
pointOn = layout.skills.list["item" + tutorialSkill].iconFrame;
} else if (_local2 == 12) {
pointOn = layout.d2.circle;
} else if (_local2 == 13) {
pointOn = lookupMc("Old Man", npcs);
} else if (_local2 == 14) {
pointOn = layout.quests_pop.btn1;
} else if (_local2 == 15) {
if (lookupMc("Apple", invItems, true) != undefined) {
nextTutorial();
} else {
pointOn = lookupMc("Old Man", npcs);
}
} else if (_local2 == 16) {
pointOn = lookupMc("Apple", invItems);
} else if (_local2 == 17) {
pointOn = lookupMc("Old Man", npcs);
} else if (_local2 == 18) {
pointOn = layout.quests_pop.btn1;
} else if (_local2 == 19) {
pointOn = layout.quests_pop.finishQuest;
} else if (_local2 == 20) {
pointOn = layout.lbtn2;
} else if (_local2 == 21) {
pointOn = layout.inventory.equip;
} else if (_local2 == 22) {
wName = "";
switch (ninjaClass) {
case "Executioner" :
wName = "Steel Katana";
break;
case "Soul Hunter" :
wName = "Steel Dagger";
break;
case "Skyborn" :
wName = "Steel Claw";
break;
case "Sage" :
wName = "Wooden Staff";
}
pointOn = layout.inventory.list["square" + findItemSlot(wName)];
} else if (_local2 == 23) {
setTimeout(function () {
layout.inventory._visible = false;
}, 240);
pointOn = layout.lbtn5;
} else if (_local2 == 24) {
pointOn = layout.quests.closeX;
} else if (_local2 == 25) {
pointOn = layout.mbtn2;
} else if (_local2 == 26) {
pointOn = validateMc("activeObjects[0]");
}
pointOnFilters = pointOn.filters;
if (((pointOn == undefined) && (tutorial[tutorialCounter] != "")) && (fromLookup != true)) {
clearTimeout(pointOnTimeout);
pointOnTimeout = setTimeout(setTutorialStep, 5);
}
}
function failTutorialStep() {
var _local2 = tutorialCounter;
if (_local2 == 1) {
return(!layout.quests_pop._visible);
}
if (_local2 == 2) {
if (currentStage == 1) {
layout.quests._visible = false;
gamePause = false;
tutorialCounter = 1;
return(true);
}
} else {
if (_local2 == 5) {
return(!layout.quests_pop._visible);
}
if (_local2 == 8) {
return(!layout.statsWin._visible);
}
if (_local2 == 10) {
return(!layout.skills._visible);
}
if (_local2 == 11) {
if (!layout.skills._visible) {
tutorialCounter--;
return(true);
}
} else {
if (_local2 == 12) {
var _local3;
if (_root.ninjaClass == "Skyborn") {
_local3 = layout.skills.list.item2.itemNum;
} else {
_local3 = layout.skills.list.item3.itemNum;
}
return((layout.skillSquare.myName != _local3) || (!skillDragging));
}
if (_local2 == 14) {
return((!layout.quests_pop._visible) && (currentStage == 2));
}
if (_local2 == 15) {
if (!_root.appearIn(1, _root.inProgress)) {
tutorialCounter--;
return(true);
}
} else if (_local2 == 16) {
if (!_root.appearIn(1, _root.inProgress)) {
tutorialCounter--;
return(true);
}
} else if (_local2 == 17) {
if (!_root.questStatus(1, "completed")) {
tutorialCounter--;
return(true);
}
} else {
if (_local2 == 18) {
return(!layout.quests_pop._visible);
}
if (_local2 == 21) {
return(!layout.inventory._visible);
}
if (_local2 == 22) {
if (pointOn != layout.inventory.list["square" + findItemSlot(wName)]) {
setTutorialStep();
}
if (!layout.inventory._visible) {
tutorialCounter--;
return(true);
}
return(inventoryShowing != "equip");
}
}
}
}
return(false);
}
function successTutorialStep() {
var _local2 = tutorialCounter;
if (_local2 == 0) {
return(layout.quests_pop._visible);
}
if (_local2 == 1) {
return(_root.appearIn(0, _root.inProgress));
}
if (_local2 == 2) {
return(((pointOn._x == undefined) && (!settingPoint)) && (currentStage == 2));
}
if (_local2 == 3) {
return(layout.quests_pop._visible);
}
if (_local2 == 4) {
return(layout.quests_pop._currentframe == 2);
}
if (_local2 == 5) {
return(!layout.quests_pop._visible);
}
if (_local2 == 6) {
return(spb > 0);
}
if (_local2 == 7) {
return(layout.statsWin._visible);
}
if (_local2 == 8) {
return(spb == 0);
}
if (_local2 == 9) {
return(layout.skills._visible);
}
if (_local2 == 10) {
if (_root.ninjaClass == "Skyborn") {
return(Number(layout.skills.list.item2.invested.text.charAt(0)) > 0);
}
return(Number(layout.skills.list.item3.invested.text.charAt(0)) > 0);
}
if (_local2 == 11) {
var _local5;
if (_root.ninjaClass == "Skyborn") {
_local5 = layout.skills.list.item2.itemNum;
} else {
_local5 = layout.skills.list.item3.itemNum;
}
return((layout.skillSquare.myName == _local5) && (skillDragging));
}
if (_local2 == 12) {
if (_root.ninjaClass == "Skyborn") {
var _local5 = layout.skills.list.item2.itemNum;
} else {
var _local5 = layout.skills.list.item3.itemNum;
}
var _local4 = 1;
if (!holding) {
_local4 = _local4 + 4;
}
if (_root.skill[_local4] == _local5) {
exp = expToNextLevel;
layout.expbar.bar._xscale = 99;
layout.skills._visible = false;
return(true);
}
return(false);
}
if (_local2 == 13) {
return(layout.quests_pop._visible);
}
if (_local2 == 14) {
return(_root.appearIn(1, _root.inProgress));
}
if (_local2 == 15) {
return(((getItemAmount("Apple") + itemOnField("Apple")) == 1) && (currentStage == 3));
}
if (_local2 == 16) {
return(_root.questStatus(1, "completed"));
}
if (_local2 == 17) {
return(layout.quests_pop._visible);
}
if (_local2 == 18) {
return(layout.quests_pop._currentframe == 2);
}
if (_local2 == 19) {
return(!layout.quests_pop._visible);
}
if (_local2 == 20) {
return(layout.inventory._visible);
}
if (_local2 == 21) {
return(inventoryShowing == "equip");
}
if (_local2 == 22) {
var _local3 = "";
switch (ninjaClass) {
case "Executioner" :
_local3 = "Steel Katana";
break;
case "Soul Hunter" :
_local3 = "Steel Dagger";
break;
case "Skyborn" :
_local3 = "Steel Claw";
break;
case "Sage" :
_local3 = "Wooden Staff";
}
return(_root.equips[3][0].split(", ")[0] == _local3);
}
if (_local2 == 23) {
return(layout.quests._visible);
}
if (_local2 == 24) {
return(!layout.quests._visible);
}
if (_local2 == 26) {
return(currentStage == 6);
}
return(false);
}
function getSpawnCor(e, myNum) {
var _local1 = e.mc;
var _local2 = {x:_local1["spawnCor" + myNum]._x, y:_local1["spawnCor" + myNum]._y};
_local1.localToGlobal(_local2);
field.globalToLocal(_local2);
return(_local2);
}
function newShot(e, myData) {
var _local5 = getSpawnCor(e, Number(myData[10]));
if (myData[6] != "none") {
var _local6 = _root.newFX("shot_shoot", _local5.x, _local5.y, Math.round((Number(myData[9]) * e._xscale) / 100));
_local6.gotoAndStop(myData[6]);
}
var _local2 = _root.newFX("shot", _local5.x, _local5.y, Math.round((Number(myData[7]) * e._xscale) / 100), undefined, undefined, true);
_local2.myShadow = field.fieldFloor.attachMovie("shadowObj", "shadowObj" + stars.length, field.fieldFloor.getNextHighestDepth());
_local2.myShadow._x = 9999;
_local2.myShadow._y = e.getBounds(field).yMax;
_local2.shadowGap = Math.abs(_local2._y - _local2.myShadow._y);
_local2.myGraphics = myData[4];
convertToNumbers(myData);
_local2.weapon_minDamage = myData[0];
_local2.weapon_maxDamage = myData[1];
_local2.element_minDamage = myData[2];
_local2.element_maxDamage = myData[3];
_local2.speed = 20 - myData[12];
_local2.baseDmg = 0;
_local2.damage = 0;
_local2.element = e.myElement;
_local2.accuracy = e.accuracy;
_local2.elementChance = e.myElementChance;
_local2.elementDuration = e.myElementDuration;
_local2.starType = "";
_local2.isSecondOfDouble = false;
_local2.myParent = e;
slowMotion = 0;
_local2.myTarget = e.targeted;
if (e.targeted == true) {
_local2.myTarget = field.character;
}
_local2.sideRight = false;
if (e.myTarget._x == undefined) {
_local2.sideRight = e._xscale > 0;
}
_local2.mySize = e._xscale;
_local2.loadTimer = 1;
_local2.arrayType = "stars";
stars.push(_local2);
}
function newStar(starType, infinite, isSecondOfDouble) {
if ((infinite == true) && (starType == "cl")) {
var _local7 = getStaffHead();
chainIt(_local7.x, _local7.y, charSize, new Array(), random(Number(_root.chainDamage)) + 1, true);
skillConsume(18);
return(undefined);
}
if ((starType == "double") && (isSecondOfDouble != true)) {
setTimeout(_root.newStar, cpc(90), "double", false, true);
}
var _local5 = nextStarSlot();
if ((_local5 != "None") || (infinite == true)) {
if (starType == "double") {
if (!skillConsume(1, 2)) {
return(0);
}
} else if (starType == "explosion") {
skillConsume(2);
} else if (starType == "control") {
skillConsume(22);
} else if (starType == "capture") {
skillConsume(27);
}
if (infinite == true) {
var _local7 = getStaffHead();
} else {
var _local7 = getCharHand();
}
var _local2 = _root.newFX("star", _local7.x, _local7.y, getCharMc()._xscale, undefined, undefined, true);
var _local4 = _local5[0].split(", ")[0];
if (infinite == true) {
if (starType == "summon") {
_local4 = "Summon Sphere";
} else {
_local4 = "Sphere";
}
_local2.isSphere = true;
_local2.speed = 8;
_local2.baseDmg = 0;
} else {
var _local9 = _local5[2].split(", ");
_local2.speed = 20 - Number(_local9[0]);
_local2.baseDmg = Number(_local9[1]);
}
_local2.weapon_minDamage = _root.weapon_minDamage;
_local2.weapon_maxDamage = _root.weapon_maxDamage;
_local2.element_minDamage = _root.element_minDamage;
_local2.element_maxDamage = _root.element_maxDamage;
_local2.damage = _root.damage;
_local2.element = _root.element;
_local2.accuracy = _root.accuracy + _root.accuracyBonus;
_local2.elementChance = _root.elementChance;
_local2.elementDuration = _root.elementDuration;
_local2.myParent = true;
_local2.shuriken.gotoAndStop(_local4);
_local2.bomb.gotoAndStop(_local4);
_local2.mindcontrol.gotoAndStop(_local4);
_local2.restrain.gotoAndStop(_local4);
_local2.starType = starType;
_local2.isSecondOfDouble = isSecondOfDouble == true;
_local2.slowMotion = 0;
_local2.bomb._visible = starType == "explosion";
_local2.mindcontrol._visible = starType == "control";
_local2.restrain._visible = starType == "capture";
_local2.mySize = _root.charSize;
var _local8 = getCharMc()._xscale > 0;
_local2.star.gotoAndStop(1);
if (starType == "summon") {
var _local11 = Math.round((Stage.width / 2) - 50);
var _local10 = decideStat("100-" + _local11);
if (!_local8) {
_local10 = _local10 * -1;
}
_local2.summonX = field.character._x + _local10;
if (_local2.summonX >= blockLimit._x) {
_local2.summonX = blockLimit._x - 50;
} else if (_local2.summonX <= field.limitStart._x) {
_local2.summonX = field.limitStart._x + 50;
}
_local2.summonY = getCharGroundWithDif(2);
_local2.summonSkill = _root.summonType;
} else {
_local2.myTarget = checkClosest();
}
if (_local2.myTarget._x == undefined) {
_local2.myTarget = _local8;
}
_local2.sideRight = _local8;
_local2.objNum = stars;
_local2.myShadow = field.fieldFloor.attachMovie("shadowObj", "shadowObj" + stars.length, field.fieldFloor.getNextHighestDepth());
_local2.myShadow._x = 9999;
_local2.myShadow._y = getObjectGround();
_local2.shadowGap = Math.abs(_local2._y - _local2.myShadow._y);
_local2.loadTimer = 1;
_local2.arrayType = "stars";
stars.push(_local2);
if (infinite != true) {
slotAmount(_local5, 1, "minus");
}
}
_root.playSound("shurikenThrow" + (random(2) + 1), _local2);
if (infinite != true) {
prevInv = inventoryShowing;
swapInventory("use");
updateInventory();
swapInventory(prevInv);
setTimeout(updateInventory, 1);
}
}
function removeStar(myStar) {
var _local1 = 0;
while (_local1 < stars.length) {
if (stars[_local1] == myStar) {
stars.splice(_local1, 1);
myStar.myShadow.removeMovieClip();
myStar.removeMovieClip();
break;
}
_local1++;
}
}
function starBehavior(s) {
if (!_root.gamePause) {
s.myShadow._x = s._x;
s.myShadow._y = s._y + s.shadowGap;
s.myShadow._xscale = s._xscale;
s.myShadow._yscale = s._yscale;
if (s.starType == "summon") {
s.myShadow._visible = false;
}
var _local4 = s.myTarget == field.character;
if (s.myTarget._x != undefined) {
var _local14 = s.myTarget.getBounds(field).yMax;
if (_local4) {
_local14 = field.fieldFloor.character_shadow._y;
}
if (s.myShadow._y < _local14) {
s.myShadow._y = _local14;
}
}
s.gotoAndStop(s.myGraphics);
_root.blurSpeed(s);
_root.setFilters(s);
s.prevX = s._x;
s.prevY = s._y;
if ((s.myTarget._x != undefined) || (s.starType == "summon")) {
var _local23;
if (_local4 || (s.myTarget.isNPC)) {
_local23 = s.myTarget.body;
} else {
_local23 = s.myTarget.mc;
}
if (s.hitTest(_local23)) {
damageY = s.myTarget._y;
if (s.isSecondOfDouble) {
damageY = damageY - 15;
}
var _local19;
if (_local4) {
_local19 = _root.avoidability + _root.avoidabilityBonus;
} else {
_local19 = s.myTarget.avoidability;
}
if (_root.attemptHit(s.accuracy, _local19)) {
var _local11 = s.damage + Number(s.baseDmg);
if (isSphere == true) {
_local11 = _local11 + Math.floor(_root.wis / 5);
} else if (s.myParent == true) {
_local11 = _local11 + Math.floor(_root.luk / 5);
}
var _local13 = s.weapon_minDamage + _local11;
var _local10 = s.weapon_maxDamage + _local11;
var _local6 = _root.getDamage(_local13, _local10);
var _local17 = (100 - s.myTarget.defense) / 100;
if (_local4) {
_local17 = (100 - _root.defense) / 100;
}
var _local5 = 0;
var _local9 = 1;
if (((((s.element != "None") && (s.element_minDamage > 0)) && (s.elementDuration > 0)) && (_root.successRate(s.elementChance))) && (s.starType != "control")) {
s.myTarget.element = s.element;
if (_local4) {
_local9 = (100 - _root[s.element + "_res"]) / 100;
} else {
_local9 = (100 - s.myTarget["resistance_" + s.element]) / 100;
}
var _local24 = 24;
if (s.myParent != true) {
_local24 = 1;
}
s.myTarget.elementTimer = Math.round((_root.getElementBonus(s.elementDuration, s.element) * _local24) * _local9);
_local11 = 0;
if (s.myParent == true) {
_local11 = _root.elementDamage + _root.elementDamageBonus;
}
_local13 = s.element_minDamage + _local11;
_local10 = s.element_maxDamage + _local11;
_local5 = _root.getElementBonus(_root.getDamage(_local13, _local10), s.element);
}
if (s.starType == "double") {
_local6 = Math.round((_local6 * Number(_root.doubleDamage)) / 100);
} else if (s.starType == "explosion") {
_local5 = _local6;
_local6 = 0;
_local5 = Math.round((_local5 * Number(_root.exploDamage)) / 100);
} else if (s.starType == "control") {
_local6 = 0;
_local5 = 0;
_root.newFX("mindcontrol_explosion", s.myTarget, random(360));
if ((((_root.pets.length < _root.maxSummons) && (s.myTarget.level < _root.level)) && (!((s.myTarget.skill == "Capture") && (s.myTarget.skillTimer > 0)))) && (_root.successRate(_root.reduceByLevelGap(Number(_root.controlSuccess), s.myTarget.level)))) {
_root.turnToPet(s.myTarget, _root.reduceByLevelGap(Number(_root.controlTime), s.myTarget.level));
}
} else if (s.starType == "capture") {
_local6 = 0;
_local5 = 0;
_root.newFX("capture_explosion", s.myTarget, random(360));
if ((s.myTarget.level < _root.level) && (!s.myTarget.isNPC)) {
if (s.myTarget.skillTimer > 0) {
_root.applyEnemySkill(s.myTarget, "remove");
}
s.myTarget.skill = "Capture";
_root.applyEnemySkill(s.myTarget, "add");
}
}
var _local20 = 1;
if (s.myParent == true) {
_local20 = _root.injuries;
}
var _local3 = Math.ceil(Math.round((_local6 * _local17) + (_local5 * _local9)) * _local20);
var _local15 = false;
var _local18 = 0;
if (s.myParent == true) {
_local18 = _root.critChance;
}
if (_root.successRate(_local18)) {
_local3 = Math.round(_local3 * 1.5);
_local15 = true;
}
if (s.starType == "explosion") {
_root.bombIt(s.myTarget._x, s.myTarget._y, mySize, [s.myTarget], _local3);
}
if (_local4 && (_local3 > (_root.health / 10))) {
if (!_root.jumping) {
_root.ground = (_root.jY = s.myTarget._y);
_root.jumping = true;
}
_root.jump = 6;
_root.dashX = 5;
if (s._x > s.myTarget._x) {
_root.dashX = _root.dashX * -1;
}
} else if (((!_local4) && (_local3 > (s.myTarget.health / 10))) && (enemy.stoppedAttacks < 2)) {
eGoto(s.myTarget, monster_hit);
if (s.myParent != true) {
s.myTarget.dashX = 5;
if (s._x > s.myTarget._x) {
s.myTarget.dashX = s.myTarget.dashX * -1;
}
}
}
if (_local4) {
_root.health = _root.health - _local3;
_root.damageCounter = 0;
} else {
if (((s.myParent != true) && (s.myParent._x != undefined)) || (s.myParent == true)) {
if (s.starType != "control") {
s.myTarget.targeted = s.myParent;
}
}
s.myTarget.health = s.myTarget.health - _local3;
if (s.myTarget.isPet) {
s.myTarget.damageCounter = 0;
}
}
var _local21 = false;
var _local16 = getCharMc()._xscale;
var _local12 = s.myTarget._xscale;
if (s.myTarget.isNPC) {
_local12 = enemyMc._xscale * -1;
}
if ((!s.myTarget.isStatic) && (((_local16 > 0) && (_local12 < 0)) || ((_local16 < 0) && (_local12 > 0)))) {
_local3 = Math.round((_local3 * Number(backDamage)) / 100);
_local21 = true;
}
_root.playSound("shurikenHit", s.myTarget);
popHealthBar(s.myTarget);
_root.damaged(s.myTarget._x, (damageY + "/") + s.myTarget._y, _local3, "T", _local4, _local15, _local21);
} else {
var _local22 = 0;
if (_local4) {
_local22 = 1;
}
_root.newDigits(s.myTarget._x, damageY, -1, _local22, false, false);
}
_root.removeStar(s);
} else if (((s.starType == "summon") && (Math.abs(s._x - s.summonX) <= 1)) && (Math.abs(s._y - s.summonY) <= 1)) {
_root.useSkill(s.summonSkill, {x:s._x, y:s._y});
_root.removeStar(s);
} else if (s.slowMotion >= _root.slowMotion) {
var _local8;
var _local7;
if (s.starType == "summon") {
_local8 = s.summonX;
_local7 = s.summonY;
} else {
_local8 = s.myTarget._x;
_local7 = s.myTarget._y;
}
if (s.loadTimer == 0) {
if (_local8 > s._x) {
s._x = s._x + ((Math.abs(_local8 - s._x) / s.speed) * (_root.slowMotion + 1));
}
if (_local8 < s._x) {
s._x = s._x - ((Math.abs(_local8 - s._x) / s.speed) * (_root.slowMotion + 1));
}
if (_local7 > s._y) {
s._y = s._y + ((Math.abs(_local7 - s._y) / s.speed) * (_root.slowMotion + 1));
}
if (_local7 < s._y) {
s._y = s._y - ((Math.abs(_local7 - s._y) / s.speed) * (_root.slowMotion + 1));
}
if (s.speed > 1) {
s.speed--;
}
}
var _local25 = Math.atan2(_local7 - s._y, _local8 - s._x);
var _local26 = 57.2957795130823 * _local25;
s._rotation = _local26;
if (s._xscale < 0) {
s._rotation = s._rotation - 180;
}
s.slowMotion = 0;
} else {
s.slowMotion++;
}
} else if ((s._x > (_root.blockLimit._x + s._width)) || (s._x < (field.limitStart._x - s._width))) {
_root.removeStar(s);
} else if (s.slowMotion >= _root.slowMotion) {
if (s.myTarget._x == undefined) {
s.myTarget = s.sideRight;
}
if (s.myTarget == true) {
s._x = s._x + (((20 - s.speed) * 2) * (_root.slowMotion + 1));
} else {
s._x = s._x - (((20 - s.speed) * 2) * (_root.slowMotion + 1));
}
s.slowMotion = 0;
} else {
s.slowMotion++;
}
if (s.loadTimer > 0) {
s.loadTimer--;
}
}
}
function checkClosest(isObject) {
var _local11 = 99999999999999;
var _local10 = 99999999999999;
var _local14;
var _local13;
var _local16;
if (jumping) {
_local16 = ground;
} else {
_local16 = field.character._y;
}
var _local18 = getCharMc();
var _local8 = _local18._xscale > 0;
var _local17 = _local18.body.getBounds(field);
var _local9;
if (isObject == true) {
_local17 = object.getBounds(field);
}
if (_local8) {
_local9 = _local17.xMax;
} else {
_local9 = _local17.xMin;
}
var _local15 = starDistance;
if (isObject == true) {
if (object.weight > 0) {
_local15 = _local15 + (_root.str * 2);
}
if (object.req_wis > 0) {
_local15 = _local15 + (_root.wis * 2);
}
}
var _local5 = 0;
while (_local5 < enemies.length) {
var _local2 = enemies[_local5];
var _local12 = getTargetY(field.character, _local2);
var _local7 = _local2.mc;
if (_local2.isNPC) {
_local7 = getCharMc(_local2);
}
var _local6 = _local7.getBounds(field);
var _local4;
if (!_local8) {
_local4 = _local6.xMax;
} else {
_local4 = _local6.xMin;
}
var _local3 = Math.abs(_local4 - _local9);
if (((((((_local4 > _local9) && (_local8)) || ((_local4 < _local9) && (!_local8))) && (Math.abs(_local16 - _local12) <= maxY)) && (_local2.health > 0)) && (_local2._alpha == 100)) && (_local3 <= _local15)) {
if (_local3 < _local11) {
_local10 = _local11;
_local13 = _local14;
_local11 = _local3;
_local14 = _local2;
} else if (_local3 < _local10) {
_local10 = _local3;
_local13 = _local2;
}
}
_local5++;
}
if (_local14 != undefined) {
if ((!jumping) || (_local13 == undefined)) {
return(_local14);
}
return(_local13);
}
return(_local8);
}
function damaged(X, Y, num, dType, enemyDigits, crit, bs) {
if (num != 0) {
var _local3;
switch (dType) {
case "T" :
_local3 = "damage_explosion";
break;
case "C" :
_local3 = "scratch";
break;
case "R" :
_local3 = "crush_hit";
}
var _local2 = String(Y).split("/");
if (_local2.length == 1) {
_local2[1] = _local2[0];
}
var _local4 = getCharMc()._yscale;
_root.newFX(_local3, X, Number(_local2[1]), _local4, random(360));
if (bs == true) {
_root.newFX("blood_backstab", X, Number(_local2[1]), _local4, random(360));
}
var _local5;
if (!enemyDigits) {
_local5 = 0;
} else {
_local5 = 1;
}
newDigits(X, Number(_local2[0]), num, _local5, crit, bs);
}
}
function newDigits(X, Y, num, digitsType, critical, bs) {
var _local4;
switch (digitsType) {
case 0 :
_local4 = "dmg_digits";
break;
case 1 :
_local4 = "dmg_digitsB";
break;
case 2 :
_local4 = "recover_digits";
}
var _local1 = field.attachMovie(_local4, "digits" + objects.length, field.getNextHighestDepth());
_local1.miss._visible = false;
if (num == -1) {
dg = 0;
while (dg <= 5) {
_local1["digit" + dg]._visible = false;
dg++;
}
_local1.miss._visible = true;
_local1.star._visible = false;
_local1.crit._visible = false;
_local1.backstab._visible = false;
} else {
var _local2 = String(num).split("");
var dg = 0;
while (dg < _local2.length) {
var _local3 = Number(_local2[dg]);
_local1["digit" + (dg + 1)].gotoAndStop(_local3 + 2);
dg++;
}
dg = _local2.length + 1;
while (dg <= 5) {
_local1["digit" + dg]._visible = false;
dg++;
}
_local1.crit._visible = critical;
_local1.backstab._visible = bs;
if (critical && (bs)) {
_local1.crit._y = -46.5;
}
}
_local1._x = X;
_local1._y = Y;
setFilters(_local1);
objects.push(_local1);
}
function bombIt(X, Y, bSize, chainArray, myDamage) {
var _local2 = _root.newFX("smoke", X, Y, bSize, random(360));
_local2.myDmg = myDamage;
_local2.chainArray = chainArray;
combos++;
playSound("explosion", _local2);
}
function chainIt(X, Y, bSize, chainArray, myDamage, isFirstChain) {
var _local2 = _root.newFX("chain_lightning", X, Y, bSize, random(360));
_local2.myDmg = myDamage;
_local2.chainArray = chainArray;
if (isFirstChain != true) {
combos++;
playSound("explosion", _local2);
} else {
_local2.gotoAndStop(8);
}
}
function newFX(fxName, X, Y, mySize, rot, follow, dontPushToArray) {
if (X._x != undefined) {
follow = mySize;
mySize = Math.round((X._height + X._width) / 2);
rot = Y;
Y = X._y;
X = X._x;
}
var _local1 = field.attachMovie(fxName, fxName + objects.length, field.getNextHighestDepth());
_local1._x = X;
_local1._y = Y;
_local1._xscale = (_local1._yscale = mySize);
if (rot != undefined) {
_local1._rotation = rot;
}
_local1.follow = follow;
setFilters(_local1);
if (dontPushToArray != true) {
objects.push(_local1);
}
return(_local1);
}
function newBloodPuddle(X, Y, bSize) {
var _local1 = field.fieldFloor.attachMovie("blood_puddle", "blood_puddle" + objects.length, field.fieldFloor.getNextHighestDepth());
_local1._x = X;
_local1._y = Y;
_local1._xscale = (_local1._yscale = bSize);
_local1._xscale = (_local1._xscale / 2) + random(_local1._xscale / 2);
_local1.filters = null;
setFilters(_local1);
objects.push(_local1);
}
function loseBlood() {
var _local1 = field.attachMovie("injuryBlood", "injuryBlood" + objects.length, field.getNextHighestDepth());
if (field._character._xscale > 0) {
_local1._x = field.character._x - random(half_character_body / 2);
} else {
_local1._x = field.character._x + random(half_character_body / 2);
}
_local1._y = getCharBottom() - random(getCharTop() - getCharBottom());
_local1._width = _local1._width + random(100 - Math.round(injuries * 100));
_local1._xscale = (_local1._yscale = getCharMc()._yscale);
_local1._rotation = random(360);
_local1.filters = null;
setFilters(_local1);
objects.push(_local1);
newBloodPuddle(field.fieldFloor.character_shadow._x, getCharBottom(), _local1._xscale);
}
function puFX(myEnemy, addType) {
var _local1 = field.attachMovie("powerup_" + addType, "skillApply" + objects.length, field.getNextHighestDepth());
_local1._x = myEnemy._x;
_local1._y = myEnemy._y;
_local1._xscale = (_local1._yscale = myEnemy._xscale);
reColor(_local1, getEnemySkillColor(myEnemy, true));
setFilters(_local1);
objects.push(_local1);
}
function mapX(X) {
return(((X / (field.limitEnd._x - field.limitStart._x)) * 500) + 100);
}
function blurSpeed(obj) {
var _local4 = obj.prevX;
var _local3 = obj.prevY;
bX = Math.abs(_local4 - obj._x);
bY = Math.abs(_local3 - obj._y);
bSlow = 4;
var _local2 = new flash.filters.BlurFilter(bX / bSlow, bY / bSlow, maxFilter);
if (maxFilter == 0) {
obj.filters = null;
} else {
obj.filters = [_local2];
}
}
function blurCharacter() {
var _local2 = field.character.prevX;
var _local1 = field.character.prevY;
bX = Math.abs(_local2 - field.character._x);
bY = Math.abs(_local1 - field.character._y);
bSlow = pc(4);
blur = new flash.filters.BlurFilter(bX / bSlow, bY / bSlow, maxFilter);
field.character.prevX = field.character._x;
field.character.prevY = field.character._y;
}
function blurField() {
var _local2 = field.prevX;
var _local1 = field.prevY;
bX = Math.abs(_local2 - field._x);
bY = Math.abs(_local1 - field._y);
bSlow = 4;
if (screenBlurring == 1) {
fieldBlur = new flash.filters.BlurFilter(bX / bSlow, bY / bSlow, maxFilter);
} else {
fieldBlur = null;
}
field.prevX = field._x;
field.prevY = field._y;
}
function getAverage(myArray) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < myArray.length) {
_local3 = _local3 + myArray[_local1];
_local1++;
}
return(Math.round(_local3 / myArray.length));
}
function pressureCrush() {
var _local4 = 0;
var _local6 = false;
var _local5 = new Array();
if (jumping) {
myY = jY;
} else {
myY = field.character._y;
}
var _local2 = 0;
while (_local2 < enemies.length) {
enemy = enemies[_local2];
if ((enemy.hitTest(camera) && (enemy._alpha == 100)) && (enemy.linkage != "block")) {
_local6 = true;
if (_root.attemptHit(_root.accuracy + _root.accuracyBonus, enemy.avoidability)) {
var _local3 = _root.getCurrentWeapon();
dmg = damage;
if (_local3 != "Claw") {
if (_local3 == "Staff") {
dmg = dmg + Math.floor(_root.wis / 5);
} else {
dmg = dmg + Math.floor(_root.str / 5);
}
} else {
dmg = dmg + Math.floor(_root.luk / 5);
}
dmg = random(Math.round((dmg * Number(pressureCrush_damage)) / 100)) + 1;
critical = false;
if (_root.successRate(_root.critChance)) {
dmg = dmg * 1.5;
dmg = Math.round(dmg);
critical = true;
}
finalDmg = Math.ceil(Math.round((dmg * (100 - enemy.defense)) / 100) * injuries);
if ((finalDmg > (enemy.health / 10)) && (enemy.stoppedAttacks < 2)) {
eGoto(enemy, monster_hit);
}
enemy.targeted = true;
enemy.health = enemy.health - finalDmg;
_local5.push(finalDmg);
if (critical) {
_root.playSound("hardpunch" + (random(3) + 1), enemy);
} else {
_root.playSound("punch" + (random(4) + 1), enemy);
}
_root.damaged(enemy._x, enemy._y, finalDmg, "R", false, critical);
} else {
_root.newDigits(enemy._x, enemy._y, -1, 0, false);
}
_local4++;
if (_local4 >= Number(pressureCrush_multi)) {
break;
}
}
_local2++;
}
if (_local6) {
mana = mana - skillConsume(24);
health = health - Math.round((Number(pressureCrush_health) * maxHealth) / 100);
_root.shakeScreen(5, Math.round(getAverage(_local5) / 10));
}
}
function getEnemyWithinCam(invalidArray) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < enemies.length) {
var _local1 = enemies[_local2];
if (((_local1.hitTest(camera) && (_local1._alpha == 100)) && (_local1.linkage != "block")) && (!appearInArray(_local1, invalidArray))) {
_local3.push(_local1);
}
_local2++;
}
return(getClosestEnemy(field.character, _local3));
}
function getCharGroundWithDif(divideDif, mc) {
if (divideDif == undefined) {
divideDif = 1;
}
if (mc == undefined) {
mc = field.character;
}
var _local4 = Math.round(Math.abs(mc._y - getCharBottom(mc)) / divideDif);
var _local2;
if (jumping && (mc == field.character)) {
_local2 = jY;
} else {
_local2 = mc._y;
}
_local2 = _local2 + _local4;
return(_local2);
}
function attemptHit(myAccuracy, myAvoidability) {
var _local1 = Math.round((myAccuracy / (myAvoidability * 4)) * 100);
if ((_local1 > 100) || (myAvoidability == 0)) {
_local1 = 100;
}
if (myAccuracy <= 0) {
_local1 = 0;
}
return(successRate(_local1));
}
function removeFromArray(myObject, myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (myArray[_local1] == myObject) {
myArray.splice(_local1, 1);
break;
}
_local1++;
}
}
function checkHit(enemyHit, myHitCounter, myWithinRange, theAttackType) {
var _local12 = 0;
var _local13 = false;
if (myHitCounter != undefined) {
_local12 = myHitCounter;
}
var _local11;
var _local2;
var _local7 = getCharMc()._xscale > 0;
var _local18 = field.character.atk.body.getBounds(field);
var _local9;
if (_local7) {
_local9 = _local18.xMax;
} else {
_local9 = _local18.xMin;
}
if (jumping) {
_local11 = ground;
} else {
_local11 = field.character._y;
}
if (enemyHit == undefined) {
var _local10 = new Array();
if (myWithinRange == undefined) {
var _local5 = 0;
while (_local5 < enemies.length) {
_local2 = enemies[_local5];
var _local3 = _local2.mc;
if (_local2.isNPC) {
_local3 = getCharMc(_local2);
}
var _local6 = _local3.getBounds(field);
var _local4;
if (_local7) {
_local4 = _local6.xMax;
} else {
_local4 = _local6.xMin;
}
var _local8 = getTargetY(field.character, _local2);
if (((_local3.hitTest(field.character.atk.slash) && (Math.abs(_local11 - _local8) < maxCloseY)) && ((_local7 && (_local4 > _local9)) || ((!_local7) && (_local4 < _local9)))) && (_local2._alpha == 100)) {
_local10.push(_local2);
}
_local5++;
}
} else {
_local10 = myWithinRange;
}
_local2 = getClosestEnemy(field.character, _local10);
} else {
_local2 = enemyHit;
}
if (_local2 != undefined) {
_local13 = true;
var _local16 = _local2._y;
if (quickAttacks > -1) {
_local16 = _local16 - ((maxQuickAttacks - quickAttacks) * 15);
}
if (_root.attemptHit(_root.accuracy + _root.accuracyBonus, _local2.avoidability)) {
dmgBonus = damage + Math.floor(str / 5);
minDmg = weapon_minDamage + dmgBonus;
maxDmg = weapon_maxDamage + dmgBonus;
pDmg = getDamage(minDmg, maxDmg);
enemyDef = (100 - _local2.defense) / 100;
eDmg = 0;
enemyRes = 1;
if (attackType == "power") {
pDmg = Math.round((pDmg * Number(powerBlow_damage)) / 100);
} else if (attackType == "multi") {
pDmg = Math.round((pDmg * Number(multipleStrike_damage)) / 100);
} else if (attackType == "bloodshed") {
pDmg = Math.round((pDmg * Number(bloodshed_damage)) / 100);
} else if (quickAttacks > -1) {
pDmg = Math.round((pDmg * Number(windCut_damage)) / 100);
}
if (((element != "None") && (elementDuration > 0)) && (_root.successRate(_root.elementChance))) {
_local2.element = element;
enemyRes = (100 - _local2["resistance_" + element]) / 100;
_local2.elementTimer = Math.round((getElementBonus(elementDuration, element) * 24) * enemyRes);
dmgBonus = _root.elementDamage + _root.elementDamageBonus;
myDmg = _root.element_minDamage + dmgBonus;
myDmg2 = _root.element_maxDamage + dmgBonus;
eDmg = _root.getElementBonus(_root.getDamage(myDmg, myDmg2), _root.element);
}
finalDmg = Math.ceil(Math.round((pDmg * enemyDef) + (eDmg * enemyRes)) * injuries);
backstab = false;
var _local17 = getCharMc()._xscale;
var _local15 = _local2._xscale;
if (_local2.isNPC) {
_local15 = _local3._xscale * -1;
}
if ((!_local2.isStatic) && ((((_local17 > 0) && (_local15 < 0)) || ((_local17 < 0) && (_local15 > 0))) || ((enemyHit != undefined) && (successRate(Number(bloodshed_backChance)))))) {
finalDmg = Math.round((finalDmg * Number(backDamage)) / 100);
backstab = true;
}
critical = false;
if (_root.successRate(_root.critChance)) {
finalDmg = Math.round(finalDmg * 1.5);
critical = true;
}
if ((finalDmg > (_local2.health / 10)) && (_local2.stoppedAttacks < 2)) {
eGoto(_local2, monster_hit);
} else if (_local2.targeted == false) {
eGoto(_local2, monster_charge);
}
_local2.health = _local2.health - finalDmg;
if (critical) {
_root.playSound("hardpunch" + (random(3) + 1), _local2);
} else {
_root.playSound("punch" + (random(4) + 1), _local2);
}
popHealthBar(_local2);
_root.damaged(_local2._x, (_local16 + "/") + _local2._y, finalDmg, "C", false, critical, backstab);
} else {
_root.newDigits(_local2._x, _local16, -1, 0, false);
}
_local2.targeted = true;
}
var _local14 = attackType;
if (theAttackType != undefined) {
_local14 = theAttackType;
}
if (_local13) {
if (attackType == "power") {
skillConsume(23);
} else if (attackType == "multi") {
skillConsume(4);
} else if (attackType == "bloodshed") {
if (!skillConsume(32, Number(bloodshed_max))) {
endBloodshed();
}
}
}
if (quickAttacks > 0) {
if (_local13) {
if (_local13) {
if (!skillConsume(29, Number(maxQuickAttacks))) {
quickAttacks = -1;
attackType = "";
}
}
quickAttacks--;
slash(true);
} else {
quickAttacks = -1;
attackType = "";
}
} else if (quickAttacks == 0) {
quickAttacks = -1;
attackType = "";
} else if (attackType != "bloodshed") {
attackType = "";
}
if (((_local12 < maxHit) && (_local14 == "multi")) && (_local10.length > 0)) {
removeFromArray(_local2, _local10);
_local12++;
checkHit(undefined, _local12, _local10, _local14);
}
}
function slash(isQuick, myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local4;
var _local5 = myMc._currentframe;
var _local3 = atkFrame;
if (myMc != field.character) {
_local3 = getNpcAtkFrame(myMc);
}
myMc.gotoAndStop(_local3);
myMc.atk.stop();
updateCharacterEquips();
cf = myMc.atk._currentframe;
cMC = myMc.atk;
_local4 = new Array(1, 55, 114);
hitsArray = new Array(15, 73, 133);
var _local2 = false;
if (isQuick == true) {
cMC.gotoAndStop(getRandomSlot(hitsArray, myMc));
_local2 = true;
} else if ((((cf > 36) && (cf < 54)) || ((cf > 94) && (cf < 113))) || ((cf > 154) && (cf < 174))) {
cMC.gotoAndStop(getRandomSlot(_local4, myMc));
_local2 = true;
}
if (_local5 != _local3) {
cMC.gotoAndStop(getRandomSlot(_local4, myMc));
_local2 = true;
}
if (_local2) {
applySkillEffect(cMC);
}
return(_local2);
}
function getRandomSlot(myArray, mc) {
return(myArray[random(myArray.length)]);
}
function applySkillEffect(mc) {
with (mc) {
multiAttack._visible = (attackType == "multi") && (_parent == field.character);
powerBlow._visible = (attackType == "power") && (_parent == field.character);
if (multiAttack._visible) {
multiAttack.gotoAndPlay(1);
}
if (powerBlow._visible) {
powerBlow.gotoAndPlay(1);
}
}
}
function panicChance(mLevel) {
if ((level + random(level + 1)) > mLevel) {
return(true);
}
return(false);
}
function activeShake() {
field._x = fieldX;
field._y = fieldY;
back._x = backX;
back._y = backY;
middle._x = middleX;
middle._y = middleY;
if (shakeTimer > 0) {
shakeTimer--;
randomX = random(shakePower);
randomY = random(shakePower);
if (random(7) > 2) {
field._x = field._x + randomX;
back._x = back._x + randomX;
middle._x = middle._x + randomX;
} else {
field._x = field._x - randomX;
back._x = back._x - randomX;
middle._x = middle._x - randomX;
}
if (random(7) > 2) {
field._y = field._y + randomY;
back._y = back._y + randomY;
middle._y = middle._y + randomY;
} else {
field._y = field._y - randomY;
back._y = back._y - randomY;
middle._y = middle._y - randomY;
}
}
}
function shakeScreen(s1, s2) {
if (screenShaking == 1) {
shakeTimer = s1;
shakePower = s2;
}
}
function panicSearch() {
sTimer = 0;
sPower = 0;
p = 0;
while (p < enemies.length) {
enemy = enemies[p];
if ((((sideRight && (enemy._x > field.character._x)) && (enemy._x < (field.character._x + Number(panic_vision)))) && (enemy.targeted)) || ((((!sideRight) && (enemy._x < field.character._x)) && (enemy._x > (field.character._x - panic_vision))) && (enemy.targeted))) {
panic = true;
enemy.panic = true;
sTimer = sTimer + (enemy.level * 2);
sPower = sPower + enemy.level;
enemy.myPanic = _root.newFX("panic_circle", enemy, undefined, enemy);
}
p++;
}
if (level >= sPower) {
skillConsume(5);
} else {
mana = mana - skillConsume(5, 1 / (sPower - level));
}
shakeScreen(sTimer, sPower);
}
function goUnderGround(myAction, moveSide) {
if (underground || (myAction != "move")) {
var _local2 = field.character._x;
var _local1 = getCharGroundWithDif() - 25;
if (myAction == "dig") {
if ((ground_counter == ground_timer) || (!underground)) {
myGround = field.fieldFloor.createEmptyMovieClip("ground" + grounds.length, field.fieldFloor.getNextHighestDepth());
myGround.lineStyle(1, 0);
myGround.moveTo(_local2, _local1);
lastX = _local2;
lastY = _local1;
myGround.filters = null;
setFilters(myGround);
grounds.push(myGround);
ground_counter = 0;
} else {
ground_counter++;
}
underground = true;
} else if ((myAction == "move") && (!((_local2 == lastX) && (_local1 == lastY)))) {
groundFlow(_local2, _local1, underground_strength);
shakeScreen(10, underground_strength);
difX = Math.abs(lastX - _local2);
difY = Math.abs(lastY - _local1);
myRnd = random(difX);
myRnd2 = random(difY);
if (random(2) == 1) {
myRnd = myRnd * -1;
myRnd2 = myRnd2 * -1;
}
lastX = _local2;
lastY = _local1;
if (moveSide == "hr") {
myGround.lineTo(_local2 - difX, _local1 + myRnd);
myGround.lineTo(_local2 - (difX / 2), _local1 - myRnd);
myGround.lineTo(_local2, _local1);
} else if (moveSide == "hl") {
myGround.lineTo(_local2 + difX, _local1 + myRnd);
myGround.lineTo(_local2 + (difX / 2), _local1 - myRnd);
myGround.lineTo(_local2, _local1);
} else if (moveSide == "vu") {
myGround.lineTo(_local2 - myRnd2, _local1 - difY);
myGround.lineTo(_local2 + myRnd2, _local1 - (difY / 2));
myGround.lineTo(_local2, _local1);
} else if (moveSide == "vd") {
myGround.lineTo(_local2 - myRnd2, _local1 + difY);
myGround.lineTo(_local2 + myRnd2, _local1 + (difY / 2));
myGround.lineTo(_local2, _local1);
}
} else if (myAction == "surface") {
groundHole(_local2, _local1);
gh = 0;
while (gh < 10) {
groundFlow(_local2, _local1, underground_strength);
gh++;
}
}
}
}
function groundFlow(X, Y, Scale) {
myX = random(10);
if (random(2) == 1) {
myX = myX * -1;
}
var _local2 = _root.newFX("ground_flow", X + myX, Y, 100 + (Scale * 10));
_local2.myType = random(7) + 1;
}
function groundHole(X, Y) {
myHole = field.fieldFloor.attachMovie("ground_hole", "ground_hole" + objects.length, field.fieldFloor.getNextHighestDepth());
myHole._x = X;
myHole._y = Y;
myHole._rotation = random(360);
myHole._xscale = (myHole._yscale = 100 + (Scale * 10));
myHole.myType = random(4) + 1;
objects.push(myHole);
}
function skillConsume(skill, divide) {
if (divide == undefined) {
divide = 1;
}
var _local2 = Math.round(skillManaConsume(skill) / divide);
var _local3 = Math.round(skillSacrificesConsume(skill) / divide);
if (((mana - _local2) >= 0) && ((sacrifices - _local3) >= 0)) {
mana = mana - _local2;
sacrifices = sacrifices - _local3;
cooldown[skill] = cooldown[skill] + Math.round(skillCooldown(skill) / divide);
return(true);
}
return(false);
}
function skillReady(skill) {
return(((skillWeaponValid(skill) && ((mana - skillManaConsume(skill)) >= 0)) && ((sacrifices - skillSacrificesConsume(skill)) >= 0)) && (cooldown[skill] == 0));
}
function getSkillError(skill) {
if (!skillWeaponValid(skill)) {
return(("Equipped " + skillData[skill][1].split(", ").join("/")) + " Required");
}
if (cooldown[skill] != 0) {
return("Skill still in Cooldown, Cooldown Left: " + getTimeString(cooldown[skill]));
}
if ((mana - skillManaConsume(skill)) < 0) {
return(("Not enough Mana (" + Math.abs(mana - skillManaConsume(skill))) + " more needed)");
}
if ((sacrifices - skillSacrificesConsume(skill)) < 0) {
return(("Not enough Sacrifices (" + Math.abs(sacrifices - skillSacrificesConsume(skill))) + " more needed)");
}
}
function convertToNumbers(myArray, startIndex, endIndex) {
if (startIndex == undefined) {
startIndex = 0;
}
if (endIndex == undefined) {
endIndex = myArray.length - 1;
}
var _local1 = startIndex;
while (_local1 <= endIndex) {
myArray[_local1] = Number(myArray[_local1]);
_local1++;
}
}
function getTranData(myName) {
return([myName].concat(convertDefaultDNA(getTranDNA(myName))));
}
function getTranDNA(myName) {
switch (myName) {
case "Battle Bear" :
return(["*", "*", "*", "*", "*", "*", "4", "4", "4", "FF0000", "FBF3EA", "FF0000"]);
case "Sneak" :
return(["*", "*", "*", "*", "*", "*", "*", "*", "*", "000000", "000000", "000000"]);
}
}
function convertDefaultDNA(myArray) {
var _local3 = charData.slice(2, charData.length - 1);
var _local1 = 0;
while (_local1 < myArray.length) {
if (myArray[_local1] == "*") {
myArray[_local1] = _local3[_local1];
}
_local1++;
}
return(myArray);
}
function pushToSlot(val, myArray, slotNum) {
return(myArray.slice(0, slotNum).concat([val]).concat(myArray.slice(slotNum, myArray.length)));
}
function useSkill(skill, summonPoint) {
var _local12 = getCurrentWeapon();
var _local4 = Number(skillData[skill][0].split(", ")[2]);
if ((quickAttacks != -1) && (field.character._currentframe < 5)) {
quickAttacks = -1;
}
if (((!object) && (skill != -1)) && (skillReady(skill))) {
var _local3;
if (_local4 == 4) {
if (pets.length < maxSummons) {
_local3 = getSkillInfoArray(skill);
convertToNumbers(_local3);
nowSummoning = monsterData[_local3[0]][0].split(", ")[0];
summon_health = _local3[1];
summon_mana = _local3[2];
summon_damage = _local3[3];
summon_elementDamage = _local3[4];
summon_accuracy = _local3[5];
summon_avoidability = _local3[6];
summon_defense = _local3[7];
summon_fRes = _local3[8];
summon_iRes = _local3[9];
summon_lRes = _local3[10];
var _local9 = Number(monsterData[_local3[0]][0].split(", ")[4]);
if ((_local9 == 0) || (((_local9 == 1) ? "day" : "night") == dayTime)) {
if (summonPoint != undefined) {
summonMonster((((nowSummoning + "@") + summonPoint.x) + "@") + summonPoint.y, 0, true);
skillConsume(skill);
} else if (field.character._currentframe < 4) {
_root.throwType = "summon";
_root.summonType = skill;
slash();
}
} else {
newError(getMonsterDayTimeError(_local3[0]));
}
} else {
var _local6 = ("Can't Summon more than " + maxSummons) + " Monster";
if (maxSummons > 1) {
_local6 = _local6 + "s";
}
newError(_local6);
}
} else if ((_local4 == 2) || (_local4 == 3)) {
if (!((_local4 == 3) && (transformation))) {
_local3 = getSkillInfoArray(skill);
var _local5 = 1;
var _local8 = 0;
if (_local4 == 3) {
_local5 = 3;
_local8 = 1;
_root.tranData = pushToSlot(Math.round((Number(_local3[1]) * basicCharacterScale) / 100), getTranData(_local3[0]), 1);
_root.transformation = true;
}
var _local7 = skillData[skill][0].split(", ");
var _local10 = [[_local7[0], "use", _local7[1], 1].join(", "), [0, 0, 0, _local3[_local5 - 1], _local8].join(", "), _local3.slice(_local5, _local3.length).join(", ")];
usePotion(_local10);
skillConsume(skill);
if (skill == 28) {
_root.newFX("hyperbody_fx", field.character, undefined, field.character);
}
} else {
newError("Cannot transform when not in original state");
}
}
if (skill == 1) {
throwType = "double";
slash();
} else if (skill == 2) {
throwType = "explosion";
slash();
} else if (skill == 22) {
throwType = "control";
slash();
} else if (skill == 27) {
throwType = "capture";
slash();
} else if (skill == 5) {
if ((!panic) && (panicReleased)) {
if (panic_timer == 1) {
panicSearch();
panic_timer = 0;
} else {
panic_timer = 1;
}
panicReleased = false;
}
} else if (skill == 3) {
if (quickAttacks == -1) {
throwType = "";
attackType = "";
slash();
}
} else if (skill == 4) {
if (quickAttacks == -1) {
attackType = "multi";
slash();
}
} else if (skill == 29) {
if ((quickAttacks == -1) && (field.character._currentframe < 4)) {
quickAttacks = Number(maxQuickAttacks);
attackType = "";
slash();
}
} else if (skill == 32) {
attackType = "bloodshed";
bloodshedArray = new Array();
bloodshedActive = true;
} else if (skill == 23) {
if (quickAttacks == -1) {
attackType = "power";
slash();
}
} else if (skill == 24) {
if (health > ((maxHealth * 30) / 100)) {
pressureCrush();
}
} else if (skill == 6) {
if ((((!jumping) && (!object)) && (slowMotion == 0)) && (field.character._currentframe == 1)) {
if (!underground) {
goUnderGround("surface");
}
goUnderGround("dig");
}
} else if (skill == 7) {
if ((!dashing) && dashReleased) {
dashing = true;
dashReleased = false;
}
} else if (skill == 25) {
if ((!combatDashing) && dashReleased) {
combatDashing = true;
dashReleased = false;
}
} else if (skill == 26) {
causeSideEffect();
} else if (skill == 8) {
_root.newObject("Fire Ball", _root.field.character._x, getObjectGround(), true);
_root.playSound("meteor");
skillConsume(skill);
} else if (skill == 11) {
_root.newObject("Ice Ball", _root.field.character._x, getObjectGround(), true);
skillConsume(skill);
} else if (skill == 12) {
_root.newObject("Lightning Ball", _root.field.character._x, getObjectGround(), true);
skillConsume(skill);
} else if (skill == 13) {
_root.newObject("Fire Ball", _root.field.character._x + (_root.field.character._xscale / 3), _root.field.character._y + 10, false, 0, 0, 0, 0, "None", true);
setTimeout(throwBallObject, 1);
_root.playSound("meteor");
skillConsume(skill);
} else if (skill == 14) {
_root.newObject("Ice Ball", _root.field.character._x + (_root.field.character._xscale / 3), _root.field.character._y + 10, false, 0, 0, 0, 0, "None", true);
setTimeout(throwBallObject, 1);
skillConsume(skill);
} else if (skill == 15) {
_root.newObject("Lightning Ball", _root.field.character._x + (_root.field.character._xscale / 3), _root.field.character._y + 10, false, 0, 0, 0, 0, "None", true);
setTimeout(throwBallObject, 1);
skillConsume(skill);
} else if (skill == 18) {
throwType = "cl";
slash();
}
} else if ((skill != -1) && (!object)) {
newError(getSkillError(skill));
}
}
function attachElement(mc) {
if (mc.element == "Lightning") {
el = field.attachMovie("element_electric", "element" + objects.length, field.getNextHighestDepth());
} else {
el = field.attachMovie("element", "element" + objects.length, field.getNextHighestDepth());
}
el._x = (mc._x - (mc._width / 2)) + random(mc._width);
el._y = mc._y;
el._xscale = mc._xscale;
el._yscale = mc._yscale;
if (mc.element == "Lightning") {
el._rotation = random(360);
el._y = el._y + (mc._height / 2);
}
if (mc.element == "Fire") {
myRnd = random(8);
if (mc == field.character) {
switch (myRnd) {
case 1 :
reColor(el, "FF0000");
_root.health--;
break;
case 2 :
reColor(el, "FFFF00");
break;
case 3 :
reColor(el, "000000");
break;
case 4 :
reColor(el, "FFFFFF");
break;
case 5 :
reColor(el, "FFFF66");
break;
case 6 :
reColor(el, "FF9900");
_root.health--;
break;
default :
reColor(el, "FFFF00");
}
} else {
switch (myRnd) {
case 1 :
reColor(el, "FF0000");
mc.health--;
popHealthBar(mc);
break;
case 2 :
reColor(el, "FFFF00");
break;
case 3 :
reColor(el, "000000");
break;
case 4 :
reColor(el, "FFFFFF");
break;
case 5 :
reColor(el, "FFFF66");
break;
case 6 :
reColor(el, "FF9900");
mc.health--;
popHealthBar(mc);
break;
default :
reColor(el, "FFFF00");
}
}
reColor(mc, "FF0000", mc.elementTimer / 2);
} else if (mc.element == "Ice") {
myRnd = random(8);
switch (myRnd) {
case 1 :
reColor(el, "0099FF");
break;
case 2 :
reColor(el, "0033FF");
break;
case 3 :
reColor(el, "00FFFF");
break;
case 4 :
reColor(el, "FFFFFF");
break;
case 5 :
reColor(el, "0000FF");
break;
case 6 :
reColor(el, "33FFCC");
break;
default :
reColor(el, "FFFFFF");
}
reColor(mc, "0033FF", mc.elementTimer / 2);
} else if (mc.element == "Lightning") {
myRnd = random(8);
switch (myRnd) {
case 1 :
reColor(el, "FFFFFF");
break;
case 2 :
reColor(el, "CCCCCC");
break;
case 3 :
reColor(el, "999999");
break;
case 4 :
reColor(el, "FFFFFF");
break;
case 5 :
reColor(el, "000000");
break;
case 6 :
reColor(el, "FFFFFF");
break;
default :
reColor(el, "FFFFFF");
}
reColor(mc, "FFFFFF", mc.elementTimer / 2);
}
objects.push(el);
}
function commandOf(skillNum) {
var _local1 = 0;
while (_local1 < 8) {
var _local2 = skill[_local1];
if (skillNum == _local2) {
if ((_local1 == 0) || (_local1 == 4)) {
return(command[5]);
}
if ((_local1 == 1) || (_local1 == 5)) {
return(command[6]);
}
if ((_local1 == 2) || (_local1 == 6)) {
return(command[7]);
}
if ((_local1 == 3) || (_local1 == 7)) {
return(command[8]);
}
}
_local1++;
}
if (skillNum == 10) {
return(command[5]);
}
if (skillNum == 9) {
return(command[6]);
}
}
function holdingOf(skillNum) {
var _local2 = -1;
var _local1 = 1;
while ((_local2 != undefined) && (_local2 != NaN)) {
_local2 = skill[_local1];
if (skillNum == _local2) {
return((_local1 % 2) != 0);
}
_local1++;
}
}
function keyName(n) {
switch (n) {
case 32 :
return("Space Bar");
case 39 :
return("Right Arrow");
case 37 :
return("Left Arrow");
case 40 :
return("Down Arrow");
case 38 :
return("Up Arrow");
case 17 :
return("Ctrl");
case 16 :
return("Shift");
case 13 :
return("Enter");
case 9 :
return("Tab");
case 8 :
return("Backspace");
case 20 :
return("Caps Lock");
case 27 :
return("Esc");
case 33 :
return("Page Up");
case 34 :
return("Page Down");
case 35 :
return("End");
case 36 :
return("Home");
case 45 :
return("Insert");
case 46 :
return("Delete");
case 144 :
return("Num Lock");
case 145 :
return("Scroll Lock");
case 19 :
return("Pause/Break");
case 96 :
return("Numpad 0");
case 97 :
return("Numpad 1");
case 98 :
return("Numpad 2");
case 99 :
return("Numpad 3");
case 100 :
return("Numpad 4");
case 101 :
return("Numpad 5");
case 102 :
return("Numpad 6");
case 103 :
return("Numpad 7");
case 104 :
return("Numpad 8");
case 105 :
return("Numpad 9");
case 106 :
return("Numpad *");
case 107 :
return("Numpad +");
case 109 :
return("Numpad -");
case 110 :
return("Numpad .");
case 111 :
return("Numpad /");
case 112 :
return("F1");
case 113 :
return("F2");
case 114 :
return("F3");
case 115 :
return("F4");
case 116 :
return("F5");
case 117 :
return("F6");
case 118 :
return("F7");
case 119 :
return("F8");
case 120 :
return("F9");
case 122 :
return("F11");
case 123 :
return("F12");
case 124 :
return("F13");
case 125 :
return("F14");
case 126 :
return("F15");
case 186 :
return(";");
case 187 :
return("=");
case 189 :
return("-");
case 191 :
return("/");
case 192 :
return("`");
case 219 :
return("[");
case 220 :
return("\\");
case 221 :
return("]");
case 222 :
return("'");
case 188 :
return(",");
case 190 :
return(".");
}
return(chr(n));
}
function undoMindControl() {
var _local1 = 0;
while (_local1 < pets.length) {
var _local2 = pets[_local1];
if (_local2.controlTimer > 0) {
switchType(_local2);
}
_local1++;
}
}
function clearStage(saveOnly) {
if (!firstLoad) {
if ((object != false) && (object != undefined)) {
backupObject = [object.objectNum, object.createdIn, object.createdOrder];
if (saveOnly != true) {
object.throwObject();
}
} else {
backupObject = false;
}
}
if (saveOnly != true) {
var _local1;
_local1 = enemies.length;
while (_local1 > -1) {
enemies[_local1].removeMovieClip();
_local1--;
}
_local1 = activeObjects.length;
while (_local1 > -1) {
activeObjects[_local1].myShadow.removeMovieClip();
activeObjects[_local1].removeMovieClip();
_local1--;
}
_local1 = invItems.length;
while (_local1 > -1) {
invItems[_local1].removeMovieClip();
_local1--;
}
_local1 = objects.length;
while (_local1 > -1) {
objects[_local1].removeMovieClip();
_local1--;
}
_local1 = chainGraphics.length;
while (_local1 > -1) {
chainGraphics[_local1].removeMovieClip();
_local1--;
}
_local1 = 0;
while (_local1 < grounds.length) {
grounds[_local1].removeMovieClip();
_local1++;
}
_local1 = npcs.length;
while (_local1 > -1) {
npcs[_local1].removeMovieClip();
_local1--;
}
}
if (!firstLoad) {
petNames = new Array();
var _local1 = 0;
while (_local1 < pets.length) {
var _local2 = pets[_local1];
petNames.push([findNum(_local2.myName, monsterData), _local2._x, _local2._y].concat(getMonsterVars(_local2)));
_local1++;
}
}
if (saveOnly != true) {
var _local1 = pets.length;
while (_local1 > -1) {
removePet(pets[_local1]);
_local1--;
}
}
if (saveOnly != true) {
clearing = true;
npcs = new Array();
enemies = new Array();
pets = new Array();
activeObjects = new Array();
invItems = new Array();
objects = new Array();
chainGraphics = new Array();
grounds = new Array();
objectsCounter = 0;
}
}
function moveMap(mapNum, mapX, mapY, initialMap) {
_root.playSound("portal");
if ((mapNum == currentStage) && (initialMap != true)) {
field.character._x = mapX - 6;
field.character._y = mapY - teleportGap;
ground = field.character._y;
} else {
if (firstLoad) {
if (tempLoadX != undefined) {
mapX = tempLoadX;
mapY = tempLoadY;
}
} else {
undoMindControl();
saveStage();
}
clearStage();
currentStage = mapNum;
myMapX = mapX;
myMapY = mapY;
moveMapTimer = 4;
}
}
function moveMap2() {
mapX = myMapX;
mapY = myMapY;
operateStage(activeStage[currentStage]);
updateTime();
buildStage();
cancelLimit();
reLocate = false;
back._x = back_startX;
backX = back._x;
field.character._x = mapX - 6;
field.character._y = mapY - teleportGap;
pet._x = field.character._x;
ground = field.character._y;
scrollX = fieldGlobal(field.character).x - _root._x;
camera2._x = scrollX;
if (camera2.hitTest(field.limitStart)) {
scrollX = (fieldGlobal(field.limitStart).x + (Stage.width / 2)) - _root._x;
} else if (camera2.hitTest(blockLimit)) {
scrollX = (fieldGlobal(blockLimit).x - (Stage.width / 2)) - _root._x;
}
camera._x = (camera2._x = scrollX);
buildObjects();
reduplicateNPCs(true);
layout.moveMap_fade.gotoAndPlay(1);
jumping = false;
callPets();
if ((backupObject != false) && (backupObject != undefined)) {
backupObject[0] = getName("object", Number(backupObject[0]));
object = newObject(backupObject, field.character._x, field.character._y);
pickObject(object);
}
backupObject = false;
shakeTimer = 5;
shakePower = 0;
if (firstPlay) {
defaultConfig(1, 1);
toggleUI("options_bg");
toggleUI("configure_graphics");
layout.configure_graphics.perf.text = "This is your first play, please configure your graphics:";
layout.configure_graphics.info_perf._visible = false;
layout.configure_graphics.firstPlayNote.text = "You can access your settings at any time through the Menu " + _root.getCommandName(10);
}
if (firstLoad) {
retrieveMochiItems();
firstLoad = false;
}
}
function appearNumInArray(myValue, myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (myValue == myArray[_local1]) {
return(_local1);
}
_local1++;
}
return(-1);
}
function getMonsterVars(e) {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < monsterSaveVars.length) {
_local2.push(e[monsterSaveVars[_local1]]);
_local1++;
}
return(_local2);
}
function setMonsterVars(e, values) {
var _local1 = 0;
while (_local1 < monsterSaveVars.length) {
e[monsterSaveVars[_local1]] = defineMonsterVar(values[_local1]);
_local1++;
}
}
function getMonsterVarIndex(myVar) {
var _local1 = 0;
while (_local1 < monsterSaveVars.length) {
if (monsterSaveVars[_local1] == myVar) {
return(_local1);
}
_local1++;
}
}
function getMonsterVar(myArray, myVar) {
return(defineMonsterVar(myArray[getMonsterVarIndex(myVar)]));
}
function defineMonsterVar(myVar) {
if (myVar == "true") {
return(true);
}
if (myVar == "false") {
return(false);
}
if (!isNaN(Number(myVar))) {
return(Number(myVar));
}
return(myVar);
}
function clearAnnouncments(questNum) {
for (var _local2 in announcments) {
if (announcments[_local2][0] == layout.announcment.txt.text) {
continue;
}
if (announcments[_local2][1] == questNum) {
announcments.splice(Number(_local2), 1);
}
}
}
function resetQuests() {
layout.quests._visible = false;
layout.quests_pop._visible = false;
layout.quests_choose._visible = false;
quests_pop.quest = -1;
}
function getEliminateStringPart(myString, partNum) {
if (partNum == undefined) {
partNum = 1;
}
var _local1 = myString.split(" ");
if (partNum == 1) {
return(_local1.slice(1, _local1.length).join(" "));
}
return(_local1.slice(0, 1));
}
function getEliminateString(myString) {
var _local1 = Number(String(getEliminateStringPart(myString, 2)));
var _local2 = getMonsterName(getEliminateStringPart(myString));
if ((!getMonsterName(getEliminateStringPart(myString), true)) && (_local1 == 1)) {
return(_local2);
}
return((_local1 + " ") + _local2);
}
function getWholeEliminateString(myString) {
var _local2 = myString.split(", ");
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(getEliminateString(_local2[_local1]));
_local1++;
}
return(_local3.join(", "));
}
function swapNpcValue(questNum) {
var _local3 = quest[questNum];
var _local1 = _local3[0].split(", ");
var _local4 = Number(_local1[1]);
var _local2 = Number(_local1[2]);
if (_local2 != -1) {
_local1[1] = _local2;
_local1[2] = _local4;
}
quest[questNum][0] = _local1.join(", ");
getQuestsAll();
}
function beginQuest(questNum) {
inProgress.push(questNum);
var _local5 = quest[questNum];
if (_local5[1] != "") {
var _local4 = _local5[1].split(", ");
var _local2 = 0;
while (_local2 < _local4.length) {
analyzeTask(_local4[_local2], questNum);
_local2++;
}
}
if (_local5[6] != "") {
questDrops.push(_local5[6]);
}
addEventToLog("quest_begin", questNum);
_root.playSound("quest_begin");
announcments.push(["Quest Began: " + _local5[0].split(", ")[0], questNum]);
tasksArr = questStatus(questNum, "tasks").split("|");
if (tasksArr[0] != "") {
announcments.push(["Eliminate " + getWholeEliminateString(tasksArr[0]), questNum]);
}
if (tasksArr[1] != "") {
announcments.push(["Collect " + tasksArr[1], questNum]);
}
beginTxt = analyzeVars(_local5[5].split(", ")[3]);
if (beginTxt != "") {
announcments.push([beginTxt, questNum]);
}
swapNpcValue(questNum);
executeNPCsChanges(_local5[7].split("@")[0].split(", "), questNum);
executeSpawns(_local5[8].split("@")[0].split(", "));
executeTime(_local5[9].split("@")[0].split(", "));
mochi.as2.MochiEvents.trackEvent("Quest Began", _local5[0].split(", ")[0]);
}
function executeSpawns(myList) {
if ((myList.length == 1) && (myList[0] == "")) {
return(undefined);
}
var _local1 = 0;
while (_local1 < myList.length) {
var _local2 = myList[_local1].split("*");
convertToNumbers(_local2);
analyzeSpawn(_local2);
_local1++;
}
}
function analyzeSpawn(myArray) {
convertToNumbers(myArray);
if (myArray[1] == currentStage) {
newSpawn(monsterData[myArray[0]][0].split(", ")[0], myArray[2], myArray[3]);
} else {
spawnInWorld(myArray);
}
}
function newSpawn(enemyType, X, Y) {
newEnemy(enemyType, X, Y, undefined, undefined, undefined, undefined, true);
}
function spawnInWorld(myArray) {
var _local2 = activeStage[myArray[1]].split("~");
var _local3 = validateSplitArray(_local2[1], "^");
_local3.push([myArray[0], myArray[2], myArray[3], 1].join(", "));
_local2[1] = _local3.join("^");
activeStage[myArray[1]] = _local2.join("~");
}
function executeTime(myArray, questNum) {
var _local2 = Number(myArray[0]);
var _local4 = myArray[1].split(":");
var _local3 = Number(_local4[0]);
var _local1 = Number(_local4[1]);
if (_local2 == 0) {
hour = _local3;
minute = _local1;
} else if (_local2 == 1) {
hour = hour + _local3;
minute = minute + _local1;
} else if (_local2 == 2) {
hour = hour - _local3;
minute = minute - _local1;
}
}
function executeNPCsChanges(myList, questNum) {
if ((myList.length == 1) && (myList[0] == "")) {
return(undefined);
}
saveStage();
var _local1 = 0;
while (_local1 < myList.length) {
var _local2 = myList[_local1].split("*");
convertToNumbers(_local2);
analyzeNPCsChange(_local2, questNum);
_local1++;
}
reduplicateMonsters();
reduplicateNPCs();
}
function analyzeNPCsChange(myArray, questNum) {
var _local2 = myArray[0];
if (_local2 == 0) {
relocateNpc(myArray[1], myArray[2], myArray[3], myArray[4], myArray[5], questNum);
} else if (_local2 == 1) {
addNpcToMap(myArray[1], myArray[2], myArray[3], myArray[4], myArray[5], questNum);
} else if (_local2 == 2) {
if (!deleteNpcFromWorld(myArray[1], questNum)) {
convertMonsterToNpc(myArray[1], true, questNum);
}
} else if ((_local2 > 2) && (_local2 < 6)) {
convertNpc(myArray[1], _local2 - 3, questNum);
} else if (_local2 == 6) {
convertMonsterToNpc(myArray[1], true);
}
}
function reduplicateNPCs(fromBuildStage) {
if (clearing && (fromBuildStage != true)) {
return(undefined);
}
var _local2;
if (fromBuildStage != true) {
_local2 = 0;
while (_local2 < npcs.length) {
npcs[_local2].removeMovieClip();
_local2++;
}
npcs = new Array();
hiddenNpcs = new Array();
}
var _local5 = activeStage[currentStage].split("~");
var _local3 = _local5[3].split("^");
_local2 = 0;
while (_local2 < _local3.length) {
var _local1 = _local3[_local2].split(", ");
if ((_local1[0] != "") && (Number(_local1[4]) != 1)) {
_local1[2] = Number(_local1[2]) + builder_y_fix;
if (((Math.abs(getCameraX() - Number(_local1[1])) - 100) > 480) && (tutorialCounter == 9999)) {
hiddenNpcs.push(_local1.join(", "));
} else {
newNPC(getName("npc", Number(_local1[0])), Number(_local1[1]), Number(_local1[2]), Number(_local1[3]));
}
}
_local2++;
}
if (fromBuildStage != true) {
applyPerspective();
}
}
function reduplicateMonsters(fromBuildStage) {
if (clearing && (fromBuildStage != true)) {
return(undefined);
}
var _local1;
if (fromBuildStage != true) {
_local1 = 0;
while (_local1 < enemies.length) {
enemies[_local1].removeMovieClip();
_local1++;
}
enemies = new Array();
}
var _local9 = activeStage[currentStage].split("~");
var _local7 = _local9[1].split("^");
var _local3 = _local9[3].split("^");
var _local8 = new Array();
for (_local1 in _local3) {
var _local2 = _local3[_local1].split(", ");
if (Number(_local2[4]) == 1) {
_local8.push(_local2.slice(0, _local2.length - 2).join(", "));
_local3.splice(_local1, 1);
} else if (Number(_local2[4]) == 0) {
_local3[_local1] = _local2.slice(0, _local2.length - 1).join(", ");
}
}
var _local6 = _local7.concat(_local8);
_local1 = 0;
while (_local1 < _local6.length) {
var _local5 = _local1 >= _local7.length;
var _local2 = _local6[_local1].split(", ");
if (_local2[0] != "") {
if (_local5) {
myName = Number(_local2[0]);
} else {
myName = getName("enemy", Number(_local2[0]));
}
var _local4 = newEnemy(myName, Number(_local2[1]), Number(_local2[2]) + builder_y_fix, undefined, undefined, undefined, undefined, Number(_local2[3]) == 1);
if (_local2[4] != undefined) {
setMonsterVars(_local4, _local2.slice(4, _local2.length));
}
if (_local5) {
setCharY(Number(_local2[2]) + builder_y_fix, _local4);
}
}
_local1++;
}
if (fromBuildStage != true) {
applyPerspective();
}
}
function questAbortNPCsChanges(questNum) {
var _local1 = new Array();
for (var _local3 in npcChanges) {
if (npcChanges[_local3][1] == questNum) {
_local1.push(npcChanges[_local3][0]);
npcChanges.splice(_local3, 1);
}
}
return(_local1);
}
function analyzeTask(myTask, questNum) {
task_splitted = new Array();
task_splitted = myTask.split(" ");
if (task_splitted[0] == "Eliminate") {
elimination.push([task_splitted[2], 0, task_splitted[1], questNum]);
} else if (task_splitted[0] == "Collect") {
collection.push([task_splitted[2], 0, task_splitted[1], questNum]);
}
}
function analyzeReward(myReward, questNum) {
var _local1 = new Array();
_local1 = myReward.split(" ");
if (_local1[1] == "Gold") {
gold = Number(gold) + Number(_local1[0]);
qTxt = ("Gained Gold (" + _local1[0]) + ")";
} else if (_local1[1] == "EXP") {
exp = Number(exp) + Number(_local1[0]);
qTxt = ("Gained Experience (" + _local1[0]) + ")";
} else {
var _local2 = new Array();
if (itemData[Number(_local1[1])][0].split(", ")[1] == "equip") {
_local2 = defineEquip(insertScrollStats(itemData[Number(_local1[1])])).concat();
} else {
_local2 = itemData[Number(_local1[1])].concat();
}
slotAmount(_local2, Number(_local1[0]), "equal");
addToSlot(_local2);
qTxt = "Gained ";
if (Number(_local1[0]) == 1) {
qTxt = qTxt + "a ";
} else {
qTxt = qTxt + (_local1[0] + " ");
}
qTxt = qTxt + _local2[0].split(", ")[0];
if (Number(_local1[0]) != 1) {
qTxt = qTxt + "s";
}
updateStats(_local2[0].split(", ")[0], "item", 1);
}
addQuestEvent(qTxt);
}
function moveQuestMap(questNum, questPhase) {
var _local3 = _root.quest[questNum][4].split(", ");
if (_local3[questPhase] != "none") {
var _local2 = _local3[questPhase].split("^ ");
_root.moveMap(_local2[0], _local2[1], _local2[2]);
}
}
function isRepeatable(questNum) {
return(Number(quest[questNum][5].split(", ")[6]) == 1);
}
function rewardQuest(questNum) {
var _local5 = quest[questNum];
if (_local5[2] != "") {
var _local3 = getRewards(_local5[2]);
var _local2 = 0;
while (_local2 < _local3.length) {
analyzeReward(_local3[_local2], questNum);
_local2++;
}
}
removeQuest(questNum);
if (!isRepeatable(questNum)) {
completed.push(questNum);
}
updateNPCs();
clearAnnouncments(questNum);
announcments.push(["Quest Ended: " + _local5[0].split(", ")[0], questNum]);
_root.playSound("quest_end");
endTxt = analyzeVars(_local5[5].split(", ")[4]);
if (endTxt != "") {
announcments.push([endTxt, questNum]);
}
executeNPCsChanges(_local5[7].split("@")[1].split(", "));
executeSpawns(_local5[8].split("@")[1].split(", "));
executeTime(_local5[9].split("@")[1].split(", "));
mochi.as2.MochiEvents.trackEvent("Quest Ended", _local5[0].split(", ")[0]);
}
function removeQuest(questNum, isAbort, isFail, noAnnouncments) {
var _local2;
_local2 = 0;
while (_local2 < inProgress.length) {
if (inProgress[_local2] == questNum) {
inProgress.splice(_local2, 1);
break;
}
_local2++;
}
for (_local2 in elimination) {
if (elimination[_local2][3] == questNum) {
elimination.splice(_local2, 1);
}
}
for (_local2 in collection) {
if (collection[_local2][3] == questNum) {
collection.splice(_local2, 1);
}
}
var _local4 = quest[questNum][6];
if (_local4 != "") {
for (_local2 in questDrops) {
if (questDrops[_local2] == _local4) {
questDrops.splice(_local2, 1);
}
}
}
if (isAbort == true) {
playSound("quest_abort");
clearAnnouncments(questNum);
if (noAnnouncments != true) {
var _local5;
if (isFail == true) {
_local5 = "Failed";
addEventToLog("quest_fail", questNum);
mochi.as2.MochiEvents.trackEvent("Quest Failed", _root.quest[questNum][0].split(", ")[0]);
} else {
_local5 = "Aborted";
addEventToLog("quest_abort", questNum);
mochi.as2.MochiEvents.trackEvent("Quest Aborted", _root.quest[questNum][0].split(", ")[0]);
}
announcments.push([(("Quest " + _local5) + ": ") + _root.quest[questNum][0].split(", ")[0], questNum]);
}
swapNpcValue(questNum);
executeNPCsChanges(questAbortNPCsChanges(questNum));
moveQuestMap(questNum, 2);
}
}
function getRewards(rewardsString) {
var _local5 = rewardsString.split("@");
var _local1;
switch (ninjaClass) {
case "Executioner" :
_local1 = 1;
break;
case "Soul Hunter" :
_local1 = 2;
break;
case "Skyborn" :
_local1 = 3;
break;
case "Sage" :
_local1 = 4;
}
var _local4 = _local5[0];
var _local3 = _local5[_local1];
var _local2 = new Array();
if (_local4 != "") {
_local2 = _local4.split(", ");
}
if (_local3 != "") {
_local2 = _local2.concat(_local3.split(", "));
}
return(_local2);
}
function questRewards(questNum, returnArray) {
var _local6 = quest[questNum];
var _local4 = new Array();
var _local5 = "";
if (_local6[2] != "") {
theArray = getRewards(_local6[2]);
var _local3 = 0;
while (_local3 < theArray.length) {
tempArr = theArray[_local3].split(" ");
var _local1 = tempArr[1];
var _local2 = Number(tempArr[0]);
if ((_local1 == "EXP") || (_local1 == "Gold")) {
tempTxt = (stringNum(_local2) + " ") + _local1;
_local4.push([_local1, _local2]);
} else {
_local1 = itemData[Number(_local1)][0].split(", ")[0];
_local4.push([_local1, _local2]);
if (_local2 == 1) {
tempTxt = "a " + _local1;
} else {
tempTxt = ((_local2 + " ") + _local1) + "s";
}
}
_local5 = _local5 + (newline + tempTxt);
_local3++;
}
}
if (returnArray == true) {
return(_local4);
}
return(_local5);
}
function analyzeReq(myReq, questNum) {
var _local4 = questSplit(myReq);
var _local2 = _local4.splitArray;
var _local5 = _local4.isFalse;
var _local3 = true;
if (_local2[0] == "Quest") {
if (!appearIn(Number(_local2[1]), completed)) {
_local3 = false;
}
} else if (_local2[0] == "Class") {
if (_local2[1] != _root.ninjaClass) {
_local3 = false;
}
} else if (_local2[0] == "Level") {
myLevels = _local2[1].split(" - ");
if ((level < Number(myLevels[0])) || (level > Number(myLevels[1]))) {
_local3 = false;
}
}
if (_local5) {
_local3 = !_local3;
}
if (_local5 && (_local2[0] == "Quest")) {
_local3 = (!appearIn(Number(_local2[1]), completed)) && (!appearIn(Number(_local2[1]), inProgress));
}
return(_local3);
}
function questSplit(myString) {
var _local1 = "";
var _local4 = new Array();
var _local2 = false;
var _local5 = false;
qs = 0;
while (qs < myString.length) {
myChar = myString.charAt(qs);
if (myChar == "!") {
_local5 = true;
} else if (((myChar != " ") && (!_local2)) || (_local2)) {
_local1 = _local1 + myChar;
} else {
_local4.push(_local1);
_local1 = "";
_local2 = true;
}
qs++;
}
_local4.push(_local1);
return({splitArray:_local4, isFalse:_local5});
}
function questReq(questNum) {
q = quest[questNum];
if (_root.appearIn(questNum, _root.inProgress)) {
return(true);
}
if (appearIn(q[0].split(", ")[0], completed)) {
return(false);
}
if (q[3] != "") {
theArray = q[3].split(", ");
c = 0;
while (c < theArray.length) {
if (!analyzeReq(theArray[c], questNum)) {
return(false);
}
c++;
}
}
return(true);
}
function killQuest(monsterName) {
var _local2 = 0;
while (_local2 < elimination.length) {
if ((monsterData[Number(elimination[_local2][0])][0].split(", ")[0] == monsterName) && (elimination[_local2][1] < elimination[_local2][2])) {
elimination[_local2][1]++;
var _local4 = 0;
myTxt = (((("Eliminate " + elimination[_local2][1]) + "/") + elimination[_local2][2]) + " ") + getMonsterName(monsterName);
if (elimination[_local2][2] > 1) {
myTxt = myTxt + "s";
}
if (elimination[_local2][1] == elimination[_local2][2]) {
myTxt = myTxt + " (Task Completed)";
_local4 = 1;
}
addQuestEvent(myTxt);
var _local3 = elimination[_local2][3];
clearAnnouncments(_local3);
announcments.push([myTxt, _local3]);
if (questStatus(_local3, "completed")) {
completeQuest(_local3);
_local4 = 2;
}
if (_local4 == 1) {
_root.playSound("quest_taskComplete");
} else if (_local4 == 2) {
_root.playSound("quest_complete");
}
}
_local2++;
}
}
function collectItem(itemName) {
c = 0;
while (c < collection.length) {
if (itemData[Number(collection[c][0])][0].split(", ")[0] == itemName) {
collection[c][1] = getItemAmount(itemName);
if (collection[c][1] <= collection[c][2]) {
var _local2 = 0;
myTxt = (((("Collect " + collection[c][1]) + "/") + collection[c][2]) + " ") + itemName;
if (collection[c][2] > 1) {
myTxt = myTxt + "s";
}
if (collection[c][1] >= collection[c][2]) {
myTxt = myTxt + " (Task Completed)";
_local2 = 1;
}
finishedQuestNumber = collection[c][3];
finishedQuest = questStatus(collection[c][3], "completed");
addQuestEvent(myTxt);
clearAnnouncments(finishedQuestNumber);
announcments.push([myTxt, finishedQuestNumber]);
if (finishedQuest) {
completeQuest(finishedQuestNumber);
_local2 = 2;
}
if (_local2 == 1) {
_root.playSound("quest_taskComplete");
} else if (_local2 == 2) {
_root.playSound("quest_complete");
}
break;
}
}
c++;
}
}
function completeQuest(questNumber) {
var _local2 = _root.quest[questNumber];
var _local4 = _local2[0].split(", ");
clearAnnouncments(questNumber);
announcments.push(["Quest Completed: " + _local4[0], questNumber]);
announcments.push([("I should go see " + npcData[Number(_local4[1])][0].split(", ")[0]) + " to collect my reward", questNumber]);
addEventToLog("quest_end", questNumber);
executeNPCsChanges(_local2[7].split("@")[2].split(", "));
executeSpawns(_local2[8].split("@")[2].split(", "));
executeTime(_local2[9].split("@")[2].split(", "));
}
function getQuestsAll() {
var _local1 = 0;
while (_local1 < npcs.length) {
getQuests(npcs[_local1]);
_local1++;
}
}
function getQuests(myNPC) {
myNPC.quest = new Array();
var _local1 = 0;
while (_local1 < quest.length) {
if (quest[_local1][0].split(", ")[1] == findNum(myNPC.myName, npcData)) {
myNPC.quest.push(_local1);
}
_local1++;
}
}
function getStore(myNPC) {
var _local1 = 0;
while (_local1 < storeData.length) {
myStore = storeData[_local1].split("^");
if (myStore[0] == findNum(myNPC.myName, npcData)) {
myNPC.store = _local1;
}
_local1++;
}
}
function newNPC(npcName, X, Y, sideNum) {
if (npcName == undefined) {
return(undefined);
}
var _local1 = field.attachMovie("npc", "npc" + field.getNextHighestDepth(), field.getNextHighestDepth());
_local1.cacheAsBitmap = true;
_local1.myShadow.cacheAsBitmap = true;
_local1._y = Y;
_local1._x = X;
_local1.myName = npcName;
_local1.myNum = findNum(npcName, npcData);
_local1.character.gotoAndStop(random(_local1.character._totalframes));
_local1.sideNum = sideNum;
if (sideNum == 0) {
_local1.character._xscale = basicCharacterScale;
} else if (sideNum == 1) {
_local1.character._xscale = -basicCharacterScale;
}
_local1.me.hitSquare._alpha = 0;
_local1.myName_txt.text = npcName;
_local1.myName_txt.autoSize = "center";
_local1.nameBorder._width = _local1.myName_txt._width + 10;
_local1.arrayType = "npcs";
_local1.attachMovie("npc_healthSign", "healthSign", _local1.getNextHighestDepth());
_local1.healthSign._x = 0.5;
_local1.healthSign._y = -229.9;
createBounds(_local1.character);
getQuests(_local1);
getStore(_local1);
npcBehavior(_local1, true);
npcs.push(_local1);
}
function createBounds(mc, extension) {
if (extension == undefined) {
extension = 0;
}
var _local1 = mc.getBounds(mc._parent);
var _local2 = mc._parent.createEmptyMovieClip("mcBounds", mc._parent.getNextHighestDepth());
_local2.beginFill(16711680, 0);
_local2.moveTo(_local1.xMin, _local1.yMax);
_local2.lineTo(_local1.xMax + extension, _local1.yMax);
_local2.lineTo(_local1.xMax + extension, _local1.yMin);
_local2.lineTo(_local1.xMin, _local1.yMin);
_local2.moveTo(_local1.xMin, _local1.yMax);
}
function updateNPCs() {
var _local1 = 0;
while (_local1 < npcs.length) {
getQuests(npcs[_local1]);
getStore(npcs[_local1]);
_local1++;
}
}
function getNpcNum(npcName) {
var _local1 = 0;
while (_local1 < npcData.length) {
if (npcData[_local1][0].split(", ")[0] == npcName) {
return(_local1);
}
_local1++;
}
}
function validateSplitArray(myString, mySign) {
if (myString == "") {
return(new Array());
}
return(myString.split(mySign));
}
function relocateNpc(npcNum, stageNum, myX, myY, faceTo, questNum) {
deleteNpcFromWorld(npcNum, questNum, true);
addNpcToMap(npcNum, stageNum, myX, myY, faceTo);
}
function deleteNpcFromWorld(npcNum, questNum, relocatedAbort) {
var _local3 = 0;
while (_local3 < activeStage.length) {
var _local5 = activeStage[_local3].split("~");
var _local8 = _local5[0].split(", ")[0];
var _local2 = validateSplitArray(_local5[3], "^");
var _local1 = 0;
while (_local1 < _local2.length) {
if (Number(_local2[_local1].split(", ")[0]) == npcNum) {
if (questNum != undefined) {
var _local4 = 1;
if (relocatedAbort == true) {
_local4 = 0;
}
npcChanges.push([[_local4, npcNum, _local3].concat(_local2[_local1].split(", ").slice(1, 4)).join("*"), questNum]);
}
_local2.splice(_local1, 1);
_local5[3] = _local2.join("^");
activeStage[_local3] = _local5.join("~");
return(true);
}
_local1++;
}
_local3++;
}
return(false);
}
function addNpcToMap(npcNum, stageNum, myX, myY, faceTo, questNum) {
var _local1 = activeStage[stageNum].split("~");
var _local5 = _local1[0].split(", ")[0];
var _local2 = validateSplitArray(_local1[3], "^");
_local2.push((((((npcNum + ", ") + myX) + ", ") + myY) + ", ") + faceTo);
_local1[3] = _local2.join("^");
activeStage[stageNum] = _local1.join("~");
if (questNum != undefined) {
npcChanges.push([[2, npcNum].join("*"), questNum]);
}
}
function convertNpc(npcNum, convertNum, questNum) {
if (convertNum == 0) {
convertMonsterToNpc(npcNum, false, questNum);
} else if (convertNum == 1) {
convertNpcToMonster(npcNum, questNum);
} else if (convertNum == 2) {
npcChanges.push([[6, npcNum].join("*"), questNum]);
var _local3 = deleteNpcFromWorld(npcNum, questNum, true);
var _local4 = false;
if (!_local3) {
_local4 = convertMonsterToNpc(npcNum, true, questNum);
}
if (_local3 || (_local4)) {
var _local5 = newEnemy(npcNum, field.character._x, field.character._y, true);
_local5.myPosition = "Offensive";
}
}
}
function convertMonsterToNpc(npcNum, deleteOnly, questNum) {
var _local5;
var _local1;
var _local9 = false;
_local5 = 0;
while (_local5 < activeStage.length) {
var _local11 = activeStage[_local5].split("~");
var _local3 = validateSplitArray(_local11[1], "^");
var _local13 = validateSplitArray(_local11[3], "^");
_local1 = 0;
while (_local1 < _local3.length) {
var _local7 = monsterData[Number(_local3[_local1].split(", ")[0])][0].split(", ")[0];
if (Number(_local7) == npcNum) {
var _local2 = _local3[_local1].split(", ");
_local2[0] = _local7;
_local2[2] = Number(_local2[2]) + 88;
var _local6 = 3;
if (deleteOnly != true) {
_local13.push(_local2.slice(0, 3).concat([random(2)]).join(", "));
_local6 = 4;
}
_local3.splice(_local1, 1);
npcChanges.push([[_local6, npcNum].join("*"), questNum]);
_local9 = true;
break;
}
_local1++;
}
_local1 = 0;
while (_local1 < _local13.length) {
var _local2 = _local13[_local1].split(", ");
if (Number(_local2[0]) == npcNum) {
if (_local2.length == 5) {
_local2.splice(_local2.length - 1, 1);
}
_local2 = _local2.concat([0]);
_local13[_local1] = _local2.join(", ");
if (deleteOnly == true) {
_local13.splice(_local1, 1);
}
npcChanges.push([[3, npcNum].join("*"), questNum]);
_local9 = true;
break;
}
_local1++;
}
_local11[1] = _local3.join("^");
_local11[3] = _local13.join("^");
activeStage[_local5] = _local11.join("~");
if (_local9) {
return(true);
}
_local5++;
}
_local5 = 0;
while (_local5 < pets.length) {
var _local8 = pets[_local5];
if (Number(_local8.myName) == npcNum) {
var _local11 = activeStage[currentStage].split("~");
var _local13 = validateSplitArray(_local11[3], "^");
if (deleteOnly != true) {
_local13.push([npcNum, _local8._x, _local8._y + 88, random(2)].join(", "));
}
removePet(_local8);
_local11[3] = _local13.join("^");
activeStage[currentStage] = _local11.join("~");
return(true);
}
_local5++;
}
return(false);
}
function convertNpcToMonster(npcNum, questNum) {
var _local3;
_local3 = 0;
while (_local3 < activeStage.length) {
var _local5 = activeStage[_local3].split("~");
var _local8 = validateSplitArray(_local5[1], "^");
var _local4 = validateSplitArray(_local5[3], "^");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local1 = _local4[_local2].split(", ");
if (Number(_local1[0]) == npcNum) {
if (_local1.length == 5) {
_local1.splice(_local1.length - 1, 1);
}
_local1 = _local1.concat([1]);
_local4[_local2] = _local1.join(", ");
npcChanges.push([[3, npcNum].join("*"), questNum]);
_local5[1] = _local8.join("^");
_local5[3] = _local4.join("^");
activeStage[_local3] = _local5.join("~");
return(true);
}
_local2++;
}
_local3++;
}
_local3 = 0;
while (_local3 < pets.length) {
var _local7 = pets[_local3];
if (Number(_local7.myName) == npcNum) {
switchType(_local7);
npcChanges.push([[5, npcNum].join("*"), questNum]);
return(true);
}
_local3++;
}
return(false);
}
function questExists(myQuest) {
for (var _local2 in inProgress) {
if (inProgress[_local2] == myQuest) {
return(true);
}
}
return(false);
}
function popQuest(myQuests) {
addUI("quests_pop");
var myWin = layout.quests_pop;
if (myQuests.length > 1) {
myWin.gotoAndStop(3);
myWin.quests = myQuests;
setTimeout(function () {
myWin.updateOptions();
}, 1);
} else {
myWin.gotoAndStop(1);
myWin.quest = myQuests[0];
if (myQuests[0] == -1) {
setTimeout(function () {
myWin.newBusyLine();
}, 1);
}
}
gamePause = true;
}
function questStatus(myQuest, dataRequired) {
var _local7 = new Array();
var _local1 = "";
var _local6 = "";
var _local5 = "";
var _local8 = true;
var _local3 = 0;
while (_local3 < elimination.length) {
myE = elimination[_local3];
if (myE[3] == myQuest) {
var _local2 = monsterData[Number(myE[0])][0].split(", ")[0];
_local1 = (((("Eliminate " + myE[1]) + " / ") + myE[2]) + " ") + getMonsterName(_local2);
if (myE[2] > 1) {
_local1 = _local1 + "s";
}
if (_local6 != "") {
_local6 = _local6 + ", ";
}
_local6 = _local6 + ((myE[2] + " ") + _local2);
if (myE[2] > 1) {
_local6 = _local6 + "s";
}
if (myE[1] == myE[2]) {
_local1 = _local1 + " [COMPLETED]";
} else {
_local8 = false;
}
_local7.push(_local1);
}
_local3++;
}
var _local4 = 0;
while (_local4 < collection.length) {
myC = collection[_local4];
var _local2 = itemData[Number(myC[0])][0].split(", ")[0];
myC[1] = getItemAmount(_local2);
if (myC[3] == myQuest) {
_local1 = (((("Collect " + myC[1]) + " / ") + myC[2]) + " ") + _local2;
if (myC[2] > 1) {
_local1 = _local1 + "s";
}
if (_local5 != "") {
_local5 = _local5 + ", ";
}
_local5 = _local5 + ((myC[2] + " ") + _local2);
if (myC[2] > 1) {
_local5 = _local5 + "s";
}
if (dataRequired == "dispose") {
if (Number(myC[2]) == 1) {
tempTxt = "a " + _local2;
} else {
tempTxt = ((myC[2] + " ") + _local2) + "s";
}
addQuestEvent("Handed " + tempTxt);
disposeItem(_local2, Number(myC[2]));
}
if (myC[1] >= myC[2]) {
_local1 = _local1 + " [COMPLETED]";
} else {
_local8 = false;
}
_local7.push(_local1);
}
_local4++;
}
if (dataRequired == "log") {
return(_local7);
}
if (dataRequired == "tasks") {
return((_local6 + "|") + _local5);
}
if (dataRequired == "completed") {
return(_local8);
}
}
function getItemAmount(itemName) {
var _local2 = 0;
var _local1;
_local1 = 0;
while (_local1 < equip_item.length) {
if (equip_item[_local1][0].split(", ")[0] == itemName) {
_local2 = _local2 + getSlotAmount(equip_item[_local1]);
}
_local1++;
}
_local1 = 0;
while (_local1 < use_item.length) {
if (use_item[_local1][0].split(", ")[0] == itemName) {
_local2 = _local2 + getSlotAmount(use_item[_local1]);
}
_local1++;
}
_local1 = 0;
while (_local1 < etc_item.length) {
if (etc_item[_local1][0].split(", ")[0] == itemName) {
_local2 = _local2 + getSlotAmount(etc_item[_local1]);
}
_local1++;
}
return(_local2);
}
function disposeItem(itemName, itemAmount) {
var _local1;
_local1 = 0;
while (_local1 < equip_item.length) {
if (equip_item[_local1][0].split(", ")[0] == itemName) {
slotAmount(equip_item[_local1], itemAmount, "minus");
if (equip_item[_local1][2] < 1) {
itemAmount = itemAmount + Math.abs(getSlotAmount(equip_item[_local1]));
equip_item[_local1] = new Array();
equip_item[_local1][0] = "Empty";
}
}
if (itemAmount == 0) {
break;
}
_local1++;
}
_local1 = 0;
while (_local1 < use_item.length) {
if (use_item[_local1][0].split(", ")[0] == itemName) {
slotAmount(use_item[_local1], itemAmount, "minus");
if (use_item[_local1][2] < 1) {
itemAmount = itemAmount + Math.abs(getSlotAmount(use_item[_local1]));
use_item[_local1] = new Array();
use_item[_local1][0] = "Empty";
}
}
if (itemAmount == 0) {
break;
}
_local1++;
}
_local1 = 0;
while (_local1 < etc_item.length) {
if (etc_item[_local1][0].split(", ")[0] == itemName) {
slotAmount(etc_item[_local1], itemAmount, "minus");
if (etc_item[_local1][2] < 1) {
itemAmount = itemAmount + Math.abs(getSlotAmount(equip_item[_local1]));
etc_item[_local1] = new Array();
etc_item[_local1][0] = "Empty";
}
}
if (itemAmount == 0) {
break;
}
_local1++;
}
updateInventory();
}
function extendName(myName) {
tempName = "";
tr = 0;
while (tr < myName.length) {
if (myName.charAt(tr) == "_") {
tempName = tempName + " ";
} else {
tempName = tempName + myName.charAt(tr);
}
tr++;
}
return(tempName);
}
function addQuestEvent(myEvent) {
addToLog("[Quest] " + myEvent, 52224);
}
function addSystemEvent(myEvent) {
addToLog("System: " + myEvent, 65280);
}
function addPurchaseEvent(myItem, myAmount) {
if (myAmount == 1) {
addToLog(("Purchased Item (" + myItem) + ")", 16776960);
} else {
addToLog(((("Purchased Item (" + myItem) + " x ") + myAmount) + ")", 16776960);
}
}
function addSellEvent(myItem, myAmount) {
if (myAmount == 1) {
addToLog(("Sold Item (" + myItem) + ")", 16776960);
} else {
addToLog(((("Sold Item (" + myItem) + " x ") + myAmount) + ")", 16776960);
}
}
function addPickEvent(myItem, myAmount) {
if (myAmount == 1) {
addToLog(("Picked Item (" + myItem) + ")", 16711680);
} else {
addToLog(((("Picked Item (" + myItem) + " x ") + myAmount) + ")", 16711680);
}
}
function addEvent(myEvent, prop) {
_root[myEvent] = Number(_root[myEvent]) + Number(prop);
addEventToLog(myEvent, prop);
}
function addEventToLog(myEvent, prop) {
switch (myEvent) {
case "gold" :
addToLog(("Collected Gold (" + prop) + ")", 16776960);
break;
case "exp" :
addToLog(("Gained Experience (" + prop) + ")", 52479);
break;
case "comboexp" :
addToLog(((("Gained Experience (" + prop) + " x ") + (1 + (combos / 10))) + ")", 52479);
break;
case "level" :
addToLog(("Level Up! Now Level " + prop) + "!", 16777215);
break;
case "quest_begin" :
addQuestEvent("Began: " + quest[prop][0].split(", ")[0]);
break;
case "quest_end" :
addQuestEvent("Completed: " + quest[prop][0].split(", ")[0]);
break;
case "quest_abort" :
addQuestEvent("Aborted: " + quest[prop][0].split(", ")[0]);
break;
case "quest_fail" :
addQuestEvent("Failed: " + quest[prop][0].split(", ")[0]);
}
}
function addToLog(myTxt, myColor) {
layout.log.text = layout.log.text + (myTxt + newline);
layout.log.scroll = layout.log.maxscroll;
if (myColor == undefined) {
myColor = 13421772 /* 0xCCCCCC */;
}
highlightText(myTxt, layout.log, myColor);
}
function purchaseItem(myItem, myPrice, myAmount) {
if (myAmount == undefined) {
myAmount = 1;
}
var _local2 = myItem.split(":");
if (_local2.length == 1) {
tempItem = itemData[findNum(myItem, itemData)].concat();
} else if (Number(_local2[1]) == 1) {
tempItem = shopPetBlood(_local2[0]);
} else {
tempItem = shopMonsterBlood(_local2[0]);
}
slotAmount(tempItem, myAmount, "equal");
if (addToSlot(tempItem, true)) {
gold = Number(gold) - (myPrice * myAmount);
if (_local2.length != 1) {
addToSlot(tempItem);
} else {
addToSlot(defineEquip(insertScrollStats(tempItem), true));
}
_root.playSound("gold");
addPurchaseEvent(getItemName(tempItem), myAmount);
updateStats(myItem, "item", 1);
} else {
newError("Inventory is Full");
}
}
function confirmPurchase(myItem, myPrice) {
setTimeout(inventoryFocusOff, 2);
itemName = getItemName(myItem);
promptWindow("confirm_purchase");
layout.confirm_purchase.myTxt.text = ((("Are you sure you want to purchase a " + itemName) + " for ") + myPrice) + " Gold?";
layout.confirm_purchase.myItem = myItem;
layout.confirm_purchase.myPrice = myPrice;
layout.store.focusOff();
equipFocus();
}
function confirmMultiPurchase(myItem, myPrice) {
setTimeout(inventoryFocusOff, 2);
var _local2 = itemData[findNum(myItem, itemData)];
promptWindow("confirm_multipurchase");
layout.confirm_multipurchase.myTxt.text = ((("How many " + myItem) + "s would you like purchase? (") + myPrice) + " Gold Each)";
layout.confirm_multipurchase.myItem = myItem;
layout.confirm_multipurchase.myPrice = myPrice;
layout.confirm_multipurchase.myAmount.text = 1;
layout.confirm_multipurchase.prevText = layout.confirm_multipurchase.myAmount.text;
layout.confirm_multipurchase.maxAmount = _local2[1].split(", ")[0];
layout.confirm_multipurchase.maxTxt.text = ("(max " + layout.confirm_multipurchase.maxAmount) + ")";
layout.confirm_multipurchase.itemNameTxt.text = myItem + " x ";
layout.confirm_multipurchase.setTotal();
layout.store.focusOff();
equipFocus();
}
function stringNum(myNum) {
var _local1;
var _local3;
var _local4 = myNum + "";
var _local5 = Math.floor(_local4.length / 3);
var _local2 = "";
_local1 = _local4.length - 1;
_local3 = 0;
while (_local1 >= 0) {
if (((_local3 % 3) == 0) && (_local3 != 0)) {
_local2 = _local2 + ",";
}
_local2 = _local2 + _local4.charAt(_local1);
_local1--;
_local3++;
}
finalNum = "";
_local1 = _local2.length - 1;
while (_local1 >= 0) {
finalNum = finalNum + _local2.charAt(_local1);
_local1--;
}
return(finalNum);
}
function highlightText(word, findIn, hex) {
var _local1 = new TextFormat();
_local1.color = 13421772 /* 0xCCCCCC */;
findIn.setTextFormat(_local1);
ch = word.length - 1;
i = findIn.text.length;
while (i > 0) {
if (word.charAt(ch) == findIn.text.charAt(i)) {
if (ch >= (word.length - 1)) {
lastchar = i;
} else if (ch == 0) {
firstchar = i;
_local1 = new TextFormat();
_local1.color = hex;
findIn.setTextFormat(firstchar, lastchar + 1, _local1);
break;
}
ch--;
} else {
ch = word.length - 1;
}
i--;
}
}
function appearIn(myQuery, myArray) {
for (var _local2 in myArray) {
if (myArray[_local2] == myQuery) {
return(true);
}
}
return(false);
}
function findNum(myName, myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (myName == myArray[_local1][0].split(", ")[0]) {
return(_local1);
}
_local1++;
}
}
function getGoldFrame(myAmount) {
if (myAmount >= 1000) {
return("gold_6");
}
if (myAmount >= 500) {
return("gold_5");
}
if (myAmount >= 100) {
return("gold_4");
}
if (myAmount >= 70) {
return("gold_3");
}
if (myAmount >= 40) {
return("gold_2");
}
return("gold_1");
}
function newPickItem(myItem, X, Y, fromMonster, alreadyExists) {
var _local2 = field.attachMovie("item_pick", "item_pick" + field.getNextHighestDepth(), field.getNextHighestDepth());
var _local5 = ((myItem[0].split(", ")[1] == "equip") && (myItem[0].split(", ")[3] == 3)) && (myItem[4].split(", ")[3] != "Claw");
addToX = random(50);
if (random(50) > 25) {
addToX = addToX * -1;
}
if (alreadyExists == true) {
addToX = 0;
}
_local2.ground = Y;
_local2._y = Y;
_local2._x = X + addToX;
_local2.myName = myItem[0].split(", ")[0];
updateStats(_local2.myName, "item", 0);
if (myItem[0] == "gold") {
finalItem = getGoldFrame(myItem[1]);
} else if (_local5) {
finalItem = Number(myItem[4].split(", ")[2]) + 1;
} else {
finalItem = getItemFrame(_local2.myName);
}
_local2.myItem._visible = false;
_local2.myWeapon._visible = false;
var _local4 = _local2.myItem;
if (_local5) {
_local4 = _local2.myWeapon;
}
_local4._visible = true;
_local4.gotoAndStop(finalItem);
_local2.itemStats = myItem.concat();
_local2.picked = false;
if (((_local2.itemStats[0].split(", ")[1] == "use") && (Number(_local2.itemStats[0].split(", ")[3]) == 2)) && (fromMonster)) {
slotAmount(_local2.itemStats, Math.round(Math.random() * Number(_local2.itemStats[1].split(", ")[0])), "equal");
}
if (_local2.itemStats[0].split(", ")[1] == "equip") {
_local2.itemStats = defineEquip(insertScrollStats(_local2.itemStats)).concat();
}
_local2.mySize = Math.round((_local2.ground - _root.minHeight) / _root.perspectiveSize) + 100;
_local2._xscale = (_local2._yscale = _local2.mySize);
_local2.jump = 12;
_local2.jumping = true;
_local2.jumpGround = _local2.myItem._y;
if (alreadyExists == true) {
_local2.jumping = false;
}
_local2.slowMotion_jump_counter = 0;
_local2.arrayType = "invItems";
invItems.push(_local2);
}
function itemBehavior(t) {
if (!_root.gamePause) {
if (t != pointOn) {
t.filters = null;
setFilters(t);
}
var _local3 = t.myItem;
if (!_local3._visible) {
_local3 = t.myWeapon;
}
if (t.picked) {
if (t._alpha <= 0) {
removeInvItem(t);
} else {
t._alpha = t._alpha - 10;
_local3._y = _local3._y - 2;
t.myShadow._width++;
}
}
if (t.jumping) {
if (t.slowMotion_jump_counter >= _root.slowMotion) {
_local3._y = _local3._y - (t.jump * (_root.slowMotion + 1));
t.jump = t.jump - (1 * (_root.slowMotion + 1));
t.slowMotion_jump_counter = 0;
} else {
t.slowMotion_jump_counter++;
}
}
if (_local3._y >= t.jumpGround) {
_local3._y = t.jumpGround;
t.jumping = false;
}
}
}
function removeInvItem(myItem) {
si = 0;
while (si < invItems.length) {
if (invItems[si] == myItem) {
invItems.splice(si, 1);
myItem.removeMovieClip();
}
si++;
}
}
function findNextItem() {
exist = false;
i = 0;
while (i < invItems.length) {
myItem = invItems[i];
exist = (myItem.hitTest(field.character) && (!myItem.picked)) && (!myItem.jumping);
if (exist) {
break;
}
i++;
}
if (exist) {
return(myItem);
}
return(false);
}
function slotAmount(myItem, myNum, myAction) {
var _local1 = myItem[myItem.length - 1].split(", ");
if (myAction == "plus") {
_local1[0] = Number(_local1[0]) + myNum;
} else if (myAction == "minus") {
_local1[0] = Number(_local1[0]) - myNum;
} else if (myAction == "equal") {
_local1[0] = myNum;
}
myItem[myItem.length - 1] = _local1.join(", ");
}
function getSlotAmount(myItem) {
return(Number(myItem[myItem.length - 1].split(", ")[0]));
}
function nextEmptySlot(inventoryType) {
var _local1 = 0;
while (_local1 < inventoryType.length) {
if (inventoryType[_local1][0].split(", ")[0] == "Empty") {
return(_local1);
}
_local1++;
}
return("Full");
}
function nextMultipleSlot(itemTempStats) {
var _local3 = _root[itemTempStats[0].split(", ")[1] + "_item"];
var _local2 = 0;
while (_local2 < _local3.length) {
if ((_local3[_local2][0].split(", ")[0] == itemTempStats[0].split(", ")[0]) && ((getSlotAmount(itemTempStats) + getSlotAmount(_local3[_local2])) <= Number(itemTempStats[1].split(", ")[0]))) {
return(_local2);
}
_local2++;
}
return("None");
}
function addToSlot(itemStats, isTest) {
var _local3 = _root[itemStats[0].split(", ")[1] + "_item"];
if ((((itemStats[0].split(", ")[1] != "equip") && (itemStats[0].split(", ")[0] != "Monster Blood")) && (nextMultipleSlot(itemStats) != "None")) && ((getSlotAmount(_local3[nextMultipleSlot(itemStats)]) + getSlotAmount(itemStats)) <= Number(itemStats[1].split(", ")[0]))) {
if (isTest) {
return(true);
}
slotAmount(_local3[nextMultipleSlot(itemStats)], getSlotAmount(itemStats), "plus");
} else if (nextEmptySlot(_local3) != "Full") {
if (isTest) {
return(true);
}
_local3[nextEmptySlot(_local3)] = itemStats.concat();
} else {
newError("Inventory is full");
}
updateInventory();
}
function pickItem(myItem, purchased) {
var _local2 = myItem.itemStats.concat();
var _local3 = _local2[0].split(", ")[0];
if (_local3 == "gold") {
myItem.picked = true;
_root.addEvent("gold", _local2[1]);
_root.playSound("pick_gold");
} else if (addToSlot(_local2, true)) {
_root.playSound("pick_item");
myItem.picked = true;
if (purchased == undefined) {
_root.addPickEvent(getItemName(_local2), getSlotAmount(_local2));
}
addToSlot(_local2);
collectItem(_local3);
}
}
function updateInventory() {
if ((!confirm_drop._visible) && (!confirm_multidrop._visible)) {
layout.inventory.equip.btn.enabled = (layout.inventory.use.btn.enabled = (layout.inventory.etc.btn.enabled = true));
layout.inventory.nofocus._visible = false;
layout.inventory.closeX.enabled = true;
layout.inventory.bg.enabled = true;
next_star_slot_num = nextStarSlot(true);
var a = _root[inventoryShowing + "_item"];
var _local4 = 0;
while (_local4 < _root[inventoryShowing + "_slots"]) {
var _local3 = layout.inventory.list["square" + _local4];
_local3.enabled = true;
_local3.myNum = _local4;
_local3.myItem.gotoAndStop(getItemFrame(a[_local4][0].split(", ")[0]));
_local3.myItem.equip.gotoAndStop(1);
_local3.amount.text = "";
if (((inventoryShowing == "use") && (next_star_slot_num == _local4)) && (getCurrentWeapon() == "Claw")) {
_local3.isSelected._visible = true;
} else {
_local3.isSelected._visible = false;
}
if ((a[_local4][a[_local4].length - 1].split(", ")[0] != undefined) && (a[_local4][0].split(", ")[0] != "Empty")) {
if (getSlotAmount(a[_local4]) < 1) {
a[_local4] = new Array();
a[_local4][0] = "Empty";
}
if ((a[_local4][0].split(", ")[1] != "equip") && (a[_local4][0].split(", ")[0] != "Monster Blood")) {
_local3.amount.text = getSlotAmount(a[_local4]);
}
_local3.onPress = function () {
if (a[this.myNum][0].split(", ")[0] != "Empty") {
_root.dragSquare(this.myNum, getSlotAmount(a[this.myNum]));
}
if (doubleClick_counter > 0) {
if (layout.store._visible) {
popSell(this.myNum, a);
_root.dragging = false;
setTimeout(applyMouseCursor, 2, "Default");
} else if ((a[this.myNum][0].split(", ")[1] == "use") && (Number(a[this.myNum][0].split(", ")[3]) < 2)) {
usePotion(a[this.myNum]);
} else if (a[this.myNum][0].split(", ")[1] == "equip") {
_root.placeEquip(this.myNum);
} else if (a[this.myNum][0].split(", ")[0] == "Monster Blood") {
var _local8 = a[this.myNum][0].split(", ")[3];
var _local4 = findNum(_local8, monsterData);
var _local7 = pets.length < maxSummons;
var _local6 = _root.level >= Number(a[this.myNum][2]);
var _local5 = monsterValidDayTime(_local4);
if ((_local7 && _local6) && _local5) {
summonMonsterBlood(_root[inventoryShowing + "_item"][this.myNum]);
updateInventory();
} else {
var _local3;
if (!_local7) {
_local3 = ("Can't Summon more than " + maxSummons) + " Monster";
if (maxSummons > 1) {
_local3 = _local3 + "s";
}
} else if (!_local6) {
_local3 = "Insufficient Level";
} else if (!_local5) {
_local3 = getMonsterDayTimeError(_local4);
}
newError(_local3);
}
}
}
doubleClick_counter = doubleClick_timer;
_root.applyMouseCursor("GrabAction");
_root.layout.chat._visible = false;
};
_local3.onRelease = (_local3.onReleaseOutside = function () {
_root.updateInventory();
if (a[this.myNum][0].split(", ")[0] != "Empty") {
_root.itemSquareHit();
}
_root.dragging = false;
if ((!_root.layout.mouseCursor.hitTest(this)) || (a[this.myNum][0].split(", ")[0] == "Empty")) {
_root.applyMouseCursor("Default");
} else {
_root.applyMouseCursor("Grab");
}
});
_local3.onRollOver = function () {
_root.displayItemStats(a[this.myNum]);
_root.layout.chat.win = _root.layout.inventory;
_root.applyMouseCursor("Grab");
};
_local3.onRollOut = function () {
_root.layout.chat._visible = false;
_root.applyMouseCursor("Default");
};
} else {
_local3.onPress = function () {
};
_local3.onRollOver = function () {
};
}
_local3.useHandCursor = false;
_local3.myItem.gotoAndStop(a[_local4][0].split(", ")[0]);
_local4++;
}
updateQuickAmount();
}
}
function updateQuickAmount() {
var _local1 = 1;
while (_local1 <= 3) {
var _local3 = layout["p" + _local1].circle;
var _local2 = itemData[quickUse[_local1 - 1]][0].split(", ")[0];
if (quickUse[_local1 - 1] == -1) {
_local2 = "Empty";
}
var _local4 = getItemAmount(_local2);
if (_local2 == "Empty") {
_local3.amount.text = "";
} else {
_local3.amount.text = _local4;
}
var _local5 = getItemFrame(_local2);
_local3.myItem.gotoAndStop(_local5);
if ((_local4 <= 0) && (_local5 != "Empty")) {
quickUse[_local1 - 1] = -1;
updateInventory();
}
_local1++;
}
}
function getItemFrame(itemName) {
if ((itemName != "Empty") && (itemName != "Monster Blood")) {
return(_root.findNum(itemName, _root.itemData) + 9);
}
return(itemName);
}
function dragUseSquare(squareNum) {
layout.itemSquare.amount.text = layout["p" + squareNum].amount.text;
var _local1 = itemData[quickUse[squareNum - 1]][0].split(", ")[0];
layout.itemSquare.isSelected._visible = false;
layout.itemSquare.myItem.gotoAndStop(getItemFrame(_local1));
layout.itemSquare.myNum = undefined;
layout.itemSquare.squareNum = squareNum;
layout.itemSquare.myName = _local1;
dragging = true;
}
function dragSquare(squareNum, squareAmount, fromEquips) {
if (inventoryShowing != "equip") {
layout.itemSquare.amount.text = squareAmount;
} else {
layout.itemSquare.amount.text = "";
}
var _local3 = layout.inventory.list;
var _local2 = _root[inventoryShowing + "_item"];
layout.itemSquare.draggedFrom = "inventory";
if (fromEquips == true) {
_local3 = layout.equip;
_local2 = equips;
layout.itemSquare.draggedFrom = "equip";
layout.itemSquare.isSelected._visible = false;
} else {
layout.itemSquare.isSelected._visible = _local3["square" + squareNum].isSelected._visible;
}
layout.itemSquare.myItem.gotoAndStop(getItemFrame(_local2[squareNum][0].split(", ")[0]));
layout.itemSquare.amountCarried = squareAmount;
layout.itemSquare.myNum = squareNum;
layout.itemSquare.squareNum = undefined;
layout.itemSquare.myName = _local2[squareNum][0].split(", ")[0];
dragging = true;
}
function itemSquareHit() {
var _local3;
var _local5 = getDropWindow();
var _local6 = _local5._name;
var _local2 = _root[inventoryShowing + "_item"];
var _local4 = layout.itemSquare.myNum;
if (_local6 == "inventory") {
_local3 = 0;
while (_local3 < _root[inventoryShowing + "_slots"]) {
if (layout.inventory.list["square" + _local3].hitTest(_xmouse, _ymouse, true)) {
if (_local2[_local3][0].split(", ")[0] == "Empty") {
_local2[_local3] = _local2[_local4].concat();
slotAmount(_local2[_local4], layout.itemSquare.amountCarried, "minus");
} else if ((((_local2[_local4][0].split(", ")[1] != "equip") && (_local2[_local4][0].split(", ")[0] != "Monster Blood")) && (_local2[_local4][0].split(", ")[0] == _local2[_local3][0].split(", ")[0])) && ((getSlotAmount(_local2[_local4]) + getSlotAmount(_local2[_local3])) <= _local2[_local4][1].split(", ")[0])) {
slotAmount(_local2[_local3], layout.itemSquare.amountCarried, "plus");
slotAmount(_local2[_local4], layout.itemSquare.amountCarried, "minus");
} else {
tempSlot = _local2[_local3];
_local2[_local3] = _local2[_local4];
_local2[_local4] = tempSlot;
}
if (getSlotAmount(_local2[_local4]) < 1) {
_local2[_local4] = new Array();
_local2[_local4][0] = "Empty";
}
break;
}
_local3++;
}
} else if ((_local6 == "equip") && (inventoryShowing == "equip")) {
_local3 = 0;
while (_local3 < 6) {
if (layout.equip["square" + _local3].hitTest(_xmouse, _ymouse, true)) {
if ((_local3 == _local2[_local4][0].split(", ")[3]) && (validEquip(_local2[_local4]))) {
if (_root.equips[_local3][0].split(", ")[0] == "Empty") {
applyEquipStats(_local2[_local4], "Add");
_root.equips[_local3] = _local2[_local4].concat();
_local2[_local4] = new Array();
_local2[_local4][0] = "Empty";
playSound("putEquip");
} else {
tempSlot = _root.equips[_local3].concat();
_root.equips[_local3] = _local2[_local4].concat();
_local2[_local4] = tempSlot.concat();
applyEquipStats(_local2[_local4], "Remove");
applyEquipStats(_root.equips[_local3], "Add");
playSound("putEquip");
}
break;
}
}
_local3++;
}
} else if ((_local6 == "equip") && (inventoryShowing == "use")) {
_local3 = 0;
while (_local3 < 6) {
if (layout.equip["square" + _local3].hitTest(_xmouse, _ymouse, true)) {
if ((((_root.equips[_local3][0].splice(", ")[0] != "Empty") && (Number(_local2[_local4][0].split(", ")[3]) == 3)) && (Number(_root.equips[_local3][1].split(", ")[2]) > 0)) && (_local3 == Number(_local2[_local4][0].split(", ")[4]))) {
applyScroll(_root.equips[_local3], _local2[_local4]);
}
break;
}
_local3++;
}
} else if (_local6 == "store") {
popSell(_local4, _local2);
} else if (_local6 == "summon_wins") {
if ((inventoryShowing == "use") && (isSimplePotion(_local2[_local4]))) {
ps = 0;
while (ps < pets.length) {
_local5 = layout.summon_wins["summon_win" + ps];
if (_local5.hitTest(_xmouse, _ymouse, true)) {
givePotion(_local2[_local4], _local5.myPet);
}
ps++;
}
}
} else if (!((tutorialCounter >= 20) && (tutorialCounter <= 22))) {
if ((_local2[_local4][0].split(", ")[1] == "use") && (Number(_local2[_local4][0].split(", ")[3]) < 2)) {
useExists = checkUsePlace();
} else {
useExists = false;
}
if (!useExists) {
popDrop(_local4, _local2);
}
}
updateInventory();
updateEquips();
}
function getDropWindow() {
var _local3 = (layout.inventory != undefined) && (layout.inventory.hitTest(_xmouse, _ymouse, true));
var _local4 = (layout.equip != undefined) && (layout.equip.hitTest(_xmouse, _ymouse, true));
var _local5 = (layout.store != undefined) && (layout.store.hitTest(_xmouse, _ymouse, true));
var _local6 = (layout.summon_wins != undefined) && (layout.summon_wins.hitTest(_xmouse, _ymouse, true));
var _local2;
var _local1 = -1E17;
if ((layout.inventory.getDepth() > _local1) && (_local3)) {
_local1 = layout.inventory.getDepth();
_local2 = layout.inventory;
}
if ((layout.equip.getDepth() > _local1) && (_local4)) {
_local1 = layout.equip.getDepth();
_local2 = layout.equip;
}
if ((layout.store.getDepth() > _local1) && (_local5)) {
_local1 = layout.store.getDepth();
_local2 = layout.store;
}
if ((layout.summon_wins.getDepth() > _local1) && (_local6)) {
_local1 = layout.summon_wins.getDepth();
_local2 = layout.summon_wins;
}
return(_local2);
}
function sortAscendingNumbers(element1, element2) {
return(element1 - element2);
}
function sortItemsPriority(myArray) {
var _local1;
var _local3;
var _local4 = new Array();
_local1 = 0;
while (_local1 < myArray.length) {
_local4.push(myArray[_local1][5]);
_local1++;
}
_local4.sort(sortAscendingNumbers);
var _local5 = new Array();
_local3 = 0;
while (_local3 < _local4.length) {
_local1 = 0;
while (_local1 < myArray.length) {
if ((myArray[_local1][5] == _local4[_local3]) && (!appearIn(myArray[_local1], _local5))) {
_local5.push(myArray[_local1]);
}
_local1++;
}
_local3++;
}
return(_local5);
}
function dropItem(tempEnemy) {
var _local10 = getQuestDrops(tempEnemy);
var _local2 = _local10.concat(tempEnemy.drops);
if ((tempEnemy.skill == "Capture") && (tempEnemy.skillTimer > 0)) {
_local2.push(getMonsterBlood(tempEnemy));
}
var _local12 = luk;
if (_local12 > 100) {
_local12 = 100;
}
var _local11 = Math.round((_local12 / 100) * 25);
var _local1 = 0;
while (_local1 < _local2.length) {
var _local3 = _local2[_local1][0].split(", ")[0];
var _local7 = getQuestDropAmount(_local2[_local1][0].split(", ")[0]);
var _local9 = (random(100) + 1) + _local11;
var _local6;
if ((_local2[_local1][0].split(", ")[1] == "equip") || (_local3 == "Monster Blood")) {
_local6 = Number(_local2[_local1][1].split(", ")[0]);
} else {
_local6 = Number(_local2[_local1][1].split(", ")[1]);
}
var _local4 = appearInCodeArray(_local3, _local10);
if (_local9 >= (100 - _local6)) {
if (((!_local4) || (_local4 && ((getItemAmount(_local3) + itemOnField(_local3)) < _local7))) || (_local4 && (_local7 == 0))) {
var _local8 = tempEnemy._y;
if (tempEnemy.isNPC) {
_local8 = getCharGroundWithDif(2, tempEnemy);
}
newPickItem(_local2[_local1], tempEnemy._x, _local8, true);
}
}
_local1++;
}
}
function dropGold(tempEnemy) {
dropRate = random(100) + 1;
myGold = decideStat(tempEnemy.gold);
if (myGold > 0) {
goldArray = new Array("gold", myGold);
var _local2 = tempEnemy._y;
if (tempEnemy.isNPC) {
_local2 = getCharGroundWithDif(2, tempEnemy);
}
newPickItem(goldArray, tempEnemy._x, _local2);
}
}
function getMonsterBlood(tempEnemy) {
var _local9 = tempEnemy.health * -1;
var _local1 = Math.round(((level - tempEnemy.level) * Number(captureChance)) / 100);
if ((_local1 < 0) || (tempEnemy.isStatic)) {
_local1 = 0;
} else if (_local1 > 100) {
_local1 = 100;
}
var _local6 = tempEnemy.myName;
var _local8 = ("Blood of a " + getMonsterName(_local6)) + ".";
var _local5 = random(_local9);
var _local2 = Number(tempEnemy.level) + 1;
var _local7 = 0;
var _local12 = 0;
var _local10 = 0;
var _local13 = 0;
var _local11 = 0;
_local2 = _local2 + Math.round((_local2 * _local5) / 100);
var _local3 = new Array();
_local3.push((((("Monster Blood, use, " + _local8) + ", ") + _local6) + ", ") + _local7);
_local3.push((((_local1 + ", ") + _local2) + ", ") + _local5);
_local3.push(_local2);
return(insertAmount(_local3));
}
function getPetBlood(tempEnemy) {
var _local9 = 0;
var _local3 = tempEnemy.myName;
var _local4 = getMonsterName(_local3);
var _local6 = ("Noble blood of a " + _local4) + ".";
if (!getMonsterName(_local3, true)) {
_local6 = ("Call Ally " + _local4) + " to fight alongside with you.";
}
var _local8 = Math.round((tempEnemy.startHealth / Number(monsterData[findNum(tempEnemy.myName, monsterData)][1].split(", ")[3])) * 100) - 100;
var _local5 = Number(monsterData[findNum(_local3, monsterData)][1].split(", ")[2]);
var _local10 = 1;
var _local12 = tempEnemy.exp;
var _local7 = tempEnemy.maxExp;
var _local13 = tempEnemy.health;
var _local11 = tempEnemy.mana;
var _local2 = new Array();
_local2.push((((("Monster Blood, use, " + _local6) + ", ") + tempEnemy.myName) + ", ") + _local10);
_local2.push((((((((((((_local9 + ", ") + _local5) + ", ") + _local8) + ", ") + _local12) + ", ") + _local7) + ", ") + _local13) + ", ") + _local11);
_local2.push(_local5);
return(insertAmount(_local2));
}
function shopMonsterBlood(petName) {
var _local10 = monsterData[findNum(petName, monsterData)];
var _local8 = 0;
var _local2 = petName;
var _local3 = getMonsterName(_local2);
var _local5 = ("Blood of a " + _local3) + ".";
if (!getMonsterName(_local2, true)) {
_local5 = ("Call " + _local3) + " to help you.";
}
var _local6 = _local10[1].split(", ");
var _local7 = 0;
var _local4 = Number(_local6[2]) + 1;
var _local9 = 0;
var _local14 = 0;
var _local11 = 0;
var _local15 = 0;
var _local13 = 0;
var _local1 = new Array();
_local1.push((((("Monster Blood, use, " + _local5) + ", ") + _local2) + ", ") + _local9);
_local1.push((((_local8 + ", ") + _local4) + ", ") + _local7);
_local1.push(_local4);
return(insertAmount(_local1));
}
function shopPetBlood(petName) {
var _local12 = monsterData[findNum(petName, monsterData)];
var _local10 = 0;
var _local4 = petName;
var _local5 = getMonsterName(_local4);
var _local6 = ("Noble blood of a " + _local5) + ".";
if (!getMonsterName(_local4, true)) {
_local6 = ("Call Ally " + _local5) + " to fight alongside with you.";
}
var _local2 = _local12[1].split(", ");
var _local9 = 0;
var _local7 = Number(_local2[2]);
var _local11 = 1;
var _local14 = 0;
var _local8 = _root.decideShopStat(_local2[1]);
var _local15 = Number(_local2[3]);
var _local13 = Number(_local2[4]);
var _local3 = new Array();
_local3.push((((("Monster Blood, use, " + _local6) + ", ") + _local4) + ", ") + _local11);
_local3.push((((((((((((_local10 + ", ") + 0) + ", ") + _local9) + ", ") + _local14) + ", ") + _local8) + ", ") + _local15) + ", ") + _local13);
_local3.push(_local7);
return(insertAmount(_local3));
}
function unSummon(myPet) {
var _local1 = getPetBlood(myPet).concat();
if (addToSlot(_local1, true)) {
removePet(myPet);
addToSlot(_local1);
} else {
newError("Inventory is Full");
}
}
function levelPet(myPet) {
while (myPet.exp >= myPet.maxExp) {
myPet.exp = myPet.exp - myPet.maxExp;
myPet.maxExp = myPet.maxExp * 2;
var _local3 = monsterData[findNum(myPet.myName, monsterData)][1].split(", ");
var _local2 = Math.round((myPet.startHealth / Number(_local3[3])) * 100);
_local2 = _local2 + petPowerGrow;
_local2 = _local2 / 100;
myPet.level = 1 + Math.round(((_local2 * 100) - 100) / petPowerGrow);
myPet.health = (myPet.startHealth = Math.round(Number(_local3[3]) * _local2));
myPet.mana = (myPet.startMana = Math.round(Number(_local3[4]) * _local2));
myPet.minDmg = Math.round(Number(_local3[6]) * _local2);
myPet.maxDmg = Math.round(Number(_local3[7]) * _local2);
myPet.eMinDmg = Math.round(Number(_local3[8]) * _local2);
myPet.eMaxDmg = Math.round(Number(_local3[9]) * _local2);
myPet.accuracy = Math.round(Number(_local3[10]) * _local2);
myPet.avoidability = Math.round(Number(_local3[11]) * _local2);
myPet.defense = Math.round(Number(_local3[12]) * _local2);
myPet.resistance_Fire = Math.round(Number(_local3[13]) * _local2);
myPet.resistance_Ice = Math.round(Number(_local3[14]) * _local2);
myPet.resistance_Lightning = Math.round(Number(_local3[15]) * _local2);
}
}
function getQuestDrops(tEnemy) {
var _local7 = new Array();
var _local6 = 0;
while (_local6 < questDrops.length) {
var _local5 = questDrops[_local6].split(", ");
var _local4 = 0;
while (_local4 < _local5.length) {
var _local2 = _local5[_local4].split("-");
if (monsterData[Number(_local2[0])][0].split(", ")[0] == tEnemy.myName) {
var _local1 = itemData[Number(_local2[2])].concat();
if (_local2[3] != "a") {
var _local3 = _local1[1].split(", ");
if (_local1[0].split(", ")[1] == "equip") {
_local3[0] = Number(_local2[3]);
} else {
_local3[1] = Number(_local2[3]);
}
_local1[1] = _local3.join(", ");
}
if (_local1 != undefined) {
_local7.push(_local1);
}
}
_local4++;
}
_local6++;
}
return(_local7);
}
function getQuestDropAmount(itemName) {
var _local4 = 0;
while (_local4 < questDrops.length) {
var _local3 = questDrops[_local4].split(", ");
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = _local3[_local1].split("-");
if (itemData[Number(_local2[2])][0].split(", ")[0] == itemName) {
return(Number(_local2[1]));
}
_local1++;
}
_local4++;
}
}
function itemOnField(myItem) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < invItems.length) {
if (myItem == invItems[_local1].itemStats[0].split(", ")[0]) {
_local2 = _local2 + getSlotAmount(invItems[_local1].itemStats);
}
_local1++;
}
return(_local2);
}
function newEnemy(enemyType, X, Y, isPet, reAppear, overallBonus, realPet, questMonster) {
var _local11 = monsterData[findNum(enemyType, monsterData)];
var _local9 = false;
var _local3 = _local11[0].split(", ");
var _local12 = Number(_local3[4]);
if (_local12 == 1) {
if (!((myTime > 5) && (myTime < 18))) {
_local9 = true;
}
} else if (_local12 == 2) {
if ((myTime > 5) && (myTime < 18)) {
_local9 = true;
}
}
if (isPet == true) {
pet_n_a = _local9;
_local9 = false;
}
if (!_local9) {
var _local2;
var _local13 = _local3[0];
var _local14 = _local3[2];
if (!getMonsterName(_local13, true)) {
_local2 = field.attachMovie("character", "enemy" + field.getNextHighestDepth(), field.getNextHighestDepth());
_local2.isNPC = true;
_local2.myNum = Number(_local13);
_local2.attackExtension = getAttackExtension(_local2);
_local2.npcMc.attachMovie("shadow", "myShadow", _local2.npcMc.getNextHighestDepth());
_local2.npcMc.attachMovie("enemy_bars", "bars", _local2.npcMc.getNextHighestDepth());
createBounds(getCharMc(_local2), _local2.attackExtension);
} else {
_local2 = field.attachMovie("enemy_" + _local14, "enemy" + field.getNextHighestDepth(), field.getNextHighestDepth());
_local2.isNPC = false;
}
if (isNaN(X)) {
X = getRandomX(field.character);
Y = getRandomY();
}
_local2._x = X;
_local2._y = Y;
if (_local2.isNPC) {
_local2.npcMc.bars._y = 15;
}
_local2.myShadow._width = _local2._width;
_local2.questMonster = questMonster;
_local2.myName = _local13;
_local2.description = Number(_local3[1]);
_local2.linkage = _local14;
_local2.timeZone = _local12;
switch (Number(_local3[5])) {
case 0 :
_local2.behavior = "Normal";
break;
case 1 :
_local2.behavior = "Coward";
break;
case 2 :
_local2.behavior = "Agressive";
break;
case 3 :
_local2.behavior = "Dangerous";
break;
case 4 :
_local2.behavior = "Story";
}
eArr = _local3[6].split("-");
if (eArr[0] != 0) {
switch (Number(eArr[0])) {
case 1 :
_local2.myElement = "Fire";
break;
case 2 :
_local2.myElement = "Ice";
break;
case 3 :
_local2.myElement = "Lightning";
}
_local2.myElementChance = Number(eArr[1]);
_local2.myElementDuration = Number(eArr[2]) * 24;
} else {
_local2.myElement = "None";
_local2.myElementChance = 0;
_local2.myElementDuration = 0;
}
_local2.range = 0;
eArr = _local3[7].split("-");
switch (Number(eArr[0])) {
case 0 :
_local2.isMelee = true;
_local2.isRange = true;
break;
case 1 :
_local2.isMelee = true;
_local2.isRange = false;
break;
case 2 :
_local2.isMelee = false;
_local2.isRange = true;
}
if (_local2.isRange) {
_local2.range = Number(eArr[1]);
}
_local2.skill = _local3[8];
_local2.isBoss = _local3[9] == "1";
_local2.isStatic = _local3[10] == "1";
_local3 = _local11[1].split(", ");
var _local8 = 1;
if ((isPet == true) && (realPet != true)) {
_local8 = _local8 + (Math.floor(_root.wis / 2) / 100);
}
if (overallBonus != undefined) {
_local8 = _local8 + (overallBonus / 100);
}
_local2.gold = _local3[0];
_local2.exp = _local3[1];
_local2.level = Math.round(Number(_local3[2]) * _local8);
_local2.health = (_local2.startHealth = Math.round(Number(_local3[3]) * _local8));
_local2.mana = (_local2.startMana = Math.round(Number(_local3[4]) * _local8));
_local2.speed = Number(_local3[5]);
_local2.minDmg = Math.round(Number(_local3[6]) * _local8);
_local2.maxDmg = Math.round(Number(_local3[7]) * _local8);
_local2.eMinDmg = Math.round(Number(_local3[8]) * _local8);
_local2.eMaxDmg = Math.round(Number(_local3[9]) * _local8);
_local2.accuracy = Math.round(Number(_local3[10]) * _local8);
_local2.avoidability = Math.round(Number(_local3[11]) * _local8);
_local2.defense = Math.round(Number(_local3[12]) * _local8);
_local2.resistance_Fire = Math.round(Number(_local3[13]) * _local8);
_local2.resistance_Ice = Math.round(Number(_local3[14]) * _local8);
_local2.resistance_Lightning = Math.round(Number(_local3[15]) * _local8);
if (_local2.defense > 100) {
_local2.defense = 100;
}
if (_local2.resistance_Fire > 100) {
_local2.resistance_Fire = 100;
}
if (_local2.resistance_Ice > 100) {
_local2.resistance_Ice = 100;
}
if (_local2.resistance_Lightning > 100) {
_local2.resistance_Lightning = 100;
}
_local2.shotsData = _local11[2].split("@");
_local3 = _local11[3].split(", ");
_local2.drops = new Array();
var _local7 = 0;
while (_local7 < _local3.length) {
var _local5 = _local3[_local7].split("*");
var _local4 = itemData[Number(_local5[0])].concat();
if (_local5[1] != "a") {
var _local6 = _local4[1].split(", ");
if (_local4[0].split(", ")[1] == "equip") {
_local6[0] = Number(_local5[1]);
} else {
_local6[1] = Number(_local5[1]);
}
_local4[1] = _local6.join(", ");
}
if (_local4 != undefined) {
_local2.drops.push(_local4);
}
_local7++;
}
var _local10 = _local2;
if (_local2.isNPC) {
_local10 = _local2.npcMc.bars;
}
_local2.targetX = 0;
_local2.targeted = false;
_local2.panic = false;
_local2.element = "None";
_local2.slowMotion = 0;
_local2.attackSlowMotion = 0;
_local2.loadedData = false;
_local2.stop();
_local2.counter = 0;
_local2.timer = 5;
_local2.Xcounter = 0;
_local2.elementTimer = 0;
_local2.abandonCounter = 0;
_local2.abandonTimer = 100;
_local2.damageTimer = 20;
_local2.damageCounter = _local2.damageTimer;
_local2.healthBarTimer = 0;
_local2.manaBarTimer = 0;
_local2.chanceCounter = 0;
_local2.chanceTimer = 24;
_local2.maxDistance = Math.round(Stage.width * 0.666666666666667) + _local2.range;
_local2.skillTimer = -1;
_local2.controlTimer = -1;
_local2.leaving = false;
_local2.mySize = Math.round((_local2._y - _root.minHeight) / _root.perspectiveSize) + 100;
if (!_local2.isNPC) {
_local2._xscale = (_local2._yscale = _local2.mySize);
}
_local10.healthBar._alpha = 0;
_local10.manaBar._alpha = 0;
_local2.barStartScale = _local10.healthBar._xscale;
_local2.startManaBarY = _local10.manaBar._y;
_local2.barTimer = 120;
_local2.idleCounter = 0;
_local2.idleSkip = decideStat(monster_idle_timeout) * 24;
_local2.attackType = "melee";
_local2.stoppedAttacks = 0;
_local2.stoppedMovements = 0;
_local2.blinkCounter = 0;
if (isPet == true) {
_local2.isPet = true;
_local2.leaving = pet_n_a;
_local2.arrayType = "pets";
pets.push(_local2);
} else {
_local2.isPet = false;
_local2.arrayType = "enemies";
enemies.push(_local2);
}
if (reAppear == true) {
_local2._alpha = 0;
}
eGoto(_local2, monster_move);
_local2._visible = false;
return(_local2);
}
}
function updateEnemyBars(e) {
var _local3;
if (e._xscale > 0) {
_local3 = 1;
} else {
_local3 = -1;
}
var _local2 = e;
if (e.isNPC) {
_local2 = e.npcMc.bars;
}
_local2.healthBar.bar._xscale = (e.health / e.startHealth) * 100;
if (!e.isNPC) {
_local2.healthBar._xscale = e.barStartScale * _local3;
}
if (e.healthBarTimer > 0) {
e.healthBarTimer--;
} else if (_local2.healthBar._alpha > 0) {
_local2.healthBar._alpha = _local2.healthBar._alpha - 5;
}
_local2.manaBar.bar._xscale = (e.mana / e.startMana) * 100;
if (!e.isNPC) {
_local2.manaBar._xscale = e.barStartScale * _local3;
}
if (e.manaBarTimer > 0) {
e.manaBarTimer--;
} else if (_local2.manaBar._alpha > 0) {
_local2.manaBar._alpha = _local2.manaBar._alpha - 5;
}
if (_local2.healthBar._alpha <= 0) {
_local2.manaBar._y = _local2.healthBar._y;
} else {
_local2.manaBar._y = e.startManaBarY;
}
}
function popEnemyBar(e, barNum) {
var _local3 = e;
if (e.isNPC) {
_local3 = e.npcMc.bars;
}
var _local2;
if (barNum == 0) {
_local2 = "health";
} else if (barNum == 1) {
_local2 = "mana";
}
if (showBars == 1) {
_local3[_local2 + "Bar"]._alpha = 100;
e[_local2 + "BarTimer"] = e.barTimer;
}
}
function popHealthBar(e) {
popEnemyBar(e, 0);
}
function popManaBar(e) {
popEnemyBar(e, 1);
}
function eGoto(e, f) {
if (f == undefined) {
return(undefined);
}
var _local2 = f;
if ((_local2 == monster_hit) && ((e._currentframe == monster_attack) || (e._currentframe == monster_rangeattack))) {
e.stoppedAttacks++;
}
if (e.isNPC) {
e.isCharge = _local2 == monster_charge;
e.isCooldown = _local2 == monster_cooldown;
e.isHit = _local2 == monster_hit;
_local2 = toNpcFrame(e, f);
if (f == monster_attack) {
if (slash(false, e)) {
faceToTarget(e);
}
return(undefined);
}
}
e.gotoAndStop(_local2);
if (e.isNPC) {
updateCharacterEquips(e.myNum, e);
}
}
function eCurrentframe(e, f) {
var _local2 = f;
if (e.isNPC) {
_local2 = toNpcFrame(e, f);
}
var _local3 = true;
if (e.isNPC) {
switch (f) {
case monster_move :
_local3 = (_local2 == npc_walk) && (!e.isCharge);
break;
case monster_cooldown :
_local3 = (_local2 == npc_idle) && (!e.isCooldown);
break;
case monster_charge :
_local3 = (_local2 == npc_walk) && (e.isCharge);
break;
case monster_hit :
_local3 = (_local2 == npc_hit) && (e.isHit);
break;
case monster_attack :
_local3 = _local2 == getNpcAtkFrame(e);
break;
case monster_rangeattack :
_local3 = _local2 == getNpcAtkFrame(e);
}
}
return((e._currentframe == _local2) && (_local3));
}
function toNpcFrame(e, f) {
switch (f) {
case monster_move :
return(npc_walk);
case monster_cooldown :
return(npc_idle);
case monster_charge :
return(npc_walk);
case monster_hit :
return(npc_hit);
case monster_attack :
return(getNpcAtkFrame(e));
case monster_rangeattack :
return(getNpcAtkFrame(e));
}
return(f);
}
function getNpcWeaponArray(e) {
return(itemData[findNum(toEquipsNames(npcData[e.myNum][1].split(", "))[3], itemData)][4].split(", "));
}
function getNpcAtkFrame(e) {
return(getAtkNum(getNpcWeaponArray(e)[3]));
}
function getNpcAtkName(e) {
return(getNpcWeaponArray(e)[3]);
}
function getNpcAtkBoost(e) {
var _local1 = getNpcWeaponArray(e)[4];
if (_local1 == undefined) {
return(2);
}
return(Number(_local1));
}
function faceToTarget(e) {
var _local2;
if (e.targeted == true) {
_local2 = field.character;
} else {
_local2 = e.targeted;
}
var _local3;
if (_local2 == field.character) {
_local3 = getCharGroundWithDif(2);
if (e.isNPC) {
if (jumping) {
_local3 = ground;
} else {
_local3 = field.character._y;
}
}
} else {
_local3 = _local2._y;
}
if ((((e.attackType == "melee") && (((e.targeted == true) && (e.hitTest(field.character.body))) || ((e.targeted != true) && (e.hitTest(_local2))))) && (Math.abs(e._y - _local3) < maxCloseY)) || (((e.attackType == "range") && (Math.abs(e._x - e.targetX) <= pc(e.speed))) && (Math.abs(e._y - e.targetY) <= pc(e.speed / 2)))) {
e.sideLeft = e._x > _local2._x;
}
}
function getTargetY(e, myEnemy) {
var _local2;
var _local3 = e._y;
if ((e == field.character) && (myEnemy != undefined)) {
e.isNPC = true;
e.targeted = myEnemy;
if (jumping) {
_local3 = ground;
} else {
_local3 = field.character._y;
}
}
if (e.targeted == true) {
_local2 = getCharGroundWithDif(2);
if (e.isNPC) {
if (jumping) {
_local2 = ground;
} else {
_local2 = field.character._y;
}
}
} else if ((!e.isNPC) && (e.targeted.isNPC)) {
_local2 = getCharGroundWithDif(2, e.targeted);
} else if (e.isNPC && (!e.targeted.isNPC)) {
_local2 = e.targeted._y - (getCharGroundWithDif(2, e) - _local3);
} else {
_local2 = e.targeted._y;
}
if ((e == field.character) && (myEnemy != undefined)) {
e.isNPC = undefined;
e.targeted = undefined;
}
return(_local2);
}
function enemyBehavior(e) {
if (!_root.gamePause) {
e._visible = true;
if (e.hitTest(_root.camera)) {
updateStats(e.myName, "monster", 0);
}
if (e != pointOn) {
e.filters = null;
if (e.skillTimer > 0) {
applyEnemyGlow(e);
}
setFilters(e);
}
if ((e.element != "None") && (e.elementTimer > 0)) {
e.elementTimer--;
_root.attachElement(e);
} else {
e.element = "None";
_root.reColor(e, "reset", 0);
}
if (e.element == "Ice") {
e.mySlowMotion = _root.slowMotion + Math.round(e.elementTimer / 10);
} else if (e.element == "Lightning") {
e.mySlowMotion = 99999 /* 0x01869F */;
} else {
e.mySlowMotion = _root.slowMotion;
}
if (e.isStatic) {
e.targeted = false;
}
if ((e.targeted != true) && (((!e.isPet) && (!e.targeted.isPet)) || (e.isPet && (e.targeted.isPet)))) {
e.targeted = false;
}
updateEnemyBars(e);
if (e.isShooting) {
var _local7 = e.targeted;
if (e.targeted == true) {
_local7 = field.character;
}
if ((e.shotsCounter >= Number(e.shots[0][13])) && (e.shots.length > 0)) {
if (e.mana >= Number(e.shots[0][11])) {
e.mana = e.mana - Number(e.shots[0][11]);
if (Number(e.shots[0][11]) > 0) {
popManaBar(e);
}
newShot(e, e.shots[0]);
}
e.shots.splice(0, 1);
checkManaForShots(e);
e.shotsCounter = 0;
} else {
var _local19 = e.shots[0][5];
if (_local19 == "none") {
e.mc.charge._visible = false;
} else {
var _local20 = e.mc["spawnCor" + e.shots[0][10]];
e.mc.charge._visible = true;
e.mc.charge.gotoAndStop(_local19);
e.mc.charge._x = _local20._x;
e.mc.charge._y = _local20._y;
e.mc.charge._xscale = (e.mc.charge._yscale = Number(e.shots[0][8]));
}
e.shotsCounter++;
}
var _local15 = Math.abs(_local7._x - e._x);
var _local10 = e.targeted._y;
if (e.targeted == true) {
_local10 = getCharGroundWithDif(2);
}
if ((((_local15 > e.range) || (_local15 < (e.range / 2))) || (Math.abs(e._y - _local10) > maxCloseY)) || (((e.targeted == true) && (_root.damageCounter < _root.damageTimer)) || ((e.targeted != true) && (e.targeted.damageCounter < e.targeted.damageTimer)))) {
e.shots = new Array();
}
if (e.shots.length == 0) {
e.isShooting = false;
e.mc.charge.removeMovieClip();
}
return(undefined);
}
if (e.targeted == false) {
var _local21 = e.isPet && (Math.abs(e._x - e.targetX) > 100);
if (_local21) {
e.idleCounter = 1;
e.idleSkip = 0;
}
if ((e.idleCounter == 1) && (e.idleSkip == 0)) {
e.idleCounter = 0;
e.idleSkip = decideStat(monster_idle_timeout) * 24;
eGoto(e, monster_move);
} else if (e.idleCounter > 0) {
e.idleCounter--;
}
if ((e.idleSkip == 1) && (e.idleCounter == 0)) {
e.idleSkip = 0;
e.idleCounter = decideStat(monster_idle_duration) * 24;
if (!_local21) {
eGoto(e, monster_idle);
}
} else if (e.idleSkip > 0) {
e.idleSkip--;
}
} else if (eCurrentframe(e, monster_idle)) {
e.idleCounter = 0;
e.idleSkip = decideStat(monster_idle_timeout) * 24;
eGoto(e, moster_move);
}
if (!e.isNPC) {
e.myShadow._width = e.mc._width;
e.myShadow._x = e.mc.getBounds(e).xMin + (e.myShadow._width / 2);
}
if ((e.targeted == false) && (!e.isPet)) {
if (eCurrentframe(e, monster_charge) || (eCurrentframe(e, monster_attack))) {
eGoto(e, monster_move);
}
if ((!e.isNPC) && ((e.minDmg + e.eMinDmg) > 0)) {
var _local10 = getCharGroundWithDif(2);
if (e.isNPC) {
if (jumping) {
_local10 = ground;
} else {
_local10 = field.character._y;
}
}
if ((((e.hitTest(_root.field.character.body) && (e._alpha == 100)) && (Math.abs(e._y - _local10) < maxCloseY)) && (_root.damageCounter == _root.damageTimer)) && (!underground)) {
if (_root.attemptHit(e.accuracy, _root.avoidability + _root.avoidabilityBonus)) {
myDmg = Math.round(_root.getDamage(e.minDmg, e.maxDmg) / 3);
finalDmg = Math.round((myDmg * (100 - _root.defense)) / 100);
if ((!e.isNPC) && (finalDmg > (_root.health / 10))) {
if (!jumping) {
ground = (jY = field.character._y);
jumping = true;
}
jump = 8;
dashX = 7;
if (e._x > field.character._x) {
dashX = dashX * -1;
}
}
_root.health = _root.health - finalDmg;
_root.damaged(field.character._x, field.character._y, finalDmg, "C", true);
if (finalDmg != 0) {
_root.damageCounter = 0;
}
} else if (finalDmg > 0) {
_root.newDigits(field.character._x, field.character._y, -1, 1, false);
_root.damageCounter = 0;
_root.missedAttack = true;
}
}
var _local5 = 0;
while (_local5 < pets.length) {
var _local3 = pets[_local5];
if (((e.hitTest(_local3) && (_local3.damageCounter == _local3.damageTimer)) && (e._alpha == 100)) && (Math.abs(e._y - _local3._y) < maxCloseY)) {
if (_root.attemptHit(e.accuracy, _local3.avoidability)) {
myDmg = Math.round(_root.getDamage(e.minDmg, e.maxDmg) / 3);
finalDmg = Math.round((myDmg * (100 - _local3.defense)) / 100);
if ((((!e.isNPC) && (finalDmg > (_local3.health / 10))) && (_local3.stoppedMovements < 1)) && (_local3.targeted == false)) {
_local3.dashX = 7;
if (e._x > _local3._x) {
_local3.dashX = _local3.dashX * -1;
}
_local3.stoppedMovements++;
} else {
_local3.stoppedMovements = 0;
}
_local3.health = _local3.health - finalDmg;
_root.damaged(_local3._x, _local3._y, finalDmg, "C", true);
if (Math.round(finalDmg) != 0) {
_local3.damageCounter = 0;
}
} else if (finalDmg > 0) {
_root.newDigits(_local3._x, _local3._y, -1, 1, false);
_local3.damageCounter = 0;
_local3.missedAttack = true;
}
}
_local5++;
}
}
if (e.behavior == "Coward") {
e.chanceToAttack = 15;
e.minLevel = 1;
e.maxLevel = Math.floor(e.level / 2);
} else if (e.behavior == "Agressive") {
e.chanceToAttack = 30;
e.minLevel = Math.floor(0.8 * e.level);
e.maxLevel = Math.floor(e.level * 1.5);
} else if (e.behavior == "Dangerous") {
e.chanceToAttack = 50;
e.minLevel = 1;
e.maxLevel = Math.floor(e.level * 1.5);
} else if (e.behavior == "Story") {
e.chanceToAttack = 100;
e.minLevel = 1;
e.maxLevel = e.level * 100;
} else {
e.chanceToAttack = 0;
e.minLevel = 0;
e.maxLevel = 0;
}
if (e.isBoss) {
e.chanceToAttack = 100;
e.chanceCounter = e.chanceTimer;
}
if (e.chanceCounter >= e.chanceTimer) {
if (successRate(e.chanceToAttack)) {
e.targeted = getEnemyTarget(e);
}
e.chanceCounter = 0;
} else {
e.chanceCounter++;
}
}
if (e.panic) {
if (_root.panic) {
myPanic.gotoAndStop(2);
}
myX = random(e._width / 4);
if (random(2) == 1) {
myX = myX * -1;
}
_root.newFX("panic_flow", e._x + myX, e._y);
if (!_root.panic) {
if (_root.panicChance(e.level)) {
myPanic.gotoAndPlay(2);
e.targeted = false;
} else {
myPanic.gotoAndPlay(25);
}
e.panic = false;
}
}
var _local12 = e.myShadow;
if (e.isNPC) {
_local12 = e.npcMc.myShadow.shadowMc;
}
if (e.targeted == true) {
_local12.gotoAndStop(2);
} else if (e.targeted == false) {
_local12.gotoAndStop(1);
} else {
_local12.gotoAndStop(3);
}
if (e.leaving) {
e.targeted = false;
if (e._alpha > 0) {
e._alpha--;
} else if (e.isPet) {
if (e.realPet == true) {
unSummon(e);
} else {
removePet(e);
}
} else {
removeEnemy(e);
}
} else if (e._alpha < 100) {
e._alpha++;
}
if (e.targeted != false) {
if (Math.abs(e.targetX - e._x) > e.maxDistance) {
e.abandonCounter++;
} else {
e.abandonCounter = 0;
}
} else {
e.abandonCounter = 0;
}
if (e.abandonCounter >= e.abandonTimer) {
e.targeted = false;
}
if ((((e._x > (e.targetX - (e.speed / 1.1))) && (e._x < (e.targetX + (e.speed / 1.1)))) && (e._y > (e.targetY - (e.speed / 1.1)))) && (e._y < (e.targetY + (e.speed / 1.1)))) {
e.Xcounter = e.Xtimer;
e._x = e.targetX;
e._y = e.targetY;
}
if (e.damageCounter < e.damageTimer) {
e.damageCounter++;
}
if (e.isPet) {
if (e.damageCounter < e.damageTimer) {
if (e.blinkCounter >= cpc(3)) {
if (e.missedAttack != true) {
e._visible = !e._visible;
}
e.blinkCounter = 0;
} else {
e.blinkCounter++;
}
} else {
e._visible = true;
e.missedAttack = false;
}
}
var _local7 = e.targeted;
if (e.targeted == true) {
_local7 = field.character;
}
if (!eCurrentframe(e, monster_hit)) {
if ((((!eCurrentframe(e, monster_move)) && (!eCurrentframe(e, monster_idle))) && (!eCurrentframe(e, monster_cooldown))) && (((e.targeted == undefined) || (e.targeted._x == undefined)) && (((e.targeted != true) && (e.targeted != false)) || (((!e.isPet) && (!e.targeted.isPet)) && (e.targeted != true))))) {
eGoto(e, monster_move);
if (!e.isPet) {
e.chanceToAttack = 100;
e.targeted = _root.getEnemyTarget(e);
} else {
e.targeted = false;
}
}
var _local10 = getTargetY(e);
var _local13 = _root.getShots(e).length;
var _local11 = _local7;
if ((_local7 == field.character) || (_local7.isNPC)) {
_local11 = _local7.body;
}
if ((e.attackType == "melee") && ((((((e.targeted == true) && (e.hitTest(_local11))) && (_root.damageCounter == _root.damageTimer)) && (Math.abs(e._y - _local10) < maxCloseY)) && (!underground)) || ((((e.targeted._x != undefined) && (e.hitTest(_local11))) && (e.targeted.damageCounter == e.targeted.damageTimer)) && (Math.abs(e._y - _local10) < maxCloseY)))) {
eGoto(e, monster_attack);
e.targetX = e._x;
} else if ((e.attackType == "melee") && ((((((e.targeted == true) && (e.hitTest(_local11))) && (_root.damageCounter < _root.damageTimer)) && (Math.abs(e._y - _local10) < maxCloseY)) && (!underground)) || ((((e.targeted._x != undefined) && (e.hitTest(_local11))) && (e.targeted.damageCounter < e.targeted.damageTimer)) && (Math.abs(e._y - _local10) < maxCloseY)))) {
var _local16 = e.mc;
if (e.isNPC) {
_local16 = getCharMc(e);
}
if ((!eCurrentframe(e, monster_attack)) || (eCurrentframe(e, monster_attack) && (_local16._currentframe == _local16._totalframes))) {
if ((e._x == e.targetX) && (e._y == e.targetY)) {
eGoto(e, monster_cooldown);
} else {
eGoto(e, monster_charge);
}
}
} else if (((e.attackType == "range") && (((((e._x == e.targetX) && (e._y == e.targetY)) && (Math.abs(_local7._x - e._x) <= e.range)) && (Math.abs(_local7._x - e._x) >= (e.range / 2))) && (((((e.targeted == true) && (_root.damageCounter == _root.damageTimer)) && (Math.abs(e._y - _local10) < maxCloseY)) && (!underground)) || (((e.targeted._x != undefined) && (e.targeted.damageCounter == e.targeted.damageTimer)) && (Math.abs(e._y - e.targeted._y) < maxCloseY))))) && (_local13 > 0)) {
eGoto(e, monster_rangeattack);
} else if ((e.attackType == "range") && (((((e.targeted == true) && ((_root.damageCounter < _root.damageTimer) || (_local13 == 0))) && (Math.abs(e._y - _local10) < maxCloseY)) && (!underground)) || (((e.targeted._x != undefined) && ((e.targeted.damageCounter < e.targeted.damageTimer) || (_local13 == 0))) && (Math.abs(e._y - e.targeted._y) < maxCloseY)))) {
if ((!eCurrentframe(e, monster_rangeattack)) || (eCurrentframe(e, monster_rangeattack) && (e.mc._currentframe == e.mc._totalframes))) {
if ((e._x == e.targetX) && (e._y == e.targetY)) {
eGoto(e, monster_cooldown);
} else {
eGoto(e, monster_charge);
}
}
if (_local13 == 0) {
e.mana++;
popManaBar(e);
}
} else {
if (e.isRange && (e.isMelee)) {
if ((Math.abs(_local7._x - e._x) < (e.range / 2)) || (_root.getShots(e).length == 0)) {
e.attackType = "melee";
} else {
e.attackType = "range";
}
} else if (e.isRange) {
e.attackType = "range";
} else if (e.isMelee) {
e.attackType = "melee";
}
var _local15 = 0;
if (e.attackType == "range") {
_local15 = e.range;
}
if (e.targeted != false) {
e.Xtimer = 50;
if (e.Xcounter >= e.Xtimer) {
setTargetX(e, _local15);
e.targetY = getTargetY(e);
if (e.attackType == "range") {
e.targetX = fixEnemyRange(e, e.targetX);
}
fixEnemyTargetX(e);
if ((e.attackType == "range") && enemyOnEdge(e)) {
setTargetX(e, _local15, true);
}
e.Xcounter = 0;
} else {
e.Xcounter++;
}
var _local18 = eCurrentframe(e, monster_attack) || (eCurrentframe(e, monster_rangeattack));
var _local16 = e.mc;
if (e.isNPC) {
_local16 = getCharMc(e);
}
if ((!_local18) || (_local18 && (_local16._currentframe == _local16._totalframes))) {
eGoto(e, monster_charge);
}
} else if (e.targeted == false) {
if (e.isPet) {
e.targeted = _root.getTarget(e);
}
e.Xtimer = 100;
if ((e.Xcounter >= e.Xtimer) || (e.targetX == 0)) {
if (e.isPet) {
e.targetX = field.character._x;
var _local17 = field.character._width + (field.character._width * random(Math.ceil(pets.length / 2) + 1));
if (sideRight) {
e.targetX = e.targetX - _local17;
} else {
e.targetX = e.targetX + _local17;
}
e.targetY = getCharGroundWithDif(2);
if (e.isNPC) {
if (jumping) {
e.targetY = ground;
} else {
e.targetY = field.character._y;
}
}
} else {
e.targetX = getRandomX(e);
}
fixEnemyTargetX(e);
e.Xcounter = 0;
} else {
e.Xcounter++;
}
}
}
}
if (((e.health <= 0) && (e.myName != undefined)) && (!e.isPet)) {
if (e.linkage != "block") {
expCal = _root.decideStat(e.exp);
if (expCal > 0) {
if ((e.skill == "Capture") && (e.skillTimer > 0)) {
expCal = expCal + Math.round((expCal * Number(captureEnpower)) / 100);
}
if (_root.combos > 1) {
_root.exp = _root.exp + Math.round(expCal * (1 + (combos / 10)));
_root.addEventToLog("comboexp", expCal);
} else {
tPet = _root.getPet();
if ((tPet != false) && (e.targeted == tPet)) {
tPet.exp = tPet.exp + expCal;
if (tPet.exp >= tPet.maxExp) {
levelPet(tPet);
}
} else {
_root.addEvent("exp", expCal);
}
}
}
_root.dropGold(e);
_root.dropItem(e);
_root.updateStats(e.myName, "monster", 1);
_root.killed++;
_root.updateBlock(e);
if (((!e.isBoss) && (!e.isNPC)) && (!e.isStatic)) {
_root.needToDuplicate.push(findNum(e.myName, monsterData));
}
var _local22 = e.myName;
if (!e.isStatic) {
_root.newFX("blood", e);
_root.playSound("splitBlood", myBlood);
e.myName = undefined;
}
_root.killQuest(_local22);
}
if ((!e.isStatic) || (e.isStatic && (e.isBoss))) {
_root.removeEnemy(e);
} else {
e._alpha = 0;
e.health = e.startHealth;
e.healthBar._alpha = 0;
e.manaBar._alpha = 0;
}
}
if (((e.health <= 0) && (e.myName != undefined)) && (e.isPet)) {
if (e.realPet == true) {
e.health = -2880;
unSummon(e);
} else {
_root.newFX("blood", e);
_root.playSound("splitBlood", myBlood);
_root.removePet(e);
}
}
if (eCurrentframe(e, monster_hit)) {
if (e.counter < e.timer) {
e.counter++;
} else {
e.counter = 0;
if (e.targeted == false) {
eGoto(e, monster_move);
} else {
eGoto(e, monster_charge);
}
}
}
if ((((((e.slowMotion >= e.mySlowMotion) && (!eCurrentframe(e, monster_hit))) && (!eCurrentframe(e, monster_attack))) && (!eCurrentframe(e, monster_rangeattack))) && (!eCurrentframe(e, monster_idle))) && (!eCurrentframe(e, monster_cooldown))) {
var _local8 = Math.floor(e.speed / 2);
if (eCurrentframe(e, monster_charge)) {
_local8 = e.speed;
}
if (Math.floor(Math.abs(e._x - e.targetX)) <= pc(_local8)) {
e.targetX = e._x;
e.Xcounter = e.Xtimer;
}
if (Math.floor(Math.abs(e._y - e.targetY)) <= pc(_local8 / 2)) {
e.targetY = e._y;
}
if ((Math.round(e.targetX) > Math.round(e._x)) && (!e.hitTest(_root.blockLimit))) {
e.sideLeft = false;
e._x = e._x + pc(_local8);
} else if (Math.round(e.targetX) < Math.round(e._x)) {
e.sideLeft = true;
e._x = e._x - pc(_local8);
}
if (Math.round(e.targetY) > Math.round(e._y)) {
e._y = e._y + pc(_local8 / 2);
} else if (Math.round(e.targetY) < Math.round(e._y)) {
e._y = e._y - pc(_local8 / 2);
}
e.slowMotion = 0;
} else {
e.slowMotion++;
}
e.moveMC.stop();
if (e.attackSlowMotion >= e.mySlowMotion) {
e.attackSlowMotion = 0;
if (eCurrentframe(e, monster_charge) || ((!e.isNPC) && (eCurrentframe(e, monster_attack) || (eCurrentframe(e, monster_rangeattack))))) {
faceToTarget(e);
}
var _local9 = 1;
if (e.isNPC && (eCurrentframe(e, monster_attack))) {
_local9 = pc(getNpcAtkBoost(e)) + 1;
}
var _local4 = e.mc;
if (e.isNPC) {
_local4 = getCharMc(e);
}
var _local6 = 0;
while (_local6 < _local9) {
_local4.nextFrame();
if (e.isNPC && (eCurrentframe(e, monster_attack))) {
fadeSlash(e);
}
if (_local4._currentframe == _local4._totalframes) {
if (!(eCurrentframe(e, monster_attack) || (eCurrentframe(e, monster_rangeattack)))) {
if (e.isNPC && (e._currentframe == npc_walk)) {
_local4.gotoAndStop(6);
} else {
_local4.gotoAndStop(1);
}
} else {
eGoto(e, monster_cooldown);
e.stoppedAttacks = 0;
}
}
_local6++;
}
} else {
e.attackSlowMotion++;
}
if (e.dashX > 0) {
e.dashX--;
} else if (e.dashX < 0) {
e.dashX++;
}
e_dashSpeed = e.dashX * 5;
if (e_dashSpeed != 0) {
e._x = e._x + e_dashSpeed;
if (e.hitTest(blockLimit)) {
e._x = e._x - Math.abs(Number(e_dashSpeed));
} else if (e.hitTest(field.limitStart)) {
e._x = e._x + Math.abs(Number(e_dashSpeed));
}
}
e.mySize = Math.round((e._y - _root.minHeight) / _root.perspectiveSize) + 100;
if (e.isNPC) {
e.mySize = e.mySize + (basicCharacterScale - 100);
}
if ((!e.isNPC) && (!e.isStatic)) {
if (e.sideLeft) {
e._xscale = e.mySize;
} else {
e._xscale = -e.mySize;
}
e._yscale = e.mySize;
}
if (e.skillTimer == 0) {
applyEnemySkill(e, "remove");
e.skillTimer = -240;
} else if (e.skillTimer > -1) {
e.skillTimer--;
}
if (e.skillTimer < -1) {
e.skillTimer++;
}
if (((e.skill != "None") && (e.targeted != false)) && (e.skillTimer == -1)) {
var _local14 = Math.round((e.health / e.startHealth) * 100);
if ((((e.skill == "Rage") && (e.mana >= 20)) && (_local14 < 70)) && (successRate(3))) {
applyEnemySkill(e, "add");
e.mana = e.mana - 20;
popManaBar(e);
} else if ((((e.skill == "Berserk") && (e.mana >= 30)) && (_local14 < 30)) && (successRate(5))) {
applyEnemySkill(e, "add");
e.mana = e.mana - 30;
popManaBar(e);
} else if ((((e.skill == "Defense Up") && (e.mana >= 10)) && (_local14 < 80)) && (successRate(2))) {
applyEnemySkill(e, "add");
e.mana = e.mana - 10;
popManaBar(e);
} else if ((((e.skill == "Absolute Defense") && (e.mana >= 30)) && (_local14 < 10)) && (successRate(20))) {
applyEnemySkill(e, "add");
e.mana = e.mana - 30;
popManaBar(e);
}
}
if (e.controlTimer == 0) {
e.controlTimer = -1;
switchType(e);
} else if (e.controlTimer > -1) {
e.controlTimer--;
}
updateEnemyBars(e);
if (e.isNPC) {
updateCharacterEquips(e.myNum, e);
if (e.sideLeft) {
e.mcBounds._x = -e.attackExtension;
} else {
e.mcBounds._x = 0;
}
}
}
if ((e.linkage == "block") || (e.isStatic)) {
e._xscale = e.mySize;
}
}
function setTargetX(e, myRange, swapSides) {
if (swapSides == undefined) {
swapSides = false;
}
if ((e.targeted == true) && ((!e.isNPC) || (e.isNPC && (!eCurrentframe(e, monster_attack))))) {
e.targetX = getCharacterTargetX(e, myRange, swapSides);
if (e.isNPC) {
e.targetX = getCharacterTargetX(e, myRange, swapSides, undefined, true);
}
} else {
e.targetX = getTargetX(e, e.targeted, myRange, swapSides);
if ((!e.isNPC) && (e.targeted.isNPC)) {
e.targetX = getCharacterTargetX(e, myRange, swapSides, e.targeted);
} else if (e.isNPC && (e.targeted.isNPC)) {
e.targetX = getCharacterTargetX(e, myRange, swapSides, e.targeted, true);
}
}
}
function updateBlock(e) {
var _local2 = _root.appearNumInArray(findNum(e.myName, monsterData), _root.stageBlock[0]);
if (_local2 != -1) {
_root.stageBlock[0].splice(_local2, 1);
if ((stageBlock[0].length == 0) && (blockLimit != field.limitEnd)) {
cancelLimit(blockLimit);
stageBlock.splice(0, 1);
}
}
}
function getTargetX(myEnemy, myTarget, range, swapSides) {
var _local6 = myTarget._width;
if (range == undefined) {
range = 0;
} else {
range = range - _local6;
}
var _local3 = myEnemy._x > myTarget._x;
if (swapSides == true) {
_local3 = !_local3;
}
var _local2 = myEnemy.mc;
if (myEnemy.isNPC) {
_local2 = getCharMc(myEnemy);
}
if (_local3) {
return((myTarget.mc.getBounds(field).xMax + ((myEnemy._x - _local2.getBounds(field).xMin) / 2)) + range);
}
return((myTarget.mc.getBounds(field).xMin - ((_local2.getBounds(field).xMax - myEnemy._x) / 2)) - range);
}
function getCharacterTargetX(myEnemy, range, swapSides, myCharacter, vsNPC) {
if (myCharacter == undefined) {
myCharacter = field.character;
}
var _local2 = getCharMc(myCharacter);
var _local6 = myCharacter._width;
if (range == undefined) {
range = 0;
} else {
range = range - _local6;
}
var _local3 = myEnemy._x > myCharacter._x;
if (swapSides == true) {
_local3 = !_local3;
}
if (vsNPC == true) {
if (_local3) {
return((_local2.head.getBounds(field).xMax + myEnemy.attackExtension) + 10);
}
return((_local2.head.getBounds(field).xMin - myEnemy.attackExtension) - 10);
}
if (_local3) {
return((_local2.head.getBounds(field).xMax + ((myEnemy._x - myEnemy.mc.getBounds(field).xMin) / 2)) + range);
}
return((_local2.head.getBounds(field).xMin - ((myEnemy.mc.getBounds(field).xMax - myEnemy._x) / 2)) - range);
}
function fixEnemyRange(e, myX) {
var _local1 = e.targeted;
if (e.targeted == true) {
_local1 = field.character;
}
var _local4 = Math.abs(_local1._x - myX);
if (_local4 > e.range) {
var _local5 = Math.ceil(_local4 - e.range) + 5;
if (myX > _local1._x) {
return(myX - _local5);
}
return(myX + _local5);
}
return(myX);
}
function turnToPet(myEnemy, timePeriod) {
switchType(myEnemy);
myEnemy.myPosition = "Brutal";
myEnemy.controlTimer = (myEnemy.startControlTimer = timePeriod * 24);
}
function switchType(myEnemy) {
var _local1;
if (!myEnemy.isPet) {
_local1 = 0;
while (_local1 < enemies.length) {
if (enemies[_local1] == myEnemy) {
enemies.splice(_local1, 1);
break;
}
_local1++;
}
pets.push(myEnemy);
myEnemy.isPet = true;
myEnemy.arrayType = "pets";
} else if (myEnemy.isPet) {
_local1 = 0;
while (_local1 < pets.length) {
if (pets[_local1] == myEnemy) {
pets.splice(_local1, 1);
if (layout.summon_wins.hitTest(_xmouse, _ymouse, true)) {
layout.chat._visible = false;
layout.chat._alpha = 100;
}
layout.summon_wins["summon_win" + pets.length].removeMovieClip();
break;
}
_local1++;
}
enemies.push(myEnemy);
myEnemy.isPet = false;
myEnemy.arrayType = "enemies";
}
myEnemy.targeted = false;
}
function applyEnemySkill(myEnemy, applyType, myPer) {
puFX(myEnemy, applyType);
if (applyType == "add") {
myEnemy.base_level = myEnemy.level;
myEnemy.base_startHealth = myEnemy.startHealth;
myEnemy.base_startMana = myEnemy.startMana;
myEnemy.base_defense = myEnemy.defense;
myEnemy.base_speed = myEnemy.speed;
myEnemy.base_minDmg = myEnemy.minDmg;
myEnemy.base_maxDmg = myEnemy.maxDmg;
myEnemy.base_eMinDmg = myEnemy.eMinDmg;
myEnemy.base_eMaxDmg = myEnemy.eMaxDmg;
myEnemy.base_resistance_Fire = myEnemy.resistance_Fire;
myEnemy.base_resistance_Ice = myEnemy.resistance_Ice;
myEnemy.base_resistance_Lightning = myEnemy.resistance_Lightning;
myEnemy.base_gold = myEnemy.gold;
myEnemy.base_exp = myEnemy.exp;
} else {
var _local3 = myEnemy.health / myEnemy.startHealth;
var _local4 = myEnemy.mana / myEnemy.startMana;
myEnemy.level = myEnemy.base_level;
myEnemy.startHealth = myEnemy.base_startHealth;
myEnemy.startMana = myEnemy.base_startMana;
myEnemy.health = Math.round(myEnemy.base_startHealth * _local3);
myEnemy.mana = Math.round(myEnemy.base_startMana * _local4);
myEnemy.defense = myEnemy.base_defense;
myEnemy.speed = myEnemy.base_speed;
myEnemy.minDmg = myEnemy.base_minDmg;
myEnemy.maxDmg = myEnemy.base_maxDmg;
myEnemy.eMinDmg = myEnemy.base_eMinDmg;
myEnemy.eMaxDmg = myEnemy.base_eMaxDmg;
myEnemy.resistance_Fire = myEnemy.base_resistance_Fire;
myEnemy.resistance_Ice = myEnemy.base_resistance_Ice;
myEnemy.resistance_Lightning = myEnemy.base_resistance_Lightning;
myEnemy.gold = myEnemy.base_gold;
myEnemy.exp = myEnemy.base_exp;
if (myEnemy.skill == "Capture") {
myEnemy.skill = monsterData[findNum(myEnemy.myName, monsterData)][0].split(", ")[8];
}
return(0);
}
if (myEnemy.skill == "Capture") {
myPer = Number(captureEnpower);
myEnemy.startHealth = myEnemy.startHealth + Math.round((myEnemy.startHealth * myPer) / 100);
myEnemy.startMana = myEnemy.startMana + Math.round((myEnemy.startMana * myPer) / 100);
myEnemy.health = myEnemy.health + Math.round((myEnemy.health * myPer) / 100);
myEnemy.mana = myEnemy.mana + Math.round((myEnemy.mana * myPer) / 100);
myEnemy.minDmg = myEnemy.minDmg + Math.round((myEnemy.minDmg * myPer) / 100);
myEnemy.maxDmg = myEnemy.maxDmg + Math.round((myEnemy.maxDmg * myPer) / 100);
myEnemy.eMinDmg = myEnemy.eMinDmg + Math.round((myEnemy.eMinDmg * myPer) / 100);
myEnemy.eMaxDmg = myEnemy.eMaxDmg + Math.round((myEnemy.eMaxDmg * myPer) / 100);
myEnemy.resistance_Fire = myEnemy.resistance_Fire + Math.round((myEnemy.resistance_Fire * myPer) / 100);
myEnemy.resistance_Ice = myEnemy.resistance_Ice + Math.round((myEnemy.resistance_Ice * myPer) / 100);
myEnemy.resistance_Lightning = myEnemy.resistance_Lightning + Math.round((myEnemy.resistance_Lightning * myPer) / 100);
myEnemy.skillTimer = Number(captureTime) * 24;
} else if (myEnemy.skill == "Rage") {
myEnemy.defense = myEnemy.defense - Math.round(myEnemy.defense * 0.5);
myEnemy.minDmg = myEnemy.minDmg + Math.round(myEnemy.minDmg * 0.5);
myEnemy.maxDmg = myEnemy.maxDmg + Math.round(myEnemy.maxDmg * 0.5);
myEnemy.skillTimer = 480;
} else if (myEnemy.skill == "Berserk") {
myEnemy.defense = myEnemy.defense - myEnemy.defense;
myEnemy.minDmg = myEnemy.minDmg + myEnemy.minDmg;
myEnemy.maxDmg = myEnemy.maxDmg + myEnemy.maxDmg;
myEnemy.skillTimer = 240;
} else if (myEnemy.skill == "Defense Up") {
myEnemy.defense = myEnemy.defense + Math.round(myEnemy.defense * 0.5);
myEnemy.minDmg = myEnemy.minDmg - Math.round(myEnemy.minDmg * 0.25);
myEnemy.maxDmg = myEnemy.maxDmg - Math.round(myEnemy.maxDmg * 0.25);
myEnemy.skillTimer = 480;
} else if (myEnemy.skill == "Absolute Defense") {
myEnemy.defense = myEnemy.defense + myEnemy.defense;
myEnemy.minDmg = myEnemy.minDmg - myEnemy.minDmg;
myEnemy.maxDmg = myEnemy.maxDmg - myEnemy.maxDmg;
myEnemy.skillTimer = 240;
}
if (myEnemy.defense > 100) {
myEnemy.defense = 100;
}
if (myEnemy.resistance_Fire > 100) {
myEnemy.resistance_Fire = 100;
}
if (myEnemy.resistance_Ice > 100) {
myEnemy.resistance_Ice = 100;
}
if (myEnemy.resistance_Lightning > 100) {
myEnemy.resistance_Lightning = 100;
}
}
function applyEnemyGlow(myEnemy) {
var _local3 = random(10);
var _local2 = new flash.filters.GlowFilter(getEnemySkillColor(myEnemy));
_local2.blurX = _local3;
_local2.blurY = _local3;
_local2.strength = 2;
_local2.quality = _root.maxFilter;
myEnemy.filters = [_local2];
}
function getEnemySkillColor(myEnemy, getString) {
var _local1 = "";
switch (myEnemy.skill) {
case "Capture" :
_local1 = "00CCFF";
break;
case "Rage" :
_local1 = "FFFF00";
break;
case "Berserk" :
_local1 = "FF0000";
break;
case "Defense Up" :
_local1 = "00CC00";
break;
case "Absolute Defense" :
_local1 = "0099FF";
}
if (getString == true) {
return(_local1);
}
return(Number(String("0x" + _local1)));
}
function removeEnemy(myEnemy) {
var _local1 = 0;
while (_local1 < enemies.length) {
if (enemies[_local1] == myEnemy) {
enemies.splice(_local1, 1);
myEnemy.removeMovieClip();
}
_local1++;
}
}
function enemyTargetAvailable(myTarget) {
aa = 0;
while (aa < enemies.length) {
if (enemies[aa].targeted == myTarget) {
return(false);
}
aa++;
}
return(true);
}
function getEnemyTarget(myEnemy, noCharacter) {
if (((((noCharacter != true) && (Math.abs(field.character._x - myEnemy._x) < 150)) && (enemyTargetAvailable(true))) && (_root.level <= myEnemy.maxLevel)) && (_root.level >= myEnemy.minLevel)) {
return(true);
}
al = 0;
while (al < pets.length) {
tPet = pets[al];
if ((((Math.abs(tPet._x - myEnemy._x) < 150) && (enemyTargetAvailable(tPet))) && (tPet.level <= myEnemy.maxLevel)) && (tPet.level >= myEnemy.minLevel)) {
return(tPet);
}
al++;
}
return(false);
}
function leaveCharacter() {
var _local2 = 0;
while (_local2 < enemies.length) {
var _local1 = enemies[_local2];
if (_local1.targeted == true) {
_local1.targeted = getEnemyTarget(_local1, true);
}
_local2++;
}
}
function successRate(sRate) {
return(random(100) >= (100 - sRate));
}
function reduceByLevelGap(myNum, lv) {
var _local2 = Math.floor(((Math.floor(_root.level / lv) * 25) * myNum) / 100);
if (_local2 > 100) {
_local2 = 100;
}
return(_local2);
}
function fieldGlobal(myMc) {
var _local1 = {x:myMc._x, y:myMc._y};
field.localToGlobal(_local1);
return(_local1);
}
function newObject(objectType, X, Y, fromGod, mapNum, mapX, mapY, hiddenNumber, myMsg, skillMode, fadesIn) {
var _local2 = field.attachMovie("pickable_object", "object" + objectsCounter, field.getNextHighestDepth());
objectsCounter++;
_local2.cacheAsBitmap = true;
_local2.createdIn = currentStage;
_local2.createdOrder = objectType[2];
if (objectType[1] != undefined) {
_local2.createdIn = objectType[1];
}
if (objectType[0] != undefined) {
objectType = objectType[0];
}
if ((fromGod == true) || (skillMode == true)) {
_local2.createdIn = -1;
}
var _local5 = findNum(objectType, objectData);
var _local3 = objectData[_local5];
_local2.description = convertDescription(_local3[1]);
if (Number(_local3[2]) == 1) {
_local2.myShadow = field.fieldFloor.attachMovie("shadowObj", "objectShadow" + field.fieldFloor.getNextHighestDepth(), field.fieldFloor.getNextHighestDepth());
_local2.myShadow._x = 9999;
_local2.myShadow._y = 9999;
_local2.myShadow.cacheAsBitmap = true;
}
_local2.throwAble = Number(_local3[3]) == 1;
if (_local3[4] == -1) {
setTimeout(autoWeight, 96, _local2);
} else if (_local3[4] == -2) {
_local2.weight = 99999999 /* 0x5F5E0FF */;
} else {
_local2.weight = Number(_local3[4]);
}
_local2.req_wis = Number(_local3[5]);
_local2.minDamage = Number(_local3[6]);
_local2.maxDamage = Number(_local3[7]);
_local2.speed = 20 - Number(_local3[8]);
_local2.sacrificePoints = Number(_local3[9]);
_local2.element = _local3[10];
_local2.element_minDamage = Number(_local3[11]);
_local2.element_maxDamage = Number(_local3[12]);
_local2.elementRate = Number(_local3[13]);
_local2.elementDuration = Number(_local3[14]) * 24;
if (skillMode == true) {
_local2.ground = ground + _root.half_character_body;
_local2.myShadow._alpha = 0;
_local2.skillMode = true;
} else {
_local2.ground = Y;
_local2.skillMode = false;
}
_local2._y = Y;
_local2._x = X;
_local2.myType.gotoAndStop(_local5 + 1);
_local2.objectName = objectType;
_local2.objectNum = _local5;
_local2.fromGod = fromGod;
_local2.holding = false;
_local2.mySpeed = 0;
_local2.shaked = true;
_local2.fromGod_checked = false;
if (fromGod == true) {
_local2._y = -510;
_local2.shaked = false;
_local2.gravity = _local2.weight;
}
_local2.mySize = Math.round((_local2.ground - _root.minHeight) / _root.perspectiveSize) + 100;
_local2._xscale = (_local2._yscale = _local2.mySize);
_local2.sacrificing = false;
if (fadesIn == true) {
_local2.fadedIn = 0;
}
if (objectType == "teleport") {
_local2.mapNum = mapNum;
_local2.mapX = mapX;
_local2.mapY = mapY;
if (hiddenNumber == 1) {
_local2._alpha = 0;
_local2.hiddenFlag = true;
}
}
if (objectType == "message box") {
baseHeight = _local2.myType.myMsgBox._height;
_local2.baseHeight = baseHeight;
_local2.startY = _local2.myType.myMsgBox._y;
_local2.startY2 = _local2.myType.myMsg._y;
_local2.originalMsg = myMsg;
_local2.myType.myMsg.text = analyzeVars(myMsg);
_local2.myType.myMsg.autoSize = true;
_local2.myType.myMsgBox._width = _local2.myType.myMsg._width + 10;
_local2.myType.myMsgBox._height = _local2.myType.myMsg._height + 5;
_local2.myType.myMsgBox._y = _local2.myType.myMsgBox._y - (_local2.myType.myMsgBox._height - baseHeight);
_local2.myType.myMsg._y = _local2.myType.myMsg._y - (_local2.myType.myMsgBox._height - baseHeight);
baseX = _local2.myType.myMsgBox._x;
_local2.myType.myMsgBox._x = (-_local2.myType.myMsgBox._width) / 2;
_local2.myType.myMsg._x = _local2.myType.myMsg._x - (baseX - _local2.myType.myMsgBox._x);
}
_local2.arrayType = "activeObjects";
activeObjects.push(_local2);
return(_local2);
}
function autoWeight(theObject) {
theObject.weight = Math.round((theObject._width + theObject._height) / 10);
theObject.gravity = theObject.weight;
}
function sacrificeNeeded(objectName) {
return(objectData[findNum(objectName, objectData)][4]);
}
function animateMovieClip(mc) {
if (mc._totalframes > 1) {
if (mc._currentframe < mc._totalframes) {
mc.nextFrame();
} else {
mc.gotoAndStop(1);
}
}
}
function objectBehavior(o) {
if (!_root.gamePause) {
animateMovieClip(o.myType.mc);
if (o.hitTest(_root.camera)) {
updateStats(o.objectName, "object", 0);
}
if (o.hiddenFlag == true) {
o._alpha = 0;
}
if (o.fadedIn != undefined) {
o._alpha = o.fadedIn;
} else if (o.fadedOut != undefined) {
o._alpha = o.fadedOut;
}
if (o.myShadow != undefined) {
o.myShadow._x = o._x;
o.myShadow._y = o.ground + 5;
o.myShadow._width = o._width;
o.myShadow._yscale = o._yscale;
o.myShadow._alpha = o._alpha;
o.myShadow._visible = o._visible;
}
if (o != pointOn) {
_root.blurSpeed(o);
if ((object == false) && (objectWithinReach == o)) {
pickObjectCounter = pickObjectTimer;
if (_root.maxFilter > 0) {
o.isGlowing = true;
var _local5 = 10;
var _local3 = new flash.filters.GlowFilter(16777215);
_local3.blurX = _local5;
_local3.blurY = _local5;
_local3.strength = 2;
_local3.quality = _root.maxFilter;
o.filters = o.filters.concat([_local3]);
} else {
o.isGlowing = false;
}
}
setFilters(o);
}
o.prevX = o._x;
o.prevY = o._y;
if (o.objectName == "teleport") {
if (o._visible) {
var _local7 = o.myType.teleportBase.getBounds(_root.field).yMax;
var _local8 = o.myType.teleportBase.getBounds(_root.field).yMin;
var _local6 = _root.getCharBottom();
if ((((((o.hitTest(_root.field.character) && (_local6 > _local8)) && (_local6 < _local7)) && (_root.field.character.getDepth() > o.getDepth())) && (Key.isDown(_root.command[4]))) && (!jumpingPressed)) && (!jumping)) {
_root.moveMap(o.mapNum, o.mapX, o.mapY);
jumpingPressed = true;
}
}
} else {
if (((o.fromGod == true) && (!o.fromGod_checked)) && (o.throwAble != undefined)) {
if (o.throwAble) {
o.throwOn(_root.checkClosest());
} else {
o.throwObject();
}
o.fromGod_checked = true;
}
if (o.holding) {
var _local4 = getCharHand();
o._x = _local4.x;
o._y = _local4.y + (o._height / 2);
o.sideRight = _root.sideRight;
if (o.sideRight) {
o._x = o._x - half_character_body;
} else {
o._x = o._x + half_character_body;
}
o.ground = getObjectGround();
if (!_root.jumping) {
o.mySize = Math.round((o.ground - _root.minHeight) / _root.perspectiveSize) + 100;
}
if (o.sideRight) {
o._xscale = o.mySize;
} else {
o._xscale = -o.mySize;
}
o._yscale = o.mySize;
o.shaked = false;
}
if (o.holding) {
if (o._x > (_root.blockLimit._x - (o._width / 2))) {
o._x = _root.blockLimit._x - (o._width / 2);
} else if (o._x < (field.limitStart._x + (o._width / 2))) {
o._x = field.limitStart._x + (o._width / 2);
}
} else if ((o._x > (field.limitEnd._x + (o._width / 2))) || (o._x < (field.limitStart._x - (o._width / 2)))) {
removeObject(o);
}
if ((!o.holding) && (!o.sacrificing)) {
if (o.enemy._x != undefined) {
if (o.enemy._x > o._x) {
o._x = o._x + ((Math.abs(o.enemy._x - o._x) / o.speed) * (_root.slowMotion + 1));
}
if (o.enemy._x < o._x) {
o._x = o._x - ((Math.abs(o.enemy._x - o._x) / o.speed) * (_root.slowMotion + 1));
}
if (o.enemy._y > o._y) {
o._y = o._y + ((Math.abs(o.enemy._y - o._y) / o.speed) * (_root.slowMotion + 1));
}
if (o.enemy._y < o._y) {
o._y = o._y - ((Math.abs(o.enemy._y - o._y) / o.speed) * (_root.slowMotion + 1));
}
if (o.speed > 2) {
o.speed--;
}
o.sideRight = true;
o.rad = Math.atan2(o.enemy._y - o._y, o.enemy._x - o._x);
o.angle = 57.2957795130823 * o.rad;
o._rotation = o.angle;
if (o.hitTest(o.enemy)) {
if (_root.attemptHit(_root.accuracy + _root.accuracyBonus, enemy.avoidability)) {
dmgBonus = damage + Math.floor(str / 5);
minDmg = o.minDamage + dmgBonus;
maxDmg = o.maxDamage + dmgBonus;
pDmg = getDamage(minDmg, maxDmg);
enemyDef = (100 - o.enemy.defense) / 100;
eDmg = 0;
enemyRes = 0;
if ((o.element != "None") && (_root.successRate(o.elementRate))) {
o.enemy.element = o.element;
enemyRes = (100 - o.enemy["resistance_" + o.element]) / 100;
o.enemy.elementTimer = Math.round(getElementBonus(o.elementDuration, o.element) * enemyRes);
dmgBonus = 0;
if (_root.element == o.element) {
dmgBonus = _root.elementDamage + _root.elementDamageBonus;
}
myDmg = o.element_minDamage + dmgBonus;
myDmg2 = o.element_maxDamage + dmgBonus;
eDmg = _root.getElementBonus(_root.getDamage(myDmg, myDmg2), o.element);
}
finalDmg = Math.ceil(Math.round((pDmg * enemyDef) + (eDmg * enemyRes)) * _root.injuries);
critical = false;
if (_root.successRate(_root.critChance)) {
finalDmg = Math.round(finalDmg * 1.5);
critical = true;
}
if ((finalDmg > (o.enemy.health / 10)) && (o.enemy.stoppedAttacks < 2)) {
eGoto(o.enemy, monster_hit);
}
o.enemy.targeted = true;
if (o.weight > 0) {
_root.shakeScreen(5, o.weight);
}
o.enemy.health = o.enemy.health - finalDmg;
eGoto(o.enemy, monster_hit);
_root.damaged(o.enemy._x, o.enemy._y, finalDmg, "T", false, critical);
popHealthBar(o.enemy);
} else {
_root.newDigits(o.enemy._x, o.enemy._y, -1, 0, false);
}
if (o.createdIn != -1) {
_root.regenerateObject(o.createdIn, o.createdOrder, true);
}
_root.removeObject(o);
}
} else if (o._rotation != 0) {
o.ground = _root.getObjectGround();
o.myShadow._alpha = 100;
o._rotation = 0;
o.fromGod = false;
if (o.skillMode) {
removeObject(o);
}
} else {
if (Math.round(o._y) < Math.round(o.ground)) {
o._y = o._y + o.gravity;
o.gravity++;
}
if (Math.round(o._y) >= Math.round(o.ground)) {
o._y = o.ground;
if (!o.shaked) {
_root.shakeScreen(5, o.gravity);
o.shaked = true;
}
}
}
}
if (o.sacrificing) {
if (o._y > (-350 - o._height)) {
o._y--;
o._alpha = o._alpha - 0.1;
if (o._alpha <= 0) {
_root.removeObject(o);
}
} else {
_root.removeObject(o);
}
}
if (o.fadedIn != undefined) {
if (o.fadedIn < 100) {
o.fadedIn++;
} else {
o.fadedIn = undefined;
}
}
if (o.fadedOut != undefined) {
if (o.fadedOut > 0) {
o.fadedOut--;
} else {
_root.removeObject(o);
}
}
}
}
}
function removeObject(myObject) {
var _local1 = 0;
while (_local1 < activeObjects.length) {
if (activeObjects[_local1] == myObject) {
removeObjectAt(myObject, _local1);
break;
}
_local1++;
}
}
function removeObjectAt(myObject, myIndex) {
activeObjects.splice(myIndex, 1);
myObject.myShadow.removeMovieClip();
myObject.removeMovieClip();
}
function removeNpcAt(myNpc, myIndex) {
npcs.splice(myIndex, 1);
myNpc.removeMovieClip();
}
function findNextObject() {
var _local1 = 0;
while (_local1 < activeObjects.length) {
var _local2 = activeObjects[_local1];
if (validObject(_local2)) {
return(_local2);
}
_local1++;
}
return(false);
}
function validObject(myObject) {
var _local3 = getCharGroundWithDif();
return((((((((_root.str >= myObject.weight) && (_root.wis >= myObject.req_wis)) && (myObject.hitTest(field.character))) && (Math.abs(myObject._y - _local3) < 30)) && (myObject.fadedIn == undefined)) && (myObject.fadedOut == undefined)) && (!myObject.sacrificing)) && (!jumping));
}
function pickObject(myObject) {
myObject.holding = true;
myObject.sideRight = _root.sideRight;
}
function openStore(storeOwner) {
toggleUI("store");
gamePause = true;
layout.store.storeOwner = storeOwner;
}
function closeStore() {
layout.store.sell_list.removeAll();
toggleUI("store");
gamePause = false;
}
function viewBook(book, tabMc) {
var _local1;
layout.skills.bookName = book[0];
layout.skills.bookNameText.text = book[0] + " Skills";
layout.skills.removeItems();
_local1 = 1;
while (_local1 < book.length) {
layout.skills.newItem(book[_local1]);
_local1++;
}
layout.skills.focusOn();
layout.skills.resetTabs();
tabMc.gotoAndStop(2);
}
function nextStarSlot(getNum) {
var _local4 = _root.use_item;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2][0].split(", ");
if (Number(_local3[3]) == 2) {
if (getNum == true) {
return(_local2);
}
return(_root.use_item[_local2]);
}
_local2++;
}
return("None");
}
function setShurikenIcon(myCont) {
myShurikenS = nextStarSlot();
if (myShurikenS != "None") {
myShurikenName = myShurikenS[0];
myCont.image.s1._visible = true;
myCont.image.s2._visible = true;
myCont.image.noStars._alpha = 0;
myCont.image.s1.gotoAndStop(myShurikenName);
myCont.image.s2.gotoAndStop(myShurikenName);
} else {
myCont.image.s1._visible = false;
myCont.image.s2._visible = false;
myCont.image.noStars._alpha = 100;
}
}
function isSimplePotion(myPotion) {
if (Number(myPotion[0].split(", ")[3]) == 0) {
var _local3 = myStatArray[2].split(", ");
var _local4 = _root[getVarArray("use", 0)];
var _local2 = 0;
while (_local2 < _local3.length) {
if ((_local4[_local2] != "health") && (_local4[_local2] != "mana")) {
if (Number(_local3[_local2]) > 0) {
return(false);
}
}
_local2++;
}
} else {
return(false);
}
return(true);
}
function usePotion(myPotion) {
if (Number(myPotion[0].split(", ")[3]) == 1) {
if (!potionStatExists(myPotion)) {
var _local2 = myPotion.concat();
var _local3 = _local2[1].split(", ");
_local3[3] = Number(_local3[3]) * 24;
_local2[1] = _local3.join(", ");
applyPotionStats(_local2, "Add");
slotAmount(myPotion, 1, "minus");
statSquare.push(_local2);
} else {
newError("Already under effect of a potion of the same type");
}
} else {
applyPotionStats(myPotion.concat(), "Add");
slotAmount(myPotion, 1, "minus");
}
updateInventory();
}
function givePotion(myPotion, myMonster) {
var _local4 = myPotion[2].split(", ");
var _local7 = _root[getVarArray("use", 0)];
var _local6 = 0;
var _local3 = 0;
while (_local3 < _local4.length) {
var _local5 = _local7[_local3];
if (_local5 == "health") {
myMonster.health = myMonster.health + Number(_local4[_local3]);
_local6 = _local6 + Number(_local4[_local3]);
if (myMonster.health > myMonster.startHealth) {
_local6 = _local6 - (myMonster.health - myMonster.startHealth);
myMonster.health = myMonster.startHealth;
}
} else if (_local5 == "mana") {
myMonster.mana = myMonster.mana + Number(_local4[_local3]);
if (myMonster.mana > myMonster.startMana) {
myMonster.mana = myMonster.startMana;
}
}
_local3++;
}
if (_local6 > 0) {
newDigits(myMonster._x, myMonster._y, _local6, 2, false);
}
slotAmount(myPotion, 1, "minus");
updateInventory();
}
function expireStat(myStatArray) {
sa = 0;
while (sa < statSquare.length) {
if (statSquare[sa] == myStatArray) {
applyPotionStats(myStatArray, "Remove");
statSquare.splice(sa, 1);
}
sa++;
}
}
function viewStats() {
resetPots();
var _local9 = 0;
while (_local9 < statSquare.length) {
var _local3 = layout["potSquare_" + _local9];
var _local13 = statSquare[_local9];
var _local14 = _local13[1].split(", ");
var _local4 = _local14[3].split("/");
if (_local4.length == 1) {
_local4.push(_local4[0]);
}
if (Number(_local4[0]) <= 0) {
expireStat(_local13);
} else {
_local4[0] = Number(_local4[0]) - 1;
}
_local14[3] = _local4.join("/");
_local13[1] = _local14.join(", ");
var _local10 = _local13[0].split(", ")[0];
var _local11 = getSkillNum(_local10) + 2;
var _local12 = "skillIcon";
var _local6 = 0;
while (_local6 < itemData.length) {
if (itemData[_local6][0].split(", ")[0] == _local10) {
_local12 = "itemIcon";
_local11 = getItemFrame(_local10);
break;
}
_local6++;
}
_local3._visible = true;
var _local5 = 1;
while (_local5 <= 3) {
var _local7 = _local3.myIcon["item" + _local5];
_local7.itemIcon._visible = false;
_local7.skillIcon._visible = false;
var _local8 = _local7[_local12];
_local8._visible = true;
_local8.gotoAndStop(_local11);
_local5++;
}
_local3.myNum = _local9;
var _local15 = Math.round((Number(_local4[0]) / Number(_local4[1])) * 100);
_local3.myIcon.durationMask._yscale = _local15;
if (Math.round(Number(_local4[0]) / 24) <= 3) {
if (_local3._alpha == 100) {
_local3._alpha = 0;
} else {
_local3._alpha = 100;
}
} else {
_local3._alpha = 100;
}
_local3.onRollOver = function () {
_root.displayItemStats(_root.statSquare[this.myNum], undefined, true);
_root.layout.chat.win = this;
_root.layout.chat._alpha = 75;
};
_local3.onRollOut = (_local3.onReleaseOutside = function () {
layout.chat._visible = false;
_root.layout.chat._alpha = 100;
});
_local3.onRelease = function () {
if (_root.doubleClick_counter > 0) {
_root.expireStat(_root.statSquare[this.myNum]);
}
_root.doubleClick_counter = _root.doubleClick_timer;
};
_local9++;
}
}
function potionStatExists(myStatArray) {
var _local1 = 0;
while (_local1 < statSquare.length) {
if (statSquare[_local1][0].split(", ")[0] == myStatArray[0].split(", ")[0]) {
return(true);
}
_local1++;
}
return(false);
}
function resetPots() {
var _local1 = 0;
while (_local1 <= 11) {
layout["potSquare_" + _local1].icon.myIcon.gotoAndStop(1);
layout["potSquare_" + _local1]._visible = false;
layout["potSquare_" + _local1].useHandCursor = false;
layout["potSquare_" + _local1].onRollOver = function () {
};
_local1++;
}
}
function applyPotionStats(myStatArray, statAction, toOriginal) {
var _local5 = myStatArray[0].split(", ");
var _local14 = Number(_local5[3]);
var _local10 = 0;
_local5 = myStatArray[2].split(", ");
var _local3 = _root[getVarArray("use", _local14)];
if (statAction == "Add") {
var _local12 = getBonuses();
}
var _local2 = 0;
while (_local2 < _local5.length) {
if (statAction == "Add") {
var _local7 = _local5[_local2].split("%");
var _local9 = Number(_local7[0]);
if (_local7.length == 2) {
var _local4 = _root[_local3[_local2]] - _local12[_local3[_local2]];
switch (_local3[_local2]) {
case "speedBonus" :
_local4 = _local4 + (basicSpeed + Math.floor(dex / 30));
break;
case "basicJumpPower" :
_local4 = _local4 + Math.floor(dex / 60);
break;
case "accuracy" :
_local4 = _local4 + _root.accuracyBonus;
break;
case "avoidability" :
_local4 = _local4 + _root.avoidabilityBonus;
}
if (_local3[_local2] == "damage") {
var _local8 = _root.getCurrentWeapon();
if (_local8 != "Claw") {
if (_local8 == "Staff") {
_local4 = _local4 + Math.floor(_root.wis / 5);
} else {
_local4 = _local4 + Math.floor(_root.str / 5);
}
} else {
_local4 = _local4 + Math.floor(_root.luk / 5);
}
}
_local5[_local2] = Math.round((_local4 * _local9) / 100);
}
_root[_local3[_local2]] = _root[_local3[_local2]] + Number(_local5[_local2]);
if (_local3[_local2] == "health") {
_local10 = _local10 + Number(_local5[_local2]);
if (health > maxHealth) {
_local10 = _local10 - (health - maxHealth);
}
}
} else if (statAction == "Remove") {
if (toOriginal != undefined) {
if (toOriginal[_local3[_local2]] == undefined) {
toOriginal[_local3[_local2]] = 0;
}
toOriginal[_local3[_local2]] = toOriginal[_local3[_local2]] + Number(_local5[_local2]);
} else {
_root[_local3[_local2]] = _root[_local3[_local2]] - Number(_local5[_local2]);
}
}
_local2++;
}
if (statAction == "Add") {
myStatArray[2] = _local5.join(", ");
} else if (((statAction == "Remove") && (toOriginal == undefined)) && (Number(myStatArray[1].split(", ")[4]) != "undefined")) {
transformation = false;
}
if (_local10 > 0) {
newDigits(field.character._x, field.character._y, _local10, 2, false);
}
}
function getTimeString(miliSec) {
var _local3 = Math.floor((miliSec / 24) / 60);
var _local2 = Math.round((miliSec - ((Math.floor((miliSec / 24) / 60) * 24) * 60)) / 24);
var _local1 = new String("");
if (_local3 > 0) {
_local1 = _local3 + " Minute";
if (_local3 > 1) {
_local1 = _local1 + "s";
}
if (_local2 > 0) {
_local1 = _local1 + ((" and " + _local2) + " Second");
if (_local2 > 1) {
_local1 = _local1 + "s";
}
}
} else {
_local1 = _local2 + " Second";
if (_local2 > 1) {
_local1 = _local1 + "s";
}
}
return(_local1);
}
function colorChat(phrase, hex, isUnderline, multipleWords) {
var _local1;
var _local3 = 0;
var _local5 = 0;
var _local4 = 0;
var _local6 = layout.chat.txt;
var _local7 = phrase.split(newline);
if (_local7.length > 1) {
_local1 = 0;
while (_local1 < _local7.length) {
colorChat(_local7[_local1], hex, isUnderline, multipleWords);
_local1++;
}
return(0);
}
_local1 = 0;
while (_local1 < _local6.text.length) {
cw = phrase.charAt(_local3);
c = _local6.text.charAt(_local1);
if (c == cw) {
if (_local3 == 0) {
_local5 = _local1;
}
_local3++;
} else {
_local3 = 0;
_local5 = 0;
_local4 = 0;
}
if (_local3 == phrase.length) {
_local4 = _local1;
if (_local4 == 0) {
break;
}
var _local2 = new TextFormat();
_local2.color = hex;
if (isUnderline == true) {
_local2.underline = true;
} else {
_local2.underline = false;
}
_local6.setTextFormat(_local5, _local4 + 1, _local2);
if (multipleWords != true) {
break;
}
}
_local1++;
}
}
function resetChatColor() {
var _local1 = new TextFormat();
_local1.color = 0;
layout.chat.txt.setTextFormat(_local1);
}
function getUseType(myNum) {
switch (myNum) {
case 0 :
return("Instant Potion");
case 1 :
return("Power-Up Potion");
case 2 :
return("Shuriken");
case 3 :
return("Scroll");
}
}
function getEquipType(myNum) {
switch (myNum) {
case 0 :
return("Headware");
case 1 :
return("Shirt");
case 2 :
return("Pants");
case 4 :
return("Gloves");
case 5 :
return("Shoes");
case 3 :
return("Weapon");
}
}
function getLastSlot(myArray, notInclude) {
var _local3 = -1;
var _local1 = 0;
while (_local1 < myArray.length) {
if ((Number(myArray[_local1]) != 0) && (_local1 != notInclude)) {
_local3 = _local1;
}
_local1++;
}
return(_local3);
}
function displayItemStats(a, purchaseGold, isPUP) {
if (myItemArray[0] != "Empty") {
var _local4 = new String("");
var _local3 = a[0].split(", ");
var _local9;
var _local5;
var _local2;
var _local21 = getItemName(a);
var _local6 = _local3[1];
var _local13 = _root.analyzeVars(convertDescription(_local3[2]));
if (isPUP == true) {
_local13 = _root.analyzeVars(_root.nameSpace(_local13, 0, "@", ","));
}
if (_local6 == "equip") {
var _local25 = a[a.length - 1].split(", ")[1];
if (_local25 > 0) {
_local21 = _local21 + (" +" + _local25);
}
} else if (a[0].split(", ")[0] == "Monster Blood") {
if (getMonsterName(_local3[3], true)) {
_local13 = _root.analyzeVars(convertDescription(monsterData[findNum(_local3[3], monsterData)][0].split(", ")[1]));
}
}
_local4 = _local4 + _local21;
if (!isPUP) {
_local4 = _local4 + ((" [" + upperInventoryType(_local6)) + "]");
}
if (_local13 != "") {
_local4 = _local4 + (newline + _local13);
}
if ((_local6 != "etc") && (a[0].split(", ")[0] != "Monster Blood")) {
var _local11 = Number(_local3[3]);
var _local19 = -1;
var _local26 = false;
if (_local6 == "use") {
if (_local11 == 1) {
_local26 = true;
} else if (_local11 == 3) {
_local19 = Number(_local3[4]);
}
}
var _local28;
if (_local6 == "use") {
_local28 = getUseType(_local11);
} else if (_local6 == "equip") {
_local28 = getEquipType(_local11);
}
_local3 = a[2].split(", ");
if (_local19 != -1) {
_local5 = _root[getVarArray("equip", _local19)];
} else {
_local5 = _root[getVarArray(_local6, _local11)];
}
_local9 = getLastSlot(_local3);
if ((_local5[_local9] == "weapon_maxDamage") && (_local6 == "equip")) {
_local9 = getLastSlot(_local3, _local9);
}
if (_local9 != -1) {
_local4 = _local4 + newline;
}
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != 0) {
if ((_local5[_local2] == "weapon_minDamage") && (_local6 == "equip")) {
_local4 = _local4 + ((("Damage: " + _local3[_local2]) + "-") + _local3[_local2 + 1]);
} else if ((_local5[_local2] == "element_minDamage") && (_local6 == "equip")) {
_local4 = _local4 + ((("Element Damage: " + _local3[_local2]) + "-") + _local3[_local2 + 1]);
} else if (_local5[_local2] == "elementDuration") {
_local4 = _local4 + ("Side Effect Duration: " + getTimeString(Number(_local3[_local2]) * 24));
} else {
var _local10 = Number(_local3[_local2].split("%")[0]);
var _local8 = ": ";
if ((_local6 == "use") && (_local10 > 0)) {
_local8 = _local8 + "+";
}
_local4 = _local4 + ((replaceStat(_local5[_local2]) + _local8) + _local3[_local2]);
}
if (_local2 != _local9) {
_local4 = _local4 + newline;
}
if ((_local6 == "equip") && ((_local5[_local2] == "weapon_minDamage") || (_local5[_local2] == "element_minDamage"))) {
_local2++;
}
}
_local2++;
}
if (_local6 == "equip") {
var _local14 = a[4].split(", ");
if (_local11 == 3) {
_local4 = _local4 + ("\nCategory: " + _local14[3]);
_local4 = _local4 + ("\nAttack Speed: " + getWeaponSpeed(Number(_local14[4])));
}
_local3 = a[3].split(", ");
_local5 = var_req;
_local9 = getLastSlot(_local3);
if (((_local9 != -1) || (_local14[0] != "All")) || (_local14[1] != "None")) {
_local4 = _local4 + "\n\nRequirements:";
if (_local9 != -1) {
_local4 = _local4 + newline;
}
}
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != 0) {
_local4 = _local4 + ((replaceStat(_local5[_local2]) + ": ") + _local3[_local2]);
if (_local2 != _local9) {
_local4 = _local4 + newline;
}
}
_local2++;
}
_local3 = a[4].split(", ");
if (_local3[0] != "All") {
_local4 = _local4 + ("\nClass: " + _local3[0]);
}
if (_local3[1] != "None") {
_local4 = _local4 + ("\nElement: " + _local3[1]);
}
if (((_local9 != -1) || (_local14[0] != "All")) || (_local14[1] != "None")) {
_local4 = _local4 + newline;
}
}
_local3 = a[1].split(", ");
if (((_local6 == "equip") && (Number(_local3[2]) > 0)) && (purchaseGold == undefined)) {
_local4 = _local4 + ("\nUpgrades Left: " + _local3[2]);
} else if (_local26) {
if (isPUP == true) {
_local4 = _local4 + ((newline + getTimeString(Number(_local3[3].split("/")[0]))) + " Left");
} else {
_local4 = _local4 + ("\nLasts for " + getTimeString(Number(_local3[3] * 24)));
}
} else if (_local19 != -1) {
_local4 = _local4 + (("\nSuccess Rate: " + _local3[3]) + "%");
}
} else if (a[0].split(", ")[0] == "Monster Blood") {
var _local27 = a[0].split(", ")[3];
var _local29 = Number(a[0].split(", ")[4]) == 1;
_local3 = a[1].split(", ");
var _local20 = 100 + Number(_local3[2]);
if (_local29) {
var _local24 = monsterData[findNum(_local27, monsterData)][1].split(", ");
_local4 = _local4 + ("\nLevel: " + (1 + Math.round((_local20 - 100) / petPowerGrow)));
_local4 = _local4 + ((("\nExperience: " + _local3[3]) + " / ") + _local3[4]);
if (Number(_local3[5]) <= 0) {
_local4 = _local4 + ("\nRest Left: " + getTimeString(Number(_local3[5]) * -1));
} else {
_local4 = _local4 + ((("\nHealth: " + _local3[5]) + " / ") + Math.round((Number(_local24[3]) * _local20) / 100));
if (Number(_local24[4]) > 0) {
_local4 = _local4 + ((("\nMana: " + _local3[6]) + " / ") + Math.round((Number(_local24[4]) * _local20) / 100));
}
}
} else {
_local4 = _local4 + (("\nSummon Power: " + _local20) + "%");
}
var _local17 = "Active During: ";
var _local22 = Number(monsterData[findNum(_local27, monsterData)][0].split(", ")[4]);
switch (_local22) {
case 0 :
_local17 = _local17 + "Both Day and Night";
break;
case 1 :
_local17 = _local17 + "Day";
break;
case 2 :
_local17 = _local17 + "Night";
}
_local4 = _local4 + ("\n\n" + _local17);
var _local15 = Number(a[2]);
if (_local15 > 0) {
_local4 = _local4 + ("\nRequired Level: " + _local15);
}
}
var _local12 = "";
if (purchaseGold != undefined) {
_local12 = ("Purchase this for " + stringNum(purchaseGold)) + " Gold";
if ((_local6 != "equip") && (a[0].split(", ")[0] != "Monster Blood")) {
_local12 = _local12 + " Each";
}
_local4 = _local4 + (newline + _local12);
} else if (layout.store._visible) {
var _local18;
if (_local6 == "equip") {
_local18 = Number(a[1].split(", ")[1]);
} else {
_local18 = Number(a[1].split(", ")[2]);
}
_local18 = getSellingPrice(_local21, _local18);
_local12 = ("Sell this for " + stringNum(_local18)) + " Gold";
if ((_local6 != "equip") && (a[0].split(", ")[0] != "Monster Blood")) {
_local12 = _local12 + " Each";
}
_local4 = _local4 + (newline + _local12);
} else if (isPUP == true) {
_local4 = _local4 + "\n<Double Click to Remove>";
} else if (_local6 == "equip") {
_local4 = _local4 + "\n<Double click to Equip/Un-Equip>";
} else if (_local6 == "use") {
if (_local11 == 3) {
_local4 = _local4 + "\n<Drag over an Equipped Item>";
} else if (a[0].split(", ")[0] == "Monster Blood") {
_local4 = _local4 + "\n<Double click to Summon>";
} else if ((_local11 != 2) && (isPUP != true)) {
_local4 = _local4 + "\n<Double click to Use>";
} else if ((a == nextStarSlot()) && (getCurrentWeapon() == "Claw")) {
_local4 = _local4 + "\nCurrently Using";
}
}
layout.chat._visible = true;
layout.chat.txt.text = _local4;
resetChatColor();
colorChat(_local21, 16711680, true);
colorChat(_local13, 3355443);
if (isPUP == true) {
colorChat(getTimeString(Number(_local3[3].split("/")[0])) + " Left", 10066329);
colorChat("<Double Click to Remove>", 13158);
} else {
colorChat("Lasts for " + getTimeString(Number(_local3[3] * 24)), 10066329);
}
colorChat(("Success Rate: " + _local3[3]) + "%", 6697932);
if (Number(_local3[2]) > 0) {
colorChat("Upgrades Left: " + _local3[2], 10066329);
}
if (_local6 == "equip") {
colorChat("<Double click to Equip/Un-Equip>", 13158);
} else if (_local6 == "use") {
if (_local11 == 3) {
colorChat("<Drag over an Equipped Item>", 13158);
} else if (a[0].split(", ")[0] == "Monster Blood") {
colorChat("<Double click to Summon>", 13158);
} else if ((_local11 != 2) && (isPUP != true)) {
colorChat("<Double click to Use>", 13158);
} else if ((a == nextStarSlot()) && (getCurrentWeapon() == "Claw")) {
colorChat("Currently Using", 153);
}
}
if (_local6 == "equip") {
colorChat("Requirements:", 6710886, true);
_local3 = a[3].split(", ");
_local5 = var_req;
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != 0) {
if (_root[_local5[_local2]] < Number(_local3[_local2])) {
myColor = 16711680 /* 0xFF0000 */;
} else {
myColor = 10066329 /* 0x999999 */;
}
colorChat((replaceStat(_local5[_local2]) + ": ") + _local3[_local2], myColor);
}
_local2++;
}
_local3 = a[4].split(", ");
if ((_local3[0] != "All") && (ninjaClass != _local3[0])) {
myColor = 16711680 /* 0xFF0000 */;
} else {
myColor = 10066329 /* 0x999999 */;
}
colorChat("Class: " + _local3[0], myColor);
myColor = 10066329 /* 0x999999 */;
colorChat("Element: " + _local3[1], myColor);
}
myColor = 10066329 /* 0x999999 */;
if (_local22 != 0) {
var _local30;
_local30 = ((_local22 == 1) ? "day" : "night");
if (_local30 != dayTime) {
myColor = 16711680 /* 0xFF0000 */;
}
}
colorChat(_local17, myColor);
if ((a[0].split(", ")[0] == "Monster Blood") && (_local15 > 0)) {
if (level < _local15) {
myColor = 16711680 /* 0xFF0000 */;
} else {
myColor = 10066329 /* 0x999999 */;
}
colorChat("Required Level: " + _local15, myColor);
}
if ((purchaseGold != undefined) || (layout.store._visible)) {
colorChat(_local12, getGoldColor((gold / purchaseGold) * 100), true);
}
}
}
function getGoldColor(myPercents) {
if (myPercents >= 100) {
return(12687874);
}
if (myPercents >= 20) {
return(9961729);
}
return(6710886);
}
function getWeaponSpeed(myBoost) {
switch (myBoost) {
case 0 :
return("Very Slow");
case 1 :
return("Slow");
case 2 :
return("Normal");
case 3 :
return("Fast");
case 4 :
return("Very Fast");
}
}
function applyMouseCursor(cursorName) {
if (cursorName == "Default") {
onMouseMove = null;
Mouse.show();
layout.mouseCursor._x = (layout.mouseCursor._y = 9999);
} else {
onMouseMove = function () {
Mouse.hide();
layout.mouseCursor._x = layout._xmouse;
layout.mouseCursor._y = layout._ymouse;
updateAfterEvent();
};
Mouse.hide();
layout.mouseCursor._x = layout._xmouse;
layout.mouseCursor._y = layout._ymouse;
updateAfterEvent();
layout.mouseCursor.gotoAndStop(cursorName);
}
}
function updateEquips() {
equipsFocus(true);
layout.equip.openInv.onRelease = function () {
_root.toggleWindow("inventory");
_root.layout.chat._visible = false;
};
layout.equip.openInv.onRollOver = function () {
var _local3 = _root.getLayoutButtonNumber(this);
_root.displayCommand("Open Inventory");
_root.layout.chat.win = this;
};
layout.equip.openInv.onRollOut = (btn.onReleaseOutside = function () {
_root.layout.chat._visible = false;
});
var _local3 = 0;
while (_local3 < 8) {
if (_local3 < 6) {
layout.equip["square" + _local3].myNum = _local3;
} else {
layout.equip["square" + _local3].myNum = _local3 - 2;
}
layout.equip["square" + _local3].myItem.gotoAndStop(getItemFrame(_root.equips[layout.equip["square" + _local3].myNum][0].split(", ")[0]));
layout.equip["square" + _local3].myItem.equip.gotoAndStop(1);
layout.equip["square" + _local3].amount.text = "";
layout.equip["square" + _local3].isSelected._visible = false;
if (_local3 < 6) {
if (_root.equips[_local3][0].split(", ")[0] != "Empty") {
layout.equip["s" + _local3]._visible = false;
layout.equip["square" + _local3].onPress = function () {
if (_root.equips[this.myNum][0] != "Empty") {
_root.dragSquare(this.myNum, getSlotAmount(_root.equips[this.myNum]), true);
}
if (doubleClick_counter > 0) {
if (layout.store._visible) {
popSell(this.myNum, equips);
_root.dragging = false;
setTimeout(applyMouseCursor, 2, "Default");
} else {
removeEquip(this.myNum);
}
}
doubleClick_counter = doubleClick_timer;
_root.applyMouseCursor("GrabAction");
layout.chat._visible = false;
swapInventory("equip");
};
layout.equip["square" + _local3].onRelease = (layout.equip["square" + _local3].onReleaseOutside = function () {
_root.updateEquips();
if (_root.equips[this.myNum][0].split(", ")[0] != "Empty") {
_root.equipSquareHit();
}
_root.dragging = false;
if ((!_root.layout.mouseCursor.hitTest(this)) || (_root.equips[this.myNum][0].split(", ")[0] == "Empty")) {
_root.applyMouseCursor("Default");
} else {
_root.applyMouseCursor("Grab");
}
});
layout.equip["square" + _local3].onRollOver = function () {
_root.displayItemStats(_root.equips[this.myNum]);
_root.layout.chat.win = _root.layout.equip;
_root.applyMouseCursor("Grab");
};
layout.equip["square" + _local3].onRollOut = function () {
layout.chat._visible = false;
_root.applyMouseCursor("Default");
};
} else {
layout.equip["s" + _local3]._visible = true;
layout.equip["square" + _local3].onPress = function () {
};
layout.equip["square" + _local3].onRollOver = function () {
};
}
layout.equip["square" + _local3].useHandCursor = false;
}
_local3++;
}
}
function equipSquareHit() {
var _local6 = getDropWindow();
var _local5 = _local6._name;
var _local4 = _root[inventoryShowing + "_item"];
var _local3 = layout.itemSquare.myNum;
if (_local5 == "inventory") {
var _local2 = 0;
while (_local2 < _root[inventoryShowing + "_slots"]) {
if (layout.inventory.list["square" + _local2].hitTest(_xmouse, _ymouse, true)) {
if (_local4[_local2][0] == "Empty") {
applyEquipStats(_root.equips[_local3], "Remove");
_local4[_local2] = _root.equips[_local3].concat();
_root.equips[_local3] = new Array();
_root.equips[_local3][0] = "Empty";
playSound("putEquip", field.character);
} else if (validEquip(_local4[_local2])) {
applyEquipStats(_root.equips[_local3], "Remove");
applyEquipStats(_local4[_local2], "Add");
tempSlot = _root.equips[_local3].concat();
_root.equips[_local3] = _local4[_local2].concat();
_local4[_local2] = tempSlot.concat();
playSound("putEquip", field.character);
}
break;
}
_local2++;
}
} else if (_local5 == "store") {
popSell(_local3, equips);
} else if (_local5 != "equip") {
popDrop(_local3, equips);
}
updateInventory();
updateEquips();
}
function swapInventory(inventoryName) {
layout.inventory.equip.gotoAndStop(1);
layout.inventory.use.gotoAndStop(1);
layout.inventory.etc.gotoAndStop(1);
layout.inventory.equip.btn.onRelease = (layout.inventory.use.btn.onRelease = (layout.inventory.etc.btn.onRelease = function () {
_root.swapInventory(this._parent._name);
}));
removeInventorySquares();
inventoryShowing = inventoryName;
layout.inventory[inventoryShowing].gotoAndStop(2);
createInventorySquares();
inventoryScroll_interval = setInterval(resetInventoryScroll, 24);
updateInventory();
setTimeout(updateInventory, 1);
}
function resetInventoryScroll() {
if (layout.inventory.scroller.dragger_MinHeight != undefined) {
if (_root[inventoryShowing + "_scroll"] != 0) {
layout.inventory.scroller.dragger._y = _root[inventoryShowing + "_scroll"];
}
clearInterval(inventoryScroll_interval);
}
}
function createInventorySquares() {
var _local2 = 0;
while (_local2 < _root[inventoryShowing + "_slots"]) {
var _local4 = (inventory_squareSize / 2) + ((_local2 - (Math.floor(_local2 / inventory_perRow) * inventory_perRow)) * (inventory_squareSize + inventory_spaceBetween));
var _local3 = (inventory_squareSize / 2) + (Math.floor(_local2 / inventory_perRow) * (inventory_squareSize + inventory_spaceBetween));
newInventorySquare(_local4, _local3, _local2);
_local2++;
}
layout.inventory.scroller._visible = _root[inventoryShowing + "_slots"] > 30;
}
function removeInventorySquares() {
var _local2 = 0;
while (_local2 < _root[inventoryShowing + "_slots"]) {
layout.inventory.list["square" + _local2].removeMovieClip();
_local2++;
}
}
function newInventorySquare(myX, myY, myIndex) {
var _local1 = layout.inventory.list.attachMovie("itemSquare", "square" + myIndex, layout.inventory.list.getNextHighestDepth());
_local1._x = myX;
_local1._y = myY;
}
function placeEquip(myEquipSlot) {
var _local6 = _root[inventoryShowing + "_item"];
var _local2 = _local6[myEquipSlot];
var _local3 = Number(_local2[0].split(", ")[3]);
if (validEquip(_local2)) {
if (_root.equips[_local3][0].split(", ")[0] == "Empty") {
_root.applyEquipStats(_local2, "Add");
_root.equips[_local3] = _local2.concat();
_root[inventoryShowing + "_item"][myEquipSlot] = new Array();
_root[inventoryShowing + "_item"][myEquipSlot][0] = "Empty";
} else {
_root.applyEquipStats(_root.equips[_local3], "Remove");
_root.applyEquipStats(_local2, "Add");
var _local5 = _root.equips[_local3].concat();
_root.equips[_local3] = _local2.concat();
_root[inventoryShowing + "_item"][myEquipSlot] = _local5.concat();
}
playSound("putEquip", field.character);
updateInventory();
updateEquips();
}
}
function removeEquip(myEquipSlot) {
if (field.character._currentframe >= 5) {
newError("Cannot remove an equipped item while attacking");
return(false);
}
var _local2 = _root.equips[myEquipSlot];
swapInventory("equip");
if (nextEmptySlot(_root[inventoryShowing + "_item"]) != "Full") {
applyEquipStats(_local2, "Remove");
_root[inventoryShowing + "_item"][nextEmptySlot(_root[inventoryShowing + "_item"])] = _local2.concat();
_root.equips[myEquipSlot] = new Array();
_root.equips[myEquipSlot][0] = "Empty";
playSound("putEquip", field.character);
} else {
newError("Inventory is full");
}
}
function upperInventoryType(myInvType) {
switch (myInvType) {
case "equip" :
return("Equip");
case "use" :
return("Use");
case "etc" :
return("Etc");
}
}
function validEquip(myEquip) {
var _local4 = true;
if (field.character._currentframe >= 3) {
newError("Cannot equip an item while attacking");
return(false);
}
var _local3 = myEquip[3].split(", ");
var _local5 = var_req;
var _local2 = 0;
while (_local2 < _local3.length) {
if ((_local3[_local2] != 0) && (_root[_local5[_local2]] < Number(_local3[_local2]))) {
_local4 = false;
}
_local2++;
}
_local3 = myEquip[4].split(", ");
if ((_local3[0] != "All") && (ninjaClass != _local3[0])) {
_local4 = false;
}
if (!_local4) {
newError("You do not meet the requirements of this item");
}
return(_local4);
}
function applyEquipStats(myEquip, statAction, toOriginal) {
var _local3 = myEquip[0].split(", ");
var _local7 = Number(_local3[3]);
_local3 = myEquip[2].split(", ");
var _local4 = _root[getVarArray("equip", _local7)];
var _local2 = 0;
while (_local2 < _local3.length) {
if (statAction == "Add") {
_root[_local4[_local2]] = _root[_local4[_local2]] + Number(_local3[_local2]);
} else if (statAction == "Remove") {
if (toOriginal != undefined) {
if (toOriginal[_local4[_local2]] == undefined) {
toOriginal[_local4[_local2]] = 0;
}
toOriginal[_local4[_local2]] = toOriginal[_local4[_local2]] + Number(_local3[_local2]);
} else {
_root[_local4[_local2]] = _root[_local4[_local2]] - Number(_local3[_local2]);
}
}
_local2++;
}
if (_local7 == 3) {
if (statAction == "Add") {
_local3 = myEquip[4].split(", ");
atkFrame = getAtkNum(_local3[3]);
atkSpeedBoost = Number(_local3[4]);
} else if ((statAction == "Remove") && (toOriginal == undefined)) {
atkFrame = getAtkNum();
atkSpeedBoost = 2;
}
} else if (_local7 == 0) {
if (statAction == "Add") {
_local3 = myEquip[4].split(", ");
maskHair = Number(_local3[3]) == 1;
} else if ((statAction == "Remove") && (toOriginal == undefined)) {
maskHair = false;
}
}
}
function dropToGround(myItemSlot, myAmount, myArray) {
var _local3 = myArray[myItemSlot];
slotAmount(_local3, myAmount, "minus");
var _local4 = _local3.concat();
slotAmount(_local4, myAmount, "equal");
var _local6 = getCharGroundWithDif() - 25;
newPickItem(_local4, field.character._x, _local6);
if (myArray == equips) {
myArray[myItemSlot] = new Array();
myArray[myItemSlot][0] = "Empty";
}
updateInventory();
updateEquips();
setTimeout(updateInventory, 1);
_root.playSound("drop_item");
gamePause = false;
}
function sellItem(myItemSlot, myAmount, myArray) {
var _local2 = myArray[myItemSlot];
slotAmount(_local2, myAmount, "minus");
var _local3;
if (_local2[0].split(", ")[1] == "equip") {
_local3 = Number(_local2[1].split(", ")[1]);
} else {
_local3 = Number(_local2[1].split(", ")[2]);
}
_local3 = getSellingPrice(_local2[0].split(", ")[0], _local3);
gold = Number(gold) + (_local3 * myAmount);
var _local6 = _local2.concat();
slotAmount(_local6, myAmount, "equal");
if (myArray == equips) {
myArray[myItemSlot] = new Array();
myArray[myItemSlot][0] = "Empty";
}
updateInventory();
updateEquips();
setTimeout(updateInventory, 1);
setTimeout(updateEquips, 1);
_root.playSound("gold");
addSellEvent(getItemName(_local2), myAmount);
gamePause = false;
}
function getItemName(myItem) {
if (!(myItem instanceof Array)) {
var _local4 = myItem.split(":");
if (_local4.length == 1) {
myItem = itemData[findNum(myItem, itemData)].concat();
} else if (Number(_local4[1]) == 1) {
myItem = shopPetBlood(_local4[0]);
} else {
myItem = shopMonsterBlood(_local4[0]);
}
}
var _local3 = myItem[0].split(", ");
var _local1 = _local3[0];
if (_local1 == "Monster Blood") {
var _local5 = getMonsterName(_local3[3]);
if (Number(_local3[4]) == 1) {
_local1 = "Pet";
if (!getMonsterName(_local3[3], true)) {
_local1 = "Ally";
}
_local1 = _local1 + (" " + _local5);
} else {
_local1 = _local5 + "'s Blood";
}
}
return(_local1);
}
function equipFocus(unlock) {
if (unlock == undefined) {
unlock = false;
}
var _local1 = 0;
while (_local1 < 7) {
layout.equip["square" + _local1].enabled = unlock;
_local1++;
}
layout.equip.closeX.enabled = unlock;
layout.equip.bg.enabled = unlock;
layout.equip.unfocus._visible = !unlock;
layout.equip.openInv.enabled = unlock;
}
function inventoryFocusOff() {
gamePause = true;
layout.inventory.equip.btn.enabled = (layout.inventory.use.btn.enabled = (layout.inventory.etc.btn.enabled = false));
layout.inventory.closeX.enabled = false;
layout.inventory.nofocus._visible = true;
layout.inventory.bg.enabled = false;
_root.layout.chat._visible = false;
_root.applyMouseCursor("Default");
var _local2 = 0;
while (_local2 < _root[inventoryShowing + "_slots"]) {
layout.inventory.list["square" + _local2].enabled = false;
layout.inventory.list["square" + _local2].onPress = function () {
};
layout.inventory.list["square" + _local2].onRollOver = function () {
};
_local2++;
}
}
function popDrop(mySlotNum, myArray) {
setTimeout(inventoryFocusOff, 2);
layout.store.focusOff();
equipFocus();
var _local1 = myArray[mySlotNum];
var _local2 = getItemName(_local1);
if ((_local1[0].split(", ")[1] == "equip") || (_local1[0].split(", ")[0] == "Monster Blood")) {
promptWindow("confirm_drop");
layout.confirm_drop.myTxt.text = ("Are you sure you want to drop this " + _local2) + "?";
layout.confirm_drop.mySlot = mySlotNum;
layout.confirm_drop.myArray = myArray;
} else {
promptWindow("confirm_multidrop");
layout.confirm_multidrop.myTxt.text = ("How many " + _local2) + "s would you like to drop?";
layout.confirm_multidrop.mySlot = mySlotNum;
layout.confirm_multidrop.maxAmount = getSlotAmount(_local1);
layout.confirm_multidrop.maxTxt.text = ("(max " + layout.confirm_multidrop.maxAmount) + ")";
layout.confirm_multidrop.itemNameTxt.text = _local2 + " x ";
layout.confirm_multidrop.myAmount.text = 1;
layout.confirm_multidrop.prevText = layout.confirm_multidrop.myAmount.text;
layout.confirm_multidrop.myArray = myArray;
}
}
function popSell(mySlotNum, myArray) {
setTimeout(inventoryFocusOff, 2);
layout.store.focusOff();
equipFocus();
myItem = myArray[mySlotNum];
myName = getItemName(myItem);
if ((myItem[0].split(", ")[1] == "equip") || (myItem[0].split(", ")[0] == "Monster Blood")) {
promptWindow("confirm_sell");
layout.confirm_sell.myTxt.text = ((("Are you sure you want to sell this " + myName) + " for ") + getSellingPrice(myName, Number(myItem[1].split(", ")[1]))) + " Gold?";
layout.confirm_sell.mySlot = mySlotNum;
layout.confirm_sell.myArray = myArray;
} else {
promptWindow("confirm_multisell");
layout.confirm_multisell.myPrice = getSellingPrice(myName, Number(myItem[1].split(", ")[2]));
layout.confirm_multisell.myTxt.text = ((("How many " + myName) + "s would you like to sell? (") + layout.confirm_multisell.myPrice) + " Gold Each)";
layout.confirm_multisell.mySlot = mySlotNum;
layout.confirm_multisell.maxAmount = getSlotAmount(myItem);
layout.confirm_multisell.maxTxt.text = ("(max " + layout.confirm_multisell.maxAmount) + ")";
layout.confirm_multisell.itemNameTxt.text = myName + " x ";
layout.confirm_multisell.myAmount.text = 1;
layout.confirm_multisell.prevText = layout.confirm_multisell.myAmount.text;
layout.confirm_multisell.myArray = myArray;
layout.confirm_multisell.totalTxt.text = ("Total: " + layout.confirm_multisell.myPrice) + " Gold";
}
}
function getSellingPrice(myName, defaultPrice) {
var _local1 = layout.store.lookItemPrice(myName);
if (_local1 == -1) {
return(defaultPrice);
}
return(Math.round((_local1 * 40) / 100));
}
function decideStat(myStat) {
var _local1 = myStat.split("-");
if (_local1.length > 1) {
return(Number(_local1[0]) + random((Number(_local1[1]) - Number(_local1[0])) + 1));
}
return(Number(myStat));
}
function decideShopStat(myStat) {
var _local1 = myStat.split("-");
if (_local1.length > 1) {
return(Number(_local1[0]) + Math.round((Number(_local1[1]) - Number(_local1[0])) / 2));
}
return(myStat);
}
function defineEquip(myEquip, isShop) {
if (myEquip[0].split(", ")[1] != "equip") {
return(myEquip);
}
var _local2 = myEquip[1].split(", ");
var _local1 = 0;
while (_local1 < _local2.length) {
if (isShop == true) {
_local2[_local1] = decideShopStat(_local2[_local1]);
} else {
_local2[_local1] = decideStat(_local2[_local1]);
}
_local1++;
}
myEquip[1] = _local2.join(", ");
_local2 = myEquip[2].split(", ");
_local1 = 0;
while (_local1 < _local2.length) {
if (isShop == true) {
_local2[_local1] = decideShopStat(_local2[_local1]);
} else {
_local2[_local1] = decideStat(_local2[_local1]);
}
_local1++;
}
myEquip[2] = _local2.join(", ");
return(myEquip);
}
function displayCommand(myCommand) {
layout.chat._visible = true;
layout.chat.txt.text = myCommand;
resetChatColor();
colorChat(myCommand, 13158);
}
function isPassive(mySkillName) {
return(Number(getSkillArray(mySkillName)[0].split(", ")[2]) == 1);
}
function displaySkillStats(mySkillName, myLevel) {
var _local4 = new String("");
var _local6 = getSkillArray(mySkillName);
var _local11 = getSkillNum(mySkillName);
_local4 = _local4 + mySkillName;
var _local8;
switch (Number(_local6[0].split(", ")[2])) {
case 0 :
_local8 = "Active";
break;
case 1 :
_local8 = "Passive";
break;
case 2 :
_local8 = "Supportive";
break;
case 3 :
_local8 = "Transformation";
break;
case 4 :
_local8 = "Summon";
}
_local4 = _local4 + ("\nSkill Type: " + _local8);
var _local14 = _root.analyzeVars(_root.nameSpace(_local6[0].split(", ")[1], 0, "@", ","));
_local4 = _local4 + (newline + _local14);
if (myLevel == undefined) {
myLevel = getSkillLevel(getSkillNum(mySkillName));
}
currentTxt = skillInfo(mySkillName, myLevel);
nextTxt = skillInfo(mySkillName, myLevel + 1);
var _local12 = "Current";
if (myLevel == _local6[4].split("~").length) {
_local12 = "Max";
}
if (((myLevel != 0) && (currentTxt != "")) && (myLevel != undefined)) {
_local4 = _local4 + ((((("\n\n" + _local12) + " Level [ ") + myLevel) + " ]:\n") + currentTxt);
}
if (((myLevel != _local6[4].split("~").length) && (nextTxt != "")) && (myLevel != undefined)) {
_local4 = _local4 + ((("\n\nNext Level [ " + (myLevel + 1)) + " ]:\n") + nextTxt);
}
if ((_local6[2] != "") && (myLevel == 0)) {
var _local7 = _local6[2].split(", ");
_local4 = _local4 + "\n\nPre-Requisite:";
var _local2 = 0;
while (_local2 < _local7.length) {
var _local3 = _local7[_local2].split("-");
_local4 = _local4 + ((((newline + skillData[Number(_local3[0])][0].split(", ")[0]) + " ( ") + _local3[1]) + " )");
_local2++;
}
}
if (_local6[1] != "") {
_local4 = _local4 + ("\n\nRequired Weapon: " + _local6[1].split(", ").join("/"));
}
if (cooldown[_local11] > 0) {
_local4 = _local4 + ("\n\nCooldown Left: " + getTimeString(cooldown[_local11]));
}
layout.chat._visible = true;
layout.chat.txt.text = _local4;
resetChatColor();
colorChat(mySkillName, 16711680, true);
colorChat(_local14, 3355443);
colorChat("Skill Type: " + _local8, 10066329);
colorChat(((_local12 + " Level [ ") + myLevel) + " ]:", 0, true);
colorChat(("Next Level [ " + (myLevel + 1)) + " ]:", 0, true);
colorChat("Pre-Requisite:", 0, true);
if (dayTime == "day") {
colorChat("Active During: Night", 16711680, false, true);
} else if (dayTime == "night") {
colorChat("Active During: Day", 16711680, false, true);
}
if ((_local6[2] != "") && (myLevel == 0)) {
var _local2 = 0;
while (_local2 < _local7.length) {
var _local3 = _local7[_local2].split("-");
if (getSkillLevel(Number(_local3[0])) >= Number(_local3[1])) {
myColor = 10066329 /* 0x999999 */;
} else {
myColor = 16711680 /* 0xFF0000 */;
}
colorChat(((skillData[Number(_local3[0])][0].split(", ")[0] + " ( ") + _local3[1]) + " )", myColor);
_local2++;
}
}
if (_local6[1] != "") {
var _local7 = _local6[1].split(", ");
var _local9 = getCurrentWeapon();
myColor = 16711680 /* 0xFF0000 */;
var _local2 = 0;
while (_local2 < _local7.length) {
if (_local7[_local2] == _local9) {
myColor = 10066329 /* 0x999999 */;
}
_local2++;
}
colorChat("Required Weapon: " + _local6[1].split(", ").join("/"), myColor);
}
var _local13 = Number(_local6[4].split("~")[myLevel].split(", ")[1]);
if (_local13 > _root.maxMana) {
colorChat("Mana Consumed: " + _local13, 16711680);
}
colorChat("Cooldown Left: " + getTimeString(cooldown[_local11]), 13311);
}
function skillInfo(mySkillName, myLevel) {
var _local1;
var _local7 = new String("");
var _local14 = getSkillNum(mySkillName);
var _local13 = skillData[_local14];
var _local5 = _local13[3].split(", ");
var _local16 = _local13[4].split("~");
var _local6 = _local16[myLevel - 1].split(", ");
lastDi = 99999 /* 0x01869F */;
_local1 = 0;
while (_local1 < _local5.length) {
var _local2 = _local6[_local1 + 3];
if ((Number(_local2) != 0) && (_local2 != "undefined")) {
lastDi = _local1;
}
_local1++;
}
_local1 = 0;
while (_local1 < _local5.length) {
var _local2 = _local6[_local1 + 3];
if ((Number(_local2) != 0) && (_local2 != "undefined")) {
var _local11 = Number(_local2.split("%")[0]);
var _local3 = replaceName(_local5[_local1]);
var _local9 = false;
var _local4 = _local3.split("%");
if (_local4.length > 1) {
_local3 = _local4[0];
_local9 = true;
}
var _local8 = ": ";
var _local10 = _local5[_local1].split("_")[0];
if (((_local10 == "s") || (_local10 == "t")) && (_local11 > 0)) {
_local8 = _local8 + "+";
}
_local4 = _local3.split("&");
if (_local4.length > 1) {
_local3 = _local4[0];
_local2 = getTimeString(Number(_local2) * 24);
}
if (_local5[_local1] == "nowSummoning") {
_local2 = monsterData[Number(_local6[_local1 + 3])][0].split(", ")[0];
}
if ((_local3 == "Body Size") && (Number(_local2) == 100)) {
} else {
_local7 = _local7 + ((_local3 + _local8) + _local2);
if (_local9) {
_local7 = _local7 + "%";
}
if (_local1 != lastDi) {
_local7 = _local7 + newline;
}
}
}
_local1++;
}
if (Number(_local6[0]) != 0) {
_local7 = _local7 + ("\nCooldown: " + getTimeString(Number(_local6[0]) * 24));
}
if (Number(_local6[1]) != 0) {
_local7 = _local7 + ("\nMana Consumed: " + _local6[1]);
}
if (Number(_local6[2]) != 0) {
_local7 = _local7 + ("\nSacrifices Consumed: " + _local6[2]);
}
if (Number(_local13[0].split(", ")[4]) == 4) {
var _local12 = "Active During: ";
var _local15 = Number(monsterData[Number(getSkillInfo(_local14, 0, myLevel))][0].split(", ")[4]);
switch (_local15) {
case 0 :
_local12 = _local12 + "Both Day and Night";
break;
case 1 :
_local12 = _local12 + "Day";
break;
case 2 :
_local12 = _local12 + "Night";
}
_local7 = _local7 + (newline + _local12);
}
return(_local7);
}
function getSkillLevel(mySkillNum) {
var _local3 = 1;
while (_local3 <= 4) {
if (_root["book" + _local3] != undefined) {
var _local2 = 0;
while (_local2 < _root["book" + _local3].length) {
if (_root["book" + _local3][_local2] == mySkillNum) {
return(_root[("book" + _local3) + "_skills"][_local2 - 1]);
}
_local2++;
}
}
_local3++;
}
}
function skillCooldown(skill) {
var _local1 = getSkillLevel(skill);
if (_local1 != 0) {
return(Number(skillData[skill][4].split("~")[_local1 - 1].split(", ")[0]) * 24);
}
return(0);
}
function skillManaConsume(skill) {
var _local1 = getSkillLevel(skill);
if (_local1 != 0) {
return(Number(skillData[skill][4].split("~")[_local1 - 1].split(", ")[1]));
}
return(0);
}
function skillSacrificesConsume(skill) {
var _local1 = getSkillLevel(skill);
if (_local1 != 0) {
return(Number(skillData[skill][4].split("~")[_local1 - 1].split(", ")[2]));
}
return(0);
}
function getSkillInfo(skill, col, skillLevel) {
if (skillLevel == undefined) {
skillLevel = getSkillLevel(skill);
}
if (skillLevel != 0) {
return(skillData[skill][4].split("~")[skillLevel - 1].split(", ")[col + 3]);
}
return(0);
}
function getSkillInfoArray(skill, skillLevel) {
if (skillLevel == undefined) {
skillLevel = getSkillLevel(skill);
}
if (skillLevel != 0) {
var _local1 = skillData[skill][4].split("~")[skillLevel - 1].split(", ");
_local1.splice(0, 3);
return(_local1);
}
return(0);
}
function applyAllSkillPoints() {
var _local3 = 1;
while (_local3 <= 4) {
var _local2 = 1;
while (_local2 < _root["book" + _local3].length) {
applySkillPoint(_root["book" + _local3][_local2], _root[("book" + _local3) + "_skills"][_local2 - 1]);
_local2++;
}
_local3++;
}
}
function sortDepths(element1, element2) {
return(getObjectY(element1) - getObjectY(element2));
}
function combineArray(myArray) {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < myArray.length) {
_local2 = _local2.concat(myArray[_local1]);
_local1++;
}
return(_local2);
}
function applyPerspective() {
var _local3 = [enemies, pets, activeObjects, invItems, npcs, stars, charArray];
var _local2 = combineArray(_local3);
objectDepths = _local2.concat();
_local2.sort(sortDepths);
objectDepths.sort(sortWins);
var _local1 = 0;
while (_local1 < _local2.length) {
bringObjectToFront(_local2[_local1]);
_local1++;
}
transparentObjects();
}
function transparentObjects() {
var _local2 = 0;
while (_local2 < objectDepths.length) {
var _local1 = objectDepths[_local2];
if (_local1.arrayType == "activeObjects") {
if ((((((_local1.getDepth() > field.character.getDepth()) && (_local1.hitTest(field.character))) && (_local1.objectName != "teleport")) && (_local1 != object)) && (_local1.myShadow != undefined)) && (!_local1.isGlowing)) {
_local1._alpha = 50;
} else {
_local1._alpha = 100;
}
}
_local2++;
}
}
function bringObjectToFront(myObject) {
var _local2 = findObjectIndex(myObject);
var _local1 = _local2 - 1;
while (_local1 >= 0) {
myObject.swapDepths(objectDepths[_local1]);
_local1--;
}
objectDepths.sort(sortWins);
}
function findObjectIndex(myObject) {
var _local1 = 0;
while (_local1 < objectDepths.length) {
if (objectDepths[_local1] == myObject) {
return(_local1);
}
_local1++;
}
}
function getObjectY(mc) {
var _local1 = mc._y;
var _local2 = mc.arrayType;
if (mc == object) {
_local2 = "charArray";
}
if ((mc == field.character) || (mc == object)) {
_local1 = getCharGroundWithDif(2) + 10;
}
if (mc.objectName == "teleport") {
_local1 = _local1 - 32;
}
if (mc == object) {
_local1 = _local1 + 0.1;
}
if (((_local2 == "enemies") || (_local2 == "charArray")) || (_local2 == "pets")) {
_local1 = _local1 + 25;
}
if (_local2 == "npcs") {
_local1 = _local1 - 15;
}
if (((_local2 == "enemies") || (_local2 == "pets")) && (mc.isNPC)) {
_local1 = _local1 + 50;
}
if (_local2 == "invItems") {
_local1 = _local1 + 10;
}
if (_local2 == "stars") {
_local1 = _local1 + 60;
}
if ((_local2 == "activeObjects") && (mc.weight != 99999999)) {
_local1 = mc.ground;
}
return(_local1);
}
function npcBehavior(n, startUp) {
n.enabled = !_root.gamePause;
updateCharacterEquips(n.myNum, n);
if (!_root.gamePause) {
if (n.character._currentframe == n.character._totalframes) {
n.character.gotoAndStop(1);
} else {
n.character.nextFrame();
}
}
if (n != pointOn) {
n.filters = null;
setFilters(n);
}
n.mySize = (Math.round((n._y - _root.minHeight) / _root.perspectiveSize) + 100) - 10;
n._xscale = (n._yscale = n.mySize);
if (startUp == true) {
n.myShadow._width = n.character._width;
n.myShadow._x = n.character.getBounds(n).xMin + (n.myShadow._width / 2);
var _local8 = n.character.head.bodyPart_hair;
if (_local8._currentframe == 22) {
_local8 = n.character.head.bodyPart_face;
}
var _local9 = _local8.getBounds(n);
var _local10 = 10;
n.questSign._x = _local9.xMax + _local10;
n.storeSign._x = _local9.xMin - _local10;
}
var _local3 = 0;
while (_local3 < n.quest.length) {
if (_root.appearIn(Number(n.quest[_local3]), _root.completed)) {
n.quest.splice(_local3, 1);
}
_local3++;
}
n.finalQuests = new Array();
var _local5 = 0;
var _local4 = 0;
var _local6 = 0;
var _local7 = 0;
_local3 = 0;
while (_local3 < n.quest.length) {
if (_root.questReq(n.quest[_local3])) {
n.finalQuests.push(n.quest[_local3]);
if (_root.appearIn(n.quest[_local3], _root.inProgress)) {
if (_root.questStatus(n.quest[_local3], "completed")) {
_local4++;
} else {
_local5++;
}
} else if (Number(_root.quest[n.quest[_local3]][5].split(", ")[5]) == 1) {
_local6++;
} else if (isRepeatable(n.quest[_local3])) {
_local7++;
}
}
_local3++;
}
var _local11 = (((n.finalQuests.length - _local5) - _local4) - _local6) - _local7;
n.questSign._visible = true;
if (_local4 > 0) {
n.questSign.gotoAndStop(3);
} else if (_local6 > 0) {
n.questSign.gotoAndStop(4);
} else if (_local11 > 0) {
n.questSign.gotoAndStop(1);
} else if (_local7 > 0) {
n.questSign.gotoAndStop(5);
} else if (_local5 > 0) {
n.questSign.gotoAndStop(2);
} else {
n.questSign._visible = false;
}
n.storeSign._visible = n.store != undefined;
n.healthSign._visible = n.myName == "High Priest Tarreal";
}
function failQuests() {
var _local1 = 0;
while (_local1 < inProgress.length) {
if (Number(quest[inProgress[_local1]][5].split(", ")[7]) == 1) {
removeQuest(inProgress[_local1], true, true);
}
_local1++;
}
}
function getCurrentWeapon() {
if (_root.equips[3][0] == "Empty") {
return("None");
}
return(_root.equips[3][4].split(", ")[3]);
}
function getCurrentWeaponElement() {
var _local2 = _root.equips[3][4].split(", ")[1];
if (_local2 == undefined) {
_local2 = "None";
}
return(_local2);
}
function throwBallObject() {
activeObjects[activeObjects.length - 1].sideRight = _root.sideRight;
var _local2 = activeObjects[activeObjects.length - 1].throwOn;
setTimeout(_local2, 1, _root.checkClosest());
}
function glowCharacter() {
var _local1 = random(Math.ceil(elementAttach / 2));
var _local2 = 5 + Math.floor(elementAttach * 0.5);
var _local3 = random(_local2 * 5);
if ((_local1 == 0) && (elementAttach > 0)) {
_local1 = 1;
}
if (glow.blurX < _local2) {
glow.blurX++;
} else if (glow.blurX > _local2) {
glow.blurX--;
}
if (glow.blurY < _local3) {
glow.blurY++;
} else if (glow.blurY > _local3) {
glow.blurY--;
}
if (glow.strength < _local1) {
glow.strength++;
} else if (glow.strength > _local1) {
glow.strength--;
}
glow.quality = maxFilter;
if (elementAttach > 0) {
glow1.quality = maxFilter;
} else {
glow1.quality = 0;
}
}
function applyCoordinates(myText) {
var _local3 = new Array();
var _local5 = -5;
var _local4 = 0;
var _local1;
_local1 = 0;
while (_local1 < myText.length) {
_local3[_local1] = myText.charCodeAt(_local1);
_local3[_local1] = _local3[_local1] + _local5;
_local1++;
}
_local4 = myText.length;
myText = "";
_local1 = 0;
while (_local4 > _local1) {
myText = myText + String.fromCharCode(_local3[_local1]);
_local1++;
}
return(myText);
}
function analyzeVars(txt) {
var _local4 = "";
ac = 0;
while (ac < txt.length) {
var _local3 = txt.charAt(ac);
if (_local3 == "#") {
var _local2 = "";
ac++;
while (((((((((txt.charAt(ac) != " ") && (txt.charAt(ac) != ",")) && (txt.charAt(ac) != ".")) && (txt.charAt(ac) != "!")) && (txt.charAt(ac) != "?")) && (txt.charAt(ac) != "#")) && (txt.charAt(ac) != "(")) && (txt.charAt(ac) != ")")) && (ac != txt.length)) {
_local2 = _local2 + txt.charAt(ac);
ac++;
}
if (txt.charAt(ac) == "#") {
_local4 = _local4 + returnSign(_local2);
} else {
_local4 = _local4 + (returnVar(_local2) + txt.charAt(ac));
}
} else {
_local4 = _local4 + _local3;
}
ac++;
}
return(_local4);
}
function returnVar(theVar) {
if (theVar.split("[").length != 1) {
var _local5 = "";
var _local6 = "";
var _local3 = false;
acc = 0;
while (acc < theVar.length) {
var _local2 = theVar.charAt(acc);
if (_local2 == "[") {
_local3 = true;
}
if ((_local3 && (_local2 != "[")) && (_local2 != "]")) {
_local6 = _local6 + _local2;
} else if (!_local3) {
_local5 = _local5 + _local2;
}
acc++;
}
if (_local5 == "command") {
return(("[ " + keyName(_root[_local5][Number(_local6)])) + " ]");
}
return(_root[_local5][Number(_local6)]);
}
return(_root[theVar]);
}
function returnSign(theSign) {
if (!(theSign === "n")) {
} else {
return(newline);
}
return("");
}
function targetAvailable(myTarget) {
var _local1 = 0;
while (_local1 < pets.length) {
if (pets[_local1].targeted == myTarget) {
return(false);
}
_local1++;
}
return(true);
}
function removePet(myPet) {
var _local1 = 0;
while (_local1 < pets.length) {
if (pets[_local1] == myPet) {
pets.splice(_local1, 1);
myPet.removeMovieClip();
if (layout.summon_wins.hitTest(_xmouse, _ymouse, true)) {
layout.chat._visible = false;
layout.chat._alpha = 100;
}
layout.summon_wins["summon_win" + pets.length].removeMovieClip();
break;
}
_local1++;
}
}
function getTarget(myPet, alsoTargeted) {
var _local3 = new Array();
var _local2;
if (myPet.myPosition == "Offensive") {
_local2 = 0;
while (_local2 < enemies.length) {
tEnemy = enemies[_local2];
if (((((tEnemy._alpha == 100) && (tEnemy._x < _root.blockLimit._x)) && (Math.abs(tEnemy._x - myPet._x) < 550)) && (tEnemy.targeted != false)) && ((alsoTargeted == true) || (targetAvailable(tEnemy)))) {
_local3.push(tEnemy);
}
_local2++;
}
} else if (myPet.myPosition == "Brutal") {
_local2 = 0;
while (_local2 < enemies.length) {
tEnemy = enemies[_local2];
if ((((tEnemy._alpha == 100) && (tEnemy._x < _root.blockLimit._x)) && (Math.abs(tEnemy._x - myPet._x) < 550)) && ((alsoTargeted == true) || (targetAvailable(tEnemy)))) {
_local3.push(tEnemy);
}
_local2++;
}
} else {
return(false);
}
if ((_local3.length == 0) && (alsoTargeted != true)) {
return(getTarget(myPet, true));
}
if (_local3.length > 0) {
return(getClosestEnemy(myPet, getLessTargeted(_local3)));
}
return(false);
}
function getClosestEnemy(myPet, myArray) {
var _local6;
var _local4 = 99999999999;
var _local1 = 0;
while (_local1 < myArray.length) {
var _local3 = myArray[_local1];
var _local2 = Math.abs(_local3._x - myPet._x);
if (_local2 < _local4) {
_local4 = _local2;
_local6 = _local3;
}
_local1++;
}
return(_local6);
}
function getTargetedAmount(myEnemy) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < pets.length) {
if (pets[_local1].targeted == myEnemy) {
_local2++;
}
_local1++;
}
return(_local2);
}
function getLessTargeted(myArray) {
var _local6 = new Array();
var _local4 = 9999;
var _local1;
_local1 = 0;
while (_local1 < myArray.length) {
var _local3 = myArray[_local1];
var _local5 = getTargetedAmount(_local3);
if (_local5 < _local4) {
_local4 = _local5;
}
_local1++;
}
_local1 = 0;
while (_local1 < myArray.length) {
var _local3 = myArray[_local1];
var _local5 = getTargetedAmount(_local3);
if (_local5 == _local4) {
_local6.push(_local3);
}
_local1++;
}
return(_local6);
}
function callPets() {
var _local3 = 0;
while (_local3 < petNames.length) {
var _local1 = petNames[_local3];
var _local2 = newEnemy(monsterData[Number(_local1[0])][0].split(", ")[0], field.character._x, field.character._y, true);
if (firstLoad) {
_local2._x = _local1[1];
_local2._y = _local1[2];
}
setMonsterVars(_local2, _local1.slice(3, _local1.length));
_local3++;
}
}
function summonMonster(myMonster, overallBonus, summonSkill, isPet, petExperience, petMaxExperience, petHealth, petMana) {
myX = field.character._x;
if (jumping) {
myY = jY;
} else {
myY = field.character._y;
}
var _local2 = myMonster.split("@");
if (summonSkill == true) {
myX = Number(_local2[1]);
myY = Number(_local2[2]);
}
var _local1 = newEnemy(_local2[0], myX, myY, true, false, overallBonus, isPet == true);
_local1.myPosition = "Offensive";
if (summonSkill == true) {
_local1.health = _local1.health + summon_health;
_local1.startHealth = _local1.startHealth + summon_health;
_local1.mana = _local1.mana + summon_mana;
_local1.startMana = _local1.startMana + summon_mana;
_local1.minDmg = _local1.minDmg + summon_damage;
_local1.maxDmg = _local1.maxDmg + summon_damage;
_local1.eMinDmg = _local1.eMinDmg + summon_elementDamage;
_local1.eMaxDmg = _local1.eMaxDmg + summon_elementDamage;
_local1.accuracy = _local1.accuracy + summon_accuracy;
_local1.avoidability = _local1.avoidability + summon_avoidability;
_local1.defense = _local1.defense + summon_defense;
_local1.resistance_Fire = _local1.resistance_Fire + summon_fRes;
_local1.resistance_Ice = _local1.resistance_Ice + summon_iRes;
_local1.resistance_Lightning = _local1.resistance_Lightning + summon_lRes;
} else if (isPet == true) {
_local1.realPet = true;
_local1.level = 1 + Math.round(overallBonus / petPowerGrow);
_local1.exp = petExperience;
_local1.maxExp = petMaxExperience;
_local1.health = petHealth;
_local1.mana = petMana;
}
}
function replaceName(myName) {
switch (myName) {
case "starDistance" :
return("Distance");
case "doubleDamage" :
return("Damage Each%");
case "exploDamage" :
return("Fire Damage%");
case "maxexplo" :
return("Max Explosions");
case "maxHit" :
return("Max Monsters");
case "multipleStrike_damage" :
return("Damage%");
case "panic_vision" :
return("Panic Vision");
case "underground_strength" :
return("Underground Mastery");
case "dash" :
return("Dash Force");
case "nowSummoning" :
return("Summon");
case "maxSummons" :
return("Max Summons");
case "chainDamage" :
return("Lightning Damage");
case "chainRange" :
return("Range");
case "maxChain" :
return("Max Chain");
case "health_reg_amount" :
return("Health Recovery");
case "mana_reg_amount" :
return("Mana Recovery");
case "controlSuccess" :
return("Success Rate%");
case "controlTime" :
return("Control Period&");
case "powerBlow_damage" :
return("Damage%");
case "windCut_damage" :
return("Damage Per Cut%");
case "maxQuickAttacks" :
return("Max Cuts");
case "pressureCrush_damage" :
return("Damage%");
case "pressureCrush_multi" :
return("Max Crushes");
case "pressureCrush_health" :
return("Health Drained%");
case "combatDash" :
return("Dash Distance");
case "elementClash_chance" :
return("Apply Chance%");
case "elementClash_duration" :
return("Duration&");
case "s_health" :
return("Health");
case "s_mana" :
return("Mana");
case "s_defense" :
return("Defense");
case "s_damage" :
return("Damage");
case "s_elementDamage" :
return("Element Damage");
case "s_fRes" :
return("Fire Resistance");
case "s_iRes" :
return("Ice Resistance");
case "s_lRes" :
return("Lightning Resistance");
case "s_accuracy" :
return("Accuracy");
case "s_avoidability" :
return("Avoidability");
case "captureChance" :
return("Drop Rate%");
case "captureEnpower" :
return("Wildness%");
case "captureTime" :
return("Duration&");
case "supportDuration" :
return("Duration&");
case "t_health" :
return("Max Health");
case "t_mana" :
return("Max Mana");
case "t_speed" :
return("Speed");
case "t_jump" :
return("Jump");
case "t_damage" :
return("Damage");
case "t_elementDamage" :
return("Element Damage");
case "t_seRate" :
return("Side Effect Rate");
case "t_seDuration" :
return("Side Effect Duration&");
case "t_accuracy" :
return("Accuracy");
case "t_avoidability" :
return("Avoidability");
case "t_crit" :
return("Critical Hit");
case "t_defense" :
return("Defense");
case "t_fRes" :
return("Fire Resistance");
case "t_iRes" :
return("Ice Resistance");
case "t_lRes" :
return("Lightning Resistance");
case "t_str" :
return("Strength");
case "t_dex" :
return("Dexterity");
case "t_wis" :
return("Wisdom");
case "t_luk" :
return("Luck");
case "transformTo" :
return("Transformation");
case "bodySize" :
return("Body Size%");
case "backDamage" :
return("Damage%");
case "bloodshed_damage" :
return("Damage%");
case "bloodshed_max" :
return("Max Monsters");
case "bloodshed_backChance" :
return("Backstab Rate%");
}
return(myName);
}
function removeFX(myObj) {
fx = 0;
while (fx < objects.length) {
if (myObj == objects[fx]) {
objects.splice(fx, 1);
myObj.removeMovieClip();
}
fx++;
}
}
function updateStatWins() {
if (layout.soundsPer.text == "") {
layout.summon_wins._y = -214;
} else {
layout.summon_wins._y = -187;
}
var _local6 = 3;
if (pets.length > 3) {
_local6 = 6;
layout.summon_wins._y = layout.summon_wins._y - 20;
}
var _local16 = 0;
var _local7 = 0;
var _local8 = 90.6;
var _local17 = 96.5;
var _local5 = 0;
while (_local5 < pets.length) {
var _local3 = pets[_local5];
var _local9 = !getMonsterName(_local3.myName, true);
myWin = layout.summon_wins["summon_win" + _local5];
if (myWin == undefined) {
myWin = layout.summon_wins.attachMovie("summon_win", "summon_win" + _local5, layout.summon_wins.getNextHighestDepth());
}
myWin.myPet = _local3;
var _local15 = myWin.character._xscale;
var _local13 = myWin.character._yscale;
var _local14 = myWin.image._xscale;
var _local12 = myWin.image._yscale;
myWin.character._xscale = 0;
myWin.character._yscale = 0;
myWin.image._xscale = 0;
myWin.image._yscale = 0;
var _local10 = Math.round((_local8 / _local6) * 3);
var _local11 = Math.round((_local17 / _local6) * 3);
myWin._width = _local10;
myWin._height = _local11;
myWin._x = (_local10 + 5) * (-_local7);
myWin._y = (_local11 + 5) * _local16;
myWin.character._xscale = _local15;
myWin.character._yscale = _local13;
myWin.image._xscale = _local14;
myWin.image._yscale = _local12;
_local7++;
if (((_local7 == _local6) && (_local6 == 3)) || ((_local7 == (_local6 - 1)) && (_local6 != 3))) {
_local16++;
_local7 = 0;
}
myWin.healthBar._width = Math.round((_local3.health / _local3.startHealth) * _local8);
myWin.manaBar._width = Math.round((_local3.mana / _local3.startMana) * _local8);
myWin.controlBar._width = Math.round((_local3.controlTimer / _local3.startControlTimer) * _local8);
myWin.expBar._width = Math.round((_local3.exp / _local3.maxExp) * _local8);
if (!_local9) {
myWin.image.gotoAndStop(findNum(_local3.myName, monsterData) + 1);
} else {
updateCharacterEquips(Number(_local3.myName), myWin.character, true);
}
myWin.image._visible = !_local9;
myWin.character._visible = _local9;
myWin.manaBar._visible = (myWin.manaBar_back._visible = (myWin.manaBar_front._visible = _local3.startMana != 0));
myWin.controlBar._visible = (myWin.controlBar_back._visible = (myWin.controlBar_front._visible = _local3.controlTimer > 0));
myWin.expBar._visible = (myWin.expBar_back._visible = (myWin.expBar_front._visible = !isNaN(_local3.maxExp)));
if (myWin.controlBar._visible) {
myWin.healthBar._y = (myWin.healthBar_back._y = (myWin.healthBar_front._y = myWin.controlBar._y - myWin.controlBar._height));
myWin.manaBar._y = (myWin.manaBar_back._y = (myWin.manaBar_front._y = myWin.controlBar._y - (myWin.controlBar._height * 2)));
myWin.btns.gotoAndStop(2);
} else if (myWin.expBar._visible) {
myWin.healthBar._y = (myWin.healthBar_back._y = (myWin.healthBar_front._y = myWin.expBar._y - myWin.expBar._height));
myWin.manaBar._y = (myWin.manaBar_back._y = (myWin.manaBar_front._y = myWin.expBar._y - (myWin.expBar._height * 2)));
myWin.btns.gotoAndStop(3);
} else {
myWin.healthBar._y = (myWin.healthBar_back._y = (myWin.healthBar_front._y = myWin.controlBar._y));
myWin.manaBar._y = (myWin.manaBar_back._y = (myWin.manaBar_front._y = myWin.controlBar._y - myWin.controlBar._height));
myWin.btns.gotoAndStop(1);
}
if (_local3.myPosition == "Defensive") {
myWin.pos1.enabled = false;
myWin.pos1._alpha = 50;
myWin.pos2.enabled = true;
myWin.pos2._alpha = 100;
myWin.pos3.enabled = true;
myWin.pos3._alpha = 100;
} else if (_local3.myPosition == "Offensive") {
myWin.pos1.enabled = true;
myWin.pos1._alpha = 100;
myWin.pos2.enabled = false;
myWin.pos2._alpha = 50;
myWin.pos3.enabled = true;
myWin.pos3._alpha = 100;
} else if (_local3.myPosition == "Brutal") {
myWin.pos1.enabled = true;
myWin.pos1._alpha = 100;
myWin.pos2.enabled = true;
myWin.pos2._alpha = 100;
myWin.pos3.enabled = false;
myWin.pos3._alpha = 50;
}
myWin.pos1.onRelease = function () {
this._parent.myPet.myPosition = "Defensive";
layout.chat._visible = false;
};
myWin.pos2.onRelease = function () {
this._parent.myPet.myPosition = "Offensive";
layout.chat._visible = false;
};
myWin.pos3.onRelease = function () {
this._parent.myPet.myPosition = "Brutal";
layout.chat._visible = false;
};
myWin.btns.btn.onRelease = function () {
if (this._parent._parent.myPet.controlTimer > 0) {
this._parent._parent.myPet.controlTimer = -1;
switchType(this._parent._parent.myPet);
} else if (this._parent._parent.myPet.realPet == true) {
_root.unSummon(this._parent._parent.myPet);
} else {
_root.newFX("blood", this._parent._parent.myPet);
_root.playSound("splitBlood", myBlood);
_root.removePet(this._parent._parent.myPet);
}
layout.chat._visible = false;
layout.chat._alpha = 100;
};
myWin.bg.enabled = true;
myWin.bg.useHandCursor = false;
myWin.destroy.enabled = true;
myWin.bg.onRollOver = function () {
displaySummonStats(this._parent.myPet);
_root.layout.chat.win = this._parent;
layout.chat._alpha = 75;
};
myWin.pos1.onRollOver = function () {
var _local3 = getNameObject(this._parent.myPet.myName);
displayCommand(("Set " + _local3.namesArray[0]) + " Position to Defensive");
_root.layout.chat.win = this._parent;
};
myWin.pos2.onRollOver = function () {
var _local3 = getNameObject(this._parent.myPet.myName);
displayCommand(("Set " + _local3.namesArray[0]) + " Position to Offensive");
_root.layout.chat.win = this._parent;
};
myWin.pos3.onRollOver = function () {
var _local3 = getNameObject(this._parent.myPet.myName);
displayCommand(("Set " + _local3.namesArray[0]) + " Position to Brutal");
_root.layout.chat.win = this._parent;
};
myWin.btns.btn.onRollOver = function () {
var _local3 = getNameObject(this._parent._parent.myPet.myName);
if (this._parent._parent.myPet.controlTimer > 0) {
displayCommand((("Release " + _local3.namesArray[0]) + " ") + _local3.myName);
} else if (this._parent._parent.myPet.realPet == true) {
displayCommand((((_local3.unSummonCommand + " ") + _local3.namesArray[1]) + " ") + _local3.myName);
} else {
displayCommand((("Kill " + _local3.namesArray[0]) + " ") + _local3.myName);
}
_root.layout.chat.win = this._parent._parent;
};
myWin.bg.onRollOut = (myWin.bg.onReleaseOutside = (myWin.pos1.onRollOut = (myWin.pos1.onReleaseOutside = (myWin.pos2.onRollOut = (myWin.pos2.onReleaseOutside = (myWin.pos3.onRollOut = (myWin.pos3.onReleaseOutside = (myWin.btns.btn.onRollOut = (myWin.btns.btn.onReleaseOutside = function () {
layout.chat._visible = false;
layout.chat._alpha = 100;
})))))))));
if (gamePause) {
myWin.pos1.enabled = (myWin.pos2.enabled = (myWin.pos3.enabled = (myWin.destroy.enabled = (myWin.bg.enabled = false))));
}
_local5++;
}
}
function getNameObject(theName) {
var _local3 = ["Monster", "Pet"];
var _local1 = "Un-Summon";
var _local4 = getMonsterName(theName);
if (!getMonsterName(theName, true)) {
_local3 = ["Ally", "Ally"];
_local1 = "Split up with";
}
return({namesArray:_local3, unSummonCommand:_local1, myName:_local4});
}
function displaySummonStats(myPet) {
var _local2 = new String("");
var _local3 = getMonsterName(myPet.myName);
_local2 = _local2 + (_local3 + " (");
if (myPet.realPet == true) {
_local2 = _local2 + "Pet ";
}
_local2 = _local2 + (("Level " + myPet.level) + ")");
if (myPet.minDmg > 0) {
_local2 = _local2 + ((("\nDamage: " + myPet.minDmg) + "-") + myPet.maxDmg);
}
if ((myPet.eMinDmg > 0) && (myPet.myElement != "None")) {
_local2 = _local2 + (((((newline + myPet.myElement) + " Damage: ") + myPet.eMinDmg) + "-") + myPet.eMaxDmg);
}
if (myPet.accuracy > 0) {
_local2 = _local2 + ("\nAccuracy: " + myPet.accuracy);
}
if (myPet.avoidability > 0) {
_local2 = _local2 + ("\nAvoidability: " + myPet.avoidability);
}
if (myPet.defense > 0) {
_local2 = _local2 + (("\nDefense: " + myPet.defense) + "%");
}
if (myPet.resistance_Fire > 0) {
_local2 = _local2 + (("\nFire Resistance: " + myPet.resistance_Fire) + "%");
}
if (myPet.resistance_Ice > 0) {
_local2 = _local2 + (("\nIce Resistance: " + myPet.resistance_Ice) + "%");
}
if (myPet.resistance_Lightning > 0) {
_local2 = _local2 + (("\nLightning Resistance: " + myPet.resistance_Lightning) + "%");
}
if (myPet.speed > 0) {
_local2 = _local2 + ("\nSpeed: " + myPet.speed);
}
if (myPet.startMana > 0) {
_local2 = _local2 + ((("\nMana: " + myPet.mana) + " / ") + myPet.startMana);
}
_local2 = _local2 + ((("\nHealth: " + myPet.health) + " / ") + myPet.startHealth);
if (myPet.controlTimer > 0) {
_local2 = _local2 + ((((newline + skillData[22][0].split(",")[0]) + ": ") + getTimeString(myPet.controlTimer)) + " Left");
}
if (!isNaN(myPet.maxExp)) {
_local2 = _local2 + ((("\nExperience: " + myPet.exp) + " / ") + myPet.maxExp);
}
layout.chat._visible = true;
layout.chat.txt.text = _local2;
resetChatColor();
colorChat(_local3, 16711680, true);
colorChat((("Mana: " + myPet.mana) + " / ") + myPet.startMana, 26367);
colorChat((("Health: " + myPet.health) + " / ") + myPet.startHealth, 16711680);
colorChat((("Experience: " + myPet.exp) + " / ") + myPet.maxExp, 255);
colorChat(((skillData[22][0].split(",")[0] + ": ") + getTimeString(myPet.controlTimer)) + " Left", 39168);
}
function drawElectricity(mc1, mc2, lineThickness) {
var _local6 = Math.round(Math.sqrt(Math.pow(mc1._y - mc2._y, 2) + Math.pow(mc1._x - mc2._x, 2)));
if (lineThickness == undefined) {
lineThickness = 2;
}
var _local7 = new flash.filters.GlowFilter(16777215);
_local7.blurX = 10;
_local7.blurY = 10;
_local7.strength = 5;
_local7.quality = _root.maxFilter;
var _local4 = field.createEmptyMovieClip("de", field.getNextHighestDepth());
_local4.lineStyle(lineThickness, 16777215);
_local4.moveTo(0, 0);
var _local5 = random(20);
var _local2 = _local5;
while (_local2 > 0) {
var _local3 = random(25);
if ((_local2 == 1) || (_local2 == _local5)) {
_local3 = 0;
}
_local4.lineTo(_local3, _local6 / _local2);
_local2--;
}
_local4._rotation = (Math.atan2(mc2._y - mc1._y, mc2._x - mc1._x) / (Math.PI/180)) - 90;
_local4.filters = [_local7];
_local4._x = mc1._x;
_local4._y = mc1._y;
chainGraphics.push(_local4);
}
function randomLightning() {
var _local2 = 0;
var _local3 = random(maxSpark);
i = 0;
while (i < _root.enemies.length) {
myEnemy = _root.enemies[i];
if ((myEnemy.health > 0) && (Math.abs(myEnemy._x - field.character._x) <= _root.sparkRange)) {
dmg = random(_root.sparkDamage) + 1;
enemyRes = (100 - myEnemy.resistance_Lightning) / 100;
dmg = dmg + Math.round(getElementBonus(_root.elementDamage + _root.elementDamageBonus, "Lightning") * enemyRes);
critical = false;
if (_root.successRate(_root.critChance)) {
dmg = dmg * 1.5;
dmg = Math.round(dmg);
critical = true;
}
finalDmg = Math.round((dmg * (100 - myEnemy.defense)) / 100);
myEnemy.health = myEnemy.health - finalDmg;
_root.damaged(myEnemy._x, myEnemy._y, finalDmg, "T", false, critical);
_root.drawElectricity(field.character, myEnemy, 1);
myEnemy.targeted = true;
}
if (_local2 >= _local3) {
break;
}
i++;
}
}
function bnwFilter(t) {
t = (t ? (t) : 1);
var _local3 = 0.212671;
var _local4 = 0.71516;
var _local2 = 0.072169;
return(new flash.filters.ColorMatrixFilter([((t * _local3) + 1) - t, t * _local4, t * _local2, 0, 0, t * _local3, ((t * _local4) + 1) - t, t * _local2, 0, 0, t * _local3, t * _local4, ((t * _local2) + 1) - t, 0, 0, 0, 0, 0, 1, 0]));
}
function scrollBodyPart(myName) {
var _local2 = myName.split(" ");
var _local3;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == "for") {
_local3 = _local2[_local1 + 1];
}
_local1++;
}
switch (_local3) {
case "Headware" :
return(0);
case "Shirt" :
return(1);
case "Pants" :
return(2);
case "Gloves" :
return(4);
case "Shoes" :
return(5);
case "Weapon" :
return(3);
}
}
function applyScroll(myEquip, myScroll) {
var _local4 = myEquip[myEquip.length - 1].split(", ");
if (successRate(Number(myScroll[1].split(", ")[3]))) {
applyEquipStats(myEquip, "Remove");
var _local3 = myEquip[2].split(", ");
var _local6 = myScroll[2].split(", ");
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = Number(_local3[_local2]) + Number(_local6[_local2]);
_local2++;
}
myEquip[2] = _local3.join(", ");
limitEquip(myEquip);
applyEquipStats(myEquip, "Add");
scrollSpark(true);
_root.playSound("scroll_success");
_local4[1] = Number(_local4[1]) + 1;
} else {
scrollSpark(false);
_local4[2] = Number(_local4[2]) + 1;
}
myEquip[myEquip.length - 1] = _local4.join(", ");
_local4 = myEquip[1].split(", ");
_local4[2] = Number(_local4[2]) - 1;
myEquip[1] = _local4.join(", ");
slotAmount(myScroll, 1, "minus");
updateInventory();
updateEquips();
}
function limitEquip(myEquip) {
var _local5 = Number(myEquip[0].split(", ")[3]);
var _local3 = myEquip[2].split(", ");
var _local4 = _root[getVarArray("equip", _local5)];
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local4[_local2] == "weapon_minDamage") {
if (Number(_local3[_local2]) > Number(_local3[_local2 + 1])) {
_local3[_local2] = _local3[_local2 + 1];
}
} else if (((_local4[_local2] == "defense") || (_local4[_local2] == "elementChance")) || (_local4[_local2].split("_")[1] == "res")) {
if (Number(_local3[_local2]) > 100) {
_local3[_local2] = 100;
}
}
_local2++;
}
myEquip[2] = _local3.join(", ");
}
function scrollSparkFX(success, X, Y, rot) {
if (success) {
fxType = "success";
} else {
fxType = "failure";
}
var _local1 = layout.attachMovie("scrollSpark_" + fxType, scrollSpark + objects.length, layout.getNextHighestDepth());
_local1._x = X;
_local1._y = Y;
_local1._rotation = rot;
objects.push(_local1);
}
function scrollSpark(success) {
var _local1 = 0;
while (_local1 < 330) {
scrollSparkFX(success, layout._xmouse, layout._ymouse, _local1);
_local1 = _local1 + 30;
}
}
function setFilters(mc) {
if (mc.hitTest(camera)) {
mc.filters = mc.filters.concat(fieldFilters);
}
}
function nameInArray(myName, myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (myName == myArray[_local1][0].split(", ")[0]) {
return(_local1);
}
_local1++;
}
}
function updateStats(myName, myType, taskType) {
var _local1;
var _local2;
if (myType == "monster") {
_local1 = monsterStats;
_local2 = nameInArray(myName, monsterData);
} else if (myType == "object") {
_local1 = objectStats;
_local2 = nameInArray(myName, objectData);
} else if (myType == "item") {
_local1 = itemStats;
_local2 = nameInArray(myName, itemData);
}
if ((taskType == 1) && (_local1[_local2] == -1)) {
_local1[_local2] = _local1[_local2] + 2;
} else if (((taskType == 0) && (_local1[_local2] == -1)) || (taskType == 1)) {
_local1[_local2]++;
}
}
function lastBookNum() {
var _local2 = 4;
while (_local2 > 0) {
myBook = _root["book" + _local2];
if ((myBook != undefined) && (myBook.length != 0)) {
return(_local2);
}
_local2--;
}
}
function insertScrollStats(myArray) {
if (myArray[0].split(", ")[1] == "equip") {
var _local2 = myArray[myArray.length - 1].split(", ");
_local2.push(0);
_local2.push(0);
myArray[myArray.length - 1] = _local2.join(", ");
}
return(myArray);
}
function getElementBonus(myNum, myElement) {
return(myNum + Math.round((myNum * _root[myElement + "_Bonus"]) / 100));
}
function getDamage(Min, Max) {
return(Min + random((Max - Min) + 1));
}
function characterLimits(mySpeed) {
if (field.character.getBounds(field).xMax > blockLimit._x) {
field.character._x = field.character._x - Math.abs(Number(mySpeed));
} else if (field.character.getBounds(field).xMin < field.limitStart._x) {
field.character._x = field.character._x + Math.abs(Number(mySpeed));
}
}
function moveCharacter(mySpeed) {
var _local1 = pc(mySpeed);
field.character._x = field.character._x + _local1;
characterLimits(_local1);
}
function causeSideEffect() {
enemy = checkClosest();
if (enemy._x != undefined) {
skillConsume(26);
if (_root.attemptHit(_root.accuracy + _root.accuracyBonus, enemy.avoidability)) {
if ((element != "None") && (_root.successRate(Number(_root.elementClash_chance)))) {
enemy.element = element;
enemyRes = (100 - enemy["resistance_" + element]) / 100;
enemy.elementTimer = Math.round((getElementBonus(Number(_root.elementClash_duration), element) * 24) * enemyRes);
enemy.targeted = true;
}
} else {
_root.newDigits(enemy._x, enemy._y, -1, 0, false);
}
}
}
function checkEnemyHit(e) {
var _local2;
if (e.targeted == true) {
_local2 = field.character;
} else {
_local2 = e.targeted;
}
var _local4 = _local2 == field.character;
var _local5;
var _local6;
if (_local4) {
_local5 = _root.damageCounter;
_local6 = _root.damageTimer;
} else {
_local5 = _local2.damageCounter;
_local6 = _local2.damageTimer;
}
var _local12 = getTargetY(e);
var _local11 = e;
if (e.isNPC) {
_local11 = e.atk.slash;
}
if ((_local11.hitTest(_local2) && (_local5 == _local6)) && (Math.abs(e._y - _local12) < maxCloseY)) {
eGoto(e, monster_attack);
if (_local2 != field.character) {
e.targeted.targeted = e;
if ((((!eCurrentframe(_local2, monster_charge)) && (!eCurrentframe(_local2, monster_cooldown))) && (!eCurrentframe(_local2, monster_attack))) && (!eCurrentframe(_local2, monster_rangeattack))) {
eGoto(_local2, monster_charge);
}
}
var _local7;
if (_local4) {
_local7 = _root.avoidability + _root.avoidabilityBonus;
} else {
_local7 = _local2.avoidability;
}
if (_root.attemptHit(e.accuracy, _local7)) {
pDmg = _root.getDamage(e.minDmg, e.maxDmg);
var _local8;
if (_local4) {
_local8 = _root.defense;
} else {
_local8 = _local2.defense;
}
enemyDef = (100 - _local8) / 100;
eDmg = 0;
enemyRes = 1;
if ((e.myElement != "None") && (_root.successRate(e.myElementChance))) {
_local2.element = e.myElement;
var _local9;
if (_local4) {
_local9 = _root[e.myElement + "_res"];
} else {
_local9 = _local2["resistance_" + e.myElement];
}
enemyRes = (100 - _local9) / 100;
_local2.elementTimer = Math.round(_root.getElementBonus(e.myElementDuration, e.myElement) * enemyRes);
eDmg = _root.getElementBonus(_root.getDamage(e.eMinDmg, e.eMaxDmg), e.myElement);
}
finalDmg = Math.round((pDmg * enemyDef) + (eDmg * enemyRes));
if (((!e.isNPC) && (_local4)) && (finalDmg > (_root.health / 10))) {
if (!_root.jumping) {
_root.ground = (_root.jY = _local2._y);
_root.jumping = true;
}
_root.jump = 6;
_root.dashX = 5;
if (e._x > _local2._x) {
_root.dashX = _root.dashX * -1;
}
} else if ((((!e.isNPC) && (!_local4)) && (finalDmg > (_local2.health / 10))) && (_local2.stoppedAttacks < 2)) {
eGoto(_local2, monster_hit);
_local2.dashX = 5;
if (e._x > _local2._x) {
_local2.dashX = _local2.dashX * -1;
}
}
if (_local4) {
_root.health = _root.health - finalDmg;
} else {
_local2.health = _local2.health - finalDmg;
}
_root.playSound("punch" + (random(4) + 1), _local2);
if (_local2 != field.character) {
popHealthBar(_local2);
}
_root.damaged(_local2._x, _local2._y, finalDmg, "C", e.isPet != true, false, false);
if (_local4) {
_root.damageCounter = 0;
} else if (_local2.isPet) {
_local2.damageCounter = 0;
}
} else {
var _local10 = 1;
if (e.isPet == true) {
_local10 = 0;
}
_root.newDigits(_local2._x, _local2._y, -1, _local10, false, false);
}
}
}
function shootRange(e) {
e.isShooting = true;
e.shots = new Array();
e.shotsCounter = 0;
e.mc.attachMovie("shot_charge", "charge", e.mc.getNextHighestDepth());
e.mc.charge._visible = false;
objects.push(e.mc.charge.mc);
e.shots = getShots(e);
}
function getShots(e) {
var _local3 = e.shotsData;
var _local4 = new Array();
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = _local3[_local1].split(", ");
if (e.mana >= Number(_local2[11])) {
_local4.push(_local2);
}
_local1++;
}
return(_local4);
}
function checkManaForShots(e, myArray) {
if (myArray == undefined) {
myArray = e.shots;
}
var _local1 = 0;
while (_local1 < myArray.length) {
if (e.mana < Number(myArray[_local1][11])) {
myArray.splice(_local1, 1);
_local1 = 0;
}
_local1++;
}
}
function convertDescription(desc) {
return(fixString(desc, true));
}
function nameSpace(myString, space, char1, char2) {
var _local3 = "";
var _local4 = 0;
var _local1 = 0;
while (_local1 < myString.length) {
if (myString.charAt(_local1) == char1) {
if (_local4 == space) {
_local3 = _local3 + char2;
} else {
_local4++;
_local3 = _local3 + myString.charAt(_local1);
}
} else {
_local3 = _local3 + myString.charAt(_local1);
}
_local1++;
}
return(_local3);
}
function fixString(myString, reverseChars) {
var _local2 = [",", "^"];
var _local1 = ["\"", "*"];
if (reverseChars == true) {
_local2.reverse();
_local1.reverse();
}
myString = nameSpace(myString, 0, _local2[0], _local2[1]);
myString = nameSpace(myString, 0, _local1[0], _local1[1]);
return(myString);
}
function summonMonsterBlood(myArray) {
var _local7 = myArray[0].split(", ")[3];
var _local2 = Number(myArray[0].split(", ")[4]) == 1;
var _local6 = Number(myArray[1].split(", ")[2]);
var _local8 = Number(myArray[1].split(", ")[3]);
var _local5 = Number(myArray[1].split(", ")[4]);
var _local3 = Number(myArray[1].split(", ")[5]);
var _local4 = Number(myArray[1].split(", ")[6]);
if ((_local2 && (getPet() == false)) || (!_local2)) {
if (_local2 && (_local3 <= 0)) {
newError("Pet is Resting");
} else {
summonMonster(_local7, _local6, false, _local2, _local8, _local5, _local3, _local4);
slotAmount(myArray, 1, "minus");
}
} else {
newError("Only 1 Pet is Allowed");
}
}
function getPet() {
var _local1 = 0;
while (_local1 < pets.length) {
if (pets[_local1].realPet == true) {
return(pets[_local1]);
}
_local1++;
}
return(false);
}
function toggleWindow(myWin) {
if (myWin == "inventory") {
if (!inventoryPressed) {
removeHighlighted(layout.lbtn2);
if (toggleUI(myWin)) {
updateInventoryWin();
updateInventory();
swapInventory(inventoryShowing);
unfocusDuringPrompts();
}
inventoryPressed = true;
}
} else if (myWin == "skills") {
if (!skillsPressed) {
if (toggleUI(myWin)) {
removeHighlighted(layout.lbtn4);
layout.skills.focusOn();
}
skillsPressed = true;
}
} else if (myWin == "quests") {
if (!questHold) {
toggleUI(myWin);
if (layout.quests != undefined) {
if (layout.quests_pop != undefined) {
toggleUI(myWin);
} else {
removeHighlighted(layout.lbtn5);
layout.quests.arrangeQuests();
gamePause = true;
}
} else {
gamePause = false;
}
}
questHold = true;
} else if (myWin == "equip") {
if (!equipPressed) {
removeHighlighted(layout.lbtn3);
if (toggleUI(myWin)) {
updateCharacterEquips(-1, layout.equip.character, true);
updateEquips();
unfocusDuringPrompts();
}
equipPressed = true;
}
} else if (myWin == "statsWin") {
if (!statsPressed) {
removeHighlighted(layout.lbtn1);
toggleUI(myWin);
statsPressed = true;
}
} else if (myWin == "encyclopedia") {
toggleUI("options_bg");
toggleUI(myWin);
gamePause = layout.encyclopedia != undefined;
}
}
function promptWindow(myWin) {
toggleUI(myWin);
}
function promptOptions() {
var _local1 = 0;
while (_local1 < optionsArray.length) {
bringToFront(optionsArray[_local1]);
_local1++;
}
}
function getNpcLocations(npcName) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < activeStage.length) {
var _local5 = activeStage[_local3].split("~");
var _local4 = _local5[0].split(", ")[0];
var _local2 = _local5[3].split("^");
var _local1 = 0;
while (_local1 < _local2.length) {
if (getName("npc", Number(_local2[_local1].split(", ")[0])) == npcName) {
_local6.push(_local4);
}
_local1++;
}
_local3++;
}
return(_local6);
}
function checkSkillPlace() {
skillDragging = false;
var _local3 = 1;
while (_local3 <= 4) {
if (_root.layout["d" + _local3].circle.hitTest(layout.skillSquare)) {
var _local2 = _local3 - 1;
if (!holding) {
_local2 = _local2 + 4;
}
var _local4 = _root.skill[_local2];
_root.skill[_local2] = layout.skillSquare.myName;
if ((layout.skillSquare.myNum != undefined) && (layout.skillSquare.myNum != _local2)) {
_root.skill[layout.skillSquare.myNum] = _local4;
}
break;
}
_local3++;
}
}
function checkUsePlace() {
dragging = false;
var _local2 = 1;
while (_local2 <= 3) {
if (_root.layout["p" + _local2].hitTest(layout.itemSquare)) {
var _local3 = _root.quickUse[_local2 - 1];
_root.quickUse[_local2 - 1] = findNum(layout.itemSquare.myName, itemData);
if ((layout.itemSquare.squareNum != undefined) && (layout.itemSquare.squareNum != _local2)) {
_root.quickUse[layout.itemSquare.squareNum - 1] = _local3;
}
updateInventory();
return(true);
}
_local2++;
}
return(false);
}
function nextUseSlot(useNum) {
var _local3 = _root.use_item;
var _local4 = itemData[useNum][0].split(", ")[0];
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2][0].split(", ")[0] == _local4) {
return(_root.use_item[_local2]);
}
_local2++;
}
}
function skillAvailable(skillNum) {
var _local3 = skillData[skillNum];
if (_local3[2] != "") {
var _local2 = _local3[2].split(", ");
i = 0;
while (i < _local2.length) {
var _local1 = _local2[i].split("-");
if (getSkillLevel(_local1[0]) < Number(_local1[1])) {
return(false);
}
i++;
}
}
return(true);
}
function getCharMc(charMc) {
if (charMc == undefined) {
charMc = field.character;
}
var _local2 = charMc._currentframe;
var _local1;
if (_local2 == npc_idle) {
_local1 = "idle";
} else if (_local2 == npc_walk) {
_local1 = "walk";
} else if (_local2 == npc_jump) {
_local1 = "jump";
} else if (_local2 == npc_hit) {
_local1 = "hit";
} else {
_local1 = "atk";
}
return(charMc[_local1]);
}
function getEquipsNames() {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < equips.length) {
_local2.push(equips[_local1][0].split(", ")[0]);
_local1++;
}
return(_local2);
}
function colorCharacter() {
var _local4;
var _local1;
var _local2 = new Array();
if (transformation) {
_local4 = charData;
_local1 = tranData;
} else {
_local1 = charData;
_local4 = tranData;
}
var _local6;
var _local5;
if (tranSize < _local1[1]) {
_local6 = tranSize;
_local5 = _local1[1];
} else {
_local6 = _local1[1];
_local5 = tranSize;
}
var _local3 = Math.round((_local6 / _local5) * 100);
if (_local3 < 100) {
_local2[0] = getBetweenColors(_local4[11], _local1[11], _local3);
_local2[1] = getBetweenColors(_local4[12], _local1[12], _local3);
_local2[2] = getBetweenColors(_local4[13], _local1[13], _local3);
} else {
_local2 = _local1.slice(11, 14);
}
colorHair(_local2[0]);
colorSkin(_local2[1]);
reColor(getCharMc().head.bodyPart_eyes.part, _local2[2]);
}
function getBetweenColors(c1, c2, percentage) {
percentage = percentage / 100;
var _local1 = hexToRGB(c1);
var _local2 = hexToRGB(c2);
var _local4 = {r:_local2.r - _local1.r, g:_local2.g - _local1.g, b:_local2.b - _local1.b};
return((((((_local1.r + Math.floor(percentage * _local4.r)) << 16) + ((_local1.g + Math.floor(percentage * _local4.g)) << 8)) + _local1.b) + Math.floor(percentage * _local4.b)).toString(16));
}
function getCharArray() {
if (transformation) {
return(tranData);
}
return(charData);
}
function getBonuses() {
var _local2 = new Object();
var _local1;
_local1 = 0;
while (_local1 < var_weapon.length) {
_local2[var_weapon[_local1]] = 0;
_local1++;
}
_local1 = 0;
while (_local1 < var_equip.length) {
_local2[var_equip[_local1]] = 0;
_local1++;
}
_local1 = 0;
while (_local1 < var_iPotion.length) {
_local2[var_iPotion[_local1]] = 0;
_local1++;
}
_local1 = 0;
while (_local1 < var_pPotion.length) {
_local2[var_pPotion[_local1]] = 0;
_local1++;
}
_local1 = 0;
while (_local1 < statSquare.length) {
if (statSquare[_local1] != "Empty") {
applyPotionStats(statSquare[_local1], "Remove", _local2);
}
_local1++;
}
_local1 = 0;
while (_local1 < equips.length) {
if (equips[_local1] != "Empty") {
applyEquipStats(equips[_local1], "Remove", _local2);
}
_local1++;
}
return(_local2);
}
function setCharY(myY, mc) {
if (mc == undefined) {
mc = field.character;
}
var _local1 = Math.floor(getCharBottom(mc));
myY = Math.ceil(myY);
while (_local1 != myY) {
if (_local1 < myY) {
mc._y++;
} else if (_local1 > myY) {
mc._y--;
}
_local1 = Math.round(getCharBottom(mc));
}
}
function fixCharY(myMc) {
var _local1;
if (myMc == undefined) {
myMc = field.character;
_local1 = getCharMc();
} else {
_local1 = getCharMc(myMc);
}
var _local4 = {x:0, y:myMc.minLine._y};
var _local3 = {x:0, y:_local1.minLine._y};
myMc.localToGlobal(_local4);
_local1.localToGlobal(_local3);
_local1._y = _local1._y + (_local4.y - _local3.y);
}
function setCharSize(mc) {
if (gamePause) {
return(0);
}
var _local2;
if (mc == undefined) {
mc = field.character;
_local2 = getCharMc();
} else {
_local2 = getCharMc(mc);
}
if ((mc == field.character) && (!jumping)) {
var _local5 = getCharArray();
if (tranSize > _local5[1]) {
tranSize--;
} else if (tranSize < _local5[1]) {
tranSize++;
}
charSize = (Math.round((mc._y - minHeight) / perspectiveSize) + 100) + 5;
charSize = Math.round((charSize * tranSize) / 100);
}
if (mc == field.character) {
_local2._yscale = charSize;
} else {
_local2._yscale = mc.mySize;
}
if (mc == field.character) {
if (sideRight) {
_local2._xscale = charSize;
} else {
_local2._xscale = -charSize;
}
} else if (!mc.sideLeft) {
_local2._xscale = mc.mySize;
} else {
_local2._xscale = -mc.mySize;
}
if (mc == field.character) {
fixCharY();
} else {
fixCharY(mc);
}
var _local3 = field.fieldFloor.character_shadow;
if (mc != field.character) {
_local3 = mc.npcMc.myShadow;
}
if ((!jumping) && (mc == field.character)) {
_local3._y = getCharBottom();
}
var _local6 = ["slash", "powerBlow", "multiAttack"];
var _local4 = new Array();
updateMcEffects(mc, _local6, _local4);
_local3._width = _local2._width;
_local3._x = _local2.getBounds(_local3._parent).xMin + (_local3._width / 2);
updateMcEffects(mc, _local6, _local4);
_local3._yscale = _local2._yscale;
}
function updateMcEffects(myMc, mcEffects, myArray) {
var _local5 = myArray.length == 0;
var _local2 = 0;
while (_local2 < mcEffects.length) {
var _local1 = myMc.atk[mcEffects[_local2]];
if (_local5) {
myArray[_local2] = [_local1._xscale, _local1._yscale, _local1._x, _local1._y];
_local1._xscale = (_local1._yscale = 0);
_local1._x = (_local1._y = 0);
} else {
_local1._xscale = myArray[_local2][0];
_local1._yscale = myArray[_local2][1];
_local1._x = myArray[_local2][2];
_local1._y = myArray[_local2][3];
}
_local2++;
}
}
function getCharBottom(myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local2 = getCharMc(myMc);
var _local1 = {x:0, y:_local2.minLine._y};
_local2.localToGlobal(_local1);
field.globalToLocal(_local1);
return(_local1.y);
}
function getCharTop(myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local2 = getCharMc(myMc);
var _local1 = {x:0, y:_local2.maxLine._y};
_local2.localToGlobal(_local1);
field.globalToLocal(_local1);
return(_local1.y);
}
function getCharMiddle(myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local2 = getCharMc(myMc);
var _local1 = {x:_local2.minLine._x, y:0};
_local2.localToGlobal(_local1);
field.globalToLocal(_local1);
return(_local1.x);
}
function getCharHand(myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local1 = getCharMc(myMc).rightArm_lower;
var _local2 = {x:_local1.glove._x, y:_local1.glove._y};
_local1.localToGlobal(_local2);
field.globalToLocal(_local2);
return(_local2);
}
function getStaffHead(myMc) {
if (myMc == undefined) {
myMc = field.character;
}
var _local1 = getCharMc(myMc).weapon;
var _local2 = {x:_local1.head._x, y:_local1.head._y};
_local1.localToGlobal(_local2);
field.globalToLocal(_local2);
return(_local2);
}
function getObjectGround() {
return(field.fieldFloor.character_shadow._y);
}
function updateObjectHand() {
var _local1 = field.character._currentframe;
var _local2 = getCharMc()._currentframe;
field.character.gotoAndStop(4);
field.character.gotoAndStop(_local1);
if ((_local1 == npc_idle) || (_local1 == npc_walk)) {
getCharMc().gotoAndStop(_local2);
} else if (_local1 == npc_jump) {
getCharMc().gotoAndPlay(_local2);
}
updateCharacterEquips();
}
function addHighlighted(myMc) {
var _local1 = appearNumInArray(myMc, highlighted);
if (_local1 == -1) {
myMc.isHighlighted = false;
highlighted.push(myMc);
}
}
function removeHighlighted(myMc) {
var _local1 = appearNumInArray(myMc, highlighted);
if (_local1 != -1) {
reColor(myMc, "reset", 0);
myMc.isHighlighted = false;
highlighted.splice(_local1, 1);
}
}
function updateTime() {
myTime = hour + (minute / 60);
if ((closedArea != "0") && (closedArea != undefined)) {
var _local1 = closedArea.split(":");
myTime = Number(_local1[0]) + (Number(_local1[1]) / 60);
}
}
function newError(myError) {
layout.errorMc.errorTxt.text = myError;
layout.errorMc.errorTxt._alpha = 100;
errorTimer = 72;
bringToFront(layout.errorMc);
}
function saveStage() {
var _local1;
var _local15 = currentStage;
var _local14 = activeStage[_local15].split("~");
var _local12 = new Array();
_local1 = 0;
while (_local1 < enemies.length) {
var _local3 = enemies[_local1];
if (_local3.myName == undefined) {
} else {
var _local7 = 0;
if (_local3.questMonster == true) {
_local7 = 1;
}
_local12.push((((((((findNum(_local3.myName, monsterData) + ", ") + _local3._x) + ", ") + (_local3._y - builder_y_fix)) + ", ") + _local7) + ", ") + getMonsterVars(_local3).join(", "));
}
_local1++;
}
var _local11 = new Array();
_local1 = 0;
while (_local1 < activeObjects.length) {
var _local2 = activeObjects[_local1];
if ((_local2 != object) && (_local2.fadedOut == undefined)) {
var _local9 = findNum(_local2.objectName, objectData);
var _local4 = [_local9, _local2._x, _local2.ground, _local2.createdIn, _local2.createdOrder];
if (_local2.objectName == "teleport") {
var _local8;
if (_local2.hiddenFlag == true) {
_local8 = 1;
} else {
_local8 = 0;
}
_local4 = _local4.concat([_local2.mapNum, _local2.mapX, _local2.mapY, _local8]);
} else if (_local2.objectName == "message box") {
_local4 = _local4.concat([_local2.originalMsg]);
}
_local11.push(_local4.join(", "));
}
_local1++;
}
_local11 = _local11.concat(hiddenObjects);
var _local10 = new Array();
_local1 = 0;
while (_local1 < npcs.length) {
var _local5 = npcs[_local1];
_local10.push([_local5.myNum, _local5._x, _local5._y - builder_y_fix, _local5.sideNum].join(", "));
_local1++;
}
_local1 = 0;
while (_local1 < hiddenNpcs.length) {
var _local6 = hiddenNpcs[_local1].split(", ");
_local6[2] = Number(_local6[2]) - builder_y_fix;
_local10.push(_local6.join(", "));
_local1++;
}
var _local13 = new Array();
_local1 = 0;
while (_local1 < invItems.length) {
_local13.push((((invItems[_local1].itemStats.join("*") + "@") + invItems[_local1]._x) + ", ") + invItems[_local1]._y);
_local1++;
}
_local14[1] = _local12.join("^");
_local14[2] = _local11.join("^");
_local14[3] = _local10.join("^");
_local14[4] = _local13.join("|");
activeStage[_local15] = _local14.join("~");
}
function regenerateCurrentStage() {
var _local3 = currentStage;
var _local2 = 0;
while (_local2 < activeObjects.length) {
var _local1 = activeObjects[_local2];
if ((((_local1 != object) && (_local1.createdIn != _local3)) && (_local1.fadedOut == undefined)) && (!_local1.sacrificing)) {
regenerateObject(_local1.createdIn, _local1.createdOrder);
_local1.fadedOut = 100;
break;
}
_local2++;
}
}
function regenerateStage(myNum) {
var _local1;
var _local20 = activeStage[myNum].split("~");
var _local21 = gameStage[myNum].split("~");
var _local6 = validateSplitArray(_local20[1], "^");
var _local10 = sortByDayTime(validateSplitArray(_local21[1], "^"));
if (_local6[0] == "") {
_local6 = new Array();
}
if (_local10.length > _local6.length) {
_local1 = 0;
while (_local1 < _local10.length) {
if (appearAmountInStageArray(Number(_local10[_local1].split(", ")[0]), _local6) < appearAmountInStageArray(Number(_local10[_local1].split(", ")[0]), _local10)) {
var _local13 = _local10[_local1].split(", ");
_local13[1] = "";
_local13[2] = "";
_local6.push(_local13.join(", "));
break;
}
_local1++;
}
}
var _local11 = getMonsterVarIndex("health");
var _local12 = getMonsterVarIndex("mana");
var _local19 = getMonsterVarIndex("startHealth");
var _local18 = getMonsterVarIndex("startMana");
_local1 = 0;
while (_local1 < _local6.length) {
var _local2 = _local6[_local1].split(", ");
var _local3 = 4;
if (_local2[_local3] == undefined) {
} else {
var _local7 = _local2.slice(_local3, _local2.length);
var _local16 = Number(_local7[_local11]);
var _local15 = Number(_local7[_local12]);
var _local5 = Number(_local7[_local19]);
var _local8 = Number(_local7[_local18]);
if (_local16 < _local5) {
_local2[_local11 + _local3] = Number(_local2[_local11 + _local3]) + Math.ceil((_local5 * 1) / 100);
if (_local2[_local11 + _local3] > _local5) {
_local2[_local11 + _local3] = _local5;
}
}
if (_local15 < _local8) {
_local2[_local12 + _local3] = Number(_local2[_local12 + _local3]) + Math.ceil((_local8 * 1) / 100);
if (_local2[_local12 + _local3] > _local8) {
_local2[_local12 + _local3] = _local8;
}
}
_local6[_local1] = _local2.join(", ");
}
_local1++;
}
var _local14 = validateSplitArray(_local20[2], "^");
_local1 = 0;
while (_local1 < _local14.length) {
var _local4 = _local14[_local1].split(", ");
var _local9 = getName("object", _local4[0]);
if (((Number(_local4[3]) != myNum) && (!isNaN(Number(_local4[3])))) && ((((_local9 != "teleport") && (_local9 != "message box")) || ((_local9 == "teleport") && (_local4.length > 7))) || ((_local9 == "message box") && (_local4.length > 4)))) {
regenerateObject(Number(_local4[3]), Number(_local4[4]));
_local14.splice(_local1, 1);
break;
}
_local1++;
}
_local20[1] = _local6.join("^");
_local20[2] = _local14.join("^");
activeStage[myNum] = _local20.join("~");
}
function regenerateObject(stageNumber, ordinalNumber, toRecycle) {
var _local2 = activeStage[stageNumber].split("~");
var _local11 = gameStage[stageNumber].split("~");
var _local4 = validateSplitArray(_local2[2], "^");
var _local9 = validateSplitArray(_local11[2], "^");
if ((stageNumber == currentStage) && (toRecycle != true)) {
var _local1 = _local9[ordinalNumber].split(", ");
var _local5 = getName("object", _local1[0]);
objectType = [_local5, undefined, ordinalNumber];
if (_local5 == "teleport") {
newObject(objectType, Number(_local1[1]), Number(_local1[2]), undefined, _local1[3], Number(_local1[4]), Number(_local1[5]), Number(_local1[6]), undefined, undefined, true);
} else if (_local5 == "message box") {
newObject(objectType, Number(_local1[1]), Number(_local1[2]), undefined, undefined, undefined, undefined, undefined, _local1[3], undefined, true);
} else {
newObject(objectType, Number(_local1[1]), Number(_local1[2]), undefined, undefined, undefined, undefined, undefined, undefined, undefined, true);
}
} else {
var _local6 = _local9[ordinalNumber].split(", ");
if (toRecycle == true) {
var _local7 = getStageNum("Objects Bin");
_local2 = activeStage[_local7].split("~");
_local4 = validateSplitArray(_local2[2], "^");
}
_local4.push(_local6.slice(0, 3).concat([stageNumber, ordinalNumber]).concat(_local6.slice(3, _local6.length - 3)).join(", "));
if (toRecycle == true) {
stageNumber = _local7;
}
}
_local2[2] = _local4.join("^");
activeStage[stageNumber] = _local2.join("~");
}
function appearAmountInStageArray(myValue, myArray, originalStage) {
var _local4 = 0;
var _local1 = 0;
while (_local1 < myArray.length) {
if ((myValue == myArray[_local1].split(", ")[0]) && ((originalStage == undefined) || ((originalStage != undefined) && ((Number(myArray[_local1].split(", ")[3]) == originalStage) || (isNaN(Number(myArray[_local1].split(", ")[3]))))))) {
_local4++;
}
_local1++;
}
return(_local4);
}
function monstersAmountInStageArray(myValue, myArray) {
var _local6 = getMonsterVarIndex("isBoss");
var _local5 = 0;
var _local1 = 0;
while (_local1 < myArray.length) {
var _local3 = myArray.slice(4, myArray.length);
var _local4 = (defineMonsterVar(_local3[_local6]) == true) || (Number(monsterData[Number(e[0])][0].split(", ")[9]) == 1);
if ((myValue == myArray[_local1].split(", ")[0]) && (!_local4)) {
_local5++;
}
_local1++;
}
return(_local5);
}
function sortByDayTime(myArray, noBoth) {
var _local5 = new Array();
var _local4;
if (dayTime == "day") {
_local4 = 1;
} else if (dayTime == "night") {
_local4 = 2;
}
var _local1 = 0;
while (_local1 < myArray.length) {
var _local2 = Number(monsterData[Number(myArray[_local1].split(", ")[0])][0].split(", ")[4]);
if ((_local2 == _local4) || ((_local2 == 0) && (noBoth != true))) {
_local5.push(myArray[_local1]);
}
_local1++;
}
return(_local5);
}
function stagesToOriginal() {
var _local5 = 0;
while (_local5 < activeStage.length) {
var _local1 = activeStage[_local5].split("~");
var _local11 = gameStage[_local5].split("~");
var _local9 = _local1[4];
var _local10 = _local1[2];
var _local12 = _local1[3];
var _local4 = validateSplitArray(_local1[1], "^");
_local1 = _local11.concat();
_local1[2] = _local10;
_local1[3] = _local12;
var _local8 = validateSplitArray(_local1[1], "^");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split(", ");
var _local6 = Number(_local3[3]) == 1;
var _local7 = !getMonsterName(monsterData[Number(_local3[0])][0].split(", ")[0], true);
if (_local6 || (_local7)) {
_local8.push(_local4[_local2]);
}
_local2++;
}
_local1[1] = _local8.join("^");
if (_local9 != undefined) {
_local1.push(_local9);
}
activeStage[_local5] = _local1.join("~");
_local5++;
}
}
function getNeedToDuplicate() {
var _local5 = activeStage[currentStage].split("~");
var _local6 = gameStage[currentStage].split("~");
var _local4 = _local5[1].split("^");
var _local2 = sortByDayTime(_local6[1].split("^"));
if (_local4[0] == "") {
_local4 = new Array();
}
var _local3 = new Array();
if (_local2.length > _local4.length) {
var _local1 = 0;
while (_local1 < _local2.length) {
if (appearAmountInStageArray(_local2[_local1].split(", ")[0], _local4.concat(_local3)) < appearAmountInStageArray(_local2[_local1].split(", ")[0], _local2)) {
_local3.push(_local2[_local1].split(", ")[0]);
}
_local1++;
}
}
return(_local3);
}
function equipBasic() {
equipWeapon("Wooden Sword");
var _local2 = defineEquip(insertScrollStats(itemData[findNum("Shinobi Pants", itemData)]), true);
_root.applyEquipStats(_local2, "Add");
_root.equips[2] = _local2.concat();
}
function equipWeapon(weaponName) {
var _local2 = defineEquip(insertScrollStats(itemData[findNum(weaponName, itemData)]), true);
_root.applyEquipStats(_local2, "Add");
_root.equips[3] = _local2.concat();
}
function updateConfiguration() {
var _local1;
_local1 = layout.configure_sounds;
_local1.musicBar.updateBar(maxMusic);
_local1.sfxBar.updateBar(maxSoundFX);
_local1 = layout.configure_graphics;
_local1.qualitySwap.setTo(_quality);
_local1.fxSwap.setTo(maxFX);
_local1.filterSwap.setTo(maxFilter);
_local1.blurSwap.setTo(screenBlurring);
_local1.shakeSwap.setTo(screenShaking);
_local1.barSwap.setTo(showBars);
_local1 = layout.configure_keys;
_local1.getKey = -1;
_local1.organize();
_local1 = layout.options_menu;
_local1.classSwap.setTo(ninjaClass);
_local1.elementSwap.setTo(element);
}
function skillWeaponValid(skill) {
var _local4 = skillData[skill][1];
if (_local4 == "") {
return(true);
}
var _local2 = _local4.split(", ");
var _local3 = getCurrentWeapon();
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == _local3) {
return(true);
}
_local1++;
}
return(false);
}
function updateMessageBoxes() {
var _local2 = 0;
while (_local2 < activeObjects.length) {
var _local1 = activeObjects[_local2];
_local1.myType.myMsgBox._y = _local1.startY;
_local1.myType.myMsg._y = _local1.startY2;
_local1.myType.myMsg.text = analyzeVars(_local1.originalMsg);
_local1.myType.myMsg.autoSize = true;
_local1.myType.myMsgBox._width = _local1.myType.myMsg._width + 10;
_local1.myType.myMsgBox._height = _local1.myType.myMsg._height + 5;
_local1.myType.myMsgBox._y = _local1.myType.myMsgBox._y - (_local1.myType.myMsgBox._height - _local1.baseHeight);
_local1.myType.myMsg._y = _local1.myType.myMsg._y - (_local1.myType.myMsgBox._height - _local1.baseHeight);
baseX = _local1.myType.myMsgBox._x;
_local1.myType.myMsgBox._x = (-_local1.myType.myMsgBox._width) / 2;
_local1.myType.myMsg._x = _local1.myType.myMsg._x - (baseX - _local1.myType.myMsgBox._x);
_local2++;
}
if (tutorialCounter < tutorial.length) {
setText(tutorial[tutorialCounter]);
}
}
function autoSizeChat() {
layout.chat.txt.autoSize = true;
layout.chat.box._width = layout.chat.txt._width + 10;
layout.chat.box._height = layout.chat.txt._height;
layout.chat.box._y = (layout.chat.txt._y = -15 - layout.chat.txt._height);
var _local1 = layout.chat.box.getBounds(layout.chat);
layout.chat.corner1._x = _local1.xMin + (layout.chat.corner1._width / 2);
layout.chat.corner1._y = (_local1.yMin - (layout.chat.corner1._height / 2)) + 1;
layout.chat.corner2._x = _local1.xMax - (layout.chat.corner2._width / 2);
layout.chat.corner2._y = (_local1.yMin - (layout.chat.corner2._height / 2)) + 1;
layout.chat.corner3._x = _local1.xMin + (layout.chat.corner3._width / 2);
layout.chat.corner3._y = (_local1.yMax + (layout.chat.corner3._height / 2)) - 1;
layout.chat.corner4._x = _local1.xMax - (layout.chat.corner4._width / 2);
layout.chat.corner4._y = (_local1.yMax + (layout.chat.corner4._height / 2)) - 1;
layout.chat.line1._width = layout.chat.box._width - (layout.chat.corner1._width * 2);
layout.chat.line1._x = (layout.chat.corner1._x + (layout.chat.corner1._width / 2)) + (layout.chat.line1._width / 2);
layout.chat.line1._y = (layout.chat.corner1._y + (layout.chat.corner1._height / 2)) - (layout.chat.line1._height / 2);
layout.chat.line2._width = layout.chat.box._width - (layout.chat.corner3._width * 2);
layout.chat.line2._x = (layout.chat.corner3._x + (layout.chat.corner3._width / 2)) + (layout.chat.line2._width / 2);
layout.chat.line2._y = (layout.chat.corner3._y + (layout.chat.corner3._height / 2)) - (layout.chat.line2._height / 2);
layout.chat.txt._y = layout.chat.line1._y;
}
function pc(myNum) {
return(myNum + Math.round((myNum * (100 - avgPerformance)) / 100));
}
function rpc(myNum) {
return(Math.round((myNum * (100 - avgPerformance)) / 100));
}
function cpc(myNum) {
return(Math.round((myNum * avgPerformance) / 100));
}
function getWinArray(winName) {
if (appearInArray(winName, uiNames)) {
return(uiArray);
}
if (appearInArray(winName, promptNames)) {
return(promptArray);
}
if (appearInArray(winName, optionsNames)) {
return(optionsArray);
}
if (appearInArray(winName, uiOnTopNames)) {
return(uiOnTop);
}
}
function addUI(uiName) {
if (layout[uiName] != undefined) {
return(undefined);
}
var _local3 = layout.attachMovie(uiName, uiName, layout.getNextHighestDepth());
var _local1 = getWinArray(uiName);
if ((_local1 == optionsArray) && (uiName == "options_bg")) {
optionsArray = [_local3].concat(optionsArray);
} else {
_local1.push(_local3);
}
if ((_local1 == uiArray) || (_local1 == optionsArray)) {
restoreCoordinates(_local3, _local1);
}
updateWinArray();
attachWinCommands();
}
function removeUI(uiName) {
var _local3 = layout[uiName];
if (_local3 == undefined) {
return(undefined);
}
var _local2 = getWinArray(uiName);
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == _local3) {
_local2.splice(_local1, 1);
_local3.removeMovieClip();
updateWinArray();
break;
}
_local1++;
}
}
function toggleUI(mcName) {
var _local3 = layout[mcName];
if (_local3 == undefined) {
addUI(mcName);
_local3 = layout[mcName];
if (mcName == "options_bg") {
_local3.onRelease = function () {
};
_local3.useHandCursor = false;
} else if (mcName == "options_menu") {
_local3.loadLastSave.enabled = !_root.isNewGame;
}
return(true);
}
if (((((mcName == "inventory") || (mcName == "equip")) && (dragging)) && (layout.itemSquare.draggedFrom == mcName)) || ((mcName == "skills") && (skillDragging))) {
return(true);
}
removeUI(mcName);
return(false);
}
function updateWinArray() {
winArray = uiArray.concat(promptArray).concat(optionsArray).concat(uiOnTop);
winArray.sort(sortWins);
}
function attachWinCommands() {
var _local4 = 0;
while (_local4 < winArray.length) {
var _local3 = winArray[_local4];
if (appearInArray(_local3, optionsArray) || (appearInArray(_local3, uiOnTop))) {
} else {
if ((_local3 != layout.store) && (_local3 != layout.quests_pop)) {
_local3.closeX.onRelease = function () {
_root.toggleWindow(this._parent._name);
};
}
if (_local3 == layout.encyclopedia) {
_local3.bg.useHandCursor = false;
} else {
_local3.bg.onPress = function () {
_root.draggingWindow = this._parent;
this._parent.startDrag();
_root.bringToFront(this._parent);
};
_local3.bg.onRelease = (_local3.bg.onReleaseOutside = function () {
_root.draggingWindow = undefined;
this._parent.stopDrag();
});
_local3.bg.useHandCursor = false;
}
}
_local4++;
}
}
function bringToFrontArray(myArray, exclude) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (!appearInArray(myArray[_local1], exclude)) {
bringToFront(myArray[_local1]);
}
_local1++;
}
}
function toggleUIArray(myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
toggleUI(myArray[_local1]);
var _local3 = layout[myArray[_local1]];
if ((((myArray[_local1] != "errorMc") && (myArray[_local1] != "announcment")) && (myArray[_local1] != "pickObject")) && (myArray[_local1] != "healInjuries")) {
_local3._x = (_local3._y = 999999);
}
_local1++;
}
}
function sortWins(element1, element2) {
return(element2.getDepth() - element1.getDepth());
}
function bringToFront(myWin) {
if (myWin == undefined) {
return(undefined);
}
var _local3 = findWinIndex(myWin);
var _local1 = _local3 - 1;
while (_local1 >= 0) {
myWin.swapDepths(winArray[_local1]);
_local1--;
}
winArray.sort(sortWins);
if ((((((((layout.msg != undefined) && (myWin._name != "msg")) && (tutorialCounter >= 0)) && (tutorialCounter < tutorial.length)) && (pointOn != undefined)) && (myWin != layout.encyclopedia)) && (!appearIn(myWin, optionsArray))) && (!appearIn(myWin, uiOnTop))) {
bringToFront(layout.msg);
}
}
function findWinIndex(myWin) {
var _local1 = 0;
while (_local1 < winArray.length) {
if (winArray[_local1] == myWin) {
return(_local1);
}
_local1++;
}
}
function applyGamePause() {
if ((gamePause && (layout.options_menu != undefined)) || (!gamePause)) {
toggleUI("options_bg");
toggleUI("options_menu");
gamePause = !gamePause;
if (gamePause) {
_root.applyMouseCursor("Default");
_root.promptOptions();
}
pauseUp = false;
}
}
function setText(myText) {
layout.msg.txt.text = analyzeVars(myText);
layout.msg.txt.autoSize = "right";
layout.msg.back._width = (layout.msg.txt._width + 3) + 20;
layout.msg.back._height = (layout.msg.txt._height + 3) + 20;
if (layout.msg == undefined) {
setTimeout(setText, 1, myText);
}
}
function setPointer(myMc) {
var _local3 = getMcPoint(myMc);
var _local6 = {x:(-layout.msg._width) / 2, y:layout.msg._height / 2};
layout.msg.localToGlobal(_local6);
layout.globalToLocal(_local6);
var _local8 = Math.atan2(_local3.y - _local6.y, _local3.x - _local6.x);
var _local10 = 57.2957795130823 * _local8;
layout.msg.pointArrow._rotation = _local10 + 90;
var _local5 = {x:_local3.x, y:_local3.y};
layout.localToGlobal(_local5);
layout.msg.globalToLocal(_local5);
layout.msg.pointArrow._x = _local5.x;
layout.msg.pointArrow._y = _local5.y;
layout.msg.startPointArrow._rotation = layout.msg.pointArrow._rotation;
layout.msg.startPointArrow._x = (-layout.msg.back._width) / 2;
layout.msg.startPointArrow._y = layout.msg.back._height / 2;
while (layout.msg.pointArrow.hitTest(myMc)) {
moveBasedOnRotation(layout.msg.pointArrow, -10);
}
while (layout.msg.startPointArrow.hitTest(layout.msg.back)) {
moveBasedOnRotation(layout.msg.startPointArrow, 1);
}
var _local2 = {x:layout.msg.pointArrow.pointA._x, y:layout.msg.pointArrow.pointA._y};
layout.msg.pointArrow.localToGlobal(_local2);
layout.msg.globalToLocal(_local2);
var _local1 = {x:layout.msg.pointArrow.pointB._x, y:layout.msg.pointArrow.pointB._y};
layout.msg.pointArrow.localToGlobal(_local1);
layout.msg.globalToLocal(_local1);
if (_local3.y < layout.msg._y) {
var _local9 = _local2;
_local2 = _local1;
_local1 = _local9;
}
var _local7 = Math.abs(layout.msg.pointArrow.pointA._x - layout.msg.pointArrow.pointB._x) / 2;
layout.msg.drawnArrow.clear();
layout.msg.drawnArrow.beginFill(3368652);
layout.msg.drawnArrow.moveTo(layout.msg.startPointArrow._x - _local7, layout.msg.startPointArrow._y);
layout.msg.drawnArrow.lineTo(layout.msg.startPointArrow._x + _local7, layout.msg.startPointArrow._y);
layout.msg.drawnArrow.lineTo(_local2.x, _local2.y);
layout.msg.drawnArrow.lineTo(_local1.x, _local1.y);
layout.msg.drawnArrow.lineTo(layout.msg.startPointArrow._x - _local7, layout.msg.startPointArrow._y);
}
function setCoordinates(myMc) {
var _local3 = getMcPoint(myMc);
var _local5 = getMcPoint(layout.msg);
layout.msg._visible = myMc._visible;
if ((myMc == undefined) || (myMc.hitTest(camera) == false)) {
layout.msg._visible = false;
if (myMc != undefined) {
if (myMc._x > field.character._x) {
tutorial_outOfScreen = 1;
} else {
tutorial_outOfScreen = 2;
}
}
} else if (myMc != undefined) {
tutorial_outOfScreen = 0;
}
if (layout.msg.back.hitTest(myMc)) {
layout.msg._alpha = 50;
layout.msg.pointArrow._visible = (layout.msg.drawnArrow._visible = false);
} else {
layout.msg._alpha = 100;
layout.msg.pointArrow._visible = (layout.msg.drawnArrow._visible = true);
}
var _local2 = 100;
var _local4 = myMc.getBounds(layout);
if (_local3.x > layout.msg._x) {
layout.msg._x = _local4.xMin - _local2;
} else if (_local3.x < (layout.msg._x - layout.msg.back._width)) {
layout.msg._x = _local4.xMax + (_local2 + layout.msg.back._width);
}
if (_local3.y > (layout.msg._y + layout.msg.back._height)) {
layout.msg._y = _local4.yMin - (_local2 + layout.msg.back._height);
} else if (_local3.y < layout.msg._y) {
layout.msg._y = _local4.yMax + _local2;
}
if ((layout.msg._x - layout.msg.back._width) < -272) {
layout.msg._x = -272 + layout.msg.back._width;
} else if (layout.msg._x > 272) {
layout.msg._x = 272;
}
if (layout.msg._y < -197) {
layout.msg._y = -197;
} else if ((layout.msg._y + layout.msg.back._height) > 197) {
layout.msg._y = 197 - layout.msg.back._height;
}
if (tutorialCounter == 26) {
layout.msg._x = 430;
}
}
function moveBasedOnRotation(myMc, mySpeed) {
var _local1 = (myMc._rotation * Math.PI) / 180;
myMc._x = myMc._x + (Math.sin(_local1) * mySpeed);
myMc._y = myMc._y + ((-Math.cos(_local1)) * mySpeed);
}
function getMcPoint(myMc) {
var _local1 = {x:myMc._x, y:myMc._y};
myMc._parent.localToGlobal(_local1);
layout.globalToLocal(_local1);
return(_local1);
}
function nextTutorial() {
layout.msg._visible = false;
tutorialCounter++;
setText(tutorial[tutorialCounter]);
setTutorialStep();
}
function prevTutorial() {
layout.msg._visible = false;
tutorialCounter--;
setText(tutorial[tutorialCounter]);
setTutorialStep();
}
function lookupMc(mcName, mcArray, isCheck) {
if (isCheck != true) {
settingPoint = true;
}
var _local1 = 0;
while (_local1 < mcArray.length) {
if ((mcArray[_local1].myName == mcName) || (mcArray[_local1].objectName == mcName)) {
if (isCheck != true) {
settingPoint = false;
}
return(mcArray[_local1]);
}
_local1++;
}
if (isCheck != true) {
setTimeout(setTutorialStep, 24, true);
}
return(undefined);
}
function validateMc(myMc) {
var _local2;
var _local3 = myMc.split("[");
if (_local3.length > 1) {
_local2 = _root[_local3[0]][substring(_local3[1], 0, _local3[1].length - 1)];
} else {
_local2 = _root[myMc];
}
if (_local2 == undefined) {
setTimeout(validateMc, 24, myMc);
} else {
pointOn = _local2;
pointOnFilters = pointOn.filters;
}
return(_local2);
}
function findItemSlot(itemName) {
var _local3 = _root[inventoryShowing + "_item"];
var _local2 = 0;
while (_local2 < _root[inventoryShowing + "_slots"]) {
if (_local3[_local2][0].split(", ")[0] == itemName) {
return(_local2);
}
_local2++;
}
return("None");
}
function duplicateSavePic() {
var _local2 = layout.createEmptyMovieClip("newPic" + layout.getNextHighestDepth(), layout.getNextHighestDepth());
_local2.pic = _local2.createEmptyMovieClip("pic", _local2.getNextHighestDepth());
layout._visible = false;
var _local3 = new flash.display.BitmapData(Stage.width, Stage.height - 76);
var _local4 = new flash.geom.Matrix();
_local4.translate(-(camera._x - (Stage.width / 2)), 0);
_local3.draw(_root, _local4);
layout._visible = true;
_local2.pic.attachBitmap(_local3, _local2.pic.getNextHighestDepth());
_local2.pic._x = (-_local2.pic._width) / 2;
_local2.pic._y = (-_local2.pic._height) / 2;
_local2._x = 0;
_local2._y = 0;
_local2.attachMovie("sun", "sun", _local2.getNextHighestDepth());
_local2.attachMovie("gamesaved", "gamesaved", _local2.getNextHighestDepth());
_local2.sun._height = _local2.pic._height;
_local2.sun.gotoAndStop(layout.sun._currentframe);
_local2.sun._alpha = layout.sun._alpha;
savePics.push(_local2);
}
function minimizeSavePics() {
var _local6 = 10;
var _local3 = Math.round((Stage.width * _local6) / 100);
var _local4 = Math.round((Stage.height * _local6) / 100);
var _local5 = 10;
var _local2 = 0;
while (_local2 < savePics.length) {
var _local1 = savePics[_local2];
if (_local1._width > _local3) {
_local1._width = _local1._width - ((_local1._width - _local3) / _local5);
}
if (_local1._height > _local4) {
_local1._height = _local1._height - ((_local1._height - _local4) / _local5);
}
_local1._alpha = 100 - ((_local3 / _local1._width) * 100);
if (_local1._alpha == 0) {
savePics.splice(_local2, 1);
_local1.removeMovieClip();
}
_local2++;
}
}
function findLayoutIndex(myWin, myArray) {
var _local1 = 0;
while (_local1 < myArray.length) {
if (myArray[_local1] == myWin._name) {
return(_local1);
}
_local1++;
}
}
function getCoordinatesArray(myArray, returnNames) {
if (returnNames == undefined) {
returnNames = false;
}
if (myArray == uiArray) {
if (returnNames) {
return(uiNames);
}
return(layoutArray);
}
if (myArray == optionsArray) {
if (returnNames) {
return(optionsNames);
}
return(optionsPlaceArray);
}
}
function restoreCoordinates(myWin, myArray) {
myArray = getCoordinatesArray(myArray)[findLayoutIndex(myWin, getCoordinatesArray(myArray, true))];
myWin._x = myArray[0];
myWin._y = myArray[1];
}
function saveLayoutArray() {
var _local1 = 0;
while (_local1 < uiNames.length) {
var _local2 = layout[uiNames[_local1]];
if (_local2 != undefined) {
layoutArray[_local1] = [_local2._x, _local2._y, true];
} else {
layoutArray[_local1][2] = false;
}
_local1++;
}
winArrayString = mcToString(winArray);
}
function loadLayoutArray() {
var _local1 = 0;
while (_local1 < uiNames.length) {
var _local3 = layout[uiNames[_local1]];
var _local2 = layoutArray[_local1];
if (_local2[2]) {
toggleWindow(uiNames[_local1]);
}
_local3._x = _local2[0];
_local3._y = _local2[1];
_local1++;
}
}
function loadWinArray() {
var _local1 = winArrayString.length - 1;
while (_local1 > 0) {
bringToFront(layout[winArrayString[_local1]]);
_local1--;
}
}
function mcToString(myArray) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < myArray.length) {
_local3.push(myArray[_local1]._name);
_local1++;
}
return(_local3);
}
function getCameraX() {
var _local2 = {x:camera._x, y:0};
field.globalToLocal(_local2);
return(_local2.x + _root._x);
}
function hideObjects() {
for (var _local4 in activeObjects) {
var _local1 = activeObjects[_local4];
if (((((_local1 != object) && (_local1.fadedOut == undefined)) && (pointOn != _local1)) && ((Math.abs(getCameraX() - _local1._x) - _local1._width) > 480)) && (!_local1.hitTest(camera))) {
var _local2 = findNum(_local1.objectName, objectData);
if (_local1.objectName == "teleport") {
var _local3;
if (_local1.hiddenFlag == true) {
_local3 = 1;
} else {
_local3 = 0;
}
hiddenObjects.push((((((((((((((((_local2 + ", ") + _local1._x) + ", ") + _local1.ground) + ", ") + _local1.createdIn) + ", ") + _local1.createdOrder) + ", ") + _local1.mapNum) + ", ") + _local1.mapX) + ", ") + _local1.mapY) + ", ") + _local3);
} else if (_local1.objectName == "message box") {
hiddenObjects.push((((((((((_local2 + ", ") + _local1._x) + ", ") + _local1.ground) + ", ") + _local1.createdIn) + ", ") + _local1.createdOrder) + ", ") + _local1.originalMsg);
} else {
hiddenObjects.push((((((((_local2 + ", ") + _local1._x) + ", ") + _local1.ground) + ", ") + _local1.createdIn) + ", ") + _local1.createdOrder);
}
removeObjectAt(_local1, Number(_local4));
}
}
}
function showObjects() {
for (var _local4 in hiddenObjects) {
var _local1 = hiddenObjects[_local4].split(", ");
if (((Math.abs(getCameraX() - Number(_local1[1])) - objectWidth[Number(_local1[0])]) < 480) && (_local1[0] != "")) {
var _local2 = getName("object", Number(_local1[0]));
var _local3;
if (((_local1[3] != undefined) && (!isNaN(Number(_local1[3])))) && ((((_local2 != "teleport") && (_local2 != "message box")) || ((_local2 == "teleport") && (_local1.length > 7))) || ((_local2 == "message box") && (_local1.length > 4)))) {
_local3 = [_local2, Number(_local1[3]), Number(_local1[4])];
_local1.splice(3, 2);
} else {
_local3 = [_local2, undefined, _local4];
}
if (_local2 == "teleport") {
newObject(_local3, Number(_local1[1]), Number(_local1[2]), undefined, Number(_local1[3]), Number(_local1[4]), Number(_local1[5]), Number(_local1[6]), undefined);
} else if (_local2 == "message box") {
newObject(_local3, Number(_local1[1]), Number(_local1[2]), undefined, undefined, undefined, undefined, undefined, _local1[3]);
} else {
newObject(_local3, Number(_local1[1]), Number(_local1[2]));
}
hiddenObjects.splice(_local4, 1);
}
}
}
function endBloodshed() {
attackType = "";
bloodshedActive = false;
bloodshedEnded = true;
blur = new flash.filters.BlurFilter(20, 2, maxFilter);
field.character._visible = (field.fieldFloor.character_shadow._visible = true);
}
function limitWindow(myWin) {
var _local4 = winWithScroller(myWin);
var _local6;
var _local5;
if (_local4) {
_local6 = myWin.list._x;
_local5 = myWin.list._y;
myWin.list._x = 0;
myWin.list._y = 0;
myWin.list._xscale = (myWin.list._yscale = 0);
}
var _local2 = myWin.getBounds(layout);
if (_local4) {
myWin.list._x = _local6;
myWin.list._y = _local5;
myWin.list._xscale = (myWin.list._yscale = 100);
}
var _local3 = 10;
if (_local2.xMax > ((Stage.width / 2) - _local3)) {
myWin._x = myWin._x - (_local2.xMax - ((Stage.width / 2) - _local3));
} else if (_local2.xMin < (((-Stage.width) / 2) + _local3)) {
myWin._x = myWin._x + ((((-Stage.width) / 2) + _local3) - _local2.xMin);
}
if (_local2.yMax > ((Stage.height / 2) - _local3)) {
myWin._y = myWin._y - (_local2.yMax - ((Stage.height / 2) - _local3));
} else if (_local2.yMin < (((-Stage.height) / 2) + _local3)) {
myWin._y = myWin._y + ((((-Stage.height) / 2) + _local3) - _local2.yMin);
}
}
function hidePlatforms() {
if (platforms == undefined) {
return(undefined);
}
var _local1 = 0;
while (_local1 < (platforms + 1)) {
var _local2 = field.platforms["platform_" + _local1];
if ((_local2 != undefined) && (Math.abs(getCameraX() - getPlatformX(_local1)) > 1440)) {
hiddenPlatforms.push(_local1);
removePlatform(_local1, true);
break;
}
_local1++;
}
}
function showPlatforms() {
for (var _local2 in hiddenPlatforms) {
var _local1 = hiddenPlatforms[_local2];
if (Math.abs(getCameraX() - getPlatformX(_local1)) < 1440) {
createPlatform(_local1, true);
hiddenPlatforms.splice(_local2, 1);
}
}
}
function hideNpcs() {
for (var _local2 in npcs) {
var _local1 = npcs[_local2];
if ((((Math.abs(getCameraX() - _local1._x) - _local1._width) > 480) && (pointOn != _local1)) && (tutorialCounter == 9999)) {
hiddenNpcs.push((((((findNum(_local1.myName, npcData) + ", ") + _local1._x) + ", ") + _local1._y) + ", ") + _local1.sideNum);
removeNpcAt(_local1, Number(_local2));
}
}
}
function showNpcs() {
for (var _local3 in hiddenNpcs) {
var _local1 = hiddenNpcs[_local3].split(", ");
if (((Math.abs(getCameraX() - Number(_local1[1])) - 100) < 480) && (_local1[0] != "")) {
var _local2 = getName("npc", Number(_local1[0]));
newNPC(_local2, Number(_local1[1]), Number(_local1[2]), Number(_local1[3]));
hiddenNpcs.splice(_local3, 1);
}
}
}
function getMonsterDayTime(myNum) {
return(Number(monsterData[myNum][0].split(", ")[4]));
}
function getMonsterDayTimeString(myNum) {
var _local1 = getMonsterDayTime(myNum);
if (_local1 == 0) {
return("both day and night");
}
if (_local1 == 1) {
return("day");
}
if (_local1 == 2) {
return("night");
}
}
function monsterValidDayTime(myNum) {
var _local1 = getMonsterDayTimeString(myNum);
return((_local1 == "both day and night") || (_local1 == dayTime));
}
function getMonsterDayTimeError(myNum) {
var _local5 = getName("enemy", myNum);
var _local6 = getMonsterName(_local5);
var _local8 = !getMonsterName(_local5, true);
var _local1 = getMonsterDayTime(myNum, _local8) - 1;
if (_local1 == 0) {
_local1 = 1;
} else if (_local1 == 1) {
_local1 = 0;
}
var _local7 = ["Day", "Night"];
var _local2;
if (closedArea == "0") {
_local2 = _local7;
} else {
_local2 = ["Light", "Dark"];
}
var _local4 = "Summon";
var _local3 = "during the " + _local2[_local1];
if (closedArea != "0") {
_local3 = ("at " + _local2[_local1]) + " places";
}
if (isPet) {
_local4 = "Call";
}
return((((("Can't " + _local4) + " a ") + _local6) + " ") + _local3);
}
function initiateSaveGame(noPic) {
layout.fix_save.exitAfter = false;
saveLayoutArray();
saveStage();
clearStage(true);
saveGame(0, _root.savingSlot, noPic);
saveConfig(0);
}
function initiateSaveGameAndExit(dontToggle) {
layout.fix_save.exitAfter = true;
saveLayoutArray();
saveStage();
clearStage(true);
saveGame(0, _root.savingSlot);
saveConfig(0);
if (!layout.fix_save._visible) {
toggleUI("savingNow");
initiateExit();
if (dontToggle != true) {
toggleUI("options_menu");
}
}
}
function initiateExit() {
exitNow = true;
clearStage();
mochi.as2.MochiEvents.endPlay();
}
function unfocusDuringPrompts() {
if (promptArray.length > 0) {
inventoryFocusOff();
equipFocus();
layout.store.focusOff();
}
}
function restoreAll() {
if ((health < maxHealth) || (mana < maxMana)) {
playSound("heal");
if (injuries != 1) {
mochi.as2.MochiEvents.trackEvent("Replenished after Dying");
} else {
mochi.as2.MochiEvents.trackEvent("Replenished");
}
}
health = maxHealth;
mana = maxMana;
layout.healInjuries._visible = false;
fieldFilters = [fieldBlur];
updateFilters();
updateBasicBars();
removeHighlighted(layout.health_bar);
}
function updateBehaviors() {
a = 0;
while (a < enemies.length) {
enemyBehavior(enemies[a]);
a++;
}
a = 0;
while (a < pets.length) {
enemyBehavior(pets[a]);
a++;
}
a = 0;
while (a < activeObjects.length) {
objectBehavior(activeObjects[a]);
a++;
}
a = 0;
while (a < invItems.length) {
itemBehavior(invItems[a]);
a++;
}
a = 0;
while (a < stars.length) {
starBehavior(stars[a]);
a++;
}
}
function setCharacterFilters() {
if (bloodshedEnded) {
bloodshedEnded = false;
} else {
blurCharacter();
}
glowCharacter();
var _local1 = new Array();
_local1.push(blur);
if (elementAttach > 0) {
_local1.push(glow1);
_local1.push(glow);
}
if (maxFilter == 0) {
field.character.filters = null;
} else {
field.character.filters = _local1;
}
setFilters(field.character);
}
function updateFilters() {
setCharacterFilters();
updateBehaviors();
}
function updateBasicBars() {
healthPer = (health / maxHealth) * 100;
layout.healthNum.text = (("Health: " + health) + " / ") + maxHealth;
layout.health_bar.bar._xscale = healthPer;
manaPer = (mana / maxMana) * 100;
layout.manaNum.text = (("Mana: " + mana) + " / ") + maxMana;
layout.mana_bar.bar._xscale = manaPer;
}
function levelUp(noFX) {
var _local2 = getBonuses();
level++;
expToNextLevel = expToNextLevel * 2;
layout.expbar.bar._xscale = 0;
_root["sp" + lastBookNum()] = _root["sp" + lastBookNum()] + 3;
spb = spb + 5;
maxHealth = maxHealth + Math.round((maxHealth - _local2.maxHealth) * 0.2);
maxMana = maxMana + Math.round((maxMana - _local2.maxMana) * 0.1);
health = maxHealth;
mana = maxMana;
if (!layout.statsWin._visible) {
addHighlighted(layout.lbtn1);
}
if (!layout.skills._visible) {
addHighlighted(layout.lbtn4);
}
if (noFX != true) {
_root.newFX("levelup", field.character, undefined, field.character);
_root.playSound("levelUp");
}
addEventToLog("level", level);
updateNPCs();
mochi.as2.MochiEvents.trackEvent("Level Gained", level);
}
function levelTo(myNum) {
while (level < myNum) {
levelUp(true);
}
exp = 0;
}
function skipTutorial() {
mochi.as2.MochiEvents.trackEvent("Skipped Tutorial", "Step " + tutorialCounter);
levelTo(3);
applyEquipStats(_root.equips[3], "Remove");
var _local2;
switch (ninjaClass) {
case "Executioner" :
_local2 = "Steel Katana";
break;
case "Soul Hunter" :
_local2 = "Steel Dagger";
break;
case "Skyborn" :
_local2 = "Steel Claw";
break;
case "Sage" :
_local2 = "Wooden Staff";
}
equipWeapon(_local2);
if ((ninjaClass == "Skyborn") && (nextStarSlot() == "None")) {
var _local3 = itemData[2].concat();
slotAmount(_local3, 500, "equal");
addToSlot(_local3);
}
tutorialCounter = 9999;
removeQuest(0, true, false, true);
removeQuest(1, true, false, true);
announcments.push(["Skipped Tutorial", 0]);
disposeItem("Apple", 1);
if (layout.equip != undefined) {
updateCharacterEquips(-1, layout.equip.character, true);
updateEquips();
}
moveMap(6, -274, -164);
}
function retrieveMochiItems() {
var _local1 = 0;
while (_local1 < mochi_items.length) {
retrieveMochiItem(mochi_items[_local1]);
_local1++;
}
}
function retrieveMochiItem(myNum) {
var _local1 = itemData[myNum][0].split(", ")[0];
if (((getItemAmount(_local1) + itemOnField(_local1)) == 0) && (!appearInEquips(_local1))) {
addMochiItem(myNum);
addMochiEvent(_local1);
}
}
function addMochiItem(myNum) {
var _local1 = itemData[myNum].concat();
if (addToSlot(_local1, true)) {
addToSlot(_local1);
} else {
newError("No room in the inventory for your premium item");
addMochiEvent("Inventory Full");
}
}
function addMochiEvent(myEvent, purchased) {
var _local1 = "Gained";
if (purchased == true) {
_local1 = "Purchased";
}
addToLog((("[Premium] " + _local1) + " ") + myEvent, 16777164);
}
function openMochi() {
mochi_store = true;
toggleUI("options_bg");
toggleUI("premium_shop");
mochiMc.swapDepths(_root.getNextHighestDepth());
if (mochi_coins) {
mochi.as2.MochiEvents.trackEvent("Premium Shop", "Entered with Coins");
} else {
mochi.as2.MochiEvents.trackEvent("Premium Shop", "Entered");
}
mochi.as2.MochiSocial.showLoginWidget({x:layout._x - 100, y:(Stage.height / 2) - 50});
updateLogin();
}
function closeMochi() {
mochi_store = false;
toggleUI("options_bg");
toggleUI("premium_shop");
mochi.as2.MochiSocial.hideLoginWidget();
}
function appearInEquips(myName) {
return(appearIn(myName, getEquipsNames()));
}
mochi.as2.MochiEvents.startPlay();
if (activeStage.length == 0) {
activeStage = gameStage.concat();
}
var firstLoad = true;
myLoopNum = undefined;
saveConfig(1);
exitNow = false;
exitTimer = 24;
soundsLoadCompleted = false;
layout.moveMap_fade.gotoAndStop(1);
myTimeout = setTimeout(startUp, 100);
var scrollers = ["skills", "store", "inventory", "encyclopedia"];
resetQuests();
var localGround = {x:field.character._x, y:field.character._y};
field.globalToLocal(localGround);
jumping = false;
jump = 12;
npcs = 0;
objectsSpace = 50;
middleX = field.character._x;
throwType = "";
combos = 0;
combos_re = 0;
combo_counter = 0;
combo_timer = 20;
layout.combo._visible = false;
camera2.createTextField("coordinates", camera2.getNextHighestDepth(), -272, -191, 200, 20);
camera2.coordinates.selectable = false;
camera2.coordinates.embedFonts = true;
var cor_format = new TextFormat();
cor_format.font = "Arial";
cor_format.color = 16711680 /* 0xFF0000 */;
cor_format.bold = true;
layout.store.gold.text = stringNum(gold);
setTimeout(updateInventory, 2);
setTimeout(updateEquips, 2);
draggedItem = new Array();
doubleClick_counter = 0;
layout.expbar.bar._xscale = Math.round((exp / expToNextLevel) * 100);
applyAllSkillPoints();
maxWide = 180;
minHeight = field.character._y;
maxHeight = minHeight - maxWide;
day_timer = 100;
day_counter = 0;
layout.sun.gotoAndStop(dayTime);
holding_counter = 0;
panic_timer = 0;
field.limitStart._alpha = (field.limitEnd._alpha = (back.limitStart._alpha = 0));
underground = false;
grounds = new Array();
ground_timer = 10;
ground_counter = ground_timer;
middleMaxSpace = 50;
slowMotion = 0;
slowMotion_counter = 0;
slowMotion_jump_counter = 0;
slowMotion_cut_counter = 0;
gamePause = false;
clearing = false;
damageTimer = 20;
damageCounter = damageTimer;
clearTimer = 1;
dashX = 0;
dashing = false;
combatDashing = false;
enemies = new Array();
pets = new Array();
activeObjects = new Array();
invItems = new Array();
objects = new Array();
stars = new Array();
needToDuplicate = new Array();
needCounter = 0;
needTimer = 500;
startHeight = field.character._height;
underground_counter = 0;
mana_reg_counter = 0;
health_reg_counter = 0;
scrollSpeed = 7;
quickAttacks = -1;
var charArray = [field.character];
field.character.arrayType = "charArray";
back_startX = back._x;
camera_startX = camera._x;
var blur = (new flash.filters.BlurFilter());
var glow1 = (new flash.filters.GlowFilter(16777215));
glow1.blurX = 5;
glow1.blurY = 5;
glow1.strength = 1;
glow1.quality = 3;
var glow = (new flash.filters.GlowFilter(16711680));
glow.blurX = 5;
glow.blurY = 5;
glow.strength = 1;
glow.quality = 3;
charName = getCharArray()[0];
addToLog(("Welcome " + charName) + "!");
if ((!isNewGame) && (patchLog != "")) {
addToLog(patchLog, 16777184);
}
field.character.elementTimer = 0;
field.character.element = "None";
field.character.mySlowMotion = 0;
var loseBloodCounter = 0;
var slowMotion_speed = 0;
var slowMotion_speed_vertical = 0;
var slowMotion_jump = 0;
var basicAppearSpeed = 2;
var appearSpeed = (-basicAppearSpeed);
var lbtnName = ["statsWin", "inventory", "equip", "skills", "quests", "encyclopedia"];
var lbtnCommand = ["Statistics", "Inventory", "Equipment", "Skills", "Quests", "Journey"];
var mbtnCommand = ["Menu", "Save Game", "Premium Shop"];
var lbtnCommands = [16, 11, 15, 14, 13];
setLayoutButtons();
setLayoutMButtons();
layout.mbtn1.onRelease = function () {
if (!_root.gamePause) {
_root.applyGamePause();
}
_root.layout.chat._visible = false;
};
layout.mbtn2.onRelease = function () {
if (!_root.gamePause) {
_root.initiateSaveGame();
}
_root.layout.chat._visible = false;
};
layout.mbtn3.onRelease = function () {
_root.openMochi();
};
var chainGraphics = new Array();
var bloodshedArray;
var fieldFilters = new Array();
var highlighted = new Array();
var highlightTimer = 15;
var highlightCounter = 0;
var errorTimer = 0;
var regStage_counter = 0;
var killed = 0;
if (isNewGame) {
equipBasic();
}
var tutorial_outOfScreen = 0;
var settingPoint = false;
var tutorial = new Array();
tutorial.push("Exclamation Mark means you got a Quest\nClick on the NPC to talk");
tutorial.push("Click here to begin the Quest");
tutorial.push("Kill this Wolf!\n\nAttack:\n #command[5] \n\nMovement:\n #command[1] \n #command[2] \n #command[0] \n #command[3]");
tutorial.push("Click on the NPC");
tutorial.push("Click here to Proceed");
tutorial.push("Often after Finishing Quests you get Rewards.\nYou can Roll-Over the Rewards for more information.\nClick here to Finish the Quest.");
tutorial.push("");
tutorial.push("You Leveled Up!\nIt's time to check your Stats!\nClick on the Stats Button.");
tutorial.push("This is the Stats Window.\nEvery time you level up you get 5 Attribute Points.\nIncrease your Primary Attribute by 5 Points,\nThis will increase your Damage by 1.");
tutorial.push("Now let's check the Skills!\nClick on the Skills Button.");
tutorial.push("Each Class has its own unique Skills.\nSpend 1 Point on this Skill.");
tutorial.push("Now Click and Hold the Icon of the Skill in order to Drag it.");
tutorial.push("Drag the Icon over here, then Release the Mouse Button.");
tutorial.push("From now on you can use this Skill by pressing #command[6]!\nLet's put it to the test in the Old Man's Quest.\nClick on him.");
tutorial.push("Click here to accept the Quest");
tutorial.push("Destroy boxes until you find an apple!\n\n#command[5] Attack\n#command[6] New Skill");
tutorial.push("Pick up this apple!\n\n#command[12] Pick up");
tutorial.push("Give the apple to the Old Man.");
tutorial.push("Click here to Proceed.");
tutorial.push("You got a Weapon!\nClick here to Proceed.");
tutorial.push("You shall now equip your new weapon!\nClick on the Inventory Button.");
tutorial.push("The Inventory is divided into 3 categories:\n\n-Equip: Clothes, Weapons...\n-Use: Potions, Shurikens, Scrolls, Pets...\n-Etc: Mostly quest items\n\nClick on Equip.");
tutorial.push("This is the new weapon you just got!\nDouble Click on it to Equip it!");
tutorial.push("The Quests Window will help you follow the story and track quests.\nClick on the Quests Button.");
tutorial.push("This is the Quests Window.\n\nHere you can check:\n-Quests In Progress\n-Completed Quests\n-Available Quests\n\nClick here to close the Quests Window!");
tutorial.push("Click on the Save Button to save your game.\nYou can save your game at any time and come back to it later!");
tutorial.push("This is a Portal.\n\nStand on it, and Press #command[4] to Teleport!\n\nOnce you enter it you're on your own!");
if (tutorialCounter == -1) {
nextTutorial();
} else if (tutorialCounter != 9999) {
prevTutorial();
nextTutorial();
}
var tutorial_arrowCounter = 0;
var tutorial_arrowTimer = 6;
var NormalSlash = (new flash.filters.GlowFilter(3381759, 1, 5, 5, 2, 3));
var FireSlash = (new flash.filters.GlowFilter(16711680, 1, 15, 15, 2, 3));
var IceSlash = (new flash.filters.GlowFilter(26316, 1, 15, 15, 2, 3));
var LightningSlash = (new flash.filters.GlowFilter(16777215, 1, 15, 15, 2, 3));
var bloodshedActive = false;
var bloodshedEnded = false;
var pickObjectCounter = 0;
var pickObjectTimer = 4;
var objectWithinReach;
layout.tutorial_leftArrow._visible = (layout.tutorial_rightArrow._visible = (layout.tutorialTrack._visible = false));
layout.tutorialTrack.skipButton.onRelease = skipTutorial;
onEnterFrame = function () {
if (mochi_store) {
return(undefined);
}
element = getCurrentWeaponElement();
if (Key.isDown(192)) {
if ((!resetStagesPressed) && (!isWeb)) {
if (_root.doubleClick_counter > 0) {
if (Key.isDown(96)) {
moveMap(currentStage + 1);
activeStage = gameStage.concat();
moveMap(currentStage - 1);
addSystemEvent("Reloaded World");
} else if (Key.isDown(97)) {
moveMap(currentStage + 1);
activeStage[currentStage - 1] = gameStage[currentStage - 1];
moveMap(currentStage - 1);
addSystemEvent("Reloaded Stage");
} else if (Key.isDown(98)) {
moveMap(currentStage + 1);
quest = copyArray(questCopy);
moveMap(currentStage - 1);
addSystemEvent("Reloaded Quests");
} else if (Key.isDown(99)) {
if (dayTime == "day") {
executeTime([0, "23:00"]);
} else {
executeTime([0, "06:00"]);
}
addSystemEvent("Changed Day Time");
} else if (Key.isDown(100)) {
if (injuries == 1) {
health = 1;
} else {
health = maxHealth;
}
addSystemEvent("Changed Health");
}
} else {
_root.doubleClick_counter = _root.doubleClick_timer;
}
resetStagesPressed = true;
}
} else {
resetStagesPressed = false;
}
hideObjects();
showObjects();
hideNpcs();
showNpcs();
hidePlatforms();
showPlatforms();
if (exitNow) {
if (exitTimer > 0) {
exitTimer--;
} else {
_root.moveFrame(1);
}
}
updateScrollers();
if (layout.inventory._visible) {
_root[inventoryShowing + "_scroll"] = layout.inventory.scroller.dragger._y;
}
minimizeSavePics();
if (((tutorialCounter >= 0) && (tutorialCounter < tutorial.length)) && (pointOn != undefined)) {
var pointOnObject_temp = {x:pointOn._x, y:pointOn._y};
pointOn._parent.localToGlobal(pointOnObject_temp);
if (((pointOnObject_temp.x != pointOnObject.x) || (pointOnObject_temp.y != pointOnObject.y)) || (!layout.msg._visible)) {
setCoordinates(pointOn);
setPointer(pointOn);
}
pointOnObject = pointOnObject_temp;
if (!gamePause) {
bringToFront(layout.msg);
}
} else {
layout.msg._x = (layout.msg._y = 99999);
layout.msg._visible = false;
}
if (successTutorialStep()) {
nextTutorial();
} else if (failTutorialStep()) {
prevTutorial();
}
if (pickObjectCounter > 0) {
pickObjectCounter--;
}
layout.pickObject._visible = pickObjectCounter > 0;
layout.pickObject.keyName.text = ("[ " + keyName(command[12])) + " ]";
var sWin = layout.summon_wins.summon_win0;
if (sWin != undefined) {
updateCamera(sWin.screenMc, sWin.myPet);
}
camera.camControl();
half_character_body = (getCharTop() - getCharBottom()) / 2;
var pi = 0;
while (pi < use_item.length) {
if ((use_item[pi][0].split(", ")[0] == "Monster Blood") && (Number(use_item[pi][0].split(", ")[4]) == 1)) {
var petStats = use_item[pi][1].split(", ");
if (Number(petStats[5]) <= 0) {
petStats[5] = Number(petStats[5]) + 1;
use_item[pi][1] = petStats.join(", ");
}
}
pi++;
}
a = 0;
while (a < npcs.length) {
npcBehavior(npcs[a]);
a++;
}
elementDamageBonus = Math.floor(wis / 5);
avoidabilityBonus = Math.floor(luk / 10);
accuracyBonus = Math.floor(_root.dex / 5);
if (element == "Fire") {
glow.color = 16711680 /* 0xFF0000 */;
glow1.color = 16776960 /* 0xFFFF00 */;
} else if (element == "Ice") {
glow.color = 52479;
glow1.color = 16777215 /* 0xFFFFFF */;
} else if (element == "Lightning") {
glow.color = 16777215 /* 0xFFFFFF */;
glow1.color = 10157821 /* 0x9AFEFD */;
}
if (elementAttach > 0) {
if (sparkCounter >= sparkTimer) {
if (element == "Lightning") {
randomLightning();
}
sparkCounter = 0;
} else {
sparkCounter++;
}
}
updateStatWins();
pf = 0;
while (pf < (platforms + 1)) {
var myPlat = field.platforms["platform_" + pf];
var myBack = back["platform_" + pf];
var myMiddle = middle["platform_" + pf];
myPlat.filters = null;
setFilters(myPlat);
myBack.filters = null;
setFilters(myBack);
myMiddle.filters = null;
setFilters(myMiddle);
if ((((shakeTimer > 0) && (shakePower >= 15)) && (maxFilter > 0)) && (screenBlurring == 1)) {
myPlat._x = (myMiddle._x = (platformWidth - 50) * pf);
myBack._x = ((backWidth - 30) * pf) - 160;
} else {
myPlat._x = (myMiddle._x = platformWidth * pf);
myBack._x = (backWidth * pf) - 160;
}
pf++;
}
sky.filters = null;
setFilters(sky);
while (objects.length > maxFX) {
objects[0].removeMovieClip();
objects.splice(0, 1);
}
layout.d1.circle.enabled = (layout.d2.circle.enabled = (layout.d3.circle.enabled = (layout.d4.circle.enabled = (layout.p1.circle.enabled = (layout.p2.circle.enabled = (layout.p3.circle.enabled = !gamePause))))));
if ((((((((gamePause && (layout.store == undefined)) && (!layout.fix_save._visible)) && (!layout.configure_graphics._visible)) && (!((layout.quests_pop != undefined) && (layout.quests_pop._currentframe == 2)))) && ((!layout.quests) == undefined)) || (layout.chat.win._x == undefined)) || (((layout.chat.win == layout.equip) || (layout.chat.win == layout.inventory)) && (layout.store.unfocus._visible))) || (layout.chat.win.enabled == false)) {
layout.chat._visible = false;
layout.chat._alpha = 100;
_root.applyMouseCursor("Default");
}
if (soundMissing && (mySoundLoaded[myLoopName] == true)) {
playLoop(myLoopName, true);
soundMissing = false;
}
if (layout.quests != undefined) {
with (layout.quests) {
if (_visible) {
if (_root.quest_section_showing == 0) {
showSelectedQuest();
} else if (_root.quest_section_showing == 1) {
showSelectedCompleted();
} else if (_root.quest_section_showing == 2) {
showSelectedAvailable();
}
myScroll._visible = log.maxscroll > 1;
if (_root.quest_section_showing == 0) {
myTitle.text = "Quests In Progress";
btn0.enabled = false;
btn1.enabled = true;
btn2.enabled = true;
btn0._alpha = 25;
btn1._alpha = 100;
btn2._alpha = 100;
} else if (_root.quest_section_showing == 1) {
myTitle.text = "Completed Quests";
btn0.enabled = true;
btn1.enabled = false;
btn2.enabled = true;
btn0._alpha = 100;
btn1._alpha = 25;
btn2._alpha = 100;
} else if (_root.quest_section_showing == 2) {
myTitle.text = "Available Quests";
btn0.enabled = true;
btn1.enabled = true;
btn2.enabled = false;
btn0._alpha = 100;
btn1._alpha = 100;
btn2._alpha = 25;
}
}
}
}
if (layout.store != undefined) {
with (layout.store) {
if (!closeX.enabled) {
_root.chat._visible = false;
}
}
}
if ((layout.quests_pop != undefined) && (layout.quests_pop._currentframe == 1)) {
layout.quests_pop.eachFrame();
}
if (layout.equip != undefined) {
with (layout.equip) {
if (_root.layout.inventory._visible) {
openInv.enabled = false;
openInv._alpha = 50;
} else {
openInv.enabled = true;
openInv._alpha = 100;
}
_root.updateCharacterEquips(-1, character, true);
}
}
unfocusDuringPrompts();
if (myLoop.getVolume() < maxMusic) {
myLoop.setVolume(myLoop.getVolume() + 1);
} else if (myLoop.getVolume() > maxMusic) {
myLoop.setVolume(myLoop.getVolume() - 1);
}
sl = 0;
while (sl < mySoundNames.length) {
sLoop = mySounds[mySoundNames[sl]];
if ((sLoop != myLoop) && (sLoop.getVolume() > 0)) {
sLoop.setVolume(sLoop.getVolume() - 1);
if (sLoop.getVolume() == 0) {
sLoop.stop();
}
}
sl++;
}
if ((health <= 0) && (!layout.deathWin._visible)) {
if (object != false) {
object.throwObject();
}
_root.newObject("Grave", field.character._x, Number(ground), true);
_root.failQuests();
_root.newFX("blood", field.character);
_root.playSound("splitBlood", myBlood);
myCurrentLuk = luk;
if (myCurrentLuk > 100) {
myCurrentLuk = 100;
}
myPer = ((100 - myCurrentLuk) / 100) * 50;
exp = exp - Math.round((exp * myPer) / 100);
leaveCharacter();
promptWindow("deathWin");
fieldFilters = [fieldBlur, bnwFilter()];
updateFilters();
updateBasicBars();
layout.deathWin.txt.text = ("You have died and lost " + myPer) + "% of your current experience";
gamePause = true;
field.character.element = "None";
field.character.elementTimer = 0;
field.character._visible = false;
mochi.as2.MochiEvents.trackEvent("Died");
}
if (maxHit == undefined) {
maxHit = 1;
}
if ((dashSpeed != 0) || (underground)) {
scrollSpeed = 3;
} else {
scrollSpeed = 7;
}
if (Size > 1) {
scrollX = fieldGlobal(field.character).x - _root._x;
camera2._x = scrollX;
if (camera2.hitTest(field.limitStart)) {
scrollX = (fieldGlobal(field.limitStart).x + (Stage.width / 2)) - _root._x;
} else if (camera2.hitTest(blockLimit)) {
scrollX = (fieldGlobal(blockLimit).x - (Stage.width / 2)) - _root._x;
}
if (camera._x < scrollX) {
camera._x = camera._x + (Math.abs(camera._x - scrollX) / scrollSpeed);
} else if (camera._x > scrollX) {
camera._x = camera._x - (Math.abs(camera._x - scrollX) / scrollSpeed);
}
} else {
camera._x = 479.8;
}
layout._x = (Stage.width / 2) - _root._x;
sky._x = (Stage.width / 2) - _root._x;
applyPerspective();
if (!soundsLoadCompleted) {
(i = 0);
(soundsLoaded = 0);
while (i < mySoundNames.length) {
tempSound = mySounds[mySoundNames[i]];
if (tempSound.getBytesLoaded() != undefined) {
soundsLoaded = soundsLoaded + tempSound.getBytesLoaded();
}
i++;
}
var loadedPercents = Math.round((soundsLoaded / soundsTotal) * 100);
layout.soundsPer.text = ("Loading Sounds: " + loadedPercents) + "%";
soundLoading = mySounds[mySoundNames[currentlyLoading]];
if ((currentlyLoading < mySoundNames.length) && (soundLoading.getBytesLoaded() == soundLoading.getBytesTotal())) {
mySoundLoaded[mySoundNames[currentlyLoading]] = true;
if (currentlyLoading < (mySoundNames.length - 1)) {
currentlyLoading++;
loadSound(mySoundNames[currentlyLoading]);
loadingComplete = 50;
}
}
if (soundsLoaded == soundsTotal) {
if (loadingComplete <= 0) {
soundsLoadCompleted = true;
layout.soundsPer.text = "";
} else {
loadingComplete--;
}
}
}
updateCharacterEquips();
if (underground) {
if (underground_counter <= 0) {
if (skillReady(6)) {
skillConsume(6);
} else {
underground = false;
}
underground_counter = 24;
} else {
underground_counter--;
}
}
if (layout.statsWin._visible) {
layout.statsWin.updateStats();
}
if ((((((layout.quests._visible || (layout.quests_pop._visible)) || (layout.store._visible)) || (layout.confirm_drop._visible)) || (layout.confirm_multidrop._visible)) || (layout.deathWin._visible)) || (layout.encyclopedia._visible)) {
gamePause = true;
}
if (layout.options_bg == undefined) {
if (errorTimer > 0) {
errorTimer--;
} else if (layout.errorMc.errorTxt._alpha > 0) {
layout.errorMc.errorTxt._alpha = layout.errorMc.errorTxt._alpha - 10;
} else {
layout.errorMc.errorTxt.text = "";
}
}
layout.mbtn1.enabled = (layout.mbtn2.enabled = false);
if (((layout.options_bg == undefined) && (layout.encyclopedia == undefined)) && (health > 0)) {
layout.lbtn1.enabled = (layout.lbtn2.enabled = (layout.lbtn3.enabled = (layout.lbtn4.enabled = (layout.lbtn5.enabled = (layout.lbtn6.enabled = true)))));
if (!_root.gamePause) {
layout.mbtn1.enabled = (layout.mbtn2.enabled = true);
}
if (Key.isDown(command[11])) {
toggleWindow("inventory");
} else {
inventoryPressed = false;
}
if (Key.isDown(command[14])) {
toggleWindow("skills");
} else {
skillsPressed = false;
}
if (Key.isDown(command[13])) {
toggleWindow("quests");
} else {
questHold = false;
}
if (Key.isDown(command[15])) {
toggleWindow("equip");
} else {
equipPressed = false;
}
if (Key.isDown(command[16])) {
toggleWindow("statsWin");
} else {
statsPressed = false;
}
} else {
layout.lbtn1.enabled = (layout.lbtn2.enabled = (layout.lbtn3.enabled = (layout.lbtn4.enabled = (layout.lbtn5.enabled = (layout.lbtn6.enabled = (layout.mbtn1.enabled = (layout.mbtn2.enabled = false)))))));
}
autoSizeChat();
layout.chat._x = layout._xmouse;
layout.chat._y = layout._ymouse;
if ((layout.chat._y - layout.chat._height) < (((-Stage.height) / 2) + 16)) {
layout.chat._y = (((-Stage.height) / 2) + 16) + layout.chat._height;
}
if ((layout.chat._x + layout.chat._width) > ((Stage.width / 2) + 26)) {
layout.chat._x = ((Stage.width / 2) + 26) - layout.chat._width;
} else if (layout.chat._x < (((-Stage.width) / 2) + 32)) {
layout.chat._x = ((-Stage.width) / 2) + 32;
}
layout.logScroll._visible = layout.log.maxscroll > 1;
if (doubleClick_counter > 0) {
doubleClick_counter--;
}
if (dragging) {
layout.itemSquare._x = layout._xmouse;
layout.itemSquare._y = layout._ymouse;
} else {
layout.itemSquare._x = 999999 /* 0x0F423F */;
layout.itemSquare._y = 999999 /* 0x0F423F */;
}
layout.inventory.gold.text = stringNum(gold);
layout.store.gold.text = stringNum(gold);
if (skillDragging) {
layout.skillSquare._x = layout._xmouse;
layout.skillSquare._y = layout._ymouse;
} else {
layout.skillSquare._x = 999999 /* 0x0F423F */;
layout.skillSquare._y = 999999 /* 0x0F423F */;
}
if (clearing) {
if (clearTimer > 0) {
clearTimer--;
} else if (!exitNow) {
clearTimer = 1;
clearing = false;
moveMap2();
}
}
if ((object != false) && (object != undefined)) {
layout.d1.circle.imageMask.image.gotoAndStop(1);
layout.d2.circle.imageMask.image.gotoAndStop(1);
layout.d3.circle.imageMask.image.gotoAndStop(1);
layout.d4.circle.imageMask.image.gotoAndStop(1);
if (object.throwAble) {
layout.d1.circle.imageMask.image.gotoAndStop(12);
layout.d1.circle.imageMask2.image.gotoAndStop(12);
}
if (object.sacrificePoints > 0) {
layout.d2.circle.imageMask.image.gotoAndStop(11);
layout.d2.circle.imageMask2.image.gotoAndStop(11);
}
} else {
si = 1;
while (si <= 4) {
ss = layout["d" + si].circle;
skillNum = si - 1;
if (!holding) {
skillNum = skillNum + 4;
}
var skillFrame = (skill[skillNum] + 2);
ss.imageMask.image.gotoAndStop(skillFrame);
ss.imageMask2.image.gotoAndStop(skillFrame);
si++;
}
}
layout.d1.txt.text = keyName(command[5]);
layout.d2.txt.text = keyName(command[6]);
layout.d3.txt.text = keyName(command[7]);
layout.d4.txt.text = keyName(command[8]);
layout.p1.txt.text = keyName(command[17]);
layout.p2.txt.text = keyName(command[18]);
layout.p3.txt.text = keyName(command[19]);
if (Key.isDown(16) && (Key.isDown(82))) {
camera2.coordinates.text = applyCoordinates("Hwjfyji%g~%Wt~n%Gjwsymfq");
camera2.coordinates.setTextFormat(cor_format);
} else {
camera2.coordinates.text = "";
}
if (Key.isDown(command[10])) {
if (pauseUp) {
applyGamePause();
}
} else {
pauseUp = true;
}
if (!gamePause) {
if ((regStage_counter >= needTimer) && (backupObject == false)) {
var rs = 0;
while (rs < activeStage.length) {
if (rs != currentStage) {
regenerateStage(rs);
}
rs++;
}
regenerateCurrentStage();
regStage_counter = 0;
if (killed > 0) {
killed--;
}
} else {
regStage_counter++;
}
if (highlightCounter >= cpc(highlightTimer)) {
var hi = 0;
while (hi < highlighted.length) {
var hmc = highlighted[hi];
if (hmc.isHighlighted) {
reColor(hmc, "reset", 0);
} else {
var highlightColor = "FFFFFF";
if (hmc == layout.health_bar) {
highlightColor = "FFFF00";
}
reColor(hmc, highlightColor, 50);
}
hmc.isHighlighted = !hmc.isHighlighted;
highlightCounter = 0;
hi++;
}
} else {
highlightCounter++;
}
if (needToDuplicate.length > 0) {
if (needCounter >= needTimer) {
dupEnemy = random(needToDuplicate.length);
newEnemy(getName("enemy", needToDuplicate[dupEnemy]), getRandomX(field.character), getRandomY(), false, true);
needToDuplicate.splice(dupEnemy, 1);
needCounter = 0;
myKilled = killed;
if (myKilled > 400) {
myKilled = 400;
}
needTimer = Math.abs(random(500 - myKilled));
} else {
needCounter++;
}
}
updateBehaviors();
for (var sc in cooldown) {
if (cooldown[sc] > 0) {
cooldown[sc]--;
if (cooldown[sc] < 0) {
cooldown[sc] = 0;
}
}
}
if (((layout.announcment._alpha <= 0) && (announcments.length > 0)) && (appearSpeed < 0)) {
layout.announcment.txt.text = announcments[0][0];
bringToFront(layout.announcment);
appearSpeed = basicAppearSpeed * 2;
}
if (layout.announcment._alpha >= 100) {
announcments.splice(0, 1);
appearSpeed = (-basicAppearSpeed) / 2;
}
layout.announcment._alpha = layout.announcment._alpha + appearSpeed;
if (layout.announcment._alpha < 0) {
layout.announcment._alpha = 0;
} else if (layout.announcment._alpha > 100) {
layout.announcment._alpha = 100;
}
timeB = getTimer();
fps_rough = Math.floor(1000 / (this.timeB - this.timeA));
timeA = timeB;
performanceRate = Math.round((fps_rough / 24) * 100);
if (performanceRate != NaN) {
if ((avgPerformance == undefined) || (isNaN(avgPerformance))) {
avgPerformance = performanceRate;
} else {
avgPerformance = Math.round((avgPerformance + performanceRate) / 2);
}
}
cg = 0;
while (cg < chainGraphics.length) {
var myCG = chainGraphics[cg];
if (myCG._alpha <= 0) {
myCG.removeMovieClip();
chainGraphics.splice(cg, 1);
} else {
myCG._alpha = myCG._alpha - 2;
}
cg++;
}
blurField();
fieldFilters = [fieldBlur];
healthPercents = Math.round((health / maxHealth) * 100);
if (healthPercents <= 30) {
addHighlighted(layout.health_bar);
injuries = healthPercents / 30;
if (loseBloodCounter <= 0) {
if ((!underground) && (!jumping)) {
loseBlood();
loseBloodCounter = random(Math.round(injuries * 100));
}
} else {
loseBloodCounter--;
}
fieldFilters.push(bnwFilter());
} else {
injuries = 1;
removeHighlighted(layout.health_bar);
}
layout.healInjuries._visible = injuries != 1;
if (layout.healInjuries._visible) {
layout.pickObject._y = noteY_2;
} else {
layout.pickObject._y = noteY_1;
}
thePet = getPet();
mana_reg = 100 - Math.floor(dex / 5);
health_reg = 500 - str;
if (mana_reg < 0) {
mana_reg = 0;
}
if (health_reg < 0) {
health_reg = 0;
}
if (mana_reg_counter >= mana_reg) {
mana = mana + Number(mana_reg_amount);
thePet.mana = thePet.mana + Number(mana_reg_amount);
mana_reg_counter = 0;
if (thePet.mana > thePet.startMana) {
thePet.mana = thePet.startMana;
}
} else if (mana < maxMana) {
mana_reg_counter++;
}
var charOk = (health < maxHealth);
var petOk = (((thePet != false) && (thePet.health < thePet.startHealth)) && (thePet.targeted == false));
if (health_reg_counter >= health_reg) {
health = health + Number(health_reg_amount);
health_reg_counter = 0;
healthRecovered = Number(health_reg_amount);
if (health > maxHealth) {
healthRecovered = healthRecovered - (maxHealth - health);
}
if (healthRecovered > 0) {
newDigits(field.character._x, field.character._y, healthRecovered, 2, false);
}
} else if (charOk) {
health_reg_counter++;
} else {
health_reg_counter = 0;
}
if (pet_health_reg_counter >= health_reg) {
thePet.health = thePet.health + Number(health_reg_amount);
pet_health_reg_counter = 0;
healthRecovered = Number(health_reg_amount);
if (thePet.health > thePet.startHealth) {
healthRecovered = healthRecovered - (thePet.startHealth - thePet.health);
thePet.health = thePet.startHealth;
}
if (healthRecovered > 0) {
newDigits(thePet._x, thePet._y, healthRecovered, 2, false);
}
} else if (petOk) {
pet_health_reg_counter++;
} else {
pet_health_reg_counter = 0;
}
if (mana > maxMana) {
mana = maxMana;
}
if (health > maxHealth) {
health = maxHealth;
}
var si = 1;
while (si <= 4) {
var ss = layout["d" + si].circle;
var skillNum = (si - 1);
if (!holding) {
skillNum = skillNum + 4;
}
ss.skillNum = skillNum;
var skillName = _root.skill[ss.skillNum];
var cooldown_total = skillCooldown(skillName);
var cooldown_left = cooldown[skillName];
var skillScale = 100;
if ((cooldown_total > 0) && (!((_root.object != false) && (_root.object != undefined)))) {
skillScale = ((cooldown_total - cooldown_left) / cooldown_total) * 100;
}
ss.circle._yscale = skillScale;
ss.onRollOver = function () {
_root.skillShowing = -1;
if ((_root.object != false) && (_root.object != undefined)) {
if (((this.skillNum == 0) || (this.skillNum == 4)) && (object.throwAble)) {
_root.skillShowing = 10;
} else if (((this.skillNum == 1) || (this.skillNum == 5)) && (object.sacrificePoints > 0)) {
_root.skillShowing = 9;
}
} else {
_root.skillShowing = _root.skill[this.skillNum];
}
if (_root.skillShowing != -1) {
_root.displaySkillStats(skillData[_root.skillShowing][0].split(", ")[0]);
if (!((_root.object != false) && (_root.object != undefined))) {
_root.applyMouseCursor("Grab");
}
} else {
_root.displayCommand("Drag Skills Over Here");
}
_root.layout.chat.win = this;
};
ss.onRollOut = function () {
_root.layout.chat._visible = false;
_root.applyMouseCursor("Default");
};
ss.onPress = function () {
if (this.imageMask.image._currentframe != 1) {
if (!((_root.object != false) && (_root.object != undefined))) {
_root.skillDragging = true;
_root.layout.skillSquare.image.gotoAndStop(this.imageMask.image._currentframe);
_root.layout.skillSquare.myNum = this.skillNum;
_root.layout.skillSquare.myName = _root.skill[this.skillNum];
_root.skill[this.skillNum] = -1;
_root.applyMouseCursor("GrabAction");
}
_root.layout.chat._visible = false;
}
};
ss.onRelease = (ss.onReleaseOutside = function () {
if (!((_root.object != false) && (_root.object != undefined))) {
_root.checkSkillPlace();
tsSquare = false;
var _local2 = 1;
while (_local2 <= 4) {
if (_root.layout["d" + _local2].circle.hitTest(_root.layout.mouseCursor)) {
tsSquare = _root.layout["d" + _local2].circle;
}
_local2++;
}
if ((tsSquare == false) || (!tsSquare.hitTest(_xmouse, _ymouse, true))) {
_root.applyMouseCursor("Default");
_root.layout.chat._visible = false;
} else {
_root.applyMouseCursor("Grab");
}
}
});
ss.useHandCursor = false;
si++;
}
si = 1;
while (si <= 3) {
ss = layout["p" + si].circle;
ss.myNum = si;
ss.onRollOver = function () {
_root.potShowing = _root.quickUse[this.myNum - 1];
if (_root.potShowing != -1) {
_root.displayItemStats(_root.itemData[_root.quickUse[this.myNum - 1]]);
_root.applyMouseCursor("Grab");
} else {
_root.displayCommand("Drag Potions over here for Quick Use");
}
_root.layout.chat.win = this;
};
ss.onRollOut = function () {
_root.layout.chat._visible = false;
_root.applyMouseCursor("Default");
};
ss.onPress = function () {
if (this.myItem._currentframe != 1) {
_root.dragUseSquare(this.myNum);
if (_root.doubleClick_counter > 0) {
_root.usePotion(_root.nextUseSlot(_root.quickUse[this.myNum - 1]));
} else {
_root.dragging = true;
_root.quickUse[this.myNum - 1] = -1;
}
_root.updateInventory();
_root.doubleClick_counter = _root.doubleClick_timer;
_root.applyMouseCursor("GrabAction");
_root.layout.chat._visible = false;
}
};
ss.onRelease = (ss.onReleaseOutside = function () {
_root.checkUsePlace();
tsSquare = false;
var _local3 = 1;
while (_local3 <= 3) {
if (_root.layout["p" + _local3].circle.hitTest(_root.layout.mouseCursor)) {
tsSquare = _root.layout["p" + _local3].circle;
}
_local3++;
}
if (((tsSquare == false) || (!tsSquare.hitTest(_xmouse, _ymouse, true))) || (getItemAmount(itemData[_root.quickUse[this.myNum - 1]][0].split(", ")[0]) <= 0)) {
_root.applyMouseCursor("Default");
_root.layout.chat._visible = false;
} else {
_root.applyMouseCursor("Grab");
}
});
ss.useHandCursor = false;
si++;
}
if (bloodshedActive) {
var be = getEnemyWithinCam(bloodshedArray);
if (((bloodshedArray.length >= Number(bloodshed_max)) || (be == false)) || (be == undefined)) {
endBloodshed();
} else {
field.character._visible = (field.fieldFloor.character_shadow._visible = false);
checkHit(be);
bloodshedArray.push(be);
}
}
if ((field.character.element != "None") && (field.character.elementTimer > 0)) {
field.character.elementTimer--;
_root.attachElement(field.character);
} else {
field.character.element = "None";
_root.reColor(field.character, "reset", 0);
}
if (field.character.element == "Ice") {
field.character.mySlowMotion = Math.round(field.character.elementTimer / 10);
} else if (field.character.element == "Lightning") {
field.character.mySlowMotion = 1E23;
} else {
field.character.mySlowMotion = 0;
}
if ((slowMotion_speed > 30) && (field.character.element != "Lightning")) {
slowMotion_speed = 30;
}
if (slowMotion_speed > 0) {
slowMotion_speed--;
}
if ((slowMotion_speed_vertical > 30) && (field.character.element != "Lightning")) {
slowMotion_speed_vertical = 30;
}
if (slowMotion_speed_vertical > 0) {
slowMotion_speed_vertical--;
}
if ((slowMotion_jump > 30) && (field.character.element != "Lightning")) {
slowMotion_jump = 30;
}
if (slowMotion_jump > 0) {
slowMotion_jump--;
}
if (field.character.mySlowMotion > 0) {
jumpPower = Math.round(((basicJumpPower + Math.floor(dex / 60)) / (field.character.mySlowMotion + 1)) * 5);
} else {
jumpPower = basicJumpPower + Math.floor(dex / 60);
}
if (jumpPower > basicJumpPower) {
jumpPower = basicJumpPower + Math.floor(dex / 60);
}
if (jumpPower > 95) {
jumpPower = 95;
}
if (hour < 10) {
hourTxt = "0" + hour;
} else {
hourTxt = String(hour);
}
if (minute < 10) {
minuteTxt = "0" + minute;
} else {
minuteTxt = String(minute);
}
layout.dayTime_icon.timeText.text = (hourTxt + ":") + minuteTxt;
if (miliTimer >= 24) {
miliTimer = 0;
minute++;
if (minute == 60) {
hour++;
minute = 0;
}
if (hour == 24) {
hour = 0;
}
} else {
miliTimer++;
}
lastDayTime = dayTime;
updateTime();
Fire_Bonus = 0;
Ice_Bonus = 0;
Lightning_Bonus = 0;
if ((myTime >= 5) && (myTime < 16)) {
layout.sun.gotoAndStop(2);
layout.sun._alpha = Math.round(((myTime - 5) / 11) * 100);
dayTime = "day";
Fire_Bonus = Math.round(layout.sun._alpha);
} else if ((myTime >= 16) && (myTime < 18)) {
layout.sun.gotoAndStop(2);
layout.sun._alpha = Math.round(((18 - myTime) / 2) * 100);
dayTime = "day";
Fire_Bonus = Math.round((layout.sun._alpha * 50) / 100);
} else if ((myTime >= 18) && (myTime <= 24)) {
layout.sun.gotoAndStop(1);
layout.sun._alpha = Math.round(((myTime - 18) / 6) * 100);
dayTime = "night";
Ice_Bonus = Math.round((layout.sun._alpha * 50) / 100);
} else if ((myTime >= 0) && (myTime < 4)) {
layout.sun.gotoAndStop(1);
layout.sun._alpha = 100;
dayTime = "night";
Ice_Bonus = Math.round(layout.sun._alpha);
} else if ((myTime >= 4) && (myTime < 5)) {
layout.sun.gotoAndStop(1);
layout.sun._alpha = Math.round((5 - myTime) * 100);
dayTime = "day";
}
var dayTimeFrame;
if (dayTime == "day") {
dayTimeFrame = 1;
} else if (dayTime == "night") {
dayTimeFrame = 2;
}
if (closedArea != "0") {
dayTimeFrame = dayTimeFrame + 2;
}
layout.dayTime_icon.gotoAndStop(dayTimeFrame);
if ((((lastDayTime != dayTime) && (lastDayTime != undefined)) && (closedArea == "0")) && (moveMapTimer == 0)) {
stagesToOriginal();
monsters_time = sortByDayTime(activeStage[currentStage].split("~")[1].split("^"), true);
nd = 0;
while (nd < monsters_time.length) {
newEnemy(monsterData[Number(monsters_time[nd].split(", ")[0])][0].split(", ")[0], Number(monsters_time[nd].split(", ")[1]), Number(monsters_time[nd].split(", ")[2]) + builder_y_fix, false, true);
nd++;
}
var monstersArray = enemies.concat(pets);
var nd = 0;
while (nd < monstersArray.length) {
var tEnemy = monstersArray[nd];
if (((dayTime == "day") && (tEnemy.timeZone == 2)) || ((dayTime == "night") && (tEnemy.timeZone == 1))) {
tEnemy.leaving = true;
}
nd++;
}
needToDuplicate = sortByDayTime(needToDuplicate);
}
if (moveMapTimer > 0) {
moveMapTimer--;
}
viewStats();
setCharacterFilters();
if ((field.character._currentframe == atkFrame) && (field.character.element != "Lightning")) {
if (field.character.mySlowMotion > 0) {
cSpeed = Math.round(field.character.mySlowMotion / 5);
if (cSpeed > 6) {
cSpeed = 6;
} else if (cSpeed < 1) {
cSpeed = 1;
}
if (slowMotion_cut_counter >= cSpeed) {
field.character.atk.nextFrame();
fadeSlash();
slowMotion_cut_counter = 0;
} else {
slowMotion_cut_counter++;
}
} else {
field.character.atk.nextFrame();
fadeSlash();
if (atkSpeedBoost > 0) {
var myAtkSpeedBoost = pc(atkSpeedBoost);
if (myAtkSpeedBoost < 1) {
myAtkSpeedBoost = 1;
}
var asb = 0;
while (asb < myAtkSpeedBoost) {
field.character.atk.nextFrame();
fadeSlash();
asb++;
}
}
}
}
if (!bloodshedActive) {
if (health > 0) {
field.character._visible = (field.fieldFloor.character_shadow._visible = !underground);
} else {
field.character._visible = (field.fieldFloor.character_shadow._visible = false);
}
}
if (!underground) {
if (field.ground._alpha > 0) {
field.ground._alpha = field.ground._alpha - 10;
} else if (field.ground != undefined) {
field.ground.removeMovieClip();
}
}
if (underground) {
speed = underground_strength;
hSpeed = underground_strength / 2;
} else {
speed = (basicSpeed + speedBonus) + Math.floor(dex / 30);
hSpeed = basicHSpeed + Math.round((speedBonus + Math.floor(dex / 30)) / 4);
}
g = 0;
while (g < grounds.length) {
mGround = grounds[g];
mGround.filters = null;
setFilters(mGround);
if (mGround._alpha > 0) {
mGround._alpha--;
} else {
grounds.splice(g, 1);
mGround.removeMovieClip();
}
g++;
}
panic = shakeTimer > 0;
activeShake();
if (dashX > 0) {
dashX--;
} else if (dashX < 0) {
dashX++;
}
dashSpeed = dashX * 5;
if (dashSpeed != 0) {
field.character._x = field.character._x + dashSpeed;
characterLimits(dashSpeed);
}
if (layout.expbar.bar._xscale >= 100) {
exp = exp - expToNextLevel;
levelUp();
}
charName = getCharArray()[0];
edited_charName = restrictText(charName, 10);
layout.userText.text = (ninjaClass + " ") + edited_charName;
layout.levelText.text = "lvl " + level;
exp_per = Math.round((exp / expToNextLevel) * 100);
layout.expNum.text = (("Experience: " + exp) + " / ") + expToNextLevel;
if (layout.expbar.bar._xscale < exp_per) {
layout.expbar.bar._xscale++;
} else if (layout.expbar.bar._xscale > exp_per) {
layout.expbar.bar._xscale--;
}
if (combos > 1) {
layout.combo._visible = true;
if (combos > combos_re) {
layout.combo.gotoAndPlay(1);
combo_counter = 0;
}
combos_re = combos;
var cNumArray = String(combos).split("");
var cdg = 0;
while (cdg < cNumArray.length) {
var myCNum = Number(cNumArray[cdg]);
layout.combo.combo["digit" + (cdg + 1)].gotoAndStop(myCNum + 2);
layout.combo.combo["digit" + (cdg + 1)]._visible = true;
cdg++;
}
cdg = cNumArray.length + 1;
while (cdg <= 3) {
layout.combo.combo["digit" + cdg]._visible = false;
cdg++;
}
if (combo_counter >= combo_timer) {
combos = 0;
layout.combo._visible = false;
combo_counter = 0;
} else {
combo_counter++;
}
}
updateBasicBars();
if (!reLocate) {
if (holding_counter < 10) {
holding_counter++;
}
if ((Key.isDown(command[9]) && (!underground)) && (slowMotion == 0)) {
if (holding_counter == 10) {
holding = !holding;
holding_counter = 0;
}
}
if (Key.isDown(command[1])) {
if ((field.character._currentframe != atkFrame) || (jumping)) {
if (field.character._currentframe == 1) {
field.character.gotoAndStop(2);
updateCharacterEquips();
}
if (dashing && (dashX == 0)) {
dashX = Math.round(dash);
dashing = false;
skillConsume(7);
} else if (combatDashing) {
moveCharacter(Number(combatDash));
combatDashing = false;
skillConsume(25);
}
if (slowMotion_speed == 0) {
moveCharacter(Math.ceil(Number(speed)));
goUnderGround("move", "hr");
sideRight = true;
if (!jumping) {
if (field.character.walk._currentframe == field.character.walk._totalframes) {
field.character.walk.gotoAndStop(6);
} else {
field.character.walk.nextFrame();
}
}
slowMotion_speed = field.character.mySlowMotion;
}
}
} else if (Key.isDown(command[2])) {
if ((field.character._currentframe != atkFrame) || (jumping)) {
if (field.character._currentframe == 1) {
field.character.gotoAndStop(2);
updateCharacterEquips();
}
if (dashing && (dashX == 0)) {
dashX = -Math.round(dash);
dashing = false;
skillConsume(7);
} else if (combatDashing) {
moveCharacter(-Number(combatDash));
combatDashing = false;
skillConsume(25);
}
if (slowMotion_speed == 0) {
moveCharacter(-Math.ceil(Number(speed)));
goUnderGround("move", "hl");
sideRight = false;
if (!jumping) {
if (field.character.walk._currentframe == field.character.walk._totalframes) {
field.character.walk.gotoAndStop(6);
} else {
field.character.walk.nextFrame();
}
}
slowMotion_speed = field.character.mySlowMotion;
}
}
} else if ((((!Key.isDown(command[0])) && (!Key.isDown(command[3]))) && (field.character._currentframe != atkFrame)) && (!jumping)) {
if ((field.character._currentframe == 2) && (field.character.walk._currentframe > 1)) {
if (field.character.walk._currentframe <= 6) {
field.character.walk.prevFrame();
} else {
field.character.walk.gotoAndStop(1);
}
} else {
field.character.gotoAndStop(1);
if (field.character.idle._currentframe == field.character.idle._totalframes) {
field.character.idle.gotoAndStop(1);
} else {
field.character.idle.nextFrame();
}
}
}
}
if (Key.isDown(command[4])) {
if (((((!jumpingPressed) && (!jumping)) && (!underground)) && (field.character._currentframe != atkFrame)) && (slowMotion_jump == 0)) {
ground = (jY = field.character._y);
jumping = true;
jump = Math.ceil(jumpPower);
jumpSpeed = Math.round(jump / 4);
targetJump = ground - maxJump;
slowMotion_jump = field.character.mySlowMotion;
jumpingPressed = true;
_root.playSound("jump");
}
} else {
jumpingPressed = false;
}
if (jumping) {
if ((field.character._currentframe == 1) || (field.character._currentframe == 2)) {
field.character.gotoAndStop(3);
updateCharacterEquips();
}
if (slowMotion_jump_counter >= slowMotion) {
field.character._y = field.character._y - (pc(jumpSpeed) * (slowMotion + 1));
jumpSpeed = jumpSpeed - (pc(2) * (slowMotion + 1));
if (field.character._y < targetJump) {
field.character._y = targetJump;
jumpSpeed = -1;
}
slowMotion_jump_counter = 0;
} else {
slowMotion_jump_counter++;
}
}
if (field.character._y >= ground) {
field.character._y = ground;
jumping = false;
if (field.character._currentframe == 3) {
field.character.gotoAndStop(1);
updateCharacterEquips();
}
}
if ((object == false) && (field.character._currentframe < 3)) {
objectWithinReach = findNextObject();
} else {
objectWithinReach = false;
}
if (Key.isDown(command[12]) && (!underground)) {
if (!objectsPressed) {
if ((!object) && (!objectButton)) {
theItem = findNextItem();
if (theItem != false) {
pickItem(theItem);
updateStats(theItem.myName, "item", 1);
} else if (field.character._currentframe < 3) {
object = objectWithinReach;
if (object != false) {
pickObject(object);
updateStats(object.objectName, "object", 1);
}
}
} else if ((object != false) && (!objectButton)) {
object.throwObject();
}
objectsPressed = true;
}
} else {
objectsPressed = false;
}
if ((Key.isDown(command[0]) && (!jumping)) && (field.character._currentframe != atkFrame)) {
if (field.character._currentframe == 1) {
field.character.gotoAndStop(2);
updateCharacterEquips();
}
goUnderGround("move", "vu");
var myVerticalLimit = maxHeight;
if (currentStage == 15) {
myVerticalLimit = myVerticalLimit + 50;
}
if (field.character._y > myVerticalLimit) {
if (slowMotion_speed_vertical == 0) {
field.character._y = field.character._y - pc(Math.ceil(hSpeed));
if (!jumping) {
if (field.character.walk._currentframe == field.character.walk._totalframes) {
field.character.walk.gotoAndStop(6);
} else {
field.character.walk.nextFrame();
}
}
slowMotion_speed_vertical = field.character.mySlowMotion;
}
}
} else if ((Key.isDown(command[3]) && (!jumping)) && (field.character._currentframe != atkFrame)) {
if (field.character._currentframe == 1) {
field.character.gotoAndStop(2);
updateCharacterEquips();
}
goUnderGround("move", "vd");
if (field.character._y < minHeight) {
if (slowMotion_speed_vertical == 0) {
field.character._y = field.character._y + pc(Math.ceil(hSpeed));
ground = field.character._y;
if (!jumping) {
if (field.character.walk._currentframe == field.character.walk._totalframes) {
field.character.walk.gotoAndStop(6);
} else {
field.character.walk.nextFrame();
}
}
slowMotion_speed_vertical = field.character.mySlowMotion;
}
}
}
if (underground) {
goUnderGround("dig");
}
if ((Key.isDown(command[17]) && (_root.quickUse[0] != -1)) && (!uBtn1)) {
_root.usePotion(_root.nextUseSlot(_root.quickUse[0]));
updateInventory();
uBtn1 = true;
} else if ((Key.isDown(command[18]) && (_root.quickUse[1] != -1)) && (!uBtn2)) {
_root.usePotion(_root.nextUseSlot(_root.quickUse[1]));
updateInventory();
uBtn2 = true;
} else if ((Key.isDown(command[19]) && (_root.quickUse[2] != -1)) && (!uBtn3)) {
_root.usePotion(_root.nextUseSlot(_root.quickUse[2]));
updateInventory();
uBtn3 = true;
}
if (!Key.isDown(command[17])) {
uBtn1 = false;
}
if (!Key.isDown(command[18])) {
uBtn2 = false;
}
if (!Key.isDown(command[19])) {
uBtn3 = false;
}
if (Key.isDown(command[5]) && (!sBtn1)) {
if ((object != false) && (object.throwAble)) {
object.throwOn(checkClosest(true));
} else {
if ((commandOf(6) == command[5]) && (holding == holdingOf(6))) {
isUnderground = true;
} else {
isUnderground = false;
}
if ((!underground) || (underground && (isUnderground))) {
if (holding) {
useSkill(skill[0]);
} else {
useSkill(skill[4]);
}
}
}
sBtn1 = true;
} else if (Key.isDown(command[6]) && (!sBtn2)) {
if ((object != false) && (object.sacrificePoints > 0)) {
object.sacrifice();
} else {
if ((commandOf(6) == command[6]) && (holding == holdingOf(6))) {
isUnderground = true;
} else {
isUnderground = false;
}
if ((!underground) || (underground && (isUnderground))) {
if (holding) {
useSkill(skill[1]);
} else {
useSkill(skill[5]);
}
}
}
sBtn2 = true;
} else if (Key.isDown(command[7]) && (!sBtn3)) {
if ((commandOf(6) == command[7]) && (holding == holdingOf(6))) {
isUnderground = true;
} else {
isUnderground = false;
}
if ((!underground) || (underground && (isUnderground))) {
if (holding) {
useSkill(skill[2]);
} else {
useSkill(skill[6]);
}
}
sBtn3 = true;
}
if (Key.isDown(command[8]) && (!sBtn4)) {
if ((commandOf(6) == command[8]) && (holding == holdingOf(6))) {
isUnderground = true;
} else {
isUnderground = false;
}
if ((!underground) || (underground && (isUnderground))) {
if (holding) {
useSkill(skill[3]);
} else {
useSkill(skill[7]);
}
}
sBtn4 = true;
}
if (!Key.isDown(command[5])) {
sBtn1 = false;
}
if (!Key.isDown(command[6])) {
sBtn2 = false;
}
if (!Key.isDown(command[7])) {
sBtn3 = false;
}
if (!Key.isDown(command[8])) {
sBtn4 = false;
}
if (!Key.isDown(commandOf(6))) {
if (underground) {
goUnderGround("surface");
underground = false;
}
}
if (!Key.isDown(commandOf(5))) {
panicReleased = true;
}
if (!Key.isDown(commandOf(7))) {
dashing = false;
dashReleased = true;
}
if (!Key.isDown(commandOf(25))) {
combatDashing = false;
dashReleased = true;
}
setCharSize();
back._x = (camera._x - 274.85) / 1.3;
if (!panic) {
fieldX = field._x;
fieldY = field._y;
backX = back._x;
backY = back._y;
middleX = middle._x;
middleY = middle._y;
}
if ((health > 0) && (!bloodshedActive)) {
if (damageCounter < damageTimer) {
damageCounter++;
if (((!underground) && ((damageCounter % 3) == 0)) && (missedAttack != true)) {
field.character._visible = !field.character._visible;
}
} else if (!underground) {
field.character._visible = true;
missedAttack = false;
}
}
}
if (!layout.options_bg._visible) {
if ((tutorialCounter >= tutorial.length) || (tutorial_outOfScreen == 0)) {
layout.tutorial_leftArrow._visible = (layout.tutorial_rightArrow._visible = false);
layout.tutorialTrack._visible = false;
}
if (tutorialCounter < tutorial.length) {
layout.tutorialTrack._visible = true;
layout.tutorialTrack.bar.bar._xscale = (tutorialCounter / tutorial.length) * 100;
if (tutorial_outOfScreen == 0) {
if (tutorial_arrowCounter >= tutorial_arrowTimer) {
tutorial_arrowCounter = 0;
if (pointOn.filters.length == pointOnFilters.length) {
var pointOn_blurSize = 10;
var pointOn_glow = (new flash.filters.GlowFilter(3368652));
pointOn_glow.blurX = pointOn_blurSize;
pointOn_glow.blurY = pointOn_blurSize;
pointOn_glow.strength = 2;
pointOn_glow.quality = _root.maxFilter;
pointOn.filters = pointOnFilters.concat([pointOn_glow]);
} else {
pointOn.filters = pointOnFilters;
}
} else {
tutorial_arrowCounter++;
}
} else {
var ar1 = layout.tutorial_leftArrow;
var ar2 = layout.tutorial_rightArrow;
if (tutorial_outOfScreen == 1) {
ar1 = layout.tutorial_rightArrow;
ar2 = layout.tutorial_leftArrow;
}
if (tutorial_arrowCounter >= tutorial_arrowTimer) {
tutorial_arrowCounter = 0;
ar1._visible = !ar1._visible;
} else {
tutorial_arrowCounter++;
}
ar2._visible = false;
}
}
}
var fxi = 0;
while (fxi < objects.length) {
myFX = objects[fxi];
myFX.filters = null;
setFilters(myFX);
if (myFX.follow != undefined) {
var fmc = myFX.follow;
myFX._x = fmc._x + 7;
myFX._y = fmc._y;
myFX._xscale = (myFX._yscale = Math.round((fmc._height + fmc._width) / 2));
myFX._visible = fmc._visible;
if (myFX.isLevelUp == true) {
myFX.filters = myFX.filters.concat([new flash.filters.GlowFilter(16777215, 1, 15, 15, 2, 3, false, false)]);
}
}
if (gamePause) {
if (myFX.mc == undefined) {
myFX.stop();
} else {
myFX.mc.stop();
}
} else if (myFX.mc == undefined) {
myFX.play();
} else {
myFX.mc.play();
}
fxi++;
}
bringToFront(layout.msg);
bringToFrontArray(optionsArray);
bringToFrontArray(uiOnTop, [layout.msg, layout.errorMc, layout.announcment, layout.pickObject, layout.healInjuries]);
bringToFront(layout.encyclopedia);
saveLayoutArray();
if (draggingWindow != undefined) {
limitWindow(draggingWindow);
}
};
var uiNames = ["inventory", "statsWin", "equip", "quests", "quests_pop", "skills", "store", "encyclopedia"];
var promptNames = ["confirm_purchase", "confirm_multipurchase", "confirm_sell", "confirm_multisell", "confirm_drop", "confirm_multidrop", "deathWin"];
var optionsNames = ["options_bg", "options_menu", "configure_sounds", "configure_graphics", "configure_keys", "fix_save", "savingNow", "exitWarning", "loadWarning", "premium_shop"];
var uiOnTopNames = ["skillSquare", "itemSquare", "errorMc", "announcment", "pickObject", "healInjuries", "chat", "msg", "mouseCursor"];
var uiArray = new Array();
var promptArray = new Array();
var optionsArray = new Array();
var uiOnTop = new Array();
var winArray;
updateWinArray();
toggleUIArray(uiOnTopNames);
layout.chat._visible = false;
layout.skillSquare._alpha = 50;
layout.itemSquare._alpha = 80;
var myGlowFilter = (new flash.filters.GlowFilter(0));
myGlowFilter.blurX = 5;
myGlowFilter.blurY = 5;
myGlowFilter.strength = 1;
myGlowFilter.quality = 3;
layout.chat.filters = [myGlowFilter];
myGlowFilter = new flash.filters.GlowFilter(0);
myGlowFilter.blurX = 5;
myGlowFilter.blurY = 5;
myGlowFilter.strength = 2;
myGlowFilter.quality = 1;
layout.msg.filters = [myGlowFilter];
layout.errorMc._x = -261.9;
layout.errorMc._y = 89.9;
layout.announcment._x = -18.4;
layout.announcment._y = -84.9;
var noteY_1 = -115.5;
var noteY_2 = -50;
layout.pickObject._x = -374.1;
layout.pickObject._y = noteY_1;
layout.healInjuries._x = -374.1;
layout.healInjuries._y = noteY_1;
layout.pickObject._visible = false;
layout.healInjuries._visible = false;
var fontset = new TextFormat();
fontset.font = "TNR";
layout.announcment._alpha = 0;
layout.announcment.txt.setNewTextFormat(fontset);
layout.announcment.txt.embedFonts = true;
layout.announcment.txt.text = announcments[0];
toggleUI("fix_save");
layout.fix_save._visible = false;
attachWinCommands();
if (winArrayString.length != 0) {
loadLayoutArray();
loadWinArray();
}
var savePics = new Array();
Symbol 270 MovieClip Frame 1
stop();
Symbol 1461 MovieClip Frame 1
stop();
Symbol 1488 MovieClip [NoColorButton] Frame 1
#initclip 101
Object.registerClass("NoColorButton", org.sepy.ColorPicker.AdvancedColorButton);
#endinitclip
stop();
Symbol 1494 MovieClip [CancelButton] Frame 1
#initclip 89
Object.registerClass("CancelButton", org.sepy.ColorPicker.OkButton);
#endinitclip
stop();
Symbol 1498 MovieClip [OkButton] Frame 1
#initclip 90
Object.registerClass("OkButton", org.sepy.ColorPicker.OkButton);
#endinitclip
stop();
Symbol 1500 MovieClip [IntInput] Frame 1
#initclip 91
Object.registerClass("IntInput", org.sepy.ColorPicker.IntInput);
#endinitclip
Symbol 1504 MovieClip [ColorSlider] Frame 1
#initclip 92
Object.registerClass("ColorSlider", org.sepy.ColorPicker.ColorSlider);
#endinitclip
stop();
Symbol 1510 MovieClip [ColorMap] Frame 1
#initclip 93
Object.registerClass("ColorMap", org.sepy.ColorPicker.ColorMap);
#endinitclip
stop();
Symbol 1513 MovieClip [color_display] Frame 1
#initclip 94
Object.registerClass("color_display", org.sepy.ColorPicker.ColorDisplay);
#endinitclip
Symbol 1514 MovieClip [advancedColorPanel] Frame 1
#initclip 95
Object.registerClass("advancedColorPanel", org.sepy.ColorPicker.AdvColorPanel);
#endinitclip
stop();
Symbol 1517 MovieClip [advancedColor] Frame 1
#initclip 96
Object.registerClass("advancedColor", org.sepy.ColorPicker.AdvancedColorButton);
#endinitclip
stop();
Symbol 1519 MovieClip [face] Frame 1
#initclip 97
Object.registerClass("face", org.sepy.ColorPicker.FaceColor);
#endinitclip
Symbol 1521 MovieClip [color_input] Frame 1
#initclip 98
Object.registerClass("color_input", org.sepy.ColorPicker.ColorInput);
#endinitclip
Symbol 1522 MovieClip [single] Frame 1
#initclip 99
Object.registerClass("single", org.sepy.ColorPicker.ColorBox);
#endinitclip
Symbol 1533 MovieClip [AdvColorPicker] Frame 1
#initclip 100
Object.registerClass("AdvColorPicker", org.sepy.ColorPicker.ColorPicker);
#endinitclip
stop();
Symbol 1546 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 1548 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 1551 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 1553 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 1556 MovieClip [Defaults] Frame 1
#initclip 61
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 1557 MovieClip [UIObjectExtensions] Frame 1
#initclip 62
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 1558 MovieClip [UIObject] Frame 1
#initclip 63
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 1561 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 1562 MovieClip Frame 1
#initclip 64
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 1563 MovieClip [FocusRect] Frame 1
#initclip 65
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 1564 MovieClip [FocusManager] Frame 1
#initclip 66
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 1565 MovieClip [UIComponentExtensions] Frame 1
#initclip 67
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 1566 MovieClip [UIComponent] Frame 1
#initclip 68
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 1567 MovieClip [SimpleButton] Frame 1
#initclip 69
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 1568 MovieClip [Border] Frame 1
#initclip 70
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 1569 MovieClip [RectBorder] Frame 1
#initclip 71
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 1570 MovieClip [ButtonSkin] Frame 1
#initclip 72
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 1571 MovieClip [Button] Frame 1
#initclip 73
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 1567 MovieClip [SimpleButton] in Symbol 1571 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1576 MovieClip [RadioThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1580 MovieClip [RadioThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1586 MovieClip [RadioButtonAssets] Frame 1
#initclip 74
mx.controls.RadioButton.prototype.adjustFocusRect = function () {
var _local4 = this._parent.focus_mc;
var _local2 = this.iconName;
var _local3 = this.getStyle("themeColor");
if (_local3 == undefined) {
_local3 = 8453965 /* 0x80FF4D */;
}
var _local5 = _local2._width + 4;
var _local6 = _local2._height + 4;
_local4.setSize(_local5, _local6, 8, 100, _local3);
var _local8 = _local2._x;
var _local7 = _local2._y;
_local4.move((this.x - 2) + _local8, (this.y + _local7) - 2);
};
#endinitclip
Symbol 1587 MovieClip [RadioButton] Frame 1
#initclip 75
Object.registerClass("RadioButton", mx.controls.RadioButton);
#endinitclip
stop();
Instance of Symbol 1571 MovieClip [Button] "foo" in Symbol 1587 MovieClip [RadioButton] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1615 MovieClip [DataProvider] Frame 1
#initclip 76
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 1616 MovieClip [DataSelector] Frame 1
#initclip 77
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 1617 MovieClip [SelectableRow] Frame 1
#initclip 78
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 1618 MovieClip [CustomBorder] Frame 1
#initclip 79
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 1630 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1632 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1643 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1645 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1652 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1673 MovieClip [BtnDownArrow] Frame 1
#initclip 80
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 1674 MovieClip [BtnUpArrow] Frame 1
#initclip 81
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 1676 MovieClip [HScrollBar] Frame 1
#initclip 82
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 1571 MovieClip [Button] in Symbol 1676 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1567 MovieClip [SimpleButton] in Symbol 1676 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1677 MovieClip [VScrollBar] Frame 1
#initclip 83
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 1571 MovieClip [Button] in Symbol 1677 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1567 MovieClip [SimpleButton] in Symbol 1677 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1678 MovieClip [View] Frame 1
#initclip 84
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 1679 MovieClip [ScrollView] Frame 1
#initclip 85
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 1676 MovieClip [HScrollBar] in Symbol 1679 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1677 MovieClip [VScrollBar] in Symbol 1679 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1680 MovieClip [ScrollSelectList] Frame 1
#initclip 86
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 1681 MovieClip [List] Frame 1
#initclip 87
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 1691 MovieClip [UIScrollBar] Frame 1
#initclip 88
Object.registerClass("UIScrollBar", mx.controls.UIScrollBar);
#endinitclip
stop();
Instance of Symbol 1677 MovieClip [VScrollBar] in Symbol 1691 MovieClip [UIScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1676 MovieClip [HScrollBar] in Symbol 1691 MovieClip [UIScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 3645 MovieClip [__Packages.org.sepy.ColorPicker.ColorPicker] Frame 0
class org.sepy.ColorPicker.ColorPicker extends MovieClip
{
var _color, _allowUserColor, _baseColors, _colors, addListener, keyListener, cpicker, _opened, _opening_color, panel, advancedColorPanel, createEmptyMovieClip, selectedColor, noColor, advancedColor, _direction, _columns, _useAdvColors, _useNoColor, broadcastMessage, attachMovie;
function ColorPicker () {
super();
AsBroadcaster.initialize(this);
_color = 0;
_allowUserColor = true;
_baseColors = [16711935, 65535, 16776960, 255, 65280, 16711680, 16777215, 13421772, 10066329, 6710886, 3355443, 0];
_colors = getStandardColors();
initComponent();
addListener(this);
}
function initComponent() {
keyListener = new Object();
keyListener.target = this;
keyListener.onKeyUp = function () {
if ((Key.getCode() == 27) && (this.target.getIsOpened())) {
this.target.setIsOpened(false);
this.target.color = this.target._opening_color;
}
};
Key.addListener(keyListener);
cpicker.onPress = function () {
this._parent.broadcastMessage("open");
};
cpicker.useHandCursor = false;
cpicker.nocolor_face._visible = false;
}
function setIsOpened(opened) {
if (opened && (!_opened)) {
_opening_color = _color;
attachPanel();
} else {
panel.removeMovieClip();
}
_opened = opened;
}
function getIsOpened() {
return(_opened || (advancedColorPanel._x != undefined));
}
function attachPanel() {
panel = createEmptyMovieClip("panel", 1);
panel.createEmptyMovieClip("background", 2);
panel.createEmptyMovieClip("colors", 3);
panel.colors._x = 3;
panel.colors._y = 26;
populateColorPanel();
var _local3 = (((panel.colors._width < MIN_WIDTH) ? (MIN_WIDTH) : (panel.colors._width)) + 6) + panel.colors._x;
var _local2 = (panel.colors._height + 6) + panel.colors._y;
panel.background.lineStyle(1, 16777215, 100);
panel.background.beginFill(13947080, 100);
panel.background.moveTo(0, 0);
panel.background.lineTo(_local3, 0);
panel.background.lineStyle(1, 8421504, 100);
panel.background.lineTo(_local3, _local2);
panel.background.lineTo(0, _local2);
panel.background.lineStyle(1, 16777215, 100);
panel.background.lineTo(0, 0);
panel.background.endFill();
panel.background.lineStyle(1, 0, 100);
panel.background.moveTo(_local3 + 1, 0);
panel.background.lineTo(_local3 + 1, _local2 + 1);
panel.background.lineTo(0, _local2 + 1);
panel.background.attachMovie("color_display", "color_display", 1);
panel.background.color_display.color = color;
panel.background.color_display._x = 3;
panel.background.color_display._y = 3;
panel.background.color_display.addListener(this);
panel.background.attachMovie("color_input", "color_input", 2);
panel.background.color_input.color = color;
panel.background.color_input._x = 48;
panel.background.color_input._y = 3;
panel.background.color_input.enabled = _allowUserColor;
panel.background.color_input.addListener(this);
panel.colors.attachMovie("face_borders", "face_borders", panel.colors.getNextHighestDepth());
var _local5 = new Color(panel.colors.face_borders);
_local5.setRGB(16777215);
panel.colors.face_borders._x = selectedColor._x;
panel.colors.face_borders._y = selectedColor._y;
switch (direction) {
case DOWN_LEFT :
panel._x = (cpicker._x - panel._width) + cpicker._width;
panel._y = (cpicker._y + cpicker._height) + 5;
break;
case UP_LEFT :
panel._x = (cpicker._x - panel._width) + cpicker._width;
panel._y = (cpicker._y - panel._height) - 5;
break;
case UP_RIGHT :
panel._x = cpicker._x;
panel._y = (cpicker._y - panel._height) - 5;
break;
default :
panel._x = cpicker._x;
panel._y = (cpicker._y + cpicker._height) + 5;
}
panel.onMouseDown = function () {
this.onMouseUp = function () {
if (this._parent.getIsOpened()) {
var _local2 = {x:this._xmouse, y:this._ymouse};
this.localToGlobal(_local2);
if (!this.hitTest(_local2.x, _local2.y)) {
this._parent.color = this._parent._opening_color;
this._parent.setIsOpened(false);
}
}
};
};
if (useNoColorSelector) {
noColor = panel.attachMovie("NoColorButton", "NoColorButton", 4);
noColor._x = (panel._width - noColor._width) - 7;
noColor._y = 3;
noColor.addListener(this);
}
if (useAdvancedColorSelector) {
advancedColor = panel.attachMovie("advancedColor", "advancedColor", 5);
advancedColor._x = (panel._width - advancedColor._width) - 7;
advancedColor._y = 3;
advancedColor.addListener(this);
if (useNoColorSelector) {
noColor._x = (advancedColor._x - noColor._width) - 4;
}
}
}
function populateColorPanel() {
var _local6 = _colors.slice();
var _local5;
var _local2;
var _local4 = 0;
var _local7 = 0;
var _local3 = 0;
while (_local6.length) {
_local5 = Number(_local6.shift());
_local2 = panel.colors.attachMovie("single", "single_" + panel.colors.getNextHighestDepth(), panel.colors.getNextHighestDepth());
_local2.addListener(this);
_local2.color = _local5;
if (_local5 == color) {
selectedColor = _local2;
}
if (((_local3 % columns) == 0) && (_local3 > 0)) {
_local7 = _local7 + _local2._height;
_local4 = 0;
}
_local2._x = _local4;
_local2._y = _local7;
_local4 = _local4 + _local2._width;
_local3++;
}
}
function getStandardColors() {
var _local6 = new Array();
var _local11 = 16777215 /* 0xFFFFFF */;
var _local8 = 13056;
var _local7 = 3277056 /* 0x320100 */;
var _local12 = 10027263 /* 0x9900FF */;
var _local10 = 51;
var _local9 = 10026753 /* 0x98FF01 */;
var _local3 = _local11;
var _local5 = _local11;
var _local4 = 0;
while (_local4 < 12) {
var _local2 = 0;
while (_local2 < 21) {
if (_local2 > 0) {
if (_local2 == 18) {
_local3 = 0;
} else if (_local2 == 19) {
_local3 = _baseColors[_local4];
} else if (_local2 == 20) {
_local3 = 0;
} else if (((_local2 % 6) == 0) && (_local2 > 0)) {
_local3 = _local3 - _local7;
} else {
_local3 = _local3 - _local8;
}
}
_local6.push(_local3);
_local2++;
}
if (_local4 == 5) {
_local5 = _local5 - _local9;
} else {
_local5 = _local5 - _local10;
}
_local3 = _local5;
_local4++;
}
_local6.reverse();
return(_local6);
}
function set color(newcolor) {
_color = newcolor;
updateColors(newcolor, true);
//return(color);
}
function get color() {
return(_color);
}
function set direction(value) {
_direction = value;
//return(direction);
}
function get direction() {
return(_direction);
}
function set columns(value) {
_columns = value;
//return(columns);
}
function get columns() {
return(_columns);
}
function set enabled(value) {
cpicker.enabled = value;
//return(enabled);
}
function get enabled() {
return(cpicker.enabled);
}
function set allowUserColor(value) {
_allowUserColor = value;
//return(allowUserColor);
}
function get allowUserColor() {
return(_allowUserColor);
}
function set colors(value) {
_colors = value;
//return(colors);
}
function get colors() {
return(_colors);
}
function get useAdvancedColorSelector() {
return(_useAdvColors);
}
function set useAdvancedColorSelector(value) {
_useAdvColors = value;
//return(useAdvancedColorSelector);
}
function get useNoColorSelector() {
return(_useNoColor);
}
function set useNoColorSelector(value) {
_useNoColor = value;
//return(useNoColorSelector);
}
function setAdvancedColorsMatrix(a_fillType, a_colors, a_alphas, a_ratios) {
m_fillType = a_fillType;
m_colors = a_colors;
m_alphas = a_alphas;
m_ratios = a_ratios;
}
function getRGB() {
return(ColorToString(color));
}
static function ColorToString(value) {
var _local1 = Math.abs(value).toString(16);
while (_local1.length < 6) {
_local1 = "0" + _local1;
}
return(_local1.toUpperCase());
}
static function StringToColor(value) {
return(parseInt(value, 16));
}
static function ColorToRGB(c) {
var _local1 = new Object();
_local1.red = (c >> 16) & 255;
_local1.green = (c >> 8) & 255;
_local1.blue = c & 255;
return(_local1);
}
function updateColors(value, updateInput) {
if (value == null) {
cpicker.nocolor_face._visible = true;
} else {
cpicker.nocolor_face._visible = false;
}
var _local3 = new Color(cpicker.face);
_local3.setRGB(_color);
panel.background.color_display.color = value;
if (updateInput) {
panel.background.color_input.color = value;
}
}
function over(mc) {
color = (mc.color);
panel.colors.face_borders._x = mc._x;
panel.colors.face_borders._y = mc._y;
}
function click(mc) {
if (mc == advancedColor) {
createAdvancedColorPanel(color);
color = (_opening_color);
setIsOpened(false);
} else if (mc == noColor) {
color = (null);
setIsOpened(false);
} else {
color = (mc.color);
setIsOpened(false);
broadcastMessage("change", this);
}
}
function createAdvancedColorPanel(sColor) {
advancedColorPanel = attachMovie("advancedColorPanel", "advancedColorPanel", ADV_PANEL_DEPTH, {_x:panel._x, _y:panel._y, color:sColor});
advancedColorPanel.addListener(this);
}
function unload(mc) {
advancedColorPanel.unloadMovie();
advancedColorPanel.removeMovieClip();
}
function changed(value) {
if (value.charAt(0) == "#") {
value = value.substr(1);
}
_color = StringToColor(value);
updateColors(_color, false);
}
function open() {
setIsOpened(!getIsOpened());
}
static var ADV_PANEL_DEPTH = 5;
static var version = "2.2";
var m_fillType = "linear";
var m_colors = [16711680, 16776960, 65280, 65535, 255, 16711935, 16711680];
var m_alphas = [100, 100, 100, 100, 100, 100, 100];
var m_ratios = [0, 42, 64, 127, 184, 215, 255];
var m_matrix = {matrixType:"box", x:0, y:0, w:175, h:187, r:0};
static var DOWN_LEFT = "DL";
static var DOWN_RIGHT = "DR";
static var UP_LEFT = "UL";
static var UP_RIGHT = "UR";
static var MIN_WIDTH = 130;
}
Symbol 3646 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 3647 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function getAchievements(properties) {
mochi.as2.MochiServices.send("events_getAchievements", properties);
}
static function unlockAchievement(properties) {
mochi.as2.MochiServices.send("events_unlockAchievement", properties);
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function showAwards(options) {
mochi.as2.MochiServices.send("events_showAwards", options, null, null);
}
static function setNotifications(style) {
mochi.as2.MochiServices.send("events_setNotifications", style, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startPlay(tag) {
if (tag == undefined) {
tag = "gameplay";
}
mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null);
}
static function endPlay() {
mochi.as2.MochiServices.send("events_clearRoundID", null, null, null);
}
static function trackEvent(tag, value) {
mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null);
}
static var ACHIEVEMENTS_OWNED = "AchievementOwned";
static var ACHIEVEMENT_NEW = "AchievementReceived";
static var GAME_ACHIEVEMENTS = "GameAchievements";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var IO_PENDING = "IOPending";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var FORMAT_NONE = "NoForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 3648 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.9.4 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
onError("NotConnected");
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError("IOError");
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError(errorCode);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "services" :
mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args);
break;
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "social" :
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError("IOError");
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError("NotConnected");
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError("NotConnected");
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://link.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static var CONNECTED = "onConnected";
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 3649 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function requestFunding(properties) {
mochi.as2.MochiServices.send("social_requestFunding", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 3650 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial
{
function MochiSocial () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("social_hideLoginWidget");
}
static function requestLogin(properties) {
mochi.as2.MochiServices.send("social_requestLogin", properties);
}
static function getFriendsList(properties) {
mochi.as2.MochiServices.send("social_getFriendsList", properties);
}
static function showProfile(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showProfile", options);
}
static function postToStream(properties) {
mochi.as2.MochiServices.send("social_postToStream", properties);
}
static function inviteFriends(properties) {
mochi.as2.MochiServices.send("social_inviteFriends", properties);
}
static function requestFan(properties) {
mochi.as2.MochiServices.send("social_requestFan", properties);
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("social_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var LOGIN_SHOWN = "LoginShown";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var FRIEND_LIST = "FriendsList";
static var PROFILE_DATA = "ProfileData";
static var GAMEPLAY_DATA = "GameplayData";
static var ACTION_CANCELED = "onCancel";
static var ACTION_COMPLETE = "onComplete";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 3651 MovieClip [__Packages.org.sepy.ColorPicker.OkButton] Frame 0
class org.sepy.ColorPicker.OkButton extends MovieClip
{
var useHandCursor, gotoAndStop, broadcastMessage;
function OkButton () {
super();
useHandCursor = false;
AsBroadcaster.initialize(this);
}
function onRollOver() {
gotoAndStop(1);
}
function onRollOut() {
gotoAndStop(1);
}
function onReleaseOutside() {
gotoAndStop(1);
}
function onPress() {
gotoAndStop(2);
}
function onRelease() {
gotoAndStop(1);
broadcastMessage("click", this);
}
}
Symbol 3652 MovieClip [__Packages.org.sepy.ColorPicker.IntInput] Frame 0
class org.sepy.ColorPicker.IntInput extends MovieClip
{
var tlabel, createTextField, input, _value, broadcastMessage, _label, _max;
function IntInput () {
super();
AsBroadcaster.initialize(this);
var _local3 = new TextFormat();
_local3.font = "_sans";
_local3.size = 10;
tlabel = createTextField("tlabel", 1, 2, 1, 31, 16);
tlabel.setNewTextFormat(_local3);
tlabel.text = label;
input = createTextField("input", 2, 22, 1, 31, 16);
input.type = "input";
input.maxChars = 3;
input.restrict = "[0-9]";
input.setNewTextFormat(_local3);
input.addListener(this);
}
function set value(value) {
_value = value;
input.text = _value.toString(10);
//return(this.value);
}
function get value() {
return(_value);
}
function onChanged() {
var _local2 = Number(input.text);
if (isNaN(_local2)) {
input.text = "0";
}
if ((_local2 > max) && (max != undefined)) {
input.text = max.toString();
}
_value = Number(input.text);
broadcastMessage("changed", this, Number(input.text));
}
function set enabled(value) {
input.selectable = value;
//return(enabled);
}
function get enabled() {
return(input.selectable);
}
function set label(value) {
_label = value;
tlabel.text = value;
//return(label);
}
function get label() {
return(_label);
}
function set max(v) {
_max = v;
//return(max);
}
function get max() {
return(_max);
}
}
Symbol 3653 MovieClip [__Packages.org.sepy.ColorPicker.ColorSlider] Frame 0
class org.sepy.ColorPicker.ColorSlider extends MovieClip
{
var mc, createEmptyMovieClip, slider, attachMovie, bmp, broadcastMessage, _color;
function ColorSlider () {
super();
AsBroadcaster.initialize(this);
mc = createEmptyMovieClip("mc", 1);
mc._x = 1;
mc._y = 1;
mc.useHandCursor = false;
mc.onPress = function () {
this._parent.changing(this);
this.onMouseMove = function () {
if ((this._ymouse >= 0) && (this._ymouse <= this._height)) {
this._parent.changing(this);
}
updateAfterEvent();
};
};
mc.onRelease = function () {
delete this.onMouseMove;
};
mc.onRollOut = mc.onRelease;
mc.onReleaseOutside = mc.onRelease;
slider = attachMovie("slider_mc", "slider", 2, {_x:15, _y:98});
}
function changing(mc) {
slider._y = mc._ymouse;
var _local2 = bmp.getPixel(5, slider._y);
broadcastMessage("changing", _local2);
}
function getCurrentColor() {
return(bmp.getPixel(5, slider._y));
}
function set color(c) {
_color = c;
draw();
//return(color);
}
function get color() {
return(_color);
}
function draw() {
mc.clear();
var _local4 = [0, color, 16777215];
var _local2 = [100, 100, 100];
var _local5 = [0, 127, 255];
var _local3 = {matrixType:"box", x:0, y:0, w:187, h:187, r:4.71238898038469};
mc.clear();
mc.beginGradientFill("linear", _local4, _local2, _local5, _local3, "reflect", "linear");
mc.moveTo(0, 0);
mc.lineTo(12, 0);
mc.lineTo(12, 187);
mc.lineTo(0, 187);
mc.lineTo(0, 0);
mc.endFill();
bmp.dispose();
bmp = new flash.display.BitmapData(mc._width, mc._height, false);
bmp.draw(mc);
}
}
Symbol 3654 MovieClip [__Packages.org.sepy.ColorPicker.ColorMap] Frame 0
class org.sepy.ColorPicker.ColorMap extends MovieClip
{
var addListener, mc, createEmptyMovieClip, cross_mc, attachMovie, cross_mask, _parent, bmp, _xmouse, _ymouse, broadcastMessage, _color;
function ColorMap () {
super();
AsBroadcaster.initialize(this);
addListener(this);
mc = createEmptyMovieClip("mc", 1);
mc._x = 1;
mc._y = 1;
cross_mc = attachMovie("cross_mc", "cross_mc", 2);
cross_mask = attachMovie("cross_mask", "cross_mask", 3);
cross_mc.setMask(cross_mask);
init();
}
function init() {
mc.beginGradientFill(_parent._parent.m_fillType, _parent._parent.m_colors, _parent._parent.m_alphas, _parent._parent.m_ratios, _parent._parent.m_matrix);
mc.moveTo(0, 0);
mc.lineTo(175, 0);
mc.lineTo(175, 187);
mc.lineTo(0, 187);
mc.lineTo(0, 0);
mc.endFill();
mc.createEmptyMovieClip("upper", 1);
var _local7 = "linear";
var _local2 = [16777215, 0, 0];
var _local3 = [0, 0, 100];
var _local4 = [0, 127, 255];
var _local5 = {matrixType:"box", x:0, y:0, w:175, h:187, r:(Math.PI/2)};
mc.beginGradientFill(_local7, _local2, _local3, _local4, _local5);
mc.moveTo(0, 0);
mc.lineTo(175, 0);
mc.lineTo(175, 187);
mc.lineTo(0, 187);
mc.lineTo(0, 0);
mc.endFill();
mc.onPress = function () {
this.onMouseMove = function () {
var _local3 = new flash.geom.Point(this._xmouse, this._ymouse);
var _local2 = new flash.geom.Rectangle(this._x, this._y, this._width, this._height);
if (_local2.containsPoint(_local3)) {
this._parent.changing(this);
}
updateAfterEvent();
};
this._parent.changing(this);
};
mc.onRelease = function () {
delete this.onMouseMove;
};
mc.onReleaseOutside = mc.onRelease;
mc.onRollOut = mc.onRollOut;
draw();
}
function changing(mc) {
var _local2 = bmp.getPixel((_xmouse - mc._x) - 1, _ymouse - mc._y);
cross_mc._x = _xmouse;
cross_mc._y = _ymouse;
broadcastMessage("change", this, _local2);
}
function draw() {
bmp.dispose();
bmp = new flash.display.BitmapData(mc._width, mc._height);
bmp.draw(mc);
}
function change(mc, cl) {
_color = cl;
}
function set color(c) {
_color = c;
//return(color);
}
function get color() {
return(_color);
}
function findTheColor(cl) {
var _local2 = bmp.getColorBoundsRect(4294967295, 4278190080 + cl, true);
cross_mc._x = (_local2.x + (_local2.width / 2)) + 2;
cross_mc._y = (_local2.y + (_local2.height / 2)) + 2;
return(!((((_local2.x == 0) && (_local2.y == 0)) && (_local2.width == bmp.width)) && (_local2.width == bmp.height)));
}
}
Symbol 3655 MovieClip [__Packages.org.sepy.ColorPicker.ColorDisplay] Frame 0
class org.sepy.ColorPicker.ColorDisplay extends MovieClip
{
var useHandCursor, face, attachMovie, onRelease;
function ColorDisplay () {
super();
AsBroadcaster.initialize(this);
useHandCursor = false;
face = attachMovie("face", "face", 1);
face._x = 1;
face._y = 1;
face._width = 39;
face._height = 17;
onRelease = function () {
this.broadcastMessage("click", this);
};
}
function set color(value) {
face.color = value;
//return(color);
}
function get color() {
return(face.color);
}
function getRGB() {
return("0x" + face.color.toString(16));
}
}
Symbol 3656 MovieClip [__Packages.org.sepy.ColorPicker.AdvColorPanel] Frame 0
class org.sepy.ColorPicker.AdvColorPanel extends MovieClip
{
var addListener, _hlsrgb, color_map, attachMovie, color_slider, color_display, _hue_mc, _saturation_mc, _luminosity_mc, _red_mc, _green_mc, _blue_mc, ok_btn, close_btn, onMouseUp, broadcastMessage, _color, _hue, __get__hue, _saturation, __get__saturation, _luminosity, __get__luminosity, _red, __get__red, _green, __get__green, _blue, __get__blue;
function AdvColorPanel () {
super();
AsBroadcaster.initialize(this);
addListener(this);
_hlsrgb = new org.sepy.ColorPicker.HLSRGB();
color_map = attachMovie("ColorMap", "color_map", 3, {_x:10, _y:8});
color_slider = attachMovie("ColorSlider", "color_slider", 4, {_x:(color_map._x + color_map._width) + 10, _y:color_map._y});
color_display = attachMovie("color_display", "color_display", 5, {_x:color_map._x, _y:color_map._y + color_map._height});
_hue_mc = attachMovie("IntInput", "_hue_mc", 6, {_x:125, _y:color_map._y + color_map._height, label:"H", variable:"hue"});
_saturation_mc = attachMovie("IntInput", "_saturation_mc", 7, {_x:_hue_mc._x, _y:(_hue_mc._y + _hue_mc._height) + 2, label:"S", variable:"saturation"});
_luminosity_mc = attachMovie("IntInput", "_luminosity_mc", 8, {_x:_hue_mc._x, _y:(_saturation_mc._y + _saturation_mc._height) + 2, label:"L", variable:"luminance"});
_red_mc = attachMovie("IntInput", "_red_mc", 9, {_x:175, _y:_hue_mc._y, label:"R", variable:"red"});
_green_mc = attachMovie("IntInput", "_saturation_mc", 10, {_x:_red_mc._x, _y:_saturation_mc._y, label:"G", variable:"green"});
_blue_mc = attachMovie("IntInput", "_luminosity_mc", 11, {_x:_red_mc._x, _y:_luminosity_mc._y, label:"B", variable:"blue"});
ok_btn = attachMovie("OkButton", "ok_btn", 12, {_x:color_map._x, _y:_blue_mc._y});
close_btn = attachMovie("CancelButton", "close_btn", 13, {_x:ok_btn._x + ok_btn._width, _y:_blue_mc._y});
init();
}
function init() {
onMouseUp = function () {
var _local2 = new flash.geom.Rectangle(this._x, this._y, this._width, this._height);
var _local3 = new flash.geom.Point(this._xmouse, this._ymouse);
if (!_local2.containsPoint(_local3)) {
this.close();
}
};
_hue_mc.max = 360;
_saturation_mc.max = 240;
_luminosity_mc.max = 240;
_red_mc.max = 255;
_green_mc.max = 255;
_blue_mc.max = 255;
_hue_mc.addListener(this);
_saturation_mc.addListener(this);
_luminosity_mc.addListener(this);
_red_mc.addListener(this);
_green_mc.addListener(this);
_blue_mc.addListener(this);
color_slider.color = color;
color_slider.addListener(this);
color_map.addListener(this);
color_display.addListener(this);
close_btn.addListener(this);
ok_btn.addListener(this);
if (color_map.findTheColor(color)) {
}
broadcastMessage("change", this, color);
updateHLS(color_slider.getCurrentColor(), true);
}
function changed(mc, value) {
_hlsrgb.__set__color(new org.sepy.ColorPicker.RGB(_red_mc.value, _green_mc.value, _blue_mc.value));
var _local2 = _hlsrgb.getRGB();
color_map.findTheColor(_local2);
broadcastMessage("change", this, _local2);
}
function change(mc, cl) {
if (mc == color_map) {
color = (cl);
color_slider.color = color;
color_display.color = color_slider.getCurrentColor();
updateHLS(color_slider.getCurrentColor(), true);
} else if (mc == this) {
color = (cl);
color_slider.color = color;
color_display.color = color_slider.getCurrentColor();
updateHLS(color_slider.getCurrentColor(), false);
}
}
function changing(cl) {
color_display.color = cl;
color = (cl);
updateHLS(color_slider.getCurrentColor(), true);
}
function updateHLS(cl, updateObject) {
if (updateObject) {
var _local2 = org.sepy.ColorPicker.ColorPicker.ColorToRGB(cl);
_hlsrgb.__set__hue(_hlsrgb.__set__saturation(_hlsrgb.__set__luminance(0)));
_hlsrgb.__set__red(_local2.red);
_hlsrgb.__set__green(_local2.green);
_hlsrgb.__set__blue(_local2.blue);
}
red = (Math.round(_hlsrgb.__get__red()));
green = (Math.round(_hlsrgb.__get__green()));
blue = (Math.round(_hlsrgb.__get__blue()));
hue = (_hlsrgb.hue);
saturation = (_hlsrgb.saturation);
luminosity = (_hlsrgb.luminance);
}
function click(mc) {
if (mc == ok_btn) {
broadcastMessage("click", this);
close();
} else if (mc == close_btn) {
close();
}
}
function close() {
broadcastMessage("unload", this);
}
function set color(v) {
_color = v;
//return(color);
}
function get color() {
return(_color);
}
function set hue(v) {
v = Math.round(v);
_hue = v;
_hue_mc.value = v;
//return(__get__hue());
}
function set saturation(v) {
v = Math.round(v * 240);
_saturation = v;
_saturation_mc.value = v;
//return(__get__saturation());
}
function set luminosity(v) {
v = Math.round(v * 240);
_luminosity = v;
_luminosity_mc.value = v;
//return(__get__luminosity());
}
function set red(v) {
_red = v;
_red_mc.value = v;
//return(__get__red());
}
function set green(v) {
_green = v;
_green_mc.value = v;
//return(__get__green());
}
function set blue(v) {
_blue = v;
_blue_mc.value = v;
//return(__get__blue());
}
}
Symbol 3657 MovieClip [__Packages.org.sepy.ColorPicker.HLSRGB] Frame 0
class org.sepy.ColorPicker.HLSRGB
{
function HLSRGB () {
}
function get red() {
return(_red);
}
function set red(n) {
_red = n;
ToHLS();
//return(red);
}
function get green() {
return(_green);
}
function set green(n) {
_green = n;
ToHLS();
//return(green);
}
function get blue() {
return(_blue);
}
function set blue(n) {
_blue = n;
ToHLS();
//return(blue);
}
function get luminance() {
return(_luminance);
}
function set luminance(n) {
if ((n < 0) || (n > 1)) {
trace(n + " exceeds luminance bounds. Luminance must be between 0.0 and 1.0");
} else {
_luminance = n;
ToRGB();
}
//return(luminance);
}
function get hue() {
return(_hue);
}
function set hue(n) {
if ((n < 0) || (n > 360)) {
trace(n + " exceeds hue bounds. Hue must be between 0.0 and 360.0");
} else {
_hue = n;
ToRGB();
}
//return(hue);
}
function get saturation() {
return(_saturation);
}
function set saturation(n) {
if ((n < 0) || (n > 1)) {
trace(n + "exceeds saturation bounds. Saturation must be between 0.0 and 1.0");
} else {
_saturation = n;
ToRGB();
}
//return(saturation);
}
function get color() {
var _local2 = new org.sepy.ColorPicker.RGB(_red, _green, _blue);
return(_local2);
}
function getRGB() {
return(((_red << 16) | (_green << 8)) | _blue);
}
function set color(o) {
_red = o.r;
_green = o.g;
_blue = o.b;
ToHLS();
//return(color);
}
function lightenBy(n) {
_luminance = _luminance * (1 + n);
if (_luminance > 1) {
_luminance = 1;
}
ToRGB();
}
function darkenBy(n) {
_luminance = _luminance * n;
ToRGB();
}
function ToHLS() {
var _local5 = Math.min(_red, Math.min(_green, _blue));
var _local2 = Math.max(_red, Math.max(_green, _blue));
var _local3 = _local2 - _local5;
var _local4 = _local2 + _local5;
_luminance = _local4 / 510;
if (_local2 == _local5) {
_saturation = 0;
_hue = 0;
} else {
var _local7 = (_local2 - _red) / _local3;
var _local8 = (_local2 - _green) / _local3;
var _local6 = (_local2 - _blue) / _local3;
_saturation = ((_luminance <= 0.5) ? (_local3 / _local4) : (_local3 / (510 - _local4)));
if (_red == _local2) {
_hue = 60 * ((6 + _local6) - _local8);
} else if (_green == _local2) {
_hue = 60 * ((2 + _local7) - _local6);
} else if (_blue == _local2) {
_hue = 60 * ((4 + _local8) - _local7);
}
_hue = _hue % 360;
}
}
function ToRGB() {
if (_saturation == 0) {
_red = (_green = (_blue = _luminance * 255));
} else {
var _local3;
var _local2;
if (_luminance <= 0.5) {
_local2 = _luminance + (_luminance * _saturation);
} else {
_local2 = (_luminance + _saturation) - (_luminance * _saturation);
}
_local3 = (2 * _luminance) - _local2;
_red = ToRGB1(_local3, _local2, _hue + 120);
_green = ToRGB1(_local3, _local2, _hue);
_blue = ToRGB1(_local3, _local2, _hue - 120);
}
}
function ToRGB1(rm1, rm2, rh) {
if (rh > 360) {
rh = rh - 360;
} else if (rh < 0) {
rh = rh + 360;
}
if (rh < 60) {
rm1 = rm1 + (((rm2 - rm1) * rh) / 60);
} else if (rh < 180) {
rm1 = rm2;
} else if (rh < 240) {
rm1 = rm1 + (((rm2 - rm1) * (240 - rh)) / 60);
}
return(rm1 * 255);
}
function toString() {
return(((((((((((("[R:" + red) + ", G:") + green) + ", B:") + blue) + ", H:") + hue) + ", S:") + saturation) + ", L:") + luminance) + "]");
}
var _red = 0;
var _green = 0;
var _blue = 0;
var _hue = 0;
var _luminance = 0;
var _saturation = 0;
}
Symbol 3658 MovieClip [__Packages.org.sepy.ColorPicker.RGB] Frame 0
class org.sepy.ColorPicker.RGB
{
var _r, _g, _b;
function RGB (red, green, blue) {
_r = red;
_g = green;
_b = blue;
}
function set r(newr) {
_r = newr;
//return(r);
}
function get r() {
return(_r);
}
function set g(newg) {
_g = newg;
//return(g);
}
function get g() {
return(_g);
}
function set b(newb) {
_b = newb;
//return(b);
}
function get b() {
return(_b);
}
function getRGB() {
return(((r << 16) | (g << 8)) | b);
}
function toString() {
return(((((("[R:" + r) + ", G:") + g) + ", B:") + b) + "]");
}
}
Symbol 3659 MovieClip [__Packages.org.sepy.ColorPicker.AdvancedColorButton] Frame 0
class org.sepy.ColorPicker.AdvancedColorButton extends MovieClip
{
var useHandCursor, gotoAndStop, broadcastMessage;
function AdvancedColorButton () {
super();
useHandCursor = false;
AsBroadcaster.initialize(this);
}
function onRollOver() {
gotoAndStop(2);
}
function onRollOut() {
gotoAndStop(1);
}
function onReleaseOutside() {
gotoAndStop(1);
}
function onRelease() {
broadcastMessage("click", this);
}
}
Symbol 3660 MovieClip [__Packages.org.sepy.ColorPicker.FaceColor] Frame 0
class org.sepy.ColorPicker.FaceColor extends MovieClip
{
var _color;
function FaceColor () {
super();
}
function set color(value) {
var _local2 = new Color(this);
_color = value;
_local2.setRGB(value);
//return(color);
}
function get color() {
return(_color);
}
function getRGB() {
return("0x" + _color.toString(16));
}
}
Symbol 3661 MovieClip [__Packages.org.sepy.ColorPicker.ColorInput] Frame 0
class org.sepy.ColorPicker.ColorInput extends MovieClip
{
var input, createTextField, _color, broadcastMessage;
function ColorInput () {
super();
AsBroadcaster.initialize(this);
var _local3 = new TextFormat();
_local3.font = "_sans";
_local3.size = 10;
input = createTextField("input", 1, 2, 1, 57, 16);
input.type = "input";
input.maxChars = 7;
input.setNewTextFormat(_local3);
input.addListener(this);
}
function set color(value) {
_color = value;
input.text = "#" + org.sepy.ColorPicker.ColorPicker.ColorToString(value);
//return(color);
}
function get color() {
return(_color);
}
function onChanged() {
broadcastMessage("changed", input.text);
}
function set enabled(value) {
input.selectable = value;
//return(enabled);
}
function get enabled() {
return(input.selectable);
}
}
Symbol 3662 MovieClip [__Packages.org.sepy.ColorPicker.ColorBox] Frame 0
class org.sepy.ColorPicker.ColorBox extends MovieClip
{
var useHandCursor, face, attachMovie, face_border, onRollOver, onRelease;
function ColorBox () {
super();
AsBroadcaster.initialize(this);
useHandCursor = false;
face = attachMovie("face", "face", 1);
face_border = attachMovie("face_borders", "face_border", 2);
onRollOver = function () {
this.broadcastMessage("over", this);
};
onRelease = function () {
this.broadcastMessage("click", this);
};
}
function set color(value) {
face.color = value;
//return(color);
}
function get color() {
return(face.color);
}
function getRGB() {
return("0x" + face.color.toString(16));
}
}
Symbol 3663 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local27);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local24 = 11000;
var _local19 = options.ad_timeout;
if (options.skip) {
_local19 = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local15 = _getRes(options);
var _local5 = _local15[0];
var _local14 = _local15[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local7._visible = false;
delete options.no_progress_bar;
} else {
_local7._x = 10;
_local7._y = _local14 - 20;
}
var _local23 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local25 = options.outline;
delete options.outline;
var _local6 = _local7.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local7.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local23);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local8 = _local7.createEmptyMovieClip("_outline", 3);
_local8.lineStyle(0, _local25, 100);
_local8.moveTo(0, 0);
_local8.lineTo(_local5 - 20, 0);
_local8.lineTo(_local5 - 20, 10);
_local8.lineTo(0, 10);
_local8.lineTo(0, 0);
chk.ad_msec = _local24;
chk.ad_timeout = _local19;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local10 = this._parent._parent;
var _local3 = _local10;
while ((!_local3.getBytesTotal()) && (_local3)) {
_local3 = _local3._parent;
}
if (!_local3) {
_local3 = _root;
}
var _local13 = this._parent._mochiad_ctr;
var _local7 = getTimer() - this.started;
var _local5 = false;
var _local6 = _local3.getBytesTotal();
var _local9 = _local3.getBytesLoaded();
var _local4 = (100 * _local9) / _local6;
var _local12 = (100 * _local7) / chk.ad_msec;
var _local11 = this._mochiad_bar._inside;
var _local15 = Math.min(100, Math.min(_local4 || 0, _local12));
_local15 = Math.max(this.last_pcnt, _local15);
this.last_pcnt = _local15;
_local11._xscale = _local15;
options.ad_progress(_local15);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local4}, clip._mochiad._containerLCName);
if (_local4 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local8 = _local13.getBytesTotal();
if ((_local8 > 0) || (typeof(_local8) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local7 > chk.ad_timeout) && (_local4 == 100)) {
options.ad_failed();
_local5 = true;
}
}
if (_local7 > chk.ad_msec) {
_local5 = true;
}
if (((_local6 > 0) && (_local9 >= _local6)) && (_local5)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local10 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local10);
var clip = options.clip;
var _local9 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local3 = clip._mochiad;
_local3.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local11 = _local5[0];
var _local8 = _local5[1];
_local3._x = _local11 * 0.5;
_local3._y = _local8 * 0.5;
var chk = _local3.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local9;
chk.started = getTimer();
chk.showing = false;
_local3.lc.adLoaded = options.ad_loaded;
_local3.lc.adSkipped = options.ad_skipped;
_local3.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
_local3.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local21 = false;
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local12 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local12);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local6 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local6._mochiad_loaded) {
return(null);
}
var _local11 = options.depth;
delete options.depth;
var mc = _local6.createEmptyMovieClip("_mochiad", _local11);
var _local10 = _getRes(options);
options.res = (_local10[0] + "x") + _local10[1];
options.server = options.server + options.id;
delete options.id;
_local6._mochiad_loaded = true;
if (_local6._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local9 = _local4.server;
delete _local4.server;
var _local13 = _allowDomains(_local9);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = mc;
_local5.name = _local8;
_local5.hostname = _local13;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
mc.lc = _local5;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
_local4.lc = _local8;
_local4.st = getTimer();
if (!options.skip) {
_local4.loadMovie(_local9 + ".swf", "POST");
}
return(mc);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 1538 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.127";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 1539 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 1540 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.127";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 1541 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.127";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 1542 MovieClip [__Packages.mx.controls.RadioButton] Frame 0
class mx.controls.RadioButton extends mx.controls.Button
{
var setToggle, __value, selected, releaseFocus, phase, dispatchEvent, _parent, __data, setState, __state, getFocusManager;
function RadioButton () {
super();
}
function init(Void) {
setToggle(__toggle);
__value = this;
super.init();
}
function size(Void) {
super.size();
}
function onRelease() {
if (selected) {
return(undefined);
}
releaseFocus();
phase = "up";
setSelected(true);
dispatchEvent({type:"click"});
_parent[__groupName].dispatchEvent({type:"click"});
}
function setData(val) {
__data = val;
}
function set data(val) {
__data = val;
//return(data);
}
function getData(val) {
return(__data);
}
function get data() {
return(__data);
}
function onUnload() {
if (_parent[__groupName].selectedRadio == this) {
_parent[__groupName].selectedRadio = undefined;
}
_parent[__groupName].radioList[indexNumber] = null;
delete _parent[__groupName].radioList[indexNumber];
}
function setSelected(val) {
var _local2 = _parent[__groupName];
var _local4 = _local2.selectedRadio.__width;
var _local5 = _local2.selectedRadio.__height;
if (val) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
} else if (_local2.selectedRadio == this) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = undefined;
}
setState(val);
}
function deleteGroupObj(groupName) {
delete _parent[groupName];
}
function getGroupName() {
return(__groupName);
}
function get groupName() {
return(__groupName);
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
delete _parent[__groupName].radioList[__data];
addToGroup(groupName);
__groupName = groupName;
}
function set groupName(groupName) {
setGroupName(groupName);
//return(this.groupName);
}
function addToGroup(groupName) {
if ((groupName == "") || (groupName == undefined)) {
return(undefined);
}
var _local2 = _parent[groupName];
if (_local2 == undefined) {
_local2 = (_parent[groupName] = new mx.controls.RadioButtonGroup());
_local2.__groupName = groupName;
}
_local2.addInstance(this);
if (__state) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
}
}
function get emphasized() {
return(undefined);
}
function keyDown(e) {
switch (e.code) {
case 40 :
setNext();
break;
case 38 :
setPrev();
break;
case 37 :
setPrev();
break;
case 39 :
setNext();
}
}
function setNext() {
var _local2 = _parent[groupName];
if ((_local2.selectedRadio.indexNumber + 1) == _local2.radioList.length) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : -1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 + _local3] != undefined) && (_local2.radioList[_local4 + _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 + _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function setPrev() {
var _local2 = _parent[groupName];
if (_local2.selectedRadio.indexNumber == 0) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : 1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 - _local3] != undefined) && (_local2.radioList[_local4 - _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 - _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function set toggle(v) {
//return(toggle);
}
function get toggle() {
}
function set icon(v) {
//return(icon);
}
function get icon() {
}
static var symbolName = "RadioButton";
static var symbolOwner = mx.controls.RadioButton;
static var version = "2.0.2.127";
var className = "RadioButton";
var btnOffset = 0;
var __toggle = true;
var __label = "Radio Button";
var __labelPlacement = "right";
var ignoreClassStyleDeclaration = {Button:1};
var __groupName = "radioGroup";
var indexNumber = 0;
var offset = false;
var falseUpSkin = "";
var falseDownSkin = "";
var falseOverSkin = "";
var falseDisabledSkin = "";
var trueUpSkin = "";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "";
var falseUpIcon = "RadioFalseUp";
var falseDownIcon = "RadioFalseDown";
var falseOverIcon = "RadioFalseOver";
var falseDisabledIcon = "RadioFalseDisabled";
var trueUpIcon = "RadioTrueUp";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "RadioTrueDisabled";
var centerContent = false;
var borderW = 0;
var clipParameters = {labelPlacement:1, data:1, label:1, groupName:1, selected:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.RadioButton.prototype.clipParameters, mx.controls.Button.prototype.clipParameters);
}
Symbol 1588 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 1589 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 1590 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 1591 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 1592 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 1593 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 1594 MovieClip [__Packages.mx.controls.RadioButtonGroup] Frame 0
class mx.controls.RadioButtonGroup
{
var radioList, __groupName, selectedRadio;
function RadioButtonGroup () {
init();
mx.events.UIEventDispatcher.initialize(this);
}
function init(Void) {
radioList = new Array();
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
}
function getGroupName() {
return(__groupName);
}
function addInstance(instance) {
instance.indexNumber = indexNumber++;
radioList.push(instance);
}
function getValue() {
if (selectedRadio.data == "") {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function getLabelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function setLabelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
}
function setEnabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
}
function setSize(val, val1) {
for (var _local3 in radioList) {
radioList[_local3].setSize(val, val1);
}
}
function getEnabled() {
for (var _local4 in radioList) {
var _local2 = radioList[_local4].enabled;
var _local3 = t + (_local2 + 0);
}
if (_local3 == radioList.length) {
return(true);
}
if (_local3 == 0) {
return(false);
}
}
function setStyle(name, val) {
for (var _local4 in radioList) {
radioList[_local4].setStyle(name, val);
}
}
function setInstance(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
}
function getInstance() {
return(selectedRadio);
}
function setValue(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio.hitArea_mc._height = selectedRadio.__height;
selectedRadio.hitArea_mc._width = selectedRadio.__width;
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
selectedRadio.hitArea_mc._height = (selectedRadio.hitArea_mc._width = 0);
}
}
function set groupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return;
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
//return(this.groupName);
}
function get groupName() {
return(__groupName);
}
function set selectedData(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
}
//return(selectedData);
}
function get selectedData() {
if ((selectedRadio.data == "") || (selectedRadio.data == undefined)) {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function get selection() {
return(selectedRadio);
}
function set selection(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
//return(selection);
}
function set labelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
//return(labelPlacement);
}
function get labelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function set enabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
//return(enabled);
}
function get enabled() {
var _local2 = 0;
for (var _local3 in radioList) {
_local2 = _local2 + radioList[_local3].enabled;
}
if (_local2 == 0) {
return(false);
}
if (_local2 == radioList.length) {
return(true);
}
}
static var symbolName = "RadioButtonGroup";
static var symbolOwner = mx.controls.RadioButtonGroup;
static var version = "2.0.2.127";
var className = "RadioButtonGroup";
var indexNumber = 0;
}
Symbol 1595 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 1596 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 1597 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 1598 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 1599 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 1600 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.127";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1601 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 1602 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 1603 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 1604 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 1605 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 1606 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.127";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 1607 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.127";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1608 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1609 MovieClip [__Packages.mx.core.View] Frame 0
class mx.core.View extends mx.core.UIComponent
{
var tabChildren, tabEnabled, boundingBox_mc, border_mc, __get__width, __get__height, __tabIndex, depth, createObject, createClassObject, loadExternal, destroyObject, createClassChildAtDepth, doLater;
function View () {
super();
}
function init() {
super.init();
tabChildren = true;
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function size() {
border_mc.move(0, 0);
border_mc.setSize(__get__width(), __get__height());
doLayout();
}
function draw() {
size();
}
function get numChildren() {
var _local3 = childNameBase;
var _local2 = 0;
while (true) {
if (this[_local3 + _local2] == undefined) {
return(_local2);
}
_local2++;
}
}
function get tabIndex() {
return((tabEnabled ? (__tabIndex) : undefined));
}
function set tabIndex(n) {
__tabIndex = n;
//return(tabIndex);
}
function addLayoutObject(object) {
}
function createChild(className, instanceName, initProps) {
if (depth == undefined) {
depth = 1;
}
var _local2;
if (typeof(className) == "string") {
_local2 = createObject(className, instanceName, depth++, initProps);
} else {
_local2 = createClassObject(className, instanceName, depth++, initProps);
}
if (_local2 == undefined) {
_local2 = loadExternal(className, _loadExternalClass, instanceName, depth++, initProps);
} else {
this[childNameBase + numChildren] = _local2;
_local2._complete = true;
childLoaded(_local2);
}
addLayoutObject(_local2);
return(_local2);
}
function getChildAt(childIndex) {
return(this[childNameBase + childIndex]);
}
function destroyChildAt(childIndex) {
if (!((childIndex >= 0) && (childIndex < numChildren))) {
return(undefined);
}
var _local4 = childNameBase + childIndex;
var _local6 = numChildren;
var _local3;
for (_local3 in this) {
if (_local3 == _local4) {
_local4 = "";
destroyObject(_local3);
break;
}
}
var _local2 = Number(childIndex);
while (_local2 < (_local6 - 1)) {
this[childNameBase + _local2] = this[childNameBase + (_local2 + 1)];
_local2++;
}
delete this[childNameBase + (_local6 - 1)];
depth--;
}
function initLayout() {
if (!hasBeenLayedOut) {
doLayout();
}
}
function doLayout() {
hasBeenLayedOut = true;
}
function createChildren() {
if (border_mc == undefined) {
border_mc = createClassChildAtDepth(_global.styles.rectBorderClass, mx.managers.DepthManager.kBottom, {styleName:this});
}
doLater(this, "initLayout");
}
function convertToUIObject(obj) {
}
function childLoaded(obj) {
convertToUIObject(obj);
}
static function extension() {
mx.core.ExternalContent.enableExternalContent();
}
static var symbolName = "View";
static var symbolOwner = mx.core.View;
static var version = "2.0.2.127";
var className = "View";
static var childNameBase = "_child";
var hasBeenLayedOut = false;
var _loadExternalClass = "UIComponent";
}
Symbol 1610 MovieClip [__Packages.mx.core.ScrollView] Frame 0
class mx.core.ScrollView extends mx.core.View
{
var __width, hScroller, vScroller, __maxHPosition, propsInited, scrollAreaChanged, specialHScrollCase, createObject, viewableColumns, __height, oldRndUp, viewableRows, __viewMetrics, owner, enabled, border_mc, __get__width, __get__height, invLayout, mask_mc, _parent, dispatchEvent;
function ScrollView () {
super();
}
function getHScrollPolicy(Void) {
return(__hScrollPolicy);
}
function setHScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get hScrollPolicy() {
return(getHScrollPolicy());
}
function set hScrollPolicy(policy) {
setHScrollPolicy(policy);
//return(hScrollPolicy);
}
function getVScrollPolicy(Void) {
return(__vScrollPolicy);
}
function setVScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get vScrollPolicy() {
return(getVScrollPolicy());
}
function set vScrollPolicy(policy) {
setVScrollPolicy(policy);
//return(vScrollPolicy);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
//return(hPosition);
}
function getHPosition(Void) {
return(__hPosition);
}
function setHPosition(pos) {
hScroller.__set__scrollPosition(pos);
__hPosition = pos;
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
//return(vPosition);
}
function getVPosition(Void) {
return(__vPosition);
}
function setVPosition(pos) {
vScroller.__set__scrollPosition(pos);
__vPosition = pos;
}
function get maxVPosition() {
var _local2 = vScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
return(getMaxHPosition());
}
function set maxHPosition(pos) {
setMaxHPosition(pos);
//return(maxHPosition);
}
function getMaxHPosition(Void) {
if (__maxHPosition != undefined) {
return(__maxHPosition);
}
var _local2 = hScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
var _local3 = getViewMetrics();
if (hPadding == undefined) {
hPadding = 0;
}
if (wPadding == undefined) {
wPadding = 0;
}
propsInited = true;
delete scrollAreaChanged;
heightPadding = hPadding;
widthPadding = wPadding;
if (colWidth == 0) {
colWidth = 1;
}
if (rwHeight == 0) {
rwHeight = 1;
}
var _local5 = Math.ceil((((__width - _local3.left) - _local3.right) - widthPadding) / colWidth);
if ((__hScrollPolicy == "on") || ((_local5 < colCount) && (__hScrollPolicy == "auto"))) {
if ((hScroller == undefined) || (specialHScrollCase)) {
delete specialHScrollCase;
hScroller = createObject("HScrollBar", "hSB", 1001);
hScroller.__set__lineScrollSize(20);
hScroller.scrollHandler = scrollProxy;
hScroller.__set__scrollPosition(__hPosition);
scrollAreaChanged = true;
}
if ((((numberOfCols != colCount) || (columnWidth != colWidth)) || (viewableColumns != _local5)) || (scrollAreaChanged)) {
hScroller.setScrollProperties(_local5, 0, colCount - _local5);
viewableColumns = _local5;
numberOfCols = colCount;
columnWidth = colWidth;
}
} else if (((__hScrollPolicy == "auto") || (__hScrollPolicy == "off")) && (hScroller != undefined)) {
hScroller.removeMovieClip();
delete hScroller;
scrollAreaChanged = true;
}
if (heightPadding == undefined) {
heightPadding = 0;
}
var _local4 = Math.ceil((((__height - _local3.top) - _local3.bottom) - heightPadding) / rwHeight);
var _local8 = (((__height - _local3.top) - _local3.bottom) % rwHeight) != 0;
if ((__vScrollPolicy == "on") || ((_local4 < (rwCount + _local8)) && (__vScrollPolicy == "auto"))) {
if (vScroller == undefined) {
vScroller = createObject("VScrollBar", "vSB", 1002);
vScroller.scrollHandler = scrollProxy;
vScroller.__set__scrollPosition(__vPosition);
scrollAreaChanged = true;
rowH = 0;
}
if ((((rowC != rwCount) || (rowH != rwHeight)) || ((viewableRows + _local8) != (_local4 + oldRndUp))) || (scrollAreaChanged)) {
vScroller.setScrollProperties(_local4, 0, (rwCount - _local4) + _local8);
viewableRows = _local4;
rowC = rwCount;
rowH = rwHeight;
oldRndUp = _local8;
}
} else if (((__vScrollPolicy == "auto") || (__vScrollPolicy == "off")) && (vScroller != undefined)) {
vScroller.removeMovieClip();
delete vScroller;
scrollAreaChanged = true;
}
numberOfCols = colCount;
columnWidth = colWidth;
if (scrollAreaChanged) {
doLayout();
var _local2 = __viewMetrics;
var _local12 = ((owner != undefined) ? (owner) : this);
_local12.layoutContent(_local2.left, _local2.top, ((columnWidth * numberOfCols) - _local2.left) - _local2.right, rowC * rowH, (__width - _local2.left) - _local2.right, (__height - _local2.top) - _local2.bottom);
}
if (!enabled) {
setEnabled(false);
}
}
function getViewMetrics(Void) {
var _local2 = __viewMetrics;
var _local3 = border_mc.__get__borderMetrics();
_local2.left = _local3.left;
_local2.right = _local3.right;
if (vScroller != undefined) {
_local2.right = _local2.right + vScroller.minWidth;
}
_local2.top = _local3.top;
if ((hScroller == undefined) && ((__hScrollPolicy == "on") || (__hScrollPolicy == true))) {
hScroller = createObject("FHScrollBar", "hSB", 1001);
specialHScrollCase = true;
}
_local2.bottom = _local3.bottom;
if (hScroller != undefined) {
_local2.bottom = _local2.bottom + hScroller.minHeight;
}
return(_local2);
}
function doLayout(Void) {
var _local10 = __get__width();
var _local8 = __get__height();
delete invLayout;
var _local3 = (__viewMetrics = getViewMetrics());
var _local2 = _local3.left;
var _local9 = _local3.right;
var _local5 = _local3.top;
var _local11 = _local3.bottom;
var _local7 = hScroller;
var _local6 = vScroller;
_local7.setSize((_local10 - _local2) - _local9, _local7.minHeight + 0);
_local7.move(_local2, _local8 - _local11);
_local6.setSize(_local6.minWidth + 0, (_local8 - _local5) - _local11);
_local6.move(_local10 - _local9, _local5);
var _local4 = mask_mc;
_local4._width = (_local10 - _local2) - _local9;
_local4._height = (_local8 - _local5) - _local11;
_local4._x = _local2;
_local4._y = _local5;
}
function createChild(id, name, props) {
var _local2 = super.createChild(id, name, props);
return(_local2);
}
function init(Void) {
super.init();
__viewMetrics = new Object();
if (_global.__SVMouseWheelManager == undefined) {
var _local4 = (_global.__SVMouseWheelManager = new Object());
_local4.onMouseWheel = __onMouseWheel;
Mouse.addListener(_local4);
}
}
function __onMouseWheel(delta, scrollTarget) {
var _local4 = scrollTarget;
var _local1;
while (_local4 != undefined) {
if (_local4 instanceof mx.core.ScrollView) {
_local1 = _local4;
}
_local4 = _local4._parent;
}
if (_local1 != undefined) {
_local4 = ((delta <= 0) ? 1 : -1);
var _local2 = _local1.vScroller.lineScrollSize;
if (_local2 == undefined) {
_local2 = 0;
}
_local2 = Math.max(Math.abs(delta), _local2);
var _local3 = _local1.vPosition + (_local2 * _local4);
_local1.vPosition = Math.max(0, Math.min(_local3, _local1.maxVPosition));
_local1.dispatchEvent({type:"scroll", direction:"vertical", position:_local1.vPosition});
}
}
function createChildren(Void) {
super.createChildren();
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", MASK_DEPTH);
}
mask_mc._visible = false;
}
function invalidate(Void) {
super.invalidate();
}
function draw(Void) {
size();
}
function size(Void) {
super.size();
}
function scrollProxy(docObj) {
_parent.onScroll(docObj);
}
function onScroll(docObj) {
var _local3 = docObj.target;
var _local2 = _local3.scrollPosition;
if (_local3 == vScroller) {
var _local4 = "vertical";
var _local5 = "__vPosition";
} else {
var _local4 = "horizontal";
var _local5 = "__hPosition";
}
this[_local5] = _local2;
dispatchEvent({type:"scroll", direction:_local4, position:_local2});
}
function setEnabled(v) {
vScroller.enabled = (hScroller.enabled = v);
}
function childLoaded(obj) {
super.childLoaded(obj);
obj.setMask(mask_mc);
}
static var symbolName = "ScrollView";
static var symbolOwner = mx.core.ScrollView;
static var version = "2.0.2.127";
var className = "ScrollView";
var __vScrollPolicy = "auto";
var __hScrollPolicy = "off";
var __vPosition = 0;
var __hPosition = 0;
var numberOfCols = 0;
var rowC = 0;
var columnWidth = 1;
var rowH = 0;
var heightPadding = 0;
var widthPadding = 0;
var MASK_DEPTH = 10000;
}
Symbol 1611 MovieClip [__Packages.mx.controls.listclasses.DataSelector] Frame 0
class mx.controls.listclasses.DataSelector extends Object
{
var __vPosition, setVPosition, __dataProvider, enabled, lastSelID, lastSelected, selected, invUpdateControl, invalidate, multipleSelection, updateControl, __rowCount, rows;
function DataSelector () {
super();
}
static function Initialize(obj) {
var _local3 = mixinProps;
var _local4 = _local3.length;
obj = obj.prototype;
var _local1 = 0;
while (_local1 < _local4) {
obj[_local3[_local1]] = mixins[_local3[_local1]];
_local1++;
}
mixins.createProp(obj, "dataProvider", true);
mixins.createProp(obj, "length", false);
mixins.createProp(obj, "value", false);
mixins.createProp(obj, "selectedIndex", true);
mixins.createProp(obj, "selectedIndices", true);
mixins.createProp(obj, "selectedItems", false);
mixins.createProp(obj, "selectedItem", true);
return(true);
}
function createProp(obj, propName, setter) {
var p = (propName.charAt(0).toUpperCase() + propName.substr(1));
var _local2 = null;
var _local4 = function (Void) {
return(this["get" + p]());
};
if (setter) {
_local2 = function (val) {
this["set" + p](val);
};
}
obj.addProperty(propName, _local4, _local2);
}
function setDataProvider(dP) {
if (__vPosition != 0) {
setVPosition(0);
}
clearSelected();
__dataProvider.removeEventListener(this);
__dataProvider = dP;
dP.addEventListener("modelChanged", this);
dP.addView(this);
modelChanged({eventName:"updateAll"});
}
function getDataProvider(Void) {
return(__dataProvider);
}
function addItemAt(index, label, data) {
if ((index < 0) || (!enabled)) {
return(undefined);
}
var _local2 = __dataProvider;
if (_local2 == undefined) {
_local2 = (__dataProvider = new Array());
_local2.addEventListener("modelChanged", this);
index = 0;
}
if ((typeof(label) == "object") || (typeof(_local2.getItemAt(0)) == "string")) {
_local2.addItemAt(index, label);
} else {
_local2.addItemAt(index, {label:label, data:data});
}
}
function addItem(label, data) {
addItemAt(__dataProvider.length, label, data);
}
function removeItemAt(index) {
return(__dataProvider.removeItemAt(index));
}
function removeAll(Void) {
__dataProvider.removeAll();
}
function replaceItemAt(index, newLabel, newData) {
if (typeof(newLabel) == "object") {
__dataProvider.replaceItemAt(index, newLabel);
} else {
__dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
}
}
function sortItemsBy(fieldName, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItemsBy(fieldName, order);
}
function sortItems(compareFunc, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItems(compareFunc, order);
}
function getLength(Void) {
return(__dataProvider.length);
}
function getItemAt(index) {
return(__dataProvider.getItemAt(index));
}
function modelChanged(eventObj) {
var _local3 = eventObj.firstItem;
var _local6 = eventObj.lastItem;
var _local7 = eventObj.eventName;
if (_local7 == undefined) {
_local7 = eventObj.event;
_local3 = eventObj.firstRow;
_local6 = eventObj.lastRow;
if (_local7 == "addRows") {
_local7 = (eventObj.eventName = "addItems");
} else if (_local7 == "deleteRows") {
_local7 = (eventObj.eventName = "removeItems");
} else if (_local7 == "updateRows") {
_local7 = (eventObj.eventName = "updateItems");
}
}
if (_local7 == "addItems") {
for (var _local2 in selected) {
var _local5 = selected[_local2];
if ((_local5 != undefined) && (_local5 >= _local3)) {
selected[_local2] = selected[_local2] + ((_local6 - _local3) + 1);
}
}
} else if (_local7 == "removeItems") {
if (__dataProvider.length == 0) {
delete selected;
} else {
var _local9 = eventObj.removedIDs;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local4 = _local9[_local2];
if (selected[_local4] != undefined) {
delete selected[_local4];
}
_local2++;
}
for (_local2 in selected) {
if (selected[_local2] >= _local3) {
selected[_local2] = selected[_local2] - ((_local6 - _local3) + 1);
}
}
}
} else if (_local7 == "sort") {
if (typeof(__dataProvider.getItemAt(0)) != "object") {
delete selected;
} else {
var _local10 = __dataProvider.length;
var _local2 = 0;
while (_local2 < _local10) {
if (isSelected(_local2)) {
var _local4 = __dataProvider.getItemID(_local2);
if (_local4 == lastSelID) {
lastSelected = _local2;
}
selected[_local4] = _local2;
}
_local2++;
}
}
} else if (_local7 == "filterModel") {
setVPosition(0);
}
invUpdateControl = true;
invalidate();
}
function getValue(Void) {
var _local2 = getSelectedItem();
if (typeof(_local2) != "object") {
return(_local2);
}
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
}
function getSelectedIndex(Void) {
for (var _local3 in selected) {
var _local2 = selected[_local3];
if (_local2 != undefined) {
return(_local2);
}
}
}
function setSelectedIndex(index) {
if (((index >= 0) && (index < __dataProvider.length)) && (enabled)) {
delete selected;
selectItem(index, true);
lastSelected = index;
invUpdateControl = true;
invalidate();
} else if (index == undefined) {
clearSelected();
}
}
function getSelectedIndices(Void) {
var _local2 = new Array();
for (var _local3 in selected) {
_local2.push(selected[_local3]);
}
_local2.reverse();
return(((_local2.length > 0) ? (_local2) : undefined));
}
function setSelectedIndices(indexArray) {
if (multipleSelection != true) {
return(undefined);
}
delete selected;
var _local3 = 0;
while (_local3 < indexArray.length) {
var _local2 = indexArray[_local3];
if ((_local2 >= 0) && (_local2 < __dataProvider.length)) {
selectItem(_local2, true);
}
_local3++;
}
invUpdateControl = true;
updateControl();
}
function getSelectedItems(Void) {
var _local3 = getSelectedIndices();
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.push(getItemAt(_local3[_local2]));
_local2++;
}
return(((_local4.length > 0) ? (_local4) : undefined));
}
function getSelectedItem(Void) {
return(__dataProvider.getItemAt(getSelectedIndex()));
}
function selectItem(index, selectedFlag) {
if (selected == undefined) {
selected = new Object();
}
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (selectedFlag && (!isSelected(index))) {
selected[_local2] = index;
} else if (!selectedFlag) {
delete selected[_local2];
}
}
function isSelected(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(false);
}
return(selected[_local2] != undefined);
}
function clearSelected(transition) {
var _local3 = 0;
for (var _local4 in selected) {
var _local2 = selected[_local4];
if (((_local2 != undefined) && (__vPosition <= _local2)) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "normal", transition && ((_local3 % 3) == 0));
}
_local3++;
}
delete selected;
}
static var mixins = new mx.controls.listclasses.DataSelector();
static var mixinProps = ["setDataProvider", "getDataProvider", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "sortItemsBy", "sortItems", "getLength", "getItemAt", "modelChanged", "calcPreferredWidthFromData", "calcPreferredHeightFromData", "getValue", "getSelectedIndex", "getSelectedItem", "getSelectedIndices", "getSelectedItems", "selectItem", "isSelected", "clearSelected", "setSelectedIndex", "setSelectedIndices"];
}
Symbol 1612 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 1613 MovieClip [__Packages.mx.controls.listclasses.ScrollSelectList] Frame 0
class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
{
var invLayoutContent, rows, topRowZ, listContent, __dataProvider, __vPosition, tW, layoutX, layoutY, tH, invRowHeight, invalidate, __height, invUpdateControl, __cellRenderer, __labelFunction, __iconField, __iconFunction, getLength, baseRowZ, lastPosition, propertyTable, isSelected, wasKeySelected, changeFlag, clearSelected, selectItem, lastSelected, dispatchEvent, dragScrolling, _ymouse, scrollInterval, isPressed, onMouseUp, getSelectedIndex, enabled, tabEnabled, tabChildren, createEmptyMovieClip, border_mc;
function ScrollSelectList () {
super();
}
function layoutContent(x, y, w, h) {
delete invLayoutContent;
var _local4 = Math.ceil(h / __rowHeight);
roundUp = (h % __rowHeight) != 0;
var _local12 = _local4 - __rowCount;
if (_local12 < 0) {
var _local3 = _local4;
while (_local3 < __rowCount) {
rows[_local3].removeMovieClip();
delete rows[_local3];
_local3++;
}
topRowZ = topRowZ + _local12;
} else if (_local12 > 0) {
if (rows == undefined) {
rows = new Array();
}
var _local3 = __rowCount;
while (_local3 < _local4) {
var _local2 = (rows[_local3] = listContent.createObject(__rowRenderer, "listRow" + (topRowZ++), topRowZ, {owner:this, styleName:this, rowIndex:_local3}));
_local2._x = x;
_local2._y = Math.round((_local3 * __rowHeight) + y);
_local2.setSize(w, __rowHeight);
_local2.drawRow(__dataProvider.getItemAt(__vPosition + _local3), getStateAt(__vPosition + _local3));
_local2.lastY = _local2._y;
_local3++;
}
}
if (w != tW) {
var _local11 = ((_local12 > 0) ? (__rowCount) : (_local4));
var _local3 = 0;
while (_local3 < _local11) {
rows[_local3].setSize(w, __rowHeight);
_local3++;
}
}
if ((layoutX != x) || (layoutY != y)) {
var _local3 = 0;
while (_local3 < _local4) {
rows[_local3]._x = x;
rows[_local3]._y = Math.round((_local3 * __rowHeight) + y);
_local3++;
}
}
__rowCount = _local4;
layoutX = x;
layoutY = y;
tW = w;
tH = h;
}
function getRowHeight(Void) {
return(__rowHeight);
}
function setRowHeight(v) {
__rowHeight = v;
invRowHeight = true;
invalidate();
}
function get rowHeight() {
return(getRowHeight());
}
function set rowHeight(w) {
setRowHeight(w);
//return(rowHeight);
}
function setRowCount(v) {
__rowCount = v;
}
function getRowCount(Void) {
var _local2 = ((__rowCount == 0) ? (Math.ceil(__height / __rowHeight)) : (__rowCount));
return(_local2);
}
function get rowCount() {
return(getRowCount());
}
function set rowCount(w) {
setRowCount(w);
//return(rowCount);
}
function setEnabled(v) {
super.setEnabled(v);
invUpdateControl = true;
invalidate();
}
function setCellRenderer(cR) {
__cellRenderer = cR;
var _local2 = 0;
while (_local2 < rows.length) {
rows[_local2].setCellRenderer(true);
_local2++;
}
invUpdateControl = true;
invalidate();
}
function set cellRenderer(cR) {
setCellRenderer(cR);
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set labelField(field) {
setLabelField(field);
//return(labelField);
}
function setLabelField(field) {
__labelField = field;
invUpdateControl = true;
invalidate();
}
function get labelField() {
return(__labelField);
}
function set labelFunction(func) {
setLabelFunction(func);
//return(labelFunction);
}
function setLabelFunction(func) {
__labelFunction = func;
invUpdateControl = true;
invalidate();
}
function get labelFunction() {
return(__labelFunction);
}
function set iconField(field) {
setIconField(field);
//return(iconField);
}
function setIconField(field) {
__iconField = field;
invUpdateControl = true;
invalidate();
}
function get iconField() {
return(__iconField);
}
function set iconFunction(func) {
setIconFunction(func);
//return(iconFunction);
}
function setIconFunction(func) {
__iconFunction = func;
invUpdateControl = true;
invalidate();
}
function get iconFunction() {
return(__iconFunction);
}
function setVPosition(pos) {
if (pos < 0) {
return(undefined);
}
if ((pos > 0) && (pos > ((getLength() - __rowCount) + roundUp))) {
return(undefined);
}
var _local8 = pos - __vPosition;
if (_local8 == 0) {
return(undefined);
}
__vPosition = pos;
var _local10 = _local8 > 0;
_local8 = Math.abs(_local8);
if (_local8 >= __rowCount) {
updateControl();
} else {
var _local4 = new Array();
var _local9 = __rowCount - _local8;
var _local12 = _local8 * __rowHeight;
var _local11 = _local9 * __rowHeight;
var _local6 = (_local10 ? 1 : -1);
var _local3 = 0;
while (_local3 < __rowCount) {
if (((_local3 < _local8) && (_local10)) || ((_local3 >= _local9) && (!_local10))) {
rows[_local3]._y = rows[_local3]._y + Math.round(_local6 * _local11);
var _local5 = _local3 + (_local6 * _local9);
var _local7 = __vPosition + _local5;
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
_local4[_local5].drawRow(__dataProvider.getItemAt(_local7), getStateAt(_local7), false);
} else {
rows[_local3]._y = rows[_local3]._y - Math.round(_local6 * _local12);
var _local5 = _local3 - (_local6 * _local8);
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
}
_local3++;
}
rows = _local4;
_local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].swapDepths(baseRowZ + _local3);
_local3++;
}
}
lastPosition = pos;
super.setVPosition(pos);
}
function setPropertiesAt(index, obj) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (propertyTable == undefined) {
propertyTable = new Object();
}
propertyTable[_local2] = obj;
rows[index - __vPosition].drawRow(__dataProvider.getItemAt(index), getStateAt(index));
}
function getPropertiesAt(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getPropertiesOf(obj) {
var _local2 = obj.getID();
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getStyle(styleProp) {
var _local2 = super.getStyle(styleProp);
var _local3 = mx.styles.StyleManager.colorNames[_local2];
if (_local3 != undefined) {
_local2 = _local3;
}
return(_local2);
}
function updateControl(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].drawRow(__dataProvider.getItemAt(_local2 + __vPosition), getStateAt(_local2 + __vPosition));
_local2++;
}
delete invUpdateControl;
}
function getStateAt(index) {
return((isSelected(index) ? "selected" : "normal"));
}
function selectRow(rowIndex, transition, allowChangeEvent) {
if (!selectable) {
return(undefined);
}
var _local3 = __vPosition + rowIndex;
var _local8 = __dataProvider.getItemAt(_local3);
var _local5 = rows[rowIndex];
if (_local8 == undefined) {
return(undefined);
}
if (transition == undefined) {
transition = true;
}
if (allowChangeEvent == undefined) {
allowChangeEvent = wasKeySelected;
}
changeFlag = true;
if (((!multipleSelection) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
clearSelected(transition);
selectItem(_local3, true);
lastSelected = _local3;
_local5.drawRow(_local5.item, getStateAt(_local3), transition);
} else if (Key.isDown(16) && (multipleSelection)) {
if (lastSelected == undefined) {
lastSelected = _local3;
}
var _local4 = ((lastSelected < _local3) ? 1 : -1);
clearSelected(false);
var _local2 = lastSelected;
while (_local2 != _local3) {
selectItem(_local2, true);
if ((_local2 >= __vPosition) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "selected", false);
}
_local2 = _local2 + _local4;
}
selectItem(_local3, true);
_local5.drawRow(_local5.item, "selected", transition);
} else if (Key.isDown(17)) {
var _local7 = isSelected(_local3);
if ((!multipleSelection) || (wasKeySelected)) {
clearSelected(transition);
}
if (!((!multipleSelection) && (_local7))) {
selectItem(_local3, !_local7);
var _local9 = ((!_local7) ? "selected" : "normal");
_local5.drawRow(_local5.item, _local9, transition);
}
lastSelected = _local3;
}
if (allowChangeEvent) {
dispatchEvent({type:"change"});
}
delete wasKeySelected;
}
function dragScroll(Void) {
clearInterval(dragScrolling);
if (_ymouse < 0) {
setVPosition(__vPosition - 1);
selectRow(0, false);
var _local2 = Math.min((-_ymouse) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else if (_ymouse > __height) {
var _local3 = __vPosition;
setVPosition(__vPosition + 1);
if (_local3 != __vPosition) {
selectRow((__rowCount - 1) - roundUp, false);
}
var _local2 = Math.min((_ymouse - __height) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else {
dragScrolling = setInterval(this, "dragScroll", 15);
}
updateAfterEvent();
}
function __onMouseUp(Void) {
clearInterval(dragScrolling);
delete dragScrolling;
delete dragScrolling;
delete isPressed;
delete onMouseUp;
if (!selectable) {
return(undefined);
}
if (changeFlag) {
dispatchEvent({type:"change"});
}
delete changeFlag;
}
function moveSelBy(incr) {
if (!selectable) {
setVPosition(__vPosition + incr);
return(undefined);
}
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = -1;
}
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < __vPosition) || (_local3 >= (__vPosition + __rowCount))) {
setVPosition(_local3);
}
if ((_local2 >= ((__vPosition + __rowCount) - roundUp)) || (_local2 < __vPosition)) {
setVPosition(__vPosition + incr);
}
wasKeySelected = true;
selectRow(_local2 - __vPosition, false);
}
function keyDown(e) {
if (selectable) {
if (findInputText()) {
return(undefined);
}
}
if (e.code == 40) {
moveSelBy(1);
} else if (e.code == 38) {
moveSelBy(-1);
} else if (e.code == 34) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((__rowCount - 1) - roundUp);
} else if (e.code == 33) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((1 - __rowCount) + roundUp);
} else if (e.code == 36) {
moveSelBy(-__dataProvider.length);
} else if (e.code == 35) {
moveSelBy(__dataProvider.length);
}
}
function findInputText(Void) {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
findString(String.fromCharCode(_local2));
return(true);
}
}
function findString(str) {
if (__dataProvider.length == 0) {
return(undefined);
}
var _local4 = getSelectedIndex();
if (_local4 == undefined) {
_local4 = 0;
}
var _local6 = 0;
var _local3 = _local4 + 1;
while (_local3 != _local4) {
var _local2 = __dataProvider.getItemAt(_local3);
if (_local2 instanceof XMLNode) {
_local2 = _local2.attributes[__labelField];
} else if (typeof(_local2) != "string") {
_local2 = String(_local2[__labelField]);
}
_local2 = _local2.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
_local6 = _local3 - _local4;
break;
}
if (_local3 >= (getLength() - 1)) {
_local3 = -1;
}
_local3++;
}
if (_local6 != 0) {
moveSelBy(_local6);
}
}
function onRowPress(rowIndex) {
if (!enabled) {
return(undefined);
}
isPressed = true;
dragScrolling = setInterval(this, "dragScroll", 15);
onMouseUp = __onMouseUp;
if (!selectable) {
return(undefined);
}
selectRow(rowIndex);
}
function onRowRelease(rowIndex) {
}
function onRowRollOver(rowIndex) {
if (!enabled) {
return(undefined);
}
var _local2 = rows[rowIndex].item;
if (getStyle("useRollOver") && (_local2 != undefined)) {
rows[rowIndex].drawRow(_local2, "highlighted", false);
}
dispatchEvent({type:"itemRollOver", index:rowIndex + __vPosition});
}
function onRowRollOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (getStyle("useRollOver")) {
rows[rowIndex].drawRow(rows[rowIndex].item, getStateAt(rowIndex + __vPosition), false);
}
dispatchEvent({type:"itemRollOut", index:rowIndex + __vPosition});
}
function onRowDragOver(rowIndex) {
if (((!enabled) || (isPressed != true)) || (!selectable)) {
return(undefined);
}
if (dropEnabled) {
} else if (dragScrolling) {
selectRow(rowIndex, false);
} else {
onMouseUp = __onMouseUp;
onRowPress(rowIndex);
}
}
function onRowDragOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (dragEnabled) {
} else {
onRowRollOut(rowIndex);
}
}
function init(Void) {
super.init();
tabEnabled = true;
tabChildren = false;
if (__dataProvider == undefined) {
__dataProvider = new Array();
__dataProvider.addEventListener("modelChanged", this);
}
baseRowZ = (topRowZ = 10);
}
function createChildren(Void) {
super.createChildren();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
invLayoutContent = true;
invalidate();
}
function draw(Void) {
if (invRowHeight) {
delete invRowHeight;
__rowCount = 0;
listContent.removeMovieClip();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
}
if (invUpdateControl) {
updateControl();
}
border_mc.draw();
}
function invalidateStyle(propName) {
if (isRowStyle[propName]) {
invUpdateControl = true;
invalidate();
} else {
var _local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].invalidateStyle(propName);
_local3++;
}
}
super.invalidateStyle(propName);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
var CONTENTDEPTH = 100;
var __hPosition = 0;
var __rowRenderer = "SelectableRow";
var __rowHeight = 22;
var __rowCount = 0;
var __labelField = "label";
var minScrollInterval = 30;
var dropEnabled = false;
var dragEnabled = false;
var className = "ScrollSelectList";
var isRowStyle = {styleName:true, backgroundColor:true, selectionColor:true, rollOverColor:true, selectionDisabledColor:true, backgroundDisabledColor:true, textColor:true, textSelectedColor:true, textRollOverColor:true, textDisabledColor:true, alternatingRowColors:true, defaultIcon:true};
var roundUp = 0;
var selectable = true;
var multipleSelection = false;
}
Symbol 1614 MovieClip [__Packages.mx.controls.List] Frame 0
class mx.controls.List extends mx.controls.listclasses.ScrollSelectList
{
var border_mc, __labels, setDataProvider, roundUp, __get__rowCount, __dataProvider, __maxHPosition, invScrollProps, invalidate, __vPosition, getViewMetrics, setSize, __width, __rowHeight, totalWidth, totalHeight, displayWidth, __hScrollPolicy, vScroller, __hPosition, listContent, data, mask_mc, __height, __rowCount, invRowHeight, invLayoutContent, setScrollProperties, oldVWidth;
function List () {
super();
}
function setEnabled(v) {
super.setEnabled(v);
border_mc.backgroundColorName = (v ? "backgroundColor" : "backgroundDisabledColor");
border_mc.invalidate();
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function setVPosition(pos) {
pos = Math.min((__dataProvider.length - __get__rowCount()) + roundUp, pos);
pos = Math.max(0, pos);
super.setVPosition(pos);
}
function setHPosition(pos) {
pos = Math.max(Math.min(__maxHPosition, pos), 0);
super.setHPosition(pos);
hScroll(pos);
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
invScrollProps = true;
invalidate();
}
function setHScrollPolicy(policy) {
if ((policy.toLowerCase() == "auto") && (!autoHScrollAble)) {
return(undefined);
}
super.setHScrollPolicy(policy);
if (policy == "off") {
setHPosition(0);
setVPosition(Math.min((__dataProvider.length - __get__rowCount()) + roundUp, __vPosition));
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, ((__rowHeight * rC) + _local2.top) + _local2.bottom);
}
function layoutContent(x, y, tW, tH, dW, dH) {
totalWidth = tW;
totalHeight = tH;
displayWidth = dW;
var _local4 = (((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) ? (Math.max(tW, dW)) : (dW));
super.layoutContent(x, y, _local4, dH);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.eventName;
if ((((_local3 == "addItems") || (_local3 == "removeItems")) || (_local3 == "updateAll")) || (_local3 == "filterModel")) {
invScrollProps = true;
invalidate("invScrollProps");
}
}
function onScroll(eventObj) {
var _local3 = eventObj.target;
if (_local3 == vScroller) {
setVPosition(_local3.scrollPosition);
} else {
hScroll(_local3.scrollPosition);
}
super.onScroll(eventObj);
}
function hScroll(pos) {
__hPosition = pos;
listContent._x = -pos;
}
function init(Void) {
super.init();
if (labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
__maxHPosition = 0;
}
function createChildren(Void) {
super.createChildren();
listContent.setMask(mask_mc);
border_mc.move(0, 0);
border_mc.setSize(__width, __height);
}
function getRowCount(Void) {
var _local2 = getViewMetrics();
return(((__rowCount == 0) ? (Math.ceil(((__height - _local2.top) - _local2.bottom) / __rowHeight)) : (__rowCount)));
}
function size(Void) {
super.size();
configureScrolling();
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
function draw(Void) {
if (invRowHeight) {
invScrollProps = true;
super.draw();
listContent.setMask(mask_mc);
invLayoutContent = true;
}
if (invScrollProps) {
configureScrolling();
delete invScrollProps;
}
if (invLayoutContent) {
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
super.draw();
}
function configureScrolling(Void) {
var _local2 = __dataProvider.length;
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
if (_local2 == undefined) {
_local2 = 0;
}
setScrollProperties(_local4, 1, _local2, __rowHeight);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
static var symbolOwner = mx.controls.List;
static var symbolName = "List";
var className = "List";
static var version = "2.0.2.127";
var clipParameters = {rowHeight:1, enabled:1, visible:1, labels:1};
var scrollDepth = 1;
var __vScrollPolicy = "on";
var autoHScrollAble = false;
}
Symbol 1682 MovieClip [__Packages.mx.core.ExternalContent] Frame 0
class mx.core.ExternalContent
{
var createObject, numChildren, prepList, doLater, loadList, dispatchEvent, loadedList, childLoaded;
function ExternalContent () {
}
function loadExternal(url, placeholderClassName, instanceName, depth, initProps) {
var _local2;
_local2 = createObject(placeholderClassName, instanceName, depth, initProps);
this[mx.core.View.childNameBase + numChildren] = _local2;
if (prepList == undefined) {
prepList = new Object();
}
prepList[instanceName] = {obj:_local2, url:url, complete:false, initProps:initProps};
prepareToLoadMovie(_local2);
return(_local2);
}
function prepareToLoadMovie(obj) {
obj.unloadMovie();
doLater(this, "waitForUnload");
}
function waitForUnload() {
var _local3;
for (_local3 in prepList) {
var _local2 = prepList[_local3];
if (_local2.obj.getBytesTotal() == 0) {
if (loadList == undefined) {
loadList = new Object();
}
loadList[_local3] = _local2;
_local2.obj.loadMovie(_local2.url);
delete prepList[_local3];
doLater(this, "checkLoadProgress");
} else {
doLater(this, "waitForUnload");
}
}
}
function checkLoadProgress() {
var _local8 = false;
var _local3;
for (_local3 in loadList) {
var _local2 = loadList[_local3];
_local2.loaded = _local2.obj.getBytesLoaded();
_local2.total = _local2.obj.getBytesTotal();
if (_local2.total > 0) {
_local2.obj._visible = false;
dispatchEvent({type:"progress", target:_local2.obj, current:_local2.loaded, total:_local2.total});
if (_local2.loaded == _local2.total) {
if (loadedList == undefined) {
loadedList = new Object();
}
loadedList[_local3] = _local2;
delete loadList[_local3];
doLater(this, "contentLoaded");
}
} else if (_local2.total == -1) {
if (_local2.failedOnce != undefined) {
_local2.failedOnce++;
if (_local2.failedOnce > 3) {
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadList[_local3];
}
} else {
_local2.failedOnce = 0;
}
}
_local8 = true;
}
if (_local8) {
doLater(this, "checkLoadProgress");
}
}
function contentLoaded() {
var _local4;
for (_local4 in loadedList) {
var _local2 = loadedList[_local4];
_local2.obj._visible = true;
_local2.obj._complete = true;
var _local3;
for (_local3 in _local2.initProps) {
_local2.obj[_local3] = _local2.initProps[_local3];
}
childLoaded(_local2.obj);
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadedList[_local4];
}
}
function convertToUIObject(obj) {
if (obj.setSize == undefined) {
var _local2 = mx.core.UIObject.prototype;
obj.addProperty("width", _local2.__get__width, null);
obj.addProperty("height", _local2.__get__height, null);
obj.addProperty("left", _local2.__get__left, null);
obj.addProperty("x", _local2.__get__x, null);
obj.addProperty("top", _local2.__get__top, null);
obj.addProperty("y", _local2.__get__y, null);
obj.addProperty("right", _local2.__get__right, null);
obj.addProperty("bottom", _local2.__get__bottom, null);
obj.addProperty("visible", _local2.__get__visible, _local2.__set__visible);
obj.move = mx.core.UIObject.prototype.move;
obj.setSize = mx.core.UIObject.prototype.setSize;
obj.size = mx.core.UIObject.prototype.size;
mx.events.UIEventDispatcher.initialize(obj);
}
}
static function enableExternalContent() {
}
static function classConstruct() {
var _local1 = mx.core.View.prototype;
var _local2 = mx.core.ExternalContent.prototype;
_local1.loadExternal = _local2.loadExternal;
_local1.prepareToLoadMovie = _local2.prepareToLoadMovie;
_local1.waitForUnload = _local2.waitForUnload;
_local1.checkLoadProgress = _local2.checkLoadProgress;
_local1.contentLoaded = _local2.contentLoaded;
_local1.convertToUIObject = _local2.convertToUIObject;
return(true);
}
static var classConstructed = classConstruct();
static var ViewDependency = mx.core.View;
}
Symbol 1683 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.2.127";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 1684 MovieClip [__Packages.mx.controls.scrollClasses.ScrollThumb] Frame 0
class mx.controls.scrollClasses.ScrollThumb extends mx.skins.CustomBorder
{
var useHandCursor, ymin, ymax, datamin, datamax, scrollMove, lastY, _ymouse, _y, _parent, onMouseMove, grip_mc, setSkin, gripSkin, __get__width, __get__height;
function ScrollThumb () {
super();
}
function createChildren(Void) {
super.createChildren();
useHandCursor = false;
}
function setRange(_ymin, _ymax, _datamin, _datamax) {
ymin = _ymin;
ymax = _ymax;
datamin = _datamin;
datamax = _datamax;
}
function dragThumb(Void) {
scrollMove = _ymouse - lastY;
scrollMove = scrollMove + _y;
if (scrollMove < ymin) {
scrollMove = ymin;
} else if (scrollMove > ymax) {
scrollMove = ymax;
}
_parent.isScrolling = true;
_y = scrollMove;
var _local2 = Math.round(((datamax - datamin) * (_y - ymin)) / (ymax - ymin)) + datamin;
_parent.scrollPosition = _local2;
_parent.dispatchScrollEvent("ThumbTrack");
updateAfterEvent();
}
function stopDragThumb(Void) {
_parent.isScrolling = false;
_parent.dispatchScrollEvent("ThumbPosition");
_parent.dispatchScrollChangedEvent();
delete onMouseMove;
}
function onPress(Void) {
_parent.pressFocus();
lastY = _ymouse;
onMouseMove = dragThumb;
super.onPress();
}
function onRelease(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onRelease();
}
function onReleaseOutside(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onReleaseOutside();
}
function draw() {
super.draw();
if (grip_mc == undefined) {
setSkin(3, gripSkin);
}
}
function size() {
super.size();
grip_mc.move((__get__width() - grip_mc.width) / 2, (__get__height() - grip_mc.height) / 2);
}
static var symbolOwner = mx.skins.CustomBorder.symbolOwner;
var className = "ScrollThumb";
var btnOffset = 0;
var horizontal = false;
var idNames = new Array("l_mc", "m_mc", "r_mc", "grip_mc");
}
Symbol 1685 MovieClip [__Packages.mx.controls.scrollClasses.ScrollBar] Frame 0
class mx.controls.scrollClasses.ScrollBar extends mx.core.UIComponent
{
var isScrolling, scrollTrack_mc, scrollThumb_mc, __height, tabEnabled, focusEnabled, boundingBox_mc, setSkin, upArrow_mc, _minHeight, _minWidth, downArrow_mc, createObject, createClassObject, enabled, _height, dispatchEvent, minMode, maxMode, plusMode, minusMode, _parent, getStyle, scrolling, _ymouse;
function ScrollBar () {
super();
}
function get scrollPosition() {
return(_scrollPosition);
}
function set scrollPosition(pos) {
_scrollPosition = pos;
if (isScrolling != true) {
pos = Math.min(pos, maxPos);
pos = Math.max(pos, minPos);
var _local3 = (((pos - minPos) * (scrollTrack_mc.height - scrollThumb_mc._height)) / (maxPos - minPos)) + scrollTrack_mc.top;
scrollThumb_mc.move(0, _local3);
}
//return(scrollPosition);
}
function get pageScrollSize() {
return(largeScroll);
}
function set pageScrollSize(lScroll) {
largeScroll = lScroll;
//return(pageScrollSize);
}
function set lineScrollSize(sScroll) {
smallScroll = sScroll;
//return(lineScrollSize);
}
function get lineScrollSize() {
return(smallScroll);
}
function get virtualHeight() {
return(__height);
}
function init(Void) {
super.init();
_scrollPosition = 0;
tabEnabled = false;
focusEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (scrollTrack_mc == undefined) {
setSkin(skinIDTrack, scrollTrackName);
}
scrollTrack_mc.visible = false;
var _local3 = new Object();
_local3.enabled = false;
_local3.preset = mx.controls.SimpleButton.falseDisabled;
_local3.initProperties = 0;
_local3.autoRepeat = true;
_local3.tabEnabled = false;
var _local2;
if (upArrow_mc == undefined) {
_local2 = createButton(upArrowName, "upArrow_mc", skinIDUpArrow, _local3);
}
_local2.buttonDownHandler = onUpArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _local2.height;
_minWidth = _local2.width;
if (downArrow_mc == undefined) {
_local2 = createButton(downArrowName, "downArrow_mc", skinIDDownArrow, _local3);
}
_local2.buttonDownHandler = onDownArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _minHeight + _local2.height;
}
function createButton(linkageName, id, skinID, o) {
if (skinID == skinIDUpArrow) {
o.falseUpSkin = upArrowUpName;
o.falseDownSkin = upArrowDownName;
o.falseOverSkin = upArrowOverName;
} else {
o.falseUpSkin = downArrowUpName;
o.falseDownSkin = downArrowDownName;
o.falseOverSkin = downArrowOverName;
}
var _local3 = createObject(linkageName, id, skinID, o);
this[id].visible = false;
this[id].useHandCursor = false;
return(_local3);
}
function createThumb(Void) {
var _local2 = new Object();
_local2.validateNow = true;
_local2.tabEnabled = false;
_local2.leftSkin = thumbTopName;
_local2.middleSkin = thumbMiddleName;
_local2.rightSkin = thumbBottomName;
_local2.gripSkin = thumbGripName;
createClassObject(mx.controls.scrollClasses.ScrollThumb, "scrollThumb_mc", skinIDThumb, _local2);
}
function setScrollProperties(pSize, mnPos, mxPos, ls) {
var _local4;
var _local2 = scrollTrack_mc;
pageSize = pSize;
largeScroll = (((ls != undefined) && (ls > 0)) ? (ls) : (pSize));
minPos = Math.max(mnPos, 0);
maxPos = Math.max(mxPos, 0);
_scrollPosition = Math.max(minPos, _scrollPosition);
_scrollPosition = Math.min(maxPos, _scrollPosition);
if (((maxPos - minPos) > 0) && (enabled)) {
var _local5 = _scrollPosition;
if (!initializing) {
upArrow_mc.enabled = true;
downArrow_mc.enabled = true;
}
_local2.onPress = (_local2.onDragOver = startTrackScroller);
_local2.onRelease = releaseScrolling;
_local2.onDragOut = (_local2.stopScrolling = stopScrolling);
_local2.onReleaseOutside = releaseScrolling;
_local2.useHandCursor = false;
if (scrollThumb_mc == undefined) {
createThumb();
}
var _local3 = scrollThumb_mc;
if (scrollTrackOverName.length > 0) {
_local2.onRollOver = trackOver;
_local2.onRollOut = trackOut;
}
_local4 = (pageSize / ((maxPos - minPos) + pageSize)) * _local2.height;
if (_local4 < _local3.minHeight) {
if (_local2.height < _local3.minHeight) {
_local3.__set__visible(false);
} else {
_local4 = _local3.minHeight;
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local3.minHeight + 0);
}
} else {
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local4);
}
_local3.setRange(upArrow_mc.__get__height() + 0, (virtualHeight - downArrow_mc.__get__height()) - _local3.__get__height(), minPos, maxPos);
_local5 = Math.min(_local5, maxPos);
scrollPosition = (Math.max(_local5, minPos));
} else {
scrollThumb_mc.__set__visible(false);
if (!initializing) {
upArrow_mc.enabled = false;
downArrow_mc.enabled = false;
}
delete _local2.onPress;
delete _local2.onDragOver;
delete _local2.onRelease;
delete _local2.onDragOut;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onReleaseOutside;
}
if (initializing) {
scrollThumb_mc.__set__visible(false);
}
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function draw(Void) {
if (initializing) {
initializing = false;
scrollTrack_mc.visible = true;
upArrow_mc.__set__visible(true);
downArrow_mc.__set__visible(true);
}
size();
}
function size(Void) {
if (_height == 1) {
return(undefined);
}
if (upArrow_mc == undefined) {
return(undefined);
}
var _local3 = upArrow_mc.__get__height();
var _local2 = downArrow_mc.__get__height();
upArrow_mc.move(0, 0);
var _local4 = scrollTrack_mc;
_local4._y = _local3;
_local4._height = (virtualHeight - _local3) - _local2;
downArrow_mc.move(0, virtualHeight - _local2);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll", detail:detail});
}
function isScrollBarKey(k) {
if (k == 36) {
if (scrollPosition != 0) {
scrollPosition = (0);
dispatchScrollEvent(minMode);
}
return(true);
}
if (k == 35) {
if (scrollPosition < maxPos) {
scrollPosition = (maxPos);
dispatchScrollEvent(maxMode);
}
return(true);
}
return(false);
}
function scrollIt(inc, mode) {
var _local3 = smallScroll;
if (inc != "Line") {
_local3 = ((largeScroll == 0) ? (pageSize) : (largeScroll));
}
var _local2 = _scrollPosition + (mode * _local3);
if (_local2 > maxPos) {
_local2 = maxPos;
} else if (_local2 < minPos) {
_local2 = minPos;
}
if (scrollPosition != _local2) {
scrollPosition = (_local2);
var _local4 = ((mode < 0) ? (minusMode) : (plusMode));
dispatchScrollEvent(inc + _local4);
}
}
function startTrackScroller(Void) {
_parent.pressFocus();
if (_parent.scrollTrackDownName.length > 0) {
if (_parent.scrollTrackDown_mc == undefined) {
_parent.setSkin(skinIDTrackDown, scrollTrackDownName);
} else {
_parent.scrollTrackDown_mc.visible = true;
}
}
_parent.trackScroller();
_parent.scrolling = setInterval(_parent, "scrollInterval", getStyle("repeatDelay"), "Page", -1);
}
function scrollInterval(inc, mode) {
clearInterval(scrolling);
if (inc == "Page") {
trackScroller();
} else {
scrollIt(inc, mode);
}
scrolling = setInterval(this, "scrollInterval", getStyle("repeatInterval"), inc, mode);
}
function trackScroller(Void) {
if ((scrollThumb_mc._y + scrollThumb_mc.__get__height()) < _ymouse) {
scrollIt("Page", 1);
} else if (scrollThumb_mc._y > _ymouse) {
scrollIt("Page", -1);
}
}
function dispatchScrollChangedEvent(Void) {
dispatchEvent({type:"scrollChanged"});
}
function stopScrolling(Void) {
clearInterval(_parent.scrolling);
_parent.scrollTrackDown_mc.visible = false;
}
function releaseScrolling(Void) {
_parent.releaseFocus();
stopScrolling();
_parent.dispatchScrollChangedEvent();
}
function trackOver(Void) {
if (_parent.scrollTrackOverName.length > 0) {
if (_parent.scrollTrackOver_mc == undefined) {
_parent.setSkin(skinIDTrackOver, scrollTrackOverName);
} else {
_parent.scrollTrackOver_mc.visible = true;
}
}
}
function trackOut(Void) {
_parent.scrollTrackOver_mc.visible = false;
}
function onUpArrow(Void) {
_parent.scrollIt("Line", -1);
}
function onDownArrow(Void) {
_parent.scrollIt("Line", 1);
}
function onScrollChanged(Void) {
_parent.dispatchScrollChangedEvent();
}
static var symbolOwner = mx.core.UIComponent;
var className = "ScrollBar";
var minPos = 0;
var maxPos = 0;
var pageSize = 0;
var largeScroll = 0;
var smallScroll = 1;
var _scrollPosition = 0;
var scrollTrackName = "ScrollTrack";
var scrollTrackOverName = "";
var scrollTrackDownName = "";
var upArrowName = "BtnUpArrow";
var upArrowUpName = "ScrollUpArrowUp";
var upArrowOverName = "ScrollUpArrowOver";
var upArrowDownName = "ScrollUpArrowDown";
var downArrowName = "BtnDownArrow";
var downArrowUpName = "ScrollDownArrowUp";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDownName = "ScrollDownArrowDown";
var thumbTopName = "ScrollThumbTopUp";
var thumbMiddleName = "ScrollThumbMiddleUp";
var thumbBottomName = "ScrollThumbBottomUp";
var thumbGripName = "ScrollThumbGripUp";
static var skinIDTrack = 0;
static var skinIDTrackOver = 1;
static var skinIDTrackDown = 2;
static var skinIDUpArrow = 3;
static var skinIDDownArrow = 4;
static var skinIDThumb = 5;
var idNames = new Array("scrollTrack_mc", "scrollTrackOver_mc", "scrollTrackDown_mc", "upArrow_mc", "downArrow_mc");
var clipParameters = {minPos:1, maxPos:1, pageSize:1, scrollPosition:1, lineScrollSize:1, pageScrollSize:1, visible:1, enabled:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.scrollClasses.ScrollBar.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var initializing = true;
}
Symbol 1686 MovieClip [__Packages.mx.effects.Tween] Frame 0
class mx.effects.Tween extends Object
{
static var IntervalToken;
var arrayMode, listener, initVal, endVal, startTime, updateFunc, endFunc, ID;
function Tween (listenerObj, init, end, dur) {
super();
if (listenerObj == undefined) {
return;
}
if (typeof(init) != "number") {
arrayMode = true;
}
listener = listenerObj;
initVal = init;
endVal = end;
if (dur != undefined) {
duration = dur;
}
startTime = getTimer();
if (duration == 0) {
endTween();
} else {
AddTween(this);
}
}
static function AddTween(tween) {
tween.ID = ActiveTweens.length;
ActiveTweens.push(tween);
if (IntervalToken == undefined) {
Dispatcher.DispatchTweens = DispatchTweens;
IntervalToken = setInterval(Dispatcher, "DispatchTweens", Interval);
}
}
static function RemoveTweenAt(index) {
var _local2 = ActiveTweens;
if (((index >= _local2.length) || (index < 0)) || (index == undefined)) {
return(undefined);
}
_local2.splice(index, 1);
var _local4 = _local2.length;
var _local1 = index;
while (_local1 < _local4) {
_local2[_local1].ID--;
_local1++;
}
if (_local4 == 0) {
clearInterval(IntervalToken);
delete IntervalToken;
}
}
static function DispatchTweens(Void) {
var _local2 = ActiveTweens;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1].doInterval();
_local1++;
}
updateAfterEvent();
}
function doInterval() {
var _local2 = getTimer() - startTime;
var _local3 = getCurVal(_local2);
if (_local2 >= duration) {
endTween();
} else if (updateFunc != undefined) {
listener[updateFunc](_local3);
} else {
listener.onTweenUpdate(_local3);
}
}
function getCurVal(curTime) {
if (arrayMode) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < initVal.length) {
_local3[_local2] = easingEquation(curTime, initVal[_local2], endVal[_local2] - initVal[_local2], duration);
_local2++;
}
return(_local3);
}
return(easingEquation(curTime, initVal, endVal - initVal, duration));
}
function endTween() {
if (endFunc != undefined) {
listener[endFunc](endVal);
} else {
listener.onTweenEnd(endVal);
}
RemoveTweenAt(ID);
}
function setTweenHandlers(update, end) {
updateFunc = update;
endFunc = end;
}
function easingEquation(t, b, c, d) {
return(((c / 2) * (Math.sin(Math.PI * ((t / d) - 0.5)) + 1)) + b);
}
static var ActiveTweens = new Array();
static var Interval = 10;
static var Dispatcher = new Object();
var duration = 3000;
}
Symbol 1687 MovieClip [__Packages.mx.controls.listclasses.SelectableRow] Frame 0
class mx.controls.listclasses.SelectableRow extends mx.core.UIComponent
{
var __height, cell, owner, rowIndex, icon_mc, createObject, __width, backGround, highlight, highlightColor, createLabel, createClassObject, listOwner, tabEnabled, item, createEmptyMovieClip, drawRect, isChangedToSelected, bGTween, grandOwner;
function SelectableRow () {
super();
}
function setValue(itmObj, state) {
var _local7 = __height;
var _local2 = cell;
var _local5 = owner;
var _local8 = itemToString(itmObj);
if (_local2.getValue() != _local8) {
_local2.setValue(_local8, itmObj, state);
}
var _local4 = _local5.getPropertiesAt(rowIndex + _local5.__vPosition).icon;
if (_local4 == undefined) {
_local4 = _local5.__iconFunction(itmObj);
if (_local4 == undefined) {
_local4 = itmObj[_local5.__iconField];
if (_local4 == undefined) {
_local4 = _local5.getStyle("defaultIcon");
}
}
}
var _local3 = icon_mc;
if ((_local4 != undefined) && (itmObj != undefined)) {
_local3 = createObject(_local4, "icon_mc", 20);
_local3._x = 2;
_local3._y = (_local7 - _local3._height) / 2;
_local2._x = 4 + _local3._width;
} else {
_local3.removeMovieClip();
_local2._x = 2;
}
var _local9 = ((_local3 == undefined) ? 0 : (_local3._width));
_local2.setSize(__width - _local9, Math.min(_local7, _local2.getPreferredHeight()));
_local2._y = (_local7 - _local2._height) / 2;
}
function size(Void) {
var _local3 = backGround;
var _local2 = cell;
var _local4 = __height;
var _local5 = __width;
var _local6 = ((icon_mc == undefined) ? 0 : (icon_mc._width));
_local2.setSize(_local5 - _local6, Math.min(_local4, _local2.getPreferredHeight()));
_local2._y = (_local4 - _local2._height) / 2;
icon_mc._y = (_local4 - icon_mc._height) / 2;
_local3._x = 0;
_local3._width = _local5;
_local3._height = _local4;
drawRowFill(_local3, normalColor);
drawRowFill(highlight, highlightColor);
}
function setCellRenderer(forceSizing) {
var _local3 = owner.__cellRenderer;
var _local4;
if (cell != undefined) {
_local4 = cell._x;
cell.removeMovieClip();
cell.removeTextField();
}
var _local2;
if (_local3 == undefined) {
_local2 = (cell = createLabel("cll", 0, {styleName:this}));
_local2.styleName = owner;
_local2.selectable = false;
_local2.tabEnabled = false;
_local2.background = false;
_local2.border = false;
} else if (typeof(_local3) == "string") {
_local2 = (cell = createObject(_local3, "cll", 0, {styleName:this}));
} else {
_local2 = (cell = createClassObject(_local3, "cll", 0, {styleName:this}));
}
_local2.owner = this;
_local2.listOwner = owner;
_local2.getCellIndex = getCellIndex;
_local2.getDataLabel = getDataLabel;
if (_local4 != undefined) {
_local2._x = _local4;
}
if (forceSizing) {
size();
}
}
function getCellIndex(Void) {
return({columnIndex:0, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.labelField);
}
function init(Void) {
super.init();
tabEnabled = false;
}
function createChildren(Void) {
setCellRenderer(false);
setupBG();
setState(state, false);
}
function drawRow(itmObj, state, transition) {
item = itmObj;
setState(state, transition);
setValue(itmObj, state, transition);
}
function itemToString(itmObj) {
if (itmObj == undefined) {
return(" ");
}
var _local2 = owner.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[owner.__labelField]) : (itmObj[owner.__labelField]));
if (_local2 == undefined) {
_local2 = " ";
if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
}
}
return(_local2);
}
function setupBG(Void) {
var _local2 = (backGround = createEmptyMovieClip("bG_mc", LOWEST_DEPTH));
drawRowFill(_local2, normalColor);
highlight = createEmptyMovieClip("tran_mc", LOWEST_DEPTH + 10);
_local2.owner = this;
_local2.grandOwner = owner;
_local2.onPress = bGOnPress;
_local2.onRelease = bGOnRelease;
_local2.onRollOver = bGOnRollOver;
_local2.onRollOut = bGOnRollOut;
_local2.onDragOver = bGOnDragOver;
_local2.onDragOut = bGOnDragOut;
_local2.useHandCursor = false;
_local2.trackAsMenu = true;
_local2.drawRect = drawRect;
highlight.drawRect = drawRect;
}
function drawRowFill(mc, newClr) {
mc.clear();
mc.beginFill(newClr);
mc.drawRect(1, 0, __width, __height);
mc.endFill();
mc._width = __width;
mc._height = __height;
}
function setState(newState, transition) {
var _local2 = highlight;
var _local8 = backGround;
var _local4 = __height;
var _local3 = owner;
if (!_local3.enabled) {
if ((newState == "selected") || (state == "selected")) {
highlightColor = _local3.getStyle("selectionDisabledColor");
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local2._y = 0;
_local2._height = _local4;
} else {
_local2._visible = false;
normalColor = _local3.getStyle("backgroundDisabledColor");
drawRowFill(_local8, normalColor);
}
cell.__enabled = false;
cell.setColor(_local3.getStyle("disabledColor"));
} else {
cell.__enabled = true;
if (transition && ((newState == state) || ((newState == "highlighted") && (state == "selected")))) {
isChangedToSelected = true;
return(undefined);
}
var _local6 = _local3.getStyle("selectionDuration");
var _local7 = 0;
if (isChangedToSelected && (newState == "selected")) {
transition = false;
}
var _local10 = transition && (_local6 != 0);
if (newState == "normal") {
_local7 = _local3.getStyle("color");
normalColor = getNormalColor();
drawRowFill(_local8, normalColor);
if (_local10) {
_local6 = _local6 / 2;
_local2._height = _local4;
_local2._width = __width;
_local2._y = 0;
bGTween = new mx.effects.Tween(this, _local4 + 2, _local4 * 0.2, _local6, 5);
} else {
_local2._visible = false;
}
delete isChangedToSelected;
} else {
highlightColor = _local3.getStyle(((newState == "highlighted") ? "rollOverColor" : "selectionColor"));
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local7 = _local3.getStyle(((newState == "highlighted") ? "textRollOverColor" : "textSelectedColor"));
if (_local10) {
_local2._height = _local4 * 0.5;
_local2._y = (_local4 - _local2._height) / 2;
bGTween = new mx.effects.Tween(this, _local2._height, _local4 + 2, _local6, 5);
var _local9 = _local3.getStyle("selectionEasing");
if (_local9 != undefined) {
bGTween.easingEquation = _local9;
}
} else {
_local2._y = 0;
_local2._height = _local4;
}
}
cell.setColor(_local7);
}
state = newState;
}
function onTweenUpdate(val) {
highlight._height = val;
highlight._y = (__height - val) / 2;
}
function onTweenEnd(val) {
onTweenUpdate(val);
highlight._visible = state != "normal";
}
function getNormalColor(Void) {
var _local3;
var _local2 = owner;
if (!owner.enabled) {
_local3 = _local2.getStyle("backgroundDisabledColor");
} else {
var _local5 = rowIndex + _local2.__vPosition;
if (rowIndex == undefined) {
_local3 = _local2.getPropertiesOf(item).backgroundColor;
} else {
_local3 = _local2.getPropertiesAt(_local5).backgroundColor;
}
if (_local3 == undefined) {
var _local4 = _local2.getStyle("alternatingRowColors");
if (_local4 == undefined) {
_local3 = _local2.getStyle("backgroundColor");
} else {
_local3 = _local4[_local5 % _local4.length];
}
}
}
return(_local3);
}
function invalidateStyle(propName) {
cell.invalidateStyle(propName);
super.invalidateStyle(propName);
}
function bGOnPress(Void) {
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function bGOnRelease(Void) {
grandOwner.releaseFocus();
grandOwner.onRowRelease(owner.rowIndex);
}
function bGOnRollOver(Void) {
grandOwner.onRowRollOver(owner.rowIndex);
}
function bGOnRollOut(Void) {
grandOwner.onRowRollOut(owner.rowIndex);
}
function bGOnDragOver(Void) {
grandOwner.onRowDragOver(owner.rowIndex);
}
function bGOnDragOut(Void) {
grandOwner.onRowDragOut(owner.rowIndex);
}
static var LOWEST_DEPTH = -16384;
var state = "normal";
var disabledColor = 15263976;
var normalColor = 16777215;
}
Symbol 1688 MovieClip [__Packages.mx.controls.HScrollBar] Frame 0
class mx.controls.HScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var _minHeight, _minWidth, _xscale, _rotation, __width, scrollIt;
function HScrollBar () {
super();
}
function getMinWidth(Void) {
return(_minHeight);
}
function getMinHeight(Void) {
return(_minWidth);
}
function init(Void) {
super.init();
_xscale = -100;
_rotation = -90;
}
function get virtualHeight() {
return(__width);
}
function isScrollBarKey(k) {
if (k == 37) {
scrollIt("Line", -1);
return(true);
}
if (k == 39) {
scrollIt("Line", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "HScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
var className = "HScrollBar";
var minusMode = "Left";
var plusMode = "Right";
var minMode = "AtLeft";
var maxMode = "AtRight";
}
Symbol 1689 MovieClip [__Packages.mx.controls.VScrollBar] Frame 0
class mx.controls.VScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var scrollIt;
function VScrollBar () {
super();
}
function init(Void) {
super.init();
}
function isScrollBarKey(k) {
if (k == 38) {
scrollIt("Line", -1);
return(true);
}
if (k == 40) {
scrollIt("Line", 1);
return(true);
}
if (k == 33) {
scrollIt("Page", -1);
return(true);
}
if (k == 34) {
scrollIt("Page", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "VScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
var className = "VScrollBar";
var minusMode = "Up";
var plusMode = "Down";
var minMode = "AtTop";
var maxMode = "AtBottom";
}
Symbol 1690 MovieClip [__Packages.mx.controls.UIScrollBar] Frame 0
class mx.controls.UIScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var textField, wasHorizontal, __width, __height, _parent, synchScroll, setScrollProperties, __set__scrollPosition, initializing, _rotation, _xscale, hScroller, vScroller, onChanged, onScroller, scrollPosition, dispatchEvent;
function UIScrollBar () {
super();
}
function init(Void) {
super.init();
textField.owner = this;
horizontal = (wasHorizontal);
if (horizontal) {
((textField != undefined) ? (super.setSize(textField._width, 16)) : (super.setSize(__width, __height)));
} else {
((textField != undefined) ? (super.setSize(16, textField._height)) : (super.setSize(__width, __height)));
}
if (horizontal) {
var _local3 = __width;
__height = __width;
width = _local3;
__width = 16;
}
textField.onScroller = function () {
this.hPosition = this.hscroll;
this.vPosition = this.scroll - 1;
};
if (_targetInstanceName != undefined) {
setScrollTarget(_targetInstanceName);
_targetInstanceName.addListener(this);
}
}
function get _targetInstanceName() {
return(textField);
}
function get height() {
if (wasHorizontal) {
return(__width);
}
return(__height);
}
function get width() {
if (wasHorizontal) {
return(__height);
}
return(__width);
}
function size(Void) {
super.size();
onTextChanged();
}
function draw() {
super.draw();
}
function set _targetInstanceName(t) {
if (t == undefined) {
textField.removeListener(this);
delete textField[(horizontal ? "hScroller" : "vScroller")];
if ((textField.hScroller != undefined) && (textField.vScroller != undefined)) {
textField.unwatch("text");
textField.unwatch("htmltext");
}
}
var _local3 = _parent[t];
textField = _parent[t];
onTextChanged();
//return(_targetInstanceName);
}
function setSize(w, h) {
if (horizontal) {
super.setSize(h, w);
} else {
super.setSize(w, h);
}
}
function onTextChanged(Void) {
if (textField == undefined) {
return(undefined);
}
clearInterval(synchScroll);
if (horizontal) {
var _local2 = textField.hscroll;
setScrollProperties(textField._width, 0, textField.maxhscroll);
__set__scrollPosition(Math.min(_local2, textField.maxhscroll));
} else {
var _local2 = textField.scroll;
var _local3 = textField.bottomScroll - textField.scroll;
setScrollProperties(_local3, 1, textField.maxscroll);
__set__scrollPosition(Math.min(_local2, textField.maxscroll));
}
}
function get horizontal() {
return(wasHorizontal);
}
function set horizontal(v) {
wasHorizontal = v;
if (v and initializing) {
if (_rotation == 90) {
return;
}
_xscale = -100;
_rotation = -90;
}
if (!initializing) {
if (v) {
if (_rotation == 0) {
_rotation = -90;
_xscale = -100;
}
} else if (_rotation == -90) {
_rotation = 0;
_xscale = 100;
}
}
//return(horizontal);
}
function callback(prop, oldval, newval) {
clearInterval(hScroller.synchScroll);
clearInterval(vScroller.synchScroll);
hScroller.synchScroll = setInterval(hScroller, "onTextChanged", 50);
vScroller.synchScroll = setInterval(vScroller, "onTextChanged", 50);
return(newval);
}
function setScrollTarget(tF) {
if (tF == undefined) {
textField.removeListener(this);
delete textField[(horizontal ? "hScroller" : "vScroller")];
if ((textField.hScroller != undefined) && (textField.vScroller != undefined)) {
textField.unwatch("text");
textField.unwatch("htmltext");
}
}
textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
textField = tF;
if (horizontal) {
textField.hScroller = this;
textField.hScroller.lineScrollSize = 5;
} else {
textField.vScroller = this;
textField.vScroller.lineScrollSize = 1;
}
onTextChanged();
onChanged = function (Void) {
this.onTextChanged();
};
onScroller = function (Void) {
if (!this.isScrolling) {
if (!this.horizontal) {
this.scrollPosition = this.textField.scroll;
} else {
this.scrollPosition = this.textField.hscroll;
}
}
};
textField.addListener(this);
textField.watch("text", callback);
textField.watch("htmlText", callback);
}
function scrollHandler(Void) {
if (horizontal) {
var _local2 = textField.background;
textField.hscroll = scrollPosition;
textField.background = _local2;
} else {
textField.scroll = scrollPosition;
}
}
function setEnabled(enable) {
super.setEnabled(enable);
if (enable) {
textField.addListener(this);
} else {
textField.removeListener();
}
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll"});
}
static var symbolName = "UIScrollBar";
static var symbolOwner = mx.controls.UIScrollBar;
var className = "UIScrollBar";
var clipParameters = {_targetInstanceName:1, horizontal:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.UIScrollBar.prototype.clipParameters);
static var version = "2.0.2.127";
}
Symbol 1716 MovieClip Frame 1
stop();
Symbol 1808 MovieClip Frame 17
_root.checkEnemyHit(_parent);
Symbol 1836 MovieClip Frame 25
_root.shootRange(_parent);
Symbol 1854 MovieClip Frame 10
stop();
_root.removeFX(_parent);
Symbol 1866 MovieClip Frame 11
stop();
_root.removeFX(_parent);
Symbol 1872 MovieClip [element_electric] Frame 10
stop();
_root.removeFX(this);
Symbol 1880 MovieClip Frame 1
this.gotoAndStop(_parent.myType);
Symbol 1881 MovieClip [ground_flow] Frame 15
stop();
_root.removeFX(this);
Symbol 1884 MovieClip Frame 30
stop();
_root.removeFX(_parent);
Symbol 1892 MovieClip [injuryBlood] Frame 7
stop();
_root.removeFX(this);
Symbol 1895 MovieClip [levelup] Frame 1
isLevelUp = true;
_visible = false;
Symbol 1895 MovieClip [levelup] Frame 35
stop();
_root.removeFX(this);
Symbol 1898 MovieClip [mindcontrol_explosion] Frame 10
stop();
_root.removeFX(this);
Symbol 1908 MovieClip [panic_circle] Frame 1
stop();
Symbol 1908 MovieClip [panic_circle] Frame 21
gotoAndStop (1);
_root.removeFX(this);
Symbol 1908 MovieClip [panic_circle] Frame 34
gotoAndStop (1);
_root.removeFX(this);
Symbol 1911 MovieClip [panic_flow] Frame 15
stop();
_root.removeFX(this);
Symbol 1917 MovieClip [powerup_add] Frame 20
stop();
_root.removeFX(this);
Symbol 1920 MovieClip [powerup_remove] Frame 20
stop();
_root.removeFX(this);
Symbol 1924 MovieClip [scratch] Frame 4
stop();
_root.removeFX(this);
Symbol 1927 MovieClip [scrollSpark_failure] Frame 20
stop();
_root.removeFX(this);
Symbol 1930 MovieClip [scrollSpark_success] Frame 20
stop();
_root.removeFX(this);
Symbol 1933 MovieClip [ground_hole] Frame 100
stop();
_root.removeFX(this);
Symbol 1935 MovieClip Frame 1
stop();
Symbol 1977 MovieClip Frame 7
_root.checkEnemyHit(_parent);
Symbol 1994 MovieClip Frame 6
_root.checkEnemyHit(_parent);
Symbol 2037 MovieClip Frame 7
_root.checkEnemyHit(_parent);
Symbol 2080 MovieClip Frame 7
_root.checkEnemyHit(_parent);
Symbol 2093 MovieClip Frame 6
_root.checkEnemyHit(_parent);
Symbol 2107 MovieClip Frame 6
_root.checkEnemyHit(_parent);
Symbol 2131 MovieClip Frame 6
_root.checkEnemyHit(_parent);
Symbol 2149 MovieClip Frame 5
_root.checkEnemyHit(_parent);
Symbol 2154 MovieClip Frame 5
_root.shootRange(_parent);
Symbol 2176 MovieClip [blood] Frame 22
stop();
_root.removeFX(this);
Symbol 2182 MovieClip [blood_backstab] Frame 6
stop();
_root.removeFX(this);
Symbol 2185 MovieClip [blood_puddle] Frame 90
stop();
_root.removeFX(this);
Symbol 2188 MovieClip [capture_explosion] Frame 10
stop();
_root.removeFX(this);
Symbol 2209 MovieClip [dmg_digits] Frame 1
onEnterFrame = function () {
if (!_root.gamePause) {
if (_alpha <= 0) {
this.onEnterFrame = null;
_root.removeFX(this);
} else {
_y = (_y-1);
_alpha = (_alpha - 5);
}
}
};
Symbol 2223 MovieClip [dmg_digitsB] Frame 1
onEnterFrame = function () {
if (!_root.gamePause) {
if (_alpha <= 0) {
this.onEnterFrame = null;
_root.removeFX(this);
} else {
_y = (_y-1);
_alpha = (_alpha - 5);
}
}
};
Symbol 2236 MovieClip [recover_digits] Frame 1
onEnterFrame = function () {
if (!_root.gamePause) {
if (_alpha <= 0) {
this.onEnterFrame = null;
_root.removeFX(this);
} else {
_y = (_y-1);
_alpha = (_alpha - 5);
}
}
};
Symbol 2238 MovieClip [element] Frame 15
stop();
_root.removeFX(this);
Symbol 2242 MovieClip [crush_hit] Frame 10
stop();
_root.removeFX(this);
Symbol 2245 MovieClip [damage_explosion] Frame 10
stop();
_root.removeFX(this);
Symbol 2264 MovieClip [npc] Frame 1
onRelease = function () {
var _local3;
if (questSign._visible && (store != undefined)) {
_root.toggleUI("quests_pop");
_local3 = _root.layout.quests_pop;
_local3.gotoAndStop(4);
_root.gamePause = true;
} else if (questSign._visible) {
_root.popQuest(finalQuests);
_local3 = _root.layout.quests_pop;
} else if (store != undefined) {
_root.openStore(this);
_local3 = _root.layout.store;
} else {
var _local4 = new Array();
_local4.push(-1);
_root.popQuest(_local4);
_local3 = _root.layout.quests_pop;
}
_local3.npc = this;
_local3.npcName.text = this.myName;
_root.updateCharacterEquips(_root.findNum(this.myName, _root.npcData), _local3.character, true);
if (this.myName == "High Priest Tarreal") {
_root.restoreAll();
}
};
Symbol 2265 MovieClip [pickable_object] Frame 1
function throwObject() {
gravity = weight;
holding = false;
shaked = false;
_root.object = false;
_root.updateObjectHand();
}
function throwOn(theEnemy) {
if ((theEnemy == true) || (theEnemy == false)) {
_root.newError("No Targets within Range");
} else {
enemy = theEnemy;
holding = false;
_root.object = false;
_root.updateObjectHand();
}
}
function sacrifice() {
_root.object = false;
holding = false;
sacrificing = true;
_root.updateObjectHand();
_root.sacrifices = _root.sacrifices + sacrificePoints;
}
Symbol 2288 MovieClip Frame 1
stop();
Symbol 2513 MovieClip Frame 15
_root.checkEnemyHit(_parent);
Symbol 2624 MovieClip Frame 14
_root.checkEnemyHit(_parent);
Symbol 2631 MovieClip Frame 3
stop();
Symbol 2635 MovieClip Frame 17
_root.shootRange(_parent);
Symbol 2640 MovieClip Frame 5
stop();
Symbol 2647 MovieClip Frame 16
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2647 MovieClip Frame 54
_parent.gotoAndStop(1);
Symbol 2647 MovieClip Frame 74
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2647 MovieClip Frame 113
_parent.gotoAndStop(1);
Symbol 2647 MovieClip Frame 134
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2647 MovieClip Frame 174
_parent.gotoAndStop(1);
Symbol 2650 MovieClip Frame 16
_root.newStar(_root.throwType);
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2650 MovieClip Frame 54
_root.throwType = "";
_parent.gotoAndStop(1);
Symbol 2650 MovieClip Frame 74
_root.newStar(_root.throwType);
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2650 MovieClip Frame 113
_root.throwType = "";
_parent.gotoAndStop(1);
Symbol 2650 MovieClip Frame 134
_root.newStar(_root.throwType);
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2650 MovieClip Frame 174
_root.throwType = "";
_parent.gotoAndStop(1);
Symbol 2653 MovieClip Frame 6
stop();
Symbol 2656 MovieClip Frame 6
stop();
Symbol 2661 MovieClip Frame 16
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2661 MovieClip Frame 54
_parent.gotoAndStop(1);
Symbol 2661 MovieClip Frame 74
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2661 MovieClip Frame 113
_parent.gotoAndStop(1);
Symbol 2661 MovieClip Frame 134
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2661 MovieClip Frame 174
_parent.gotoAndStop(1);
Symbol 2664 MovieClip Frame 16
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2664 MovieClip Frame 54
_parent.gotoAndStop(1);
Symbol 2664 MovieClip Frame 74
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2664 MovieClip Frame 113
_parent.gotoAndStop(1);
Symbol 2664 MovieClip Frame 134
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2664 MovieClip Frame 174
_parent.gotoAndStop(1);
Symbol 2669 MovieClip Frame 16
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2669 MovieClip Frame 54
_parent.gotoAndStop(1);
Symbol 2669 MovieClip Frame 74
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2669 MovieClip Frame 113
_parent.gotoAndStop(1);
Symbol 2669 MovieClip Frame 134
if (this._parent == _root.field.character) {
_root.checkHit();
} else {
_root.checkEnemyHit(this._parent);
}
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2669 MovieClip Frame 174
_parent.gotoAndStop(1);
Symbol 2672 MovieClip Frame 16
_root.newStar(_root.throwType, true);
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2672 MovieClip Frame 54
_root.throwType = "";
_parent.gotoAndStop(1);
Symbol 2672 MovieClip Frame 75
_root.newStar(_root.throwType, true);
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2672 MovieClip Frame 113
_root.throwType = "";
_parent.gotoAndStop(1);
Symbol 2672 MovieClip Frame 134
_root.newStar(_root.throwType, true);
_root.playSound("swing" + (random(3) + 1), _root.field.character);
_root.setSlashColor(this._parent);
Symbol 2672 MovieClip Frame 174
_root.throwType = "";
_parent.gotoAndStop(1);
Symbol 2673 MovieClip [character] Frame 1
stop();
if (this == _root.field.character) {
_root.updateCharacterEquips();
_root.setCharSize();
} else {
_root.updateCharacterEquips(this.myNum, this);
_root.setCharSize(this);
}
Symbol 2743 MovieClip [smoke] Frame 8
var enemiesArray = new Array();
var i = 0;
while (i < _root.enemies.length) {
myEnemy = _root.enemies[i];
if ((((((chainArray.length < Number(_root.maxexplo)) && (this.hitTest(myEnemy) || ((Math.abs(myEnemy._x - _x) <= this._width) && (Math.abs(myEnemy._y - _y) <= this._height)))) && (!_root.appearInArray(myEnemy, chainArray))) && (myEnemy.health > 0)) && (myEnemy._alpha == 100)) && (myEnemy.myName != "block")) {
enemiesArray.push(myEnemy);
}
if (chainArray.length >= Number(_root.maxexplo)) {
break;
}
i++;
}
myEnemy = _root.getClosestEnemy(this, enemiesArray);
if (myEnemy != undefined) {
if (_root.attemptHit(_root.accuracy + _root.accuracyBonus, myEnemy.avoidability)) {
pDmg = 0;
enemyDef = (100 - myEnemy.defense) / 100;
eDmg = (random(myDmg) + 1) + _root.getElementBonus(_root.elementDamage + _root.elementDamageBonus, "Fire");
enemyRes = (100 - myEnemy.resistance_Fire) / 100;
finalDmg = Math.ceil(Math.round((pDmg * enemyDef) + (eDmg * enemyRes)) * _root.injuries);
critical = false;
if (_root.successRate(_root.critChance)) {
finalDmg = Math.round(finalDmg * 1.5);
critical = true;
}
myEnemy.health = myEnemy.health - finalDmg;
if ((finalDmg > (myEnemy.health / 10)) && (myEnemy.stoppedAttacks < 2)) {
if ((myEnemy._currentframe == _root.monster_attack) || (myEnemy._currentframe == _root.monster_rangeattack)) {
myEnemy.stoppedAttacks++;
}
_root.eGoto(myEnemy, _root.monster_hit);
} else if (myEnemy.targeted == false) {
_root.eGoto(myEnemy, _root.monster_charge);
}
_root.popHealthBar(myEnemy);
_root.damaged(myEnemy._x, myEnemy._y, finalDmg, "T", false, critical, false);
myEnemy.targeted = true;
chainArray.push(myEnemy);
_root.bombIt(myEnemy._x, myEnemy._y, _xscale, chainArray, myDmg);
} else {
_root.newDigits(myEnemy._x, myEnemy._y, -1, 0, false);
}
myEnemy.targeted = true;
}
Symbol 2743 MovieClip [smoke] Frame 15
stop();
this.swapDepths(0);
this.removeMovieClip();
Symbol 2747 MovieClip [chain_lightning] Frame 8
var enemiesArray = new Array();
var i = 0;
while (i < _root.enemies.length) {
myEnemy = _root.enemies[i];
rightSide = true;
myCharacter = _root.field.character;
var sideRight = (_root.getCharMc()._xscale > 0);
if (this._x == myCharacter._x) {
rightSide = (sideRight && (myEnemy._x >= myCharacter._x)) || ((!sideRight) && (myEnemy._x <= myCharacter._x));
}
if (((((((chainArray.length < Number(_root.maxChain)) && (!_root.appearInArray(myEnemy, chainArray))) && (myEnemy.health > 0)) && (myEnemy._alpha == 100)) && (myEnemy.myName != "block")) && (Math.abs(myEnemy._x - _x) <= Number(_root.chainRange))) && (rightSide)) {
enemiesArray.push(myEnemy);
}
if (chainArray.length >= Number(_root.maxChain)) {
break;
}
i++;
}
myEnemy = _root.getClosestEnemy(this, enemiesArray);
if (myEnemy != undefined) {
if (_root.attemptHit(_root.accuracy + _root.accuracyBonus, myEnemy.avoidability)) {
pDmg = 0;
enemyDef = (100 - myEnemy.defense) / 100;
eDmg = (random(myDmg) + 1) + _root.getElementBonus(_root.elementDamage + _root.elementDamageBonus, "Lightning");
enemyRes = (100 - myEnemy.resistance_Lightning) / 100;
finalDmg = Math.ceil(Math.round((pDmg * enemyDef) + (eDmg * enemyRes)) * _root.injuries);
critical = false;
if (_root.successRate(_root.critChance)) {
finalDmg = Math.round(finalDmg * 1.5);
critical = true;
}
myEnemy.health = myEnemy.health - finalDmg;
if ((finalDmg > (myEnemy.health / 10)) && (myEnemy.stoppedAttacks < 2)) {
if ((myEnemy._currentframe == _root.monster_attack) || (myEnemy._currentframe == _root.monster_rangeattack)) {
myEnemy.stoppedAttacks++;
}
_root.eGoto(myEnemy, _root.monster_hit);
} else if (myEnemy.targeted == false) {
_root.eGoto(myEnemy, _root.monster_charge);
}
_root.popHealthBar(myEnemy);
_root.damaged(myEnemy._x, myEnemy._y, finalDmg, "T", false, critical, false);
_root.shakeScreen(5, Math.round(finalDmg / 10));
chainArray.push(myEnemy);
_root.chainIt(myEnemy._x, myEnemy._y, _xscale, chainArray, myDmg);
} else {
_root.newDigits(myEnemy._x, myEnemy._y, -1, 0, false);
}
_root.drawElectricity(this, myEnemy);
myEnemy.targeted = true;
}
Symbol 2747 MovieClip [chain_lightning] Frame 25
stop();
this.swapDepths(0);
this.removeMovieClip();
Symbol 2800 MovieClip [equip] Frame 1
unfocus._visible = false;
Symbol 2835 MovieClip Frame 1
function autoHeight() {
var _local1 = _height;
_yscale = 100;
setHeight(_local1);
}
function setHeight(myHeight) {
scrollbg._height = myHeight - (scrollUpBtn._height * 2);
dragger_MinHeight = dragger._y;
dragger_MaxHeight = (dragger_MinHeight + scrollbg._height) - dragger._height;
scrollDownBtn._y = ((scrollbg._y + scrollbg._height) + (scrollDownBtn._height / 2)) - 2;
}
function resetScroller() {
dragger._y = dragger_MinHeight;
updateWin();
}
function attachTo(mc) {
win = mc;
startY = win._y;
}
function updateWin() {
var _local1 = Math.abs((dragger._y - dragger_MinHeight) / (scrollbg._height - dragger._height));
win._y = startY - ((win._height - scrollbg._height) * _local1);
}
function setScroller() {
autoHeight();
attachTo(_parent.list);
}
function enableButtons() {
scrollUpBtn.enabled = (scrollDownBtn.enabled = (dragger.myBtn.enabled = (dragger.myBtn.enabled = (scrollbg.enabled = true))));
}
function disableButtons() {
scrollUpBtn.enabled = (scrollDownBtn.enabled = (dragger.myBtn.enabled = (dragger.myBtn.enabled = (scrollbg.enabled = false))));
}
var dragger_MinHeight;
var dragger_MaxHeight;
var startY;
var win;
setScroller();
scrollUpBtn.onRelease = function () {
dragger._y = dragger._y - 10;
if (dragger._y < dragger_MinHeight) {
dragger._y = dragger_MinHeight;
}
};
scrollDownBtn.onRelease = function () {
dragger._y = dragger._y + 10;
if (dragger._y > dragger_MaxHeight) {
dragger._y = dragger_MaxHeight;
}
};
dragger.myBtn.onPress = function () {
this._parent.startDrag(false, this._parent._x, this._parent._parent.dragger_MinHeight, this._parent._x, this._parent._parent.dragger_MaxHeight);
};
dragger.myBtn.onRelease = (dragger.myBtn.onReleaseOutside = function () {
this._parent.stopDrag();
});
scrollbg.onPress = function () {
if (dragger._y > _ymouse) {
dragger._y = dragger._y - (Math.abs(dragger._y - _ymouse) / 2);
} else {
dragger._y = dragger._y + (Math.abs(dragger._y - _ymouse) / 2);
}
};
scrollbg.useHandCursor = false;
Symbol 2840 MovieClip [skills] Frame 1
function resetTabs() {
var _local3 = 1;
while (_local3 <= 3) {
this["book" + _local3].bookNum = _local3;
this["book" + _local3].gotoAndStop(1);
this["book" + _local3].btn.onRelease = function () {
_root.viewBook(_root["book" + this._parent.bookNum], this._parent);
};
_local3++;
}
}
function newItem(itemNum) {
var _local4 = _root.skillData[itemNum];
var _local3 = _local4[0].split(", ")[0];
itemsList.push(_local3);
Obj = list.attachMovie("skillListItem", "item" + String(itemsList.length - 1), itemsList.length + 1);
Obj.txt.text = _root.restrictText(_local3, 18);
Obj._y = (itemsList.length - 1) * 55;
Obj.itemName = _local3;
Obj.itemNum = itemNum;
Obj.isPassive = _root.isPassive(_local3);
Obj.icon.gotoAndStop(itemNum + 2);
Obj.myNum = String(itemsList.length - 1);
currentSP = _root[("book" + bookNum(bookName)) + "_skills"][Obj.myNum];
totalSP = _local4[4].split("~").length;
Obj.invested.text = (currentSP + " / ") + totalSP;
_root.applySkillPoint(Obj.itemNum, _root[("book" + bookNum(bookName)) + "_skills"][Obj.myNum]);
Obj.btn.useHandCursor = false;
Obj.square.useHandCursor = false;
Obj.btn.onRollOver = function () {
_root.layout.chat.win = _root.layout.skills;
_root.displaySkillStats(this._parent.itemName, _root[("book" + this._parent._parent._parent.bookNum(this._parent._parent._parent.bookName)) + "_skills"][this._parent.myNum]);
};
Obj.btn.onRollOut = (Obj.btn.onReleaseOutside = function () {
_root.layout.chat._visible = false;
});
Obj.increaseBtn.onRelease = function () {
_root["sp" + bookNum(bookName)]--;
_root[("book" + this._parent._parent._parent.bookNum(this._parent._parent._parent.bookName)) + "_skills"][this._parent.myNum]++;
currentSP = _root[("book" + this._parent._parent._parent.bookNum(this._parent._parent._parent.bookName)) + "_skills"][this._parent.myNum];
totalSP = _root.skillData[this._parent.itemNum][4].split("~").length;
this._parent.invested.text = (currentSP + " / ") + totalSP;
_root.applySkillPoint(this._parent.itemNum, _root[("book" + this._parent._parent._parent.bookNum(this._parent._parent._parent.bookName)) + "_skills"][this._parent.myNum]);
_root.playSound("investPoint");
};
Obj.square.onRollOver = function () {
if ((_root[("book" + this._parent._parent._parent.bookNum(this._parent._parent._parent.bookName)) + "_skills"][this._parent.myNum] != 0) && (!this._parent.isPassive)) {
_root.applyMouseCursor("Grab");
_root.displayCommand("Drag Skill");
}
};
Obj.square.onRollOut = (Obj.square.onReleaseOutside = function () {
_root.applyMouseCursor("Default");
_root.layout.chat._visible = false;
});
Obj.square.onPress = function () {
if ((_root[("book" + this._parent._parent._parent.bookNum(this._parent._parent._parent.bookName)) + "_skills"][this._parent.myNum] != 0) && (!this._parent.isPassive)) {
_root.layout.skillSquare.image.gotoAndStop(this._parent.icon._currentframe);
_root.layout.skillSquare.myName = this._parent.itemNum;
_root.layout.skillSquare.myNum = undefined;
_root.skillDragging = true;
_root.applyMouseCursor("GrabAction");
_root.layout.chat._visible = false;
}
};
Obj.square.onRelease = (Obj.square.onReleaseOutside = function () {
_root.checkSkillPlace();
if (!_root.layout.mouseCursor.hitTest(this)) {
_root.applyMouseCursor("Default");
} else {
_root.applyMouseCursor("Grab");
}
});
}
function removeItems() {
dragger._y = startShift;
list._y = startY;
i = 0;
while (i < itemsList.length) {
list["item" + i].removeMovieClip();
i++;
}
itemsList = new Array();
}
function focusOn() {
i = 0;
while (i < (itemsList.length + 5)) {
list["item" + i].btn.enabled = true;
i++;
}
scroller.enableButtons();
bg.enabled = true;
closeX.enabled = true;
scroller._visible = itemsList.length >= 5;
}
function focusOff() {
i = 0;
while (i < (itemsList.length + 5)) {
list["item" + i].btn.enabled = false;
i++;
}
_root.chat._visible = false;
scroller.disableButtons();
bg.enabled = false;
closeX.enabled = false;
}
function bookNum(myName) {
s = 1;
while (s <= 3) {
if (_root["book" + s][0] == myName) {
return(s);
}
s++;
}
}
_parent.chat._visible = false;
var itemsList = new Array();
chat_format = new TextFormat();
_parent.chat._visible = false;
resetTabs();
_root.viewBook(_root.book1, book1);
onEnterFrame = function () {
if (!_visible) {
return(undefined);
}
if (!closeX.enabled) {
_parent.chat._visible = false;
}
skillPoints_title.text = bookName + " Skill Points:";
skillPoints.text = _root["sp" + bookNum(bookName)];
if (_root["sp" + bookNum(bookName)] == 0) {
i = 0;
while (i < itemsList.length) {
list["item" + i].increaseBtn.enabled = false;
list["item" + i].increaseBtn._alpha = 50;
i++;
}
} else if (_root["sp" + bookNum(bookName)] > 0) {
i = 0;
while (i < itemsList.length) {
list["item" + i].increaseBtn.enabled = true;
list["item" + i].increaseBtn._alpha = 100;
i++;
}
}
i = 0;
while (i < itemsList.length) {
var _local4 = _root.skillData[list["item" + i].itemNum][4].split("~");
if (((_root[("book" + bookNum(bookName)) + "_skills"][list["item" + i].myNum] == _local4.length) || (!_root.skillAvailable(list["item" + i].itemNum))) || (Number(_local4[_root[("book" + bookNum(bookName)) + "_skills"][list["item" + i].myNum]].split(", ")[1]) > _root.maxMana)) {
list["item" + i].increaseBtn.enabled = false;
list["item" + i].increaseBtn._alpha = 50;
}
i++;
}
if (_root.tutorialCounter <= 10) {
i = 0;
while (i < itemsList.length) {
if (i != _root.tutorialSkill) {
list["item" + i].increaseBtn.enabled = false;
list["item" + i].increaseBtn._alpha = 50;
}
i++;
}
}
if (_parent.skills_organize._visible && (!list.item0.square.enabled)) {
i = 0;
while (i < itemsList.length) {
list["item" + i].square.enabled = true;
i++;
}
}
i = 1;
while (i <= 3) {
this["book" + i]._visible = (this["sep" + (i - 1)]._visible = _root["book" + i] != undefined);
this["book" + i].bookName.text = _root["book" + i][0];
i++;
}
};
Symbol 2877 MovieClip [store] Frame 1
function lookItemPrice(myName) {
var _local1 = 0;
while (_local1 < itemsList.length) {
var _local2 = list["item" + _local1];
if (_local2.itemName == myName) {
return(_local2.price);
}
_local1++;
}
return(-1);
}
function newItem(item, price) {
itemsList.push(item);
Obj = list.attachMovie("listItem", "item" + String(itemsList.length + 1), itemsList.length + 1);
Obj._y = (itemsList.length - 1) * 45;
Obj.itemName = item;
Obj.price = price;
Obj.priceTxt.text = _root.stringNum(price);
var _local3 = item.split(":");
if (_local3.length == 1) {
Obj.txt.text = item;
Obj.icon.gotoAndStop(_root.getItemFrame(item));
} else {
Obj.txt.text = _root.getItemName(item);
Obj.icon.gotoAndStop("Monster Blood");
}
Obj.txt.text = _root.restrictText(Obj.txt.text, 22);
Obj.icon.equip.gotoAndStop(1);
Obj.btn.onRollOver = function () {
var _local3 = this._parent.itemName.split(":");
if (_local3.length == 1) {
_root.displayItemStats(_root.defineEquip(_root.itemData[_root.findNum(_local3[0], _root.itemData)], true), this._parent.price);
} else if (Number(_local3[1]) == 1) {
_root.displayItemStats(_root.shopPetBlood(_local3[0]), this._parent.price);
} else {
_root.displayItemStats(_root.shopMonsterBlood(_local3[0]), this._parent.price);
}
_root.layout.chat.win = _root.layout.store;
};
Obj.btn.onRollOut = (Obj.btn.onReleaseOutside = function () {
_root.layout.chat._visible = false;
});
Obj.btn.onRelease = function () {
if (_root.gold >= this._parent.price) {
if ((_root.itemData[_root.findNum(this._parent.itemName, _root.itemData)][0].split(", ")[1] == "equip") || (this._parent.itemName.split(":").length != 1)) {
_root.confirmPurchase(this._parent.itemName, this._parent.price);
} else {
_root.confirmMultiPurchase(this._parent.itemName, this._parent.price);
}
_root.layout.chat._visible = false;
} else {
_root.newError("Not Enough Gold");
}
};
}
function removeItems() {
scroller.resetScroller();
var _local1 = 0;
while (_local1 < (itemsList.length + 5)) {
list["item" + _local1].removeMovieClip();
_local1++;
}
itemsList = new Array();
}
function focusOn() {
var _local1 = 0;
while (_local1 < (itemsList.length + 5)) {
list["item" + _local1].btn.enabled = true;
_local1++;
}
scroller.enableButtons();
bg.enabled = true;
closeX.enabled = true;
unfocus._visible = false;
scroller._visible = !((itemsList.length < 6) && (_visible));
}
function focusOff() {
var _local2 = 0;
while (_local2 < (itemsList.length + 5)) {
list["item" + _local2].btn.enabled = false;
_local2++;
}
_root.chat._visible = false;
scroller.disableButtons();
bg.enabled = false;
closeX.enabled = false;
unfocus._visible = true;
}
_parent.chat._visible = false;
_parent.confirm_purchase._visible = false;
_parent.confirm_multipurchase._visible = false;
var itemsList = new Array();
gold_format = new TextFormat();
_root.chat._visible = false;
unfocus._visible = false;
removeItems();
var finalList = _root.storeData[storeOwner.store].split("^");
var i = 1;
while (i < finalList.length) {
var tempList = finalList[i].split(", ");
var nameArray = tempList[0].split(":");
var myName;
if (nameArray.length > 1) {
nameArray[0] = _root.monsterData[Number(nameArray[0])][0].split(", ")[0];
myName = nameArray.join(":");
} else {
myName = _root.itemData[Number(tempList[0])][0].split(", ")[0];
}
newItem(myName, Number(tempList[1]));
i++;
}
focusOn();
closeX.onRelease = function () {
_root.closeStore();
};
Symbol 2918 MovieClip [statsWin] Frame 1
function updateStats() {
var _local5 = statName.scroll;
_root.updateCharacterEquips(-1, character, true);
charTxt.text = _root.restrictText(_root.charName, 15);
var _local4 = _root.getCurrentWeapon();
statName.text = "";
statName.text = statName.text + "Level: \n";
statName.text = statName.text + "Experience: \n\n";
statName.text = statName.text + "Class: \n";
if (_root.element != "None") {
statName.text = statName.text + "Element: \n";
}
statName.text = statName.text + newline;
statName.text = statName.text + "Health:\n";
statName.text = statName.text + "Mana:\n";
statName.text = statName.text + "Speed:\n";
statName.text = statName.text + "Jump:\n";
statName.text = statName.text + "Weapon Damage:\n";
if ((_root.element != "None") && (_root.element_minDamage > 0)) {
statName.text = statName.text + ((_root.element + " Damage:") + newline);
}
statName.text = statName.text + "Accuracy: \n";
statName.text = statName.text + "Avoidability: \n";
statName.text = statName.text + "Critical Hit:\n";
statName.text = statName.text + "Summons Power: \n\n";
statName.text = statName.text + "Defense:\n";
statName.text = statName.text + "F Resistance:\n";
statName.text = statName.text + "I Resistance:\n";
statName.text = statName.text + "L Resistance:";
statContent.text = "";
statContent.text = statContent.text + (_root.level + newline);
statContent.text = statContent.text + (((_root.exp + "/") + _root.expToNextLevel) + "\n\n");
statContent.text = statContent.text + (_root.ninjaClass + newline);
if (_root.element != "None") {
statContent.text = statContent.text + (_root.element + newline);
}
statContent.text = statContent.text + newline;
statContent.text = statContent.text + (((_root.health + "/") + _root.maxHealth) + newline);
statContent.text = statContent.text + (((_root.mana + "/") + _root.maxMana) + newline);
statContent.text = statContent.text + (_root.speed + newline);
statContent.text = statContent.text + (_root.jumpPower + newline);
dmgBonus = _root.damage;
if (_local4 != "Claw") {
if (_local4 == "Staff") {
dmgBonus = dmgBonus + Math.floor(_root.wis / 5);
} else {
dmgBonus = dmgBonus + Math.floor(_root.str / 5);
}
} else {
starDmg = Number(_root.nextStarSlot()[2].split(", ")[1]);
if (isNaN(starDmg)) {
starDmg = 0;
}
dmgBonus = dmgBonus + (starDmg + Math.floor(_root.luk / 5));
}
myDmg = _root.weapon_minDamage + dmgBonus;
myDmg2 = _root.weapon_maxDamage + dmgBonus;
statContent.text = statContent.text + ((Math.ceil(myDmg * _root.injuries) + "-") + Math.ceil(myDmg2 * _root.injuries));
if (_root.injuries < 1) {
statContent.text = statContent.text + ((" (-" + Math.round(100 - (_root.injuries * 100))) + "%)");
}
statContent.text = statContent.text + newline;
if ((_root.element != "None") && (_root.element_minDamage > 0)) {
dmgBonus = _root.elementDamage + _root.elementDamageBonus;
myDmg = _root.element_minDamage + dmgBonus;
myDmg2 = _root.element_maxDamage + dmgBonus;
statContent.text = statContent.text + ((_root.getElementBonus(Math.ceil(myDmg * _root.injuries), _root.element) + "-") + _root.getElementBonus(Math.ceil(myDmg2 * _root.injuries), _root.element));
var _local3 = _root[_root.element + "_Bonus"];
if (_root.injuries < 1) {
_local3 = _local3 - Math.round(100 - (_root.injuries * 100));
}
if (_local3 >= 0) {
mySign = "+";
} else {
mySign = "";
}
if (_root[_root.element + "_Bonus"] > 0) {
statContent.text = statContent.text + (((" (" + mySign) + _local3) + "%)");
}
statContent.text = statContent.text + newline;
}
statContent.text = statContent.text + ((_root.accuracy + Math.floor(_root.dex / 5)) + newline);
statContent.text = statContent.text + ((_root.avoidability + _root.avoidabilityBonus) + newline);
statContent.text = statContent.text + ((_root.critChance + "%") + newline);
statContent.text = statContent.text + (((100 + Math.floor(_root.wis / 2)) + "%") + "\n\n");
statContent.text = statContent.text + ((_root.defense + "%") + newline);
statContent.text = statContent.text + ((_root.Fire_res + "%") + newline);
statContent.text = statContent.text + ((_root.Ice_res + "%") + newline);
statContent.text = statContent.text + (_root.Lightning_res + "%");
statBonus.text = "";
statBonus.text = statBonus.text + "\n\n\n\n";
if (_root.element != "None") {
statBonus.text = statBonus.text + newline;
}
var _local2 = _root.getBonuses();
addBonus(_local2.maxHealth);
addBonus(_local2.maxMana);
addBonus(_local2.speedBonus);
addBonus(_local2.basicJumpPower);
addBonus(_local2.damage);
if ((_root.element != "None") && (_root.element_minDamage > 0)) {
addBonus(_local2.elementDamage);
}
addBonus(_local2.accuracy);
addBonus(_local2.avoidability);
addBonus(_local2.critChance);
statBonus.text = statBonus.text + "\n\n";
addBonus(_local2.defense);
addBonus(_local2.Fire_res);
addBonus(_local2.Ice_res);
addBonus(_local2.Lightning_res);
strBonus.text = addBonus(_local2.str, true);
dexBonus.text = addBonus(_local2.dex, true);
wisBonus.text = addBonus(_local2.wis, true);
lukBonus.text = addBonus(_local2.luk, true);
if ((_root.spb > 0) && (_root.tutorialCounter != 8)) {
increaseStr.enabled = (increaseDex.enabled = (increaseWis.enabled = (increaseLuk.enabled = true)));
increaseStr._alpha = (increaseDex._alpha = (increaseWis._alpha = (increaseLuk._alpha = 100)));
} else {
increaseStr.enabled = (increaseDex.enabled = (increaseWis.enabled = (increaseLuk.enabled = false)));
increaseStr._alpha = (increaseDex._alpha = (increaseWis._alpha = (increaseLuk._alpha = 50)));
}
if (_root.tutorialCounter == 8) {
_root.pointOn.enabled = true;
_root.pointOn._alpha = 100;
}
statName.scroll = (statContent.scroll = (statBonus.scroll = (statName.scroll = _local5)));
}
function addBonus(myBonus, isStat) {
var _local1 = "";
if (isStat != true) {
_local1 = _local1 + "\n ";
}
if (myBonus != 0) {
var _local2 = "";
if (myBonus > 0) {
_local2 = "+";
}
_local1 = _local1 + ((("(" + _local2) + myBonus) + ")");
}
if (isStat != true) {
statBonus.text = statBonus.text + _local1;
} else {
return(_local1);
}
}
var scrollEvent = new Object();
scrollEvent.scroll = function (eventObject) {
statContent.scroll = (statBonus.scroll = statName.scroll);
};
myScroll.addEventListener("scroll", scrollEvent);
increaseStr.onRelease = function () {
_root.spb--;
_root.str++;
_root.playSound("investPoint");
};
increaseDex.onRelease = function () {
_root.spb--;
_root.dex++;
_root.playSound("investPoint");
};
increaseWis.onRelease = function () {
_root.spb--;
_root.wis++;
_root.playSound("investPoint");
};
increaseLuk.onRelease = function () {
_root.spb--;
_root.luk++;
_root.playSound("investPoint");
};
var primaryText = "[Primary Attribute]";
info_str.onRollOver = function () {
_parent.chat._visible = true;
_parent.chat.txt.text = "Strength";
if ((_root.ninjaClass == "Executioner") || (_root.ninjaClass == "Soul Hunter")) {
_parent.chat.txt.text = _parent.chat.txt.text + (" " + primaryText);
}
_parent.chat.txt.text = _parent.chat.txt.text + "\n-Increases Physical Damage\n-Carrying Heavy Objects\n-Faster Health Regeneration";
_root.resetChatColor();
_root.colorChat("Strength", 52224, true);
_root.colorChat(primaryText, 16711680);
_root.layout.chat.win = _root.layout.statsWin;
};
info_dex.onRollOver = function () {
_parent.chat._visible = true;
_parent.chat.txt.text = "Dexterity\n-Increases Walking Speed\n-Increases Jump\n-Increases Accuracy\n-Faster Mana Regeneration";
_root.resetChatColor();
_root.colorChat("Dexterity", 52224, true);
_root.layout.chat.win = _root.layout.statsWin;
};
info_wis.onRollOver = function () {
_parent.chat._visible = true;
_parent.chat.txt.text = "Wisdom";
if (_root.ninjaClass == "Sage") {
_parent.chat.txt.text = _parent.chat.txt.text + (" " + primaryText);
}
_parent.chat.txt.text = _parent.chat.txt.text + "\n-Increases Spells Damage\n-Increases Elements Damage\n-Increases Summons Power\n-Carrying Elemental Objects";
_root.resetChatColor();
_root.colorChat("Wisdom", 52224, true);
_root.colorChat(primaryText, 16711680);
_root.layout.chat.win = _root.layout.statsWin;
};
info_luk.onRollOver = function () {
_parent.chat._visible = true;
_parent.chat.txt.text = "Luck";
if (_root.ninjaClass == "Skyborn") {
_parent.chat.txt.text = _parent.chat.txt.text + (" " + primaryText);
}
_parent.chat.txt.text = _parent.chat.txt.text + "\n-Increases Shurikens Damage\n-Increases Avoidability\n-Increases Drops Chance\n-Losing less Experience on Death\n-Reviving with more Health";
_root.resetChatColor();
_root.colorChat("Luck", 52224, true);
_root.colorChat(primaryText, 16711680);
_root.layout.chat.win = _root.layout.statsWin;
};
info_str.onRollOut = (info_dex.onRollOut = (info_wis.onRollOut = (info_luk.onRollOut = (info_str.onReleaseOutside = (info_dex.onReleaseOutside = (info_wis.onReleaseOutside = (info_luk.onReleaseOutside = function () {
_parent.chat._visible = false;
})))))));
info_str.useHandCursor = (info_dex.useHandCursor = (info_wis.useHandCursor = (info_luk.useHandCursor = false)));
updateStats();
Instance of Symbol 1691 MovieClip [UIScrollBar] "myScroll" in Symbol 2918 MovieClip [statsWin] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "statName";
horizontal = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 2976 MovieClip [quests_pop] Frame 1
function eachFrame() {
if ((lastVisible == false) || (lastFrame != _currentframe)) {
beginTxt = _root.analyzeVars(convertDescription(_root.quest[quest][0].split(", ")[3]));
endTxt = _root.analyzeVars(convertDescription(_root.quest[quest][0].split(", ")[4]));
progTxt = (("Progress of " + _root.quest[quest][0].split(", ")[0]) + ":\n\n") + _root.questStatus(quest, "log").join(newline);
log.text = lastText;
}
lastVisible = _visible;
lastFrame = _currentframe;
btn1._visible = true;
btn2._visible = true;
if (step < 3) {
rewarded = false;
}
if (quest != -1) {
if ((step == 1) && (_root.questExists(quest))) {
step = 2;
}
if (_root.questStatus(quest, "completed") && (step == 2)) {
_root.questStatus(quest, "dispose");
step = 3;
}
questTitle.text = _root.quest[quest][0].split(", ")[0];
if (_root.quest[quest][0].split(", ")[0] == undefined) {
quest = -1;
}
if (step == 1) {
write(beginTxt);
line1.text = convertDescription(_root.quest[quest][5].split(", ")[0]);
line2.text = convertDescription(_root.quest[quest][5].split(", ")[1]);
line1.autoSize = (line2.autoSize = true);
btn1._width = line1._width;
btn2._width = line2._width;
btn1.onRelease = beginBtn;
btn2.onRelease = closeBtn;
btn2._visible = line2.text != "";
} else if (step == 2) {
write(progTxt);
line1.text = "Very Well.";
line2.text = "";
line1.autoSize = (line2.autoSize = true);
btn1._width = line1._width;
btn2._width = line2._width;
btn1.onRelease = closeBtn;
btn2._visible = line2.text != "";
} else if (step == 3) {
write(endTxt);
line1.text = convertDescription(_root.quest[quest][5].split(", ")[2]);
line2.text = "";
line1.autoSize = (line2.autoSize = true);
btn1._width = line1._width;
btn2._width = line2._width;
if (_root.questRewards(quest) != "") {
btn1.onRelease = function () {
gotoAndStop (2);
};
} else {
if (!rewarded) {
_root.rewardQuest(quest);
rewarded = true;
}
btn1.onRelease = endBtn;
}
btn2._visible = line2.text != "";
}
} else if (quest == -1) {
questTitle.text = "";
write(busyLine[busyNum]);
line1.text = answerBusyLine[busyNum];
line2.text = "";
line1.autoSize = (line2.autoSize = true);
btn1._width = line1._width;
btn2._width = line2._width;
btn1.onRelease = closeBtn;
btn2._visible = line2.text != "";
}
if (log.text.length != lastText.length) {
btn1._visible = false;
btn2._visible = false;
line1.text = "";
line2.text = "";
}
skipBtn._visible = (skipText._visible = log.text.length != lastText.length);
answersText._visible = !skipText._visible;
}
function write(txt) {
if (_visible) {
var _local4 = (1 + _root.pc(2)) - 2;
if (lastText != txt) {
log.text = "";
}
var _local2 = 0;
while (_local2 < _local4) {
if (log.text.length < txt.length) {
log.text = log.text + txt.charAt(log.text.length);
myScroll._visible = log.maxscroll > 1;
log.scroll = log.maxscroll;
}
_local2++;
}
lastText = txt;
}
}
function convertDescription(desc) {
newDesc = "";
i = 0;
while (i < desc.length) {
myChar = desc.charAt(i);
if (myChar == "^") {
newDesc = newDesc + ",";
} else {
newDesc = newDesc + myChar;
}
i++;
}
return(newDesc);
}
function beginBtn() {
_root.beginQuest(quest);
_root.moveQuestMap(quest, 0);
closeBtn();
}
function closeBtn() {
_root.gamePause = false;
_root.removeUI("quests_pop");
}
function endBtn() {
_root.moveQuestMap(quest, 1);
closeBtn();
}
function newBusyLine() {
busyNum = random(busyLine.length);
}
stop();
if (lastText == undefined) {
step = 1;
lastText = "";
}
skipBtn.useHandCursor = false;
skipBtn.onRelease = function () {
if (log.text.length != lastText.length) {
log.text = lastText;
log.scroll = log.maxscroll;
myScroll._visible = log.maxscroll > 1;
}
};
var busyLine = new Array();
busyLine.push("What?");
busyLine.push("Sorry, I'm a bit busy right now.");
busyLine.push("Listen, I can't talk right now, why don't we catch up later?");
busyLine.push("I have nothing to offer you right now, sorry...");
busyLine.push("How about we talk later?");
busyLine.push("Need something?");
var answerBusyLine = new Array();
answerBusyLine.push("Nothing...");
answerBusyLine.push("Sorry to interrupt.");
answerBusyLine.push("Yea sure...");
answerBusyLine.push("Alright...");
answerBusyLine.push("Ok why not.");
answerBusyLine.push("Not really...");
Instance of Symbol 1691 MovieClip [UIScrollBar] "myScroll" in Symbol 2976 MovieClip [quests_pop] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "log";
horizontal = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 2976 MovieClip [quests_pop] Frame 2
function newItem(itemName, amount, X, Y) {
var _local3 = rewards.attachMovie("reward_square", "reward_square" + rewards.getNextHighestDepth(), rewards.getNextHighestDepth());
var _local7 = itemName.split(":");
_local3.expIcon._visible = false;
if (itemName == "EXP") {
_local3.icon._visible = false;
_local3.expIcon._visible = true;
} else if (itemName == "Gold") {
_local3.icon.gotoAndStop(_root.getGoldFrame(amount));
} else if (_local7.length == 1) {
_local3.icon.gotoAndStop(_root.getItemFrame(itemName));
} else {
_local3.icon.gotoAndStop("Monster Blood");
}
_local3.itemName = itemName;
_local3.amount = amount;
_local3._x = X;
_local3._y = Y;
_local3.btn.onRollOver = function () {
_root.layout.chat._visible = true;
var _local3 = (this._parent.itemName != "Gold") && (this._parent.itemName != "EXP");
_root.layout.chat.txt.text = "";
if ((_local3 && (this._parent.amount > 1)) || (!_local3)) {
_root.layout.chat.txt.text = _root.layout.chat.txt.text + _root.stringNum(this._parent.amount);
}
var _local4 = this._parent.itemName;
if (_local4 == "EXP") {
_local4 = "Experience";
}
_root.layout.chat.txt.text = _root.layout.chat.txt.text + (" " + _local4);
if (_local3 && (this._parent.amount > 1)) {
_root.layout.chat.txt.text = _root.layout.chat.txt.text + "s";
}
_root.resetChatColor();
_root.layout.chat.win = _root.layout.quests_pop;
};
_local3.btn.onRollOut = (_local3.btn.onRelease = (_local3.btn.onReleaseOutside = function () {
_root.layout.chat._visible = false;
}));
_local3.btn.useHandCursor = false;
}
function updateRewards(myArray) {
var _local7 = rewards.startSquare._x;
var _local6 = rewards.startSquare._y;
var _local5 = rewards.startSquare._width + 10;
rewards.startSquare._visible = false;
var _local4 = 6;
var _local2 = 0;
var _local1 = 0;
while (_local1 < myArray.length) {
if (((_local1 % _local4) == 0) && (_local1 != 0)) {
_local2++;
}
newItem(myArray[_local1][0], myArray[_local1][1], _local7 + (_local5 * (_local1 - (_local2 * _local4))), _local6 + (_local2 * _local5));
_local1++;
}
}
function setFunc() {
updateRewards(_root.questRewards(quest, true));
_root.rewardQuest(quest);
finishQuest.onRelease = endBtn;
}
lastFrame = _currentframe;
rewards.startSquare._visible = false;
setTimeout(setFunc, 1);
Symbol 2976 MovieClip [quests_pop] Frame 3
function updateOptions() {
var _local3;
_local3 = 0;
while (_local3 < quests.length) {
var _local8 = _root.quest[quests[_local3]];
var _local6 = this["line" + (_local3 + 1)];
var _local5 = this["btn" + (_local3 + 1)];
var _local4 = this["sign" + (_local3 + 1)];
_local6.text = _local8[0].split(", ")[0];
_local6.autoSize = true;
_local5._visible = true;
_local5._width = _local6._width;
_local5.myNum = quests[_local3];
_local5.onRelease = function () {
var _local3 = new Array();
_local3.push(this.myNum);
_root.popQuest(_local3);
};
_local4._visible = true;
if (_root.appearIn(quests[_local3], _root.inProgress)) {
if (_root.questStatus(quests[_local3], "completed")) {
_local4.gotoAndStop(3);
} else {
_local4.gotoAndStop(2);
}
} else if (Number(_root.quest[quests[_local3]][5].split(", ")[5]) == 1) {
_local4.gotoAndStop(4);
} else if (_root.isRepeatable(quests[_local3])) {
_local4.gotoAndStop(5);
} else {
_local4.gotoAndStop(1);
}
laterNum = _local3 + 2;
if (_local3 == 4) {
break;
}
_local3++;
}
if (quests.length < 6) {
_local3 = laterNum;
while (_local3 <= 6) {
this["line" + (_local3 + 1)].text = "";
this["btn" + (_local3 + 1)]._visible = false;
this["sign" + (_local3 + 1)]._visible = false;
_local3++;
}
}
this["line" + laterNum].text = ["Forget it...", "Never Mind."][random(2)];
this["line" + laterNum].autoSize = true;
this["btn" + laterNum]._visible = true;
this["btn" + laterNum]._width = this["line" + laterNum]._width;
this["btn" + laterNum].onRelease = closeBtn;
this["sign" + laterNum]._visible = false;
}
lastFrame = _currentframe;
Symbol 2976 MovieClip [quests_pop] Frame 4
function setFunc() {
btn1.onRelease = function () {
_root.popQuest(npc.finalQuests);
updateNPC(_root.layout.quests_pop);
};
btn2.onRelease = function () {
_root.openStore(npc);
updateNPC(_root.layout.store);
closeBtn();
};
closeX.onRelease = closeBtn;
}
function updateNPC(myWin) {
myWin.npc = npc;
myWin.npcName.text = npc.myName;
_root.updateCharacterEquips(_root.findNum(npc.myName, _root.npcData), myWin.character, true);
}
lastFrame = _currentframe;
setTimeout(setFunc, 1);
Symbol 3002 MovieClip [quests] Frame 1
function analyzeTaskProperty(myTask, propertyNum) {
task_splitted = new Array();
task_splitted = myTask.split(" ");
return(task_splitted[propertyNum]);
}
function selectedQuest() {
var _local3 = quests.selectedIndices;
var _local2 = quests.getItemAt(_local3[0]).data;
_root.lastIndexes[_root.quest_section_showing] = _local2;
return(_local2);
}
function arrangeQuests() {
if (_root.quest_section_showing == 0) {
quests.removeAll();
i = 0;
while (i < _root.inProgress.length) {
quests.addItem({label:_root.quest[_root.inProgress[i]][0].split(", ")[0], data:_root.inProgress[i]});
i++;
}
} else if (_root.quest_section_showing == 1) {
quests.removeAll();
i = 0;
while (i < _root.completed.length) {
quests.addItem({label:_root.quest[_root.completed[i]][0].split(", ")[0], data:_root.completed[i]});
i++;
}
} else if (_root.quest_section_showing == 2) {
quests.removeAll();
i = 0;
while (i < _root.quest.length) {
if (((!_root.appearIn(i, _root.completed)) && (!_root.appearIn(i, _root.inProgress))) && (_root.questReq(i))) {
quests.addItem({label:_root.quest[i][0].split(", ")[0], data:i});
}
i++;
}
}
selectIndex(_root.lastIndexes[_root.quest_section_showing]);
}
function selectIndex(questNum) {
var _local1 = 0;
while (_local1 < quests.length) {
var _local2 = quests.getItemAt(_local1).data;
if (_local2 == questNum) {
quests.selectedIndex = _local1;
return(undefined);
}
_local1++;
}
quests.selectedIndex = 0;
}
function resetChatColor() {
var _local1 = new TextFormat();
_local1.color = 13421772 /* 0xCCCCCC */;
log.setTextFormat(_local1);
hwArray = new Array();
}
function highlightWord(word, hex, ul) {
var _local1;
var _local2 = 0;
if (ul == undefined) {
ul = false;
}
var _local4 = word.split(newline);
if (_local4.length > 1) {
_local1 = 0;
while (_local1 < _local4.length) {
highlightWord(_local4[_local1], hex, ul);
_local1++;
}
return(0);
}
_local1 = 0;
while (_local1 < log.text.length) {
if (word.charAt(_local2) == log.text.charAt(_local1)) {
if (_local2 == 0) {
firstchar = _local1;
} else if (_local2 >= (word.length - 1)) {
lastchar = _local1;
var _local3 = new TextFormat();
_local3.color = hex;
_local3.underline = ul;
log.setTextFormat(firstchar, lastchar + 1, _local3);
break;
}
_local2++;
} else {
_local2 = 0;
}
_local1++;
}
}
function hw(word, hex, ul) {
hwArray.push([word, hex, ul]);
return(word);
}
function executeHw() {
var _local2 = 0;
while (_local2 < hwArray.length) {
var _local1 = hwArray[_local2];
highlightWord(_local1[0], _local1[1], _local1[2]);
_local2++;
}
}
function showSelectedQuest() {
var _local10 = log.scroll;
s = selectedQuest();
q = _root.quest[s];
log.text = "";
questTitle.text = "";
abort._visible = q[8].split("@")[0] == "";
if ((lastS != s) && (_visible)) {
inProgressTxt = _root.analyzeVars(convertDescription(q[0].split(", ")[7]));
}
lastS = s;
if (s == undefined) {
abort._visible = false;
} else {
questTitle.text = q[0].split(", ")[0];
resetChatColor();
log.text = log.text + (hw(npcString(q[0].split(", ")[1]), 10066329) + "\n\n");
log.text = log.text + (inProgressTxt + "\n\n");
log.text = log.text + (hw("Tasks:", 13421772, true) + newline);
var _local8 = _root.questStatus(s, "log");
var _local4 = 0;
while (_local4 < _local8.length) {
var _local6 = _local8[_local4].split(" [COMPLETED]");
var _local7 = _local6[0];
var _local5 = 16711680 /* 0xFF0000 */;
if (_local6.length > 1) {
_local5 = 2424100 /* 0x24FD24 */;
}
log.text = log.text + (hw(_local7, _local5) + newline);
_local4++;
}
if (_root.questStatus(s, "completed")) {
log.text = log.text + (newline + hw(("Quest Completed, I should go see " + _root.npcData[Number(q[0].split(", ")[1])][0].split(", ")[0]) + " to collect my reward.", 16777215));
abort._visible = false;
}
executeHw();
}
abort.btn.onRelease = function () {
if (_root.doubleClick_counter > 0) {
_parent.chat._visible = true;
_root.removeQuest(this._parent._parent.s, true);
arrangeQuests();
}
_root.doubleClick_counter = _root.doubleClick_timer;
};
abort.btn.onRollOver = function () {
_parent.chat._visible = true;
var _local3 = "Aborting a quest will delete all of its progress!\nThis cannot be undone!";
var _local4 = "Double Click to Abort Quest";
_parent.chat.txt.text = (_local3 + newline) + "Double Click to Abort Quest";
_root.resetChatColor();
_root.colorChat(_local3, 16711680);
_root.colorChat(_local4, 13158);
_root.layout.chat.win = _root.layout.quests;
};
abort.btn.onRollOut = (abort.btn.onReleaseOutside = function () {
_parent.chat._visible = false;
});
log.scroll = _local10;
}
function showSelectedCompleted() {
var _local2 = log.scroll;
s = selectedQuest();
q = _root.quest[s];
log.text = "";
questTitle.text = "";
abort._visible = false;
if ((lastS != s) && (_visible)) {
completedTxt = _root.analyzeVars(convertDescription(q[0].split(", ")[5]));
}
lastS = s;
if (s != undefined) {
questTitle.text = q[0].split(", ")[0];
resetChatColor();
log.text = log.text + (hw(npcString(q[0].split(", ")[1]), 10066329) + "\n\n");
log.text = log.text + completedTxt;
if (_root.questRewards(s) != "") {
log.text = log.text + (("\n\n" + hw("Rewards:", 13421772, true)) + hw(_root.questRewards(s), 6270718));
}
executeHw();
}
log.scroll = _local2;
}
function showSelectedAvailable() {
var _local2 = log.scroll;
s = selectedQuest();
q = _root.quest[s];
log.text = "";
questTitle.text = "";
abort._visible = false;
if ((lastS != s) && (_visible)) {
availableTxt = _root.analyzeVars(convertDescription(q[0].split(", ")[6]));
}
lastS = s;
if (s != undefined) {
questTitle.text = q[0].split(", ")[0];
resetChatColor();
log.text = log.text + (hw(npcString(q[0].split(", ")[1]), 10066329) + "\n\n");
log.text = log.text + availableTxt;
executeHw();
}
log.scroll = _local2;
}
function convertDescription(desc) {
newDesc = "";
i = 0;
while (i < desc.length) {
myChar = desc.charAt(i);
if (myChar == "^") {
newDesc = newDesc + ",";
} else {
newDesc = newDesc + myChar;
}
i++;
}
return(newDesc);
}
function npcString(npcNum) {
var _local3 = _root.npcData[Number(npcNum)][0].split(", ")[0];
var _local2 = "";
_local2 = _local2 + (("NPC: " + _local3) + newline);
_local2 = _local2 + "NPC Location";
var _local4 = _root.getNpcLocations(_local3);
if (_local4.length > 1) {
_local2 = _local2 + "s";
}
_local2 = _local2 + (": " + _local4.join(", "));
return(_local2);
}
if (_root.quest_section_showing == undefined) {
_root.quest_section_showing = 0;
}
if (_root.lastIndexes == undefined) {
_root.lastIndexes = [undefined, undefined, undefined];
}
arrangeQuests();
var hwArray;
btn0.onRelease = function () {
_root.quest_section_showing = 0;
arrangeQuests();
};
btn1.onRelease = function () {
_root.quest_section_showing = 1;
arrangeQuests();
};
btn2.onRelease = function () {
_root.quest_section_showing = 2;
arrangeQuests();
};
Instance of Symbol 1691 MovieClip [UIScrollBar] "myScroll" in Symbol 3002 MovieClip [quests] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "log";
horizontal = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1681 MovieClip [List] "quests" in Symbol 3002 MovieClip [quests] Frame 1
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 3022 MovieClip [encyclopedia] Frame 1
function restrictMc(mc, minWidth, minHeight) {
if (mc.prevScaleX == undefined) {
mc.prevScaleX = mc._xscale;
mc.prevScaleY = mc._yscale;
} else {
mc._xscale = mc.prevScaleX;
mc._yscale = mc.prevScaleY;
}
if (mc._width > minWidth) {
resizeTo(mc, minWidth, true);
}
if (mc._height > minHeight) {
resizeTo(mc, minHeight, false);
}
if (mc == icons) {
icons.icon._visible = true;
}
}
function resizeTo(mc, myNum, isWidth) {
var _local2;
if (isWidth == true) {
_local2 = myNum / mc._width;
mc._width = myNum;
mc._height = mc._height * _local2;
} else {
_local2 = myNum / mc._height;
mc._width = mc._width * _local2;
mc._height = myNum;
}
}
function stickToBottom(myMc, bottomMc) {
if (isNaN(bottomMc)) {
bottomMc = bottomMc.getBounds(bottomMc._parent).yMax;
}
myMc._y = myMc._y + ((bottomMc - myMc.getBounds(myMc._parent).yMax) - 5);
}
function restrictAll(mcName) {
var _local1 = list[mcName];
restrictMc(_local1.icons, 35, 35);
restrictMc(_local1.shadowIcons, 35, 35);
stickToBottom(_local1.icons, _local1.bg);
stickToBottom(_local1.shadowIcons, _local1.bg);
if (_local1._parent == list) {
_local1._visible = true;
}
}
function newItem(item, itemNum) {
itemsList.push(item);
Obj = list.attachMovie("encListItem", "item" + String(itemsList.length - 1), itemsList.length + 1);
Obj._y = (itemsList.length - 1) * 45;
Obj.itemNum = itemNum;
var _local4 = getTypeNum();
Obj.icons.gotoAndStop(_local4);
Obj.shadowIcons.gotoAndStop(_local4);
Obj._visible = false;
setTimeout(restrictAll, 1, Obj._name);
var _local3 = item[0].split(", ")[0];
if (_root.enc_nowShowing == "objects") {
Obj.icons.icon.gotoAndStop(Obj.itemNum);
Obj.shadowIcons.icon.gotoAndStop(Obj.itemNum);
} else if (_root.enc_nowShowing == "items") {
Obj.icons.icon.gotoAndStop(Obj.itemNum + 8);
Obj.shadowIcons.icon.gotoAndStop(Obj.itemNum + 8);
} else if (_root.enc_nowShowing == "monsters") {
var _local5 = Number(item[0].split(", ")[3]);
Obj.icons.icon.gotoAndStop(_local5);
Obj.shadowIcons.icon.gotoAndStop(_local5);
}
Obj.myNum = String(itemsList.length - 1);
if ((((_root.enc_nowShowing == "monsters") && (_root.monsterStats[Obj.itemNum - 1] < 1)) || ((_root.enc_nowShowing == "objects") && (_root.objectStats[Obj.itemNum - 1] < 1))) || ((_root.enc_nowShowing == "items") && (_root.itemStats[Obj.itemNum - 1] < 1))) {
Obj.btn.onRelease = function () {
};
Obj.btn.useHandCursor = false;
Obj.txt.text = "???";
Obj.icons._visible = false;
Obj.shadowIcons._visible = !Obj.icons._visible;
} else {
Obj.btn.onRelease = function () {
selectItem(this._parent);
};
Obj.btn.useHandCursor = true;
Obj.txt.text = _local3;
if (_root.enc_nowShowing == "monsters") {
Obj.txt.text = _root.getMonsterName(_local3);
}
Obj.icons._visible = true;
Obj.shadowIcons._visible = !Obj.icons._visible;
}
var _local6 = (_root.enc_nowShowing == "monsters") && (!_root.getMonsterName(_local3, true));
if (_local6) {
Obj.character._visible = Obj.icons._visible;
Obj.shadowCharacter._visible = Obj.shadowIcons._visible;
Obj.icons._visible = (Obj.shadowIcons._visible = false);
_root.updateCharacterEquips(Number(_local3), Obj.character, true);
_root.updateCharacterEquips(Number(_local3), Obj.shadowCharacter, true);
} else {
Obj.character._visible = (Obj.shadowCharacter._visible = false);
}
}
function removeItems() {
dragger._y = startShift;
list._y = startY;
var _local1 = 0;
while (_local1 < itemsList.length) {
list["item" + _local1].removeMovieClip();
_local1++;
}
itemsList = new Array();
}
function selectNum(myNum) {
_root["enc_itemShowing_" + _root.enc_nowShowing] = myNum;
if (_root.enc_nowShowing == "monsters") {
updateMonsterData(myNum);
} else if (_root.enc_nowShowing == "objects") {
updateObjectData(myNum);
} else if (_root.enc_nowShowing == "items") {
updateItemData(myNum);
}
}
function selectItem(myItem) {
selectNum(myItem.itemNum - 1);
disableItem(myItem);
}
function disableItem(myItem) {
var _local1 = 0;
while (_local1 < itemsList.length) {
var _local2 = list["item" + _local1];
_local2.btn._visible = true;
_local1++;
}
myItem.btn._visible = false;
}
function updateItem() {
var _local4 = false;
var _local2 = 0;
while (_local2 < itemsList.length) {
var _local3 = list["item" + _local2];
if ((_local3.itemNum - 1) == _root["enc_itemShowing_" + _root.enc_nowShowing]) {
selectItem(_local3);
_local4 = true;
break;
}
_local2++;
}
}
function focusOn() {
var _local1 = 0;
while (_local1 < (itemsList.length + 5)) {
list["item" + _local1].btn.enabled = true;
_local1++;
}
closeX.enabled = true;
bg.enabled = true;
scroller._visible = itemsList.length > 10;
scroller.enableButtons();
}
function focusOff() {
var _local1 = 0;
while (_local1 < (itemsList.length + 5)) {
list["item" + _local1].btn.enabled = false;
_local1++;
}
bg.enabled = false;
closeX.enabled = false;
scroller.disableButtons();
}
function updateMonsterData(myNum) {
icons.gotoAndStop(1);
icons._y = -9999;
setTimeout(restrictMc, 1, icons, 60, 70);
setTimeout(stickToBottom, 1, icons, -150);
statsNum = _root.monsterStats[myNum];
stats.text = "Killed: " + statsNum;
var _local9 = _root.monsterData[myNum];
resetChatColor();
txt.text = "";
var _local2 = _local9[0].split(", ");
if (!_root.getMonsterName(_local2[0], true)) {
icons._visible = false;
character._visible = true;
_root.updateCharacterEquips(Number(_local2[0]), character, true);
} else {
icons._visible = true;
character._visible = false;
icons.icon.gotoAndStop(Number(_local9[0].split(", ")[3]));
icons.icon._visible = false;
}
myName.text = _root.getMonsterName(_local2[0]);
txt.text = txt.text + (((hw("Description:", 0, true) + newline) + _root.analyzeVars(_root.convertDescription(_local2[1]))) + "\n\n");
if (!_root.getMonsterName(_local2[0], true)) {
statsNum = 200;
}
if (statsNum >= 5) {
txt.text = txt.text + (hw("Active During:", 0, true) + " ");
switch (Number(_local2[4])) {
case 0 :
txt.text = txt.text + "Both Day and Night";
break;
case 1 :
txt.text = txt.text + "Day";
break;
case 2 :
txt.text = txt.text + "Night";
}
}
if (statsNum >= 20) {
txt.text = txt.text + ((newline + hw("Behavior:", 0, true)) + " ");
switch (Number(_local2[5])) {
case 0 :
txt.text = txt.text + "Normal - Responds to attacks only";
break;
case 1 :
txt.text = txt.text + "Coward - Attacks the weak";
break;
case 2 :
txt.text = txt.text + "Agressive - Attacks foes of the same level";
break;
case 3 :
txt.text = txt.text + "Dangerous - Attacks everything without thinking twice";
break;
case 4 :
txt.text = txt.text + "Story - Attacks everything on sight";
}
}
if (statsNum >= 50) {
var _local8 = _local2[6].split("-");
if (_local8.length > 1) {
txt.text = txt.text + (("\n\n" + hw("Element Used:", 0, true)) + " ");
switch (Number(_local8[0])) {
case 1 :
txt.text = txt.text + "Fire";
break;
case 2 :
txt.text = txt.text + "Ice";
break;
case 3 :
txt.text = txt.text + "Lightning";
}
tempString = "";
tempString = tempString + "Chance to ";
switch (Number(_local8[0])) {
case 1 :
tempString = tempString + "Burn";
break;
case 2 :
tempString = tempString + "Freeze";
break;
case 3 :
tempString = tempString + "Shock";
}
tempString = tempString + " (Per Hit):";
txt.text = txt.text + (((((newline + hw(tempString, 0, true)) + " ") + _local8[1]) + "%") + newline);
tempString = "";
switch (Number(_local8[0])) {
case 1 :
tempString = tempString + "Burn";
break;
case 2 :
tempString = tempString + "Freeze";
break;
case 3 :
tempString = tempString + "Shock";
}
tempString = tempString + " Duration:";
txt.text = txt.text + (((hw(tempString, 0, true) + " ") + _local8[2]) + " Minutes");
}
}
if (statsNum >= 50) {
_local2 = _local9[1].split(", ");
txt.text = txt.text + (("\n\n" + hw("Stats", 0, true)) + newline);
txt.text = txt.text + (("Gold: " + _local2[0]) + newline);
txt.text = txt.text + (("Experience: " + _local2[1]) + newline);
if (Number(_local2[2] > 0)) {
txt.text = txt.text + (("Level: " + _local2[2]) + newline);
}
if (Number(_local2[3] > 0)) {
txt.text = txt.text + (("Health: " + _local2[3]) + newline);
}
if (Number(_local2[4] > 0)) {
txt.text = txt.text + (("Stamina: " + _local2[4]) + newline);
}
if (Number(_local2[5] > 0)) {
txt.text = txt.text + (("Speed: " + _local2[5]) + newline);
}
if (Number(_local2[6] > 0)) {
txt.text = txt.text + (((("Damage: " + _local2[6]) + "-") + _local2[7]) + newline);
}
if (Number(_local2[8] > 0)) {
txt.text = txt.text + (((("Element Damage: " + _local2[8]) + "-") + _local2[9]) + newline);
}
if (Number(_local2[10] > 0)) {
txt.text = txt.text + (("Accuracy: " + _local2[10]) + newline);
}
if (Number(_local2[11] > 0)) {
txt.text = txt.text + (("Avoidability: " + _local2[11]) + newline);
}
if (Number(_local2[12] > 0)) {
txt.text = txt.text + (("Defense: " + _local2[12]) + newline);
}
if (Number(_local2[13] > 0)) {
txt.text = txt.text + (("Fire Resistance: " + _local2[13]) + newline);
}
if (Number(_local2[14] > 0)) {
txt.text = txt.text + (("Ice Resistance: " + _local2[14]) + newline);
}
if (Number(_local2[15] > 0)) {
txt.text = txt.text + (("Lightning Resistance: " + _local2[15]) + newline);
}
}
if ((statsNum >= 100) && (_local9[3] != "")) {
txt.text = txt.text + (("\n\n" + hw("Drops:", 0, true)) + newline);
var _local7 = _local9[3].split(", ");
var _local5 = 0;
while (_local5 < _local7.length) {
var _local4 = _local7[_local5].split("*");
var _local3 = _root.itemData[Number(_local4[0])];
txt.text = txt.text + _local3[0].split(", ")[0];
if (statsNum >= 200) {
var _local6 = _local4[1];
if (_local4[1] == "a") {
if (_local3[0].split(", ")[1] == "equip") {
_local6 = Number(_local3[1].split(", ")[0]);
} else {
_local6 = Number(_local3[1].split(", ")[1]);
}
}
txt.text = txt.text + ((" (" + _local6) + "%)");
}
txt.text = txt.text + newline;
_local5++;
}
}
executeHw();
}
function updateItemData(myNum) {
icons._visible = true;
character._visible = false;
icons.gotoAndStop(3);
icons.icon.gotoAndStop(myNum + 9);
icons._y = -9999;
setTimeout(restrictMc, 1, icons, 200, 200);
setTimeout(stickToBottom, 1, icons, -150);
statsNum = _root.itemStats[myNum];
stats.text = "Picked: " + statsNum;
var _local9 = _root.defineEquip(_root.itemData[myNum], true);
resetChatColor();
txt.text = "";
var _local3 = _local9[0].split(", ");
var _local7;
var _local4;
var _local2;
var _local5 = _local3[1];
var _local18 = _root.analyzeVars(_root.convertDescription(_local3[2]));
myName.text = _local3[0];
var _local16 = "";
if (_local5 != "etc") {
var _local10 = Number(_local3[3]);
var _local12 = -1;
var _local15 = false;
if (_local5 == "use") {
if (_local10 == 1) {
_local15 = true;
} else if (_local10 == 3) {
_local12 = Number(_local3[4]);
}
}
var _local14;
if (_local5 == "use") {
_local14 = _root.getUseType(_local10);
} else if (_local5 == "equip") {
_local14 = _root.getEquipType(_local10);
}
if (statsNum >= 2) {
_local16 = _local16 + (", " + _local14);
}
}
txt.text = txt.text + ((((hw("Type:", 0, true) + " ") + _root.upperInventoryType(_local5)) + _local16) + "\n\n");
txt.text = txt.text + (((hw("Description:", 0, true) + newline) + _local18) + "\n\n");
if (statsNum >= 3) {
_local3 = _local9[1].split(", ");
var _local13 = 0;
if (_local5 != "equip") {
_local13++;
txt.text = txt.text + (((hw("Max Per Slot:", 0, true) + " ") + _local3[0]) + newline);
}
txt.text = txt.text + ((((hw("Drop Chance:", 0, true) + " ") + _local3[0 + _local13]) + "%") + newline);
txt.text = txt.text + (((hw("Gold:", 0, true) + " ") + _local3[1 + _local13]) + "\n\n");
}
if (_local5 != "etc") {
_local3 = _local9[2].split(", ");
if (_local12 != -1) {
_local4 = _root[_root.getVarArray("equip", _local12)];
} else {
_local4 = _root[_root.getVarArray(_local5, _local10)];
}
_local7 = _root.getLastSlot(_local3);
if ((_local4[_local7] == "weapon_maxDamage") && (_local5 == "equip")) {
_local7 = _root.getLastSlot(_local3, _local7);
}
if (_local7 != -1) {
txt.text = txt.text + (hw("Stats:", 0, true) + newline);
}
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != 0) {
if ((_local4[_local2] == "weapon_minDamage") && (_local5 == "equip")) {
txt.text = txt.text + ((("Damage: " + _local3[_local2]) + "-") + _local3[_local2 + 1]);
} else if ((_local4[_local2] == "element_minDamage") && (_local5 == "equip")) {
txt.text = txt.text + ((("Element Damage: " + _local3[_local2]) + "-") + _local3[_local2 + 1]);
} else if (_local4[_local2] == "elementDuration") {
txt.text = txt.text + ("Side Effect Duration: " + _root.getTimeString(Number(_local3[_local2]) * 24));
} else {
var _local8 = Number(_local3[_local2].split("%")[0]);
var _local6 = ": ";
if ((_local5 == "use") && (_local8 > 0)) {
_local6 = _local6 + "+";
}
txt.text = txt.text + ((_root.replaceStat(_local4[_local2]) + _local6) + _local3[_local2]);
}
if (_local2 != _local7) {
txt.text = txt.text + newline;
}
if ((_local5 == "equip") && ((_local4[_local2] == "weapon_minDamage") || (_local4[_local2] == "element_minDamage"))) {
_local2++;
}
}
_local2++;
}
if (_local5 == "equip") {
var _local11 = _local9[4].split(", ");
if (_local10 == 3) {
txt.text = txt.text + ("\nCategory: " + _local11[3]);
txt.text = txt.text + ("\nAttack Speed: " + _root.getWeaponSpeed(Number(_local11[4])));
}
_local3 = _local9[3].split(", ");
_local4 = _root.var_req;
_local7 = _root.getLastSlot(_local3);
if (((_local7 != -1) || (_local11[0] != "All")) || (_local11[1] != "None")) {
txt.text = txt.text + ("\n\n" + hw("Requirements:", 0, true));
if (_local7 != -1) {
txt.text = txt.text + newline;
}
}
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != 0) {
txt.text = txt.text + ((_root.replaceStat(_local4[_local2]) + ": ") + _local3[_local2]);
if (_local2 != _local7) {
txt.text = txt.text + newline;
}
}
_local2++;
}
_local3 = _local9[4].split(", ");
if (_local3[0] != "All") {
txt.text = txt.text + ("\nClass: " + _local3[0]);
}
if (_local3[1] != "None") {
txt.text = txt.text + ("\nElement: " + _local3[1]);
}
if (((_local7 != -1) || (_local11[0] != "All")) || (_local11[1] != "None")) {
txt.text = txt.text + newline;
}
}
_local3 = _local9[1].split(", ");
if ((_local5 == "equip") && (Number(_local3[2]) > 0)) {
txt.text = txt.text + (newline + hw("Upgrades: " + _local3[2], 3355443));
} else if (_local15) {
txt.text = txt.text + (newline + hw("Lasts for " + _root.getTimeString(Number(_local3[3]) * 24), 3355443));
} else if (_local12 != -1) {
txt.text = txt.text + (newline + hw(("Success Rate: " + _local3[3]) + "%", 6697932));
}
}
executeHw();
}
function updateObjectData(myNum, delayed) {
icons._visible = true;
character._visible = false;
icons.gotoAndStop(2);
icons.icon.gotoAndStop(myNum + 1);
icons._y = -9999;
setTimeout(restrictMc, 1, icons, 60, 70);
setTimeout(stickToBottom, 1, icons, -150);
statsNum = _root.objectStats[myNum];
stats.text = "Picked: " + statsNum;
var _local2 = _root.objectData[myNum];
if ((_local2[4] == -1) && (delayed != true)) {
setTimeout(updateObjectData, 96, myNum, true);
}
resetChatColor();
txt.text = "";
myName.text = _local2[0];
txt.text = txt.text + (hw("Description:", 0, true) + newline);
txt.text = txt.text + _root.analyzeVars(_root.convertDescription(_local2[1]));
theObject.throwAble = Number(_local2[3]) == 1;
if (statsNum >= 1) {
if (_local2[4] != -2) {
txt.text = txt.text + ("\n\n" + hw("Picking Requirements:", 0, true));
txt.text = txt.text + "\nStrength: ";
if (_local2[4] == -1) {
if (delayed == true) {
_root.autoWeight(icons);
txt.text = txt.text + icons.weight;
}
} else {
txt.text = txt.text + _local2[4];
}
if (Number(_local2[5]) != 0) {
txt.text = txt.text + ("\nWisdom: " + _local2[5]);
}
}
}
if (statsNum >= 3) {
if (Number(_local2[3]) != 0) {
txt.text = txt.text + ("\n\n" + hw("Throwing Stats:", 0, true));
if (Number(_local2[6]) != 0) {
txt.text = txt.text + ((("\nDamage: " + _local2[6]) + "-") + _local2[7]);
}
if (Number(_local2[8]) != 0) {
txt.text = txt.text + ("\nSpeed: " + _local2[8]);
}
}
}
if (statsNum >= 10) {
if (_local2[10] != "None") {
txt.text = txt.text + ("\n\n" + hw("Element:", 0, true));
switch (_local2[10]) {
case "Fire" :
seName = "Burn";
break;
case "Ice" :
seName = "Freeze";
break;
case "Lightning" :
seName = "Shock";
break;
default :
seName = "";
}
if (Number(_local2[11]) != 0) {
txt.text = txt.text + (((((newline + _local2[10]) + " Damage: ") + _local2[11]) + "-") + _local2[12]);
}
if (Number(_local2[13]) != 0) {
txt.text = txt.text + ((((newline + seName) + " Rate: ") + _local2[13]) + "%");
}
if (Number(_local2[14]) != 0) {
txt.text = txt.text + (((newline + seName) + " Duration: ") + _root.getTimeString(Number(_local2[14]) * 24));
}
}
}
if (statsNum >= 12) {
sacString = ("Can be Sacrificed for " + _local2[9]) + " Sacrifice Point";
if (Number(_local2[9]) > 1) {
sacString = sacString + "s";
}
sacString = sacString + ".";
if (Number(_local2[9]) != 0) {
txt.text = txt.text + ("\n\n" + hw(sacString, 0, true));
}
}
executeHw();
}
function resetChatColor() {
var _local1 = new TextFormat();
_local1.color = 0;
txt.setTextFormat(_local1);
hwArray = new Array();
}
function highlightWord(word, hex, ul) {
var _local1;
var _local2 = 0;
if (ul == undefined) {
ul = false;
}
var _local4 = word.split(newline);
if (_local4.length > 1) {
_local1 = 0;
while (_local1 < _local4.length) {
highlightWord(_local4[_local1], hex, ul);
_local1++;
}
return(0);
}
_local1 = 0;
while (_local1 < txt.text.length) {
if (word.charAt(_local2) == txt.text.charAt(_local1)) {
if (_local2 == 0) {
firstchar = _local1;
} else if (_local2 >= (word.length - 1)) {
lastchar = _local1;
var _local3 = new TextFormat();
_local3.color = hex;
_local3.underline = ul;
txt.setTextFormat(firstchar, lastchar + 1, _local3);
break;
}
_local2++;
} else {
_local2 = 0;
}
_local1++;
}
}
function hw(word, hex, ul) {
hwArray.push([word, hex, ul]);
return(word);
}
function executeHw() {
var _local2 = 0;
while (_local2 < hwArray.length) {
var _local1 = hwArray[_local2];
highlightWord(_local1[0], _local1[1], _local1[2]);
_local2++;
}
myScroll._visible = txt.maxscroll > 1;
}
function updateEnc(encType) {
_root.enc_nowShowing = encType;
typeShowing.text = getType() + " Encyclopedia";
disableCat(encType);
dontSelect = _root["enc_itemShowing_" + _root.enc_nowShowing] != undefined;
removeItems();
if (_root.enc_nowShowing == "monsters") {
canShow = -1;
i = 2;
while (i < _root.monsterStats.length) {
if (_root.monsterStats[i] != -1) {
newItem(_root.monsterData[i], i + 1);
if ((_root.monsterStats[i] != 0) && (canShow == -1)) {
canShow = itemsList.length - 1;
}
}
i++;
}
if ((canShow != -1) && (dontSelect != true)) {
selectItem(list["item" + canShow]);
} else {
noData();
}
} else if (_root.enc_nowShowing == "objects") {
canShow = -1;
i = 0;
while (i < _root.objectStats.length) {
if ((_root.objectStats[i] != -1) && (Number(_root.objectData[i][4]) != -2)) {
newItem(_root.objectData[i], i + 1);
if ((_root.objectStats[i] != 0) && (canShow == -1)) {
canShow = itemsList.length - 1;
}
}
i++;
}
if ((canShow != -1) && (dontSelect != true)) {
selectItem(list["item" + canShow]);
} else {
noData();
}
} else if (_root.enc_nowShowing == "items") {
canShow = -1;
i = 0;
while (i < _root.itemStats.length) {
if (_root.itemStats[i] != -1) {
newItem(_root.itemData[i], i + 1);
if ((_root.itemStats[i] != 0) && (canShow == -1)) {
canShow = itemsList.length - 1;
}
}
i++;
}
if ((canShow != -1) && (dontSelect != true)) {
selectItem(list["item" + canShow]);
} else {
noData();
}
}
focusOn();
if (dontSelect == true) {
updateItem();
}
}
function disableCat(encType) {
cat1._x = (cat2._x = (cat3._x = -446.4));
cat1.btn.enabled = (cat2.btn.enabled = (cat3.btn.enabled = true));
switch (encType) {
case "monsters" :
catNum = 1;
break;
case "objects" :
catNum = 2;
break;
case "items" :
catNum = 3;
}
var _local2 = this["cat" + catNum];
_local2._x = -460;
_local2.btn.enabled = false;
}
function getTypeNum() {
switch (_root.enc_nowShowing) {
case "monsters" :
return(1);
case "objects" :
return(2);
case "items" :
return(3);
}
}
function getType() {
switch (_root.enc_nowShowing) {
case "monsters" :
return("Monsters");
case "objects" :
return("Objects");
case "items" :
return("Items");
}
}
function noData() {
icons._visible = false;
character._visible = false;
stats.text = "";
myName.text = "No Data";
if (_root.enc_nowShowing == "monsters") {
txt.text = hw("Monsters you encounter are added to the encyclopedia.\n\nMore data is gathered every time you kill a monster.", 0);
}
if (_root.enc_nowShowing == "objects") {
txt.text = hw("Objects you encounter are added to the encyclopedia.\n\nMore data is gathered every time you pick an object.", 0);
}
if (_root.enc_nowShowing == "items") {
txt.text = hw("Items you encounter are added to the encyclopedia.\n\nMore data is gathered every time you pick an item.", 0);
}
}
var itemsList = new Array();
startY = list._y;
startShift = dragger._y;
list.setMask(listMask);
myScroll._visible = false;
updateEnc(_root.enc_nowShowing);
bg.useHandCursor = false;
cat1.txt.text = "MONSTERS";
cat2.txt.text = "OBJECTS";
cat3.txt.text = "ITEMS";
cat1.btn.onRelease = function () {
this._parent._parent.updateEnc("monsters");
};
cat2.btn.onRelease = function () {
this._parent._parent.updateEnc("objects");
};
cat3.btn.onRelease = function () {
this._parent._parent.updateEnc("items");
};
var hwArray;
Instance of Symbol 1691 MovieClip [UIScrollBar] "myScroll" in Symbol 3022 MovieClip [encyclopedia] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "txt";
horizontal = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 3037 MovieClip [confirm_purchase] Frame 1
pur_cancel.onRelease = function () {
_parent.store.focusOn();
_root.equipFocus(true);
setTimeout(_root.updateInventory, 2);
_root.removeUI(this._parent._name);
};
pur_ok.onRelease = function () {
_parent.store.focusOn();
_root.equipFocus(true);
_root.purchaseItem(myItem, myPrice);
_root.removeUI(this._parent._name);
};
Symbol 3043 MovieClip [confirm_multipurchase] Frame 1
function updateAmount() {
if (myAmount.text == "") {
myAmount.text = 1;
}
i = 0;
while (i < myAmount.text.length) {
kCode = myAmount.text.charCodeAt(i);
if (!((kCode >= 48) && (kCode <= 57))) {
myAmount.text = prevText;
break;
}
i++;
}
if (Number(myAmount.text) > maxAmount) {
myAmount.text = maxAmount;
} else if (Number(myAmount.text) < 1) {
myAmount.text = 1;
}
if ((Number(myAmount.text) * myPrice) >= _root.gold) {
myAmount.text = Math.floor(_root.gold / myPrice);
}
prevText = myAmount.text;
setTotal();
}
function setTotal() {
total = Number(myAmount.text) * myPrice;
totalTxt.text = ("Total: " + total) + " Gold";
}
pur_cancel.onRelease = function () {
_parent.store.focusOn();
_root.equipFocus(true);
setTimeout(_root.updateInventory, 2);
_root.removeUI(this._parent._name);
};
pur_ok.onRelease = function () {
if (_root.gold >= total) {
_parent.store.focusOn();
_root.equipFocus(true);
_root.purchaseItem(myItem, myPrice, Number(myAmount.text));
_root.removeUI(this._parent._name);
}
};
myAmount.onChanged = updateAmount;
updateAmount();
Symbol 3048 MovieClip [confirm_multidrop] Frame 1
function updateAmount() {
if (myAmount.text == "") {
myAmount.text = 1;
}
i = 0;
while (i < myAmount.text.length) {
kCode = myAmount.text.charCodeAt(i);
if (!((kCode >= 48) && (kCode <= 57))) {
myAmount.text = prevText;
break;
}
i++;
}
if (Number(myAmount.text) > maxAmount) {
myAmount.text = maxAmount;
}
if (Number(myAmount.text) < 1) {
myAmount.text = 1;
}
prevText = myAmount.text;
}
pur_cancel.onRelease = function () {
_root.gamePause = false;
setTimeout(_root.updateInventory, 2);
_parent.store.focusOn();
_root.equipFocus(true);
_root.removeUI(this._parent._name);
};
pur_ok.onRelease = function () {
setTimeout(_root.dropToGround, 2, mySlot, Number(myAmount.text), myArray);
_parent.store.focusOn();
_root.equipFocus(true);
_root.removeUI(this._parent._name);
};
myAmount.onChanged = updateAmount;
updateAmount();
Symbol 3050 MovieClip [confirm_drop] Frame 1
pur_cancel.onRelease = function () {
_root.gamePause = false;
setTimeout(_root.updateInventory, 2);
_parent.store.focusOn();
_root.equipFocus(true);
_root.removeUI(this._parent._name);
};
pur_ok.onRelease = function () {
_parent.store.focusOn();
_root.equipFocus(true);
if ((myArray == _root.equips) && (_root.field.character._currentframe >= 3)) {
_root.newError("Cannot drop an equipped item while attacking");
_root.gamePause = false;
} else {
setTimeout(_root.dropToGround, 2, mySlot, 1, myArray);
if (myArray == _root.equips) {
_root.applyEquipStats(_root.equips[mySlot], "Remove");
}
}
_root.removeUI(this._parent._name);
};
Symbol 3052 MovieClip [deathWin] Frame 1
function revive() {
_root.gamePause = false;
_root.damageCounter = -100;
_root.removeUI(_name);
}
btn_ok.onRelease = function () {
myCurrentLuk = _root.luk;
if (myCurrentLuk > 100) {
myCurrentLuk = 100;
}
myPer = ((myCurrentLuk / 100) * 40) + 10;
_root.health = Math.round((_root.maxHealth * myPer) / 100);
if (_root.health < 1) {
_root.health = 1;
}
setTimeout(revive, 1);
};
Symbol 3058 MovieClip [confirm_multisell] Frame 1
function updateAmount() {
if (myAmount.text == "") {
myAmount.text = 1;
}
var _local1 = 0;
while (_local1 < myAmount.text.length) {
kCode = myAmount.text.charCodeAt(_local1);
if (!((kCode >= 48) && (kCode <= 57))) {
myAmount.text = prevText;
break;
}
_local1++;
}
if (Number(myAmount.text) > maxAmount) {
myAmount.text = maxAmount;
}
if (Number(myAmount.text) < 1) {
myAmount.text = 1;
}
prevText = myAmount.text;
total = Number(myAmount.text) * myPrice;
totalTxt.text = ("Total: " + total) + " Gold";
}
sell_cancel.onRelease = function () {
_root.gamePause = false;
setTimeout(_root.updateInventory, 2);
_parent.store.focusOn();
_root.equipFocus(true);
_root.removeUI(this._parent._name);
};
sell_ok.onRelease = function () {
setTimeout(_root.sellItem, 2, mySlot, Number(myAmount.text), myArray);
_parent.store.focusOn();
_root.equipFocus(true);
_root.removeUI(this._parent._name);
};
myAmount.onChanged = updateAmount;
updateAmount();
Symbol 3060 MovieClip [confirm_sell] Frame 1
sell_cancel.onRelease = function () {
_root.gamePause = false;
setTimeout(_root.updateInventory, 2);
_parent.store.focusOn();
_root.equipFocus(true);
_root.removeUI(this._parent._name);
};
sell_ok.onRelease = function () {
_parent.store.focusOn();
_root.equipFocus(true);
if ((myArray == _root.equips) && (_root.field.character._currentframe >= 5)) {
_root.newError("Cannot sell an equipped item while attacking");
_root.gamePause = false;
} else {
setTimeout(_root.sellItem, 2, mySlot, 1, myArray);
if (myArray == _root.equips) {
_root.applyEquipStats(_root.equips[mySlot], "Remove");
}
}
_root.removeUI(this._parent._name);
};
Symbol 3096 MovieClip Frame 1
function attachOptions(myOptions) {
myArray = new Array();
mySlot = 0;
var _local2 = myOptions.split(", ");
i = 0;
while (i < _local2.length) {
var _local1 = _local2[i].split("|");
if (_local1.length == 1) {
_local1.push(_local1[0]);
}
myArray.push(new Array(_local1[0], _local1[1]));
i++;
}
updateInformation(false);
}
function updateInformation(clicked) {
txt.text = myArray[mySlot][0];
if ((myVar != undefined) && (clicked)) {
myData = myArray[mySlot][1];
if (!isNaN(Number(myData))) {
myData = Number(myData);
}
_root[myVar] = myData;
}
}
function setTo(myData) {
i = 0;
while (i < myArray.length) {
if ((myData == myArray[i][1]) || (myData == Number(myArray[i][1]))) {
mySlot = i;
updateInformation(false);
}
i++;
}
}
var myArray = new Array("Empty");
var mySlot = 0;
rightArrow.onRelease = function () {
if (mySlot == (myArray.length - 1)) {
mySlot = 0;
} else {
mySlot++;
}
updateInformation(true);
};
leftArrow.onRelease = function () {
if (mySlot == 0) {
mySlot = myArray.length - 1;
} else {
mySlot--;
}
updateInformation(true);
};
Symbol 3104 Button
on (release) {
_root.defaultConfig(1, 1);
}
Symbol 3111 Button
on (release) {
if (_root.firstPlay) {
_root.toggleUI("options_bg");
_root.firstPlay = false;
_root.saveConfig(0);
} else {
_root.toggleUI("options_menu");
}
_root.toggleUI("configure_graphics");
}
Symbol 3113 MovieClip [configure_graphics] Frame 1
function setOptions() {
var _local2 = 0;
while (_local2 < optionsArray.length) {
optionsArray[_local2][0].attachOptions(optionsArray[_local2][1]);
_local2++;
}
clearTimeout(optionsTimeout);
_root.updateConfiguration();
}
function newComment(myBtn, myComment) {
myBtn.myComment = myComment;
myBtn.useHandCursor = false;
myBtn.onRollOver = function () {
_root.layout.chat._visible = true;
_root.layout.chat.txt.text = this.myComment;
_root.layout.chat.win = _root.layout.configure_graphics;
_root.resetChatColor();
};
myBtn.onRollOut = (myBtn.onReleaseOutside = function () {
_root.layout.chat._visible = false;
});
}
var optionsArray = new Array();
var optionsTimeout = setTimeout(setOptions, 1);
var myOptions = "";
myOptions = "Low|LOW, Medium|MEDIUM, High|HIGH";
optionsArray.push(new Array(qualitySwap, myOptions));
qualitySwap.myVar = "_quality";
myOptions = "None|0, Very Few|1, Few|2, Normal|5, Many|10, Very Many|20, Unlimited|99999";
optionsArray.push(new Array(fxSwap, myOptions));
fxSwap.myVar = "maxFX";
myOptions = "None|0, Low|1, Medium|2, High|3";
optionsArray.push(new Array(filterSwap, myOptions));
filterSwap.myVar = "maxFilter";
myOptions = "On|1, Off|0";
optionsArray.push(new Array(blurSwap, myOptions));
blurSwap.myVar = "screenBlurring";
myOptions = "On|1, Off|0";
optionsArray.push(new Array(shakeSwap, myOptions));
shakeSwap.myVar = "screenShaking";
myOptions = "On|1, Off|0";
optionsArray.push(new Array(barSwap, myOptions));
barSwap.myVar = "showBars";
newComment(info_quality, "Reduce this if the game is slow\nwhen wandering around graphical intensive maps.");
newComment(info_fx, "Reduce this if the game slows down when\nhitting enemies/using elements/going underground.");
newComment(info_fq, "Reduce this if the game slows down when\nsome objects are blurred or are glowing.");
newComment(info_sb, "Screen Blurring can cause a serious lag\nduring Screen Shaking, especially when combined\nwith high filters quality.");
newComment(info_ss, "Screen Shaking might slow the game\nif combined with Screen Blurring.");
newComment(info_mb, "Show Health and Mana Bars of Monsters.\nA Health bar pops when you damage a monster,\nand a Mana bar pops when the monster uses a skill.\nThese bars help you keep a track of the monster's stats during battle.");
newComment(info_perf, "The game performance is very low.\nYou might want to consider reducing some options.\nIt is also recommended to close all of the other windows and programs.");
Symbol 3115 Button
on (release) {
_root.toggleUI("options_menu");
_root.toggleUI("configure_sounds");
}
Symbol 3120 MovieClip Frame 1
function updateBar(myPercents) {
percents = myPercents;
myX = (myPercents * startSize) / 100;
bar._width = myX;
pointer._x = myX;
}
var percents = 100;
var startSize = bar._width;
pointer._x = startSize;
onPress = function () {
onEnterFrame = function () {
myX = _xmouse;
if (myX < 0) {
myX = 0;
} else if (myX > startSize) {
myX = startSize;
}
bar._width = myX;
pointer._x = myX;
percents = Math.round((bar._width / startSize) * 100);
if (myVar != undefined) {
_root[myVar] = percents;
}
};
};
onRelease = (onReleaseOutside = function () {
onEnterFrame = null;
});
_root.updateConfiguration();
Symbol 3123 Button
on (release) {
_root.defaultConfig(1, 0);
}
Symbol 3124 MovieClip [configure_sounds] Frame 1
musicBar.myVar = "maxMusic";
sfxBar.myVar = "maxSoundFX";
Symbol 3125 Button
on (release) {
_root.defaultConfig(1, 2);
}
Symbol 3127 Button
on (release) {
_root.updateMessageBoxes();
_root.toggleUI("options_menu");
_root.toggleUI("configure_keys");
}
Symbol 3129 Button
on (release) {
_parent.inKey(myNum);
}
Symbol 3133 MovieClip [configure_keys] Frame 1
function fadeNote() {
if (myNote._alpha <= 0) {
clearInterval(fadeInterval);
} else if (fadeTimer > 0) {
fadeTimer--;
} else {
myNote._alpha = myNote._alpha - 10;
}
}
function setKey(kCode) {
_root.command[getKey] = kCode;
getKey = -1;
organize();
}
function organize() {
var _local3 = 0;
while (_local3 < commands) {
this["line" + _local3].myNum = _local3;
this["line" + _local3].txt.text = (command_name[_local3] + ": ") + _root.keyName(_root.command[_local3]);
this["line" + _local3].gotoAndStop(1);
_local3++;
}
}
function inKey(key) {
organize();
getKey = key;
this["line" + key].txt.text = ("Press Any Key (" + command_name[key]) + ")";
this["line" + key].gotoAndStop(2);
}
function isUsed(m, returnCommand) {
var _local2 = 0;
while (_local2 < _root.command.length) {
if ((m == _root.command[_local2]) && (_local2 != getKey)) {
if (returnCommand == true) {
return(_local2);
}
return(true);
}
_local2++;
}
return(false);
}
command_name = new Array();
command_name.push("Move Up");
command_name.push("Move Right");
command_name.push("Move Left");
command_name.push("Move Down");
command_name.push("Jump/Enter Portals");
command_name.push("Skill 1");
command_name.push("Skill 2");
command_name.push("Skill 3");
command_name.push("Skill 4");
command_name.push("Switch Skills");
command_name.push("Show/Hide Pause Menu");
command_name.push("Show/Hide Inventory");
command_name.push("Pick Item/Object");
command_name.push("Show/Hide Quests");
command_name.push("Show/Hide Skills");
command_name.push("Show/Hide Equipment");
command_name.push("Show/Hide Statistics");
command_name.push("Quick Use 1");
command_name.push("Quick Use 2");
command_name.push("Quick Use 3");
commands = command_name.length;
var fadeInterval;
var fadeTimer;
getKey = -1;
keyListener = new Object();
keyListener.onKeyDown = function () {
var _local2 = Key.getCode();
var _local4 = isUsed(_local2);
if ((getKey != -1) && (!_local4)) {
setKey(_local2);
} else if ((getKey != -1) && (_local4)) {
var _local3 = isUsed(_local2, true);
myNote.text = (("The key [ " + _root.keyName(_root.command[_local3])) + " ] is already being used for ") + command_name[_local3];
myNote._alpha = 100;
fadeTimer = 120;
clearInterval(fadeInterval);
fadeInterval = setInterval(fadeNote, 1);
}
};
Key.addListener(keyListener);
organize();
_root.updateConfiguration();
Symbol 3145 Button
on (release) {
_root.gamePause = false;
_root.toggleUI("options_bg");
_root.toggleUI("options_menu");
}
Symbol 3146 Button
on (release) {
openKeys();
}
Symbol 3147 Button
on (release) {
openSounds();
}
Symbol 3148 Button
on (release) {
openGraphics();
}
Symbol 3149 Button
on (release) {
_root.initiateSaveGame();
}
Symbol 3151 Button
on (release) {
_root.initiateSaveGameAndExit();
}
Symbol 3156 Button
on (release) {
popLoad();
}
Symbol 3158 Button
on (release) {
popExit();
}
Symbol 3159 MovieClip [options_menu] Frame 1
function setOptions() {
i = 0;
while (i < optionsArray.length) {
optionsArray[i][0].attachOptions(optionsArray[i][1]);
i++;
}
clearTimeout(optionsTimeout);
}
function openKeys() {
_root.toggleUI("configure_keys");
_parent.configure_keys.getKey = -1;
_parent.configure_keys.organize();
_root.toggleUI("options_menu");
}
function openSounds() {
_root.toggleUI("configure_sounds");
_root.toggleUI("options_menu");
}
function openGraphics() {
_root.toggleUI("configure_graphics");
var _local3 = _root.avgPerformance;
if (_local3 > 100) {
_local3 = 100;
}
_parent.configure_graphics.perf.text = ("Game Performance: " + _local3) + "%";
_parent.configure_graphics.info_perf._visible = _local3 < 30;
_root.toggleUI("options_menu");
}
function popExit() {
_root.toggleUI("exitWarning");
_parent.exitWarning.yesBtn.onRelease = function () {
_root.initiateSaveGameAndExit(true);
_root.toggleUI("exitWarning");
};
_parent.exitWarning.noBtn.onRelease = function () {
_root.initiateExit();
_root.toggleUI("exitWarning");
};
_parent.exitWarning.cancelBtn.onRelease = function () {
_root.toggleUI("options_menu");
_root.toggleUI("exitWarning");
};
_root.toggleUI("options_menu");
}
function popLoad() {
_root.toggleUI("loadWarning");
_parent.loadWarning.loadBtn.onRelease = function () {
_root.loadNext = _root.savingSlot;
_root.initiateExit();
_root.toggleUI("loadWarning");
};
_parent.loadWarning.cancelBtn.onRelease = function () {
_root.toggleUI("options_menu");
_root.toggleUI("loadWarning");
};
_root.toggleUI("options_menu");
}
var optionsArray = new Array();
var optionsTimeout = setTimeout(setOptions, 1);
var myOptions = "";
myOptions = "Executioner|Executioner, Soul Hunter|Soul Hunter, Skyborn|Skyborn, Sage|Sage";
optionsArray.push(new Array(classSwap, myOptions));
classSwap.myVar = "ninjaClass";
myOptions = "Fire|Fire, Ice|Ice, Lightning|Lightning";
optionsArray.push(new Array(elementSwap, myOptions));
elementSwap.myVar = "element";
Symbol 3169 MovieClip [fix_save] Frame 1
function checkFixed() {
saveError._visible = (saveNote._visible = !isSaving);
if (isSaving) {
_visible = false;
_root.layout.fix_save._visible = false;
if (pauseOn) {
_root.addUI("options_bg");
_root.addUI("options_menu");
} else {
_root.removeUI("options_bg");
_root.removeUI("options_menu");
}
_root.gamePause = pauseOn;
mochi.as2.MochiEvents.trackEvent("Save", "Space Issue Solved");
if (exitAfter) {
_root.initiateSaveGameAndExit();
} else {
_root.initiateSaveGame();
}
}
}
function requestFlush() {
saveError._visible = false;
saveAllow._visible = true;
var _local1 = so.flush(10000000);
if (_local1 == true) {
isSaving = true;
saveAllow._visible = false;
checkFixed();
}
}
var isSaving = false;
saveAllow._visible = false;
checkFixed();
var so = SharedObject.getLocal("testObject", "/");
so.data.highScore = 56;
so.onStatus = function (infoObject) {
if (infoObject.code == "SharedObject.Flush.Failed") {
isSaving = false;
} else if (infoObject.code == "SharedObject.Flush.Success") {
isSaving = true;
}
saveAllow._visible = false;
checkFixed();
};
saveError.onRelease = requestFlush;
Symbol 3246 Button
on (release) {
_root.closeMochi();
}
Symbol 3425 MovieClip Frame 1
function updateBar(myPercents, leavePointer) {
bar._visible = true;
percents = myPercents;
myY = Math.round(((-myPercents) * startSize) / 100);
bar._height = -myY;
if (leavePointer != true) {
pointer._y = myY;
}
validateBarSize();
}
function updateAll(myArray) {
if ((!bg._visible) && (myArray != undefined)) {
updateBar(myArray[0]);
savedPercents = myArray[1];
mute = myArray[2];
if (mute) {
myIcon.gotoAndStop(2);
} else {
myIcon.gotoAndStop(1);
}
}
}
function popBar(myVisible) {
bg._visible = (bar._visible = (maskedLine._visible = (static_maskedLine._visible = (hitZone._visible = (pointer._visible = myVisible)))));
}
function myEnterFrame() {
myY = Math.round(_ymouse);
if (myY > 0) {
myY = 0;
} else if (myY < (-startSize)) {
myY = -startSize;
}
bar._height = -myY;
pointer._y = myY;
percents = Math.round(((-pointer._y) / startSize) * 100);
saveToVar();
}
function saveToVar() {
if (myVar != undefined) {
_root[myVar] = [percents, savedPercents, mute];
_root.saveConfig(0, true);
}
}
function validateBarSize() {
if (Math.round(bar._height) != (-pointer._y)) {
bar._visible = false;
clearTimeout(myTimeout);
myTimeout = setTimeout(updateBar, 1, percents, true);
}
}
var percents = 100;
var savedPercents = percents;
var mute = false;
var myTimeout;
var startSize = bar._height;
pointer._y = -startSize;
popBar(false);
myIcon.gotoAndStop(1);
onRollOver = function () {
popBar(true);
};
onPress = function () {
if (myIcon.hitTest(_root._xmouse, _root._ymouse, true)) {
mute = !mute;
if (mute) {
savedPercents = percents;
updateBar(0);
myIcon.gotoAndStop(2);
} else if (!mute) {
updateBar(savedPercents);
myIcon.gotoAndStop(1);
}
saveToVar();
} else {
mute = false;
myIcon.gotoAndStop(1);
clearTimeout(myTimeout);
myEnterFrame();
onEnterFrame = myEnterFrame;
}
};
onRollOut = (onReleaseOutside = function () {
onEnterFrame = null;
validateBarSize();
popBar(false);
});
onRelease = function () {
onEnterFrame = null;
validateBarSize();
};
Symbol 3540 MovieClip Frame 11
stop();
Symbol 3587 MovieClip Frame 30
stop();
Symbol 3595 MovieClip Frame 1
stop();
Instance of Symbol 1691 MovieClip [UIScrollBar] "logScroll" in Symbol 3641 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "log";
horizontal = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 3643 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = 480;
var cY = 300;
var sX = 960;
var sY = 600;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
camControl();
this.onUnload = resetStage;