GOTA_Extender_Custom

Custom page functions rewritten.

目前為 2014-10-10 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/5426/20685/GOTA_Extender_Custom.js

  1. doLog = function () {
  2.  
  3. };
  4. log("Logging killed.", "initialize");
  5.  
  6. animatedCoins.init = function (b, a, e, g) {
  7.  
  8. if (isWeb()) {
  9. var c,
  10. d,
  11. f,
  12. h,
  13. k = { images: ["/images/animations/coin_flip.png"], animations: { all: [0, 32] }, frames: { regX: 0, height: 60, count: 33, regY: 0, width: 61 } },
  14. m = {
  15. images: ["/images/animations/coin_sparkle.png"],
  16. animations: { all: { frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] } },
  17. frames: [
  18. [0, 0, 128, 128, 0, 0, 0], [128, 0, 128, 128, 0, 0, 0], [256, 0, 128, 128, 0, 0, 0], [384, 0, 128, 128, 0, 0, 0], [512, 0, 128, 128, 0, 0, 0], [640, 0, 128, 128, 0, 0, 0], [768, 0, 128, 128, 0, 0, 0], [896, 0, 128, 128, 0, 0, 0], [0, 128, 128, 128, 0, 0, 0],
  19. [128, 128, 128, 128, 0, 0, 0], [256, 128, 128, 128, 0, 0, 0], [384, 128, 128, 128, 0, 0, 0], [512, 128, 128, 128, 0, 0, 0], [640, 128, 128, 128, 0, 0, 0], [768, 128, 128, 128, 0, 0, 0]
  20. ]
  21. },
  22. l,
  23. n,
  24. p = false;
  25.  
  26. //EXTENDER :: Modification, seriously?
  27. // bugfix: b.offset is undefined (offset from button to silver visually)
  28. if (null === b || null === b || b.length == 0) {
  29. return;
  30. } else if (null === a || null === a) {
  31. return;
  32. } else {
  33. if (null === e || null === e)
  34. e = [
  35. 0,
  36. 0
  37. ];
  38. if (null === g || null === g) g = [0, 0];
  39. d = $("<canvas>").attr({ id: "animatedCoins", "class": "coinCanvasAnimation", width: "130", height: "120" }).prependTo($("body"));
  40. c = d[0];
  41. h = $("<canvas>").attr({ id: "animatedCoinsSparkle", "class": "coinCanvasAnimation", width: "130", height: "120" }).prependTo($("body"));
  42. f = h[0];
  43. c = new createjs.Stage(c);
  44. f = new createjs.Stage(f);
  45. null === b.offset() ? (h.remove(), d.remove(), console.warn("animatedCoins: startingElement.offset() is null. Exiting script.")) : null === a.offset() ? (h.remove(), d.remove(),
  46. console.warn("animatedCoins: endingElement.offset() is null. Exiting script.")) : (d.offset({ left: b.offset().left + e[0], top: b.offset().top + e[1] }), h.offset({ left: b.offset().left + e[0], top: b.offset().top + e[1] }), e = new createjs.SpriteSheet(k), m = new createjs.SpriteSheet(m), l = new createjs.Sprite(e), l.x = 30, l.y = 25, n = new createjs.Sprite(m), l.on("animationend", function (c, f) {
  47. c.visible = false;
  48. doLog("animation end");
  49. null === b.offset() ? (h.remove(), d.remove(), console.error("animatedCoins: startingElement.offset() is null")) :
  50. null === a.offset() ? (h.remove(), d.remove(), console.error("animatedCoins: endingElement.offset() is null")) : (h.offset({ left: a.offset().left + g[0], top: a.offset().top + g[1] }), n.visible = true, n.gotoAndPlay("all"), l.stop(), p = true);
  51. }), n.on("animationend", function (a, b) {
  52. n.visible = false;
  53. p && (n.stop(), d.fadeOut(500, function (a) { d.remove(); }), h.remove());
  54. }), l.gotoAndPlay("all"), n.gotoAndPlay("all"), f.addChild(n), c.addChild(l), createjs.Ticker.setFPS(30), createjs.Ticker.addEventListener("tick", c), createjs.Ticker.addEventListener("tick",
  55. f), $(d).animate({ left: a.offset().left + g[0], top: a.offset().top + g[1] }, 1E3));
  56. }
  57. }
  58. };
  59. log("Animated coins fixed.", "initialize");
  60.  
  61. doInstantSpeedUp = function doInstantSpeedUp(c, a, callback) {
  62. var b = buildingById(c),
  63. d = getCurrentSpeedUpType(b.producing_archetype_id, b.recipe_symbol);
  64.  
  65. // EXTENDER :: Modification
  66. if (instantSpeedCost(b.build_remaining, d) > 0) {
  67. console.log('EXTENDER :: The instant speed up costs money. Exiting...');
  68. return false;
  69. }
  70.  
  71. if (false == hasGold(instantSpeedCost(b.build_remaining, d), function () {
  72. doInstantSpeedUp(c, true, callback);
  73. }, a) && true != a) return false;
  74. playSound("coins");
  75. return speedBuild(-1, c, callback);
  76. };
  77. log("Instant speed up returns if gold is required.", "initialize");
  78.  
  79. doFinishProduction = function doFinishProduction(c, callback) {
  80. var a = buildingByItemId(c), b = itemFromId(a.producing_archetype_id);
  81. userContext.lastFinish = a.symbol;
  82. doLog("doFinishProduction: building_id=" + c + " symbol=" + a.symbol + " producing=" + b.symbol);
  83. "Upgrade" !== b.slot && (analytics.track("Production Finish", { building_symbol: a.symbol, item_symbol: b.symbol, item_category: b.slot }), analytics.wizardtrack("Production Finish", { building_symbol: a.symbol, item_symbol: b.symbol, item_category: b.slot }));
  84. var d = "finish-" + c;
  85. userLock(d) && (playSound("build"),
  86. isWeb() && $("#collect_" + a.symbol).html(""), $.ajax({
  87. url: "/play/finish_production/" + c,
  88. dataType: "JSON",
  89. success: function (a) {
  90.  
  91. //console.debug("Logging server response for doFinishProduction: ", a);
  92.  
  93. doLog("doFinishProduction: succeess ");
  94. freeLock(d);
  95. var b = buildingByItemId(c, a.building);
  96. userContext.playerData.character = a.character;
  97. userContext.playerData.user.money = a.user.money;
  98. userContext.playerData.stat.onboarding = a.stat.onboarding;
  99. userContext.playerData.stat.num_items_produced = a.stat.num_items_produced;
  100. userContext.playerData.stat.produced_stone = a.stat.produced_stone;
  101. userContext.playerData.stat.building_upgrades_finished =
  102. a.stat.building_upgrades_finished;
  103. b.producing_archetype_id = null;
  104. b.modifier = null;
  105. b.recipe_symbol = null;
  106. var f = extractItemBySymbol(playerInventory, b.symbol);
  107. f.effective_upgrade_level = a.building.effective_upgrade_level;
  108. f.producing_archetype_id = null;
  109. f.modifier = null;
  110. f.recipe_symbol = null;
  111.  
  112. // EXTENDER :: Modification, execute current code ONLY if there's a produced item returned!
  113. if (a.produced_item) {
  114. if (userContext.intCurrentRecipeIndex = null,
  115. doLog("doFinishProduction: data.produced_item.id=" + a.produced_item.id + " quantity=" + a.produced_item.quantity),
  116. insertInventoryFromItem(playerInventory, a.produced_item),
  117. theNewItem = extractItemById(playerInventory, a.produced_item.id), 1 == a.is_loot) {
  118. 0 < a.enhanced_loot_roll
  119. ? dialogAlert({
  120. style: "alert",
  121. text: "The result of your production (enhanced) is: " + a.produced_full_name,
  122. items: [theNewItem],
  123. heading: "You have produced...",
  124. button1: "Okay"
  125. }) : dialogAlert({
  126. style: "alert",
  127. text: "The result of your production is: " + a.produced_full_name,
  128. items: [theNewItem],
  129. heading: "You have produced...",
  130. button1: "Okay"
  131. });
  132. } else if (0 < a.affix_chance) {
  133. var m;
  134. m = "" + ("You have a " + a.affix_chance_from_stats +
  135. "% chance to produce a superior-quality item from your talents, equipment and buildings.");
  136. a.bonus_item_name && (m += " 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.");
  137. m = a.affix_roll1 <= a.affix_chance && a.affix_roll2 <= a.affix_chance ? m + "<p/>Critical Success! You obtained a superb result!" : a.affix_roll1 > a.affix_chance && a.affix_roll2 > a.affix_chance ? m + "<p/>You obtained a normal result." : m + "<p/>Success! You obtained a good result.";
  138. dialogAlert({ style: "alert", text: m, items: [theNewItem], heading: a.produced_full_name, button1: "Okay" });
  139. }
  140.  
  141. userContext.newBldgOrUpgrade = true;
  142. var q;
  143.  
  144. "Upgrade" != theNewItem.slot ?
  145. (userContext.newProducedItem = theNewItem, isWeb()
  146. && $("#collect_" + f.symbol).html(renderUpgradeCollect(f)),
  147. isWeb() && $("#build_panel_action_" + f.id).html(renderBuildPanelAction(f)),
  148. isWeb() && $("#speed_button_" + f.id).hide())
  149. : q = theNewItem.symbol;
  150.  
  151.  
  152. isWeb() ? (renderBuildingInventory(userContext.playerData),
  153. renderBuildingsOnScreen(userContext.playerData))
  154. : (f = null, f = null == q
  155. ? { symbol: b.symbol, status: "idle" }
  156. : { symbol: b.symbol, status: "idle", upgrade: q },
  157. iosSignal("finish_production", "update", f),
  158. isAndroid()
  159. && mobileCooldownDataSignal([{ mode: "building", symbol: b.symbol }]),
  160. refreshActiveBuildingPanel(),
  161. $("#building_tab_prod, .buildingupgradetree").fadeTo("slow", "1"));
  162.  
  163. uiEvent("do_finish_production");
  164. uiEvent("building_panel_" + userContext.activeBuildingPanel);
  165. a.produced_item && "stacks_of_coins" == a.produced_item.symbol && retrievePlayerData(true, function (a) {
  166. userContext.playerData.quests =
  167. a.quests;
  168. reRenderQuestActionItems();
  169. });
  170.  
  171. "Upgrade" == theNewItem.slot && buildingUpgradePanel(b.symbol);
  172. updatePlayerInfo(userContext.playerData);
  173. updateAllStatus();
  174.  
  175. }
  176.  
  177. // EXTENDER :: Modification
  178. if (typeof callback == "function") {
  179. callback();
  180. }
  181. }
  182. }));
  183. };
  184. log("Finish production and call callback if any. Fix bug.", "initialize");
  185.  
  186. doProduction = function (c, a, b, d, g, callback) {
  187. userContext.lastFinish = null;
  188. null == b && (b = 1);
  189. doLog("doProduction: symbol=" + c + " producer=" + a + " quantity=" + b);
  190. var p = null, f = "", m = null, q = "", k = null, D = null;
  191. uiEvent("start_production");
  192. null == userContext.playerData.stat.num_shop_items_started && (userContext.playerData.stat.num_shop_items_started = 0);
  193. userContext.playerData.stat.num_shop_items_started += 1;
  194. for (var u = 0; u < userContext.recipeData.length; u++)
  195. if (console.log("DEBUG: n=" + userContext.recipeData[u].category + ", symbol: " +
  196. userContext.recipeData[u].output), g == userContext.recipeData[u].symbol || null == g && (userContext.recipeData[u].output == c || userContext.recipeData[u].output_loot == c) && userContext.recipeData[u].category == a) {
  197. p = userContext.recipeData[u];
  198. p.output == c ? (k = itemFromSymbol(c), q = k.full_name) : (p.output_loot == c && (m = c), q = p.name);
  199. D = u;
  200. components = userContext.recipeData[u].input.split(",");
  201. quantity_components = userContext.recipeData[u].input_quantity.split(",");
  202. var s = itemFromSymbol(userContext.recipeData[u].category);
  203. if (true ==
  204. userContext.recipeData[u].unlocked) {
  205. if (1 < userContext.recipeData[u].input.length)
  206. for (s = 0; s < components.length; s++) {
  207. var y = itemFromSymbol(components[s]), w = false;
  208. 0 == s && true == userContext.recipeData[u].evolution && (w = true);
  209. w = sumInventoryQuantity(y.symbol, w);
  210. if (parseInt(quantity_components[s]) * b > w) {
  211. "" == f && (f = "You need more of the following:<p/>");
  212. f += "<div>";
  213. if (4 <= userContext.playerData.character.level)
  214. switch (components[s]) {
  215. case "stone":
  216. case "iron":
  217. case "fur":
  218. case "ore":
  219. case "horse":
  220. case "riverways_fish_consumable":
  221. case "smallfolk":
  222. case "wood":
  223. case "cloth":
  224. case "grains":
  225. w =
  226. parseInt(quantity_components[s]) * b - w;
  227. if (cost_item = itemFromSymbol("pennyroyal")) var z = cost_item.price_perk_points * w;
  228. f += '<div id="basic_resource_' + components[s] + '">';
  229. f += itemMiniView(y, { extra_styles: "left:-70px", quantity_override: w });
  230. f += '<span style="position: relative; left: 250px; top: -88px" class="btnwrap btnmed btnprice" onclick="getBasicResource(\'' + components[s] + "'," + w + ',true);"><span class="btnedge"><a class="btngold">Get Now</a><em>for</em><strong>' + z + "</strong></span></span>";
  231. f += "</div>";
  232. break;
  233. default:
  234. f += itemMiniView(y);
  235. }
  236. f += "</div>";
  237. f += "<p>" + y.howto + "</p>";
  238. }
  239. }
  240. } else f = "You need <em>" + s.full_name + "</em> to produce that.";
  241. break;
  242. }
  243. if ("" != f) doAlert("Requirements: " + q, f), analytics.track("Production Blocked-Resources", { item_symbol: c }), analytics.wizardtrack("Production Blocked-Resources", { item_symbol: c });
  244. else if (p && hasMoney(p.craft_cost * b, function () { doProduction(c, a, b, d, g); })) {
  245. f = JSON.parse(JSON.stringify(userContext.playerData.inventory));
  246. u = [];
  247. p.output == c ? (k = itemFromSymbol(c), q = k.full_name) : (p.output_loot ==
  248. c && (m = c), q = p.name);
  249. components = p.input.split(",");
  250. quantity_components = p.input_quantity.split(",");
  251. s = itemFromSymbol(p.category);
  252. if (true == p.unlocked && (userContext.intCurrentRecipeIndex = D, 1 < p.input.length)) for (s = 0; s < components.length; s++) y = itemFromSymbol(components[s]), w = false, 0 == s && true == p.evolution && (w = true), depleteItems(y.symbol, parseInt(quantity_components[s]) * b, null, u, w);
  253. q = "";
  254. D = null;
  255. for (s = 0; s < u.length; s++)
  256. if (y = itemFromSymbol(u[s].symbol), u[s].full_name != y.full_name)
  257. D = JSON.parse(JSON.stringify(u[s])),
  258. q += "[" + u[s].full_name + "]";
  259. else if (itemHasSeals(u[s]) && (!u[s].preserve_attributes || false == u[s].preserve_attributes)) D = JSON.parse(JSON.stringify(u[s])), y = generateSealNameList(u[s]), q += "[" + u[s].full_name + " : " + y + "]";
  260.  
  261. // EXTENDER :: Modification
  262. if (true != d && null != D && !extender_confirmSuperiorMaterials) {
  263. return playerInventory = JSON.parse(JSON.stringify(f)), userContext.playerData.inventory = playerInventory, dialogAlert({
  264. style: "confirm",
  265. margin_top: 100,
  266. items: [D],
  267. button2: "Not Now",
  268. button2_action: function () { closeAlert(); },
  269. button1: "Confirm",
  270. button1_action: function () {
  271. closeAlert();
  272. return doProduction(c, a, b, true, g);
  273. },
  274. heading: "Confirm Superior Materials",
  275. text: "Producing this item now will consume superior versions of your materials: " + q + "<p/>Are you sure you want to contribute superior versions of materials to produce this item?"
  276. }), false;
  277. }
  278.  
  279. var I = buildingBySymbol(userContext.activeBuildingPanel);
  280. I.build_remaining = p.craft_duration * b;
  281. I.original_build_seconds = p.craft_duration * b;
  282. I.build_progress = 0;
  283. "" != p.output && (I.producing_archetype_id = itemFromSymbol(p.output).id);
  284. I.recipe_symbol = p.symbol;
  285. I.action_sub_id = b;
  286. f = renderBuildingConstruction(I);
  287. isWeb() && $("#bc_" + I.id).html(f);
  288. displayBuildingCooldown(I);
  289. "Upgrade" == itemFromId(I.producing_archetype_id).slot ? buildingUpgradePanel(userContext.activeBuildingPanel, true, false) : (buildingUpgradePanel(userContext.activeBuildingPanel, true, false, true), buildingTabProd(), isWeb() && $("#collect_" + I.symbol).html(renderUpgradeCollect(I)));
  290. p = "/play/set_production";
  291. p = (m ? p + ("?loot_symbol=" + m + "&producer_symbol=" + a) : k ? p + ("/" + c + "?producer_symbol=" + a) : p + ("?producer_symbol=" + a)) + ("&quantity=" + b);
  292. g && (p += "&recipe_symbol=" + g);
  293.  
  294. $.ajax({
  295. url: p,
  296. dataType: "JSON",
  297. success: function (a) {
  298. userContext.prodProgressShow = null;
  299. userContext.playerData.stat.num_shop_items_started = a.num_shop_items_started;
  300. updateAllStatus();
  301. uiEvent("do_production");
  302. isWeb() || iosSignal("building", "cooldown", mobileCooldownData({ mode: "building", symbol: I.symbol, flag: "production_started" }));
  303.  
  304. // EXTENDER :: Modification
  305. if (typeof callback == "function") {
  306. callback();
  307. }
  308. }
  309. });
  310. }
  311. };
  312. log("Do production and call callback if any. Inject superior materials condition.", "initialize");
  313.  
  314. buildTimerUpdate = function (c, a, b) {
  315.  
  316. $("#timer-" + c).html(renderBuildTime(a));
  317. $("#timer-panel-" + c).html(renderBuildTime(a));
  318.  
  319. percent = 100 - 100 * (a / b);
  320. $("#progress-" + c).html('<span style="width:' + percent + '%;"></span>');
  321.  
  322. var d = buildingById(c);
  323. d.build_remaining = a;
  324. markup = renderBuildPanelAction(d);
  325.  
  326. $("#speed_button_" + c).show();
  327. $("#build_panel_action_" + c).html(markup);
  328. $("#production_timer_" + c).html(renderBuildTime(d.build_remaining, true));
  329. $("#production_timer_upper_" +
  330. c).html(renderBuildTime(d.build_remaining));
  331. $("#production_progress_" + c).css({ width: percent + "%" });
  332. $("#duration_long_" + c).html(durationLong(buildTimerDescription(d), a, b));
  333. a--;
  334. userContext.doBuildId == c && (300 >= a ?
  335. ($("#speed_up_skip_block").hide(),
  336. $("#speed_up_skip_use").show()) :
  337. ($("#speed_up_skip_use").hide(),
  338. $("#speed_up_skip_block").show()),
  339. $(".speed_building_" + c).html() != renderSpeedUpButton(c) && $(".speed_building_" + c).html(renderSpeedUpButton(c)));
  340.  
  341. d.cooldown = a;
  342. d.original_cooldown_seconds = b;
  343. displayBuildingCooldown(d);
  344. 0 < a || (closeSpeedUp(), finalizeBuildingConstruction(d), clearBuildingTimer(d.symbol));
  345.  
  346. // EXTENDER :: Modification REVISE
  347. if (a == 300 - 1) {
  348. doInstantSpeedUp(c, false, function() {
  349. doFinishProduction(d.item_id);
  350.  
  351. setTimeout(function () {
  352. var el = getElement(d.symbol);
  353. if (el) {
  354. executeElement(el);
  355. }
  356. }, extender_queueDelay * 1000);
  357. });
  358.  
  359. } else if (a < 300 - 1) {
  360. doInstantSpeedUp(c, false, function () {
  361. doFinishProduction(d.item_id);
  362. });
  363. }
  364. };
  365. log("Build cutom timer update. Speed up and finish automatically, grab production item if any and execute.", "initialize");
  366.  
  367. doCollect = function (c) {
  368. lock_name = "collect-" + c;
  369. if (userLock(lock_name)) {
  370. var a = buildingByItemId(c);
  371. 0 < predictCollect(a) && (playSound("coins"), isWeb() && animatedCoins.init($("#collectbtn"), $("#silver"), [-10, -40], [-72, -44]));
  372. uiEvent("collect_" + buildingSymbolFromItemId(c), userContext.PlayerData);
  373. the_url = "/play/collect_building/" + c + "?client_seqnum=" + userContext.player_data_seqnum;
  374.  
  375. isWeb() || showSpinner();
  376. $.ajax({
  377. url: the_url,
  378. dataType: "JSON",
  379. success: function (b) {
  380. freeLock(lock_name);
  381. doLog("doCollect: building_id=" +
  382. c + " data.money=" + b.money);
  383. updateSilver(b.money);
  384. updateBaseTime(b.base_time);
  385. a.last_collected_at = b.last_collected_at;
  386. userContext.playerData.stat.buildings_collected = b.buildings_collected;
  387. userContext.playerData.stat.onboarding = b.onboarding;
  388. isWeb() || (iosSignal("building_collected"), hideSpinner());
  389. isWeb() && $("#collect_" + a.symbol).html(renderUpgradeCollect(a));
  390. buildingUpgradePanel(a.symbol);
  391. b = renderBuildingOwned(a);
  392. isWeb() && $("#bc_" + a.id).html(b);
  393. updateAllStatus();
  394. questListings();
  395.  
  396. // EXTENDER :: Modification
  397. closeModalLarge('modal_dialogs_top');
  398. }
  399. });
  400. }
  401. };
  402. log("Close dialog when silver is collected.", "initialize");
  403.  
  404. claimDaily = function() {
  405. showSpinner();
  406. $.ajax({
  407. url: "/play/advice_claim_daily",
  408. dataType: "JSON",
  409. success: function(c) {
  410.  
  411. hideSpinner();
  412.  
  413. // EXTENDER :: Modification
  414. // bugfix: undefined silver and gold
  415. if (c.status && c.status == "OK") {
  416. return;
  417. }
  418.  
  419. $("#claimed_holder").html("<h5>Claimed</h5>");
  420. updateSilver(c.total_silver);
  421. updateGold(c.total_gold);
  422. $(".claimrewardchest").hide();
  423. $("#daily_reward_statview").html(itemStatViewFromSymbol(c.item, { produce: "Continue", produce_callback: "welcomeClaimed" }));
  424. $("#dailynewsbtn").removeClass("btnglow");
  425.  
  426. var a = buildingBySymbol("keep");
  427. userContext.playerData.stat.daily_streak_claimed = userContext.playerData.stat.daily_streak;
  428. a && $("#bc_" + a.id).html(renderBuildingOwned(a));
  429. isWeb() || iosSignal("daily_reward_claimed", null, c.item);
  430.  
  431. // EXTENDER :: Modification
  432. $(".welcomemodal").hide();
  433. }
  434. });
  435.  
  436. return false;
  437. };
  438. log("Claim daily updates money only if claimed. Close when ready.", "initialize");
  439.  
  440. finishAll = function() {
  441. log("Checking buildings...");
  442. for (var i = 0; i < userContext.buildingsData.length; i++) {
  443. var b = userContext.buildingsData[i];
  444. if (buildingFinished(b)) {
  445. log("Attempt to finish production on " + b.symbol);
  446. doFinishProduction(b.item_id, finishAll);
  447. return;
  448. }
  449. }
  450.  
  451. alert('Done');
  452. log("All buildings are now finished.");
  453. };
  454. log("Finish all buildings whole different way, make use of doFinish callback.", "initialize");
  455.  
  456. applySelectedUpgrade = function(c, a, callback) {
  457. lock_name = "upgrade-" + c.id;
  458. userContext.lastFinish = null;
  459.  
  460. var b;
  461.  
  462. if (0 < c.gold && null == a)
  463. doGoldUnlock(c.id, function() {
  464. applySelectedUpgrade(c, true, callback);
  465. });
  466. else if (hasMoney(c.silver, function() {
  467. applySelectedUpgrade(c, a, c.silver);
  468. }) && userLock(lock_name)) {
  469. var d = buildingUpgradeResourceCheck(c.building_id, c.id);
  470. if (isWeb()) {
  471. if (null != d.markup && "" != d.markup) {
  472. doAlert("Resources Required", "You need additional resources to construct that upgrade:<p/>" + d.markup);
  473. return false;
  474. }
  475. } else if (null !=
  476. d.strMissingComponentText) {
  477. if (isAndroid()) {
  478. iosSignal("building", "upgrade_fail", d);
  479. return false;
  480. }
  481. return d;
  482. }
  483. b = d.item;
  484. playSound("build");
  485. var g = buildingById(c.building_id);
  486. itemFromSymbol(g.symbol);
  487. d = extractItemBySymbol(userContext.playerData.inventory, g.symbol).upgrade_level - 1;
  488. 0 > d && (d = 0);
  489. userContext.buildIndex++;
  490. g.build_progress = 0;
  491. g.producing_archetype_id = b.id;
  492. $.ajax({
  493. url: "/play/apply_upgrade/" + c.id,
  494. dataType: "JSON",
  495. success: function(result) {
  496. freeLock(lock_name);
  497. if (result.resource_list)
  498. for (var i = 0; i < result.resource_list.length; i++) {
  499. var m =
  500. extractItemBySymbol(playerInventory, result.resource_list[i]);
  501. m && (m.quantity -= parseInt(result.resource_quantities[i]));
  502. }
  503. updateSilver(result.money);
  504. updateBaseTime(result.base_time);
  505. userContext.playerData.stat.onboarding = result.onboarding;
  506. userContext.playerData.stat.building_upgrades_added = result.building_upgrades_added;
  507. g.build_remaining = result.build_remaining;
  508. g.original_build_seconds = result.original_build_seconds;
  509. displayBuildingCooldown(g);
  510. isWeb() && buildingUpgradePanel(g.symbol);
  511. result = renderBuildingConstruction(g);
  512. $("#bc_" + g.id).html(result);
  513. uiEvent("add_" +
  514. userContext.activeBuildingPanel, userContext.PlayerData);
  515. selectedUpgrade = extractItemBySymbol(playerInventory, b.symbol);
  516. q_upgrade = 1;
  517. selectedUpgrade && (q_upgrade = selectedUpgrade.quantity + 1);
  518. $("#addbtn_container").html(addButtonUpgrade(b, false, q_upgrade));
  519. isWeb() ? selectUpgrade(userContext.activeUpgrade) : iosSignal("building", "cooldown", mobileCooldownData({ mode: "building", symbol: g.symbol, flag: "production_started" }));
  520. questListings();
  521. analytics.track("Building Apply-Upgrade", {
  522. building: userContext.activeBuildingPanel,
  523. upgrade: itemData[itemById[c.id]].symbol,
  524. cost: itemData[itemById[c.id]].cost
  525. });
  526. analytics.wizardtrack("Building Apply-Upgrade", { building: userContext.activeBuildingPanel, upgrade: itemData[itemById[c.id]].symbol, cost: itemData[itemById[c.id]].cost }); // EXTENDER :: Modification
  527.  
  528. // EXTENDER :: Modification
  529. if (typeof callback == "function") {
  530. callback();
  531. }
  532. }
  533. });
  534. }
  535.  
  536. return false;
  537. };
  538. log("Do upgrade and the call function.", "initialize");
  539.  
  540. speedBuild = function speedBuild(c, a, callback) {
  541. $("#modal_dialogs_top2").hide();
  542. doLog("speedBuild: speed_item=" + c + " item_id=" + a);
  543. $.ajax({
  544. url: "/play/build_now/" + a + "?complete=" + c,
  545. dataType: "JSON",
  546. success: function (b) {
  547. console.log("speedBuild: returned, data.building.id=" + b.building.id);
  548. userContext.playerData.user.money = b.user.money;
  549. userContext.playerData.stat.onboarding = b.stat.onboarding;
  550. userContext.playerData.chapter = b.chapter;
  551. var d = buildingById(a, b.building);
  552. doLog("speedBuild: speed_item:");
  553. doLog(b.speed_item);
  554. b.speed_item && insertInventoryFromItem(userContext.playerData.inventory,
  555. b.speed_item);
  556. insertInventoryFromItem(userContext.playerData.inventory, b.produced_item);
  557. logLastItem("speedBuild:A");
  558. userContext.buildingsData && (userContext.playerData.buildings = userContext.buildingsData);
  559. playerInventory && (userContext.playerData.inventory = playerInventory);
  560. userContext.chapterData = b.chapter;
  561. d && (analytics.track("SpeedUp-Building", { building: d.symbol, speed_item: c }), analytics.wizardtrack("SpeedUp-Building", { building: d.symbol, speed_item: c }));
  562. userContext.buildIndex++;
  563. logLastItem("speedBuild:B");
  564. finalizeBuildingConstruction(d);
  565. isItemBuildingUpgrade(d) || null == d.producing_archetype_id && null == d.recipe_symbol ? (renderBuildingInventory(userContext.playerData, buildingUpgradePanel, userContext.activeBuildingPanel, true), isWeb() || iosSignal("building", "cooldown", mobileCooldownData({ mode: "building", symbol: d.symbol, flag: "speed_up" }))) : (userContext.craftingItemFinished = true, renderBuildingInventory(userContext.playerData, buildingUpgradePanelProd, userContext.activeBuildingPanel, true), $("#collect_" + d.symbol).html(renderUpgradeCollect(d)),
  566. $("#build_panel_action_" + d.id).html(renderBuildPanelAction(d)), $("#speed_button_" + d.id).hide());
  567. renderBuildingsOnScreen(userContext.playerData);
  568. d && uiEvent("building_panel_" + d.symbol);
  569.  
  570. // EXTENDER :: Modification
  571. if (typeof (callback) == "function") {
  572. callback();
  573. }
  574. }
  575. });
  576. };
  577. log("Speed build is what actually calls the callback (not doInstantSpeedUp).", "initialize");
  578.  
  579. uiEvent = function uiEvent(c, a, b) {
  580. if (isWeb()) {
  581. log("uiEvent: event_name=[" + c + "]", "DEBUG");
  582. a = userContext.playerData;
  583. if (void 0 == a) return doLogEvent("uiEvent: playerData null"), !1;
  584. var d = "", g = !1, p = void 0, f = void 0, m = void 0, q = void 0, k = void 0, D = f = "", m = "Okay", u = void 0, s = void 0, y = 0, w = 0, z = 240, I = 0, M = 0, N = 0, W = "", h = "", C = void 0, B = 0, A = 0, G = void 0, O = void 0, H = 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;
  585. "confirm_override" == c && (ba = g = !0, Q = !1);
  586. h = "test_event";
  587. doLogEvent("trigger_src=[" +
  588. h + "] event_name=[" + c + "]");
  589. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g) doLogEvent("ui triggered: ui_test_event"), g = !0, d = "ui_test_event", !0 == g && (u = subGotStrings("Text to display <strong>next</strong> to something."), y = void 0 != b && void 0 != b.y ? b.y : 20, w = void 0 != b && void 0 != b.x ? b.x : 50, C = "top_left", s = ".alignmenttabs"), doLogEvent("after checks=" + g);
  590. h = "test_alert";
  591. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  592. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  593. "").split(","))) && !0 != g) doLogEvent("ui triggered: ui_test_alert"), g = !0, d = "ui_test_alert", !0 == g && (p = '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);
  594. h = "test_arrow";
  595. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  596. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  597. doLogEvent("ui triggered: ui_test_arrows"),
  598. g = !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);
  599. h = "test_clear";
  600. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  601. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  602. doLogEvent("ui triggered: ui_test_clear"), g = !0, d = "ui_test_clear", !0 == g && (y = void 0 != b && void 0 != b.y ? b.y : 20, w = void 0 != b && void 0 != b.x ? b.x : 50, s = ".actionheader"), doLogEvent("after checks=" +
  603. g);
  604. h = "ui_test";
  605. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  606. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g) doLogEvent("ui triggered: ui_test_alert_chain"), g = !0, d = "ui_test_alert_chain", !0 == g && (p = "This is a test message.", D = "test_alert"), doLogEvent("after checks=" + g);
  607. h = "alert_test_alert_button1";
  608. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  609. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  610. doLogEvent("ui triggered: ui_test_alert_chain2"),
  611. g = !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 && (u = subGotStrings("This appears if test_flag is not set (which it should now be)"), s = ".actionheader", G = "test_flag"), doLogEvent("after checks=" + g);
  612. h = "alert_test_alert_button1";
  613. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  614. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  615. doLogEvent("ui triggered: ui_test_alert_chain3"),
  616. g = !0, d = "ui_test_alert_chain3", doLogEvent("uiEvent: require_flag = test_flag"), 1 != userContext.flags.test_flag && (g = !1), !0 == g && (u = subGotStrings("test_flag was previously set"), s = ".actionheader"), doLogEvent("after checks=" + g);
  617. h = "test_device";
  618. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  619. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  620. doLogEvent("ui triggered: ui_device_web_event"), g = !0, d = "ui_device_web_event", !0 != isDevice("web") && (g = !1), !0 == g && (p = "This is a Web device.",
  621. D = "test_alert"), doLogEvent("after checks=" + g);
  622. h = "test_device";
  623. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  624. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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 && (p = "This is an iPad!", D = "test_alert"), doLogEvent("after checks=" + g);
  625. h = "test_ios_signal";
  626. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  627. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c,
  628. h.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", k = "additional:test_parameters"), doLogEvent("after checks=" + g);
  629. h = "test_native_device";
  630. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  631. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  632. doLogEvent("ui triggered: ui_native_device_test"), g = !0, d = "ui_native_device_test", !0 == g && (u = subGotStrings("This is a tooltip for native device code"),
  633. y = void 0 != b && void 0 != b.y ? b.y : 300, w = void 0 != b && void 0 != b.x ? b.x : 200, z = 200), doLogEvent("after checks=" + g);
  634. h = "holdings";
  635. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  636. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g) {
  637. doLogEvent("ui triggered: ui_onboarding_begin");
  638. var g = !0, d = "ui_onboarding_begin", h = "pro_q1_take_the_slavers_keep", K = h.replace("[", "").replace("]", "");
  639. doLogEvent("quest_active: " + h);
  640. if (-1 != h.indexOf(",")) {
  641. var E = /\[.*\]/.test(h), L = !E;
  642. $.each(K.split(","),
  643. function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 });
  644. L || (g = !1)
  645. } else !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1);
  646. !0 == g && (u = subGotStrings("Start your first <strong>Quest</strong>."), y = void 0 != b && void 0 != b.y ? b.y : 94, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 171, C = "left", s = "#actionmenu", h = "88", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "243", B = -1 != h.indexOf(",") ? h.split(",") : h);
  647. doLogEvent("after checks=" + g)
  648. }
  649. h =
  650. "quest_3option_pro_q1_take_the_slavers_keep";
  651. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  652. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  653. doLogEvent("ui triggered: ui_jons_command"), g = !0, d = "ui_jons_command", !0 == g && (u = subGotStrings("Read this speech from <strong>Lord Jon Arryn</strong>."), M = 5E3, W = "fade_ui_jon_command", y = void 0 != b && void 0 != b.y ? b.y : 300, w = void 0 != b && void 0 != b.x ? b.x : 400, z = 185, I = 58, C = "top_left", s = ".questiconcircle", h = "233", A = -1 != h.indexOf(",") ?
  654. h.split(",") : h, h = "370", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  655. h = "fade_ui_jon_command";
  656. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  657. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  658. doLogEvent("ui triggered: ui_jon_command2"), g = !0, d = "ui_jon_command2", !0 == g && (u = subGotStrings("Answer him by clicking on the <strong>Decision</strong> button below."), y = void 0 != b && void 0 != b.y ? b.y : 315, w = void 0 != b && void 0 != b.x ? b.x : 285, z = 225, I = 64, C = "bottom_left",
  659. s = ".questiconcircle", h = "358", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "246", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  660. h = "quest_results_pro_q1_take_the_slavers_keep";
  661. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  662. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  663. 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 && (u = subGotStrings("<strong>Rewards</strong> display at the end of a Quest."),
  664. M = 1E5, W = "fade_ui_quest_results_pro_q1_take_the_slavers_keep", y = void 0 != b && void 0 != b.y ? b.y : 18, w = void 0 != b && void 0 != b.x ? b.x : 350, z = 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);
  665. h = "fade_ui_quest_results_pro_q1_take_the_slavers_keep";
  666. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  667. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  668. doLogEvent("ui triggered: ui_fade_ui_quest_results_pro_q1_take_the_slavers_keep"),
  669. g = !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);
  670. h = "quest_close_pro_q1_take_the_slavers_keep";
  671. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  672. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  673. doLogEvent("ui triggered: ui_quest_close_pro_q1_take_the_slavers_keep"), g = !0, d = "ui_quest_close_pro_q1_take_the_slavers_keep",
  674. doLogEvent("after checks=" + g);
  675. h = "holdings";
  676. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  677. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  678. 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(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) {
  679. if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " +
  680. c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1
  681. }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("<strong>New</strong> Quests appear here. Click here to start this Quest."), y = void 0 != b && void 0 != b.y ? b.y : 94, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 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);
  682. h = "quest_post_pro_q2_a_widowers_oath_action_choice_1, quest_post_pro_q2_a_widowers_oath_initial_choice_2";
  683. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  684. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  685. 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 && (u = subGotStrings("You now have a <strong>Sworn Sword</strong>."), y = void 0 != b && void 0 != b.y ? b.y : -86, w = void 0 != b && void 0 != b.x ? b.x : 399, z = 158, C = "bottom_left", s = ".rewardwrapper", h = "-48", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "354",
  686. B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_sworn_sword_reward"), doLogEvent("after checks=" + g);
  687. h = "holdings";
  688. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  689. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  690. 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(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b,
  691. c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("Click here to send <strong>Ser Hugo</strong> on this Quest."), y = void 0 != b && void 0 != b.y ? b.y : 94, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 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=" +
  692. g);
  693. h = "ss_action_open_quest";
  694. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  695. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  696. 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(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) {
  697. if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"),
  698. (L = E) && E)) return !1
  699. }), L || (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 && (u = subGotStrings("<strong>Sworn Swords</strong> can be sent to complete quest objectives. Their success depends on your skills as well as their own."), y = void 0 != b && void 0 != b.y ? b.y : -37, w = void 0 !=
  700. b && void 0 != b.x ? b.x : 176, z = 309, I = 100, s = "#vsbtminfo", P = "true", R = "quest_next_q3_ss_blood_at_last_tutorial_1"), doLogEvent("after checks=" + g);
  701. h = "quest_next_q3_ss_blood_at_last_tutorial_1";
  702. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  703. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  704. 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("]",
  705. ""), doLogEvent("quest_active: " + h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("First, select a <strong>Sworn Sword</strong>."), y = void 0 != b && void 0 != b.y ? b.y : 15, w = void 0 != b && void 0 != b.x ? b.x : 454, z = 155, C = "left", s = ".miniviewselect", h = "12", A = -1 !=
  706. h.indexOf(",") ? h.split(",") : h, h = "396", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_ss_action_tutorial"), doLogEvent("after checks=" + g);
  707. h = "ss_choose_item_sworn_sword_hugo_temp";
  708. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  709. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  710. 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: " +
  711. h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("Next, select an <strong>Action</strong> for your Sworn Sword to perform.<br>"), y = void 0 != b && void 0 != b.y ? b.y : 230, w = void 0 != b && void 0 != b.x ? b.x : 176, z = 309, C = "top, top, top", s = ".miniviewselect", h = "170, 170, 170",
  712. A = -1 != h.indexOf(",") ? h.split(",") : h, h = "69, 283, 492", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flags_ss_actions_show"), doLogEvent("after checks=" + g);
  713. h = "ss_select_action_fight, ss_select_action_sabotage, ss_select_action_bribe";
  714. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  715. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  716. 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("]", ""),
  717. doLogEvent("quest_active: " + h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("Click here to send your Sworn Sword into the fray!"), y = void 0 != b && void 0 != b.y ? b.y : 240, w = void 0 != b && void 0 != b.x ? b.x : 441, z = 230, C = "left", s = "#vsbtminfo", h = "235", A = -1 != h.indexOf(",") ?
  718. h.split(",") : h, h = "375", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  719. h = "open_progress";
  720. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  721. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  722. 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(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","),
  723. function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), doLogEvent("after checks=" + g);
  724. h = "quest_ss_results_pro_q3_ss_blood_at_last";
  725. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  726. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  727. doLogEvent("ui triggered: ui_quest_display_by_id_ss_go"), g = !0, d = "ui_quest_display_by_id_ss_go",
  728. h = "pro_q3_ss_blood_at_last", K = h.replace("[", "").replace("]", ""), doLogEvent("quest_active: " + h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("<strong>Rewards</strong> for Sworn Sword Quests appear here."), y = void 0 != b && void 0 != b.y ? b.y : 200, w = void 0 !=
  729. b && void 0 != b.x ? b.x : 488, z = 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);
  730. h = "holdings";
  731. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  732. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  733. 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: " +
  734. h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("Click here to start this Quest."), y = void 0 != b && void 0 != b.y ? b.y : 94, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 185, C = "left", s = "#actionmenu", h = "88", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "243", B = -1 != h.indexOf(",") ?
  735. h.split(",") : h), doLogEvent("after checks=" + g);
  736. h = "quest_3option_pro_q4_a_royal_reward";
  737. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  738. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  739. doLogEvent("ui triggered: ui_quest_3option_pro_q4_a_royal_reward"), g = !0, d = "ui_quest_3option_pro_q4_a_royal_reward", !0 == g && (u = subGotStrings("<strong>Alignment</strong> points are rewarded when making different choices during a quest, and can unlock special content later. "), y = void 0 !=
  740. b && void 0 != b.y ? b.y : -96, w = void 0 != b && void 0 != b.x ? b.x : 258, z = 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);
  741. h = "quest_results_pro_q4_a_royal_reward";
  742. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  743. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  744. doLogEvent("ui triggered: ui_quest_results_pro_q4_a_royal_reward"), g = !0,
  745. d = "ui_quest_results_pro_q4_a_royal_reward", !0 == g && (G = "royal_reward"), doLogEvent("after checks=" + g);
  746. h = "quest_close_pro_q4_a_royal_reward";
  747. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  748. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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);
  749. h = "holdings";
  750. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  751. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  752. 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 ?
  753. parseInt(a.stat.quests_started) || 0 : 0, "4" != the_val + "" && (g = !1)) : g = !1, !0 == g && (y = void 0 != b && void 0 != b.y ? b.y : 294, w = void 0 != b && void 0 != b.x ? b.x : 385, z = 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);
  754. h = "lorebook_animation_1_end";
  755. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  756. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  757. doLogEvent("ui triggered: ui_lore_book_description"),
  758. g = !0, d = "ui_lore_book_description", !0 == g && (u = subGotStrings("The <strong>Lorebook</strong> tracks your progress through the game and rewards you for completing each chapter."), y = void 0 != b && void 0 != b.y ? b.y : 154, w = void 0 != b && void 0 != b.x ? b.x : 197, z = 346, s = "#book_style", P = "true", R = "lore_book_noble"), doLogEvent("after checks=" + g);
  759. h = "lore_book_description_2";
  760. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  761. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  762. doLogEvent("ui triggered: ui_lore_book_description_2"),
  763. g = !0, d = "ui_lore_book_description_2", !0 == g && (u = subGotStrings("Clicking on the green <strong>Go</strong> button next to a chapter task will open the associated content."), y = void 0 != b && void 0 != b.y ? b.y : 162, w = void 0 != b && void 0 != b.x ? b.x : 254, z = 230, s = "#book_style", P = "true", R = "lore_book_noble"), doLogEvent("after checks=" + g);
  764. h = "lore_book_noble";
  765. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  766. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  767. doLogEvent("ui triggered: ui_lore_book_noble"),
  768. g = !0, d = "ui_lore_book_noble", !0 == g && (u = subGotStrings("<strong>Become Nobility:</strong> Accept the title of Lord or Lady and become a noble in your own right."), y = void 0 != b && void 0 != b.y ? b.y : 220, w = void 0 != b && void 0 != b.x ? b.x : 345, z = 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);
  769. h = "chapter_claimed_1_1";
  770. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  771. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  772. "").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);
  773. h = "claim_chapter_reward";
  774. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  775. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  776. doLogEvent("ui triggered: ui_claim_chapter_reward"), g = !0, d = "ui_claim_chapter_reward",
  777. doLogEvent("uiEvent: require_flag = royal_reward"), 1 != userContext.flags.royal_reward && (g = !1), !0 == g && (O = "true"), doLogEvent("after checks=" + g);
  778. h = "next_chapter_1";
  779. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  780. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  781. 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(",") :
  782. h, G = "flag_nobility_accepted"), doLogEvent("after checks=" + g);
  783. h = "holdings";
  784. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  785. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  786. 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(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) {
  787. if (activeQuest(a.quests,
  788. c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1
  789. }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("Click here to start this Quest."), y = void 0 != b && void 0 != b.y ? b.y : 94, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 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);
  790. h = "quest_results_pro_q5_the_maesters_welcome";
  791. doLogEvent("trigger_src=[" +
  792. h + "] event_name=[" + c + "]");
  793. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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", G = "enable_buildings"), doLogEvent("after checks=" + g);
  794. h = "quest_close_pro_q5_the_maesters_welcome";
  795. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  796. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  797. doLogEvent("ui triggered: ui_quest_close_pro_q5_the_maesters_welcome"),
  798. g = !0, d = "ui_quest_close_pro_q5_the_maesters_welcome", !0 == g && (G = "flag_maester_welcome"), doLogEvent("after checks=" + g);
  799. h = "refresh_toolbar, click_main_toolbar";
  800. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  801. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  802. 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 ?
  803. parseInt(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"), u = subGotStrings("Click here to open the <strong>Buildings</strong> menu."), y = void 0 != b && void 0 != b.y ? b.y : -106, w = void 0 != b && void 0 != b.x ? b.x : 44, z = 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);
  804. h = "refresh_toolbar, click_main_toolbar";
  805. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  806. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  807. 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 =
  808. Boolean("true"), u = subGotStrings("Click here to open the <strong>Buildings</strong> menu."), y = void 0 != b && void 0 != b.y ? b.y : -106, w = void 0 != b && void 0 != b.x ? b.x : 84, z = 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);
  809. h = "do_menu_select_buildings";
  810. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  811. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  812. doLogEvent("ui triggered: ui_quest_maester_holdings"),
  813. g = !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 && (u = subGotStrings('"First, a <strong>Counting House</strong>. We can do nothing without coin, and great houses live or die by it."'), y =
  814. void 0 != b && void 0 != b.y ? b.y : -138, w = void 0 != b && void 0 != b.x ? b.x : 125, z = 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);
  815. h = "building_panel_counting_house";
  816. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  817. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  818. doLogEvent("ui triggered: ui_building_panel_counting_house"), g = !0, d = "ui_building_panel_counting_house",
  819. 2 < userContext.playerData.character.level && (g = !1), !0 == isBuildingConstructed("counting_house", a) && (g = !1), !0 == g && (u = subGotStrings("The Counting House allows you to collect <strong>Silver</strong>. Silver can be used to purchase Sworn Swords, items, and building upgrades."), y = void 0 != b && void 0 != b.y ? b.y : 65, w = void 0 != b && void 0 != b.x ? b.x : 473, z = 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"),
  820. doLogEvent("after checks=" + g);
  821. h = "counting_house_tutorial_1";
  822. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  823. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  824. doLogEvent("ui triggered: ui_counting_house_tutorial_1"), g = !0, d = "ui_counting_house_tutorial_1", !0 == g && (u = subGotStrings("Click here to construct the <strong>Counting House</strong>."), y = void 0 != b && void 0 != b.y ? b.y : 70, w = void 0 != b && void 0 != b.x ? b.x : -214, z = 230, C = "top_right", s = "#upgradebtn", h = "33", A = -1 != h.indexOf(",") ?
  825. h.split(",") : h, h = "-12", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  826. h = "build_counting_house";
  827. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  828. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  829. 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 && (u = subGotStrings("You can use a <strong>speed</strong> up item to finish tasks early."), y =
  830. void 0 != b && void 0 != b.y ? b.y : -194, w = void 0 != b && void 0 != b.x ? b.x : 381, z = 230, C = "bottom", s = ".buildinginfomid", h = "-75", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "462", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_counting_house_constructed", O = "true"), doLogEvent("after checks=" + g);
  831. h = "building_panel_counting_house";
  832. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  833. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  834. doLogEvent("ui triggered: ui_building_counting_house_finished"),
  835. g = !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 && (u = subGotStrings("Your Counting House has finished construction and collected its first taxes! Click here to collect the <strong>Silver</strong>."),
  836. y = void 0 != b && void 0 != b.y ? b.y : 107, w = void 0 != b && void 0 != b.x ? b.x : -52, z = 200, C = "top", s = "#collectbtn", h = "30", A = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  837. h = "building_panel_counting_house";
  838. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  839. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  840. 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=" +
  841. (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 && (y = void 0 != b && void 0 != b.y ? b.y : -30, w = void 0 != b && void 0 != b.x ? b.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);
  842. h = "holdings";
  843. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  844. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  845. 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"),
  846. the_val = 0, void 0 != userContext.flags.silver_tip && (the_val = userContext.flags.silver_tip), 1 == the_val && (g = !1), !0 == g && (u = 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>"), y = void 0 != b && void 0 != b.y ? b.y : 100, w = void 0 != b && void 0 != b.x ? b.x : 440, z = 330, C = "top, top", s = "#topbar_alwaysShown", h = "34, 34", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "660, 480", B = -1 != h.indexOf(",") ?
  847. h.split(",") : h, G = "silver_tip", P = "true", R = "build_keep_next"), doLogEvent("after checks=" + g);
  848. h = "build_keep_next";
  849. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  850. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  851. 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", u = 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."'),
  852. y = void 0 != b && void 0 != b.y ? b.y : -138, w = void 0 != b && void 0 != b.x ? b.x : 205, z = 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);
  853. h = "constructed_keep";
  854. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  855. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  856. doLogEvent("ui triggered: ui_power_tutorial_1"), g = !0, d = "ui_power_tutorial_1", 2 < userContext.playerData.character.level &&
  857. (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 && (u = subGotStrings("Naming your Keep has given you <strong>Power!</strong> Click here to view your current Power Ranking."),
  858. y = void 0 != b && void 0 != b.y ? b.y : 125, w = void 0 != b && void 0 != b.x ? b.x : -220, z = 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);
  859. h = "holdings";
  860. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  861. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  862. doLogEvent("ui triggered: ui_power_tutorial_1_holdings"), g = !0, d = "ui_power_tutorial_1_holdings", 2 < userContext.playerData.character.level &&
  863. (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 && (u = subGotStrings("Naming your Keep has given you <strong>Power!</strong> Click here to view your current Power Ranking."),
  864. y = void 0 != b && void 0 != b.y ? b.y : 125, w = void 0 != b && void 0 != b.x ? b.x : -220, z = 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);
  865. h = "power_modal_open";
  866. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  867. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  868. doLogEvent("ui triggered: ui_power_tutorial_2"), g = !0, d = "ui_power_tutorial_2", a.stat ? (doLogEvent("watch: quests_succeeded: value=" +
  869. (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 && (u = 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."'), y = void 0 != b && void 0 != b.y ? b.y : 20, w = void 0 != b && void 0 != b.x ? b.x :
  870. 528, z = 265, s = "#powertabmenu", P = "true", R = "power_tutorial_5", T = "true", U = "maester_lucas"), doLogEvent("after checks=" + g);
  871. h = "power_tutorial_5";
  872. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  873. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  874. doLogEvent("ui triggered: ui_power_tutorial_5"), g = !0, d = "ui_power_tutorial_5", !0 == g && (u = subGotStrings("Keep your <strong>Power</strong> ranking high to unlock unique titles today and valuable rewards to come!"), y = void 0 != b && void 0 !=
  875. b.y ? b.y : 20, w = void 0 != b && void 0 != b.x ? b.x : 528, z = 214, s = "#powertabmenu", V = "true", X = "power_tutorial_6"), doLogEvent("after checks=" + g);
  876. h = "power_tutorial_6";
  877. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  878. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  879. 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(",") ?
  880. h.split(",") : h, G = "flag_power_tutorial_done"), doLogEvent("after checks=" + g);
  881. h = "close_power";
  882. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  883. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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", G = "flag_power_tutorial_done"), doLogEvent("after checks=" + g);
  884. h = "holdings";
  885. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  886. if ((c == h ||
  887. -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  888. 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(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 ==
  889. activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !1 == isBuildingConstructed("keep", a) && (g = !1), !0 == g && (u = subGotStrings("Click here to start this Quest."), y = void 0 != b && void 0 != b.y ? b.y : 94, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 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);
  890. h = "quest_results_pro_q6_the_captain_arrives";
  891. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  892. if ((c == h ||
  893. -1 != h.indexOf(",") && -1 != $.inArray(c, 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 && (G = "flag_captain_arrives"), doLogEvent("after checks=" + g);
  894. h = "quest_close_pro_q6_the_captain_arrives";
  895. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  896. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  897. doLogEvent("ui triggered: ui_quest_close_pro_q6_the_captain_arrives"),
  898. g = !0, d = "ui_quest_close_pro_q6_the_captain_arrives", !0 == g && (S = "chapters"), doLogEvent("after checks=" + g);
  899. h = "holdings";
  900. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  901. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  902. 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) ||
  903. 0 : 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 && (y = void 0 != b && void 0 != b.y ? b.y : 294, w = void 0 != b && void 0 != b.x ? b.x : 385, z = 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);
  904. h = "lorebook_animation_2_end";
  905. doLogEvent("trigger_src=[" +
  906. h + "] event_name=[" + c + "]");
  907. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  908. 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 + "") +
  909. " 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 && (u = subGotStrings("<strong>Choose Background:</strong> Gain special advantages through your character\u2019s backstory."), y = void 0 != b && void 0 != b.y ? b.y : 308, w = void 0 != b && void 0 != b.x ? b.x : 385, z = 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);
  910. h = "holdings";
  911. doLogEvent("trigger_src=[" +
  912. h + "] event_name=[" + c + "]");
  913. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  914. 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=" +
  915. (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 && (y = void 0 != b && void 0 != b.y ? b.y : 294, w = void 0 != b && void 0 != b.x ? b.x : 385, z = 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);
  916. h = "chapter_claimed_1_2";
  917. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  918. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c,
  919. h.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);
  920. h = "next_chapter_2";
  921. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  922. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  923. doLogEvent("ui triggered: ui_lore_book_ch_3_close"),
  924. g = !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);
  925. h = "holdings";
  926. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  927. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  928. 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 +
  929. "") + " 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 &&
  930. (the_val = userContext.flags.friends_selector_tutoral), 1 == the_val && (g = !1), !0 == g && (u = 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!"), y = void 0 != b && void 0 != b.y ? b.y : 68, w = void 0 != b && void 0 != b.x ? b.x : 290, z = 260, s = "#actionmenu", V = "true", X = "ui_invite_friends_step2"), doLogEvent("after checks=" + g);
  931. h = "ui_invite_friends_step2";
  932. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  933. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c,
  934. h.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", G = "friends_selector_tutoral"), doLogEvent("after checks=" + g);
  935. h = "send_friend_invites_modal";
  936. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  937. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  938. doLogEvent("ui triggered: ui_invite_friends_step3"), g = !0, d = "ui_invite_friends_step3",
  939. doLogEvent("uiEvent: require_flag = friends_selector_tutoral"), 1 != userContext.flags.friends_selector_tutoral && (g = !1), !0 == g && (u = subGotStrings("Invite friends to play Game of Thrones Ascent by checking the box next to their name."), w = void 0 != b && void 0 != b.x ? b.x : 13, z = 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);
  940. h = "toggle_friend_checked";
  941. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  942. c + "]");
  943. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  944. 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 && (u = subGotStrings("Once you are finished, click here to send invitations to the selected friends."), y = void 0 != b && void 0 != b.y ? b.y : 129, w = void 0 != b && void 0 != b.x ? b.x : 278, z = 200, C = "bottom_left", s = ".friendlistwrap.friendlistright",
  945. h = "245", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "222", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "toggle_friend_checked"), doLogEvent("after checks=" + g);
  946. h = "send_friend_invitations";
  947. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  948. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g) doLogEvent("ui triggered: ui_invite_friends_step5"), g = !0, d = "ui_invite_friends_step5", !0 == g && (G = "friend_invites_sent"), doLogEvent("after checks=" + g);
  949. h = "send_friend_invites_modal_closed";
  950. doLogEvent("trigger_src=[" +
  951. h + "] event_name=[" + c + "]");
  952. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  953. 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 + "") +
  954. " 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", G = "friends_selector_tutoral_done"), doLogEvent("after checks=" + g);
  955. h = "send_friend_invites_modal_closed";
  956. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  957. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) &&
  958. !0 != g)
  959. 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) ||
  960. 0 : 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", u = 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."), y = void 0 != b && void 0 != b.y ? b.y : 68, w = void 0 != b && void 0 != b.x ? b.x : 290, z = 224, s = "#actionmenu", G = "friends_selector_tutoral_done",
  961. V = "true"), doLogEvent("after checks=" + g);
  962. h = "holdings";
  963. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  964. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  965. 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]",
  966. K = h.replace("[", "").replace("]", ""), doLogEvent("quest_active: " + h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("Click here to start this Quest."), z = 185, C = "left", h = "88", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "243", B = -1 != h.indexOf(",") ? h.split(",") :
  967. h), doLogEvent("after checks=" + g);
  968. 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";
  969. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  970. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  971. doLogEvent("ui triggered: ui_quest_close_first_impressions"),
  972. g = !0, d = "ui_quest_close_first_impressions", !0 == g && (G = "ss_npc_recruit_tutorial"), doLogEvent("after checks=" + g);
  973. h = "holdings";
  974. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  975. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  976. 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 ?
  977. parseInt(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", u = subGotStrings('"Enough parchment and scaffolding! Let\u2019s start building you an <strong>army</strong>, @address."'), y = void 0 != b && void 0 != b.y ? b.y : -138, w = void 0 != b && void 0 != b.x ? b.x : 200, z = 330,
  978. 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 = "ser_hugo"), doLogEvent("after checks=" + g);
  979. h = "ss_status_open";
  980. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  981. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  982. 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 +
  983. "") + " 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 && (u = subGotStrings("Click here to <strong>view</strong> Sworn Swords available to recruit."),
  984. y = void 0 != b && void 0 != b.y ? b.y : 10, w = void 0 != b && void 0 != b.x ? b.x : 253, z = 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);
  985. h = "ss_status_recruit_open";
  986. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  987. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  988. doLogEvent("ui triggered: ui_ss_recruit_hire"), g = !0, d = "ui_ss_recruit_hire", a.stat ? (doLogEvent("watch: num_purchase_sworn_sword: value=" +
  989. (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", u = subGotStrings("Click here to <strong>recruit</strong> this Sworn Sword into your service."), y = void 0 != b && void 0 != b.y ? b.y : 278, w = void 0 != b && void 0 != b.x ? b.x : 289, z = 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=" +
  990. g);
  991. h = "purchase_sworn_sword_0_2";
  992. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  993. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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", G = "ss_npc_recruited"), doLogEvent("after checks=" + g);
  994. h = "display_sworn_swords, holdings";
  995. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  996. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) &&
  997. !0 != g)
  998. 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) ||
  999. 0 : 0, "0" != the_val + "" && (g = !1)) : g = !1, ca = !1, !0 == g && (S = "refresh_sworn_swords", u = subGotStrings('"Hmph. A little green, this one. Let\u2019s get her in the field and see what she can do."'), w = void 0 != b && void 0 != b.x ? b.x : -372, z = 270, C = "right", s = ".ssactivityside", h = "20", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "-78", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_sworn_sword_purchased", T = "true", U = "ser_hugo"), doLogEvent("after checks=" + g);
  1000. h = "ss_status_open";
  1001. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1002. if ((c ==
  1003. h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1004. 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=" +
  1005. (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 && (u = subGotStrings("Your Sworn Sword will gain <strong>Ranks</strong> with every quest, Adventure and Player to Player action they complete successfully."),
  1006. y = void 0 != b && void 0 != b.y ? b.y : 46, w = void 0 != b && void 0 != b.x ? b.x : 250, z = 200, C = "left", s = ".ssactivityboxtop", h = "-26", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "342", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_adventuring_tutorial", P = O = "true", R = "ss_status_tutorial_3"), doLogEvent("after checks=" + g);
  1007. h = "ss_status_tutorial_3";
  1008. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1009. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1010. doLogEvent("ui triggered: ui_ss_status_tutorial_3"),
  1011. g = !0, d = "ui_ss_status_tutorial_3", !0 == g && (u = 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..."'), y = void 0 != b && void 0 != b.y ? b.y : 96, w = void 0 != b && void 0 != b.x ? b.x : 122, z = 280, s = ".ssactivityboxtop", P = "true", R = "ss_status_tutorial_4", T = "true", U = "ser_hugo"), doLogEvent("after checks=" + g);
  1012. h = "ss_status_tutorial_4";
  1013. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1014. if ((c == h || -1 != h.indexOf(",") &&
  1015. -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1016. doLogEvent("ui triggered: ui_ss_status_tutorial_4"), g = !0, d = "ui_ss_status_tutorial_4", !0 == g && (u = 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."), y = void 0 != b && void 0 != b.y ? b.y : 75, w = void 0 != b && void 0 != b.x ? b.x : 2, z = 250, C = "bottom, bottom, bottom", s = ".ssactivityboxtop", h = "214, 214, 214", A = -1 != h.indexOf(",") ? h.split(",") : h, h =
  1017. "14, 93, 172", B = -1 != h.indexOf(",") ? h.split(",") : h, P = "true", R = "ss_status_tutorial_7"), doLogEvent("after checks=" + g);
  1018. h = "ss_status_tutorial_7, ss_status_open";
  1019. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1020. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1021. 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 ?
  1022. parseInt(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 && (u = 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."), y = void 0 != b && void 0 !=
  1023. b.y ? b.y : 100, w = void 0 != b && void 0 != b.x ? b.x : -100, z = 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);
  1024. h = "ss_status_tutorial_7";
  1025. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1026. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1027. doLogEvent("ui triggered: ui_ss_status_tutorial_7"), g = !0, d = "ui_ss_status_tutorial_7", 3 < userContext.playerData.character.level && (g =
  1028. !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)) :
  1029. g = !1, !0 == g && (u = subGotStrings("Now that you have equipped your Sworn Sword with Gear, click here to send her on an <strong>Adventure</strong>."), y = void 0 != b && void 0 != b.y ? b.y : 175, w = void 0 != b && void 0 != b.x ? b.x : 200, z = 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);
  1030. h = "adventure_dialog_open";
  1031. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1032. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1033. "").split(","))) && !0 != g)
  1034. 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 && (u = subGotStrings("<strong>Adventures</strong> are arranged based on difficulty. Click here to select your <strong>Adventure</strong>."),
  1035. y = void 0 != b && void 0 != b.y ? b.y : 170, w = void 0 != b && void 0 != b.x ? b.x : 239, z = 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);
  1036. h = "start_adventure_open, ss_choose_item_sworn_sword_0_2";
  1037. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1038. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1039. doLogEvent("ui triggered: ui_ss_action_tutorial_1"), g = !0, d = "ui_ss_action_tutorial_1", 4 < userContext.playerData.character.level &&
  1040. (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 && (u = 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."), y = void 0 != b && void 0 != b.y ? b.y : 145, w = void 0 != b && void 0 != b.x ? b.x : 240, z = 222,
  1041. C = "top_left", s = ".actionselectbox", h = "136", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "170", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_equipping_ss", O = "true"), doLogEvent("after checks=" + g);
  1042. h = "ss_action_tutorial_4";
  1043. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1044. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1045. 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 &&
  1046. (g = !1), !0 == g && (u = subGotStrings("When you are finished equipping your Sworn Sword, click here to return to the <strong>Adventure</strong> screen."), y = void 0 != b && void 0 != b.y ? b.y : 15, w = void 0 != b && void 0 != b.x ? b.x : 175, z = 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);
  1047. h = "pvp_select_action";
  1048. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1049. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1050. "").split(","))) && !0 != g)
  1051. 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 && (u = subGotStrings("Click here to send your Sworn Sword <strong>Adventuring</strong>."), y = void 0 != b && void 0 != b.y ? b.y : 320, w = void 0 != b && void 0 != b.x ? b.x : 455, z = 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=" +
  1052. g);
  1053. h = "open_progress";
  1054. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1055. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1056. 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)) :
  1057. g = !1, doLogEvent("after checks=" + g);
  1058. h = "display_sworn_swords, ss_status_open";
  1059. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1060. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1061. 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) ||
  1062. 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 = 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);
  1063. h = "close_modal_dialogs_top";
  1064. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1065. c + "]");
  1066. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1067. 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 =
  1068. 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 && (S = "chapters"), doLogEvent("after checks=" + g);
  1069. h = "lorebook_animation_3_end";
  1070. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1071. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1072. 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 +
  1073. "") + " 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 && (u = subGotStrings("<strong>Swear Fealty:</strong> Declare your allegiance to one of the Great Houses of Westeros."), y = void 0 != b && void 0 != b.y ? b.y : 351, w = void 0 != b && void 0 != b.x ? b.x : 388, z = 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);
  1074. h = "holdings";
  1075. doLogEvent("trigger_src=[" +
  1076. h + "] event_name=[" + c + "]");
  1077. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1078. 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=" +
  1079. (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 && (y = void 0 != b && void 0 != b.y ? b.y : 294, w = void 0 != b && void 0 != b.x ? b.x : 385, z = 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);
  1080. h = "chose_fealty";
  1081. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1082. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1083. "").split(","))) && !0 != g) doLogEvent("ui triggered: ui_chose_fealty"), g = !0, d = "ui_chose_fealty", doLogEvent("after checks=" + g);
  1084. h = "chapter_claimed_1_3";
  1085. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1086. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1087. 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 ?
  1088. parseInt(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);
  1089. h = "next_chapter_3";
  1090. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1091. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1092. 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 =
  1093. "-68", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "661", B = -1 != h.indexOf(",") ? h.split(",") : h, O = "true"), doLogEvent("after checks=" + g);
  1094. h = "holdings";
  1095. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1096. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1097. 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]",
  1098. K = h.replace("[", "").replace("]", ""), doLogEvent("quest_active: " + h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (u = subGotStrings("Click here to start this Quest."), y = void 0 != b && void 0 != b.y ? b.y : 94, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 185, C = "left", s = "#actionmenu",
  1099. h = "88", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "243", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1100. h = "holdings";
  1101. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1102. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1103. 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 ?
  1104. parseInt(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 ==
  1105. isBuildingConstructed("smithy", a) && (g = !1), !0 == g && (u = 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."'), y = void 0 != b && void 0 != b.y ? b.y : -29, w = void 0 != b && void 0 != b.x ? b.x : -372, z = 270, C = "right", s = ".ssactivityside", h = "20", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "-78", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_train_ss", T = "true", U = "ser_hugo"), doLogEvent("after checks=" + g);
  1106. h = "ss_status_open";
  1107. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1108. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1109. 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=" +
  1110. (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 && (u = subGotStrings("Click here to <strong>train</strong> your Sworn Sword."), y = void 0 != b && void 0 != b.y ? b.y : 161, w = void 0 != b && void 0 != b.x ? b.x : 386, z = 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);
  1111. h = "ss_level_up";
  1112. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1113. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1114. 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 && (u = subGotStrings("Select the skill you want your Sworn Sword to <strong>train</strong> in."), y = void 0 != b && void 0 != b.y ? b.y : 140, w = void 0 != b && void 0 != b.x ? b.x : 475, z = 230, s = ".alertcontents.rankselect",
  1115. G = "flag_train_ss_modal"), doLogEvent("after checks=" + g);
  1116. h = "ss_status_open";
  1117. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1118. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1119. 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) ||
  1120. 0 : 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, G = "flag_ss_trained", O = "true"), doLogEvent("after checks=" + g);
  1121. h = "holdings";
  1122. doLogEvent("trigger_src=[" +
  1123. h + "] event_name=[" + c + "]");
  1124. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1125. 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 &&
  1126. (S = "buildings"), doLogEvent("after checks=" + g);
  1127. h = "holdings, do_menu_select_buildings";
  1128. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1129. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1130. 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) ||
  1131. 0 : 0, "1" != the_val + "" && (g = !1)) : g = !1, !0 == isBuildingConstructing("smithy", a) && (g = !1), !0 == isBuildingConstructed("smithy", a) && (g = !1), !0 == g && (u = subGotStrings('"Every noble appreciates a good blade. Let\u2019s construct a <strong>Smithy</strong> and forge a gift for the @fealty_plural."'), y = void 0 != b && void 0 != b.y ? b.y : -211, w = void 0 != b && void 0 != b.x ? b.x : 122, z = 270, C = "bottom", s = "#buildingmenubox", h = "-75", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "180", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_ss_build_smithy", T =
  1132. "true", U = "ser_hugo"), doLogEvent("after checks=" + g);
  1133. h = "building_panel_smithy";
  1134. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1135. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1136. 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 ==
  1137. g && (u = subGotStrings("Click here to construct the <strong>Smithy</strong>."), y = void 0 != b && void 0 != b.y ? b.y : 197, w = void 0 != b && void 0 != b.x ? b.x : 488, z = 180, C = "top", s = ".buildinginfotop", h = "133", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "540", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1138. h = "holdings";
  1139. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1140. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1141. doLogEvent("ui triggered: ui_ss_train_tutorial_4_backtrack"),
  1142. g = !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", u = subGotStrings('"What good is an idle Smithy? Let\'s get them busy on that <strong>Decorative Blade</strong>!"'),
  1143. y = void 0 != b && void 0 != b.y ? b.y : -211, w = void 0 != b && void 0 != b.x ? b.x : 122, z = 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);
  1144. h = "start_production";
  1145. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1146. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1147. doLogEvent("ui triggered: ui_ss_train_tutorial_4b"), g = !0, d = "ui_ss_train_tutorial_4b", a.stat ? (doLogEvent("watch: num_trained: value=" +
  1148. (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);
  1149. h = "building_panel_smithy";
  1150. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1151. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1152. doLogEvent("ui triggered: ui_ss_train_tutorial_5"), g = !0, d = "ui_ss_train_tutorial_5", 3 < userContext.playerData.character.level &&
  1153. (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",
  1154. a) && (g = !1), !0 == g && (u = subGotStrings("Click here to instruct the Smithy to <strong>produce</strong> an item."), y = void 0 != b && void 0 != b.y ? b.y : 100, w = void 0 != b && void 0 != b.x ? b.x : -30, z = 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);
  1155. h = "construct";
  1156. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1157. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1158. doLogEvent("ui triggered: ui_ss_train_tutorial_6"),
  1159. g = !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 =
  1160. !1, !0 == isBuildingConstructed("smithy", a) && (g = !1), doLogEvent("after checks=" + g);
  1161. h = "building_production_tab_smithy";
  1162. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1163. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1164. 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) ||
  1165. 0 : 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 && (u = subGotStrings("Buildings like the Smithy are used to produce <strong>items</strong> that can boost your skills or your Sworn Sword's once equipped."), y = void 0 != b && void 0 != b.y ? b.y : 162, w = void 0 != b && void 0 != b.x ? b.x : 241,
  1166. z = 231, s = ".production", G = "flag_smithy_produce", P = "true", R = "next_ui_ss_train_tutorial_8"), doLogEvent("after checks=" + g);
  1167. h = "next_ui_ss_train_tutorial_8";
  1168. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1169. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1170. 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 +
  1171. "") + " 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 && (u = subGotStrings("Nearly every item takes <strong>time</strong>, <strong>silver</strong>, and <strong>raw materials</strong> to create. "), y = void 0 != b && void 0 != b.y ? b.y : -21, w = void 0 != b && void 0 != b.x ? b.x : 323, z = 231, C = "left", s = ".production", h = "34", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "238", B = -1 != h.indexOf(",") ?
  1172. h.split(",") : h, P = "true", R = "next_ui_ss_train_tutorial_9"), doLogEvent("after checks=" + g);
  1173. h = "next_ui_ss_train_tutorial_9";
  1174. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1175. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1176. 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"),
  1177. 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 && (u = subGotStrings("Click on an item to select it for <strong>production</strong>, and for material and stat details on that item."), y = void 0 != b && void 0 != b.y ? b.y : 180, w = void 0 != b && void 0 != b.x ? b.x : 40, z = 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"),
  1178. doLogEvent("after checks=" + g);
  1179. h = "next_ui_ss_train_tutorial_10";
  1180. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1181. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1182. 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) ||
  1183. 0 : 0, "0" != the_val + "" && (g = !1)) : g = !1, !1 == isBuildingConstructed("smithy", a) && (g = !1), !0 == g && (u = subGotStrings("You have all the materials necessary for the <strong>Decorative Blade</strong>. Click here to produce the item."), y = void 0 != b && void 0 != b.y ? b.y : 409, w = void 0 != b && void 0 != b.x ? b.x : 237, z = 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);
  1184. h = "production_completed";
  1185. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1186. c + "]");
  1187. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1188. 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 &&
  1189. (u = subGotStrings("The Decorative Blade is ready. Click here to <strong>collect</strong> it."), y = void 0 != b && void 0 != b.y ? b.y : 83, w = void 0 != b && void 0 != b.x ? b.x : 615, z = 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);
  1190. h = "do_finish_production";
  1191. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1192. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1193. doLogEvent("ui triggered: ui_ss_train_tutorial_12_flag"),
  1194. g = !0, d = "ui_ss_train_tutorial_12_flag", !0 == g && (G = "decorative_blade_produced"), doLogEvent("after checks=" + g);
  1195. h = "building_production_tab_smithy";
  1196. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1197. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1198. 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 ?
  1199. parseInt(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 =
  1200. -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1201. h = "holdings";
  1202. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1203. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1204. 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 ?
  1205. parseInt(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", u = subGotStrings("The Smithy has finished the <strong>Decorative Blade</strong>, @address. Let's have a look."),
  1206. y = void 0 != b && void 0 != b.y ? b.y : -211, w = void 0 != b && void 0 != b.x ? b.x : 122, z = 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);
  1207. h = "start_production";
  1208. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1209. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1210. doLogEvent("ui triggered: ui_ss_train_tutorial_13"), g = !0, d = "ui_ss_train_tutorial_13", a.stat ? (doLogEvent("watch: num_shop_purchases: value=" +
  1211. (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 && (G = "flag_show_production_item"), doLogEvent("after checks=" + g);
  1212. h = "building_panel_smithy";
  1213. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1214. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1215. doLogEvent("ui triggered: ui_ss_train_maester_lucas_pre"),
  1216. g = !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" !=
  1217. 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", 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=" +
  1218. g);
  1219. h = "holdings";
  1220. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1221. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1222. 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 ?
  1223. (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",
  1224. a) && (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", u = subGotStrings('"All nobles are impressed by coin. Let us <strong>upgrade</strong> your Counting House to increase tax revenue."'), y = void 0 != b && void 0 != b.y ? b.y : -202,
  1225. w = void 0 != b && void 0 != b.x ? b.x : -6, z = 280, C = "bottom", s = "#buildingmenubox", h = "-75", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "9", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_upgrade_counting_house", T = O = "true", U = "maester_lucas"), doLogEvent("after checks=" + g);
  1226. h = "building_panel_counting_house";
  1227. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1228. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1229. doLogEvent("ui triggered: ui_counting_house_upgrade_tutorial_1"), g = !0, d = "ui_counting_house_upgrade_tutorial_1",
  1230. 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: 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,
  1231. a.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 && (u = 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>."), y = void 0 != b && void 0 != b.y ? b.y :
  1232. 90, w = void 0 != b && void 0 != b.x ? b.x : 121, z = 300, s = ".upgradeinfobg", G = "flag_upgrade_counting_house_start", P = "true", R = "counting_house_upgrade_tutorial_2"), doLogEvent("after checks=" + g);
  1233. h = "counting_house_upgrade_tutorial_2";
  1234. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1235. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1236. 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=" +
  1237. (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 && (u = subGotStrings('"We will need a cut of raw <strong>Stone</strong> for this upgrade. We do not currently have any in our warehouses."'), y = void 0 != b && void 0 != b.y ? b.y : 110, w = void 0 != b && void 0 != b.x ? b.x : 194, z = 277,
  1238. C = "left", s = ".upgradeinfobg", h = "159", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "100", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "ready_for_village_center", P = "true", R = "counting_house_upgrade_tutorial_3", T = "true", U = "maester_lucas"), doLogEvent("after checks=" + g);
  1239. h = "close_building_panel";
  1240. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1241. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1242. doLogEvent("ui triggered: ui_counting_house_close_building_panel"), g = !0, d = "ui_counting_house_close_building_panel",
  1243. doLogEvent("uiEvent: require_flag = flag_upgrade_counting_house_start"), 1 != userContext.flags.flag_upgrade_counting_house_start && (g = !1), !0 == g && (G = "flag_counting_house_upgrade_closed"), doLogEvent("after checks=" + g);
  1244. h = "counting_house_upgrade_tutorial_3";
  1245. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1246. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1247. 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"),
  1248. 1 != userContext.flags.flag_upgrade_counting_house_start && (g = !1), !0 == g && (y = void 0 != b && void 0 != b.y ? b.y : -30, w = void 0 != b && void 0 != b.x ? b.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);
  1249. h = "holdings";
  1250. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1251. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1252. doLogEvent("ui triggered: ui_counting_house_upgrade_maester_lucas"),
  1253. g = !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) ||
  1254. 0 : 0, "1" != the_val + "" && (g = !1)) : g = !1, !0 == g && (S = "buildings", u = subGotStrings('"Now that we have Stone, we may now begin the <strong>upgrade</strong> to your Counting House."'), y = void 0 != b && void 0 != b.y ? b.y : -210, w = void 0 != b && void 0 != b.x ? b.x : -26, z = 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);
  1255. h = "holdings,construction_complete_counting_house";
  1256. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1257. c + "]");
  1258. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1259. 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)) :
  1260. g = !1, !1 == isBuildingDone("counting_house") && (g = !1), !0 == g && (S = "buildings", u = subGotStrings('"The upgrade to your Counting House is ready for your review, @address. We only need your approval to <strong>finish</strong> it."'), y = void 0 != b && void 0 != b.y ? b.y : -210, w = void 0 != b && void 0 != b.x ? b.x : -26, z = 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);
  1261. h = "building_panel_counting_house";
  1262. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1263. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1264. 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) ||
  1265. 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) || 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 && (u = subGotStrings("Click here to construct the <strong>Stacks of Coins</strong> upgrade."),
  1266. y = void 0 != b && void 0 != b.y ? b.y : 34, w = void 0 != b && void 0 != b.x ? b.x : 159, z = 220, C = "left", s = "#addbtn_container", h = "39", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "81", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_counting_house_upgrading", O = "true"), doLogEvent("after checks=" + g);
  1267. h = "building_panel_counting_house";
  1268. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1269. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1270. doLogEvent("ui triggered: ui_counting_house_upgrade_tutorial_5"), g =
  1271. !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 ?
  1272. parseInt(a.stat.building_upgrades_finished) || 0 : 0, "0" != the_val + "" && (g = !1)) : g = !1, !1 == isBuildingDone("counting_house") && (g = !1), !0 == g && (u = subGotStrings("The Stacks of Coins upgrade is ready. Click here to <strong>finish</strong> it."), y = void 0 != b && void 0 != b.y ? b.y : 162, w = void 0 != b && void 0 != b.x ? b.x : 514, z = 224, C = "top", s = ".buildinginfotop", h = "91", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "593", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_counting_house_upgraded", O = "true"), doLogEvent("after checks=" + g);
  1273. h = "building_panel_counting_house";
  1274. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1275. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1276. 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) ||
  1277. 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, !0 == g && (y = void 0 != b && void 0 != b.y ? b.y : -30, w = void 0 != b && void 0 != b.x ? b.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=" +
  1278. g);
  1279. h = "close_building_panel_counting_house";
  1280. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1281. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1282. 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 ?
  1283. 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=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);
  1284. h = "holdings";
  1285. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1286. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) &&
  1287. !0 != g)
  1288. 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 ?
  1289. parseInt(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", u = subGotStrings('"If we construct a <strong>Village Center</strong>, we can produce Stone, among other resources."'), y = void 0 != b && void 0 !=
  1290. b.y ? b.y : -209, w = void 0 != b && void 0 != b.x ? b.x : 202, z = 270, C = "bottom", s = "#buildingmenubox", h = "-75", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "265", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_village_center_tutorial", T = "true", U = "maester_lucas"), doLogEvent("after checks=" + g);
  1291. h = "holdings";
  1292. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1293. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1294. doLogEvent("ui triggered: ui_building_panel_village_center_backtrack"), g = !0, d = "ui_building_panel_village_center_backtrack",
  1295. 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 ? parseInt(a.stat.num_shop_items_started) || 0 : 0, "1" != the_val + "" && (g = !1)) : g = !1, !1 == isBuildingConstructed("village_center",
  1296. a) && (g = !1), !0 == g && (S = "buildings", u = subGotStrings('"Your smallfolk sit idle, @address. Let us instruct them to produce <strong>Stone</strong> at the Village Center."'), y = void 0 != b && void 0 != b.y ? b.y : -209, w = void 0 != b && void 0 != b.x ? b.x : 202, z = 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);
  1297. h = "building_panel_village_center";
  1298. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1299. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1300. 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 +
  1301. "") + " 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);
  1302. h = "building_panel_village_center";
  1303. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1304. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1305. "").split(","))) && !0 != g)
  1306. 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 ?
  1307. parseInt(a.stat.num_shop_items_started) || 0 : 0, "2" != the_val + "" && (g = !1)) : g = !1, doLogEvent("after checks=" + g);
  1308. h = "building_panel_village_center";
  1309. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1310. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1311. 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=" +
  1312. (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 && (u = subGotStrings("Click here to instruct the Village Center to <strong>produce</strong> a resource."),
  1313. y = void 0 != b && void 0 != b.y ? b.y : 110, w = void 0 != b && void 0 != b.x ? b.x : -48, z = 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);
  1314. h = "stone_production_item_selected";
  1315. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1316. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1317. doLogEvent("ui triggered: ui_village_center_build_maester_tutorial_3"), g = !0, d = "ui_village_center_build_maester_tutorial_3",
  1318. 4 < 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 && (u = subGotStrings("Click here to produce <strong>Stone</strong>."),
  1319. y = void 0 != b && void 0 != b.y ? b.y : -11, w = void 0 != b && void 0 != b.x ? b.x : -200, z = 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);
  1320. h = "start_production";
  1321. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1322. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1323. 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"),
  1324. 1 != userContext.flags.flag_village_center_tutorial && (g = !1), !0 == g && (G = "flag_show_production_item", O = "true"), doLogEvent("after checks=" + g);
  1325. h = "constructed_village_center,holdings";
  1326. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1327. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1328. 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=" +
  1329. (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", u = subGotStrings('"The <strong>Stone</strong> you requested has been produced in the Village Center, @address."'),
  1330. y = void 0 != b && void 0 != b.y ? b.y : -212, w = void 0 != b && void 0 != b.x ? b.x : 188, z = 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);
  1331. h = "building_panel_village_center";
  1332. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1333. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1334. doLogEvent("ui triggered: ui_village_center_build_maester_tutorial_4"), g = !0, d =
  1335. "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,
  1336. "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 && (u = subGotStrings("Click here to <strong>collect</strong> the Stone."), y = void 0 != b && void 0 != b.y ? b.y : 102, w = void 0 != b && void 0 != b.x ? b.x : -40, z = 170, C = "top", s = "#collectbtn", h = "34", A = -1 !=
  1337. h.indexOf(",") ? h.split(",") : h, h = "9", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1338. h = "building_panel_village_center";
  1339. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1340. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1341. 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=" +
  1342. (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 && (G = "flag_village_center_tutorial_colleccted"), doLogEvent("after checks=" +
  1343. g);
  1344. h = "do_finish_production";
  1345. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1346. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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 && (G = "flag_village_center_tutorial_colleccted", O = "true"), doLogEvent("after checks=" + g);
  1347. h = "holdings";
  1348. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1349. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1350. "").split(","))) && !0 != g)
  1351. 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(",") ?
  1352. (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (g = !1)) : !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1), !0 == g && (Q = Boolean("true"), u = subGotStrings('"@ftpe_fealty_guest has arrived, @address. Let us greet our guest properly."'), y = void 0 != b && void 0 != b.y ? b.y : 52, w = void 0 != b && void 0 != b.x ? b.x : 320, z = 320, C = "left", s = "#actionmenu", h = "88", A = -1 != h.indexOf(",") ?
  1353. h.split(",") : h, h = "243", B = -1 != h.indexOf(",") ? h.split(",") : h, T = "true", U = "maester_lucas"), doLogEvent("after checks=" + g);
  1354. 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";
  1355. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1356. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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);
  1357. h = "holdings, refresh_toolbar";
  1358. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1359. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1360. doLogEvent("ui triggered: ui_lore_book_banner_hud"), g =
  1361. !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,
  1362. !0 == g && (y = void 0 != b && void 0 != b.y ? b.y : 294, w = void 0 != b && void 0 != b.x ? b.x : 385, z = 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);
  1363. h = "lorebook_animation_4_end";
  1364. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1365. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1366. doLogEvent("ui triggered: ui_lore_book_banner"), g = !0, d = "ui_lore_book_banner", !0 == g && (u = subGotStrings("<strong>Design Banner:</strong> Create a Banner to fly over your house and alongside House @fealty's."),
  1367. y = void 0 != b && void 0 != b.y ? b.y : 452, w = void 0 != b && void 0 != b.x ? b.x : 395, z = 289, C = "top", s = "#book_style", h = "380", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "468", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_banner_designer_tutorial"), doLogEvent("after checks=" + g);
  1368. h = "chapter_claimed_1_4";
  1369. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1370. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1371. doLogEvent("ui triggered: ui_lore_book_banner_claimed"), g = !0, d = "ui_lore_book_banner_claimed",
  1372. !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);
  1373. h = "next_chapter_4";
  1374. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1375. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1376. 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(",") ?
  1377. h.split(",") : h), doLogEvent("after checks=" + g);
  1378. h = "holdings";
  1379. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1380. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1381. 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",
  1382. K = h.replace("[", "").replace("]", ""), doLogEvent("quest_active: " + h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (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"),
  1383. the_val = 0, void 0 != userContext.flags.multi_quests_info && (the_val = userContext.flags.multi_quests_info), 1 == the_val && (g = !1), !0 == g && (u = subGotStrings("When <strong>Multiple Quests</strong> are active, you may play them in any order."), y = void 0 != b && void 0 != b.y ? b.y : 118, w = void 0 != b && void 0 != b.x ? b.x : 316, z = 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=" +
  1384. g);
  1385. h = "holdings";
  1386. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1387. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1388. 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",
  1389. K = h.replace("[", "").replace("]", ""), doLogEvent("quest_active: " + h), -1 != h.indexOf(",") ? (E = /\[.*\]/.test(h), L = !E, $.each(K.split(","), function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1 }), L || (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"),
  1390. the_val = 0, void 0 != userContext.flags.multi_quests_info && (the_val = userContext.flags.multi_quests_info), 1 == the_val && (g = !1), !0 == g && (u = subGotStrings("Sometimes, you will receive <strong>multiple</strong> Quests. You may start and finish these Quests in any order."), y = void 0 != b && void 0 != b.y ? b.y : 85, w = void 0 != b && void 0 != b.x ? b.x : 316, z = 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=" +
  1391. g);
  1392. h = "multi_quests_info_close";
  1393. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1394. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1395. 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 && (G = "multi_quests_info"), doLogEvent("after checks=" +
  1396. g);
  1397. h = "banner";
  1398. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1399. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1400. 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 && (u = subGotStrings("Use the controls here to <strong>customize</strong> your banner shape, pattern, colors and sigils."),
  1401. w = void 0 != b && void 0 != b.x ? b.x : -216, z = 173, s = "#banneroptions", P = "true", R = "banner_designer_tutorial_1"), doLogEvent("after checks=" + g);
  1402. h = "banner_designer_tutorial_1";
  1403. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1404. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1405. doLogEvent("ui triggered: ui_banner_designer_tutorial_2"), g = !0, d = "ui_banner_designer_tutorial_2", !0 == g && (u = subGotStrings("You may also click <strong>Random</strong> as many times as you like to see random combinations."),
  1406. y = void 0 != b && void 0 != b.y ? b.y : 389, w = void 0 != b && void 0 != b.x ? b.x : 470, z = 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);
  1407. h = "banner_designer_tutorial_2";
  1408. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1409. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1410. doLogEvent("ui triggered: ui_banner_designer_tutorial_3"), g = !0, d = "ui_banner_designer_tutorial_3",
  1411. !0 == g && (u = subGotStrings("Click here to <strong>save</strong> your Banner when you are finished. You may edit your Banner again at any time."), M = 7500, y = void 0 != b && void 0 != b.y ? b.y : 463, w = void 0 != b && void 0 != b.x ? b.x : 574, z = 155, C = "right", s = "#bannerholder", h = "533", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "748", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_banner_designer_tutorial_done", O = "true", aa = !0), doLogEvent("after checks=" + g);
  1412. h = "quest_boss_accept_q1_boss_blood_for_medicine";
  1413. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1414. c + "]");
  1415. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, 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, G = "flag_boss_battle_tutorial_started"), doLogEvent("after checks=" + g);
  1416. h = "quest_choose_ss_q1_boss_blood_for_medicine";
  1417. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1418. if ((c == h || -1 != h.indexOf(",") &&
  1419. -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1420. 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 && (u = subGotStrings("Click here to assign a Sworn Sword to this <strong>Challenge</strong>."), y = void 0 != b && void 0 != b.y ? b.y : 290, w = void 0 != b && void 0 != b.x ? b.x : 33, z = 199, C = "bottom_right",
  1421. s = ".darkroundedbox.miniviewmenu", h = "362", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "192", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1422. h = "warparty_close";
  1423. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1424. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1425. 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 && (u = subGotStrings("Many Challenge quests have multiple <strong>stages</strong>. You will select Actions for each stage."),
  1426. y = void 0 != b && void 0 != b.y ? b.y : -15, w = void 0 != b && void 0 != b.x ? b.x : 75, z = 240, C = "left", s = ".eventprogbar", h = "-23", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "13", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_boss_battle_tutorial_action", P = O = "true", R = "boss_battle_tutorial_8"), doLogEvent("after checks=" + g);
  1427. h = "boss_battle_tutorial_7";
  1428. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1429. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1430. doLogEvent("ui triggered: ui_boss_battle_tutorial_7"),
  1431. g = !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 && (u = subGotStrings("Select an <strong>Action</strong> for your Sworn Sword to perform."), y = void 0 != b && void 0 != b.y ? b.y : -8, w = void 0 != b && void 0 != b.x ? b.x : 102, z = 200, s = "#bossoptions", V = "true"), doLogEvent("after checks=" + g);
  1432. h = "boss_battle_tutorial_8";
  1433. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1434. c + "]");
  1435. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1436. 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 && (u = 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.."),
  1437. y = void 0 != b && void 0 != b.y ? b.y : -7, w = void 0 != b && void 0 != b.x ? b.x : 5, z = 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);
  1438. h = "quest_close_q1_meet_the_bailiff, quest_close_q5_an_abrupt_end, quest_close_q1_boss_blood_for_medicine";
  1439. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1440. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1441. doLogEvent("ui triggered: ui_pt5_end_lorebook"),
  1442. g = !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 +
  1443. "" && (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),
  1444. !0 == g && (S = "chapters"), doLogEvent("after checks=" + g);
  1445. h = "holdings";
  1446. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1447. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1448. 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) ||
  1449. 0 : 0, "1" != the_val + "" && (g = !1)) : g = !1, !0 == g && (y = void 0 != b && void 0 != b.y ? b.y : 294, w = void 0 != b && void 0 != b.x ? b.x : 385, z = 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);
  1450. h = "quest_reward_alignment_mouseover_realm";
  1451. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1452. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1453. doLogEvent("ui triggered: quest_alignment_realm"), g = !0, d =
  1454. "quest_alignment_realm", !0 == g && (Q = Boolean("true"), u = subGotStrings("Choosing this response will give you <strong>Realm</strong> points. Realm means to serve Westeros above all else."), N = 300, y = void 0 != b && void 0 != b.y ? b.y : -95, w = void 0 != b && void 0 != b.x ? b.x : 334, z = 270, s = "#questbtminfo", Y = !0, Z = "icons/alignment-realm-lg.png", aa = !0), doLogEvent("after checks=" + g);
  1455. h = "quest_reward_alignment_mouseover_family";
  1456. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1457. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1458. "").split(","))) && !0 != g) doLogEvent("ui triggered: quest_alignment_family"), g = !0, d = "quest_alignment_family", !0 == g && (Q = Boolean("true"), u = subGotStrings("Choosing this response will give you <strong>Family</strong> points. Family means to consider your loved ones first."), N = 300, y = void 0 != b && void 0 != b.y ? b.y : -95, w = void 0 != b && void 0 != b.x ? b.x : 334, z = 270, s = "#questbtminfo", Y = !0, Z = "icons/alignment-family-lg.png", aa = !0), doLogEvent("after checks=" + g);
  1459. h = "quest_reward_alignment_mouseover_old_ways";
  1460. doLogEvent("trigger_src=[" +
  1461. h + "] event_name=[" + c + "]");
  1462. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1463. doLogEvent("ui triggered: quest_alignment_old_ways"), g = !0, d = "quest_alignment_old_ways", !0 == g && (Q = Boolean("true"), u = 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."), N = 300, y = void 0 != b && void 0 != b.y ? b.y : -95, w = void 0 != b && void 0 != b.x ? b.x : 334, z = 270, s = "#questbtminfo",
  1464. Y = !0, Z = "icons/alignment-old_ways-lg.png", aa = !0), doLogEvent("after checks=" + g);
  1465. h = "quest_reward_alignment_mouseover_new_ways";
  1466. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1467. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1468. doLogEvent("ui triggered: quest_alignment_new_ways"), g = !0, d = "quest_alignment_new_ways", !0 == g && (Q = Boolean("true"), u = 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."),
  1469. N = 300, y = void 0 != b && void 0 != b.y ? b.y : -95, w = void 0 != b && void 0 != b.x ? b.x : 334, z = 270, s = "#questbtminfo", Y = !0, Z = "icons/alignment-new_ways-lg.png", aa = !0), doLogEvent("after checks=" + g);
  1470. h = "quest_reward_alignment_mouseover_cunning";
  1471. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1472. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1473. doLogEvent("ui triggered: quest_alignment_cunning"), g = !0, d = "quest_alignment_cunning", !0 == g && (Q = Boolean("true"), u = subGotStrings("Choosing this response will give you <strong>Cunning</strong> points. Cunning means taking advantage of opportunities and looking for ways to gain profit."),
  1474. N = 300, y = void 0 != b && void 0 != b.y ? b.y : -95, w = void 0 != b && void 0 != b.x ? b.x : 334, z = 270, s = "#questbtminfo", Y = !0, Z = "icons/alignment-crafty-lg.png", aa = !0), doLogEvent("after checks=" + g);
  1475. h = "quest_reward_alignment_mouseover_truthfulness";
  1476. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1477. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1478. doLogEvent("ui triggered: quest_alignment_truthfulness"), g = !0, d = "quest_alignment_truthfulness", !0 == g && (Q = Boolean("true"), u = subGotStrings("Choosing this response will give you <strong>Truthful</strong> points. Truthful means acting in a straightforward way."),
  1479. N = 300, y = void 0 != b && void 0 != b.y ? b.y : -95, w = void 0 != b && void 0 != b.x ? b.x : 334, z = 270, s = "#questbtminfo", Y = !0, Z = "icons/alignment-truthfulness-lg.png", aa = !0), doLogEvent("after checks=" + g);
  1480. h = "quest_reward_alignment_mouseout";
  1481. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1482. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g) doLogEvent("ui triggered: quest_alignment_mouseout"), g = !0, d = "quest_alignment_mouseout", !0 == g && (ba = !0, H = ".image_tip"), doLogEvent("after checks=" + g);
  1483. doLogEvent("uiEvent: firing=" +
  1484. g);
  1485. if (userContext.pauseEventTriggers && (!userContext.pauseEventTriggers || void 0 == userContext.pauseEventTriggers)) g = !1;
  1486. if (!0 == g) {
  1487. if (void 0 != O) for (obj in userContext.flags = [], userContext.playerData.stat) -1 != obj.indexOf("ui_flag_") && delete userContext.playerData.stat[String(obj)];
  1488. void 0 != G && (doLogEvent("uiEvent: set_flag = " + G), userContext.flags[G] = !0);
  1489. doLogEvent(" trigger_src=" + h + " event_name=" + c);
  1490. userContext.tooltipsEnabled = ca;
  1491. if (!1 == Q && void 0 == H && ($(".tuttip, .tuttip.tipbox").remove(), $(".tutarrow_wrap").remove(),
  1492. ba) || void 0 != H && (0 == M ? $(H).remove() : $(H).fadeOut(M, function() { $(this).remove() }), ba)) return;
  1493. void 0 != S && doMenuSelect(S);
  1494. void 0 != p && dialogAlert({ style: "alert", text: p, heading: f, button1: m, symbol: D, image: void 0, image_width: void 0 });
  1495. void 0 != q && iosSignal(q, k);
  1496. if (void 0 != u || void 0 != C) {
  1497. void 0 == u && (u = "");
  1498. doLogEvent("uiEvent: display text: " + u);
  1499. var J = "", fa = void 0, da = void 0, ha = [];
  1500. b = "tuttip";
  1501. g = "block";
  1502. p = "auto";
  1503. void 0 != C && -1 != C.indexOf(",") && (C = C.replace(/ /g, "").replace(/"/g, "'").split(","));
  1504. "number" != typeof A &&
  1505. -1 != A.indexOf(",") && (A = A.split(","));
  1506. "number" != typeof B && -1 != B.indexOf(",") && (B = B.split(","));
  1507. if (0 < N || "" == u) g = "none";
  1508. 0 < I && (p = I + "px");
  1509. T ? b += " tipbox" : Y && (b += " tipbox image_tip");
  1510. aa && (b += " tip_high");
  1511. J += '<div id="tip_' + d + '" class="' + b + '" style="width:' + z + "px; height: " + p + "; top: " + y + "px; left: " + w + "px; display: " + g + '">';
  1512. !T && (!Y && "" != u) && (J += '<span class="tuttipbg"></span><p>' + u);
  1513. 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(\'' +
  1514. R + '\'); return false;"><span class="btnedge"><a class="btnbrown"><span></span>More</a></span></span>');
  1515. void 0 != V && (void 0 == X ? (y = "confirm_override", console.warn("Confirm button tooltip specified with no Confirm button click handler. The button will only remove the tooltip.")) : y = X, J += '<span class="btnwrap btnmed nextbtn" id="tip_ok" onclick="uiEvent(\'' + y + '\'); return false;"><span class="btnedge"><a class="btnbrown"><span></span>Ok</a></span></span>');
  1516. void 0 != T && (void 0 == U ? console.warn("NPC portrait for tooltip has no NPC specified.") :
  1517. (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>" + u + "</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>'),
  1518. J += "\t\t</div>", J += "\t</div>", J += "</div>"));
  1519. Y && (void 0 == Z ? console.warn("Image for tooltip for event " + c + " 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>" + u + "</p>", P && R && (J += '\t<span class="btnwrap btnmed nextbtn" id="tip_next" onclick="uiEvent(\'' +
  1520. R + '\'); return false;"><span class="btnedge"><a class="btnbrown"><span></span>More</a></span></span>'), J += "\t\t</div>", J += "\t</div>", J += "</div>"));
  1521. var J = J + "</div>",
  1522. ga = function(a) {
  1523. switch (void 0 == a ? C : C[a]) {
  1524. case "left":
  1525. return "tutarrowl";
  1526. case "right":
  1527. return "tutarrowr";
  1528. case "top":
  1529. return "tutarrowt";
  1530. case "bottom":
  1531. return "tutarrowb";
  1532. case "bottom_left":
  1533. return "tutarrowbl";
  1534. case "bottom_right":
  1535. return "tutarrowbr";
  1536. case "top_right":
  1537. return "tutarrowtr";
  1538. case "top_left":
  1539. return "tutarrowtl";
  1540. }
  1541. },
  1542. ia = function(a, b, c, f) {
  1543. if (void 0 !=
  1544. a) return f = "arrow_" + d + "_" + a + "_" + f, J += '<div class="tutarrow_wrap ' + a + '" style="', 0 != c && (J += "left: " + c + "px; "), 0 != b && (J += "top: " + b + "px;"), J += '"> <img src="/images/buttons/tutarrow.png" id="' + f + '" class="tutarrow" width="70" height="70" /> </div>', f
  1545. };
  1546. $.isArray(C) ? $.each(C, function(a, b) { 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]));
  1547. doLogEvent("DBG: CURRENT DOM length=" + $(s));
  1548. $(s).prepend(J);
  1549. setTimeout(function() {
  1550. 0 == $("#tip_" + d).length &&
  1551. (ea = setInterval(function() { 1 == $(s).length && (clearInterval(ea), $(s).prepend(J)) }, 500))
  1552. }, 500);
  1553. 0 < N && $("#tip_" + d).fadeIn(N);
  1554. 0 < M && ($("#tip_" + d).delay(M).fadeOut("fast", function() { uiEvent(W, a) }), $.isArray(C) ? $.each(C, function(a, b) { $("#arrow_" + a + "_" + d).delay(M).fadeOut("fast") }) : $("#arrow__" + d).delay(M).fadeOut("fast"))
  1555. }
  1556. }
  1557. } else isIpad() && 200 > mobileVersion ? uiEventSignalLegacy(c) : uiEventSignal(c);
  1558. };
  1559. log("Start analyzing user interface event function.", "initialize");
  1560.  
  1561. doAdventure = function doAdventure(c, a, b, callback) {
  1562.  
  1563. // EXTENDER : Modfification
  1564. if (userContext.setSwornSword && userContext.setSwornSword.damage && userContext.setSwornSword.damage == 4) {
  1565. warn("Sworn sword has 4 wounds. Adventure will not continue.");
  1566. return;
  1567. }
  1568.  
  1569. // console.debug("Logging parameters of doAdventure: ", c, a, b);
  1570.  
  1571. if (void 0 != userContext.setSwornSword && void 0 != userContext.setSwornSword.batch_type && 0 != userContext.setSwornSword.batch_type)
  1572. return 1 == userContext.setSwornSword.batch_type && (!1 == b && prepareAdvPartyTimeout(), $.ajax({
  1573. url: "/play/batch_set_sworn_sword_target?batch_type=1&ss_id=" + userContext.setSwornSword.id + "&batch_action=" + a + "&target_symbol=" + c,
  1574. dataType: "JSON",
  1575. success: function(a) {
  1576. questClose();
  1577. showAdvPartyResponse(a);
  1578. uiEvent("ss_adventure_party");
  1579. return !0;
  1580. },
  1581. error: function(b) {
  1582. 400 ==
  1583. b.status ? advPartyFail() : 409 == b.status ? setTimeout(function() { doAdventure(c, a, !0) }, 5E3) : spinTimeout()
  1584. }
  1585. })), !1;
  1586. $.ajaxQueue({
  1587. url: "/play/adventure/" + userContext.setSwornSword.id + "?action_name=" + a + "&symbol=" + c,
  1588. dataType: "JSON",
  1589. success: function(b) {
  1590. analytics.track("Adventure Start", { adventure_region: b.location, adventure_action: a, adventure_swornsword_id: userContext.setSwornSword.id, adventure_swornsword_level: userContext.setSwornSword.ugprade_level });
  1591. analytics.wizardtrack("Adventure Start", {
  1592. adventure_region: b.location,
  1593. adventure_action: a,
  1594. adventure_swornsword_id: userContext.setSwornSword.id,
  1595. adventure_swornsword_level: userContext.setSwornSword.ugprade_level
  1596. });
  1597. adventureProgress(userContext.setSwornSword.id, b);
  1598. uiEvent("do_adventure");
  1599. "1" == userContext.playerData.stat.onboarding_ftue && uiTelemetry("ss_adventure");
  1600.  
  1601. // EXTENDER :: Modification
  1602. if (typeof callback == "function") {
  1603. callback();
  1604. }
  1605. }
  1606. });
  1607. };
  1608. log("Don't do adventure if sworn sword is about to die. Call callback when ready (bruting).", "initialize");
  1609.  
  1610. questDisplayById = function questDisplayById(c, a, b, d) {
  1611. $("#modal_dialogs_top").hide();
  1612. userContext.postQuestEvent = void 0;
  1613. userContext.dialogIndex = 0;
  1614. c = "/play/quest?quest_id=" + c;
  1615. void 0 != a && (c += "&stage=" + a);
  1616. !0 == b && (c += "&choice=" + userContext.currentQuest.option[userContext.currentAction].label);
  1617. !0 == d && (c += "&repeat=1");
  1618. showSpinner();
  1619. $.ajax({
  1620. url: c,
  1621. dataType: "JSON",
  1622. complete: hideSpinner,
  1623. success: function(a) {
  1624. doLog("questDisplayById: questModal");
  1625. questModal(a);
  1626. }
  1627. });
  1628. uiEvent("quest_display_by_id_" + a);
  1629. };
  1630. log("Analyzing display quest by id function.", "initialize");
  1631.  
  1632. adventurePartySend = function adventurePartySend(c) {
  1633. !1 == c && prepareAdvPartyTimeout();
  1634. $.ajax({
  1635. url: "/play/batch_send?batch_type=1&nonce=" + userContext.advparty_nonce,
  1636. dataType: "JSON",
  1637. success: function(a) {
  1638. // console.debug("Logging server response for adventure party sending: ", a);
  1639. showAdvPartyResponse(a);
  1640.  
  1641. },
  1642. error: function(a) {
  1643. 400 == a.status ? advPartyFail() : 409 == a.status ?
  1644. setTimeout(function() {
  1645. adventurePartySend(!0);
  1646. }, 5E3) : spinTimeout();
  1647. }
  1648. });
  1649. };
  1650. log("Analyzing adventure party send function.", "initialize");
  1651.  
  1652. adventureProgress = function adventureProgress(c, a) {
  1653. if (void 0 == a)
  1654. showSpinner(),
  1655. $.ajaxQueue({
  1656. url: "/play/adventure_progress/" + c,
  1657. dataType: "JSON",
  1658. complete: hideSpinner,
  1659. success: function(a) {
  1660. adventureProgress(c, a);
  1661.  
  1662. console.debug("Logging server response for adventure progress: ", a);
  1663. }
  1664. });
  1665. else {
  1666. userContext.playerData.stat.command = a.command;
  1667. userContext.playerData.stat.current_command = a.current_command;
  1668. userContext.playerData.stat.num_adventures_complete = a.num_adventures_complete;
  1669. userContext.currentSwornSwordId = c;
  1670. var b = extractItemById(playerInventory, c);
  1671. void 0 == a.location ? (doLog("adventureProgress: item_id=" +
  1672. c + " failed to load adventure progress"), b && 4 == b.cooldown_type && (b.cooldown = 0), ssStatus()) : a.item && (doLog("adventureProgress: Update SS"), insertInventoryFromItem(playerInventory, a.item));
  1673. if (a.roll) {
  1674. b = a.dialog_content;
  1675. if (!b || 10 > b.length) b = subDescriptionBySymbol[a.location];
  1676. var d = "";
  1677. subImageBySymbol[a.location] && (d = subImageBySymbol[a.location].slice(0, -4));
  1678. userContext.setSwornSword = extractItemById(playerInventory, a.item_id);
  1679. ssResults({
  1680. render: !0,
  1681. context: "attack",
  1682. pic: a.pic,
  1683. title: a.title,
  1684. side_pic: subSideImageBySymbol[a.location],
  1685. region: subFactionBySymbol[a.location],
  1686. subregion_pic: d,
  1687. subregion_name: subNameBySymbol[a.location],
  1688. id: -1,
  1689. wounds: a.wounds,
  1690. ability: a.ability,
  1691. attacker: extractItemById(playerInventory, a.item_id),
  1692. attacker_result: a.attacker_result,
  1693. attacker_result_word: a.attacker_result_word,
  1694. defender: { full_name: a.defender_name, rarity: 1, image: a.defender_image, flavor: a.defender_flavor, calc_trade: a.defender_trade, calc_battle: a.defender_battle, calc_intrigue: a.defender_intrigue },
  1695. defender_result: a.defender_result,
  1696. defender_result_word: a.defender_result_word,
  1697. defender_descriptor: "Defender",
  1698. attacker_strength: a.attacker_strength,
  1699. defender_strength: a.defender_strength,
  1700. attacker_percent: a.attacker_percent,
  1701. attack_base: a.attack_base,
  1702. attack_ss: a.attack_ss,
  1703. attack_boon: a.attack_boon,
  1704. attack_ability: a.attack_ability,
  1705. challenge_rating: a.challenge_rating,
  1706. dialog_content: b,
  1707. reward_item: a.reward_item,
  1708. reward_silver: a.reward_silver,
  1709. reward_upgrade_points: a.reward_upgrade_points,
  1710. xp_before: a.xp_before,
  1711. xp_after: a.xp_after,
  1712. roll: a.roll,
  1713. repeat_adventure_symbol: a.symbol,
  1714. adventure: !0
  1715. }, void 0, "ssStatus(" + c + ");");
  1716. } else
  1717. doLog("ssProgress: [adventure]"), doLog(a.attacker), d = "", subImageBySymbol[a.location] && (d = subImageBySymbol[a.location].slice(0, -4)), userContext.pvpActionMode = !0,
  1718. ssProgress({
  1719. render: !0,
  1720. context: "attack",
  1721. title: a.title,
  1722. side_pic: subSideImageBySymbol[a.location],
  1723. region: subFactionBySymbol[a.location],
  1724. subregion_pic: d,
  1725. subregion_name: subNameBySymbol[a.location],
  1726. duration: a.duration,
  1727. duration_remaining: a.duration_remaining,
  1728. callback: function() { adventureProgress(a.item_id) },
  1729. id: -1,
  1730. speed_up: !0,
  1731. ability: a.ability,
  1732. attacker: a.attacker,
  1733. defender: { full_name: a.defender_name, rarity: 1, image: a.defender_image, flavor: a.defender_flavor, calc_trade: a.defender_trade, calc_battle: a.defender_battle, calc_intrigue: a.defender_intrigue },
  1734. defender_descriptor: "Defender",
  1735. attacker_strength: a.attacker_strength,
  1736. defender_strength: a.defender_strength,
  1737. attacker_percent: a.attacker_percent,
  1738. challenge_rating: a.challenge_rating,
  1739. dialog_content: subDescriptionBySymbol[a.location],
  1740. adventure: !0
  1741. }, void 0, applyBoon, "ssStatus(" + c + ");");
  1742. return !1
  1743. }
  1744. };
  1745. log("Analyzing adventure progress function.", "initialize");
  1746.  
  1747. purchaseTalents = function purchaseTalents()
  1748. {
  1749. showSpinner();
  1750. doLog("purchaseTalents:");
  1751. doLog(userContext.pendingTalents);
  1752. doLog("talentsModal: ajax load");
  1753. $.ajax({
  1754. type: "POST",
  1755. url: "/play/purchase_talents?talents=" + escape(JSON.stringify(userContext.pendingTalents)) + "&client_seqnum=" + userContext.player_data_seqnum,
  1756. dataType: "JSON",
  1757. success: function(c) {
  1758. oldCat = userContext.talentsTab;
  1759. oldSub = userContext.currentTalentCategory;
  1760. talentsModal(c);
  1761. talentMainTab(oldCat);
  1762. talentCategory(oldSub);
  1763. for (var a in userContext.pendingTalents)
  1764. userContext.pendingTalents.hasOwnProperty(a) &&
  1765. (analytics.track("Talent Purchase", { talent_symbol: a, talent_rank: userContext.pendingTalents[a] }), analytics.wizardtrack("Talent Purchase", { talent_symbol: a, talent_rank: userContext.pendingTalents[a] }));
  1766. iosSignal("talentsData", "purchase")
  1767. }
  1768. });
  1769.  
  1770. return !1;
  1771. }
  1772. log("Analyzing purchase talents function.", "initialize");

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址