GOTA_Extender_Custom

Custom page functions rewritten.

目前为 2014-10-29 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/5426/23136/GOTA_Extender_Custom.js

  1. doLog = function() {
  2. };
  3. log("Logging killed.", "initialize");
  4.  
  5. animatedCoins.init = function(b, a, e, g) {
  6. if (isWeb()) {
  7. var c,
  8. d,
  9. f,
  10. h,
  11. k = { images: ["/images/animations/coin_flip.png"], animations: { all: [0, 32] }, frames: { regX: 0, height: 60, count: 33, regY: 0, width: 61 } },
  12. m = {
  13. images: ["/images/animations/coin_sparkle.png"],
  14. animations: { all: { frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] } },
  15. frames: [
  16. [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],
  17. [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]
  18. ]
  19. },
  20. l,
  21. n,
  22. p = false;
  23.  
  24. //EXTENDER :: Modification, seriously?
  25. // bugfix: b.offset is undefined (offset from button to silver visually)
  26. if (null === b || void 0 === b || b.length == 0) {
  27. return;
  28. } else if (null === a || void 0 === a) {
  29. return;
  30. } else {
  31. if (null === e || void 0 === e)
  32. e = [
  33. 0,
  34. 0
  35. ];
  36. if (null === g || void 0 === g) g = [0, 0];
  37. d = $("<canvas>").attr({ id: "animatedCoins", "class": "coinCanvasAnimation", width: "130", height: "120" }).prependTo($("body"));
  38. c = d[0];
  39. h = $("<canvas>").attr({ id: "animatedCoinsSparkle", "class": "coinCanvasAnimation", width: "130", height: "120" }).prependTo($("body"));
  40. f = h[0];
  41. c = new createjs.Stage(c);
  42. f = new createjs.Stage(f);
  43. null === b.offset() ? (h.remove(), d.remove(), console.warn("animatedCoins: startingElement.offset() is null. Exiting script.")) : null === a.offset() ? (h.remove(), d.remove(),
  44. 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) {
  45. c.visible = false;
  46. doLog("animation end");
  47. null === b.offset() ? (h.remove(), d.remove(), console.error("animatedCoins: startingElement.offset() is null")) :
  48. 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);
  49. }), n.on("animationend", function(a, b) {
  50. n.visible = false;
  51. p && (n.stop(), d.fadeOut(500, function(a) { d.remove(); }), h.remove());
  52. }), 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",
  53. f), $(d).animate({ left: a.offset().left + g[0], top: a.offset().top + g[1] }, 1E3));
  54. }
  55. }
  56. };
  57. log("Animated coins fixed.", "initialize");
  58.  
  59. doInstantSpeedUp = function doInstantSpeedUp(c, a, callback) {
  60. var b = buildingById(c),
  61. d = getCurrentSpeedUpType(b.producing_archetype_id, b.recipe_symbol);
  62.  
  63. // EXTENDER :: Modification
  64. if (instantSpeedCost(b.build_remaining, d) > 0) {
  65. console.log('EXTENDER :: The instant speed up costs money. Exiting...');
  66. return false;
  67. }
  68.  
  69. if (false == hasGold(instantSpeedCost(b.build_remaining, d), function() {
  70. doInstantSpeedUp(c, true, callback);
  71. }, a) && true != a) return false;
  72. playSound("coins");
  73. return speedBuild(-1, c, callback);
  74. };
  75. log("Instant speed up returns if gold is required.", "initialize");
  76.  
  77. doFinishProduction = function doFinishProduction(c, callback) {
  78. var a = buildingByItemId(c), b = itemFromId(a.producing_archetype_id);
  79. userContext.lastFinish = a.symbol;
  80. doLog("doFinishProduction: building_id=" + c + " symbol=" + a.symbol + " producing=" + b.symbol);
  81. "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 }));
  82. var d = "finish-" + c;
  83. userLock(d) && (playSound("build"),
  84. isWeb() && $("#collect_" + a.symbol).html(""), $.ajax({
  85. url: "/play/finish_production/" + c,
  86. dataType: "JSON",
  87. success: function(a) {
  88. //console.debug("Logging server response for doFinishProduction: ", a);
  89.  
  90. doLog("doFinishProduction: succeess ");
  91. freeLock(d);
  92. var b = buildingByItemId(c, a.building);
  93. userContext.playerData.character = a.character;
  94. userContext.playerData.user.money = a.user.money;
  95. userContext.playerData.stat.onboarding = a.stat.onboarding;
  96. userContext.playerData.stat.num_items_produced = a.stat.num_items_produced;
  97. userContext.playerData.stat.produced_stone = a.stat.produced_stone;
  98. userContext.playerData.stat.building_upgrades_finished =
  99. a.stat.building_upgrades_finished;
  100. b.producing_archetype_id = null;
  101. b.modifier = null;
  102. b.recipe_symbol = null;
  103. var f = extractItemBySymbol(playerInventory, b.symbol);
  104. f.effective_upgrade_level = a.building.effective_upgrade_level;
  105. f.producing_archetype_id = null;
  106. f.modifier = null;
  107. f.recipe_symbol = null;
  108.  
  109. // EXTENDER :: Modification, execute current code ONLY if there's a produced item returned!
  110. if (a.produced_item) {
  111. if (userContext.intCurrentRecipeIndex = null,
  112. doLog("doFinishProduction: data.produced_item.id=" + a.produced_item.id + " quantity=" + a.produced_item.quantity),
  113. insertInventoryFromItem(playerInventory, a.produced_item),
  114. theNewItem = extractItemById(playerInventory, a.produced_item.id), 1 == a.is_loot) {
  115. 0 < a.enhanced_loot_roll
  116. ? dialogAlert({
  117. style: "alert",
  118. text: "The result of your production (enhanced) is: " + a.produced_full_name,
  119. items: [theNewItem],
  120. heading: "You have produced...",
  121. button1: "Okay"
  122. }) : dialogAlert({
  123. style: "alert",
  124. text: "The result of your production is: " + a.produced_full_name,
  125. items: [theNewItem],
  126. heading: "You have produced...",
  127. button1: "Okay"
  128. });
  129. } else if (0 < a.affix_chance) {
  130. var m;
  131. m = "" + ("You have a " + a.affix_chance_from_stats +
  132. "% chance to produce a superior-quality item from your talents, equipment and buildings.");
  133. 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.");
  134. 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.";
  135. dialogAlert({ style: "alert", text: m, items: [theNewItem], heading: a.produced_full_name, button1: "Okay" });
  136. }
  137.  
  138. userContext.newBldgOrUpgrade = true;
  139. var q;
  140.  
  141. "Upgrade" != theNewItem.slot ?
  142. (userContext.newProducedItem = theNewItem, isWeb()
  143. && $("#collect_" + f.symbol).html(renderUpgradeCollect(f)),
  144. isWeb() && $("#build_panel_action_" + f.id).html(renderBuildPanelAction(f)),
  145. isWeb() && $("#speed_button_" + f.id).hide())
  146. : q = theNewItem.symbol;
  147.  
  148. isWeb() ? (renderBuildingInventory(userContext.playerData),
  149. renderBuildingsOnScreen(userContext.playerData))
  150. : (f = null, f = null == q
  151. ? { symbol: b.symbol, status: "idle" }
  152. : { symbol: b.symbol, status: "idle", upgrade: q },
  153. iosSignal("finish_production", "update", f),
  154. isAndroid()
  155. && mobileCooldownDataSignal([{ mode: "building", symbol: b.symbol }]),
  156. refreshActiveBuildingPanel(),
  157. $("#building_tab_prod, .buildingupgradetree").fadeTo("slow", "1"));
  158.  
  159. uiEvent("do_finish_production");
  160. uiEvent("building_panel_" + userContext.activeBuildingPanel);
  161. a.produced_item && "stacks_of_coins" == a.produced_item.symbol && retrievePlayerData(true, function(a) {
  162. userContext.playerData.quests =
  163. a.quests;
  164. reRenderQuestActionItems();
  165. });
  166.  
  167. "Upgrade" == theNewItem.slot && buildingUpgradePanel(b.symbol);
  168. updatePlayerInfo(userContext.playerData);
  169. updateAllStatus();
  170. }
  171.  
  172. // EXTENDER :: Modification
  173. if (typeof callback == "function") {
  174. callback();
  175. }
  176. }
  177. }));
  178. };
  179. log("Finish production and call callback if any. Fix bug.", "initialize");
  180.  
  181. doProduction = function(c, a, b, d, g, callback) {
  182. userContext.lastFinish = null;
  183. null == b && (b = 1);
  184. doLog("doProduction: symbol=" + c + " producer=" + a + " quantity=" + b);
  185. var p = null, f = "", m = null, q = "", k = null, D = null;
  186. uiEvent("start_production");
  187. null == userContext.playerData.stat.num_shop_items_started && (userContext.playerData.stat.num_shop_items_started = 0);
  188. userContext.playerData.stat.num_shop_items_started += 1;
  189. for (var u = 0; u < userContext.recipeData.length; u++)
  190. if (console.log("DEBUG: n=" + userContext.recipeData[u].category + ", symbol: " +
  191. 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) {
  192. p = userContext.recipeData[u];
  193. p.output == c ? (k = itemFromSymbol(c), q = k.full_name) : (p.output_loot == c && (m = c), q = p.name);
  194. D = u;
  195. components = userContext.recipeData[u].input.split(",");
  196. quantity_components = userContext.recipeData[u].input_quantity.split(",");
  197. var s = itemFromSymbol(userContext.recipeData[u].category);
  198. if (true ==
  199. userContext.recipeData[u].unlocked) {
  200. if (1 < userContext.recipeData[u].input.length)
  201. for (s = 0; s < components.length; s++) {
  202. var y = itemFromSymbol(components[s]), w = false;
  203. 0 == s && true == userContext.recipeData[u].evolution && (w = true);
  204. w = sumInventoryQuantity(y.symbol, w);
  205. if (parseInt(quantity_components[s]) * b > w) {
  206. "" == f && (f = "You need more of the following:<p/>");
  207. f += "<div>";
  208. if (4 <= userContext.playerData.character.level)
  209. switch (components[s]) {
  210. case "stone":
  211. case "iron":
  212. case "fur":
  213. case "ore":
  214. case "horse":
  215. case "riverways_fish_consumable":
  216. case "smallfolk":
  217. case "wood":
  218. case "cloth":
  219. case "grains":
  220. w =
  221. parseInt(quantity_components[s]) * b - w;
  222. if (cost_item = itemFromSymbol("pennyroyal")) var z = cost_item.price_perk_points * w;
  223. f += '<div id="basic_resource_' + components[s] + '">';
  224. f += itemMiniView(y, { extra_styles: "left:-70px", quantity_override: w });
  225. 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>";
  226. f += "</div>";
  227. break;
  228. default:
  229. f += itemMiniView(y);
  230. }
  231. f += "</div>";
  232. f += "<p>" + y.howto + "</p>";
  233. }
  234. }
  235. } else f = "You need <em>" + s.full_name + "</em> to produce that.";
  236. break;
  237. }
  238. if ("" != f) doAlert("Requirements: " + q, f), analytics.track("Production Blocked-Resources", { item_symbol: c }), analytics.wizardtrack("Production Blocked-Resources", { item_symbol: c });
  239. else if (p && hasMoney(p.craft_cost * b, function() { doProduction(c, a, b, d, g); })) {
  240. f = JSON.parse(JSON.stringify(userContext.playerData.inventory));
  241. u = [];
  242. p.output == c ? (k = itemFromSymbol(c), q = k.full_name) : (p.output_loot ==
  243. c && (m = c), q = p.name);
  244. components = p.input.split(",");
  245. quantity_components = p.input_quantity.split(",");
  246. s = itemFromSymbol(p.category);
  247. 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);
  248. q = "";
  249. D = null;
  250. for (s = 0; s < u.length; s++)
  251. if (y = itemFromSymbol(u[s].symbol), u[s].full_name != y.full_name)
  252. D = JSON.parse(JSON.stringify(u[s])),
  253. q += "[" + u[s].full_name + "]";
  254. 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 + "]";
  255.  
  256. // EXTENDER :: Modification
  257. if (true != d && null != D && !extender_confirmSuperiorMaterials) {
  258. return playerInventory = JSON.parse(JSON.stringify(f)), userContext.playerData.inventory = playerInventory, dialogAlert({
  259. style: "confirm",
  260. margin_top: 100,
  261. items: [D],
  262. button2: "Not Now",
  263. button2_action: function() { closeAlert(); },
  264. button1: "Confirm",
  265. button1_action: function() {
  266. closeAlert();
  267. return doProduction(c, a, b, true, g);
  268. },
  269. heading: "Confirm Superior Materials",
  270. 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?"
  271. }), false;
  272. }
  273.  
  274. var I = buildingBySymbol(userContext.activeBuildingPanel);
  275. I.build_remaining = p.craft_duration * b;
  276. I.original_build_seconds = p.craft_duration * b;
  277. I.build_progress = 0;
  278. "" != p.output && (I.producing_archetype_id = itemFromSymbol(p.output).id);
  279. I.recipe_symbol = p.symbol;
  280. I.action_sub_id = b;
  281. f = renderBuildingConstruction(I);
  282. isWeb() && $("#bc_" + I.id).html(f);
  283. displayBuildingCooldown(I);
  284. "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)));
  285. p = "/play/set_production";
  286. p = (m ? p + ("?loot_symbol=" + m + "&producer_symbol=" + a) : k ? p + ("/" + c + "?producer_symbol=" + a) : p + ("?producer_symbol=" + a)) + ("&quantity=" + b);
  287. g && (p += "&recipe_symbol=" + g);
  288. //console.debug("Tampering with the url: ", p);
  289.  
  290. $.ajax({
  291. url: p,
  292. dataType: "JSON",
  293. success: function(a) {
  294. // EXTENDER :: Modification
  295. if (!a.num_shop_items_started && a.status) {
  296. //console.debug("Server responded with: ", a);
  297. return;
  298. }
  299.  
  300. userContext.prodProgressShow = null;
  301. userContext.playerData.stat.num_shop_items_started = a.num_shop_items_started;
  302. updateAllStatus();
  303. uiEvent("do_production");
  304. isWeb() || iosSignal("building", "cooldown", mobileCooldownData({ mode: "building", symbol: I.symbol, flag: "production_started" }));
  305.  
  306. // EXTENDER :: Modification
  307. if (typeof callback == "function") {
  308. callback();
  309. }
  310. }
  311. });
  312. }
  313. };
  314. log("Do production and call callback if any. Inject superior materials condition.", "initialize");
  315.  
  316. buildTimerUpdate = function(c, a, b) {
  317. $("#timer-" + c).html(renderBuildTime(a));
  318. $("#timer-panel-" + c).html(renderBuildTime(a));
  319.  
  320. percent = 100 - 100 * (a / b);
  321. $("#progress-" + c).html('<span style="width:' + percent + '%;"></span>');
  322.  
  323. var d = buildingById(c);
  324. d.build_remaining = a;
  325. markup = renderBuildPanelAction(d);
  326.  
  327. $("#speed_button_" + c).show();
  328. $("#build_panel_action_" + c).html(markup);
  329. $("#production_timer_" + c).html(renderBuildTime(d.build_remaining, true));
  330. $("#production_timer_upper_" +
  331. c).html(renderBuildTime(d.build_remaining));
  332. $("#production_progress_" + c).css({ width: percent + "%" });
  333. $("#duration_long_" + c).html(durationLong(buildTimerDescription(d), a, b));
  334. a--;
  335. userContext.doBuildId == c && (300 >= a ?
  336. ($("#speed_up_skip_block").hide(),
  337. $("#speed_up_skip_use").show()) :
  338. ($("#speed_up_skip_use").hide(),
  339. $("#speed_up_skip_block").show()),
  340. $(".speed_building_" + c).html() != renderSpeedUpButton(c) && $(".speed_building_" + c).html(renderSpeedUpButton(c)));
  341.  
  342. d.cooldown = a;
  343. d.original_cooldown_seconds = b;
  344. displayBuildingCooldown(d);
  345. 0 < a || (closeSpeedUp(), finalizeBuildingConstruction(d), clearBuildingTimer(d.symbol));
  346.  
  347. // EXTENDER :: Modification REVISE
  348. if (a == 300 - 1) {
  349. doInstantSpeedUp(c, false, function() {
  350. setTimeout(function() {
  351. doFinishProduction(d.item_id);
  352. }, (extender_queueDelay / 2) * 1000);
  353.  
  354. setTimeout(function() {
  355. var el = getElement(d.symbol);
  356. if (el) {
  357. executeElement(el);
  358. }
  359. }, extender_queueDelay * 1000);
  360. });
  361. } else if (a < 300 - 10) {
  362. doInstantSpeedUp(c, false, function() {
  363. doFinishProduction(d.item_id);
  364. });
  365. }
  366. };
  367. log("Build custom timer update. Speed up and finish automatically, grab production item if any and execute.", "initialize");
  368.  
  369. doCollect = function(c) {
  370. lock_name = "collect-" + c;
  371. if (userLock(lock_name)) {
  372. var a = buildingByItemId(c);
  373. 0 < predictCollect(a) && (playSound("coins"), isWeb() && animatedCoins.init($("#collectbtn"), $("#silver"), [-10, -40], [-72, -44]));
  374. uiEvent("collect_" + buildingSymbolFromItemId(c), userContext.PlayerData);
  375. the_url = "/play/collect_building/" + c + "?client_seqnum=" + userContext.player_data_seqnum;
  376.  
  377. isWeb() || showSpinner();
  378. $.ajax({
  379. url: the_url,
  380. dataType: "JSON",
  381. success: function(b) {
  382. freeLock(lock_name);
  383. doLog("doCollect: building_id=" +
  384. c + " data.money=" + b.money);
  385. updateSilver(b.money);
  386. updateBaseTime(b.base_time);
  387. a.last_collected_at = b.last_collected_at;
  388. userContext.playerData.stat.buildings_collected = b.buildings_collected;
  389. userContext.playerData.stat.onboarding = b.onboarding;
  390. isWeb() || (iosSignal("building_collected"), hideSpinner());
  391. isWeb() && $("#collect_" + a.symbol).html(renderUpgradeCollect(a));
  392. buildingUpgradePanel(a.symbol);
  393. b = renderBuildingOwned(a);
  394. isWeb() && $("#bc_" + a.id).html(b);
  395. updateAllStatus();
  396. questListings();
  397.  
  398. // EXTENDER :: Modification
  399. closeModalLarge('modal_dialogs_top');
  400. }
  401. });
  402. }
  403. };
  404. log("Close dialog when silver is collected.", "initialize");
  405.  
  406. claimDaily = function() {
  407. showSpinner();
  408. $.ajax({
  409. url: "/play/advice_claim_daily",
  410. dataType: "JSON",
  411. success: function(c) {
  412. console.debug("Logging response from the server: ", c);
  413. hideSpinner();
  414.  
  415. // EXTENDER :: Modification
  416. // bugfix: undefined silver and gold
  417. if (c.status && c.status == "OK") {
  418. return;
  419. }
  420.  
  421. $("#claimed_holder").html("<h5>Claimed</h5>");
  422. updateSilver(c.total_silver);
  423. updateGold(c.total_gold);
  424. $(".claimrewardchest").hide();
  425. $("#daily_reward_statview").html(itemStatViewFromSymbol(c.item, { produce: "Continue", produce_callback: "welcomeClaimed" }));
  426. $("#dailynewsbtn").removeClass("btnglow");
  427.  
  428. var a = buildingBySymbol("keep");
  429. userContext.playerData.stat.daily_streak_claimed = userContext.playerData.stat.daily_streak;
  430. a && $("#bc_" + a.id).html(renderBuildingOwned(a));
  431. isWeb() || iosSignal("daily_reward_claimed", null, c.item);
  432.  
  433. // EXTENDER :: Modification
  434. $(".welcomemodal").hide();
  435. }
  436. });
  437.  
  438. return false;
  439. };
  440. log("Claim daily updates money only if claimed. Close when ready.", "initialize");
  441.  
  442. finishAll = function() {
  443. log("Checking buildings...");
  444.  
  445. var btn = $("#extender_finishBtn a");
  446. if (btn && btn.length > 0) btn.text("Finishing...");
  447.  
  448. for (var i = 0; i < userContext.buildingsData.length; i++) {
  449. var b = userContext.buildingsData[i];
  450. if (buildingFinished(b)) {
  451. log("Attempt to finish production on " + b.symbol);
  452. doFinishProduction(b.item_id, finishAll);
  453. return;
  454. }
  455. }
  456.  
  457. if (btn && btn.length > 0) btn.text("Finished");
  458. log("All buildings are now finished.");
  459. inform('Done');
  460. };
  461. log("Finish all buildings whole different way, make use of doFinish callback.", "initialize");
  462.  
  463. applySelectedUpgrade = function(c, a, callback) {
  464. lock_name = "upgrade-" + c.id;
  465. userContext.lastFinish = null;
  466.  
  467. var b;
  468.  
  469. if (0 < c.gold && null == a)
  470. doGoldUnlock(c.id, function() {
  471. applySelectedUpgrade(c, true, callback);
  472. });
  473. else if (hasMoney(c.silver, function() {
  474. applySelectedUpgrade(c, a, c.silver);
  475. }) && userLock(lock_name)) {
  476. var d = buildingUpgradeResourceCheck(c.building_id, c.id);
  477. if (isWeb()) {
  478. if (null != d.markup && "" != d.markup) {
  479. doAlert("Resources Required", "You need additional resources to construct that upgrade:<p/>" + d.markup);
  480. return false;
  481. }
  482. } else if (null !=
  483. d.strMissingComponentText) {
  484. if (isAndroid()) {
  485. iosSignal("building", "upgrade_fail", d);
  486. return false;
  487. }
  488. return d;
  489. }
  490. b = d.item;
  491. playSound("build");
  492. var g = buildingById(c.building_id);
  493. itemFromSymbol(g.symbol);
  494. d = extractItemBySymbol(userContext.playerData.inventory, g.symbol).upgrade_level - 1;
  495. 0 > d && (d = 0);
  496. userContext.buildIndex++;
  497. g.build_progress = 0;
  498. g.producing_archetype_id = b.id;
  499. $.ajax({
  500. url: "/play/apply_upgrade/" + c.id,
  501. dataType: "JSON",
  502. success: function(result) {
  503. freeLock(lock_name);
  504. if (result.resource_list)
  505. for (var i = 0; i < result.resource_list.length; i++) {
  506. var m =
  507. extractItemBySymbol(playerInventory, result.resource_list[i]);
  508. m && (m.quantity -= parseInt(result.resource_quantities[i]));
  509. }
  510. updateSilver(result.money);
  511. updateBaseTime(result.base_time);
  512. userContext.playerData.stat.onboarding = result.onboarding;
  513. userContext.playerData.stat.building_upgrades_added = result.building_upgrades_added;
  514. g.build_remaining = result.build_remaining;
  515. g.original_build_seconds = result.original_build_seconds;
  516. displayBuildingCooldown(g);
  517. isWeb() && buildingUpgradePanel(g.symbol);
  518. result = renderBuildingConstruction(g);
  519. $("#bc_" + g.id).html(result);
  520. uiEvent("add_" +
  521. userContext.activeBuildingPanel, userContext.PlayerData);
  522. selectedUpgrade = extractItemBySymbol(playerInventory, b.symbol);
  523. q_upgrade = 1;
  524. selectedUpgrade && (q_upgrade = selectedUpgrade.quantity + 1);
  525. $("#addbtn_container").html(addButtonUpgrade(b, false, q_upgrade));
  526. isWeb() ? selectUpgrade(userContext.activeUpgrade) : iosSignal("building", "cooldown", mobileCooldownData({ mode: "building", symbol: g.symbol, flag: "production_started" }));
  527. questListings();
  528. analytics.track("Building Apply-Upgrade", {
  529. building: userContext.activeBuildingPanel,
  530. upgrade: itemData[itemById[c.id]].symbol,
  531. cost: itemData[itemById[c.id]].cost
  532. });
  533. analytics.wizardtrack("Building Apply-Upgrade", { building: userContext.activeBuildingPanel, upgrade: itemData[itemById[c.id]].symbol, cost: itemData[itemById[c.id]].cost }); // EXTENDER :: Modification
  534.  
  535. // EXTENDER :: Modification
  536. if (typeof callback == "function") {
  537. callback();
  538. }
  539. }
  540. });
  541. }
  542.  
  543. return false;
  544. };
  545. log("Do upgrade and call callback function.", "initialize");
  546.  
  547. speedBuild = function speedBuild(c, a, callback) {
  548. $("#modal_dialogs_top2").hide();
  549. doLog("speedBuild: speed_item=" + c + " item_id=" + a);
  550. $.ajax({
  551. url: "/play/build_now/" + a + "?complete=" + c,
  552. dataType: "JSON",
  553. success: function(b) {
  554. //console.debug("Logging server response for speedBuild: ", b);
  555.  
  556. userContext.playerData.user.money = b.user.money;
  557. userContext.playerData.stat.onboarding = b.stat.onboarding;
  558. userContext.playerData.chapter = b.chapter;
  559. var d = buildingById(a, b.building);
  560. doLog("speedBuild: speed_item:");
  561. doLog(b.speed_item);
  562. b.speed_item && insertInventoryFromItem(userContext.playerData.inventory,
  563. b.speed_item);
  564. insertInventoryFromItem(userContext.playerData.inventory, b.produced_item);
  565. logLastItem("speedBuild:A");
  566. userContext.buildingsData && (userContext.playerData.buildings = userContext.buildingsData);
  567. playerInventory && (userContext.playerData.inventory = playerInventory);
  568. userContext.chapterData = b.chapter;
  569. d && (analytics.track("SpeedUp-Building", { building: d.symbol, speed_item: c }), analytics.wizardtrack("SpeedUp-Building", { building: d.symbol, speed_item: c }));
  570. userContext.buildIndex++;
  571. logLastItem("speedBuild:B");
  572. finalizeBuildingConstruction(d);
  573. 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)),
  574. $("#build_panel_action_" + d.id).html(renderBuildPanelAction(d)), $("#speed_button_" + d.id).hide());
  575. renderBuildingsOnScreen(userContext.playerData);
  576. d && uiEvent("building_panel_" + d.symbol);
  577.  
  578. // EXTENDER :: Modification
  579. if (typeof (callback) == "function") {
  580. callback();
  581. }
  582. }
  583. });
  584. };
  585. log("Speed build is what actually calls the callback (not doInstantSpeedUp).", "initialize");
  586.  
  587. uiEvent = function uiEvent(c, a, b) {
  588. if (isWeb()) {
  589. //log("uiEvent: event_name=[" + c + "]", "DEBUG");
  590. a = userContext.playerData;
  591. if (void 0 == a) return doLogEvent("uiEvent: playerData null"), !1;
  592. 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;
  593. "confirm_override" == c && (ba = g = !0, Q = !1);
  594. h = "test_event";
  595. doLogEvent("trigger_src=[" +
  596. h + "] event_name=[" + c + "]");
  597. 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);
  598. h = "test_alert";
  599. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  600. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  601. "").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);
  602. h = "test_arrow";
  603. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  604. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  605. doLogEvent("ui triggered: ui_test_arrows"),
  606. 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);
  607. h = "test_clear";
  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_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=" +
  611. g);
  612. h = "ui_test";
  613. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  614. 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);
  615. h = "alert_test_alert_button1";
  616. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  617. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  618. doLogEvent("ui triggered: ui_test_alert_chain2"),
  619. 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);
  620. h = "alert_test_alert_button1";
  621. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  622. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  623. doLogEvent("ui triggered: ui_test_alert_chain3"),
  624. 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);
  625. h = "test_device";
  626. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  627. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  628. 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.",
  629. D = "test_alert"), doLogEvent("after checks=" + g);
  630. h = "test_device";
  631. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  632. 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);
  633. h = "test_ios_signal";
  634. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  635. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c,
  636. 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);
  637. h = "test_native_device";
  638. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  639. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  640. 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"),
  641. 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);
  642. h = "holdings";
  643. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  644. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g) {
  645. doLogEvent("ui triggered: ui_onboarding_begin");
  646. var g = !0, d = "ui_onboarding_begin", h = "pro_q1_take_the_slavers_keep", K = h.replace("[", "").replace("]", "");
  647. doLogEvent("quest_active: " + h);
  648. if (-1 != h.indexOf(",")) {
  649. var E = /\[.*\]/.test(h), L = !E;
  650. $.each(K.split(","),
  651. function(b, c) { if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1; });
  652. L || (g = !1);
  653. } else !1 == activeQuest(a.quests, K) && (doLogEvent("quest_active: " + K + " NOT active"), g = !1);
  654. !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);
  655. doLogEvent("after checks=" + g);
  656. }
  657. h =
  658. "quest_3option_pro_q1_take_the_slavers_keep";
  659. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  660. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  661. 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(",") ?
  662. h.split(",") : h, h = "370", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  663. h = "fade_ui_jon_command";
  664. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  665. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  666. 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",
  667. s = ".questiconcircle", h = "358", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "246", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  668. h = "quest_results_pro_q1_take_the_slavers_keep";
  669. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  670. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  671. 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."),
  672. 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);
  673. h = "fade_ui_quest_results_pro_q1_take_the_slavers_keep";
  674. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  675. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  676. doLogEvent("ui triggered: ui_fade_ui_quest_results_pro_q1_take_the_slavers_keep"),
  677. 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);
  678. h = "quest_close_pro_q1_take_the_slavers_keep";
  679. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  680. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  681. doLogEvent("ui triggered: ui_quest_close_pro_q1_take_the_slavers_keep"), g = !0, d = "ui_quest_close_pro_q1_take_the_slavers_keep",
  682. doLogEvent("after checks=" + g);
  683. h = "holdings";
  684. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  685. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  686. 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) {
  687. if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " +
  688. c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1;
  689. }), 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);
  690. h = "quest_post_pro_q2_a_widowers_oath_action_choice_1, quest_post_pro_q2_a_widowers_oath_initial_choice_2";
  691. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  692. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  693. 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",
  694. B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_sworn_sword_reward"), doLogEvent("after checks=" + g);
  695. h = "holdings";
  696. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  697. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  698. 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,
  699. 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=" +
  700. g);
  701. h = "ss_action_open_quest";
  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_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) {
  705. if (activeQuest(a.quests, c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"),
  706. (L = E) && E)) return !1;
  707. }), 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 !=
  708. 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);
  709. h = "quest_next_q3_ss_blood_at_last_tutorial_1";
  710. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  711. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  712. 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("]",
  713. ""), 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 !=
  714. h.indexOf(",") ? h.split(",") : h, h = "396", B = -1 != h.indexOf(",") ? h.split(",") : h, G = "flag_ss_action_tutorial"), doLogEvent("after checks=" + g);
  715. h = "ss_choose_item_sworn_sword_hugo_temp";
  716. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  717. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  718. 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: " +
  719. 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",
  720. 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);
  721. h = "ss_select_action_fight, ss_select_action_sabotage, ss_select_action_bribe";
  722. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  723. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  724. 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("]", ""),
  725. 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(",") ?
  726. h.split(",") : h, h = "375", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  727. h = "open_progress";
  728. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  729. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  730. 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(","),
  731. 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);
  732. h = "quest_ss_results_pro_q3_ss_blood_at_last";
  733. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  734. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  735. doLogEvent("ui triggered: ui_quest_display_by_id_ss_go"), g = !0, d = "ui_quest_display_by_id_ss_go",
  736. 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 !=
  737. 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);
  738. h = "holdings";
  739. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  740. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  741. 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: " +
  742. 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(",") ?
  743. h.split(",") : h), doLogEvent("after checks=" + g);
  744. h = "quest_3option_pro_q4_a_royal_reward";
  745. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  746. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  747. 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 !=
  748. 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);
  749. h = "quest_results_pro_q4_a_royal_reward";
  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_quest_results_pro_q4_a_royal_reward"), g = !0,
  753. d = "ui_quest_results_pro_q4_a_royal_reward", !0 == g && (G = "royal_reward"), doLogEvent("after checks=" + g);
  754. h = "quest_close_pro_q4_a_royal_reward";
  755. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  756. 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);
  757. h = "holdings";
  758. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  759. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  760. 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 ?
  761. 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);
  762. h = "lorebook_animation_1_end";
  763. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  764. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  765. doLogEvent("ui triggered: ui_lore_book_description"),
  766. 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);
  767. h = "lore_book_description_2";
  768. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  769. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  770. doLogEvent("ui triggered: ui_lore_book_description_2"),
  771. 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);
  772. h = "lore_book_noble";
  773. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  774. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  775. doLogEvent("ui triggered: ui_lore_book_noble"),
  776. 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);
  777. h = "chapter_claimed_1_1";
  778. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  779. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  780. "").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);
  781. h = "claim_chapter_reward";
  782. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  783. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  784. doLogEvent("ui triggered: ui_claim_chapter_reward"), g = !0, d = "ui_claim_chapter_reward",
  785. doLogEvent("uiEvent: require_flag = royal_reward"), 1 != userContext.flags.royal_reward && (g = !1), !0 == g && (O = "true"), doLogEvent("after checks=" + g);
  786. h = "next_chapter_1";
  787. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  788. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  789. 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(",") :
  790. h, G = "flag_nobility_accepted"), doLogEvent("after checks=" + g);
  791. h = "holdings";
  792. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  793. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  794. 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) {
  795. if (activeQuest(a.quests,
  796. c) == E && (doLogEvent("quest_active: " + c + (E ? " IS" : " NOT") + " active"), (L = E) && E)) return !1;
  797. }), 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);
  798. h = "quest_results_pro_q5_the_maesters_welcome";
  799. doLogEvent("trigger_src=[" +
  800. h + "] event_name=[" + c + "]");
  801. 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);
  802. h = "quest_close_pro_q5_the_maesters_welcome";
  803. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  804. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  805. doLogEvent("ui triggered: ui_quest_close_pro_q5_the_maesters_welcome"),
  806. g = !0, d = "ui_quest_close_pro_q5_the_maesters_welcome", !0 == g && (G = "flag_maester_welcome"), doLogEvent("after checks=" + g);
  807. h = "refresh_toolbar, click_main_toolbar";
  808. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  809. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  810. 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 ?
  811. 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);
  812. h = "refresh_toolbar, click_main_toolbar";
  813. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  814. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  815. 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 =
  816. 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);
  817. h = "do_menu_select_buildings";
  818. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  819. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  820. doLogEvent("ui triggered: ui_quest_maester_holdings"),
  821. 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 =
  822. 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);
  823. h = "building_panel_counting_house";
  824. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  825. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  826. doLogEvent("ui triggered: ui_building_panel_counting_house"), g = !0, d = "ui_building_panel_counting_house",
  827. 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"),
  828. doLogEvent("after checks=" + g);
  829. h = "counting_house_tutorial_1";
  830. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  831. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  832. 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(",") ?
  833. h.split(",") : h, h = "-12", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  834. h = "build_counting_house";
  835. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  836. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  837. 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 =
  838. 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);
  839. h = "building_panel_counting_house";
  840. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  841. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  842. doLogEvent("ui triggered: ui_building_counting_house_finished"),
  843. 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>."),
  844. 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);
  845. h = "building_panel_counting_house";
  846. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  847. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  848. 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=" +
  849. (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);
  850. h = "holdings";
  851. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  852. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  853. 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"),
  854. 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(",") ?
  855. h.split(",") : h, G = "silver_tip", P = "true", R = "build_keep_next"), doLogEvent("after checks=" + g);
  856. h = "build_keep_next";
  857. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  858. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  859. 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."'),
  860. 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);
  861. h = "constructed_keep";
  862. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  863. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  864. doLogEvent("ui triggered: ui_power_tutorial_1"), g = !0, d = "ui_power_tutorial_1", 2 < userContext.playerData.character.level &&
  865. (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."),
  866. 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);
  867. h = "holdings";
  868. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  869. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  870. doLogEvent("ui triggered: ui_power_tutorial_1_holdings"), g = !0, d = "ui_power_tutorial_1_holdings", 2 < userContext.playerData.character.level &&
  871. (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."),
  872. 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);
  873. h = "power_modal_open";
  874. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  875. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  876. doLogEvent("ui triggered: ui_power_tutorial_2"), g = !0, d = "ui_power_tutorial_2", a.stat ? (doLogEvent("watch: quests_succeeded: value=" +
  877. (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 :
  878. 528, z = 265, s = "#powertabmenu", P = "true", R = "power_tutorial_5", T = "true", U = "maester_lucas"), doLogEvent("after checks=" + g);
  879. h = "power_tutorial_5";
  880. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  881. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  882. 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 !=
  883. 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);
  884. h = "power_tutorial_6";
  885. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  886. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  887. 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(",") ?
  888. h.split(",") : h, G = "flag_power_tutorial_done"), doLogEvent("after checks=" + g);
  889. h = "close_power";
  890. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  891. 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);
  892. h = "holdings";
  893. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  894. if ((c == h ||
  895. -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  896. 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 ==
  897. 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);
  898. h = "quest_results_pro_q6_the_captain_arrives";
  899. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  900. if ((c == h ||
  901. -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);
  902. h = "quest_close_pro_q6_the_captain_arrives";
  903. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  904. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  905. doLogEvent("ui triggered: ui_quest_close_pro_q6_the_captain_arrives"),
  906. g = !0, d = "ui_quest_close_pro_q6_the_captain_arrives", !0 == g && (S = "chapters"), doLogEvent("after checks=" + g);
  907. h = "holdings";
  908. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  909. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  910. 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) ||
  911. 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);
  912. h = "lorebook_animation_2_end";
  913. doLogEvent("trigger_src=[" +
  914. h + "] event_name=[" + c + "]");
  915. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  916. 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 + "") +
  917. " 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);
  918. h = "holdings";
  919. doLogEvent("trigger_src=[" +
  920. h + "] event_name=[" + c + "]");
  921. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  922. 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=" +
  923. (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);
  924. h = "chapter_claimed_1_2";
  925. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  926. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c,
  927. 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);
  928. h = "next_chapter_2";
  929. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  930. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  931. doLogEvent("ui triggered: ui_lore_book_ch_3_close"),
  932. 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);
  933. h = "holdings";
  934. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  935. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  936. 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 +
  937. "") + " 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 &&
  938. (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);
  939. h = "ui_invite_friends_step2";
  940. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  941. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c,
  942. 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);
  943. h = "send_friend_invites_modal";
  944. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  945. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  946. doLogEvent("ui triggered: ui_invite_friends_step3"), g = !0, d = "ui_invite_friends_step3",
  947. 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);
  948. h = "toggle_friend_checked";
  949. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  950. c + "]");
  951. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  952. 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",
  953. 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);
  954. h = "send_friend_invitations";
  955. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  956. 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);
  957. h = "send_friend_invites_modal_closed";
  958. doLogEvent("trigger_src=[" +
  959. h + "] event_name=[" + c + "]");
  960. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  961. 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 + "") +
  962. " 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);
  963. h = "send_friend_invites_modal_closed";
  964. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  965. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) &&
  966. !0 != g)
  967. 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) ||
  968. 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",
  969. V = "true"), doLogEvent("after checks=" + g);
  970. h = "holdings";
  971. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  972. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  973. 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]",
  974. 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(",") :
  975. h), doLogEvent("after checks=" + g);
  976. 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";
  977. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  978. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  979. doLogEvent("ui triggered: ui_quest_close_first_impressions"),
  980. g = !0, d = "ui_quest_close_first_impressions", !0 == g && (G = "ss_npc_recruit_tutorial"), doLogEvent("after checks=" + g);
  981. h = "holdings";
  982. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  983. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  984. 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 ?
  985. 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,
  986. 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);
  987. h = "ss_status_open";
  988. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  989. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  990. 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 +
  991. "") + " 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."),
  992. 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);
  993. h = "ss_status_recruit_open";
  994. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  995. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  996. doLogEvent("ui triggered: ui_ss_recruit_hire"), g = !0, d = "ui_ss_recruit_hire", a.stat ? (doLogEvent("watch: num_purchase_sworn_sword: value=" +
  997. (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=" +
  998. g);
  999. h = "purchase_sworn_sword_0_2";
  1000. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1001. 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);
  1002. h = "display_sworn_swords, holdings";
  1003. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1004. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) &&
  1005. !0 != g)
  1006. 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) ||
  1007. 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);
  1008. h = "ss_status_open";
  1009. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1010. if ((c ==
  1011. h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1012. 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=" +
  1013. (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."),
  1014. 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);
  1015. h = "ss_status_tutorial_3";
  1016. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1017. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1018. doLogEvent("ui triggered: ui_ss_status_tutorial_3"),
  1019. 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);
  1020. h = "ss_status_tutorial_4";
  1021. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1022. if ((c == h || -1 != h.indexOf(",") &&
  1023. -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1024. 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 =
  1025. "14, 93, 172", B = -1 != h.indexOf(",") ? h.split(",") : h, P = "true", R = "ss_status_tutorial_7"), doLogEvent("after checks=" + g);
  1026. h = "ss_status_tutorial_7, ss_status_open";
  1027. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1028. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1029. 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 ?
  1030. 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 !=
  1031. 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);
  1032. h = "ss_status_tutorial_7";
  1033. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1034. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1035. doLogEvent("ui triggered: ui_ss_status_tutorial_7"), g = !0, d = "ui_ss_status_tutorial_7", 3 < userContext.playerData.character.level && (g =
  1036. !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)) :
  1037. 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);
  1038. h = "adventure_dialog_open";
  1039. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1040. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1041. "").split(","))) && !0 != g)
  1042. 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>."),
  1043. 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);
  1044. h = "start_adventure_open, ss_choose_item_sworn_sword_0_2";
  1045. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1046. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1047. doLogEvent("ui triggered: ui_ss_action_tutorial_1"), g = !0, d = "ui_ss_action_tutorial_1", 4 < userContext.playerData.character.level &&
  1048. (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,
  1049. 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);
  1050. h = "ss_action_tutorial_4";
  1051. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1052. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1053. 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 &&
  1054. (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);
  1055. h = "pvp_select_action";
  1056. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1057. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1058. "").split(","))) && !0 != g)
  1059. 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=" +
  1060. g);
  1061. h = "open_progress";
  1062. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1063. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1064. 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)) :
  1065. g = !1, doLogEvent("after checks=" + g);
  1066. h = "display_sworn_swords, ss_status_open";
  1067. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1068. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1069. 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) ||
  1070. 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);
  1071. h = "close_modal_dialogs_top";
  1072. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1073. c + "]");
  1074. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1075. 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 =
  1076. 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);
  1077. h = "lorebook_animation_3_end";
  1078. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1079. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1080. 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 +
  1081. "") + " 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);
  1082. h = "holdings";
  1083. doLogEvent("trigger_src=[" +
  1084. h + "] event_name=[" + c + "]");
  1085. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1086. 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=" +
  1087. (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);
  1088. h = "chose_fealty";
  1089. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1090. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1091. "").split(","))) && !0 != g) doLogEvent("ui triggered: ui_chose_fealty"), g = !0, d = "ui_chose_fealty", doLogEvent("after checks=" + g);
  1092. h = "chapter_claimed_1_3";
  1093. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1094. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1095. 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 ?
  1096. 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);
  1097. h = "next_chapter_3";
  1098. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1099. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1100. 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 =
  1101. "-68", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "661", B = -1 != h.indexOf(",") ? h.split(",") : h, O = "true"), doLogEvent("after checks=" + g);
  1102. h = "holdings";
  1103. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1104. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1105. 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]",
  1106. 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",
  1107. h = "88", A = -1 != h.indexOf(",") ? h.split(",") : h, h = "243", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1108. h = "holdings";
  1109. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1110. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1111. 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 ?
  1112. 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 ==
  1113. 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);
  1114. h = "ss_status_open";
  1115. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1116. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1117. 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=" +
  1118. (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);
  1119. h = "ss_level_up";
  1120. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1121. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1122. 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",
  1123. G = "flag_train_ss_modal"), doLogEvent("after checks=" + g);
  1124. h = "ss_status_open";
  1125. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1126. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1127. 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) ||
  1128. 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);
  1129. h = "holdings";
  1130. doLogEvent("trigger_src=[" +
  1131. h + "] event_name=[" + c + "]");
  1132. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1133. 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 &&
  1134. (S = "buildings"), doLogEvent("after checks=" + g);
  1135. h = "holdings, do_menu_select_buildings";
  1136. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1137. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1138. 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) ||
  1139. 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 =
  1140. "true", U = "ser_hugo"), doLogEvent("after checks=" + g);
  1141. h = "building_panel_smithy";
  1142. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1143. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1144. 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 ==
  1145. 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);
  1146. h = "holdings";
  1147. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1148. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1149. doLogEvent("ui triggered: ui_ss_train_tutorial_4_backtrack"),
  1150. 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>!"'),
  1151. 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);
  1152. h = "start_production";
  1153. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1154. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1155. doLogEvent("ui triggered: ui_ss_train_tutorial_4b"), g = !0, d = "ui_ss_train_tutorial_4b", a.stat ? (doLogEvent("watch: num_trained: value=" +
  1156. (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);
  1157. h = "building_panel_smithy";
  1158. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1159. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1160. doLogEvent("ui triggered: ui_ss_train_tutorial_5"), g = !0, d = "ui_ss_train_tutorial_5", 3 < userContext.playerData.character.level &&
  1161. (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",
  1162. 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);
  1163. h = "construct";
  1164. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1165. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1166. doLogEvent("ui triggered: ui_ss_train_tutorial_6"),
  1167. 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 =
  1168. !1, !0 == isBuildingConstructed("smithy", a) && (g = !1), doLogEvent("after checks=" + g);
  1169. h = "building_production_tab_smithy";
  1170. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1171. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1172. 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) ||
  1173. 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,
  1174. z = 231, s = ".production", G = "flag_smithy_produce", P = "true", R = "next_ui_ss_train_tutorial_8"), doLogEvent("after checks=" + g);
  1175. h = "next_ui_ss_train_tutorial_8";
  1176. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1177. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1178. 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 +
  1179. "") + " 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(",") ?
  1180. h.split(",") : h, P = "true", R = "next_ui_ss_train_tutorial_9"), doLogEvent("after checks=" + g);
  1181. h = "next_ui_ss_train_tutorial_9";
  1182. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1183. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1184. 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"),
  1185. 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"),
  1186. doLogEvent("after checks=" + g);
  1187. h = "next_ui_ss_train_tutorial_10";
  1188. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1189. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1190. 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) ||
  1191. 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);
  1192. h = "production_completed";
  1193. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1194. c + "]");
  1195. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1196. 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 &&
  1197. (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);
  1198. h = "do_finish_production";
  1199. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1200. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1201. doLogEvent("ui triggered: ui_ss_train_tutorial_12_flag"),
  1202. g = !0, d = "ui_ss_train_tutorial_12_flag", !0 == g && (G = "decorative_blade_produced"), doLogEvent("after checks=" + g);
  1203. h = "building_production_tab_smithy";
  1204. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1205. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1206. 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 ?
  1207. 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 =
  1208. -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1209. h = "holdings";
  1210. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1211. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1212. 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 ?
  1213. 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."),
  1214. 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);
  1215. h = "start_production";
  1216. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1217. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1218. doLogEvent("ui triggered: ui_ss_train_tutorial_13"), g = !0, d = "ui_ss_train_tutorial_13", a.stat ? (doLogEvent("watch: num_shop_purchases: value=" +
  1219. (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);
  1220. h = "building_panel_smithy";
  1221. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1222. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1223. doLogEvent("ui triggered: ui_ss_train_maester_lucas_pre"),
  1224. 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" !=
  1225. 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=" +
  1226. g);
  1227. h = "holdings";
  1228. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1229. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1230. 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 ?
  1231. (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",
  1232. 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,
  1233. 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);
  1234. h = "building_panel_counting_house";
  1235. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1236. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1237. doLogEvent("ui triggered: ui_counting_house_upgrade_tutorial_1"), g = !0, d = "ui_counting_house_upgrade_tutorial_1",
  1238. 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,
  1239. 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 :
  1240. 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);
  1241. h = "counting_house_upgrade_tutorial_2";
  1242. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1243. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1244. 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=" +
  1245. (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,
  1246. 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);
  1247. h = "close_building_panel";
  1248. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1249. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1250. doLogEvent("ui triggered: ui_counting_house_close_building_panel"), g = !0, d = "ui_counting_house_close_building_panel",
  1251. 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);
  1252. h = "counting_house_upgrade_tutorial_3";
  1253. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1254. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1255. 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"),
  1256. 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);
  1257. h = "holdings";
  1258. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1259. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1260. doLogEvent("ui triggered: ui_counting_house_upgrade_maester_lucas"),
  1261. 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) ||
  1262. 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);
  1263. h = "holdings,construction_complete_counting_house";
  1264. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1265. c + "]");
  1266. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1267. 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)) :
  1268. 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);
  1269. h = "building_panel_counting_house";
  1270. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1271. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1272. 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) ||
  1273. 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."),
  1274. 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);
  1275. h = "building_panel_counting_house";
  1276. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1277. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1278. doLogEvent("ui triggered: ui_counting_house_upgrade_tutorial_5"), g =
  1279. !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 ?
  1280. 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);
  1281. h = "building_panel_counting_house";
  1282. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1283. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1284. 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) ||
  1285. 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=" +
  1286. g);
  1287. h = "close_building_panel_counting_house";
  1288. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1289. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1290. 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 ?
  1291. 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);
  1292. h = "holdings";
  1293. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1294. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) &&
  1295. !0 != g)
  1296. 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 ?
  1297. 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 !=
  1298. 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);
  1299. h = "holdings";
  1300. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1301. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1302. doLogEvent("ui triggered: ui_building_panel_village_center_backtrack"), g = !0, d = "ui_building_panel_village_center_backtrack",
  1303. 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",
  1304. 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);
  1305. h = "building_panel_village_center";
  1306. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1307. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1308. 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 +
  1309. "") + " 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);
  1310. h = "building_panel_village_center";
  1311. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1312. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1313. "").split(","))) && !0 != g)
  1314. 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 ?
  1315. parseInt(a.stat.num_shop_items_started) || 0 : 0, "2" != the_val + "" && (g = !1)) : g = !1, doLogEvent("after checks=" + g);
  1316. h = "building_panel_village_center";
  1317. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1318. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1319. 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=" +
  1320. (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."),
  1321. 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);
  1322. h = "stone_production_item_selected";
  1323. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1324. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1325. doLogEvent("ui triggered: ui_village_center_build_maester_tutorial_3"), g = !0, d = "ui_village_center_build_maester_tutorial_3",
  1326. 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>."),
  1327. 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);
  1328. h = "start_production";
  1329. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1330. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1331. 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"),
  1332. 1 != userContext.flags.flag_village_center_tutorial && (g = !1), !0 == g && (G = "flag_show_production_item", O = "true"), doLogEvent("after checks=" + g);
  1333. h = "constructed_village_center,holdings";
  1334. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1335. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1336. 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=" +
  1337. (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."'),
  1338. 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);
  1339. h = "building_panel_village_center";
  1340. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1341. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1342. doLogEvent("ui triggered: ui_village_center_build_maester_tutorial_4"), g = !0, d =
  1343. "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,
  1344. "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 !=
  1345. h.indexOf(",") ? h.split(",") : h, h = "9", B = -1 != h.indexOf(",") ? h.split(",") : h), doLogEvent("after checks=" + g);
  1346. h = "building_panel_village_center";
  1347. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1348. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1349. 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=" +
  1350. (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=" +
  1351. g);
  1352. h = "do_finish_production";
  1353. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1354. 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);
  1355. h = "holdings";
  1356. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1357. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1358. "").split(","))) && !0 != g)
  1359. 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(",") ?
  1360. (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(",") ?
  1361. h.split(",") : h, h = "243", B = -1 != h.indexOf(",") ? h.split(",") : h, T = "true", U = "maester_lucas"), doLogEvent("after checks=" + g);
  1362. 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";
  1363. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1364. 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);
  1365. h = "holdings, refresh_toolbar";
  1366. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1367. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1368. doLogEvent("ui triggered: ui_lore_book_banner_hud"), g =
  1369. !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,
  1370. !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);
  1371. h = "lorebook_animation_4_end";
  1372. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1373. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1374. 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."),
  1375. 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);
  1376. h = "chapter_claimed_1_4";
  1377. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1378. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1379. doLogEvent("ui triggered: ui_lore_book_banner_claimed"), g = !0, d = "ui_lore_book_banner_claimed",
  1380. !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);
  1381. h = "next_chapter_4";
  1382. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1383. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1384. 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(",") ?
  1385. h.split(",") : h), doLogEvent("after checks=" + g);
  1386. h = "holdings";
  1387. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1388. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1389. 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",
  1390. 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"),
  1391. 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=" +
  1392. g);
  1393. h = "holdings";
  1394. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1395. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1396. 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",
  1397. 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"),
  1398. 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=" +
  1399. g);
  1400. h = "multi_quests_info_close";
  1401. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1402. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1403. 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=" +
  1404. g);
  1405. h = "banner";
  1406. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1407. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1408. 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."),
  1409. 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);
  1410. h = "banner_designer_tutorial_1";
  1411. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1412. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1413. 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."),
  1414. 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);
  1415. h = "banner_designer_tutorial_2";
  1416. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1417. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1418. doLogEvent("ui triggered: ui_banner_designer_tutorial_3"), g = !0, d = "ui_banner_designer_tutorial_3",
  1419. !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);
  1420. h = "quest_boss_accept_q1_boss_blood_for_medicine";
  1421. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1422. c + "]");
  1423. 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);
  1424. h = "quest_choose_ss_q1_boss_blood_for_medicine";
  1425. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1426. if ((c == h || -1 != h.indexOf(",") &&
  1427. -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1428. 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",
  1429. 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);
  1430. h = "warparty_close";
  1431. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1432. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1433. 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."),
  1434. 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);
  1435. h = "boss_battle_tutorial_7";
  1436. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1437. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1438. doLogEvent("ui triggered: ui_boss_battle_tutorial_7"),
  1439. 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);
  1440. h = "boss_battle_tutorial_8";
  1441. doLogEvent("trigger_src=[" + h + "] event_name=[" +
  1442. c + "]");
  1443. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1444. 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.."),
  1445. 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);
  1446. h = "quest_close_q1_meet_the_bailiff, quest_close_q5_an_abrupt_end, quest_close_q1_boss_blood_for_medicine";
  1447. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1448. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1449. doLogEvent("ui triggered: ui_pt5_end_lorebook"),
  1450. 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 +
  1451. "" && (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),
  1452. !0 == g && (S = "chapters"), doLogEvent("after checks=" + g);
  1453. h = "holdings";
  1454. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1455. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1456. 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) ||
  1457. 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);
  1458. h = "quest_reward_alignment_mouseover_realm";
  1459. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1460. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1461. doLogEvent("ui triggered: quest_alignment_realm"), g = !0, d =
  1462. "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);
  1463. h = "quest_reward_alignment_mouseover_family";
  1464. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1465. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g,
  1466. "").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);
  1467. h = "quest_reward_alignment_mouseover_old_ways";
  1468. doLogEvent("trigger_src=[" +
  1469. h + "] event_name=[" + c + "]");
  1470. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1471. 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",
  1472. Y = !0, Z = "icons/alignment-old_ways-lg.png", aa = !0), doLogEvent("after checks=" + g);
  1473. h = "quest_reward_alignment_mouseover_new_ways";
  1474. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1475. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1476. 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."),
  1477. 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);
  1478. h = "quest_reward_alignment_mouseover_cunning";
  1479. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1480. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1481. 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."),
  1482. 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);
  1483. h = "quest_reward_alignment_mouseover_truthfulness";
  1484. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1485. if ((c == h || -1 != h.indexOf(",") && -1 != $.inArray(c, h.replace(/ /g, "").split(","))) && !0 != g)
  1486. 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."),
  1487. 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);
  1488. h = "quest_reward_alignment_mouseout";
  1489. doLogEvent("trigger_src=[" + h + "] event_name=[" + c + "]");
  1490. 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);
  1491. doLogEvent("uiEvent: firing=" +
  1492. g);
  1493. if (userContext.pauseEventTriggers && (!userContext.pauseEventTriggers || void 0 == userContext.pauseEventTriggers)) g = !1;
  1494. if (!0 == g) {
  1495. if (void 0 != O) for (obj in userContext.flags = [], userContext.playerData.stat) -1 != obj.indexOf("ui_flag_") && delete userContext.playerData.stat[String(obj)];
  1496. void 0 != G && (doLogEvent("uiEvent: set_flag = " + G), userContext.flags[G] = !0);
  1497. doLogEvent(" trigger_src=" + h + " event_name=" + c);
  1498. userContext.tooltipsEnabled = ca;
  1499. if (!1 == Q && void 0 == H && ($(".tuttip, .tuttip.tipbox").remove(), $(".tutarrow_wrap").remove(),
  1500. ba) || void 0 != H && (0 == M ? $(H).remove() : $(H).fadeOut(M, function() { $(this).remove(); }), ba)) return;
  1501. void 0 != S && doMenuSelect(S);
  1502. void 0 != p && dialogAlert({ style: "alert", text: p, heading: f, button1: m, symbol: D, image: void 0, image_width: void 0 });
  1503. void 0 != q && iosSignal(q, k);
  1504. if (void 0 != u || void 0 != C) {
  1505. void 0 == u && (u = "");
  1506. doLogEvent("uiEvent: display text: " + u);
  1507. var J = "", fa = void 0, da = void 0, ha = [];
  1508. b = "tuttip";
  1509. g = "block";
  1510. p = "auto";
  1511. void 0 != C && -1 != C.indexOf(",") && (C = C.replace(/ /g, "").replace(/"/g, "'").split(","));
  1512. "number" != typeof A &&
  1513. -1 != A.indexOf(",") && (A = A.split(","));
  1514. "number" != typeof B && -1 != B.indexOf(",") && (B = B.split(","));
  1515. if (0 < N || "" == u) g = "none";
  1516. 0 < I && (p = I + "px");
  1517. T ? b += " tipbox" : Y && (b += " tipbox image_tip");
  1518. aa && (b += " tip_high");
  1519. J += '<div id="tip_' + d + '" class="' + b + '" style="width:' + z + "px; height: " + p + "; top: " + y + "px; left: " + w + "px; display: " + g + '">';
  1520. !T && (!Y && "" != u) && (J += '<span class="tuttipbg"></span><p>' + u);
  1521. 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(\'' +
  1522. R + '\'); return false;"><span class="btnedge"><a class="btnbrown"><span></span>More</a></span></span>');
  1523. 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>');
  1524. void 0 != T && (void 0 == U ? console.warn("NPC portrait for tooltip has no NPC specified.") :
  1525. (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>'),
  1526. J += "\t\t</div>", J += "\t</div>", J += "</div>"));
  1527. 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(\'' +
  1528. R + '\'); return false;"><span class="btnedge"><a class="btnbrown"><span></span>More</a></span></span>'), J += "\t\t</div>", J += "\t</div>", J += "</div>"));
  1529. var J = J + "</div>",
  1530. ga = function(a) {
  1531. switch (void 0 == a ? C : C[a]) {
  1532. case "left":
  1533. return "tutarrowl";
  1534. case "right":
  1535. return "tutarrowr";
  1536. case "top":
  1537. return "tutarrowt";
  1538. case "bottom":
  1539. return "tutarrowb";
  1540. case "bottom_left":
  1541. return "tutarrowbl";
  1542. case "bottom_right":
  1543. return "tutarrowbr";
  1544. case "top_right":
  1545. return "tutarrowtr";
  1546. case "top_left":
  1547. return "tutarrowtl";
  1548. }
  1549. },
  1550. ia = function(a, b, c, f) {
  1551. if (void 0 !=
  1552. 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;
  1553. };
  1554. $.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]));
  1555. doLogEvent("DBG: CURRENT DOM length=" + $(s));
  1556. $(s).prepend(J);
  1557. setTimeout(function() {
  1558. 0 == $("#tip_" + d).length &&
  1559. (ea = setInterval(function() { 1 == $(s).length && (clearInterval(ea), $(s).prepend(J)); }, 500));
  1560. }, 500);
  1561. 0 < N && $("#tip_" + d).fadeIn(N);
  1562. 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"));
  1563. }
  1564. }
  1565. } else isIpad() && 200 > mobileVersion ? uiEventSignalLegacy(c) : uiEventSignal(c);
  1566. };
  1567. log("Start analyzing user interface event function.", "initialize");
  1568.  
  1569. doAdventure = function doAdventure(c, a, b, callback) {
  1570. //console.debug("First passed parameter: ", c);
  1571. // EXTENDER : Modfification
  1572. if (userContext.setSwornSword && userContext.setSwornSword.damage && userContext.setSwornSword.damage == 4) {
  1573. warn("Sworn sword has 4 wounds. Adventure will not continue.");
  1574. return;
  1575. }
  1576.  
  1577. //console.debug("Logging parameters of doAdventure: ", c, a, b);
  1578.  
  1579. if (void 0 != userContext.setSwornSword && void 0 != userContext.setSwornSword.batch_type && 0 != userContext.setSwornSword.batch_type)
  1580. return 1 == userContext.setSwornSword.batch_type && (!1 == b && prepareAdvPartyTimeout(), $.ajax({
  1581. url: "/play/batch_set_sworn_sword_target?batch_type=1&ss_id=" + userContext.setSwornSword.id + "&batch_action=" + a + "&target_symbol=" + c,
  1582. dataType: "JSON",
  1583. success: function(a) {
  1584. questClose();
  1585. showAdvPartyResponse(a);
  1586. uiEvent("ss_adventure_party");
  1587. return !0;
  1588. },
  1589. error: function(b) {
  1590. 400 ==
  1591. b.status ? advPartyFail() : 409 == b.status ? setTimeout(function() { doAdventure(c, a, !0); }, 5E3) : spinTimeout();
  1592. }
  1593. })), !1;
  1594. $.ajaxQueue({
  1595. url: "/play/adventure/" + userContext.setSwornSword.id + "?action_name=" + a + "&symbol=" + c,
  1596. dataType: "JSON",
  1597. success: function(b) {
  1598. //analytics.track("Adventure Start", { adventure_region: b.location, adventure_action: a, adventure_swornsword_id: userContext.setSwornSword.id, adventure_swornsword_level: userContext.setSwornSword.ugprade_level });
  1599. //analytics.wizardtrack("Adventure Start", {
  1600. // adventure_region: b.location,
  1601. // adventure_action: a,
  1602. // adventure_swornsword_id: userContext.setSwornSword.id,
  1603. // adventure_swornsword_level: userContext.setSwornSword.ugprade_level
  1604. //});
  1605.  
  1606. adventureProgress(userContext.setSwornSword.id, b);
  1607. uiEvent("do_adventure");
  1608. "1" == userContext.playerData.stat.onboarding_ftue && uiTelemetry("ss_adventure");
  1609.  
  1610. // EXTENDER :: Modification
  1611. if (typeof callback == "function" && b.symbol) {
  1612. callback();
  1613. }
  1614. }
  1615. });
  1616. };
  1617. log("Don't do adventure if sworn sword is about to die. Call callback when ready (bruting).", "initialize");
  1618.  
  1619. playSound = function playSound(a, d) {
  1620. if (!1 != doSound())
  1621. if ($.browser.msie || doLog("playSound [1]: " + a), !1 == soundEnabled) $.browser.msie || doLog("playSound [1]: sound disabled");
  1622. else {
  1623. void 0 == d && (d = 0);
  1624. musicMuted = userContext.mute_music;
  1625. soundMuted = userContext.mute_sound;
  1626. try {
  1627. if (-1 != a.indexOf("voice-") && ($.browser.msie || doLog("play voiceover"), soundMapChannel[a] = "voice"), theUrl = soundMap[a], void 0 == soundMapChannel[a] && (soundMapChannel[a] = "channel1"), isWeb()) {
  1628. if ($.browser.msie || doLog("playSound[2]: " +
  1629. a + " soundReady=" + soundReady), !0 == soundReady) {
  1630. $.browser.msie || doLog("soundReady: " + soundMapChannel[a]);
  1631. play_it = !0;
  1632. if ("music" == soundMapChannel[a]) {
  1633. if (0 == musicVolume || !0 == musicMuted) play_it = !1;
  1634. vol = musicVolume;
  1635. $.browser.msie || doLog("MUSIC vol=" + vol);
  1636. } else {
  1637. if (0 == soundVolume || !0 == soundMuted) play_it = !1;
  1638. vol = soundVolume;
  1639. $.browser.msie || doLog("SOUND vol=" + vol);
  1640. }
  1641. if ("channel1" == soundMapChannel[a] || "channel2" == soundMapChannel[a] || "channel3" == soundMapChannel[a] || "channel4" == soundMapChannel[a] ||
  1642. "channel5" == soundMapChannel[a] || "music" == soundMapChannel[a] || "voice" == soundMapChannel[a] || "voice2" == soundMapChannel[a])
  1643. if (!0 == soundChannel[soundMapChannel[a]]) $.browser.msie || doLog("Sound channel busy: " + soundMapChannel[a] + " playing=" + soundActive[a]), "music" == soundMapChannel[a] && currentMusic != a && (doLog("switch to new music"), soundCrossFade("music", vol, function() { playSound(a, d); }));
  1644. else if (sound_url = assetUrl() + theUrl, $.browser.msie || doLog("SOUND: play_it=" + play_it), !0 != play_it)
  1645. $.browser.msie ||
  1646. doLog("SOUND: returning");
  1647. else {
  1648. "music" == soundMapChannel[a] && (doLog("currentMusic = " + currentMusic), currentMusic = a);
  1649. $.browser.msie || doLog("SOUND: createSound");
  1650. soundObject = soundManager.createSound({
  1651. id: soundMapChannel[a],
  1652. url: theUrl,
  1653. volume: vol,
  1654. onfinish: function() {
  1655. $.browser.msie || doLog("soundObject.onfinish: id=" + a + " soundMapChannel=" + soundMapChannel[a]);
  1656. soundChannel[soundMapChannel[a]] = !1;
  1657. soundManager.destroySound(soundMapChannel[a]);
  1658. "music" == soundMapChannel[a] && (0 < musicVolume && !0 !=
  1659. userContext.mute_music) && playSound(a);
  1660. }
  1661. });
  1662. if (null == soundObject || void 0 == soundObject) $.browser.msie || doLog("soundObject: invalid");
  1663. !0 == play_it && (soundChannel[soundMapChannel[a]] = !0, soundActive[soundMapChannel[a]] = sound_url, soundManager.getSoundById(soundMapChannel[a]).setVolume(vol), 0 < d ? setTimeout(soundObject.play, d) : ($.browser.msie || doLog("soundObject.play: [" + soundMapChannel[a] + "] " + soundActive[soundMapChannel[a]]), soundObject.play()));
  1664. }
  1665. else
  1666. 0 < vol && ($.browser.msie || doLog("playing [3]: [" +
  1667. soundMapChannel[a] + "] vol=" + vol), soundManager.getSoundById(soundMapChannel[a]).setVolume(vol), soundManager.getSoundById(soundMapChannel[a]).volume = vol, soundManager.play(a));
  1668. }
  1669. } else iosSignal("playsound", soundMapChannel[a] + ":" + soundMap[a].substring(soundMap[a].lastIndexOf("/") + 1) + ":" + d);
  1670. } catch (e) {
  1671. $.browser.msie || doLog("playSound exception: " + e);
  1672. }
  1673. }
  1674. };
  1675. log("Cleared playSound from console logging.", "initialize");
  1676.  
  1677. submitWorldEventAction = function submitWorldEventAction(c, a, b) {
  1678. console.debug("Submitting world event action, " +
  1679. "sworn sword id: " + c + ", order: " + a + ", weakness attack? " + b);
  1680.  
  1681. showSpinner();
  1682. data = { sworn_sword_id: c, order: a };
  1683. !0 == b && (data.weakness_attack = b);
  1684. $.ajax({
  1685. url: "/play/world_event_attack",
  1686. data: data,
  1687. complete: function() {
  1688. hideSpinner();
  1689. },
  1690. success: function(a) {
  1691. console.debug("Logging response from the server for sending the sworn sword: ", b);
  1692.  
  1693. hideSpinner();
  1694. a.error && doAlert("Error Sending Swornsword", formatWorldEventError(a.error, a.error_code));
  1695. a.swornsword && (insertInventoryFromItem(userContext.playerData.inventory, a.swornsword), doItemCooldown(a.swornsword));
  1696. a.challenge && updateWorldEventChallenge(a.challenge);
  1697. !0 == a.show_outmaneuver_alert &&
  1698. dialogAlert({ style: "alert", text: "The order you just sent is guaranteed to critically hit and will have a bonus chance to find a weakness.", heading: "", button1: "Okay" });
  1699. }
  1700. });
  1701. };
  1702. log("Analyzing world event action.", "initialize");
  1703.  
  1704. getWorldEventAttackResults = function getWorldEventAttackResults(c, a, loop) {
  1705. console.debug("Getting world event attack result, " +
  1706. "sworn sword id: " + c + ", refresh? " + a + " and then loop? " + loop);
  1707.  
  1708. showSpinner();
  1709. $.ajax({
  1710. url: "/play/world_event_attack_results",
  1711. data: { sworn_sword_id: c },
  1712. complete: function() {
  1713. hideSpinner();
  1714. },
  1715. success: function(b) {
  1716. hideSpinner();
  1717.  
  1718. console.debug("Logging response from the server from world event attack: ", b);
  1719. console.debug("Got response, repeat event condition: " +
  1720. "loop? " + loop + ", response contains sworn sword? " + (b.swornsword) + ", response contains an action parameter? " + (b.action));
  1721.  
  1722. if (loop && b.swornsword && b.action) {
  1723. submitWorldEventAction(b.swornsword.id, b.action, false);
  1724. console.debug("Submit a new world event action with parameters: ", b.swornsword.id, b.action, false);
  1725. }
  1726.  
  1727. b.error
  1728. ? doAlert("Error Getting Results", formatWorldEventError(b.error, b.error_code))
  1729. : (b.swornsword && (insertInventoryFromItem(userContext.playerData.inventory, b.swornsword), doItemCooldown(b.swornsword)),
  1730. b.character && (userContext.playerData.stat.level_progress = b.xp_after, userContext.playerData.character = b.character,
  1731. infoBar(userContext.playerData, userContext.playerData.inventory)), isWeb() ? (b = _.template('<div class="modalbg"></div><div class="contentframe1" style="top:44px; z-index:22;"><div class="contentframe2"><div class="contentframe3"><div class="contentframe4"><span class="corner tl"></span><span class="corner tr"></span><a class="closebtn" onclick="closeWorldEventAttackResults();">close</a> <h2 class="alertheader"><%= translateString(\'we_order_completed\') %></h2> <div class="alertcontents"> <div class="alertbox"> <div class="alertboxinner"> <div class="weinforow"> <%= itemMiniView(data.swornsword) %> <% if(data.wounds > 0) { %> <div class="orderwound">Wounded</div> <% } %> <div class="bossopttop"> <div class="bossoptbtn"> <span class="btnwrap btnlg"><span class="btnedge"><a class="btnbrown"> \x3c!-- Selected button is brown --\x3e <span><img src="<%= assetUrl() %>/images/content/talent/<%=data.action%>.png" /></span> <strong><%= translateString(data.action) %></strong> <em><%= data.label %></em> </a></span></span> <div class="challengebar"> <div class="challengeicon"></div> <div class="challenge-outer challengelose"> <div style="width:<%= data.cr %>%;" class="challenge-yours"></div> <div style="width:<%=100 - data.cr%>%;" class="challenge-target"></div> </div> </div> </div> </div> </div> <% if(data.outcome > 0) { %> <h3 class="challengerewardhead-success">Success!</h3> <% } else { %> <h3 class="challengerewardhead-lose">Failure!</h3> <% } %> <div class="weinforow orderresult"> <p><%= data.damage %> Damage Dealt</p> <% if(data.xp_after > data.xp_before) { %> <%= xpReward(data.xp_before, data.xp_after) %> <% } %> <div class="weinforow"> <div class="weinfo"><%= data.text %></div> </div> </div> </div> </div> </div> <div class="alertbtm"> <% if(data.can_repeat) { %> <span class="btnwrap btnlg" onclick="submitWorldEventAction(<%=data.swornsword.id%>,\'<%=data.action%>\');closeWorldEventAttackResults();"><span class="btnedge"><a class="btngold">Repeat</a></span></span> <% } %> <span class="btnwrap btnlg" onclick="closeWorldEventAttackResults();"><span class="btnedge"><a class="btngold">Close</a></span></span> </div></div></div></div></div>',
  1732. { data: b }), $(".weordercomplete").html(b).show()) : iosSignal("we", "viewSSResult", b), a && refreshWorldEventChallenge());
  1733. }
  1734. });
  1735. };
  1736. log("Logging information from world event action.", "initialize");
  1737.  
  1738. charCharacterTab = function charCharacterTab() {
  1739. $(".lineage").hide();
  1740. playerData = userContext.focusData;
  1741. //console.debug("Logging player data: ", playerData);
  1742. markup = "";
  1743. markup += '\t\t\t\t<div class="stoneridge" id="charactertop">';
  1744. markup += '\t\t\t\t\t<div class="left35">';
  1745. markup += '\t\t\t\t\t\t<div class="charframe">';
  1746. markup += '\t\t\t\t\t\t\t<div class="portraitimage"><img src="' + playerData.portrait_pic + '" /></div>';
  1747. markup += '\t\t\t\t\t\t\t<div id="character_sheet_portrait" class="charframe-lg"></div>';
  1748.  
  1749. // EXTENDER :: Modification
  1750. markup += formatStats(playerData.got_battle, playerData.got_trade, playerData.got_intrigue, playerData.level);
  1751.  
  1752. 0 < playerData.id && playerData.id == userContext.playerData.character.id && (markup +=
  1753. '\t\t\t\t\t\t\t<a class="lineagebtn" onclick="lineageIncarnationsPage();"></a>');
  1754. markup += "\t\t\t\t\t\t</div>";
  1755. markup += '\t\t\t\t\t\t<div class="charnameoverlay">';
  1756. if (userContext.focusData.user_id == userContext.playerData.character.user_id) {
  1757. var c = playerData.title + " ";
  1758. if ("male" == userContext.playerData.strings.gender) {
  1759. if (1 < userContext.playerData.strings.eligible_titles_male.length) {
  1760. c = "";
  1761. markup += '\t\t\t\t\t\t\t<div class="selectwrap">';
  1762. markup += "\t\t\t\t\t\t\t\t<select id=\"selecttitle\" onchange=\"$('#portrait_name > em').html($('#selecttitle').val());return setTitle('selecttitle',characterModal);\">";
  1763. for (var a = 0; a < userContext.playerData.strings.eligible_titles_male.length; a++) selected = "", playerData.title == userContext.playerData.strings.eligible_titles_male[a].title && (selected = "selected"), markup += "<option " + selected + ">" + userContext.playerData.strings.eligible_titles_male[a].title + "</option>";
  1764. markup += "\t\t\t\t\t\t\t\t</select>";
  1765. markup += "\t\t\t\t\t\t\t</div>";
  1766. }
  1767. } else if ("female" == userContext.playerData.strings.gender && 1 < userContext.playerData.strings.eligible_titles_female.length) {
  1768. markup += '\t\t\t\t\t\t\t<div class="selectwrap">';
  1769. markup += "\t\t\t\t\t\t\t\t<select id=\"selecttitle\" onchange=\"$('#portrait_name > em').html($('#selecttitle').val());return setTitle('selecttitle',characterModal);\">";
  1770. c = "";
  1771. for (a = 0; a < userContext.playerData.strings.eligible_titles_female.length; a++) selected = "", playerData.title == userContext.playerData.strings.eligible_titles_female[a].title && (selected = "selected"), markup += "<option " + selected + ">" + userContext.playerData.strings.eligible_titles_female[a].title + "</option>";
  1772. markup += "\t\t\t\t\t\t\t\t</select>";
  1773. markup += "\t\t\t\t\t\t\t</div>";
  1774. }
  1775. markup += "\t\t\t\t\t\t\t<h3><em>" + c + "</em>" + playerData.name + "</h3>";
  1776. markup += "\t\t\t\t\t\t</div>";
  1777. markup += "\t\t\t\t\t</div>";
  1778. markup += '\t\t\t\t\t<div class="center30">';
  1779. markup += '\t\t\t\t\t\t<div class="holdingsname">';
  1780. playerData.holdings && (markup += "\t\t\t\t\t\t\t<h3>Holdings:</h3>", markup += '\t\t\t\t\t\t\t<input id="holdings_name" type="text" value="' + playerData.holdings + '" onchange="renameHoldings();"/>');
  1781. } else
  1782. markup += ' <span class="btnwrap btnmed" id="ptpbtn" style="position: absolute; top: -200px; width: 200px; left: -10px"><span class="btnedge"><a class="btnbrown" onclick="return pvpStartWithTarget(' +
  1783. playerData.id + ');"><span></span>Player to Player</a></span></span>', markup += ' <span class="btnwrap btnmed frnd-none" id="friendbtn" style="display:none;"><span class="btnedge"><a class="btnbrown" onclick="$(\'.frnd-none\').fadeOut(\'slow\',function(){ $(\'.frnd-pending\').show(); });friendSendRequest(' + playerData.user_id + ');"><span></span>Add</a></span></span>', markup += ' <span class="btnwrap btnmed frnd-friends" id="friendbtn" style="display:none;"><span class="btnedge"><a class="btnbrown" onclick="$(\'.frnd-friends\').fadeOut(\'slow\',function(){ $(\'.frnd-none\').show(); });friendRemove(' +
  1784. playerData.user_id + ');"><span></span>Remove</a></span></span>', markup += ' <span class="btnwrap btnmed frnd-pending" id="friendbtn" style="display:none;"><span class="btnedge"><a class="btnbrown"><span></span>Pending</a></span></span>', c = playerData.title_and_name, c = c.replace(playerData.title, "<em>" + playerData.title + "</em>"), c = c.replace(playerData.name, "<h3>" + playerData.name + "</h3>"), markup += c, markup += "\t\t\t\t\t\t</div>", markup += "\t\t\t\t\t</div>", markup += '\t\t\t\t\t<div class="center30">',
  1785. markup += '\t\t\t\t\t\t<div class="holdingsname">', markup += "\t\t\t\t\t\t\t<h3>Holdings:</h3>", markup += "\t\t\t\t\t\t\t<h2>" + playerData.holdings + "</h2>";
  1786. markup += "\t\t\t\t\t\t</div>";
  1787. markup += '\t\t\t\t\t\t<div class="reviewfealty">\t';
  1788. void 0 != playerData.fealty && (markup += ' <div class="reviewcircle">', markup += ' <a class="icon-book" onclick="lorePage(\'house_' + playerData.fealty.toLowerCase() + "')\"></a>", markup += ' <img style="margin: 7px" img src="' +
  1789. assetUrl() + "/images/banner-" + playerData.fealty.toLowerCase() + '-lg.png?t=b8e2c654bf59"></img>', markup += " </div>");
  1790. markup += "\t\t\t\t\t\t</div>";
  1791. markup += '\t\t\t\t\t <div class="reviewbackground">\t';
  1792. void 0 != playerData.background_option && (markup += '\t\t\t\t\t\t\t<div class="reviewcircle ' + playerData.background_option + '">', markup += '\t\t\t\t\t\t\t\t<a class="icon-book" onclick="lorePage(\'background-' + playerData.background_option + "');\"></a>", markup += "\t\t\t\t\t\t\t</div>");
  1793. markup +=
  1794. "\t\t\t\t\t\t</div>";
  1795. userContext.focusData.user_id != userContext.playerData.character.user_id && (markup += '\t\t\t\t\t\t<div class="charequipment">', markup += "\t\t\t\t\t\t\t<h3>Equipment</h3>", markup = null == playerData.weapon ? markup + '\t\t\t\t\t\t<div class="iconview iconview-weapon" ></div>' : markup + itemIconView(playerData.weapon, "inventoryDisplayStatsWithTab", "iconview-weapon"), markup = null == playerData.armor ? markup + ' <div class="iconview iconview-armor" ></div>' : markup + itemIconView(playerData.armor,
  1796. "inventoryDisplayStatsWithTab", "iconview-armor"), markup = null == playerData.companion ? markup + ' <div class="iconview iconview-companion" ></div>' : markup + itemIconView(playerData.companion, "inventoryDisplayStatsWithTab", "iconview-companion"), markup += "\t\t\t\t\t\t</div>", markup += '<span class="btnwrap btnlg" style="position: relative; left: -285px; margin-top: 230px; z-index: 1" onclick="return contactPlayer(' + playerData.id + ",'" + escape(playerData.name) + '\')"><span class="btnedge"><a class="btngold"><span></span>Send a Raven</a></span></span>');
  1797. playerData.alliance_name && (markup += '\t\t\t\t\t\t\t<div style="position:relative; top:-30px; z-index: 1"><h3>Alliance:</h3>', markup += '\t\t\t\t\t\t\t<a href="#" onclick="return allianceInfo(' + playerData.alliance_id + ')">' + playerData.alliance_name + "</a></div>");
  1798. markup += "\t\t\t\t\t</div>";
  1799. markup += '\t\t\t\t\t<div class="right35">';
  1800. markup += '\t\t\t\t\t\t<div class="charframe">';
  1801. markup += '\t\t\t\t\t\t\t<div class="portraitimage"></div>';
  1802. markup += '\t\t\t\t\t\t\t<div class="charframe-lg"></div>';
  1803. markup += '\t\t\t\t\t\t\t<div class="charbanner-lg" style="margin-left: -7px;"><img src="' +
  1804. playerData.banner + '" /></div>';
  1805. markup += '\t\t\t\t\t\t\t<div class="bannerpole-lg"></div>';
  1806. userContext.focusData.user_id == userContext.playerData.character.user_id && (markup += '\t\t\t\t\t\t\t<div class="editbanneroverlay">', markup += '\t\t\t\t\t\t\t\t<span class="btnwrap btnmed" id="editbtn"><span class="btnedge"><a class="btnbrown" onclick="return bannerDesigner();"><span></span>Edit</a></span></span>', markup += "\t\t\t\t\t\t\t</div>");
  1807. markup += "\t\t\t\t\t\t</div>";
  1808. markup += "\t\t\t\t\t</div>";
  1809. markup += '\t\t\t\t\t<div class="stoneridgebtm"></div>';
  1810. markup += "\t\t\t\t</div>";
  1811. markup += '\t\t\t\t<div class="chargenbox" id="alignment">';
  1812. markup += '\t\t\t\t\t<div class="marbletop oldways realm crafty">';
  1813. markup += "\t\t\t\t\t\t<h3>Alignment</h3>";
  1814. markup += '\t\t\t\t\t\t<div class="alignmenttabs">';
  1815. markup += "\t\t\t\t\t\t\t<a id=\"alignmenttab-tradition\" class=\"active\" onclick=\"$(this).siblings().removeClass('active');$(this).addClass('active');$('.alignmentbar').hide();$('#alignmentbar-tradition').show();\" onmouseover=\"return doTip('tip_alignment_tradition',function(){return renderAlignmentTip('tradition')});\" onmouseout=\"return noTip('tip_alignment_tradition');\"><span></span><em></em></a>";
  1816. markup += "\t\t\t\t\t\t\t<a id=\"alignmenttab-duty\" onclick=\"$(this).siblings().removeClass('active');$(this).addClass('active');$('.alignmentbar').hide();$('#alignmentbar-duty').show();\" onmouseover=\"return doTip('tip_alignment_duty',function(){return renderAlignmentTip('duty')});\" onmouseout=\"return noTip('tip_alignment_duty');\"><span></span><em></em></a>";
  1817. markup += "\t\t\t\t\t\t\t<a id=\"alignmenttab-integrity\" onclick=\"$(this).siblings().removeClass('active');$(this).addClass('active');$('.alignmentbar').hide();$('#alignmentbar-integrity').show();\" onmouseover=\"return doTip('tip_alignment_integrity',function(){return renderAlignmentTip('integrity')});\" onmouseout=\"return noTip('tip_alignment_integrity');\"><span></span><em></em></a>";
  1818. markup += "\t\t\t\t\t\t</div>";
  1819. markup += '\t\t\t\t\t\t<div id="alignmentbar-tradition" class="alignmentbar">';
  1820. markup += "\t\t\t\t\t\t\t<div class=\"alignmenticon-left\" onmouseover=\"return doTip('tip_alignment_old_ways',function(){return renderAlignmentTip('old_ways')});\" onmouseout=\"return noTip('tip_alignment_old_ways');\"></div>";
  1821. markup += "\t\t\t\t\t\t\t<div class=\"alignmenticon-right\" onmouseover=\"return doTip('tip_alignment_new_ways',function(){return renderAlignmentTip('new_ways')});\" onmouseout=\"return noTip('tip_alignment_new_ways');\"></div>";
  1822. markup += '\t\t\t\t\t\t\t<div class="aligncenter"></div>';
  1823. markup += '\t\t\t\t\t\t\t<div class="alignbar-left" style="width:30%;"><span></span></div>';
  1824. markup += '\t\t\t\t\t\t\t<div class="alignbar-right" style="width:5%;"><span></span></div>';
  1825. markup += '\t\t\t\t\t\t\t<p class="aligntext-left">Old Ways</p>';
  1826. markup += '\t\t\t\t\t\t\t<p class="aligntext-right">New Ways</p>';
  1827. markup += "\t\t\t\t\t\t</div>";
  1828. markup += '\t\t\t\t\t\t<div id="alignmentbar-duty" class="alignmentbar" style="display:none;">';
  1829. markup += "\t\t\t\t\t\t\t<div class=\"alignmenticon-left\" onmouseover=\"return doTip('tip_alignment_family',function(){return renderAlignmentTip('family')});\" onmouseout=\"return noTip('tip_alignment_family');\"></div>";
  1830. markup += "\t\t\t\t\t\t\t<div class=\"alignmenticon-right\" onmouseover=\"return doTip('tip_alignment_realm',function(){return renderAlignmentTip('realm')});\" onmouseout=\"return noTip('tip_alignment_realm');\"></div>";
  1831. markup += '\t\t\t\t\t\t\t<div class="aligncenter"></div>';
  1832. markup += '\t\t\t\t\t\t\t<div class="alignbar-left" style="width:45%"><span></span></div>';
  1833. markup += '\t\t\t\t\t\t\t<div class="alignbar-right" style="width:15%"><span></span></div>';
  1834. markup += '\t\t\t\t\t\t\t<p class="aligntext-left">Family</p>';
  1835. markup += '\t\t\t\t\t\t\t<p class="aligntext-right">Realm</p>';
  1836. markup += "\t\t\t\t\t\t</div>";
  1837. markup += '\t\t\t\t\t\t<div id="alignmentbar-integrity" class="alignmentbar" style="display:none;">';
  1838. markup += "\t\t\t\t\t\t\t<div class=\"alignmenticon-left\" onmouseover=\"return doTip('tip_alignment_cunning',function(){return renderAlignmentTip('cunning')});\" onmouseout=\"return noTip('tip_alignment_cunning');\"></div>";
  1839. markup += "\t\t\t\t\t\t\t<div class=\"alignmenticon-right\" onmouseover=\"return doTip('tip_alignment_truthful',function(){return renderAlignmentTip('truthful')});\" onmouseout=\"return noTip('tip_alignment_truthful');\"></div>";
  1840. markup += '\t\t\t\t\t\t\t<div class="aligncenter"></div>';
  1841. markup += '\t\t\t\t\t\t\t<div class="alignbar-left" style="width:25%"><span></span></div>';
  1842. markup += '\t\t\t\t\t\t\t<div class="alignbar-right" style="width:40%"><span></span></div>';
  1843. markup += '\t\t\t\t\t\t\t<p class="aligntext-left">Cunning</p>';
  1844. markup += '\t\t\t\t\t\t\t<p class="aligntext-right">Truthful</p>';
  1845. markup += "\t\t\t\t\t\t</div>";
  1846. markup += "\t\t\t\t\t</div>";
  1847. markup += "\t\t\t\t</div>";
  1848. markup += '\t\t\t\t<div id="alignment_tips">';
  1849. for (x = 0; x < alignmentData.length; x++)
  1850. markup +=
  1851. '<div id="tip_alignment_' + alignmentData[x].symbol + '" style="top: -240px; left: -130px; position: relative"></div>';
  1852. markup += " </div>";
  1853. markup += '\t\t\t\t<div class="chargenbox" id="activity">';
  1854. markup += '\t\t\t\t\t<div class="marbletop">';
  1855. markup += "\t\t\t\t\t\t<h3>Recent Activity</h3>";
  1856. if (void 0 == playerData.recent_activity) markup += " <p>No recent activity to display.</p>";
  1857. else if (0 == playerData.recent_activity.length) markup += " <p>No recent activity to display.</p>";
  1858. else {
  1859. for (a =
  1860. 0; a < playerData.recent_activity.length && 3 > a; a++) markup += '\t\t\t\t\t\t<p class="icon-' + playerData.recent_activity[a].type + '"><span style="width:27px;height:25px;"></span>' + playerData.recent_activity[a].text + "</p>";
  1861. 3 < playerData.recent_activity.length && (markup += '\t\t\t\t\t\t<span class="btnwrap btnmed" id="morebtn"><span class="btnedge"><a class="btnbrown" onclick="lineageMainModal(\'activities\');"><span></span>More</a></span></span>');
  1862. }
  1863. markup += "\t\t\t\t\t</div>";
  1864. markup += "\t\t\t\t</div>";
  1865. markup += '\t\t\t\t<div id="charbtmbar">';
  1866. markup += '\t\t\t\t\t<div class="househr"></div>';
  1867. markup += "\t\t\t\t</div>";
  1868. $("#chargenmain").removeClass("stats");
  1869. $("#chargenmain").html(markup);
  1870. userContext.focusData.user_id != userContext.playerData.character.user_id && $(".frnd-" + userContext.focusData.friend_status).show();
  1871. alignments = ["tradition", "integrity", "duty"];
  1872. tips_markup = "";
  1873. for (a = 0; a < alignments.length; a++)
  1874. alignment = -1 * playerData["got_" + alignments[a]], 0 < alignment ? ($("#alignmentbar-" + alignments[a] + " > .alignbar-left").css("width", alignment / 100 /
  1875. 2 + "%").show(), $("#alignmentbar-" + alignments[a] + " > .aligntext-left").css("color", "white"), $("#alignmentbar-" + alignments[a] + " > .aligntext-right").css("color", "#666"), $("#alignmentbar-" + alignments[a] + " > .alignbar-right").hide()) : 0 > alignment ? ($("#alignmentbar-" + alignments[a] + " > .alignbar-right").css("width", alignment / -100 / 2 + "%").show(), $("#alignmentbar-" + alignments[a] + " > .aligntext-right").css("color", "white"), $("#alignmentbar-" + alignments[a] + " > .aligntext-left").css("color", "#666"), $("#alignmentbar-" +
  1876. alignments[a] + " > .alignbar-left").hide()) : ($("#alignmentbar-" + alignments[a] + " > .aligntext-left").css("color", "white"), $("#alignmentbar-" + alignments[a] + " > .aligntext-right").css("color", "white"), $("#alignmentbar-" + alignments[a] + " > .alignbar-left").hide(), $("#alignmentbar-" + alignments[a] + " > .alignbar-right").hide());
  1877. uiEvent("character");
  1878. userContext.focusData.user_id == userContext.playerData.character.user_id && uiEvent("character_self");
  1879. };
  1880. log("Display additional info in the character tab.", "initialize");
  1881.  
  1882. inventoryDisplayStatsWithTab = function inventoryDisplayStatsWithTab(c, symbol) {
  1883. // EXTENDER :: Modification, useless junk,
  1884. // use this function as it appears to work better
  1885. c = extractItemById(playerInventory, c);
  1886. if (c && c.id == 0 && typeof symbol != "undefined") {
  1887. statViewFromMini(symbol);
  1888. return;
  1889. }
  1890.  
  1891. "unit" == c.slot
  1892. ? inventorySubTab("companion")
  1893. : inventorySubTab(c.slot);
  1894.  
  1895. inventoryDisplayStats(void 0, void 0, c, void 0, !0);
  1896. };
  1897. log("Use alternative function for item popup if the initial fails.", "initialize");
  1898.  
  1899. inventoryTab = function inventoryTab(c) {
  1900. $("#statview_container_right").html("");
  1901. $("#statview_container").html("");
  1902. $(".characterview").hide();
  1903. $("." + c + "view").show();
  1904. $("#swornswordstab_inner").removeClass("active");
  1905. $("#foodtab_inner").removeClass("active");
  1906. $("#charactertab_inner").removeClass("active");
  1907. $("#boonstab_inner").removeClass("active");
  1908. $("#resourcestab_inner").removeClass("active");
  1909. $("#sealtab_inner").removeClass("active");
  1910. $("#gearinvtab_inner").removeClass("active");
  1911. $("#companionsinvtab_inner").removeClass("active");
  1912.  
  1913. //EXTENDER :: Modification
  1914. $("#permanentitemstab_inner").removeClass("active");
  1915.  
  1916. $("#inventorybtm").removeClass("character");
  1917. $("#weapontab").hide();
  1918. $("#armortab").hide();
  1919. $("#companiontab").hide();
  1920. $("#swordcompaniontab").hide();
  1921. $("#inventory-listing").hide();
  1922. var a = [], b = void 0;
  1923.  
  1924. // EXTENDER :: Clarification
  1925. if ("character" == c) {
  1926. $("#inventorybtm").addClass("character");
  1927. $("#weapontab").show();
  1928. $("#armortab").show();
  1929. $("#companiontab").show();
  1930. equipContextPrefix = equipContextTarget = "character";
  1931. equipContextPosition = "right";
  1932. $("#inventory_toolbar_Weapon").show();
  1933. } else if ("swornswords" == c) {
  1934. $("#inventorybtm").addClass("character");
  1935. first_sworn = extractFirstSwornSword(playerInventory);
  1936. inventoryDisplayStatsRight(void 0, void 0, first_sworn);
  1937. $("#weapontab").show();
  1938. $("#armortab").show();
  1939. $("#swordcompaniontab").show();
  1940. equipContextPrefix = "item";
  1941. $("#inventory_toolbar").show();
  1942. b = "Sworn Sword";
  1943. a.push(b);
  1944. } else if ("boons" == c) {
  1945. first_boon = extractFirstBoon(playerInventory);
  1946. inventoryDisplayStatsRight(void 0, void 0, first_boon);
  1947. $("#inventory_toolbar").hide();
  1948. b = "Boon";
  1949. a.push(b);
  1950. } else if ("food" == c) {
  1951. first_consumable = extractFirstConsumable(playerInventory);
  1952. inventoryDisplayStatsRight(void 0, void 0, first_consumable);
  1953. $("#inventory_toolbar").hide();
  1954. b = "Consumable";
  1955. a.push(b);
  1956. } else if ("seal" == c) {
  1957. first_seal = extractFirstSeal(playerInventory);
  1958. inventoryDisplayStatsRight(void 0, void 0, first_seal);
  1959. $("#inventory_toolbar").hide();
  1960. b = "Seal";
  1961. a.push(b);
  1962. } else if ("resources" == c) {
  1963. first_resource = extractFirstTreasure(playerInventory);
  1964. inventoryDisplayStatsRight(void 0, void 0, first_resource);
  1965. $("#inventory_toolbar").hide();
  1966. b = "Treasure";
  1967. a.push(b);
  1968. } else if ("gearinv" == c) {
  1969. first_gearinv = extractFirstGear(playerInventory);
  1970. inventoryDisplayStatsRight(void 0, void 0, first_gearinv);
  1971. $("#inventory_toolbar").hide();
  1972. b = "Weapon, Armor";
  1973. a.push("Weapon");
  1974. a.push("Armor");
  1975. } else if ("companionsinv" == c) {
  1976. first_companionsinv = extractFirstCompanion(playerInventory);
  1977. inventoryDisplayStatsRight(void 0, void 0, first_companionsinv);
  1978. $("#inventory_toolbar").hide();
  1979. b = "Companion, Unit";
  1980. a.push("Companion");
  1981. a.push("Unit");
  1982. } else if ("permanentitems" == c) {
  1983. b = "pass please";
  1984. }
  1985.  
  1986. doLog("inventoryTab: category=" + c + " listing_slot=" + b);
  1987.  
  1988. //console.debug("Logging pre display of storage: ", a);
  1989.  
  1990. if (void 0 != b) {
  1991. initPagination(c, 6);
  1992.  
  1993. for (var d = !1, g = [], p = "", f = 0; f < playerInventory.length; f++) {
  1994. // EXTEDNER :: Modification, clarification
  1995. if (c === "permanentitems" && playerInventory[f].permanent_item) {
  1996. g.push(playerInventory[f]);
  1997. continue;
  1998. }
  1999.  
  2000. for (var m = 0; m < a.length; m++) {
  2001. if (playerInventory[f].slot == a[m]) {
  2002. g.push(playerInventory[f]);
  2003. }
  2004. }
  2005. }
  2006.  
  2007. 0 == g.length && (d = !0);
  2008.  
  2009. //console.debug("Logging array to be displayed: ", g);
  2010.  
  2011. p += "<div id='mv_container'></div>";
  2012.  
  2013. "character" == c
  2014. ? $("#inventory-listing").html(p).hide()
  2015. : !0 == d ? "swornswords" == c
  2016. ? $("#inventory-listing").html('You have no sworn swords. Visit the <a class="shop_link" href="#" onclick="return shopModal();">shop</a> to hire one.').show()
  2017. : "food" == c
  2018. ? $("#inventory-listing").html('You have no Food. Visit the <a class="shop_link" href="#" onclick="return shopModal();">shop</a> to purchase some.').show()
  2019. : "boons" == c
  2020. ? $("#inventory-listing").html('You have no Boons. Visit the <a class="shop_link" href="#" onclick="return shopModal();">shop</a> to purchase one.').show()
  2021. : "seal" == c
  2022. ? $("#inventory-listing").html("You have no Seals. Earn seals from PtP.").show()
  2023. : "gearinv" == c
  2024. ? $("#inventory-listing").html('You have no Gear. Visit the <a class="shop_link" href="#" onclick="return shopModal();">shop</a> to purchase some.').show()
  2025. : "companionsinv" == c
  2026. && $("#inventory-listing").html('You have no Companions. Visit the <a class="shop_link" href="#" onclick="return shopModal();">shop</a> to purchase some.').show()
  2027. : $("#inventory-listing").html(p).show();
  2028.  
  2029. d || (
  2030. $.each(g, function(a, b) {
  2031. addPageItem(c);
  2032. itemMiniView(b, {
  2033. callback: inventoryDisplayStatsRight,
  2034. extra_styles: pageStyle(c),
  2035. extra_class: pageClass(c)
  2036. }, "#mv_container");
  2037. }),
  2038. $("#mv_container").append(bookPageNumbers(c))
  2039. );
  2040. }
  2041.  
  2042. $("#" + c + "tab_inner").addClass("active");
  2043. void 0 != b && pageBegin(c);
  2044. };
  2045. log("Render permanent items.", "initialize");
  2046.  
  2047. inventoryModal = function inventoryModal(c, a) {
  2048. closeUpgradePanel();
  2049. uiTelemetry("inventory");
  2050. void 0 == c ? (c = {}, c.storage = a, c.content_loading = !0, showSpinner(), $.ajaxq("gotAjaxQueue", { url: "/play/player_data?client_seqnum=" + userContext.player_data_seqnum, dataType: "JSON", success: function(b) { inventoryModal(b, a); } })) : (c.content_loading = !1, hideSpinner(), setupPlayerData(c, void 0), inventoryTab("character"));
  2051. c.storage = a;
  2052. c.allowseals = !0;
  2053. var permanentsTab =
  2054. '<span onclick="return clickInventoryTab(\'permanentitems\');" id="permanentitemstab" class="inventorytabwrap">' +
  2055. '<span class="inventorytabedge">' +
  2056. '<a id="permanentitemstab_inner" class="inventorytab">' +
  2057. '<span></span>' +
  2058. 'Permanent' +
  2059. '<em></em>' +
  2060. '</a></span></span>';
  2061.  
  2062. var b = _.template('<div id="modalwrap" class="modal690" style="display:block"><div class="contentframe1" id="content_character_view-inventory">\t<div class="contentframe2">\t\t<div class="contentframe3">\t\t\t<div class="contentframe4">\t\t\t<div class="stonecurve" id="stonecurve-l">\t\t\t\t<span></span>\t\t\t</div>\t\t\t<div class="stonecurve" id="stonecurve-r">\t\t\t\t<span></span>\t\t\t</div>\t\t\t<div class="infobar">\t\t\t\t<div class="infobarpattern"></div>\t\t\t<%\t\t\tif(data.storage)\t\t\t%>\t\t\t\t<h2><%= translateString(\'ui_storage\') %></h2>\t\t\t<%\t\t\telse\t\t\t{\t\t\t%>\t\t\t\t<h2><%= translateString(\'your_character\') %></h2>\t\t\t<%\t\t\t}\t\t\t%>\t\t\t\t<span class="barbtmedge"></span>\t\t\t\t<span class="corner tl"></span>\t\t\t\t<span class="corner tr"></span>\t\t\t\t<a class="closebtn" onclick="return clickCloseInventory();">\t\t\t\t\t<%= translateString(\'close\') %>\t\t\t\t</a>\t\t\t</div>\t\t\t<%\t\t\tif(!data.content_loading)\t\t\t{\t\t\t%>\t\t\t\t<div class="tabbedheading">\t\t\t\t\t<div class="inventorytabs">\t\t\t\t\t\t<%\t\t\t\t\t\tif(data.storage)\t\t\t\t\t\t{\t\t\t\t\t\t%>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="resourcetab"><span class="inventorytabedge""><a id="resourcestab_inner" class="inventorytab" onclick="clickInventoryTab(\'resources\');"><span></span><%= translateString(\'resource_tab_label\') %><em></em></a></span></span>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="boonstab" onclick="return clickInventoryTab(\'boons\');"><span class="inventorytabedge"><a class="inventorytab" id="boonstab_inner"><span></span><%= translateString(\'ui_ss_boons\') %><em></em></a></span></span>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="foodtab" onclick="return clickInventoryTab(\'food\');"><span class="inventorytabedge"><a class="inventorytab" id="foodtab_inner"><span></span><%= translateString(\'ui_char_food\') %><em></em></a></span></span> <% if(data.allowseals) { %> <span class="inventorytabwrap" id="sealtab" onclick="return clickInventoryTab(\'seal\');"><span class="inventorytabedge"><a class="inventorytab" id="sealtab_inner"><span></span><%= translateString(\'ui_char_seal\') %><em></em></a></span></span> <span class="inventorytabwrap" id="gearinvtab" onclick="return clickInventoryTab(\'gearinv\');"><span class="inventorytabedge"><a class="inventorytab" id="gearinvtab_inner"><span></span><%= translateString(\'ui_char_gear\') %><em></em></a></span></span> <span class="inventorytabwrap" id="companionsinvtab" onclick="return clickInventoryTab(\'companionsinv\');"><span class="inventorytabedge"><a class="inventorytab" id="companionsinvtab_inner"><span></span><%= translateString(\'ui_char_companions\') %><em></em></a></span></span>' + permanentsTab + ' <% } %>\t\t\t\t\t\t<%\t\t\t\t\t\t}\t\t\t\t\t\telse\t\t\t\t\t\t{\t\t\t\t\t\t%>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="armortab" style="right: 0px" onclick="return clickInventoryTab(\'character\');"><span class="inventorytabedge"><a class="inventorytab active" id="charactertab_inner"><span></span><%= translateString(\'equipment\') %><em></em></a></span></span>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="charactertab" onclick="return characterModal(undefined, characterMainModal, true);"><span class="inventorytabedge"><a id="charactertab_inner" class="inventorytab"><span></span><%= translateString(\'mainmenu_character\') %><em></em></a></span></span>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="pactstab"><span class="inventorytabedge"><a class="inventorytab" id="pactstab_inner" onclick="return characterModal(undefined, pactsModal, true);"><span></span><%= translateString(\'pacts_and_influence\') %><em></em></a></span></span>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="statstab"><span class="inventorytabedge"><a class="inventorytab" id="statstab_inner" onclick="return characterModal(undefined, statsModal, true);"><span></span><%= translateString(\'stats\') %><em></em></a></span></span>\t\t\t\t\t\t\t<span class="inventorytabwrap" id="achievementstab"><span class="inventorytabedge"><a class="inventorytab" id="achievementstab_inner" onmouseover="return setTooltip(\'achievementstab_inner\',\'achievements\');" onclick="return characterModal(undefined, achievementsModal, true);"><span></span><%= translateString(\'achievements\') %><em></em></a></span></span>\t\t\t\t\t\t<%\t\t\t\t\t\t}\t\t\t\t\t\t%>\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t\t<div class="inventorycontent">\t\t\t\t\t<div id="statview_container_right"></div>\t\t\t\t\t\t<div class="darkroundedbox miniviewmenu-inventory" id="inventory-listing" style="display:none">\t\t\t\t\t\t</div>\t\t\t\t\t\t<div class="characterview">\t\t\t\t\t\t\t<div class="characterviewname"><h3><%= data.strings.title_and_name%></div>\t\t\t\t\t\t\t<div class="characterviewimg">\t\t\t\t\t\t\t\t<img src="<%= userContext.playerData.strings.portrait_pic %>" width="170">\t\t\t\t\t\t\t\t<span class="characterviewframe"></span>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t<div class="characterviewstats">\t\t\t\t\t\t\t\t<span class="battlebonus"><span></span><var id="char_battlebonus" class="battle_val"><%= userContext.playerData.character.got_battle %></var></span>\t\t\t\t\t\t\t\t<span class="tradebonus"><span></span><var id="char_tradebonus" class="trade_val"><%= userContext.playerData.character.got_trade %></var></span>\t\t\t\t\t\t\t\t<span class="intriguebonus"><span></span><var id="char_intriguebonus" class="intrigue_val"><%= userContext.playerData.character.got_intrigue %></var></span>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t<div class="characterviewinfo">\t\t\t\t\t\t\t\t<span id="chartalentbtn" class="btnwrap btnxxl" onclick="talentsModal();">\t\t\t\t\t\t\t\t\t<span class="btnedge">\t\t\t\t\t\t\t\t\t\t<a class="btngold">\t\t\t\t\t\t\t\t\t\t\t<span></span><%= translateString(\'talents\') %>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<%\t\t\t\t\t\t\t\t\t\t\tif(data.character.talents_earned>0)\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t%>\t\t\t\t\t\t\t\t\t\t\t\t<strong><%= data.character.talents_earned%><%= translateString(\'ui_char_point\') %><%if(data.character.talents_earned > 1){%>s<%}%>\t\t\t\t\t\t\t\t\t\t\t\t</strong>\t\t\t\t\t\t\t\t\t\t\t<%\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t%>\t\t\t\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\t\t\t</span>\t\t\t\t\t\t\t\t</span>\t\t\t\t\t\t\t\t<span id="charstoragebtn" class="btnwrap btnxxl" onclick="inventoryModal(undefined,true);">\t\t\t\t\t\t\t\t\t<span class="btnedge">\t\t\t\t\t\t\t\t\t\t<a class="btngold">\t\t\t\t\t\t\t\t\t\t\t<span></span><%= translateString(\'ui_storage\') %>\t\t\t\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\t\t\t</span>\t\t\t\t\t\t\t\t</span>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t<div class="charseals">\t\t\t\t\t\t\t\t<%= characterSealMarkup() %>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t<div class="characterequipmentinfo">\t\t\t\t\t\t\t\t<%= characterEquipmentMarkup() %>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t<div class="characterviewbtm">\t\t\t\t\t\t\t\t<% if(hand_slot == null) %>\t\t\t\t\t\t\t\t\t<div id="character_weapon_container" onclick="return modalContextEquip(\'character\',\'Weapon\')"><div class="iconview iconview-weapon"></div></div>\t\t\t\t\t\t\t\t<% else %>\t\t\t\t\t\t\t\t\t<div id="character_weapon_container" onclick="return modalContextEquip(\'character\',\'Weapon\')"><%= itemIconView(hand_slot, "inventoryDisplayStatsWithTab", \'iconview-weapon\') %></div>\t\t\t\t\t\t\t\t<% if(armor_slot == null) %>\t\t\t\t\t\t\t\t\t<div id="character_armor_container" onclick="return modalContextEquip(\'character\',\'Armor\')"><div class="iconview iconview-armor"></div></div>\t\t\t\t\t\t\t\t<% else %>\t\t\t\t\t\t\t\t\t<div id="character_armor_container" onclick="return modalContextEquip(\'character\',\'Armor\')"><%= itemIconView(armor_slot, "inventoryDisplayStatsWithTab", \'iconview-armor\') %></div>\t\t\t\t\t\t\t\t<% if(companion_slot == null) %>\t\t\t\t\t\t\t\t\t<div id="character_companion_container" onclick="return modalContextEquip(\'character\',\'Companion\')"><div class="iconview iconview-companion"></div></div>\t\t\t\t\t\t\t\t<% else %>\t\t\t\t\t\t\t\t\t<div id="character_companion_container" onclick="return modalContextEquip(\'character\',\'Companion\')"><%= itemIconView(companion_slot, "inventoryDisplayStatsWithTab", \'iconview-companion\') %></div>\t\t\t\t\t\t\t</div>\t\t\t<% \t\t\t/* end of if(!data.content_loading) */\t\t\t}\t\t\t%>\t\t\t\t</div>\t\t\t</div>\t\t</div>\t<div class="contentbtm"></div></div></div>',
  2063. { data: c });
  2064. displayModalDialog(b, "character_dialog");
  2065. !c.content_loading && a && ($("#inventorybtm").hide(), clickInventoryTab("resources"));
  2066. };
  2067. log("Add permanent items tab.", "initialize");
  2068.  
  2069. shopModal = function shopModal(b, a) {
  2070. userContext.playerData.user.new_items = 0;
  2071. updateAllStatus();
  2072. doToolbar("shop");
  2073. closeAlert();
  2074. closeUpgradePanel();
  2075. clearModalDialogs("modal_dialogs_top");
  2076. doLog("shopModal");
  2077. uiTelemetry("shop");
  2078.  
  2079. // EXTENDER :: Modification, default tab: troopsequip
  2080. void 0 == a && (a = "troopsequip");
  2081.  
  2082. if (void 0 == b) {
  2083. firstShopItem.swornswordstab = 0;
  2084. firstShopItem.troopsequip = 0;
  2085. firstShopItem.characterequip = 0;
  2086. firstShopItem.boonstab = 0;
  2087. firstShopItem.featuredtab = 0;
  2088. firstShopItem.sealtab = 0;
  2089. var c;
  2090. c = "" + (shopModalHead() + shopModalFoot());
  2091. isWeb() && displayModalDialog(c, void 0, void 0,
  2092. "min-height: 692px; top: 0px; margin-top: 40px");
  2093. showSpinner();
  2094. $.ajaxQueue({
  2095. url: "/play/shop/",
  2096. dataType: "JSON",
  2097. complete: hideSpinner,
  2098. success: function(c) {
  2099. shopModal(c, a);
  2100. }
  2101. });
  2102. } else {
  2103. hideSpinner();
  2104. updateSilver(b.money);
  2105. updateGold(b.perk_points);
  2106. userContext.shopData = [];
  2107.  
  2108. seals = [];
  2109. for (c = 0; c < b.shop.length; c++)
  2110. void 0 == b.shop[c].shop_expires_seconds && (doLog("shopModal: i=" + c + " item=" + b.shop[c].full_name), "Seal" == b.shop[c].slot ? seals.push(b.shop[c]) : userContext.shopData.push(b.shop[c]));
  2111.  
  2112. seals.sort(function(a, c) {
  2113. return c.rarity -
  2114. a.rarity;
  2115. });
  2116.  
  2117. for (c = 0; c < seals.length; c++)
  2118. userContext.shopData.push(seals[c]);
  2119.  
  2120. for (c = 0; c < b.shop.length; c++)
  2121. void 0 != b.shop[c].shop_expires_seconds &&
  2122. (doLog("shopModal: i=" + c + " item=" + b.shop[c].full_name), userContext.shopData.push(b.shop[c]));
  2123.  
  2124. baseShopTime = parseInt((new Date).getTime() / 1E3);
  2125. c = "";
  2126. initPagination("troopsequip", 6);
  2127. initPagination("characterequip", 6);
  2128. initPagination("boonstab", 6);
  2129. initPagination("swornswordstab", 6);
  2130. initPagination("sealtab", 6);
  2131. userContext.totalItems.troopsequip = 0;
  2132. userContext.totalItems.characterequip =
  2133. 0;
  2134. userContext.totalItems.boonstab = 0;
  2135. userContext.totalItems.swornswordstab = 0;
  2136. b.cost_refresh_shop = 2;
  2137. b.userContext = userContext;
  2138. b.open_tab = a;
  2139. b.featuredTabLabel && (phraseText.featured_tab_label = b.featuredTabLabel);
  2140. b.dealsData ? (b.overrideDealsData = [], b.dealsData.map(function(a) { b.overrideDealsData.push(a); }), b.dealsData = [], b.overrideDealsData.map(function(a) {
  2141. b.dealsData.push(a.symbol);
  2142. a.price_perk_points && (itemFromSymbol(a.symbol).price_perk_points = a.price_perk_points);
  2143. }), userContext.defaultDeals_id = itemFromSymbol(b.dealsData[0]).id,
  2144. userContext.defaultDeals_symbol = b.dealsData[0]) : b.dealsData = shopSetDealData("deals");
  2145. b.featuredItemPack ? (b.overridefeaturedItemPack = {}, b.overridefeaturedItemPack.symbol = b.featuredItemPack.symbol, b.overridefeaturedItemPack.price_perk_points = b.featuredItemPack.price_perk_points, b.featuredItemPack = b.overridefeaturedItemPack.symbol, b.overridefeaturedItemPack.price_perk_points && (itemFromSymbol(b.overridefeaturedItemPack.symbol).price_perk_points = b.overridefeaturedItemPack.price_perk_points), userContext.defaultFeaturedPack_id =
  2146. itemFromSymbol(b.featuredItemPack).id, userContext.defaultFeaturedPack_symbol = b.featuredItemPack) : b.featuredItemPack = shopSetDealData("featured_item_pack");
  2147. b.featuredItem ? (b.overridefeaturedItem = [], b.featuredItem.map(function(a) { b.overridefeaturedItem.push(a); }), b.featuredItem = [], b.overridefeaturedItem.map(function(a) {
  2148. b.featuredItem.push(a.symbol);
  2149. a.price_perk_points && (itemFromSymbol(a.symbol).price_perk_points = a.price_perk_points);
  2150. })) : b.featuredItem = shopSetDealData("featured_items");
  2151. for (c = 0; c < userContext.shopData.length; c++) {
  2152. tabLocation =
  2153. "";
  2154. switch (userContext.shopData[c].slot) {
  2155. case "Weapon":
  2156. case "Armor":
  2157. tabLocation = "troopsequip";
  2158. break;
  2159. case "Companion":
  2160. case "Unit":
  2161. tabLocation = "characterequip";
  2162. break;
  2163. case "Consumable":
  2164. case "Boon":
  2165. case "Food":
  2166. tabLocation = "boonstab";
  2167. break;
  2168. case "Sworn Sword":
  2169. tabLocation = "swornswordstab";
  2170. break;
  2171. case "Seal":
  2172. tabLocation = "sealtab";
  2173. }
  2174. userContext.shopData[c].tabLocation = tabLocation;
  2175. userContext.totalItems[tabLocation]++;
  2176. doLog("shop: full_name=" + userContext.shopData[c].full_name + " slot=" + userContext.shopData[c].slot +
  2177. " tabLocation=" + tabLocation);
  2178. 0 == firstShopItem[tabLocation] && (doLog("first " + tabLocation + ": " + userContext.shopData[c].id), firstShopItem[tabLocation] = userContext.shopData[c].id);
  2179. "true" == userContext.shopData[c].featured && (firstShopItem.featuredtab = userContext.shopData[c].id);
  2180. }
  2181.  
  2182. // EXTENDER :: Modification
  2183. userContext.shopData = sortShop(userContext.shopData);
  2184.  
  2185. isWeb()
  2186. ? (c = _.template('<%= shopModalHead() %><span class="btnwrap btnmed" id="sellbtn" onclick="return shopModalSell();"><span class="btnedge"><a class="btngold"><%= translateString(\'sell_an_item\') %></a></span></span></div><div id="store_bg_ss" class="storebg shopswords" style="display:none"></div><div id="store_bg_companion" class="storebg shopcompanions" style="display:none"></div>\t<% if(!isIpad()) { %> \t\t<div class="tabbedheading">\t\t\t<div class="inventorytabs">\t\t\t\t<span class="inventorytabwrap" id="dealstab"><span class="inventorytabedge"><a id="dealstab_inner" class="inventorytab" onclick="return shopTab(\'dealstab\');"><span></span><%= translateString(\'ui_shop_deals\') %><em></em></a></span></span>\t\t\t\t<span class="inventorytabwrap" id="featuredtab"><span class="inventorytabedge"><a id="featuredtab_inner" class="inventorytab" onclick="return shopTab(\'featuredtab\');"><span></span><%= translateString(\'featured_tab_label\') %><em></em></a></span></span>\t\t\t\t<span class="inventorytabwrap" id="troopsequip"><span class="inventorytabedge"><a class="inventorytab" id="troopsequip_inner" onclick="return shopTab(\'troopsequip\');"><span></span><%= translateString(\'troopsequip_tab_label\') %><em></em></a></span></span>\t\t\t\t<span class="inventorytabwrap" id="characterequip"><span class="inventorytabedge"><a id="characterequip_inner" onclick="shopTab(\'characterequip\')"; class="inventorytab"><span></span><%= translateString(\'characterequip_tab_label\') %><em></em></a></span></span>\t\t\t\t<span class="inventorytabwrap" id="boonstab"><span class="inventorytabedge""><a id="boonstab_inner" class="inventorytab" onclick="shopTab(\'boonstab\');"><span></span><%= translateString(\'boons_tab_label\') %><em></em></a></span></span>\t\t\t\t<span class="inventorytabwrap" id="sealtab"><span class="inventorytabedge""><a id="sealtab_inner" class="inventorytab" onclick="shopTab(\'sealtab\');"><span></span><%= translateString(\'seals_tab_label\') %><em></em></a></span></span>\t\t\t</div>\t\t</div>\t<% } %>\t<div class="inventorycontent">\t\t<div class="deals packcontent" id="pack_container" style="display:none">\t\t</div>\t\t<div class="swornswordshopinfo" id="swornswordshopinfo">\t\t<% if(data.swornsword_next) { %>\t\t\t<span class="currentswords"><%= translateString(\'new_sworn_sword_in\') %>: <span id="inn_timer">\' + renderTime(json.swornsword_next) + \'</span></span>\t\t<% } else { %>\t\t\t<span class="currentswords"><span id="inn_timer"></span></span>\t\t<% } %>\t\t<span id="swornsword_remaining" class="swordlength"></span>\t</div>\t<div class="swornswordshopinfo" id="troopsequipshopinfo" style="display:none">\t<% if(data.gear_next) { %>\t\t<span class="currentswords"><%= translateString(\'new_gear_in\') %>: <span id="gear_timer"><%= renderTime(data.gear_next) %></span></span>\t<% } %> <span id="shop_remaining" class="swordlength"></span> </div> <div class="swornswordshopinfo" id="characterequipshopinfo" style="display:none">\t<% if(data.companion_next) { %>\t\t<span class="currentswords"><%= translateString(\'new_companion_in\') %>: <span id="companion_timer"><%= renderTime(data.companion_next) %></span></span>\t<% } %> <span id="shop_companion_remaining" class="swordlength"></span> </div><div class="swornswordshopinfo" id="boonsshopinfo" style="display:none"></div><div id="statview_container_shop"></div><% if(data.open_tab==\'dealstab\') { %>\t<div id="shop_miniview" class="miniviewmenu-inventory" style="min-height: 410px; margin-left: -10px"><% } else { %>\t<div id="shop_miniview" class="darkroundedbox miniviewmenu-inventory" style="min-height: 410px;"><% } %><div class="swornswordbtns" id="swornswordbtns"><%\tif(data.userContext.playerData.character.level>=4) { %>\t<span class="btnwrap btnmed btnprice" id="refreshnowbtn"><span class="btnedge"><a class="btngold" onclick="return doShopRefresh(\'swornsword\');"><%= translateString(\'refresh_inn\') %></a></span><em><%= translateString(\'ui_shop_for\') %></em><strong><%= data.cost_refresh_shop %></strong></span><% } %><div id="swornsword_message" style="display:none"><%= translateString(\'no_sworn_swords_now\') %></div></div><% if(data.userContext.playerData.character.level>=4) { %>\t<div class="swornswordbtns" id="troopsequipbtns" style="display:none"> <span class="btnwrap btnmed btnprice" id="refreshnowbtn"><span class="btnedge"><a class="btngold" onclick="return doShopRefresh(\'gear\');"><%= translateString(\'refresh_gear\') %></a></span><em><%= translateString(\'ui_shop_for\') %></em><strong><%= data.cost_refresh_shop %></strong></span>\t</div><%\t} %><% if(data.userContext.playerData.character.level>=4) { %>\t<div class="swornswordbtns" id="characterequipbtns" style="display:none"> <span class="btnwrap btnmed btnprice" id="refreshnowbtn"><span class="btnedge"><a class="btngold" onclick="return doShopRefresh(\'companion\');"><%= translateString(\'refresh_companion\') %></a></span><em><%= translateString(\'ui_shop_for\') %></em><strong><%= data.cost_refresh_shop %></strong></span>\t</div><%\t} %><%= shopDeals(data) %><%= shopFeatured(data) %>\x3c!-- Standard items --\x3e<% _.each(data.userContext.shopData,function(item,n){ %>\t<% var tabLocation = item.tabLocation; %>\t<% addPageItem(tabLocation); %>\t\t<div style="<%= pageStyle(tabLocation) %>" class="slot_<%= item.slot %> offersitem <%= pageClass(tabLocation) %>">\t<%= itemMiniView(item, {callback: shopDisplayStats, extra_styles: pageStyle(tabLocation), extra_class: pageClass(tabLocation)}) %>\t<%= markupOwnedPrice(userContext.shopData[n],\'doPurchase\',undefined,undefined) %>\t</div><% }); %><%= bookPageNumbers(\'troopsequip\',\'display:none\') %><%= bookPageNumbers(\'characterequip\',\'display:none\') %><%= bookPageNumbers(\'boonstab\',\'display:none\') %><%= bookPageNumbers(\'swornswordstab\',\'display:none\') %><%= bookPageNumbers(\'sealtab\',\'display:none\') %><span class="btnwrap btnsm" style="top:560px; left:0px; position: absolute" onclick="return enterOfferCode();"><span class="btnedge"><a class="btnbrown">Offer Code</a></span></span></span></div>',
  2187. { data: b }), c += shopModalFoot(), displayModalDialog(c, void 0, void 0, "min-height: 692px; top: 0px; margin-top: 40px"))
  2188. : iosSignal("shopData", "read", {
  2189. shop: userContext.shopData,
  2190. featuredItems: b.featuredItem.map(function(a) { return itemFromSymbol(a); }),
  2191. featuredPack: itemFromSymbol(b.featuredItemPack),
  2192. dealsData: b.dealsData.map(function(a) { return itemFromSymbol(a); })
  2193. });
  2194.  
  2195. killAllPanelTimers();
  2196. isWeb() && shopTab(a);
  2197.  
  2198. b.swornsword_next && (userContext.shopTimer.inn = setPanelTimeout("updateInnTimer(" + b.swornsword_next + ");", 1E3));
  2199. b.gear_next && (userContext.shopTimer.gear = setPanelTimeout("updateGearTimer(" + b.gear_next + ");", 1E3));
  2200. b.companion_next && (userContext.shopTimer.companion = setPanelTimeout("updateCompanionTimer(" + b.companion_next + ");", 1E3));
  2201. }
  2202. };
  2203. log("Sort shop.", "initialize");
  2204.  
  2205. function hasGold(b, a, c) {
  2206. // EXTENDER :: Modification, the short answer is no
  2207. if (b > 0 && extender_neverSpendGold) {
  2208. return false;
  2209. }
  2210.  
  2211. if (0 < b) {
  2212. void 0 == c && (c = !1);
  2213. doLog("hasGold: cost=" + b + " [player perk_points=" + userContext.playerData.user.perk_points + "]");
  2214. if (b > userContext.playerData.user.perk_points) return currencyModal("gold"), iosSignal("purchase", "need_gold"), !1;
  2215. if (2 == (userContext.playerData.user.options_mask & 2) && !1 == c)
  2216. return dialogAlert({
  2217. style: "confirm",
  2218. button1: "Okay",
  2219. button1_action: function() {
  2220. closeAlert();
  2221. a();
  2222. },
  2223. button2: "Cancel",
  2224. heading: jsTranslate("Spend %{val} Gold", "val", numberWithDelimiter(b)),
  2225. text: jsTranslate("Please confirm that you wish to spend %{val} gold.",
  2226. "val", numberWithDelimiter(b)),
  2227. keep_previous: !0
  2228. }), !1;
  2229. }
  2230. return !0;
  2231. }
  2232.  
  2233. log("Never spend gold option.", "initialize");

QingJ © 2025

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