var original = {};
original.doLog =
"function doLog(b,a,c){$.browser.msie||(!0==a?console.error(b):console.log(b))}";
original.doInstantSpeedUp =
"function doInstantSpeedUp(b,a){var c=buildingById(b),d=getCurrentSpeedUpType(c.producing_archetype_id,c.recipe_symbol);if(!1==hasGold(instantSpeedCost(c.build_remaining,d),function(){doInstantSpeedUp(b,!0)},a)&&!0!=a)return!1;playSound(\"coins\");return speedBuild(-1,b)}";
original.doFinishProduction =
"function doFinishProduction(b){var a=buildingByItemId(b),c=itemFromId(a.producing_archetype_id);userContext.lastFinish=a.symbol;doLog(\"doFinishProduction: building_id=\"+b+\" symbol=\"+a.symbol+\" producing=\"+c.symbol);\"Upgrade\"!==c.slot&&(analytics.track(\"Production Finish\",{building_symbol:a.symbol,item_symbol:c.symbol,item_category:c.slot}),analytics.wizardtrack(\"Production Finish\",{building_symbol:a.symbol,item_symbol:c.symbol,item_category:c.slot}));var d=\"finish-\"+b;userLock(d)&&(playSound(\"build\"),\nisWeb()&&$(\"#collect_\"+a.symbol).html(\"\"),$.ajax({url:\"/play/finish_production/\"+b,dataType:\"JSON\",success:function(a){doLog(\"doFinishProduction: succeess \");freeLock(d);var c=buildingByItemId(b,a.building);userContext.playerData.character=a.character;userContext.playerData.user.money=a.user.money;userContext.playerData.stat.onboarding=a.stat.onboarding;userContext.playerData.stat.num_items_produced=a.stat.num_items_produced;userContext.playerData.stat.produced_stone=a.stat.produced_stone;userContext.playerData.stat.building_upgrades_finished=\na.stat.building_upgrades_finished;c.producing_archetype_id=void 0;c.modifier=void 0;c.recipe_symbol=void 0;var f=extractItemBySymbol(playerInventory,c.symbol);f.effective_upgrade_level=a.building.effective_upgrade_level;f.producing_archetype_id=void 0;f.modifier=void 0;f.recipe_symbol=void 0;if(a.produced_item)if(userContext.intCurrentRecipeIndex=void 0,doLog(\"doFinishProduction: data.produced_item.id=\"+a.produced_item.id+\" quantity=\"+a.produced_item.quantity),insertInventoryFromItem(playerInventory,\na.produced_item),theNewItem=extractItemById(playerInventory,a.produced_item.id),1==a.is_loot)0<a.enhanced_loot_roll?dialogAlert({style:\"alert\",text:\"The result of your production (enhanced) is: \"+a.produced_full_name,items:[theNewItem],heading:\"You have produced...\",button1:\"Okay\"}):dialogAlert({style:\"alert\",text:\"The result of your production is: \"+a.produced_full_name,items:[theNewItem],heading:\"You have produced...\",button1:\"Okay\"});else if(0<a.affix_chance){var p;p=\"\"+(\"You have a \"+a.affix_chance_from_stats+\n\"% chance to produce a superior-quality item from your talents, equipment and buildings.\");a.bonus_item_name&&(p+=\" Your \"+a.bonus_item_name+\" adds another +\"+a.affix_chance_from_bonus+\"% chance to produce a superior-quality item from your talents, equipment and buildings.\");p=a.affix_roll1<=a.affix_chance&&a.affix_roll2<=a.affix_chance?p+\"<p/>Critical Success! You obtained a superb result!\":a.affix_roll1>a.affix_chance&&a.affix_roll2>a.affix_chance?p+\"<p/>You obtained a normal result.\":p+\"<p/>Success! You obtained a good result.\";\nvar q=JSON.parse(JSON.stringify(theNewItem));void 0!=a.produced_quantity&&(q.quantity=a.produced_quantity,q.available_quantity=a.produced_quantity);dialogAlert({style:\"alert\",text:p,items:[q],heading:a.produced_full_name,button1:\"Okay\"})}userContext.newBldgOrUpgrade=!0;var m;\"Upgrade\"!=theNewItem.slot?(userContext.newProducedItem=theNewItem,isWeb()&&$(\"#collect_\"+f.symbol).html(renderUpgradeCollect(f)),isWeb()&&$(\"#build_panel_action_\"+f.id).html(renderBuildPanelAction(f)),isWeb()&&$(\"#speed_button_\"+\nf.id).hide()):m=theNewItem.symbol;isWeb()?(renderBuildingInventory(userContext.playerData),renderBuildingsOnScreen(userContext.playerData)):(f=void 0,f=void 0==m?{symbol:c.symbol,status:\"idle\"}:{symbol:c.symbol,status:\"idle\",upgrade:m},iosSignal(\"finish_production\",\"update\",f),isAndroid()&&mobileCooldownDataSignal([{mode:\"building\",symbol:c.symbol}]),refreshActiveBuildingPanel(),$(\"#building_tab_prod, .buildingupgradetree\").fadeTo(\"slow\",\"1\"));uiEvent(\"do_finish_production\");uiEvent(\"building_panel_\"+\nuserContext.activeBuildingPanel);a.produced_item&&\"stacks_of_coins\"==a.produced_item.symbol&&retrievePlayerData(!0,function(a){userContext.playerData.quests=a.quests;reRenderQuestActionItems()});\"Upgrade\"==theNewItem.slot&&buildingUpgradePanel(c.symbol);updatePlayerInfo(userContext.playerData);updateAllStatus()}}))}";
original.doProduction =
"function doProduction(b,a,c,d,g){userContext.lastFinish=void 0;void 0==c&&(c=1);doLog(\"doProduction: symbol=\"+b+\" producer=\"+a+\" quantity=\"+c);var k=void 0,f=\"\",p=void 0,q=\"\",m=void 0,D=void 0,w=[],s=[],z=[],u=!1;uiEvent(\"start_production\");void 0==userContext.playerData.stat.num_shop_items_started&&(userContext.playerData.stat.num_shop_items_started=0);userContext.playerData.stat.num_shop_items_started+=1;for(var y=0;y<userContext.recipeData.length;y++)if(g==userContext.recipeData[y].symbol||void 0==\ng&&(userContext.recipeData[y].output==b||userContext.recipeData[y].output_loot==b)&&userContext.recipeData[y].category==a){k=userContext.recipeData[y];k.output==b?(m=itemFromSymbol(b),q=m.full_name):(k.output_loot==b&&(p=b),q=k.name);D=y;components=userContext.recipeData[y].input.split(\",\");quantity_components=userContext.recipeData[y].input_quantity.split(\",\");var E=itemFromSymbol(userContext.recipeData[y].category);if(!0==userContext.recipeData[y].unlocked){if(1<userContext.recipeData[y].input.length)for(E=\n0;E<components.length;E++){var M=itemFromSymbol(components[E]),L=!1;0==E&&!0==userContext.recipeData[y].evolution&&(L=!0);L=sumInventoryQuantity(M.symbol,L);if(parseInt(quantity_components[E])*c>L){\"\"==f&&(f=\"You need more of the following:<p/>\");f+=\"<div>\";if(4<=userContext.playerData.character.level)switch(components[E]){case \"stone\":case \"iron\":case \"fur\":case \"ore\":case \"horse\":case \"riverways_fish_consumable\":case \"smallfolk\":case \"wood\":case \"cloth\":case \"grains\":L=parseInt(quantity_components[E])*\nc-L;if(cost_item=itemFromSymbol(\"pennyroyal\"))var W=cost_item.price_perk_points*L;f+='<div id=\"basic_resource_'+components[E]+'\">';f+=itemMiniView(M,{extra_styles:\"left:-70px\",quantity_override:L});f+='<span style=\"position: relative; left: 250px; top: -88px\" class=\"btnwrap btnmed btnprice\" onclick=\"getBasicResource(\\''+components[E]+\"',\"+L+',true);\"><span class=\"btnedge\"><a class=\"btngold\">Get Now</a><em>for</em><strong>'+W+\"</strong></span></span>\";f+=\"</div>\";break;default:f+=itemMiniView(M)}f+=\n\"</div>\";f+=\"<p>\"+M.howto+\"</p>\"}else 1<c&&(u=!0,s.push(M),z.push(parseInt(quantity_components[E])*c),w.push(M.full_name))}}else f=\"You need <em>\"+E.full_name+\"</em> to produce that.\";break}if(\"\"!=f)doAlert(\"Requirements: \"+q,f),analytics.track(\"Production Blocked-Resources\",{item_symbol:b}),analytics.wizardtrack(\"Production Blocked-Resources\",{item_symbol:b});else if(k&&hasMoney(k.craft_cost*c,function(){doProduction(b,a,c,d,g)})){f=JSON.parse(JSON.stringify(userContext.playerData.inventory));y=\n[];k.output==b?(m=itemFromSymbol(b),q=m.full_name):(k.output_loot==b&&(p=b),q=k.name);components=k.input.split(\",\");quantity_components=k.input_quantity.split(\",\");E=itemFromSymbol(k.category);if(!0==k.unlocked&&(userContext.intCurrentRecipeIndex=D,1<k.input.length))for(E=0;E<components.length;E++)M=itemFromSymbol(components[E]),L=!1,0==E&&!0==k.evolution&&(L=!0),depleteItems(M.symbol,parseInt(quantity_components[E])*c,void 0,y,L);for(E=0;E<y.length;E++)if(q=itemFromSymbol(y[E].symbol),y[E].full_name!=\nq.full_name)s.push(JSON.parse(JSON.stringify(y[E]))),w.push(y[E].full_name);else if(itemHasSeals(y[E])&&(!y[E].preserve_attributes||!1==y[E].preserve_attributes))s.push(JSON.parse(JSON.stringify(y[E]))),q=generateSealNameList(y[E]),w.push(\"[\"+y[E].full_name+\" : \"+q+\"]\");if(!0!=d&&0<s.length)return playerInventory=JSON.parse(JSON.stringify(f)),userContext.playerData.inventory=playerInventory,p=u?\"Producing %{value} of %{symbol} will consume multiples of your materials: \".replace(\"%{value}\",c).replace(\"%{symbol}\",\nm.full_name):\"Producing this item now will consume superior versions of your materials: \",m=u?\"Are you sure you want to consume these material quantities to produce %{value} of this item?\".replace(\"%{value}\",c):\"Are you sure you want to contribute superior versions of materials to produce this item?\",w[w.length-1]=\"and \"+$(w).last()[0],dialogAlert({style:\"confirm\",margin_top:100,items:s,item_quantity:z,craft_confirm_items:!0,button2:\"Not Now\",button2_action:function(){closeAlert()},button1:\"Confirm\",\nbutton1_action:function(){closeAlert();return doProduction(b,a,c,!0,g)},heading:u?\"Confirm Resource Use\":\"Confirm Superior Materials\",text:p+w.join(\", \")+\".<p/>\"+m}),!1;var h=buildingBySymbol(userContext.activeBuildingPanel);h.build_remaining=k.craft_duration*c;h.original_build_seconds=k.craft_duration*c;h.build_progress=0;\"\"!=k.output&&(h.producing_archetype_id=itemFromSymbol(k.output).id);h.recipe_symbol=k.symbol;h.action_sub_id=c;f=renderBuildingConstruction(h);isWeb()&&$(\"#bc_\"+h.id).html(f);\ndisplayBuildingCooldown(h);\"Upgrade\"==itemFromId(h.producing_archetype_id).slot?buildingUpgradePanel(userContext.activeBuildingPanel,!0,!1):(buildingUpgradePanel(userContext.activeBuildingPanel,!0,!1,!0),buildingTabProd(),isWeb()&&$(\"#collect_\"+h.symbol).html(renderUpgradeCollect(h)));w=\"/play/set_production\";w=(p?w+(\"?loot_symbol=\"+p+\"&producer_symbol=\"+a):m?w+(\"/\"+b+\"?producer_symbol=\"+a):w+(\"?producer_symbol=\"+a))+(\"&quantity=\"+c);g&&(w+=\"&recipe_symbol=\"+g);$.ajax({url:w,dataType:\"JSON\",success:function(a){userContext.prodProgressShow=\nvoid 0;userContext.playerData.stat.num_shop_items_started=a.num_shop_items_started;updateAllStatus();uiEvent(\"do_production\");isWeb()||iosSignal(\"building\",\"cooldown\",mobileCooldownData({mode:\"building\",symbol:h.symbol,flag:\"production_started\"}))}})}}";
original.buildTimerUpdate =
"function buildTimerUpdate(b,a,c){doLog(\"buildTimerUpdate: id=\"+b+\" remaining=\"+a);$(\"#timer-\"+b).html(renderBuildTime(a));$(\"#timer-panel-\"+b).html(renderBuildTime(a));percent=100-100*(a/c);$(\"#progress-\"+b).html('<span style=\"width:'+percent+'%;\"></span>');var d=buildingById(b);d.build_remaining=a;markup=renderBuildPanelAction(d);$(\"#speed_button_\"+b).show();$(\"#build_panel_action_\"+b).html(markup);$(\"#production_timer_\"+b).html(renderBuildTime(d.build_remaining,!0));$(\"#production_timer_upper_\"+\nb).html(renderBuildTime(d.build_remaining));$(\"#production_progress_\"+b).css({width:percent+\"%\"});$(\"#duration_long_\"+b).html(durationLong(buildTimerDescription(d),a,c));a--;userContext.doBuildId==b&&(300>=a?($(\"#speed_up_skip_block\").hide(),$(\"#speed_up_skip_use\").show()):($(\"#speed_up_skip_use\").hide(),$(\"#speed_up_skip_block\").show()),$(\".speed_building_\"+b).html()!=renderSpeedUpButton(b)&&$(\".speed_building_\"+b).html(renderSpeedUpButton(b)));d.cooldown=a;d.original_cooldown_seconds=c;displayBuildingCooldown(d);\n0<a||(closeSpeedUp(),finalizeBuildingConstruction(d),clearBuildingTimer(d.symbol))}";
original.doCollect =
"function doCollect(b){lock_name=\"collect-\"+b;if(userLock(lock_name)){var a=buildingByItemId(b);0<predictCollect(a)&&(playSound(\"coins\"),isWeb()&&animatedCoins.init($(\"#collectbtn\"),$(\"#silver\"),[-10,-40],[-72,-44]));uiEvent(\"collect_\"+buildingSymbolFromItemId(b),userContext.PlayerData);the_url=\"/play/collect_building/\"+b+\"?client_seqnum=\"+userContext.player_data_seqnum;isWeb()||showSpinner();$.ajax({url:the_url,dataType:\"JSON\",success:function(c){freeLock(lock_name);doLog(\"doCollect: building_id=\"+\nb+\" data.money=\"+c.money);updateSilver(c.money);updateBaseTime(c.base_time);a.last_collected_at=c.last_collected_at;userContext.playerData.stat.buildings_collected=c.buildings_collected;userContext.playerData.stat.onboarding=c.onboarding;isWeb()||(iosSignal(\"building_collected\"),hideSpinner());isWeb()&&$(\"#collect_\"+a.symbol).html(renderUpgradeCollect(a));buildingUpgradePanel(a.symbol);c=renderBuildingOwned(a);isWeb()&&$(\"#bc_\"+a.id).html(c);updateAllStatus();questListings()}})}}";
original.claimDaily =
"function claimDaily(){showSpinner();$.ajax({url:\"/play/advice_claim_daily\",dataType:\"JSON\",success:function(b){hideSpinner();$(\"#claimed_holder\").html(\"<h5>Claimed</h5>\");updateSilver(b.total_silver);updateGold(b.total_gold);$(\".claimrewardchest\").hide();$(\"#daily_reward_statview\").html(itemStatViewFromSymbol(b.item,{produce:\"Continue\",produce_callback:\"welcomeClaimed\"}));$(\"#dailynewsbtn\").removeClass(\"btnglow\");var a=buildingBySymbol(\"keep\");userContext.playerData.stat.daily_streak_claimed=userContext.playerData.stat.daily_streak;\na&&$(\"#bc_\"+a.id).html(renderBuildingOwned(a));isWeb()||iosSignal(\"daily_reward_claimed\",void 0,b.item)}});return!1}";
original.applySelectedUpgrade =
"function applySelectedUpgrade(b,a){lock_name=\"upgrade-\"+b.id;var c=void 0;userContext.lastFinish=void 0;if(0<b.gold&&void 0==a)doGoldUnlock(b.id,function(){applySelectedUpgrade(b,!0)});else if(hasMoney(b.silver,function(){applySelectedUpgrade(b,a,b.silver)})&&userLock(lock_name)){var d=buildingUpgradeResourceCheck(b.building_id,b.id);if(isWeb()){if(void 0!=d.markup&&\"\"!=d.markup){doAlert(\"Resources Required\",\"You need additional resources to construct that upgrade:<p/>\"+d.markup);return}}else if(void 0!=\nd.strMissingComponentText){if(isAndroid()){iosSignal(\"building\",\"upgrade_fail\",d);return}return d}c=d.item;playSound(\"build\");var g=buildingById(b.building_id);itemFromSymbol(g.symbol);d=extractItemBySymbol(userContext.playerData.inventory,g.symbol).upgrade_level-1;0>d&&(d=0);userContext.buildIndex++;g.build_progress=0;g.producing_archetype_id=c.id;$.ajax({url:\"/play/apply_upgrade/\"+b.id,dataType:\"JSON\",success:function(a){freeLock(lock_name);if(a.resource_list)for(var d=0;d<a.resource_list.length;d++){var p=\nextractItemBySymbol(playerInventory,a.resource_list[d]);p&&(p.quantity-=parseInt(a.resource_quantities[d]))}updateSilver(a.money);updateBaseTime(a.base_time);userContext.playerData.stat.onboarding=a.onboarding;userContext.playerData.stat.building_upgrades_added=a.building_upgrades_added;g.build_remaining=a.build_remaining;g.original_build_seconds=a.original_build_seconds;displayBuildingCooldown(g);isWeb()&&buildingUpgradePanel(g.symbol);a=renderBuildingConstruction(g);$(\"#bc_\"+g.id).html(a);uiEvent(\"add_\"+\nuserContext.activeBuildingPanel,userContext.PlayerData);selectedUpgrade=extractItemBySymbol(playerInventory,c.symbol);q_upgrade=1;selectedUpgrade&&(q_upgrade=selectedUpgrade.quantity+1);$(\"#addbtn_container\").html(addButtonUpgrade(c,!1,q_upgrade));isWeb()?selectUpgrade(userContext.activeUpgrade):iosSignal(\"building\",\"cooldown\",mobileCooldownData({mode:\"building\",symbol:g.symbol,flag:\"production_started\"}));questListings();analytics.track(\"Building Apply-Upgrade\",{building:userContext.activeBuildingPanel,\nupgrade:itemData[itemById[b.id]].symbol,cost:itemData[itemById[b.id]].cost});analytics.wizardtrack(\"Building Apply-Upgrade\",{building:userContext.activeBuildingPanel,upgrade:itemData[itemById[b.id]].symbol,cost:itemData[itemById[b.id]].cost})}})}}";
original.speedBuild =
"function speedBuild(b,a){$(\"#modal_dialogs_top2\").hide();doLog(\"speedBuild: speed_item=\"+b+\" item_id=\"+a);$.ajax({url:\"/play/build_now/\"+a+\"?complete=\"+b,dataType:\"JSON\",success:function(c){doLog(\"speedBuild: returned, data.building.id=\"+c.building.id);userContext.playerData.user.money=c.user.money;userContext.playerData.stat.onboarding=c.stat.onboarding;userContext.playerData.chapter=c.chapter;var d=buildingById(a,c.building);doLog(\"speedBuild: speed_item:\");doLog(c.speed_item);c.speed_item&&insertInventoryFromItem(userContext.playerData.inventory,\nc.speed_item);insertInventoryFromItem(userContext.playerData.inventory,c.produced_item);logLastItem(\"speedBuild:A\");userContext.buildingsData&&(userContext.playerData.buildings=userContext.buildingsData);playerInventory&&(userContext.playerData.inventory=playerInventory);userContext.chapterData=c.chapter;d&&(analytics.track(\"SpeedUp-Building\",{building:d.symbol,speed_item:b}),analytics.wizardtrack(\"SpeedUp-Building\",{building:d.symbol,speed_item:b}));userContext.buildIndex++;logLastItem(\"speedBuild:B\");\nfinalizeBuildingConstruction(d);isItemBuildingUpgrade(d)||void 0==d.producing_archetype_id&&void 0==d.recipe_symbol?(renderBuildingInventory(userContext.playerData,buildingUpgradePanel,userContext.activeBuildingPanel,!0),isWeb()||iosSignal(\"building\",\"cooldown\",mobileCooldownData({mode:\"building\",symbol:d.symbol,flag:\"speed_up\"}))):(userContext.craftingItemFinished=!0,renderBuildingInventory(userContext.playerData,buildingUpgradePanelProd,userContext.activeBuildingPanel,!0),$(\"#collect_\"+d.symbol).html(renderUpgradeCollect(d)),\n$(\"#build_panel_action_\"+d.id).html(renderBuildPanelAction(d)),$(\"#speed_button_\"+d.id).hide());renderBuildingsOnScreen(userContext.playerData);d&&uiEvent(\"building_panel_\"+d.symbol)}})}";
original.uiEvent =
"function uiEvent(b,a,c){if(isWeb()){doLog(\"uiEvent: event_name=[\"+b+\"]\");a=userContext.playerData;if(void 0==a)return doLogEvent(\"uiEvent: playerData null\"),!1;var d=\"\",g=!1,k=void 0,f=void 0,p=void 0,q=void 0,m=void 0,D=f=\"\",p=\"Okay\",w=void 0,s=void 0,z=0,u=0,y=240,E=0,M=0,L=0,W=\"\",h=\"\",C=void 0,B=0,A=0,H=void 0,O=void 0,I=void 0,Q=!1,P=void 0,R=void 0,V=void 0,X=void 0,T=void 0,U=void 0,ba=!1,S=void 0,ca=!0,Y=!1,Z=void 0,aa=!1,ea;\"confirm_override\"==b&&(ba=g=!0,Q=!1);h=\"test_event\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_test_event\"),g=!0,d=\"ui_test_event\",!0==g&&(w=subGotStrings(\"Text to display <strong>next</strong> to something.\"),z=void 0!=c&&void 0!=c.y?c.y:20,u=void 0!=c&&void 0!=c.x?c.x:50,C=\"top_left\",s=\".alignmenttabs\"),doLogEvent(\"after checks=\"+g);h=\"test_alert\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_test_alert\"),g=!0,d=\"ui_test_alert\",!0==g&&(k='You will spend Silver<img src=\"/images/icon-silver-sm.png\" class=\"tutorial_coin\"></img> to grow your holdings',D=\"test_alert_testhttps://intranet.disruptorbeam.com:8443/browse/GOT-9993\"),doLogEvent(\"after checks=\"+g);h=\"test_arrow\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_test_arrows\"),\ng=!0,d=\"ui_test_arrows\",!0==g&&(C=\"top_right\",s=\".bonus\",h=\"0\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"0\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"test_clear\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_test_clear\"),g=!0,d=\"ui_test_clear\",!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:20,u=void 0!=c&&void 0!=c.x?c.x:50,s=\".actionheader\"),doLogEvent(\"after checks=\"+\ng);h=\"ui_test\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_test_alert_chain\"),g=!0,d=\"ui_test_alert_chain\",!0==g&&(k=\"This is a test message.\",D=\"test_alert\"),doLogEvent(\"after checks=\"+g);h=\"alert_test_alert_button1\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_test_alert_chain2\"),\ng=!0,d=\"ui_test_alert_chain2\",doLogEvent(\"uiEvent: exclude_flag=test_flag\"),the_val=0,void 0!=userContext.flags.test_flag&&(the_val=userContext.flags.test_flag),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"This appears if test_flag is not set (which it should now be)\"),s=\".actionheader\",H=\"test_flag\"),doLogEvent(\"after checks=\"+g);h=\"alert_test_alert_button1\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_test_alert_chain3\"),\ng=!0,d=\"ui_test_alert_chain3\",doLogEvent(\"uiEvent: require_flag = test_flag\"),1!=userContext.flags.test_flag&&(g=!1),!0==g&&(w=subGotStrings(\"test_flag was previously set\"),s=\".actionheader\"),doLogEvent(\"after checks=\"+g);h=\"test_device\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_device_web_event\"),g=!0,d=\"ui_device_web_event\",!0!=isDevice(\"web\")&&(g=!1),!0==g&&(k=\"This is a Web device.\",\nD=\"test_alert\"),doLogEvent(\"after checks=\"+g);h=\"test_device\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_device_ipad_event\"),g=!0,d=\"ui_device_ipad_event\",!0!=isDevice(\"ipad\")&&(g=!1),!0==g&&(k=\"This is an iPad!\",D=\"test_alert\"),doLogEvent(\"after checks=\"+g);h=\"test_ios_signal\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,\nh.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_device_test_ios_signal\"),g=!0,d=\"ui_device_test_ios_signal\",!0==g&&(q=\"test\",m=\"additional:test_parameters\"),doLogEvent(\"after checks=\"+g);h=\"test_native_device\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_native_device_test\"),g=!0,d=\"ui_native_device_test\",!0==g&&(w=subGotStrings(\"This is a tooltip for native device code\"),\nz=void 0!=c&&void 0!=c.y?c.y:300,u=void 0!=c&&void 0!=c.x?c.x:200,y=200),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g){doLogEvent(\"ui triggered: ui_onboarding_begin\");var g=!0,d=\"ui_onboarding_begin\",h=\"pro_q1_take_the_slavers_keep\",K=h.replace(\"[\",\"\").replace(\"]\",\"\");doLogEvent(\"quest_active: \"+h);if(-1!=h.indexOf(\",\")){var G=/\\[.*\\]/.test(h),N=!G;$.each(K.split(\",\"),\nfunction(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1});N||(g=!1)}else!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1);!0==g&&(w=subGotStrings(\"Start your first <strong>Quest</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:94,u=void 0!=c&&void 0!=c.x?c.x:320,y=171,C=\"left\",s=\"#actionmenu\",h=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h);doLogEvent(\"after checks=\"+g)}h=\n\"quest_3option_pro_q1_take_the_slavers_keep\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_jons_command\"),g=!0,d=\"ui_jons_command\",!0==g&&(w=subGotStrings(\"Read this speech from <strong>Lord Jon Arryn</strong>.\"),M=5E3,W=\"fade_ui_jon_command\",z=void 0!=c&&void 0!=c.y?c.y:300,u=void 0!=c&&void 0!=c.x?c.x:400,y=185,E=58,C=\"top_left\",s=\".questiconcircle\",h=\"233\",A=-1!=h.indexOf(\",\")?\nh.split(\",\"):h,h=\"370\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"fade_ui_jon_command\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_jon_command2\"),g=!0,d=\"ui_jon_command2\",!0==g&&(w=subGotStrings(\"Answer him by clicking on the <strong>Decision</strong> button below.\"),z=void 0!=c&&void 0!=c.y?c.y:315,u=void 0!=c&&void 0!=c.x?c.x:285,y=225,E=64,C=\"bottom_left\",\ns=\".questiconcircle\",h=\"358\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"246\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"quest_results_pro_q1_take_the_slavers_keep\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_results_pro_q1_take_the_slavers_keep\"),g=!0,d=\"ui_quest_results_pro_q1_take_the_slavers_keep\",!0==g&&(w=subGotStrings(\"<strong>Rewards</strong> display at the end of a Quest.\"),\nM=1E5,W=\"fade_ui_quest_results_pro_q1_take_the_slavers_keep\",z=void 0!=c&&void 0!=c.y?c.y:18,u=void 0!=c&&void 0!=c.x?c.x:350,y=165,C=\"left\",s=\".rewardwrapper\",h=\"14\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"276\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"fade_ui_quest_results_pro_q1_take_the_slavers_keep\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_fade_ui_quest_results_pro_q1_take_the_slavers_keep\"),\ng=!0,d=\"ui_fade_ui_quest_results_pro_q1_take_the_slavers_keep\",!0==g&&(s=\".rewardwrapper\",h=\"96\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-275\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"quest_close_pro_q1_take_the_slavers_keep\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_close_pro_q1_take_the_slavers_keep\"),g=!0,d=\"ui_quest_close_pro_q1_take_the_slavers_keep\",\ndoLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_pro_pro_q2_a_widowers_oath\"),g=!0,d=\"ui_pro_pro_q2_a_widowers_oath\",h=\"pro_q2_a_widowers_oath\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+\nb+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"<strong>New</strong> Quests appear here. Click here to start this Quest.\"),z=void 0!=c&&void 0!=c.y?c.y:94,u=void 0!=c&&void 0!=c.x?c.x:320,y=185,C=\"left\",s=\"#actionmenu\",h=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"quest_post_pro_q2_a_widowers_oath_action_choice_1, quest_post_pro_q2_a_widowers_oath_initial_choice_2\";\ndoLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_post_pro_choose_pro_q2_a_widowers_oath\"),g=!0,d=\"ui_quest_post_pro_choose_pro_q2_a_widowers_oath\",!0==g&&(w=subGotStrings(\"You now have a <strong>Sworn Sword</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:-86,u=void 0!=c&&void 0!=c.x?c.x:399,y=158,C=\"bottom_left\",s=\".rewardwrapper\",h=\"-48\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"354\",\nB=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_sworn_sword_reward\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_pro_q3_ss_blood_at_last\"),g=!0,d=\"ui_pro_q3_ss_blood_at_last\",h=\"pro_q3_ss_blood_at_last\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,\nb){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"Click here to send <strong>Ser Hugo</strong> on this Quest.\"),z=void 0!=c&&void 0!=c.y?c.y:94,u=void 0!=c&&void 0!=c.x?c.x:320,y=135,C=\"left\",s=\"#actionmenu\",h=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+\ng);h=\"ss_action_open_quest\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_action_open\"),g=!0,d=\"ui_ss_action_open\",h=\"pro_q3_ss_blood_at_last\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),\n(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),doLogEvent(\"uiEvent: exclude_flag=flag_ss_action_tutorial\"),the_val=0,void 0!=userContext.flags.flag_ss_action_tutorial&&(the_val=userContext.flags.flag_ss_action_tutorial),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"<strong>Sworn Swords</strong> can be sent to complete quest objectives. Their success depends on your skills as well as their own.\"),z=void 0!=c&&void 0!=c.y?c.y:-37,u=void 0!=\nc&&void 0!=c.x?c.x:176,y=309,E=100,s=\"#vsbtminfo\",P=\"true\",R=\"quest_next_q3_ss_blood_at_last_tutorial_1\"),doLogEvent(\"after checks=\"+g);h=\"quest_next_q3_ss_blood_at_last_tutorial_1\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_next_q3_ss_blood_at_last_tutorial_1\"),g=!0,d=\"ui_quest_next_q3_ss_blood_at_last_tutorial_1\",h=\"pro_q3_ss_blood_at_last\",K=h.replace(\"[\",\"\").replace(\"]\",\n\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"First, select a <strong>Sworn Sword</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:15,u=void 0!=c&&void 0!=c.x?c.x:454,y=155,C=\"left\",s=\".miniviewselect\",h=\"12\",A=-1!=\nh.indexOf(\",\")?h.split(\",\"):h,h=\"396\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_ss_action_tutorial\"),doLogEvent(\"after checks=\"+g);h=\"ss_choose_item_sworn_sword_hugo_temp\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_choose_item_sworn_sword_hugo_temp\"),g=!0,d=\"ui_ss_choose_item_sworn_sword_hugo_temp\",h=\"pro_q3_ss_blood_at_last\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+\nh),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"Next, select an <strong>Action</strong> for your Sworn Sword to perform.<br>\"),z=void 0!=c&&void 0!=c.y?c.y:230,u=void 0!=c&&void 0!=c.x?c.x:176,y=309,C=\"top, top, top\",s=\".miniviewselect\",h=\"170, 170, 170\",\nA=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"69, 283, 492\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flags_ss_actions_show\"),doLogEvent(\"after checks=\"+g);h=\"ss_select_action_fight, ss_select_action_sabotage, ss_select_action_bribe\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_select_action\"),g=!0,d=\"ui_ss_select_action\",h=\"pro_q3_ss_blood_at_last\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),\ndoLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"Click here to send your Sworn Sword into the fray!\"),z=void 0!=c&&void 0!=c.y?c.y:240,u=void 0!=c&&void 0!=c.x?c.x:441,y=230,C=\"left\",s=\"#vsbtminfo\",h=\"235\",A=-1!=h.indexOf(\",\")?\nh.split(\",\"):h,h=\"375\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"open_progress\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_select_action_clear_tooltips\"),g=!0,d=\"ui_ss_select_action_clear_tooltips\",h=\"pro_q3_ss_blood_at_last\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),\nfunction(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),doLogEvent(\"after checks=\"+g);h=\"quest_ss_results_pro_q3_ss_blood_at_last\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_display_by_id_ss_go\"),g=!0,d=\"ui_quest_display_by_id_ss_go\",\nh=\"pro_q3_ss_blood_at_last\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"<strong>Rewards</strong> for Sworn Sword Quests appear here.\"),z=void 0!=c&&void 0!=c.y?c.y:200,u=void 0!=\nc&&void 0!=c.x?c.x:488,y=162,C=\"left\",s=\"#vsbtminfo\",h=\"206\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"406\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_pro_pro_q4_a_royal_reward\"),g=!0,d=\"ui_pro_pro_q4_a_royal_reward\",h=\"pro_q4_a_royal_reward\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+\nh),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"Click here to start this Quest.\"),z=void 0!=c&&void 0!=c.y?c.y:94,u=void 0!=c&&void 0!=c.x?c.x:320,y=185,C=\"left\",s=\"#actionmenu\",h=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?\nh.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"quest_3option_pro_q4_a_royal_reward\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_3option_pro_q4_a_royal_reward\"),g=!0,d=\"ui_quest_3option_pro_q4_a_royal_reward\",!0==g&&(w=subGotStrings(\"<strong>Alignment</strong> points are rewarded when making different choices during a quest, and can unlock special content later. \"),z=void 0!=\nc&&void 0!=c.y?c.y:-96,u=void 0!=c&&void 0!=c.x?c.x:258,y=336,C=\"bottom_right, bottom_right\",s=\"#questchoicecenter\",h=\"45, 137\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"298, 298\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,V=\"true\"),doLogEvent(\"after checks=\"+g);h=\"quest_results_pro_q4_a_royal_reward\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_results_pro_q4_a_royal_reward\"),g=!0,\nd=\"ui_quest_results_pro_q4_a_royal_reward\",!0==g&&(H=\"royal_reward\"),doLogEvent(\"after checks=\"+g);h=\"quest_close_pro_q4_a_royal_reward\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_close_pro_q4_a_royal_reward\"),g=!0,d=\"ui_quest_close_pro_q4_a_royal_reward\",!0==g&&(S=\"chapters\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");\nif((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_hud_1\"),g=!0,d=\"ui_lore_book_hud_1\",a.stat?(doLogEvent(\"watch: chapter_complete_1_1: value=\"+(a.stat.chapter_complete_1_1+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chapter_complete_1_1?parseInt(a.stat.chapter_complete_1_1)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quests_started: value=\"+(a.stat.quests_started+\"\")+\" vs. required=4\"),the_val=void 0!=a.stat.quests_started?\nparseInt(a.stat.quests_started)||0:0,\"4\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:294,u=void 0!=c&&void 0!=c.x?c.x:385,y=312,C=\"top\",s=\".chapteractionheader\",h=\"75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-4\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"lorebook_animation_1_end\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_description\"),\ng=!0,d=\"ui_lore_book_description\",!0==g&&(w=subGotStrings(\"The <strong>Lorebook</strong> tracks your progress through the game and rewards you for completing each chapter.\"),z=void 0!=c&&void 0!=c.y?c.y:154,u=void 0!=c&&void 0!=c.x?c.x:197,y=346,s=\"#book_style\",P=\"true\",R=\"lore_book_noble\"),doLogEvent(\"after checks=\"+g);h=\"lore_book_description_2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_description_2\"),\ng=!0,d=\"ui_lore_book_description_2\",!0==g&&(w=subGotStrings(\"Clicking on the green <strong>Go</strong> button next to a chapter task will open the associated content.\"),z=void 0!=c&&void 0!=c.y?c.y:162,u=void 0!=c&&void 0!=c.x?c.x:254,y=230,s=\"#book_style\",P=\"true\",R=\"lore_book_noble\"),doLogEvent(\"after checks=\"+g);h=\"lore_book_noble\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_noble\"),\ng=!0,d=\"ui_lore_book_noble\",!0==g&&(w=subGotStrings(\"<strong>Become Nobility:</strong> Accept the title of Lord or Lady and become a noble in your own right.\"),z=void 0!=c&&void 0!=c.y?c.y:220,u=void 0!=c&&void 0!=c.x?c.x:345,y=330,C=\"top\",s=\"#book_style\",h=\"150\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"469\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"chapter_claimed_1_1\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_noble_claimed\"),g=!0,d=\"ui_lore_book_noble_claimed\",!0==g&&(C=\"bottom\",s=\"#book_style\",h=\"403\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"647\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"claim_chapter_reward\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_claim_chapter_reward\"),g=!0,d=\"ui_claim_chapter_reward\",\ndoLogEvent(\"uiEvent: require_flag = royal_reward\"),1!=userContext.flags.royal_reward&&(g=!1),!0==g&&(O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"next_chapter_1\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_ch_2_close\"),g=!0,d=\"ui_lore_book_ch_2_close\",!0==g&&(C=\"top_right\",s=\"#book_style\",h=\"-68\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"661\",B=-1!=h.indexOf(\",\")?h.split(\",\"):\nh,H=\"flag_nobility_accepted\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_pro_pro_q5_the_maesters_welcome\"),g=!0,d=\"ui_pro_pro_q5_the_maesters_welcome\",h=\"pro_q5_the_maesters_welcome\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,\nb)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"Click here to start this Quest.\"),z=void 0!=c&&void 0!=c.y?c.y:94,u=void 0!=c&&void 0!=c.x?c.x:320,y=185,C=\"left\",s=\"#actionmenu\",h=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"quest_results_pro_q5_the_maesters_welcome\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_results_pro_q5_the_maesters_welcome\"),g=!0,d=\"ui_quest_results_pro_q5_the_maesters_welcome\",!0==g&&(S=\"toolbar\",H=\"enable_buildings\"),doLogEvent(\"after checks=\"+g);h=\"quest_close_pro_q5_the_maesters_welcome\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_close_pro_q5_the_maesters_welcome\"),\ng=!0,d=\"ui_quest_close_pro_q5_the_maesters_welcome\",!0==g&&(H=\"flag_maester_welcome\"),doLogEvent(\"after checks=\"+g);h=\"refresh_toolbar, click_main_toolbar\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_tab_open_web\"),g=!0,d=\"ui_building_tab_open_web\",a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=5\"),the_val=void 0!=a.stat.quests_succeeded?\nparseInt(a.stat.quests_succeeded)||0:0,\"5\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"counting_house\",a)&&(g=!1),\"web\"!=userContext.playerData.provider&&(g=!1),!0==g&&(Q=Boolean(\"true\"),w=subGotStrings(\"Click here to open the <strong>Buildings</strong> menu.\"),z=void 0!=c&&void 0!=c.y?c.y:-106,u=void 0!=c&&void 0!=c.x?c.x:44,y=173,C=\"bottom\",s=\"#navmenubox\",h=\"-41\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"93\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"refresh_toolbar, click_main_toolbar\";\ndoLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_tab_open_frame\"),g=!0,d=\"ui_building_tab_open_frame\",a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=5\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"5\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"counting_house\",a)&&(g=!1),!0==g&&(Q=\nBoolean(\"true\"),w=subGotStrings(\"Click here to open the <strong>Buildings</strong> menu.\"),z=void 0!=c&&void 0!=c.y?c.y:-106,u=void 0!=c&&void 0!=c.x?c.x:84,y=173,C=\"bottom\",s=\"#navmenubox\",h=\"-41\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"140\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"do_menu_select_buildings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_maester_holdings\"),\ng=!0,d=\"ui_quest_maester_holdings\",a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=5\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"5\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructing(\"counting_house\",a)&&(g=!1),ca=!1,!0==isBuildingConstructed(\"counting_house\",a)&&(g=!1),!0==g&&(w=subGotStrings('\"First, a <strong>Counting House</strong>. We can do nothing without coin, and great houses live or die by it.\"'),z=\nvoid 0!=c&&void 0!=c.y?c.y:-138,u=void 0!=c&&void 0!=c.x?c.x:125,y=264,C=\"bottom_left\",s=\"#buildingmenubox\",h=\"-20\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"75\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_panel_counting_house\"),g=!0,d=\"ui_building_panel_counting_house\",\n2<userContext.playerData.character.level&&(g=!1),!0==isBuildingConstructed(\"counting_house\",a)&&(g=!1),!0==g&&(w=subGotStrings(\"The Counting House allows you to collect <strong>Silver</strong>. Silver can be used to purchase Sworn Swords, items, and building upgrades.\"),z=void 0!=c&&void 0!=c.y?c.y:65,u=void 0!=c&&void 0!=c.x?c.x:473,y=272,C=\"left\",s=\".buildinginfoparchment\",h=\"118\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"372\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,P=\"true\",R=\"counting_house_tutorial_1\"),\ndoLogEvent(\"after checks=\"+g);h=\"counting_house_tutorial_1\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_tutorial_1\"),g=!0,d=\"ui_counting_house_tutorial_1\",!0==g&&(w=subGotStrings(\"Click here to construct the <strong>Counting House</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:70,u=void 0!=c&&void 0!=c.x?c.x:-214,y=230,C=\"top_right\",s=\"#upgradebtn\",h=\"33\",A=-1!=h.indexOf(\",\")?\nh.split(\",\"):h,h=\"-12\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"build_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_counting_house_speed\"),g=!0,d=\"ui_building_counting_house_speed\",3<userContext.playerData.character.level&&(g=!1),!0==g&&(w=subGotStrings(\"You can use a <strong>speed</strong> up item to finish tasks early.\"),z=\nvoid 0!=c&&void 0!=c.y?c.y:-145,u=void 0!=c&&void 0!=c.x?c.x:381,y=230,C=\"bottom\",s=\".buildinginfomid\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"462\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_counting_house_constructed\",O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_counting_house_finished\"),\ng=!0,d=\"ui_building_counting_house_finished\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: buildings_collected: value=\"+(a.stat.buildings_collected+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.buildings_collected?parseInt(a.stat.buildings_collected)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"uiEvent: require_flag = flag_counting_house_constructed\"),1!=userContext.flags.flag_counting_house_constructed&&(g=!1),!0==g&&(w=subGotStrings(\"Your Counting House has finished construction and collected its first taxes! Click here to collect the <strong>Silver</strong>.\"),\nz=void 0!=c&&void 0!=c.y?c.y:107,u=void 0!=c&&void 0!=c.x?c.x:-52,y=200,C=\"top\",s=\"#collectbtn\",h=\"30\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"building_panel_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_panel_counting_house_closebtn\"),g=!0,d=\"ui_building_panel_counting_house_closebtn\",a.stat?(doLogEvent(\"watch: buildings_collected: value=\"+\n(a.stat.buildings_collected+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.buildings_collected?parseInt(a.stat.buildings_collected)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:-30,u=void 0!=c&&void 0!=c.x?c.x:-40,C=\"top_right\",s=\"#chartabmenu\",h=\"-15\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"658\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");\nif((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_money_tutorial_step_1\"),g=!0,d=\"ui_money_tutorial_step_1\",2<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: buildings_collected: value=\"+(a.stat.buildings_collected+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.buildings_collected?parseInt(a.stat.buildings_collected)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"keep\",a)&&(g=!1),doLogEvent(\"uiEvent: exclude_flag=silver_tip\"),\nthe_val=0,void 0!=userContext.flags.silver_tip&&(the_val=userContext.flags.silver_tip),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Your current <strong>Silver</strong> and <strong>Gold</strong> amounts are listed here. <strong>Gold</strong> can be used to purchase Premium Sworn Swords, items, talents, or upgrades.<br>\"),z=void 0!=c&&void 0!=c.y?c.y:100,u=void 0!=c&&void 0!=c.x?c.x:440,y=330,C=\"top, top\",s=\"#topbar_alwaysShown\",h=\"34, 34\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"660, 480\",B=-1!=h.indexOf(\",\")?\nh.split(\",\"):h,H=\"silver_tip\",P=\"true\",R=\"build_keep_next\"),doLogEvent(\"after checks=\"+g);h=\"build_keep_next\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_build_keep_next\"),g=!0,d=\"ui_build_keep_next\",ca=!1,!0==isBuildingConstructed(\"keep\",a)&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings('\"Next, we must repair the <strong>Keep</strong>. You may also wish to give it a new name--what the slavers called it I do not wish to repeat.\"'),\nz=void 0!=c&&void 0!=c.y?c.y:-138,u=void 0!=c&&void 0!=c.x?c.x:205,y=270,C=\"bottom_left\",s=\"#buildingmenubox\",h=\"-23\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"158\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"constructed_keep\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_power_tutorial_1\"),g=!0,d=\"ui_power_tutorial_1\",2<userContext.playerData.character.level&&\n(g=!1),a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=5\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"5\"!=the_val+\"\"&&(g=!1)):g=!1,ca=!1,doLogEvent(\"uiEvent: exclude_flag=flag_power_tutorial_done\"),the_val=0,void 0!=userContext.flags.flag_power_tutorial_done&&(the_val=userContext.flags.flag_power_tutorial_done),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Naming your Keep has given you <strong>Power!</strong> Click here to view your current Power Ranking.\"),\nz=void 0!=c&&void 0!=c.y?c.y:125,u=void 0!=c&&void 0!=c.x?c.x:-220,y=184,C=\"top_right\",s=\"#portraitcircle-r\",h=\"77\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-45\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_power_tutorial_1_holdings\"),g=!0,d=\"ui_power_tutorial_1_holdings\",2<userContext.playerData.character.level&&\n(g=!1),a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=5\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"5\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"keep\",a)&&(g=!1),ca=!1,doLogEvent(\"uiEvent: exclude_flag=flag_power_tutorial_done\"),the_val=0,void 0!=userContext.flags.flag_power_tutorial_done&&(the_val=userContext.flags.flag_power_tutorial_done),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Naming your Keep has given you <strong>Power!</strong> Click here to view your current Power Ranking.\"),\nz=void 0!=c&&void 0!=c.y?c.y:125,u=void 0!=c&&void 0!=c.x?c.x:-220,y=184,C=\"top_right\",s=\"#portraitcircle-r\",h=\"77\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-45\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"power_modal_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_power_tutorial_2\"),g=!0,d=\"ui_power_tutorial_2\",a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+\n(a.stat.quests_succeeded+\"\")+\" vs. required=5\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"5\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"keep\",a)&&(g=!1),!0==g&&(w=subGotStrings('\"Robert Baratheon may be king now, but every noble in Westeros plays the game of thrones, and their success is measured by <strong>Power</strong>. Nearly every decision you make is a show of strength to others.\"'),z=void 0!=c&&void 0!=c.y?c.y:20,u=void 0!=c&&void 0!=c.x?c.x:\n528,y=265,s=\"#powertabmenu\",P=\"true\",R=\"power_tutorial_5\",T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"power_tutorial_5\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_power_tutorial_5\"),g=!0,d=\"ui_power_tutorial_5\",!0==g&&(w=subGotStrings(\"Keep your <strong>Power</strong> ranking high to unlock unique titles today and valuable rewards to come!\"),z=void 0!=c&&void 0!=\nc.y?c.y:20,u=void 0!=c&&void 0!=c.x?c.x:528,y=214,s=\"#powertabmenu\",V=\"true\",X=\"power_tutorial_6\"),doLogEvent(\"after checks=\"+g);h=\"power_tutorial_6\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_power_tutorial_6\"),g=!0,d=\"ui_power_tutorial_6\",!0==g&&(S=\"render_action_items\",C=\"top_right\",s=\"#powertabmenu\",h=\"-21\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"571\",B=-1!=h.indexOf(\",\")?\nh.split(\",\"):h,H=\"flag_power_tutorial_done\"),doLogEvent(\"after checks=\"+g);h=\"close_power\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_power_tutorial_6_backup\"),g=!0,d=\"ui_power_tutorial_6_backup\",!0==g&&(S=\"render_action_items\",s=\".infobar\",H=\"flag_power_tutorial_done\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||\n-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_holdings_quest_pro_q6_the_captain_arrives\"),g=!0,d=\"ui_holdings_quest_pro_q6_the_captain_arrives\",h=\"pro_q6_the_captain_arrives\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==\nactiveQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!1==isBuildingConstructed(\"keep\",a)&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to start this Quest.\"),z=void 0!=c&&void 0!=c.y?c.y:94,u=void 0!=c&&void 0!=c.x?c.x:320,y=135,C=\"left\",s=\"#actionmenu\",h=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"quest_results_pro_q6_the_captain_arrives\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||\n-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_results_pro_q6_the_captain_arrives\"),g=!0,d=\"ui_quest_results_pro_q6_the_captain_arrives\",!0==g&&(H=\"flag_captain_arrives\"),doLogEvent(\"after checks=\"+g);h=\"quest_close_pro_q6_the_captain_arrives\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_close_pro_q6_the_captain_arrives\"),\ng=!0,d=\"ui_quest_close_pro_q6_the_captain_arrives\",!0==g&&(S=\"chapters\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_hud_2\"),g=!0,d=\"ui_lore_book_hud_2\",a.stat?(doLogEvent(\"watch: chapter_complete_1_2: value=\"+(a.stat.chapter_complete_1_2+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chapter_complete_1_2?parseInt(a.stat.chapter_complete_1_2)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quests_started: value=\"+(a.stat.quests_started+\"\")+\" vs. required=6\"),the_val=void 0!=a.stat.quests_started?parseInt(a.stat.quests_started)||0:0,\"6\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:294,u=void 0!=c&&void 0!=c.x?c.x:385,y=312,C=\"top\",s=\".chapteractionheader\",h=\"75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-4\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"lorebook_animation_2_end\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_background\"),g=!0,d=\"ui_lore_book_background\",a.stat?(doLogEvent(\"watch: chapter_complete_1_2: value=\"+(a.stat.chapter_complete_1_2+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chapter_complete_1_2?parseInt(a.stat.chapter_complete_1_2)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quests_started: value=\"+(a.stat.quests_started+\"\")+\n\" vs. required=6\"),the_val=void 0!=a.stat.quests_started?parseInt(a.stat.quests_started)||0:0,\"6\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"<strong>Choose Background:</strong> Gain special advantages through your character\\u2019s backstory.\"),z=void 0!=c&&void 0!=c.y?c.y:308,u=void 0!=c&&void 0!=c.x?c.x:385,y=312,C=\"top\",s=\"#book_style\",h=\"239\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"468\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_background_hud\"),g=!0,d=\"ui_lore_book_background_hud\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: chapter_complete_1_2: value=\"+(a.stat.chapter_complete_1_2+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chapter_complete_1_2?parseInt(a.stat.chapter_complete_1_2)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: chose_background: value=\"+\n(a.stat.chose_background+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.chose_background?parseInt(a.stat.chose_background)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:294,u=void 0!=c&&void 0!=c.x?c.x:385,y=312,C=\"top\",s=\".chapteractionheader\",h=\"75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-4\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"chapter_claimed_1_2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,\nh.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_background_claimed\"),g=!0,d=\"ui_lore_book_background_claimed\",!0==g&&(C=\"bottom\",s=\"#book_style\",h=\"403\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"647\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"next_chapter_2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_ch_3_close\"),\ng=!0,d=\"ui_lore_book_ch_3_close\",!0==g&&(C=\"top_right\",s=\"#book_style\",h=\"-68\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"661\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_invite_friends_step1\"),g=!0,d=\"ui_invite_friends_step1\",a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\n\"\")+\" vs. required=6\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"6\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quest_chose_background: value=\"+(a.stat.quest_chose_background+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_chose_background?parseInt(a.stat.quest_chose_background)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,\"facebook\"!=userContext.playerData.provider&&(g=!1),doLogEvent(\"uiEvent: exclude_flag=friends_selector_tutoral\"),the_val=0,void 0!=userContext.flags.friends_selector_tutoral&&\n(the_val=userContext.flags.friends_selector_tutoral),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Being a new noble in Westeros is not an easy life, and you\\u2019ll need allies. Invite your friends to begin the ascent to power!\"),z=void 0!=c&&void 0!=c.y?c.y:68,u=void 0!=c&&void 0!=c.x?c.x:290,y=260,s=\"#actionmenu\",V=\"true\",X=\"ui_invite_friends_step2\"),doLogEvent(\"after checks=\"+g);h=\"ui_invite_friends_step2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,\nh.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_invite_friends_step2\"),g=!0,d=\"ui_invite_friends_step2\",\"facebook\"!=userContext.playerData.provider&&(g=!1),!0==g&&(S=\"friends_selector\",H=\"friends_selector_tutoral\"),doLogEvent(\"after checks=\"+g);h=\"send_friend_invites_modal\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_invite_friends_step3\"),g=!0,d=\"ui_invite_friends_step3\",\ndoLogEvent(\"uiEvent: require_flag = friends_selector_tutoral\"),1!=userContext.flags.friends_selector_tutoral&&(g=!1),!0==g&&(w=subGotStrings(\"Invite friends to play Game of Thrones Ascent by checking the box next to their name.\"),u=void 0!=c&&void 0!=c.x?c.x:13,y=200,C=\"left\",s=\".friendlistwrap.friendlistright\",h=\"10\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-65\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"toggle_friend_checked\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+\nb+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_invite_friends_step4\"),g=!0,d=\"ui_invite_friends_step4\",doLogEvent(\"uiEvent: require_flag = friends_selector_tutoral\"),1!=userContext.flags.friends_selector_tutoral&&(g=!1),!0==g&&(w=subGotStrings(\"Once you are finished, click here to send invitations to the selected friends.\"),z=void 0!=c&&void 0!=c.y?c.y:129,u=void 0!=c&&void 0!=c.x?c.x:278,y=200,C=\"bottom_left\",s=\".friendlistwrap.friendlistright\",\nh=\"245\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"222\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"toggle_friend_checked\"),doLogEvent(\"after checks=\"+g);h=\"send_friend_invitations\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_invite_friends_step5\"),g=!0,d=\"ui_invite_friends_step5\",!0==g&&(H=\"friend_invites_sent\"),doLogEvent(\"after checks=\"+g);h=\"send_friend_invites_modal_closed\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_invite_friends_close\"),g=!0,d=\"ui_invite_friends_close\",a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=6\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"6\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quest_chose_background: value=\"+(a.stat.quest_chose_background+\"\")+\n\" vs. required=1\"),the_val=void 0!=a.stat.quest_chose_background?parseInt(a.stat.quest_chose_background)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"uiEvent: require_flag = friend_invites_sent\"),1!=userContext.flags.friend_invites_sent&&(g=!1),!0==g&&(S=\"render_action_items\",H=\"friends_selector_tutoral_done\"),doLogEvent(\"after checks=\"+g);h=\"send_friend_invites_modal_closed\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&\n!0!=g)doLogEvent(\"ui triggered: ui_invite_friends_close_skipped\"),g=!0,d=\"ui_invite_friends_close_skipped\",a.stat?(doLogEvent(\"watch: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=6\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"6\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quest_chose_background: value=\"+(a.stat.quest_chose_background+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_chose_background?parseInt(a.stat.quest_chose_background)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"uiEvent: exclude_flag=friend_invites_sent\"),the_val=0,void 0!=userContext.flags.friend_invites_sent&&(the_val=userContext.flags.friend_invites_sent),1==the_val&&(g=!1),!0==g&&(S=\"render_action_items\",w=subGotStrings(\"If you want to invite friends later, you may do so using the Add Friends button in the Friends menu, accessed via the Main Menu.\"),z=void 0!=c&&void 0!=c.y?c.y:68,u=void 0!=c&&void 0!=c.x?c.x:290,y=224,s=\"#actionmenu\",H=\"friends_selector_tutoral_done\",\nV=\"true\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_pro_pro_q7_first_impressions\"),g=!0,d=\"ui_pro_pro_q7_first_impressions\",h=\"[pro_q7bastard_first_impressions, pro_q7knight_first_impressions, pro_q7merchant_first_impressions, pro_q7foster_first_impressions, pro_q7whisperer_first_impressions, pro_q7merc_first_impressions, pro_q7noble_first_impressions]\",\nK=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"Click here to start this Quest.\"),y=185,C=\"left\",h=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):\nh),doLogEvent(\"after checks=\"+g);h=\"quest_close_pro_q7bastard_first_impressions, quest_close_pro_q7knight_first_impressions, quest_close_pro_q7merchant_first_impressions, quest_close_pro_q7foster_first_impressions, quest_close_pro_q7whisperer_first_impressions, quest_close_pro_q7merc_first_impressions, quest_close_pro_q7noble_first_impressions\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_close_first_impressions\"),\ng=!0,d=\"ui_quest_close_first_impressions\",!0==g&&(H=\"ss_npc_recruit_tutorial\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_recruit_npc_hugo\"),g=!0,d=\"ui_ss_recruit_npc_hugo\",a.stat?(doLogEvent(\"watch: num_purchase_sworn_sword: value=\"+(a.stat.num_purchase_sworn_sword+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_purchase_sworn_sword?\nparseInt(a.stat.num_purchase_sworn_sword)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quests_completed: value=\"+(a.stat.quests_completed+\"\")+\" vs. required=7\"),the_val=void 0!=a.stat.quests_completed?parseInt(a.stat.quests_completed)||0:0,\"7\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(S=\"buildings\",w=subGotStrings('\"Enough parchment and scaffolding! Let\\u2019s start building you an <strong>army</strong>, @address.\"'),z=void 0!=c&&void 0!=c.y?c.y:-138,u=void 0!=c&&void 0!=c.x?c.x:200,y=330,\nC=\"bottom_left\",s=\"#buildingmenubox\",h=\"-23\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"158\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"ser_hugo\"),doLogEvent(\"after checks=\"+g);h=\"ss_status_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_recruit_add\"),g=!0,d=\"ui_ss_recruit_add\",a.stat?(doLogEvent(\"watch: num_purchase_sworn_sword: value=\"+(a.stat.num_purchase_sworn_sword+\n\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_purchase_sworn_sword?parseInt(a.stat.num_purchase_sworn_sword)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quests_completed_no_swornsword: value=\"+(a.stat.quests_completed_no_swornsword+\"\")+\" vs. required=6\"),the_val=void 0!=a.stat.quests_completed_no_swornsword?parseInt(a.stat.quests_completed_no_swornsword)||0:0,\"6\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"Click here to <strong>view</strong> Sworn Swords available to recruit.\"),\nz=void 0!=c&&void 0!=c.y?c.y:10,u=void 0!=c&&void 0!=c.x?c.x:253,y=200,C=\"left\",s=\".addswornsword\",h=\"0\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"180\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"ss_status_recruit_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_recruit_hire\"),g=!0,d=\"ui_ss_recruit_hire\",a.stat?(doLogEvent(\"watch: num_purchase_sworn_sword: value=\"+\n(a.stat.num_purchase_sworn_sword+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_purchase_sworn_sword?parseInt(a.stat.num_purchase_sworn_sword)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(S=\"buildings_redraw\",w=subGotStrings(\"Click here to <strong>recruit</strong> this Sworn Sword into your service.\"),z=void 0!=c&&void 0!=c.y?c.y:278,u=void 0!=c&&void 0!=c.x?c.x:289,y=200,C=\"left\",s=\".ssactivityboxtop\",h=\"293\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"214\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+\ng);h=\"purchase_sworn_sword_0_2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_purchase_sworn_sword_0_2\"),g=!0,d=\"ui_purchase_sworn_sword_0_2\",!0==g&&(S=\"swornsword_menu\",H=\"ss_npc_recruited\"),doLogEvent(\"after checks=\"+g);h=\"display_sworn_swords, holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&\n!0!=g)doLogEvent(\"ui triggered: ui_ss_recruit_npc_hugo_2\"),g=!0,d=\"ui_ss_recruit_npc_hugo_2\",a.stat?(doLogEvent(\"watch: num_purchase_sworn_sword: value=\"+(a.stat.num_purchase_sworn_sword+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_purchase_sworn_sword?parseInt(a.stat.num_purchase_sworn_sword)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||\n0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,ca=!1,!0==g&&(S=\"refresh_sworn_swords\",w=subGotStrings('\"Hmph. A little green, this one. Let\\u2019s get her in the field and see what she can do.\"'),u=void 0!=c&&void 0!=c.x?c.x:-372,y=270,C=\"right\",s=\".ssactivityside\",h=\"20\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-78\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_sworn_sword_purchased\",T=\"true\",U=\"ser_hugo\"),doLogEvent(\"after checks=\"+g);h=\"ss_status_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==\nh||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_status_tutorial_1\"),g=!0,d=\"ui_ss_status_tutorial_1\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_adventures_started: value=\"+(a.stat.num_adventures_started+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_adventures_started?parseInt(a.stat.num_adventures_started)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_purchase_sworn_sword: value=\"+\n(a.stat.num_purchase_sworn_sword+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_purchase_sworn_sword?parseInt(a.stat.num_purchase_sworn_sword)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch3: num_shop_purchases: value=\"+(a.stat.num_shop_purchases+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_purchases?parseInt(a.stat.num_shop_purchases)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"Your Sworn Sword will gain <strong>Ranks</strong> with every quest, Adventure and Player to Player action they complete successfully.\"),\nz=void 0!=c&&void 0!=c.y?c.y:46,u=void 0!=c&&void 0!=c.x?c.x:250,y=200,C=\"left\",s=\".ssactivityboxtop\",h=\"-26\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"342\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_adventuring_tutorial\",P=O=\"true\",R=\"ss_status_tutorial_3\"),doLogEvent(\"after checks=\"+g);h=\"ss_status_tutorial_3\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_status_tutorial_3\"),\ng=!0,d=\"ui_ss_status_tutorial_3\",!0==g&&(w=subGotStrings('\"This Sword might succeed with the clothes on her back, but she\\u2019ll do better <strong>armed</strong>. Let\\u2019s see what you\\u2019ve got on hand...\"'),z=void 0!=c&&void 0!=c.y?c.y:96,u=void 0!=c&&void 0!=c.x?c.x:122,y=280,s=\".ssactivityboxtop\",P=\"true\",R=\"ss_status_tutorial_4\",T=\"true\",U=\"ser_hugo\"),doLogEvent(\"after checks=\"+g);h=\"ss_status_tutorial_4\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&\n-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_status_tutorial_4\"),g=!0,d=\"ui_ss_status_tutorial_4\",!0==g&&(w=subGotStrings(\"Gear is divided into three slots: <strong>Hand</strong>, <strong>Body</strong>, and <strong>Companion</strong>. Click on any of these to equip your Sworn Sword.\"),z=void 0!=c&&void 0!=c.y?c.y:75,u=void 0!=c&&void 0!=c.x?c.x:2,y=250,C=\"bottom, bottom, bottom\",s=\".ssactivityboxtop\",h=\"214, 214, 214\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\n\"14, 93, 172\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,P=\"true\",R=\"ss_status_tutorial_7\"),doLogEvent(\"after checks=\"+g);h=\"ss_status_tutorial_7, ss_status_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_status_tutorial_7_premature\"),g=!0,d=\"ui_ss_status_tutorial_7_premature\",3<userContext.playerData.character.level&&(g=!1),the_val=void 0!=a.stat.quests_completed_no_swornsword?\nparseInt(a.stat.quests_completed_no_swornsword)||0:0,6<parseInt(the_val)||(g=!1),a.stat?(doLogEvent(\"watch2: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"The Keep serves as a recruitment and training center for your Sworn Swords. Ser Hugo will instruct you when you are ready to use the Keep.\"),z=void 0!=c&&void 0!=\nc.y?c.y:100,u=void 0!=c&&void 0!=c.x?c.x:-100,y=250,C=\"top_right\",s=\".ssactivityboxtop\",h=\"-145\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"135\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"ss_status_tutorial_7\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_status_tutorial_7\"),g=!0,d=\"ui_ss_status_tutorial_7\",3<userContext.playerData.character.level&&(g=\n!1),a.stat?(doLogEvent(\"watch: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quests_completed_no_swornsword: value=\"+(a.stat.quests_completed_no_swornsword+\"\")+\" vs. required=6\"),the_val=void 0!=a.stat.quests_completed_no_swornsword?parseInt(a.stat.quests_completed_no_swornsword)||0:0,\"6\"!=the_val+\"\"&&(g=!1)):\ng=!1,!0==g&&(w=subGotStrings(\"Now that you have equipped your Sworn Sword with Gear, click here to send her on an <strong>Adventure</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:175,u=void 0!=c&&void 0!=c.x?c.x:200,y=250,C=\"left\",s=\".ssactivityboxtop\",h=\"98\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"400\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"adventure_dialog_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_status_tutorial_9\"),g=!0,d=\"ui_ss_status_tutorial_9\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"<strong>Adventures</strong> are arranged based on difficulty. Click here to select your <strong>Adventure</strong>.\"),\nz=void 0!=c&&void 0!=c.y?c.y:170,u=void 0!=c&&void 0!=c.x?c.x:239,y=200,C=\"left\",s=\".adventurebox\",h=\"174\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"140\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"start_adventure_open, ss_choose_item_sworn_sword_0_2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_action_tutorial_1\"),g=!0,d=\"ui_ss_action_tutorial_1\",4<userContext.playerData.character.level&&\n(g=!1),a.stat?(doLogEvent(\"watch: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"First, select a skill: <strong>Battle</strong>, <strong>Trade</strong>, or <strong>Intrigue</strong>. Then, select the action that best suits your Sworn Sword.\"),z=void 0!=c&&void 0!=c.y?c.y:145,u=void 0!=c&&void 0!=c.x?c.x:240,y=222,\nC=\"top_left\",s=\".actionselectbox\",h=\"136\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"170\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_equipping_ss\",O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"ss_action_tutorial_4\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_action_tutorial_4\"),g=!0,d=\"ui_ss_action_tutorial_4\",doLogEvent(\"uiEvent: require_flag = flag_equipping_ss\"),1!=userContext.flags.flag_equipping_ss&&\n(g=!1),!0==g&&(w=subGotStrings(\"When you are finished equipping your Sworn Sword, click here to return to the <strong>Adventure</strong> screen.\"),z=void 0!=c&&void 0!=c.y?c.y:15,u=void 0!=c&&void 0!=c.x?c.x:175,y=330,C=\"left\",s=\".continuebtnwrap\",h=\"0\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"60\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,V=\"true\"),doLogEvent(\"after checks=\"+g);h=\"pvp_select_action\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_action_tutorial_5\"),g=!0,d=\"ui_ss_action_tutorial_5\",doLogEvent(\"uiEvent: require_flag = flag_equipping_ss\"),1!=userContext.flags.flag_equipping_ss&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to send your Sworn Sword <strong>Adventuring</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:320,u=void 0!=c&&void 0!=c.x?c.x:455,y=212,C=\"left\",s=\"#vsbtminfo\",h=\"320\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"389\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,O=\"true\"),doLogEvent(\"after checks=\"+\ng);h=\"open_progress\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_action_tutorial_remove_tooltips\"),g=!0,d=\"ui_ss_action_tutorial_remove_tooltips\",a.stat?(doLogEvent(\"watch: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):\ng=!1,doLogEvent(\"after checks=\"+g);h=\"display_sworn_swords, ss_status_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_action_status_open\"),g=!0,d=\"ui_ss_action_status_open\",a.stat?(doLogEvent(\"watch: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: chose_fealty: value=\"+(a.stat.chose_fealty+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.chose_fealty?parseInt(a.stat.chose_fealty)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(C=\"top_right\",s=\"#infobar_swornswords\",h=\"29\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"598\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"close_modal_dialogs_top\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+\nb+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_action_close\"),g=!0,d=\"ui_ss_action_close\",a.stat?(doLogEvent(\"watch: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_adventures_complete?parseInt(a.stat.num_adventures_complete)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: chose_fealty: value=\"+(a.stat.chose_fealty+\"\")+\" vs. required=0\"),the_val=\nvoid 0!=a.stat.chose_fealty?parseInt(a.stat.chose_fealty)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(S=\"chapters\"),doLogEvent(\"after checks=\"+g);h=\"lorebook_animation_3_end\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_fealty\"),g=!0,d=\"ui_lore_book_fealty\",a.stat?(doLogEvent(\"watch: chose_fealty: value=\"+(a.stat.chose_fealty+\n\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.chose_fealty?parseInt(a.stat.chose_fealty)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"<strong>Swear Fealty:</strong> Declare your allegiance to one of the Great Houses of Westeros.\"),z=void 0!=c&&void 0!=c.y?c.y:351,u=void 0!=c&&void 0!=c.x?c.x:388,y=306,C=\"top\",s=\"#book_style\",h=\"280\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"468\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_fealty_hud\"),g=!0,d=\"ui_lore_book_fealty_hud\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: chapter_complete_1_3: value=\"+(a.stat.chapter_complete_1_3+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chapter_complete_1_3?parseInt(a.stat.chapter_complete_1_3)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: chose_fealty: value=\"+\n(a.stat.chose_fealty+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.chose_fealty?parseInt(a.stat.chose_fealty)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:294,u=void 0!=c&&void 0!=c.x?c.x:385,y=312,C=\"top\",s=\".chapteractionheader\",h=\"75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-4\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"chose_fealty\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_chose_fealty\"),g=!0,d=\"ui_chose_fealty\",doLogEvent(\"after checks=\"+g);h=\"chapter_claimed_1_3\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_fealty_claimed\"),g=!0,d=\"ui_lore_book_fealty_claimed\",a.stat?(doLogEvent(\"watch: chose_fealty: value=\"+(a.stat.chose_fealty+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chose_fealty?\nparseInt(a.stat.chose_fealty)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(C=\"bottom\",s=\"#book_style\",h=\"403\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"647\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"next_chapter_3\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_ch_4_close\"),g=!0,d=\"ui_lore_book_ch_4_close\",!0==g&&(C=\"top_right\",s=\"#book_style\",h=\n\"-68\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"661\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_pro_pro_q8_an_honored_guest\"),g=!0,d=\"ui_pro_pro_q8_an_honored_guest\",h=\"[pro_q8baratheon_an_honored_guest, pro_q8greyjoy_an_honored_guest, pro_q8lannister_an_honored_guest, pro_q8martell_an_honored_guest, pro_q8stark_an_honored_guest, pro_q8targaryen_an_honored_guest, pro_q8tyrell_an_honored_guest, pro_q8tully_an_honored_guest]\",\nK=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(w=subGotStrings(\"Click here to start this Quest.\"),z=void 0!=c&&void 0!=c.y?c.y:94,u=void 0!=c&&void 0!=c.x?c.x:320,y=185,C=\"left\",s=\"#actionmenu\",\nh=\"88\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_ser_hugo\"),g=!0,d=\"ui_ss_train_ser_hugo\",a.stat?(doLogEvent(\"watch: num_adventures_complete: value=\"+(a.stat.num_adventures_complete+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_adventures_complete?\nparseInt(a.stat.num_adventures_complete)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_trained: value=\"+(a.stat.num_trained+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_trained?parseInt(a.stat.num_trained)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch3: quest_enable_training: value=\"+(a.stat.quest_enable_training+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_enable_training?parseInt(a.stat.quest_enable_training)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==\nisBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(w=subGotStrings('\"The @fealty_plural are coming, eh? I want them to see veteran fighters! Let\\u2019s use what your Sword learned on her adventuring to <strong>train</strong> her further.\"'),z=void 0!=c&&void 0!=c.y?c.y:-29,u=void 0!=c&&void 0!=c.x?c.x:-372,y=270,C=\"right\",s=\".ssactivityside\",h=\"20\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-78\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_train_ss\",T=\"true\",U=\"ser_hugo\"),doLogEvent(\"after checks=\"+g);\nh=\"ss_status_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_1\"),g=!0,d=\"ui_ss_train_tutorial_1\",a.stat?(doLogEvent(\"watch: quest_enable_training: value=\"+(a.stat.quest_enable_training+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_enable_training?parseInt(a.stat.quest_enable_training)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_trained: value=\"+\n(a.stat.num_trained+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_trained?parseInt(a.stat.num_trained)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to <strong>train</strong> your Sworn Sword.\"),z=void 0!=c&&void 0!=c.y?c.y:161,u=void 0!=c&&void 0!=c.x?c.x:386,y=148,C=\"left\",s=\".ssactivitybtns\",h=\"77\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"400\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"ss_level_up\";\ndoLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_2\"),g=!0,d=\"ui_ss_train_tutorial_2\",doLogEvent(\"uiEvent: require_flag = flag_train_ss\"),1!=userContext.flags.flag_train_ss&&(g=!1),!0==g&&(w=subGotStrings(\"Select the skill you want your Sworn Sword to <strong>train</strong> in.\"),z=void 0!=c&&void 0!=c.y?c.y:140,u=void 0!=c&&void 0!=c.x?c.x:475,y=230,s=\".alertcontents.rankselect\",\nH=\"flag_train_ss_modal\"),doLogEvent(\"after checks=\"+g);h=\"ss_status_open\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_arrow_close\"),g=!0,d=\"ui_ss_train_tutorial_arrow_close\",a.stat?(doLogEvent(\"watch: quest_enable_training: value=\"+(a.stat.quest_enable_training+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_enable_training?parseInt(a.stat.quest_enable_training)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_trained: value=\"+(a.stat.num_trained+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_trained?parseInt(a.stat.num_trained)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(C=\"top_right\",s=\"#infobar_swornswords\",h=\"29\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"600\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_ss_trained\",O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_show_bldgs\"),g=!0,d=\"ui_ss_train_tutorial_show_bldgs\",a.stat?(doLogEvent(\"watch: num_trained: value=\"+(a.stat.num_trained+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_trained?parseInt(a.stat.num_trained)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructing(\"smithy\",a)&&(g=!1),!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&\n(S=\"buildings\"),doLogEvent(\"after checks=\"+g);h=\"holdings, do_menu_select_buildings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_3\"),g=!0,d=\"ui_ss_train_tutorial_3\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_trained: value=\"+(a.stat.num_trained+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_trained?parseInt(a.stat.num_trained)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructing(\"smithy\",a)&&(g=!1),!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(w=subGotStrings('\"Every noble appreciates a good blade. Let\\u2019s construct a <strong>Smithy</strong> and forge a gift for the @fealty_plural.\"'),z=void 0!=c&&void 0!=c.y?c.y:-211,u=void 0!=c&&void 0!=c.x?c.x:122,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"180\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_ss_build_smithy\",T=\n\"true\",U=\"ser_hugo\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_smithy\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_4\"),g=!0,d=\"ui_ss_train_tutorial_4\",!0==isBuildingConstructing(\"smithy\",a)&&(g=!1),!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),doLogEvent(\"uiEvent: require_flag = flag_ss_build_smithy\"),1!=userContext.flags.flag_ss_build_smithy&&(g=!1),!0==\ng&&(w=subGotStrings(\"Click here to construct the <strong>Smithy</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:141,u=void 0!=c&&void 0!=c.x?c.x:502,y=180,C=\"top\",s=\".buildinginfotop\",h=\"75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"550\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_4_backtrack\"),\ng=!0,d=\"ui_ss_train_tutorial_4_backtrack\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings('\"What good is an idle Smithy? Let\\'s get them busy on that <strong>Decorative Blade</strong>!\"'),\nz=void 0!=c&&void 0!=c.y?c.y:-211,u=void 0!=c&&void 0!=c.x?c.x:122,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"180\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"ser_hugo\"),doLogEvent(\"after checks=\"+g);h=\"start_production\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_4b\"),g=!0,d=\"ui_ss_train_tutorial_4b\",a.stat?(doLogEvent(\"watch: num_trained: value=\"+\n(a.stat.num_trained+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_trained?parseInt(a.stat.num_trained)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(s=\".buildinginfotop\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_smithy\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_5\"),g=!0,d=\"ui_ss_train_tutorial_5\",3<userContext.playerData.character.level&&\n(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",\na)&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to instruct the Smithy to <strong>produce</strong> an item.\"),z=void 0!=c&&void 0!=c.y?c.y:100,u=void 0!=c&&void 0!=c.x?c.x:-30,y=220,C=\"top\",s=\"#collectbtn\",h=\"32\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"44\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"construct\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_6\"),\ng=!0,d=\"ui_ss_train_tutorial_6\",a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=\n!1,!0==isBuildingConstructed(\"smithy\",a)&&(g=!1),doLogEvent(\"after checks=\"+g);h=\"building_production_tab_smithy\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_7\"),g=!0,d=\"ui_ss_train_tutorial_7\",a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||\n0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),doLogEvent(\"uiEvent: exclude_flag=flag_show_production_item\"),the_val=0,void 0!=userContext.flags.flag_show_production_item&&(the_val=userContext.flags.flag_show_production_item),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Buildings like the Smithy are used to produce <strong>items</strong> that can boost your skills or your Sworn Sword's once equipped.\"),z=void 0!=c&&void 0!=c.y?c.y:162,u=void 0!=c&&void 0!=c.x?c.x:241,\ny=231,s=\".production\",H=\"flag_smithy_produce\",P=\"true\",R=\"next_ui_ss_train_tutorial_8\"),doLogEvent(\"after checks=\"+g);h=\"next_ui_ss_train_tutorial_8\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_8\"),g=!0,d=\"ui_ss_train_tutorial_8\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\n\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(w=subGotStrings(\"Nearly every item takes <strong>time</strong>, <strong>silver</strong>, and <strong>raw materials</strong> to create. \"),z=void 0!=c&&void 0!=c.y?c.y:-21,u=void 0!=c&&void 0!=c.x?c.x:323,y=231,C=\"left\",s=\".production\",h=\"34\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"238\",B=-1!=h.indexOf(\",\")?\nh.split(\",\"):h,P=\"true\",R=\"next_ui_ss_train_tutorial_9\"),doLogEvent(\"after checks=\"+g);h=\"next_ui_ss_train_tutorial_9\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_9\"),g=!0,d=\"ui_ss_train_tutorial_9\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=0\"),\nthe_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(w=subGotStrings(\"Click on an item to select it for <strong>production</strong>, and for material and stat details on that item.\"),z=void 0!=c&&void 0!=c.y?c.y:180,u=void 0!=c&&void 0!=c.x?c.x:40,y=231,C=\"top\",s=\".production\",h=\"120\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"150\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,P=\"true\",R=\"next_ui_ss_train_tutorial_10\"),\ndoLogEvent(\"after checks=\"+g);h=\"next_ui_ss_train_tutorial_10\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_10\"),g=!0,d=\"ui_ss_train_tutorial_10\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||\n0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==g&&(w=subGotStrings(\"You have all the materials necessary for the <strong>Decorative Blade</strong>. Click here to produce the item.\"),z=void 0!=c&&void 0!=c.y?c.y:409,u=void 0!=c&&void 0!=c.x?c.x:237,y=220,C=\"right\",s=\".production\",h=\"431\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"466\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"production_completed\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+\nb+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_12\"),g=!0,d=\"ui_ss_train_tutorial_12\",a.stat?(doLogEvent(\"watch: num_shop_purchases: value=\"+(a.stat.num_shop_purchases+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_purchases?parseInt(a.stat.num_shop_purchases)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==isBuildingConstructed(\"village_center\",a)&&(g=!1),!0==g&&\n(w=subGotStrings(\"The Decorative Blade is ready. Click here to <strong>collect</strong> it.\"),z=void 0!=c&&void 0!=c.y?c.y:83,u=void 0!=c&&void 0!=c.x?c.x:615,y=190,C=\"top\",s=\".production\",h=\"9\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"670\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"do_finish_production\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_12_flag\"),\ng=!0,d=\"ui_ss_train_tutorial_12_flag\",!0==g&&(H=\"decorative_blade_produced\"),doLogEvent(\"after checks=\"+g);h=\"building_production_tab_smithy\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_12_close\"),g=!0,d=\"ui_ss_train_tutorial_12_close\",a.stat?(doLogEvent(\"watch: num_shop_purchases: value=\"+(a.stat.num_shop_purchases+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_purchases?\nparseInt(a.stat.num_shop_purchases)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_items_produced: value=\"+(a.stat.num_items_produced+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_items_produced?parseInt(a.stat.num_items_produced)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"uiEvent: require_flag = decorative_blade_produced\"),1!=userContext.flags.decorative_blade_produced&&(g=!1),!0==g&&(C=\"top_right\",s=\".production\",h=\"-109\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"652\",B=\n-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_12_holdings\"),g=!0,d=\"ui_ss_train_tutorial_12_holdings\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_purchases: value=\"+(a.stat.num_shop_purchases+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_purchases?\nparseInt(a.stat.num_shop_purchases)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_items_produced: value=\"+(a.stat.num_items_produced+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.num_items_produced?parseInt(a.stat.num_items_produced)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==isBuildingConstructed(\"village_center\",a)&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings(\"The Smithy has finished the <strong>Decorative Blade</strong>, @address. Let's have a look.\"),\nz=void 0!=c&&void 0!=c.y?c.y:-211,u=void 0!=c&&void 0!=c.x?c.x:122,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"180\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"ser_hugo\"),doLogEvent(\"after checks=\"+g);h=\"start_production\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_tutorial_13\"),g=!0,d=\"ui_ss_train_tutorial_13\",a.stat?(doLogEvent(\"watch: num_shop_purchases: value=\"+\n(a.stat.num_shop_purchases+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_purchases?parseInt(a.stat.num_shop_purchases)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==isBuildingConstructed(\"village_center\",a)&&(g=!1),!0==g&&(H=\"flag_show_production_item\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_smithy\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_maester_lucas_pre\"),\ng=!0,d=\"ui_ss_train_maester_lucas_pre\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||0:0,\"0\"!=\nthe_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch3: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==isBuildingConstructed(\"village_center\",a)&&(g=!1),!0==g&&(C=\"top_right\",s=\".infobarpattern\",h=\"36\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"710\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+\ng);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_ss_train_maester_lucas\"),g=!0,d=\"ui_ss_train_maester_lucas\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?\n(doLogEvent(\"watch2: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch3: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",\na)&&(g=!1),!0==isBuildingConstructing(\"village_center\",a)&&(g=!1),!0==isBuildingConstructed(\"village_center\",a)&&(g=!1),doLogEvent(\"uiEvent: exclude_flag=ready_for_village_center\"),the_val=0,void 0!=userContext.flags.ready_for_village_center&&(the_val=userContext.flags.ready_for_village_center),1==the_val&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings('\"All nobles are impressed by coin. Let us <strong>upgrade</strong> your Counting House to increase tax revenue.\"'),z=void 0!=c&&void 0!=c.y?c.y:-202,\nu=void 0!=c&&void 0!=c.x?c.x:-6,y=280,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"9\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_upgrade_counting_house\",T=O=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_1\"),g=!0,d=\"ui_counting_house_upgrade_tutorial_1\",\n4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: building_upgrades_finished: value=\"+(a.stat.building_upgrades_finished+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_finished?parseInt(a.stat.building_upgrades_finished)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,\na.stat?(doLogEvent(\"watch3: quests_succeeded: value=\"+(a.stat.quests_succeeded+\"\")+\" vs. required=8\"),the_val=void 0!=a.stat.quests_succeeded?parseInt(a.stat.quests_succeeded)||0:0,\"8\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"All buildings can be <strong>Upgraded</strong>. <strong>Upgrades</strong> can make a building produce resources more efficiently, and improve your skill in <strong>Battle</strong>, <strong>Trade</strong>, and <strong>Intrigue</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:\n90,u=void 0!=c&&void 0!=c.x?c.x:121,y=300,s=\".upgradeinfobg\",H=\"flag_upgrade_counting_house_start\",P=\"true\",R=\"counting_house_upgrade_tutorial_2\"),doLogEvent(\"after checks=\"+g);h=\"counting_house_upgrade_tutorial_2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_2\"),g=!0,d=\"ui_counting_house_upgrade_tutorial_2\",a.stat?(doLogEvent(\"watch: produced_stone: value=\"+\n(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"uiEvent: require_flag = flag_upgrade_counting_house_start\"),1!=userContext.flags.flag_upgrade_counting_house_start&&(g=!1),!0==g&&(w=subGotStrings('\"We will need a cut of raw <strong>Stone</strong> for this upgrade. We do not currently have any in our warehouses.\"'),z=void 0!=c&&void 0!=c.y?c.y:110,u=void 0!=c&&void 0!=c.x?c.x:194,y=277,\nC=\"left\",s=\".upgradeinfobg\",h=\"159\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"100\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"ready_for_village_center\",P=\"true\",R=\"counting_house_upgrade_tutorial_3\",T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"close_building_panel\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_close_building_panel\"),g=!0,d=\"ui_counting_house_close_building_panel\",\ndoLogEvent(\"uiEvent: require_flag = flag_upgrade_counting_house_start\"),1!=userContext.flags.flag_upgrade_counting_house_start&&(g=!1),!0==g&&(H=\"flag_counting_house_upgrade_closed\"),doLogEvent(\"after checks=\"+g);h=\"counting_house_upgrade_tutorial_3\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_3\"),g=!0,d=\"ui_counting_house_upgrade_tutorial_3\",doLogEvent(\"uiEvent: require_flag = flag_upgrade_counting_house_start\"),\n1!=userContext.flags.flag_upgrade_counting_house_start&&(g=!1),!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:-30,u=void 0!=c&&void 0!=c.x?c.x:-40,C=\"top_right\",s=\"#chartabmenu\",h=\"-15\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"658\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_maester_lucas\"),\ng=!0,d=\"ui_counting_house_upgrade_maester_lucas\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(S=\"buildings\",w=subGotStrings('\"Now that we have Stone, we may now begin the <strong>upgrade</strong> to your Counting House.\"'),z=void 0!=c&&void 0!=c.y?c.y:-210,u=void 0!=c&&void 0!=c.x?c.x:-26,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"9\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"holdings,construction_complete_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+\nb+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_5_backtrack\"),g=!0,d=\"ui_counting_house_upgrade_tutorial_5_backtrack\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):\ng=!1,!1==isBuildingDone(\"counting_house\")&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings('\"The upgrade to your Counting House is ready for your review, @address. We only need your approval to <strong>finish</strong> it.\"'),z=void 0!=c&&void 0!=c.y?c.y:-210,u=void 0!=c&&void 0!=c.x?c.x:-26,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"9\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_counting_house\";\ndoLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_4\"),g=!0,d=\"ui_counting_house_upgrade_tutorial_4\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||\n0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"uiEvent: exclude_flag=flag_counting_house_upgrading\"),the_val=0,void 0!=userContext.flags.flag_counting_house_upgrading&&(the_val=userContext.flags.flag_counting_house_upgrading),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to construct the <strong>Stacks of Coins</strong> upgrade.\"),\nz=void 0!=c&&void 0!=c.y?c.y:34,u=void 0!=c&&void 0!=c.x?c.x:159,y=220,C=\"left\",s=\"#addbtn_container\",h=\"39\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"81\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_counting_house_upgrading\",O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_5\"),g=\n!0,d=\"ui_counting_house_upgrade_tutorial_5\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: building_upgrades_finished: value=\"+(a.stat.building_upgrades_finished+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.building_upgrades_finished?\nparseInt(a.stat.building_upgrades_finished)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingDone(\"counting_house\")&&(g=!1),!0==g&&(w=subGotStrings(\"The Stacks of Coins upgrade is ready. Click here to <strong>finish</strong> it.\"),z=void 0!=c&&void 0!=c.y?c.y:162,u=void 0!=c&&void 0!=c.x?c.x:514,y=224,C=\"top\",s=\".buildinginfotop\",h=\"91\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"593\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_counting_house_upgraded\",O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_counting_house\";\ndoLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_5_close\"),g=!0,d=\"ui_counting_house_upgrade_tutorial_5_close\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.building_upgrades_added?parseInt(a.stat.building_upgrades_added)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: building_upgrades_finished: value=\"+(a.stat.building_upgrades_finished+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.building_upgrades_finished?parseInt(a.stat.building_upgrades_finished)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:-30,u=void 0!=c&&void 0!=c.x?c.x:-40,C=\"top_right\",s=\"#chartabmenu\",h=\"-15\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"658\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+\ng);h=\"close_building_panel_counting_house\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_counting_house_upgrade_tutorial_clear\"),g=!0,d=\"ui_counting_house_upgrade_tutorial_clear\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: building_upgrades_added: value=\"+(a.stat.building_upgrades_added+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.building_upgrades_added?\nparseInt(a.stat.building_upgrades_added)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: building_upgrades_finished: value=\"+(a.stat.building_upgrades_finished+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.building_upgrades_finished?parseInt(a.stat.building_upgrades_finished)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&\n!0!=g)doLogEvent(\"ui triggered: ui_village_center_build_maester_lucas\"),g=!0,d=\"ui_village_center_build_maester_lucas\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_items_started?\nparseInt(a.stat.num_shop_items_started)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"smithy\",a)&&(g=!1),!0==isBuildingConstructing(\"village_center\",a)&&(g=!1),!0==isBuildingConstructed(\"village_center\",a)&&(g=!1),doLogEvent(\"uiEvent: require_flag = ready_for_village_center\"),1!=userContext.flags.ready_for_village_center&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings('\"If we construct a <strong>Village Center</strong>, we can produce Stone, among other resources.\"'),z=void 0!=c&&void 0!=\nc.y?c.y:-209,u=void 0!=c&&void 0!=c.x?c.x:202,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"265\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_village_center_tutorial\",T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_panel_village_center_backtrack\"),g=!0,d=\"ui_building_panel_village_center_backtrack\",\n4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"village_center\",\na)&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings('\"Your smallfolk sit idle, @address. Let us instruct them to produce <strong>Stone</strong> at the Village Center.\"'),z=void 0!=c&&void 0!=c.y?c.y:-209,u=void 0!=c&&void 0!=c.x?c.x:202,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"265\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_village_center\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");\nif((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_panel_village_center_build_prompt\"),g=!0,d=\"ui_building_panel_village_center_build_prompt\",a.stat?(doLogEvent(\"watch: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\n\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==isBuildingConstructed(\"village_center\",a)&&(g=!1),!0==g&&(C=\"top_right\",s=\"#build_village_center\",h=\"28\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-69\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"building_panel_village_center\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_panel_village_center_clear_tooltips\"),g=!0,d=\"ui_building_panel_village_center_clear_tooltips\",a.stat?(doLogEvent(\"watch: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=2\"),the_val=void 0!=a.stat.num_shop_items_started?\nparseInt(a.stat.num_shop_items_started)||0:0,\"2\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"after checks=\"+g);h=\"building_panel_village_center\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_building_panel_village_center_production_open\"),g=!0,d=\"ui_building_panel_village_center_production_open\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+\n(a.stat.num_shop_items_started+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingConstructed(\"village_center\",a)&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to instruct the Village Center to <strong>produce</strong> a resource.\"),\nz=void 0!=c&&void 0!=c.y?c.y:110,u=void 0!=c&&void 0!=c.x?c.x:-48,y=230,C=\"top\",s=\"#collectbtn\",h=\"38\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"33\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"stone_production_item_selected\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_village_center_build_maester_tutorial_3\"),g=!0,d=\"ui_village_center_build_maester_tutorial_3\",\n4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(w=subGotStrings(\"Click here to produce <strong>Stone</strong>.\"),\nz=void 0!=c&&void 0!=c.y?c.y:-11,u=void 0!=c&&void 0!=c.x?c.x:-200,y=181,C=\"right\",s=\".btnwrap.btnmed.equipbtn\",h=\"3\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"4\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"start_production\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_village_center_stone_do_production\"),g=!0,d=\"ui_village_center_stone_do_production\",doLogEvent(\"uiEvent: require_flag = flag_village_center_tutorial\"),\n1!=userContext.flags.flag_village_center_tutorial&&(g=!1),!0==g&&(H=\"flag_show_production_item\",O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"constructed_village_center,holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_village_center_build_maester_lucas_2\"),g=!0,d=\"ui_village_center_build_maester_lucas_2\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+\n(a.stat.num_shop_items_started+\"\")+\" vs. required=2\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"2\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingDone(\"village_center\")&&(g=!1),doLogEvent(\"uiEvent: exclude_flag=flag_village_center_tutorial_colleccted\"),the_val=0,void 0!=userContext.flags.flag_village_center_tutorial_colleccted&&(the_val=userContext.flags.flag_village_center_tutorial_colleccted),1==the_val&&(g=!1),!0==g&&(S=\"buildings\",w=subGotStrings('\"The <strong>Stone</strong> you requested has been produced in the Village Center, @address.\"'),\nz=void 0!=c&&void 0!=c.y?c.y:-212,u=void 0!=c&&void 0!=c.x?c.x:188,y=270,C=\"bottom\",s=\"#buildingmenubox\",h=\"-75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"265\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"building_panel_village_center\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_village_center_build_maester_tutorial_4\"),g=!0,d=\n\"ui_village_center_build_maester_tutorial_4\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+(a.stat.num_shop_items_started+\"\")+\" vs. required=2\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"2\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\n\"0\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingDone(\"village_center\")&&(g=!1),doLogEvent(\"uiEvent: exclude_flag=flag_village_center_tutorial_colleccted\"),the_val=0,void 0!=userContext.flags.flag_village_center_tutorial_colleccted&&(the_val=userContext.flags.flag_village_center_tutorial_colleccted),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to <strong>collect</strong> the Stone.\"),z=void 0!=c&&void 0!=c.y?c.y:102,u=void 0!=c&&void 0!=c.x?c.x:-40,y=170,C=\"top\",s=\"#collectbtn\",h=\"34\",A=-1!=\nh.indexOf(\",\")?h.split(\",\"):h,h=\"9\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"building_panel_village_center\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_village_center_build_maester_tutorial_4b\"),g=!0,d=\"ui_village_center_build_maester_tutorial_4b\",4<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: num_shop_items_started: value=\"+\n(a.stat.num_shop_items_started+\"\")+\" vs. required=2\"),the_val=void 0!=a.stat.num_shop_items_started?parseInt(a.stat.num_shop_items_started)||0:0,\"2\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: produced_stone: value=\"+(a.stat.produced_stone+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.produced_stone?parseInt(a.stat.produced_stone)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!1==isBuildingDone(\"village_center\")&&(g=!1),!0==g&&(H=\"flag_village_center_tutorial_colleccted\"),doLogEvent(\"after checks=\"+\ng);h=\"do_finish_production\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_village_center_stone_do_finish_production\"),g=!0,d=\"ui_village_center_stone_do_finish_production\",!0==g&&(H=\"flag_village_center_tutorial_colleccted\",O=\"true\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_holdings_quest_a_feast_to_fealty\"),g=!0,d=\"ui_holdings_quest_a_feast_to_fealty\",h=\"[pro_q9baratheon_a_feast_to_the_stag, pro_q9greyjoy_a_feast_for_the_kraken, pro_q9lannister_a_feast_for_the_imp, pro_q9martell_a_feast_to_the_sun, pro_q9stark_a_feast_to_the_north, pro_q9targaryen_a_feast_for_dragons, pro_q9tyrell_a_feast_to_the_rose, pro_q9tully_a_feast_for_the_riverlands]\",K=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?\n(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),!0==g&&(Q=Boolean(\"true\"),w=subGotStrings('\"@ftpe_fealty_guest has arrived, @address. Let us greet our guest properly.\"'),z=void 0!=c&&void 0!=c.y?c.y:52,u=void 0!=c&&void 0!=c.x?c.x:320,y=320,C=\"left\",s=\"#actionmenu\",h=\"88\",A=-1!=h.indexOf(\",\")?\nh.split(\",\"):h,h=\"243\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,T=\"true\",U=\"maester_lucas\"),doLogEvent(\"after checks=\"+g);h=\"quest_close_pro_q9baratheon_a_feast_to_the_stag, quest_close_pro_q9greyjoy_a_feast_for_the_kraken, quest_close_pro_q9lannister_a_feast_for_the_imp, quest_close_pro_q9martell_a_feast_to_the_sun, quest_close_pro_q9stark_a_feast_to_the_north, quest_close_pro_q9targaryen_a_feast_for_dragons, quest_close_pro_q9tyrell_a_feast_to_the_rose, quest_close_pro_q9tully_a_feast_for_the_riverlands\";\ndoLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_quest_ch4_close_pro_q9\"),g=!0,d=\"ui_quest_ch4_close_pro_q9\",!0==g&&(S=\"chapters\"),doLogEvent(\"after checks=\"+g);h=\"holdings, refresh_toolbar\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_banner_hud\"),g=\n!0,d=\"ui_lore_book_banner_hud\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: chapter_complete_1_4: value=\"+(a.stat.chapter_complete_1_4+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chapter_complete_1_4?parseInt(a.stat.chapter_complete_1_4)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: banned_saved: value=\"+(a.stat.banned_saved+\"\")+\" vs. required=0\"),the_val=void 0!=a.stat.banned_saved?parseInt(a.stat.banned_saved)||0:0,\"0\"!=the_val+\"\"&&(g=!1)):g=!1,\n!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:294,u=void 0!=c&&void 0!=c.x?c.x:385,y=312,C=\"top\",s=\".chapteractionheader\",h=\"75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-4\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"lorebook_animation_4_end\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_banner\"),g=!0,d=\"ui_lore_book_banner\",!0==g&&(w=subGotStrings(\"<strong>Design Banner:</strong> Create a Banner to fly over your house and alongside House @fealty's.\"),\nz=void 0!=c&&void 0!=c.y?c.y:452,u=void 0!=c&&void 0!=c.x?c.x:395,y=289,C=\"top\",s=\"#book_style\",h=\"380\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"468\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_banner_designer_tutorial\"),doLogEvent(\"after checks=\"+g);h=\"chapter_claimed_1_4\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_banner_claimed\"),g=!0,d=\"ui_lore_book_banner_claimed\",\n!0==g&&(C=\"bottom\",s=\"#book_style\",h=\"403\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"647\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"next_chapter_4\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_ch_5_close\"),g=!0,d=\"ui_lore_book_ch_5_close\",!0==g&&(C=\"top_right\",s=\"#book_style\",h=\"-68\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"661\",B=-1!=h.indexOf(\",\")?\nh.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_holdings_multiple_quests_1\"),g=!0,d=\"ui_holdings_multiple_quests_1\",a.stat?(doLogEvent(\"watch: banned_saved: value=\"+(a.stat.banned_saved+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.banned_saved?parseInt(a.stat.banned_saved)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,h=\"q1_meet_the_bailiff, q1_a_time_to_learn, q1_ss_a_pleasurable_task\",\nK=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),3!=userContext.actions.length&&(doLogEvent(\"num_actions_assigned: userContext.actions.length NOT 3\"),g=!1),doLogEvent(\"uiEvent: exclude_flag=multi_quests_info\"),\nthe_val=0,void 0!=userContext.flags.multi_quests_info&&(the_val=userContext.flags.multi_quests_info),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"When <strong>Multiple Quests</strong> are active, you may play them in any order.\"),z=void 0!=c&&void 0!=c.y?c.y:118,u=void 0!=c&&void 0!=c.x?c.x:316,y=200,C=\"left, left, left\",s=\"#actionmenu\",h=\"90, 147, 204\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"245, 245, 245\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,V=\"true\",X=\"multi_quests_info_close\"),doLogEvent(\"after checks=\"+\ng);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_holdings_multiple_quests_2\"),g=!0,d=\"ui_holdings_multiple_quests_2\",a.stat?(doLogEvent(\"watch: banned_saved: value=\"+(a.stat.banned_saved+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.banned_saved?parseInt(a.stat.banned_saved)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,h=\"q1_meet_the_bailiff, q1_a_time_to_learn, q1_ss_a_pleasurable_task\",\nK=h.replace(\"[\",\"\").replace(\"]\",\"\"),doLogEvent(\"quest_active: \"+h),-1!=h.indexOf(\",\")?(G=/\\[.*\\]/.test(h),N=!G,$.each(K.split(\",\"),function(c,b){if(activeQuest(a.quests,b)==G&&(doLogEvent(\"quest_active: \"+b+(G?\" IS\":\" NOT\")+\" active\"),(N=G)&&G))return!1}),N||(g=!1)):!1==activeQuest(a.quests,K)&&(doLogEvent(\"quest_active: \"+K+\" NOT active\"),g=!1),2!=userContext.actions.length&&(doLogEvent(\"num_actions_assigned: userContext.actions.length NOT 2\"),g=!1),doLogEvent(\"uiEvent: exclude_flag=multi_quests_info\"),\nthe_val=0,void 0!=userContext.flags.multi_quests_info&&(the_val=userContext.flags.multi_quests_info),1==the_val&&(g=!1),!0==g&&(w=subGotStrings(\"Sometimes, you will receive <strong>multiple</strong> Quests. You may start and finish these Quests in any order.\"),z=void 0!=c&&void 0!=c.y?c.y:85,u=void 0!=c&&void 0!=c.x?c.x:316,y=200,C=\"left, left\",s=\"#actionmenu\",h=\"90, 147\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"245, 245\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,V=\"true\",X=\"multi_quests_info_close\"),doLogEvent(\"after checks=\"+\ng);h=\"multi_quests_info_close\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_holdings_multiple_quests_close\"),g=!0,d=\"ui_holdings_multiple_quests_close\",a.stat?(doLogEvent(\"watch: banned_saved: value=\"+(a.stat.banned_saved+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.banned_saved?parseInt(a.stat.banned_saved)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(H=\"multi_quests_info\"),doLogEvent(\"after checks=\"+\ng);h=\"banner\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_banner_designer_tutorial_1\"),g=!0,d=\"ui_banner_designer_tutorial_1\",doLogEvent(\"uiEvent: require_flag = flag_banner_designer_tutorial\"),1!=userContext.flags.flag_banner_designer_tutorial&&(g=!1),!0==g&&(w=subGotStrings(\"Use the controls here to <strong>customize</strong> your banner shape, pattern, colors and sigils.\"),\nu=void 0!=c&&void 0!=c.x?c.x:-216,y=173,s=\"#banneroptions\",P=\"true\",R=\"banner_designer_tutorial_1\"),doLogEvent(\"after checks=\"+g);h=\"banner_designer_tutorial_1\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_banner_designer_tutorial_2\"),g=!0,d=\"ui_banner_designer_tutorial_2\",!0==g&&(w=subGotStrings(\"You may also click <strong>Random</strong> as many times as you like to see random combinations.\"),\nz=void 0!=c&&void 0!=c.y?c.y:389,u=void 0!=c&&void 0!=c.x?c.x:470,y=205,C=\"bottom_left\",s=\"#bannerholder\",h=\"493\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"558\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,P=\"true\",R=\"banner_designer_tutorial_2\"),doLogEvent(\"after checks=\"+g);h=\"banner_designer_tutorial_2\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_banner_designer_tutorial_3\"),g=!0,d=\"ui_banner_designer_tutorial_3\",\n!0==g&&(w=subGotStrings(\"Click here to <strong>save</strong> your Banner when you are finished. You may edit your Banner again at any time.\"),M=7500,z=void 0!=c&&void 0!=c.y?c.y:463,u=void 0!=c&&void 0!=c.x?c.x:574,y=155,C=\"right\",s=\"#bannerholder\",h=\"533\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"748\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_banner_designer_tutorial_done\",O=\"true\",aa=!0),doLogEvent(\"after checks=\"+g);h=\"quest_boss_accept_q1_boss_blood_for_medicine\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+\nb+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_boss_battle_tutorial_1\"),g=!0,d=\"ui_boss_battle_tutorial_1\",!0==g&&(C=\"top\",s=\".eventrewardwrap\",h=\"93\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"588\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_boss_battle_tutorial_started\"),doLogEvent(\"after checks=\"+g);h=\"quest_choose_ss_q1_boss_blood_for_medicine\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&\n-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_boss_battle_tutorial_2\"),g=!0,d=\"ui_boss_battle_tutorial_2\",5<userContext.playerData.character.level&&(g=!1),doLogEvent(\"uiEvent: require_flag = flag_boss_battle_tutorial_started\"),1!=userContext.flags.flag_boss_battle_tutorial_started&&(g=!1),!0==g&&(w=subGotStrings(\"Click here to assign a Sworn Sword to this <strong>Challenge</strong>.\"),z=void 0!=c&&void 0!=c.y?c.y:290,u=void 0!=c&&void 0!=c.x?c.x:33,y=199,C=\"bottom_right\",\ns=\".darkroundedbox.miniviewmenu\",h=\"362\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"192\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"warparty_close\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_boss_battle_tutorial_6\"),g=!0,d=\"ui_boss_battle_tutorial_6\",5<userContext.playerData.character.level&&(g=!1),!0==g&&(w=subGotStrings(\"Many Challenge quests have multiple <strong>stages</strong>. You will select Actions for each stage.\"),\nz=void 0!=c&&void 0!=c.y?c.y:-15,u=void 0!=c&&void 0!=c.x?c.x:75,y=240,C=\"left\",s=\".eventprogbar\",h=\"-23\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"13\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,H=\"flag_boss_battle_tutorial_action\",P=O=\"true\",R=\"boss_battle_tutorial_8\"),doLogEvent(\"after checks=\"+g);h=\"boss_battle_tutorial_7\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_boss_battle_tutorial_7\"),\ng=!0,d=\"ui_boss_battle_tutorial_7\",5<userContext.playerData.character.level&&(g=!1),doLogEvent(\"uiEvent: require_flag = flag_boss_battle_tutorial_action\"),1!=userContext.flags.flag_boss_battle_tutorial_action&&(g=!1),!0==g&&(w=subGotStrings(\"Select an <strong>Action</strong> for your Sworn Sword to perform.\"),z=void 0!=c&&void 0!=c.y?c.y:-8,u=void 0!=c&&void 0!=c.x?c.x:102,y=200,s=\"#bossoptions\",V=\"true\"),doLogEvent(\"after checks=\"+g);h=\"boss_battle_tutorial_8\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+\nb+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_boss_battle_tutorial_8\"),g=!0,d=\"ui_boss_battle_tutorial_8\",5<userContext.playerData.character.level&&(g=!1),doLogEvent(\"uiEvent: require_flag = flag_boss_battle_tutorial_action\"),1!=userContext.flags.flag_boss_battle_tutorial_action&&(g=!1),!0==g&&(w=subGotStrings(\"Actions taken by you appear in the <strong>Combat Log</strong>. The <strong>Player Chat</strong> is used to discuss strategy during the quest..\"),\nz=void 0!=c&&void 0!=c.y?c.y:-7,u=void 0!=c&&void 0!=c.x?c.x:5,y=368,C=\"bottom\",s=\".stoneridge\",h=\"87\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"54\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h,P=\"true\",R=\"boss_battle_tutorial_7\"),doLogEvent(\"after checks=\"+g);h=\"quest_close_q1_meet_the_bailiff, quest_close_q5_an_abrupt_end, quest_close_q1_boss_blood_for_medicine\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_pt5_end_lorebook\"),\ng=!0,d=\"ui_pt5_end_lorebook\",a.stat?(doLogEvent(\"watch: quest_q5_an_abrupt_end_complete: value=\"+(a.stat.quest_q5_an_abrupt_end_complete+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_q5_an_abrupt_end_complete?parseInt(a.stat.quest_q5_an_abrupt_end_complete)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch2: quest_ac_meet_groat: value=\"+(a.stat.quest_ac_meet_groat+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_ac_meet_groat?parseInt(a.stat.quest_ac_meet_groat)||0:0,\"1\"!=the_val+\n\"\"&&(g=!1)):g=!1,a.stat?(doLogEvent(\"watch3: quest_complete_q1_boss_blood_for_medicine: value=\"+(a.stat.quest_complete_q1_boss_blood_for_medicine+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.quest_complete_q1_boss_blood_for_medicine?parseInt(a.stat.quest_complete_q1_boss_blood_for_medicine)||0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,doLogEvent(\"uiEvent: exclude_flag=lorebook_animated\"),the_val=0,void 0!=userContext.flags.lorebook_animated&&(the_val=userContext.flags.lorebook_animated),1==the_val&&(g=!1),\n!0==g&&(S=\"chapters\"),doLogEvent(\"after checks=\"+g);h=\"holdings\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: ui_lore_book_hud_5\"),g=!0,d=\"ui_lore_book_hud_5\",3<userContext.playerData.character.level&&(g=!1),a.stat?(doLogEvent(\"watch: chapter_complete_1_5: value=\"+(a.stat.chapter_complete_1_5+\"\")+\" vs. required=1\"),the_val=void 0!=a.stat.chapter_complete_1_5?parseInt(a.stat.chapter_complete_1_5)||\n0:0,\"1\"!=the_val+\"\"&&(g=!1)):g=!1,!0==g&&(z=void 0!=c&&void 0!=c.y?c.y:294,u=void 0!=c&&void 0!=c.x?c.x:385,y=312,C=\"top\",s=\".chapteractionheader\",h=\"75\",A=-1!=h.indexOf(\",\")?h.split(\",\"):h,h=\"-4\",B=-1!=h.indexOf(\",\")?h.split(\",\"):h),doLogEvent(\"after checks=\"+g);h=\"quest_reward_alignment_mouseover_realm\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: quest_alignment_realm\"),g=!0,d=\n\"quest_alignment_realm\",!0==g&&(Q=Boolean(\"true\"),w=subGotStrings(\"Choosing this response will give you <strong>Realm</strong> points. Realm means to serve Westeros above all else.\"),L=300,z=void 0!=c&&void 0!=c.y?c.y:-95,u=void 0!=c&&void 0!=c.x?c.x:334,y=270,s=\"#questbtminfo\",Y=!0,Z=\"icons/alignment-realm-lg.png\",aa=!0),doLogEvent(\"after checks=\"+g);h=\"quest_reward_alignment_mouseover_family\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\n\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: quest_alignment_family\"),g=!0,d=\"quest_alignment_family\",!0==g&&(Q=Boolean(\"true\"),w=subGotStrings(\"Choosing this response will give you <strong>Family</strong> points. Family means to consider your loved ones first.\"),L=300,z=void 0!=c&&void 0!=c.y?c.y:-95,u=void 0!=c&&void 0!=c.x?c.x:334,y=270,s=\"#questbtminfo\",Y=!0,Z=\"icons/alignment-family-lg.png\",aa=!0),doLogEvent(\"after checks=\"+g);h=\"quest_reward_alignment_mouseover_old_ways\";doLogEvent(\"trigger_src=[\"+\nh+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: quest_alignment_old_ways\"),g=!0,d=\"quest_alignment_old_ways\",!0==g&&(Q=Boolean(\"true\"),w=subGotStrings(\"Choosing this response will give you <strong>Old Ways</strong> points. Old Ways means taking personal responsibility and adhering to the moral code of the Old Gods.\"),L=300,z=void 0!=c&&void 0!=c.y?c.y:-95,u=void 0!=c&&void 0!=c.x?c.x:334,y=270,s=\"#questbtminfo\",\nY=!0,Z=\"icons/alignment-old_ways-lg.png\",aa=!0),doLogEvent(\"after checks=\"+g);h=\"quest_reward_alignment_mouseover_new_ways\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: quest_alignment_new_ways\"),g=!0,d=\"quest_alignment_new_ways\",!0==g&&(Q=Boolean(\"true\"),w=subGotStrings(\"Choosing this response will give you <strong>New Ways</strong> points. New Ways means being chivalrous and obeying the Seven or the new traditions of R'hllor.\"),\nL=300,z=void 0!=c&&void 0!=c.y?c.y:-95,u=void 0!=c&&void 0!=c.x?c.x:334,y=270,s=\"#questbtminfo\",Y=!0,Z=\"icons/alignment-new_ways-lg.png\",aa=!0),doLogEvent(\"after checks=\"+g);h=\"quest_reward_alignment_mouseover_cunning\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: quest_alignment_cunning\"),g=!0,d=\"quest_alignment_cunning\",!0==g&&(Q=Boolean(\"true\"),w=subGotStrings(\"Choosing this response will give you <strong>Cunning</strong> points. Cunning means taking advantage of opportunities and looking for ways to gain profit.\"),\nL=300,z=void 0!=c&&void 0!=c.y?c.y:-95,u=void 0!=c&&void 0!=c.x?c.x:334,y=270,s=\"#questbtminfo\",Y=!0,Z=\"icons/alignment-crafty-lg.png\",aa=!0),doLogEvent(\"after checks=\"+g);h=\"quest_reward_alignment_mouseover_truthfulness\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: quest_alignment_truthfulness\"),g=!0,d=\"quest_alignment_truthfulness\",!0==g&&(Q=Boolean(\"true\"),w=subGotStrings(\"Choosing this response will give you <strong>Truthful</strong> points. Truthful means acting in a straightforward way.\"),\nL=300,z=void 0!=c&&void 0!=c.y?c.y:-95,u=void 0!=c&&void 0!=c.x?c.x:334,y=270,s=\"#questbtminfo\",Y=!0,Z=\"icons/alignment-truthfulness-lg.png\",aa=!0),doLogEvent(\"after checks=\"+g);h=\"quest_reward_alignment_mouseout\";doLogEvent(\"trigger_src=[\"+h+\"] event_name=[\"+b+\"]\");if((b==h||-1!=h.indexOf(\",\")&&-1!=$.inArray(b,h.replace(/ /g,\"\").split(\",\")))&&!0!=g)doLogEvent(\"ui triggered: quest_alignment_mouseout\"),g=!0,d=\"quest_alignment_mouseout\",!0==g&&(ba=!0,I=\".image_tip\"),doLogEvent(\"after checks=\"+g);doLogEvent(\"uiEvent: firing=\"+\ng);if(userContext.pauseEventTriggers&&(!userContext.pauseEventTriggers||void 0==userContext.pauseEventTriggers))g=!1;if(!0==g){if(void 0!=O)for(obj in userContext.flags=[],userContext.playerData.stat)-1!=obj.indexOf(\"ui_flag_\")&&delete userContext.playerData.stat[String(obj)];void 0!=H&&(doLogEvent(\"uiEvent: set_flag = \"+H),userContext.flags[H]=!0);doLogEvent(\" trigger_src=\"+h+\" event_name=\"+b);userContext.tooltipsEnabled=ca;if(!1==Q&&void 0==I&&($(\".tuttip, .tuttip.tipbox\").remove(),$(\".tutarrow_wrap\").remove(),\nba)||void 0!=I&&(0==M?$(I).remove():$(I).fadeOut(M,function(){$(this).remove()}),ba))return;void 0!=S&&doMenuSelect(S);void 0!=k&&dialogAlert({style:\"alert\",text:k,heading:f,button1:p,symbol:D,image:void 0,image_width:void 0});void 0!=q&&iosSignal(q,m);if(void 0!=w||void 0!=C){void 0==w&&(w=\"\");doLogEvent(\"uiEvent: display text: \"+w);var J=\"\",fa=void 0,da=void 0,ha=[];c=\"tuttip\";g=\"block\";k=\"auto\";void 0!=C&&-1!=C.indexOf(\",\")&&(C=C.replace(/ /g,\"\").replace(/\"/g,\"'\").split(\",\"));\"number\"!=typeof A&&\n-1!=A.indexOf(\",\")&&(A=A.split(\",\"));\"number\"!=typeof B&&-1!=B.indexOf(\",\")&&(B=B.split(\",\"));if(0<L||\"\"==w)g=\"none\";0<E&&(k=E+\"px\");T?c+=\" tipbox\":Y&&(c+=\" tipbox image_tip\");aa&&(c+=\" tip_high\");J+='<div id=\"tip_'+d+'\" class=\"'+c+'\" style=\"width:'+y+\"px; height: \"+k+\"; top: \"+z+\"px; left: \"+u+\"px; display: \"+g+'\">';!T&&(!Y&&\"\"!=w)&&(J+='<span class=\"tuttipbg\"></span><p>'+w);void 0!=P&&void 0==T&&(void 0==R&&console.warn(\"Next button tooltip specified with no Next button click handler!\"),J+='<span class=\"btnwrap btnmed nextbtn\" id=\"tip_next\" onclick=\"uiEvent(\\''+\nR+'\\'); return false;\"><span class=\"btnedge\"><a class=\"btnbrown\"><span></span>More</a></span></span>');void 0!=V&&(void 0==X?(z=\"confirm_override\",console.warn(\"Confirm button tooltip specified with no Confirm button click handler. The button will only remove the tooltip.\")):z=X,J+='<span class=\"btnwrap btnmed nextbtn\" id=\"tip_ok\" onclick=\"uiEvent(\\''+z+'\\'); return false;\"><span class=\"btnedge\"><a class=\"btnbrown\"><span></span>Ok</a></span></span>');void 0!=T&&(void 0==U?console.warn(\"NPC portrait for tooltip has no NPC specified.\"):\n(J+=\"<em></em>\",J+='<div class=\"chapternpcbg\">',J+='\\t<div class=\"chapternpcbox\">',J+='\\t\\t<div class=\"chapternpcpic\">',J+='\\t\\t\\t<img id=\"tooltip_npc'+U+'\" src= \"'+getToolTipNpc(U).img+'\" />',J+='\\t\\t\\t<div class=\"chapternpcframe\"></div>',J+=\"\\t\\t</div>\",J+='\\t\\t<div class=\"chapternpctxt pic\">',J+=\"\\t\\t\\t<h6>\"+getToolTipNpc(U).npc_name+\"</h6>\",J+=\"\\t\\t\\t<p>\"+w+\"</p>\",P&&R&&(J+='\\t<span class=\"btnwrap btnmed nextbtn\" id=\"tip_next\" onclick=\"uiEvent(\\''+R+'\\'); return false;\"><span class=\"btnedge\"><a class=\"btnbrown\"><span></span>More</a></span></span>'),\nJ+=\"\\t\\t</div>\",J+=\"\\t</div>\",J+=\"</div>\"));Y&&(void 0==Z?console.warn(\"Image for tooltip for event \"+b+\" has no path specified.\"):(J+=\"<em></em>\",J+='<div class=\"chapternpcbg\">',J+='\\t\\t<div class=\"chapternpcpic\" style=\"width: 72px; height: 70px\">',J+='\\t\\t\\t<img id=\"tooltip_npc\" src= \"'+assetUrl()+\"/images/\"+Z+'\" style=\"width: 72px; height: 70px\" />',J+=\"\\t\\t</div>\",J+='\\t\\t<div class=\"chapternpctxt pic\">',J+=\"\\t\\t\\t<p>\"+w+\"</p>\",P&&R&&(J+='\\t<span class=\"btnwrap btnmed nextbtn\" id=\"tip_next\" onclick=\"uiEvent(\\''+\nR+'\\'); return false;\"><span class=\"btnedge\"><a class=\"btnbrown\"><span></span>More</a></span></span>'),J+=\"\\t\\t</div>\",J+=\"\\t</div>\",J+=\"</div>\"));var J=J+\"</div>\",ga=function(a){switch(void 0==a?C:C[a]){case \"left\":return\"tutarrowl\";case \"right\":return\"tutarrowr\";case \"top\":return\"tutarrowt\";case \"bottom\":return\"tutarrowb\";case \"bottom_left\":return\"tutarrowbl\";case \"bottom_right\":return\"tutarrowbr\";case \"top_right\":return\"tutarrowtr\";case \"top_left\":return\"tutarrowtl\"}},ia=function(a,c,b,f){if(void 0!=\na)return f=\"arrow_\"+d+\"_\"+a+\"_\"+f,J+='<div class=\"tutarrow_wrap '+a+'\" style=\"',0!=b&&(J+=\"left: \"+b+\"px; \"),0!=c&&(J+=\"top: \"+c+\"px;\"),J+='\"> <img src=\"/images/buttons/tutarrow.png\" id=\"'+f+'\" class=\"tutarrow\" width=\"70\" height=\"70\" /> </div>',f};$.isArray(C)?$.each(C,function(a,c){void 0!=ga(a)&&(ga(a),da=C[a],fa=ia(da,A[a],B[a],a),ha.push([fa,da]))}):(ga(),da=C,fa=ia(da,A,B,0),ha.push([fa,da]));doLogEvent(\"DBG: CURRENT DOM length=\"+$(s));$(s).prepend(J);setTimeout(function(){0==$(\"#tip_\"+d).length&&\n(ea=setInterval(function(){1==$(s).length&&(clearInterval(ea),$(s).prepend(J))},500))},500);0<L&&$(\"#tip_\"+d).fadeIn(L);0<M&&($(\"#tip_\"+d).delay(M).fadeOut(\"fast\",function(){uiEvent(W,a)}),$.isArray(C)?$.each(C,function(a,c){$(\"#arrow_\"+a+\"_\"+d).delay(M).fadeOut(\"fast\")}):$(\"#arrow__\"+d).delay(M).fadeOut(\"fast\"))}}}else isIpad()&&200>mobileVersion?uiEventSignalLegacy(b):uiEventSignal(b)}";
original.doAdventure =
"function doAdventure(b,a,c){if(void 0!=userContext.setSwornSword&&void 0!=userContext.setSwornSword.batch_type&&0!=userContext.setSwornSword.batch_type)return 1==userContext.setSwornSword.batch_type&&(!1==c&&prepareAdvPartyTimeout(),$.ajax({url:\"/play/batch_set_sworn_sword_target?batch_type=1&ss_id=\"+userContext.setSwornSword.id+\"&batch_action=\"+a+\"&target_symbol=\"+b,dataType:\"JSON\",success:function(a){questClose();showAdvPartyResponse(a);uiEvent(\"ss_adventure_party\");return!0},error:function(c){400==\nc.status?advPartyFail():409==c.status?setTimeout(function(){doAdventure(b,a,!0)},5E3):spinTimeout()}})),!1;$.ajaxQueue({url:\"/play/adventure/\"+userContext.setSwornSword.id+\"?action_name=\"+a+\"&symbol=\"+b,dataType:\"JSON\",success:function(c){analytics.track(\"Adventure Start\",{adventure_region:c.location,adventure_action:a,adventure_swornsword_id:userContext.setSwornSword.id,adventure_swornsword_level:userContext.setSwornSword.ugprade_level});analytics.wizardtrack(\"Adventure Start\",{adventure_region:c.location,\nadventure_action:a,adventure_swornsword_id:userContext.setSwornSword.id,adventure_swornsword_level:userContext.setSwornSword.ugprade_level});adventureProgress(userContext.setSwornSword.id,c);uiEvent(\"do_adventure\");\"1\"==userContext.playerData.stat.onboarding_ftue&&uiTelemetry(\"ss_adventure\")}})}";
original.playSound =
"function playSound(a,d){if(!1!=doSound())if($.browser.msie||console.log(\"playSound [1]: \"+a),!1==soundEnabled)$.browser.msie||console.log(\"playSound [1]: sound disabled\");else{void 0==d&&(d=0);musicMuted=userContext.mute_music;soundMuted=userContext.mute_sound;try{if(-1!=a.indexOf(\"voice-\")&&($.browser.msie||console.log(\"play voiceover\"),soundMapChannel[a]=\"voice\"),theUrl=soundMap[a],void 0==soundMapChannel[a]&&(soundMapChannel[a]=\"channel1\"),isWeb()){if($.browser.msie||console.log(\"playSound[2]: \"+\na+\" soundReady=\"+soundReady),!0==soundReady){$.browser.msie||console.log(\"soundReady: \"+soundMapChannel[a]);play_it=!0;if(\"music\"==soundMapChannel[a]){if(0==musicVolume||!0==musicMuted)play_it=!1;vol=musicVolume;$.browser.msie||console.log(\"MUSIC vol=\"+vol)}else{if(0==soundVolume||!0==soundMuted)play_it=!1;vol=soundVolume;$.browser.msie||console.log(\"SOUND vol=\"+vol)}if(\"channel1\"==soundMapChannel[a]||\"channel2\"==soundMapChannel[a]||\"channel3\"==soundMapChannel[a]||\"channel4\"==soundMapChannel[a]||\n\"channel5\"==soundMapChannel[a]||\"music\"==soundMapChannel[a]||\"voice\"==soundMapChannel[a]||\"voice2\"==soundMapChannel[a])if(!0==soundChannel[soundMapChannel[a]])$.browser.msie||console.log(\"Sound channel busy: \"+soundMapChannel[a]+\" playing=\"+soundActive[a]),\"music\"==soundMapChannel[a]&¤tMusic!=a&&(doLog(\"switch to new music\"),soundCrossFade(\"music\",vol,function(){playSound(a,d)}));else if(sound_url=assetUrl()+theUrl,$.browser.msie||console.log(\"SOUND: play_it=\"+play_it),!0!=play_it)$.browser.msie||\nconsole.log(\"SOUND: returning\");else{\"music\"==soundMapChannel[a]&&(doLog(\"currentMusic = \"+currentMusic),currentMusic=a);$.browser.msie||console.log(\"SOUND: createSound\");soundObject=soundManager.createSound({id:soundMapChannel[a],url:theUrl,volume:vol,onfinish:function(){$.browser.msie||console.log(\"soundObject.onfinish: id=\"+a+\" soundMapChannel=\"+soundMapChannel[a]);soundChannel[soundMapChannel[a]]=!1;soundManager.destroySound(soundMapChannel[a]);\"music\"==soundMapChannel[a]&&(0<musicVolume&&!0!=\nuserContext.mute_music)&&playSound(a)}});if(null==soundObject||void 0==soundObject)$.browser.msie||console.log(\"soundObject: invalid\");!0==play_it&&(soundChannel[soundMapChannel[a]]=!0,soundActive[soundMapChannel[a]]=sound_url,soundManager.getSoundById(soundMapChannel[a]).setVolume(vol),0<d?setTimeout(soundObject.play,d):($.browser.msie||console.log(\"soundObject.play: [\"+soundMapChannel[a]+\"] \"+soundActive[soundMapChannel[a]]),soundObject.play()))}else 0<vol&&($.browser.msie||console.log(\"playing [3]: [\"+\nsoundMapChannel[a]+\"] vol=\"+vol),soundManager.getSoundById(soundMapChannel[a]).setVolume(vol),soundManager.getSoundById(soundMapChannel[a]).volume=vol,soundManager.play(a))}}else iosSignal(\"playsound\",soundMapChannel[a]+\":\"+soundMap[a].substring(soundMap[a].lastIndexOf(\"/\")+1)+\":\"+d)}catch(e){$.browser.msie||console.log(\"playSound exception: \"+e)}}}";
original.submitWorldEventAction =
"function submitWorldEventAction(b,a,c){showSpinner();data={sworn_sword_id:b,order:a};!0==c&&(data.weakness_attack=c);$.ajax({url:\"/play/world_event_attack\",data:data,complete:function(){hideSpinner()},success:function(a){hideSpinner();a.error&&doAlert(\"Error Sending Swornsword\",formatWorldEventError(a.error,a.error_code));a.swornsword&&(insertInventoryFromItem(userContext.playerData.inventory,a.swornsword),doItemCooldown(a.swornsword));a.challenge&&updateWorldEventChallenge(a.challenge);!0==a.show_outmaneuver_alert&&\ndialogAlert({style:\"alert\",text:\"The order you just sent is guaranteed to critically hit and will have a bonus chance to find a weakness.\",heading:\"\",button1:\"Okay\"})}})}";
original.getWorldEventAttackResults =
"function getWorldEventAttackResults(b,a){showSpinner();$.ajax({url:\"/play/world_event_attack_results\",data:{sworn_sword_id:b},complete:function(){hideSpinner()},success:function(c){hideSpinner();c.error?doAlert(\"Error Getting Results\",formatWorldEventError(c.error,c.error_code)):(c.swornsword&&(insertInventoryFromItem(userContext.playerData.inventory,c.swornsword),doItemCooldown(c.swornsword)),c.character&&(userContext.playerData.stat.level_progress=c.xp_after,userContext.playerData.character=c.character,\ninfoBar(userContext.playerData,userContext.playerData.inventory)),void 0!=c.prestige_awarded&&updatePrestige(void 0,c.prestige_awarded),isWeb()?(c=_.template('<div class=\"modalbg\"></div><div class=\"contentframe1\" style=\"top:44px; z-index:22;\"><div class=\"contentframe2\"><div class=\"contentframe3\"><div class=\"contentframe4\"><span class=\"corner tl\"></span><span class=\"corner tr\"></span><a class=\"closebtn\" onclick=\"closeWorldEventAttackResults();\">close</a> <h2 class=\"alertheader\"><%= translateString(\\'we_order_completed\\') %></h2> <div class=\"alertcontents\"> <div class=\"alertbox\"> <div class=\"alertboxinner\"> <div class=\"weinforow\"> <%= itemMiniView(data.swornsword) %> <% if(data.wounds > 0) { %> <div class=\"orderwound\">Wounded</div> <% } %> <div class=\"bossopttop\"> <div class=\"bossoptbtn\"> <span class=\"btnwrap btnlg\"><span class=\"btnedge\"><a class=\"btnbrown\"> \\x3c!-- Selected button is brown --\\x3e <span><img src=\"<%= assetUrl() %>/images/content/talent/<%=data.action%>.png\" /></span> <strong><%= translateString(data.action) %></strong> <em><%= data.label %></em> </a></span></span> <div class=\"challengebar\"> <div class=\"challengeicon\"></div> <div class=\"challenge-outer challengelose\"> <div style=\"width:<%= data.cr %>%;\" class=\"challenge-yours\"></div> <div style=\"width:<%=100 - data.cr%>%;\" class=\"challenge-target\"></div> </div> </div> </div> </div> </div> <% if(data.outcome > 0) { %> <h3 class=\"challengerewardhead-success\">Success!</h3> <% } else { %> <h3 class=\"challengerewardhead-lose\">Failure!</h3> <% } %> <div class=\"weinforow orderresult\"> <p><%= data.damage %> Damage Dealt</p> <% if (data.prestige_awarded != undefined && data.prestige_awarded > 0) {%> <span class=\"rewarditem\"> <span class=\"rewardicon\"><img src=\"<%= assetUrl() %>/images/icons/icon-prestige.png?<%= assetVersion %>\" /></span> +<%= data.prestige_awarded %> </span> <% } %> <% if(data.xp_after > data.xp_before) { %> <%= xpReward(data.xp_before, data.xp_after) %> <% } %> <div class=\"weinforow\"> <div class=\"weinfo\"><%= data.text %></div> </div> </div> </div> </div> </div> <div class=\"alertbtm\"> <% if(data.can_repeat) { %> <span class=\"btnwrap btnlg\" onclick=\"submitWorldEventAction(<%=data.swornsword.id%>,\\'<%=data.action%>\\');closeWorldEventAttackResults();\"><span class=\"btnedge\"><a class=\"btngold\">Repeat</a></span></span> <% } %> <span class=\"btnwrap btnlg\" onclick=\"closeWorldEventAttackResults();\"><span class=\"btnedge\"><a class=\"btngold\">Close</a></span></span> </div></div></div></div></div>',\n{data:c}),$(\".weordercomplete\").html(c).show()):iosSignal(\"we\",\"viewSSResult\",c),a&&refreshWorldEventChallenge())}})}";
original.charCharacterTab =
"function charCharacterTab(){$(\".lineage\").hide();playerData=userContext.focusData;markup=\"\";markup+='\\t\\t\\t\\t<div class=\"stoneridge\" id=\"charactertop\">';markup+='\\t\\t\\t\\t\\t<div class=\"left35\">';markup+='\\t\\t\\t\\t\\t\\t<div class=\"charframe\">';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"portraitimage\"><img src=\"'+playerData.portrait_pic+'\" /></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div id=\"character_sheet_portrait\" class=\"charframe-lg\"></div>';0<playerData.id&&playerData.id==userContext.playerData.character.id&&(markup+=\n'\\t\\t\\t\\t\\t\\t\\t<a class=\"lineagebtn\" onclick=\"lineageIncarnationsPage();\"></a>');markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t\\t<div class=\"charnameoverlay\">';if(userContext.focusData.user_id==userContext.playerData.character.user_id){var b=playerData.title+\" \";if(\"male\"==userContext.playerData.strings.gender){if(1<userContext.playerData.strings.eligible_titles_male.length){b=\"\";markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"selectwrap\">';markup+=\"\\t\\t\\t\\t\\t\\t\\t\\t<select id=\\\"selecttitle\\\" onchange=\\\"$('#portrait_name > em').html($('#selecttitle').val());return setTitle('selecttitle',characterModal);\\\">\";\nfor(var a=0;a<userContext.playerData.strings.eligible_titles_male.length;a++)selected=\"\",playerData.title==userContext.playerData.strings.eligible_titles_male[a].title&&(selected=\"selected\"),markup+=\"<option \"+selected+\">\"+userContext.playerData.strings.eligible_titles_male[a].title+\"</option>\";markup+=\"\\t\\t\\t\\t\\t\\t\\t\\t</select>\";markup+=\"\\t\\t\\t\\t\\t\\t\\t</div>\"}}else if(\"female\"==userContext.playerData.strings.gender&&1<userContext.playerData.strings.eligible_titles_female.length){markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"selectwrap\">';\nmarkup+=\"\\t\\t\\t\\t\\t\\t\\t\\t<select id=\\\"selecttitle\\\" onchange=\\\"$('#portrait_name > em').html($('#selecttitle').val());return setTitle('selecttitle',characterModal);\\\">\";b=\"\";for(a=0;a<userContext.playerData.strings.eligible_titles_female.length;a++)selected=\"\",playerData.title==userContext.playerData.strings.eligible_titles_female[a].title&&(selected=\"selected\"),markup+=\"<option \"+selected+\">\"+userContext.playerData.strings.eligible_titles_female[a].title+\"</option>\";markup+=\"\\t\\t\\t\\t\\t\\t\\t\\t</select>\";\nmarkup+=\"\\t\\t\\t\\t\\t\\t\\t</div>\"}markup+=\"\\t\\t\\t\\t\\t\\t\\t<h3><em>\"+b+\"</em>\"+playerData.name+\"</h3>\";markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+=\"\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t<div class=\"center30\">';markup+='\\t\\t\\t\\t\\t\\t<div class=\"holdingsname\">';playerData.holdings&&(markup+=\"\\t\\t\\t\\t\\t\\t\\t<h3>Holdings:</h3>\",markup+='\\t\\t\\t\\t\\t\\t\\t<input id=\"holdings_name\" type=\"text\" value=\"'+playerData.holdings+'\" onchange=\"renameHoldings();\"/>')}else markup+=' <span class=\"btnwrap btnmed\" id=\"ptpbtn\" style=\"position: absolute; top: -200px; width: 200px; left: -10px\"><span class=\"btnedge\"><a class=\"btnbrown\" onclick=\"return pvpStartWithTarget('+\nplayerData.id+');\"><span></span>Player to Player</a></span></span>',markup+=' <span class=\"btnwrap btnmed frnd-none\" id=\"friendbtn\" style=\"display:none;\"><span class=\"btnedge\"><a class=\"btnbrown\" onclick=\"$(\\'.frnd-none\\').fadeOut(\\'slow\\',function(){ $(\\'.frnd-pending\\').show(); });friendSendRequest('+playerData.user_id+');\"><span></span>Add</a></span></span>',markup+=' <span class=\"btnwrap btnmed frnd-friends\" id=\"friendbtn\" style=\"display:none;\"><span class=\"btnedge\"><a class=\"btnbrown\" onclick=\"$(\\'.frnd-friends\\').fadeOut(\\'slow\\',function(){ $(\\'.frnd-none\\').show(); });friendRemove('+\nplayerData.user_id+');\"><span></span>Remove</a></span></span>',markup+=' <span class=\"btnwrap btnmed frnd-pending\" id=\"friendbtn\" style=\"display:none;\"><span class=\"btnedge\"><a class=\"btnbrown\"><span></span>Pending</a></span></span>',b=playerData.title_and_name,b=b.replace(playerData.title,\"<em>\"+playerData.title+\"</em>\"),b=b.replace(playerData.name,\"<h3>\"+playerData.name+\"</h3>\"),markup+=b,markup+=\"\\t\\t\\t\\t\\t\\t</div>\",markup+=\"\\t\\t\\t\\t\\t</div>\",markup+='\\t\\t\\t\\t\\t<div class=\"center30\">',\nmarkup+='\\t\\t\\t\\t\\t\\t<div class=\"holdingsname\">',markup+=\"\\t\\t\\t\\t\\t\\t\\t<h3>Holdings:</h3>\",markup+=\"\\t\\t\\t\\t\\t\\t\\t<h2>\"+playerData.holdings+\"</h2>\";markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t\\t<div class=\"reviewfealty\">\\t';void 0!=playerData.fealty&&(markup+=' <div class=\"reviewcircle\">',markup+=' <a class=\"icon-book\" onclick=\"lorePage(\\'house_'+playerData.fealty.toLowerCase()+\"')\\\"></a>\",markup+=' <img style=\"margin: 7px\" img src=\"'+\nassetUrl()+\"/images/banner-\"+playerData.fealty.toLowerCase()+'-lg.png?t=0c2aaa2a46da\"></img>',markup+=\" </div>\");markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t <div class=\"reviewbackground\">\\t';void 0!=playerData.background_option&&(markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"reviewcircle '+playerData.background_option+'\">',markup+='\\t\\t\\t\\t\\t\\t\\t\\t<a class=\"icon-book\" onclick=\"lorePage(\\'background-'+playerData.background_option+\"');\\\"></a>\",markup+=\"\\t\\t\\t\\t\\t\\t\\t</div>\");markup+=\n\"\\t\\t\\t\\t\\t\\t</div>\";userContext.focusData.user_id!=userContext.playerData.character.user_id&&(markup+='\\t\\t\\t\\t\\t\\t<div class=\"charequipment\">',markup+=\"\\t\\t\\t\\t\\t\\t\\t<h3>Equipment</h3>\",markup=null==playerData.weapon?markup+'\\t\\t\\t\\t\\t\\t<div class=\"iconview iconview-weapon\" ></div>':markup+itemIconView(playerData.weapon,\"inventoryDisplayStatsWithTab\",\"iconview-weapon\"),markup=null==playerData.armor?markup+' <div class=\"iconview iconview-armor\" ></div>':markup+itemIconView(playerData.armor,\n\"inventoryDisplayStatsWithTab\",\"iconview-armor\"),markup=null==playerData.companion?markup+' <div class=\"iconview iconview-companion\" ></div>':markup+itemIconView(playerData.companion,\"inventoryDisplayStatsWithTab\",\"iconview-companion\"),markup+=\"\\t\\t\\t\\t\\t\\t</div>\",markup+='<span class=\"btnwrap btnlg\" style=\"position: relative; left: -285px; margin-top: 230px; z-index: 1\" onclick=\"return contactPlayer('+playerData.id+\",'\"+escape(playerData.name)+'\\')\"><span class=\"btnedge\"><a class=\"btngold\"><span></span>Send a Raven</a></span></span>');\nplayerData.alliance_name&&(markup+='\\t\\t\\t\\t\\t\\t\\t<div style=\"position:relative; top:-30px; z-index: 1\"><h3>Alliance:</h3>',markup+='\\t\\t\\t\\t\\t\\t\\t<a href=\"#\" onclick=\"return allianceInfo('+playerData.alliance_id+')\">'+playerData.alliance_name+\"</a></div>\");markup+=\"\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t<div class=\"right35\">';markup+='\\t\\t\\t\\t\\t\\t<div class=\"charframe\">';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"portraitimage\"></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"charframe-lg\"></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"charbanner-lg\" style=\"margin-left: -7px;\"><img src=\"'+\nplayerData.banner+'\" /></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"bannerpole-lg\"></div>';userContext.focusData.user_id==userContext.playerData.character.user_id&&(markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"editbanneroverlay\">',markup+='\\t\\t\\t\\t\\t\\t\\t\\t<span class=\"btnwrap btnmed\" id=\"editbtn\"><span class=\"btnedge\"><a class=\"btnbrown\" onclick=\"return bannerDesigner();\"><span></span>Edit</a></span></span>',markup+=\"\\t\\t\\t\\t\\t\\t\\t</div>\");markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+=\"\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t<div class=\"stoneridgebtm\"></div>';\nmarkup+=\"\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t<div class=\"chargenbox\" id=\"alignment\">';markup+='\\t\\t\\t\\t\\t<div class=\"marbletop oldways realm crafty\">';markup+=\"\\t\\t\\t\\t\\t\\t<h3>Alignment</h3>\";markup+='\\t\\t\\t\\t\\t\\t<div class=\"alignmenttabs\">';markup+=\"\\t\\t\\t\\t\\t\\t\\t<a id=\\\"alignmenttab-tradition\\\" class=\\\"active\\\" onclick=\\\"$(this).siblings().removeClass('active');$(this).addClass('active');$('.alignmentbar').hide();$('#alignmentbar-tradition').show();\\\" onmouseover=\\\"return doTip('tip_alignment_tradition',function(){return renderAlignmentTip('tradition')});\\\" onmouseout=\\\"return noTip('tip_alignment_tradition');\\\"><span></span><em></em></a>\";\nmarkup+=\"\\t\\t\\t\\t\\t\\t\\t<a id=\\\"alignmenttab-duty\\\" onclick=\\\"$(this).siblings().removeClass('active');$(this).addClass('active');$('.alignmentbar').hide();$('#alignmentbar-duty').show();\\\" onmouseover=\\\"return doTip('tip_alignment_duty',function(){return renderAlignmentTip('duty')});\\\" onmouseout=\\\"return noTip('tip_alignment_duty');\\\"><span></span><em></em></a>\";markup+=\"\\t\\t\\t\\t\\t\\t\\t<a id=\\\"alignmenttab-integrity\\\" onclick=\\\"$(this).siblings().removeClass('active');$(this).addClass('active');$('.alignmentbar').hide();$('#alignmentbar-integrity').show();\\\" onmouseover=\\\"return doTip('tip_alignment_integrity',function(){return renderAlignmentTip('integrity')});\\\" onmouseout=\\\"return noTip('tip_alignment_integrity');\\\"><span></span><em></em></a>\";\nmarkup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t\\t<div id=\"alignmentbar-tradition\" class=\"alignmentbar\">';markup+=\"\\t\\t\\t\\t\\t\\t\\t<div class=\\\"alignmenticon-left\\\" onmouseover=\\\"return doTip('tip_alignment_old_ways',function(){return renderAlignmentTip('old_ways')});\\\" onmouseout=\\\"return noTip('tip_alignment_old_ways');\\\"></div>\";markup+=\"\\t\\t\\t\\t\\t\\t\\t<div class=\\\"alignmenticon-right\\\" onmouseover=\\\"return doTip('tip_alignment_new_ways',function(){return renderAlignmentTip('new_ways')});\\\" onmouseout=\\\"return noTip('tip_alignment_new_ways');\\\"></div>\";\nmarkup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"aligncenter\"></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"alignbar-left\" style=\"width:30%;\"><span></span></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"alignbar-right\" style=\"width:5%;\"><span></span></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<p class=\"aligntext-left\">Old Ways</p>';markup+='\\t\\t\\t\\t\\t\\t\\t<p class=\"aligntext-right\">New Ways</p>';markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t\\t<div id=\"alignmentbar-duty\" class=\"alignmentbar\" style=\"display:none;\">';markup+=\"\\t\\t\\t\\t\\t\\t\\t<div class=\\\"alignmenticon-left\\\" onmouseover=\\\"return doTip('tip_alignment_family',function(){return renderAlignmentTip('family')});\\\" onmouseout=\\\"return noTip('tip_alignment_family');\\\"></div>\";\nmarkup+=\"\\t\\t\\t\\t\\t\\t\\t<div class=\\\"alignmenticon-right\\\" onmouseover=\\\"return doTip('tip_alignment_realm',function(){return renderAlignmentTip('realm')});\\\" onmouseout=\\\"return noTip('tip_alignment_realm');\\\"></div>\";markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"aligncenter\"></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"alignbar-left\" style=\"width:45%\"><span></span></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"alignbar-right\" style=\"width:15%\"><span></span></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<p class=\"aligntext-left\">Family</p>';\nmarkup+='\\t\\t\\t\\t\\t\\t\\t<p class=\"aligntext-right\">Realm</p>';markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t\\t\\t<div id=\"alignmentbar-integrity\" class=\"alignmentbar\" style=\"display:none;\">';markup+=\"\\t\\t\\t\\t\\t\\t\\t<div class=\\\"alignmenticon-left\\\" onmouseover=\\\"return doTip('tip_alignment_cunning',function(){return renderAlignmentTip('cunning')});\\\" onmouseout=\\\"return noTip('tip_alignment_cunning');\\\"></div>\";markup+=\"\\t\\t\\t\\t\\t\\t\\t<div class=\\\"alignmenticon-right\\\" onmouseover=\\\"return doTip('tip_alignment_truthful',function(){return renderAlignmentTip('truthful')});\\\" onmouseout=\\\"return noTip('tip_alignment_truthful');\\\"></div>\";\nmarkup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"aligncenter\"></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"alignbar-left\" style=\"width:25%\"><span></span></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<div class=\"alignbar-right\" style=\"width:40%\"><span></span></div>';markup+='\\t\\t\\t\\t\\t\\t\\t<p class=\"aligntext-left\">Cunning</p>';markup+='\\t\\t\\t\\t\\t\\t\\t<p class=\"aligntext-right\">Truthful</p>';markup+=\"\\t\\t\\t\\t\\t\\t</div>\";markup+=\"\\t\\t\\t\\t\\t</div>\";markup+=\"\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t<div id=\"alignment_tips\">';for(x=0;x<alignmentData.length;x++)markup+=\n'<div id=\"tip_alignment_'+alignmentData[x].symbol+'\" style=\"top: -240px; left: -130px; position: relative\"></div>';markup+=\" </div>\";markup+='\\t\\t\\t\\t<div class=\"chargenbox\" id=\"activity\">';markup+='\\t\\t\\t\\t\\t<div class=\"marbletop\">';markup+=\"\\t\\t\\t\\t\\t\\t<h3>Recent Activity</h3>\";if(void 0==playerData.recent_activity)markup+=\" <p>No recent activity to display.</p>\";else if(0==playerData.recent_activity.length)markup+=\" <p>No recent activity to display.</p>\";else{for(a=\n0;a<playerData.recent_activity.length&&3>a;a++)markup+='\\t\\t\\t\\t\\t\\t<p class=\"icon-'+playerData.recent_activity[a].type+'\"><span style=\"width:27px;height:25px;\"></span>'+playerData.recent_activity[a].text+\"</p>\";3<playerData.recent_activity.length&&(markup+='\\t\\t\\t\\t\\t\\t<span class=\"btnwrap btnmed\" id=\"morebtn\"><span class=\"btnedge\"><a class=\"btnbrown\" onclick=\"lineageMainModal(\\'activities\\');\"><span></span>More</a></span></span>')}markup+=\"\\t\\t\\t\\t\\t</div>\";markup+=\"\\t\\t\\t\\t</div>\";markup+='\\t\\t\\t\\t<div id=\"charbtmbar\">';\nmarkup+='\\t\\t\\t\\t\\t<div class=\"househr\"></div>';markup+=\"\\t\\t\\t\\t</div>\";$(\"#chargenmain\").removeClass(\"stats\");$(\"#chargenmain\").html(markup);userContext.focusData.user_id!=userContext.playerData.character.user_id&&$(\".frnd-\"+userContext.focusData.friend_status).show();alignments=[\"tradition\",\"integrity\",\"duty\"];tips_markup=\"\";for(a=0;a<alignments.length;a++)alignment=-1*playerData[\"got_\"+alignments[a]],0<alignment?($(\"#alignmentbar-\"+alignments[a]+\" > .alignbar-left\").css(\"width\",alignment/100/\n2+\"%\").show(),$(\"#alignmentbar-\"+alignments[a]+\" > .aligntext-left\").css(\"color\",\"white\"),$(\"#alignmentbar-\"+alignments[a]+\" > .aligntext-right\").css(\"color\",\"#666\"),$(\"#alignmentbar-\"+alignments[a]+\" > .alignbar-right\").hide()):0>alignment?($(\"#alignmentbar-\"+alignments[a]+\" > .alignbar-right\").css(\"width\",alignment/-100/2+\"%\").show(),$(\"#alignmentbar-\"+alignments[a]+\" > .aligntext-right\").css(\"color\",\"white\"),$(\"#alignmentbar-\"+alignments[a]+\" > .aligntext-left\").css(\"color\",\"#666\"),$(\"#alignmentbar-\"+\nalignments[a]+\" > .alignbar-left\").hide()):($(\"#alignmentbar-\"+alignments[a]+\" > .aligntext-left\").css(\"color\",\"white\"),$(\"#alignmentbar-\"+alignments[a]+\" > .aligntext-right\").css(\"color\",\"white\"),$(\"#alignmentbar-\"+alignments[a]+\" > .alignbar-left\").hide(),$(\"#alignmentbar-\"+alignments[a]+\" > .alignbar-right\").hide());uiEvent(\"character\");userContext.focusData.user_id==userContext.playerData.character.user_id&&uiEvent(\"character_self\")}";
original.inventoryDisplayStatsWithTab =
"function inventoryDisplayStatsWithTab(b){b=extractItemById(playerInventory,b);\"unit\"==b.slot?inventorySubTab(\"companion\"):inventorySubTab(b.slot);inventoryDisplayStats(void 0,void 0,b,void 0,!0)}";
original.inventoryTab =
"function inventoryTab(b){$(\"#statview_container_right\").html(\"\");$(\"#statview_container\").html(\"\");$(\".characterview\").hide();$(\".\"+b+\"view\").show();$(\"#swornswordstab_inner\").removeClass(\"active\");$(\"#foodtab_inner\").removeClass(\"active\");$(\"#charactertab_inner\").removeClass(\"active\");$(\"#boonstab_inner\").removeClass(\"active\");$(\"#resourcestab_inner\").removeClass(\"active\");$(\"#sealtab_inner\").removeClass(\"active\");$(\"#gearinvtab_inner\").removeClass(\"active\");$(\"#companionsinvtab_inner\").removeClass(\"active\");\n$(\"#inventorybtm\").removeClass(\"character\");$(\"#weapontab\").hide();$(\"#armortab\").hide();$(\"#companiontab\").hide();$(\"#swordcompaniontab\").hide();$(\"#inventory-listing\").hide();var a=[],c=void 0;\"character\"==b?($(\"#inventorybtm\").addClass(\"character\"),$(\"#weapontab\").show(),$(\"#armortab\").show(),$(\"#companiontab\").show(),equipContextPrefix=equipContextTarget=\"character\",equipContextPosition=\"right\",$(\"#inventory_toolbar_Weapon\").show()):\"swornswords\"==b?($(\"#inventorybtm\").addClass(\"character\"),first_sworn=\nextractFirstSwornSword(playerInventory),inventoryDisplayStatsRight(void 0,void 0,first_sworn),$(\"#weapontab\").show(),$(\"#armortab\").show(),$(\"#swordcompaniontab\").show(),equipContextPrefix=\"item\",$(\"#inventory_toolbar\").show(),c=\"Sworn Sword\",a.push(c)):\"boons\"==b?(first_boon=extractFirstBoon(playerInventory),inventoryDisplayStatsRight(void 0,void 0,first_boon),$(\"#inventory_toolbar\").hide(),c=\"Boon\",a.push(c)):\"food\"==b?(first_consumable=extractFirstConsumable(playerInventory),inventoryDisplayStatsRight(void 0,\nvoid 0,first_consumable),$(\"#inventory_toolbar\").hide(),c=\"Consumable\",a.push(c)):\"seal\"==b?(first_seal=extractFirstSeal(playerInventory),inventoryDisplayStatsRight(void 0,void 0,first_seal),$(\"#inventory_toolbar\").hide(),c=\"Seal\",a.push(c)):\"resources\"==b?(first_resource=extractFirstTreasure(playerInventory),inventoryDisplayStatsRight(void 0,void 0,first_resource),$(\"#inventory_toolbar\").hide(),c=\"Treasure\",a.push(c)):\"gearinv\"==b?(first_gearinv=extractFirstGear(playerInventory),inventoryDisplayStatsRight(void 0,\nvoid 0,first_gearinv),$(\"#inventory_toolbar\").hide(),c=\"Weapon, Armor\",a.push(\"Weapon\"),a.push(\"Armor\")):\"companionsinv\"==b&&(first_companionsinv=extractFirstCompanion(playerInventory),inventoryDisplayStatsRight(void 0,void 0,first_companionsinv),$(\"#inventory_toolbar\").hide(),c=\"Companion, Unit\",a.push(\"Companion\"),a.push(\"Unit\"));doLog(\"inventoryTab: category=\"+b+\" listing_slot=\"+c);if(void 0!=c){initPagination(b,6);for(var d=!1,g=[],k=\"\",f=0;f<playerInventory.length;f++)for(var p=0;p<a.length;p++)playerInventory[f].slot==\na[p]&&g.push(playerInventory[f]);0==g.length&&(d=!0);k+=\"<div id='mv_container'></div>\";\"character\"==b?$(\"#inventory-listing\").html(k).hide():!0==d?\"swornswords\"==b?$(\"#inventory-listing\").html('You have no sworn swords. Visit the <a class=\"shop_link\" href=\"#\" onclick=\"return shopModal();\">shop</a> to hire one.').show():\"food\"==b?$(\"#inventory-listing\").html('You have no Food. Visit the <a class=\"shop_link\" href=\"#\" onclick=\"return shopModal();\">shop</a> to purchase some.').show():\"boons\"==b?$(\"#inventory-listing\").html('You have no Boons. Visit the <a class=\"shop_link\" href=\"#\" onclick=\"return shopModal();\">shop</a> to purchase one.').show():\n\"seal\"==b?$(\"#inventory-listing\").html(\"You have no Seals. Earn seals from PtP.\").show():\"gearinv\"==b?$(\"#inventory-listing\").html('You have no Gear. Visit the <a class=\"shop_link\" href=\"#\" onclick=\"return shopModal();\">shop</a> to purchase some.').show():\"companionsinv\"==b&&$(\"#inventory-listing\").html('You have no Companions. Visit the <a class=\"shop_link\" href=\"#\" onclick=\"return shopModal();\">shop</a> to purchase some.').show():$(\"#inventory-listing\").html(k).show();d||($.each(g,function(a,c){addPageItem(b);\nitemMiniView(c,{callback:inventoryDisplayStatsRight,extra_styles:pageStyle(b),extra_class:pageClass(b)},\"#mv_container\")}),$(\"#mv_container\").append(bookPageNumbers(b)))}$(\"#\"+b+\"tab_inner\").addClass(\"active\");void 0!=c&&pageBegin(b)}";
original.inventoryModal =
"function inventoryModal(b,a){closeUpgradePanel();uiTelemetry(\"inventory\");void 0==b?(b={},b.storage=a,b.content_loading=!0,showSpinner(),$.ajaxq(\"gotAjaxQueue\",{url:\"/play/player_data?client_seqnum=\"+userContext.player_data_seqnum,dataType:\"JSON\",success:function(c){inventoryModal(c,a)}})):(b.content_loading=!1,hideSpinner(),setupPlayerData(b,void 0),inventoryTab(\"character\"));b.storage=a;b.allowseals=!0;var c=_.template('<div id=\"modalwrap\" class=\"modal690\" style=\"display:block\"><div class=\"contentframe1\" id=\"content_character_view-inventory\">\\t<div class=\"contentframe2\">\\t\\t<div class=\"contentframe3\">\\t\\t\\t<div class=\"contentframe4\">\\t\\t\\t<div class=\"stonecurve\" id=\"stonecurve-l\">\\t\\t\\t\\t<span></span>\\t\\t\\t</div>\\t\\t\\t<div class=\"stonecurve\" id=\"stonecurve-r\">\\t\\t\\t\\t<span></span>\\t\\t\\t</div>\\t\\t\\t<div class=\"infobar\">\\t\\t\\t\\t<div class=\"infobarpattern\"></div>\\t\\t\\t<%\\t\\t\\tif(data.storage)\\t\\t\\t%>\\t\\t\\t\\t<h2><%= translateString(\\'ui_storage\\') %></h2>\\t\\t\\t<%\\t\\t\\telse\\t\\t\\t{\\t\\t\\t%>\\t\\t\\t\\t<h2><%= translateString(\\'your_character\\') %></h2>\\t\\t\\t<%\\t\\t\\t}\\t\\t\\t%>\\t\\t\\t\\t<span class=\"barbtmedge\"></span>\\t\\t\\t\\t<span class=\"corner tl\"></span>\\t\\t\\t\\t<span class=\"corner tr\"></span>\\t\\t\\t\\t<a class=\"closebtn\" onclick=\"return clickCloseInventory();\">\\t\\t\\t\\t\\t<%= translateString(\\'close\\') %>\\t\\t\\t\\t</a>\\t\\t\\t</div>\\t\\t\\t<%\\t\\t\\tif(!data.content_loading)\\t\\t\\t{\\t\\t\\t%>\\t\\t\\t\\t<div class=\"tabbedheading\">\\t\\t\\t\\t\\t<div class=\"inventorytabs\">\\t\\t\\t\\t\\t\\t<%\\t\\t\\t\\t\\t\\tif(data.storage)\\t\\t\\t\\t\\t\\t{\\t\\t\\t\\t\\t\\t%>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"resourcetab\"><span class=\"inventorytabedge\"\"><a id=\"resourcestab_inner\" class=\"inventorytab\" onclick=\"clickInventoryTab(\\'resources\\');\"><span></span><%= translateString(\\'resource_tab_label\\') %><em></em></a></span></span>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"boonstab\" onclick=\"return clickInventoryTab(\\'boons\\');\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"boonstab_inner\"><span></span><%= translateString(\\'ui_ss_boons\\') %><em></em></a></span></span>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"foodtab\" onclick=\"return clickInventoryTab(\\'food\\');\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"foodtab_inner\"><span></span><%= translateString(\\'ui_char_food\\') %><em></em></a></span></span> <% if(data.allowseals) { %> <span class=\"inventorytabwrap\" id=\"sealtab\" onclick=\"return clickInventoryTab(\\'seal\\');\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"sealtab_inner\"><span></span><%= translateString(\\'ui_char_seal\\') %><em></em></a></span></span> <span class=\"inventorytabwrap\" id=\"gearinvtab\" onclick=\"return clickInventoryTab(\\'gearinv\\');\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"gearinvtab_inner\"><span></span><%= translateString(\\'ui_char_gear\\') %><em></em></a></span></span> <span class=\"inventorytabwrap\" id=\"companionsinvtab\" onclick=\"return clickInventoryTab(\\'companionsinv\\');\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"companionsinvtab_inner\"><span></span><%= translateString(\\'ui_char_companions\\') %><em></em></a></span></span> <% } %>\\t\\t\\t\\t\\t\\t<%\\t\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\telse\\t\\t\\t\\t\\t\\t{\\t\\t\\t\\t\\t\\t%>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"armortab\" style=\"right: 0px\" onclick=\"return clickInventoryTab(\\'character\\');\"><span class=\"inventorytabedge\"><a class=\"inventorytab active\" id=\"charactertab_inner\"><span></span><%= translateString(\\'equipment\\') %><em></em></a></span></span>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"charactertab\" onclick=\"return characterModal(undefined, characterMainModal, true);\"><span class=\"inventorytabedge\"><a id=\"charactertab_inner\" class=\"inventorytab\"><span></span><%= translateString(\\'mainmenu_character\\') %><em></em></a></span></span>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"pactstab\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"pactstab_inner\" onclick=\"return characterModal(undefined, pactsModal, true);\"><span></span><%= translateString(\\'pacts_and_influence\\') %><em></em></a></span></span>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"statstab\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"statstab_inner\" onclick=\"return characterModal(undefined, statsModal, true);\"><span></span><%= translateString(\\'stats\\') %><em></em></a></span></span>\\t\\t\\t\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"achievementstab\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"achievementstab_inner\" onmouseover=\"return setTooltip(\\'achievementstab_inner\\',\\'achievements\\');\" onclick=\"return characterModal(undefined, achievementsModal, true);\"><span></span><%= translateString(\\'achievements\\') %><em></em></a></span></span>\\t\\t\\t\\t\\t\\t<%\\t\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\t%>\\t\\t\\t\\t\\t</div>\\t\\t\\t\\t</div>\\t\\t\\t\\t<div class=\"inventorycontent\">\\t\\t\\t\\t\\t<div id=\"statview_container_right\"></div>\\t\\t\\t\\t\\t\\t<div class=\"darkroundedbox miniviewmenu-inventory\" id=\"inventory-listing\" style=\"display:none\">\\t\\t\\t\\t\\t\\t</div>\\t\\t\\t\\t\\t\\t<div class=\"characterview\">\\t\\t\\t\\t\\t\\t\\t<div class=\"characterviewname\"><h3><%= data.strings.title_and_name%></div>\\t\\t\\t\\t\\t\\t\\t<div class=\"characterviewimg\">\\t\\t\\t\\t\\t\\t\\t\\t<img src=\"<%= userContext.playerData.strings.portrait_pic %>\" width=\"170\">\\t\\t\\t\\t\\t\\t\\t\\t<span class=\"characterviewframe\"></span>\\t\\t\\t\\t\\t\\t\\t</div>\\t\\t\\t\\t\\t\\t\\t<div class=\"characterviewstats\">\\t\\t\\t\\t\\t\\t\\t\\t<span class=\"battlebonus\"><span></span><var id=\"char_battlebonus\" class=\"battle_val\"><%= userContext.playerData.character.got_battle %></var></span>\\t\\t\\t\\t\\t\\t\\t\\t<span class=\"tradebonus\"><span></span><var id=\"char_tradebonus\" class=\"trade_val\"><%= userContext.playerData.character.got_trade %></var></span>\\t\\t\\t\\t\\t\\t\\t\\t<span class=\"intriguebonus\"><span></span><var id=\"char_intriguebonus\" class=\"intrigue_val\"><%= userContext.playerData.character.got_intrigue %></var></span>\\t\\t\\t\\t\\t\\t\\t</div>\\t\\t\\t\\t\\t\\t\\t<div class=\"characterviewinfo\">\\t\\t\\t\\t\\t\\t\\t\\t<span id=\"chartalentbtn\" class=\"btnwrap btnxxl\" onclick=\"talentsModal();\">\\t\\t\\t\\t\\t\\t\\t\\t\\t<span class=\"btnedge\">\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<a class=\"btngold\">\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<span></span><%= translateString(\\'talents\\') %>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<%\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(data.character.talents_earned>0)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t%>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<strong><%= data.character.talents_earned%><%= translateString(\\'ui_char_point\\') %><%if(data.character.talents_earned > 1){%>s<%}%>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</strong>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<%\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t%>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</a>\\t\\t\\t\\t\\t\\t\\t\\t\\t</span>\\t\\t\\t\\t\\t\\t\\t\\t</span>\\t\\t\\t\\t\\t\\t\\t\\t<span id=\"charstoragebtn\" class=\"btnwrap btnxxl\" onclick=\"inventoryModal(undefined,true);\">\\t\\t\\t\\t\\t\\t\\t\\t\\t<span class=\"btnedge\">\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<a class=\"btngold\">\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<span></span><%= translateString(\\'ui_storage\\') %>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</a>\\t\\t\\t\\t\\t\\t\\t\\t\\t</span>\\t\\t\\t\\t\\t\\t\\t\\t</span>\\t\\t\\t\\t\\t\\t\\t</div>\\t\\t\\t\\t\\t\\t\\t<div class=\"charseals\">\\t\\t\\t\\t\\t\\t\\t\\t<%= characterSealMarkup() %>\\t\\t\\t\\t\\t\\t\\t</div>\\t\\t\\t\\t\\t\\t\\t<div class=\"characterequipmentinfo\">\\t\\t\\t\\t\\t\\t\\t\\t<%= characterEquipmentMarkup() %>\\t\\t\\t\\t\\t\\t\\t</div>\\t\\t\\t\\t\\t\\t\\t<div class=\"characterviewbtm\">\\t\\t\\t\\t\\t\\t\\t\\t<% if(hand_slot == null) %>\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\"character_weapon_container\" onclick=\"return modalContextEquip(\\'character\\',\\'Weapon\\')\"><div class=\"iconview iconview-weapon\"></div></div>\\t\\t\\t\\t\\t\\t\\t\\t<% else %>\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\"character_weapon_container\" onclick=\"return modalContextEquip(\\'character\\',\\'Weapon\\')\"><%= itemIconView(hand_slot, \"inventoryDisplayStatsWithTab\", \\'iconview-weapon\\') %></div>\\t\\t\\t\\t\\t\\t\\t\\t<% if(armor_slot == null) %>\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\"character_armor_container\" onclick=\"return modalContextEquip(\\'character\\',\\'Armor\\')\"><div class=\"iconview iconview-armor\"></div></div>\\t\\t\\t\\t\\t\\t\\t\\t<% else %>\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\"character_armor_container\" onclick=\"return modalContextEquip(\\'character\\',\\'Armor\\')\"><%= itemIconView(armor_slot, \"inventoryDisplayStatsWithTab\", \\'iconview-armor\\') %></div>\\t\\t\\t\\t\\t\\t\\t\\t<% if(companion_slot == null) %>\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\"character_companion_container\" onclick=\"return modalContextEquip(\\'character\\',\\'Companion\\')\"><div class=\"iconview iconview-companion\"></div></div>\\t\\t\\t\\t\\t\\t\\t\\t<% else %>\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\"character_companion_container\" onclick=\"return modalContextEquip(\\'character\\',\\'Companion\\')\"><%= itemIconView(companion_slot, \"inventoryDisplayStatsWithTab\", \\'iconview-companion\\') %></div>\\t\\t\\t\\t\\t\\t\\t</div>\\t\\t\\t<% \\t\\t\\t/* end of if(!data.content_loading) */\\t\\t\\t}\\t\\t\\t%>\\t\\t\\t\\t</div>\\t\\t\\t</div>\\t\\t</div>\\t<div class=\"contentbtm\"></div></div></div>',\n{data:b});displayModalDialog(c,\"character_dialog\");!b.content_loading&&a&&($(\"#inventorybtm\").hide(),clickInventoryTab(\"resources\"))}";
original.shopModal =
"function shopModal(b,a){userContext.playerData.user.new_items=0;updateAllStatus();doToolbar(\"shop\");closeAlert();closeUpgradePanel();clearModalDialogs(\"modal_dialogs_top\");doLog(\"shopModal\");uiTelemetry(\"shop\");void 0==a&&(a=\"dealstab\");if(void 0==b){firstShopItem.swornswordstab=0;firstShopItem.troopsequip=0;firstShopItem.characterequip=0;firstShopItem.boonstab=0;firstShopItem.featuredtab=0;firstShopItem.sealtab=0;var c;c=\"\"+(shopModalHead()+shopModalFoot());isWeb()&&displayModalDialog(c,void 0,void 0,\n\"min-height: 692px; top: 0px; margin-top: 40px\");showSpinner();$.ajaxQueue({url:\"/play/shop/\",dataType:\"JSON\",complete:hideSpinner,success:function(c){shopModal(c,a)}})}else{hideSpinner();updateSilver(b.money);updateGold(b.perk_points);userContext.shopData=[];seals=[];for(c=0;c<b.shop.length;c++)void 0==b.shop[c].shop_expires_seconds&&(doLog(\"shopModal: i=\"+c+\" item=\"+b.shop[c].full_name),\"Seal\"==b.shop[c].slot?seals.push(b.shop[c]):userContext.shopData.push(b.shop[c]));seals.sort(function(a,c){return c.rarity-\na.rarity});for(c=0;c<seals.length;c++)userContext.shopData.push(seals[c]);for(c=0;c<b.shop.length;c++)void 0!=b.shop[c].shop_expires_seconds&&(doLog(\"shopModal: i=\"+c+\" item=\"+b.shop[c].full_name),userContext.shopData.push(b.shop[c]));baseShopTime=parseInt((new Date).getTime()/1E3);c=\"\";initPagination(\"troopsequip\",6);initPagination(\"characterequip\",6);initPagination(\"boonstab\",6);initPagination(\"swornswordstab\",6);initPagination(\"sealtab\",6);userContext.totalItems.troopsequip=0;userContext.totalItems.characterequip=\n0;userContext.totalItems.boonstab=0;userContext.totalItems.swornswordstab=0;b.cost_refresh_shop=2;b.userContext=userContext;b.open_tab=a;b.featuredTabLabel&&(phraseText.featured_tab_label=b.featuredTabLabel);b.dealsData?(b.overrideDealsData=[],b.dealsData.map(function(a){b.overrideDealsData.push(a)}),b.dealsData=[],b.overrideDealsData.map(function(a){b.dealsData.push(a.symbol);a.price_perk_points&&(itemFromSymbol(a.symbol).price_perk_points=a.price_perk_points)}),userContext.defaultDeals_id=itemFromSymbol(b.dealsData[0]).id,\nuserContext.defaultDeals_symbol=b.dealsData[0]):b.dealsData=shopSetDealData(\"deals\");b.featuredItemPack?(b.overridefeaturedItemPack={},b.overridefeaturedItemPack.symbol=b.featuredItemPack.symbol,b.overridefeaturedItemPack.price_perk_points=b.featuredItemPack.price_perk_points,b.featuredItemPack=b.overridefeaturedItemPack.symbol,b.overridefeaturedItemPack.price_perk_points&&(itemFromSymbol(b.overridefeaturedItemPack.symbol).price_perk_points=b.overridefeaturedItemPack.price_perk_points),userContext.defaultFeaturedPack_id=\nitemFromSymbol(b.featuredItemPack).id,userContext.defaultFeaturedPack_symbol=b.featuredItemPack):b.featuredItemPack=shopSetDealData(\"featured_item_pack\");b.featuredItem?(b.overridefeaturedItem=[],b.featuredItem.map(function(a){b.overridefeaturedItem.push(a)}),b.featuredItem=[],b.overridefeaturedItem.map(function(a){b.featuredItem.push(a.symbol);a.price_perk_points&&(itemFromSymbol(a.symbol).price_perk_points=a.price_perk_points)})):b.featuredItem=shopSetDealData(\"featured_items\");for(c=0;c<userContext.shopData.length;c++){tabLocation=\n\"\";switch(userContext.shopData[c].slot){case \"Weapon\":case \"Armor\":tabLocation=\"troopsequip\";break;case \"Companion\":case \"Unit\":tabLocation=\"characterequip\";break;case \"Consumable\":case \"Boon\":case \"Food\":tabLocation=\"boonstab\";break;case \"Sworn Sword\":tabLocation=\"swornswordstab\";break;case \"Seal\":tabLocation=\"sealtab\"}userContext.shopData[c].tabLocation=tabLocation;userContext.totalItems[tabLocation]++;doLog(\"shop: full_name=\"+userContext.shopData[c].full_name+\" slot=\"+userContext.shopData[c].slot+\n\" tabLocation=\"+tabLocation);0==firstShopItem[tabLocation]&&(doLog(\"first \"+tabLocation+\": \"+userContext.shopData[c].id),firstShopItem[tabLocation]=userContext.shopData[c].id);\"true\"==userContext.shopData[c].featured&&(firstShopItem.featuredtab=userContext.shopData[c].id)}isWeb()?(c=_.template('<%= shopModalHead() %><span class=\"btnwrap btnmed\" id=\"sellbtn\" onclick=\"return shopModalSell();\"><span class=\"btnedge\"><a class=\"btngold\"><%= translateString(\\'sell_an_item\\') %></a></span></span></div><div id=\"store_bg_ss\" class=\"storebg shopswords\" style=\"display:none\"></div><div id=\"store_bg_companion\" class=\"storebg shopcompanions\" style=\"display:none\"></div>\\t<% if(!isIpad()) { %> \\t\\t<div class=\"tabbedheading\">\\t\\t\\t<div class=\"inventorytabs\">\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"dealstab\"><span class=\"inventorytabedge\"><a id=\"dealstab_inner\" class=\"inventorytab\" onclick=\"return shopTab(\\'dealstab\\');\"><span></span><%= translateString(\\'ui_shop_deals\\') %><em></em></a></span></span>\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"featuredtab\"><span class=\"inventorytabedge\"><a id=\"featuredtab_inner\" class=\"inventorytab\" onclick=\"return shopTab(\\'featuredtab\\');\"><span></span><%= translateString(\\'featured_tab_label\\') %><em></em></a></span></span>\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"troopsequip\"><span class=\"inventorytabedge\"><a class=\"inventorytab\" id=\"troopsequip_inner\" onclick=\"return shopTab(\\'troopsequip\\');\"><span></span><%= translateString(\\'troopsequip_tab_label\\') %><em></em></a></span></span>\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"characterequip\"><span class=\"inventorytabedge\"><a id=\"characterequip_inner\" onclick=\"shopTab(\\'characterequip\\')\"; class=\"inventorytab\"><span></span><%= translateString(\\'characterequip_tab_label\\') %><em></em></a></span></span>\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"boonstab\"><span class=\"inventorytabedge\"\"><a id=\"boonstab_inner\" class=\"inventorytab\" onclick=\"shopTab(\\'boonstab\\');\"><span></span><%= translateString(\\'boons_tab_label\\') %><em></em></a></span></span>\\t\\t\\t\\t<span class=\"inventorytabwrap\" id=\"sealtab\"><span class=\"inventorytabedge\"\"><a id=\"sealtab_inner\" class=\"inventorytab\" onclick=\"shopTab(\\'sealtab\\');\"><span></span><%= translateString(\\'seals_tab_label\\') %><em></em></a></span></span>\\t\\t\\t</div>\\t\\t</div>\\t<% } %>\\t<div class=\"inventorycontent\">\\t\\t<div class=\"deals packcontent\" id=\"pack_container\" style=\"display:none\">\\t\\t</div>\\t\\t<div class=\"swornswordshopinfo\" id=\"swornswordshopinfo\">\\t\\t<% if(data.swornsword_next) { %>\\t\\t\\t<span class=\"currentswords\"><%= translateString(\\'new_sworn_sword_in\\') %>: <span id=\"inn_timer\">\\' + renderTime(json.swornsword_next) + \\'</span></span>\\t\\t<% } else { %>\\t\\t\\t<span class=\"currentswords\"><span id=\"inn_timer\"></span></span>\\t\\t<% } %>\\t\\t<span id=\"swornsword_remaining\" class=\"swordlength\"></span>\\t</div>\\t<div class=\"swornswordshopinfo\" id=\"troopsequipshopinfo\" style=\"display:none\">\\t<% if(data.gear_next) { %>\\t\\t<span class=\"currentswords\"><%= translateString(\\'new_gear_in\\') %>: <span id=\"gear_timer\"><%= renderTime(data.gear_next) %></span></span>\\t<% } %> <span id=\"shop_remaining\" class=\"swordlength\"></span> </div> <div class=\"swornswordshopinfo\" id=\"characterequipshopinfo\" style=\"display:none\">\\t<% if(data.companion_next) { %>\\t\\t<span class=\"currentswords\"><%= translateString(\\'new_companion_in\\') %>: <span id=\"companion_timer\"><%= renderTime(data.companion_next) %></span></span>\\t<% } %> <span id=\"shop_companion_remaining\" class=\"swordlength\"></span> </div><div class=\"swornswordshopinfo\" id=\"boonsshopinfo\" style=\"display:none\"></div><div id=\"statview_container_shop\"></div><% if(data.open_tab==\\'dealstab\\') { %>\\t<div id=\"shop_miniview\" class=\"miniviewmenu-inventory\" style=\"min-height: 410px; margin-left: -10px\"><% } else { %>\\t<div id=\"shop_miniview\" class=\"darkroundedbox miniviewmenu-inventory\" style=\"min-height: 410px;\"><% } %><div class=\"swornswordbtns\" id=\"swornswordbtns\"><%\\tif(data.userContext.playerData.character.level>=4) { %>\\t<span class=\"btnwrap btnmed btnprice\" id=\"refreshnowbtn\"><span class=\"btnedge\"><a class=\"btngold\" onclick=\"return doShopRefresh(\\'swornsword\\');\"><%= translateString(\\'refresh_inn\\') %></a></span><em><%= translateString(\\'ui_shop_for\\') %></em><strong><%= data.cost_refresh_shop %></strong></span><% } %><div id=\"swornsword_message\" style=\"display:none\"><%= translateString(\\'no_sworn_swords_now\\') %></div></div><% if(data.userContext.playerData.character.level>=4) { %>\\t<div class=\"swornswordbtns\" id=\"troopsequipbtns\" style=\"display:none\"> <span class=\"btnwrap btnmed btnprice\" id=\"refreshnowbtn\"><span class=\"btnedge\"><a class=\"btngold\" onclick=\"return doShopRefresh(\\'gear\\');\"><%= translateString(\\'refresh_gear\\') %></a></span><em><%= translateString(\\'ui_shop_for\\') %></em><strong><%= data.cost_refresh_shop %></strong></span>\\t</div><%\\t} %><% if(data.userContext.playerData.character.level>=4) { %>\\t<div class=\"swornswordbtns\" id=\"characterequipbtns\" style=\"display:none\"> <span class=\"btnwrap btnmed btnprice\" id=\"refreshnowbtn\"><span class=\"btnedge\"><a class=\"btngold\" onclick=\"return doShopRefresh(\\'companion\\');\"><%= translateString(\\'refresh_companion\\') %></a></span><em><%= translateString(\\'ui_shop_for\\') %></em><strong><%= data.cost_refresh_shop %></strong></span>\\t</div><%\\t} %><%= shopDeals(data) %><%= shopFeatured(data) %>\\x3c!-- Standard items --\\x3e<% _.each(data.userContext.shopData,function(item,n){ %>\\t<% var tabLocation = item.tabLocation; %>\\t<% addPageItem(tabLocation); %>\\t\\t<div style=\"<%= pageStyle(tabLocation) %>\" class=\"slot_<%= item.slot %> offersitem <%= pageClass(tabLocation) %>\">\\t<%= itemMiniView(item, {callback: shopDisplayStats, extra_styles: pageStyle(tabLocation), extra_class: pageClass(tabLocation)}) %>\\t<%= markupOwnedPrice(userContext.shopData[n],\\'doPurchase\\',undefined,undefined) %>\\t</div><% }); %><%= bookPageNumbers(\\'troopsequip\\',\\'display:none\\') %><%= bookPageNumbers(\\'characterequip\\',\\'display:none\\') %><%= bookPageNumbers(\\'boonstab\\',\\'display:none\\') %><%= bookPageNumbers(\\'swornswordstab\\',\\'display:none\\') %><%= bookPageNumbers(\\'sealtab\\',\\'display:none\\') %><span class=\"btnwrap btnsm\" style=\"top:560px; left:0px; position: absolute\" onclick=\"return enterOfferCode();\"><span class=\"btnedge\"><a class=\"btnbrown\">Offer Code</a></span></span></span></div>',\n{data:b}),c+=shopModalFoot(),displayModalDialog(c,void 0,void 0,\"min-height: 692px; top: 0px; margin-top: 40px\")):iosSignal(\"shopData\",\"read\",{shop:userContext.shopData,featuredItems:b.featuredItem.map(function(a){return itemFromSymbol(a)}),featuredPack:itemFromSymbol(b.featuredItemPack),dealsData:b.dealsData.map(function(a){return itemFromSymbol(a)})});killAllPanelTimers();isWeb()&&shopTab(a);b.swornsword_next&&(userContext.shopTimer.inn=setPanelTimeout(\"updateInnTimer(\"+b.swornsword_next+\");\",1E3));\nb.gear_next&&(userContext.shopTimer.gear=setPanelTimeout(\"updateGearTimer(\"+b.gear_next+\");\",1E3));b.companion_next&&(userContext.shopTimer.companion=setPanelTimeout(\"updateCompanionTimer(\"+b.companion_next+\");\",1E3))}}";
original.hasGold =
"function hasGold(b,a,c){if(0<b){void 0==c&&(c=!1);doLog(\"hasGold: cost=\"+b+\" [player perk_points=\"+userContext.playerData.user.perk_points+\"]\");if(b>userContext.playerData.user.perk_points)return currencyModal(\"gold\"),iosSignal(\"purchase\",\"need_gold\"),!1;if(2==(userContext.playerData.user.options_mask&2)&&!1==c)return dialogAlert({style:\"confirm\",button1:\"Okay\",button1_action:function(){closeAlert();a()},button2:\"Cancel\",heading:jsTranslate(\"Spend %{val} Gold\",\"val\",numberWithDelimiter(b)),text:jsTranslate(\"Please confirm that you wish to spend %{val} gold.\",\n\"val\",numberWithDelimiter(b)),keep_previous:!0}),!1}return!0}";
original.pvpLaunch =
"function pvpLaunch(){json={pvp:{}};json.pvp.target_id=pvpForm.target_id;json.pvp.sworn_sword_id=userContext.setSwornSword.id;json.pvp.pvp_action_symbol=userContext.currentActionLabel;json.pvp.region_symbol=fealtySymbol[pvpForm.target_faction_id];pvpForm.sub_region_index=Math.floor(3*Math.random());var b=pvpForm.target_faction_id;void 0==b&&(b=userContext.playerData.character.faction_id);json.pvp.sub_region_symbol=fealtySubRegions[b][pvpForm.sub_region_index].symbol;json.pvp.attack_value=userContext.currentQuest.action_type[userContext.currentActionLabel].attacker_strength;\njson.pvp.defense_value=userContext.currentQuest.action_type[userContext.currentActionLabel].defender_strength;checkPvpBan()||(showSpinner(),$.ajax({type:\"get\",url:\"/pvps/create\",data:json,dataType:\"JSON\",complete:hideSpinner,success:function(a){void 0==a.error?(pvpForm={},userContext.pvp=a,pvpRenderProgress(a),insertInventoryFromItem(playerInventory,a.attacker.sworn_sword),analytics.track(\"PvP Start\",{pvp_context:\"attack\",pvp_action:json.pvp.pvp_action_symbol}),analytics.wizardtrack(\"PvP Start\",{pvp_context:\"attack\",\npvp_action:json.pvp.pvp_action_symbol})):handleSwornSwordError(a.error)}}))}";
original.questSubmit =
"function questSubmit(b,a,c,d,g,k,f){doLog(\"questSubmit: stage=\"+a+\" choice=\"+c);uiEvent(\"quest_submit_\"+b+\"_\"+a+\"_choice_\"+c,userContext.playerData);userContext.postQuestEvent=\"quest_post_\"+b+\"_\"+a+\"_choice_\"+c;userContext.playerData;userContext.questActionChoice=c;b=void 0!=f?\"/play/quest?quest_id=\"+f+\"&stage=\"+a+\"&choice=\"+c+\"&chosen=\"+escape(d):\"/play/quest?quest_symbol=\"+b+\"&stage=\"+a+\"&choice=\"+c+\"&chosen=\"+escape(d);void 0!=g?(b=isWeb()?b+(\"&chat=\"+escape($(\"#\"+g).val())):b+(\"&chat=\"+escape(g)),\nuserContext.hideWarParty=!0):playSound(\"page-turn\");void 0!=k&&(userContext.dialogIndex++,userContext.dialogHistory[userContext.dialogIndex]=unescape(k));isIpad()&&showSpinner();$.ajax({url:b,dataType:\"JSON\",success:function(a){isIpad()&&hideSpinner();questSubmitCallback(a)}});return!1}";