Frame 1
_global.swf_domain = "http://www.aoedipus.net/";
_global.swf_url = "http://www.aoedipus.net/dist/";
System.security.allowDomain(_global.swf_domain);
Frame 2
SoundManager.loadExternalSound("startup_bgm", "loops/startup.mp3");
Stage.showMenu = false;
Frame 3
switch (int(Math.random() * 20)) {
case 0 :
hint = "The total amount of confusion in this world remains constant. It just gets shifted around.";
break;
case 1 :
hint = "If you experience poor performance, adjust the quality settings in your preference menu option.";
break;
case 2 :
hint = "Anticipation of death is better than death itself.";
break;
case 3 :
hint = "At the core of all well-founded belief lies belief that is unfounded.";
break;
case 4 :
hint = "The problem with instant gratification is that it takes too long.";
break;
case 5 :
hint = "Never let your schooling interfere with your education.";
break;
case 6 :
hint = "Beware of geeks bearing gifs.";
break;
case 7 :
hint = "Collaboration is essential: It allows you to blame someone else.";
break;
case 8 :
hint = "Read my MIPs - no new VAXes.";
break;
case 9 :
hint = "Where is the sea, said the fish, as they swam through it.";
break;
case 10 :
hint = "You can safely blame any bugs on Aoedipus, who is too busy grinding battlegrounds to do QA on her own work.";
break;
case 11 :
hint = "Anything worth doing is worth overdoing.";
break;
case 12 :
hint = "There is more to life than increasing its speed.";
break;
case 13 :
hint = "Don't worry, this will take about as long as the time it takes to play a 2v2 match with 4 ret pallies.";
break;
case 14 :
hint = "There is nothing worse than the brilliant image of a fuzzy concept.";
break;
case 15 :
hint = "If you are not part of the solution, you are part of the precipitate.";
break;
case 16 :
hint = "Two wrongs don't make a right, but three lefts do.";
break;
case 17 :
hint = "The heresy of today is the logic of tomorrow.";
break;
case 18 :
hint = "It's not that life is so short, it's just that you're dead a really long time.";
break;
case 19 :
hint = "Those who love sausage, the law, and holy canon should never watch any of them being made.";
break;
case 20 :
hint = "What if there were no hypothetical questions?";
}
hint = "HINT: " + hint;
Frame 7
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndPlay ("preloader");
}
bar._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
Frame 8
stop();
this.start_button_inst.onRelease = function () {
play();
};
Frame 10
this.website_link_button_inst.onRelease = function () {
getURL (_global.swf_domain, "_blank");
};
Frame 130
function quickLoad() {
var _local2;
if (_local2 == null) {
_local2 = SharedObject.getLocal("wowflash");
}
var _local1;
if (_local2.data.pref_data == null) {
_local1 = new Object();
_local1.sfx_checked = true;
_local1.sfx_value = 100;
_local1.bgm_checked = true;
_local1.bgm_value = 100;
} else {
_local1 = _local2.data.pref_data;
}
SoundManager.setBGMEnabled(_local1.bgm_checked);
SoundManager.setBGMVolume(_local1.bgm_value);
SoundManager.setSoundEnabled(_local1.sfx_checked);
SoundManager.setSoundVolume(_local1.sfx_value);
}
_global.wtf_root = this;
DebugWindow.initialize();
quickLoad();
quickLoad = null;
stop();
Instance of Symbol 906 MovieClip in Frame 130
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
Mouse.addListener(this);
onMouseDown = function () {
Mouse.hide();
startDrag (this, true);
};
}
Frame 144
fps_counter._visible = false;
stop();
Symbol 38 MovieClip [inventory_item] Frame 1
#initclip 207
Object.registerClass("inventory_item", InventoryItem);
#endinitclip
Symbol 39 MovieClip [scrolling_stage] Frame 1
#initclip 128
Object.registerClass("scrolling_stage", ScrollingStage);
#endinitclip
Symbol 40 MovieClip [scrolling_layer] Frame 1
#initclip 129
Object.registerClass("scrolling_layer", ScrollingLayer);
#endinitclip
Symbol 41 MovieClip [scrolling_player_layer] Frame 1
#initclip 130
Object.registerClass("scrolling_player_layer", ScrollingPlayerLayer);
#endinitclip
Symbol 42 MovieClip [drop_item] Frame 1
#initclip 131
Object.registerClass("drop_item", DropItem);
#endinitclip
Symbol 52 MovieClip [item_shadow] Frame 1
#initclip 132
Object.registerClass("item_shadow", Shadow);
#endinitclip
Symbol 53 MovieClip [coin_shadow] Frame 1
#initclip 133
Object.registerClass("coin_shadow", Shadow);
#endinitclip
Symbol 54 MovieClip [shadow] Frame 1
#initclip 134
Object.registerClass("shadow", Shadow);
#endinitclip
Symbol 97 MovieClip [quest_log_collapse_item] Frame 1
#initclip 135
Object.registerClass("quest_log_collapse_item", QuestLogCollapseButton);
#endinitclip
Symbol 102 MovieClip [quest_log_item] Frame 1
#initclip 136
Object.registerClass("quest_log_item", QuestLogQuestButton);
#endinitclip
Symbol 115 MovieClip [dragged_item] Frame 1
#initclip 137
Object.registerClass("dragged_item", DraggedItem);
#endinitclip
Symbol 118 MovieClip [scrolling_combat_text] Frame 1
#initclip 138
Object.registerClass("scrolling_combat_text", ScrollingCombatText);
#endinitclip
Symbol 119 MovieClip [character_item] Frame 1
#initclip 139
Object.registerClass("character_item", CharacterItem);
#endinitclip
Symbol 137 MovieClip [item_icon] Frame 1
#initclip 140
Object.registerClass("item_icon", ItemIcon);
#endinitclip
Symbol 140 MovieClip [quest_reward_display_item] Frame 1
#initclip 141
Object.registerClass("quest_reward_display_item", QuestRewardItem);
#endinitclip
Symbol 151 MovieClip [quest_reward_display_coins] Frame 1
#initclip 142
Object.registerClass("quest_reward_display_coins", QuestRewardCoins);
#endinitclip
Symbol 157 MovieClip [marios_fireball] Frame 1
#initclip 143
Object.registerClass("marios_fireball", Projectile);
#endinitclip
Symbol 164 MovieClip [fireball] Frame 1
#initclip 144
Object.registerClass("fireball", Projectile);
#endinitclip
Symbol 184 MovieClip [vendor_item] Frame 1
#initclip 145
Object.registerClass("vendor_item", VendorItem);
#endinitclip
Symbol 189 MovieClip [buyback_item] Frame 1
#initclip 146
Object.registerClass("buyback_item", VendorItem);
#endinitclip
Symbol 192 MovieClip [portal_category] Frame 1
#initclip 147
Object.registerClass("portal_category", PortalMasterCategory);
#endinitclip
Symbol 197 MovieClip [portal_item] Frame 1
#initclip 148
Object.registerClass("portal_item", PortalMasterItem);
#endinitclip
Symbol 213 MovieClip [special_effect] Frame 1
#initclip 149
Object.registerClass("special_effect", SpecialEffect);
#endinitclip
Symbol 217 MovieClip [chat_bubble] Frame 1
#initclip 150
Object.registerClass("chat_bubble", ChatBubble);
#endinitclip
Symbol 220 MovieClip [shadow_bolt] Frame 1
#initclip 151
Object.registerClass("shadow_bolt", Projectile);
#endinitclip
Symbol 234 MovieClip [npc_symbol] Frame 1
#initclip 152
Object.registerClass("npc_symbol", AttachableObject);
#endinitclip
Symbol 237 MovieClip [ice_bolt] Frame 1
#initclip 153
Object.registerClass("ice_bolt", Projectile);
#endinitclip
Symbol 240 MovieClip [shortcut_item] Frame 1
#initclip 154
Object.registerClass("shortcut_item", ShortcutItem);
#endinitclip
Symbol 241 MovieClip [blank_projectile] Frame 1
#initclip 155
Object.registerClass("blank_projectile", Projectile);
#endinitclip
Symbol 244 MovieClip [weather_effect] Frame 1
#initclip 156
Object.registerClass("weather_effect", WeatherEffect);
#endinitclip
Symbol 251 MovieClip [quest_selection] Frame 1
#initclip 157
Object.registerClass("quest_selection", QuestSelection);
#endinitclip
Symbol 285 MovieClip [demon_bolt] Frame 1
#initclip 158
Object.registerClass("demon_bolt", Projectile);
#endinitclip
Symbol 287 MovieClip [smite] Frame 1
#initclip 159
Object.registerClass("smite", Projectile);
#endinitclip
Symbol 302 MovieClip [agony_bolt] Frame 1
#initclip 160
Object.registerClass("agony_bolt", Projectile);
#endinitclip
Symbol 305 MovieClip [magic_bolt] Frame 1
#initclip 161
Object.registerClass("magic_bolt", Projectile);
#endinitclip
Symbol 321 MovieClip [bullet] Frame 1
#initclip 162
Object.registerClass("bullet", Projectile);
#endinitclip
Symbol 326 MovieClip [ice_trap] Frame 1
#initclip 163
Object.registerClass("ice_trap", Projectile);
#endinitclip
Symbol 332 MovieClip [arcane_explosion] Frame 11
stop();
Symbol 337 MovieClip [flame_wreath_prison] Frame 1
#initclip 164
Object.registerClass("flame_wreath_prison", NPCTemplate);
#endinitclip
startHitCheck();
Symbol 337 MovieClip [flame_wreath_prison] Frame 60
endAction("idle");
Symbol 357 MovieClip [level_up_base] Frame 14
stop();
Symbol 359 MovieClip [arcane_orb] Frame 1
#initclip 165
Object.registerClass("arcane_orb", NPCTemplate);
#endinitclip
startHitCheck();
Symbol 359 MovieClip [arcane_orb] Frame 20
stopHitCheck();
endAction("float");
Symbol 365 MovieClip [Defaults] Frame 1
#initclip 119
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 366 MovieClip [UIObjectExtensions] Frame 1
#initclip 120
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 367 MovieClip [UIObject] Frame 1
#initclip 121
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 370 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 371 MovieClip Frame 1
#initclip 122
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 374 MovieClip [FocusRect] Frame 1
#initclip 123
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 375 MovieClip [FocusManager] Frame 1
#initclip 124
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 376 MovieClip [UIComponentExtensions] Frame 1
#initclip 125
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 377 MovieClip [UIComponent] Frame 1
#initclip 126
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 378 MovieClip [Label] Frame 1
#initclip 127
Object.registerClass("Label", mx.controls.Label);
#endinitclip
stop();
Symbol 397 MovieClip [fps_counter] Frame 1
#initclip 166
Object.registerClass("fps_counter", FPSCounter);
#endinitclip
Instance of Symbol 378 MovieClip [Label] "fps_label" in Symbol 397 MovieClip [fps_counter] Frame 1
//component parameters
onClipEvent (construct) {
autoSize = "none";
html = false;
text = "fps: ";
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 378 MovieClip [Label] "x_label" in Symbol 397 MovieClip [fps_counter] Frame 1
//component parameters
onClipEvent (construct) {
autoSize = "none";
html = false;
text = "x_loc:";
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 398 MovieClip [debug_parser] Frame 1
#initclip 167
Object.registerClass("debug_parser", DebugParser);
#endinitclip
Symbol 399 MovieClip [drag_window] Frame 1
#initclip 168
Object.registerClass("drag_window", DragWindow);
#endinitclip
Symbol 406 MovieClip [check_box] Frame 1
#initclip 169
Object.registerClass("check_box", CustomCheckBox);
#endinitclip
Symbol 413 MovieClip [slider_bar] Frame 1
#initclip 170
Object.registerClass("slider_bar", CustomSliderBar);
#endinitclip
Symbol 441 MovieClip [prefs_win] Frame 1
#initclip 171
Object.registerClass("prefs_win", PrefsUI);
#endinitclip
Symbol 443 MovieClip [help_btn] Frame 1
#initclip 172
Object.registerClass("help_btn", HelpToggleButton);
#endinitclip
Symbol 457 MovieClip [quest_log_log_scroll] Frame 1
#initclip 173
Object.registerClass("quest_log_log_scroll", VScrollBar);
#endinitclip
Symbol 458 MovieClip [quest_log_text_scroll] Frame 1
#initclip 174
Object.registerClass("quest_log_text_scroll", VScrollBar);
#endinitclip
Symbol 461 MovieClip [quest_giver_scroll] Frame 1
#initclip 175
Object.registerClass("quest_giver_scroll", VScrollBar);
#endinitclip
Symbol 470 MovieClip [cast_bar] Frame 1
#initclip 176
Object.registerClass("cast_bar", CastBar);
#endinitclip
Symbol 473 MovieClip [prefs_btn] Frame 1
#initclip 177
Object.registerClass("prefs_btn", PrefsToggleButton);
#endinitclip
Symbol 476 MovieClip [quit_button] Frame 1
#initclip 178
Object.registerClass("quit_button", QuitToggleButton);
#endinitclip
Symbol 483 MovieClip [exp_bar] Frame 1
#initclip 179
Object.registerClass("exp_bar", ExperienceBar);
#endinitclip
Symbol 486 MovieClip [map_button] Frame 1
#initclip 180
Object.registerClass("map_button", MapToggleButton);
#endinitclip
Symbol 489 MovieClip [quest_log_button] Frame 1
#initclip 181
Object.registerClass("quest_log_button", QuestLogToggleButton);
#endinitclip
Symbol 495 MovieClip [character_button] Frame 1
#initclip 182
Object.registerClass("character_button", PlayerCharacterToggleButton);
#endinitclip
Symbol 499 MovieClip [inventory_button] Frame 1
#initclip 183
Object.registerClass("inventory_button", InventoryToggleButton);
#endinitclip
Symbol 502 MovieClip [thrown_weapon_icon] Frame 1
#initclip 184
Object.registerClass("thrown_weapon_icon", ThrownWeaponIcon);
#endinitclip
Symbol 506 MovieClip Frame 1
stop();
Symbol 507 MovieClip [attack_cooldown_icon] Frame 1
#initclip 185
Object.registerClass("attack_cooldown_icon", AttackCooldownIcon);
#endinitclip
Symbol 509 MovieClip [shortcut_bar] Frame 1
#initclip 186
Object.registerClass("shortcut_bar", ShortcutBarUI);
#endinitclip
Symbol 515 MovieClip [clock] Frame 1
#initclip 187
Object.registerClass("clock", Clock);
#endinitclip
Symbol 524 MovieClip [chat_log_win] Frame 1
#initclip 188
Object.registerClass("chat_log_win", ChatLogUI);
#endinitclip
Symbol 528 MovieClip [npc_character_ui_toggle_dot] Frame 1
#initclip 189
Object.registerClass("npc_character_ui_toggle_dot", NPCCharacterToggleButton);
#endinitclip
Symbol 531 MovieClip [equip_rollover] Frame 1
#initclip 190
Object.registerClass("equip_rollover", EquipInfo);
#endinitclip
Symbol 533 MovieClip [item_rollover] Frame 1
#initclip 191
Object.registerClass("item_rollover", ItemInfo);
#endinitclip
Symbol 534 MovieClip [scrolling_zone] Frame 1
#initclip 192
Object.registerClass("scrolling_zone", ScrollingZone);
#endinitclip
Symbol 553 MovieClip [player_info] Frame 1
#initclip 193
Object.registerClass("player_info", PlayerInfoUI);
#endinitclip
Symbol 561 MovieClip [npc_info] Frame 1
#initclip 194
Object.registerClass("npc_info", NPCInfoUI);
#endinitclip
Symbol 565 MovieClip [map_elwynn] Frame 1
#initclip 195
Object.registerClass("map_elwynn", MapUI);
#endinitclip
Symbol 584 MovieClip [portal_win] Frame 1
#initclip 196
Object.registerClass("portal_win", PortalMasterUI);
#endinitclip
Symbol 591 MovieClip [vendor_win] Frame 1
#initclip 197
Object.registerClass("vendor_win", VendorUI);
#endinitclip
Symbol 597 MovieClip [inventory] Frame 1
#initclip 198
Object.registerClass("inventory", InventoryUI);
#endinitclip
Symbol 598 MovieClip [inventory_win_nocoins] Frame 1
#initclip 199
Object.registerClass("inventory_win_nocoins", InventoryUI);
#endinitclip
Symbol 610 MovieClip [quest_log] Frame 1
#initclip 200
Object.registerClass("quest_log", QuestLogUI);
#endinitclip
Symbol 621 MovieClip [quest_giver] Frame 1
#initclip 201
Object.registerClass("quest_giver", QuestGiverUI);
#endinitclip
Symbol 701 MovieClip [help_win] Frame 1
#initclip 202
Object.registerClass("help_win", HelpUI);
#endinitclip
stop();
Symbol 719 MovieClip [character_win] Frame 1
#initclip 203
Object.registerClass("character_win", CharacterUI);
#endinitclip
Symbol 721 MovieClip [game_engine] Frame 1
#initclip 204
Object.registerClass("game_engine", GameEngine);
#endinitclip
Symbol 816 MovieClip Frame 1
stop();
Symbol 827 MovieClip Frame 1
stop();
Symbol 864 MovieClip [startup_win] Frame 1
#initclip 205
Object.registerClass("startup_win", StartupUI);
#endinitclip
stop();
Symbol 865 MovieClip [sound_manager] Frame 1
#initclip 206
Object.registerClass("sound_manager", SoundManager);
#endinitclip
Symbol 3914 MovieClip [__Packages.ScrollingStage] Frame 0
class ScrollingStage extends MovieClip
{
static var current_stage;
var object_list, pan_x, current_time, layers, max_x, ground_level, friction, getNextHighestDepth, attachMovie, player_layer, current_weather, day_night_cycle, weather_cycle, removeMovieClip;
function ScrollingStage () {
super();
current_stage = this;
object_list = new Array();
pan_x = 0;
current_time = -1;
layers = new Array();
}
function extractData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "stage") {
max_x = Number(xml_data.attributes.maxX);
ground_level = Number(xml_data.attributes.groundLevel);
friction = Number(xml_data.attributes.friction);
var _local4;
var _local3;
var _local2 = xml_data.firstChild;
while (_local2 != null) {
switch (_local2.nodeName.toLowerCase()) {
case "layer" :
_local4 = getNextHighestDepth();
_local3 = attachMovie("scrolling_layer", "layer" + _local4, _local4);
_local3.extractData(_local2);
layers.push(_local3);
break;
case "playerlayer" :
_local4 = getNextHighestDepth();
_local3 = attachMovie("scrolling_player_layer", "layer" + _local4, _local4);
_local3.extractData(_local2);
layers.push(_local3);
player_layer = ScrollingPlayerLayer(_local3);
}
_local2 = _local2.nextSibling;
}
if (weather_enabled) {
var _local5 = 0;
while (_local5 < layers.length) {
if (layers[_local5].is_effect_layer && (current_weather.effect != null)) {
layers[_local5].spawnEffects();
}
_local5++;
}
}
}
}
function extractWeatherData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "stage") {
var _local4 = xml_data.firstChild;
while (_local4 != null) {
switch (_local4.nodeName.toLowerCase()) {
case "daynightcycle" :
day_night_cycle = new Array();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName.toLowerCase() == "time") {
var _local3 = new Object();
_local3.name = _local2.attributes.name;
_local3.hour = Number(_local2.attributes.hour);
day_night_cycle.push(_local3);
}
_local2 = _local2.nextSibling;
}
break;
case "weathercycle" :
weather_cycle = new Array();
_local2 = _local4.firstChild;
for(;;){
if (_local2 == null) {
break;
}
if (_local2.nodeName.toLowerCase() == "weather") {
var _local3 = new Object();
_local3.name = _local2.attributes.dispName;
_local3.effect = _local2.attributes.effect;
_local3.tint = _local2.attributes.tint;
_local3.probability = Number(_local2.attributes.probability);
weather_cycle.push(_local3);
}
_local2 = _local2.nextSibling;
};
}
_local4 = _local4.nextSibling;
}
}
current_weather = null;
if (weather_cycle != null) {
var _local7 = Math.random();
var _local6 = 0;
var _local5 = 0;
while ((_local5 < weather_cycle.length) && (current_weather == null)) {
_local6 = _local6 + weather_cycle[_local5].probability;
if (_local6 >= _local7) {
current_weather = weather_cycle[_local5];
}
_local5++;
}
}
}
function extractStaticObjectData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "staticobjects") {
var _local3 = xml_data.firstChild;
while (_local3 != null) {
if (!(_local3.nodeName.toLowerCase() === "object")) {
} else {
var _local4 = _local3.attributes.layer;
var _local2 = 0;
while (_local2 < layers.length) {
if (_local4 == layers[_local2].layer_name) {
layers[_local2].extractStaticObjectData(_local3);
}
_local2++;
}
}
_local3 = _local3.nextSibling;
}
} else {
DebugWindow.debug("static object list not found");
}
}
function onEnterFrame() {
var _local3 = PlayerCharacter.current_player.global_x;
if ((_local3 - pan_x) < (GameConstants.SCREEN_WIDTH * GameConstants.EDGE_PERCENTAGE)) {
pan_x = _local3 - (GameConstants.SCREEN_WIDTH * GameConstants.EDGE_PERCENTAGE);
}
if ((_local3 - pan_x) > (GameConstants.SCREEN_WIDTH * (1 - GameConstants.EDGE_PERCENTAGE))) {
pan_x = _local3 - (GameConstants.SCREEN_WIDTH * (1 - GameConstants.EDGE_PERCENTAGE));
}
if (pan_x < 0) {
pan_x = 0;
}
if ((pan_x + GameConstants.SCREEN_WIDTH) > max_x) {
pan_x = max_x - GameConstants.SCREEN_WIDTH;
}
var _local2 = 0;
while (_local2 < layers.length) {
layers[_local2].syncCoordinates();
_local2++;
}
_local2 = 0;
while (_local2 < object_list.length) {
if (object_list[_local2]._name == null) {
object_list.splice(_local2, 1);
_local2--;
} else {
object_list[_local2].syncCoordinates();
}
_local2++;
}
}
function deleteStage() {
removeMovieClip();
}
function getTintArray() {
var _local8 = new Array();
var _local7 = false;
if (current_time == -1) {
_local7 = true;
}
if ((day_night_cycle != null) && (day_night_enabled)) {
var _local3 = -1;
var _local4 = 25;
var _local5 = null;
var _local6 = null;
if (current_time == -1) {
var _local10 = new Date();
current_time = _local10.getHours() + (_local10.getMinutes() / 60);
DebugWindow.debug("DEBUG : Current time is " + current_time);
}
var _local2 = 0;
while (_local2 < day_night_cycle.length) {
if ((day_night_cycle[_local2].hour > _local3) && (day_night_cycle[_local2].hour < current_time)) {
_local3 = day_night_cycle[_local2].hour;
_local5 = day_night_cycle[_local2].name;
}
if ((day_night_cycle[_local2].hour < _local4) && (day_night_cycle[_local2].hour > current_time)) {
_local4 = day_night_cycle[_local2].hour;
_local6 = day_night_cycle[_local2].name;
}
if (day_night_cycle[_local2].hour == current_time) {
_local5 = day_night_cycle[_local2].name;
_local6 = day_night_cycle[_local2].name;
_local3 = 25;
_local4 = -1;
}
_local2++;
}
var _local11 = _local4 - _local3;
if (_local5 == _local6) {
var _local9 = new Object();
_local9.name = _local5;
_local9.percentage = 1;
if (_local7) {
DebugWindow.debug("DEBUG : Day/night pattern is exactly " + _local9.name);
}
_local8.push(_local9);
} else {
if (_local5 != null) {
var _local9 = new Object();
_local9.name = _local5;
_local9.percentage = 1 - ((current_time - _local3) / _local11);
if (_local7) {
DebugWindow.debug(((("DEBUG : Lower bound day/night pattern is " + _local9.name) + " at ") + _local9.percentage) + " percent");
}
_local8.push(_local9);
} else if (_local7) {
DebugWindow.debug("ERROR : Lower bound day/night pattern not found for hour " + current_time);
}
if (_local6 != null) {
var _local9 = new Object();
_local9.name = _local6;
_local9.percentage = (current_time - _local3) / _local11;
if (_local7) {
DebugWindow.debug(((("DEBUG : Upper bound day/night pattern is " + _local9.name) + " at ") + _local9.percentage) + " percent");
}
_local8.push(_local9);
} else if (_local7) {
DebugWindow.debug("ERROR : Upper bound day/night pattern not found for hour " + current_time);
}
}
}
if (((current_weather != null) && (current_weather.tint != null)) && (weather_enabled)) {
var _local9 = new Object();
_local9.name = current_weather.tint;
_local9.percentage = 1;
_local8.push(_local9);
}
return(_local8);
}
function spawnNPC(data) {
if (data == null) {
DebugWindow.debug("ERROR: NPC data not found, spawn failed");
}
var _local3 = player_layer.getNextHighestDepth();
var _local2 = player_layer.attachMovie(data.movieclip_id, "npc" + _local3, _local3);
_local2.data = data;
object_list.push(_local2);
return(_local2);
}
function spawnItem(item_name, stack) {
if (stack == null) {
stack = 1;
}
var _local4 = ItemList.getId(item_name);
if (new_item.item_id == -1) {
DebugWindow.debug(("ERROR: Item name " + item_name) + " is not in database");
}
if (!ItemList.uniqueCheck(item_name)) {
return(null);
}
if (!ItemList.questCheck(item_name)) {
return(null);
}
var _local3 = player_layer.getNextHighestDepth();
var new_item = player_layer.attachMovie("drop_item", "item" + _local3, _local3);
new_item.item_id = _local4;
new_item.stack = stack;
object_list.push(new_item);
return(new_item);
}
function spawnProjectile(projectile_name) {
var _local3 = ProjectileList.data[ProjectileList.getId(projectile_name)];
if (_local3 == null) {
DebugWindow.debug(("ERROR: Projectile name " + projectile_name) + " is not in database");
}
var _local4 = player_layer.getNextHighestDepth();
var _local2 = player_layer.attachMovie(_local3.id, "projectile" + _local4, _local4);
_local2.data = _local3;
object_list.push(_local2);
return(_local2);
}
function spawnCharEffect(sfx_name, attach, apply_attach) {
var _local3 = attach;
if (!apply_attach) {
_local3 = null;
}
return(spawnEffect(attach._x, (attach._y - (-attach.body_box._y)) + Math.abs(attach.body_box._height / 2), attach.body_box._width / 2, attach.body_box._height / 2, sfx_name, _local3));
}
function spawnEffect(x, y, half_w, half_h, sfx_name, attach) {
if (SpecialEffectList.getId(sfx_name) == -1) {
DebugWindow.debug(("ERROR : Special effects name " + sfx_name) + " is not in database");
}
var _local3 = player_layer.getNextHighestDepth();
var _local2 = player_layer.attachMovie("special_effect", "sfx" + _local3, _local3);
_local2._x = x;
_local2._y = y;
_local2.attach_obj = attach;
_local2.data = SpecialEffectList.data[SpecialEffectList.getId(sfx_name)];
_local2.initialize(half_w, half_h);
object_list.push(_local2);
return(_local2);
}
function spawnWeatherEffect(attach) {
if (current_weather == null) {
return(undefined);
}
if (SpecialEffectList.getId(current_weather.effect) == -1) {
DebugWindow.debug(("ERROR :Weather effect name " + current_weather.effect) + " is not in database");
}
var _local3 = getNextHighestDepth();
var _local2 = attachMovie("weather_effect", "weather_effect" + _local3, _local3);
_local2.data = SpecialEffectList.data[SpecialEffectList.getId(current_weather.effect)];
_local2.initialize(GameConstants.SCREEN_WIDTH / 2, GameConstants.SCREEN_HEIGHT / 2);
object_list.push(_local2);
return(_local2);
}
function spawnCombatText(x, y, text, color) {
var _local3 = player_layer.getNextHighestDepth();
var _local2 = player_layer.attachMovie("scrolling_combat_text", "sct" + _local3, _local3);
_local2.text = "";
_local2.health_text = "";
_local2.mana_text = "";
_local2._x = (x + int(Math.random() * 70)) - 35;
_local2._y = y - int(Math.random() * 55);
_local2.text = text;
if (combat_text_enabled) {
_local2.text = _local2.text + GameConstants.DAMAGE_COLOR_TEXT[color];
}
_local2.color_filter = GameConstants.DAMAGE_COLOR_TABLE[color];
_local2.initialize();
object_list.push(_local2);
}
function spawnChat(x, y, attach, text, color) {
var _local3 = player_layer.getNextHighestDepth();
var _local2 = player_layer.attachMovie("chat_bubble", "chat" + _local3, _local3);
_local2.chat_text = text;
if (!isNaN(color)) {
_local2.chat_color = color;
}
_local2._x = x;
_local2._y = y;
_local2.attach_obj = attach;
_local2.initialize();
object_list.push(_local2);
return(_local2);
}
function spawnAttachable(x, y, src, attach) {
var _local3 = player_layer.getNextHighestDepth();
var _local2 = player_layer.attachMovie(src, "attach" + _local3, _local3);
_local2._x = x;
_local2._y = y;
_local2.attach_obj = attach;
_local2.initialize();
object_list.push(_local2);
return(_local2);
}
function cleanUp() {
var _local2 = 0;
while (_local2 < object_list) {
object_list[_local2].cleanUp();
object_list[_local2].removeMovieClip();
_local2++;
}
object_list = new Array();
}
static var day_night_enabled = true;
static var weather_enabled = true;
static var combat_text_enabled = true;
}
Symbol 3915 MovieClip [__Packages.ScrollingPlayerLayer] Frame 0
class ScrollingPlayerLayer extends MovieClip
{
var attachMovie;
function ScrollingPlayerLayer () {
super();
}
function extractData(xml_data) {
var _local3 = PlayerList.data[PlayerList.getId(_global.avatar)];
attachMovie(_local3.movieclip_id, "player", 1);
}
}
Symbol 3916 MovieClip [__Packages.PlayerList] Frame 0
class PlayerList extends Object
{
static var data;
function PlayerList () {
super();
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Array();
if (xml_data.nodeName.toLowerCase() == "playerlist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "player")) {
} else {
data.push(extractPlayerData(_local1));
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function extractPlayerData(xml_data) {
var _local2;
_local2 = new PlayerListData();
if (xml_data.nodeName.toLowerCase() == "player") {
_local2.name = xml_data.attributes.name;
_local2.display_name = xml_data.attributes.dispName;
_local2.portrait = xml_data.attributes.portrait;
_local2.profile = xml_data.attributes.profile;
_local2.movieclip_id = xml_data.attributes.id;
_local2.weapon_prefix = xml_data.attributes.weaponAnimPrefix;
_local2.move_speed = Number(xml_data.attributes.moveSpeed);
_local2.jump_speed = Number(xml_data.attributes.jumpSpeed);
var _local1 = xml_data.firstChild;
while (_local1 != null) {
switch (_local1.nodeName.toLowerCase()) {
case "identity" :
_local2.identity = new Identity(_local1);
break;
case "actiontable" :
_local2.action_table = extractActionTable(_local2.weapon_prefix, _local1);
}
_local1 = _local1.nextSibling;
}
return(_local2);
}
return(null);
}
static function extractActionTable(player_name, xml_data) {
var _local3;
_local3 = new Object();
if (xml_data.nodeName.toLowerCase() == "actiontable") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "action")) {
} else {
var _local2 = new Object();
_local2.action_name = _local1.attributes.name;
_local2.action_link = _local1.attributes.link;
_local2.animation_type = _local1.attributes.type;
_local2.animation_data = _local1.attributes.anim;
_local2.cue_effect = false;
if (_local1.attributes.sound != null) {
SoundManager.loadExternalSound(player_name + _local2.action_name, _local1.attributes.sound);
}
_local2.wound_immune = _local1.attributes.woundImmune == "true";
_local2.sound = _local1.attributes.sound;
_local2.effect = _local1.attributes.effect;
if (_local1.attributes.cueEffect != null) {
_local2.cue_effect = _local1.attributes.cueEffect == "true";
}
_local3[_local2.action_name] = _local2;
}
_local1 = _local1.nextSibling;
}
return(_local3);
}
return(null);
}
static function getId(player_name) {
var _local1 = 0;
while (_local1 < data.length) {
if (data[_local1].name == player_name) {
return(_local1);
}
_local1++;
}
DebugWindow.debug(("ERROR: Player name " + player_name) + " is not available");
return(-1);
}
static var is_loaded = false;
}
Symbol 3917 MovieClip [__Packages.XMLManager] Frame 0
class XMLManager extends Object
{
static var xml_loader, load_queue, loading_amount, last_filename, last_target;
function XMLManager () {
super();
}
static function loadXML(file_name, targ) {
if (xml_loader == null) {
xml_loader = new XML();
xml_loader.onData = function (src) {
if (src == undefined) {
this.onLoad(false);
} else {
XMLManager.checkSyntax(src);
this.parseXML(src);
this.loaded = true;
this.onLoad(true);
}
};
xml_loader.onLoad = function (succ) {
if (!succ) {
DebugWindow.debug(("ERROR : XML file " + XMLManager.last_filename) + " fails to load");
} else {
LoaderUI.current_loader.addProgress(5);
}
XMLManager.last_target(XMLManager.xml_loader.firstChild);
XMLManager.loading_amount = 0;
if (XMLManager.load_queue.length > 0) {
XMLManager.loadQueue();
}
};
load_queue = new Array();
loading_amount = 0;
}
var _local2 = new Object();
_local2.file_name = file_name;
_local2.targ = targ;
LoaderUI.current_loader.addTotal(5);
load_queue.push(_local2);
if ((load_queue.length + loading_amount) == 1) {
loadQueue();
}
}
static function loadQueue() {
var _local2 = load_queue.shift();
last_filename = _local2.file_name;
last_target = _local2.targ;
DebugWindow.debug("SYS : Loading XML file " + last_filename);
loading_amount = 1;
xml_loader.load(_global.swf_url + last_filename);
}
static function checkSyntax(src) {
}
}
Symbol 3918 MovieClip [__Packages.DebugWindow] Frame 0
class DebugWindow
{
static var debug_layer, white_screen, debug_text, prompt, prompt_enabled;
function DebugWindow () {
}
static function initialize() {
debug_layer = _global.wtf_root.createEmptyMovieClip("debug_layer_inst", debug_depth);
debug_layer.onResize = function () {
DebugWindow.resizeWindow();
};
debug_layer.onKeyDown = function () {
DebugWindow.keyEvent();
};
Stage.addListener(debug_layer);
Key.addListener(debug_layer);
Mouse.addListener(debug_layer);
white_screen = debug_layer.createEmptyMovieClip("white_screen_inst", 1);
white_screen.beginFill(0, 75);
white_screen.moveTo(0, 0);
white_screen.lineTo(0, 1);
white_screen.lineTo(1, 1);
white_screen.lineTo(1, 0);
white_screen.endFill();
debug_text = debug_layer.createTextField("debug_text_inst", 2, 0, 0, 1, 1);
var _local2 = new TextFormat();
_local2.color = 16777215 /* 0xFFFFFF */;
_local2.font = "_sans";
_local2.bold = false;
_local2.size = 11;
debug_text.setNewTextFormat(_local2);
debug_text.text = "";
prompt = debug_layer.createTextField("prompt_text_inst", 3, 0, 0, 1, 1);
prompt.type = "input";
prompt.background = true;
prompt.backgroundColor = 3355443 /* 0x333333 */;
prompt.border = true;
prompt.setNewTextFormat(_local2);
prompt.text = "";
prompt.onSetFocus = function (oldFocus) {
Selection.setFocus(oldFocus);
};
prompt_enabled = false;
resizeWindow();
debug("Simple Debug ver. 1.0 loaded\r");
debug_layer._visible = false;
}
static function resizeWindow() {
white_screen._width = Stage.width;
white_screen._height = Stage.height;
debug_text._width = Stage.width;
prompt._width = Stage.width;
prompt._height = prompt.textHeight + 6;
prompt._y = Stage.height - prompt._height;
debug_text._height = Stage.height - prompt._height;
}
static function hide() {
debug_layer._visible = false;
debug_text.selectable = false;
setPrompt(false);
}
static function show() {
debug_layer._visible = true;
debug_text.selectable = true;
Selection.setFocus(prompt);
setPrompt(true);
}
static function keyEvent() {
if ((Key.isDown(192) && (Key.isDown(17))) && (Key.isDown(16))) {
debug_layer._visible = !debug_layer._visible;
if (!debug_layer._visible) {
hide();
} else {
show();
}
}
if (prompt_enabled) {
if (Key.getCode() == 13) {
promptInput();
}
}
}
static function ignoreNext(count) {
if (isNaN(count)) {
count = 1;
}
ignore_count = ignore_count + count;
}
static function clearScreen() {
debug_text.text = "";
}
static function debug(text) {
if (ignore_all) {
return(undefined);
}
var _local1 = 0;
while (_local1 < IGNORE_TYPES.length) {
if (text.indexOf(IGNORE_TYPES[_local1]) == 0) {
return(undefined);
}
_local1++;
}
if (ignore_count > 0) {
ignore_count--;
return(undefined);
}
debug_text.text = debug_text.text + (text + newline);
if (!Key.isDown(16)) {
debug_text.scroll = debug_text.maxscroll;
}
}
static function setCriticalError() {
debug_layer._visible = true;
debug("ERROR : The game has encountered a critical error. No further debug messages will be printed.");
ignore_all = true;
}
static function setPrompt(enable) {
prompt_enabled = enable;
}
static function promptInput() {
_global.wtf_root.debug_parser_inst.process(prompt.text);
}
static var debug_depth = 1000;
static var ignore_count = 0;
static var ignore_all = false;
static var IGNORE_TYPES = ["DEBUG", "SYS"];
}
Symbol 3919 MovieClip [__Packages.WindowUI] Frame 0
class WindowUI extends MovieClip
{
var init_x, _x, init_y, _y, drag_area, close_button_inst, dragging, lock_x, _parent, lock_y, _visible, swapDepths;
function WindowUI () {
super();
}
function onLoad() {
var self = this;
init_x = _x;
init_y = _y;
drag_area.onPress = function () {
self.dragging = true;
self.lock_x = self._parent._xmouse - self._x;
self.lock_y = self._parent._ymouse - self._y;
self.swapToTop();
};
Mouse.addListener(this);
close_button_inst.onRelease = function () {
self.hide();
self.toggle_object.setActivate(false);
};
hide();
}
function onEnterFrame() {
if (dragging) {
_x = _parent._xmouse - lock_x;
_y = _parent._ymouse - lock_y;
}
}
function onMouseUp() {
dragging = false;
}
function show() {
_visible = true;
_x = init_x;
_y = init_y;
swapToTop();
}
function hide() {
_visible = false;
}
function swapToTop() {
swapDepths(highest_layer);
highest_layer++;
}
static var highest_layer = 1;
}
Symbol 3920 MovieClip [__Packages.LoaderUI] Frame 0
class LoaderUI extends WindowUI
{
static var current_loader;
var _visible, amount_loaded, load_total, loading_bar_inst;
function LoaderUI () {
super();
current_loader = this;
}
function onLoad() {
super.onLoad();
_visible = false;
}
function isLoaded() {
return(load_total <= amount_loaded);
}
function show() {
_visible = true;
update();
}
function clear() {
load_total = 0;
amount_loaded = 0;
}
function update() {
if (load_total == 0) {
loading_bar_inst._xscale = 0;
return(undefined);
}
loading_bar_inst._xscale = int((amount_loaded / load_total) * 100);
if (loading_bar_inst._xscale > 100) {
loading_bar_inst._xscale = 100;
}
if (loading_bar_inst._xscale < 0) {
loading_bar_inst._xscale = 0;
}
if (load_total <= amount_loaded) {
_global.setTimeout(this, "hide", 250);
ScrollingZone.current_zone.zoneLoadedEvent();
}
}
function addTotal(points) {
load_total = load_total + points;
}
function addProgress(points) {
amount_loaded = amount_loaded + points;
update();
}
function swapToTop() {
}
}
Symbol 3921 MovieClip [__Packages.ScrollingZone] Frame 0
class ScrollingZone extends MovieClip
{
static var current_zone;
var loading_zone_name, current_zone_name, is_loaded, npc_spawn, item_spawn, spawn_point_list, transition_list, exit_area_list, exit_obj_list, display_name, bgm_file_name, getNextHighestDepth, attachMovie, next_spawn_point, transition_save;
function ScrollingZone () {
super();
current_zone = this;
loading_zone_name = null;
current_zone_name = null;
}
function onLoad() {
is_loaded = false;
}
function loadXML(file_name) {
var _local2 = this;
is_loaded = false;
loading_zone_name = file_name;
XMLManager.loadXML(GameConstants.ZONE_PATH + file_name, _local2.redirectExtract);
}
function redirectExtract(xml_data) {
current_zone.extractData(xml_data);
}
function extractData(xml_data) {
npc_spawn = new NPCSpawnList();
item_spawn = new ItemSpawnList();
spawn_point_list = new Object();
transition_list = new Object();
exit_area_list = new Array();
exit_obj_list = new Array();
MapUI.current_map.clearObjects();
if (xml_data.nodeName.toLowerCase() == "zone") {
display_name = xml_data.attributes.dispName;
bgm_file_name = xml_data.attributes.bgm;
var _local6 = xml_data.attributes.name + "_bgm";
SoundManager.loadExternalSound(_local6, xml_data.attributes.bgm);
SoundManager.playBGM(_local6);
var _local2 = xml_data.firstChild;
while (_local2 != null) {
switch (_local2.nodeName.toLowerCase()) {
case "stage" :
var _local3 = getNextHighestDepth();
var _local4 = ScrollingStage(attachMovie("scrolling_stage", "stage" + _local3, _local3));
_local4.extractWeatherData(_local2);
_local4.extractData(_local2);
break;
case "staticobjects" :
ScrollingStage.current_stage.extractStaticObjectData(_local2);
break;
case "npcspawns" :
npc_spawn.extractNPCSpawnData(_local2);
break;
case "itemspawns" :
item_spawn.extractItemSpawnData(_local2);
break;
case "playerspawns" :
extractZoneTransitionData(_local2);
}
_local2 = _local2.nextSibling;
}
LoaderUI.current_loader.addTotal(-200);
is_loaded = true;
loadSavedState();
} else {
DebugWindow.debug("ZONE FILE CONTAINS UNKNOWN TAG " + xml_data.nodeName);
}
}
function extractZoneTransitionData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "playerspawns") {
var _local2 = xml_data.firstChild;
while (_local2 != null) {
var _local3;
switch (_local2.nodeName.toLowerCase()) {
case "spawnpoint" :
_local3 = new Object();
_local3.x = Number(_local2.attributes.x);
spawn_point_list[_local2.attributes.name] = _local3;
break;
case "transitionfrom" :
_local3 = new Object();
transition_list[_local2.attributes.name] = _local2.attributes.point;
break;
case "exitarea" :
_local3 = new Object();
_local3.x = Number(_local2.attributes.x);
_local3.radius = Number(_local2.attributes.radius);
_local3.zone = _local2.attributes.zone;
exit_area_list.push(_local3);
}
_local2 = _local2.nextSibling;
}
} else {
DebugWindow.debug("transition list format is incorrect");
}
}
function spawnPlayer() {
if (((current_zone_name == null) || (spawn_point_list[transition_list[current_zone_name]] == null)) && (next_spawn_point == null)) {
if (spawn_point_list.default == null) {
DebugWindow.debug(("ZONE LOAD ERROR: SOURCE AREA " + current_zone_name) + " NOT FOUND AND DEFAULT SPAWN POINT NOT AVAILABLE");
} else {
PlayerCharacter.current_player.global_x = spawn_point_list.default.x;
}
} else if (next_spawn_point != null) {
PlayerCharacter.current_player.global_x = spawn_point_list[next_spawn_point].x;
} else {
PlayerCharacter.current_player.global_x = spawn_point_list[transition_list[current_zone_name]].x;
}
ScrollingStage.current_stage.pan_x = PlayerCharacter.current_player.global_x - (Stage.width / 2);
}
function onEnterFrame() {
if (!is_loaded) {
return(undefined);
}
if (PlayerCharacter.current_player.isAlive()) {
var _local3 = PlayerCharacter.current_player.global_x;
var _local2 = 0;
while (_local2 < exit_area_list.length) {
if (Math.abs(_local3 - exit_area_list[_local2].x) <= exit_area_list[_local2].radius) {
prepareTransition();
loadXML(exit_area_list[_local2].zone);
}
_local2++;
}
}
}
function prepareTransition() {
DebugWindow.debug("SYS: Preparing transition data, saving");
NPCInfoUI.current_npc_info_ui.info_character = null;
if (CharacterUI.current_character_ui.current_character != PlayerCharacter.current_player) {
CharacterUI.current_character_ui.hide();
}
transition_save = new SaveData();
transition_save.savePlayer(PlayerCharacter.current_player);
transition_save.saveQuests(QuestLogUI.current_log);
transition_save.saveInventory(InventoryUI.bag);
transition_save.is_loaded = true;
GameEngine.current_engine.closeAllWindows();
QuestLogUI.current_log.clearQuest();
LoaderUI.current_loader.clear();
LoaderUI.current_loader.addTotal(50);
LoaderUI.current_loader.show();
ScrollingStage.current_stage.cleanUp();
ScrollingStage.current_stage.deleteStage();
FactionTable.clearData();
next_spawn_point = null;
}
function loadZone(zone_name, zone_spawn) {
prepareTransition();
loadXML(zone_name);
next_spawn_point = zone_spawn;
}
function loadSavedState() {
PlayerCharacter.current_player.save_available = true;
if (transition_save.is_loaded) {
DebugWindow.debug("SYS: Loading quest/inventory data from transition save");
transition_save.loadQuests(QuestLogUI.current_log);
transition_save.loadInventory(InventoryUI.bag);
} else {
DebugWindow.debug("SYS: Loading data from disk");
GameEngine.current_engine.disk_save.loadFromDisk(_global.avatar);
}
}
function loadSavedPlayer() {
DebugWindow.debug("SYS: Loading player data from transition save");
transition_save.loadPlayer(PlayerCharacter.current_player);
ItemUI.establishBaseLine();
PlayerCharacter.current_player.updateStats();
CharacterUI.current_character_ui.update();
spawnPlayer();
current_zone_name = loading_zone_name;
NPCSpawnList.current_spawn_list.initStage();
ItemSpawnList.current_spawn_list.initStage();
MapUI.current_map.createObject(0, "player", null);
}
function zoneLoadedEvent() {
GameEngine.current_engine.displayInfo("Entering " + display_name);
}
}
Symbol 3922 MovieClip [__Packages.NPCSpawnList] Frame 0
class NPCSpawnList extends Object
{
static var current_spawn_list;
var static_spawn_list, respawn_list;
function NPCSpawnList () {
super();
current_spawn_list = this;
static_spawn_list = new Array();
respawn_list = new Array();
}
function extractRequirement(xml_data, obj) {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
switch (_local1.nodeName.toLowerCase()) {
case "name" :
obj.name = _local1.firstChild.nodeValue;
break;
case "requirement" :
obj.requirement = _local1;
}
_local1 = _local1.nextSibling;
}
}
function extractNPCSpawnData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "npcspawns") {
var _local3 = xml_data.firstChild;
while (_local3 != null) {
var _local2;
switch (_local3.nodeName.toLowerCase()) {
case "staticspawn" :
_local2 = new Object();
_local2.spawn_near = _local3.attributes.spawnNear;
_local2.x = Number(_local3.attributes.x);
_local2.map_icon = _local3.attributes.mapIcon;
_local2.probability = Number(_local3.attributes.probability);
if (isNaN(_local2.probability)) {
_local2.probability = 1;
}
if (_local3.attributes.requirement == "true") {
extractRequirement(_local3, _local2);
} else {
_local2.name = _local3.firstChild.nodeValue;
_local2.requirement = null;
}
static_spawn_list.push(_local2);
break;
case "respawnarea" :
_local2 = new Object();
_local2.spawn_near = _local3.attributes.spawnNear;
_local2.x = Number(_local3.attributes.x);
_local2.radius = Number(_local3.attributes.radius);
_local2.map_icon = _local3.attributes.mapIcon;
_local2.init_spawn = Number(_local3.attributes.initSpawn);
_local2.max_spawn = Number(_local3.attributes.maxSpawn);
_local2.respawn_rate = Number(_local3.attributes.respawnRate);
_local2.npc_list = new Array();
_local2.respawn_timer = getTimer();
_local2.probability = Number(_local3.attributes.probability);
if (isNaN(_local2.probability)) {
_local2.probability = 1;
}
if (_local3.attributes.requirement == "true") {
extractRequirement(_local3, _local2);
} else {
_local2.name = _local3.firstChild.nodeValue;
_local2.requirement = null;
}
respawn_list.push(_local2);
}
_local3 = _local3.nextSibling;
}
} else {
DebugWindow.debug("spawn list not found");
}
}
function getSpawnX(spawn_obj) {
if (spawn_obj.spawn_near != null) {
var _local1 = Character(FactionTable.getRandomFriend(spawn_obj.spawn_near));
return(((_local1 == null) ? (spawn_obj.x) : (_local1.global_x)));
}
return(spawn_obj.x);
}
function initStage() {
var _local6 = ScrollingStage.current_stage;
var _local4 = 0;
while (_local4 < static_spawn_list.length) {
var _local7 = PlayerCharacter.current_player.identity.checkRequirement(static_spawn_list[_local4].requirement);
if (_local7 && (Math.random() <= static_spawn_list[_local4].probability)) {
var _local2 = static_spawn_list[_local4];
var _local3 = _local6.spawnNPC(NPCList.data[NPCList.getId(_local2.name)]);
_local3.global_x = getSpawnX(static_spawn_list[_local4]);
_local3.global_y = 0;
_local3.initialize();
static_spawn_list[_local4].npc = _local3;
if (_local2.map_icon != null) {
MapUI.current_map.createObject(0, _local2.map_icon, _local3);
}
}
_local4++;
}
_local4 = 0;
while (_local4 < respawn_list.length) {
var _local7 = PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if (_local7) {
var _local2 = respawn_list[_local4];
var _local5 = 0;
while (_local5 < _local2.init_spawn) {
if (_local2.npc_list.length < _local2.max_spawn) {
if (Math.random() <= respawn_list[_local4].probability) {
var _local3 = _local6.spawnNPC(NPCList.data[NPCList.getId(_local2.name)]);
_local3.global_x = (getSpawnX(respawn_list[_local4]) + ((Math.random() * _local2.radius) * 2)) - _local2.radius;
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3.control_area = _local2;
_local3.initialize();
if (_local2.map_icon != null) {
MapUI.current_map.createObject(0, _local2.map_icon, _local3);
}
_local2.npc_list.push(_local3);
}
}
_local5++;
}
_local2.respawn_timer = getTimer();
}
_local4++;
}
}
function doRespawn() {
var _local6 = ScrollingStage.current_stage;
var _local4 = 0;
while (_local4 < respawn_list.length) {
var _local2 = respawn_list[_local4];
if ((_local2.respawn_rate > 0) && ((getTimer() - _local2.respawn_timer) > _local2.respawn_rate)) {
_local2.respawn_timer = getTimer();
var _local5 = PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if ((_local5 && (_local2.npc_list.length < _local2.max_spawn)) && (Math.random() <= _local2.probability)) {
var _local3 = _local6.spawnNPC(NPCList.data[NPCList.getId(_local2.name)]);
_local3.global_x = (getSpawnX(respawn_list[_local4]) + ((Math.random() * _local2.radius) * 2)) - _local2.radius;
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3.control_area = _local2;
_local3.initialize();
if (_local2.map_icon != null) {
MapUI.current_map.createObject(0, _local2.map_icon, _local3);
}
_local2.npc_list.push(_local3);
}
}
_local4++;
}
}
function deleteNPC(npc, spawn) {
if (spawn == null) {
return(undefined);
}
var _local3 = false;
var _local2 = 0;
while ((_local2 < spawn.npc_list.length) && (!_local3)) {
if (spawn.npc_list[_local2] == npc) {
spawn.npc_list.splice(_local2, 1);
spawn.respawn_timer = getTimer() - (spawn.respawn_rate * (spawn.npc_list.length / (spawn.max_spawn + 1)));
_local3 = true;
}
_local2++;
}
}
function doSpawnDespawn() {
var _local7 = 0;
DebugWindow.debug("DEBUG : Doing respawn/despawn check");
var _local4 = 0;
while (_local4 < static_spawn_list.length) {
var _local10 = !PlayerCharacter.current_player.identity.checkRequirement(static_spawn_list[_local4].requirement);
if (_local10) {
_local7++;
static_spawn_list[_local4].npc.startFade();
static_spawn_list[_local4].npc = null;
}
_local4++;
}
_local4 = 0;
while (_local4 < respawn_list.length) {
var _local10 = !PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if (_local10) {
var _local6 = respawn_list[_local4].npc_list.concat();
var _local5 = 0;
while (_local5 < _local6.length) {
_local7++;
_local6[_local5].startFade();
_local5++;
}
}
_local4++;
}
DebugWindow.debug(("DEBUG : Despawning " + _local7) + " NPCs");
var _local8 = ScrollingStage.current_stage;
_local4 = 0;
while (_local4 < static_spawn_list.length) {
var _local9 = PlayerCharacter.current_player.identity.checkRequirement(static_spawn_list[_local4].requirement);
if ((_local9 && (static_spawn_list[_local4].npc == null)) && (Math.random() <= static_spawn_list[_local4].probability)) {
var _local2 = static_spawn_list[_local4];
var _local3 = _local8.spawnNPC(NPCList.data[NPCList.getId(_local2.name)]);
_local3.global_x = getSpawnX(static_spawn_list[_local4]);
_local3.global_y = 0;
_local3.initialize();
static_spawn_list[_local4].npc = _local3;
if (_local2.map_icon != null) {
MapUI.current_map.createObject(0, _local2.map_icon, _local3);
}
}
_local4++;
}
_local4 = 0;
while (_local4 < respawn_list.length) {
var _local9 = PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if (_local9 && (respawn_list[_local4].npc_list.length == 0)) {
var _local2 = respawn_list[_local4];
var _local5 = 0;
while (_local5 < _local2.init_spawn) {
if (_local2.npc_list.length < _local2.max_spawn) {
if (Math.random() <= respawn_list[_local4].probability) {
var _local3 = _local8.spawnNPC(NPCList.data[NPCList.getId(_local2.name)]);
_local3.global_x = (getSpawnX(respawn_list[_local4]) + ((Math.random() * _local2.radius) * 2)) - _local2.radius;
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3.control_area = _local2;
_local3.initialize();
if (_local2.map_icon != null) {
MapUI.current_map.createObject(0, _local2.map_icon, _local3);
}
_local2.npc_list.push(_local3);
}
}
_local5++;
}
_local2.respawn_timer = getTimer();
}
_local4++;
}
}
}
Symbol 3923 MovieClip [__Packages.GameObject] Frame 0
class GameObject extends MovieClip
{
var global_x, _x, global_y, _y, speed_x, speed_y, gravity_bound, inactive, _visible;
function GameObject () {
super();
global_x = _x;
global_y = _y;
speed_x = 0;
speed_y = 0;
gravity_bound = true;
inactive = true;
}
function onEnterFrame() {
moveObject();
syncCoordinates();
}
function hitGroundEvent() {
}
function isGrounded() {
return(global_y >= ScrollingStage.current_stage.ground_level);
}
function moveObject() {
global_x = global_x + speed_x;
global_y = global_y - speed_y;
if (gravity_bound) {
speed_y = speed_y - GameConstants.GRAVITY;
}
if (isGrounded()) {
hitGroundEvent();
global_y = ScrollingStage.current_stage.ground_level;
}
}
function syncCoordinates() {
var _local2 = ScrollingStage.current_stage.pan_x;
_x = global_x - _local2;
_y = global_y;
if ((global_x - _local2) < (-GameConstants.SCREEN_WIDTH)) {
_x = -GameConstants.SCREEN_WIDTH;
inactive = true;
_visible = false;
} else if ((global_x - _local2) > (GameConstants.SCREEN_WIDTH * 2)) {
_x = GameConstants.SCREEN_WIDTH * 2;
inactive = true;
_visible = false;
} else {
inactive = false;
_visible = true;
}
}
}
Symbol 3924 MovieClip [__Packages.GameConstants] Frame 0
class GameConstants
{
function GameConstants () {
}
static var ITEM_LIST_URL = "rsc/xml/item_list.xml";
static var PROJECTILE_LIST_URL = "rsc/xml/projectile_list.xml";
static var PLAYER_LIST_URL = "rsc/xml/player_list.xml";
static var NPC_LIST_URL = "rsc/xml/npc_list.xml";
static var QUEST_LIST_URL = "rsc/xml/quest_list.xml";
static var LEVEL_CHART_URL = "rsc/xml/level_chart.xml";
static var PORTAL_LIST_URL = "rsc/xml/portal_list.xml";
static var EFFECT_LIST_URL = "rsc/xml/effects_list.xml";
static var ZONE_PATH = "rsc/xml/";
static var SOUND_PATH = "rsc/mp3/";
static var DEFAULT_MOVE_SPEED = 16;
static var DEFAULT_JUMP_SPEED = 28;
static var GRAVITY = 2.5;
static var BOUNCE_PERCENTAGE = 0.25;
static var PROJECTILE_BOUNCE_PERCENTAGE = 0.5;
static var ATTACK_SPEED_DECAY = 0.95;
static var DEFAULT_HIT_EFFECT = "fist";
static var KEY_INPUT = [[37, 65], [39, 68], [38, 87], [81, 222], [40, 83], [32], [], [49], [50], [51], [52], [53], [54], [55]];
static var INVENTORY_UI_BIND = 66;
static var INVENTORY_ALL_MODIFIER = 16;
static var CHARACTER_UI_BIND = 67;
static var HELP_UI_BIND = 72;
static var MAP_UI_BIND = 77;
static var LOG_UI_BIND = 76;
static var PREFS_UI_BIND = 80;
static var QUIT_UI_BIND = 27;
static var INPUT_LEFT = 0;
static var INPUT_RIGHT = 1;
static var INPUT_JUMP = 2;
static var INPUT_ATTACK = 3;
static var INPUT_DODGE = 4;
static var INPUT_THROW = 5;
static var INPUT_CAST = 6;
static var INPUT_SHORTCUT_1 = 7;
static var INPUT_SHORTCUT_2 = 8;
static var INPUT_SHORTCUT_3 = 9;
static var INPUT_SHORTCUT_4 = 10;
static var INPUT_SHORTCUT_5 = 11;
static var INPUT_SHORTCUT_6 = 12;
static var INPUT_SHORTCUT_7 = 13;
static var SCREEN_WIDTH = 750;
static var SCREEN_HEIGHT = 500;
static var EDGE_PERCENTAGE = 0.33;
static var LEVEL_CAP = 20;
static var DEFAULT_ATTACK_COOLDOWN = 800;
static var ARMOR_TO_50_PCT_REDUCTION = 4000;
static var REDUCTION_CAP = 0.75;
static var SPELL_PUSHBACK_FACTOR = 0.2;
static var DMG_PER_STR = 1;
static var HEALTH_PER_STM = 10;
static var MANA_PER_INT = 5;
static var SPIRIT_PER_MANA5 = 8;
static var TIME_PER_TICK = 3000;
static var DAMAGE_COLOR_TABLE = [-1, 65280, 16776960, 26367, 6684927, 16776960, 16711935];
static var DAMAGE_COLOR_TEXT = [" damage", " healed", " spell damage", " mana restored", " mana drained", " damage absorbed", " gained"];
static var DEFAULT_GREETING_DIALOG = "Greetings [name].";
static var DEFAULT_TARGET_NAME = "friend";
static var DEFAULT_STARTING_ZONE = "zone_ef.xml";
}
Symbol 3925 MovieClip [__Packages.Character] Frame 0
class Character extends GameObject
{
var animation_type, buff_list, buff_timer, mana_regen_timer, health_regen_timer, mana_regen_fraction, hit_list, trigger_list, trigger_source, maximum_health, current_health, maximum_mana, current_mana, damage_reduction, spirit, player_damage, control_countdown, silence_countdown, stealthed, disable_trinket, current_faction, current_equipment, facing_left, hit_check, move_speed, move_scale, jump_speed, jump_scale, _parent, shadow, _x, _y, body_box, mana_regen, attack_countdown, cast_countdown, _xscale, character_action, action_animation, animation_data, action_link, gotoAndPlay, speed_y, cast_speed_modifier, cast_time, cast_interruptable, stealthed_before_attack, control_name, isGrounded, speed_x, global_y, projectile_name, throw_dot, localToGlobal, global_x, current_effect, character_name, wound_immune, last_attacker, armor, damage, damage_variation, ranged_damage, ranged_variation, attack_speed, attack_speed_modifier, cast_boost, filters, cast_stealth;
function Character () {
super();
animation_type = ANIM_TYPE_NOT_READY;
buff_list = new Array();
buff_timer = getTimer();
mana_regen_timer = getTimer();
health_regen_timer = getTimer();
mana_regen_fraction = 0;
hit_list = new Array();
trigger_list = new Array();
trigger_source = null;
maximum_health = 1;
current_health = maximum_health;
maximum_mana = 1;
current_mana = maximum_mana;
damage_reduction = 0;
spirit = 0;
player_damage = 0;
control_countdown = 0;
silence_countdown = 0;
stealthed = false;
disable_trinket = true;
current_faction = null;
current_equipment = new Equipment();
current_equipment.character_link = this;
facing_left = true;
hit_check = false;
move_speed = GameConstants.DEFAULT_MOVE_SPEED;
move_scale = 1;
jump_speed = GameConstants.DEFAULT_JUMP_SPEED;
jump_scale = 1;
}
function onLoad() {
super.onLoad();
var _local3 = _parent.getNextHighestDepth();
shadow = ScrollingStage.current_stage.spawnAttachable(_x, _y, "shadow", this);
shadow.swapDepths(this);
}
function onEnterFrame() {
doAction();
super.onEnterFrame();
var _local5 = getTimer() - buff_timer;
buff_timer = getTimer();
if (isAlive()) {
var _local3 = 0;
while (_local3 < buff_list.length) {
buff_list[_local3].duration = buff_list[_local3].duration - _local5;
if (buff_list[_local3].tick != null) {
buff_list[_local3].tick = buff_list[_local3].tick - _local5;
if ((buff_list[_local3].tick <= 0) || (buff_list[_local3].duration <= 0)) {
var _local4 = buff_list[_local3].tick_effect;
if ((buff_list[_local3].duration <= 0) || (buff_list[_local3].value < _local4)) {
_local4 = buff_list[_local3].value;
}
if (_local4 > 0) {
buff_list[_local3].value = buff_list[_local3].value - _local4;
switch (buff_list[_local3].type) {
case "dot" :
switch (buff_list[_local3].name) {
case "health" :
takeMagicalDamage(buff_list[_local3].source_obj, _local4);
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + _local4, 2);
break;
case "mana" :
current_mana = Math.max(current_mana - _local4, 0);
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + _local4, 4);
}
break;
case "hot" :
switch (buff_list[_local3].name) {
case "health" :
current_health = Math.min(current_health + _local4, maximum_health);
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + _local4, 1);
break;
case "mana" :
current_mana = Math.min(current_mana + _local4, maximum_mana);
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + _local4, 3);
}
}
}
buff_list[_local3].tick = buff_list[_local3].tick + GameConstants.TIME_PER_TICK;
}
}
if ((buff_list[_local3].type == "summon") && (!buff_list[_local3].npc.isAlive())) {
buff_list[_local3].duration = 0;
buff_list[_local3].npc = null;
}
if (buff_list[_local3].duration <= 0) {
if (buff_list[_local3].type == "tempstat") {
switch (buff_list[_local3].name) {
case "stealth" :
endStealth();
break;
case "health" :
current_health = Math.max(current_health - Number(buff_list[_local3].value), 1);
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + buff_list[_local3].value, 2);
break;
case "mana" :
current_mana = Math.max(current_mana - Number(buff_list[_local3].value), 0);
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + buff_list[_local3].value, 4);
}
}
if (buff_list[_local3].npc != null) {
buff_list[_local3].npc.startFade();
}
if (buff_list[_local3].sfx != null) {
buff_list[_local3].sfx.startFade();
}
buff_list.splice(_local3, 1);
_local3--;
updateStats();
}
_local3++;
}
if ((getTimer() - mana_regen_timer) > 1000) {
mana_regen_fraction = mana_regen_fraction + (mana_regen / 5);
while (mana_regen_fraction > 1) {
current_mana++;
mana_regen_fraction = mana_regen_fraction - 1;
}
current_mana = Math.min(current_mana, maximum_mana);
mana_regen_timer = getTimer();
}
if (control_countdown > 0) {
control_countdown = control_countdown - _local5;
if (control_countdown <= 0) {
regainControl();
}
}
if (silence_countdown > 0) {
silence_countdown = silence_countdown - _local5;
}
if (attack_countdown > 0) {
attack_countdown = attack_countdown - _local5;
if (attack_countdown <= 0) {
attack_countdown = 0;
}
}
if (cast_countdown > 0) {
cast_countdown = cast_countdown - _local5;
if (cast_countdown <= 0) {
cast_countdown = 0;
}
}
}
}
function turnCharacter(turn_to_left) {
if (GameUtil.isInArray(involuntary_animation_type, animation_type)) {
return(undefined);
}
facing_left = turn_to_left;
if (facing_left && (_xscale < 0)) {
_xscale = -_xscale;
} else if ((!facing_left) && (_xscale > 0)) {
_xscale = -_xscale;
}
}
function setAction(action_name) {
if (GameUtil.isInArray(invincible_animation_type, animation_type)) {
return(undefined);
}
character_action = action_name;
var _local3 = action_animation[action_name];
if (_local3 == null) {
DebugWindow.debug("ERROR : Animation not found for action " + action_name);
}
animation_type = _local3.animation_type;
animation_data = _local3.animation_data;
action_link = _local3.action_link;
(gotoAndPlay(animation_data));// not popped
switch (animation_type) {
case ANIM_TYPE_JUMP :
speed_y = jump_speed * jump_scale;
break;
case ANIM_TYPE_CAST :
disable_trinket = false;
break;
case ANIM_TYPE_READY_CAST :
if (cast_countdown <= 0) {
cast_countdown = int(ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].proc.cast_time * cast_speed_modifier);
cast_time = cast_countdown;
cast_interruptable = ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].proc.interruptable;
}
stealthed_before_attack = stealthed;
if (cast_countdown <= 0) {
setAction(action_link);
return(undefined);
}
break;
case ANIM_TYPE_DEATH :
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].sfx != null) {
buff_list[_local2].sfx.startFade();
}
if (buff_list[_local2].npc != null) {
buff_list[_local2].npc.startFade();
}
_local2++;
}
buff_list = new Array();
updateStats();
}
}
function doAction() {
switch (animation_type) {
case ANIM_TYPE_CONTROL :
if (control_name != "fear") {
if (!isGrounded()) {
break;
}
if ((Math.abs(speed_x) - Math.abs(ScrollingStage.current_stage.friction)) < 0) {
speed_x = 0;
} else if (speed_x < 0) {
speed_x = speed_x + ScrollingStage.current_stage.friction;
} else {
speed_x = speed_x - ScrollingStage.current_stage.friction;
}
break;
}
if (Math.random() < 0.1) {
animation_type = ANIM_TYPE_IDLE;
turnCharacter(Math.random() < 0.5);
animation_type = ANIM_TYPE_CONTROL;
}
case ANIM_TYPE_MOVE :
if (facing_left) {
speed_x = (-move_speed) * move_scale;
} else {
speed_x = move_speed * move_scale;
}
break;
case ANIM_TYPE_JUMP :
break;
case ANIM_TYPE_DODGE :
case ANIM_TYPE_ATTACK :
case ANIM_TYPE_JUMP_ATTACK :
speed_x = speed_x * GameConstants.ATTACK_SPEED_DECAY;
if (Math.abs(speed_x) < 1) {
speed_x = 0;
}
break;
case ANIM_TYPE_READY_CAST :
if (cast_countdown <= 0) {
setAction(action_link);
}
default :
if (!isGrounded()) {
} else if ((Math.abs(speed_x) - Math.abs(ScrollingStage.current_stage.friction)) < 0) {
speed_x = 0;
} else if (speed_x < 0) {
speed_x = speed_x + ScrollingStage.current_stage.friction;
} else {
speed_x = speed_x - ScrollingStage.current_stage.friction;
}
}
}
function endAction(prev_animation) {
}
function hitGroundEvent() {
global_y = ScrollingStage.current_stage.ground_level;
speed_y = 0;
}
function startHitCheck() {
hit_check = true;
stealthed_before_attack = stealthed;
}
function stopHitCheck() {
hit_check = false;
if (stealthed_before_attack) {
endStealth();
}
}
function regainControl() {
control_countdown = 0;
control_name = null;
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].type == "control") {
buff_list[_local2].duration = 0;
}
_local2++;
}
}
function throwProjectile(special_proj_name, x, y) {
var _local2;
if (special_proj_name == null) {
_local2 = ScrollingStage.current_stage.spawnProjectile(projectile_name);
} else {
_local2 = ScrollingStage.current_stage.spawnProjectile(special_proj_name);
}
_local2.faction = current_faction;
_local2.facing_left = facing_left;
var _local3 = new Object();
if (x == null) {
_local3.x = throw_dot._x;
_local3.y = throw_dot._y;
} else {
_local3.x = x;
_local3.y = y;
}
localToGlobal(_local3);
_local2.global_x = (global_x + _local3.x) - _x;
_local2.global_y = (global_y + _local3.y) - _y;
_local2.source_obj = this;
_local2.initialize();
endStealth();
return(_local2);
}
function startEffect() {
ScrollingStage.current_stage.spawnCharEffect(current_effect, this, true);
}
function takeMagicalDamage(src_obj, damage) {
current_health = current_health - damage;
if (src_obj == PlayerCharacter.current_player) {
player_damage = player_damage + damage;
}
if (current_health <= 0) {
current_health = 0;
animation_type = ANIM_TYPE_IDLE;
setAction(ACTION_DEATH);
}
}
function takeDamage(src_obj, damage, magical, always_hit) {
var _local5 = false;
if (src_obj instanceof Character) {
if (GameUtil.isInArray(src_obj.hit_list, this)) {
return(false);
}
src_obj.hit_list.push(this);
}
if (!always_hit) {
if (animation_type == ANIM_TYPE_CONTROL) {
switch (control_name) {
case "fear" :
case "stun" :
_local5 = true;
break;
case "incapacitate" :
regainControl();
break;
case "banish" :
return(false);
default :
DebugWindow.debug((("ERROR : Unknown crowd control " + control_name) + " applied to ") + character_name);
}
} else if ((animation_type == animation_type) == ANIM_TYPE_CAST) {
_local5 = true;
} else if (wound_immune) {
_local5 = true;
} else if (GameUtil.isInArray(involuntary_animation_type, animation_type)) {
return(false);
}
}
if (src_obj instanceof Projectile) {
last_attacker = src_obj.source_obj;
} else {
last_attacker = src_obj;
}
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].type == "shield") {
var _local3 = ((damage > buff_list[_local2].value) ? (buff_list[_local2].value) : (damage));
damage = damage - _local3;
buff_list[_local2].value = buff_list[_local2].value - _local3;
if (_local3 > 0) {
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + _local3, 5);
}
if (buff_list[_local2].value <= 0) {
if (buff_list[_local2].sfx != null) {
buff_list[_local2].sfx.startFade();
}
buff_list.splice(_local2, 1);
_local2--;
}
}
_local2++;
}
if ((damage <= 0) && (!always_hit)) {
return(false);
}
if (!magical) {
damage = Math.round(damage * (1 - damage_reduction));
}
if ((damage <= 0) && (!always_hit)) {
damage = 1;
}
current_health = current_health - damage;
if (damage > 0) {
if (magical) {
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + damage, 2);
} else {
ScrollingStage.current_stage.spawnCombatText(_x, _y - (-body_box._y), "" + damage, 0);
}
}
endStealth();
if (animation_type == ANIM_TYPE_READY_CAST) {
if (cast_interruptable) {
cast_countdown = 0;
} else {
var _local8 = (cast_time * Math.random()) * ((GameConstants.SPELL_PUSHBACK_FACTOR / 2) + (GameConstants.SPELL_PUSHBACK_FACTOR / 2));
cast_countdown = cast_countdown + _local8;
if (cast_countdown > cast_time) {
cast_countdown = cast_time;
}
}
}
attack_countdown = 0;
if (current_health <= 0) {
current_health = 0;
if (animation_type == ANIM_TYPE_CONTROL) {
regainControl();
}
setAction(ACTION_DEATH);
} else if ((animation_type == ANIM_TYPE_READY_CAST) && (!cast_interruptable)) {
(gotoAndPlay(action_animation[ACTION_WOUND].animation_data));// not popped
} else if (!_local5) {
setAction(ACTION_WOUND);
}
return(true);
}
function knockBack(src, force, angle) {
if (animation_type == ANIM_TYPE_DODGE) {
return(undefined);
}
if (wound_immune) {
return(undefined);
}
speed_x = Math.cos((angle / 180) * Math.PI) * force;
speed_y = Math.sin((angle / 180) * Math.PI) * force;
if (src.facing_left) {
speed_x = -speed_x;
}
}
function isAlive() {
return(animation_type != ANIM_TYPE_DEATH);
}
function getFilterArray() {
var _local4 = new ColorMatrix();
var _local3 = false;
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].tint != null) {
_local4.colorize(GameUtil.hex2int(buff_list[_local2].tint), Number(buff_list[_local2].amount));
_local3 = true;
}
_local2++;
}
if (stealthed) {
_local4.setAlpha(0.5);
_local3 = true;
}
if (_local3) {
return(new Array(_local4.__get__filter()));
}
return(new Array());
}
function getBaseStats() {
return({health:0, mana:0, spirit:0, armor:0, damage:0});
}
function updateStats() {
var _local7 = getBaseStats();
maximum_health = _local7.health;
maximum_mana = _local7.mana;
spirit = _local7.spirit;
armor = _local7.armor;
damage = _local7.damage;
damage_variation = 0;
move_scale = 1;
jump_scale = 1;
if (current_equipment.slot[Equipment.SLOT_THROWN].stack > 0) {
projectile_name = ItemList.data[current_equipment.slot[Equipment.SLOT_THROWN].item_id].name;
}
if (current_equipment.slot[Equipment.SLOT_THROWN].stack > 0) {
ranged_damage = Number(ProjectileList.data[ProjectileList.getId(projectile_name)].damage);
ranged_variation = Number(ProjectileList.data[ProjectileList.getId(projectile_name)].damageVar);
if (isNaN(ranged_damage) || (isNaN(ranged_variation))) {
ranged_damage = 0;
ranged_variation = 0;
}
} else {
ranged_damage = 0;
ranged_variation = 0;
}
attack_speed = 1;
var _local6 = 0;
attack_speed_modifier = 1;
cast_speed_modifier = 1;
cast_boost = 1;
var _local3 = 0;
while (_local3 < current_equipment.slot.length) {
var _local5 = ItemList.data[current_equipment.slot[_local3].item_id];
if ((_local3 == Equipment.SLOT_MAIN_HAND) && (_local5.speed != null)) {
attack_speed = Number(_local5.speed) / 1000;
}
var _local4 = 0;
while (_local4 < Equipment.STAT_LIST.length) {
if (_local5[Equipment.STAT_LIST[_local4]] != null) {
var _local2 = Number(_local5[Equipment.STAT_LIST[_local4]]);
switch (Equipment.STAT_LIST[_local4]) {
case "health" :
maximum_health = maximum_health + (_local2 * GameConstants.HEALTH_PER_STM);
break;
case "mana" :
maximum_mana = maximum_mana + (_local2 * GameConstants.MANA_PER_INT);
break;
case "spirit" :
spirit = spirit + _local2;
break;
case "armor" :
armor = armor + _local2;
break;
case "damage" :
if (_local3 == Equipment.SLOT_MAIN_HAND) {
_local6 = _local2;
} else if (_local3 != Equipment.SLOT_THROWN) {
damage = damage + (_local2 / GameConstants.DMG_PER_STR);
}
break;
case "damageVar" :
if (_local3 != Equipment.SLOT_THROWN) {
damage_variation = damage_variation + _local2;
}
break;
case "runSpeed" :
move_scale = move_scale * (1 + (_local2 / 100));
break;
case "jump" :
jump_scale = jump_scale * (1 + (_local2 / 100));
break;
case "haste" :
attack_speed_modifier = attack_speed_modifier * (1 + ((-_local2) / 100));
break;
case "spellHaste" :
cast_speed_modifier = cast_speed_modifier * (1 + ((-_local2) / 100));
break;
case "spellBoost" :
cast_boost = cast_boost * (1 + (_local2 / 100));
}
}
_local4++;
}
_local3++;
}
_local3 = 0;
while (_local3 < buff_list.length) {
if (buff_list[_local3].type == "tempstat") {
switch (buff_list[_local3].name) {
case "health" :
maximum_health = maximum_health + buff_list[_local3].value;
break;
case "mana" :
maximum_mana = maximum_mana + buff_list[_local3].value;
break;
case "spirit" :
spirit = spirit + buff_list[_local3].value;
break;
case "armor" :
armor = armor + buff_list[_local3].value;
break;
case "damage" :
damage = damage + buff_list[_local3].value;
break;
case "damageVar" :
damage_variation = damage_variation + (buff_list[_local3].value / GameConstants.DMG_PER_STR);
break;
case "speed" :
move_scale = move_scale * (1 + (buff_list[_local3].value / 100));
break;
case "jump" :
jump_scale = jump_scale * (1 + (buff_list[_local3].value / 100));
break;
case "haste" :
attack_speed_modifier = attack_speed_modifier * (1 + ((-buff_list[_local3].value) / 100));
break;
case "spell_haste" :
cast_speed_modifier = cast_speed_modifier * (1 + ((-buff_list[_local3].value) / 100));
break;
case "spell_boost" :
cast_boost = cast_boost * (1 + (buff_list[_local3].value / 100));
}
}
_local3++;
}
damage = _local6 + damage;
if (damage <= 0) {
damage = 1;
}
if (damage_variation <= 0) {
damage_variation = 1;
}
if (current_health > maximum_health) {
current_health = maximum_health;
}
if (current_mana > maximum_mana) {
current_mana = maximum_mana;
}
damage_reduction = armor / (armor + GameConstants.ARMOR_TO_50_PCT_REDUCTION);
if (damage_reduction > GameConstants.REDUCTION_CAP) {
damage_reduction = GameConstants.REDUCTION_CAP;
}
mana_regen = Math.floor(spirit / GameConstants.SPIRIT_PER_MANA5);
filters = getFilterArray();
}
function useTrinket() {
if (silence_countdown > 0) {
return(undefined);
}
cast_stealth = false;
if (current_equipment.slot[Equipment.SLOT_TRINKET].item_id != ItemIcon.EMPTY_ID) {
if (procDepleteCheck(ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].proc)) {
checkForProc(0, _y + ((-body_box._y) / 2), PROC_CAST);
}
}
if (stealthed_before_attack && (!cast_stealth)) {
endStealth();
}
}
function procDepleteCheck(proc_obj) {
if (proc_obj.from_stealth && (!stealthed)) {
return(false);
}
var _local3 = 0;
while (_local3 < proc_obj.data.length) {
var _local2 = proc_obj.data[_local3];
if (_local2.type == "deplete") {
switch (_local2.name) {
case "health" :
if (current_health <= Number(_local2.value)) {
return(false);
}
break;
case "mana" :
if (current_mana >= Number(_local2.value)) {
break;
}
return(false);
}
}
_local3++;
}
return(true);
}
function startStealth() {
if (!stealthed) {
stealthed = true;
}
cast_stealth = true;
}
function endStealth() {
if (stealthed) {
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].name == "stealth") {
buff_list[_local2].duration = 0;
}
_local2++;
}
stealthed = false;
}
}
function checkForProc(x, y, proc_type, proc_target) {
var _local4 = Equipment.SLOT_COUNT;
if (disable_trinket) {
_local4--;
}
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = ItemList.data[current_equipment.slot[_local3].item_id].proc;
if (((_local2 != null) && (_local2.proc_type == proc_type)) && (procDepleteCheck(_local2))) {
resolveProc(x, y, _local2, proc_target);
}
_local3++;
}
}
function resolveProc(x, y, proc_obj, proc_target) {
if (proc_obj.from_stealth && (!stealthed)) {
return(undefined);
}
if (isNaN(proc_obj.probability) || (Math.random() < proc_obj.probability)) {
var _local6 = 0;
while (_local6 < proc_obj.data.length) {
var _local2 = proc_obj.data[_local6];
var _local3 = this;
if (_local2.applyTo == "target") {
_local3 = proc_target;
}
if (_local3 == null) {
} else if (_local3.animation_type == ANIM_TYPE_DEATH) {
} else {
var _local14 = 1;
if (_local2.stack != null) {
_local14 = Number(_local2.stack);
}
var _local8 = 0;
var _local7 = -1;
if (GameUtil.isInArray(STACKABLE_EFFECT, _local2.type)) {
var _local5 = 0;
while (_local5 < _local3.buff_list.length) {
if (_local3.buff_list[_local5].id == _local2.id) {
if (_local8 == 0) {
_local7 = _local5;
}
_local8++;
}
_local5++;
}
}
if (_local8 >= _local14) {
if (_local3.buff_list[_local7].name == "stealth") {
_local3.buff_list[_local7].sfx.startFade();
_local3.buff_list.splice(_local7, 1);
} else {
return(undefined);
}
}
switch (_local2.type) {
case "teleport" :
ScrollingZone.current_zone.loadZone(_local2.name + ".xml", _local2.value);
break;
case "set_variable" :
PlayerCharacter.current_player.dynamic_variables[_local2.name] = Number(_local2.value);
break;
case "change_variable" :
if (PlayerCharacter.current_player.dynamic_variables[_local2.name] == null) {
PlayerCharacter.current_player.dynamic_variables[_local2.name] = Number(_local2.value);
} else {
PlayerCharacter.current_player.dynamic_variables[_local2.name] = PlayerCharacter.current_player.dynamic_variables[_local2.name] + Number(_local2.value);
}
break;
case "projectile" :
var _local16;
var _local10 = 0;
var _local13 = 0;
if (_local2.x != null) {
_local10 = -Math.abs(Number(_local2.x));
}
if (_local2.y != null) {
_local13 = Number(_local2.y);
}
if (throw_dot != null) {
_local16 = throwProjectile(_local2.name, throw_dot._x + _local10, throw_dot._y + _local13);
} else {
_local16 = throwProjectile(_local2.name, x + _local10, y + _local13);
}
if (_local3 != this) {
_local16.global_x = _local3.global_x + _local10;
}
break;
case "deplete" :
switch (_local2.name) {
case "health" :
current_health = Math.max(current_health - Number(_local2.value), 0);
if (current_health <= 0) {
animation_type = ANIM_TYPE_IDLE;
setAction(ACTION_DEATH);
}
break;
case "mana" :
current_mana = Math.max(current_mana - Number(_local2.value), 0);
}
break;
case "damage" :
switch (_local2.name) {
case "health" :
var _local15 = int((Number(_local2.value) + int(Math.random() * (Number(_local2.variation) + 1))) * cast_boost);
_local3.takeMagicalDamage(this, _local15);
ScrollingStage.current_stage.spawnCombatText(_local3._x, _local3._y - (-_local3.body_box._y), "" + _local15, 2);
break;
case "mana" :
_local15 = int((Number(_local2.value) + int(Math.random() * (Number(_local2.variation) + 1))) * cast_boost);
_local3.current_mana = Math.max(_local3.current_mana - Number(_local15), 0);
ScrollingStage.current_stage.spawnCombatText(_local3._x, _local3._y - (-_local3.body_box._y), "" + _local15, 4);
}
break;
case "restore" :
switch (_local2.name) {
case "health" :
_local15 = int((Number(_local2.value) + int(Math.random() * (Number(_local2.variation) + 1))) * cast_boost);
_local3.current_health = Math.min(_local3.current_health + Number(_local15), _local3.maximum_health);
ScrollingStage.current_stage.spawnCombatText(_local3._x, _local3._y - (-_local3.body_box._y), "" + _local15, 1);
break;
case "mana" :
_local15 = int((Number(_local2.value) + int(Math.random() * (Number(_local2.variation) + 1))) * cast_boost);
_local3.current_mana = Math.min(_local3.current_mana + Number(_local15), _local3.maximum_mana);
ScrollingStage.current_stage.spawnCombatText(_local3._x, _local3._y - (-_local3.body_box._y), "" + _local15, 3);
}
break;
case "dot" :
var _local4 = new Object();
_local15 = int(Number(_local2.value) * cast_boost);
_local4.source_obj = this;
_local4.id = _local2.id;
_local4.type = "dot";
_local4.name = _local2.name;
_local4.value = Number(_local15);
_local4.duration = Number(_local2.duration);
_local4.tick = GameConstants.TIME_PER_TICK;
_local4.tick_effect = Math.round(_local15 / (_local4.duration / GameConstants.TIME_PER_TICK));
_local4.tint = _local2.tint;
_local4.amount = _local2.amount;
if (_local2.sfx != null) {
_local4.sfx = ScrollingStage.current_stage.spawnCharEffect(_local2.sfx, _local3, true);
_local4.sfx_name = _local2.sfx;
var _local12 = SpecialEffectList.data[SpecialEffectList.getId(_local4.sfx_name)];
if (_local12.tint != null) {
_local4.tint = _local12.tint;
_local4.amount = _local12.tint_amount;
}
}
_local3.buff_list.push(_local4);
_local3.filters = _local3.getFilterArray();
break;
case "summon" :
_local4 = new Object();
_local4.type = "summon";
_local4.id = _local2.id;
_local4.name = _local2.name;
_local4.duration = Number(_local2.duration);
_local4.tint = _local2.tint;
_local4.amount = _local2.amount;
if (_local2.sfx != null) {
_local4.sfx = ScrollingStage.current_stage.spawnCharEffect(_local2.sfx, _local3, true);
_local4.sfx_name = _local2.sfx;
var _local12 = SpecialEffectList.data[SpecialEffectList.getId(_local4.sfx_name)];
if (_local12.tint != null) {
_local4.tint = _local12.tint;
_local4.amount = _local12.tint_amount;
}
}
case "perm_summon" :
var _local9 = ScrollingStage.current_stage.spawnNPC(NPCList.data[NPCList.getId(_local2.name)]);
_local9.global_x = (_local3.global_x + ((Math.random() * Number(_local2.radius)) * 2)) - Number(_local2.radius);
_local9.global_y = ScrollingStage.current_stage.ground_level;
_local9.initialize();
if (_local2.type == "summon") {
_local4.npc = _local9;
_local3.buff_list.push(_local4);
_local3.filters = _local3.getFilterArray();
}
break;
case "purge" :
var _local11 = 0;
_local6 = 0;
while (_local6 < _local3.buff_list.length) {
if (_local3.buff_list[_local6].type == "special") {
_local11++;
}
_local6++;
}
_local6 = 0;
while ((_local6 < _local2.value) && (_local3.buff_list.length > _local11)) {
_local3.buff_list[int(Math.random() * _local3.buff_list.length)].duration = 0;
_local6++;
}
break;
case "control" :
_local6 = 0;
while (_local6 < _local3.buff_list.length) {
if (_local3.buff_list[_local6].type == "control") {
_local3.buff_list[_local6].duration = 0;
}
_local6++;
}
_local3.control_countdown = Number(_local2.duration);
_local3.control_name = _local2.name;
switch (_local2.name) {
case "banish" :
case "stun" :
case "incapacitate" :
case "fear" :
_local3.animation_type = ANIM_TYPE_IDLE;
_local3.setAction(_local2.name);
}
case "hot" :
case "shield" :
case "silence" :
case "tempstat" :
case "special" :
_local4 = new Object();
_local4.type = _local2.type;
_local4.id = _local2.id;
_local4.name = _local2.name;
_local4.value = Number(_local2.value);
_local4.duration = Number(_local2.duration);
_local4.tint = _local2.tint;
_local4.amount = _local2.amount;
if (_local2.sfx != null) {
_local4.sfx = ScrollingStage.current_stage.spawnCharEffect(_local2.sfx, _local3, true);
_local4.sfx_name = _local2.sfx;
var _local12 = SpecialEffectList.data[SpecialEffectList.getId(_local4.sfx_name)];
if (_local12.tint != null) {
_local4.tint = _local12.tint;
_local4.amount = _local12.tint_amount;
}
}
if (_local2.type == "hot") {
_local4.tick = GameConstants.TIME_PER_TICK;
_local4.tick_effect = int(Number(_local2.value) / (_local4.duration / GameConstants.TIME_PER_TICK));
} else if (_local2.type == "silence") {
_local3.silence_countdown = _local4.duration;
} else {
switch (_local4.name) {
case "stealth" :
startStealth();
break;
case "health" :
_local3.current_health = _local3.current_health + Number(_local4.value);
ScrollingStage.current_stage.spawnCombatText(_local3._x, _local3._y - (-_local3.body_box._y), _local4.value, 1);
break;
case "mana" :
_local3.current_mana = _local3.current_mana + Number(_local4.value);
ScrollingStage.current_stage.spawnCombatText(_local3._x, _local3._y - (-_local3.body_box._y), _local4.value, 3);
}
}
_local3.buff_list.push(_local4);
_local3.updateStats();
break;
case "sfx" :
ScrollingStage.current_stage.spawnCharEffect(_local2.name, _local3, true);
}
}
_local6++;
}
}
}
static var ANIM_TYPE_NOT_READY = "notready";
static var ACTION_WOUND = "wound";
static var ACTION_DEATH = "death";
static var ACTION_STUN = "stun";
static var ACTION_BANISH = "banish";
static var ACTION_INCAPACITATE = "incapacitate";
static var ACTION_FEAR = "fear";
static var ANIM_TYPE_IDLE = "idle";
static var ANIM_TYPE_MOVE = "move";
static var ANIM_TYPE_ATTACK = "attack";
static var ANIM_TYPE_THROW = "throw_attack";
static var ANIM_TYPE_READY_CAST = "ready_cast";
static var ANIM_TYPE_CAST = "cast";
static var ANIM_TYPE_JUMP = "jump";
static var ANIM_TYPE_JUMP_THROW = "jump_throw";
static var ANIM_TYPE_LAND = "land";
static var ANIM_TYPE_JUMP_ATTACK = "jump_attack";
static var ANIM_TYPE_DEATH = "death";
static var ANIM_TYPE_DODGE = "dodge";
static var ANIM_TYPE_CONTROL = "control";
static var ANIM_TYPE_WOUND = "wound";
static var ANIM_TYPE_SINGLE = "single";
static var ANIM_TYPE_SINGLE_PAUSE = "single_with_pause";
static var ANIM_TYPE_LOOPING = "looping";
static var PROC_DAMAGE_TAKEN = 0;
static var PROC_MELEE = 1;
static var PROC_CAST = 2;
static var STACKABLE_EFFECT = ["dot", "hot", "shield", "tempstat", "summon"];
var involuntary_animation_type = [ANIM_TYPE_DODGE, ANIM_TYPE_CONTROL, ANIM_TYPE_WOUND, ANIM_TYPE_DEATH];
var invincible_animation_type = [ANIM_TYPE_DODGE, ANIM_TYPE_DEATH];
}
Symbol 3926 MovieClip [__Packages.Identity] Frame 0
class Identity extends Object
{
var identity_list, identity_host;
function Identity (xml_data) {
super();
identity_list = new Array();
extractIdentityData(xml_data);
}
function extractIdentityData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "identity") {
identity_list = new Object();
var _local2 = xml_data.firstChild;
while (_local2 != null) {
if (_local2.nodeName != null) {
identity_list[_local2.nodeName] = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
}
}
function getValue(name) {
if (identity_list[name] != null) {
return(identity_list[name]);
}
return("");
}
function checkCondition(name, value) {
var _local8 = Number(value);
var _local7 = ItemList.getId(value);
var _local6 = 0;
var _local3 = QuestLogUI.current_log;
switch (name) {
case "level" :
return(identity_host.current_level >= _local8);
case "level_below" :
return(identity_host.current_level < _local8);
case "item" :
if (identity_host == PlayerCharacter.current_player) {
_local6 = _local6 + InventoryUI.findItemCount(_local7);
}
case "equip" :
_local6 = _local6 + identity_host.current_equipment.findItemCount(_local7);
return(_local6 > 0);
case "quest_poss" :
var _local9 = QuestList.data[QuestList.getId(value)];
return(_local3.questPossible(_local9));
case "quest_avail" :
_local9 = QuestList.data[QuestList.getId(value)];
return(_local3.questAvailable(_local9));
case "quest_prog" :
return(_local3.questInProgress(value, false));
case "quest_prog_comp" :
return(_local3.questInProgress(value, false) && (!_local3.questInProgress(value, true)));
case "quest_prog_incomp" :
return(_local3.questInProgress(value, true));
case "quest_comp" :
var _local5 = false;
var _local2 = 0;
while (_local2 < _local3.completed_list.length) {
if (_local3.completed_list[_local2] == value) {
_local5 = true;
}
_local2++;
}
return(_local5);
}
return(identity_list[name] == value);
}
function checkRequirementList(xml_data, check_all) {
var _local3 = 0;
var _local6 = 1;
var _local4 = 0;
if (xml_data.attributes.passMin != null) {
_local6 = Number(xml_data.attributes.passMin);
}
var _local2 = xml_data.firstChild;
while (_local2 != null) {
switch (_local2.nodeName.toLowerCase()) {
case "list" :
_local4++;
if (checkRequirementList(_local2, false)) {
_local3++;
}
break;
case "not_condition" :
_local4++;
if (!checkCondition(_local2.attributes.type, _local2.attributes.value)) {
_local3++;
}
break;
case "condition" :
_local4++;
if (!checkCondition(_local2.attributes.type, _local2.attributes.value)) {
break;
}
_local3++;
}
_local2 = _local2.nextSibling;
}
if (check_all) {
return(_local3 == _local4);
}
return(_local3 >= _local6);
}
function checkRequirement(xml_data) {
if (xml_data == null) {
return(true);
}
return(checkRequirementList(xml_data, true));
}
static function extractRequirementList(xml_data) {
var _local3;
_local3 = new Array();
var _local1 = xml_data.firstChild;
while (_local1 != null) {
switch (_local1.nodeName.toLowerCase()) {
case "list" :
_local3 = _local3.concat(_local3, extractRequirementList(_local1));
break;
case "condition" :
var _local2 = new Object();
_local2.type = _local1.attributes.type;
_local2.value = _local1.attributes.value;
_local3.push(_local2);
}
_local1 = _local1.nextSibling;
}
return(_local3);
}
}
Symbol 3927 MovieClip [__Packages.ItemList] Frame 0
class ItemList extends Object
{
static var data;
function ItemList () {
super();
}
static function getUID() {
return(universal_id++);
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Array();
if (xml_data.nodeName.toLowerCase() == "itemlist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "item")) {
} else {
extractItemData(_local1);
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function extractItemData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "item") {
var _local5 = new Object();
_local5.unique = 0;
_local5.stack = 1;
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (_local1.nodeName != null) {
switch (_local1.nodeName) {
case "activate" :
case "proc" :
var _local3 = new Object();
if (_local1.attributes.castTime != null) {
_local3.cast_time = Number(_local1.attributes.castTime);
} else {
_local3.cast_time = 0;
}
_local3.interruptable = _local1.attributes.interruptable == "true";
_local3.from_stealth = _local1.attributes.fromStealth == "true";
if (_local1.attributes.type != null) {
switch (_local1.attributes.type) {
case "hit" :
_local3.proc_type = 0;
break;
case "melee" :
_local3.proc_type = 1;
break;
case "cast" :
_local3.proc_type = 2;
break;
default :
_local3.proc_type = null;
}
}
_local3.probability = Number(_local1.attributes.probability);
_local3.data = new Array();
var _local2 = _local1.firstChild;
while (_local2 != null) {
if (_local2.nodeName != null) {
var _local4 = new Object();
for (var _local6 in _local2.attributes) {
_local4[_local6] = _local2.attributes[_local6];
}
_local4.id = getUID();
_local3.data.push(_local4);
}
_local2 = _local2.nextSibling;
}
_local5.proc = _local3;
break;
case "unique" :
_local5.unique = 1;
if (_local1.attributes.max != null) {
_local5.unique = _local1.attributes.max;
}
break;
case "stack" :
_local5.stack = Number(_local1.firstChild.nodeValue);
break;
case "requirement" :
_local5.requirement = _local1;
break;
default :
_local5[_local1.nodeName] = _local1.firstChild.nodeValue;
}
}
_local1 = _local1.nextSibling;
}
if ((_local5.proc != null) && (_local5.proc.proc_type == null)) {
switch (_local5.type.toLowerCase()) {
case "main hand" :
_local5.proc.proc_type = 1;
break;
case "trinket" :
_local5.proc.proc_type = 2;
break;
case "quest item" :
case "consumable" :
_local5.proc.proc_type = 3;
break;
default :
_local5.proc.proc_type = 0;
}
}
data.push(_local5);
}
}
static function getId(item_name) {
var _local1 = 0;
while (_local1 < data.length) {
if (data[_local1].name == item_name) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function getName(item_id) {
if (item_id == ItemIcon.EMPTY_ID) {
return("[Empty]");
}
return(data[item_id].dispName);
}
static function checkRequirement(item_id) {
return(PlayerCharacter.current_player.identity.checkRequirement(data[item_id].requirement));
}
static function uniqueCheck(item_name) {
var _local1 = getId(item_name);
var _local2 = data[_local1];
if (_local2.unique > 0) {
var _local3 = InventoryUI.findItemCount(_local1);
var _local4 = PlayerCharacter.current_player.current_equipment.findItemCount(_local1);
if ((_local3 + _local4) >= _local2.unique) {
return(false);
}
}
return(true);
}
static function questCheck(item_name) {
var _local2 = getId(item_name);
var _local1 = data[_local2];
if (_local1.quest == null) {
return(true);
}
return(QuestLogUI.current_log.questPossible(QuestList.data[QuestList.getId(_local1.quest)]));
}
static var is_loaded = false;
static var universal_id = 0;
}
Symbol 3928 MovieClip [__Packages.ItemIcon] Frame 0
class ItemIcon extends MovieClip
{
var item_id, stack, image_loader, text_format, createTextField, stack_text, icon_clip, loading_inst, image_id, icon_stack;
function ItemIcon () {
super();
item_id = EMPTY_ID;
stack = 0;
var self = this;
image_loader = new ImageLoader();
image_loader.loadEvent = function (target_mc) {
self.loading_inst._visible = false;
};
text_format = new TextFormat();
text_format.font = "_sans";
text_format.size = 11;
text_format.align = "right";
text_format.color = 16777215 /* 0xFFFFFF */;
text_format.bold = true;
}
static function swapItem(a, b) {
DebugWindow.debug((((((("DEBUG : Swapping Items from A id = " + a.item_id) + " stack = ") + a.stack) + " to B id = ") + b.item_id) + " stack = ") + b.stack);
if (a == b) {
DebugWindow.debug("DEBUG : Objects are identical, ignored");
return(undefined);
}
if (a.item_id == b.item_id) {
var _local4 = ItemList.data[a.item_id].stack;
if (b.stack < _local4) {
b.stack = b.stack + a.stack;
if (b.stack > _local4) {
DebugWindow.debug("DEBUG : Moving excess from B to A");
a.stack = b.stack - _local4;
b.stack = _local4;
} else {
DebugWindow.debug("DEBUG : All of A stacked over to B");
a.item_id = EMPTY_ID;
a.stack = 0;
}
ItemUI.addStackTrace((("Stack " + ItemList.getName(a.item_id)) + " & ") + ItemList.getName(b.item_id));
return(undefined);
}
}
DebugWindow.debug("DEBUG : Exchanging object normally");
var _local3 = new Object();
_local3.item_id = a.item_id;
_local3.stack = a.stack;
a.item_id = b.item_id;
a.stack = b.stack;
b.item_id = _local3.item_id;
b.stack = _local3.stack;
ItemUI.addStackTrace((("Swap " + ItemList.getName(a.item_id)) + " & ") + ItemList.getName(b.item_id));
}
function onRollOver() {
if (((item_id != null) && (item_id != EMPTY_ID)) && (stack > 0)) {
ItemInfo.current_item_info.showItem(ItemList.data[item_id]);
}
}
function onRollOut() {
ItemInfo.current_item_info.hide();
}
function update() {
var _local2 = createTextField("stack_text", 3, 1, 21, 36, 18);
_local2.setNewTextFormat(text_format);
_local2.selectable = false;
_local2.filters = new Array(new flash.filters.DropShadowFilter(0, 0, 0, 100, 5, 5, 5, 1));
if ((item_id == EMPTY_ID) || (stack == 0)) {
stack_text.text = "";
if (icon_clip != null) {
icon_clip.removeMovieClip();
icon_clip = null;
}
loading_inst._visible = false;
image_id = EMPTY_ID;
} else {
if (item_id != image_id) {
var _local3 = ItemList.data[item_id].invImage;
icon_clip = icon_stack.createEmptyMovieClip("icon", 1);
image_loader.loadImage(_local3, icon_clip);
image_id = item_id;
}
if (stack > 1) {
stack_text.text = stack;
} else {
stack_text.text = "";
}
loading_inst._visible = true;
}
}
static var EMPTY_ID = -1;
}
Symbol 3929 MovieClip [__Packages.ImageLoader] Frame 0
class ImageLoader extends Object
{
var load_count, load_total, image_loader_handler, image_loader;
function ImageLoader () {
super();
var self = this;
load_count = 0;
load_total = 0;
image_loader_handler = new Object();
image_loader_handler.onLoadComplete = function (target_mc, http_status) {
if (http_status == 404) {
DebugWindow.debug("file not found error");
self.load_count++;
return(undefined);
}
};
image_loader_handler.onLoadInit = function (target_mc) {
self.load_count++;
self.loadEvent(target_mc);
if (self.load_count == self.load_total) {
self.allLoadedEvent();
}
};
image_loader = new MovieClipLoader();
image_loader.addListener(image_loader_handler);
}
function loadImage(url, target_mc) {
load_total++;
image_loader.loadClip(_global.swf_url + url, target_mc);
}
function loadEvent(target_mc) {
}
function allLoadedEvent() {
}
}
Symbol 3930 MovieClip [__Packages.ItemUI] Frame 0
class ItemUI extends WindowUI
{
static var select_x, select_y, delete_pending_item, base_line, stack_trace;
var getNextHighestDepth, selected_icon, attachMovie, selected_slot, item_drag, localToGlobal;
function ItemUI () {
super();
}
function onLoad() {
super.onLoad();
SoundManager.loadExternalSound("click", "events/click.mp3");
var _local3 = getNextHighestDepth();
selected_icon = attachMovie("inventory_selected", "selected_icon_inst", _local3);
selected_icon._visible = false;
}
function selectItem(slot_list, slot_index) {
selected_icon._visible = true;
selected_icon._x = slot_list[slot_index]._x;
selected_icon._y = slot_list[slot_index]._y;
selected_slot = slot_index;
}
function deselectItem() {
selected_icon._visible = false;
selected_slot = -1;
}
static function setDragLocation() {
select_x = _root._xmouse;
select_y = _root._ymouse;
}
function createDragItem(slot_list, slot_index, source_item) {
if ((source_item.item_id == ItemIcon.EMPTY_ID) || (source_item.stack == 0)) {
return(undefined);
}
DebugWindow.debug("DEBUG : Creating drag item");
if (slot_list == null) {
DebugWindow.debug("ERROR : Source slot list is invalid");
}
if (isNaN(slot_index)) {
DebugWindow.debug("ERROR : Source slot index is not a number");
}
if (source_item == null) {
DebugWindow.debug("ERROR : Source item not found");
}
item_drag = DragWindow.current_drag_window.attachMovie("dragged_item", "drag_inst", 1);
var _local2 = new Object();
if (slot_index < 0) {
_local2.x = source_item._x;
_local2.y = source_item._y;
} else {
_local2.x = slot_list[slot_index]._x;
_local2.y = slot_list[slot_index]._y;
}
localToGlobal(_local2);
item_drag._x = _local2.x;
item_drag._y = _local2.y;
item_drag.x_offset = select_x - item_drag._x;
item_drag.y_offset = select_y - item_drag._y;
item_drag._alpha = 50;
item_drag.item_id = source_item.item_id;
item_drag.stack = source_item.stack;
item_drag.source_item = source_item;
item_drag.source_list = slot_list;
item_drag.source_index = slot_index;
item_drag.update();
}
static function dropEvent(drag_item) {
var _local5 = new Object();
_local5.x = drag_item._xmouse;
_local5.y = drag_item._ymouse;
drag_item.localToGlobal(_local5);
var _local8 = VendorUI.current_vendor_ui;
var _local6 = InventoryUI.bag;
var _local13 = PlayerCharacter.current_player.current_equipment;
var _local9 = CharacterUI.current_character_ui;
var _local3 = ShortcutBarUI.current_shortcut_bar;
var _local4 = false;
if (drag_item.source_item._parent == _local3) {
var _local7 = 0;
while (_local7 < _local3.shortcut.length) {
if (_local3.shortcut[_local7].hitTest(_local5.x, _local5.y, false)) {
SoundManager.playSound("click");
_local4 = true;
var _local10 = _local3.shortcut[_local7].item_id;
var _local11 = _local3.shortcut[_local7].stack;
_local3.shortcut[_local7].item_id = drag_item.item_id;
_local3.shortcut[_local7].stack = drag_item.stack;
drag_item.source_item.item_id = _local10;
drag_item.source_item.stack = _local11;
_local4 = true;
_local3.update();
}
_local7++;
}
}
if ((drag_item.source_item._parent == _local3) && (!_local4)) {
ShortcutItem(drag_item.source_item).obj = null;
ShortcutItem(drag_item.source_item).index = -1;
drag_item.source_item.item_id = -1;
drag_item.source_item.stack = 0;
drag_item.source_item.update();
drag_item.removeMovieClip();
return(undefined);
}
if (_local3._visible && (!_local4)) {
var _local7 = 0;
while (_local7 < _local3.shortcut.length) {
if (_local3.shortcut[_local7].hitTest(_local5.x, _local5.y, false)) {
_local4 = true;
if (ItemList.checkRequirement(drag_item.item_id)) {
SoundManager.playSound("click");
_local3.shortcut[_local7].item_id = drag_item.item_id;
_local3.shortcut[_local7].stack = drag_item.stack;
_local4 = true;
_local3.update();
} else {
SoundManager.playSound("quest_decline");
}
}
_local7++;
}
}
if (_local8._visible && (!_local4)) {
var _local12 = null;
var _local2 = 0;
while (_local2 < InventoryUI.bag.length) {
if (drag_item.source_list == InventoryUI.bag[_local2].inventory_slot) {
_local12 = InventoryUI.bag[_local2];
}
_local2++;
}
if (_local8.hitTest(_local5.x, _local5.y, false) && (_local12 != null)) {
_local12.useItem(drag_item.source_index);
_local4 = true;
}
}
var _local2 = 0;
while (_local2 < _local6.length) {
if (_local6[_local2]._visible && (!_local4)) {
var _local7 = 0;
while (_local7 < _local6[_local2].inventory_slot.length) {
if (_local6[_local2].inventory_slot[_local7].hitTest(_local5.x, _local5.y, false)) {
if (drag_item.source_list == _local8.vendor_slot) {
_local8.useItem(drag_item.source_index);
_local4 = true;
} else {
SoundManager.playSound("kalink");
ItemIcon.swapItem(drag_item.source_item, _local6[_local2].inventory_slot[_local7]);
drag_item.source_item.update();
_local6[_local2].inventory_slot[_local7].update();
_local4 = true;
}
}
_local7++;
}
}
_local2++;
}
if ((_local9._visible && (_local9.current_character == PlayerCharacter.current_player)) && (!_local4)) {
var _local7 = 0;
while (_local7 < _local9.character_slot.length) {
if (_local9.character_slot[_local7].hitTest(_local5.x, _local5.y, false)) {
_local4 = true;
if (Equipment.checkType(drag_item, _local7)) {
if (ItemList.checkRequirement(drag_item.item_id)) {
SoundManager.playSound("kalink");
ItemIcon.swapItem(drag_item.source_item, _local13.slot[_local7]);
drag_item.source_item.update();
_local9.update();
} else {
SoundManager.playSound("quest_decline");
}
}
}
_local7++;
}
}
if ((!_local4) && (drag_item.source_item._parent != _local8)) {
delete_pending_item = new Object();
delete_pending_item = drag_item.source_item;
SoundManager.playSound("kalink");
PromptUI.current_prompt.openPrompt("Delete", "Are you sure you want to delete this item?", true, deleteResponse);
}
InventoryUI.deselectBagItem();
_local9.deselectItem();
drag_item.removeMovieClip();
PlayerCharacter.current_player.updateStats();
_local9.update();
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
}
static function deleteResponse(okay_selected) {
if (okay_selected) {
var _local1 = delete_pending_item;
_local1.item_id = -1;
_local1.stack = 0;
var _local2 = CharacterUI.current_character_ui;
InventoryUI.updateBag();
_local2.update();
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
}
}
static function getTotal() {
var _local1 = PlayerCharacter.current_player.current_equipment;
var _local2 = InventoryUI.getTotal();
if (_local1 == null) {
DebugWindow.debug("DEBUG : Equipment is not ready, get item total failed");
} else {
_local2 = _local2 + _local1.getTotal();
}
return(_local2);
}
static function establishBaseLine() {
base_line = getTotal();
stack_trace = "";
DebugWindow.debug("DEBUG : Inventory base line established at " + base_line);
}
static function adjustBaseLine(src, num_delta) {
base_line = base_line + num_delta;
stack_trace = stack_trace + (((src + " ") + num_delta) + newline);
assertionCheck();
}
static function addStackTrace(src) {
stack_trace = stack_trace + (src + " 0\n");
assertionCheck();
}
static function assertionCheck() {
var _local1 = getTotal();
if (_local1 != base_line) {
DebugWindow.debug((((("ERROR : Assertion check for player inventory failed, expected " + base_line) + " currently have ") + _local1) + ". Stack trace below:\n") + stack_trace);
}
}
static var DRAG_ITEM_DEPTH = 500;
}
Symbol 3931 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager extends MovieClip
{
function SoundManager () {
super();
}
static function loadLibrarySound(sound_id, library_id) {
if (sound_library[sound_id] != null) {
return(undefined);
}
var _local1 = new Sound();
_local1.attachSound(library_id);
sound_library[sound_id] = _local1;
}
static function loadExternalSound(sound_id, url) {
if (sound_library[sound_id] != null) {
return(undefined);
}
var _local2 = new Sound();
_local2.onLoad = function (succ) {
if (!succ) {
DebugWindow.debug("ERROR: External Sound Load Failed");
}
};
_local2.loadSound((_global.swf_url + GameConstants.SOUND_PATH) + url);
sound_library[sound_id] = _local2;
return(_local2);
}
static function setAllowPlayback(allow) {
allow_playback = allow;
}
static function setSoundEnabled(new_value) {
sound_enabled = new_value;
}
static function setBGMEnabled(new_value) {
if (bgm_enabled != new_value) {
if (new_value) {
bgm_enabled = true;
playBGM(saved_bgm_id);
} else {
saved_bgm_id = last_bgm_id;
bgm_enabled = true;
playBGM(null);
}
}
bgm_enabled = new_value;
}
static function setSoundVolume(new_value) {
sound_volume = new_value;
}
static function setBGMVolume(new_value) {
bgm_volume = new_value;
if (bgm_sound != null) {
bgm_sound.setVolume(bgm_volume);
}
}
static function playSound(sound_id) {
if (sound_library[sound_id] == null) {
DebugWindow.debug(("ERROR: Sound ID " + sound_id) + " not found");
}
if (!sound_enabled) {
return(undefined);
}
if (!allow_playback) {
return(undefined);
}
sound_library[sound_id].setVolume(sound_volume);
sound_library[sound_id].start();
}
static function stopSound(sound_id) {
if (sound_library[sound_id] == null) {
DebugWindow.debug(("ERROR: Sound ID " + sound_id) + " not found");
}
sound_library[sound_id].stop();
}
static function playBGM(sound_id) {
if (sound_library[sound_id] == null) {
DebugWindow.debug(("ERROR: Sound ID " + sound_id) + " not found");
}
if ((sound_library[sound_id] == bgm_sound) && (bgm_switch == null)) {
return(undefined);
}
last_bgm_id = sound_id;
if (!bgm_enabled) {
saved_bgm_id = sound_id;
return(undefined);
}
if (sound_id == null) {
bgm_switch = new Sound();
} else {
bgm_switch = sound_library[sound_id];
}
}
static function switchBGM() {
if (bgm_switch.getBytesLoaded() < bgm_switch.getBytesTotal()) {
return(undefined);
}
bgm_sound = bgm_switch;
bgm_switch = null;
if (last_bgm_id == null) {
bgm_sound = null;
} else {
bgm_sound.setVolume(bgm_volume);
bgm_sound.start(0, 99999999);
}
}
function onEnterFrame() {
if (bgm_switch != null) {
if (bgm_sound == null) {
switchBGM();
} else {
bgm_sound.setVolume(bgm_sound.getVolume() - 5);
if (bgm_sound.getVolume() <= 0) {
bgm_sound.stop();
switchBGM();
}
}
}
}
static var sound_library = new Object();
static var bgm_sound = null;
static var bgm_switch = null;
static var allow_playback = true;
static var sound_enabled = true;
static var sound_volume = 100;
static var bgm_enabled = true;
static var bgm_volume = 100;
static var last_bgm_id = null;
static var saved_bgm_id = null;
}
Symbol 3932 MovieClip [__Packages.DragWindow] Frame 0
class DragWindow extends MovieClip
{
static var current_drag_window;
function DragWindow () {
super();
current_drag_window = this;
}
}
Symbol 3933 MovieClip [__Packages.DraggedItem] Frame 0
class DraggedItem extends ItemIcon
{
var source_item, _x, x_offset, _parent, _y, y_offset;
function DraggedItem () {
super();
}
function onLoad() {
super.onLoad();
Mouse.addListener(this);
}
function onMouseUp() {
if (source_item != null) {
ItemUI.dropEvent(this);
}
}
function onEnterFrame() {
_x = _parent._xmouse - x_offset;
_y = _parent._ymouse - y_offset;
}
}
Symbol 3934 MovieClip [__Packages.VendorUI] Frame 0
class VendorUI extends ItemUI
{
static var current_vendor_ui;
var vendor_slot, getNextHighestDepth, attachMovie, buyback_slot, cancel_button, cancel_button_inst, close_button, close_button_inst, portrait, _visible, vendor, hide, gold_text, silver_text, copper_text, selling_price, purchase_price, selected_icon, selected_slot, deselectItem;
function VendorUI () {
super();
current_vendor_ui = this;
}
function onLoad() {
var _local5;
vendor_slot = new Array();
var _local4 = 0;
while (_local4 < VENDOR_POS.length) {
_local5 = getNextHighestDepth();
var _local3 = attachMovie("vendor_item", "ven" + _local5, _local5);
_local3._x = VENDOR_POS[_local4][0];
_local3._y = VENDOR_POS[_local4][1];
_local3.slot_index = vendor_slot.length;
vendor_slot.push(_local3);
_local4++;
}
_local5 = getNextHighestDepth();
buyback_slot = attachMovie("buyback_item", "buyback", _local5);
buyback_slot._x = BUYBACK_POS[0];
buyback_slot._y = BUYBACK_POS[1];
buyback_slot.slot_index = BUYBACK_SLOT;
super.onLoad();
var self = this;
cancel_button = cancel_button_inst;
cancel_button.onRelease = function () {
SoundManager.playSound("click");
self.hide();
};
close_button = close_button_inst;
close_button.onRelease = function () {
SoundManager.playSound("click");
self.hide();
};
}
function show() {
attachMovie(NPCInfoUI.current_npc_info_ui.info_character.character_portrait, "portrait", 50);
portrait.filters = NPCInfoUI.current_npc_info_ui.info_character.getFilterArray();
updateCoins();
super.show();
SoundManager.playSound("click");
PlayerCharacterToggleButton.current_character_ui_toggle.setActive(false);
}
function onEnterFrame() {
super.onEnterFrame();
if (_visible && (vendor.inactive)) {
SoundManager.playSound("click");
hide();
}
}
function updateCoins() {
var _local2 = InventoryUI.copper;
gold_text.text = int((_local2 / 100) / 100);
silver_text.text = int((_local2 / 100) % 100);
copper_text.text = int(_local2 % 100);
InventoryUI.getCoins(0);
}
function setupVendor(sell, buy, list) {
selling_price = sell;
purchase_price = buy;
buyback_slot.item_id = null;
buyback_slot.stack = 0;
buyback_slot._visible = false;
var _local2 = 0;
while (_local2 < VENDOR_POS.length) {
vendor_slot[_local2].item_id = null;
vendor_slot[_local2].stack = 0;
vendor_slot[_local2]._visible = false;
_local2++;
}
_local2 = 0;
while (_local2 < list.length) {
vendor_slot[_local2].item_id = ItemList.getId(list[_local2].name);
vendor_slot[_local2].stack = list[_local2].stack;
vendor_slot[_local2].cost = (Number(ItemList.data[vendor_slot[_local2].item_id].cost) * vendor_slot[_local2].stack) * selling_price;
vendor_slot[_local2].update();
vendor_slot[_local2]._visible = true;
_local2++;
}
}
function setupBuyback(buyback_item) {
buyback_slot.item_id = buyback_item.item_id;
buyback_slot.stack = buyback_item.stack;
buyback_slot.cost = (Number(ItemList.data[buyback_slot.item_id].cost) * buyback_slot.stack) * purchase_price;
buyback_slot.update();
buyback_slot._visible = true;
}
function selectItem(dummy_list, slot_index) {
if ((vendor_slot[slot_index].item_id == ItemIcon.EMPTY_ID) || (slot_index == ItemIcon.EMPTY_ID)) {
selected_icon._visible = false;
selected_slot = -1;
} else if (selected_slot == slot_index) {
useItem(slot_index);
} else if (slot_index == BUYBACK_SLOT) {
super.selectItem(vendor_slot, slot_index);
selected_icon._x = buyback_slot._x;
selected_icon._y = buyback_slot._y;
} else {
super.selectItem(vendor_slot, slot_index);
}
}
function useItem(slot_index) {
if (vendor_slot[slot_index].item_id == ItemIcon.EMPTY_ID) {
return(undefined);
}
if (slot_index == BUYBACK_SLOT) {
if (((InventoryUI.copper >= buyback_slot.cost) && (ItemList.uniqueCheck(ItemList.data[buyback_slot.item_id].name))) && (ItemList.questCheck(ItemList.data[buyback_slot.item_id].name))) {
SoundManager.playSound("coin");
InventoryUI.copper = InventoryUI.copper - buyback_slot.cost;
InventoryUI.getItem(buyback_slot.item_id, buyback_slot.stack);
updateCoins();
ShortcutBarUI.current_shortcut_bar.update();
InventoryUI.questUpdate();
buyback_slot.item_id = null;
buyback_slot.stack = 0;
buyback_slot._visible = false;
}
} else if (((InventoryUI.copper >= vendor_slot[slot_index].cost) && (ItemList.uniqueCheck(ItemList.data[vendor_slot[slot_index]].name))) && (ItemList.questCheck(ItemList.data[vendor_slot[slot_index]].name))) {
SoundManager.playSound("coin");
InventoryUI.copper = InventoryUI.copper - vendor_slot[slot_index].cost;
InventoryUI.getItem(vendor_slot[slot_index].item_id, vendor_slot[slot_index].stack);
updateCoins();
ShortcutBarUI.current_shortcut_bar.update();
InventoryUI.questUpdate();
}
deselectItem();
ShortcutBarUI.current_shortcut_bar.update();
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
}
static var BUYBACK_SLOT = -2;
static var VENDOR_POS = [[19, 77], [184, 77], [19, 129], [184, 129], [19, 181], [184, 181], [19, 233], [184, 233], [19, 285], [184, 285]];
static var BUYBACK_POS = [184, 349];
}
Symbol 3935 MovieClip [__Packages.NPCTemplate] Frame 0
class NPCTemplate extends Character
{
var data, stop, is_fading, is_just_hit, target_character, label_name, _alpha, trial_count, vanish_alpha, global_y, current_equipment, updateStats, current_health, maximum_health, current_mana, maximum_mana, dialog_list, dialog_visible, prev_patterns, syncCoordinates, id_name, identity, character_name, character_portrait, character_profile, trigger_list, is_elite, gravity_bound, greetings, current_level, filters, inactive, shadow, removeMovieClip, stealthed, action_duration, action_start_time, current_action_data, control_countdown, body_box, global_x, turnCharacter, current_faction, hit_check, hit_box, damage_variation, damage, checkForProc, animation_data, animation_type, hit_list, disable_trinket, buff_list, label_obj, current_dialog, control_area, _width, _x, current_state, gotoAndPlay, isGrounded, involuntary_animation_type, wound_immune, action_animation, current_effect, player_damage, kill_exp, move_speed, move_scale, last_attacker, trigger_source, action_queue, procDepleteCheck, trigger_name, _y, facing_left, speed_x, speed_y, jump_scale, damage_reduction, isAlive, _height;
function NPCTemplate () {
super();
}
function onLoad() {
if (data == null) {
_global.debug("DEBUG : Disabling uninitialized character");
(stop());// not popped
return(undefined);
}
super.onLoad();
is_fading = false;
is_just_hit = false;
target_character = null;
label_name = null;
_alpha = 0;
trial_count = 0;
vanish_alpha = 1;
global_y = ScrollingStage.current_stage.ground_level;
var _local4 = 0;
while (_local4 < data.equip_list.length) {
var _local5 = Equipment.getSlot(data.equip_list[_local4].slot);
if (((_local5 == Equipment.SLOT_FINGER1) && (current_equipment.slot[Equipment.SLOT_FINGER1].item_id != ItemIcon.EMPTY_ID)) && (current_equipment.slot[Equipment.SLOT_FINGER2].item_id == ItemIcon.EMPTY_ID)) {
_local5 = Equipment.SLOT_FINGER2;
}
current_equipment.slot[_local5].item_id = ItemList.getId(data.equip_list[_local4].name);
current_equipment.slot[_local5].stack = data.equip_list[_local4].stack;
_local4++;
}
updateStats();
current_health = maximum_health;
current_mana = maximum_mana;
dialog_list = new Array();
dialog_visible = false;
prev_patterns = new Array();
setState("normal");
}
function initialize() {
syncCoordinates();
id_name = data.name;
identity = data.identity;
character_name = data.display_name;
character_portrait = data.portrait;
character_profile = data.profile;
trigger_list = data.trigger_list;
is_elite = data.is_elite;
gravity_bound = data.gravity_bound;
greetings = GameConstants.DEFAULT_GREETING_DIALOG;
if (data.greetings != null) {
greetings = data.greetings;
}
current_level = data.level + int(Math.random() * (data.level_variation + 1));
filters = getFilterArray();
}
function onEnterFrame() {
super.onEnterFrame();
if (inactive) {
NPCInfoUI.current_npc_info_ui.resetCharacter(this);
}
if (is_fading) {
shadow.lock_alpha = false;
_alpha = _alpha - 10;
if (_alpha <= 0) {
cleanUp();
removeMovieClip();
}
} else if (_alpha < 100) {
_alpha = _alpha + 10;
if (_alpha > 100) {
_alpha = 100;
}
}
if (stealthed && (vanish_alpha > 0)) {
vanish_alpha = vanish_alpha - 0.05;
shadow.lock_alpha = true;
filters = getFilterArray();
} else if ((!stealthed) && (vanish_alpha < 1)) {
vanish_alpha = vanish_alpha + 0.25;
if (vanish_alpha > 1) {
vanish_alpha = 1;
}
shadow.lock_alpha = false;
filters = getFilterArray();
}
if (action_duration == DURATION_DIALOG) {
if (!dialog_visible) {
setNextAction();
}
} else if (action_duration != DURATION_INFINITE) {
if ((getTimer() - action_start_time) > (action_duration * 1000)) {
setNextAction();
}
}
if ((((target_character != null) && (current_action_data.animation_type == Character.ANIM_TYPE_MOVE)) && (control_countdown <= 0)) && (!body_box.hitTest(target_character.body_box))) {
var _local7;
if (global_x > target_character.global_x) {
_local7 = true;
} else {
_local7 = false;
}
if (current_action_data.speed_x < 0) {
turnCharacter(!_local7);
} else {
turnCharacter(_local7);
}
}
if (((target_character == null) && (current_action_data.animation_type == Character.ANIM_TYPE_MOVE)) && (Math.random() < 0.1)) {
turnCharacter(Math.random() < 0.5);
}
if (!inactive) {
var _local4 = FactionTable.getEnemiesList(current_faction);
var _local3 = 0;
while (_local3 < _local4.length) {
if ((hit_check && (hit_box.hitTest(_local4[_local3].body_box))) && (!_local4[_local3].inactive)) {
var _local6 = _local4[_local3].takeDamage(this, int((damage + (Math.random() * (damage_variation + 1))) * current_action_data.multiplier), false, false);
if (_local6) {
_local4[_local3].knockBack(this, current_action_data.force, current_action_data.angle);
var _local5 = current_action_data.hit_effect;
if (_local5 == null) {
_local5 = GameConstants.DEFAULT_HIT_EFFECT;
}
ScrollingStage.current_stage.spawnCharEffect(_local5, _local4[_local3], false);
checkForProc(hit_box._x, hit_box._y, Character.PROC_MELEE, _local4[_local3]);
}
}
_local3++;
}
}
QuestLogUI.current_log.updateEscortQuest(this);
}
function endAction(prev_animation) {
if ((prev_animation != animation_data) && (animation_type != Character.ANIM_TYPE_READY_CAST)) {
return(undefined);
}
hit_list = new Array();
disable_trinket = true;
switch (animation_type) {
case Character.ANIM_TYPE_DEATH :
(stop());// not popped
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].sfx != null) {
buff_list[_local2].sfx.startFade();
}
if (buff_list[_local2].npc != null) {
buff_list[_local2].npc.startFade();
}
_local2++;
}
buff_list = new Array();
NPCInfoUI.current_npc_info_ui.resetCharacter(this);
label_obj.removeMovieClip();
label_obj = null;
if (current_dialog != null) {
current_dialog.startFade();
}
FactionTable.unregisterFaction(this, current_faction);
NPCSpawnList.current_spawn_list.deleteNPC(this, control_area);
is_fading = true;
break;
case Character.ANIM_TYPE_JUMP :
case Character.ANIM_TYPE_SINGLE_PAUSE :
(stop());// not popped
break;
case Character.ANIM_TYPE_THROW :
case Character.ANIM_TYPE_CAST :
case Character.ANIM_TYPE_ATTACK :
case Character.ANIM_TYPE_SINGLE :
setNextAction();
break;
case Character.ANIM_TYPE_IDLE :
case Character.ANIM_TYPE_MOVE :
if (current_action_data.play_sound) {
if ((_x > (-_width)) && (_x < (GameConstants.SCREEN_WIDTH + _width))) {
SoundManager.playSound((((id_name + "_") + current_state) + "_") + current_action_data.action_name);
}
}
case Character.ANIM_TYPE_LOOPING :
(gotoAndPlay(animation_data));// not popped
break;
case Character.ANIM_TYPE_CONTROL :
(gotoAndPlay(animation_data));// not popped
break;
case Character.ANIM_TYPE_WOUND :
if (!isGrounded()) {
animation_type = Character.ANIM_TYPE_JUMP;
action_duration = DURATION_INFINITE;
(stop());// not popped
break;
}
case Character.ANIM_TYPE_DODGE :
animation_type = Character.ANIM_TYPE_IDLE;
setNextPattern();
break;
default :
DebugWindow.debug(("ERROR: Animation " + prev_animation) + " not handled");
}
}
function setAction(action_name) {
if (GameUtil.isInArray(involuntary_animation_type, animation_type)) {
wound_immune = false;
return(undefined);
}
super.setAction(action_name);
ItemInfo.current_item_info.updateNPC(this);
var _local3 = action_animation[action_name];
wound_immune = _local3.wound_immune;
if (_local3.play_sound) {
if ((_x > (-_width)) && (_x < (GameConstants.SCREEN_WIDTH + _width))) {
SoundManager.playSound((((id_name + "_") + current_state) + "_") + _local3.action_name);
}
}
if ((_local3.effect != null) && (!_local3.cue_effect)) {
ScrollingStage.current_stage.spawnCharEffect(_local3.effect, this, true);
} else {
current_effect = _local3.effect;
}
switch (animation_type) {
case Character.ANIM_TYPE_CAST :
disable_trinket = false;
break;
case Character.ANIM_TYPE_DEATH :
label_obj.removeMovieClip();
label_obj = null;
var _local5 = Math.min(player_damage / maximum_health, 1);
if (_local5 <= 0) {
break;
}
QuestLogUI.current_log.updateKillQuest(data.name);
var _local4 = PlayerCharacter.current_player;
_local4.gainExp(int(kill_exp * _local5));
ScrollingStage.current_stage.spawnCombatText(_local4._x, _local4._y - (-_local4.body_box._y), int(kill_exp * _local5) + "xp", 6);
}
switch (action_name) {
case Character.ACTION_STUN :
case Character.ACTION_BANISH :
case Character.ACTION_INCAPACITATE :
case Character.ACTION_FEAR :
action_duration = DURATION_INFINITE;
move_speed = Math.abs(_local3.speed_x) * move_scale;
}
}
function hitGroundEvent() {
if (animation_type == Character.ANIM_TYPE_JUMP) {
setNextAction();
}
super.hitGroundEvent();
}
function regainControl() {
super.regainControl();
hit_list = new Array();
animation_type = Character.ANIM_TYPE_IDLE;
setNextPattern();
}
function setState(state_name) {
if (state_name == current_state) {
return(undefined);
}
var _local2 = 0;
while (_local2 < data.state_action_table.length) {
if (data.state_action_table[_local2].state_name == state_name) {
shadow.createSelectPlate(character_name);
shadow.setNamePlateColor(GameUtil.hex2int(data.state_action_table[_local2].name_color));
if (current_faction != null) {
FactionTable.unregisterFaction(this, current_faction);
}
current_state = state_name;
current_faction = data.state_action_table[_local2].state_faction;
FactionTable.registerFaction(this, current_faction);
action_animation = data.state_action_table[_local2].state_action_animation;
setNextPattern();
return(undefined);
}
_local2++;
}
DebugWindow.debug(((("ERROR : State " + state_name) + " not found for ") + character_name) + ", state switch failed");
}
function getFactionTarget(faction, char, see_stealth) {
switch (faction) {
case "friendly" :
return(Character(FactionTable.getClosestFriend(this, current_faction, see_stealth)));
case "hostile" :
return(Character(FactionTable.getClosestEnemy(this, current_faction, see_stealth)));
case "current_target" :
return(Character(target_character));
case "last_attacker" :
return(Character(last_attacker));
case "trigger_source" :
return(Character(trigger_source));
case "character" :
return(FactionTable.getClosestCharacter(this, char));
}
if (faction != null) {
return(Character(FactionTable.getClosestFriend(this, faction, see_stealth)));
}
return(target_character);
}
function setNextPattern() {
if (trial_count == DURATION_INFINITE) {
if (!dialog_visible) {
dialog_list.push("Help! I'm misbehaving...");
nextDialog();
}
action_duration = 2000;
return(undefined);
}
if (control_countdown > 0) {
return(undefined);
}
action_queue = new Array();
var _local14;
_local14 = false;
var _local8 = 0;
while ((_local8 < data.pattern_list.length) && (!_local14)) {
var _local3;
_local3 = true;
var _local10 = 0;
while ((_local10 < data.pattern_list[_local8].condition_list.length) && (_local3)) {
var _local4;
var _local5;
var _local2 = data.pattern_list[_local8].condition_list[_local10];
switch (_local2.type.toLowerCase()) {
case "variable_greater_than" :
_local3 = (PlayerCharacter.current_player.dynamic_variables[_local2.name] != null) && (PlayerCharacter.current_player.dynamic_variables[_local2.name] > Number(_local2.value));
break;
case "variable_less_than" :
_local3 = (PlayerCharacter.current_player.dynamic_variables[_local2.name] != null) && (PlayerCharacter.current_player.dynamic_variables[_local2.name] < Number(_local2.value));
break;
case "variable_equals_to" :
_local3 = (PlayerCharacter.current_player.dynamic_variables[_local2.name] != null) && (PlayerCharacter.current_player.dynamic_variables[_local2.name] == Number(_local2.value));
break;
case "health_greater_than" :
_local4 = _local2.value;
if (_local4.charAt(_local4.length - 1) == "%") {
_local5 = int((maximum_health * Number(_local4.substr(0, _local4.length - 1))) / 100);
} else {
_local5 = Number(_local4);
}
if (current_health <= _local5) {
_local3 = false;
}
break;
case "health_less_than" :
_local4 = _local2.value;
if (_local4.charAt(_local4.length - 1) == "%") {
_local5 = int((maximum_health * Number(_local4.substr(0, _local4.length - 1))) / 100);
} else {
_local5 = Number(_local4);
}
if (current_health >= _local5) {
_local3 = false;
}
break;
case "mana_greater_than" :
_local4 = _local2.value;
if (_local4.charAt(_local4.length - 1) == "%") {
_local5 = int((maximum_mana * Number(_local4.substr(0, _local4.length - 1))) / 100);
DebugWindow.debug((((_local4.substr(0, _local4.length - 1) + "% * ") + maximum_mana) + " = ") + _local5);
} else {
_local5 = Number(_local4);
}
if (current_mana <= _local5) {
_local3 = false;
}
break;
case "mana_less_than" :
_local4 = _local2.value;
if (_local4.charAt(_local4.length - 1) == "%") {
_local5 = int((maximum_mana * Number(_local4.substr(0, _local4.length - 1))) / 100);
} else {
_local5 = Number(_local4);
}
if (current_mana >= _local5) {
_local3 = false;
}
break;
case "range_greater_than" :
var _local11 = null;
var _local12 = _local2.faction;
_local11 = getFactionTarget(_local12, _local2.character, _local2.see_stealth);
if (_local11 == null) {
_local3 = false;
} else {
var _local13;
_local13 = Math.abs(global_x - _local11.global_x);
if (_local13 <= Number(_local2.value)) {
_local3 = false;
}
}
break;
case "range_less_than" :
_local11 = null;
_local12 = _local2.faction;
_local11 = getFactionTarget(_local12, _local2.character, _local2.see_stealth);
if (_local11 == null) {
_local3 = false;
} else {
var _local13 = Math.abs(global_x - _local11.global_x);
if (_local13 >= Number(_local2.value)) {
_local3 = false;
}
}
break;
case "state_equals_to" :
if (current_state != _local2.value) {
_local3 = false;
}
break;
case "just_took_damage" :
_local3 = is_just_hit == (_local2.value == "true");
break;
case "has_thrown_weapon" :
_local3 = current_equipment.hasThrownWeapon() == (_local2.value == "true");
break;
case "has_casting_mana" :
if (((_local2.value == "true") || (_local2.value == "false")) || (_local2.value == null)) {
_local3 = ((current_equipment.slot[Equipment.SLOT_TRINKET].item_id != ItemIcon.EMPTY_ID) && (procDepleteCheck(ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].proc))) == (_local2.value == "true");
} else {
_local3 = procDepleteCheck(ItemList.data[ItemList.getId(_local2.value)].proc);
}
break;
case "does_not_have_effect" :
case "has_effect" :
_local3 = false;
var _local6 = 0;
while (_local6 < buff_list.length) {
if (((buff_list[_local6].type == "control") || (buff_list[_local6].type == "special")) || (buff_list[_local6].type == "tempstat")) {
if (buff_list[_local6].name == _local2.value) {
_local3 = true;
}
} else if (buff_list[_local6].type == _local2.value) {
_local3 = true;
}
_local6++;
}
if (_local2.type.toLowerCase() == "does_not_have_effect") {
_local3 = !_local3;
}
break;
case "cannot_target" :
case "can_target" :
_local12 = _local2.value;
_local11 = getFactionTarget(_local12, _local2.character, _local2.see_stealth);
if ((_local12 != "friendly") && (_local12 != current_faction)) {
_local3 = (_local11 != null) && (!_local11.stealthed);
} else {
_local3 = _local11 != null;
}
if (_local2.type.toLowerCase() == "cannot_target") {
_local3 = !_local3;
}
break;
case "player_requirement" :
_local3 = PlayerCharacter.current_player.identity.checkRequirement(_local2.value);
break;
case "last_attacker" :
case "current_target" :
var _local7 = target_character;
if (_local2.type.toLowerCase() == "last_attacker") {
_local7 = last_attacker;
}
_local12 = _local2.value;
switch (_local12) {
case "friendly" :
_local3 = (_local7 != null) && (_local7.current_faction == current_faction);
break;
case "hostile" :
_local3 = (_local7 != null) && (_local7.current_faction != current_faction);
break;
case "character" :
_local3 = _local7.id_name == _local2.character;
break;
case "none" :
_local3 = _local7 == null;
break;
default :
_local3 = (_local7 != null) && (_local7.current_faction == _local12);
}
break;
case "trigger" :
_local3 = trigger_name == _local2.value;
break;
case "quest" :
case "vendor" :
case "portal" :
_local3 = getSymbolLabel(_local2.type.toLowerCase()) == _local2.value;
break;
case "random" :
_local3 = Math.random() < Number(_local2.value);
break;
default :
DebugWindow.debug((("ERROR : Unknown condition " + _local2.type) + " found in behavior pattern of ") + character_name);
_local3 = false;
}
_local10++;
}
if (_local3) {
prev_patterns.push(_local8);
if (prev_patterns.length > 10) {
prev_patterns.shift();
}
_local10 = 0;
while (_local10 < data.pattern_list[_local8].action_list.length) {
var _local9 = data.pattern_list[_local8].action_list[_local10];
if (_local9.is_random) {
if (Math.random() < _local9.probability) {
action_queue.push(_local9);
}
} else {
action_queue.push(_local9);
}
_local10++;
}
_local14 = true;
}
_local8++;
}
trial_count++;
if ((trial_count > 25) && (trial_count != -1)) {
(stop());// not popped
DebugWindow.debug(("ERROR: NPC " + character_name) + " has no active action queued after 25 tries");
trial_count = -1;
} else if (action_queue.length > 0) {
is_just_hit = false;
trigger_name = null;
setNextAction();
} else {
setNextPattern();
}
}
function setNextAction() {
if ((((target_character != null) && (target_character._name == null)) || (target_character.stealthed)) || (!target_character.isAlive())) {
target_character = null;
}
switch (animation_type) {
case Character.ANIM_TYPE_IDLE :
case Character.ANIM_TYPE_MOVE :
if (!current_action_data.play_sound) {
break;
}
if (!((_x > (-_width)) && (_x < (GameConstants.SCREEN_WIDTH + _width)))) {
break;
}
SoundManager.stopSound((((id_name + "_") + current_state) + "_") + current_action_data.action_name);
}
if (action_queue.length == 0) {
setNextPattern();
return(undefined);
}
var _local4 = action_queue.shift();
if (_local4.set_state != null) {
setState(_local4.set_state);
return(undefined);
}
var _local6;
var _local8;
if (GameUtil.isInArray(INSTANT_ACTION_LIST, _local4.type)) {
switch (_local4.type) {
case "equip" :
DebugWindow.debug(("DEBUG : Character " + character_name) + " is equipping new item");
GameUtil.traceObj(_local4);
var _local7 = Equipment.getSlot(_local4.item_type);
if (((_local7 == Equipment.SLOT_FINGER1) && (current_equipment.slot[Equipment.SLOT_FINGER1].item_id != ItemIcon.EMPTY_ID)) && (current_equipment.slot[Equipment.SLOT_FINGER2].item_id == ItemIcon.EMPTY_ID)) {
_local7 = Equipment.SLOT_FINGER2;
}
current_equipment.slot[_local7].item_id = ItemList.getId(_local4.item_name);
current_equipment.slot[_local7].stack = _local4.item_stack;
updateStats();
if (CharacterUI.current_character_ui.current_character == this) {
CharacterUI.current_character_ui.update();
}
break;
case "chat" :
dialog_list = new Array();
if (current_dialog != null) {
current_dialog.startFade();
}
addDialog(data.dialog_list[_local4.dialog]);
if (!dialog_visible) {
nextDialog();
}
break;
case "target" :
target_character = getFactionTarget(_local4.faction, _local4.character, _local4.see_stealth);
break;
case "objective" :
QuestLogUI.current_log.updateSpecialActionQuest(_local4.name);
break;
case "despawn" :
(stop());// not popped
startFade();
return(undefined);
case "trigger" :
var _local5;
switch (_local4.faction) {
case "friendly" :
_local5 = FactionTable.getListenerFriends(this, _local4.trigger_name, _local4.radius, current_faction);
break;
case "hostile" :
_local5 = FactionTable.getListenerEnemies(this, _local4.trigger_name, _local4.radius, current_faction);
break;
case "character" :
_local5 = new Array(FactionTable.getClosestCharacter(this, _local4.character));
break;
default :
if (_local4.faction != null) {
_local5 = FactionTable.getListenerFriends(this, _local4.trigger_name, _local4.radius, _local4.faction);
} else {
_global.debug(("ERROR : Trigger failed for " + character_name) + ", faction not specified");
}
}
var _local3 = 0;
for(;;){
if (_local3 >= _local5.length) {
break;
}
_local5[_local3].trigger_name = _local4.trigger_name;
_local5[_local3].trigger_source = this;
_local5[_local3].setNextPattern();
_local3++;
};
}
setNextAction();
return(undefined);
}
if (_local4.type == "normal") {
_local8 = _local4.action_name;
} else {
DebugWindow.debug("ERROR : Undefined action type " + _local4.type);
}
if (trial_count != -1) {
trial_count = 0;
}
_local6 = action_animation[_local8];
current_action_data = _local6;
if (action_animation == null) {
DebugWindow.debug("ERROR: Action animation list is empty");
}
if (current_action_data == null) {
DebugWindow.debug(("ERROR: Action data for action name " + _local8) + " is not available");
}
if (_local6.special != null) {
var _local10 = label_name;
label_name = getSymbolLabel(_local6.special);
if (label_obj == null) {
label_obj = ScrollingStage.current_stage.spawnAttachable(_x, _y - (-body_box._y), "npc_symbol", this);
label_obj.gotoAndStop(label_name);
label_obj.parent = this;
label_obj.onRelease = function () {
this.parent.onRelease();
};
} else if (label_name != _local10) {
label_obj.gotoAndStop(label_name);
}
label_obj._visible = true;
} else {
if (label_obj != null) {
label_obj._visible = false;
}
label_name = null;
}
switch (_local6.animation_type) {
case Character.ANIM_TYPE_THROW :
if (current_equipment.hasThrownWeapon()) {
current_equipment.throwWeapon();
break;
}
setNextAction();
return(undefined);
case Character.ANIM_TYPE_CAST :
if (!((current_equipment.slot[Equipment.SLOT_TRINKET].item_id == ItemIcon.EMPTY_ID) || (!procDepleteCheck(ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].proc)))) {
break;
}
setNextAction();
return(undefined);
}
var _local9;
if (target_character != null) {
if (target_character == null) {
action_duration = 1;
action_start_time = getTimer();
setAction(_local8);
}
if (global_x > target_character.global_x) {
_local9 = true;
} else {
_local9 = false;
}
if (_local6.animation_type != Character.ANIM_TYPE_IDLE) {
if (_local6.speed_x < 0) {
turnCharacter(!_local9);
} else {
turnCharacter(_local9);
}
}
}
move_speed = Math.abs(_local6.speed_x) * move_scale;
if (facing_left) {
speed_x = (-Math.abs(_local6.speed_x)) * move_scale;
} else {
speed_x = Math.abs(_local6.speed_x) * move_scale;
}
speed_y = _local6.speed_y * jump_scale;
if (isNaN(_local4.duration)) {
action_duration = DURATION_INFINITE;
} else {
action_duration = _local4.duration;
if (action_duration != DURATION_DIALOG) {
action_duration = action_duration + (_local4.duration_variation * Math.random());
}
action_start_time = getTimer();
}
setAction(_local8);
}
function takeMagicalDamage(src_obj, damage) {
var _local3 = animation_type;
super.takeMagicalDamage(src_obj, damage);
ItemInfo.current_item_info.updateNPC(this);
if (((_local3 != Character.ACTION_DEATH) && (animation_type == Character.ACTION_DEATH)) && (player_damage > 0)) {
dropItems();
} else {
checkForProc(0, body_box._y / 2, Character.PROC_DAMAGE_TAKEN);
}
}
function takeDamage(src_obj, damage, magical, always_hit) {
var _local6 = animation_type;
var _local3 = false;
var _local4 = Math.round(damage * (1 - damage_reduction));
if ((src_obj == PlayerCharacter.current_player) || (src_obj.source_obj == PlayerCharacter.current_player)) {
_local3 = true;
}
if (_local3) {
player_damage = player_damage + _local4;
}
if (!super.takeDamage(src_obj, damage, magical, always_hit)) {
if (_local3) {
player_damage = player_damage - _local4;
}
return(false);
}
is_just_hit = true;
ItemInfo.current_item_info.updateNPC(this);
if (_local3) {
NPCInfoUI.current_npc_info_ui.setCharacter(this);
}
if (((_local6 != Character.ACTION_DEATH) && (animation_type == Character.ACTION_DEATH)) && (player_damage > 0)) {
dropItems();
} else {
checkForProc(0, body_box._y / 2, Character.PROC_DAMAGE_TAKEN);
}
return(true);
}
function setItemProperty(new_item) {
new_item.speed_x = ((speed_x / 10) + (Math.random() * 6)) - 3;
new_item.speed_y = ((speed_y / 10) + 5) + (Math.random() * 15);
new_item.global_x = global_x;
new_item.global_y = global_y - ((-body_box._y) / 2);
return(new_item);
}
function dropItems() {
var _local3 = data.drop_table;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].copper_min != null) {
var _local11 = _local3[_local2].gold_min + int(Math.random() * _local3[_local2].gold_var);
var _local8 = _local3[_local2].silver_min + int(Math.random() * _local3[_local2].silver_var);
var _local10 = _local3[_local2].copper_min + int(Math.random() * _local3[_local2].copper_var);
while (_local11 > 0) {
var _local5 = ScrollingStage.current_stage.spawnItem("gold_coin");
_local5 = setItemProperty(_local5);
_local5.initialize();
_local11--;
}
while (_local8 > 0) {
var _local5 = ScrollingStage.current_stage.spawnItem("silver_coin");
_local5 = setItemProperty(_local5);
_local5.initialize();
_local8--;
}
while (_local10 > 0) {
var _local5 = ScrollingStage.current_stage.spawnItem("copper_coin");
_local5 = setItemProperty(_local5);
_local5.initialize();
_local10--;
}
} else if (_local3[_local2] instanceof Array) {
var _local12 = Math.random();
var _local9 = 0;
var _local7 = false;
var _local4 = 0;
while ((_local4 < _local3[_local2].length) && (!_local7)) {
var _local6 = false;
if (_local3[_local2][_local4].quest_name != null) {
if (!QuestLogUI.current_log.questInProgress(_local3[_local2][_local4].quest_name, false)) {
_local6 = true;
}
}
if (!_local6) {
_local9 = _local9 + _local3[_local2][_local4].probability;
if (_local9 > _local12) {
_local7 = true;
var _local5 = ScrollingStage.current_stage.spawnItem(_local3[_local2][_local4].item_name, _local3[_local2][_local4].stack + int(Math.random() * (_local3[_local2][_local4].stack_variation + 1)));
_local5 = setItemProperty(_local5);
_local5.initialize();
}
}
_local4++;
}
}
_local2++;
}
}
function onRollOver() {
if (!isAlive()) {
return(undefined);
}
ItemInfo.current_item_info.showNPC(this);
}
function onRollOut() {
ItemInfo.current_item_info.hide();
}
function onRelease() {
if ((!PlayerCharacter.current_player.isAlive()) || (!isAlive())) {
return(undefined);
}
NPCInfoUI.current_npc_info_ui.setCharacter(this);
if (CharacterUI.current_character_ui._visible) {
CharacterUI.current_character_ui.current_character = this;
CharacterUI.current_character_ui.update();
SoundManager.playSound("kalink");
}
switch (current_action_data.special) {
case "quest" :
if (label_name == LABEL_NO_QUEST) {
return(undefined);
}
var _local3 = QuestLogUI.current_log.getRelatedQuests(data.quest_list);
if (_local3.length > 1) {
QuestGiverUI.current_giver_ui.active_quest_list = _local3;
QuestGiverUI.current_giver_ui.quest_giver = this;
QuestGiverUI.current_giver_ui.switchTo("quest_select");
return(undefined);
}
var _local2;
_local2 = QuestLogUI.current_log.getCompletedQuest(data.quest_list);
if (_local2 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local2;
QuestGiverUI.current_giver_ui.quest_giver = this;
QuestGiverUI.current_giver_ui.switchTo(LABEL_QUEST_COMPLETED);
return(undefined);
}
_local2 = QuestLogUI.current_log.getQuestManager(data.quest_list);
if (_local2 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local2;
QuestGiverUI.current_giver_ui.quest_giver = this;
QuestGiverUI.current_giver_ui.switchTo(LABEL_QUEST_IN_PROGRESS);
return(undefined);
}
_local2 = new QuestManager();
_local2.data = QuestLogUI.current_log.getAvailableQuest(data.quest_list);
QuestGiverUI.current_giver_ui.active_quest_obj = _local2;
QuestGiverUI.current_giver_ui.quest_giver = this;
QuestGiverUI.current_giver_ui.switchTo(LABEL_QUEST_AVAILABLE);
break;
case "vendor" :
VendorUI.current_vendor_ui.vendor = this;
VendorUI.current_vendor_ui.setupVendor(data.selling_price, data.purchase_price, data.vendor_list);
VendorUI.current_vendor_ui.show();
break;
case "portal" :
PortalMasterUI.current_portal_master_ui.portal_master = this;
PortalMasterUI.current_portal_master_ui.show();
}
}
function startFade() {
animation_type = Character.ANIM_TYPE_DEATH;
endAction(animation_data);
action_duration = DURATION_INFINITE;
}
function cleanUp() {
FactionTable.unregisterFaction(this, current_faction);
shadow.removeMovieClip();
}
function getFilterArray() {
var _local3 = new ColorMatrix();
var _local4 = false;
var _local5 = 1;
if (data.tinted) {
_local3.adjustHue(data.hue * 1.8);
_local3.adjustSaturation((data.saturation / 100) + 1);
_local3.adjustBrightness(data.brightness * 1.28, data.brightness * 1.28, data.brightness * 1.28);
_local3.adjustContrast(data.contrast / 100, data.contrast / 100, data.contrast / 100);
_local5 = _local5 * (data.alpha / 100);
_local4 = true;
}
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].tint != null) {
_local3.colorize(GameUtil.hex2int(buff_list[_local2].tint), Number(buff_list[_local2].amount));
_local4 = true;
}
_local2++;
}
if (vanish_alpha < 1) {
_local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].sfx != null) {
buff_list[_local2].sfx._alpha = vanish_alpha * 100;
}
_local2++;
}
shadow._alpha = vanish_alpha * 100;
_local5 = _local5 * vanish_alpha;
_local4 = true;
} else {
_local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].sfx != null) {
buff_list[_local2].sfx._alpha = 100;
}
_local2++;
}
shadow._alpha = 100;
}
_local3.setAlpha(_local5);
if (_local4) {
return(new Array(_local3.__get__filter()));
}
return(new Array());
}
function getBaseStats() {
var _local2 = LevelChart.getData(identity.getValue("sys_class"), current_level);
if (isNaN(data.experience)) {
kill_exp = _local2.kill_exp;
} else {
kill_exp = data.experience;
}
return(_local2);
}
function getSymbolLabel(special_type) {
var _local2;
_local2 = null;
switch (special_type) {
case "quest" :
if (QuestLogUI.current_log.getCompletedQuest(data.quest_list) != null) {
_local2 = LABEL_QUEST_COMPLETED;
} else if (QuestLogUI.current_log.getAvailableQuest(data.quest_list) != null) {
_local2 = LABEL_QUEST_AVAILABLE;
} else if (QuestLogUI.current_log.getQuestManager(data.quest_list) != null) {
_local2 = LABEL_QUEST_IN_PROGRESS;
} else {
_local2 = LABEL_NO_QUEST;
}
break;
case "vendor" :
_local2 = LABEL_VENDOR;
break;
case "portal" :
if (PortalMasterUI.current_portal_master_ui.portalDiscovered()) {
_local2 = LABEL_PORTAL_DISCOVERED;
} else {
_local2 = LABEL_PORTAL_NOT_DISCOVERED;
}
}
return(_local2);
}
function updateSymbol() {
if (!isAlive()) {
return(undefined);
}
if (current_action_data.special != null) {
var _local2 = label_name;
label_name = getSymbolLabel(current_action_data.special);
if (label_obj == null) {
label_obj = ScrollingStage.current_stage.spawnAttachable(_x, _y - (-body_box._y), "npc_symbol", this);
} else {
label_obj._visible = true;
}
if (label_name != _local2) {
label_obj.gotoAndStop(label_name);
}
} else {
label_name = null;
}
}
function addDialog(dialog_node) {
var _local3 = 0;
while (_local3 < dialog_node.length) {
if (dialog_node[_local3].is_random_text) {
var _local7 = Math.random();
var _local5 = 0;
var _local6 = false;
var _local2 = 0;
while ((_local2 < dialog_node[_local3].options_list.length) && (!_local6)) {
_local5 = _local5 + dialog_node[_local3].options_list[_local2].probability;
if (_local5 >= _local7) {
addDialog(dialog_node[_local3].options_list[_local2].dialog);
_local6 = true;
}
_local2++;
}
} else {
dialog_list.push(dialog_node[_local3].text);
}
_local3++;
}
}
function nextDialog() {
if (dialog_list.length == 0) {
dialog_visible = false;
current_dialog = null;
return(undefined);
}
var _local2 = String(dialog_list.shift());
if (body_box != null) {
current_dialog = ScrollingStage.current_stage.spawnChat(_x, (_y - (-body_box._y)) + 10, this, _local2);
} else {
current_dialog = ScrollingStage.current_stage.spawnChat(_x, (_y - _height) + 10, this, _local2);
}
if (!inactive) {
ChatLogUI.current_chat_log.addText(character_name, current_dialog.getChatText());
}
dialog_visible = true;
}
function startStealth() {
if (!stealthed) {
vanish_alpha = 1;
}
super.startStealth();
}
static var DURATION_INFINITE = -1;
static var DURATION_DIALOG = -2;
static var LABEL_NO_QUEST = "no_quest";
static var LABEL_QUEST_AVAILABLE = "quest_available";
static var LABEL_QUEST_IN_PROGRESS = "quest_in_progress";
static var LABEL_QUEST_COMPLETED = "quest_completed";
static var LABEL_VENDOR = "vendor";
static var LABEL_PORTAL_DISCOVERED = "portal_discovered";
static var LABEL_PORTAL_NOT_DISCOVERED = "portal_not_discovered";
static var INSTANT_ACTION_LIST = ["equip", "chat", "target", "trigger", "objective", "despawn"];
static var SPECIAL_ACTION_LIST = ["quest", "vendor", "portal"];
}
Symbol 3936 MovieClip [__Packages.NPCListData] Frame 0
class NPCListData extends Object
{
function NPCListData () {
super();
}
}
Symbol 3937 MovieClip [__Packages.Equipment] Frame 0
class Equipment extends Object
{
var slot, character_link;
function Equipment () {
super();
slot = new Array(17);
var _local3 = 0;
while (_local3 < slot.length) {
slot[_local3] = new Object();
slot[_local3].item_id = ItemIcon.EMPTY_ID;
slot[_local3].stack = 0;
slot[_local3].update = function () {
CharacterUI.current_character_ui.update();
};
_local3++;
}
}
static function getSlot(type) {
var _local1 = 0;
while (_local1 < SLOT_COUNT) {
if (SLOT_NAME[_local1].toLowerCase() == type.toLowerCase()) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function getTypeName(type) {
var _local1 = 0;
while (_local1 < SLOT_NAME.length) {
if (SLOT_NAME[_local1].toLowerCase() == type.toLowerCase()) {
return(SLOT_NAME[_local1]);
}
_local1++;
}
return(null);
}
static function checkType(src, slot) {
var _local1 = ItemList.data[src.item_id].type;
return(SLOT_NAME[slot].toLowerCase() == _local1.toLowerCase());
}
function getArray() {
return(slot);
}
function findItem(item_id) {
var _local2 = 0;
while (_local2 < slot.length) {
if (slot[_local2].item_id == item_id) {
return(_local2);
}
_local2++;
}
return(-1);
}
function findItemCount(item_id) {
var _local2 = 0;
while (_local2 < slot.length) {
if (slot[_local2].item_id == item_id) {
return(slot[_local2].stack);
}
_local2++;
}
return(0);
}
function getTotal() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < slot.length) {
if (slot[_local2].item_id != ItemIcon.EMPTY_ID) {
_local3 = _local3 + slot[_local2].stack;
}
_local2++;
}
return(_local3);
}
function deleteItem(item_id, count) {
if (count == null) {
count = 1;
}
var _local5 = count;
var _local2 = 0;
while (_local2 < slot.length) {
if (slot[_local2].item_id == item_id) {
slot[_local2].stack = slot[_local2].stack - count;
if (slot[_local2].stack < 1) {
slot[_local2].item_id = ItemIcon.EMPTY_ID;
slot[_local2].stack = 0;
}
character_link.updateStats();
slot[_local2].update();
questUpdate();
if (this == PlayerCharacter.current_player.current_equipment) {
ItemUI.adjustBaseLine("Equip Del " + ItemList.getName(item_id), -_local5);
}
return(true);
}
_local2++;
}
DebugWindow.debug((("ERROR : Failed to delete equipment " + ItemList.data[item_id].dispName) + " count ") + count);
return(false);
}
function questUpdate() {
QuestLogUI.current_log.updateCollectQuest(InventoryUI.bag, this);
}
function hasThrownWeapon() {
DebugWindow.debug((("DEBUG : " + character_link.character_name) + " doing thrown weapon check, amount left = ") + slot[SLOT_THROWN].stack);
return((slot[SLOT_THROWN].item_id != ItemIcon.EMPTY_ID) && (slot[SLOT_THROWN].stack > 0));
}
function throwWeapon() {
slot[SLOT_THROWN].stack--;
if (slot[SLOT_THROWN].stack <= 0) {
slot[SLOT_THROWN].item_id = ItemIcon.EMPTY_ID;
slot[SLOT_THROWN].stack = 0;
character_link.updateStats();
}
if (this == PlayerCharacter.current_player.current_equipment) {
ItemUI.adjustBaseLine("Throw", -1);
}
CharacterUI.current_character_ui.update();
}
static var SLOT_HEAD = 0;
static var SLOT_NECK = 1;
static var SLOT_SHOULDER = 2;
static var SLOT_CHEST = 3;
static var SLOT_BACK = 4;
static var SLOT_WRIST = 5;
static var SLOT_SHIRT = 6;
static var SLOT_HANDS = 7;
static var SLOT_WAIST = 8;
static var SLOT_LEGS = 9;
static var SLOT_FEET = 10;
static var SLOT_FINGER1 = 11;
static var SLOT_FINGER2 = 12;
static var SLOT_RELIC = 13;
static var SLOT_MAIN_HAND = 14;
static var SLOT_THROWN = 15;
static var SLOT_TRINKET = 16;
static var SLOT_COUNT = 17;
static var SLOT_NAME = ["Head", "Neck", "Shoulder", "Chest", "Back", "Wrist", "Shirt", "Hands", "Waist", "Legs", "Feet", "Finger", "Finger", "Relic", "Main Hand", "Thrown", "Trinket", "Off Hand", "Shield", "Consumable", "Quest Item"];
static var STAT_LIST = ["armor", "damage", "damageVar", "health", "mana", "spirit", "runSpeed", "jump", "haste", "spellHaste", "spellBoost"];
}
Symbol 3938 MovieClip [__Packages.CharacterUI] Frame 0
class CharacterUI extends ItemUI
{
static var current_character_ui;
var character_slot, getNextHighestDepth, attachMovie, _visible, current_character, hide, selected_icon, selected_slot, deselectItem, portrait, profile, profile_mask, character_name_inst, spirit_text_inst, stamina_text_inst, intelligence_text_inst, armor_text_inst, melee_text_inst, ranged_text_inst;
function CharacterUI () {
super();
current_character_ui = this;
}
function onLoad() {
var _local5;
character_slot = new Array();
var _local4 = 0;
while (_local4 < CHR_POS.length) {
_local5 = getNextHighestDepth();
var _local3 = attachMovie("character_item", "chr" + _local5, _local5);
_local3._x = CHR_POS[_local4][0];
_local3._y = CHR_POS[_local4][1];
_local3.slot_index = character_slot.length;
character_slot.push(_local3);
_local4++;
}
super.onLoad();
}
function onEnterFrame() {
super.onEnterFrame();
if (_visible && (current_character.inactive)) {
SoundManager.playSound("click");
hide();
}
}
function show() {
update();
super.show();
VendorUI.current_vendor_ui.hide();
}
function getArray() {
return(character_slot);
}
function selectItem(dummy_list, slot_index) {
if (current_character != PlayerCharacter.current_player) {
return(undefined);
}
if ((character_slot[slot_index].item_id == ItemIcon.EMPTY_ID) || (slot_index == ItemIcon.EMPTY_ID)) {
selected_icon._visible = false;
selected_slot = -1;
} else if (selected_slot == slot_index) {
useItem(slot_index);
} else {
super.selectItem(character_slot, slot_index);
}
}
function useItem(slot_index) {
var _local3 = character_slot[slot_index].item_id;
var _local4 = character_slot[slot_index].stack;
if (_local3 == ItemIcon.EMPTY_ID) {
return(undefined);
}
var _local5 = InventoryUI.getItem(character_slot[slot_index].item_id, character_slot[slot_index].stack);
if (_local5) {
PlayerCharacter.current_player.current_equipment.deleteItem(_local3, _local4);
PlayerCharacter.current_player.updateStats();
SoundManager.playSound("kalink");
update();
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
}
deselectItem();
}
function update() {
DebugWindow.debug("SYS : Updating Character UI");
if (_visible && (current_character_ui.current_character == null)) {
DebugWindow.debug("ERROR : Character UI equipment update failed, character not found");
}
attachMovie(current_character.character_portrait, "portrait", 50);
var _local3 = attachMovie(current_character.character_profile, "profile", 51);
portrait.filters = current_character.getFilterArray();
profile.filters = current_character.getFilterArray();
var _local4 = profile_mask;
_local3._x = _local4._x + ((_local4._width - _local3._width) / 2);
_local3._y = _local4._y + (_local4._height - _local3._height);
_local3.setMask(profile_mask);
character_name_inst.text = current_character.character_name;
spirit_text_inst.text = current_character.spirit;
stamina_text_inst.text = int(current_character.maximum_health / GameConstants.HEALTH_PER_STM);
intelligence_text_inst.text = int(current_character.maximum_mana / GameConstants.MANA_PER_INT);
armor_text_inst.text = current_character.armor;
melee_text_inst.text = current_character.damage + "-";
melee_text_inst.text = melee_text_inst.text + (current_character.damage + current_character.damage_variation);
ranged_text_inst.text = current_character.ranged_damage + "-";
ranged_text_inst.text = ranged_text_inst.text + (current_character.ranged_damage + current_character.ranged_variation);
var _local2 = 0;
while (_local2 < character_slot.length) {
character_slot[_local2].update();
_local2++;
}
ShortcutBarUI.current_shortcut_bar.update();
}
static var CHR_POS = [[16, 72], [16, 112], [16, 154], [16, 195], [16, 236], [16, 277], [16, 318], [299, 72], [299, 112], [299, 154], [299, 195], [299, 236], [299, 277], [299, 318], [117, 364], [159, 364], [200, 364]];
}
Symbol 3939 MovieClip [__Packages.PlayerCharacter] Frame 0
class PlayerCharacter extends Character
{
static var current_player;
var god_mode, dynamic_variables, save_available, action_animation, identity, id_name, character_name, character_portrait, weapon_anim_prefix, character_profile, move_speed, jump_speed, _alpha, input_state_array, global_y, current_faction, current_level, current_exp, animation_type, attack_countdown, current_equipment, isAlive, health_regen_timer, current_health, mana_regen, maximum_health, hit_check, hit_box, damage_variation, damage, checkForProc, body_box, involuntary_animation_type, wound_immune, character_action, speed_x, attack_speed_modifier, attack_time, current_effect, isGrounded, cast_countdown, facing_left, turnCharacter, move_scale, animation_data, hit_list, disable_trinket, gotoAndPlay, buff_list, stop, weapon_placeholder_inst, silence_countdown, procDepleteCheck, speed_y, weapon_name, next_level_exp, current_mana, maximum_mana, startStealth, last_saved_zone, last_saved_spawn, shadow;
function PlayerCharacter () {
super();
god_mode = false;
dynamic_variables = new Object();
current_player = this;
save_available = false;
var _local4 = PlayerList.data[PlayerList.getId(_global.avatar)];
action_animation = _local4.action_table;
identity = _local4.identity;
identity.identity_host = this;
id_name = "player";
character_name = _local4.display_name;
character_portrait = _local4.portrait;
weapon_anim_prefix = _local4.weapon_prefix;
character_profile = _local4.profile;
move_speed = _local4.move_speed;
jump_speed = _local4.jump_speed;
updateStats();
}
function onLoad() {
super.onLoad();
_alpha = 0;
SoundManager.loadExternalSound("level", "events/level.mp3");
input_state_array = new Array(GameConstants.KEY_INPUT.length);
var _local3 = 0;
while (_local3 < GameConstants.KEY_INPUT.length) {
input_state_array[_local3] = false;
_local3++;
}
global_y = ScrollingStage.current_stage.ground_level;
setAction(ACTION_IDLE);
FactionTable.registerFaction(this, "player");
current_faction = "player";
current_level = 1;
current_exp = 0;
id_name = "player";
CastBar.current_cast_bar.setCharacter(this);
if (save_available) {
ScrollingZone.current_zone.loadSavedPlayer();
}
}
function keyDownEvent(key_index) {
switch (key_index) {
case GameConstants.INPUT_JUMP :
if ((animation_type == Character.ANIM_TYPE_IDLE) || (animation_type == Character.ANIM_TYPE_MOVE)) {
setAction(ACTION_JUMP);
}
break;
case GameConstants.INPUT_ATTACK :
if ((!GameUtil.isInArray(ATTACK_ANIMATION_TYPE, animation_type)) && (attack_countdown <= 0)) {
if (animation_type != Character.ANIM_TYPE_JUMP) {
setAction(ACTION_ATTACK);
} else {
setAction(ACTION_JUMP_ATTACK);
}
}
break;
case GameConstants.INPUT_THROW :
if ((!GameUtil.isInArray(ATTACK_ANIMATION_TYPE, animation_type)) && (current_equipment.hasThrownWeapon())) {
if (animation_type != Character.ANIM_TYPE_JUMP) {
setAction(ACTION_THROW);
current_equipment.throwWeapon();
} else {
setAction(ACTION_JUMP_THROW);
current_equipment.throwWeapon();
}
}
break;
case GameConstants.INPUT_DODGE :
if ((animation_type == Character.ANIM_TYPE_IDLE) || (animation_type == Character.ANIM_TYPE_MOVE)) {
setAction(ACTION_DODGE);
} else if (animation_type == Character.ANIM_TYPE_JUMP) {
setAction(ACTION_JUMP_DODGE);
}
break;
case GameConstants.INPUT_CAST :
castTrinket();
break;
case GameConstants.INPUT_SHORTCUT_1 :
ShortcutBarUI.current_shortcut_bar.useItem(0);
break;
case GameConstants.INPUT_SHORTCUT_2 :
ShortcutBarUI.current_shortcut_bar.useItem(1);
break;
case GameConstants.INPUT_SHORTCUT_3 :
ShortcutBarUI.current_shortcut_bar.useItem(2);
break;
case GameConstants.INPUT_SHORTCUT_4 :
ShortcutBarUI.current_shortcut_bar.useItem(3);
break;
case GameConstants.INPUT_SHORTCUT_5 :
ShortcutBarUI.current_shortcut_bar.useItem(4);
break;
case GameConstants.INPUT_SHORTCUT_6 :
ShortcutBarUI.current_shortcut_bar.useItem(5);
break;
case GameConstants.INPUT_SHORTCUT_7 :
ShortcutBarUI.current_shortcut_bar.useItem(6);
}
}
function keyUpEvent(key_index) {
switch (key_index) {
case GameConstants.INPUT_LEFT :
case GameConstants.INPUT_RIGHT :
if (animation_type != Character.ANIM_TYPE_MOVE) {
break;
}
setAction(ACTION_IDLE);
}
}
function onEnterFrame() {
if (!LoaderUI.current_loader._visible) {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
var _local4 = 0;
while (_local4 < GameConstants.KEY_INPUT.length) {
var _local6;
var _local8;
_local6 = false;
_local8 = true;
if (!DebugWindow.prompt_enabled) {
var _local3 = 0;
while (_local3 < GameConstants.KEY_INPUT[_local4].length) {
if (Key.isDown(GameConstants.KEY_INPUT[_local4][_local3])) {
_local6 = true;
_local8 = false;
}
_local3++;
}
}
if (_local6 && (!input_state_array[_local4])) {
input_state_array[_local4] = true;
keyDownEvent(_local4);
} else if (_local8 && (input_state_array[_local4])) {
input_state_array[_local4] = false;
keyUpEvent(_local4);
}
_local4++;
}
}
super.onEnterFrame();
if (isAlive() && ((getTimer() - health_regen_timer) > 4000)) {
current_health = Math.min((current_health + Math.floor(mana_regen / 4)) + 1, maximum_health);
health_regen_timer = getTimer();
}
var _local5 = FactionTable.getEnemiesList(current_faction);
var _local4 = 0;
while (_local4 < _local5.length) {
if ((hit_check && (hit_box.hitTest(_local5[_local4].body_box))) && (!_local5[_local4].inactive)) {
var _local9 = _local5[_local4].takeDamage(this, damage + int(Math.random() * (damage_variation + 1)), false, false);
if (_local9) {
CastBar.current_cast_bar.startFade();
_local5[_local4].knockBack(this, 15, 0);
var _local7 = ItemList.data[current_equipment.slot[Equipment.SLOT_MAIN_HAND].item_id].hitEffect;
if (_local7 == null) {
_local7 = GameConstants.DEFAULT_HIT_EFFECT;
}
ScrollingStage.current_stage.spawnCharEffect(_local7, _local5[_local4], false);
checkForProc(hit_box._x, hit_box._y, Character.PROC_MELEE, _local5[_local4]);
}
}
_local4++;
}
}
function takeMagicalDamage(src_obj, damage) {
if (god_mode) {
return(undefined);
}
super.takeMagicalDamage(src_obj, damage);
checkForProc(0, body_box._y / 2, Character.PROC_DAMAGE_TAKEN);
}
function takeDamage(src_obj, damage, magical, always_hit) {
if (god_mode) {
return(false);
}
if (!super.takeDamage(src_obj, damage, magical, always_hit)) {
return(false);
}
checkForProc(0, body_box._y / 2, Character.PROC_DAMAGE_TAKEN);
return(true);
}
function setAction(action_name) {
if (GameUtil.isInArray(involuntary_animation_type, animation_type)) {
wound_immune = false;
return(undefined);
}
var _local3 = action_animation[character_action];
wound_immune = _local3.wound_immune;
switch (animation_type) {
case Character.ANIM_TYPE_IDLE :
case Character.ANIM_TYPE_MOVE :
if (_local3.sound == null) {
break;
}
SoundManager.stopSound(weapon_anim_prefix + character_action);
}
super.setAction(action_name);
switch (animation_type) {
case Character.ANIM_TYPE_ATTACK :
speed_x = 0;
case Character.ANIM_TYPE_JUMP_ATTACK :
attack_countdown = int(Number(ItemList.data[current_equipment.slot[Equipment.SLOT_MAIN_HAND].item_id].speed) * attack_speed_modifier);
if (isNaN(attack_countdown)) {
attack_countdown = GameConstants.DEFAULT_ATTACK_COOLDOWN;
}
attack_time = attack_countdown;
}
_local3 = action_animation[action_name];
if (_local3.sound != null) {
SoundManager.playSound(weapon_anim_prefix + action_name);
}
if ((_local3.effect != null) && (!_local3.cue_effect)) {
ScrollingStage.current_stage.spawnCharEffect(_local3.effect, this, true);
} else {
current_effect = _local3.effect;
}
}
function doAction() {
super.doAction();
switch (animation_type) {
case Character.ANIM_TYPE_READY_CAST :
if (isGrounded() && (input_state_array[GameConstants.INPUT_LEFT] || (input_state_array[GameConstants.INPUT_RIGHT]))) {
cast_countdown = 0;
CastBar.current_cast_bar.startFade();
setAction(ACTION_MOVE);
}
break;
case Character.ANIM_TYPE_IDLE :
if (input_state_array[GameConstants.INPUT_LEFT]) {
if (!facing_left) {
turnCharacter(true);
}
setAction(ACTION_MOVE);
} else if (input_state_array[GameConstants.INPUT_RIGHT]) {
if (facing_left) {
turnCharacter(false);
}
setAction(ACTION_MOVE);
}
break;
case Character.ANIM_TYPE_MOVE :
if ((input_state_array[GameConstants.INPUT_LEFT] && (!input_state_array[GameConstants.INPUT_RIGHT])) && (!facing_left)) {
turnCharacter(true);
} else if ((input_state_array[GameConstants.INPUT_RIGHT] && (!input_state_array[GameConstants.INPUT_LEFT])) && (facing_left)) {
turnCharacter(false);
}
break;
case Character.ANIM_TYPE_LAND :
case Character.ANIM_TYPE_JUMP_ATTACK :
case Character.ANIM_TYPE_JUMP_THROW :
case Character.ANIM_TYPE_JUMP :
if (input_state_array[GameConstants.INPUT_LEFT]) {
if (!facing_left) {
turnCharacter(true);
}
speed_x = (-move_speed) * move_scale;
} else {
if (!input_state_array[GameConstants.INPUT_RIGHT]) {
break;
}
if (facing_left) {
turnCharacter(false);
}
speed_x = move_speed * move_scale;
}
}
}
function endAction(prev_animation) {
if ((prev_animation != animation_data) && (animation_type != Character.ANIM_TYPE_READY_CAST)) {
return(undefined);
}
hit_list = new Array();
disable_trinket = true;
switch (animation_type) {
case Character.ANIM_TYPE_IDLE :
case Character.ANIM_TYPE_MOVE :
case Character.ANIM_TYPE_READY_CAST :
(gotoAndPlay(animation_data));// not popped
if (action_animation[character_action].sound != null) {
SoundManager.playSound(weapon_anim_prefix + character_action);
}
break;
case Character.ANIM_TYPE_DEATH :
CastBar.current_cast_bar.startFade();
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].sfx != null) {
buff_list[_local2].sfx.startFade();
}
if (buff_list[_local2].npc != null) {
buff_list[_local2].npc.startFade();
}
_local2++;
}
buff_list = new Array();
PromptUI.current_prompt.openPrompt("Death", "Respawn from last spawn point?", true, releaseCorpseCheck);
(stop());// not popped
break;
case Character.ANIM_TYPE_JUMP_ATTACK :
weapon_placeholder_inst.weapon.stop();
case Character.ANIM_TYPE_JUMP_THROW :
case Character.ANIM_TYPE_JUMP :
(stop());// not popped
break;
case Character.ANIM_TYPE_CONTROL :
(gotoAndPlay(animation_data));// not popped
break;
case Character.ANIM_TYPE_WOUND :
if (!isGrounded()) {
animation_type = Character.ANIM_TYPE_JUMP;
(stop());// not popped
break;
}
case Character.ANIM_TYPE_DODGE :
animation_type = Character.ANIM_TYPE_IDLE;
default :
if (!isGrounded()) {
animation_type = Character.ANIM_TYPE_JUMP;
(stop());// not popped
} else {
setAction(ACTION_IDLE);
}
}
}
function castTrinket() {
if (silence_countdown <= 0) {
if (!GameUtil.isInArray(ATTACK_ANIMATION_TYPE, animation_type)) {
if (((animation_type == Character.ANIM_TYPE_IDLE) || (animation_type == Character.ANIM_TYPE_JUMP)) || (animation_type == Character.ANIM_TYPE_MOVE)) {
if (current_equipment.slot[Equipment.SLOT_TRINKET].item_id != ItemIcon.EMPTY_ID) {
if (procDepleteCheck(ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].proc)) {
switch (ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].proc.proc_type) {
case Character.PROC_MELEE :
disable_trinket = false;
startAttack();
break;
case Character.PROC_CAST :
setAction(ACTION_READY_CAST);
CastBar.current_cast_bar.castSpell(ItemList.data[current_equipment.slot[Equipment.SLOT_TRINKET].item_id].dispName, cast_countdown);
}
}
}
}
}
}
}
function startAttack() {
if (attack_countdown > 0) {
return(undefined);
}
if (animation_type != Character.ANIM_TYPE_JUMP) {
setAction(ACTION_ATTACK);
} else {
setAction(ACTION_JUMP_ATTACK);
}
}
function startThrowAttack() {
if (!current_equipment.hasThrownWeapon()) {
return(undefined);
}
if (animation_type != Character.ANIM_TYPE_JUMP) {
setAction(ACTION_THROW);
} else {
setAction(ACTION_JUMP_THROW);
}
current_equipment.throwWeapon();
}
function hitGroundEvent() {
if (GameUtil.isInArray(JUMP_ANIMATION_TYPE, animation_type)) {
setAction(ACTION_LAND);
}
speed_y = 0;
}
function regainControl() {
super.regainControl();
hit_list = new Array();
animation_type = Character.ANIM_TYPE_IDLE;
setAction(ACTION_IDLE);
}
function attachWeapon() {
weapon_placeholder_inst.attachMovie(weapon_anim_prefix + weapon_name, "weapon", 1);
}
function gainExp(exp_plus) {
current_exp = current_exp + exp_plus;
var _local2 = false;
while ((current_exp >= next_level_exp) && (current_level < GameConstants.LEVEL_CAP)) {
_local2 = true;
current_exp = current_exp - next_level_exp;
current_level++;
updateStats();
current_health = maximum_health;
current_mana = maximum_mana;
}
if (current_level >= GameConstants.LEVEL_CAP) {
current_exp = 0;
}
if (_local2) {
ScrollingStage.current_stage.spawnCharEffect("level", this, true);
SoundManager.playSound("level");
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
}
}
function getBaseStats() {
return(LevelChart.getLevelData());
}
function respawnEffects() {
DebugWindow.debug("SYS : Respawning buff effects");
SoundManager.setAllowPlayback(false);
var _local2 = 0;
while (_local2 < buff_list.length) {
if (buff_list[_local2].name == "stealth") {
startStealth();
}
if ((buff_list[_local2].sfx_name != null) && (buff_list[_local2].sfx._name == null)) {
buff_list[_local2].sfx = ScrollingStage.current_stage.spawnCharEffect(buff_list[_local2].sfx_name, this, true);
}
if (buff_list[_local2].type == "control") {
setAction(buff_list[_local2].name);
}
_local2++;
}
SoundManager.setAllowPlayback(true);
}
function updateStats() {
weapon_name = ItemList.data[current_equipment.slot[Equipment.SLOT_MAIN_HAND].item_id].anim;
next_level_exp = getBaseStats().exp_to_level;
super.updateStats();
}
function releaseCorpseCheck(do_respawn) {
if (!do_respawn) {
QuitToggleButton.current_prompt_toggle_obj.quitResponse(false);
} else {
current_player.releaseCorpse();
}
}
function releaseCorpse() {
buff_list = new Array();
updateStats();
current_health = int(maximum_health / 2);
current_mana = int(maximum_mana / 2);
ScrollingZone.current_zone.loadZone(last_saved_zone, last_saved_spawn);
}
function cleanUp() {
FactionTable.unregisterFaction(this, current_faction);
CastBar.current_cast_bar.startFade();
shadow.removeMovieClip();
}
function onRollOver() {
if (!isAlive()) {
return(undefined);
}
ItemInfo.current_item_info.showNPC(this);
}
function onRollOut() {
ItemInfo.current_item_info.hide();
}
static var ACTION_IDLE = "idle";
static var ACTION_MOVE = "move";
static var ACTION_JUMP = "jump";
static var ACTION_DODGE = "dodge";
static var ACTION_LAND = "land";
static var ACTION_ATTACK = "attack";
static var ACTION_READY_CAST = "ready_cast";
static var ACTION_THROW = "throw_attack";
static var ACTION_JUMP_ATTACK = "jump_attack";
static var ACTION_JUMP_THROW = "jump_throw";
static var ACTION_JUMP_DODGE = "jump_dodge";
static var ATTACK_ANIMATION_TYPE = [Character.ANIM_TYPE_ATTACK, Character.ANIM_TYPE_JUMP_ATTACK, Character.ANIM_TYPE_THROW, Character.ANIM_TYPE_JUMP_THROW];
static var JUMP_ANIMATION_TYPE = [Character.ANIM_TYPE_JUMP, Character.ANIM_TYPE_JUMP_ATTACK, Character.ANIM_TYPE_JUMP_THROW];
}
Symbol 3940 MovieClip [__Packages.FactionTable] Frame 0
class FactionTable extends Object
{
function FactionTable () {
super();
}
static function clearData() {
data = new Object();
action_stack = "";
}
static function registerFaction(char, fact) {
if (data[fact] == null) {
data[fact] = new Array();
} else if (GameUtil.isInArray(data[fact], char)) {
return(undefined);
}
data[fact].push(char);
action_stack = action_stack + (((("Registered " + char.character_name) + " as ") + fact) + newline);
}
static function unregisterFaction(char, fact) {
var _local1 = 0;
while (_local1 < data[fact].length) {
if (data[fact][_local1] == char) {
data[fact].splice(_local1, 1);
action_stack = action_stack + (((("Unregistered " + char.character_name) + " as ") + fact) + newline);
return(undefined);
}
_local1++;
}
action_stack = action_stack + (((("Failed to unregister " + char.character_name) + " as ") + fact) + newline);
}
static function getFriendsList(fact) {
assertionCheck();
return(data[fact]);
}
static function getEnemiesList(fact) {
var _local2 = new Array();
for (var _local4 in data) {
if (_local4 != fact) {
var _local1 = 0;
while (_local1 < data[_local4].length) {
_local2.push(data[_local4][_local1]);
_local1++;
}
}
}
assertionCheck();
return(_local2);
}
static function getClosest(char, list, see_stealth) {
var _local5 = null;
var _local3 = -1;
var _local1 = 0;
while (_local1 < list.length) {
if ((((list[_local1] != char) && (list[_local1].isAlive())) && (see_stealth || (!list[_local1].stealthed))) && ((_local3 == -1) || (Math.abs(list[_local1].global_x - char.global_x) < _local3))) {
_local5 = list[_local1];
_local3 = Math.abs(list[_local1].global_x - char.global_x);
}
_local1++;
}
return(_local5);
}
static function getTriggerListener(char, trigger_name, radius, list) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < list.length) {
if (list[_local1] != PlayerCharacter.current_player) {
if ((((list[_local1] != char) && (list[_local1].isAlive())) && (Math.abs(list[_local1].global_x - char.global_x) < radius)) && (GameUtil.isInArray(list[_local1].trigger_list, trigger_name))) {
_local4.push(list[_local1]);
}
}
_local1++;
}
return(_local4);
}
static function getRandom(list) {
if (list.length == 0) {
return(null);
}
return(list[int(Math.random() * list.length)]);
}
static function getRandomFriend(fact) {
return(getRandom(getFriendsList(fact)));
}
static function getRandomEnemy(fact) {
return(getRandom(getEnemiesList(fact)));
}
static function getListenerFriends(char, trigger_name, radius, fact) {
return(getTriggerListener(char, trigger_name, radius, getFriendsList(fact)));
}
static function getListenerEnemies(char, trigger_name, radius, fact) {
return(getTriggerListener(char, trigger_name, radius, getEnemiesList(fact)));
}
static function getClosestFriend(char, fact, see_stealth) {
return(getClosest(char, getFriendsList(fact), see_stealth));
}
static function getClosestEnemy(char, fact, see_stealth) {
return(getClosest(char, getEnemiesList(fact), see_stealth));
}
static function getClosestCharacter(char, char_name) {
var _local3 = new Array();
var _local2 = getEnemiesList(null);
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].id_name == char_name) {
_local3.push(_local2[_local1]);
}
_local1++;
}
return(getClosest(char, _local3));
}
static function assertionCheck() {
var _local4 = new Array();
for (var _local5 in data) {
var _local1 = 0;
while (_local1 < data[_local5].length) {
var _local3 = data[_local5][_local1];
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local1] == _local3) {
DebugWindow.debug("ERROR : Assertion check failed on FactionTable, stack trace as follows:\n" + action_stack);
DebugWindow.setCriticalError();
return(undefined);
}
_local2++;
}
_local4.push(_local3);
_local1++;
}
}
}
static var data = new Object();
static var action_stack = "";
}
Symbol 3941 MovieClip [__Packages.GameUtil] Frame 0
class GameUtil extends Object
{
function GameUtil () {
super();
}
static function isInArray(search_array, search_value) {
var _local1 = 0;
while (_local1 < search_array.length) {
if (search_array[_local1] == search_value) {
return(true);
}
_local1++;
}
return(false);
}
static function traceObj(obj) {
DebugWindow.debug("DEBUG : Tracing properties of object");
for (var _local2 in obj) {
DebugWindow.debug((("DEBUG : " + _local2) + " = ") + obj[_local2]);
}
}
static function hex2int(str) {
var _local5 = 0;
var _local2 = 0;
while (_local2 < str.length) {
var _local3 = str.charAt(_local2);
var _local1;
switch (_local3.toUpperCase()) {
case "0" :
_local1 = 0;
break;
case "1" :
_local1 = 1;
break;
case "2" :
_local1 = 2;
break;
case "3" :
_local1 = 3;
break;
case "4" :
_local1 = 4;
break;
case "5" :
_local1 = 5;
break;
case "6" :
_local1 = 6;
break;
case "7" :
_local1 = 7;
break;
case "8" :
_local1 = 8;
break;
case "9" :
_local1 = 9;
break;
case "A" :
_local1 = 10;
break;
case "B" :
_local1 = 11;
break;
case "C" :
_local1 = 12;
break;
case "D" :
_local1 = 13;
break;
case "E" :
_local1 = 14;
break;
case "F" :
_local1 = 15;
break;
default :
_local1 = 0;
DebugWindow.debug(("ERROR : " + str) + " is not a valid hexadecimal number");
}
_local5 = _local5 * 16;
_local5 = _local5 + _local1;
_local2++;
}
return(_local5);
}
static function capitalize(str) {
var _local2 = str.split(" ");
var _local3 = "";
var _local1 = 0;
while (_local1 < _local2.length) {
_local3 = _local3 + (_local2[_local1].charAt(0).toUpperCase() + _local2[_local1].substr(1));
if (_local1 < (_local2.length - 1)) {
_local3 = _local3 + " ";
}
_local1++;
}
return(_local3);
}
}
Symbol 3942 MovieClip [__Packages.CastBar] Frame 0
class CastBar extends MovieClip
{
static var current_cast_bar;
var spell_name, fill_bar, fill_inst, is_fading, is_casting, _visible, cast_character, spell_name_base, cast_time, _alpha;
function CastBar () {
super();
current_cast_bar = this;
}
function onLoad() {
spell_name = "";
fill_bar = fill_inst;
is_fading = true;
is_casting = false;
_visible = false;
}
function setCharacter(char) {
cast_character = char;
}
function castSpell(cast_name, full_time) {
spell_name_base = cast_name;
cast_time = full_time;
is_fading = false;
is_casting = true;
}
function startFade() {
if (is_casting) {
is_casting = false;
is_fading = true;
fill_bar._xscale = 0;
spell_name = "interrupted";
}
}
function onEnterFrame() {
if (cast_character == null) {
_visible = false;
} else if (is_casting) {
if (cast_character.cast_countdown > 0) {
fill_bar._xscale = ((cast_time - cast_character.cast_countdown) / cast_time) * 100;
}
var _local2 = "" + (int(Number(cast_time - cast_character.cast_countdown) / 100) / 10);
if (_local2.indexOf(".") == -1) {
_local2 = _local2 + ".0";
}
spell_name = ((spell_name_base + " (") + _local2) + ")";
if (cast_character.cast_countdown <= 0) {
is_casting = false;
is_fading = true;
fill_bar._xscale = 100;
} else {
_visible = true;
_alpha = 100;
}
} else if (is_fading) {
_alpha = _alpha - 20;
if (_alpha <= 0) {
is_fading = false;
_visible = false;
}
}
}
}
Symbol 3943 MovieClip [__Packages.ShortcutBarUI] Frame 0
class ShortcutBarUI extends ItemUI
{
static var current_shortcut_bar;
var shortcut, getNextHighestDepth, attachMovie, _visible;
function ShortcutBarUI () {
super();
current_shortcut_bar = this;
}
function onLoad() {
var _local5;
shortcut = new Array();
var _local4 = 0;
while (_local4 < BAR_POS.length) {
_local5 = getNextHighestDepth();
var _local3 = attachMovie("shortcut_item", "bar_icon" + _local5, _local5);
_local3._x = BAR_POS[_local4][0];
_local3._y = BAR_POS[_local4][1];
_local3.slot_index = shortcut.length;
_local3.obj = null;
_local3.index = null;
shortcut.push(_local3);
_local4++;
}
super.onLoad();
show();
}
function hide() {
_visible = false;
}
function show() {
_visible = true;
}
function equipItem(item_id, stack) {
var _local2 = 0;
while (_local2 < shortcut.length) {
if (shortcut[_local2].item_id == item_id) {
return(undefined);
}
_local2++;
}
_local2 = 0;
while (_local2 < shortcut.length) {
if (shortcut[_local2].item_id == -1) {
SoundManager.playSound("click");
shortcut[_local2].item_id = item_id;
shortcut[_local2].stack = stack;
update();
return(undefined);
}
_local2++;
}
}
function useItem(slot_index) {
if (shortcut[slot_index].obj == null) {
return(undefined);
}
if (VendorUI.current_vendor_ui._visible) {
return(undefined);
}
if (GameUtil.isInArray(INSTANT_USE_SLOTS, Equipment.getSlot(ItemList.data[shortcut[slot_index].item_id].type))) {
SoundManager.setAllowPlayback(false);
}
if (shortcut[slot_index].obj != PlayerCharacter.current_player.current_equipment) {
shortcut[slot_index].obj.useItem(shortcut[slot_index].index, true);
}
if (Equipment.getSlot(ItemList.data[shortcut[slot_index].item_id].type) == Equipment.SLOT_TRINKET) {
SoundManager.setAllowPlayback(true);
PlayerCharacter.current_player.castTrinket();
}
if (Equipment.getSlot(ItemList.data[shortcut[slot_index].item_id].type) == Equipment.SLOT_THROWN) {
SoundManager.setAllowPlayback(true);
PlayerCharacter.current_player.startThrowAttack();
}
if (Equipment.getSlot(ItemList.data[shortcut[slot_index].item_id].type) == Equipment.SLOT_MAIN_HAND) {
SoundManager.setAllowPlayback(true);
PlayerCharacter.current_player.startAttack();
}
update();
}
function update() {
var _local5 = PlayerCharacter.current_player.current_equipment;
var _local2 = 0;
while (_local2 < shortcut.length) {
var _local3;
var _local4;
_local4 = InventoryUI.findBag(shortcut[_local2].item_id);
_local3 = InventoryUI.findItem(shortcut[_local2].item_id);
if (_local3 >= 0) {
shortcut[_local2].obj = _local4;
shortcut[_local2].index = _local3;
} else {
_local3 = _local5.findItem(shortcut[_local2].item_id);
if (_local3 >= 0) {
shortcut[_local2].obj = _local5;
shortcut[_local2].index = _local3;
} else {
shortcut[_local2].obj = null;
shortcut[_local2].index = -1;
}
}
shortcut[_local2].update();
_local2++;
}
}
static var DRAG_ITEM_DEPTH = 500;
static var BAR_POS = [[0, 0], [39, 0], [78, 0], [117, 0], [156, 0], [195, 0], [234, 0]];
static var INSTANT_USE_SLOTS = [14, 15, 16];
}
Symbol 3944 MovieClip [__Packages.InventoryUI] Frame 0
class InventoryUI extends ItemUI
{
static var copper, last_updated_bag, selected_bag, selected_bag_slot;
var _name, inventory_slot, getNextHighestDepth, attachMovie;
function InventoryUI () {
super();
bag[Number(_name.charAt(_name.length - 1))] = this;
}
function onLoad() {
var _local5;
SoundManager.loadExternalSound("kachink", "events/kachink.mp3");
SoundManager.loadExternalSound("kalink", "events/kalink.mp3");
SoundManager.loadExternalSound("coin", "events/coin.mp3");
copper = 0;
inventory_slot = new Array();
var _local4 = 0;
while (_local4 < INV_POS.length) {
_local5 = getNextHighestDepth();
var _local3 = attachMovie("inventory_item", "inv" + _local5, _local5);
_local3._x = INV_POS[_local4][0];
_local3._y = INV_POS[_local4][1];
_local3.slot_index = inventory_slot.length;
_local3.src_bag = this;
inventory_slot.push(_local3);
_local4++;
}
super.onLoad();
}
static function getCoins(get_copper) {
copper = copper + get_copper;
bag[COIN_BAG].gold_text.text = int((copper / 100) / 100);
bag[COIN_BAG].silver_text.text = int((copper / 100) % 100);
bag[COIN_BAG].copper_text.text = int(copper % 100);
questUpdate();
}
static function takeCoins(take_copper) {
if (copper < take_copper) {
take_copper = copper;
}
getCoins(-take_copper);
}
function getArray() {
return(inventory_slot);
}
static function getItem(item_id, count) {
if (count == null) {
count = 1;
}
var _local5 = ItemList.data[item_id].stack;
var _local6 = count;
var _local1 = 0;
while (_local1 < bag.length) {
var _local2 = 0;
while (_local2 < bag[_local1].inventory_slot.length) {
if (bag[_local1].inventory_slot[_local2].item_id == item_id) {
bag[_local1].inventory_slot[_local2].stack = bag[_local1].inventory_slot[_local2].stack + count;
bag[_local1].inventory_slot[_local2].update();
if (bag[_local1].inventory_slot[_local2].stack > _local5) {
count = bag[_local1].inventory_slot[_local2].stack - _local5;
bag[_local1].inventory_slot[_local2].stack = _local5;
bag[_local1].inventory_slot[_local2].update();
} else {
questUpdate();
last_updated_bag = _local1;
ItemUI.adjustBaseLine("Inv Add Stack " + ItemList.getName(item_id), _local6);
return(true);
}
}
_local2++;
}
_local1++;
}
_local1 = 0;
while (_local1 < bag.length) {
var _local2 = 0;
while (_local2 < bag[_local1].inventory_slot.length) {
if ((bag[_local1].inventory_slot[_local2].item_id == ItemIcon.EMPTY_ID) || (bag[_local1].inventory_slot[_local2].stack == 0)) {
bag[_local1].inventory_slot[_local2].item_id = item_id;
bag[_local1].inventory_slot[_local2].stack = count;
bag[_local1].inventory_slot[_local2].update();
questUpdate();
last_updated_bag = _local1;
ItemUI.adjustBaseLine("Inv Add Slot " + ItemList.getName(item_id), _local6);
return(true);
}
_local2++;
}
_local1++;
}
DebugWindow.debug("DEBUG : Add item failed");
return(false);
}
static function deleteItem(item_id, count) {
if (count == null) {
count = 1;
}
var _local5 = count;
var _local2 = 0;
while (_local2 < bag.length) {
var _local1 = 0;
while (_local1 < bag[_local2].inventory_slot.length) {
if (bag[_local2].inventory_slot[_local1].item_id == item_id) {
bag[_local2].inventory_slot[_local1].stack = bag[_local2].inventory_slot[_local1].stack - count;
if (bag[_local2].inventory_slot[_local1].stack < 1) {
bag[_local2].inventory_slot[_local1].item_id = ItemIcon.EMPTY_ID;
if (bag[_local2].inventory_slot[_local1].stack < 0) {
count = -bag[_local2].inventory_slot[_local1].stack;
} else {
count = 0;
}
bag[_local2].inventory_slot[_local1].stack = 0;
bag[_local2].inventory_slot[_local1].update();
} else {
count = 0;
bag[_local2].inventory_slot[_local1].update();
}
if (count <= 0) {
questUpdate();
ItemUI.adjustBaseLine("Inv Del " + ItemList.getName(item_id), -_local5);
return(true);
}
}
_local1++;
}
_local2++;
}
DebugWindow.debug((("ERROR : Failed to delete inventory " + ItemList.data[item_id].dispName) + " count ") + count);
return(false);
}
static function findBag(item_id) {
var _local1 = 0;
while (_local1 < bag.length) {
var _local2 = 0;
while (_local2 < bag[_local1].inventory_slot.length) {
if (bag[_local1].inventory_slot[_local2].item_id == item_id) {
return(bag[_local1]);
}
_local2++;
}
_local1++;
}
return(null);
}
static function findItem(item_id) {
var _local2 = 0;
while (_local2 < bag.length) {
var _local1 = 0;
while (_local1 < bag[_local2].inventory_slot.length) {
if (bag[_local2].inventory_slot[_local1].item_id == item_id) {
return(_local1);
}
_local1++;
}
_local2++;
}
return(-1);
}
static function findItemCount(item_id) {
var _local3 = 0;
var _local2 = 0;
while (_local2 < bag.length) {
var _local1 = 0;
while (_local1 < bag[_local2].inventory_slot.length) {
if (bag[_local2].inventory_slot[_local1].item_id == item_id) {
_local3 = _local3 + bag[_local2].inventory_slot[_local1].stack;
}
_local1++;
}
_local2++;
}
return(_local3);
}
static function getTotal() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < bag.length) {
var _local1 = 0;
while (_local1 < bag[_local2].inventory_slot.length) {
if (bag[_local2].inventory_slot[_local1].item_id != ItemIcon.EMPTY_ID) {
_local3 = _local3 + bag[_local2].inventory_slot[_local1].stack;
}
_local1++;
}
_local2++;
}
return(_local3);
}
function selectItem(dummy_list, slot_index) {
selectBagItem(this, slot_index);
}
static function selectBagItem(select_bag, slot_index) {
if ((select_bag.inventory_slot[slot_index].item_id == ItemIcon.EMPTY_ID) || (slot_index == ItemIcon.EMPTY_ID)) {
deselectBagItem();
} else if ((select_bag == selected_bag) && (slot_index == selected_bag_slot)) {
selected_bag.useItem(slot_index);
} else {
deselectBagItem();
select_bag.selected_icon._visible = true;
select_bag.selected_icon._x = select_bag.inventory_slot[slot_index]._x;
select_bag.selected_icon._y = select_bag.inventory_slot[slot_index]._y;
selected_bag = select_bag;
selected_bag_slot = slot_index;
}
}
function deselectItem() {
deselectBagItem();
}
static function deselectBagItem() {
var _local1 = 0;
while (_local1 < bag.length) {
bag[_local1].selected_icon._visible = false;
bag[_local1].selected_slot = -1;
_local1++;
}
selected_bag = null;
selected_bag_slot = -1;
}
function useItem(slot_index, shortcut_mode) {
if (inventory_slot[slot_index].item_id == ItemIcon.EMPTY_ID) {
return(undefined);
}
if (VendorUI.current_vendor_ui._visible) {
var _local6 = ItemList.data[inventory_slot[slot_index].item_id];
if (!isNaN(_local6.cost)) {
SoundManager.playSound("coin");
copper = copper + ((Number(_local6.cost) * inventory_slot[slot_index].stack) * VendorUI.current_vendor_ui.purchase_price);
VendorUI.current_vendor_ui.setupBuyback(inventory_slot[slot_index]);
var _local8 = inventory_slot[slot_index].stack;
var _local7 = inventory_slot[slot_index].item_id;
inventory_slot[slot_index].item_id = ItemIcon.EMPTY_ID;
inventory_slot[slot_index].stack = 0;
ItemUI.adjustBaseLine("Vendor " + ItemList.getName(_local7), -_local8);
inventory_slot[slot_index].update();
VendorUI.current_vendor_ui.updateCoins();
questUpdate();
}
} else {
var _local4 = Equipment.getSlot(ItemList.data[inventory_slot[slot_index].item_id].type);
if (((_local4 == Equipment.SLOT_FINGER1) && (PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_FINGER1].item_id != ItemIcon.EMPTY_ID)) && (PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_FINGER2].item_id == ItemIcon.EMPTY_ID)) {
_local4 = Equipment.SLOT_FINGER2;
}
if (ItemList.data[inventory_slot[slot_index].item_id].quest != null) {
var _local5 = QuestLogUI.current_log.createQuestList(ItemList.data[inventory_slot[slot_index].item_id].quest);
var _local3 = QuestLogUI.current_log.getCompletedQuest(_local5);
if (_local3 == null) {
_local3 = QuestLogUI.current_log.getQuestManager(_local5);
if (_local3 == null) {
_local3 = new QuestManager();
_local3.data = QuestLogUI.current_log.getAvailableQuest(_local5);
if (_local3.data != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local3;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_AVAILABLE);
} else {
SoundManager.playSound("quest_decline");
}
} else {
SoundManager.playSound("quest_decline");
}
} else {
SoundManager.playSound("quest_decline");
}
} else if (ItemList.checkRequirement(inventory_slot[slot_index].item_id)) {
if (_local4 != -1) {
if ((_local4 == Equipment.SLOT_TRINKET) && (!shortcut_mode)) {
ShortcutBarUI.current_shortcut_bar.equipItem(inventory_slot[slot_index].item_id, inventory_slot[slot_index].stack);
}
var _local9 = inventory_slot[slot_index].item_id;
ItemIcon.swapItem(inventory_slot[slot_index], PlayerCharacter.current_player.current_equipment.slot[_local4]);
inventory_slot[slot_index].update();
SoundManager.playSound("kalink");
PlayerCharacter.current_player.updateStats();
CharacterUI.current_character_ui.update();
if ((inventory_slot[slot_index].item_id > -1) && (ItemList.data[inventory_slot[slot_index].item_id].type != "trinket")) {
ItemInfo.current_item_info.showItem(ItemList.data[inventory_slot[slot_index].item_id]);
}
ItemUI.addStackTrace("Equip " + ItemList.getName(_local9));
if (!shortcut_mode) {
PlayerCharacterToggleButton.current_character_ui_toggle.setActivate(true);
}
} else if ((ItemList.data[inventory_slot[slot_index].item_id].type.toLowerCase() == "consumable") || (ItemList.data[inventory_slot[slot_index].item_id].type.toLowerCase() == "quest item")) {
PlayerCharacter.current_player.cast_stealth = false;
PlayerCharacter.current_player.resolveProc(0, (-PlayerCharacter.current_player._height) / 2, ItemList.data[inventory_slot[slot_index].item_id].proc);
if (!PlayerCharacter.current_player.cast_stealth) {
PlayerCharacter.current_player.endStealth();
}
if (ItemList.data[inventory_slot[slot_index].item_id].type.toLowerCase() == "consumable") {
inventory_slot[slot_index].stack--;
ItemUI.adjustBaseLine("Consumable " + ItemList.getName(inventory_slot[slot_index].item_id), -1);
if (inventory_slot[slot_index].stack <= 0) {
inventory_slot[slot_index].item_id = ItemIcon.EMPTY_ID;
}
inventory_slot[slot_index].update();
}
questUpdate();
PlayerCharacter.current_player.updateStats();
}
} else {
SoundManager.playSound("quest_decline");
}
}
deselectBagItem();
ShortcutBarUI.current_shortcut_bar.update();
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
}
static function updateBag() {
var _local2 = 0;
while (_local2 < MAX_BAGS) {
var _local1 = 0;
while (_local1 < bag[_local2].inventory_slot.length) {
bag[_local2].inventory_slot[_local1].update();
_local1++;
}
_local2++;
}
ShortcutBarUI.current_shortcut_bar.update();
}
static function questUpdate() {
QuestLogUI.current_log.updateCollectQuest(bag, PlayerCharacter.current_player.current_equipment);
}
static var DRAG_ITEM_DEPTH = 500;
static var MAX_BAGS = 3;
static var COIN_BAG = 0;
static var bag = new Array(MAX_BAGS);
static var INV_POS = [[15, -32], [57, -32], [99, -32], [141, -32], [15, 9], [57, 9], [99, 9], [141, 9], [15, 50], [57, 50], [99, 50], [141, 50], [15, 91], [57, 91], [99, 91], [141, 91], [15, 132], [57, 132], [99, 132], [141, 132], [15, 173], [57, 173], [99, 173], [141, 173]];
}
Symbol 3945 MovieClip [__Packages.QuestLogUI] Frame 0
class QuestLogUI extends WindowUI
{
static var current_log;
var current_quest, close_log_button_inst, abandon_quest_button_inst, active_list, completed_list, toggle_object, main, text_scroll, createEmptyMovieClip, category_list, log_scroll, log, log_mask, quest_count, text_fade_inst, top_clip, text_mask;
function QuestLogUI () {
super();
current_log = this;
current_quest = null;
}
function onLoad() {
super.onLoad();
SoundManager.loadExternalSound("floop", "events/floop.mp3");
var self = this;
close_log_button_inst.onRelease = function () {
self.close_button_inst.onRelease();
};
abandon_quest_button_inst.onRelease = function () {
self.abandonQuest();
};
clear();
}
function clear() {
active_list = new Array();
completed_list = new Array();
current_quest = null;
}
function show() {
super.show();
QuestGiverUI.current_giver_ui.hide();
}
function createQuestList(quest_name) {
var _local1 = new Object();
_local1.give_only = false;
_local1.complete_only = false;
_local1.name = quest_name;
var _local2 = new Array();
_local2.push(_local1);
return(_local2);
}
function questInProgress(quest_name, incomplete_only) {
var _local2 = new Object();
_local2.give_only = incomplete_only;
_local2.complete_only = false;
_local2.check_progress = true;
_local2.name = quest_name;
var _local3 = new Array();
_local3.push(_local2);
return(getQuestManager(_local3) != null);
}
function questPossible(data) {
var _local2 = 0;
while (_local2 < completed_list.length) {
if (data.name == completed_list[_local2]) {
return(false);
}
_local2++;
}
_local2 = 0;
while (_local2 < active_list.length) {
if (data.name == active_list[_local2].data.name) {
return(false);
}
_local2++;
}
return(true);
}
function questAvailable(data) {
if (!questPossible(data)) {
return(false);
}
return(PlayerCharacter.current_player.identity.checkRequirement(data.requirement));
}
function addQuest(data) {
var _local2 = new QuestManager();
_local2.data = data;
_local2.initialize();
active_list.push(_local2);
createLog();
showLog();
if ((completed_list.length == 0) && (!SaveData.disk_in_use)) {
toggle_object.setActivate(true);
}
updateCollectQuest(InventoryUI.bag, PlayerCharacter.current_player.current_equipment);
return(true);
}
function completeQuest(data) {
var _local3 = data.name;
completed_list.push(_local3);
if (current_quest.data == data) {
main.removeMovieClip();
text_scroll.source = null;
}
var _local5 = false;
var _local4 = new Array();
var _local2 = 0;
while (_local2 < active_list.length) {
if (active_list[_local2].data.name == _local3) {
_local5 = true;
} else {
_local4.push(active_list[_local2]);
}
_local2++;
}
active_list = _local4;
if (!_local5) {
DebugWindow.debug(("ERROR : Quest data for quest name " + _local3) + " not found in log");
DebugWindow.setCriticalError();
} else {
_local2 = 0;
while (_local2 < active_list.length) {
if (active_list[_local2].data.name == _local3) {
DebugWindow.debug(("ERROR : Incorrect quest deleted for " + _local3) + ". Quest log content is now broken");
DebugWindow.setCriticalError();
}
_local2++;
}
}
createLog();
showLog();
}
function getAvailableQuest(quest_list) {
var _local3 = 0;
while (_local3 < quest_list.length) {
var _local2 = 0;
while (_local2 < QuestList.data.length) {
if ((!quest_list[_local3].complete_only) && (quest_list[_local3].name == QuestList.data[_local2].name)) {
if (questAvailable(QuestList.data[_local2])) {
return(QuestList.data[_local2]);
}
}
_local2++;
}
_local3++;
}
return(null);
}
function getQuestManager(quest_list) {
var _local3 = 0;
while (_local3 < active_list.length) {
var _local2 = 0;
while (_local2 < quest_list.length) {
if (quest_list[_local2].check_progress && (active_list[_local3].data.name == quest_list[_local2].name)) {
if (!(quest_list[_local2].give_only && (active_list[_local3].isCompleted()))) {
return(active_list[_local3]);
}
}
_local2++;
}
_local3++;
}
return(null);
}
function getCompletedQuest(quest_list) {
var _local3 = 0;
while (_local3 < active_list.length) {
var _local2 = 0;
while (_local2 < quest_list.length) {
if (((!quest_list[_local2].give_only) && (active_list[_local3].data.name == quest_list[_local2].name)) && (active_list[_local3].isCompleted())) {
return(active_list[_local3]);
}
_local2++;
}
_local3++;
}
return(null);
}
function getQuestLogQuest(quest_name) {
var _local2 = 0;
while (_local2 < active_list.length) {
if (active_list[_local2].data.name == quest_name) {
return(active_list[_local2]);
}
_local2++;
}
return(null);
}
function getRelatedQuests(quest_list) {
var _local8 = new Array();
var _local6 = new Array();
var _local2 = 0;
while (_local2 < quest_list.length) {
var _local7 = false;
var _local5 = 0;
while (_local5 < active_list.length) {
if (active_list[_local5].data.name == quest_list[_local2].name) {
if ((active_list[_local5].isCompleted() && (!quest_list[_local2].give_only)) || ((!active_list[_local5].isCompleted()) && (quest_list[_local2].check_progress))) {
_local8.push(active_list[_local5]);
_local7 = true;
}
}
_local5++;
}
if (!_local7) {
_local6.push(quest_list[_local2]);
}
_local2++;
}
var _local5 = 0;
while (_local5 < _local6.length) {
_local2 = 0;
while (_local2 < QuestList.data.length) {
if ((!_local6[_local5].complete_only) && (_local6[_local5].name == QuestList.data[_local2].name)) {
if (questAvailable(QuestList.data[_local2])) {
var _local3 = new QuestManager();
_local3.data = QuestList.data[_local2];
_local8.push(_local3);
}
}
_local2++;
}
_local5++;
}
return(_local8);
}
function createLog() {
var _local6 = createEmptyMovieClip("log", 1);
category_list = new Array();
active_list.sortOn("data.name");
var _local2 = 0;
while (_local2 < active_list.length) {
var _local5 = -1;
var _local3 = 0;
while (_local3 < category_list.length) {
if (category_list[_local3].name == active_list[_local2].data.category) {
_local5 = _local3;
}
_local3++;
}
if (_local5 < 0) {
var _local8 = new Object();
_local8.name = active_list[_local2].data.category;
_local8.list = new Array();
_local5 = category_list.length;
category_list.push(_local8);
}
var _local7 = new Object();
_local7.index = _local2;
_local7.active_quest = active_list[_local2];
_local7.data = active_list[_local2].data;
category_list[_local5].list.push(_local7);
_local2++;
}
category_list.sortOn("name");
_local2 = 0;
while (_local2 < category_list.length) {
var _local4 = _local6.getNextHighestDepth();
category_list[_local2].movie = _local6.attachMovie("quest_log_collapse_item", "item" + _local4, _local4);
category_list[_local2].movie.index = _local2;
category_list[_local2].movie.setText(category_list[_local2].name);
var _local3 = 0;
while (_local3 < category_list[_local2].list.length) {
_local4 = _local6.getNextHighestDepth();
category_list[_local2].list[_local3].movie = _local6.attachMovie("quest_log_item", "item" + _local4, _local4);
category_list[_local2].list[_local3].movie.index = category_list[_local2].list[_local3].index;
category_list[_local2].list[_local3].movie.label_text = "not_selected";
category_list[_local2].list[_local3].movie.setText(category_list[_local2].list[_local3].data.title);
_local3++;
}
_local2++;
}
showLog();
}
function showLog() {
var _local4 = 0;
if ((current_quest == null) && (active_list.length > 0)) {
showQuest(0);
}
var _local2 = 0;
while (_local2 < category_list.length) {
category_list[_local2].movie._visible = true;
category_list[_local2].movie._y = _local4;
_local4 = _local4 + 15;
var _local3 = 0;
while (_local3 < category_list[_local2].list.length) {
category_list[_local2].list[_local3].movie._visible = category_list[_local2].movie.expanded;
if (category_list[_local2].movie.expanded) {
category_list[_local2].list[_local3].movie._y = _local4;
_local4 = _local4 + 15;
}
if (current_quest.data == category_list[_local2].list[_local3].data) {
category_list[_local2].list[_local3].movie.switchTo("selected");
} else {
category_list[_local2].list[_local3].movie.switchTo("not_selected");
}
category_list[_local2].list[_local3].movie.setComplete(category_list[_local2].list[_local3].active_quest.isCompleted());
_local3++;
}
_local2++;
}
if (active_list.length == 0) {
log_scroll.source = null;
} else {
log_scroll.source = log;
log_scroll.mask = log_mask;
log_scroll.scroll_scale = 5;
log_scroll.initialize();
}
quest_count = "Quests: " + active_list.length;
}
function clearQuest() {
createEmptyMovieClip("main", 2);
}
function showQuest(index) {
if (index != -1) {
current_quest = active_list[index];
}
var _local2 = createEmptyMovieClip("main", 2);
current_quest.showLogText(_local2);
if (text_fade_inst.getDepth() != 3) {
var _local4 = createEmptyMovieClip("top_clip", 3);
text_fade_inst.swapDepths(top_clip);
}
text_scroll.source = _local2;
text_scroll.mask = text_mask;
text_scroll.scroll_scale = 5;
text_scroll.initialize();
text_scroll.resetPosition();
}
function updateKillQuest(target_name) {
var _local4 = false;
var _local3 = 0;
while (_local3 < active_list.length) {
var _local2 = 0;
while (_local2 < active_list[_local3].data.objective.length) {
if ((active_list[_local3].data.objective[_local2].type == "kill") && (active_list[_local3].data.objective[_local2].target == target_name)) {
active_list[_local3].objective_progress[_local2]++;
if (active_list[_local3].objective_progress[_local2] > Number(active_list[_local3].data.objective[_local2].goal)) {
active_list[_local3].objective_progress[_local2] = Number(active_list[_local3].data.objective[_local2].goal);
} else {
GameEngine.current_engine.displayInfo((((active_list[_local3].data.objective[_local2].label + " ") + active_list[_local3].objective_progress[_local2]) + " / ") + active_list[_local3].data.objective[_local2].goal);
}
if (active_list[_local3] == current_quest) {
showQuest(-1);
}
_local4 = true;
}
_local2++;
}
_local3++;
}
if (_local4) {
showLog();
}
}
function updateCollectQuest(bag, equip) {
if (isNaN(equip.findItemCount(-1))) {
DebugWindow.debug("WARNING : Player equipment data not found during collect quest update");
return(undefined);
}
var _local5 = false;
var _local3 = 0;
while (_local3 < active_list.length) {
var _local2 = 0;
while (_local2 < active_list[_local3].data.objective.length) {
if (active_list[_local3].data.objective[_local2].type == "collect") {
var _local4 = active_list[_local3].objective_progress[_local2];
active_list[_local3].objective_progress[_local2] = InventoryUI.findItemCount(ItemList.getId(active_list[_local3].data.objective[_local2].target));
active_list[_local3].objective_progress[_local2] = active_list[_local3].objective_progress[_local2] + equip.findItemCount(ItemList.getId(active_list[_local3].data.objective[_local2].target));
if (active_list[_local3].objective_progress[_local2] > Number(active_list[_local3].data.objective[_local2].goal)) {
active_list[_local3].objective_progress[_local2] = Number(active_list[_local3].data.objective[_local2].goal);
}
if (active_list[_local3].objective_progress[_local2] > _local4) {
GameEngine.current_engine.displayInfo((((active_list[_local3].data.objective[_local2].label + " ") + active_list[_local3].objective_progress[_local2]) + " / ") + active_list[_local3].data.objective[_local2].goal);
}
if (active_list[_local3] == current_quest) {
showQuest(-1);
}
_local5 = true;
}
_local2++;
}
_local3++;
}
if (_local5) {
showLog();
}
DebugWindow.debug("SYS : Collect quest now updated properly");
}
function updateEscortQuest(target) {
if (target.is_fading) {
return(undefined);
}
var _local7 = false;
var _local3 = 0;
while (_local3 < active_list.length) {
var _local2 = 0;
while (_local2 < active_list[_local3].data.objective.length) {
if ((active_list[_local3].data.objective[_local2].type == "escort") && (active_list[_local3].data.objective[_local2].target == target.data.name)) {
var _local5 = false;
if (active_list[_local3].data.objective[_local2].npc_location != null) {
var _local6 = FactionTable.getClosestCharacter(target, active_list[_local3].data.objective[_local2].npc_location);
if ((_local6 != null) && (Math.abs(_local6.global_x - target.global_x) < target._width)) {
_local5 = true;
}
} else if (Math.abs(Number(active_list[_local3].data.objective[_local2].location) - target.global_x) < target._width) {
_local5 = true;
}
if (_local5) {
active_list[_local3].objective_progress[_local2]++;
if (active_list[_local3].objective_progress[_local2] > Number(active_list[_local3].data.objective[_local2].goal)) {
active_list[_local3].objective_progress[_local2] = Number(active_list[_local3].data.objective[_local2].goal);
} else {
SoundManager.playSound("floop");
target.startFade();
if (active_list[_local3] == current_quest) {
showQuest(-1);
}
GameEngine.current_engine.displayInfo((((active_list[_local3].data.objective[_local2].label + " ") + active_list[_local3].objective_progress[_local2]) + " / ") + active_list[_local3].data.objective[_local2].goal);
_local7 = true;
}
}
}
_local2++;
}
_local3++;
}
if (_local7) {
showLog();
}
}
function updateSpecialActionQuest(id) {
var _local4 = false;
var _local3 = 0;
while (_local3 < active_list.length) {
var _local2 = 0;
while (_local2 < active_list[_local3].data.objective.length) {
if ((active_list[_local3].data.objective[_local2].type == "special") && (active_list[_local3].data.objective[_local2].target == id)) {
active_list[_local3].objective_progress[_local2]++;
if (active_list[_local3].objective_progress[_local2] > Number(active_list[_local3].data.objective[_local2].goal)) {
active_list[_local3].objective_progress[_local2] = Number(active_list[_local3].data.objective[_local2].goal);
} else {
if (active_list[_local3] == current_quest) {
showQuest(-1);
}
GameEngine.current_engine.displayInfo((((active_list[_local3].data.objective[_local2].label + " ") + active_list[_local3].objective_progress[_local2]) + " / ") + active_list[_local3].data.objective[_local2].goal);
_local4 = true;
}
}
_local2++;
}
_local3++;
}
if (_local4) {
showLog();
}
}
function abandonQuest() {
if (current_quest == null) {
return(undefined);
}
PromptUI.current_prompt.openPrompt("Abandon Quest", ("Are you sure you want to abandon \"" + current_quest.data.title) + "\" and remove all related quest items from the inventory?", true, abandonResponse);
}
function abandonResponse(abandon_quest) {
if (abandon_quest) {
current_log.abandonQuestEvent();
}
}
function abandonQuestEvent() {
abandonQuestItem(current_quest.data.quest_item);
var _local2 = 0;
while (_local2 < active_list.length) {
if (active_list[_local2] == current_quest) {
active_list.splice(_local2, 1);
current_quest = null;
clearQuest();
createLog();
showLog();
return(undefined);
}
_local2++;
}
}
function abandonQuestItem(quest_item_list) {
var _local1 = 0;
while (_local1 < quest_item_list.length) {
switch (quest_item_list[_local1].type) {
case "copper" :
InventoryUI.takeCoins(Number(quest_item_list[_local1].value));
break;
case "item" :
var _local3 = ItemList.getId(quest_item_list[_local1].name);
var _local4 = InventoryUI.deleteItem(_local3, Number(quest_item_list[_local1].value));
if (_local4) {
break;
}
PlayerCharacter.current_player.current_equipment.deleteItem(_local3, Number(quest_item_list[_local1].value));
}
_local1++;
}
}
}
Symbol 3946 MovieClip [__Packages.QuestGiverUI] Frame 0
class QuestGiverUI extends WindowUI
{
static var current_giver_ui;
var accept_button, accept_button_inst, decline_button, decline_button_inst, cancel_button, cancel_button_inst, complete_button, complete_button_inst, close_button, close_button_inst, quest_scroll, quest_scroll_inst, quest_giver, attachMovie, portrait, _visible, hide, gotoAndStop, createEmptyMovieClip, active_quest_obj, text_fade_inst, top_clip, text_mask, active_quest_list;
function QuestGiverUI () {
super();
current_giver_ui = this;
}
function onLoad() {
super.onLoad();
SoundManager.loadExternalSound("quest_accept", "events/quest_accept.mp3");
SoundManager.loadExternalSound("quest_decline", "events/quest_decline.mp3");
SoundManager.loadExternalSound("quest_complete", "events/quest_complete.mp3");
var self = this;
accept_button = accept_button_inst;
decline_button = decline_button_inst;
cancel_button = cancel_button_inst;
complete_button = complete_button_inst;
close_button = close_button_inst;
quest_scroll = quest_scroll_inst;
accept_button.onRelease = function () {
QuestLogUI.current_log.addQuest(self.active_quest_obj.data);
self.giveQuestItem(self.active_quest_obj.data.quest_item);
ShortcutBarUI.current_shortcut_bar.update();
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
self.quest_giver.updateSymbol();
SoundManager.playSound("quest_accept");
self.hide();
};
decline_button.onRelease = function () {
SoundManager.playSound("quest_decline");
self.hide();
};
cancel_button.onRelease = function () {
SoundManager.playSound("click");
self.hide();
};
close_button.onRelease = function () {
SoundManager.playSound("click");
self.hide();
};
complete_button.onRelease = function () {
QuestLogUI.current_log.completeQuest(self.active_quest_obj.data);
self.giveQuestItem(self.active_quest_obj.data.reward);
self.deleteQuestItem(self.active_quest_obj.data.objective);
ShortcutBarUI.current_shortcut_bar.update();
NPCSpawnList.current_spawn_list.doSpawnDespawn();
ItemSpawnList.current_spawn_list.doSpawnDespawn();
SoundManager.playSound("quest_complete");
self.hide();
self.quest_giver.updateSymbol();
};
}
function show() {
if (quest_giver != null) {
attachMovie(quest_giver.character_portrait, "portrait", 50);
portrait.filters = quest_giver.getFilterArray();
} else {
attachMovie("default_quest_portrait", "portrait", 50);
}
super.show();
}
function onEnterFrame() {
super.onEnterFrame();
if (_visible && (quest_giver.inactive)) {
SoundManager.playSound("click");
hide();
}
}
function switchTo(label) {
(gotoAndStop(label));// not popped
accept_button._visible = false;
decline_button._visible = false;
cancel_button._visible = false;
complete_button._visible = false;
var _local2 = createEmptyMovieClip("text", 1);
switch (label) {
case "quest_select" :
cancel_button._visible = true;
showQuestSelectText(_local2);
break;
case "quest_available" :
accept_button._visible = true;
decline_button._visible = true;
active_quest_obj.showGiverText(_local2);
break;
case "quest_in_progress" :
cancel_button._visible = true;
active_quest_obj.showProgressText(_local2);
break;
case "quest_completed" :
cancel_button._visible = true;
complete_button._visible = true;
active_quest_obj.showCompleteText(_local2);
}
if (text_fade_inst.getDepth() != 3) {
var _local4 = createEmptyMovieClip("top_clip", 3);
text_fade_inst.swapDepths(top_clip);
}
quest_scroll.source = _local2;
quest_scroll.mask = text_mask;
quest_scroll.scroll_scale = 5;
quest_scroll.initialize();
quest_scroll.resetPosition();
QuestLogUI.current_log.close_button_inst.onRelease();
show();
SoundManager.playSound("click");
}
function showQuestSelectText(display) {
var _local4;
var _local7;
var _local5 = 0;
var _local8;
(gotoAndStop("quest_list"));// not popped
_local4 = display.getNextHighestDepth();
_local7 = display.createTextField("greetings", _local4, 0, 0, 270, 1);
_local7.selectable = false;
_local7.autoSize = true;
_local7.embedFonts = true;
_local7.multiline = true;
_local7.wordWrap = true;
_local7.setNewTextFormat(QuestManager.title_format);
_local7.text = QuestManager.textSubstitution(quest_giver.greetings);
_local8 = _local7.height * 2;
_local5 = _local5 + (_local7._height + QuestManager.TEXT_GAP);
var _local3 = 0;
while (_local3 < active_quest_list.length) {
_local4 = display.getNextHighestDepth();
var _local2 = display.attachMovie("quest_selection", "selection_" + _local4, _local4);
_local2._y = _local5;
_local5 = _local5 + 30;
_local2.quest_obj = active_quest_list[_local3];
_local2.quest_giver = quest_giver;
_local2.initialize();
_local3++;
}
}
function giveQuestItem(quest_item_list) {
var _local1 = 0;
while (_local1 < quest_item_list.length) {
switch (quest_item_list[_local1].type) {
case "copper" :
InventoryUI.getCoins(Number(quest_item_list[_local1].value));
break;
case "item" :
var _local4 = ItemList.getId(quest_item_list[_local1].name);
if (ItemList.uniqueCheck(quest_item_list[_local1].name) && (ItemList.questCheck(quest_item_list[_local1].name))) {
InventoryUI.getItem(_local4, Number(quest_item_list[_local1].value));
}
InventoryToggleButton.button_list[InventoryUI.last_updated_bag].setActivate(true);
break;
case "exp" :
var _local3 = PlayerCharacter.current_player;
_local3.gainExp(Number(quest_item_list[_local1].value));
ScrollingStage.current_stage.spawnCombatText(_local3._x, _local3._y - (-_local3.body_box._y), Number(quest_item_list[_local1].value) + "xp", 6);
}
_local1++;
}
}
function deleteQuestItem(quest_item_list) {
var _local1 = 0;
while (_local1 < quest_item_list.length) {
if (!(quest_item_list[_local1].type === "collect")) {
} else {
var _local3 = InventoryUI.deleteItem(ItemList.getId(quest_item_list[_local1].target), Number(quest_item_list[_local1].goal));
if (!_local3) {
PlayerCharacter.current_player.current_equipment.deleteItem(ItemList.getId(quest_item_list[_local1].target), Number(quest_item_list[_local1].goal));
}
}
_local1++;
}
}
}
Symbol 3947 MovieClip [__Packages.QuestManager] Frame 0
class QuestManager extends Object
{
static var title_format, content_format, incomplete_format, complete_format;
var objective_progress, data;
function QuestManager () {
super();
if (title_format == null) {
title_format = new TextFormat();
title_format.color = 4460800 /* 0x441100 */;
title_format.bold = true;
title_format.font = "quest_text_font";
title_format.size = 18;
content_format = new TextFormat();
content_format.color = 4465152 /* 0x442200 */;
content_format.font = "generic_sans";
content_format.size = 14;
incomplete_format = new TextFormat();
incomplete_format.color = 2232576 /* 0x221100 */;
incomplete_format.bold = true;
incomplete_format.font = "generic_sans";
incomplete_format.size = 12;
complete_format = new TextFormat();
complete_format.color = 16777215 /* 0xFFFFFF */;
complete_format.bold = true;
complete_format.font = "generic_sans";
complete_format.size = 12;
}
}
function initialize() {
objective_progress = new Array();
var _local2 = 0;
while (_local2 < data.objective.length) {
objective_progress.push(0);
_local2++;
}
}
static function textSubstitution(original) {
while (original.indexOf("[name]") >= 0) {
var _local3 = original.indexOf("[name]");
original = (original.substr(0, _local3) + PlayerCharacter.current_player.character_name) + original.substring(_local3 + 6, original.length);
}
var _local4 = PlayerCharacter.current_player.identity;
for (var _local5 in _local4.identity_list) {
var _local2 = ("[" + _local5) + "]";
while (original.indexOf(_local2) >= 0) {
var _local3 = original.indexOf(_local2);
original = (original.substr(0, _local3) + _local4.identity_list[_local5]) + original.substring(_local3 + _local2.length, original.length);
}
}
return(original);
}
function showGiverText(display) {
var _local4;
var _local2;
var _local3 = 0;
var _local6;
_local4 = display.getNextHighestDepth();
_local2 = display.createTextField("title", _local4, 0, 0, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = textSubstitution(data.title);
_local6 = _local2.height * 2;
_local3 = _local3 + (_local2._height + TEXT_GAP);
_local4 = display.getNextHighestDepth();
_local2 = display.createTextField("description", _local4, 0, _local3, 270, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.setNewTextFormat(content_format);
_local2.text = textSubstitution(data.description);
_local6 = _local2.height * 2;
_local3 = _local3 + (_local2._height + TEXT_GAP);
_local4 = display.getNextHighestDepth();
_local2 = display.createTextField("qobjective", _local4, 0, _local3, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = "Quest Objectives";
_local6 = _local2.height * 2;
_local3 = _local3 + (_local2._height + TEXT_GAP);
_local4 = display.getNextHighestDepth();
_local2 = display.createTextField("goal", _local4, 0, _local3, 270, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.setNewTextFormat(content_format);
_local2.text = textSubstitution(data.goal);
_local6 = _local2.height * 2;
_local3 = _local3 + (_local2._height + TEXT_GAP);
}
function showProgressText(display) {
var _local4;
var _local2;
var _local5 = 0;
var _local7;
_local4 = display.getNextHighestDepth();
_local2 = display.createTextField("title", _local4, 0, 0, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = textSubstitution(data.title);
_local7 = _local2.height * 2;
_local5 = _local5 + (_local2._height + TEXT_GAP);
_local4 = display.getNextHighestDepth();
_local2 = display.createTextField("description", _local4, 0, _local5, 270, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.setNewTextFormat(content_format);
_local2.text = textSubstitution(data.progress);
_local7 = _local2.height * 2;
_local5 = _local5 + (_local2._height + TEXT_GAP);
var _local3 = 0;
while (_local3 < data.objective.length) {
_local4 = display.getNextHighestDepth();
_local2 = display.createTextField("progress_" + _local4, _local4, 0, _local5, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
if (data.objective[_local3].goal <= objective_progress[_local3]) {
_local2.setNewTextFormat(complete_format);
} else {
_local2.setNewTextFormat(incomplete_format);
}
_local2.text = ((((" " + data.objective[_local3].label) + " ") + objective_progress[_local3]) + " / ") + data.objective[_local3].goal;
_local7 = _local2.height * 2;
_local5 = _local5 + _local2._height;
_local3++;
}
}
function showCompleteText(display) {
var _local3;
var _local2;
var _local6 = 0;
var _local9 = false;
var _local12;
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("title", _local3, 0, 0, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = textSubstitution(data.title);
_local12 = _local2.height * 2;
_local6 = _local6 + (_local2._height + TEXT_GAP);
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("description", _local3, 0, _local6, 270, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.setNewTextFormat(content_format);
_local2.text = textSubstitution(data.complete);
_local12 = _local2.height * 2;
_local6 = _local6 + (_local2._height + TEXT_GAP);
var _local11 = false;
var _local5 = 0;
while (_local5 < data.reward.length) {
if ((data.reward[_local5].type == "item") || (data.reward[_local5].type == "copper")) {
_local11 = true;
}
_local5++;
}
if (_local11) {
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("rewards_title", _local3, 0, _local6, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = "Rewards";
_local12 = _local2.height * 2;
_local6 = _local6 + (_local2._height + TEXT_GAP);
var _local7 = 0;
var _local10 = false;
_local5 = 0;
while (_local5 < data.reward.length) {
if (data.reward[_local5].type == "item") {
_local10 = true;
_local3 = display.getNextHighestDepth();
var _local8 = display.attachMovie("quest_reward_display_item", "reward_" + _local3, _local3);
if (_local9) {
_local7 = 0;
_local6 = _local6 + 50;
_local9 = false;
}
_local8._x = _local7;
_local8._y = _local6;
_local7 = _local7 + 140;
if (_local7 > 140) {
_local9 = true;
}
_local8.setItem(ItemList.getId(data.reward[_local5].name), Number(data.reward[_local5].value));
}
_local5++;
}
if (_local10) {
_local6 = _local6 + 55;
}
_local5 = 0;
while (_local5 < data.reward.length) {
if (data.reward[_local5].type == "copper") {
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("reward_coins_" + _local3, _local3, 0, _local6, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(content_format);
if (_local10) {
_local2.text = "You will also receive:";
} else {
_local2.text = "You will receive:";
}
_local3 = display.getNextHighestDepth();
var _local8 = display.attachMovie("quest_reward_display_coins", "reward_" + _local3, _local3);
_local8.setCopper(Number(data.reward[_local5].value));
_local8._y = _local6;
}
_local5++;
}
}
}
function showLogText(display) {
var _local3;
var _local2;
var _local5 = 0;
var _local9 = false;
var _local11;
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("title", _local3, 0, 0, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = textSubstitution(data.title);
_local11 = _local2.height * 2;
_local5 = _local5 + (_local2._height + TEXT_GAP);
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("goal", _local3, 0, _local5, 270, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.setNewTextFormat(content_format);
_local2.text = textSubstitution(data.goal);
_local11 = _local2.height * 2;
_local5 = _local5 + (_local2._height + TEXT_GAP);
var _local6 = 0;
while (_local6 < data.objective.length) {
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("progress_" + _local3, _local3, 0, _local5, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
if (data.objective[_local6].goal <= objective_progress[_local6]) {
_local2.setNewTextFormat(complete_format);
} else {
_local2.setNewTextFormat(incomplete_format);
}
_local2.text = ((((" " + data.objective[_local6].label) + " ") + objective_progress[_local6]) + " / ") + data.objective[_local6].goal;
_local11 = _local2.height * 2;
_local5 = _local5 + _local2._height;
_local6++;
}
_local5 = _local5 + TEXT_GAP;
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("descriptiontitle", _local3, 0, _local5, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = "Description";
_local11 = _local2.height * 2;
_local5 = _local5 + (_local2._height + TEXT_GAP);
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("description", _local3, 0, _local5, 270, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.setNewTextFormat(content_format);
_local2.text = textSubstitution(data.description);
_local11 = _local2.height * 2;
_local5 = _local5 + (_local2._height + TEXT_GAP);
var _local12 = false;
_local6 = 0;
while (_local6 < data.reward.length) {
if ((data.reward[_local6].type == "item") || (data.reward[_local6].type == "copper")) {
_local12 = true;
}
_local6++;
}
if (_local12) {
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("rewards_title", _local3, 0, _local5, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(title_format);
_local2.text = "Rewards";
_local11 = _local2.height * 2;
_local5 = _local5 + (_local2._height + TEXT_GAP);
var _local7 = 0;
var _local10 = false;
_local6 = 0;
while (_local6 < data.reward.length) {
if (data.reward[_local6].type == "item") {
_local10 = true;
_local3 = display.getNextHighestDepth();
var _local8 = display.attachMovie("quest_reward_display_item", "reward_" + _local3, _local3);
if (_local9) {
_local7 = 0;
_local5 = _local5 + 50;
_local9 = false;
}
_local8._x = _local7;
_local8._y = _local5;
_local7 = _local7 + 140;
if (_local7 > 140) {
_local9 = true;
}
_local8.setItem(ItemList.getId(data.reward[_local6].name), Number(data.reward[_local6].value));
}
_local6++;
}
if (_local10) {
_local5 = _local5 + 55;
}
_local6 = 0;
while (_local6 < data.reward.length) {
if (data.reward[_local6].type == "copper") {
_local3 = display.getNextHighestDepth();
_local2 = display.createTextField("reward_coins_" + _local3, _local3, 0, _local5, 1, 1);
_local2.selectable = false;
_local2.autoSize = true;
_local2.embedFonts = true;
_local2.setNewTextFormat(content_format);
if (_local10) {
_local2.text = "You will also receive:";
} else {
_local2.text = "You will receive:";
}
_local3 = display.getNextHighestDepth();
var _local8 = display.attachMovie("quest_reward_display_coins", "reward_" + _local3, _local3);
_local8.setCopper(Number(data.reward[_local6].value));
_local8._y = _local5;
}
_local6++;
}
}
}
function isCompleted() {
if (objective_progress == null) {
return(false);
}
var _local2 = 0;
while (_local2 < data.objective.length) {
if (Number(data.objective[_local2].goal) > objective_progress[_local2]) {
return(false);
}
_local2++;
}
return(true);
}
function getQuestState() {
if (isCompleted()) {
return("quest_completed");
}
if (QuestLogUI.current_log.questInProgress(data.name, false)) {
return("quest_in_progress");
}
if (QuestLogUI.current_log.questAvailable(data)) {
return("quest_available");
}
return(null);
}
static var TEXT_GAP = 6;
}
Symbol 3948 MovieClip [__Packages.QuestListData] Frame 0
class QuestListData extends Object
{
function QuestListData () {
super();
}
}
Symbol 3949 MovieClip [__Packages.ItemSpawnList] Frame 0
class ItemSpawnList extends Object
{
static var current_spawn_list;
var static_spawn_list, respawn_list;
function ItemSpawnList () {
super();
current_spawn_list = this;
static_spawn_list = new Array();
respawn_list = new Array();
}
function extractRequirement(xml_data, obj) {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
switch (_local1.nodeName.toLowerCase()) {
case "name" :
obj.name = _local1.firstChild.nodeValue;
break;
case "requirement" :
obj.requirement = _local1;
}
_local1 = _local1.nextSibling;
}
}
function extractItemSpawnData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "itemspawns") {
var _local3 = xml_data.firstChild;
while (_local3 != null) {
var _local2;
switch (_local3.nodeName.toLowerCase()) {
case "staticspawn" :
_local2 = new Object();
_local2.spawn_near = _local3.attributes.spawnNear;
_local2.x = Number(_local3.attributes.x);
_local2.probability = Number(_local3.attributes.probability);
if (isNaN(_local2.probability)) {
_local2.probability = 1;
}
if (_local3.attributes.requirement == "true") {
extractRequirement(_local3, _local2);
} else {
_local2.name = _local3.firstChild.nodeValue;
_local2.requirement = null;
}
_local2.item = null;
static_spawn_list.push(_local2);
break;
case "respawnarea" :
_local2 = new Object();
_local2.spawn_near = _local3.attributes.spawnNear;
_local2.x = Number(_local3.attributes.x);
_local2.radius = Number(_local3.attributes.radius);
_local2.init_spawn = Number(_local3.attributes.initSpawn);
_local2.max_spawn = Number(_local3.attributes.maxSpawn);
_local2.respawn_rate = Number(_local3.attributes.respawnRate);
_local2.item_list = new Array();
_local2.respawn_timer = getTimer();
_local2.probability = Number(_local3.attributes.probability);
if (isNaN(_local2.probability)) {
_local2.probability = 1;
}
if (_local3.attributes.requirement == "true") {
extractRequirement(_local3, _local2);
} else {
_local2.name = _local3.firstChild.nodeValue;
_local2.requirement = null;
}
respawn_list.push(_local2);
}
_local3 = _local3.nextSibling;
}
} else {
DebugWindow.debug("spawn list not found");
}
}
function getSpawnX(spawn_obj) {
if (spawn_obj.spawn_near != null) {
var _local1 = Character(FactionTable.getRandomFriend(spawn_obj.spawn_near));
if (_local1 == null) {
return(spawn_obj.x);
}
return(_local1.global_x);
}
return(spawn_obj.x);
}
function initStage() {
var _local6 = ScrollingStage.current_stage;
var _local4 = 0;
while (_local4 < static_spawn_list.length) {
var _local7 = PlayerCharacter.current_player.identity.checkRequirement(static_spawn_list[_local4].requirement);
if (_local7 && (Math.random() <= static_spawn_list[_local4].probability)) {
var _local2 = static_spawn_list[_local4];
var _local3 = _local6.spawnItem(_local2.name, 1);
if (_local3 != null) {
_local3.global_x = getSpawnX(static_spawn_list[_local4]);
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3._alpha = 0;
_local3.initialize();
static_spawn_list[_local4].item = _local3;
}
}
_local4++;
}
_local4 = 0;
while (_local4 < respawn_list.length) {
var _local7 = PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if (_local7) {
var _local2 = respawn_list[_local4];
var _local5 = 0;
while (_local5 < _local2.init_spawn) {
if (_local2.item_list.length < _local2.max_spawn) {
if (Math.random() <= respawn_list[_local4].probability) {
var _local3 = _local6.spawnItem(_local2.name, 1);
_local3.global_x = (getSpawnX(respawn_list[_local4]) + ((Math.random() * _local2.radius) * 2)) - _local2.radius;
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3.control_area = _local2;
_local3._alpha = 0;
_local3.initialize();
_local2.item_list.push(_local3);
}
}
_local5++;
}
_local2.respawn_timer = getTimer();
}
_local4++;
}
}
function doRespawn() {
var _local6 = ScrollingStage.current_stage;
var _local4 = 0;
while (_local4 < respawn_list.length) {
var _local2 = respawn_list[_local4];
if ((_local2.respawn_rate > 0) && ((getTimer() - _local2.respawn_timer) > _local2.respawn_rate)) {
_local2.respawn_timer = getTimer();
var _local5 = PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if ((_local5 && (_local2.item_list.length < _local2.max_spawn)) && (Math.random() <= _local2.probability)) {
var _local3 = _local6.spawnItem(_local2.name, 1);
if (_local3 != null) {
_local3.global_x = (getSpawnX(respawn_list[_local4]) + ((Math.random() * _local2.radius) * 2)) - _local2.radius;
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3._alpha = 0;
_local3.control_area = _local2;
_local3.initialize();
_local2.item_list.push(_local3);
}
}
}
_local4++;
}
}
function deleteItem(item, spawn) {
if (spawn == null) {
return(undefined);
}
var _local3 = false;
var _local1 = 0;
while ((_local1 < spawn.item_list.length) && (!_local3)) {
if (spawn.item_list[_local1] == item) {
spawn.item_list.splice(_local1, 1);
_local3 = true;
}
_local1++;
}
}
function doSpawnDespawn() {
var _local7 = 0;
DebugWindow.debug("DEBUG : Respawning and despawning items");
var _local4 = 0;
while (_local4 < static_spawn_list.length) {
var _local10 = !PlayerCharacter.current_player.identity.checkRequirement(static_spawn_list[_local4].requirement);
if (_local10) {
_local7++;
static_spawn_list[_local4].item.startFade();
static_spawn_list[_local4].item = null;
}
_local4++;
}
_local4 = 0;
while (_local4 < respawn_list.length) {
var _local10 = !PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if (_local10) {
var _local6 = respawn_list[_local4].item_list.concat();
var _local5 = 0;
while (_local5 < _local6.length) {
_local7++;
_local6[_local5].startFade();
_local5++;
}
}
_local4++;
}
DebugWindow.debug(("DEBUG : Despawning " + _local7) + " Items");
var _local8 = ScrollingStage.current_stage;
_local4 = 0;
while (_local4 < static_spawn_list.length) {
var _local9 = PlayerCharacter.current_player.identity.checkRequirement(static_spawn_list[_local4].requirement);
if ((_local9 && (static_spawn_list[_local4].item == null)) && (Math.random() <= static_spawn_list[_local4].probability)) {
var _local2 = static_spawn_list[_local4];
var _local3 = _local8.spawnItem(_local2.name, 1);
if (_local3 != null) {
_local3.global_x = getSpawnX(static_spawn_list[_local4]);
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3._alpha = 0;
_local3.initialize();
static_spawn_list[_local4].item = _local3;
}
}
_local4++;
}
_local4 = 0;
while (_local4 < respawn_list.length) {
var _local9 = PlayerCharacter.current_player.identity.checkRequirement(respawn_list[_local4].requirement);
if (_local9 && (respawn_list[_local4].item_list.length == 0)) {
var _local2 = respawn_list[_local4];
var _local5 = 0;
while (_local5 < _local2.init_spawn) {
if (_local2.npc_list.length < _local2.max_spawn) {
if (Math.random() <= respawn_list[_local4].probability) {
var _local3 = _local8.spawnItem(_local2.name, 1);
_local3.global_x = (getSpawnX(respawn_list[_local4]) + ((Math.random() * _local2.radius) * 2)) - _local2.radius;
_local3.global_y = ScrollingStage.current_stage.ground_level;
_local3._alpha = 0;
_local3.control_area = _local2;
_local3.initialize();
_local2.item_list.push(_local3);
}
}
_local5++;
}
_local2.respawn_timer = getTimer();
}
_local4++;
}
}
}
Symbol 3950 MovieClip [__Packages.DropItem] Frame 0
class DropItem extends GameObject
{
var image_loader, is_fade, item_ready, copper, stack, item_icon, attachMovie, item_id, syncCoordinates, item_shadow, _x, _y, image_clip, createEmptyMovieClip, inactive, hitTest, speed_y, control_area, removeMovieClip, _alpha, speed_x, global_y;
function DropItem () {
super();
image_loader = new ImageLoader();
image_loader.loadEvent = function (target_mc) {
target_mc._y = (-target_mc._height) + 15;
target_mc._x = (-target_mc._width) / 2;
if (target_mc._parent.copper > 0) {
target_mc._y = target_mc._y - 5;
}
};
is_fade = false;
item_ready = false;
copper = 0;
stack = 0;
item_icon = attachMovie("item_icon", "item_icon_inst", 2);
item_icon._x = -int(item_icon._width / 2);
item_icon._y = -int(item_icon._height);
item_icon._visible = false;
}
function initialize() {
copper = Number(ItemList.data[item_id].copper);
syncCoordinates();
if (isNaN(copper)) {
item_shadow = ScrollingStage.current_stage.spawnAttachable(_x, _y, "item_shadow", this);
item_shadow.swapDepths(this);
} else {
item_shadow = ScrollingStage.current_stage.spawnAttachable(_x, _y, "coin_shadow", this);
item_shadow.swapDepths(this);
}
image_clip = createEmptyMovieClip("image", 1);
image_loader.loadImage(ItemList.data[item_id].dropImage, image_clip);
item_icon.item_id = item_id;
item_icon.stack = 1;
item_icon.update();
SoundManager.loadExternalSound("drop", "events/drop.mp3");
SoundManager.loadExternalSound("pickup", "events/pickup.mp3");
}
function onEnterFrame() {
super.onEnterFrame();
if (inactive) {
return(undefined);
}
if ((((item_ready && (!is_fade)) && (PlayerCharacter.current_player.isAlive())) && (hitTest(PlayerCharacter.current_player.body_box))) && (ItemList.uniqueCheck(ItemList.data[item_id].name))) {
if (copper > 0) {
is_fade = true;
speed_y = 4;
SoundManager.playSound("pickup");
InventoryUI.getCoins(copper);
} else if (InventoryUI.getItem(item_id, stack)) {
is_fade = true;
speed_y = 4;
SoundManager.playSound("pickup");
ShortcutBarUI.current_shortcut_bar.update();
}
}
if (is_fade) {
if (copper > 0) {
item_icon._alpha = item_icon._alpha - 10;
} else {
item_icon._visible = true;
item_icon._y = item_icon._y - 8;
item_icon._alpha = item_icon._alpha - 5;
}
image_clip._alpha = image_clip._alpha - 10;
if (item_icon._alpha <= 0) {
item_shadow.removeMovieClip();
ItemSpawnList.current_spawn_list.deleteItem(this, control_area);
removeMovieClip();
}
} else if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
function hitGroundEvent() {
speed_y = (-speed_y) * GameConstants.BOUNCE_PERCENTAGE;
if (Math.abs(speed_y) < 4) {
speed_x = 0;
speed_y = 0;
global_y = ScrollingStage.current_stage.ground_level;
item_ready = true;
} else {
SoundManager.playSound("drop");
}
}
function startFade() {
is_fade = true;
}
}
Symbol 3951 MovieClip [__Packages.ToggleButtonUI] Frame 0
class ToggleButtonUI extends MovieClip
{
var stop, is_active, gotoAndStop, toggle_object, tooltip, key_binding;
function ToggleButtonUI () {
super();
}
function onLoad() {
(stop());// not popped
is_active = false;
Key.addListener(this);
}
function setActivate(new_state) {
if (new_state == is_active) {
return(undefined);
}
is_active = new_state;
updateActiveState();
}
function updateActiveState() {
if (is_active) {
(gotoAndStop("active"));// not popped
toggle_object.show();
} else {
(gotoAndStop("inactive"));// not popped
toggle_object.hide();
}
}
function onRollOver() {
ItemInfo.current_item_info.showTooltip(tooltip);
}
function onRollOut() {
ItemInfo.current_item_info.hide();
}
function onRelease() {
is_active = !is_active;
updateActiveState();
}
function onKeyDown() {
if (DebugWindow.prompt_enabled) {
return(undefined);
}
if (((!isNaN(key_binding)) && (!Key.isDown(17))) && (Key.isDown(key_binding))) {
onRelease();
}
}
}
Symbol 3952 MovieClip [__Packages.InfoDisplay] Frame 0
class InfoDisplay extends MovieClip
{
var _visible, item_name, item_name_inst, item_slot, item_slot_inst, item_default_format, item_default, item_name_format, item_slot_format, item_proc_format, item_flavor_format, item_cost_format, below_requirement_format, rarity_format, show_cost, item_stack, cost_text, cost_percentage, stats_layer, createEmptyMovieClip, y_start, base_inst, _y, current_item;
function InfoDisplay () {
super();
}
function onLoad() {
_visible = false;
item_name = item_name_inst;
item_slot = item_slot_inst;
item_default_format = new TextFormat();
item_default_format.font = "_sans";
item_default_format.size = 11;
item_default_format.color = 16777215 /* 0xFFFFFF */;
item_default.autoSize = true;
item_default.selectable = false;
item_default.setNewTextFormat(item_default_format);
item_name_format = new TextFormat();
item_name_format.font = "_sans";
item_name_format.size = 12;
item_name_format.color = 16763904 /* 0xFFCC00 */;
item_name.autoSize = true;
item_name.selectable = false;
item_name.setNewTextFormat(item_name_format);
item_slot_format = new TextFormat();
item_slot_format.font = "_sans";
item_slot_format.size = 11;
item_slot_format.color = 43775;
item_slot.autoSize = true;
item_slot.selectable = false;
item_slot.setNewTextFormat(item_slot_format);
item_proc_format = new TextFormat();
item_proc_format.font = "_sans";
item_proc_format.size = 11;
item_proc_format.color = 65280;
item_proc_format.bold = false;
item_flavor_format = new TextFormat();
item_flavor_format.font = "_sans";
item_flavor_format.size = 11;
item_flavor_format.color = 11184810 /* 0xAAAAAA */;
item_flavor_format.bold = false;
item_cost_format = new TextFormat();
item_cost_format.font = "_sans";
item_cost_format.size = 11;
item_cost_format.color = 16776960 /* 0xFFFF00 */;
item_cost_format.bold = false;
below_requirement_format = new TextFormat();
below_requirement_format.font = "_sans";
below_requirement_format.size = 11;
below_requirement_format.color = 16711680 /* 0xFF0000 */;
rarity_format = new Array();
var _local3 = 0;
while (_local3 < RARITY_COLOR.length) {
var _local2 = new TextFormat();
_local2.font = "_sans";
_local2.size = 11;
_local2.color = RARITY_COLOR[_local3];
rarity_format.push(_local2);
_local3++;
}
}
function showItem(item_info, stack, txt, pct) {
if (item_info == null) {
_visible = false;
return(undefined);
}
show_cost = txt != null;
if (show_cost) {
item_stack = stack;
cost_text = txt;
cost_percentage = pct;
}
item_name.wordWrap = false;
var _local33 = "common";
if (item_info.rarity != null) {
_local33 = item_info.rarity;
}
var _local25 = 0;
while (_local25 < RARITY_NAME.length) {
if (_local33 == RARITY_NAME[_local25]) {
item_name.setNewTextFormat(rarity_format[_local25]);
}
_local25++;
}
item_name.text = item_info.dispName;
var _local34 = item_name._width * 2;
if (item_name._width > 250) {
item_name.wordWrap = true;
item_name._width = 250;
} else {
item_name.wordWrap = false;
}
var _local17 = -1;
var _local21 = -1;
var _local26 = 0;
stats_layer = createEmptyMovieClip("stats_layer_inst", 1);
stats_layer._y = y_start;
var _local29 = 0;
_local25 = 0;
while (_local25 < DISP_LIST.length) {
var _local5 = DISP_LIST[_local25];
var _local9 = null;
if ((_local5 == "damage") && (item_info.type.toLowerCase() == "thrown")) {
var _local24 = ProjectileList.data[ProjectileList.getId(item_info.name)];
_local9 = ((_local24.damage + "-") + (Number(_local24.damage) + Number(_local24.damageVar))) + " Damage";
}
var _local18;
var _local23;
_local18 = item_info[_local5] != null;
if (GameUtil.isInArray(SPECIAL_DISP, _local5)) {
_local18 = true;
}
if (GameUtil.isInArray(PROC_DISP, _local5)) {
if (_local5 == "proc proj proc") {
var _local20 = null;
var _local12 = 0;
while (_local12 < item_info.proc.data.length) {
if (item_info.proc.data[_local12].type == "projectile") {
_local20 = item_info.proc.data[_local12].name;
}
_local12++;
}
if (_local20 != null) {
_local23 = ProjectileList.data[ProjectileList.getId(_local20)].proc;
}
_local18 = _local23 != null;
} else if (item_info.proc != null) {
_local18 = true;
} else if ((Equipment.getSlot(item_info.type) == Equipment.SLOT_THROWN) && (ProjectileList.data[ProjectileList.getId(item_info.name)].proc != null)) {
_local18 = true;
}
}
if (_local18) {
switch (String(_local5).toLowerCase()) {
case "armor" :
if (Number(item_info[_local5]) > 0) {
_local9 = item_info[_local5] + " Armor";
}
break;
case "damage" :
if ((item_info.type.toLowerCase() == "main hand") || (item_info.type.toLowerCase() == "thrown")) {
_local17 = Number(item_info[_local5]);
} else if (Number(item_info[_local5]) >= 0) {
_local9 = ("+" + item_info[_local5]) + " Strength";
} else {
_local9 = item_info[_local5] + " Strength";
}
break;
case "damagevar" :
_local21 = Number(item_info[_local5]);
break;
case "speed" :
_local9 = (((int(Number(item_info[_local5]) / 100) / 10) + " Speed (") + _local26) + " damage per second)";
break;
case "health" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + " Stamina";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + " Stamina";
}
break;
case "mana" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + " Intelligence";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + " Intelligence";
}
break;
case "spirit" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + " Spirit";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + " Spirit";
}
break;
case "runspeed" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + "% Run Speed";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + "% Run Speed";
}
break;
case "jump" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + "% Jump Height";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + "% Jump Height";
}
break;
case "haste" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + "% Attack Speed";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + "% Attack Speed";
}
break;
case "spellhaste" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + "% Cast Speed";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + "% Cast Speed";
}
break;
case "spellboost" :
if (Number(item_info[_local5]) > 0) {
_local9 = ("+" + item_info[_local5]) + "% Spell Power";
} else if (Number(item_info[_local5]) < 0) {
_local9 = item_info[_local5] + "% Spell Power";
}
break;
case "slot" :
_local9 = Equipment.getTypeName(item_info.type);
break;
case "quest req" :
case "requirement" :
_local9 = "";
var _local28;
if (_local5 == "requirement") {
_local28 = Identity.extractRequirementList(item_info[_local5]);
} else {
_local28 = Identity.extractRequirementList(QuestList.data[QuestList.getId(item_info.quest)].requirement);
}
var _local7 = new Object();
var _local12 = 0;
while (_local12 < _local28.length) {
var _local6 = false;
var _local8 = _local28[_local12];
if ((_local7[_local8.type] == null) && (_local8.type != "level")) {
_local7[_local8.type] = new Array();
}
switch (_local8.type) {
case "level" :
_local9 = ("Requires level " + _local8.value) + newline;
break;
case "equip" :
_local7.equip.push(ItemList.getName(ItemList.getId(_local8.value)));
break;
case "quest" :
_local7.quest.push(QuestList.data[QuestList.getId(_local8.value)].title);
break;
default :
_local7[_local8.type].push(GameUtil.capitalize(_local8.value));
}
_local12++;
}
for (var _local31 in _local7) {
_local9 = _local9 + (GameUtil.capitalize(_local31) + ": ");
_local12 = 0;
while (_local12 < _local7[_local31].length) {
_local9 = _local9 + _local7[_local31][_local12];
if (_local12 < (_local7[_local31].length - 1)) {
_local9 = _local9 + ", ";
}
_local12++;
}
_local9 = _local9 + newline;
}
break;
case "unique" :
if (item_info[_local5] > 0) {
if (item_info[_local5] > 1) {
_local9 = "Unique - Limit: " + item_info[_local5];
} else {
_local9 = "Unique";
}
}
break;
case "quest" :
_local9 = "";
_local9 = _local9 + "This Item Begins a Quest";
break;
case "flavor" :
_local9 = item_info[_local5];
break;
case "cost" :
if (item_info[_local5] == "quest") {
_local9 = "Quest Item";
} else if (show_cost && (item_info[_local5] != null)) {
_local9 = cost_text + " ";
var _local13;
var _local22;
_local22 = (Number(item_info[_local5]) * item_stack) * cost_percentage;
_local13 = int((_local22 / 100) / 100);
if (_local13 > 0) {
_local9 = _local9 + (_local13 + " Gold ");
}
_local13 = int((_local22 / 100) % 100);
if (_local13 > 0) {
_local9 = _local9 + (_local13 + " Silver ");
}
_local13 = int(_local22 % 100);
if (_local13 > 0) {
_local9 = _local9 + (_local13 + " Copper ");
}
}
break;
case "cast time" :
_local9 = "";
if (Equipment.getSlot(item_info.type) == Equipment.SLOT_TRINKET) {
if (item_info.proc.cast_time > 0) {
_local9 = (int(Number(item_info.proc.cast_time) / 100) / 10) + " Second cast";
} else {
_local9 = "Instant";
}
}
break;
case "usage cost" :
_local9 = "";
if (Equipment.getSlot(item_info.type) == Equipment.SLOT_TRINKET) {
_local12 = 0;
while (_local12 < item_info.proc.data.length) {
var _local3 = "";
var _local6 = false;
var _local2 = item_info.proc.data[_local12];
if (_local2.type == "deplete") {
switch (_local2.name) {
case "health" :
_local3 = _local3 + (_local2.value + " Health cost");
_local6 = true;
break;
case "mana" :
_local3 = _local3 + (_local2.value + " Mana cost");
_local6 = true;
}
}
if ((_local12 < (item_info.proc.data.length - 1)) && (_local6)) {
_local3 = _local3 + newline;
}
if (_local6) {
_local9 = _local9 + _local3;
}
_local12++;
}
}
break;
case "proc proj proc" :
case "proc" :
_local9 = "";
var _local15 = item_info[_local5].data;
var _local16 = item_info[_local5];
var _local11;
if (Equipment.getSlot(item_info.type) == Equipment.SLOT_THROWN) {
_local15 = ProjectileList.data[ProjectileList.getId(item_info.name)].proc.data;
_local16 = ProjectileList.data[ProjectileList.getId(item_info.name)].proc;
}
if (_local5 == "proc proj proc") {
_local15 = _local23.data;
_local16 = _local23;
}
if (isNaN(_local16.probability) || (_local16.probability >= 1)) {
_local11 = "On ";
} else {
_local11 = "Chance on ";
}
switch (_local16.proc_type) {
case 0 :
_local11 = _local11 + "Wound";
break;
case 1 :
_local11 = _local11 + "Melee";
break;
case 2 :
_local11 = _local11 + "Cast";
break;
case 3 :
_local11 = _local11 + "Use";
}
if (_local5 == "proc proj proc") {
_local11 = _local11 + "Hit";
}
if (_local16.from_stealth) {
_local11 = _local11 + " from Stealth: ";
} else {
_local11 = _local11 + ": ";
}
_local12 = 0;
for(;;){
if (_local12 >= _local15.length) {
break;
}
var _local3 = "";
_local3 = _local11;
var _local6 = false;
var _local2 = _local15[_local12];
switch (_local2.type) {
case "special" :
_local3 = _local3 + (_local2.description + " ");
_local6 = true;
break;
case "projectile" :
var _local14 = ProjectileList.data[ProjectileList.getId(_local2.name)];
_local3 = _local3 + _local2.description;
_local3 = _local3 + ((((" for " + _local14.damage) + " to ") + (Number(_local14.damage) + Number(_local14.damageVar))) + " damage.");
_local6 = true;
break;
case "perm_summon" :
var _local19 = NPCList.data[NPCList.getId(_local2.name)];
_local3 = _local3 + (("Summons " + _local19.display_name) + " ");
_local6 = true;
break;
case "summon" :
_local19 = NPCList.data[NPCList.getId(_local2.name)];
_local3 = _local3 + (((("Summons " + _local19.display_name) + " for ") + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
_local6 = true;
break;
case "purge" :
_local3 = _local3 + (("Purges " + _local2.value) + " beneficial effects from");
if (_local6 && (_local2.applyTo == "target")) {
_local3 = _local3 + "the target.";
} else {
_local3 = _local3 + "the user.";
}
_local6 = true;
break;
case "tempstat" :
if (_local2.name == "stealth") {
_local3 = _local3 + (("Applies stealth mode for " + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
_local6 = true;
break;
}
if (Number(_local2.value) < 0) {
_local3 = _local3 + "Decreases ";
} else {
_local3 = _local3 + "Increases ";
}
switch (_local2.name) {
case "haste" :
_local3 = _local3 + "attack speed";
break;
case "spell_haste" :
_local3 = _local3 + "casting speed";
break;
case "spell_boost" :
_local3 = _local3 + "casting effectiveness";
break;
case "speed" :
_local3 = _local3 + "running speed";
break;
case "jump" :
_local3 = _local3 + "jump height";
break;
case "damage" :
_local3 = _local3 + "damage";
break;
case "health" :
_local3 = _local3 + "health";
break;
case "mana" :
_local3 = _local3 + "mana";
break;
case "spirit" :
_local3 = _local3 + "spirit";
break;
case "armor" :
_local3 = _local3 + "armor";
}
switch (_local2.name) {
case "haste" :
case "spell_haste" :
case "spell_boost" :
case "speed" :
case "jump" :
_local3 = _local3 + ((((" by " + Math.abs(Number(_local2.value))) + "% for ") + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
break;
default :
_local3 = _local3 + ((((" by " + Math.abs(Number(_local2.value))) + " points for ") + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
}
_local6 = true;
break;
case "control" :
switch (_local2.name) {
case "fear" :
_local3 = _local3 + "Fears";
break;
case "stun" :
_local3 = _local3 + "Stuns";
break;
case "incapacitate" :
_local3 = _local3 + "Incapacitates";
break;
case "banish" :
_local3 = _local3 + "Banishes";
}
if (_local2.applyTo == "target") {
_local3 = _local3 + " the target ";
} else {
_local3 = _local3 + " the user ";
}
_local3 = _local3 + (("for " + (int(Number(_local2.duration) / 100) / 10)) + " seconds.");
_local6 = true;
break;
case "silence" :
_local3 = _local3 + (("Locks all ability usage for " + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
_local6 = true;
break;
case "shield" :
_local3 = _local3 + (((("Absorbs the next " + _local2.value) + " damage for ") + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
_local6 = true;
break;
case "dot" :
_local3 = _local3 + (((((("Causes " + _local2.value) + " ") + _local2.name) + " damage over ") + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
_local6 = true;
break;
case "hot" :
_local3 = _local3 + (((((("Restores " + _local2.value) + " ") + _local2.name) + " over ") + (int(Number(_local2.duration) / 100) / 10)) + " seconds ");
_local6 = true;
break;
case "damage" :
if ((_local2.variation == null) || (_local2.variation == 0)) {
_local3 = _local3 + (((("Causes " + _local2.value) + " ") + _local2.name) + " damage ");
} else {
_local3 = _local3 + (((((("Causes " + _local2.value) + " to ") + (Number(_local2.value) + Number(_local2.variation))) + " ") + _local2.name) + " damage ");
}
_local6 = true;
break;
case "restore" :
if ((_local2.variation == null) || (_local2.variation == 0)) {
_local3 = _local3 + (((("Restores " + _local2.value) + " ") + _local2.name) + " ");
} else {
_local3 = _local3 + (((((("Restores " + _local2.value) + " to ") + (Number(_local2.value) + Number(_local2.variation))) + " ") + _local2.name) + " ");
}
_local6 = true;
break;
case "deplete" :
if (Equipment.getSlot(item_info.type) == Equipment.SLOT_TRINKET) {
break;
}
_local3 = _local3 + (((("Drains " + _local2.value) + " ") + _local2.name) + " ");
_local6 = true;
}
if ((((_local2.type != "projectile") && (_local2.type != "control")) && (_local2.type != "special")) && (_local2.type != "purge")) {
if (_local6 && (_local2.applyTo == "target")) {
_local3 = _local3 + "to target.";
} else {
_local3 = _local3 + "to user.";
}
}
if ((_local2.stack != null) && (Number(_local2.stack) > 0)) {
_local3 = _local3 + ((" Stacks up to " + _local2.stack) + " times.");
}
if ((_local12 < (_local15.length - 1)) && (_local6)) {
_local3 = _local3 + newline;
}
if (_local6) {
_local9 = _local9 + _local3;
}
_local12++;
};
}
}
if ((_local17 >= 0) && (_local21 >= 0)) {
_local9 = ((_local17 + "-") + (_local17 + _local21)) + " Damage";
if (item_info.speed != null) {
_local26 = ((((_local17 + _local17) + _local21) / 2) * 1000) / Number(item_info.speed);
_local26 = int(_local26 * 10) / 10;
}
_local17 = -1;
_local21 = -1;
}
if ((_local9 != null) && (_local9 != "")) {
var _local27 = stats_layer.getNextHighestDepth();
var _local10 = stats_layer.createTextField("stat_text_inst_" + _local27, _local27, 5, _local29, 1, 1);
_local10.autoSize = true;
_local10.selectable = false;
switch (_local5.toLowerCase()) {
case "slot" :
_local10.setNewTextFormat(item_slot_format);
break;
case "unique" :
_local10.setNewTextFormat(item_cost_format);
break;
case "flavor" :
_local10.setNewTextFormat(item_flavor_format);
break;
case "proc proj proc" :
case "proc" :
_local10.setNewTextFormat(item_proc_format);
break;
case "cost" :
_local10.setNewTextFormat(item_cost_format);
break;
case "quest req" :
case "requirement" :
if (_local5 == "requirement") {
var _local28 = item_info.requirement;
} else {
var _local28 = QuestList.data[QuestList.getId(item_info.quest)].requirement;
}
if (!PlayerCharacter.current_player.identity.checkRequirement(_local28)) {
_local10.setNewTextFormat(below_requirement_format);
break;
}
default :
_local10.setNewTextFormat(item_default_format);
}
_local10.text = _local9;
if (GameUtil.isInArray(REDUCE_DISP, _local5)) {
var _local30;
_local30 = _local10._width * 2;
if (_local10._width > 250) {
_local10.wordWrap = true;
_local10._width = 250;
} else {
_local10.wordWrap = false;
}
_local30 = _local10._height * 2;
}
_local29 = Math.floor((_local29 + _local10._height) - 4);
}
_local25++;
}
var _local32 = base_inst;
_local32._height = (stats_layer._y + stats_layer._height) + 5;
_local32._width = item_name._width + 15;
if (item_slot._width > (_local32._width - 15)) {
_local32._width = item_slot._width + 15;
}
if (stats_layer._width > (_local32._width - 15)) {
_local32._width = stats_layer._width + 15;
}
if (_local32._width < 150) {
_local32._width = 150;
}
_y = 485 - _local32._height;
_visible = true;
}
function updateNPC(npc) {
if (current_item == npc) {
showNPC(npc);
}
}
function showNPC(npc) {
current_item = npc;
item_name.setNewTextFormat(rarity_format[0]);
item_name.wordWrap = false;
item_name.text = npc.character_name;
var _local9 = item_name._width * 2;
if (item_name._width > 250) {
item_name.wordWrap = true;
item_name._width = 250;
} else {
item_name.wordWrap = false;
}
stats_layer = createEmptyMovieClip("stats_layer_inst", 1);
stats_layer._y = y_start;
var _local7 = 0;
var _local5 = 0;
while (_local5 < CHAR_DISP_LIST.length) {
var _local4 = null;
switch (CHAR_DISP_LIST[_local5]) {
case "level" :
_local4 = ((((("Level " + npc.current_level) + newline) + GameUtil.capitalize(npc.identity.getValue("race"))) + " ") + GameUtil.capitalize(npc.identity.getValue("class"))) + "\n\n";
break;
case "health" :
_local4 = ((int((npc.current_health / npc.maximum_health) * 100) + "% HP ") + int((npc.current_mana / npc.maximum_mana) * 100)) + "% MP";
}
if ((_local4 != null) && (_local4 != "")) {
var _local6 = stats_layer.getNextHighestDepth();
var _local3 = stats_layer.createTextField("stat_text_inst_" + _local6, _local6, 5, _local7, 1, 1);
_local3.autoSize = true;
_local3.selectable = false;
_local3.setNewTextFormat(item_default_format);
_local3.text = _local4;
_local7 = Math.floor((_local7 + _local3._height) - 4);
}
_local5++;
}
var _local8 = base_inst;
_local8._height = (stats_layer._y + stats_layer._height) + 5;
_local8._width = item_name._width + 15;
if (item_slot._width > (_local8._width - 15)) {
_local8._width = item_slot._width + 15;
}
if (stats_layer._width > (_local8._width - 15)) {
_local8._width = stats_layer._width + 15;
}
if (_local8._width < 150) {
_local8._width = 150;
}
_y = 485 - _local8._height;
_visible = true;
}
function showNPCDetails(npc) {
item_name.setNewTextFormat(rarity_format[0]);
item_name.wordWrap = false;
item_name.text = npc.id_name;
var _local10 = item_name._width * 2;
if (item_name._width > 250) {
item_name.wordWrap = true;
item_name._width = 250;
} else {
item_name.wordWrap = false;
}
stats_layer = createEmptyMovieClip("stats_layer_inst", 1);
stats_layer._y = y_start;
var _local8 = 0;
var _local6 = 0;
while (_local6 < CHAR_DETAILS_LIST.length) {
var _local2 = null;
switch (CHAR_DETAILS_LIST[_local6]) {
case "state" :
_local2 = "State : " + npc.current_state;
break;
case "action" :
_local2 = ("Action : " + npc.character_action) + newline;
_local2 = _local2 + ("Anim : " + npc.animation_data);
break;
case "target" :
if (npc.target_character.character_name == null) {
_local2 = "Target : None";
} else {
_local2 = "Target : " + npc.target_character.character_name;
}
break;
case "prev_patterns" :
_local2 = "Patterns :\r";
_local2 = _local2 + npc.prev_patterns.toString();
break;
case "trial_count" :
_local2 = "Trials : " + npc.trial_count;
break;
case "buffs" :
_local2 = "Effects :\r";
var _local4 = 0;
for(;;){
if (_local4 >= npc.buff_list.length) {
break;
}
_local2 = _local2 + ((npc.buff_list[_local4].type + ".") + npc.buff_list[_local4].name);
if (npc.buff_list[_local4].duration != null) {
_local2 = _local2 + ((" (" + npc.buff_list[_local4].duration) + ")");
}
_local2 = _local2 + newline;
_local4++;
};
}
if ((_local2 != null) && (_local2 != "")) {
var _local7 = stats_layer.getNextHighestDepth();
var _local5 = stats_layer.createTextField("stat_text_inst_" + _local7, _local7, 5, _local8, 1, 1);
_local5.autoSize = true;
_local5.selectable = false;
switch (CHAR_DETAILS_LIST[_local6]) {
case "prev_patterns" :
case "trial_count" :
_local5.setNewTextFormat(item_cost_format);
break;
case "buffs" :
_local5.setNewTextFormat(item_proc_format);
break;
default :
_local5.setNewTextFormat(item_default_format);
}
_local5.text = _local2;
_local8 = Math.floor((_local8 + _local5._height) - 4);
}
_local6++;
}
var _local9 = base_inst;
_local9._height = (stats_layer._y + stats_layer._height) + 5;
_local9._width = item_name._width + 15;
if (item_slot._width > (_local9._width - 15)) {
_local9._width = item_slot._width + 15;
}
if (stats_layer._width > (_local9._width - 15)) {
_local9._width = stats_layer._width + 15;
}
if (_local9._width < 150) {
_local9._width = 150;
}
_y = 485 - _local9._height;
_visible = true;
}
function showTooltip(msg) {
item_name.setNewTextFormat(rarity_format[0]);
item_name.wordWrap = false;
item_name.text = msg;
var _local3 = item_name._width * 2;
if (item_name._width > 250) {
item_name.wordWrap = true;
item_name._width = 250;
} else {
item_name.wordWrap = false;
}
stats_layer = createEmptyMovieClip("stats_layer_inst", 1);
var _local2 = base_inst;
_local2._height = (y_start + 5) + 4;
_local2._width = item_name._width + 15;
if (item_slot._width > (_local2._width - 15)) {
_local2._width = item_slot._width + 15;
}
if (stats_layer._width > (_local2._width - 15)) {
_local2._width = stats_layer._width + 15;
}
if (_local2._width < 150) {
_local2._width = 150;
}
_y = ((485 - _local2._height) - 45) - 4;
_visible = true;
}
function hide() {
current_item = null;
_visible = false;
}
static var DISP_LIST = ["unique", "slot", "requirement", "quest", "quest req", "usage cost", "cast time", "armor", "damage", "damageVar", "speed", "health", "mana", "spirit", "runSpeed", "jump", "haste", "spellHaste", "spellBoost", "proc", "proc proj proc", "flavor", "cost"];
static var SPECIAL_DISP = ["usage cost", "slot", "quest req"];
static var PROC_DISP = ["usage cost", "cast time", "proc", "proc proj proc"];
static var REDUCE_DISP = ["proc", "proc proj proc", "flavor"];
static var CHAR_DISP_LIST = ["level", "health"];
static var CHAR_DETAILS_LIST = ["state", "action", "target", "prev_patterns", "buffs"];
static var RARITY_NAME = ["common", "uncommon", "rare", "epic"];
static var RARITY_COLOR = [16777215, 65280, 3355647, 16711935];
}
Symbol 3953 MovieClip [__Packages.ProjectileList] Frame 0
class ProjectileList extends Object
{
static var data;
function ProjectileList () {
super();
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Array();
if (xml_data.nodeName.toLowerCase() == "projectilelist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "projectile")) {
} else {
extractProjectileData(_local1);
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function extractProjectileData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "projectile") {
var _local4 = new Object();
_local4.splash_damage = false;
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (_local1.nodeName != null) {
switch (_local1.nodeName) {
case "proc" :
var _local5 = new Object();
_local5.probability = Number(_local1.attributes.probability);
_local5.from_stealth = _local1.attributes.fromStealth == "true";
_local5.data = new Array();
var _local2 = _local1.firstChild;
while (_local2 != null) {
if (_local2.nodeName != null) {
var _local3 = new Object();
for (var _local6 in _local2.attributes) {
_local3[_local6] = _local2.attributes[_local6];
}
_local3.id = ItemList.getUID();
_local5.data.push(_local3);
}
_local2 = _local2.nextSibling;
}
_local4.proc = _local5;
break;
case "splashDamage" :
_local4.splash_damage = true;
_local4.splash_on_hit = _local1.attributes.onHit == "true";
_local4.splash_on_despawn = _local1.attributes.onDespawn == "true";
_local4.splash_width = _local1.attributes.width;
_local4.splash_height = _local1.attributes.height;
break;
default :
_local4[_local1.nodeName] = _local1.firstChild.nodeValue;
if (_local1.nodeName == "trailEffect") {
_local4.frame_delay = Number(_local1.attributes.frameDelay);
}
if (_local1.nodeName != "splashEffect") {
break;
}
_local4.despawn_splash_effect = _local1.attributes.onDespawn == "true";
}
}
_local1 = _local1.nextSibling;
}
data.push(_local4);
}
}
static function getId(projectile_name) {
var _local1 = 0;
while (_local1 < data.length) {
if (data[_local1].name == projectile_name) {
return(_local1);
}
_local1++;
}
return(-1);
}
static var is_loaded = false;
}
Symbol 3954 MovieClip [__Packages.QuestList] Frame 0
class QuestList extends Object
{
static var data;
function QuestList () {
super();
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Array();
if (xml_data.nodeName.toLowerCase() == "questlist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "quest")) {
} else {
data.push(extractQuestData(_local1));
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function extractQuestData(xml_data) {
var _local2;
_local2 = new QuestListData();
_local2.requirement = null;
_local2.objective = new Array();
_local2.reward = new Array();
_local2.quest_item = new Array();
if (xml_data.nodeName.toLowerCase() == "quest") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
switch (_local1.nodeName.toLowerCase()) {
case "category" :
_local2.category = _local1.firstChild.nodeValue;
break;
case "name" :
_local2.name = _local1.firstChild.nodeValue;
break;
case "title" :
_local2.title = _local1.firstChild.nodeValue;
break;
case "description" :
_local2.description = _local1.firstChild.nodeValue;
break;
case "goal" :
_local2.goal = _local1.firstChild.nodeValue;
break;
case "progress" :
_local2.progress = _local1.firstChild.nodeValue;
break;
case "complete" :
_local2.complete = _local1.firstChild.nodeValue;
break;
case "requirement" :
_local2.requirement = _local1;
break;
case "objective" :
_local2.objective.push(extractObjective(_local1));
break;
case "questitem" :
_local2.quest_item.push(extractReward(_local1));
break;
case "reward" :
_local2.reward.push(extractReward(_local1));
}
_local1 = _local1.nextSibling;
}
return(_local2);
}
return(null);
}
static function extractObjective(xml_data) {
var _local1;
_local1 = new Object();
_local1.label = xml_data.attributes.label;
_local1.type = xml_data.attributes.type;
_local1.target = xml_data.attributes.target;
_local1.location = xml_data.attributes.location;
_local1.npc_location = xml_data.attributes.npcLocation;
_local1.goal = xml_data.attributes.goal;
return(_local1);
}
static function extractReward(xml_data) {
var _local1;
_local1 = new Object();
_local1.name = xml_data.attributes.name;
_local1.type = xml_data.attributes.type;
_local1.value = xml_data.attributes.value;
return(_local1);
}
static function getId(quest_name) {
var _local1 = 0;
while (_local1 < data.length) {
if (data[_local1].name == quest_name) {
return(_local1);
}
_local1++;
}
return(-1);
}
static var is_loaded = false;
}
Symbol 3955 MovieClip [__Packages.NPCList] Frame 0
class NPCList extends Object
{
static var data;
function NPCList () {
super();
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Array();
if (xml_data.nodeName.toLowerCase() == "npclist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "npc")) {
} else {
data.push(extractNPCData(_local1));
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function extractNPCData(xml_data) {
var _local1;
_local1 = new NPCListData();
if (xml_data.nodeName.toLowerCase() == "npc") {
_local1.name = xml_data.attributes.name;
DebugWindow.debug("DEBUG : Loading NPC " + _local1.name);
_local1.display_name = xml_data.attributes.dispName;
_local1.portrait = xml_data.attributes.portrait;
_local1.is_elite = xml_data.attributes.isElite == "true";
_local1.profile = xml_data.attributes.profile;
_local1.level = Number(xml_data.attributes.level);
_local1.level_variation = Number(xml_data.attributes.levelVar);
_local1.movieclip_id = xml_data.attributes.id;
_local1.experience = Number(xml_data.attributes.exp);
_local1.gravity_bound = xml_data.attributes.gravityBound == "true";
_local1.trigger_list = new Array();
_local1.tinted = false;
_local1.hue = 0;
_local1.saturation = 0;
_local1.brightness = 0;
_local1.contrast = 0;
_local1.alpha = 100;
if (xml_data.attributes.hue != null) {
_local1.tinted = true;
_local1.hue = Number(xml_data.attributes.hue);
}
if (xml_data.attributes.saturation != null) {
_local1.tinted = true;
_local1.saturation = Number(xml_data.attributes.saturation);
}
if (xml_data.attributes.brightness != null) {
_local1.tinted = true;
_local1.brightness = Number(xml_data.attributes.brightness);
}
if (xml_data.attributes.contrast != null) {
_local1.tinted = true;
_local1.contrast = Number(xml_data.attributes.contrast);
}
if (xml_data.attributes.alpha != null) {
_local1.tinted = true;
_local1.alpha = Number(xml_data.attributes.alpha);
}
var _local2 = xml_data.firstChild;
while (_local2 != null) {
switch (_local2.nodeName.toLowerCase()) {
case "identity" :
_local1.identity = new Identity(_local2);
break;
case "stateactiontable" :
_local1.state_action_table = extractActionTable(_local1.name, _local2);
break;
case "greetings" :
_local1.greetings = _local2.firstChild.nodeValue;
break;
case "dialoglist" :
_local1.dialog_list = extractDialogList(_local2);
break;
case "patternlist" :
_local1.pattern_list = extractPatternList(_local1.trigger_list, _local2);
break;
case "droptable" :
_local1.drop_table = extractDropTable(_local2);
break;
case "questlist" :
_local1.quest_list = extractQuestList(_local2);
break;
case "equipment" :
_local1.equip_list = extractEquipList(_local2);
break;
case "vendorlist" :
_local1.selling_price = Number(_local2.attributes.sellingPrice);
_local1.purchase_price = Number(_local2.attributes.purchasePrice);
_local1.vendor_list = extractVendorList(_local2);
}
_local2 = _local2.nextSibling;
}
return(_local1);
}
return(null);
}
static function extractActionTable(npc_name, xml_data) {
var _local6;
_local6 = new Array();
if (xml_data.nodeName.toLowerCase() == "stateactiontable") {
var _local3 = xml_data.firstChild;
while (_local3 != null) {
if (!(_local3.nodeName.toLowerCase() === "state")) {
} else {
var _local4 = new Object();
_local4.state_name = _local3.attributes.name;
_local4.state_faction = _local3.attributes.faction;
if (_local3.attributes.color != null) {
_local4.name_color = _local3.attributes.color;
} else {
_local4.name_color = "FFFF00";
}
_local4.state_action_animation = new Object();
var _local1 = _local3.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "action")) {
} else {
var _local2 = new Object();
_local2.speed_x = 0;
_local2.speed_y = 0;
_local2.multiplier = 1;
_local2.force = 0;
_local2.angle = 0;
_local2.cue_effect = false;
_local2.action_name = _local1.attributes.name;
_local2.animation_type = _local1.attributes.type;
_local2.animation_data = _local1.attributes.anim;
_local2.action_link = _local1.attributes.link;
if (_local1.attributes.speedx != null) {
_local2.speed_x = Number(_local1.attributes.speedx);
}
if (_local1.attributes.speedy != null) {
_local2.speed_y = Number(_local1.attributes.speedy);
}
_local2.target = _local1.attributes.target;
if (_local1.attributes.sound != null) {
_local2.play_sound = true;
SoundManager.loadExternalSound((((npc_name + "_") + _local4.state_name) + "_") + _local2.action_name, _local1.attributes.sound);
} else {
_local2.play_sound = false;
}
_local2.wound_immune = _local1.attributes.woundImmune == "true";
_local2.effect = _local1.attributes.effect;
if (_local1.attributes.cueEffect != null) {
_local2.cue_effect = _local1.attributes.cueEffect == "true";
}
_local2.hit_effect = _local1.attributes.hitEffect;
_local2.special = _local1.attributes.special;
if (_local1.attributes.multiplier != null) {
_local2.multiplier = Number(_local1.attributes.multiplier);
}
if (_local1.attributes.force != null) {
_local2.force = Number(_local1.attributes.force);
}
if (_local1.attributes.angle != null) {
_local2.angle = Number(_local1.attributes.angle);
}
_local4.state_action_animation[_local2.action_name] = _local2;
}
_local1 = _local1.nextSibling;
}
_local6.push(_local4);
}
_local3 = _local3.nextSibling;
}
return(_local6);
}
return(null);
}
static function extractRandomDialog(xml_data) {
var _local3;
_local3 = new Array();
if (xml_data.nodeName.toLowerCase() == "randomtext") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "option")) {
} else {
var _local2 = new Object();
_local2.probability = 0;
if (_local1.attributes.probability != null) {
_local2.probability = Number(_local1.attributes.probability);
}
_local2.dialog = extractDialog(_local1);
_local3.push(_local2);
}
_local1 = _local1.nextSibling;
}
}
return(_local3);
}
static function extractDialog(xml_data) {
var _local3;
_local3 = new Array();
var _local1 = xml_data.firstChild;
while (_local1 != null) {
switch (_local1.nodeName.toLowerCase()) {
case "randomtext" :
var _local2 = new Object();
_local2.is_random_text = true;
_local2.options_list = extractRandomDialog(_local1);
_local3.push(_local2);
break;
case "queuetext" :
_local2 = new Object();
_local2.is_random_text = false;
_local2.text = _local1.firstChild.nodeValue;
_local3.push(_local2);
}
_local1 = _local1.nextSibling;
}
return(_local3);
}
static function extractDialogList(xml_data) {
var _local2;
_local2 = new Object();
if (xml_data.nodeName.toLowerCase() == "dialoglist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (_local1.nodeName.toLowerCase() == "dialog") {
_local2[_local1.attributes.name] = extractDialog(_local1);
}
_local1 = _local1.nextSibling;
}
}
return(_local2);
}
static function extractPatternList(trigger_list, xml_data) {
var _local8;
_local8 = new Array();
if (xml_data.nodeName.toLowerCase() == "patternlist") {
var _local5 = xml_data.firstChild;
while (_local5 != null) {
if (!(_local5.nodeName.toLowerCase() === "pattern")) {
} else {
var _local3 = new Object();
_local3.condition_list = new Array();
_local3.action_list = new Array();
var _local1 = _local5.firstChild;
while (_local1 != null) {
var _local6;
switch (_local1.nodeName.toLowerCase()) {
case "despawnaction" :
_local6 = new Object();
_local6.type = "despawn";
_local3.action_list.push(_local6);
break;
case "objectiveaction" :
_local6 = new Object();
_local6.type = "objective";
_local6.is_random = _local1.attributes.probability != null;
_local6.probability = Number(_local1.attributes.probability);
_local6.name = _local1.attributes.name;
_local3.action_list.push(_local6);
break;
case "triggeraction" :
_local6 = new Object();
_local6.type = "trigger";
_local6.is_random = _local1.attributes.probability != null;
_local6.probability = Number(_local1.attributes.probability);
_local6.faction = _local1.attributes.faction;
_local6.character = _local1.attributes.character;
_local6.see_stealth = _local1.attributes.seeStealth == "true";
_local6.trigger_name = _local1.attributes.name;
_local6.radius = Number(_local1.attributes.radius);
_local3.action_list.push(_local6);
break;
case "targetaction" :
_local6 = new Object();
_local6.type = "target";
_local6.is_random = _local1.attributes.probability != null;
_local6.probability = Number(_local1.attributes.probability);
_local6.faction = _local1.attributes.faction;
_local6.character = _local1.attributes.character;
_local6.see_stealth = _local1.attributes.seeStealth == "true";
_local3.action_list.push(_local6);
break;
case "chataction" :
_local6 = new Object();
_local6.type = "chat";
_local6.is_random = _local1.attributes.probability != null;
_local6.probability = Number(_local1.attributes.probability);
_local6.dialog = _local1.attributes.dialog;
_local3.action_list.push(_local6);
break;
case "equipaction" :
_local6 = new Object();
_local6.type = "equip";
_local6.is_random = _local1.attributes.probability != null;
_local6.probability = Number(_local1.attributes.probability);
_local6.item_type = _local1.attributes.type;
_local6.item_name = _local1.attributes.name;
_local6.item_stack = 1;
if (_local1.attributes.stack != null) {
_local6.item_stack = Number(_local1.attributes.stack);
}
_local3.action_list.push(_local6);
break;
case "queueaction" :
case "randomaction" :
_local6 = new Object();
_local6.duration_variation = 0;
_local6.type = "normal";
_local6.is_random = _local1.nodeName.toLowerCase() == "randomaction";
_local6.probability = Number(_local1.attributes.probability);
_local6.action_name = _local1.attributes.name;
if (_local1.attributes.duration == "dialog") {
_local6.duration = NPCTemplate.DURATION_DIALOG;
} else {
_local6.duration = Number(_local1.attributes.duration);
}
if (_local1.attributes.durationVariation != null) {
_local6.duration_variation = Number(_local1.attributes.durationVariation);
}
_local3.action_list.push(_local6);
break;
case "condition" :
var _local2 = new Object();
_local2.type = _local1.attributes.type;
if (_local2.type == "player_requirement") {
var _local4 = _local1.firstChild;
while ((_local4.nodeName != "requirement") && (_local4 != null)) {
_local4 = _local4.nextSibling;
}
_local2.value = _local4;
} else {
_local2.value = _local1.attributes.value;
if (_local2.type == "trigger") {
trigger_list.push(_local2.value);
}
if (((_local2.type == "variable_less_than") || (_local2.type == "variable_greater_than")) || (_local2.type == "variable_equals_to")) {
_local2.name = _local1.attributes.name;
}
_local2.faction = _local1.attributes.faction;
_local2.character = _local1.attributes.character;
_local2.see_stealth = _local1.attributes.seeStealth == "true";
}
_local3.condition_list.push(_local2);
break;
case "setstate" :
_local6 = new Object();
_local6.set_state = _local1.attributes.name;
_local3.action_list.push(_local6);
}
_local1 = _local1.nextSibling;
}
_local8.push(_local3);
}
_local5 = _local5.nextSibling;
}
return(_local8);
}
return(null);
}
static function extractDropTable(xml_data) {
var _local6;
_local6 = new Array();
if (xml_data.nodeName.toLowerCase() == "droptable") {
var _local3 = xml_data.firstChild;
while (_local3 != null) {
switch (_local3.nodeName.toLowerCase()) {
case "coins" :
var _local4;
_local4 = new Object();
_local4.copper_min = Number(_local3.attributes.copperMin);
_local4.copper_var = Number(_local3.attributes.copperVar);
_local4.silver_min = Number(_local3.attributes.silverMin);
_local4.silver_var = Number(_local3.attributes.silverVar);
_local4.gold_min = Number(_local3.attributes.goldMin);
_local4.gold_var = Number(_local3.attributes.goldVar);
_local6.push(_local4);
break;
case "slot" :
var _local5;
_local5 = new Array();
var _local1 = _local3.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "item")) {
} else {
var _local2 = new Object();
_local2.probability = Number(_local1.attributes.probability);
_local2.item_name = _local1.attributes.name;
if (_local1.attributes.quest != null) {
_local2.quest_name = _local1.attributes.quest;
} else {
_local2.quest_name = null;
}
if (_local1.attributes.stack == null) {
_local2.stack = 1;
} else {
_local2.stack = Number(_local1.attributes.stack);
}
if (_local1.attributes.stackVar == null) {
_local2.stack_variation = 0;
} else {
_local2.stack_variation = Number(_local1.attributes.stackVar);
}
_local5.push(_local2);
}
_local1 = _local1.nextSibling;
}
_local6.push(_local5);
}
_local3 = _local3.nextSibling;
}
return(_local6);
}
return(null);
}
static function extractQuestList(xml_data) {
var _local3;
_local3 = new Array();
if (xml_data.nodeName.toLowerCase() == "questlist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "quest")) {
} else {
var _local2 = new Object();
_local2.name = _local1.attributes.name;
_local2.give_only = _local1.attributes.giveOnly == "true";
_local2.complete_only = _local1.attributes.completeOnly == "true";
_local2.check_progress = true;
if (_local1.attributes.checkProgress != null) {
_local2.check_progress = _local1.attributes.checkProgress == "true";
}
_local3.push(_local2);
}
_local1 = _local1.nextSibling;
}
}
return(_local3);
}
static function extractEquipList(xml_data) {
var _local3;
_local3 = new Array();
if (xml_data.nodeName.toLowerCase() == "equipment") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "slot")) {
} else {
var _local2 = new Object();
_local2.slot = _local1.attributes.type;
_local2.name = _local1.attributes.name;
_local2.stack = Number(_local1.attributes.stack);
if (_local1.attributes.stack == null) {
_local2.stack = 1;
}
_local3.push(_local2);
}
_local1 = _local1.nextSibling;
}
}
return(_local3);
}
static function extractVendorList(xml_data) {
var _local3;
_local3 = new Array();
if (xml_data.nodeName.toLowerCase() == "vendorlist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "item")) {
} else {
var _local2 = new Object();
_local2.name = _local1.attributes.name;
_local2.stack = Number(_local1.attributes.stack);
_local3.push(_local2);
}
_local1 = _local1.nextSibling;
}
}
return(_local3);
}
static function getId(npc_name) {
var _local1 = 0;
while (_local1 < data.length) {
if (data[_local1].name == npc_name) {
return(_local1);
}
_local1++;
}
DebugWindow.debug(("ERROR: NPC name " + npc_name) + " is not available");
return(-1);
}
static var is_loaded = false;
}
Symbol 3956 MovieClip [__Packages.ItemInfo] Frame 0
class ItemInfo extends InfoDisplay
{
static var current_item_info;
var y_start;
function ItemInfo () {
super();
current_item_info = this;
y_start = 20;
}
function showItemOnly(item_info, stack, txt, pct) {
super.showItem(item_info, stack, txt, pct);
}
function showItem(item_info, stack, txt, pct) {
super.showItem(item_info, stack, txt, pct);
var _local2 = Equipment.getSlot(item_info.type);
if (((_local2 < Equipment.SLOT_TRINKET) && (PlayerCharacter.current_player.current_equipment.slot[_local2].item_id >= 0)) && (PlayerCharacter.current_player.current_equipment.slot[_local2].stack > 0)) {
EquipInfo.current_equip_info.showItem(ItemList.data[PlayerCharacter.current_player.current_equipment.slot[_local2].item_id]);
}
}
function showNPC(npc) {
super.showNPC(npc);
if (_root.debug_parser_inst.debug_character) {
EquipInfo.current_equip_info.showNPCDetails(npc);
} else {
EquipInfo.current_equip_info.hide();
}
}
function hide() {
super.hide();
EquipInfo.current_equip_info.hide();
}
}
Symbol 3957 MovieClip [__Packages.EquipInfo] Frame 0
class EquipInfo extends InfoDisplay
{
static var current_equip_info;
var y_start, _x;
function EquipInfo () {
super();
current_equip_info = this;
y_start = 40;
}
function showItem(item_info, stack, txt, pct) {
super.showItem(item_info, stack, txt, pct);
_x = (ItemInfo.current_item_info._x + ItemInfo.current_item_info._width) + 6;
}
function showNPCDetails(npc) {
super.showNPCDetails(npc);
_x = (ItemInfo.current_item_info._x + ItemInfo.current_item_info._width) + 6;
}
}
Symbol 3958 MovieClip [__Packages.InventoryToggleButton] Frame 0
class InventoryToggleButton extends ToggleButtonUI
{
static var all_active, all_action;
var toggle_object, _name, button_index, key_binding, tooltip, is_active;
function InventoryToggleButton () {
super();
}
function onLoad() {
all_active = false;
all_action = false;
if (button_list.length >= InventoryUI.MAX_BAGS) {
button_list = new Array();
}
button_list.push(this);
toggle_object = InventoryUI.bag[Number(_name.charAt(_name.length - 1))];
InventoryUI.bag[Number(_name.charAt(_name.length - 1))].toggle_object = this;
SoundManager.loadExternalSound("rummage", "events/rummage.mp3");
super.onLoad();
button_index = button_list.length;
if (button_index == 1) {
key_binding = GameConstants.INVENTORY_UI_BIND;
tooltip = "Main Backpack - B or Shift+B Keys";
} else {
tooltip = "Backpack - Shift+B Keys";
}
}
function updateActiveState() {
super.updateActiveState();
if ((button_index != 1) && (all_action)) {
return(undefined);
}
if (is_active) {
SoundManager.playSound("rummage");
} else {
SoundManager.playSound("rummage");
}
}
function onKeyDown() {
if ((!isNaN(key_binding)) && (Key.isDown(key_binding))) {
if (Key.isDown(GameConstants.INVENTORY_ALL_MODIFIER)) {
all_action = true;
all_active = false;
var _local3 = 0;
while (_local3 < button_list.length) {
if (button_list[_local3].is_active) {
all_active = true;
}
_local3++;
}
all_active = !all_active;
_local3 = 0;
while (_local3 < button_list.length) {
if (button_list[_local3].is_active != all_active) {
button_list[_local3].onRelease();
}
_local3++;
}
all_action = false;
} else {
super.onKeyDown();
}
}
}
static var button_list = new Array();
}
Symbol 3959 MovieClip [__Packages.SaveData] Frame 0
class SaveData extends Object
{
static var disk_in_use;
var player_data, quest_data, inventory_data, portal_data, shortcut_data, is_loaded, equipment_data, pref_data;
function SaveData () {
super();
disk_in_use = false;
player_data = null;
quest_data = null;
inventory_data = null;
portal_data = null;
shortcut_data = null;
is_loaded = false;
if (shared_obj == null) {
shared_obj = SharedObject.getLocal("wowflash");
}
}
function resetDiskData(name) {
shared_obj.data[name] = null;
shared_obj.flush();
}
function loadAvatar() {
if (shared_obj.data.last_avatar != null) {
_global.avatar = shared_obj.data.last_avatar;
}
}
function saveToDisk() {
disk_in_use = true;
var _local4 = PlayerCharacter.current_player;
var _local5 = QuestLogUI.current_log;
savePlayer(_local4);
saveQuests(_local5);
saveInventory(InventoryUI.bag);
savePortal();
saveShortcut();
DebugWindow.debug("DEBUG: Saving game data to " + _global.avatar);
var _local3 = new Object();
_local3.player_data = player_data;
_local3.quest_data = quest_data;
_local3.inventory_data = inventory_data;
_local3.portal_data = portal_data;
_local3.shortcut_data = shortcut_data;
shared_obj.data[_global.avatar] = _local3;
shared_obj.flush();
shared_obj.data.last_avatar = _global.avatar;
if (shared_obj.data[_global.avatar] == null) {
DebugWindow.debug("DEBUG: Saving Failed");
}
disk_in_use = false;
}
function loadFromDisk(name) {
disk_in_use = true;
if (shared_obj.data[name] == null) {
disk_in_use = false;
return(undefined);
}
is_loaded = true;
player_data = shared_obj.data[name].player_data;
quest_data = shared_obj.data[name].quest_data;
inventory_data = shared_obj.data[name].inventory_data;
portal_data = shared_obj.data[name].portal_data;
shortcut_data = shared_obj.data[name].shortcut_data;
var _local3 = PlayerCharacter.current_player;
var _local4 = QuestLogUI.current_log;
if (_local3 != null) {
loadPlayer(_local3);
loadQuests(_local4);
loadInventory(InventoryUI.bag);
loadPortal();
loadShortcut();
}
disk_in_use = false;
}
function savePlayer(player) {
player_data = new Object();
var _local4 = 0;
while (_local4 < PLAYER_SAVE_LIST.length) {
player_data[PLAYER_SAVE_LIST[_local4]] = player[PLAYER_SAVE_LIST[_local4]];
_local4++;
}
player_data.buff_list = new Array();
_local4 = 0;
while (_local4 < player.buff_list.length) {
var _local3 = new Object();
for (var _local5 in player.buff_list[_local4]) {
_local3[_local5] = player.buff_list[_local4][_local5];
}
_local3.sfx = null;
player_data.buff_list.push(_local3);
_local4++;
}
player_data.dynamic_variables = new Array();
for (var _local6 in player.dynamic_variables) {
player_data.dynamic_variables[_local6] = player.dynamic_variables[_local6];
}
equipment_data = new Array();
_local4 = 0;
while (_local4 < player.current_equipment.slot.length) {
equipment_data.push(ItemList.data[player.current_equipment.slot[_local4].item_id].name);
equipment_data.push(player.current_equipment.slot[_local4].stack);
_local4++;
}
player_data.current_equipment = equipment_data;
player_data.current_zone_name = ScrollingZone.current_zone.current_zone_name;
player_data.current_zone_display_name = ScrollingZone.current_zone.display_name;
}
function loadPlayer(player) {
if (player_data == null) {
DebugWindow.debug("ERROR : Attempting to load player data when no data is available");
}
var _local3 = 0;
while (_local3 < PLAYER_SAVE_LIST.length) {
player[PLAYER_SAVE_LIST[_local3]] = player_data[PLAYER_SAVE_LIST[_local3]];
_local3++;
}
_local3 = 0;
while (_local3 < player.buff_list.length) {
player.buff_list[_local3].sfx.removeMovieClip();
_local3++;
}
player.buff_list = new Array();
_local3 = 0;
while (_local3 < player_data.buff_list.length) {
var _local4 = new Object();
for (var _local6 in player_data.buff_list[_local3]) {
_local4[_local6] = player_data.buff_list[_local3][_local6];
}
player.buff_list.push(_local4);
_local3++;
}
player.dynamic_variables = new Array();
for (var _local7 in player_data.dynamic_variables) {
player.dynamic_variables[_local7] = player_data.dynamic_variables[_local7];
}
var _local5 = 0;
_local3 = 0;
while (_local3 < player.current_equipment.slot.length) {
player.current_equipment.slot[_local3].item_id = ItemList.getId(player_data.current_equipment[_local5++]);
player.current_equipment.slot[_local3].stack = player_data.current_equipment[_local5++];
_local3++;
}
QuestLogUI.current_log.updateCollectQuest(InventoryUI.bag, PlayerCharacter.current_player.current_equipment);
player.respawnEffects();
}
function saveShortcut() {
shortcut_data = new Array();
var _local4 = ShortcutBarUI.current_shortcut_bar.shortcut;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = new Object();
_local3.item_id = ItemList.data[_local4[_local2].item_id].name;
_local3.stack = _local4[_local2].stack;
shortcut_data.push(_local3);
_local2++;
}
}
function loadShortcut() {
var _local3 = ShortcutBarUI.current_shortcut_bar.shortcut;
var _local2 = 0;
while (_local2 < shortcut_data.length) {
_local3[_local2].item_id = ItemList.getId(shortcut_data[_local2].item_id);
_local3[_local2].stack = shortcut_data[_local2].stack;
_local2++;
}
ShortcutBarUI.current_shortcut_bar.update();
}
function saveQuests(log) {
quest_data = new Object();
quest_data.active_list = new Array();
var _local5 = 0;
while (_local5 < log.active_list.length) {
var _local4 = new Object();
_local4.name = log.active_list[_local5].data.name;
_local4.objective_progress = new Array();
var _local2 = 0;
while (_local2 < log.active_list[_local5].objective_progress.length) {
_local4.objective_progress.push(log.active_list[_local5].objective_progress[_local2]);
_local2++;
}
quest_data.active_list.push(_local4);
_local5++;
}
quest_data.completed_list = new Array();
_local5 = 0;
while (_local5 < log.completed_list.length) {
quest_data.completed_list.push(log.completed_list[_local5]);
_local5++;
}
}
function loadQuests(log) {
if (quest_data == null) {
DebugWindow.debug("ERROR : Attempting to load quest data when no data is available");
}
log.clear();
log.completed_list = new Array();
var _local2 = 0;
while (_local2 < quest_data.completed_list.length) {
log.completed_list.push(quest_data.completed_list[_local2]);
_local2++;
}
_local2 = 0;
while (_local2 < quest_data.active_list.length) {
log.addQuest(QuestList.data[QuestList.getId(quest_data.active_list[_local2].name)]);
log.active_list[_local2].objective_progress = new Array();
var _local3 = 0;
while (_local3 < quest_data.active_list[_local2].objective_progress.length) {
log.active_list[_local2].objective_progress.push(quest_data.active_list[_local2].objective_progress[_local3]);
_local3++;
}
_local2++;
}
GameEngine.current_engine.displayInfo("");
}
function saveInventory(i_bag) {
inventory_data = new Array();
inventory_data.push(InventoryUI.copper);
var _local3 = 0;
while (_local3 < i_bag.length) {
var _local2 = 0;
while (_local2 < i_bag[_local3].inventory_slot.length) {
inventory_data.push(ItemList.data[i_bag[_local3].inventory_slot[_local2].item_id].name);
inventory_data.push(i_bag[_local3].inventory_slot[_local2].stack);
_local2++;
}
_local3++;
}
}
function loadInventory(i_bag) {
if (inventory_data == null) {
DebugWindow.debug("ERROR : Attempting to load inventory data when no data is available");
}
InventoryUI.copper = inventory_data[0];
InventoryUI.getCoins(0);
var _local5 = 1;
var _local3 = 0;
while (_local3 < i_bag.length) {
var _local2 = 0;
while (_local2 < i_bag[_local3].inventory_slot.length) {
i_bag[_local3].inventory_slot[_local2].item_id = ItemList.getId(inventory_data[_local5++]);
i_bag[_local3].inventory_slot[_local2].stack = inventory_data[_local5++];
i_bag[_local3].inventory_slot[_local2].update();
_local2++;
}
_local3++;
}
QuestLogUI.current_log.updateCollectQuest(InventoryUI.bag, PlayerCharacter.current_player.current_equipment);
}
function savePortal() {
portal_data = new Array(PortalList.data.length);
var _local2 = 0;
while (_local2 < PortalList.data.length) {
portal_data[_local2] = PortalList.data[_local2].activated;
_local2++;
}
}
function loadPortal() {
if (portal_data == null) {
DebugWindow.debug("ERROR : Attempting to load portal data when no data is available");
}
var _local2 = 0;
while (_local2 < PortalList.data.length) {
PortalList.data[_local2].activated = portal_data[_local2];
_local2++;
}
}
function loadPrefs() {
if (shared_obj.data.pref_data == null) {
pref_data = new Object();
pref_data.sfx_checked = true;
pref_data.sfx_value = 100;
pref_data.bgm_checked = true;
pref_data.bgm_value = 100;
pref_data.par_checked = true;
pref_data.par_value = 25;
pref_data.tint_checked = true;
pref_data.weather_checked = true;
pref_data.combat_text_checked = true;
} else {
pref_data = shared_obj.data.pref_data;
}
}
function savePrefs() {
shared_obj.data.pref_data = pref_data;
}
static var shared_obj = null;
static var PLAYER_SAVE_LIST = ["character_name", "character_portrait", "character_class", "global_x", "current_health", "current_mana", "current_level", "current_exp", "next_level_exp", "current_faction", "weapon_name", "weapon_anim_prefix", "projectile_name", "last_saved_zone", "last_saved_spawn", "control_countdown", "control_name"];
}
Symbol 3960 MovieClip [__Packages.GameEngine] Frame 0
class GameEngine extends MovieClip
{
static var current_engine;
var stop, current_zone, game_zone, game_data_ready, first_load, disk_save, nextFrame, start_time, info_text;
function GameEngine () {
super();
current_engine = this;
}
function onLoad() {
(stop());// not popped
current_zone = game_zone;
LoaderUI.current_loader.clear();
game_data_ready = false;
FactionTable.clearData();
ItemList.loadXML(GameConstants.ITEM_LIST_URL);
ProjectileList.loadXML(GameConstants.PROJECTILE_LIST_URL);
NPCList.loadXML(GameConstants.NPC_LIST_URL);
PlayerList.loadXML(GameConstants.PLAYER_LIST_URL);
QuestList.loadXML(GameConstants.QUEST_LIST_URL);
LevelChart.loadXML(GameConstants.LEVEL_CHART_URL);
PortalList.loadXML(GameConstants.PORTAL_LIST_URL);
SpecialEffectList.loadXML(GameConstants.EFFECT_LIST_URL);
LoaderUI.current_loader.addTotal(200);
LoaderUI.current_loader.show();
first_load = true;
disk_save = new SaveData();
disk_save.loadPrefs();
SoundManager.setBGMEnabled(disk_save.pref_data.bgm_checked);
SoundManager.setBGMVolume(disk_save.pref_data.bgm_value);
SoundManager.setSoundEnabled(disk_save.pref_data.sfx_checked);
SoundManager.setSoundVolume(disk_save.pref_data.sfx_value);
SpecialEffect.effect_quality = (disk_save.pref_data.par_checked ? (((disk_save.pref_data.par_value / 100) * 0.8) + 0.2) : 0);
ScrollingStage.weather_enabled = disk_save.pref_data.weather_checked;
ScrollingStage.day_night_enabled = disk_save.pref_data.tint_checked;
ScrollingStage.combat_text_enabled = disk_save.pref_data.combat_text_checked;
}
function onEnterFrame() {
if (game_data_ready && (first_load)) {
first_load = false;
DebugWindow.debug("SYS: Creating new game data");
PlayerCharacter.current_player.current_health = PlayerCharacter.current_player.maximum_health;
PlayerCharacter.current_player.current_mana = PlayerCharacter.current_player.maximum_mana;
PlayerCharacter.current_player.last_saved_zone = ScrollingZone.current_zone.current_zone_name;
PlayerCharacter.current_player.last_saved_spawn = null;
disk_save.loadFromDisk(_global.avatar);
PlayerCharacter.current_player.updateStats();
CharacterUI.current_character_ui.update();
}
if (((((((ProjectileList.is_loaded && (ItemList.is_loaded)) && (PortalList.is_loaded)) && (NPCList.is_loaded)) && (QuestList.is_loaded)) && (LevelChart.is_loaded)) && (first_load)) && (current_zone.loading_zone_name == null)) {
disk_save.loadFromDisk(_global.avatar);
if (disk_save.is_loaded) {
current_zone.loadXML(disk_save.player_data.current_zone_name);
} else {
current_zone.loadXML(GameConstants.DEFAULT_STARTING_ZONE);
}
(nextFrame());// not popped
}
if (game_data_ready) {
NPCSpawnList.current_spawn_list.doRespawn();
ItemSpawnList.current_spawn_list.doRespawn();
MapUI.current_map.update();
}
if ((current_zone.is_loaded && (LoaderUI.current_loader.isLoaded())) && (!game_data_ready)) {
game_data_ready = true;
}
if ((!current_zone.is_loaded) && (game_data_ready)) {
game_data_ready = false;
}
if (((getTimer() - start_time) > 500) && ((getTimer() - start_time) > ((info_text.length * 50) + 500))) {
info_text = "";
}
}
function autoSave() {
if (PlayerCharacter.current_player.isAlive()) {
DebugWindow.debug("SYS: Auto saving");
disk_save.saveToDisk(PlayerCharacter.current_player);
}
}
function displayInfo(txt) {
info_text = txt;
start_time = getTimer();
}
function closeAllWindows() {
SoundManager.setAllowPlayback(false);
var _local1 = 0;
while (_local1 < InventoryUI.bag.length) {
InventoryUI.bag[_local1].toggle_object.setActivate(false);
_local1++;
}
CharacterUI.current_character_ui.toggle_object.setActivate(false);
QuestLogUI.current_log.toggle_object.setActivate(false);
HelpUI.help_win.toggle_object.setActivate(false);
MapUI.current_map.toggle_object.setActivate(false);
PlayerCharacterToggleButton.current_character_ui_toggle.setActivate(false);
VendorUI.current_vendor_ui.hide();
QuestGiverUI.current_giver_ui.hide();
PortalMasterUI.current_portal_master_ui.hide();
SoundManager.setAllowPlayback(true);
}
static var autosave_interval = -1;
}
Symbol 3961 MovieClip [__Packages.LevelChart] Frame 0
class LevelChart extends Object
{
static var data;
function LevelChart () {
super();
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Object();
if (xml_data.nodeName.toLowerCase() == "levelchart") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "class")) {
} else {
data[_local1.attributes.name] = extractLevelData(_local1);
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function extractLevelData(xml_data) {
var _local3 = new Array();
if (xml_data.nodeName.toLowerCase() == "class") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (_local1.nodeName != null) {
var _local2 = new Object();
_local2.armor = Number(_local1.attributes.armor);
_local2.health = Number(_local1.attributes.health);
_local2.mana = Number(_local1.attributes.mana);
_local2.spirit = Number(_local1.attributes.spirit);
_local2.damage = Number(_local1.attributes.damage);
_local2.kill_exp = Number(_local1.attributes.exp);
_local2.exp_to_level = Number(_local1.attributes.expToLevel);
_local3.push(_local2);
}
_local1 = _local1.nextSibling;
}
}
return(_local3);
}
static function getLevelData() {
return(data[PlayerCharacter.current_player.identity.getValue("sys_class")][PlayerCharacter.current_player.current_level - 1]);
}
static function getData(class_name, level_number) {
if (data[class_name][level_number - 1] == null) {
DebugWindow.debug((("ERROR : Level object not found for class " + class_name) + " level ") + level_number);
}
return(data[class_name][level_number - 1]);
}
static var is_loaded = false;
}
Symbol 3962 MovieClip [__Packages.PortalList] Frame 0
class PortalList extends Object
{
static var data;
function PortalList () {
super();
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Array();
if (xml_data.nodeName.toLowerCase() == "portallist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "portal")) {
} else {
var _local2 = new Object();
_local2.zone = _local1.attributes.zone;
_local2.spawn = _local1.attributes.spawn;
_local2.dispName = _local1.attributes.dispName;
_local2.activated = false;
data.push(_local2);
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function getId(zone_name) {
var _local1 = 0;
while (_local1 < data.length) {
if (data[_local1].zone == zone_name) {
return(_local1);
}
_local1++;
}
return(-1);
}
static var is_loaded = false;
}
Symbol 3963 MovieClip [__Packages.SpecialEffectList] Frame 0
class SpecialEffectList extends Object
{
static var data;
function SpecialEffectList () {
super();
}
static function loadXML(file_name) {
XMLManager.loadXML(file_name, extractData);
}
static function extractData(xml_data) {
data = new Array();
if (xml_data.nodeName.toLowerCase() == "effectslist") {
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (!(_local1.nodeName.toLowerCase() === "effect")) {
} else {
extractEffectData(_local1);
}
_local1 = _local1.nextSibling;
}
is_loaded = true;
}
}
static function createRange(min, max) {
var _local1 = new Object();
_local1.min = Number(min);
_local1.max = Number(max);
return(_local1);
}
static function extractEffectData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "effect") {
var _local2 = new Object();
_local2.static_obj_list = new Array();
var _local1 = xml_data.firstChild;
while (_local1 != null) {
if (_local1.nodeName != null) {
switch (_local1.nodeName.toLowerCase()) {
case "name" :
_local2.name = _local1.firstChild.nodeValue;
break;
case "base" :
_local2.base = _local1.firstChild.nodeValue;
break;
case "staticobject" :
var _local4 = new Object();
_local4.spawn_position = _local1.attributes.position;
_local4.name = _local1.firstChild.nodeValue;
_local2.static_obj_list.push(_local4);
break;
case "spawn" :
_local2.spawn_position = _local1.attributes.position;
if (_local2.spawn_position == null) {
_local2.spawn_position = "";
}
_local2.spawn_x = createRange(_local1.attributes.minX, _local1.attributes.maxX);
_local2.spawn_y = createRange(_local1.attributes.minY, _local1.attributes.maxY);
_local2.spawn_amount = createRange(_local1.attributes.minAmount, _local1.attributes.maxAmount);
break;
case "respawn" :
_local2.respawn_position = _local1.attributes.position;
if (_local2.respawn_position == null) {
_local2.respawn_position = "";
}
_local2.respawn_amount = createRange(_local1.attributes.minAmount, _local1.attributes.maxAmount);
_local2.respawn_delay = Number(_local1.attributes.delay);
break;
case "speed" :
case "size" :
case "alpha" :
case "rotate" :
var _local3 = new Object();
_local3.start = createRange(_local1.attributes.startMin, _local1.attributes.startMax);
_local3.change = createRange(_local1.attributes.changeMin, _local1.attributes.changeMax);
_local3.cap = createRange(_local1.attributes.capMin, _local1.attributes.capMax);
_local3.spawn_pattern = _local1.attributes.spawnPattern;
_local3.move_pattern = _local1.attributes.movePattern;
_local3.set_value = _local1.attributes.setValue;
if (_local1.nodeName == "speed") {
_local2.spawn_pattern = _local1.attributes.spawnPattern;
_local2.move_pattern = _local1.attributes.movePattern;
}
_local2[_local1.nodeName] = _local3;
break;
case "sound" :
_local2.sound = _local1.firstChild.nodeValue;
_local2.repeat_sound = _local1.attributes.repeatOnRespawn == "true";
if (_local2.sound != null) {
SoundManager.loadExternalSound(_local2.name + "_effect_sound", _local2.sound);
}
break;
case "tint" :
_local2.tint = _local1.attributes.color;
_local2.tint_amount = Number(_local1.attributes.amount);
break;
case "despawneffect" :
_local2.despawn_effect = _local1.firstChild.nodeValue;
break;
case "lifetime" :
_local2.lifetime = Number(_local1.firstChild.nodeValue);
break;
case "duration" :
if (_local1.firstChild.nodeValue == "infinite") {
_local2.duration = -1;
} else {
_local2.duration = Number(_local1.firstChild.nodeValue);
}
}
}
_local1 = _local1.nextSibling;
}
data.push(_local2);
}
}
static function getId(effect_name) {
var _local1 = 0;
while (_local1 < data.length) {
if (data[_local1].name == effect_name) {
return(_local1);
}
_local1++;
}
return(-1);
}
static var is_loaded = false;
}
Symbol 3964 MovieClip [__Packages.AttachableObject] Frame 0
class AttachableObject extends GameObject
{
var is_fading, global_x, _x, global_y, _y, inactive, attach_obj, attach_x, attach_y, _alpha, stop, removeMovieClip;
function AttachableObject () {
super();
is_fading = false;
}
function initialize() {
global_x = _x + ScrollingStage.current_stage.pan_x;
global_y = _y;
inactive = true;
if (attach_obj != null) {
attach_x = _x - attach_obj._x;
attach_y = _y - attach_obj._y;
}
}
function onEnterFrame() {
syncCoordinates();
if (is_fading) {
_alpha = _alpha - 20;
if (_alpha <= 0) {
(stop());// not popped
removeMovieClip();
}
}
}
function syncCoordinates() {
if (attach_obj != null) {
_x = attach_obj._x + attach_x;
_y = attach_obj._y + attach_y;
} else {
super.syncCoordinates();
}
}
function startFade() {
is_fading = true;
}
}
Symbol 3965 MovieClip [__Packages.SpecialEffect] Frame 0
class SpecialEffect extends AttachableObject
{
var getNextHighestDepth, attachMovie, data, adjust_x, adjust_y, particle, half_height, half_width, _width, _x, start_time, spawn_time, _y;
function SpecialEffect () {
super();
}
function getRange(range_obj) {
return(Math.floor(Math.random() * (range_obj.max - range_obj.min)) + range_obj.min);
}
function getAngle(new_particle, pattern) {
switch (pattern) {
case "starburst" :
default :
return(Math.atan2(new_particle._y, new_particle._x));
case "side" :
return(((new_particle._x > 0) ? 0 : Math.PI));
case "rising" :
return(-1.5707963267949);
case "implode" :
return(Math.atan2(new_particle._y, new_particle._x) + Math.PI);
case "falling" :
return((Math.PI/2));
case "wave" :
}
return(0);
}
function createParameter(start_range, curr, chg, cap, set_value) {
var _local1 = new Object();
_local1.start_range = start_range;
_local1.curr = curr;
_local1.chg = chg;
_local1.cap = cap;
_local1.set_value = set_value;
return(_local1);
}
function setParamValue(param, particle) {
if (param.set_value != null) {
var _local1 = particle["param_" + param.set_value];
var _local3 = (_local1.curr - _local1.start_range.min) / (_local1.start_range.max - _local1.start_range.min);
param.curr = param.start_range.min + ((param.start_range.max - param.start_range.min) * _local3);
}
}
function changeParameter(param) {
param.curr = param.curr + param.chg;
if ((!isNaN(param.cap.min)) && (param.curr < param.cap.min)) {
param.curr = param.cap.min;
}
if ((!isNaN(param.cap.max)) && (param.curr > param.cap.max)) {
param.curr = param.cap.max;
}
}
function createParticle() {
var _local4 = getNextHighestDepth();
var _local2 = attachMovie(data.base, "particle_" + _local4, _local4);
_local2._x = getRange(data.spawn_x) + adjust_x;
_local2._y = getRange(data.spawn_y) + adjust_y;
_local2.param_speed = createParameter(data.speed.start, getRange(data.speed.start), getRange(data.speed.change), data.speed.cap, data.speed.set_value);
_local2.param_alpha = createParameter(data.alpha.start, getRange(data.alpha.start), getRange(data.alpha.change), data.alpha.cap, data.alpha.set_value);
_local2.param_size = createParameter(data.size.start, getRange(data.size.start), getRange(data.size.change), data.size.cap, data.size.set_value);
_local2.param_rotate = createParameter(data.rotate.start, getRange(data.rotate.start), getRange(data.rotate.change), data.rotate.cap, data.rotate.set_value);
setParamValue(_local2.param_speed, _local2);
setParamValue(_local2.param_alpha, _local2);
setParamValue(_local2.param_size, _local2);
setParamValue(_local2.param_rotate, _local2);
_local2._alpha = _local2.param_alpha.curr;
_local2._xscale = _local2.param_size.curr;
_local2._yscale = _local2.param_size.curr;
if (data.lifetime != null) {
_local2.lifetime = data.lifetime;
_local2.start_time = getTimer();
}
if (!(data.rotate.spawn_pattern === "starburst")) {
} else {
_local2.param_rotate.curr = (Math.atan2(_local2._y, _local2._x) / Math.PI) * 180;
}
_local2._rotation = _local2.param_rotate.curr;
var _local3;
_local3 = getAngle(_local2, data.spawn_pattern);
_local2.xv = Math.cos(_local3) * _local2.param_speed.curr;
_local2.yv = Math.sin(_local3) * _local2.param_speed.curr;
_local3 = getAngle(_local2, data.move_pattern);
_local2.xa = Math.cos(_local3) * _local2.param_speed.chg;
_local2.ya = Math.sin(_local3) * _local2.param_speed.chg;
particle.push(_local2);
}
function setPositionAdjustment(position_type) {
adjust_x = 0;
adjust_y = 0;
if (position_type.toLowerCase().indexOf("top") >= 0) {
adjust_y = adjust_y - half_height;
} else if (position_type.toLowerCase().indexOf("bottom") >= 0) {
adjust_y = adjust_y + half_height;
}
if (position_type.toLowerCase().indexOf("left") >= 0) {
adjust_y = adjust_y - half_width;
} else if (position_type.toLowerCase().indexOf("right") >= 0) {
adjust_y = adjust_y + half_width;
}
}
function initialize(half_w, half_h) {
particle = new Array();
half_width = half_w;
half_height = half_h;
var _local5 = 0;
while (_local5 < data.static_obj_list.length) {
var _local3 = getNextHighestDepth();
var _local4 = attachMovie(data.static_obj_list[_local5].name, "particle_" + _local3, _local3);
setPositionAdjustment(data.static_obj_list[_local5].spawn_position);
_local4._x = adjust_x;
_local4._y = adjust_y;
_local5++;
}
super.initialize();
setPositionAdjustment(data.spawn_position);
var _local6 = getRange(data.spawn_amount) * effect_quality;
_local5 = 0;
while (_local5 < _local6) {
createParticle();
_local5++;
}
setPositionAdjustment(data.respawn_position);
if (data.sound != null) {
if ((_x > (-_width)) && (_x < (GameConstants.SCREEN_WIDTH + _width))) {
SoundManager.playSound(data.name + "_effect_sound");
}
}
start_time = getTimer();
spawn_time = getTimer();
}
function onEnterFrame() {
var _local3 = 0;
while (_local3 < particle.length) {
changeParameter(particle[_local3].param_alpha);
changeParameter(particle[_local3].param_size);
changeParameter(particle[_local3].param_rotate);
setParamValue(particle[_local3].param_speed, particle[_local3]);
setParamValue(particle[_local3].param_alpha, particle[_local3]);
setParamValue(particle[_local3].param_size, particle[_local3]);
setParamValue(particle[_local3].param_rotate, particle[_local3]);
particle[_local3]._x = particle[_local3]._x + particle[_local3].xv;
particle[_local3]._y = particle[_local3]._y + particle[_local3].yv;
if (data.move_pattern == "wave") {
if (particle[_local3].count == null) {
particle[_local3].count = 0;
}
particle[_local3]._x = particle[_local3]._x + ((particle[_local3].yv / 2) * Math.sin(particle[_local3].count));
particle[_local3]._y = particle[_local3]._y + (((-particle[_local3].xv) / 2) * Math.sin(particle[_local3].count));
particle[_local3].count = particle[_local3].count + ((Math.PI/180) * particle[_local3].xa);
} else {
particle[_local3].xv = particle[_local3].xv + particle[_local3].xa;
particle[_local3].yv = particle[_local3].yv + particle[_local3].ya;
}
particle[_local3]._alpha = particle[_local3].param_alpha.curr;
particle[_local3]._xscale = particle[_local3].param_size.curr;
particle[_local3]._yscale = particle[_local3].param_size.curr;
particle[_local3]._rotation = particle[_local3].param_rotate.curr;
if ((particle[_local3].lifetime != null) && ((getTimer() - particle[_local3].start_time) > particle[_local3].lifetime)) {
particle[_local3].removeMovieClip();
particle.splice(_local3, 1);
_local3--;
}
_local3++;
}
if ((!isNaN(data.respawn_delay)) && ((getTimer() - spawn_time) > data.respawn_delay)) {
if ((data.sound != null) && (data.repeat_sound)) {
SoundManager.playSound(data.name + "_effect_sound");
}
spawn_time = getTimer();
var _local4 = getRange(data.respawn_amount) * effect_quality;
_local3 = 0;
while (_local3 < _local4) {
createParticle();
_local3++;
}
}
if ((data.duration >= 0) && ((getTimer() - start_time) > data.duration)) {
startFade();
}
super.onEnterFrame();
}
function startFade() {
super.startFade();
if (data.despawn_effect != null) {
ScrollingStage.current_stage.spawnEffect(_x, _y, half_width, half_height, data.despawn_effect, null);
}
}
static var effect_quality = 1;
}
Symbol 3966 MovieClip [__Packages.MapUI] Frame 0
class MapUI extends WindowUI
{
static var current_map;
var next_depth, filter_array, object_loader_handler, object_loader, _visible, obj_list, attachMovie, createEmptyMovieClip, tooltip, globalToLocal;
function MapUI () {
super();
current_map = this;
next_depth = 1;
var _local3 = new ColorMatrix();
_local3.colorize(11171635, 1);
_local3.adjustBrightness(80);
_local3.adjustContrast(1.2);
_local3.setAlpha(0.85);
var _local4 = new flash.filters.GlowFilter(11171635, 50, 5, 5, 1, 3);
filter_array = new Array(_local3.__get__filter(), _local4);
object_loader_handler = new Object();
object_loader_handler.onLoadComplete = function (target_mc, http_status) {
if (http_status == 404) {
DebugWindow.debug("file not found error");
return(undefined);
}
};
object_loader_handler.onLoadInit = function (target_mc) {
LoaderUI.current_loader.addProgress(10);
target_mc.filters = MapUI.current_map.filter_array;
};
object_loader = new MovieClipLoader();
object_loader.addListener(object_loader_handler);
}
function onLoad() {
super.onLoad();
}
function show() {
update();
_visible = true;
}
function clearObjects() {
if (obj_list != null) {
var _local2 = 0;
while (_local2 < obj_list.length) {
obj_list[_local2].targ.removeMovieClip();
_local2++;
}
}
obj_list = new Array();
next_depth = 1;
}
function createObject(x, type, src) {
var _local3 = new Object();
_local3.type = type;
var _local4 = next_depth;
next_depth++;
if (type != "static") {
_local3.targ = attachMovie("map_" + type, "map_plot_inst" + _local4, _local4);
} else {
_local3.targ = createEmptyMovieClip("map_plot_inst" + _local4, _local4);
}
switch (type) {
case "player" :
_local3.src = PlayerCharacter.current_player;
break;
case "portal" :
case "quest" :
case "vendor" :
case "generic" :
_local3.src = src;
break;
case "static" :
object_loader.loadClip(_global.swf_url + src, _local3.targ);
LoaderUI.current_loader.addTotal(10);
_local3.x = x;
}
obj_list.push(_local3);
return(_local3.targ);
}
function update() {
tooltip._visible = false;
var _local4 = 0;
while (_local4 < obj_list.length) {
switch (obj_list[_local4].type) {
case "player" :
if (obj_list[_local4].src.facing_left && (obj_list[_local4].targ._xscale < 0)) {
obj_list[_local4].targ._xscale = -obj_list[_local4].targ._xscale;
} else if ((!obj_list[_local4].src.facing_left) && (obj_list[_local4].targ._xscale > 0)) {
obj_list[_local4].targ._xscale = -obj_list[_local4].targ._xscale;
}
case "portal" :
case "quest" :
case "vendor" :
if (!obj_list[_local4].src.isAlive()) {
obj_list[_local4].targ.removeMovieClip();
obj_list.splice(_local4, 1);
_local4--;
} else if (obj_list[_local4].targ.hitTest(_root._xmouse, _root._ymouse, true)) {
createTooltip(obj_list[_local4].src.character_name);
}
case "generic" :
obj_list[_local4].x = obj_list[_local4].src.global_x;
}
_local4++;
}
_local4 = 0;
while (_local4 < obj_list.length) {
var _local3 = obj_list[_local4].targ;
switch (obj_list[_local4].type) {
case "static" :
_local3._xscale = 10;
_local3._yscale = 10;
_local3._x = ((obj_list[_local4].x / ScrollingStage.current_stage.max_x) * SCROLL_WIDTH) - (_local3._width / 2);
_local3._y = FIXED_Y - _local3._height;
break;
default :
_local3._x = (obj_list[_local4].x / ScrollingStage.current_stage.max_x) * SCROLL_WIDTH;
_local3._y = FIXED_Y - (_local3._height / 2);
}
_local4++;
}
}
function createTooltip(text) {
var _local6 = createEmptyMovieClip("tooltip", 500);
var _local7 = new TextFormat();
_local7.font = "_sans";
_local7.size = 12;
_local7.color = 16777215 /* 0xFFFFFF */;
var _local3 = _local6.createTextField("tooltip_text_inst", 2, 2, 0, 1, 1);
_local3.setNewTextFormat(_local7);
_local3.autoSize = true;
_local3.selectable = false;
_local3.text = text;
var _local8 = _local3._width * 2;
var _local4 = _local6.createEmptyMovieClip("shape_inst", 1);
_local4.lineStyle(1, 16777215);
_local4.beginFill(0, 50);
_local4.moveTo(0, 0);
_local4.lineTo(_local3._width + 4, 0);
_local4.lineTo(_local3._width + 4, _local3._height);
_local4.lineTo(0, _local3._height);
_local4.lineTo(0, 0);
_local4.endFill();
var _local5 = new Object();
_local5.x = _root._xmouse;
_local5.y = _root._ymouse;
if ((_local5.x + _local6._width) > (Stage.width - 5)) {
_local5.x = (Stage.width - 5) - _local6._width;
}
globalToLocal(_local5);
_local6._x = _local5.x;
_local6._y = _local5.y - _local6._height;
}
static var SCROLL_WIDTH = 750;
static var FIXED_Y = 75;
static var FIXED_WIDTH = 25;
static var FIXED_HEIGHT = 25;
}
Symbol 3967 MovieClip [__Packages.ColorMatrix] Frame 0
class ColorMatrix
{
var matrix;
function ColorMatrix (mat) {
if (mat instanceof ColorMatrix) {
matrix = mat.matrix.concat();
} else if (mat instanceof Array) {
matrix = mat.concat();
} else {
reset();
}
}
function reset() {
matrix = IDENTITY.concat();
}
function clone() {
return(new ColorMatrix(matrix));
}
function adjustSaturation(s) {
var _local2 = 1 - s;
var _local5 = _local2 * r_lum;
var _local3 = _local2 * g_lum;
var _local4 = _local2 * b_lum;
var _local7 = Array(_local5 + s, _local3, _local4, 0, 0, _local5, _local3 + s, _local4, 0, 0, _local5, _local3, _local4 + s, 0, 0, 0, 0, 0, 1, 0);
concat(_local7);
}
function adjustContrast(r, g, b) {
g = g || (r);
b = b || (r);
r = r + 1;
g = g + 1;
b = b + 1;
var _local5 = Array(r, 0, 0, 0, 128 * (1 - r), 0, g, 0, 0, 128 * (1 - g), 0, 0, b, 0, 128 * (1 - b), 0, 0, 0, 1, 0);
concat(_local5);
}
function adjustBrightness(r, g, b) {
g = g || (r);
b = b || (r);
var _local4 = Array(1, 0, 0, 0, r, 0, 1, 0, 0, g, 0, 0, 1, 0, b, 0, 0, 0, 1, 0);
concat(_local4);
}
function adjustHue(angle) {
angle = angle * (Math.PI/180);
var _local2 = Math.cos(angle);
var _local3 = Math.sin(angle);
var _local6 = 0.213;
var _local5 = 0.715;
var _local4 = 0.072;
var _local8 = Array((_local6 + (_local2 * (1 - _local6))) + (_local3 * (-_local6)), (_local5 + (_local2 * (-_local5))) + (_local3 * (-_local5)), (_local4 + (_local2 * (-_local4))) + (_local3 * (1 - _local4)), 0, 0, (_local6 + (_local2 * (-_local6))) + (_local3 * 0.143), (_local5 + (_local2 * (1 - _local5))) + (_local3 * 0.14), (_local4 + (_local2 * (-_local4))) + (_local3 * -0.283), 0, 0, (_local6 + (_local2 * (-_local6))) + (_local3 * (-(1 - _local6))), (_local5 + (_local2 * (-_local5))) + (_local3 * _local5), (_local4 + (_local2 * (1 - _local4))) + (_local3 * _local4), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
concat(_local8);
}
function colorize(rgb, amount) {
var _local4 = ((rgb >> 16) & 255) / 255;
var _local6 = ((rgb >> 8) & 255) / 255;
var _local3 = (rgb & 255) / 255;
if (amount == null) {
amount = 1;
}
var _local5 = 1 - amount;
var _local8 = Array(_local5 + ((amount * _local4) * r_lum), (amount * _local4) * g_lum, (amount * _local4) * b_lum, 0, 0, (amount * _local6) * r_lum, _local5 + ((amount * _local6) * g_lum), (amount * _local6) * b_lum, 0, 0, (amount * _local3) * r_lum, (amount * _local3) * g_lum, _local5 + ((amount * _local3) * b_lum), 0, 0, 0, 0, 0, 1, 0);
concat(_local8);
}
function setAlpha(alpha) {
var _local2 = Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, alpha, 0);
concat(_local2);
}
function desaturate() {
var _local2 = Array(r_lum, g_lum, b_lum, 0, 0, r_lum, g_lum, b_lum, 0, 0, r_lum, g_lum, b_lum, 0, 0, 0, 0, 0, 1, 0);
concat(_local2);
}
function invert() {
var _local2 = Array(-1, 0, 0, 0, 255, 0, -1, 0, 0, 255, 0, 0, -1, 0, 255, 0, 0, 0, 1, 0);
concat(_local2);
}
function threshold(t) {
var _local3 = Array(r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, 0, 0, 0, 1, 0);
concat(_local3);
}
function randomize(amount) {
if (amount == null) {
amount = 1;
}
var _local3 = 1 - amount;
var _local10 = _local3 + (amount * (Math.random() - Math.random()));
var _local15 = amount * (Math.random() - Math.random());
var _local12 = amount * (Math.random() - Math.random());
var _local6 = (amount * 255) * (Math.random() - Math.random());
var _local8 = amount * (Math.random() - Math.random());
var _local14 = _local3 + (amount * (Math.random() - Math.random()));
var _local11 = amount * (Math.random() - Math.random());
var _local5 = (amount * 255) * (Math.random() - Math.random());
var _local7 = amount * (Math.random() - Math.random());
var _local13 = amount * (Math.random() - Math.random());
var _local9 = _local3 + (amount * (Math.random() - Math.random()));
var _local4 = (amount * 255) * (Math.random() - Math.random());
var _local16 = Array(_local10, _local15, _local12, 0, _local6, _local8, _local14, _local11, 0, _local5, _local7, _local13, _local9, 0, _local4, 0, 0, 0, 1, 0);
concat(_local16);
}
function setChannels(r, g, b, a) {
var _local3 = (((((r & 1) == 1) ? 1 : 0) + (((r & 2) == 2) ? 1 : 0)) + (((r & 4) == 4) ? 1 : 0)) + (((r & 8) == 8) ? 1 : 0);
if (_local3 > 0) {
_local3 = 1 / _local3;
}
var _local2 = (((((g & 1) == 1) ? 1 : 0) + (((g & 2) == 2) ? 1 : 0)) + (((g & 4) == 4) ? 1 : 0)) + (((g & 8) == 8) ? 1 : 0);
if (_local2 > 0) {
_local2 = 1 / _local2;
}
var _local4 = (((((b & 1) == 1) ? 1 : 0) + (((b & 2) == 2) ? 1 : 0)) + (((b & 4) == 4) ? 1 : 0)) + (((b & 8) == 8) ? 1 : 0);
if (_local4 > 0) {
_local4 = 1 / _local4;
}
var _local5 = (((((a & 1) == 1) ? 1 : 0) + (((a & 2) == 2) ? 1 : 0)) + (((a & 4) == 4) ? 1 : 0)) + (((a & 8) == 8) ? 1 : 0);
if (_local5 > 0) {
_local5 = 1 / _local5;
}
var _local10 = Array((((r & 1) == 1) ? (_local3) : 0), (((r & 2) == 2) ? (_local3) : 0), (((r & 4) == 4) ? (_local3) : 0), (((r & 8) == 8) ? (_local3) : 0), 0, (((g & 1) == 1) ? (_local2) : 0), (((g & 2) == 2) ? (_local2) : 0), (((g & 4) == 4) ? (_local2) : 0), (((g & 8) == 8) ? (_local2) : 0), 0, (((b & 1) == 1) ? (_local4) : 0), (((b & 2) == 2) ? (_local4) : 0), (((b & 4) == 4) ? (_local4) : 0), (((b & 8) == 8) ? (_local4) : 0), 0, (((a & 1) == 1) ? (_local5) : 0), (((a & 2) == 2) ? (_local5) : 0), (((a & 4) == 4) ? (_local5) : 0), (((a & 8) == 8) ? (_local5) : 0), 0);
concat(_local10);
}
function blend(m, amount) {
var _local3 = 1 - amount;
var _local2 = 0;
while (_local2 < 20) {
matrix[_local2] = (_local3 * matrix[_local2]) + (amount * m.matrix[_local2]);
_local2++;
}
}
function concat(mat) {
var _local6 = Array();
var _local3 = 0;
var _local5 = 0;
while (_local5 < 4) {
var _local2 = 0;
while (_local2 < 5) {
_local6[_local3 + _local2] = ((((mat[_local3] * matrix[_local2]) + (mat[_local3 + 1] * matrix[_local2 + 5])) + (mat[_local3 + 2] * matrix[_local2 + 10])) + (mat[_local3 + 3] * matrix[_local2 + 15])) + ((_local2 == 4) ? (mat[_local3 + 4]) : 0);
_local2++;
}
_local3 = _local3 + 5;
_local5++;
}
matrix = _local6;
}
function get filter() {
return(new flash.filters.ColorMatrixFilter(matrix));
}
static var r_lum = 0.212671;
static var g_lum = 0.71516;
static var b_lum = 0.072169;
static var IDENTITY = Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0);
}
Symbol 3968 MovieClip [__Packages.HelpUI] Frame 0
class HelpUI extends WindowUI
{
static var help_win;
var controls1_btn_inst, controls2_btn_inst, interact_btn_inst, keybinds_btn_inst, next_btn_inst, gotoAndStop, current_tab, controls1_tab_inst, controls2_tab_inst, interact_tab_inst, keybinds_tab_inst;
function HelpUI () {
super();
help_win = this;
}
function onLoad() {
var self = this;
switchTo("controls1");
controls1_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.switchTo("controls1");
};
controls2_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.switchTo("controls2");
};
interact_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.switchTo("interact");
};
keybinds_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.switchTo("keybinds");
};
super.onLoad();
next_btn_inst.onRelease = function () {
switch (self.current_tab) {
case "controls1" :
self.switchTo("controls2");
break;
case "controls2" :
self.switchTo("keybinds");
break;
case "keybinds" :
self.switchTo("interact");
break;
case "interact" :
self.switchTo("controls1");
}
SoundManager.playSound("click");
};
}
function switchTo(label) {
(gotoAndStop(label));// not popped
current_tab = label;
controls1_tab_inst._visible = false;
controls2_tab_inst._visible = false;
interact_tab_inst._visible = false;
keybinds_tab_inst._visible = false;
this[label + "_tab_inst"]._visible = true;
}
}
Symbol 3969 MovieClip [__Packages.PlayerCharacterToggleButton] Frame 0
class PlayerCharacterToggleButton extends ToggleButtonUI
{
static var current_character_ui_toggle;
var toggle_object, key_binding, character_portrait_inst, tooltip, is_active;
function PlayerCharacterToggleButton () {
super();
}
function onLoad() {
current_character_ui_toggle = this;
toggle_object = CharacterUI.current_character_ui;
key_binding = GameConstants.CHARACTER_UI_BIND;
character_portrait_inst.gotoAndStop(_global.avatar);
tooltip = "Character Portrait - C Key";
super.onLoad();
}
function updateActiveState() {
CharacterUI.current_character_ui.toggle_object = this;
CharacterUI.current_character_ui.current_character = PlayerCharacter.current_player;
super.updateActiveState();
if (is_active) {
SoundManager.playSound("kachink");
} else {
SoundManager.playSound("kachink");
}
}
}
Symbol 3970 MovieClip [__Packages.PortalMasterUI] Frame 0
class PortalMasterUI extends WindowUI
{
static var current_portal_master_ui;
var portal_scroll, portal_scroll_inst, cancel_button, cancel_button_inst, close_button, close_button_inst, attachMovie, getNextHighestDepth, portrait, _visible, portal_master, hide, createEmptyMovieClip, category_list, current_portal, text_fade_inst, top_clip, zone_list_inst, zone_list_mask;
function PortalMasterUI () {
super();
current_portal_master_ui = this;
}
function onLoad() {
super.onLoad();
SoundManager.loadExternalSound("portal", "events/portal.mp3");
var self = this;
portal_scroll = portal_scroll_inst;
cancel_button = cancel_button_inst;
cancel_button.onRelease = function () {
SoundManager.playSound("click");
self.hide();
};
close_button = close_button_inst;
close_button.onRelease = function () {
SoundManager.playSound("click");
self.hide();
};
}
function show() {
if (!portalDiscovered()) {
SoundManager.playSound("portal");
NPCInfoUI.current_npc_info_ui.info_character.updateSymbol();
} else {
SoundManager.playSound("click");
}
PlayerCharacter.current_player.last_saved_zone = ScrollingZone.current_zone.current_zone_name;
PlayerCharacter.current_player.last_saved_spawn = getPortalSpawn();
attachMovie(NPCInfoUI.current_npc_info_ui.info_character.character_portrait, "portrait", getNextHighestDepth());
portrait.filters = NPCInfoUI.current_npc_info_ui.info_character.getFilterArray();
createPortalUI();
super.show();
}
function onEnterFrame() {
super.onEnterFrame();
if (_visible && (portal_master.inactive)) {
SoundManager.playSound("click");
hide();
}
}
function createPortalUI() {
var _local5 = createEmptyMovieClip("zone_list_inst", 1);
var _local4 = _local5.getNextHighestDepth();
var _local9 = _local5.attachMovie("portal_item", "portal" + _local4, _local4);
_local9._visible = false;
_local9._y = 0;
category_list = new Array();
var _local7;
_local7 = new Object();
_local7.name = "Available";
_local7.list = new Array();
category_list.push(_local7);
_local7 = new Object();
_local7.name = "Not Yet Visited";
_local7.list = new Array();
category_list.push(_local7);
var _local6 = PortalList.data;
_local6.sortOn("dispName");
var _local2 = 0;
while (_local2 < _local6.length) {
var _local8;
if (_local6[_local2].zone == ScrollingZone.current_zone.current_zone_name) {
_local6[_local2].activated = true;
}
if (_local6[_local2].activated) {
_local8 = 0;
} else {
_local8 = 1;
}
_local7 = new Object();
_local7.index = _local2;
_local7.data = _local6[_local2];
category_list[_local8].list.push(_local7);
_local2++;
}
_local2 = 0;
while (_local2 < category_list.length) {
_local4 = _local5.getNextHighestDepth();
category_list[_local2].movie = _local5.attachMovie("portal_category", "portal" + _local4, _local4);
category_list[_local2].movie.index = _local2;
category_list[_local2].movie.setText(category_list[_local2].name);
var _local3 = 0;
while (_local3 < category_list[_local2].list.length) {
_local4 = _local5.getNextHighestDepth();
category_list[_local2].list[_local3].movie = _local5.attachMovie("portal_item", "portal" + _local4, _local4);
category_list[_local2].list[_local3].movie.index = category_list[_local2].list[_local3].index;
category_list[_local2].list[_local3].movie.setText(category_list[_local2].list[_local3].data.dispName);
_local3++;
}
_local2++;
}
category_list[0].movie.switchTo("expanded");
category_list[1].movie.switchTo("collapsed");
showList();
}
function portalDiscovered() {
var _local1 = 0;
while (_local1 < PortalList.data.length) {
if ((PortalList.data[_local1].zone == ScrollingZone.current_zone.current_zone_name) && (PortalList.data[_local1].activated)) {
return(true);
}
_local1++;
}
return(false);
}
function getPortalSpawn() {
var _local1 = 0;
while (_local1 < PortalList.data.length) {
if (PortalList.data[_local1].zone == ScrollingZone.current_zone.current_zone_name) {
return(PortalList.data[_local1].spawn);
}
_local1++;
}
}
function selectPortal(index) {
if (index != -1) {
current_portal = PortalList.data[index];
if (current_portal == PortalList.data[index]) {
if (current_portal.activated && (current_portal.zone != ScrollingZone.current_zone.current_zone_name)) {
hide();
ScrollingZone.current_zone.prepareTransition();
ScrollingZone.current_zone.loadXML(current_portal.zone);
ScrollingZone.current_zone.next_spawn_point = current_portal.spawn;
PlayerCharacter.current_player.last_saved_zone = current_portal.zone;
PlayerCharacter.current_player.last_saved_spawn = current_portal.spawn;
} else {
current_portal = null;
}
} else if (PortalList.data[index].activated && (ScrollingZone.current_zone.current_zone_name != PortalList.data[index].zone)) {
current_portal = PortalList.data[index];
}
}
}
function showList() {
var _local4 = 10;
var _local2 = 0;
while (_local2 < category_list.length) {
category_list[_local2].movie._visible = true;
category_list[_local2].movie._y = _local4;
_local4 = _local4 + 25;
var _local3 = 0;
while (_local3 < category_list[_local2].list.length) {
category_list[_local2].list[_local3].movie._visible = category_list[_local2].movie.expanded;
if (category_list[_local2].movie.expanded) {
category_list[_local2].list[_local3].movie._y = _local4;
_local4 = _local4 + 25;
}
if (current_portal == category_list[_local2].list[_local3].data) {
category_list[_local2].list[_local3].movie.switchTo("selected");
} else if (category_list[_local2].list[_local3].data.activated) {
category_list[_local2].list[_local3].movie.switchTo("not_selected");
} else {
category_list[_local2].list[_local3].movie.switchTo("disabled");
}
if (category_list[_local2].list[_local3].data.zone == ScrollingZone.current_zone.current_zone_name) {
category_list[_local2].list[_local3].movie.setExtraText("(Current Location)");
} else {
category_list[_local2].list[_local3].movie.setExtraText("");
}
_local3++;
}
_local2++;
}
if (text_fade_inst.getDepth() != 3) {
var _local5 = createEmptyMovieClip("top_clip", 3);
text_fade_inst.swapDepths(top_clip);
}
if (PortalList.data.length == 0) {
portal_scroll.source = null;
} else {
portal_scroll.source = zone_list_inst;
portal_scroll.mask = zone_list_mask;
portal_scroll.scroll_scale = 5;
portal_scroll.initialize();
}
}
}
Symbol 3971 MovieClip [__Packages.InfoUI] Frame 0
class InfoUI extends MovieClip
{
var health_bar, health_bar_inst, health_mask, health_mask_inst, mana_bar, mana_bar_inst, mana_mask, mana_mask_inst, elite_frame_inst, name_text, info_character, prev_character, _visible, attachMovie, portrait, health_text, mana_text, level_dot_inst, createEmptyMovieClip, level_dot_replace, npc_char_ui_toggle_inst, npc_char_ui_toggle_replace;
function InfoUI () {
super();
}
function onLoad() {
health_bar = health_bar_inst;
health_mask = health_mask_inst;
mana_bar = mana_bar_inst;
mana_mask = mana_mask_inst;
health_bar.setMask(health_mask);
mana_bar.setMask(mana_mask);
elite_frame_inst._visible = false;
}
function onEnterFrame() {
var _local2 = 100;
var _local3 = 100;
name_text = info_character.character_name;
prev_character = info_character;
if (info_character != null) {
_visible = true;
attachMovie(info_character.character_portrait, "portrait", 1);
elite_frame_inst._visible = info_character.is_elite;
portrait.filters = info_character.getFilterArray();
} else if (info_character == null) {
_visible = false;
}
_local2 = (info_character.current_health / info_character.maximum_health) * 100;
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > 100) {
_local2 = 100;
}
health_mask._xscale = _local2;
health_text = (("HP: " + info_character.current_health) + " / ") + info_character.maximum_health;
_local3 = (info_character.current_mana / info_character.maximum_mana) * 100;
if (_local3 < 0) {
_local3 = 0;
}
if (_local3 > 100) {
_local3 = 100;
}
mana_mask._xscale = _local3;
mana_text = (("MP: " + info_character.current_mana) + " / ") + info_character.maximum_mana;
if (level_dot_inst.getDepth() != 2) {
createEmptyMovieClip("level_dot_replace", 2);
level_dot_inst.swapDepths(level_dot_replace);
}
var _local4 = 1;
level_dot_inst.level_text = info_character.current_level;
if (npc_char_ui_toggle_inst.getDepth() != 3) {
createEmptyMovieClip("npc_char_ui_toggle_replace", 3);
npc_char_ui_toggle_inst.swapDepths(npc_char_ui_toggle_replace);
}
npc_char_ui_toggle_inst.char_ui_text = "?";
npc_char_ui_toggle_inst.tooltip = "Inspect Character";
}
}
Symbol 3972 MovieClip [__Packages.NPCInfoUI] Frame 0
class NPCInfoUI extends InfoUI
{
static var current_npc_info_ui;
var info_character;
function NPCInfoUI () {
super();
}
function onLoad() {
current_npc_info_ui = this;
super.onLoad();
}
function setCharacter(char) {
if (info_character != null) {
resetCharacter(info_character);
}
info_character = char;
info_character.shadow.showPlate();
}
function resetCharacter(char) {
if (info_character == char) {
info_character.shadow.hidePlate();
info_character = null;
}
}
}
Symbol 3973 MovieClip [__Packages.PromptUI] Frame 0
class PromptUI extends WindowUI
{
static var current_prompt;
var cancel_btn_inst, ok_btn_inst, quit_btn_inst, save_btn_inst, prompt_title, prompt_text, return_function, show;
function PromptUI () {
super();
current_prompt = this;
}
function onLoad() {
var self = this;
cancel_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.hide();
self.return_function(false);
};
ok_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.hide();
self.return_function(true);
};
quit_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.hide();
self.return_function(false);
};
save_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.hide();
self.return_function(true);
};
super.onLoad();
}
function openPrompt(title, content, use_ok_cancel, return_function) {
prompt_title = title;
prompt_text = content;
this.return_function = return_function;
quit_btn_inst._visible = !use_ok_cancel;
save_btn_inst._visible = !use_ok_cancel;
show();
}
function swapToTop() {
}
}
Symbol 3974 MovieClip [__Packages.QuitToggleButton] Frame 0
class QuitToggleButton extends ToggleButtonUI
{
static var current_prompt_toggle_obj;
var toggle_object, key_binding, tooltip, is_active;
function QuitToggleButton () {
super();
}
function onLoad() {
current_prompt_toggle_obj = this;
toggle_object = PromptUI.current_prompt;
SoundManager.loadExternalSound("clink", "events/clink.mp3");
super.onLoad();
key_binding = GameConstants.QUIT_UI_BIND;
tooltip = "Save / Quit - ESC Key";
}
function updateActiveState() {
super.updateActiveState();
if (is_active) {
SoundManager.playSound("clink");
PromptUI.current_prompt.openPrompt("Save / Quit", "Do you want to save or quit? Quitting will exit the game without saving.", false, quitResponse);
} else {
SoundManager.playSound("clink");
}
}
function quitResponse(continue_game) {
if (!continue_game) {
FactionTable.clearData();
_root.gotoAndPlay("startup_screen");
} else {
GameEngine.current_engine.autoSave();
current_prompt_toggle_obj.setActivate(false);
}
}
}
Symbol 3975 MovieClip [__Packages.ChatLogUI] Frame 0
class ChatLogUI extends MovieClip
{
static var current_chat_log;
var text_scroll, expanded_inst, expand_btn_inst, gotoAndStop;
function ChatLogUI () {
super();
current_chat_log = this;
text_scroll = 0;
}
function onLoad() {
expanded_inst.chat_text_inst.htmlText = "";
var self = this;
expand_btn_inst.onRelease = function () {
self.switchTo("expanded");
};
expanded_inst.collapse_btn_inst.onRelease = function () {
self.switchTo("collapsed");
};
expanded_inst.up_btn_inst.onPress = function () {
self.text_scroll = -1;
};
expanded_inst.down_btn_inst.onPress = function () {
self.text_scroll = 1;
};
expanded_inst.up_btn_inst.onRollOut = (expanded_inst.up_btn_inst.onRelease = (expanded_inst.up_btn_inst.onReleaseOutside = (expanded_inst.down_btn_inst.onRollOut = (expanded_inst.down_btn_inst.onRelease = (expanded_inst.down_btn_inst.onReleaseOutside = function () {
self.text_scroll = 0;
})))));
switchTo("expanded");
}
function switchTo(name) {
(gotoAndStop(name));// not popped
switch (name) {
case "expanded" :
expand_btn_inst._visible = false;
expanded_inst._visible = true;
expanded_inst.scroll_flash_inst._visible = expanded_inst.chat_text_inst.scroll != expanded_inst.chat_text_inst.maxscroll;
break;
case "collapsed" :
expand_btn_inst._visible = true;
expanded_inst._visible = false;
}
}
function onEnterFrame() {
expanded_inst.chat_text_inst.scroll = expanded_inst.chat_text_inst.scroll + text_scroll;
if (expanded_inst.chat_text_inst.scroll == expanded_inst.chat_text_inst.maxscroll) {
expanded_inst.scroll_flash_inst._visible = false;
}
}
function addText(name, text) {
var _local2;
if (expanded_inst.chat_text_inst.scroll == expanded_inst.chat_text_inst.maxscroll) {
_local2 = true;
expanded_inst.scroll_flash_inst._visible = false;
} else {
_local2 = false;
expanded_inst.scroll_flash_inst._visible = true;
}
expanded_inst.chat_text_inst.htmlText = expanded_inst.chat_text_inst.htmlText + (((("<font color=\"#FFCC66\">" + name) + ":</font> <font color=\"#CCCCCC\">") + text) + "</font><br>");
if (_local2) {
expanded_inst.chat_text_inst.scroll = expanded_inst.chat_text_inst.maxscroll;
}
}
}
Symbol 3976 MovieClip [__Packages.ShortcutItem] Frame 0
class ShortcutItem extends ItemIcon
{
var detect_movement, slot_index, obj, item_id, index, stack, greyout_inst;
function ShortcutItem () {
super();
}
function onLoad() {
super.onLoad();
detect_movement = false;
Mouse.addListener(this);
}
function onMouseMove() {
if (detect_movement) {
ShortcutBarUI.current_shortcut_bar.createDragItem(ShortcutBarUI.current_shortcut_bar.shortcut, slot_index, this);
detect_movement = false;
}
}
function onPress() {
if (!PlayerCharacter.current_player.isAlive()) {
return(undefined);
}
ItemUI.setDragLocation();
detect_movement = true;
}
function onRelease() {
if (detect_movement) {
ShortcutBarUI.current_shortcut_bar.useItem(slot_index);
}
detect_movement = false;
}
function onReleaseOutside() {
detect_movement = false;
}
function update() {
if (obj != null) {
item_id = obj.getArray()[index].item_id;
stack = InventoryUI.findItemCount(obj.getArray()[index].item_id) + PlayerCharacter.current_player.current_equipment.findItemCount(obj.getArray()[index].item_id);
greyout_inst._visible = false;
} else if (item_id == -1) {
greyout_inst._visible = false;
stack = 0;
} else {
greyout_inst._visible = true;
stack = 1;
}
super.update();
}
}
Symbol 3977 MovieClip [__Packages.Projectile] Frame 0
class Projectile extends GameObject
{
var _visible, lifetime, data, speed_x, speed_y, change_speed_x, change_speed_y, damage, damage_variation, force, angle, source_obj, frame_count, gravity_bound, ground_impact, facing_left, _xscale, faction, inactive, hitTest, _x, _y, removeMovieClip, _width, _height, _alpha, global_y;
function Projectile () {
super();
_visible = false;
}
function initialize() {
lifetime = Number(data.lifetime);
speed_x = Number(data.speedx);
speed_y = Number(data.speedy);
change_speed_x = Number(data.changespeedx);
change_speed_y = Number(data.changespeedy);
damage = Number(data.damage);
damage_variation = Number(data.damageVar);
force = Number(data.force);
angle = Number(data.angle);
if (data.spellDamage == "true") {
damage = int(damage * source_obj.cast_boost);
damage_variation = int(damage_variation * source_obj.cast_boost);
}
frame_count = 0;
gravity_bound = data.gravityBound == "true";
ground_impact = data.groundImpact;
if (facing_left) {
speed_x = -speed_x;
change_speed_x = -change_speed_x;
} else {
_xscale = -_xscale;
}
}
function getTargetList() {
var _local3;
switch (data.target) {
case "friendly" :
_local3 = FactionTable.getFriendsList(faction);
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] == source_obj) {
_local3.splice(_local2, 1);
}
_local2++;
}
break;
case "hostile" :
default :
_local3 = FactionTable.getEnemiesList(faction);
}
return(_local3);
}
function onEnterFrame() {
super.onEnterFrame();
speed_x = speed_x + change_speed_x;
speed_y = speed_y + change_speed_y;
if (!inactive) {
var _local4 = getTargetList();
var _local3 = 0;
while (_local3 < _local4.length) {
if ((hitTest(_local4[_local3].body_box) && (_local4[_local3].animation_type != Character.ANIM_TYPE_DODGE)) && (!_local4[_local3].inactive)) {
var _local5;
if ((data.target == "friendly") && ((damage + damage_variation) == 0)) {
_local5 = false;
} else {
_local5 = _local4[_local3].takeDamage(this, damage + int(Math.random() * (damage_variation + 1)), data.spellDamage == "true", data.alwaysHit == "true");
}
if (_local5) {
_local4[_local3].knockBack(this, force, angle);
}
if (_local5 || (data.alwaysHit == "true")) {
if (data.hitEffect != null) {
ScrollingStage.current_stage.spawnCharEffect(data.hitEffect, _local4[_local3], false);
}
if (data.proc != null) {
source_obj.resolveProc(_x, _y, data.proc, _local4[_local3]);
}
if (data.splash_on_hit) {
splashDamage();
}
}
removeMovieClip();
}
_local3++;
}
if (data.trailEffect != null) {
frame_count++;
if (frame_count >= data.frame_delay) {
frame_count = 0;
ScrollingStage.current_stage.spawnEffect(_x, _y, _width / 2, _height / 2, data.trailEffect, null);
}
}
}
lifetime--;
if (lifetime < 10) {
_alpha = lifetime * 10;
}
if (lifetime <= 0) {
despawn();
} else {
_visible = true;
}
}
function hitGroundEvent() {
global_y = ScrollingStage.current_stage.ground_level;
_y = global_y;
change_speed_y = 0;
switch (ground_impact) {
case "bounce" :
speed_y = (-speed_y) * GameConstants.PROJECTILE_BOUNCE_PERCENTAGE;
break;
case "fade" :
if (lifetime > 10) {
lifetime = 10;
}
case "stay" :
speed_y = 0;
break;
default :
despawn();
}
}
function splashDamage() {
if (data.splash_damage && (!inactive)) {
var _local4 = getTargetList();
var _local3 = 0;
while (_local3 < _local4.length) {
var _local5 = _local4[_local3].body_box.getBounds(_root);
if (((((((_x - (Number(data.splash_width) / 2)) < _local5.xMax) && ((_x + (Number(data.splash_width) / 2)) > _local5.xMin)) && ((_y - (Number(data.splash_height) / 2)) < _local5.yMax)) && ((_y + (Number(data.splash_height) / 2)) > _local5.yMin)) && (_local4[_local3].animation_type != Character.ANIM_TYPE_DODGE)) && (!_local4[_local3].inactive)) {
var _local6;
if ((data.target == "friendly") && ((damage + damage_variation) == 0)) {
_local6 = false;
} else {
_local6 = _local4[_local3].takeDamage(this, damage + int(Math.random() * (damage_variation + 1)), data.spellDamage == "true", data.alwaysHit == "true");
}
if (_local6) {
facing_left = _x > _local4[_local3]._x;
_local4[_local3].knockBack(this, force, angle);
}
if (_local6 || (data.alwaysHit == "true")) {
if (data.splashDamageEffect != null) {
ScrollingStage.current_stage.spawnCharEffect(data.splashDamageEffect, _local4[_local3], false);
}
if (data.proc != null) {
source_obj.resolveProc(_x, _y, data.proc, _local4[_local3]);
}
}
}
_local3++;
}
}
}
function despawn() {
if (data.despawn_splash_effect) {
ScrollingStage.current_stage.spawnEffect(_x, _y, _width / 2, _height / 2, data.splashEffect, null);
}
if (data.splash_on_despawn) {
splashDamage();
}
removeMovieClip();
}
}
Symbol 3978 MovieClip [__Packages.PlayerListData] Frame 0
class PlayerListData extends Object
{
function PlayerListData () {
super();
}
}
Symbol 3979 MovieClip [__Packages.ScrollingLayer] Frame 0
class ScrollingLayer extends MovieClip
{
var is_effect_layer, object_list, object_loader_handler, object_loader, layer_name, scroll_speed, tint_list, getNextHighestDepth, looping_background, createEmptyMovieClip, looping_background_file_name, attachMovie, left_effect, right_effect, looping_width;
function ScrollingLayer () {
super();
}
function extractData(xml_data) {
is_effect_layer = false;
object_list = new Array();
object_loader_handler = new Object();
object_loader_handler.onLoadComplete = function (target_mc, http_status) {
if (http_status == 404) {
DebugWindow.debug("file not found error");
return(undefined);
}
};
object_loader_handler.onLoadInit = function (target_mc) {
LoaderUI.current_loader.addProgress(10);
};
object_loader = new MovieClipLoader();
object_loader.addListener(object_loader_handler);
if (xml_data.nodeName.toLowerCase() == "layer") {
layer_name = xml_data.attributes.name;
scroll_speed = Number(xml_data.attributes.speed);
tint_list = new Object();
var _local3 = xml_data.firstChild;
while (_local3 != null) {
switch (_local3.nodeName.toLowerCase()) {
case "tint" :
if (_local3.attributes.noTint == "true") {
var _local4 = new Object();
_local4.no_tint = true;
} else {
var _local4 = new Object();
_local4.no_tint = false;
_local4.tint_color = GameUtil.hex2int(String(_local3.attributes.tintColor));
if (_local3.attributes.maxTint != null) {
_local4.max_tint = Number(_local3.attributes.maxTint);
} else {
_local4.max_tint = 0.6666;
}
}
tint_list[_local3.attributes.name] = _local4;
break;
case "effectlayer" :
is_effect_layer = true;
break;
case "loopingbackground" :
var _local9;
_local9 = Number(_local3.attributes.y);
var _local7 = getNextHighestDepth();
var self = this;
looping_background = createEmptyMovieClip("looping_background" + _local7, _local7);
looping_background._y = _local9;
var looping_background_left_image = looping_background.createEmptyMovieClip("left_image", 1);
var looping_background_right_image = looping_background.createEmptyMovieClip("right_image", 2);
var _local5 = new Object();
_local5.loadCount = 0;
_local5.onLoadComplete = function (target_mc, http_status) {
if (http_status == 404) {
DebugWindow.debug("file not found error");
return(undefined);
}
};
_local5.onLoadInit = function (target_mc) {
LoaderUI.current_loader.addProgress(10);
target_mc.filters = self.getFilterArray();
this.loadCount++;
if (this.loadCount == 2) {
self.looping_width = looping_background_left_image._width;
looping_background_right_image._x = self.looping_width;
}
};
looping_background_file_name = _local3.firstChild.nodeValue;
var _local6 = new MovieClipLoader();
_local6.addListener(_local5);
_local6.loadClip(_global.swf_url + looping_background_file_name, looping_background_left_image);
_local6.loadClip(_global.swf_url + looping_background_file_name, looping_background_right_image);
LoaderUI.current_loader.addTotal(20);
break;
case "playerlayer" :
_local7 = getNextHighestDepth();
var _local8 = ScrollingPlayerLayer(attachMovie("scrolling_player_layer", "layer" + _local7, _local7));
_local8.extractData(_local3);
}
_local3 = _local3.nextSibling;
}
} else {
DebugWindow.debug("layer not found");
}
}
function extractStaticObjectData(xml_data) {
if (xml_data.nodeName.toLowerCase() == "object") {
var _local8 = xml_data.attributes.mapped == "true";
var _local9 = Number(xml_data.attributes.x);
var _local11 = Number(xml_data.attributes.y);
var _local6 = Number(xml_data.attributes.scale);
if (xml_data.attributes.scale == null) {
_local6 = 100;
}
var _local5 = xml_data.firstChild.nodeValue;
var _local3 = new ScrollingObject();
_local3.global_x = _local9;
_local3.global_y = _local11;
_local3.scale = _local6;
_local3.scroll_speed = scroll_speed;
_local3.file_name = _local5;
_local3.mapped = _local8;
var _local7 = getNextHighestDepth();
_local3.instance_link = createEmptyMovieClip("object" + _local7, _local7);
_local3.instance_link.filters = getFilterArray();
var _local10 = _local3.instance_link.createEmptyMovieClip("image", 1);
object_loader.loadClip(_global.swf_url + _local5, _local10);
LoaderUI.current_loader.addTotal(10);
if (_local8) {
var _local12 = MapUI.current_map.createObject(_local9, "static", _local5);
}
object_list.push(_local3);
return(_local3);
}
DebugWindow.debug("object not found");
return(null);
}
function spawnEffects() {
left_effect = ScrollingStage.current_stage.spawnWeatherEffect(this);
right_effect = ScrollingStage.current_stage.spawnWeatherEffect(this);
}
function syncCoordinates() {
var _local3;
_local3 = ScrollingStage.current_stage.pan_x;
_local3 = _local3 * scroll_speed;
looping_background._x = int(-(_local3 % looping_width));
if (is_effect_layer) {
left_effect.data.spawn_x.min = (-looping_width) / 2;
left_effect.data.spawn_x.max = looping_width / 2;
right_effect.data.spawn_x.min = (-looping_width) / 2;
right_effect.data.spawn_x.max = looping_width / 2;
if ((_local3 % (looping_width * 2)) < looping_width) {
left_effect._x = (looping_width * 0.5) + looping_background._x;
right_effect._x = (looping_width * 1.5) + looping_background._x;
} else {
left_effect._x = (looping_width * 1.5) + looping_background._x;
right_effect._x = (looping_width * 0.5) + looping_background._x;
}
left_effect._y = GameConstants.SCREEN_HEIGHT / 2;
right_effect._y = GameConstants.SCREEN_HEIGHT / 2;
}
var _local2 = 0;
while (_local2 < object_list.length) {
object_list[_local2].syncCoordinates();
_local2++;
}
}
function getFilterArray() {
var _local4 = ScrollingStage.current_stage.getTintArray();
if (_local4.length > 0) {
var _local6 = new ColorMatrix();
var _local3 = 0;
while (_local3 < _local4.length) {
if (tint_list[_local4[_local3].name] == null) {
_global.debug((("ERROR : Day/Night tint pattern for time " + _local4[_local3].name) + " not found for layer ") + layer_name);
} else {
var _local5 = tint_list[_local4[_local3].name];
if (!_local5.no_tint) {
_local6.colorize(_local5.tint_color, _local4[_local3].percentage * _local5.max_tint);
}
}
_local3++;
}
return(new Array(_local6.__get__filter()));
}
return(new Array());
}
}
Symbol 3980 MovieClip [__Packages.ScrollingObject] Frame 0
class ScrollingObject extends Object
{
var scroll_speed, global_x, instance_link, scale, global_y;
function ScrollingObject () {
super();
}
function syncCoordinates() {
var _local2;
_local2 = ScrollingStage.current_stage.pan_x;
if (scroll_speed == 0) {
instance_link._x = int(global_x);
} else {
instance_link._x = int((global_x - _local2) * scroll_speed);
}
instance_link._xscale = scale;
instance_link._yscale = scale;
instance_link._y = global_y - instance_link._height;
instance_link.logic_link = this;
}
}
Symbol 3981 MovieClip [__Packages.Shadow] Frame 0
class Shadow extends AttachableObject
{
var lock_alpha, select_plate, attachMovie, name_plate_format, name_plate, _y, _alpha, attach_obj;
function Shadow () {
super();
lock_alpha = false;
}
function createSelectPlate(name) {
if (select_plate != null) {
return(undefined);
}
select_plate = attachMovie("character_select_circle", "select_plate_inst", 2);
select_plate._visible = false;
}
function showPlate() {
select_plate._visible = true;
}
function hidePlate() {
select_plate._visible = false;
}
function setNamePlateColor(color) {
name_plate_format.color = color;
name_plate.setTextFormat(name_plate_format);
var _local2 = new ColorMatrix();
_local2.colorize(color, 1);
select_plate.filters = Array(_local2.__get__filter());
}
function syncCoordinates() {
super.syncCoordinates();
_y = ScrollingStage.current_stage.ground_level;
if (lock_alpha) {
return(undefined);
}
_alpha = Math.max(0, (1 - ((_y - attach_obj.global_y) / DISAPPEAR_HEIGHT)) * 100);
if (attach_obj._alpha < 100) {
_alpha = _alpha * (attach_obj._alpha / 100);
}
}
static var DISAPPEAR_HEIGHT = 250;
}
Symbol 3982 MovieClip [__Packages.QuestLogCollapseButton] Frame 0
class QuestLogCollapseButton extends MovieClip
{
var is_quest_button, expand_button_inst, collapse_button_inst, gotoAndStop, expanded, title_text;
function QuestLogCollapseButton () {
super();
}
function onLoad() {
var self = this;
is_quest_button = false;
expand_button_inst.onRelease = function () {
self.switchTo("expanded");
};
collapse_button_inst.onRelease = function () {
self.switchTo("collapsed");
};
switchTo("expanded");
}
function switchTo(label) {
(gotoAndStop(label));// not popped
switch (label) {
case "collapsed" :
expanded = false;
expand_button_inst._visible = true;
collapse_button_inst._visible = false;
break;
case "expanded" :
expanded = true;
expand_button_inst._visible = false;
collapse_button_inst._visible = true;
}
QuestLogUI.current_log.showLog();
}
function setText(title) {
title_text = title;
}
}
Symbol 3983 MovieClip [__Packages.QuestLogQuestButton] Frame 0
class QuestLogQuestButton extends MovieClip
{
var is_quest_button, label_text, index, gotoAndStop, title_text, complete_text;
function QuestLogQuestButton () {
super();
}
function onLoad() {
var _local2 = this;
is_quest_button = true;
switchTo(label_text);
}
function onRelease() {
QuestLogUI.current_log.showQuest(index);
QuestLogUI.current_log.showLog();
}
function switchTo(label) {
label_text = label;
(gotoAndStop(label));// not popped
}
function setText(title) {
title_text = title;
}
function setComplete(completed) {
if (completed) {
complete_text = "(Complete)";
} else {
complete_text = "";
}
}
}
Symbol 3984 MovieClip [__Packages.ScrollingCombatText] Frame 0
class ScrollingCombatText extends AttachableObject
{
var current_speed, current_distance, color_filter, filters, global_y, _alpha, removeMovieClip;
function ScrollingCombatText () {
super();
}
function onLoad() {
current_speed = SCROLL_START_SPEED;
current_distance = 0;
if (color_filter > 0) {
var _local2 = new ColorMatrix();
_local2.colorize(color_filter, 1);
filters = new Array(_local2.__get__filter());
}
}
function onEnterFrame() {
global_y = global_y - current_speed;
super.onEnterFrame();
current_distance = current_distance + current_speed;
if (current_distance > SCROLL_DISTANCE) {
_alpha = _alpha - 10;
}
if (_alpha <= 0) {
removeMovieClip();
}
if (current_speed < 0) {
current_speed = 0;
}
}
static var SCROLL_START_SPEED = 3;
static var SCROLL_DISTANCE = 15;
}
Symbol 3985 MovieClip [__Packages.CharacterItem] Frame 0
class CharacterItem extends ItemIcon
{
var detect_movement, slot_index, item_id, stack;
function CharacterItem () {
super();
}
function onLoad() {
super.onLoad();
detect_movement = false;
Mouse.addListener(this);
}
function onMouseMove() {
if (CharacterUI.current_character_ui.current_character != PlayerCharacter.current_player) {
return(undefined);
}
if (detect_movement) {
CharacterUI.current_character_ui.selectItem(null, ItemIcon.EMPTY_ID);
CharacterUI.current_character_ui.selectItem(null, slot_index);
CharacterUI.current_character_ui.createDragItem(CharacterUI.current_character_ui.character_slot, slot_index, PlayerCharacter.current_player.current_equipment.slot[slot_index]);
detect_movement = false;
}
}
function onRollOver() {
if (((item_id != null) && (item_id != ItemIcon.EMPTY_ID)) && (stack > 0)) {
ItemInfo.current_item_info.showItemOnly(ItemList.data[item_id]);
}
}
function onPress() {
if (!PlayerCharacter.current_player.isAlive()) {
return(undefined);
}
ItemUI.setDragLocation();
detect_movement = true;
}
function onRelease() {
if (detect_movement) {
CharacterUI.current_character_ui.selectItem(null, slot_index);
}
detect_movement = false;
}
function onReleaseOutside() {
detect_movement = false;
}
function update() {
item_id = CharacterUI.current_character_ui.current_character.current_equipment.slot[slot_index].item_id;
stack = CharacterUI.current_character_ui.current_character.current_equipment.slot[slot_index].stack;
super.update();
}
}
Symbol 3986 MovieClip [__Packages.QuestRewardItem] Frame 0
class QuestRewardItem extends MovieClip
{
var item_id, stack, item_text, item_text_inst, item_icon, item_icon_inst, text_background, text_background_inst;
function QuestRewardItem () {
super();
}
function setItem(item_id, stack) {
this.item_id = item_id;
this.stack = stack;
}
function onLoad() {
update();
}
function update() {
var _local2 = ItemList.data[item_id];
item_text = item_text_inst;
item_icon = item_icon_inst;
item_icon._x = 5;
item_icon._y = 5;
text_background = text_background_inst;
item_text.autoSize = "center";
item_text.wordWrap = true;
item_text.text = _local2.dispName;
var _local3 = item_text._height * 2;
item_text._y = text_background._y + int((text_background._height - item_text._height) / 2);
item_icon.item_id = item_id;
item_icon.stack = stack;
item_icon.update();
}
}
Symbol 3987 MovieClip [__Packages.QuestRewardCoins] Frame 0
class QuestRewardCoins extends MovieClip
{
var createTextField;
function QuestRewardCoins () {
super();
}
function setCopper(copper) {
var _local2 = new TextFormat();
_local2.font = "generic_sans";
_local2.size = 11;
_local2.align = "right";
_local2.color = 16777215 /* 0xFFFFFF */;
var _local4 = createTextField("gold_text_inst", 1, 130, 4, 46, 18);
_local4.setNewTextFormat(_local2);
_local4.embedFonts = true;
_local4.selectable = false;
var _local3 = createTextField("silver_text_inst", 2, 184, 4, 26, 18);
_local3.setNewTextFormat(_local2);
_local3.embedFonts = true;
_local3.selectable = false;
var _local5 = createTextField("copper_text_inst", 3, 218, 4, 26, 18);
_local5.setNewTextFormat(_local2);
_local5.embedFonts = true;
_local5.selectable = false;
_local4.text = int((copper / 100) / 100);
_local3.text = int((copper / 100) % 100);
_local5.text = int(copper % 100);
}
}
Symbol 3988 MovieClip [__Packages.VendorItem] Frame 0
class VendorItem extends ItemIcon
{
var detect_movement, slot_index, item_id, stack, item_text_inst, cost, gold_text, silver_text, copper_text;
function VendorItem () {
super();
}
function onLoad() {
super.onLoad();
detect_movement = false;
Mouse.addListener(this);
}
function onMouseMove() {
if (detect_movement) {
VendorUI.current_vendor_ui.selectItem(null, ItemIcon.EMPTY_ID);
VendorUI.current_vendor_ui.selectItem(null, slot_index);
if (slot_index == VendorUI.BUYBACK_SLOT) {
VendorUI.current_vendor_ui.createDragItem(VendorUI.current_vendor_ui.vendor_slot, slot_index, VendorUI.current_vendor_ui.buyback_slot);
} else {
VendorUI.current_vendor_ui.createDragItem(VendorUI.current_vendor_ui.vendor_slot, slot_index, VendorUI.current_vendor_ui.vendor_slot[slot_index]);
}
detect_movement = false;
}
}
function onPress() {
ItemUI.setDragLocation();
detect_movement = true;
}
function onRelease() {
if (detect_movement) {
VendorUI.current_vendor_ui.selectItem(null, slot_index);
}
detect_movement = false;
}
function onReleaseOutside() {
detect_movement = false;
}
function onRollOver() {
if (((item_id != null) && (item_id != ItemIcon.EMPTY_ID)) && (stack > 0)) {
if (slot_index == VendorUI.BUYBACK_SLOT) {
ItemInfo.current_item_info.showItem(ItemList.data[item_id], stack, "Costs", VendorUI.current_vendor_ui.purchase_price);
} else {
ItemInfo.current_item_info.showItem(ItemList.data[item_id], stack, "Costs", VendorUI.current_vendor_ui.selling_price);
}
}
}
function update() {
super.update();
var _local4 = ItemList.data[item_id];
var _local3 = item_text_inst;
_local3.autoSize = "center";
_local3.wordWrap = true;
_local3.text = _local4.dispName;
gold_text.text = int((cost / 100) / 100);
silver_text.text = int((cost / 100) % 100);
copper_text.text = int(cost % 100);
}
}
Symbol 3989 MovieClip [__Packages.PortalMasterCategory] Frame 0
class PortalMasterCategory extends MovieClip
{
var is_portal_button, expand_button_inst, collapse_button_inst, gotoAndStop, expanded, title_text;
function PortalMasterCategory () {
super();
}
function onLoad() {
var self = this;
is_portal_button = false;
expand_button_inst.onRelease = function () {
self.switchTo("expanded");
};
collapse_button_inst.onRelease = function () {
self.switchTo("collapsed");
};
}
function switchTo(label) {
(gotoAndStop(label));// not popped
switch (label) {
case "collapsed" :
expanded = false;
expand_button_inst._visible = true;
collapse_button_inst._visible = false;
break;
case "expanded" :
expanded = true;
expand_button_inst._visible = false;
collapse_button_inst._visible = true;
}
PortalMasterUI.current_portal_master_ui.showList();
}
function setText(title) {
title_text = title;
}
}
Symbol 3990 MovieClip [__Packages.PortalMasterItem] Frame 0
class PortalMasterItem extends MovieClip
{
var is_portal_button, current_label, index, gotoAndStop, title_text, extra_text;
function PortalMasterItem () {
super();
}
function onLoad() {
var _local2 = this;
is_portal_button = true;
switchTo("not_selected");
}
function onRollOver() {
if (current_label == "not_selected") {
switchTo("selected");
}
}
function onRollOut() {
if (current_label == "selected") {
switchTo("not_selected");
}
}
function onRelease() {
PortalMasterUI.current_portal_master_ui.selectPortal(index);
PortalMasterUI.current_portal_master_ui.showList();
}
function switchTo(label) {
current_label = label;
(gotoAndStop(label));// not popped
}
function setText(title) {
title_text = title;
}
function setExtraText(text) {
extra_text = text;
}
}
Symbol 3991 MovieClip [__Packages.ChatBubble] Frame 0
class ChatBubble extends AttachableObject
{
var chat_color, attach_obj, chat_text, chat_text_inst, chat_bubble_inst, chat_nub_inst, _x, _width, _y, _height, start_time, is_fading, _alpha;
function ChatBubble () {
super();
chat_color = -1;
}
function textSubstitution(original) {
while (original.indexOf("[name]") >= 0) {
var _local3 = original.indexOf("[name]");
original = (original.substr(0, _local3) + PlayerCharacter.current_player.character_name) + original.substring(_local3 + 6, original.length);
}
var _local4;
if (attach_obj.target_character != null) {
_local4 = attach_obj.target_character.character_name;
} else {
_local4 = GameConstants.DEFAULT_TARGET_NAME;
}
while (original.indexOf("[target]") >= 0) {
var _local3 = original.indexOf("[target]");
original = (original.substr(0, _local3) + _local4) + original.substring(_local3 + 8, original.length);
}
return(original);
}
function getChatText() {
return(chat_text);
}
function initialize() {
super.initialize();
chat_text = textSubstitution(chat_text);
chat_text_inst.wordWrap = true;
chat_text_inst.autoSize = true;
var _local3 = chat_text_inst._height * 2;
_local3 = chat_text_inst._width * 2;
if (chat_text_inst._height > 80) {
chat_text_inst._width = chat_text_inst._width * 2;
_local3 = chat_text_inst._width * 2;
_local3 = chat_text_inst._height * 2;
}
chat_bubble_inst._width = chat_text_inst._width + 10;
chat_bubble_inst._height = (chat_text_inst._height + 10) + 12;
chat_nub_inst._y = chat_bubble_inst._height;
if (chat_color != -1) {
var _local4 = chat_text_inst.getTextFormat();
_local4.color = chat_color;
chat_text_inst.setNewTextFormat(_local4);
}
_x = _x - (_width / 2);
_y = _y - _height;
super.initialize();
start_time = getTimer();
}
function onEnterFrame() {
if (((getTimer() - start_time) > 500) && ((getTimer() - start_time) > (500 + (chat_text.length * 100)))) {
is_fading = true;
}
if (is_fading && (_alpha <= 20)) {
attach_obj.nextDialog();
}
super.onEnterFrame();
}
}
Symbol 3992 MovieClip [__Packages.WeatherEffect] Frame 0
class WeatherEffect extends SpecialEffect
{
function WeatherEffect () {
super();
}
function syncCoordinates() {
}
}
Symbol 3993 MovieClip [__Packages.QuestSelection] Frame 0
class QuestSelection extends MovieClip
{
var mouseover_inst, title_text, quest_obj, quest_status, gotoAndStop, quest_giver;
function QuestSelection () {
super();
mouseover_inst._visible = false;
}
function initialize() {
title_text = quest_obj.data.title;
quest_status = quest_obj.getQuestState();
(gotoAndStop(quest_status));// not popped
}
function onRollOver() {
mouseover_inst._visible = true;
}
function onRollOut() {
mouseover_inst._visible = false;
}
function onRelease() {
QuestGiverUI.current_giver_ui.active_quest_obj = quest_obj;
QuestGiverUI.current_giver_ui.quest_giver = quest_giver;
QuestGiverUI.current_giver_ui.switchTo(quest_status);
}
}
Symbol 3994 MovieClip [__Packages.FPSCounter] Frame 0
class FPSCounter extends MovieClip
{
var frame_count, frame_start_time, fps_label, x_label;
function FPSCounter () {
super();
}
function onLoad() {
frame_count = 0;
frame_start_time = getTimer();
}
function onEnterFrame() {
frame_count++;
if (frame_count >= FRAMES_PER_UPDATE) {
var _local3 = getTimer() - frame_start_time;
var _local2 = 10 / ((getTimer() - frame_start_time) / 1000);
_local2 = int(_local2 * 100) / 100;
fps_label.text = "fps: " + _local2;
frame_start_time = getTimer();
frame_count = 0;
}
x_label.text = "x_loc: " + int(PlayerCharacter.current_player.global_x);
}
static var MOVIE_FPS = 30;
static var FRAMES_PER_UPDATE = 10;
}
Symbol 3995 MovieClip [__Packages.DebugParser] Frame 0
class DebugParser
{
var debug_character, auto_shut;
function DebugParser () {
debug_character = false;
auto_shut = true;
}
function cleanUp(inp) {
DebugWindow.debug(("PARSER : " + inp) + " done");
DebugWindow.prompt.text = "";
if (!auto_shut) {
return(undefined);
}
DebugWindow.hide();
}
function getList(obj, search) {
var _local4 = "";
var _local1 = 0;
while (_local1 < obj.length) {
if ((search == null) || (obj[_local1].name.indexOf(search) >= 0)) {
_local4 = _local4 + (obj[_local1].name + newline);
}
_local1++;
}
return(_local4);
}
function process(inp) {
var _local12 = inp.split(" ");
var _local15 = _local12[0];
var _local7 = _local12[1];
var _local4 = _local12[2];
var _local11 = _local12[3];
var _local8;
switch (_local15) {
case "cls" :
DebugWindow.clearScreen();
cleanUp(inp);
break;
case "help" :
case "?" :
var _local10 = "PARSER : Command list\r";
_local10 = _local10 + "give copper [num]\r";
_local10 = _local10 + "give exp [num]\r";
_local10 = _local10 + "give speed [num]\r";
_local10 = _local10 + "give x [num/name]\r";
_local10 = _local10 + "give item [name] [num]\r";
_local10 = _local10 + "give quest [name]\r";
_local10 = _local10 + "cleanse\r";
_local10 = _local10 + "god [on/off]\r";
_local10 = _local10 + "stealth [on/off]\r";
_local10 = _local10 + "details [on/off]\r";
_local10 = _local10 + "autoshut [on/off]\r";
_local10 = _local10 + "fps [on/off]\r";
_local10 = _local10 + "trigger [name] [faction]\r";
_local10 = _local10 + "spawn npc [name]\r";
_local10 = _local10 + "spawn sfx [name]\r";
_local10 = _local10 + "spawn item [name] [num]\r";
_local10 = _local10 + "teleport [filename]\r";
_local10 = _local10 + "find npc [keyword]\r";
_local10 = _local10 + "find sfx [keyword]\r";
_local10 = _local10 + "find item [keyword]\r";
_local10 = _local10 + "find quest [keyword]\r";
_local10 = _local10 + "cls";
DebugWindow.debug(_local10);
var _local14 = auto_shut;
auto_shut = false;
cleanUp(inp);
auto_shut = _local14;
break;
case "give" :
switch (_local7) {
case "copper" :
if (isNaN(Number(_local4))) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal number");
break;
}
InventoryUI.getCoins(Number(_local4));
cleanUp(inp);
break;
case "exp" :
if (isNaN(Number(_local4))) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal number");
} else {
PlayerCharacter.current_player.gainExp(Number(_local4));
cleanUp(inp);
break;
if (isNaN(Number(_local4))) {
_local8 = FactionTable.getClosestCharacter(PlayerCharacter.current_player, _local4);
if (_local8 != null) {
PlayerCharacter.current_player.global_x = _local8.global_x;
} else {
DebugWindow.debug(("PARSER : " + _local4) + " not a number and no character found");
}
cleanUp(inp);
} else {
PlayerCharacter.current_player.global_x = Number(_local4);
cleanUp(inp);
}
break;
if (ItemList.getId(_local4) == -1) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal item name");
} else {
if (isNaN(Number(_local11))) {
InventoryUI.getItem(ItemList.getId(_local4), 1);
} else {
InventoryUI.getItem(ItemList.getId(_local4), Number(_local11));
}
cleanUp(inp);
break;
if (isNaN(Number(_local4))) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal number");
} else {
PlayerCharacter.current_player.move_speed = Number(_local4);
cleanUp(inp);
break;
if (QuestList.getId(_local4) == -1) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal quest name");
} else {
var _local13 = new Array(_local4);
var _local9;
_local9 = QuestLogUI.current_log.getCompletedQuest(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
cleanUp(inp);
} else {
_local9 = QuestLogUI.current_log.getQuestManager(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
cleanUp(inp);
} else if ((_local11 == "complete") || (_local11 == "progress")) {
_local9 = QuestLogUI.current_log.getQuestLogQuest(_local4);
if (_local9 == null) {
DebugWindow.debug(("PARSER : " + _local4) + " not in quest log");
break;
}
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
if (_local11 == "complete") {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
} else {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
}
cleanUp(inp);
} else {
_local9 = new QuestManager();
_local9.data = QuestList.data[QuestList.getId(_local4)];
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_AVAILABLE);
cleanUp(inp);
}
}
}
}
}
}
case "x" :
if (isNaN(Number(_local4))) {
_local8 = FactionTable.getClosestCharacter(PlayerCharacter.current_player, _local4);
if (_local8 != null) {
PlayerCharacter.current_player.global_x = _local8.global_x;
} else {
DebugWindow.debug(("PARSER : " + _local4) + " not a number and no character found");
}
cleanUp(inp);
} else {
PlayerCharacter.current_player.global_x = Number(_local4);
cleanUp(inp);
}
break;
case "item" :
if (ItemList.getId(_local4) == -1) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal item name");
} else {
if (isNaN(Number(_local11))) {
InventoryUI.getItem(ItemList.getId(_local4), 1);
} else {
InventoryUI.getItem(ItemList.getId(_local4), Number(_local11));
}
cleanUp(inp);
break;
if (isNaN(Number(_local4))) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal number");
} else {
PlayerCharacter.current_player.move_speed = Number(_local4);
cleanUp(inp);
break;
if (QuestList.getId(_local4) == -1) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal quest name");
} else {
var _local13 = new Array(_local4);
var _local9;
_local9 = QuestLogUI.current_log.getCompletedQuest(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
cleanUp(inp);
} else {
_local9 = QuestLogUI.current_log.getQuestManager(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
cleanUp(inp);
} else if ((_local11 == "complete") || (_local11 == "progress")) {
_local9 = QuestLogUI.current_log.getQuestLogQuest(_local4);
if (_local9 == null) {
DebugWindow.debug(("PARSER : " + _local4) + " not in quest log");
break;
}
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
if (_local11 == "complete") {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
} else {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
}
cleanUp(inp);
} else {
_local9 = new QuestManager();
_local9.data = QuestList.data[QuestList.getId(_local4)];
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_AVAILABLE);
cleanUp(inp);
}
}
}
}
}
case "speed" :
if (isNaN(Number(_local4))) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal number");
} else {
PlayerCharacter.current_player.move_speed = Number(_local4);
cleanUp(inp);
break;
if (QuestList.getId(_local4) == -1) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal quest name");
} else {
var _local13 = new Array(_local4);
var _local9;
_local9 = QuestLogUI.current_log.getCompletedQuest(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
cleanUp(inp);
} else {
_local9 = QuestLogUI.current_log.getQuestManager(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
cleanUp(inp);
} else if ((_local11 == "complete") || (_local11 == "progress")) {
_local9 = QuestLogUI.current_log.getQuestLogQuest(_local4);
if (_local9 == null) {
DebugWindow.debug(("PARSER : " + _local4) + " not in quest log");
break;
}
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
if (_local11 == "complete") {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
} else {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
}
cleanUp(inp);
} else {
_local9 = new QuestManager();
_local9.data = QuestList.data[QuestList.getId(_local4)];
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_AVAILABLE);
cleanUp(inp);
}
}
}
}
case "quest" :
if (QuestList.getId(_local4) == -1) {
DebugWindow.debug(("PARSER : " + _local4) + " not a legal quest name");
} else {
var _local13 = new Array(_local4);
var _local9;
_local9 = QuestLogUI.current_log.getCompletedQuest(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
cleanUp(inp);
} else {
_local9 = QuestLogUI.current_log.getQuestManager(_local13);
if (_local9 != null) {
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
cleanUp(inp);
} else if ((_local11 == "complete") || (_local11 == "progress")) {
_local9 = QuestLogUI.current_log.getQuestLogQuest(_local4);
if (_local9 == null) {
DebugWindow.debug(("PARSER : " + _local4) + " not in quest log");
break;
}
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
if (_local11 == "complete") {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_COMPLETED);
} else {
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_IN_PROGRESS);
}
cleanUp(inp);
} else {
_local9 = new QuestManager();
_local9.data = QuestList.data[QuestList.getId(_local4)];
QuestGiverUI.current_giver_ui.active_quest_obj = _local9;
QuestGiverUI.current_giver_ui.quest_giver = null;
QuestGiverUI.current_giver_ui.switchTo(NPCTemplate.LABEL_QUEST_AVAILABLE);
cleanUp(inp);
}
}
}
}
break;
case "cleanse" :
var _local3 = 0;
while (_local3 < PlayerCharacter.current_player.buff_list.length) {
PlayerCharacter.current_player.buff_list[_local3].duration = 0;
_local3++;
}
break;
case "god" :
PlayerCharacter.current_player.god_mode = _local7 == "on";
cleanUp(inp);
break;
case "stealth" :
if (_local7 == "on") {
PlayerCharacter.current_player.startStealth();
} else {
cleanUp(inp);
}
PlayerCharacter.current_player.endStealth();
break;
case "details" :
debug_character = _local7 == "on";
cleanUp(inp);
break;
case "autoshut" :
auto_shut = _local7 == "on";
cleanUp(inp);
break;
case "fps" :
_root.fps_counter._visible = _local7 == "on";
cleanUp(inp);
break;
case "trigger" :
var _local5 = FactionTable.getListenerFriends(PlayerCharacter.current_player, _local7, 375, _local4);
_local3 = 0;
while (_local3 < _local5.length) {
_local5[_local3].trigger_name = _local7;
_local5[_local3].trigger_source = PlayerCharacter.current_player;
_local5[_local3].setNextPattern();
_local3++;
}
cleanUp(inp);
break;
case "spawn" :
switch (_local7) {
case "npc" :
_local8 = ScrollingStage.current_stage.spawnNPC(NPCList.data[NPCList.getId(_local4)]);
_local8.global_x = PlayerCharacter.current_player.global_x;
_local8.global_y = PlayerCharacter.current_player.global_y;
_local8.initialize();
cleanUp(inp);
break;
case "sfx" :
ScrollingStage.current_stage.spawnCharEffect(_local4, PlayerCharacter.current_player, false);
cleanUp(inp);
break;
case "item" :
if (isNaN(Number(_local11))) {
_local8 = ScrollingStage.current_stage.spawnItem(_local4, 1);
} else {
_local8 = ScrollingStage.current_stage.spawnItem(_local4, Number(_local11));
}
_local8.global_x = PlayerCharacter.current_player.global_x;
_local8.global_y = PlayerCharacter.current_player.global_y;
_local8.speed_x = 0;
_local8.speed_y = 5;
_local8.initialize();
cleanUp(inp);
}
break;
case "teleport" :
ScrollingZone.current_zone.loadZone(_local7 + ".xml", null);
cleanUp(inp);
break;
case "find" :
switch (_local7) {
case "npc" :
_local10 = "PARSER : NPC list\r";
_local10 = _local10 + getList(NPCList.data, _local4);
break;
case "sfx" :
_local10 = "PARSER : Effects list\r";
_local10 = _local10 + getList(SpecialEffectList.data, _local4);
break;
case "item" :
_local10 = "PARSER : Item list\r";
_local10 = _local10 + getList(ItemList.data, _local4);
break;
case "quest" :
_local10 = "PARSER : Quest list\r";
_local10 = _local10 + getList(QuestList.data, _local4);
}
DebugWindow.debug(_local10);
_local14 = auto_shut;
auto_shut = false;
cleanUp(inp);
auto_shut = _local14;
}
}
}
Symbol 3996 MovieClip [__Packages.CustomCheckBox] Frame 0
class CustomCheckBox extends MovieClip
{
var checked, box, box_inst, gotoAndStop;
function CustomCheckBox () {
super();
checked = false;
update();
}
function onLoad() {
var self = this;
box = box_inst;
box.onRelease = function () {
self.checked = !self.checked;
self.update();
self.updateEvent();
SoundManager.playSound("click");
};
}
function update() {
if (checked) {
(gotoAndStop("checked"));// not popped
} else {
(gotoAndStop("unchecked"));// not popped
}
}
function updateEvent() {
}
}
Symbol 3997 MovieClip [__Packages.CustomSliderBar] Frame 0
class CustomSliderBar extends MovieClip
{
var current_value, pressed, bar, box_inst, nub, nub_inst, _xmouse;
function CustomSliderBar () {
super();
}
function CustomCheckBox() {
current_value = 0;
pressed = false;
update();
Mouse.addListener(this);
}
function onLoad() {
var self = this;
bar = box_inst;
nub = nub_inst;
nub.onPress = function () {
SoundManager.playSound("click");
self.pressed = true;
};
}
function onEnterFrame() {
if (pressed) {
var _local2 = _xmouse;
if (_local2 < NUB_HALF_WIDTH) {
_local2 = NUB_HALF_WIDTH;
}
if (_local2 > (FULL_WIDTH - NUB_HALF_WIDTH)) {
_local2 = FULL_WIDTH - NUB_HALF_WIDTH;
}
current_value = int(((_local2 - NUB_HALF_WIDTH) / ((FULL_WIDTH - NUB_HALF_WIDTH) - NUB_HALF_WIDTH)) * 100);
update();
updateEvent();
}
}
function onMouseUp() {
pressed = false;
}
function update() {
nub._x = ((current_value / 100) * (FULL_WIDTH - (NUB_HALF_WIDTH * 4))) + NUB_HALF_WIDTH;
}
function updateEvent() {
}
static var NUB_HALF_WIDTH = 4;
static var FULL_WIDTH = 200;
}
Symbol 3998 MovieClip [__Packages.PrefsUI] Frame 0
class PrefsUI extends WindowUI
{
static var current_prefs;
var cancel_btn_inst, ok_btn_inst, bgm_check, bgm_check_inst, bgm_value, bgm_value_inst, sfx_check, sfx_check_inst, sfx_value, sfx_value_inst, par_check, par_check_inst, par_value, par_value_inst, weather_check, weather_check_inst, tint_check, tint_check_inst, combat_text_check, combat_text_check_inst, sd;
function PrefsUI () {
super();
current_prefs = this;
}
function onLoad() {
var self = this;
cancel_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.hide();
self.toggle_object.setActivate(false);
self.return_function(false);
};
ok_btn_inst.onRelease = function () {
SoundManager.playSound("click");
self.hide();
self.toggle_object.setActivate(false);
self.return_function(true);
};
bgm_check = bgm_check_inst;
bgm_check.updateEvent = function () {
SoundManager.setBGMEnabled(this.checked);
};
bgm_value = bgm_value_inst;
bgm_value.updateEvent = function () {
SoundManager.setBGMVolume(this.current_value);
};
sfx_check = sfx_check_inst;
sfx_check.updateEvent = function () {
SoundManager.setSoundEnabled(this.checked);
};
sfx_value = sfx_value_inst;
sfx_value.updateEvent = function () {
SoundManager.setSoundVolume(this.current_value);
};
par_check = par_check_inst;
par_check.updateEvent = function () {
SpecialEffect.effect_quality = (self.par_check.checked ? (((self.par_value.current_value / 100) * 0.8) + 0.2) : 0);
};
par_value = par_value_inst;
par_value.updateEvent = par_check.updateEvent;
weather_check = weather_check_inst;
weather_check.updateEvent = function () {
ScrollingStage.weather_enabled = this.checked;
};
tint_check = tint_check_inst;
tint_check.updateEvent = function () {
ScrollingStage.day_night_enabled = this.checked;
};
combat_text_check = combat_text_check_inst;
combat_text_check.updateEvent = function () {
ScrollingStage.combat_text_enabled = this.checked;
};
super.onLoad();
}
function show() {
if (sd == null) {
sd = new SaveData();
}
sd.loadPrefs();
sfx_check.checked = sd.pref_data.sfx_checked;
sfx_value.current_value = sd.pref_data.sfx_value;
bgm_check.checked = sd.pref_data.bgm_checked;
bgm_value.current_value = sd.pref_data.bgm_value;
par_check.checked = sd.pref_data.par_checked;
par_value.current_value = sd.pref_data.par_value;
tint_check.checked = sd.pref_data.tint_checked;
weather_check.checked = sd.pref_data.weather_checked;
combat_text_check.checked = sd.pref_data.combat_text_checked;
sfx_check.update();
sfx_value.update();
bgm_check.update();
bgm_value.update();
par_check.update();
par_value.update();
tint_check.update();
weather_check.update();
combat_text_check.update();
super.show();
}
function hide() {
sd.pref_data.sfx_checked = sfx_check.checked;
sd.pref_data.sfx_value = sfx_value.current_value;
sd.pref_data.bgm_checked = bgm_check.checked;
sd.pref_data.bgm_value = bgm_value.current_value;
sd.pref_data.par_checked = par_check.checked;
sd.pref_data.par_value = par_value.current_value;
sd.pref_data.tint_checked = tint_check.checked;
sd.pref_data.weather_checked = weather_check.checked;
sd.pref_data.combat_text_checked = combat_text_check.checked;
sd.savePrefs();
super.hide();
}
}
Symbol 3999 MovieClip [__Packages.HelpToggleButton] Frame 0
class HelpToggleButton extends ToggleButtonUI
{
var toggle_object, is_active, key_binding, tooltip;
function HelpToggleButton () {
super();
}
function onLoad() {
Key.addListener(this);
toggle_object = HelpUI.help_win;
HelpUI.help_win.toggle_object = this;
SoundManager.loadExternalSound("clink", "events/clink.mp3");
is_active = false;
key_binding = GameConstants.HELP_UI_BIND;
tooltip = "Help - H Key";
}
function updateActiveState() {
super.updateActiveState();
if (is_active) {
SoundManager.playSound("clink");
} else {
SoundManager.playSound("clink");
}
}
}
Symbol 4000 MovieClip [__Packages.VScrollBar] Frame 0
class VScrollBar extends MovieClip
{
var up_button, up_button_inst, down_button, down_button_inst, scroller, scroller_inst, scroll_area, scroll_area_inst, scroll_amount, drag, scroll_y, start_y, mask, source, max_scroll, max_scroll_area, drag_y, _ymouse, _visible, scroll_scale, prev_scroll;
function VScrollBar () {
super();
}
function onLoad() {
up_button = up_button_inst;
down_button = down_button_inst;
scroller = scroller_inst;
scroll_area = scroll_area_inst;
var self = this;
up_button.onPress = function () {
self.startScroll(-1);
};
up_button.onRelease = function () {
self.stopScroll();
};
down_button.onPress = function () {
self.startScroll(1);
};
down_button.onRelease = function () {
self.stopScroll();
};
scroller.onPress = function () {
self.startScrollerDrag();
};
scroll_amount = 0;
drag = false;
scroll_y = 0;
scroller._y = scroll_area._y;
}
function initialize() {
start_y = mask._y;
source.setMask(mask);
source._x = mask._x;
source._y = mask._y;
max_scroll = (source._height - mask._height) + 40;
max_scroll_area = scroll_area._height - scroller._height;
var _local2 = (scroller._y - scroll_area._y) / max_scroll_area;
scroll_y = int(_local2 * max_scroll);
}
function resetPosition() {
scroll_y = 0;
scroller._y = scroll_area._y;
}
function startScroll(amount) {
scroll_amount = amount;
}
function stopScroll() {
scroll_amount = 0;
}
function startScrollerDrag() {
drag = true;
drag_y = _ymouse - scroller._y;
}
function stopScrollerDrag() {
drag = false;
}
function onEnterFrame() {
if (((source == null) || (mask == null)) || (max_scroll < 0)) {
_visible = false;
} else {
_visible = true;
}
if (scroll_amount != 0) {
scroll_y = scroll_y + (scroll_amount * scroll_scale);
if (scroll_y < 0) {
scroll_y = 0;
}
if (scroll_y > max_scroll) {
scroll_y = max_scroll;
}
var _local2 = scroll_y / max_scroll;
scroller._y = scroll_area._y + (max_scroll_area * _local2);
} else if (drag) {
scroller._y = _ymouse - drag_y;
if (scroller._y < scroll_area._y) {
scroller._y = scroll_area._y;
}
if (scroller._y > (scroll_area._y + max_scroll_area)) {
scroller._y = scroll_area._y + max_scroll_area;
}
var _local2 = (scroller._y - scroll_area._y) / max_scroll_area;
scroll_y = int(_local2 * max_scroll);
}
if (scroll_y != prev_scroll) {
source._y = int(start_y - scroll_y);
}
prev_scroll = scroll_y;
}
function onMouseUp() {
if (drag) {
stopScrollerDrag();
}
}
}
Symbol 4001 MovieClip [__Packages.PrefsToggleButton] Frame 0
class PrefsToggleButton extends ToggleButtonUI
{
var toggle_object, key_binding, tooltip, is_active;
function PrefsToggleButton () {
super();
}
function onLoad() {
toggle_object = PrefsUI.current_prefs;
PrefsUI.current_prefs.toggle_object = this;
SoundManager.loadExternalSound("clink", "events/clink.mp3");
super.onLoad();
key_binding = GameConstants.PREFS_UI_BIND;
tooltip = "Preferences - P Key";
}
function updateActiveState() {
super.updateActiveState();
if (is_active) {
SoundManager.playSound("clink");
} else {
SoundManager.playSound("clink");
}
}
}
Symbol 4002 MovieClip [__Packages.ExperienceBar] Frame 0
class ExperienceBar extends MovieClip
{
var exp_bar, exp_bar_inst, exp_mask, exp_mask_inst, exp_text;
function ExperienceBar () {
super();
}
function onLoad() {
exp_bar = exp_bar_inst;
exp_mask = exp_mask_inst;
exp_bar.setMask(exp_mask);
exp_mask._xscale = 0;
}
function onEnterFrame() {
exp_text = (("EXP: " + PlayerCharacter.current_player.current_exp) + " / ") + PlayerCharacter.current_player.next_level_exp;
exp_mask._xscale = (PlayerCharacter.current_player.current_exp / PlayerCharacter.current_player.next_level_exp) * 100;
if (exp_mask._xscale > 100) {
exp_mask._xscale = 100;
}
}
}
Symbol 4003 MovieClip [__Packages.MapToggleButton] Frame 0
class MapToggleButton extends ToggleButtonUI
{
var toggle_object, key_binding, tooltip, is_active;
function MapToggleButton () {
super();
}
function onLoad() {
super.onLoad();
toggle_object = MapUI.current_map;
MapUI.current_map.toggle_object = this;
SoundManager.loadExternalSound("clack", "events/page_flip.mp3");
key_binding = GameConstants.MAP_UI_BIND;
tooltip = "Map - M Key";
}
function updateActiveState() {
super.updateActiveState();
if (is_active) {
SoundManager.playSound("clack");
} else {
SoundManager.playSound("clack");
}
}
}
Symbol 4004 MovieClip [__Packages.QuestLogToggleButton] Frame 0
class QuestLogToggleButton extends ToggleButtonUI
{
var toggle_object, key_binding, tooltip, is_active;
function QuestLogToggleButton () {
super();
}
function onLoad() {
toggle_object = QuestLogUI.current_log;
QuestLogUI.current_log.toggle_object = this;
SoundManager.loadExternalSound("page_flip", "events/page_flip.mp3");
super.onLoad();
key_binding = GameConstants.LOG_UI_BIND;
tooltip = "Quest Log - L Key";
}
function updateActiveState() {
super.updateActiveState();
if (is_active) {
SoundManager.playSound("page_flip");
} else {
SoundManager.playSound("page_flip");
}
}
}
Symbol 4005 MovieClip [__Packages.ThrownWeaponIcon] Frame 0
class ThrownWeaponIcon extends ItemIcon
{
var flash_icon, last_id, last_stack, item_id, stack;
function ThrownWeaponIcon () {
super();
flash_icon = false;
last_id = -1;
last_stack = 0;
}
function onLoad() {
super.onLoad();
update();
}
function onEnterFrame() {
if (PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_THROWN].item_id != last_id) {
update();
}
if (PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_THROWN].stack != last_stack) {
update();
}
}
function onRollOver() {
if (((item_id != null) && (item_id != ItemIcon.EMPTY_ID)) && (stack > 0)) {
ItemInfo.current_item_info.showItemOnly(ItemList.data[item_id]);
}
}
function update() {
item_id = PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_THROWN].item_id;
stack = PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_THROWN].stack;
last_id = item_id;
last_stack = stack;
if (isNaN(item_id)) {
item_id = -1;
stack = 0;
}
super.update();
}
}
Symbol 4006 MovieClip [__Packages.AttackCooldownIcon] Frame 0
class AttackCooldownIcon extends ItemIcon
{
var flash_icon, last_id, cooldown_inst, flash_inst, item_id, stack;
function AttackCooldownIcon () {
super();
flash_icon = false;
last_id = -1;
}
function onLoad() {
super.onLoad();
update();
}
function onEnterFrame() {
if (PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_MAIN_HAND].item_id != last_id) {
update();
}
cooldown_inst.gotoAndStop(101 - int((PlayerCharacter.current_player.attack_countdown / PlayerCharacter.current_player.attack_time) * 100));
if (PlayerCharacter.current_player.attack_countdown > 300) {
flash_icon = true;
} else if (flash_icon) {
flash_icon = false;
flash_inst.gotoAndPlay(2);
}
}
function onRollOver() {
if (((item_id != null) && (item_id != ItemIcon.EMPTY_ID)) && (stack > 0)) {
ItemInfo.current_item_info.showItemOnly(ItemList.data[item_id]);
}
}
function update() {
item_id = PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_MAIN_HAND].item_id;
stack = PlayerCharacter.current_player.current_equipment.slot[Equipment.SLOT_MAIN_HAND].stack;
last_id = item_id;
if (isNaN(item_id)) {
item_id = -1;
stack = 0;
}
super.update();
}
}
Symbol 4007 MovieClip [__Packages.Clock] Frame 0
class Clock extends MovieClip
{
var show_popup, rollover_area, time_text_inst, gotoAndStop, time_text, popup_base;
function Clock () {
super();
show_popup = false;
}
function onLoad() {
var self = this;
rollover_area.onRollOver = function () {
self.show_popup = true;
};
rollover_area.onRollOut = function () {
self.show_popup = false;
};
time_text_inst.autoSize = true;
}
function onEnterFrame() {
var _local5 = new Date();
var _local3 = _local5.getHours();
if ((_local3 >= 6) && (_local3 <= 18)) {
(gotoAndStop("day"));// not popped
} else {
(gotoAndStop("night"));// not popped
}
if (show_popup) {
var _local4 = _local3 % 12;
if (_local4 == 0) {
_local4 = 12;
}
var _local2 = "" + _local5.getMinutes();
if (_local2.length == 1) {
_local2 = "0" + _local2;
}
time_text = (((_local4 + ":") + _local2) + " ") + ((_local3 >= 12) ? "PM" : "AM");
if (ScrollingStage.current_stage.current_weather != null) {
time_text = time_text + (" - " + ScrollingStage.current_stage.current_weather.name);
}
var _local6 = time_text_inst._width * 2;
popup_base._visible = true;
popup_base._width = time_text_inst._width + 15;
} else {
time_text = "";
popup_base._visible = false;
}
}
}
Symbol 4008 MovieClip [__Packages.NPCCharacterToggleButton] Frame 0
class NPCCharacterToggleButton extends ToggleButtonUI
{
var toggle_object, is_active;
function NPCCharacterToggleButton () {
super();
}
function onLoad() {
toggle_object = CharacterUI.current_character_ui;
super.onLoad();
}
function updateActiveState() {
CharacterUI.current_character_ui.toggle_object = this;
CharacterUI.current_character_ui.current_character = NPCInfoUI.current_npc_info_ui.info_character;
super.updateActiveState();
if (is_active) {
SoundManager.playSound("kachink");
} else {
SoundManager.playSound("kachink");
}
}
}
Symbol 4009 MovieClip [__Packages.PlayerInfoUI] Frame 0
class PlayerInfoUI extends InfoUI
{
var info_character;
function PlayerInfoUI () {
super();
}
function onEnterFrame() {
info_character = PlayerCharacter.current_player;
super.onEnterFrame();
}
}
Symbol 4010 MovieClip [__Packages.StartupUI] Frame 0
class StartupUI extends WindowUI
{
static var current_startup;
var lump_select_inst, phal_select_inst, lump_reset_btn_inst, phal_reset_btn_inst, enter_button_inst, reward_button_inst;
function StartupUI () {
super();
current_startup = this;
}
function onLoad() {
function switchTo(label) {
(this.gotoAndStop(label));// not popped
switch (label) {
case "lump" :
_global.avatar = "lump";
_root.startup.gotoAndStop("lump");
self.lump_select_inst.gotoAndStop("active");
self.phal_select_inst.gotoAndStop("inactive");
break;
case "phal" :
_global.avatar = "phal";
_root.startup.gotoAndStop("phal");
self.lump_select_inst.gotoAndStop("inactive");
self.phal_select_inst.gotoAndStop("active");
}
}
var self = this;
_global.avatar = "phal";
SoundManager.loadExternalSound("login", "events/login.mp3");
SoundManager.loadExternalSound("startup_bgm", "loops/startup.mp3");
SoundManager.loadExternalSound("click", "events/click.mp3");
SoundManager.loadExternalSound("quest_decline", "events/quest_decline.mp3");
SoundManager.playBGM("startup_bgm");
var _local4 = new SaveData();
_local4.loadAvatar();
_local4.loadFromDisk("phal");
var _local5 = new SaveData();
_local5.loadFromDisk("lump");
if (_local5.is_loaded) {
lump_select_inst.level_text = "Level " + _local5.player_data.current_level;
lump_select_inst.zone_text = _local5.player_data.current_zone_display_name;
}
if (_local4.is_loaded) {
phal_select_inst.level_text = "Level " + _local4.player_data.current_level;
phal_select_inst.zone_text = _local4.player_data.current_zone_display_name;
}
lump_reset_btn_inst.onRelease = function () {
switchTo("lump");
SoundManager.playSound("click");
PromptUI.current_prompt.openPrompt("Reset", "Are you sure you wish to reset Lumpen to\nlevel 1? All equipment, stats, coins, and\ninventory items will be lost!", true, self.resetResponse);
};
phal_reset_btn_inst.onRelease = function () {
switchTo("phal");
SoundManager.playSound("click");
PromptUI.current_prompt.openPrompt("Reset", "Are you sure you wish to reset Phallicity to\nlevel 1? All equipment, stats, coins, and\ninventory items will be lost!", true, self.resetResponse);
};
lump_select_inst.onRelease = function () {
switchTo("lump");
SoundManager.playSound("click");
};
phal_select_inst.onRelease = function () {
switchTo("phal");
SoundManager.playSound("click");
};
switchTo(_global.avatar);
enter_button_inst.onRelease = function () {
if (_global.avatar != "") {
SoundManager.playSound("login");
_root.gotoAndPlay("gameworld");
}
};
reward_button_inst.onRelease = function () {
DebugWindow.debug("WTF! Get to level 80 first!");
};
}
function resetResponse(do_reset) {
if (do_reset) {
SoundManager.playSound("quest_decline");
var _local2 = new SaveData();
_local2.resetDiskData(_global.avatar);
current_startup.resetText();
}
}
function resetText() {
this[_global.avatar + "_select_inst"].level_text = "Level 1";
this[_global.avatar + "_select_inst"].zone_text = "";
}
}
Symbol 4011 MovieClip [__Packages.InventoryItem] Frame 0
class InventoryItem extends ItemIcon
{
var detect_movement, src_bag, slot_index, item_id, stack;
function InventoryItem () {
super();
}
function onLoad() {
super.onLoad();
detect_movement = false;
Mouse.addListener(this);
}
function onMouseMove() {
if (detect_movement) {
src_bag.selectItem(null, ItemIcon.EMPTY_ID);
src_bag.selectItem(null, slot_index);
src_bag.createDragItem(src_bag.inventory_slot, slot_index, this);
detect_movement = false;
}
}
function onPress() {
if (!PlayerCharacter.current_player.isAlive()) {
return(undefined);
}
ItemUI.setDragLocation();
detect_movement = true;
}
function onRelease() {
if (detect_movement) {
src_bag.selectItem(null, slot_index);
}
detect_movement = false;
}
function onReleaseOutside() {
detect_movement = false;
}
function onRollOver() {
if ((item_id != null) && (item_id != ItemIcon.EMPTY_ID)) {
if (VendorUI.current_vendor_ui._visible) {
ItemInfo.current_item_info.showItem(ItemList.data[item_id], stack, "Sells for", VendorUI.current_vendor_ui.purchase_price);
} else {
super.onRollOver();
}
}
}
}
Symbol 361 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.126";
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 362 MovieClip [__Packages.mx.controls.Label] Frame 0
class mx.controls.Label extends mx.core.UIObject
{
var _xscale, _yscale, labelField, tabEnabled, tabChildren, useHandCursor, _color, initText, __autoSize, _getTextFormat, __width, setSize, _x, __height, getStyle;
function Label () {
super();
}
function init(Void) {
super.init();
_xscale = (_yscale = 100);
labelField.selectable = false;
labelField.styleName = this;
tabEnabled = false;
tabChildren = false;
useHandCursor = false;
_color = mx.core.UIObject.textColorList;
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(labelField.html);
}
function setHtml(value) {
if (value != labelField.html) {
labelField.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
var _local2 = labelField;
if (_local2.html == true) {
return(_local2.htmlText);
}
return(_local2.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = labelField;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
adjustForAutoSize();
}
}
function get autoSize() {
return(__autoSize);
}
function set autoSize(v) {
if (_global.isLivePreview == true) {
v = "none";
}
__autoSize = v;
if (!initializing) {
draw();
}
//return(autoSize);
}
function draw(Void) {
var _local2 = labelField;
if (initializing) {
var _local4 = text;
initializing = false;
setText(_local4);
delete initText;
}
if (_local2.html) {
var _local4 = _local2.htmlText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
if (_local2.html) {
_local2.htmlText = _local4;
}
adjustForAutoSize();
}
function adjustForAutoSize() {
var _local2 = labelField;
var _local3 = __autoSize;
if ((_local3 != undefined) && (_local3 != "none")) {
_local2._height = _local2.textHeight + 3;
var _local4 = __width;
setSize(_local2.textWidth + 4, _local2._height);
if (_local3 == "right") {
_x = _x + (_local4 - __width);
} else if (_local3 == "center") {
_x = _x + ((_local4 - __width) / 2);
} else if (_local3 == "left") {
_x = _x + 0;
}
} else {
_local2._x = 0;
_local2._width = __width;
_local2._height = __height;
}
}
function size(Void) {
var _local2 = labelField;
_local2._width = __width;
_local2._height = __height;
}
function setEnabled(enable) {
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
labelField.textColor = col;
}
function get styleSheet() {
return(labelField.styleSheet);
}
function set styleSheet(v) {
labelField.styleSheet = v;
//return(styleSheet);
}
static var symbolName = "Label";
static var symbolOwner = Object(mx.controls.Label);
var className = "Label";
static var version = "2.0.2.126";
var initializing = true;
var clipParameters = {text:1, html:1, autoSize:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Label.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 379 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 380 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 381 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 382 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 383 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 384 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 385 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 386 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 387 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.126";
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 388 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 389 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 390 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.126";
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 391 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 392 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.126";
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 393 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 394 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 395 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 396 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 899 MovieClip [prompt_win] Frame 1
#initclip 209
Object.registerClass("prompt_win", PromptUI);
#endinitclip
Symbol 903 MovieClip [loading_win] Frame 1
#initclip 208
Object.registerClass("loading_win", LoaderUI);
#endinitclip
Symbol 1123 MovieClip [bomb] Frame 1
#initclip 212
Object.registerClass("bomb", Projectile);
#endinitclip
Symbol 1136 MovieClip [boomerang] Frame 1
#initclip 210
Object.registerClass("boomerang", Projectile);
#endinitclip
Symbol 1149 MovieClip [dagger] Frame 1
#initclip 211
Object.registerClass("dagger", Projectile);
#endinitclip
Symbol 1181 MovieClip [portal_master] Frame 1
#initclip 237
Object.registerClass("portal_master", NPCTemplate);
#endinitclip
Symbol 1181 MovieClip [portal_master] Frame 14
endAction("idle");
Symbol 1181 MovieClip [portal_master] Frame 30
endAction("discovered");
Symbol 1181 MovieClip [portal_master] Frame 45
endAction("move");
Symbol 1181 MovieClip [portal_master] Frame 60
endAction("wound");
Symbol 1181 MovieClip [portal_master] Frame 75
endAction("death");
Symbol 1300 MovieClip [merchant] Frame 1
#initclip 213
Object.registerClass("merchant", NPCTemplate);
#endinitclip
Symbol 1300 MovieClip [merchant] Frame 14
endAction("idle");
Symbol 1300 MovieClip [merchant] Frame 35
endAction("move");
Symbol 1300 MovieClip [merchant] Frame 39
startHitCheck();
Symbol 1300 MovieClip [merchant] Frame 43
stopHitCheck();
Symbol 1300 MovieClip [merchant] Frame 45
endAction("attack");
Symbol 1300 MovieClip [merchant] Frame 51
useTrinket();
Symbol 1300 MovieClip [merchant] Frame 57
endAction("cast");
Symbol 1300 MovieClip [merchant] Frame 65
endAction("wound");
Symbol 1300 MovieClip [merchant] Frame 90
endAction("death");
Symbol 1498 MovieClip [freud] Frame 1
#initclip 214
Object.registerClass("freud", NPCTemplate);
#endinitclip
Symbol 1498 MovieClip [freud] Frame 16
endAction("idle");
Symbol 1498 MovieClip [freud] Frame 31
endAction("announce");
Symbol 1498 MovieClip [freud] Frame 51
endAction("move");
Symbol 1498 MovieClip [freud] Frame 64
endAction("run");
Symbol 1498 MovieClip [freud] Frame 69
startHitCheck();
Symbol 1498 MovieClip [freud] Frame 71
stopHitCheck();
Symbol 1498 MovieClip [freud] Frame 74
endAction("attack");
Symbol 1498 MovieClip [freud] Frame 79
throwProjectile();
Symbol 1498 MovieClip [freud] Frame 84
endAction("throw");
Symbol 1498 MovieClip [freud] Frame 89
useTrinket();
Symbol 1498 MovieClip [freud] Frame 94
endAction("cast");
Symbol 1498 MovieClip [freud] Frame 104
endAction("wound");
Symbol 1498 MovieClip [freud] Frame 134
endAction("death");
Symbol 1575 MovieClip [sheep] Frame 1
#initclip 215
Object.registerClass("sheep", NPCTemplate);
#endinitclip
Symbol 1575 MovieClip [sheep] Frame 6
endAction("idle");
Symbol 1575 MovieClip [sheep] Frame 14
endAction("move");
Symbol 1575 MovieClip [sheep] Frame 30
endAction("eat");
Symbol 1575 MovieClip [sheep] Frame 32
startHitCheck();
Symbol 1575 MovieClip [sheep] Frame 39
stopHitCheck();
Symbol 1575 MovieClip [sheep] Frame 40
endAction("attack");
Symbol 1575 MovieClip [sheep] Frame 49
endAction("wound");
Symbol 1575 MovieClip [sheep] Frame 54
useTrinket();
Symbol 1575 MovieClip [sheep] Frame 56
endAction("cast");
Symbol 1575 MovieClip [sheep] Frame 87
endAction("death");
Symbol 1576 MovieClip [totem] Frame 1
#initclip 216
Object.registerClass("totem", NPCTemplate);
#endinitclip
Symbol 1576 MovieClip [totem] Frame 10
endAction("idle");
Symbol 1576 MovieClip [totem] Frame 18
useTrinket();
Symbol 1576 MovieClip [totem] Frame 20
endAction("cast");
Symbol 1576 MovieClip [totem] Frame 30
endAction("wound");
Symbol 1576 MovieClip [totem] Frame 40
endAction("death");
Symbol 1576 MovieClip [totem] Frame 50
endAction("invisible");
Symbol 1788 MovieClip [daly] Frame 1
#initclip 217
Object.registerClass("daly", NPCTemplate);
#endinitclip
Symbol 1788 MovieClip [daly] Frame 21
endAction("idle");
Symbol 1788 MovieClip [daly] Frame 41
endAction("announce");
Symbol 1788 MovieClip [daly] Frame 61
endAction("move");
Symbol 1788 MovieClip [daly] Frame 66
startHitCheck();
Symbol 1788 MovieClip [daly] Frame 68
stopHitCheck();
Symbol 1788 MovieClip [daly] Frame 71
endAction("attack");
Symbol 1788 MovieClip [daly] Frame 75
useTrinket();
Symbol 1788 MovieClip [daly] Frame 81
endAction("repentance");
Symbol 1788 MovieClip [daly] Frame 86
useTrinket();
Symbol 1788 MovieClip [daly] Frame 91
endAction("consecrate");
Symbol 1788 MovieClip [daly] Frame 92
useTrinket();
Symbol 1788 MovieClip [daly] Frame 94
useTrinket();
Symbol 1788 MovieClip [daly] Frame 100
useTrinket();
Symbol 1788 MovieClip [daly] Frame 102
useTrinket();
Symbol 1788 MovieClip [daly] Frame 109
endAction("holy_fire");
Symbol 1788 MovieClip [daly] Frame 119
endAction("wound");
Symbol 1788 MovieClip [daly] Frame 144
endAction("death");
Symbol 1926 MovieClip [marx] Frame 1
#initclip 218
Object.registerClass("marx", NPCTemplate);
#endinitclip
Symbol 1926 MovieClip [marx] Frame 14
endAction("idle");
Symbol 1926 MovieClip [marx] Frame 26
endAction("announce");
Symbol 1926 MovieClip [marx] Frame 38
endAction("move");
Symbol 1926 MovieClip [marx] Frame 43
useTrinket();
Symbol 1926 MovieClip [marx] Frame 48
endAction("cast");
Symbol 1926 MovieClip [marx] Frame 54
startHitCheck();
Symbol 1926 MovieClip [marx] Frame 56
stopHitCheck();
Symbol 1926 MovieClip [marx] Frame 58
endAction("attack");
Symbol 1926 MovieClip [marx] Frame 64
startHitCheck();
Symbol 1926 MovieClip [marx] Frame 72
stopHitCheck();
Symbol 1926 MovieClip [marx] Frame 74
endAction("charge");
Symbol 1926 MovieClip [marx] Frame 75
startHitCheck();
Symbol 1926 MovieClip [marx] Frame 79
stopHitCheck();
endAction("whirlwind");
Symbol 1926 MovieClip [marx] Frame 87
endAction("wound");
Symbol 1926 MovieClip [marx] Frame 110
endAction("death");
Symbol 2206 MovieClip [lump] Frame 1
#initclip 219
Object.registerClass("lump", PlayerCharacter);
#endinitclip
Symbol 2206 MovieClip [lump] Frame 13
endAction("idle");
Symbol 2206 MovieClip [lump] Frame 23
endAction("move");
Symbol 2206 MovieClip [lump] Frame 34
endAction("jump");
Symbol 2206 MovieClip [lump] Frame 42
endAction("land");
Symbol 2206 MovieClip [lump] Frame 43
attachWeapon();
Symbol 2206 MovieClip [lump] Frame 48
startHitCheck();
Symbol 2206 MovieClip [lump] Frame 50
stopHitCheck();
Symbol 2206 MovieClip [lump] Frame 52
endAction("attack");
Symbol 2206 MovieClip [lump] Frame 53
attachWeapon();
Symbol 2206 MovieClip [lump] Frame 58
startHitCheck();
Symbol 2206 MovieClip [lump] Frame 60
stopHitCheck();
Symbol 2206 MovieClip [lump] Frame 62
endAction("jump_attack");
Symbol 2206 MovieClip [lump] Frame 67
throwProjectile();
Symbol 2206 MovieClip [lump] Frame 72
endAction("throw_attack");
Symbol 2206 MovieClip [lump] Frame 82
endAction("ready_cast");
Symbol 2206 MovieClip [lump] Frame 84
useTrinket();
Symbol 2206 MovieClip [lump] Frame 92
endAction("cast");
Symbol 2206 MovieClip [lump] Frame 112
endAction("stun");
Symbol 2206 MovieClip [lump] Frame 122
endAction("wound");
Symbol 2206 MovieClip [lump] Frame 132
endAction("dodge");
Symbol 2206 MovieClip [lump] Frame 142
endAction("jump_dodge");
Symbol 2206 MovieClip [lump] Frame 161
endAction("death");
Symbol 2320 MovieClip [generic_female] Frame 1
#initclip 220
Object.registerClass("generic_female", NPCTemplate);
#endinitclip
Symbol 2320 MovieClip [generic_female] Frame 12
endAction("idle");
Symbol 2320 MovieClip [generic_female] Frame 25
endAction("move");
Symbol 2320 MovieClip [generic_female] Frame 32
startHitCheck();
Symbol 2320 MovieClip [generic_female] Frame 34
stopHitCheck();
Symbol 2320 MovieClip [generic_female] Frame 35
endAction("attack");
Symbol 2320 MovieClip [generic_female] Frame 36
endAction("attack");
Symbol 2320 MovieClip [generic_female] Frame 42
throwProjectile();
Symbol 2320 MovieClip [generic_female] Frame 45
endAction("throw");
Symbol 2320 MovieClip [generic_female] Frame 56
useTrinket();
Symbol 2320 MovieClip [generic_female] Frame 61
endAction("cast");
Symbol 2320 MovieClip [generic_female] Frame 67
endAction("wound");
Symbol 2320 MovieClip [generic_female] Frame 97
endAction("death");
Symbol 2432 MovieClip [goblin] Frame 1
#initclip 221
Object.registerClass("goblin", NPCTemplate);
#endinitclip
Symbol 2432 MovieClip [goblin] Frame 10
endAction("idle");
Symbol 2432 MovieClip [goblin] Frame 22
endAction("move");
Symbol 2432 MovieClip [goblin] Frame 27
startHitCheck();
Symbol 2432 MovieClip [goblin] Frame 29
stopHitCheck();
Symbol 2432 MovieClip [goblin] Frame 32
endAction("attack");
Symbol 2432 MovieClip [goblin] Frame 36
throwProjectile();
Symbol 2432 MovieClip [goblin] Frame 42
endAction("throw");
Symbol 2432 MovieClip [goblin] Frame 52
endAction("wound");
Symbol 2432 MovieClip [goblin] Frame 65
endAction("death");
Symbol 2473 MovieClip [gramsci] Frame 1
#initclip 222
Object.registerClass("gramsci", NPCTemplate);
#endinitclip
Symbol 2473 MovieClip [gramsci] Frame 8
endAction("idle");
Symbol 2473 MovieClip [gramsci] Frame 21
endAction("move");
Symbol 2609 MovieClip [generic_male] Frame 1
#initclip 223
Object.registerClass("generic_male", NPCTemplate);
#endinitclip
Symbol 2609 MovieClip [generic_male] Frame 19
endAction("idle");
Symbol 2609 MovieClip [generic_male] Frame 22
endAction("report");
Symbol 2609 MovieClip [generic_male] Frame 34
endAction("move");
Symbol 2609 MovieClip [generic_male] Frame 40
startHitCheck();
Symbol 2609 MovieClip [generic_male] Frame 42
stopHitCheck();
Symbol 2609 MovieClip [generic_male] Frame 44
endAction("attack");
Symbol 2609 MovieClip [generic_male] Frame 53
startEffect();
throwProjectile();
Symbol 2609 MovieClip [generic_male] Frame 58
endAction("shoot");
Symbol 2609 MovieClip [generic_male] Frame 63
throwProjectile();
Symbol 2609 MovieClip [generic_male] Frame 68
endAction("throw");
Symbol 2609 MovieClip [generic_male] Frame 87
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 93
endAction("cast");
Symbol 2609 MovieClip [generic_male] Frame 97
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 103
endAction("cast_inst");
Symbol 2609 MovieClip [generic_male] Frame 105
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 110
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 115
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 120
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 125
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 130
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 135
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 140
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 145
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 150
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 155
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 160
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 165
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 170
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 175
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 180
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 185
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 190
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 195
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 200
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 205
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 210
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 215
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 220
useTrinket();
Symbol 2609 MovieClip [generic_male] Frame 224
endAction("blizzard");
Symbol 2609 MovieClip [generic_male] Frame 233
endAction("wound");
Symbol 2609 MovieClip [generic_male] Frame 263
endAction("death");
Symbol 2694 MovieClip [piglet] Frame 1
#initclip 224
Object.registerClass("piglet", NPCTemplate);
#endinitclip
Symbol 2694 MovieClip [piglet] Frame 14
endAction("idle");
Symbol 2694 MovieClip [piglet] Frame 22
endAction("move");
Symbol 2694 MovieClip [piglet] Frame 32
endAction("wound");
Symbol 2694 MovieClip [piglet] Frame 54
endAction("death");
Symbol 2798 MovieClip [kitty] Frame 1
#initclip 225
Object.registerClass("kitty", NPCTemplate);
#endinitclip
Symbol 2798 MovieClip [kitty] Frame 4
endAction("idle");
Symbol 2798 MovieClip [kitty] Frame 17
endAction("move");
Symbol 2798 MovieClip [kitty] Frame 21
startHitCheck();
Symbol 2798 MovieClip [kitty] Frame 24
stopHitCheck();
Symbol 2798 MovieClip [kitty] Frame 27
endAction("attack");
Symbol 2798 MovieClip [kitty] Frame 37
endAction("wound");
Symbol 2798 MovieClip [kitty] Frame 57
endAction("death");
Symbol 2870 MovieClip [laura] Frame 1
#initclip 226
Object.registerClass("laura", NPCTemplate);
#endinitclip
Symbol 2870 MovieClip [laura] Frame 19
endAction("idle");
Symbol 2870 MovieClip [laura] Frame 35
endAction("move");
Symbol 2870 MovieClip [laura] Frame 54
endAction("shy");
Symbol 2870 MovieClip [laura] Frame 73
endAction("wound");
Symbol 3026 MovieClip [shadow_figure_female] Frame 1
#initclip 227
Object.registerClass("shadow_figure_female", NPCTemplate);
#endinitclip
Symbol 3026 MovieClip [shadow_figure_female] Frame 10
endAction("idle");
Symbol 3026 MovieClip [shadow_figure_female] Frame 14
useTrinket();
Symbol 3026 MovieClip [shadow_figure_female] Frame 20
endAction("cast");
Symbol 3026 MovieClip [shadow_figure_female] Frame 40
endAction("move");
Symbol 3026 MovieClip [shadow_figure_female] Frame 50
endAction("beg");
Symbol 3026 MovieClip [shadow_figure_female] Frame 57
endAction("wound");
Symbol 3026 MovieClip [shadow_figure_female] Frame 87
endAction("death");
Symbol 3041 MovieClip [mario] Frame 1
#initclip 228
Object.registerClass("mario", NPCTemplate);
#endinitclip
Symbol 3041 MovieClip [mario] Frame 16
endAction("idle");
Symbol 3041 MovieClip [mario] Frame 32
endAction("move");
Symbol 3041 MovieClip [mario] Frame 38
endAction("jump");
Symbol 3041 MovieClip [mario] Frame 45
startHitCheck();
Symbol 3041 MovieClip [mario] Frame 50
stopHitCheck();
Symbol 3041 MovieClip [mario] Frame 52
endAction("attack");
Symbol 3041 MovieClip [mario] Frame 64
endAction("wound");
Symbol 3041 MovieClip [mario] Frame 84
endAction("death");
Symbol 3155 MovieClip [einstein] Frame 1
#initclip 229
Object.registerClass("einstein", NPCTemplate);
#endinitclip
Symbol 3155 MovieClip [einstein] Frame 11
endAction("idle");
Symbol 3155 MovieClip [einstein] Frame 19
endAction("move");
Symbol 3155 MovieClip [einstein] Frame 25
startHitCheck();
Symbol 3155 MovieClip [einstein] Frame 27
stopHitCheck();
Symbol 3155 MovieClip [einstein] Frame 29
endAction("attack");
Symbol 3155 MovieClip [einstein] Frame 34
useTrinket();
Symbol 3155 MovieClip [einstein] Frame 40
endAction("cast");
Symbol 3155 MovieClip [einstein] Frame 50
endAction("wound");
Symbol 3155 MovieClip [einstein] Frame 67
endAction("death");
Symbol 3156 MovieClip [beetle] Frame 1
#initclip 230
Object.registerClass("beetle", NPCTemplate);
#endinitclip
Symbol 3156 MovieClip [beetle] Frame 10
endAction("idle");
Symbol 3156 MovieClip [beetle] Frame 20
endAction("move");
Symbol 3156 MovieClip [beetle] Frame 24
startHitCheck();
Symbol 3156 MovieClip [beetle] Frame 27
stopHitCheck();
Symbol 3156 MovieClip [beetle] Frame 30
endAction("attack");
Symbol 3156 MovieClip [beetle] Frame 40
endAction("wound");
Symbol 3156 MovieClip [beetle] Frame 50
endAction("death");
Symbol 3157 MovieClip [cheep_cheep] Frame 1
#initclip 231
Object.registerClass("cheep_cheep", NPCTemplate);
#endinitclip
Symbol 3157 MovieClip [cheep_cheep] Frame 10
endAction("idle");
Symbol 3157 MovieClip [cheep_cheep] Frame 20
endAction("move");
Symbol 3157 MovieClip [cheep_cheep] Frame 24
startHitCheck();
Symbol 3157 MovieClip [cheep_cheep] Frame 27
stopHitCheck();
Symbol 3157 MovieClip [cheep_cheep] Frame 30
endAction("attack");
Symbol 3157 MovieClip [cheep_cheep] Frame 40
endAction("wound");
Symbol 3157 MovieClip [cheep_cheep] Frame 55
endAction("death");
Symbol 3158 MovieClip [spine] Frame 1
#initclip 232
Object.registerClass("spine", NPCTemplate);
#endinitclip
Symbol 3158 MovieClip [spine] Frame 10
endAction("idle");
Symbol 3158 MovieClip [spine] Frame 20
endAction("move");
Symbol 3158 MovieClip [spine] Frame 24
startHitCheck();
Symbol 3158 MovieClip [spine] Frame 27
stopHitCheck();
Symbol 3158 MovieClip [spine] Frame 30
endAction("attack");
Symbol 3158 MovieClip [spine] Frame 40
endAction("wound");
Symbol 3158 MovieClip [spine] Frame 50
endAction("death");
Symbol 3483 MovieClip [phal] Frame 1
#initclip 233
Object.registerClass("phal", PlayerCharacter);
#endinitclip
Symbol 3483 MovieClip [phal] Frame 19
endAction("idle");
Symbol 3483 MovieClip [phal] Frame 32
endAction("move");
Symbol 3483 MovieClip [phal] Frame 40
endAction("jump");
Symbol 3483 MovieClip [phal] Frame 53
endAction("land");
Symbol 3483 MovieClip [phal] Frame 54
attachWeapon();
Symbol 3483 MovieClip [phal] Frame 57
startHitCheck();
Symbol 3483 MovieClip [phal] Frame 60
stopHitCheck();
Symbol 3483 MovieClip [phal] Frame 63
endAction("attack");
Symbol 3483 MovieClip [phal] Frame 64
attachWeapon();
Symbol 3483 MovieClip [phal] Frame 67
startHitCheck();
Symbol 3483 MovieClip [phal] Frame 70
stopHitCheck();
Symbol 3483 MovieClip [phal] Frame 73
endAction("jump_attack");
Symbol 3483 MovieClip [phal] Frame 77
throwProjectile();
Symbol 3483 MovieClip [phal] Frame 80
endAction("throw_attack");
Symbol 3483 MovieClip [phal] Frame 90
endAction("ready_cast");
Symbol 3483 MovieClip [phal] Frame 92
useTrinket();
Symbol 3483 MovieClip [phal] Frame 100
endAction("cast");
Symbol 3483 MovieClip [phal] Frame 122
endAction("stun");
Symbol 3483 MovieClip [phal] Frame 132
endAction("wound");
Symbol 3483 MovieClip [phal] Frame 146
endAction("dodge");
Symbol 3483 MovieClip [phal] Frame 160
endAction("jump_dodge");
Symbol 3483 MovieClip [phal] Frame 173
endAction("death");
Symbol 3619 MovieClip [gimp] Frame 1
#initclip 234
Object.registerClass("gimp", NPCTemplate);
#endinitclip
Symbol 3619 MovieClip [gimp] Frame 11
endAction("idle");
Symbol 3619 MovieClip [gimp] Frame 29
endAction("move");
Symbol 3619 MovieClip [gimp] Frame 35
startHitCheck();
Symbol 3619 MovieClip [gimp] Frame 37
stopHitCheck();
Symbol 3619 MovieClip [gimp] Frame 39
endAction("attack");
Symbol 3619 MovieClip [gimp] Frame 47
throwProjectile();
Symbol 3619 MovieClip [gimp] Frame 49
endAction("throw");
Symbol 3619 MovieClip [gimp] Frame 81
useTrinket();
Symbol 3619 MovieClip [gimp] Frame 84
endAction("cast");
Symbol 3619 MovieClip [gimp] Frame 92
endAction("wound");
Symbol 3619 MovieClip [gimp] Frame 102
endAction("death");
Symbol 3767 MovieClip [shadow_figure_male] Frame 1
#initclip 235
Object.registerClass("shadow_figure_male", NPCTemplate);
#endinitclip
Symbol 3767 MovieClip [shadow_figure_male] Frame 19
endAction("idle");
Symbol 3767 MovieClip [shadow_figure_male] Frame 40
endAction("move");
Symbol 3767 MovieClip [shadow_figure_male] Frame 43
useTrinket();
Symbol 3767 MovieClip [shadow_figure_male] Frame 49
endAction("taunt");
Symbol 3767 MovieClip [shadow_figure_male] Frame 53
startHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 56
stopHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 59
endAction("attack");
Symbol 3767 MovieClip [shadow_figure_male] Frame 65
startHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 68
stopHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 72
endAction("stab");
Symbol 3767 MovieClip [shadow_figure_male] Frame 80
startHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 83
stopHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 88
endAction("pound");
Symbol 3767 MovieClip [shadow_figure_male] Frame 98
endAction("prepare");
Symbol 3767 MovieClip [shadow_figure_male] Frame 101
startHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 105
stopHitCheck();
Symbol 3767 MovieClip [shadow_figure_male] Frame 108
endAction("uppercut");
Symbol 3767 MovieClip [shadow_figure_male] Frame 118
endAction("wound");
Symbol 3767 MovieClip [shadow_figure_male] Frame 120
useTrinket();
Symbol 3767 MovieClip [shadow_figure_male] Frame 122
endAction("cast_sheep");
Symbol 3767 MovieClip [shadow_figure_male] Frame 170
endAction("death");
Symbol 3854 MovieClip [cock] Frame 1
#initclip 236
Object.registerClass("cock", NPCTemplate);
#endinitclip
Symbol 3854 MovieClip [cock] Frame 10
endAction("idle");
Symbol 3854 MovieClip [cock] Frame 23
endAction("move");
Symbol 3854 MovieClip [cock] Frame 29
startHitCheck();
Symbol 3854 MovieClip [cock] Frame 32
stopHitCheck();
Symbol 3854 MovieClip [cock] Frame 33
endAction("attack");
Symbol 3854 MovieClip [cock] Frame 43
endAction("wound");
Symbol 3854 MovieClip [cock] Frame 53
endAction("death");