Neverwinter gateway - Professions Robot

Automatically selects professions for empty slots

目前为 2015-10-04 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Neverwinter gateway - Professions Robot
  3. // @description Automatically selects professions for empty slots
  4. // @namespace https://greasyfork.org/scripts/9812-neverwinter-gateway-professions-robot/
  5. // @include http://gateway*.playneverwinter.com/*
  6. // @include https://gateway*.playneverwinter.com/*
  7. // @include http://gateway.*.perfectworld.eu/*
  8. // @include https://gateway.*.perfectworld.eu/*
  9. // @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js
  10. // @resource jqUI_CSS https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/cupertino/jquery-ui.css
  11. // @originalAuthor Mustex/Bunta
  12. // @modifiedBy NW gateway Professions Bot Developers & Contributors
  13.  
  14. // @version 4.4.9
  15. // @license http://creativecommons.org/licenses/by-nc-sa/3.0/us/
  16. // @grant GM_getValue
  17. // @grant GM_setValue
  18. // @grant GM_listValues
  19. // @grant GM_deleteValue
  20. // @grant GM_addStyle
  21. // @grant GM_getResourceText
  22. // ==/UserScript==
  23.  
  24. /*
  25. Developers & Contributors
  26. - BigRedBrent
  27. - Bluep
  28. - dlebedynskyi
  29. - Frankescript
  30. - Kakoura
  31. - mac-nw
  32. - Nametaken
  33. - noonereally
  34. - Numberb
  35. - Phr33d0m
  36. - Rotten_mind
  37. - WloBeb
  38.  
  39. RELEASE NOTES
  40. 4.4.9
  41. - Added Leadership RP profile that focuses on Resonant Bags, Artifact Paraphenalia, and Thaumaturgic Bags instead of Enchanted Coffers.
  42.  
  43. Check Changelog.txt for the full changelog:
  44. http://rawgit.com/Phr33d0m/NW-Profession-Bot/master/Changelog.txt
  45. */
  46.  
  47. // Make sure it's running on the main page, no frames
  48.  
  49.  
  50. var microVersion = "4.4.9";
  51. var scriptVersion = 4.4;
  52. var forceSettingsResetOnUpgrade = true;
  53. var forceResetOnVerBelow = 3.5;
  54.  
  55. if(window.self !== window.top) {
  56. throw "";
  57. }
  58. var current_Gateway = _select_Gateway();
  59. // Set global console variables
  60. var fouxConsole = {
  61. log: function() {},
  62. info: function() {},
  63. error: function() {},
  64. warn: function() {}
  65.  
  66. };
  67. var console = unsafeWindow.console || fouxConsole;
  68. var chardiamonds = [];
  69. var zaxdiamonds = 0;
  70. var chargold = [];
  71. var definedTask = {};
  72. var translation = {};
  73. var failedTasksList = [];
  74. var failedProfiles = {};
  75. var collectTaskAttempts = new Array(9); var k = 9; while (k) {collectTaskAttempts[--k] = 0}; //collectTaskAttempts.fill(0); js6
  76. var antiInfLoopTrap = {// without this script sometimes try to start the same task in infinite loop (lags?)
  77. prevCharName: "unknown", // character name which recently launched a task
  78. prevTaskName: "unknown", // name of the task previously launched
  79. startCounter: 0, // how many times the same character starts the same task
  80. currCharName: "unknown", // character name which try to launch new task
  81. currTaskName: "unknown", // name of the new task to launch
  82. trapActivation: 15 // number of repetition to activation trap
  83. };
  84. var pleaseBuy = [];
  85. // No Leadership in Gateway stuff
  86. var leadershipSlots = {};
  87. // Page Reloading function
  88. // Every second the page is idle or loading is tracked
  89. var loading_reset = false; // Enables a periodic reload if this is toggled on by the Auto Reload check box on the settings panel
  90. var s_paused = false; // extend the paused setting to the Page Reloading function
  91.  
  92. // Include JqueryUI CSS
  93. var jqUI_CssSrc = GM_getResourceText("jqUI_CSS");
  94. /*jqUI_CssSrc = jqUI_CssSrc.replace (/url\(images\//g, "url(https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/dark-hive/images/");*/
  95. jqUI_CssSrc = jqUI_CssSrc.replace(/url\(images\//g, "url(https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/cupertino/images/");
  96. jqUI_CssSrc = jqUI_CssSrc.replace(/font-size: 1\.1em/g, "font-size: 0.9em");
  97. GM_addStyle(jqUI_CssSrc);
  98.  
  99.  
  100. function _select_Gateway() { // Check for Gateway used to
  101. if(window.location.href.indexOf("gatewaytest") > -1) { // detect gatewaytest Url
  102. console.log("GatewayTEST detected");
  103. return "http://gatewaytest.playneverwinter.com";
  104. } else if(window.location.href.indexOf("nw.ru.perfectworld") > -1) {
  105. console.log("GatewayRU detected");
  106. return "http://gateway.nw.ru.perfectworld.eu";
  107. } else { // must go somewhere
  108. console.log("Gateway detected");
  109. return "http://gateway.playneverwinter.com";
  110. }
  111. }
  112.  
  113. (function() {
  114. var $ = unsafeWindow.$;
  115.  
  116. //MAC-NW
  117. $.fn.waitUntilExists = function(handler, shouldRunHandlerOnce, isChild) {
  118. var found = 'found';
  119. var $this = $(this.selector);
  120. var $elements = $this.not(function() {
  121. return $(this).data(found);
  122. }).each(handler).data(found, true);
  123. if (!isChild) {
  124. (window.waitUntilExists_Intervals = window.waitUntilExists_Intervals || {})[this.selector] = window.setInterval(function() {
  125. $this.waitUntilExists(handler, shouldRunHandlerOnce, true);
  126. }, 500);
  127. } else if (shouldRunHandlerOnce && $elements.length) {
  128. window.clearInterval(window.waitUntilExists_Intervals[this.selector]);
  129. }
  130. return $this;
  131. }
  132. // MAC-NW - Wait for tooltip to come up so we can alter the list
  133. $('.tooltip-menu button').waitUntilExists(function() {
  134. // Tooltip has open menu itemtooltip
  135. if ($('button.tooltip-menu button[data-url-silent^="/inventory/item-open"]') && !$('.tooltip-menu div.tooltip-openall').length && !$('.tooltip-menu button[data-url-silent^="/inventory/item-open"]').hasClass('disabled'))
  136. try {
  137. var thisItem = eval("client.dataModel.model." + $('.tooltip-menu button[data-url-silent^="/inventory/item-open"]').attr('data-url-silent').split("=")[1]);
  138. if (thisItem.count > 1) {
  139. if (thisItem.count >= 99)
  140. thisItem.count = 99;
  141. var openAllClick = "for (i = 1; i <= " + thisItem.count + "; i++){ window.setTimeout(function () {client.sendCommand('GatewayInventory_OpenRewardPack', '" + thisItem.uid + "');}, 500); }";
  142. $('div.tooltip-menu').append('<div class="input-field button menu tooltip-openall"><div class="input-bg-left"></div><div class="input-bg-mid"></div><div class="input-bg-right"></div>\
  143. <button class="&nbsp;" onclick="' + openAllClick + '">Open All (' + thisItem.count + ')</button></div>');
  144. //$('a.nav-dungeons').trigger('click'); window.setTimeout(function(){ $('a.nav-inventory').trigger('click'); },2000);
  145. }
  146. } catch (e) {
  147. console.log("ERROR: Did not succeed to add open all tooltip.");
  148. }
  149. });
  150.  
  151. $('.vendor-quantity-block span.attention').waitUntilExists(function() {
  152. if ($('.vendor-quantity-block span.attention span').length)
  153. $('.vendor-quantity-block span.attention').replaceWith('<div class="input-field button"><div class="input-bg-left"></div><div class="input-bg-mid"></div><div class="input-bg-right"></div><button onclick="$(\'.modal-confirm input\').val(\'' + $(".vendor-quantity-block span.attention span").text() + '\');">All (' + $(".vendor-quantity-block span.attention span").text() + ')</button></div>');
  154. });
  155.  
  156. $('div.notification div.messages li').waitUntilExists(function() {
  157. if ($("div.notification div.messages li").length > 2)
  158. $("div.notification div.messages li").eq(0).remove();
  159. });
  160.  
  161. // Always disable SCA tutorial if its active
  162. $('#help-dimmer.help-cont.whenTutorialActive').waitUntilExists(function() {
  163. client.toggleHelp();
  164. });
  165.  
  166. //MAC-NW
  167.  
  168. var state_loading = 0; // If "Page Loading" takes longer than 30 seconds, reload page (maybe a javascript error)
  169. var state_loading_time = 30; // default of 30 seconds
  170. var state_idle = 0; // If the page is idle for longer than 60 seconds, reload page (maybe a javascript error)
  171. var state_idle_time = 120; // default of 120 seconds
  172. var reload_hours = [2, 5, 8, 11, 14, 17, 20, 23]; // logout and reload every three hours - 2:29 - 5:29 - 8:29 - 11:29 - 14:29 - 17:29 - 20:29 - 23:29
  173. var last_location = ""; // variable to track reference to page URL
  174. var reload_timer = setInterval(function() {
  175. if (!s_paused) {
  176. if (antiInfLoopTrap.startCounter >= antiInfLoopTrap.trapActivation) {
  177. unsafeWindow.location.href = current_Gateway;
  178. return;
  179. }
  180. if (loading_reset) {
  181. var loading_date = new Date();
  182. var loading_sec = Number(loading_date.getSeconds());
  183. var loading_min = Number(loading_date.getMinutes());
  184. var loading_hour = Number(loading_date.getHours());
  185. if (reload_hours.indexOf(loading_hour) >= 0 && loading_min == 29 && loading_sec < 2) {
  186. console.log("Auto Reload");
  187. unsafeWindow.location.href = current_Gateway;
  188. return;
  189. }
  190. }
  191.  
  192. // check for errors
  193. if ($("title").text().match(/Error/) || $("div.modal-content h3").text().match(/Disconnected/)) {
  194. console.log("Error detected - relogging");
  195. unsafeWindow.location.href = current_Gateway;
  196. return;
  197. }
  198.  
  199. if ($("div.loading-image:visible").length) {
  200. last_location = location.href;
  201. state_idle = 0;
  202. if (state_loading >= state_loading_time) {
  203. console.log("Page Loading too long");
  204. state_loading = 0;
  205. location.reload();
  206. } else {
  207. state_loading++;
  208. console.log("Page Loading ...", state_loading + "s");
  209. }
  210. }
  211. // TODO: Add check for gateway disconnected
  212. //<div class="modal-content" id="modal_content"><h3>Disconnected from Gateway</h3><p>You have been disconnected.</p><button type="button" class="modal-button" onclick="window.location.reload(true);">Close</button>
  213.  
  214.  
  215. /* Can't use idle check with dataModel methods
  216. else if (location.href == last_location) {
  217. state_loading = 0;
  218. if (state_idle >= state_idle_time) {
  219. console.log("Page Idle too long");
  220. state_idle = 0;
  221. unsafeWindow.location.href = current_Gateway ; // edited by RottenMind
  222. }
  223. else {
  224. state_idle++;
  225. // comment out to avoid console spam
  226. //console.log("Page Idle ...", state_idle + "s");
  227. }
  228. }
  229. */
  230. else {
  231. last_location = location.href;
  232. state_loading = 0;
  233. state_idle = 0;
  234. }
  235. }
  236. }, 1000);
  237. })();
  238.  
  239. (function() {
  240.  
  241. addTranslation();
  242.  
  243. /**
  244. * Add a string of CSS to the main page
  245. *
  246. * @param {String} cssString The CSS to add to the main page
  247. */
  248.  
  249. function AddCss(cssString) {
  250. var head = document.getElementsByTagName('head')[0];
  251. if (!head)
  252. return;
  253. var newCss = document.createElement('style');
  254. newCss.type = "text/css";
  255. newCss.innerHTML = cssString;
  256. head.appendChild(newCss);
  257. }
  258.  
  259. function countLeadingSpaces(str) {
  260. return str.match(/^(\s*)/)[1].length;
  261. }
  262.  
  263. // Setup global closure variables
  264. var $ = unsafeWindow.jQuery;
  265. var timerHandle = 0;
  266. var dfdNextRun = $.Deferred();
  267. var curCharNum = 0; // current character counter
  268. var lastCharNum = curCharNum;
  269. var curCharName = '';
  270. var curCharFullName = '';
  271. var chartimers = {};
  272. var maxLevel = 25;
  273. var waitingNextChar = false;
  274. var delay = {
  275. SHORT: 1000,
  276. MEDIUM: 5000,
  277. LONG: 30000,
  278. MINS: 300000,
  279. DEFAULT: 10000, // default delay
  280. TIMEOUT: 60000, // delay for cycle processing timeout
  281. };
  282.  
  283. var lastDailyResetTime = null;
  284.  
  285.  
  286. // Forcing settings clear !
  287. var ver = parseFloat(GM_getValue("script_version", 0));
  288. if ((ver < forceResetOnVerBelow) && forceSettingsResetOnUpgrade) {
  289. var str = "Detected an upgrade from old version or fresh install.<br />Procceding will wipe all saved settings.<br />Please set characters to active after log in.";
  290. $('<div id="dialog-confirm" title="Setting wipe confirm">' + str + '</div>').dialog({
  291. resizable: true,
  292. width: 500,
  293. modal: false,
  294. buttons: {
  295. "Continue": function() {
  296. $( this ).dialog( "close" );
  297. window.setTimeout(function() {
  298. var keys = GM_listValues();
  299. for (i = 0; i < keys.length; i++) {
  300. var key = keys[i];
  301. GM_deleteValue(key);
  302. }
  303. GM_setValue("script_version", scriptVersion);
  304. window.setTimeout(function() {
  305. unsafeWindow.location.href = current_Gateway;
  306. }, 50);
  307. }, 0);
  308. },
  309. Cancel: function() {
  310. $( this ).dialog( "close" );
  311. }
  312. }
  313. });
  314. return;
  315. }
  316.  
  317.  
  318. function addProfile(profession, profile, base){
  319. maxLevel = maxLevel || 25;
  320. definedTask = definedTask || {};
  321. //general prototype for profession
  322. var professionBase = {
  323. taskListName: typeof(profession) ==='string' ? profession : profession.taskListName, // Friendly name used at the UI
  324. taskName: typeof(profession) ==='string' ? profession : profession.taskName, // String used at the gateway
  325. taskDefaultPriority: 2, // Priority to allocate free task slots: 0 - High, 1 - Medium, 2 - Low
  326. taskActive: true,
  327. taskDefaultSlotNum: 0,
  328. taskDescription: "",
  329. profiles: []
  330. };
  331.  
  332.  
  333. //creating new profession or using existing one
  334. var professionSet = (typeof profession === 'object')
  335. ? jQuery.extend(true, professionBase, profession)
  336. : definedTask[profession] || professionBase;
  337. if(!professionSet) {return;}
  338. if(!definedTask[profession]) {definedTask[profession] = professionSet;}
  339. if(!profile) {return;}
  340.  
  341. //profile prototype
  342. var profileBase = {
  343. profileName: 'Add profile name',
  344. isProfileActive: true,
  345. level: {}
  346. };
  347. //getting new profile formated
  348. var newProfile = jQuery.extend(true, profileBase, profile),
  349. baseProfile;
  350. //getting base to extend
  351. base = base || (professionSet.taskListName === 'Leadership' ? 'XP' : 'default');
  352. if(base && typeof base === 'string') {
  353. var existing = professionSet.profiles.filter(function(e) {return e.profileName === base;});
  354. if(existing && existing.length) {baseProfile = existing[0];}
  355. }
  356.  
  357. //setting levels
  358. var baseLevels = baseProfile ? baseProfile.level : [],
  359. rec = 0;
  360. for(var i = 0; i <= maxLevel; i++) {
  361. //recur has priority
  362. if (rec > 0 ){
  363. rec -=1;
  364. //setting empty array to handle later by fallback
  365. newProfile.level[i] = newProfile.level[i] || [];
  366. }
  367. if(newProfile.level && newProfile.level[i]){
  368. //override for arrays
  369. if (Array.isArray(newProfile.level[i]) && newProfile.level[i].length){
  370. //cancel rec since new array is defined
  371. rec = 0;
  372. //process array
  373. var ind = newProfile.level[i].indexOf('+');
  374. if (ind>-1){
  375. var def = newProfile.level[i].splice(0, ind);
  376. var tail = newProfile.level[i].splice(1, newProfile.level[i].length);
  377. def = def.concat(baseLevels[i] || [], tail || []);
  378. newProfile.level[i] = def;
  379. }
  380. }//process '+N'
  381. else if (typeof newProfile.level[i] == 'string'
  382. && newProfile.level[i][0] === '+'){
  383. rec = parseInt(newProfile.level[i].replace(/\D/g,''));
  384. rec = rec > 0 ? rec : 0;
  385. //setting empty array to handle later by fallback
  386. newProfile.level[i] = [];
  387. rec -=1;
  388. }
  389. }
  390. //falback to base if not defined
  391. else{
  392. var baseLevel = baseLevels[i] || [];
  393. newProfile.level[i] = baseLevel;
  394. }
  395. //fallback from empty array to copy one before
  396. if (Array.isArray(newProfile.level[i]) && !newProfile.level[i].length && i> 0){
  397. newProfile.level[i] = newProfile.level[i-1];
  398. }
  399. }
  400. console.info("profile added ",newProfile.profileName, newProfile);
  401. professionSet.profiles.push(newProfile);
  402. }
  403.  
  404. /*
  405. * Tasklist can be modified to configure the training you want to perform.
  406. * The configurable options window sets how many profession slots you want to use for each profession.
  407. * The level array below for each professions specifies the tasks you want to learn at each crafting level.
  408. * Each craft slot will pick the first task that meets requirements.
  409. * See http://pastebin.com/VaGntEha for Task Name Map.
  410. * Some names above do not match, use below code to check:
  411. * var tasks = client.dataModel.model.craftinglist['craft_' + profname].entries.filter(function(entry) { return entry.def && entry.def.displayname == taskname; }); tasks[0].def.name;
  412. */
  413.  
  414. definedTask["Leadership"] = {
  415. taskListName: "Leadership", // Friendly name used at the UI, have to be the same as key in definedTask array!!!
  416. taskName: "Leadership", // String used at the gateway
  417. taskDefaultPriority: 2, // Priority to allocate free task slots: 0 - High, 1 - Medium, 2 - Low
  418. taskActive: true,
  419. taskDefaultSlotNum: 9,
  420. taskDescription: "",
  421. profiles: [{
  422. profileName: "AD",
  423. isProfileActive: true,
  424. level: {
  425. 0: ["Leadership_Tier0_Intro_1"],
  426. 1: ["Leadership_Tier0_Intro_5", "Leadership_Tier0_Intro_4", "Leadership_Tier0_Intro_3", "Leadership_Tier0_Intro_2"],
  427. 2: ["Leadership_Tier1_Feedtheneedy", "Leadership_Tier1_2_Guardduty", "Leadership_Tier1_2_Training"],
  428. 3: ["Leadership_Tier1_Feedtheneedy", "Leadership_Tier1_2_Guardduty", "Leadership_Tier1_2_Training"],
  429. 4: ["Leadership_Tier1_Feedtheneedy", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty", "Leadership_Tier1_2_Training"],
  430. 5: ["Leadership_Tier1_4_Protect", "Leadership_Tier1_5_Explore", "Leadership_Tier1_2_Guardduty"],
  431. 6: ["Leadership_Tier1_4_Protect", "Leadership_Tier1_5_Explore", "Leadership_Tier1_2_Guardduty"],
  432. 7: ["Leadership_Tier1_4_Protect", "Leadership_Tier1_5_Explore", "Leadership_Tier1_2_Guardduty"],
  433. 8: ["Leadership_Tier1_4_Protect", "Leadership_Tier1_5_Explore", "Leadership_Tier1_2_Guardduty"],
  434. 9: ["Leadership_Tier1_4_Protect", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  435. // Begin prioritizing "Battle Undead"
  436. 10: ["Leadership_Tier2_10_Battle", "Leadership_Tier1_4_Protect", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  437. 11: ["Leadership_Tier2_10_Battle", "Leadership_Tier1_4_Protect", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  438. 12: ["Leadership_Tier2_10_Battle", "Leadership_Tier1_4_Protect", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  439. // Add "protect diamonds rare" and the patrol quest as a backup
  440. 13: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_10_Battle", "Leadership_Tier1_4_Protect", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  441. 14: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_10_Battle", "Leadership_Tier1_4_Protect", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  442. 15: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_10_Battle", "Leadership_Tier1_4_Protect", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  443. // AD Production mode: Spellplague + Battle Undead
  444. 16: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  445. 17: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_17_Deliver", "Leadership_Tier2_12_Taxes", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  446. 18: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_17_Deliver", "Leadership_Tier2_12_Taxes", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  447. 19: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_17_Deliver", "Leadership_Tier2_12_Taxes", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  448. // 20
  449.  
  450. 20: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_20_Destroy", "Leadership_Tier2_12_Taxes",
  451. "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  452. ],
  453. 21: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_20_Destroy", "Leadership_Tier2_12_Taxes",
  454. "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  455. ],
  456. 22: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_20_Destroy",
  457. "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  458. ],
  459. 23: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_20_Destroy",
  460. "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  461. ],
  462. 24: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_20_Destroy",
  463. "Leadership_Tier2_12_Taxes", "Leadership_Tier4_24r_Killdragon", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  464. ],
  465. 25: ["Leadership_Tier4_25r_Huntexperiment", "Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier3_13r_Protectdiamonds",
  466. "Leadership_Tier3_20_Destroy", "Leadership_Tier2_12_Taxes", "Leadership_Tier4_24r_Killdragon", "Leadership_Tier4_25_Battleelementalcultists", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle",
  467. "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  468. ],
  469. },
  470. }, {
  471. profileName: "XP",
  472. isProfileActive: true,
  473. level: {
  474. 0: ["Leadership_Tier0_Intro_1"],
  475. 1: ["Leadership_Tier0_Intro_5", "Leadership_Tier0_Intro_4", "Leadership_Tier0_Intro_3", "Leadership_Tier0_Intro_2"],
  476. 2: ["Leadership_Tier1_Feedtheneedy", "Leadership_Tier1_2_Guardduty", "Leadership_Tier1_2_Training"],
  477. 3: ["Leadership_Tier1_Feedtheneedy", "Leadership_Tier1_2_Guardduty", "Leadership_Tier1_2_Training"],
  478. 4: ["Leadership_Tier1_Feedtheneedy", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty", "Leadership_Tier1_2_Training"],
  479. 5: ["Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty"],
  480. 6: ["Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty"],
  481. 7: ["Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty"],
  482. 8: ["Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty"],
  483. 9: ["Leadership_Tier1_5_Explore", "Leadership_Tier2_9_Chart", "Leadership_Tier1_4_Protect"],
  484. 10: ["Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty"],
  485. 11: ["Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty"],
  486. 12: ["Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier1_2_Guardduty"],
  487. 13: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  488. 14: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  489. 15: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  490. 16: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  491. 17: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  492. 18: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  493. 19: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  494. //20
  495.  
  496. 20: ["Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  497. 21: ["Leadership_Tier4_21_Training", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier3_13_Training", "Leadership_Tier1_5_Explore", "Leadership_Tier1_4_Protect", "Leadership_Tier2_7_Training"],
  498. 22: ["Leadership_Tier4_21_Training", "Leadership_Tier4_22_Guardclerics", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  499. 23: ["Leadership_Tier4_23_Guardnoble", "Leadership_Tier4_21_Training", "Leadership_Tier4_22_Guardclerics", "Leadership_Tier4_23r_Securepilgrimage", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  500. 24: ["Leadership_Tier4_23_Guardnoble", "Leadership_Tier4_21_Training", "Leadership_Tier4_22_Guardclerics", "Leadership_Tier4_23r_Securepilgrimage", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  501. 25: ["Leadership_Tier4_25r_Huntexperiment", "Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier3_13r_Protectdiamonds",
  502. "Leadership_Tier3_20_Destroy", "Leadership_Tier2_12_Taxes", "Leadership_Tier4_24r_Killdragon", "Leadership_Tier4_25_Battleelementalcultists", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle",
  503. "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  504. ],
  505. },
  506. }]
  507. };
  508.  
  509. addProfile("Leadership", {
  510. profileName: "Resource/AD",
  511. level: {
  512. // DL
  513. 16: ["Leadership_Tier3_16r_Buildshelters", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_16_Fight", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_17_Deliver", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  514. 17: ["Leadership_Tier3_16r_Buildshelters", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_17_Deliver", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_17_Deliver", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  515. 18: ["Leadership_Tier3_16r_Buildshelters", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_17r_Raidmines", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_17_Deliver", , "Leadership_Tier3_17_Deliver", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  516. 19: ["Leadership_Tier3_16r_Buildshelters", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_17r_Raidmines", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_17_Deliver", , "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
  517. // 20
  518. 20: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3",
  519. "Leadership_Tier3_20_Destroy", "Leadership_Tier3_18_Resell", "Leadership_Tier3_13r_Protectdiamonds",
  520. "Leadership_Tier3_16r_Buildshelters", "Leadership_Tier3_13_Patrol", "Leadership_Tier3_19_Acquire", "Leadership_Tier3_17_Deliver",
  521. "Leadership_Tier3_15_Rescue", "Leadership_Tier2_9_Chart", "Leadership_Tier2_12_Taxes", "Leadership_Tier1_5_Explore"
  522. ],
  523. 21: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_21r_Killelemental",
  524. "Leadership_Tier3_20_Destroy", "Leadership_Tier4_21_Protectmagic",
  525. "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  526. ],
  527. 22: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_21r_Killelemental",
  528. "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier3_20_Destroy", "Leadership_Tier4_21_Protectmagic", "Leadership_Tier4_22_Guardclerics",
  529. "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  530. ],
  531. 23: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3",
  532. "Leadership_Tier4_23r_Securepilgrimage", "Leadership_Tier4_21r_Killelemental",
  533. "Leadership_Tier4_23_Guardnoble", "Leadership_Tier3_20_Destroy", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier4_21_Protectmagic", "Leadership_Tier4_22_Guardclerics",
  534. "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  535. ],
  536. 24: ["Leadership_Tier4_24r_Killdragon",
  537. "Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_23r_Securepilgrimage",
  538. "Leadership_Tier4_24_Wizardsseneschal", "Leadership_Tier4_23_Guardnoble", "Leadership_Tier3_20_Destroy", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier4_21_Protectmagic", "Leadership_Tier4_22_Guardclerics", "Leadership_Tier4_21r_Killelemental",
  539. "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  540. ],
  541. 25: ["Leadership_Tier4_25r_Huntexperiment", "Leadership_Tier4_24r_Killdragon",
  542. "Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier4_23r_Securepilgrimage",
  543. "Leadership_Tier4_25_Battleelementalcultists", "Leadership_Tier4_24_Wizardsseneschal", "Leadership_Tier4_23_Guardnoble", "Leadership_Tier3_20_Destroy", "Leadership_Tier4_22r_Capturebandithq", "Leadership_Tier4_21_Protectmagic", "Leadership_Tier4_22_Guardclerics", "Leadership_Tier4_21r_Killelemental",
  544. "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"
  545. ],
  546. }
  547. }, "XP");
  548.  
  549. addProfile("Leadership", {
  550. profileName: "Assets",
  551. isProfileActive: true,
  552. level: {
  553. 3: ["Leadership_Tier3_13_Recruit", "Leadership_Tier2_7_Recruit", "Leadership_Tier1_2_Recruit"],
  554. 4: '+25'
  555. }
  556. });
  557.  
  558. addProfile('Leadership',{
  559. "profileName": "RP Boxes",
  560. "level": {
  561. "24": [
  562. "Leadership_Tier4_24r_Killdragon",
  563. "Leadership_Tier4_24_Wizardsseneschal",
  564. "Leadership_Tier4_23_Guardnoble",
  565. "Leadership_Tier4_23r_Securepilgrimage",
  566. "Leadership_Tier4_22_Guardclerics",
  567. "Leadership_Tier4_21_Protectmagic",
  568. "Leadership_Tier4_21r_Killelemental",
  569. //"Leadership_Tier4_22r_Capturebandithq",
  570. "Leadership_Tier4_21_Training",
  571. "Leadership_Tier3_20r_Master2",
  572. "Leadership_Tier3_20r_Master1",
  573. "Leadership_Tier3_20r_Master3",
  574. "Leadership_Tier3_20_Destroy",
  575. "Leadership_Tier1_5_Explore"
  576. ],
  577. "25": [
  578. "Leadership_Tier4_24r_Killdragon",
  579. "Leadership_Tier4_24_Wizardsseneschal",
  580. "Leadership_Tier4_23_Guardnoble",
  581. "Leadership_Tier4_23r_Securepilgrimage",
  582. "Leadership_Tier4_22_Guardclerics",
  583. "Leadership_Tier4_21_Protectmagic",
  584. "Leadership_Tier4_21r_Killelemental",
  585. "Leadership_Tier4_25_Battleelementalcultists",
  586. "Leadership_Tier4_25r_Huntexperiment",
  587. //"Leadership_Tier4_22r_Capturebandithq",
  588. "Leadership_Tier4_21_Training",
  589. "Leadership_Tier3_20r_Master2",
  590. "Leadership_Tier3_20r_Master1",
  591. "Leadership_Tier3_20r_Master3",
  592. "Leadership_Tier3_20_Destroy",
  593. "Leadership_Tier1_5_Explore"
  594. ]
  595. }
  596. }, 'XP');
  597.  
  598. addProfile('Leadership',{
  599. "profileName": "RP",
  600. "level": {
  601. "24": [
  602. "Leadership_Tier4_24r_Killdragon",
  603. "Leadership_Tier4_24_Wizardsseneschal",
  604. "Leadership_Tier4_22_Guardclerics",
  605. "Leadership_Tier4_21_Protectmagic",
  606. "Leadership_Tier4_21r_Killelemental",
  607. "Leadership_Tier4_23_Guardnoble",
  608. "Leadership_Tier4_23r_Securepilgrimage",
  609. //"Leadership_Tier4_22r_Capturebandithq",
  610. "Leadership_Tier4_21_Training",
  611. "Leadership_Tier3_20r_Master2",
  612. "Leadership_Tier3_20r_Master1",
  613. "Leadership_Tier3_20r_Master3",
  614. "Leadership_Tier3_20_Destroy",
  615. "Leadership_Tier1_5_Explore"
  616. ],
  617. "25": [
  618. "Leadership_Tier4_24r_Killdragon",
  619. "Leadership_Tier4_24_Wizardsseneschal",
  620. "Leadership_Tier4_22_Guardclerics",
  621. "Leadership_Tier4_21_Protectmagic",
  622. "Leadership_Tier4_21r_Killelemental",
  623. "Leadership_Tier4_23_Guardnoble",
  624. "Leadership_Tier4_23r_Securepilgrimage",
  625. "Leadership_Tier4_25r_Huntexperiment",
  626. "Leadership_Tier4_25_Battleelementalcultists",
  627. //"Leadership_Tier4_22r_Capturebandithq",
  628. "Leadership_Tier4_21_Training",
  629. "Leadership_Tier3_20r_Master2",
  630. "Leadership_Tier3_20r_Master1",
  631. "Leadership_Tier3_20r_Master3",
  632. "Leadership_Tier3_20_Destroy",
  633. "Leadership_Tier1_5_Explore"
  634. ]
  635. }
  636. }, 'XP');
  637.  
  638. definedTask["WinterEvent"] = {
  639. taskListName: "WinterEvent",
  640. taskName: "WinterEvent",
  641. taskDefaultPriority: 1,
  642. taskDefaultSlotNum: 0,
  643. taskActive: true,
  644. taskDescription: "",
  645. profiles: [{
  646. profileName: "default",
  647. isProfileActive: true,
  648. level: {
  649. 0: ["Event_Winter_Tier0_Intro"],
  650. 1: ["Event_Winter_Tier1_Rankup", /*"Event_Winter_Tier1_Shiny_Lure",*/
  651. "Event_Winter_Tier1_Refine", "Event_Winter_Tier1_Gather"
  652. ],
  653. 2: ["Event_Winter_Tier1_Rankup_2", /*"Event_Winter_Tier1_Fishingpole_Blue","Event_Winter_Tier1_Shiny_Lure_Mass",*/
  654. "Event_Winter_Tier1_Refine_2", "Event_Winter_Tier1_Gather_2"
  655. ],
  656. 3: [ /*"Event_Winter_Tier1_Heros_Feast","Event_Winter_Tier1_Lightwine","Event_Winter_Tier1_Sparkliest_Gem","Event_Winter_Tier1_Mesmerizing_Lure",*/
  657. "Event_Winter_Tier1_Gather_3"
  658. ],
  659. },
  660. }]
  661. };
  662.  
  663. definedTask["SiegeEvent"] = {
  664. taskListName: "SiegeEvent",
  665. taskName: "Event_Siege",
  666. taskDefaultPriority: 1,
  667. taskDefaultSlotNum: 0,
  668. taskActive: true,
  669. taskDescription: "",
  670. profiles: [{
  671. profileName: "default",
  672. isProfileActive: true,
  673. level: {
  674. 0: ["Event_Siege_Tier0_Intro"], // Hire a Siege Master
  675. //1:["Event_Siege_Tier1_Donate_Minorinjury"], // Create Defense Supplies from Minor Injury Kits
  676. //1:["Event_Siege_Tier1_Donate_Injury"], // Create Defense Supplies from Injury Kits
  677. //1:["Event_Siege_Tier1_Donate_Majorinjury"], // Create Defense Supplies from Major Injury Kits
  678. //1:["Event_Siege_Tier1_Donate_Altar_10"], // Create Defense Supplies from 10 Portable Altars
  679. //1:["Event_Siege_Tier1_Donate_Altar_50"], // Create Defense Supplies from 50 Portable Altars
  680. //1:["Event_Siege_Tier1_Donate_Resources_T2"], // Create Defense Supplies from Tier 2 crafting resources
  681. //1:["Event_Siege_Tier1_Donate_Resources_T3"], // Create Defense Supplies from Tier 3 crafting resources
  682. 1: ["Event_Siege_Tier1_Donate_Resources_T3", "Event_Siege_Tier1_Donate_Resources_T2", "Event_Siege_Tier1_Donate_Minorinjury", "Event_Siege_Tier1_Donate_Injury", "Event_Siege_Tier1_Donate_Majorinjury", "Event_Siege_Tier1_Donate_Altar_10"],
  683. },
  684. }]
  685. };
  686.  
  687. definedTask["Blackice"] = {
  688. taskListName: "Blackice",
  689. taskName: "Blackice",
  690. taskDefaultPriority: 1,
  691. taskDefaultSlotNum: 0,
  692. taskActive: true,
  693. taskDescription: "",
  694. profiles: [{
  695. profileName: "default",
  696. isProfileActive: true,
  697. level: {
  698. 1: ["Blackice_Tier1_Process_Blackice","Blackice_Tier1_Recruit_Blackice_Smith"],
  699. 2: ["Blackice_Tier1_Process_Blackice","Blackice_Tier2_Recruit_Assistant_Cryomancer"],
  700. 3: ["Blackice_Tier1_Process_Blackice","Blackice_Tier2_Recruit_Assistant_Cryomancer"],
  701. 4: ["Blackice_Tier1_Process_Blackice","Blackice_Tier2_Recruit_Assistant_Cryomancer"],
  702. 5: ["Blackice_Tier1_Process_Blackice","Blackice_Tier2_Recruit_Assistant_Cryomancer"],
  703. /*
  704. 1:["Forge Hammerstone Pick","Gather Raw Black Ice","Truesilver Pick Grip","Process Raw Black Ice","Upgrade Chillwright","Hire an additional Chillwright"],
  705. 2:["Forge Hammerstone Pick","Gather Raw Black Ice","Truesilver Pick Grip","Process Raw Black Ice","Upgrade Chillwright","Hire an additional Chillwright"],
  706. 3:["Forge Hammerstone Pick","Gather Raw Black Ice","Truesilver Pick Grip","Process Raw Black Ice","Upgrade Chillwright","Hire an additional Chillwright"],
  707. */
  708. },
  709. }]
  710. };
  711.  
  712. definedTask["Jewelcrafting"] = {
  713. taskListName : "Jewelcrafting",
  714. taskName : "Jewelcrafting",
  715. taskDefaultPriority : 1,
  716. taskDefaultSlotNum : 0,
  717. taskActive : true,
  718. taskDescription : "",
  719. profiles : [{
  720. profileName : "default",
  721. isProfileActive : true,
  722. level : {
  723. 0 : ["Jewelcrafting_Tier0_Intro"],
  724. 1 : ["Jewelcrafting_Tier1_Waist_Offense_1", "Jewelcrafting_Tier1_Refine_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  725. 2 : ["Jewelcrafting_Tier1_Waist_Offense_1", "Jewelcrafting_Tier1_Refine_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  726. 3 : ["Jewelcrafting_Tier1_Neck_Offense_1", "Jewelcrafting_Tier1_Waist_Offense_1", "Jewelcrafting_Tier1_Refine_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  727. 4 : ["Jewelcrafting_Tier1_Neck_Offense_1", "Jewelcrafting_Tier1_Waist_Misc_1", "Jewelcrafting_Tier1_Refine_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  728. 5 : ["Jewelcrafting_Tier1_Neck_Offense_1", "Jewelcrafting_Tier1_Waist_Misc_1", "Jewelcrafting_Tier1_Refine_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  729. 6 : ["Jewelcrafting_Tier1_Neck_Misc_1", "Jewelcrafting_Tier1_Waist_Misc_1", "Jewelcrafting_Tier1_Refine_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  730. 7 : ["Jewelcrafting_Tier2_Waist_Offense_2", "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  731. 8 : ["Jewelcrafting_Tier2_Waist_Offense_2", "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  732. 9 : ["Jewelcrafting_Tier2_Neck_Offense_2", "Jewelcrafting_Tier2_Waist_Offense_2", "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  733. 10 : ["Jewelcrafting_Tier2_Waist_Misc_2", "Jewelcrafting_Tier2_Neck_Offense_2", "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  734. 11 : ["Jewelcrafting_Tier2_Waist_Misc_2", "Jewelcrafting_Tier2_Neck_Offense_2", "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  735. 12 : ["Jewelcrafting_Tier2_Waist_Misc_2", "Jewelcrafting_Tier2_Neck_Offense_2", "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  736. 13 : ["Jewelcrafting_Tier2_Neck_Misc_2", "Jewelcrafting_Tier2_Waist_Misc_2", "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  737. 14 : ["Jewelcrafting_Tier3_Waist_Offense_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  738. 15 : ["Jewelcrafting_Tier3_Waist_Offense_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  739. 16 : ["Jewelcrafting_Tier3_Neck_Offense_3", "Jewelcrafting_Tier3_Waist_Offense_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  740. 17 : ["Jewelcrafting_Tier3_Neck_Offense_3", "Jewelcrafting_Tier3_Waist_Offense_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  741. 18 : ["Jewelcrafting_Tier3_Neck_Offense_3", "Jewelcrafting_Tier3_Waist_Misc_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  742. 19 : ["Jewelcrafting_Tier3_Neck_Offense_3", "Jewelcrafting_Tier3_Waist_Misc_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  743. 20 : ["Jewelcrafting_Tier3_Neck_Misc_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  744. 21 : ["Jewelcrafting_Tier3_Neck_Misc_3", "Jewelcrafting_Tier4_Refine_Basic", "Jewelcrafting_Tier4_Gather_Basic", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  745. 22 : ["Jewelcrafting_Tier4_Neck_Base_3", "Jewelcrafting_Tier4_Refine_Basic", "Jewelcrafting_Tier4_Gather_Basic", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  746. 23 : ["Jewelcrafting_Tier4_Neck_Defense_3", "Jewelcrafting_Tier4_Neck_Offense_3", "Jewelcrafting_Tier4_Gather_Basic", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  747. 24 : ["Jewelcrafting_Tier4_Neck_Misc_3", "Jewelcrafting_Tier3_Neck_Misc_3", "Jewelcrafting_Tier4_Gather_Basic", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  748. //basic resources for lvl 16 and 15 items.
  749. 25 : ["Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  750. },
  751. }]
  752. };
  753.  
  754. addProfile("Jewelcrafting", {
  755. profileName : "mass refining",
  756. isProfileActive : true,
  757. useMassTask : true,
  758. level : {
  759. 0: ["Jewelcrafting_Tier0_Intro"],
  760. 1: ["Jewelcrafting_Tier1_Refine_Basic_Mass", "Jewelcrafting_Tier1_Gather_Basic"],
  761. 2: '+25',
  762. 7: ["Jewelcrafting_Tier2_Refine_Basic_Mass"],
  763. 8 : '+25',
  764. 14: ["Jewelcrafting_Tier3_Refine_Basic_Mass"],
  765. 15 : '+25',
  766. 21: ["Jewelcrafting_Tier4_Refine_Basic_Mass"],
  767. 22 : '+25',
  768. },
  769. });
  770.  
  771. addProfile("Jewelcrafting", {
  772. profileName: "21->25 gather",
  773. isProfileActive: true,
  774. level: {
  775. 21: ["Jewelcrafting_Tier4_Refine_Basic_Mass", "Jewelcrafting_Tier4_Gather_Basic"],
  776. 22: '+25'
  777. },
  778. });
  779.  
  780.  
  781. addProfile("Jewelcrafting", {
  782. profileName: "Craft Purple Neck",
  783. isProfileActive: true,
  784. level: {
  785. // we care only about neck items that we can start pile up at lvl 16
  786. 16: ["Jewelcrafting_Tier3_Neck_Offense_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  787. 17 : '+25',
  788. 25: ["Jewelcrafting_Tier4_Neck_Offense_4_Purple", //Exquisite Adamant Necklace of Piercing
  789. "Jewelcrafting_Tier4_Neck_Misc_4_Purple", // Exquisite Adamant Necklace of Recovery
  790. "Jewelcrafting_Tier4_Neck_Defense_4_Purple",//Exquisite Adamant Necklace of Regeneration
  791. "Jewelcrafting_Tier4_Ring_Offense_4_Purple",//Exquisite Adamant Ring of Piercing
  792. "Jewelcrafting_Tier4_Ring_Misc_4_Purple",//Exquisite Adamant Ring of Recovery
  793. "Jewelcrafting_Tier4_Ring_Defense_4_Purple",//Exquisite Adamant Ring of Regeneration
  794. "Jewelcrafting_Tier3_Neck_Offense_3",
  795. "Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier1_Refine_Basic"],
  796. },
  797. });
  798. addProfile("Jewelcrafting", {
  799. profileName: "Craft Purple Rings",
  800. isProfileActive: true,
  801. level: {
  802. // we care only about neck items that we can start pile up at lvl 15
  803. 15: ["Jewelcrafting_Tier3_Ring_Offense_3", "Jewelcrafting_Tier3_Refine_Basic", "Jewelcrafting_Tier3_Gather_Basic", "Jewelcrafting_Tier2_Gather_Basic", "Jewelcrafting_Tier1_Gather_Basic"],
  804. 16 :'+25',
  805. 25: ["Jewelcrafting_Tier4_Ring_Offense_4_Purple", //Exquisite Adamant Ring of Piercing
  806. "Jewelcrafting_Tier4_Ring_Misc_4_Purple", //Exquisite Adamant Ring of Recovery
  807. "Jewelcrafting_Tier4_Ring_Defense_4_Purple", //Exquisite Adamant Ring of Regeneration
  808. "Jewelcrafting_Tier4_Neck_Offense_4_Purple", //Exquisite Adamant Necklace of Piercing
  809. "Jewelcrafting_Tier4_Neck_Misc_4_Purple", // Exquisite Adamant Necklace of Recovery
  810. "Jewelcrafting_Tier4_Neck_Defense_4_Purple",//Exquisite Adamant Necklace of Regeneration
  811. "Jewelcrafting_Tier3_Ring_Offense_3",
  812. "Jewelcrafting_Tier3_Refine_Basic"]
  813. },
  814. });
  815.  
  816. addProfile("Jewelcrafting", {
  817. profileName: "Craft Purple lvl 25",
  818. isProfileActive: true,
  819. level: {
  820. 25: ["Jewelcrafting_Tier4_Ring_Offense_4_Purple", //Exquisite Adamant Ring of Piercing
  821. "Jewelcrafting_Tier4_Ring_Misc_4_Purple", //Exquisite Adamant Ring of Recovery
  822. "Jewelcrafting_Tier4_Ring_Defense_4_Purple", //Exquisite Adamant Ring of Regeneration
  823. "Jewelcrafting_Tier4_Neck_Offense_4_Purple", //Exquisite Adamant Necklace of Piercing
  824. "Jewelcrafting_Tier4_Neck_Misc_4_Purple", // Exquisite Adamant Necklace of Recovery - !!check name!!
  825. "Jewelcrafting_Tier4_Neck_Defense_4_Purple",//Exquisite Adamant Necklace of Regeneration
  826. "Jewelcrafting_Tier3_Refine_Basic"//timeout task
  827. ],
  828. },
  829. });
  830.  
  831. definedTask["Mailsmithing"] = {
  832. taskListName : "Mailsmithing",
  833. taskName : "Armorsmithing_Med",
  834. taskDefaultPriority : 1,
  835. taskDefaultSlotNum : 0,
  836. taskActive : true,
  837. taskDescription : "",
  838. profiles : [{
  839. profileName : "default",
  840. isProfileActive : true,
  841. level : {
  842. 0 : ["Med_Armorsmithing_Tier0_Intro"],
  843. 1 : ["Med_Armorsmithing_Tier1_Gather_Basic"],
  844. 2 : ["Med_Armorsmithing_Tier1_Chain_Armor_1", "Med_Armorsmithing_Tier1_Chain_Pants_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  845. 3 : ["Med_Armorsmithing_Tier1_Chain_Armor_1", "Med_Armorsmithing_Tier1_Chain_Boots_Set_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  846. 4 : ["Med_Armorsmithing_Tier1_Chain_Armor_1", "Med_Armorsmithing_Tier1_Chain_Boots_Set_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  847. 5 : ["Med_Armorsmithing_Tier1_Chain_Armor_Set_1", "Med_Armorsmithing_Tier1_Chain_Boots_Set_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  848. 6 : ["Med_Armorsmithing_Tier1_Chain_Armor_Set_1", "Med_Armorsmithing_Tier1_Chain_Boots_Set_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  849. 7 : ["Med_Armorsmithing_Tier1_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Boots_Set_1", "Med_Armorsmithing_Tier2_Chain_Shirt", "Med_Armorsmithing_Tier1_Gather_Basic", "Med_Armorsmithing_Tier1_Gather_Basic"],
  850. 8 : ["Med_Armorsmithing_Tier2_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Pants_1", "Med_Armorsmithing_Tier2_Chain_Boots_Set_1", "Med_Armorsmithing_Tier2_Chain_Shirt", "Med_Armorsmithing_Tier1_Gather_Basic"],
  851. 9 : ["Med_Armorsmithing_Tier2_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Pants_1", "Med_Armorsmithing_Tier2_Chain_Boots_Set_1", "Med_Armorsmithing_Tier2_Chain_Shirt", "Med_Armorsmithing_Tier1_Gather_Basic"],
  852. 10 : ["Med_Armorsmithing_Tier2_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Pants_1", "Med_Armorsmithing_Tier2_Chain_Boots_Set_1", "Med_Armorsmithing_Tier2_Chain_Shirt_2", "Med_Armorsmithing_Tier1_Gather_Basic", "Med_Armorsmithing_Tier1_Gather_Basic"],
  853. 11 : ["Med_Armorsmithing_Tier2_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Pants_2", "Med_Armorsmithing_Tier2_Chain_Boots_Set_1", "Med_Armorsmithing_Tier2_Chain_Shirt_2", "Med_Armorsmithing_Tier2_Chain_Pants_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  854. 12 : ["Med_Armorsmithing_Tier2_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Pants_2", "Med_Armorsmithing_Tier2_Chain_Boots_Set_1", "Med_Armorsmithing_Tier2_Chain_Shirt_2", "Med_Armorsmithing_Tier2_Chain_Pants_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  855. 13 : ["Med_Armorsmithing_Tier2_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Pants_2", "Med_Armorsmithing_Tier2_Chain_Boots_Set_1", "Med_Armorsmithing_Tier2_Chain_Shirt_2", "Med_Armorsmithing_Tier2_Chain_Pants_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  856. 14 : ["Med_Armorsmithing_Tier2_Chain_Armor_Set_1", "Med_Armorsmithing_Tier2_Chain_Pants_2", "Med_Armorsmithing_Tier3_Chain_Shirt", "Med_Armorsmithing_Tier3_Chain_Boots_Set_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  857. 15 : ["Med_Armorsmithing_Tier3_Chain_Armor_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants", "Med_Armorsmithing_Tier3_Chain_Shirt2", "Med_Armorsmithing_Tier3_Chain_Boots_Set_1", "Med_Armorsmithing_Tier1_Gather_Basic"],
  858. 16 : ["Med_Armorsmithing_Tier3_Chain_Armor_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants2", "Med_Armorsmithing_Tier3_Chain_Shirt2", "Med_Armorsmithing_Tier3_Chain_Helm_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants", "Med_Armorsmithing_Tier1_Gather_Basic"],
  859. 17 : ["Med_Armorsmithing_Tier3_Chain_Armor_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants2", "Med_Armorsmithing_Tier3_Chain_Shirt2", "Med_Armorsmithing_Tier3_Chain_Helm_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants", "Med_Armorsmithing_Tier1_Gather_Basic"],
  860. 18 : ["Med_Armorsmithing_Tier3_Chain_Armor_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants2", "Med_Armorsmithing_Tier3_Chain_Shirt2", "Med_Armorsmithing_Tier3_Chain_Helm_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants", "Med_Armorsmithing_Tier1_Gather_Basic"],
  861. 19 : ["Med_Armorsmithing_Tier3_Chain_Armor_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants2", "Med_Armorsmithing_Tier3_Chain_Shirt2", "Med_Armorsmithing_Tier3_Chain_Helm_Set_1", "Med_Armorsmithing_Tier3_Chain_Pants", "Med_Armorsmithing_Tier1_Gather_Basic"],
  862. 20 : ["Med_Armorsmithing_Tier3_Chain_Pants"],
  863. 21 : ["Med_Armorsmithing_Tier3_Chain_Pants"],
  864. 22 : ["Med_Armorsmithing_Tier3_Chain_Pants"],
  865. 23 : ["Med_Armorsmithing_Tier3_Chain_Pants"],
  866. 24 : ["Med_Armorsmithing_Tier3_Chain_Pants"],
  867. 25 : ["Crafted_Med_Armorsmithing_T4_Refine_Basic", "Crafted_Med_Armorsmithing_T4_Gather_Basic"],
  868. }
  869. }]
  870. };
  871. addProfile("Mailsmithing", {
  872. profileName : "mass refining",
  873. isProfileActive : true,
  874. useMassTask : true,
  875. level : {
  876. 0: ["Med_Armorsmithing_Tier0_Intro"],
  877. 1: ["Med_Armorsmithing_Tier1_Refine_Basic_Mass", "Med_Armorsmithing_Tier1_Gather_Basic"],
  878. 2: "+25",
  879. 7: ["Med_Armorsmithing_Tier2_Refine_Basic_Mass"],
  880. 8: "+25",
  881. 14: ["Med_Armorsmithing_Tier3_Refine_Basic_Mass"],
  882. 15: "+25",
  883. 21: ["Crafted_Med_Armorsmithing_T4_Refine_Basic_Mass"],
  884. 22: "+25",
  885. },
  886. });
  887.  
  888. addProfile("Mailsmithing", {
  889. profileName: "21->25 gather",
  890. isProfileActive: true,
  891. level: {
  892. 21: ["Crafted_Med_Armorsmithing_T4_Refine_Basic_Mass", "Crafted_Med_Armorsmithing_T4_Gather_Basic_Mass"],
  893. 22: "+25",
  894. 25: ["Crafted_Med_Armorsmithing_T4_Refine_Basic", "Crafted_Med_Armorsmithing_T4_Gather_Basic"],
  895. },
  896. });
  897. addProfile("Mailsmithing", {
  898. profileName: "Berserker's Chainmail and rares",
  899. isProfileActive: true,
  900. level: {
  901. 25: ["Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  902. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  903.  
  904. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  905. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  906. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  907. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  908. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  909. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  910.  
  911. "Crafted_Med_Armorsmithing_Scale_T4_Green_Shirt_Dps",//Berserker's Elemental Chainmail
  912. "Med_Armorsmithing_Tier3_Refine_Basic"
  913. ],
  914. },
  915. });
  916.  
  917. addProfile("Mailsmithing", {
  918. profileName: "Berserker's Chausses and rares",
  919. isProfileActive: true,
  920. level: {
  921. 25: ["Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  922. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  923. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  924. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  925.  
  926. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  927. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  928. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  929. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  930.  
  931. "Crafted_Med_Armorsmithing_Scale_T4_Green_Pants_Dps",//Berserker's Elemental Chausses
  932. "Med_Armorsmithing_Tier3_Refine_Basic"
  933.  
  934. ],
  935. },
  936. });
  937. addProfile("Mailsmithing", {
  938. profileName: "Soldier's Chainmail and rares",
  939. isProfileActive: true,
  940. level: {
  941. 25: ["Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  942. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  943. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  944. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  945. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  946. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  947. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  948. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  949.  
  950. "Crafted_Med_Armorsmithing_Scale_T4_Green_Shirt_Tank",//Soldier's Elemental Chainmail
  951. "Med_Armorsmithing_Tier3_Refine_Basic"
  952. ],
  953. },
  954. });
  955.  
  956. addProfile("Mailsmithing", {
  957. profileName: "Soldier's Chausses and rares",
  958. isProfileActive: true,
  959. level: {
  960. 25: ["Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  961. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  962.  
  963. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  964. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  965.  
  966. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  967. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  968. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  969. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  970.  
  971. "Crafted_Med_Armorsmithing_Scale_T4_Green_Pants_Tank",//Soldier's Elemental Chausses
  972. "Med_Armorsmithing_Tier3_Refine_Basic"
  973. ],
  974. },
  975. });
  976. addProfile("Mailsmithing", {
  977. profileName: "Zealot's Chainmail and rares",
  978. isProfileActive: true,
  979. level: {
  980. 25: ["Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  981. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  982. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  983. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  984. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  985. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  986.  
  987. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  988. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  989.  
  990. "Crafted_Med_Armorsmithing_Chain_T4_Green_Shirt_Dps",//Zealot's Elemental Chainmail
  991. "Med_Armorsmithing_Tier3_Refine_Basic"
  992. ],
  993. },
  994. });
  995.  
  996. addProfile("Mailsmithing", {
  997. profileName: "Zealot's Chausses and rares",
  998. isProfileActive: true,
  999. level: {
  1000. 25: ["Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  1001. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  1002. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  1003. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  1004.  
  1005. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  1006. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  1007.  
  1008. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  1009. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  1010.  
  1011. "Crafted_Med_Armorsmithing_Chain_T4_Green_Pants_Dps",//Zealot's Elemental Chausses
  1012. "Med_Armorsmithing_Tier3_Refine_Basic"
  1013. ],
  1014. },
  1015. });
  1016.  
  1017. addProfile("Mailsmithing", {
  1018. profileName: "Prelate's Chainmail and rares",
  1019. isProfileActive: true,
  1020. level: {
  1021. 25: ["Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  1022. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  1023.  
  1024. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  1025. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  1026. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  1027. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  1028.  
  1029. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  1030. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  1031.  
  1032. "Crafted_Med_Armorsmithing_Chain_T4_Green_Shirt_Tank",//Prelate's Elemental Chainmail
  1033. "Med_Armorsmithing_Tier3_Refine_Basic"
  1034. ],
  1035. },
  1036. });
  1037.  
  1038. addProfile("Mailsmithing", {
  1039. profileName: "Prelate's Chausses and rares",
  1040. isProfileActive: true,
  1041. level: {
  1042. 25: ["Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  1043. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  1044. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  1045. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  1046. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  1047. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  1048.  
  1049. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  1050. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  1051.  
  1052. "Crafted_Med_Armorsmithing_Chain_T4_Green_Pants_Tank",//Prelate's Elemental Chainmail
  1053. "Med_Armorsmithing_Tier3_Refine_Basic"
  1054. ]
  1055. },
  1056. });
  1057.  
  1058. addProfile("Mailsmithing", {
  1059. profileName: "craft rares only",
  1060. isProfileActive: true,
  1061. level: {
  1062. 25: ["Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Tank", //Prelate's Exquisite Elemental Chausses
  1063. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Tank", //Prelate's Exquisite Elemental Chainmail
  1064. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Pants_Dps", //Zealot's Exquisite Elemental Chausses
  1065. "Crafted_Med_Armorsmithing_Chain_T4_Purple_Shirt_Dps", //Zealot's Exquisite Elemental Chainmail
  1066. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Soldier's Exquisite Elemental Chausses
  1067. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Dps", //Soldier's Exquisite Elemental Chainmail
  1068.  
  1069. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Pants_Dps", //Berserker's Exquisite Elemental Chausses
  1070. "Crafted_Med_Armorsmithing_Scale_T4_Purple_Shirt_Tank", //Berserker's Exquisite Elemental Chainmail
  1071. "Med_Armorsmithing_Tier2_Refine_Basic"]
  1072. }
  1073. });
  1074.  
  1075. addProfile("Mailsmithing", {
  1076. profileName: "Wondrous Sprocket",
  1077. isProfileActive: false,
  1078. level: {
  1079. 6: ["Med_Armorsmithing_Tier1_Event_Gond"],
  1080. 7: "+25",
  1081. },
  1082. });
  1083.  
  1084. definedTask["Platesmithing"] = {
  1085. taskListName: "Platesmithing",
  1086. taskName: "Armorsmithing_Heavy",
  1087. taskDefaultPriority: 1,
  1088. taskDefaultSlotNum: 0,
  1089. taskActive: true,
  1090. taskDescription: "",
  1091. profiles: [{
  1092. profileName: "default",
  1093. isProfileActive: true,
  1094. level: {
  1095. 0: ["Hvy_Armorsmithing_Tier0_Intro"],
  1096. 1: ["Hvy_Armorsmithing_Tier1_Plate_Boots_1", "Hvy_Armorsmithing_Tier1_Plate_Shirt_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1097. 2: ["Hvy_Armorsmithing_Tier1_Plate_Armor_1", "Hvy_Armorsmithing_Tier1_Plate_Pants_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1098. 3: ["Hvy_Armorsmithing_Tier1_Plate_Armor_1", "Hvy_Armorsmithing_Tier1_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1099. 4: ["Hvy_Armorsmithing_Tier1_Plate_Armor_1", "Hvy_Armorsmithing_Tier1_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1100. 5: ["Hvy_Armorsmithing_Tier1_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier1_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1101. 6: ["Hvy_Armorsmithing_Tier1_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier1_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1102. 7: ["Hvy_Armorsmithing_Tier1_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Shirt", "Hvy_Armorsmithing_Tier2_Shield_Set_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1103. 8: ["Hvy_Armorsmithing_Tier2_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Pants_1", "Hvy_Armorsmithing_Tier2_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Shirt", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1104. 9: ["Hvy_Armorsmithing_Tier2_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Pants_1", "Hvy_Armorsmithing_Tier2_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Shirt", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1105. 10: ["Hvy_Armorsmithing_Tier2_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Pants_1", "Hvy_Armorsmithing_Tier2_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Shirt_2", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1106. 11: ["Hvy_Armorsmithing_Tier2_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Pants_2", "Hvy_Armorsmithing_Tier2_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Shirt_2", "Hvy_Armorsmithing_Tier2_Plate_Pants_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1107. 12: ["Hvy_Armorsmithing_Tier2_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Pants_2", "Hvy_Armorsmithing_Tier2_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Shirt_2", "Hvy_Armorsmithing_Tier2_Plate_Pants_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1108. 13: ["Hvy_Armorsmithing_Tier2_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Pants_2", "Hvy_Armorsmithing_Tier2_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Shirt_2", "Hvy_Armorsmithing_Tier2_Plate_Pants_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1109. 14: ["Hvy_Armorsmithing_Tier2_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier2_Plate_Pants_2", "Hvy_Armorsmithing_Tier3_Plate_Shirt", "Hvy_Armorsmithing_Tier3_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1110. 15: ["Hvy_Armorsmithing_Tier3_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants", "Hvy_Armorsmithing_Tier3_Plate_Shirt2", "Hvy_Armorsmithing_Tier3_Plate_Boots_Set_1", "Hvy_Armorsmithing_Tier1_Gather_Basic", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1111. 16: ["Hvy_Armorsmithing_Tier3_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants2", "Hvy_Armorsmithing_Tier3_Plate_Shirt2", "Hvy_Armorsmithing_Tier3_Plate_Helm_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1112. 17: ["Hvy_Armorsmithing_Tier3_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants2", "Hvy_Armorsmithing_Tier3_Plate_Shirt2", "Hvy_Armorsmithing_Tier3_Plate_Helm_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1113. 18: ["Hvy_Armorsmithing_Tier3_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants2", "Hvy_Armorsmithing_Tier3_Plate_Shirt2", "Hvy_Armorsmithing_Tier3_Plate_Helm_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1114. 19: ["Hvy_Armorsmithing_Tier3_Plate_Armor_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants2", "Hvy_Armorsmithing_Tier3_Plate_Shirt2", "Hvy_Armorsmithing_Tier3_Plate_Helm_Set_1", "Hvy_Armorsmithing_Tier3_Plate_Pants", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1115. 20: ["Hvy_Armorsmithing_Tier3_Plate_Pants"],
  1116. 21: ["Hvy_Armorsmithing_Tier3_Plate_Pants"],
  1117. 22: ["Hvy_Armorsmithing_Tier3_Plate_Pants"],
  1118. 23: ["Hvy_Armorsmithing_Tier3_Plate_Pants"],
  1119. 24: ["Hvy_Armorsmithing_Tier3_Plate_Pants"],
  1120. 25: ["Crafted_Hvy_Armorsmithing_T4_Refine_Basic_Mass", "Crafted_Hvy_Armorsmithing_T4_Gather_Basic_Mass"],
  1121. },
  1122. }]
  1123. };
  1124.  
  1125. addProfile("Platesmithing", {
  1126. profileName : "mass refining",
  1127. isProfileActive : true,
  1128. useMassTask : true,
  1129. level : {
  1130. 0: ["Hvy_Armorsmithing_Tier0_Intro"],
  1131. 1: ["Hvy_Armorsmithing_Tier1_Refine_Basic_Mass", "Hvy_Armorsmithing_Tier1_Gather_Basic"],
  1132. 2: "+25",
  1133. 7: ["Hvy_Armorsmithing_Tier2_Refine_Basic_Mass"],
  1134. 8: "+25",
  1135. 14: ["Hvy_Armorsmithing_Tier3_Refine_Basic_Mass"],
  1136. 15: "+25",
  1137. 21: ["Crafted_Hvy_Armorsmithing_T4_Refine_Basic_Mass"],
  1138. 22: "+25",
  1139. },
  1140. });
  1141.  
  1142. addProfile("Platesmithing", {
  1143. profileName: "21->25 gather",
  1144. isProfileActive: true,
  1145. level: {
  1146. 21: ["Crafted_Hvy_Armorsmithing_T4_Refine_Basic_Mass", "Crafted_Hvy_Armorsmithing_T4_Gather_Basic_Mass"],
  1147. 22: "+25",
  1148. },
  1149. });
  1150.  
  1151. addProfile("Platesmithing", {
  1152. profileName: "craft purple lvl 25",
  1153. isProfileActive: true,
  1154. level: {
  1155. 25: ["Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Tank", //Defender's Exquisite Elemental Chainmail
  1156. "Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Dps", //Warrior's Exquisite Elemental Chainmail
  1157. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Tank",//Defender's Exquisite Elemental Chausses
  1158. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Dps", //Warrior's Exquisite Elemental Chausses
  1159. "Hvy_Armorsmithing_Tier3_Refine_Basic"//Mithral plates
  1160. ]
  1161. }
  1162. }, "21->25 gather");
  1163.  
  1164. addProfile("Platesmithing", {
  1165. profileName: "craft Exq. Tank shirt",
  1166. isProfileActive: true,
  1167. level: {
  1168. 25: ["Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Tank", //Defender's Exquisite Elemental Chainmail
  1169. "Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Dps", //Warrior's Exquisite Elemental Chainmail
  1170. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Tank",//Defender's Exquisite Elemental Chausses
  1171. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Dps", //Warrior's Exquisite Elemental Chausses
  1172. "Crafted_Hvy_Armorsmithing_T4_Green_Shirt_Tank",
  1173. "Hvy_Armorsmithing_Tier3_Refine_Basic"//Mithral plates
  1174. ]
  1175. }
  1176. }, "21->25 gather");
  1177.  
  1178. addProfile("Platesmithing", {
  1179. profileName: "craft Exq. Warrior shirt",
  1180. isProfileActive: true,
  1181. level: {
  1182. 25: ["Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Dps", //Warrior's Exquisite Elemental Chainmail
  1183. "Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Tank", //Defender's Exquisite Elemental Chainmail
  1184. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Tank",//Defender's Exquisite Elemental Chausses
  1185. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Dps", //Warrior's Exquisite Elemental Chausses
  1186. "Crafted_Hvy_Armorsmithing_T4_Green_Shirt_Dps",
  1187. "Hvy_Armorsmithing_Tier3_Refine_Basic"//Mithral plates
  1188. ]
  1189. }
  1190. }, "21->25 gather");
  1191.  
  1192. addProfile("Platesmithing", {
  1193. profileName: "craft Exq. Tank pants",
  1194. isProfileActive: true,
  1195. level: {
  1196. 25: ["Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Tank",//Defender's Exquisite Elemental Chausses
  1197. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Dps", //Warrior's Exquisite Elemental Chausses
  1198. "Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Dps", //Warrior's Exquisite Elemental Chainmail
  1199. "Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Tank", //Defender's Exquisite Elemental Chainmail
  1200. "Crafted_Hvy_Armorsmithing_T4_Green_Pants_Tank",
  1201. "Hvy_Armorsmithing_Tier3_Refine_Basic"//Mithral plates
  1202. ]
  1203. }
  1204. }, "21->25 gather");
  1205.  
  1206. addProfile("Platesmithing", {
  1207. profileName: "craft Exq. Warrior pants",
  1208. isProfileActive: true,
  1209. level: {
  1210. 25: ["Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Dps", //Warrior's Exquisite Elemental Chausses
  1211. "Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Dps", //Warrior's Exquisite Elemental Chainmail
  1212. "Crafted_Hvy_Armorsmithing_T4_Purple_Shirt_Tank", //Defender's Exquisite Elemental Chainmail
  1213. "Crafted_Hvy_Armorsmithing_T4_Purple_Pants_Tank",//Defender's Exquisite Elemental Chausses
  1214. "Crafted_Hvy_Armorsmithing_T4_Green_Pants_Dps",
  1215. "Hvy_Armorsmithing_Tier3_Refine_Basic"//Mithral plates
  1216. ]
  1217. }
  1218. }, "21->25 gather");
  1219.  
  1220.  
  1221. addProfile("Platesmithing", {
  1222. profileName: "Wondrous Sprocket",
  1223. isProfileActive: false,
  1224. level: {
  1225. 6: ["Hvy_Armorsmithing_Tier1_Event_Gond"],
  1226. 7: "+25",
  1227. },
  1228. });
  1229.  
  1230. definedTask["Leatherworking"] = {
  1231. taskListName : "Leatherworking",
  1232. taskName : "Leatherworking",
  1233. taskDefaultPriority : 1,
  1234. taskDefaultSlotNum : 0,
  1235. taskActive : true,
  1236. taskDescription : "",
  1237. profiles : [{
  1238. profileName : "default",
  1239. isProfileActive : true,
  1240. level : {
  1241. 0 : ["Leatherworking_Tier0_Intro_1"],
  1242. 1 : ["Leatherworking_Tier1_Leather_Boots_1", "Leatherworking_Tier1_Leather_Shirt_1", "Leatherworking_Tier1_Gather_Basic"],
  1243. 2 : ["Leatherworking_Tier1_Leather_Armor_1", "Leatherworking_Tier1_Leather_Pants_1", "Leatherworking_Tier1_Gather_Basic"],
  1244. 3 : ["Leatherworking_Tier1_Leather_Armor_1", "Leatherworking_Tier1_Leather_Boots_Set_1", "Leatherworking_Tier1_Gather_Basic"],
  1245. 4 : ["Leatherworking_Tier1_Leather_Armor_1", "Leatherworking_Tier1_Leather_Boots_Set_1", "Leatherworking_Tier1_Gather_Basic"],
  1246. 5 : ["Leatherworking_Tier1_Leather_Armor_Set_1", "Leatherworking_Tier1_Leather_Boots_Set_1", "Leatherworking_Tier1_Gather_Basic"],
  1247. 6 : ["Leatherworking_Tier1_Leather_Armor_Set_1", "Leatherworking_Tier1_Leather_Boots_Set_1", "Leatherworking_Tier1_Gather_Basic"],
  1248. 7 : ["Leatherworking_Tier1_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Boots_Set_1", "Leatherworking_Tier2_Leather_Shirt", "Leatherworking_Tier1_Gather_Basic"],
  1249. 8 : ["Leatherworking_Tier2_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Pants_1", "Leatherworking_Tier2_Leather_Boots_Set_1", "Leatherworking_Tier2_Leather_Shirt", "Leatherworking_Tier1_Gather_Basic"],
  1250. 9 : ["Leatherworking_Tier2_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Pants_1", "Leatherworking_Tier2_Leather_Boots_Set_1", "Leatherworking_Tier2_Leather_Shirt", "Leatherworking_Tier1_Gather_Basic"],
  1251. 10 : ["Leatherworking_Tier2_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Pants_1", "Leatherworking_Tier2_Leather_Boots_Set_1", "Leatherworking_Tier2_Leather_Shirt_2", "Leatherworking_Tier1_Gather_Basic"],
  1252. 11 : ["Leatherworking_Tier2_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Pants_2", "Leatherworking_Tier2_Leather_Boots_Set_1", "Leatherworking_Tier2_Leather_Shirt_2", "Leatherworking_Tier2_Leather_Pants_1", "Leatherworking_Tier1_Gather_Basic"],
  1253. 12 : ["Leatherworking_Tier2_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Pants_2", "Leatherworking_Tier2_Leather_Boots_Set_1", "Leatherworking_Tier2_Leather_Shirt_2", "Leatherworking_Tier2_Leather_Pants_1", "Leatherworking_Tier1_Gather_Basic"],
  1254. 13 : ["Leatherworking_Tier2_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Pants_2", "Leatherworking_Tier2_Leather_Boots_Set_1", "Leatherworking_Tier2_Leather_Shirt_2", "Leatherworking_Tier2_Leather_Pants_1", "Leatherworking_Tier1_Gather_Basic"],
  1255. 14 : ["Leatherworking_Tier2_Leather_Armor_Set_1", "Leatherworking_Tier2_Leather_Pants_2", "Ornate Leatherworking_Tier1_Leather_Shirt_1", "Leatherworking_Tier3_Leather_Boots_Set_1", "Leatherworking_Tier1_Gather_Basic"],
  1256. 15 : ["Leatherworking_Tier3_Leather_Armor_Set_1", "Leatherworking_Tier3_Leather_Pants", "Leatherworking_Tier3_Leather_Shirt2", "Leatherworking_Tier3_Leather_Boots_Set_1", "Leatherworking_Tier1_Gather_Basic"],
  1257. 16 : ["Leatherworking_Tier3_Leather_Armor_Set_1", "Leatherworking_Tier3_Leather_Pants2", "Leatherworking_Tier3_Leather_Shirt2", "Leatherworking_Tier3_Leather_Helm_Set_1", "Leatherworking_Tier3_Leather_Pants", "Leatherworking_Tier1_Gather_Basic"],
  1258. 17 : ["Leatherworking_Tier3_Leather_Armor_Set_1", "Leatherworking_Tier3_Leather_Pants2", "Leatherworking_Tier3_Leather_Shirt2", "Leatherworking_Tier3_Leather_Helm_Set_1", "Leatherworking_Tier3_Leather_Pants", "Leatherworking_Tier1_Gather_Basic"],
  1259. 18 : ["Leatherworking_Tier3_Leather_Armor_Set_1", "Leatherworking_Tier3_Leather_Pants2", "Leatherworking_Tier3_Leather_Shirt2", "Leatherworking_Tier3_Leather_Helm_Set_1", "Leatherworking_Tier3_Leather_Pants", "Leatherworking_Tier1_Gather_Basic"],
  1260. 19 : ["Leatherworking_Tier3_Leather_Armor_Set_1", "Leatherworking_Tier3_Leather_Pants2", "Leatherworking_Tier3_Leather_Shirt2", "Leatherworking_Tier3_Leather_Helm_Set_1", "Leatherworking_Tier3_Leather_Pants", "Leatherworking_Tier1_Gather_Basic"],
  1261. //19:["Leather Armor +4","Fancy Leather Pants","Fancy Leather Shirt","Leather Helm +4","Ornate Leather Pants","Upgrade Tanner","Upgrade Skinner","Hire an additional Skinner"],
  1262. 20 : ["Leatherworking_Tier3_Leather_Pants"],
  1263. 21 : ["Leatherworking_Tier3_Leather_Pants"],
  1264. 22 : ["Leatherworking_Tier3_Leather_Pants"],
  1265. 23 : ["Leatherworking_Tier3_Leather_Pants"],
  1266. 24 : ["Leatherworking_Tier3_Leather_Pants"],
  1267. 25 : ["Leatherworking_Tier4_Refine_Basic", "Leatherworking_Tier4_Gather_Basic"],
  1268. },
  1269. } ]
  1270. };
  1271. addProfile("Leatherworking", {
  1272. profileName : "mass refining",
  1273. isProfileActive : true,
  1274. useMassTask : true,
  1275. level : {
  1276. 0: ["Leatherworking_Tier0_Intro_1"],
  1277. 1: ["Leatherworking_Tier1_Refine_Basic_Mass", "Leatherworking_Tier1_Gather_Basic"],
  1278. 2: "+25",
  1279. 7: ["Leatherworking_Tier2_Refine_Basic_Mass"],
  1280. 8: "+25",
  1281. 14: ["Leatherworking_Tier3_Refine_Basic_Mass"],
  1282. 15: "+25",
  1283. 21: ["Leatherworking_Tier4_Refine_Basic_Mass"],
  1284. 22: "+25",
  1285. },
  1286. });
  1287.  
  1288. addProfile("Leatherworking", {
  1289. profileName: "20->25 gather",
  1290. isProfileActive: true,
  1291. level: {
  1292. 20: ["Leatherworking_Tier3_Leather_Pants"],
  1293. 21: ["Leatherworking_Tier4_Refine_Basic_Mass", "Leatherworking_Tier4_Gather_Basic"],
  1294. 22: "+25",
  1295. 25: ["Leatherworking_Tier4_Refine_Basic", "Leatherworking_Tier4_Gather_Basic"],
  1296. },
  1297. });
  1298.  
  1299. addProfile("Leatherworking", {
  1300. profileName: "craft purples only",
  1301. level: {
  1302. //purples first. shirts > tunics > pants.
  1303. 25: ["Leatherworking_Tier4_Leather_Shirt_Special_2", //Exquisite Elemental Shirt
  1304. "Leatherworking_Tier4_Leather_Shirt_Special_2_Set2", //Exquisite Elemental Tunic
  1305. "Leatherworking_Tier4_Leather_Pants_Special_2_Set2", //Exquisite Elemental Trousers
  1306. "Leatherworking_Tier4_Leather_Pants_Special_2", //Exquisite Elemental Pants
  1307. "Leatherworking_Tier3_Gather_Basic"]
  1308. }
  1309. });
  1310.  
  1311. addProfile("Leatherworking", {
  1312. profileName: "craft Elemental Shirts",
  1313. level: {
  1314. //purples first. shirts > tunics > pants.
  1315. 25: ['Leatherworking_Tier4_Leather_Shirt_Special_2', //Exquisite Elemental Shirt
  1316. 'Leatherworking_Tier4_Leather_Shirt_Special_2_Set2', //Exquisite Elemental Tunic
  1317. 'Leatherworking_Tier4_Leather_Pants_Special_2_Set2', //Exquisite Elemental Trousers
  1318. 'Leatherworking_Tier4_Leather_Pants_Special_2', //Exquisite Elemental Pants
  1319. 'Leatherworking_Tier4_Leather_Shirt2', //Elemental Leather Shirt
  1320. "Leatherworking_Tier3_Gather_Basic"
  1321. ]
  1322. }
  1323. });
  1324.  
  1325. addProfile("Leatherworking", {
  1326. profileName: "craft Elemental Tunic",
  1327. level: {
  1328. //purples first. shirts > tunics > pants.
  1329. 25: ['Leatherworking_Tier4_Leather_Shirt_Special_2_Set2', //Exquisite Elemental Tunic
  1330. 'Leatherworking_Tier4_Leather_Shirt_Special_2', //Exquisite Elemental Shirt
  1331. 'Leatherworking_Tier4_Leather_Pants_Special_2_Set2', //Exquisite Elemental Trousers
  1332. 'Leatherworking_Tier4_Leather_Pants_Special_2', //Exquisite Elemental Pants
  1333. 'Leatherworking_Tier4_Leather_Shirt2_Set2', //Elemental Leather Tunic
  1334. 'Leatherworking_Tier3_Gather_Basic'
  1335. ]
  1336. }
  1337. });
  1338. addProfile("Leatherworking", {
  1339. profileName: "craft Elemental Trousers",
  1340. level: {
  1341. //purples first. shirts > tunics > pants.
  1342. 25: ['Leatherworking_Tier4_Leather_Pants_Special_2_Set2', //Exquisite Elemental Trousers
  1343. 'Leatherworking_Tier4_Leather_Pants_Special_2', //Exquisite Elemental Pants
  1344. 'Leatherworking_Tier4_Leather_Shirt_Special_2_Set2', //Exquisite Elemental Tunic
  1345. 'Leatherworking_Tier4_Leather_Shirt_Special_2', //Exquisite Elemental Shirt
  1346. 'Leatherworking_Tier4_Leather_Pants2_Set2', //Elemental Leather Trousers
  1347. 'Leatherworking_Tier3_Gather_Basic'
  1348. ]
  1349. }
  1350. });
  1351.  
  1352. addProfile("Leatherworking", {
  1353. profileName: "craft Elemental Pants",
  1354. level: {
  1355. //purples first. shirts > tunics > pants.
  1356. 25: ['Leatherworking_Tier4_Leather_Pants_Special_2', //Exquisite Elemental Pants
  1357. 'Leatherworking_Tier4_Leather_Pants_Special_2_Set2', //Exquisite Elemental Trousers
  1358. 'Leatherworking_Tier4_Leather_Shirt_Special_2_Set2', //Exquisite Elemental Tunic
  1359. 'Leatherdeworking_Tier4_Leather_Shirt_Special_2', //Exquisite Elemental Shirt
  1360. 'Leatherworking_Tier4_Leather_Pants2', //Elemental Leather Pants
  1361. 'Leatherworking_Tier3_Gather_Basic'
  1362. ]
  1363. }
  1364. });
  1365.  
  1366. addProfile("Leatherworking", {
  1367. profileName: "Wondrous Sprocket",
  1368. isProfileActive: false,
  1369. level: {
  1370. 6: ["Leatherworking_Tier1_Event_Gond"],
  1371. 7: "+25",
  1372. },
  1373. });
  1374.  
  1375. definedTask["Tailoring"] = {
  1376. taskListName: "Tailoring",
  1377. taskName: "Tailoring",
  1378. taskDefaultPriority: 1,
  1379. taskDefaultSlotNum: 0,
  1380. taskActive: true,
  1381. taskDescription: "",
  1382. profiles: [{
  1383. profileName: "default",
  1384. isProfileActive: true,
  1385. level: {
  1386. 0: ["Tailoring_Tier0_Intro"],
  1387. 1: ["Tailoring_Tier1_Cloth_Boots_1", "Tailoring_Tier1_Cloth_Shirt_1", "Tailoring_Tier1_Gather_Basic"],
  1388. 2: ["Tailoring_Tier1_Cloth_Armor_1", "Tailoring_Tier1_Cloth_Pants_1", "Tailoring_Tier1_Gather_Basic"],
  1389. 3: ["Tailoring_Tier1_Cloth_Armor_1", "Tailoring_Tier1_Cloth_Boots_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1390. 4: ["Tailoring_Tier1_Cloth_Armor_1", "Tailoring_Tier1_Cloth_Boots_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1391. 5: ["Tailoring_Tier1_Cloth_Armor_Set_1", "Tailoring_Tier1_Cloth_Boots_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1392. 6: ["Tailoring_Tier1_Cloth_Armor_Set_1", "Tailoring_Tier1_Cloth_Boots_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1393. 7: ["Tailoring_Tier1_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Boots_Set_1", "Tailoring_Tier2_Cloth_Shirt", "Tailoring_Tier1_Gather_Basic", "Tailoring_Tier1_Gather_Basic"],
  1394. 8: ["Tailoring_Tier2_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Pants_1", "Tailoring_Tier2_Cloth_Boots_Set_1", "Tailoring_Tier2_Cloth_Shirt", "Tailoring_Tier1_Gather_Basic"],
  1395. 9: ["Tailoring_Tier2_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Pants_1", "Tailoring_Tier2_Cloth_Boots_Set_1", "Tailoring_Tier2_Cloth_Shirt", "Tailoring_Tier1_Gather_Basic"],
  1396. 10: ["Tailoring_Tier2_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Pants_1", "Tailoring_Tier2_Cloth_Boots_Set_1", "Tailoring_Tier2_Cloth_Shirt_2", "Tailoring_Tier1_Gather_Basic"],
  1397. 11: ["Tailoring_Tier2_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Pants_2", "Tailoring_Tier2_Cloth_Boots_Set_1", "Tailoring_Tier2_Cloth_Shirt_2", "Tailoring_Tier2_Cloth_Pants_1", "Tailoring_Tier1_Gather_Basic"],
  1398. 12: ["Tailoring_Tier2_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Pants_2", "Tailoring_Tier2_Cloth_Boots_Set_1", "Tailoring_Tier2_Cloth_Shirt_2", "Tailoring_Tier2_Cloth_Pants_1", "Tailoring_Tier1_Gather_Basic"],
  1399. 13: ["Tailoring_Tier2_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Pants_2", "Tailoring_Tier2_Cloth_Boots_Set_1", "Tailoring_Tier2_Cloth_Shirt_2", "Tailoring_Tier2_Cloth_Pants_1", "Tailoring_Tier1_Gather_Basic"],
  1400. 14: ["Tailoring_Tier2_Cloth_Armor_Set_1", "Tailoring_Tier2_Cloth_Pants_2", "Tailoring_Tier3_Cloth_Shirt", "Tailoring_Tier3_Cloth_Boots_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1401. 15: ["Tailoring_Tier3_Cloth_Armor_Set_1", "Tailoring_Tier3_Cloth_Pants", "Tailoring_Tier3_Cloth_Shirt2", "Tailoring_Tier3_Cloth_Boots_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1402. 16: ["Tailoring_Tier3_Cloth_Armor_Set_1", "Tailoring_Tier3_Cloth_Pants", "Tailoring_Tier3_Cloth_Shirt2", "Tailoring_Tier3_Cloth_Helm_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1403. 17: ["Tailoring_Tier3_Cloth_Armor_Set_1", "Tailoring_Tier3_Cloth_Pants2_Set2", "Tailoring_Tier3_Cloth_Shirt2", "Tailoring_Tier3_Cloth_Helm_Set_1", "Tailoring_Tier1_Gather_Basic"],
  1404. 18: ["Tailoring_Tier3_Cloth_Armor_Set_3", "Tailoring_Tier3_Cloth_Armor_Set_2", "Tailoring_Tier3_Cloth_Armor_Set_1", "Tailoring_Tier3_Cloth_Pants2_Set2", "Tailoring_Tier3_Cloth_Shirt2", "Tailoring_Tier3_Cloth_Helm_Set_1", "Tailoring_Tier3_Cloth_Pants", "Tailoring_Tier1_Gather_Basic"],
  1405. 19: ["Tailoring_Tier3_Cloth_Armor_Set_3", "Tailoring_Tier3_Cloth_Armor_Set_2", "Tailoring_Tier3_Cloth_Armor_Set_1", "Tailoring_Tier3_Cloth_Pants2_Set2", "Tailoring_Tier3_Cloth_Shirt2", "Tailoring_Tier3_Cloth_Helm_Set_1", "Tailoring_Tier3_Cloth_Pants", "Tailoring_Tier1_Gather_Basic"],
  1406. //19:["Cloth Robes +4","Fancy Cloth Pants","Fancy Cloth Shirt","Cloth Cap +4","Ornate Cloth Pants","Upgrade Outfitter","Upgrade Weaver","Hire an additional Weaver"],
  1407. 20: ["Tailoring_Tier3_Cloth_Pants"],
  1408. 21: ["Tailoring_Tier3_Cloth_Pants"],
  1409. 22: ["Tailoring_Tier3_Cloth_Pants"],
  1410. 23: ["Tailoring_Tier3_Cloth_Pants"],
  1411. 24: ["Tailoring_Tier3_Cloth_Pants"],
  1412. 25: ["Crafted_Tailoring_T4_Refine_Basic", "Crafted_Tailoring_T4_Gather_Basic"],
  1413. },
  1414. }]
  1415. };
  1416.  
  1417. addProfile("Tailoring", {
  1418. profileName : "mass refining",
  1419. isProfileActive : true,
  1420. useMassTask : true,
  1421. level : {
  1422. 0: ["Tailoring_Tier0_Intro"],
  1423. 1: ["Tailoring_Tier1_Refine_Basic_Mass", "Tailoring_Tier1_Gather_Basic"],
  1424. 2: "+25",
  1425. 7: ["Tailoring_Tier2_Refine_Basic_Mass"],
  1426. 8: "+25",
  1427. 14: ["Tailoring_Tier3_Refine_Basic_Mass"],
  1428. 15: "+25",
  1429. 21: ["Crafted_Tailoring_T4_Refine_Basic_Mass"],
  1430. 22: "+25",
  1431. },
  1432. });
  1433.  
  1434. addProfile("Tailoring", {
  1435. profileName: "21->25 gather",
  1436. isProfileActive: true,
  1437. level: {
  1438. 21: ["Crafted_Tailoring_T4_Refine_Basic_Mass", "Crafted_Tailoring_T4_Gather_Basic_Mass"],
  1439. 22: "+25",
  1440. 25: ["Crafted_Tailoring_T4_Refine_Basic", "Crafted_Tailoring_T4_Gather_Basic"],
  1441. },
  1442. });
  1443.  
  1444. addProfile("Tailoring", {
  1445. profileName: "Wondrous Sprocket",
  1446. isProfileActive: false,
  1447. level: {
  1448. 6: ["Tailoring_Tier1_Event_Gond"],
  1449. 7: "+25",
  1450. },
  1451. });
  1452.  
  1453.  
  1454. definedTask["Artificing"] = {
  1455. taskListName: "Artificing",
  1456. taskName: "Artificing",
  1457. taskDefaultPriority: 1,
  1458. taskDefaultSlotNum: 0,
  1459. taskActive: true,
  1460. taskDescription: "",
  1461. profiles: [{
  1462. profileName: "default",
  1463. isProfileActive: true,
  1464. level: {
  1465. 0: ["Artificing_Tier0_Intro_1"],
  1466. 1: ["Artificing_Tier1_Pactblade_Convergence_1", "Artificing_Tier1_Symbol_Virtuous_1", "Artificing_Tier1_Gather_Basic"],
  1467. 2: ["Artificing_Tier1_Pactblade_Convergence_1", "Artificing_Tier1_Icon_Virtuous_1", "Artificing_Tier1_Gather_Basic"],
  1468. 3: ["Artificing_Tier1_Pactblade_Convergence_1", "Artificing_Tier1_Icon_Virtuous_1", "Artificing_Tier1_Gather_Basic"],
  1469. 4: ["Artificing_Tier1_Pactblade_Convergence_2", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier1_Gather_Basic"],
  1470. 5: ["Artificing_Tier1_Pactblade_Convergence_2", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier1_Gather_Basic"],
  1471. 6: ["Artificing_Tier1_Pactblade_Convergence_2", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier1_Gather_Basic"],
  1472. 7: ["Artificing_Tier2_Pactblade_Temptation_3", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1473. 8: ["Artificing_Tier2_Pactblade_Temptation_3", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1474. 9: ["Artificing_Tier2_Pactblade_Temptation_3", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1475. 10: ["Artificing_Tier2_Pactblade_Temptation_3", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1476. 11: ["Artificing_Tier2_Pactblade_Temptation_3", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1477. 12: ["Artificing_Tier2_Pactblade_Temptation_3", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1478. 13: ["Artificing_Tier2_Pactblade_Temptation_3", "Artificing_Tier1_Icon_Virtuous_2", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1479. 14: ["Artificing_Tier3_Pactblade_Temptation_4", "Artificing_Tier3_Icon_Virtuous_4", "Artificing_Tier3_Refine_Basic", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1480. 15: ["Artificing_Tier3_Pactblade_Temptation_4", "Artificing_Tier3_Icon_Virtuous_4", "Artificing_Tier3_Refine_Basic", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1481. 16: ["Artificing_Tier3_Pactblade_Temptation_4", "Artificing_Tier3_Icon_Virtuous_4", "Artificing_Tier3_Refine_Basic", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1482. 17: ["Artificing_Tier3_Pactblade_Temptation_5", "Artificing_Tier3_Icon_Virtuous_5", "Artificing_Tier3_Refine_Basic", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1483. 18: ["Artificing_Tier3_Pactblade_Temptation_5", "Artificing_Tier3_Icon_Virtuous_5", "Artificing_Tier3_Refine_Basic", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1484. 19: ["Artificing_Tier3_Pactblade_Temptation_5", "Artificing_Tier3_Icon_Virtuous_5", "Artificing_Tier3_Refine_Basic", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1485. //19:["Virtuous Icon +5","Upgrade Engraver","Upgrade Carver","Hire an additional Carver"],
  1486. 20: ["Artificing_Tier3_Pactblade_Temptation_5", "Artificing_Tier3_Icon_Virtuous_5", "Artificing_Tier3_Refine_Basic", "Artificing_Tier2_Refine_Basic", "Artificing_Tier1_Gather_Basic"],
  1487. 21: ["Artificing_Tier4_Gather_Basic"],
  1488. 22: ["Artificing_Tier4_Gather_Basic"],
  1489. 23: ["Artificing_Tier4_Gather_Basic"],
  1490. 24: ["Artificing_Tier4_Gather_Basic"],
  1491. 25: ["Artificing_Tier4_Refine_Basic", "Artificing_Tier4_Gather_Basic"],
  1492. },
  1493. }]
  1494. };
  1495.  
  1496. addProfile("Artificing", {
  1497. profileName : "mass refining",
  1498. isProfileActive : true,
  1499. useMassTask : true,
  1500. level : {
  1501. 0: ["Artificing_Tier0_Intro_1"],
  1502. 1: ["Artificing_Tier1_Refine_Basic_Mass", "Artificing_Tier1_Gather_Basic"],
  1503. 2: "+25",
  1504. 7: ["Artificing_Tier2_Refine_Basic_Mass"],
  1505. 8: "+25",
  1506. 14: ["Artificing_Tier3_Refine_Basic_Mass"],
  1507. 15: "+25",
  1508. 21: ["Artificing_Tier4_Refine_Basic_Mass"],
  1509. 22: "+25",
  1510. },
  1511. });
  1512.  
  1513. addProfile("Artificing", {
  1514. profileName: "Wondrous Sprocket",
  1515. isProfileActive: false,
  1516. level: {
  1517. 6: ["Artificing_Tier1_Event_Gond"],
  1518. 7: "+25",
  1519. },
  1520. });
  1521.  
  1522.  
  1523. definedTask["Weaponsmithing"] = {
  1524. taskListName: "Weaponsmithing",
  1525. taskName: "Weaponsmithing",
  1526. taskDefaultPriority: 1,
  1527. taskDefaultSlotNum: 0,
  1528. taskActive: true,
  1529. taskDescription: "",
  1530. profiles: [{
  1531. profileName: "default",
  1532. isProfileActive: true,
  1533. level: {
  1534. 0: ["Weaponsmithing_Tier0_Intro"],
  1535. 1: ["Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1536. 2: ["Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1537. 3: ["Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1538. 4: ["Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1539. 5: ["Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1540. 6: ["Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1541. 7: ["Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1542. 8: ["Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1543. 9: ["Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1544. 10: ["Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1545. 11: ["Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1546. 12: ["Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1547. 13: ["Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1548. 14: ["Weaponsmithing_Tier3_Dagger_4", "Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1549. 15: ["Weaponsmithing_Tier3_Dagger_4", "Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1550. 16: ["Weaponsmithing_Tier3_Dagger_4", "Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1551. 17: ["Weaponsmithing_Tier3_Dagger_4", "Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1552. 18: ["Weaponsmithing_Tier3_Dagger_4", "Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1553. 19: ["Weaponsmithing_Tier3_Dagger_4", "Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1554. 20: ["Weaponsmithing_Tier3_Dagger_Set_2", "Weaponsmithing_Tier2_Dagger_3", "Weaponsmithing_Tier1_Dagger_2", "Weaponsmithing_Tier1_Dagger_1", "Weaponsmithing_Tier1_Gather_Basic"],
  1555. //19:["Dagger+4","Upgrade Grinder","Upgrade Smelter","Hire an additional Smelter"],
  1556. 21: ["Weaponsmithing_Tier4_Gather_Basic"],
  1557. 22: ["Weaponsmithing_Tier4_Gather_Basic"],
  1558. 23: ["Weaponsmithing_Tier4_Gather_Basic"],
  1559. 24: ["Weaponsmithing_Tier4_Gather_Basic"],
  1560. 25: ["Weaponsmithing_Tier4_Refine_Basic", "Weaponsmithing_Tier4_Gather_Basic"],
  1561. },
  1562. }]
  1563. };
  1564.  
  1565. addProfile("Weaponsmithing", {
  1566. profileName : "mass refining",
  1567. isProfileActive : true,
  1568. useMassTask : true,
  1569. level : {
  1570. 0: ["Weaponsmithing_Tier0_Intro"],
  1571. 1: ["Weaponsmithing_Tier1_Refine_Basic_Mass", "Weaponsmithing_Tier1_Gather_Basic"],
  1572. 2: "+25",
  1573. 7: ["Weaponsmithing_Tier2_Refine_Basic_Mass"],
  1574. 8: "+25",
  1575. 14: ["Weaponsmithing_Tier3_Refine_Basic_Mass"],
  1576. 15: "+25",
  1577. 21: ["Weaponsmithing_Tier4_Refine_Basic_Mass"],
  1578. 22: "+25",
  1579. },
  1580. });
  1581.  
  1582. addProfile("Weaponsmithing", {
  1583. profileName: "Wondrous Sprocket",
  1584. isProfileActive: false,
  1585. level: {
  1586. 6: ["Weaponsmithing_Tier1_Event_Gond"],
  1587. 7: "+25",
  1588. },
  1589. });
  1590.  
  1591. definedTask["Alchemy"] = {
  1592. taskListName: "Alchemy",
  1593. taskName: "Alchemy",
  1594. taskDefaultPriority: 1,
  1595. taskDefaultSlotNum: 0,
  1596. taskActive: true,
  1597. taskDescription: "",
  1598. profiles: [{
  1599. profileName: "default",
  1600. isProfileActive: true,
  1601. level: {
  1602. 0: ["Alchemy_Tier0_Intro_1"],
  1603. 1: ["Alchemy_Tier1_Experiment_Rank2", "Alchemy_Tier1_Experimentation_Rank1", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Basic"],
  1604. 2: ["Alchemy_Tier1_Experiment_Rank3", "Alchemy_Tier1_Experimentation_Rank2", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Basic"],
  1605. 3: ["Alchemy_Tier1_Experiment_Rank4", "Alchemy_Tier1_Experimentation_Rank3", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Basic"],
  1606. 4: ["Alchemy_Tier1_Experiment_Rank5", "Alchemy_Tier1_Experimentation_Rank4", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Basic"],
  1607. 5: ["Alchemy_Tier1_Experiment_Rank6", "Alchemy_Tier1_Experimentation_Rank5", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Basic"],
  1608. 6: ["Alchemy_Tier1_Experiment_Rank7", "Alchemy_Tier1_Experimentation_Rank6", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Basic"],
  1609. 7: ["Alchemy_Tier2_Experiment_Rank08", "Alchemy_Tier2_Experimentation_Rank07", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier2_Gather_Basic"],
  1610. 8: ["Alchemy_Tier2_Experiment_Rank09", "Alchemy_Tier2_Experimentation_Rank08", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier2_Gather_Basic"],
  1611. 9: ["Alchemy_Tier2_Experiment_Rank10", "Alchemy_Tier2_Experimentation_Rank09", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier2_Gather_Basic"],
  1612. 10: ["Alchemy_Tier2_Experiment_Rank11", "Alchemy_Tier2_Experimentation_Rank10", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier2_Gather_Basic"],
  1613. 11: ["Alchemy_Tier2_Experiment_Rank12", "Alchemy_Tier2_Experimentation_Rank11", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier2_Gather_Basic"],
  1614. 12: ["Alchemy_Tier2_Experiment_Rank13", "Alchemy_Tier2_Experimentation_Rank12", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier2_Gather_Basic"],
  1615. 13: ["Alchemy_Tier2_Experiment_Rank14", "Alchemy_Tier2_Experimentation_Rank13", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier1_Refine_Basic", "Alchemy_Tier2_Gather_Basic"],
  1616. 14: ["Alchemy_Tier3_Experiment_Rank15", "Alchemy_Tier3_Experimentation_Rank14", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Basic"],
  1617. 15: ["Alchemy_Tier3_Experiment_Rank16", "Alchemy_Tier3_Experimentation_Rank15", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Basic"],
  1618. 16: ["Alchemy_Tier3_Experiment_Rank17", "Alchemy_Tier3_Experimentation_Rank16", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Basic"],
  1619. 17: ["Alchemy_Tier3_Experiment_Rank18", "Alchemy_Tier3_Experimentation_Rank17", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Basic"],
  1620. 18: ["Alchemy_Tier3_Experiment_Rank19", "Alchemy_Tier3_Experimentation_Rank18", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Basic"],
  1621. 19: ["Alchemy_Tier3_Experiment_Rank20", "Alchemy_Tier3_Experimentation_Rank19", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier2_Refine_Basic", "Alchemy_Tier1_Refine_Special", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Basic"],
  1622. 20: ["Alchemy_Tier3_Experiment_Rank21", "Alchemy_Tier3_Experimentation_Rank20", "Alchemy_Tier2_Aquaregia", "Alchemy_Tier4_Refine_Basic", "Alchemy_Tier4_Gather_Components", "Alchemy_Tier4_Gather_Basic"],
  1623. 21: ["Alchemy_Tier4_Experiment_Rank22", "Alchemy_Tier4_Experimentation_Rank21", "Alchemy_Tier2_Aquaregia", "Alchemy_Tier4_Refine_Basic", "Alchemy_Tier4_Gather_Components", "Alchemy_Tier4_Gather_Basic"],
  1624. 22: ["Alchemy_Tier4_Experiment_Rank23", "Alchemy_Tier4_Experimentation_Rank22", "Alchemy_Tier4_Aquaregia_2", "Alchemy_Tier4_Refine_Basic", "Alchemy_Tier4_Gather_Components", "Alchemy_Tier1_Gather_Basic"],
  1625. 23: ["Alchemy_Tier4_Experiment_Rank24", "Alchemy_Tier4_Experimentation_Rank23", "Alchemy_Tier4_Aquaregia_2", "Alchemy_Tier4_Refine_Basic", "Alchemy_Tier4_Gather_Components", "Alchemy_Tier1_Gather_Basic"],
  1626. 24: ["Alchemy_Tier4_Experiment_Rank25", "Alchemy_Tier4_Experimentation_Rank24", "Alchemy_Tier4_Aquaregia_2", "Alchemy_Tier4_Refine_Basic", "Alchemy_Tier4_Gather_Components", "Alchemy_Tier1_Gather_Basic"],
  1627. 25: ["Alchemy_Tier4_Experimentation_Rank25", "Alchemy_Tier4_Create_Elemental_Unified", "Alchemy_Tier4_Create_Elemental_Aggregate", "Alchemy_Tier3_Protection_Potion_Major", "Alchemy_Tier3_Potency_Potion_Major", "Alchemy_Tier4_Aquaregia_2", "Alchemy_Tier4_Refine_Basic", "Alchemy_Tier1_Gather_Basic"],
  1628. },
  1629. }]
  1630. };
  1631.  
  1632. addProfile("Alchemy", {
  1633. profileName : "mass refining",
  1634. isProfileActive : true,
  1635. useMassTask : true,
  1636. level : {
  1637. 2: ["Alchemy_Tier1_Refine_Basic_Mass", "Alchemy_Tier1_Gather_Basic_Mass"],
  1638. 3: "+25",
  1639. 7: ["Alchemy_Tier2_Refine_Basic_Mass", "Alchemy_Tier2_Gather_Components_Mass"],
  1640. 8 : "+25",
  1641. 14: ["Alchemy_Tier3_Refine_Basic_Mass", "Alchemy_Tier3_Gather_Components_Mass"],
  1642. 15 : "+25",
  1643. 21: ["Alchemy_Tier4_Refine_Basic_Mass", "Alchemy_Tier4_Gather_Components_Mass"],
  1644. 22 : "+25",
  1645. },
  1646. });
  1647.  
  1648. addProfile("Alchemy", {
  1649. profileName: "Elemental Aggregate",
  1650. level: {
  1651. 24: ["Alchemy_Tier4_Create_Elemental_Aggregate", "Alchemy_Tier4_Experiment_Rank25", "Alchemy_Tier4_Experimentation_Rank24", "Alchemy_Tier4_Aquaregia_2", "Alchemy_Tier4_Refine_Basic", "Alchemy_Tier4_Gather_Components", "Alchemy_Tier1_Gather_Basic"],
  1652. 25: '+25',
  1653. }
  1654. });
  1655.  
  1656. addProfile("Alchemy", {
  1657. profileName: "Aqua Regia",
  1658. level: {
  1659. 20: ["Alchemy_Tier2_Aquaregia", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Components"],
  1660. 21: "+25",
  1661. 22: ["Alchemy_Tier4_Aquaregia_2", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Components"],
  1662. 23: "+25",
  1663. }
  1664. });
  1665. addProfile("Alchemy", {
  1666. profileName: "Aqua Vitae",
  1667. level: {
  1668. 20: ["Alchemy_Tier2_Aquavitae_2", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Components"],
  1669. 21: "+25",
  1670. }
  1671. });
  1672. addProfile("Alchemy", {
  1673. profileName: "Protection Superior",
  1674. level: {
  1675. 25: ["Alchemy_Tier4_Experimentation_Rank25", "Alchemy_Tier4_Protection_Potion_Superior", "Alchemy_Tier4_Create_Elemental_Aggregate", "Alchemy_Tier3_Protection_Potion_Major", "Alchemy_Tier2_Aquaregia", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Components"],
  1676. }
  1677. });
  1678. addProfile("Alchemy", {
  1679. profileName: "Potency Superior",
  1680. level: {
  1681. 25: ["Alchemy_Tier4_Experimentation_Rank25", "Alchemy_Tier4_Potency_Potion_Superior", "Alchemy_Tier4_Create_Elemental_Aggregate", "Alchemy_Tier3_Potency_Potion_Major", "Alchemy_Tier2_Aquaregia", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Components"],
  1682. }
  1683. });
  1684.  
  1685. addProfile("Alchemy", {
  1686. profileName: "Blue & Green Vitriol",
  1687. isProfileActive: true,
  1688. level: {
  1689. 1: ["Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Components"],
  1690. 2: "+25",
  1691. },
  1692. });
  1693.  
  1694. addProfile("Alchemy", {
  1695. profileName : "Mass Blue & Green Vitriol",
  1696. isProfileActive : true,
  1697. useMassTask : true,
  1698. level : {
  1699. 2: ["Alchemy_Tier1_Refine_Basic_Mass", "Alchemy_Tier1_Gather_Basic_Mass"],
  1700. 3: "+25",
  1701. },
  1702. });
  1703.  
  1704. addProfile("Alchemy", {
  1705. profileName: "Wondrous Sprocket",
  1706. isProfileActive: false,
  1707. level: {
  1708. 6: ["Alchemy_Tier1_Event_Gond"],
  1709. 7: "+25",
  1710. },
  1711. });
  1712.  
  1713. definedTask["SummerEvent"] = {
  1714. taskListName: "SummerEvent",
  1715. taskName: "SummerEvent",
  1716. taskDefaultPriority: 1,
  1717. taskDefaultSlotNum: 0,
  1718. taskActive: true,
  1719. taskDescription: "",
  1720. profiles: [{
  1721. profileName: "Altars",
  1722. isProfileActive: true,
  1723. level: {
  1724. 0:["Event_Summer_Tier0_Intro"],
  1725. 1:["Event_Summer_Tier1_Rankup","Event_Summer_Tier1_Caprese","Event_Summer_Tier1_Cornchowder","Event_Summer_Tier1_Watermelonsorbet"],
  1726. 2:["Event_Summer_Tier2_Rankup","Event_Summer_Tier2_Summerfeast",
  1727. "Event_Summer_Tier2_Partypoppers","Event_Summer_Tier2_Fireworks",
  1728. "Event_Summer_Tier2_Festivalgarblower","Event_Summer_Tier2_Festivalgarbupper",
  1729. "Event_Summer_Tier2_Festivalgarbhead"],
  1730. 3:["Event_Summer_Tier3_Sunite_Altar","Event_Summer_Tier3_Festivalgarb_Permanent"],
  1731. }
  1732. }]
  1733. };
  1734.  
  1735. // Profession priority list by order
  1736. var tasklist = [
  1737. definedTask["Leadership"],
  1738. definedTask["Jewelcrafting"],
  1739. definedTask["Alchemy"],
  1740. definedTask["Weaponsmithing"],
  1741. definedTask["Artificing"],
  1742. definedTask["Mailsmithing"],
  1743. definedTask["Platesmithing"],
  1744. definedTask["Leatherworking"],
  1745. definedTask["Tailoring"],
  1746. definedTask["Blackice"],
  1747. definedTask["WinterEvent"],
  1748. definedTask["SiegeEvent"],
  1749. definedTask["SummerEvent"],
  1750. ];
  1751.  
  1752. var customProfiles = []; // [ { taskName: 'name', baseProfile: 'profileName' / null, profile: JSON.parsed_from_input }, { } ....]
  1753. var scriptSettings = {};
  1754.  
  1755. // Populated at login
  1756. var loggedAccount = null;
  1757. var UIaccount = null;
  1758. var accountSettings = {};
  1759. var charSettingsList = [];
  1760. var charNamesList = [];
  1761. var charStatisticsList = []; // array of char names with the charStatistics for each char.
  1762.  
  1763. var defaultCharStatistics = {
  1764. general: {
  1765. nextTask: null,
  1766. lastVisit: null,
  1767. lastSCAVisit: null,
  1768. refineCounter: 0,
  1769. refineCounterReset: Date.now(),
  1770. diamonds: 0,
  1771. gold: 0,
  1772. rad: 0,
  1773. rBI: 0,
  1774. BI: 0,
  1775. refined: [0, 0, 0, 0, 0, 0, 0, 0],
  1776. refineLimitLeft: 0,
  1777. emptyBagSlots: 0,
  1778. activeSlots: 0,
  1779. celestial: 0,
  1780. ardent: 0,
  1781. },
  1782. professions: {
  1783. // Names must match unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories[n].displayname
  1784. "Leadership": { level: 0, workersUsed: [], workersUnused: [] },
  1785. "Alchemy": { level: 0, workersUsed: [], workersUnused: [] },
  1786. "Jewelcrafting": { level: 0, workersUsed: [], workersUnused: [] },
  1787. "Weaponsmithing": { level: 0,workersUsed: [], workersUnused: [] },
  1788. "Artificing": { level: 0, workersUsed: [], workersUnused: [] },
  1789. "Mailsmithing": { level: 0, workersUsed: [], workersUnused: []},
  1790. "Platesmithing": { level: 0, workersUsed: [], workersUnused: [] },
  1791. "Leatherworking": { level: 0, workersUsed: [], workersUnused: [] },
  1792. "Tailoring": { level: 0, workersUsed: [], workersUnused: [] },
  1793. "Black Ice Shaping": { level: 0, workersUsed: [], workersUnused: [] },
  1794. /*
  1795. "SummerEvent": { level: 0, workersUsed: [], workersUnused: [] },
  1796. "Winter Event": { level: 0, workersUsed: [], workersUnused: [] },
  1797. "Siege Event": { level: 0, workersUsed: [], workersUnused: [] },
  1798. */
  1799. },
  1800. tools: {
  1801. "Awl":{used:[],unused:[]},
  1802. "Shears":{used:[],unused:[]},
  1803. "Hammer":{used:[],unused:[]},
  1804. "Needle":{used:[],unused:[]},
  1805. "Bellows":{used:[],unused:[]},
  1806. "Bezelpusher":{used:[],unused:[]},
  1807. "Mortar":{used:[],unused:[]},
  1808. "Anvil":{used:[],unused:[]},
  1809. "Grindstone":{used:[],unused:[]},
  1810. "Philosophersstone":{used:[],unused:[]},
  1811. "Loupe":{used:[],unused:[]},
  1812. "Graver":{used:[],unused:[]},
  1813. "Crucible":{used:[],unused:[]},
  1814. "Tongs":{used:[],unused:[]},
  1815. },
  1816. trackedResources: [],
  1817. slotUse: [],
  1818. };
  1819.  
  1820. /* For searching unsafeWindow.client.dataModel.model.ent.main.inventory.assignedslots / unsafeWindow.client.dataModel.model.ent.main.inventory.notassignedslots
  1821. This needs some design change. */
  1822.  
  1823. // The definitions themselves are at the bottom of the script
  1824. var workerList = workerDefinition();
  1825. var toolList = toolListDefinition();
  1826.  
  1827. var defaultTrackResources = [{
  1828. fname: 'Aqua Regia',
  1829. name: 'Crafting_Resource_Aquaregia',
  1830. bank: false, unbound: true, btc: true, bta: true
  1831. }, {
  1832. fname: 'Aqua Vitae',
  1833. name: 'Crafting_Resource_Aquavitae',
  1834. bank: false, unbound: true, btc: true, bta: true
  1835. }, {
  1836. fname: 'Residuum',
  1837. name: 'Crafting_Resource_Residuum',
  1838. bank: false, unbound: true, btc: true, bta: true
  1839. }, {
  1840. fname: 'Mining Claim',
  1841. name: 'Crafting_Resource_Mining_Claim',
  1842. bank: false, unbound: true, btc: true, bta: true
  1843. }, {
  1844. fname: 'Elemental Aggregate',
  1845. name: 'Crafting_Resource_Elemental_Aggregate',
  1846. bank: false, unbound: true, btc: true, bta: true
  1847. }, {
  1848. fname: 'Unified Elements',
  1849. name: 'Crafting_Resource_Elemental_Unified',
  1850. bank: false, unbound: true, btc: true, bta: true
  1851. },
  1852. ];
  1853. var trackResources;
  1854. try {
  1855. trackResources = JSON.parse(GM_getValue("tracked_resources", null));
  1856. } catch (e) {
  1857. trackResources = null;
  1858. }
  1859. if (!trackResources) {
  1860. trackResources = defaultTrackResources;
  1861. };
  1862.  
  1863. var defaultScriptSettings = {
  1864. general: {
  1865. saveCharNextTime: true,
  1866. scriptPaused: false,
  1867. leadershipMode: false,
  1868. leadershipSound: 50,
  1869. language: 'en',
  1870. scriptDebugMode: true,
  1871. scriptAutoReload: false,
  1872. autoLogin: false,
  1873. autoLoginAccount: "",
  1874. autoLoginPassword: "",
  1875. autoReload: false,
  1876. scriptDelayFactor: 1,
  1877. maxCollectTaskAttempts: 2,
  1878. defaultVisitTime: 1*60*60*1000, // 1 hour default
  1879. unasignedSlotRecheck: 0.5*60*60*1000, // 0.5 hour default
  1880. leadershipTaskTimeout: 5*60*1000, // 5 minutes default
  1881. leadershipTaskTimeoutRearm: 1*60*1000, // 1 minutes default
  1882. }
  1883. };
  1884.  
  1885.  
  1886. // Loading script settings.
  1887. var tempScriptSettings;
  1888. try {
  1889. tempScriptSettings = JSON.parse(GM_getValue("settings__script", "{}"));
  1890. } catch (e) {
  1891. tempScriptSettings = null;
  1892. }
  1893. if (!tempScriptSettings) {
  1894. console.warn('Script settings couldn\'t be retrieved, loading defaults.');
  1895. tempScriptSettings = {};
  1896. };
  1897. scriptSettings = $.extend(true, {}, defaultScriptSettings, tempScriptSettings);
  1898. // Loading custom profiles.
  1899. try {
  1900. customProfiles = JSON.parse(GM_getValue("custom_profiles", null));
  1901. } catch (e) {
  1902. customProfiles = null;
  1903. }
  1904. if (!customProfiles) {
  1905. console.warn('Custom profiles couldn\'t be retrieved.');
  1906. customProfiles = [];
  1907. };
  1908. customProfiles.forEach(function (cProfile, idx) {
  1909. addProfile(cProfile.taskName, cProfile.profile, cProfile.baseProfile);
  1910. });
  1911. unsafeWindow.console.log('DebugMode set to: ' + scriptSettings.general.scriptDebugMode);
  1912. console = scriptSettings.general.scriptDebugMode ? unsafeWindow.console || fouxConsole : fouxConsole;
  1913.  
  1914. var delay_modifier = parseFloat(scriptSettings.general.scriptDelayFactor);
  1915. delay.SHORT *= delay_modifier; delay.MEDIUM *= delay_modifier; delay.LONG *= delay_modifier;
  1916. delay.MINS *= 1; delay.DEFAULT *= delay_modifier; delay.TIMEOUT *= delay_modifier;
  1917.  
  1918.  
  1919. var defaultAccountSettings = {
  1920. vendorSettings: {
  1921. vendorJunk: false,
  1922. vendorInvocationBlessingsAll: false,
  1923. vendorKitsLimit: false,
  1924. vendorAltarsLimit: false,
  1925. vendorKitsAll: false,
  1926. vendorAltarsAll: false,
  1927. vendorProfResults: false,
  1928. vendorPots1: false,
  1929. vendorPots2: false,
  1930. vendorPots3: false,
  1931. vendorPots4: false,
  1932. vendorPots5: false,
  1933. vendorHealingPots: false,
  1934. vendorEnchR1: false,
  1935. vendorEnchR2: false,
  1936. vendorEnchR3: false,
  1937. vendorEnchR4: false,
  1938. vendorLesserMarks: false,
  1939. },
  1940. professionSettings: {
  1941. fillOptionals: true,
  1942. autoPurchaseRes: true,
  1943. trainAssets: true,
  1944. smartLeadershipAssets: true,
  1945. skipPatrolTask: 'AD&Lvl20',
  1946. stopNotLeadership: 0,
  1947. stopAlchemyAt3: false,
  1948. },
  1949. generalSettings: {
  1950. refineAD: true,
  1951. openRewards: false,
  1952. openCelestialBox: false,
  1953. openInvocation: true,
  1954. keepOneUnopened: false,
  1955. runSCA: 'free',
  1956. SCADailyReset: Date.now() - 24*60*60*1000,
  1957. },
  1958. consolidationSettings: {
  1959. bankCharName: "",
  1960. transferRate: 100,
  1961. consolidate: false,
  1962. minCharBalance: 10000,
  1963. minToTransfer: 50000,
  1964. },
  1965. };
  1966.  
  1967.  
  1968. var defaultCharSettings = {
  1969. charName: "",
  1970. general: {
  1971. active: false,
  1972. overrideGlobalSettings: false,
  1973. manualTaskSlots: false,
  1974. },
  1975. vendorSettings: {
  1976. vendorJunk: false,
  1977. vendorInvocationBlessingsAll: false,
  1978. vendorKitsLimit: false,
  1979. vendorAltarsLimit: false,
  1980. vendorKitsAll: false,
  1981. vendorAltarsAll: false,
  1982. vendorProfResults: false,
  1983. vendorPots1: false,
  1984. vendorPots2: false,
  1985. vendorPots3: false,
  1986. vendorPots4: false,
  1987. vendorPots5: false,
  1988. vendorHealingPots: false,
  1989. vendorEnchR1: false,
  1990. vendorEnchR2: false,
  1991. vendorEnchR3: false,
  1992. vendorEnchR4: false,
  1993. vendorLesserMarks: false,
  1994. },
  1995. professionSettings: {
  1996. fillOptionals: true,
  1997. autoPurchaseRes: true,
  1998. trainAssets: true,
  1999. skipPatrolTask: 'AD&Lvl20',
  2000. smartLeadershipAssets: true,
  2001. stopNotLeadership: 0,
  2002. stopAlchemyAt3: false,
  2003. },
  2004. generalSettings: {
  2005. refineAD: true,
  2006. openRewards: false,
  2007. openCelestialBox: false,
  2008. openInvocation: true,
  2009. keepOneUnopened: false,
  2010. runSCA: 'free',
  2011. },
  2012. consolidationSettings: {
  2013. consolidate: false,
  2014. minCharBalance: 10000,
  2015. minToTransfer: 50000,
  2016. },
  2017. taskListSettings: {},
  2018. taskListSettingsManual: [],
  2019. };
  2020.  
  2021. //Adding taskList defaults.
  2022. tasklist.forEach(function(task) {
  2023. var profileNames = [];
  2024. task.profiles.forEach(function(profile) {
  2025. if (profile.isProfileActive) profileNames.push({
  2026. name: profile.profileName,
  2027. value: profile.profileName
  2028. });
  2029. });
  2030. defaultCharSettings.taskListSettings[task.taskListName] = {};
  2031. defaultCharSettings.taskListSettings[task.taskListName].taskSlots = task.taskDefaultSlotNum;
  2032. defaultCharSettings.taskListSettings[task.taskListName].taskProfile = profileNames[0].value;
  2033. defaultCharSettings.taskListSettings[task.taskListName].taskPriority = task.taskDefaultPriority;
  2034. defaultCharSettings.taskListSettings[task.taskListName].stopTaskAtLevel = 0;
  2035. });
  2036.  
  2037. for (var i = 0; i < 9; i++) {
  2038. defaultCharSettings.taskListSettingsManual[i] = {};
  2039. defaultCharSettings.taskListSettingsManual[i].Profession = tasklist[0].taskListName;
  2040. defaultCharSettings.taskListSettingsManual[i].Profile = tasklist[0].profiles[0].profileName;
  2041. defaultCharSettings.taskListSettingsManual[i].fillAssets = 0;
  2042. }
  2043. // 0 - default, 1 - do not fill, 2 - people (white to purple), 3 - people (purple to white), 4 - tools
  2044. var charSlotsFillAssetsOptions = ['default', 'Do not fill', 'people (white to purple)', 'people (purple to white)', 'tools'];
  2045.  
  2046. // Usable only after login (return account or char settings, depending on override and match)
  2047. function getSetting(group, name) {
  2048. var override = false;
  2049. if (typeof(charSettingsList[curCharName]) !== undefined && typeof(charSettingsList[curCharName].general) !== undefined) {
  2050. override = charSettingsList[curCharName].general.overrideGlobalSettings;
  2051. }
  2052. else console.warn("overrideGlobalSettings could not been reached." );
  2053.  
  2054. if (override) {
  2055. if (typeof(charSettingsList[curCharName][group]) !== undefined &&
  2056. typeof(charSettingsList[curCharName][group][name]) !== undefined) {
  2057. return charSettingsList[curCharName][group][name];
  2058. }
  2059. else console.warn("charSetting value could not been reached for " + group + " " + name);
  2060. }
  2061. if (typeof(accountSettings[group]) !== undefined &&
  2062. typeof(accountSettings[group][name]) !== undefined) {
  2063. return accountSettings[group][name];
  2064. }
  2065. else console.warn("accountSettings value could not been reached for " + group + " " + name);
  2066. return null;
  2067. }
  2068. var defaultVisitTimeOpts = []; defaultVisitTimeOpts.push({ name: 'none', value: 0});
  2069. for (var i = 1; i <= 24; i++) defaultVisitTimeOpts.push({ name: i, value: i*60*60*1000});
  2070.  
  2071. // UI Settings
  2072. var settingnames = [
  2073. //{scope: 'script', group: 'general', name: 'scriptPaused', title: 'Pause Script', type: 'checkbox', pane: 'main', tooltip: 'Disable All Automation'},
  2074. {scope: 'script', group: 'general', name: 'language', title: tr('settings.main.language'), type: 'select', pane: 'main', tooltip: tr('settings.main.language.tooltip'),
  2075. opts: [ { name: 'english', value: 'en'},
  2076. { name: 'polski', value: 'pl'},
  2077. { name: 'français', value: 'fr'}],
  2078. onchange : function(newValue) {
  2079. GM_setValue('language', newValue);
  2080. }
  2081. },
  2082. {scope: 'script', group: 'general', name: 'scriptDebugMode', title: tr('settings.main.debug'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.debug.tooltip'),
  2083. onchange: function(newValue) {
  2084. unsafeWindow.console.log('DebugMode set to: ' + newValue);
  2085. console = newValue ? unsafeWindow.console || fouxConsole : fouxConsole;
  2086. }
  2087. },
  2088. {scope: 'script', group: 'general', name: 'autoReload', title: tr('settings.main.autoreload'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.autoreload.tooltip')},
  2089. {scope: 'script', group: 'general', name: 'scriptDelayFactor', title: tr('settings.main.incdelay'), type: 'select', pane: 'main', tooltip: tr('settings.main.incdelay.tooltip'),
  2090. opts: [ { name: 'default - 1', value: '1'},
  2091. { name: '1.5', value: '1.5'},
  2092. { name: '2', value: '2'},
  2093. { name: '2.5', value: '2.5'},
  2094. { name: '3', value: '3'}],
  2095. },
  2096. {scope: 'script', group: 'general', name: 'autoLogin', title: tr('settings.main.autologin'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.autologin.tooltip')},
  2097. {scope: 'script', group: 'general', name: 'autoLoginAccount', title: tr('settings.main.nw_username'), type: 'text', pane: 'main', tooltip: tr('settings.main.nw_username.tooltip')},
  2098. {scope: 'script', group: 'general', name: 'autoLoginPassword', title: tr('settings.main.nw_password'), type: 'password', pane: 'main', tooltip: tr('settings.main.nw_password.tooltip')},
  2099. {scope: 'script', group: 'general', name: 'saveCharNextTime', title: tr('settings.main.savenexttime'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.savenexttime.tooltip')},
  2100. {scope: 'script', group: 'general', name: 'maxCollectTaskAttempts', title: 'Number of attempts to collect task result', type: 'select', pane: 'main', tooltip: 'After this number of attempts the the script will continue without collecting',
  2101. opts: [ { name: '1', value: 1}, { name: '2', value: 2}, { name: '3', value: 3}], },
  2102. {scope: 'script', group: 'general', name: 'defaultVisitTime', title: 'Default process re-process time for all empty slots (in hours)', type: 'select', pane: 'main', tooltip: 'Default process re-process time for all empty slots',
  2103. opts: defaultVisitTimeOpts, },
  2104. {scope: 'script', group: 'general', name: 'unasignedSlotRecheck', title: 'Recheck unasigned slots every: (in hours)', type: 'select', pane: 'main', tooltip: 'If the char has unasigned slot the script will recheck if the user set it manually',
  2105. opts: [ { name: "don\'t check", value: 0}, { name: '0.5', value: 0.5*60*60*1000}, { name: '1', value: 1*60*60*1000}, { name: '2', value: 2*60*60*1000}, { name: '3', value: 3*60*60*1000}, { name: '4', value: 4*60*60*1000}], },
  2106.  
  2107. {scope: 'script', group: 'general', name: 'leadershipTaskTimeout', title: 'Timeout in manual leadership mode (in minutes)', type: 'select', pane: 'manual',
  2108. tooltip: 'In manual leadership mode the script will wait this long for you to manually assign a leadership task',
  2109. opts: [ { name: '1', value: 1*60*1000}, { name: '5', value: 5*60*1000}, { name: '10', value: 10*60*1000}], },
  2110. {scope: 'script', group: 'general', name: 'leadershipTaskTimeoutRearm', title: 'Re-arm time in manual leadership mode (in minutes)', type: 'select', pane: 'manual',
  2111. tooltip: 'After a timeout in manual leadership mode the script will do non-leadership tasks for this long',
  2112. opts: [ { name: '1', value: 1*60*1000}, { name: '1.5', value: 1.5*60*1000}, { name: '2', value: 2*60*1000}], },
  2113. {scope: 'script', group: 'general', name: 'leadershipSound', title: 'Volume of notification in manual leadership mode', type: 'select', pane: 'manual',
  2114. tooltip: 'Volume of the sound to be played',
  2115. opts: [ { name: 'off', value: 0}, { name: 'very soft', value: 12}, { name: 'soft', value: 25}, { name: 'medium', value: 50}, { name: 'loud', value: 75}, { name: 'full', value: 100} ], },
  2116. {scope: 'account', group: 'generalSettings', name: 'openRewards', title: tr('settings.general.openrewards'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openrewards.tooltip')},
  2117. {scope: 'account', group: 'generalSettings', name: 'openCelestialBox', title: tr('settings.general.opencelestial'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.opencelestial.tooltip')},
  2118. {scope: 'account', group: 'generalSettings', name: 'keepOneUnopened', title: tr('settings.general.keepOneUnopened'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.keepOneUnopened.tooltip')},
  2119. {scope: 'account', group: 'generalSettings', name: 'openInvocation', title: tr('settings.general.openInvocation'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openInvocation.tooltip')},
  2120. {scope: 'account', group: 'generalSettings', name: 'refineAD', title: tr('settings.general.refinead'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.refinead.tooltip')},
  2121. {scope: 'account', group: 'generalSettings', name: 'runSCA', title: tr('settings.general.runSCA'), type: 'select', pane: 'main', tooltip: tr('settings.general.runSCA.tooltip'),
  2122. opts: [ { name: 'never', value: 'never'},
  2123. { name: 'free time', value: 'free'},
  2124. { name: 'always', value: 'always'}],
  2125. },
  2126. {scope: 'account', group: 'professionSettings', name: 'fillOptionals', type: 'checkbox', pane: 'prof', title: tr('settings.profession.fillOptionals'), tooltip: tr('settings.profession.fillOptionals.tooltip')},
  2127. {scope: 'account', group: 'professionSettings', name: 'autoPurchaseRes', type: 'checkbox', pane: 'prof', title: tr('settings.profession.autoPurchase'), tooltip: tr('settings.profession.autoPurchase.tooltip')},
  2128. {scope: 'account', group: 'professionSettings', name: 'trainAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.trainAssets'), tooltip: tr('settings.profession.trainAssets.tooltip')},
  2129. {scope: 'account', group: 'professionSettings', name: 'smartLeadershipAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.smartLeadership'), tooltip: tr('settings.profession.smartLeadership.tooltip')},
  2130. {scope: 'account', group: 'professionSettings', name: 'skipPatrolTask', type:'select', pane: 'prof', title: tr('settings.profession.skipPatrol'), tooltip: tr('settings.profession.skipPatrol.tooltip'),
  2131. opts:[{name:'never',value:'never'},{name:'always',value:'always'},{name:'AD profile',value:'ad'},{name:'Leadership lvl 20',value:'ld20'},{name:'AD&Lvl20',value:'AD&Lvl20'}]},
  2132. {scope: 'account', group: 'professionSettings', name: 'stopNotLeadership', type:'select', pane: 'prof', title: tr('settings.profession.stopNotLeadership'), tooltip: tr('settings.profession.stopNotLeadership.tooltip'),
  2133. opts:[{name:'never',value:'0'},{name: '20' ,value: 20},{name: '25' ,value: 25}]},
  2134. {scope: 'account', group: 'professionSettings', name: 'stopAlchemyAt3', type:'checkbox', pane: 'prof', title: tr('settings.profession.stopAlchemyAt3'), tooltip: tr('settings.profession.stopAlchemyAt3.tooltip')},
  2135. {scope: 'account', group: 'vendorSettings', name:'vendorJunk', type:'checkbox', pane:'vend', title:'Auto Vendor junk..', tooltip:'Vendor all (currently) winterfest fireworks+lanterns'},
  2136. {scope: 'account', group: 'vendorSettings', name:'vendorInvocationBlessingsAll', type:'checkbox', pane:'vend', title:'Vendor All Invocation Blessings', tooltip:'Vendor all Invocation Blessings'},
  2137. {scope: 'account', group: 'vendorSettings', name:'vendorKitsLimit', type:'checkbox', pane:'vend', title:'Vendor/Maintain Node Kit Stacks', tooltip:'Limit skill kits stacks to 50, vendor kits unusable by class, remove all if player has one bag or full bags'},
  2138. {scope: 'account', group: 'vendorSettings', name:'vendorAltarsLimit', type:'checkbox', pane:'vend', title:'Vendor/Maintain Altar Stacks', tooltip:'Limit Altars to 80,remove all if player has one bag or full bags'},
  2139. {scope: 'account', group: 'vendorSettings', name:'vendorKitsAll', type:'checkbox', pane:'vend', title:'Vendor All Node Kits', tooltip:'Sell ALL skill kits.'},
  2140. {scope: 'account', group: 'vendorSettings', name:'vendorAltarsAll', type:'checkbox', pane:'vend', title:'Vendor All Altar', tooltip:'Sell ALL Altars.'},
  2141. {scope: 'account', group: 'vendorSettings', name:'vendorProfResults',type:'checkbox',pane:'vend', title:'Vendor/Maintain Prof Crafted Levelup Items', tooltip:'Vendor off Tier 1 to 5 items produced and reused for leveling crafting professions.'},
  2142. {scope: 'account', group: 'vendorSettings', name:'vendorPots1', type:'checkbox', pane:'vend', title:'Auto Vendor minor potions (lvl 1)', tooltip:'Vendor all minor potions (lvl 1) found in player bags'},
  2143. {scope: 'account', group: 'vendorSettings', name:'vendorPots2', type:'checkbox', pane:'vend', title:'Auto Vendor lesser potions (lvl 15)',tooltip:'Vendor all lesser potions (lvl 15) found in player bags'},
  2144. {scope: 'account', group: 'vendorSettings', name:'vendorPots3', type:'checkbox', pane:'vend', title:'Auto Vendor potions (lvl 30)', tooltip:'Vendor all potions (lvl 30) found in player bags'},
  2145. {scope: 'account', group: 'vendorSettings', name:'vendorPots4', type:'checkbox', pane:'vend', title:'Auto Vendor greater potions (lvl 45)', tooltip:'Vendor all greater potions (lvl 45) found in player bags'},
  2146. {scope: 'account', group: 'vendorSettings', name:'vendorPots5', type:'checkbox', pane:'vend', title:'Auto Vendor major potions (lvl 60)', tooltip:'Auto Vendor major potions (lvl 60)'},
  2147. {scope: 'account', group: 'vendorSettings', name:'vendorHealingPots', type:'checkbox', pane:'vend', title:'Auto Vendor healing potions (1-60)', tooltip:'Auto Vendor healing potions (lvl 60)'},
  2148. {scope: 'account', group: 'vendorSettings', name:'vendorEnchR1', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 1', tooltip:'Vendor all Rank 1 enchantments & runestones found in player bags'},
  2149. {scope: 'account', group: 'vendorSettings', name:'vendorEnchR2', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 2', tooltip:'Vendor all Rank 2 enchantments & runestones found in player bags'},
  2150. {scope: 'account', group: 'vendorSettings', name:'vendorEnchR3', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 3', tooltip:'Vendor all Rank 3 enchantments & runestones found in player bags'},
  2151. {scope: 'account', group: 'vendorSettings', name:'vendorEnchR4', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 4', tooltip:'Vendor all Rank 4 enchantments & runestones found in player bags'},
  2152. {scope: 'account', group: 'vendorSettings', name:'vendorLesserMarks', type:'checkbox', pane:'vend', title:'Auto Vendor Lesser Marks', tooltip:'Vendor all Lesser Marks found in player bags'},
  2153. {scope: 'account', group: 'consolidationSettings', name:'consolidate', type:'checkbox', pane:'bank', title: tr('settings.consolid.consolidate'), tooltip: tr('settings.consolid.consolidate.tooltip') ,border:true},
  2154. {scope: 'account', group: 'consolidationSettings', name:'bankCharName', type:'text', pane:'bank', title: tr('settings.consolid.bankerName'), tooltip: tr('settings.consolid.bankerName.tooltip')},
  2155. {scope: 'account', group: 'consolidationSettings', name:'minToTransfer', type:'text', pane:'bank', title: tr('settings.consolid.minToTransfer'), tooltip: tr('settings.consolid.minToTransfer.tooltip')},
  2156. {scope: 'account', group: 'consolidationSettings', name:'minCharBalance', type:'text', pane:'bank', title: tr('settings.consolid.minCharBalance'), tooltip: tr('settings.consolid.minCharBalance.tooltip')},
  2157. {scope: 'account', group: 'consolidationSettings', name:'transferRate', type:'text', pane:'bank', title: tr('settings.consolid.transferRate'), tooltip: tr('settings.consolid.transferRate.tooltip')},
  2158.  
  2159. {scope: 'char', group: 'general', name: 'active', type:'checkbox', pane: 'main_not_tab', title: 'Active', tooltip: 'The char will be processed by the script',
  2160. onchange: function(newValue, elm) {
  2161. if (newValue) {
  2162. $(elm).parents('.ui-accordion-content').prev().removeClass('inactive');
  2163. } else {
  2164. $(elm).parents('.ui-accordion-content').prev().addClass('inactive');
  2165. }
  2166. }
  2167. },
  2168. {scope: 'char', group: 'general', name:'overrideGlobalSettings', type:'checkbox', pane:'main_not_tab', title:'Override account settings for this char', tooltip:''},
  2169. {scope: 'char', group: 'general', name:'manualTaskSlots', type:'checkbox', pane:'main_not_tab', title:'Use manual task allocation tab', tooltip:'Per slot profile allocation'},
  2170. {scope: 'char', group: 'generalSettings', name: 'openRewards', title: tr('settings.general.openrewards'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openrewards.tooltip')},
  2171. {scope: 'char', group: 'generalSettings', name: 'openCelestialBox', title: tr('settings.general.opencelestial'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.opencelestial.tooltip')},
  2172. {scope: 'char', group: 'generalSettings', name: 'keepOneUnopened', title: tr('settings.general.keepOneUnopened'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.keepOneUnopened.tooltip')},
  2173. {scope: 'char', group: 'generalSettings', name: 'openInvocation', title: tr('settings.general.openInvocation'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openInvocation.tooltip')},
  2174. {scope: 'char', group: 'generalSettings', name: 'refineAD', title: tr('settings.general.refinead'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.refinead.tooltip')},
  2175. {scope: 'char', group: 'generalSettings', name: 'runSCA', title: tr('settings.general.runSCA'), type: 'select', pane: 'main', tooltip: tr('settings.general.runSCA.tooltip'),
  2176. opts: [ { name: 'never', value: 'never'},
  2177. { name: 'free time', value: 'free'},
  2178. { name: 'always', value: 'always'}],
  2179. },
  2180. {scope: 'char', group: 'professionSettings', name: 'fillOptionals', type: 'checkbox', pane: 'prof', title: tr('settings.profession.fillOptionals'), tooltip: tr('settings.profession.fillOptionals.tooltip')},
  2181. {scope: 'char', group: 'professionSettings', name: 'autoPurchaseRes', type: 'checkbox', pane: 'prof', title: tr('settings.profession.autoPurchase'), tooltip: tr('settings.profession.autoPurchase.tooltip')},
  2182. {scope: 'char', group: 'professionSettings', name: 'trainAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.trainAssets'), tooltip: tr('settings.profession.trainAssets.tooltip')},
  2183. {scope: 'char', group: 'professionSettings', name: 'smartLeadershipAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.smartLeadership'), tooltip: tr('settings.profession.smartLeadership.tooltip')},
  2184. {scope: 'char', group: 'professionSettings', name: 'skipPatrolTask', type: 'select', pane: 'prof', title: tr('settings.profession.skipPatrol'), tooltip: tr('settings.profession.skipPatrol.tooltip'),
  2185. opts:[{name:'never',value:'never'},{name:'always',value:'always'},{name:'AD profile',value:'ad'},{name:'Leadership lvl 20',value:'ld20'},{name:'AD&Lvl20',value:'AD&Lvl20'}]},
  2186. {scope: 'char', group: 'professionSettings', name: 'stopNotLeadership', type:'select', pane: 'prof', title: tr('settings.profession.stopNotLeadership'), tooltip: tr('settings.profession.stopNotLeadership.tooltip'),
  2187. opts:[{name:'never',value:0},{name: '20' ,value: 20},{name: '25' ,value: 25}]},
  2188. {scope: 'char', group: 'professionSettings', name: 'stopAlchemyAt3', type:'checkbox', pane: 'prof', title: tr('settings.profession.stopAlchemyAt3'), tooltip: tr('settings.profession.stopAlchemyAt3.tooltip')},
  2189. {scope: 'char', group: 'vendorSettings', name:'vendorJunk', type:'checkbox', pane:'vend', title:'Auto Vendor junk..', tooltip:'Vendor all (currently) winterfest fireworks+lanterns'},
  2190. {scope: 'char', group: 'vendorSettings', name:'vendorInvocationBlessingsAll', type:'checkbox', pane:'vend', title:'Vendor All Invocation Blessings', tooltip:'Vendor All Invocation Blessings'},
  2191. {scope: 'char', group: 'vendorSettings', name:'vendorKitsLimit', type:'checkbox', pane:'vend', title:'Vendor/Maintain Altar Node Kit Stacks', tooltip:'Limit skill kits stacks to 50/Altars80, vendor kits unusable by class, remove all if player has one bag or full bags'},
  2192. {scope: 'char', group: 'vendorSettings', name:'vendorAltarsLimit', type:'checkbox', pane:'vend', title:'Vendor/Maintain Altar Stacks', tooltip:'Limit Altars to 80,remove all if player has one bag or full bags'},
  2193. {scope: 'char', group: 'vendorSettings', name:'vendorKitsAll', type:'checkbox', pane:'vend', title:'Vendor All Node Kits', tooltip:'Sell ALL skill kits.'},
  2194. {scope: 'char', group: 'vendorSettings', name:'vendorAltarsAll', type:'checkbox', pane:'vend', title:'Vendor All Altar', tooltip:'Sell ALL Altars.'},
  2195. {scope: 'char', group: 'vendorSettings', name:'vendorProfResults',type:'checkbox',pane:'vend', title:'Vendor/Maintain Prof Crafted Levelup Items', tooltip:'Vendor off Tier 1 to 5 items produced and reused for leveling crafting professions.'},
  2196. {scope: 'char', group: 'vendorSettings', name:'vendorPots1', type:'checkbox', pane:'vend', title:'Auto Vendor minor potions (lvl 1)', tooltip:'Vendor all minor potions (lvl 1) found in player bags'},
  2197. {scope: 'char', group: 'vendorSettings', name:'vendorPots2', type:'checkbox', pane:'vend', title:'Auto Vendor lesser potions (lvl 15)',tooltip:'Vendor all lesser potions (lvl 15) found in player bags'},
  2198. {scope: 'char', group: 'vendorSettings', name:'vendorPots3', type:'checkbox', pane:'vend', title:'Auto Vendor potions (lvl 30)', tooltip:'Vendor all potions (lvl 30) found in player bags'},
  2199. {scope: 'char', group: 'vendorSettings', name:'vendorPots4', type:'checkbox', pane:'vend', title:'Auto Vendor greater potions (lvl 45)', tooltip:'Vendor all greater potions (lvl 45) found in player bags'},
  2200. {scope: 'char', group: 'vendorSettings', name:'vendorPots5', type:'checkbox', pane:'vend', title:'Auto Vendor major potions (lvl 60)', tooltip:'Auto Vendor major potions (lvl 60)'},
  2201. {scope: 'char', group: 'vendorSettings', name:'vendorHealingPots', type:'checkbox', pane:'vend', title:'Auto Vendor healing potions (1-60)', tooltip:'Auto Vendor healing potions (lvl 60)'},
  2202. {scope: 'char', group: 'vendorSettings', name:'vendorEnchR1', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 1', tooltip:'Vendor all Rank 1 enchantments & runestones found in player bags'},
  2203. {scope: 'char', group: 'vendorSettings', name:'vendorEnchR2', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 2', tooltip:'Vendor all Rank 2 enchantments & runestones found in player bags'},
  2204. {scope: 'char', group: 'vendorSettings', name:'vendorEnchR3', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 3', tooltip:'Vendor all Rank 3 enchantments & runestones found in player bags'},
  2205. {scope: 'char', group: 'vendorSettings', name:'vendorEnchR4', type:'checkbox', pane:'vend', title:'Auto Vendor enchants & runes Rank 4', tooltip:'Vendor all Rank 4 enchantments & runestones found in player bags'},
  2206. {scope: 'char', group: 'vendorSettings', name:'vendorLesserMarks', type:'checkbox', pane:'vend', title:'Auto Vendor Lesser Marks', tooltip:'Vendor all Lesser Marks found in player bags'},
  2207. {scope: 'char', group: 'consolidationSettings', name:'consolidate', type:'checkbox', pane:'bank', title: tr('settings.consolid.consolidate'), tooltip: tr('settings.consolid.consolidate.tooltip'), border:true},
  2208. {scope: 'char', group: 'consolidationSettings', name:'minToTransfer', type:'text', pane:'bank', title: tr('settings.consolid.minToTransfer'), tooltip: tr('settings.consolid.minToTransfer.tooltip')},
  2209. {scope: 'char', group: 'consolidationSettings', name:'minCharBalance', type:'text', pane:'bank', title: tr('settings.consolid.minCharBalance'), tooltip: tr('settings.consolid.minCharBalance.tooltip')},
  2210. ];
  2211.  
  2212. /*
  2213. // TODO: fix debug console on save call
  2214. // call the onsave for the setting if it exists
  2215. if (typeof(settingnames[i].onsave) === "function") {
  2216. console.log("Calling 'onsave' for", settingnames[i].name);
  2217. settingnames[i].onsave(settings[settingnames[i].name], settings[settingnames[i].name]);
  2218. }
  2219. }
  2220. */
  2221. // Page Settings
  2222. var PAGES = Object.freeze({
  2223. LOGIN: {
  2224. name: "Login",
  2225. path: "div#login"
  2226. },
  2227. GUARD: {
  2228. name: "Guard",
  2229. path: "div#page-accountguard"
  2230. },
  2231. });
  2232.  
  2233. /**
  2234. * Uses the page settings to determine which page is currently displayed
  2235. */
  2236.  
  2237. function GetCurrentPage() {
  2238. var pageReturn;
  2239. $.each(PAGES, function(index, page) {
  2240. if ($(page["path"]).filter(":visible").length) {
  2241. pageReturn = page["name"];
  2242. return false;
  2243. }
  2244. });
  2245. return pageReturn;
  2246. }
  2247.  
  2248. /**
  2249. * Logs in to gateway
  2250. * No client.dataModel exists at this stage
  2251. */
  2252.  
  2253. function page_LOGIN() {
  2254. //if (!$("form > p.error:visible").length && settings["autologin"]) {
  2255. // No previous log in error - attempt to log in
  2256. if (scriptSettings.general.autoLogin) {
  2257. console.log("Setting username");
  2258. $("input#user").val(scriptSettings.general.autoLoginAccount);
  2259. console.log("Setting password");
  2260. $("input#pass").val(scriptSettings.general.autoLoginPassword);
  2261. console.log("Clicking Login Button");
  2262. $("div#login > input").click();
  2263. //}
  2264. }
  2265. dfdNextRun.resolve(delay.LONG);
  2266.  
  2267. }
  2268.  
  2269. /**
  2270. * Action to perform on account guard page
  2271. */
  2272.  
  2273. function page_GUARD() {
  2274. // Do nothing on the guard screen
  2275. // dfdNextRun.resolve(delay.LONG);
  2276. PauseSettings("pause");
  2277. }
  2278.  
  2279. /**
  2280. * Collects rewards for tasks or starts new tasks
  2281. * Function is called once per new task and returns true if an action is created
  2282. * If no action is started function returns false to switch characters
  2283. */
  2284.  
  2285. function processCharacter() {
  2286. // Switch to professions page to show task progression
  2287. unsafeWindow.location.hash = "#char(" + encodeURI(unsafeWindow.client.getCurrentCharAtName()) + ")/professions";
  2288.  
  2289. // Collect rewards for completed tasks and restart
  2290. if (unsafeWindow.client.dataModel.model.ent.main.itemassignments.complete) {
  2291. if (!unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.every(function(entry, idx) {
  2292. if (entry.hascompletedetails && (collectTaskAttempts[idx] < scriptSettings.general.maxCollectTaskAttempts)) {
  2293. unsafeWindow.client.professionTaskCollectRewards(entry.uassignmentid);
  2294. collectTaskAttempts[idx]++;
  2295. return false;
  2296. }
  2297. return true;
  2298. })) {
  2299. dfdNextRun.resolve(delay.SHORT);
  2300. return true;
  2301. }
  2302. }
  2303.  
  2304. // Check for available slots and start new task
  2305. console.log("Looking for empty slots.");
  2306. var slots = unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.filter(function(entry) {
  2307. return (!entry.islockedslot && !entry.uassignmentid);
  2308. });
  2309. if (slots.length) {
  2310. if (charSettingsList[curCharName].general.manualTaskSlots) {
  2311. var slotIndex = slots[0].slotindex;
  2312. var _task = tasklist.filter(function(task) {
  2313. return task.taskListName === charSettingsList[curCharName].taskListSettingsManual[slotIndex].Profession;
  2314. })[0];
  2315. var _profile = _task.profiles.filter(function(profile) {
  2316. return profile.profileName === charSettingsList[curCharName].taskListSettingsManual[slotIndex].Profile;
  2317. })[0];
  2318.  
  2319. if (failedProfiles[_task.taskListName] && failedProfiles[_task.taskListName].indexOf(_profile.profileName) === -1) {
  2320. console.warn("Profile ", _profile.profileName, " for task ", _task.taskListName, " failed previously, skipping slot");
  2321. return false; // TODO: Should skip the slot and not the char entierly.
  2322. }
  2323.  
  2324. console.log("Allocating per slot. For slot #" + slotIndex + " profession: " + _task.taskListName + " profile: " + _profile.profileName);
  2325. unsafeWindow.client.professionFetchTaskList('craft_' + _task.taskName);
  2326. window.setTimeout(function() {
  2327. createNextTask(_task, _profile, 0);
  2328. }, delay.SHORT);
  2329. return true;
  2330. }
  2331. else {
  2332. // Go through the professions to assign tasks until specified slots filled
  2333. console.log("Prioritizing task lists.");
  2334. var charTaskList = tasklist
  2335. .filter(function(task) {
  2336. var level = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories.filter(function(entry) {
  2337. return entry.name == task.taskName;
  2338. })
  2339. level = (level[0]) ? level[0].currentrank : 0;
  2340. console.log(level, task.taskListName, (charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel == 0 || charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel > level));
  2341. return ((charSettingsList[curCharName].taskListSettings[task.taskListName].taskSlots > 0)
  2342. && (failedTasksList.indexOf(task.taskListName) === -1)
  2343. && (charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel == 0 || charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel > level));
  2344. })
  2345. .sort(function(a, b) {
  2346. return (charSettingsList[curCharName].taskListSettings[a.taskListName].taskPriority - charSettingsList[curCharName].taskListSettings[b.taskListName].taskPriority);
  2347. });
  2348.  
  2349. console.log("Attempting to fill the slot.");
  2350. for (var i = 0; i < charTaskList.length; i++) {
  2351. var currentTasks = unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.filter(function(entry) {
  2352. return entry.category == charTaskList[i].taskName;
  2353. });
  2354. if (currentTasks.length < charSettingsList[curCharName].taskListSettings[charTaskList[i].taskListName].taskSlots) {
  2355. unsafeWindow.client.professionFetchTaskList('craft_' + charTaskList[i].taskName);
  2356. var profile = charTaskList[i].profiles.filter(function(profile) {
  2357. return profile.profileName == charSettingsList[curCharName].taskListSettings[charTaskList[i].taskListName].taskProfile;
  2358. })[0];
  2359. console.log('Selecting profile: ' + profile.profileName);
  2360.  
  2361. if (scriptSettings.general.leadershipMode && charTaskList[i].taskName == 'Leadership') {
  2362. var olddate = new Date();
  2363. olddate.setTime( olddate.getTime() - scriptSettings.general.leadershipTaskTimeoutRearm);
  2364. if ( !leadershipSlots[curCharName] || leadershipSlots[curCharName] < olddate) {
  2365. // new slot open for leadership (first time or timer re-armed)
  2366. var tdate = new Date();
  2367. tdate.setTime( tdate.getTime() + parseInt(scriptSettings.general.leadershipTaskTimeout));
  2368. leadershipSlots[curCharName] = tdate;
  2369. var soundFx = $( '#soundFX' );
  2370. if (scriptSettings.general.leadershipSound > 0 && soundFx && soundFx[0]) {
  2371. soundFx[0].volume = scriptSettings.general.leadershipSound / 100;
  2372. soundFx[0].play();
  2373. }
  2374. }
  2375. if ( leadershipSlots[curCharName] > new Date() ) {
  2376. // in waiting
  2377. console.log('Manual Leadership slot, waiting until: ' + leadershipSlots[curCharName]);
  2378. chartimers[curCharNum] = getNextFinishedTask();
  2379. if (chartimers[curCharNum] > leadershipSlots[curCharName]) {
  2380. chartimers[curCharNum] = leadershipSlots[curCharName];
  2381. }
  2382. return false;
  2383. }
  2384. } else {
  2385. window.setTimeout(function() {
  2386. createNextTask(charTaskList[i], profile, 0);
  2387. }, delay.SHORT);
  2388. return true;
  2389. }
  2390. }
  2391. }
  2392. };
  2393. console.log("All task counts assigned");
  2394. } else {
  2395. console.log("No available task slots");
  2396. }
  2397.  
  2398. // TODO: Add code to get next task finish time
  2399. chartimers[curCharNum] = getNextFinishedTask();
  2400.  
  2401. // Add diamond count
  2402. chardiamonds[curCharNum] = unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds;
  2403. console.log(curCharName + "'s", "Astral Diamonds:", chardiamonds[curCharNum]);
  2404. // Add gold count
  2405. chargold[curCharNum] = parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.gold);
  2406. return false;
  2407. }
  2408.  
  2409.  
  2410.  
  2411. // Running SCA for a single Char (based on CycleSCA)
  2412. function processCharSCA(charIdx) {
  2413. var _hasLoginDaily = 0;
  2414. var _scaHashMatch = /\/adventures$/;
  2415. var _charName = charNamesList[charIdx];
  2416. var _fullCharName = _charName + "@" + loggedAccount;
  2417. /*
  2418. if (!scriptSettings.paused)
  2419. PauseSettings("pause");
  2420. */
  2421. if (!_scaHashMatch.test(unsafeWindow.location.hash)) {
  2422. return;
  2423. } else if (unsafeWindow.location.hash != "#char(" + encodeURI(_fullCharName) + ")/adventures") {
  2424. unsafeWindow.location.hash = "#char(" + encodeURI(_fullCharName) + ")/adventures";
  2425. }
  2426.  
  2427. WaitForState("").done(function() {
  2428. try {
  2429. _hasLoginDaily = client.dataModel.model.gatewaygamedata.dailies.left.logins;
  2430. } catch (e) {
  2431. window.setTimeout(function() {
  2432. processCharSCA(charIdx);
  2433. }, delay.SHORT);
  2434. return;
  2435. }
  2436.  
  2437. console.log("Checking SCA Dialy for " + _charName );
  2438.  
  2439. // Do SCA daily dice roll if the button comes up
  2440. WaitForState(".daily-dice-intro").done(function() {
  2441. $(".daily-dice-intro button").trigger('click');
  2442. WaitForState(".daily-awards-button").done(function() {
  2443. $(".daily-awards-button button").trigger('click');
  2444. });
  2445. });
  2446. //console.log("after dice");
  2447. WaitForNotState(".modal-window.daily-dice").done(function() {
  2448. charStatisticsList[_charName].general.lastSCAVisit = Date.now();
  2449. GM_setValue("statistics__char__" + _fullCharName , JSON.stringify(charStatisticsList[_charName]));
  2450. updateCounters();
  2451.  
  2452. //Adjusting for the time the SCA took
  2453. var chardelay;
  2454. if (chartimers[curCharNum] != null) {
  2455. chardelay = (chartimers[curCharNum]).getTime() - (new Date()).getTime() - unsafeWindow.client.getServerOffsetSeconds() * 1000;
  2456. if (chardelay < delay.SHORT) {
  2457. chardelay = delay.SHORT;
  2458. }
  2459. }
  2460. else chardelay = delay.SHORT;
  2461. if (chardelay > (delay.SHORT * 3)) unsafeWindow.location.hash = "#char(" + encodeURI(_fullCharName) + ")/professions";
  2462. console.log("Finished SCA check for " + charNamesList[charIdx] + " delay " + chardelay);
  2463. dfdNextRun.resolve(chardelay);
  2464. });
  2465. });
  2466. }
  2467.  
  2468.  
  2469.  
  2470. /**
  2471. * Switch to a character's swordcoast adventures and collect the daily reward
  2472. */
  2473.  
  2474. function processSwordCoastDailies(_charStartIndex) {
  2475. var _accountName = unsafeWindow.client.dataModel.model.loginInfo.publicaccountname;
  2476. var _charIndex = (!_charStartIndex || parseInt(_charStartIndex) > (charNamesList.length + 1) || parseInt(_charStartIndex) < 0) ? 0 : parseInt(_charStartIndex);
  2477. var _fullCharName = charNamesList[_charIndex] + '@' + _accountName;
  2478. var _hasLoginDaily = 0;
  2479. var _isLastChar = false;
  2480. var _scaHashMatch = /\/adventures$/;
  2481. if (!scriptSettings.paused)
  2482. PauseSettings("pause");
  2483.  
  2484. // Switch to professions page to show task progression
  2485. if (!_scaHashMatch.test(unsafeWindow.location.hash)) {
  2486. return;
  2487. } else if (unsafeWindow.location.hash != "#char(" + encodeURI(_fullCharName) + ")/adventures") {
  2488. unsafeWindow.location.hash = "#char(" + encodeURI(_fullCharName) + ")/adventures";
  2489. }
  2490.  
  2491. if (_charIndex >= (charNamesList.length -1))
  2492. _isLastChar = true;
  2493.  
  2494. WaitForState("").done(function() {
  2495. try {
  2496. _hasLoginDaily = client.dataModel.model.gatewaygamedata.dailies.left.logins;
  2497. } catch (e) {
  2498. // TODO: Use callback function
  2499. window.setTimeout(function() {
  2500. processSwordCoastDailies(_charIndex);
  2501. }, delay.SHORT);
  2502. return;
  2503. }
  2504.  
  2505. console.log("Checking SCA Dialy for", _fullCharName, "...");
  2506.  
  2507. // Do SCA daily dice roll if the button comes up
  2508. WaitForState(".daily-dice-intro").done(function() {
  2509. $(".daily-dice-intro button").trigger('click');
  2510. WaitForState(".daily-awards-button").done(function() {
  2511. $(".daily-awards-button button").trigger('click');
  2512. });
  2513. });
  2514.  
  2515. // If Dice roll dialog is non existant
  2516. WaitForNotState(".modal-window.daily-dice").done(function() {
  2517. charStatisticsList[charNamesList[_charIndex]].general.lastSCAVisit = Date.now();
  2518. GM_setValue("statistics__char__" + _fullCharName , JSON.stringify(charStatisticsList[charNamesList[_charIndex]]));
  2519. updateCounters();
  2520. if (_isLastChar) {
  2521. window.setTimeout(function() {
  2522. PauseSettings("unpause");
  2523. }, 3000);
  2524. } else {
  2525. window.setTimeout(function() {
  2526. processSwordCoastDailies(_charIndex + 1);
  2527. }, 3000);
  2528. }
  2529. });
  2530. });
  2531. }
  2532.  
  2533. /**
  2534. * Finds the task finishing next & returns the date or NULL otherwise
  2535. *
  2536. * @return {Date} / {null}
  2537. */
  2538.  
  2539. function getNextFinishedTask() {
  2540. var tmpNext,
  2541. next = null;
  2542. var foundTask = false;
  2543. unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.forEach(function(entry, idx) {
  2544. if (entry.uassignmentid && (collectTaskAttempts[idx] < scriptSettings.general.maxCollectTaskAttempts)) {
  2545. foundTask = true;
  2546. tmpNext = new Date(entry.ufinishdate);
  2547. if (!next || tmpNext < next) {
  2548. next = tmpNext;
  2549. }
  2550. }
  2551. if (!entry.islockedslot && entry.category == "None" && scriptSettings.general.unasignedSlotRecheck) {
  2552. var tdate = new Date();
  2553. tdate.setTime( tdate.getTime() + parseInt(scriptSettings.general.unasignedSlotRecheck));
  2554. console.log("Found unasigned slot, setting it as: ", tdate);
  2555. if (!next || tdate < next) {
  2556. next = tdate;
  2557. }
  2558. }
  2559. });
  2560. if (next && foundTask) {
  2561. console.log("Next finished task at " + next.toLocaleString());
  2562. }
  2563. else {
  2564. console.log("No next finishing date found! All slots unasigned.");
  2565. if (scriptSettings.general.defaultVisitTime) {
  2566. var tdate = new Date();
  2567. tdate.setTime( tdate.getTime() + parseInt(scriptSettings.general.defaultVisitTime));
  2568. console.log("Setting next date using default: ", tdate);
  2569. return tdate;
  2570. }
  2571. }
  2572. return next;
  2573. }
  2574.  
  2575. /**
  2576. * Iterative approach to finding the next task to assign to an open slot.
  2577. *
  2578. * @param {Array} prof The tasklist for the profession being used
  2579. * @param {int} i The current task number being attempted
  2580. */
  2581.  
  2582. function createNextTask(prof, profile, i) {
  2583. // TODO: Use callback function
  2584. if (!unsafeWindow.client.dataModel.model.craftinglist || unsafeWindow.client.dataModel.model.craftinglist === null || !unsafeWindow.client.dataModel.model.craftinglist['craft_' + prof.taskName] || unsafeWindow.client.dataModel.model.craftinglist['craft_' + prof.taskName] === null) {
  2585. console.log('Task list not loaded for:', prof.taskName);
  2586. window.setTimeout(function() {
  2587. createNextTask(prof, profile, i);
  2588. }, delay.SHORT);
  2589. return false;
  2590. }
  2591.  
  2592. // Check level
  2593. var category = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories.filter(function(entry) {
  2594. return entry.name == prof.taskName;
  2595. });
  2596. var level = category ? category[0].currentrank : 0;
  2597. var list = profile.level[level];
  2598. var taskBlocked = ((getSetting('professionSettings','stopNotLeadership') == 20 && prof.taskName != 'Leadership' && level >= 20) ||
  2599. (getSetting('professionSettings','stopNotLeadership') == 25 && prof.taskName != 'Leadership' && level >= 25) ||
  2600. (getSetting('professionSettings','stopAlchemyAt3') && prof.taskName == 'Alchemy' && level > 3)) || !category;
  2601. if(list.length <= i || taskBlocked) {
  2602. if (!taskBlocked) console.log("Task list exhausted for ", prof.taskListName, " at level ", level, " profile: ", profile.profileName);
  2603. else console.warn("Task list blocked for ", prof.taskListName, " at level ", level, " profile: ", profile.profileName);
  2604. failedTasksList.push(prof.taskListName);
  2605. if (typeof failedProfiles[prof.taskListName] === 'undefined') {
  2606. failedProfiles[prof.taskListName] = [];
  2607. }
  2608. failedProfiles[prof.taskListName].push(profile.profileName);
  2609. dfdNextRun.resolve(delay.SHORT);
  2610. //switchChar();
  2611. return false;
  2612. }
  2613. console.log(prof.taskName, "is level", level);
  2614. console.log("createNextTask", list.length, i);
  2615.  
  2616. var taskName = list[i];
  2617. console.log("Searching for task:", taskName);
  2618.  
  2619. // Search for task to start
  2620. var task = searchForTask(taskName, prof.taskName, profile, level);
  2621.  
  2622. // Finish createNextTask function
  2623. if (task === null) {
  2624. console.log("Skipping task selection to purchase resources");
  2625. dfdNextRun.resolve();
  2626. return true;
  2627. }
  2628. if (task) {
  2629. antiInfLoopTrap.currTaskName = task.def.name;
  2630. antiInfLoopTrap.currCharName = unsafeWindow.client.getCurrentCharAtName();
  2631. task = '/professions-tasks/' + prof.taskName + '/' + task.def.name;
  2632. console.log('Task Found');
  2633. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')' + task);
  2634. WaitForState("div.page-professions-taskdetails").done(function() {
  2635. // Click all buttons and select an item to use in the slot
  2636. var def = $.Deferred();
  2637. var buttonList = $('.taskdetails-assets:eq(1)').find("button");
  2638. if (buttonList.length && getSetting('professionSettings','fillOptionals')) {
  2639. SelectItemFor(buttonList, 0, def, prof);
  2640. } else {
  2641. def.resolve();
  2642. }
  2643. def.done(function() {
  2644. // All items are populated
  2645. console.log("Items Populated");
  2646. // Click the Start Task Button
  2647. //Get the start task button if it is enabled
  2648. var enabledButton = $(".footer-professions-taskdetails .button.epic:not('.disabled') button");
  2649. if (enabledButton.length) {
  2650. console.log("Clicking Start Task Button");
  2651. enabledButton.trigger('click');
  2652. WaitForState("").done(function() {
  2653. // Done
  2654. dfdNextRun.resolve(delay.SHORT);
  2655. });
  2656. if (antiInfLoopTrap.prevCharName == antiInfLoopTrap.currCharName && antiInfLoopTrap.prevTaskName == antiInfLoopTrap.currTaskName) {
  2657. antiInfLoopTrap.startCounter++;
  2658. console.log(antiInfLoopTrap.prevCharName + " starts " + antiInfLoopTrap.prevTaskName + " " + antiInfLoopTrap.startCounter + " time in row");
  2659. } else {
  2660. antiInfLoopTrap.prevCharName = antiInfLoopTrap.currCharName;
  2661. antiInfLoopTrap.prevTaskName = antiInfLoopTrap.currTaskName;
  2662. antiInfLoopTrap.startCounter = 1;
  2663. }
  2664. if (antiInfLoopTrap.startCounter >= 10) {
  2665. console.log("Restart needed: " + (antiInfLoopTrap.trapActivation - antiInfLoopTrap.startCounter) + " loop circuits to restart");
  2666. }
  2667. return true;
  2668. } else { // Button not enabled, something required was probably missing
  2669. // Go back
  2670. $(".footer-professions-taskdetails .button button.resetWindow").trigger('click');
  2671. WaitForState("").done(function() {
  2672. // continue with the next one
  2673. console.log('Finding next task');
  2674. createNextTask(prof, profile, i + 1);
  2675. });
  2676. }
  2677. });
  2678. });
  2679. } else {
  2680. console.log('Finding next task');
  2681. createNextTask(prof, profile, i + 1);
  2682. }
  2683. }
  2684. /** Count resouce in bags
  2685. *
  2686. * @param {string} name The name of resource
  2687. */
  2688.  
  2689. function countResource(name) {
  2690. var count = 0;
  2691. var _bags = unsafeWindow.client.dataModel.model.ent.main.inventory.bags;
  2692. console.log("Checking bags for " + name);
  2693. $.each(_bags, function(bi, bag) {
  2694. bag.slots.forEach(function(slot) {
  2695. if (slot && slot.name === name) {
  2696. count = count + slot.count;
  2697. }
  2698. });
  2699. });
  2700. return count;
  2701. }
  2702.  
  2703. function countUnusedResource(name) {
  2704. var count = 0;
  2705. var bag = unsafeWindow.client.dataModel.model.ent.main.inventory.tradebag;
  2706. bag.forEach(function(slot) {
  2707. if (slot && slot.name === name) {
  2708. count = count + slot.count;
  2709. }
  2710. });
  2711. return count;
  2712. }
  2713.  
  2714. function countUsedResource(name) {
  2715. return countResource(name) - countUnusedResource(name);
  2716. }
  2717.  
  2718. /**
  2719. * Checks task being started for requirements and initiates beginning task if found
  2720. *
  2721. * @param {string} taskname The name of the task being started
  2722. * @param {string} profname The name of the profession being used
  2723. * @param {Deferred} dfd Deferred object to process on return
  2724. */
  2725.  
  2726. function searchForTask(taskname, profname, profile, professionLevel) {
  2727. // Return first object that matches exact craft name
  2728. // edited by WloBeb - start Patrol the Mines task only if char has less than 10 Mining Claims
  2729. var skip_setting = getSetting('professionSettings', 'skipPatrolTask');
  2730. if (taskname == "Leadership_Tier3_13_Patrol" && (skip_setting == 'always' ||
  2731. (skip_setting == 'ad' && profile.profileName == "AD") || (skip_setting == 'ld20' && professionLevel >= 20) ||
  2732. (skip_setting == 'AD&Lvl20' && professionLevel >= 20 && profile.profileName == "AD"))) {
  2733. if (countResource("Crafting_Resource_Mining_Claim") >= 10) {
  2734. console.log("Too many Mining Claims: skiping");
  2735. return false;
  2736. }
  2737. }
  2738.  
  2739. var thisTask = unsafeWindow.client.dataModel.model.craftinglist['craft_' + profname].entries.filter(function(entry) {
  2740. return entry.def && entry.def.name == taskname;
  2741. })[0];
  2742.  
  2743. // If no task is returned we either have three of this task already, the task is a rare that doesn't exist currently, or we have the name wrong in tasklist
  2744. if (!thisTask) {
  2745. console.log('Could not find task for:', taskname);
  2746. return false;
  2747. }
  2748.  
  2749. // start task if requirements are met
  2750. if (!thisTask.failslevelrequirementsfilter && !thisTask.failslevelrequirements && !thisTask.failsresourcesrequirements) {
  2751. return thisTask;
  2752. }
  2753.  
  2754. // Too high level
  2755. if (thisTask.failslevelrequirements) {
  2756. console.log("Task level is too high:", taskname);
  2757. return false;
  2758. }
  2759.  
  2760. var searchItem = null;
  2761. var searchAsset = false;
  2762.  
  2763. // Check for and buy missing armor & weapon leadership assets
  2764. if (thisTask.failsresourcesrequirements && profname == "Leadership" && getSetting('professionSettings','autoPurchaseRes')) {
  2765. var failedAssets = thisTask.required.filter(function(entry) {
  2766. return !entry.fillsrequirements;
  2767. });
  2768. var failedArmor = failedAssets.filter(function(entry) {
  2769. return entry.categories.indexOf("Armor") >= 0;
  2770. });
  2771. var failedWeapon = failedAssets.filter(function(entry) {
  2772. return entry.categories.indexOf("Weapon") >= 0;
  2773. });
  2774. if (failedArmor.length || failedWeapon.length) {
  2775. var _buyResult = false;
  2776. var _charGold = unsafeWindow.client.dataModel.model.ent.main.currencies.gold;
  2777. var _charSilver = unsafeWindow.client.dataModel.model.ent.main.currencies.silver;
  2778. var _charCopper = unsafeWindow.client.dataModel.model.ent.main.currencies.copper;
  2779. var _charCopperTotal = _charCopper + (_charSilver * 100) + (_charGold * 10000);
  2780.  
  2781. // Buy Leadership Armor Asset
  2782. if (failedArmor.length && _charCopperTotal >= 10000) {
  2783. console.log("Buying leadership asset:", failedArmor[0].icon);
  2784. _buyResult = buyTaskAsset(18);
  2785. unsafeWindow.client.professionFetchTaskList("craft_Leadership");
  2786. }
  2787. // Buy Leadership Infantry Weapon Asset
  2788. else if (failedWeapon.length && _charCopperTotal >= 5000) {
  2789. console.log("Buying leadership asset:", failedWeapon[0].icon);
  2790. _buyResult = buyTaskAsset(4);
  2791. unsafeWindow.client.professionFetchTaskList("craft_Leadership");
  2792. }
  2793. if (_buyResult === false)
  2794. return false;
  2795. else
  2796. return null;
  2797. }
  2798. }
  2799.  
  2800. // Missing assets or ingredients
  2801. if (thisTask.failsresourcesrequirements) {
  2802. var failedAssets = thisTask.required.filter(function(entry) {
  2803. return !entry.fillsrequirements;
  2804. });
  2805.  
  2806. // Missing required assets
  2807. if (failedAssets.length) {
  2808. var failedCrafter = failedAssets.filter(function(entry) {
  2809. return entry.categories.indexOf("Person") >= 0;
  2810. });
  2811.  
  2812. // Train Assets
  2813. if (failedCrafter.length && getSetting('professionSettings','trainAssets')) {
  2814. console.log("Found required asset:", failedCrafter[0].icon);
  2815. searchItem = failedCrafter[0].icon;
  2816. searchAsset = true;
  2817. } else {
  2818. // TODO: Automatically purchase item assets from shop
  2819. console.log("Not enough assets for task:", taskname);
  2820. return false;
  2821. }
  2822. }
  2823. // Check for craftable ingredients items and purchasable profession resources (from vendor)
  2824. else {
  2825. var failedResources = thisTask.consumables.filter(function(entry) {
  2826. return entry.required && !entry.fillsrequirements;
  2827. });
  2828.  
  2829. // Check first required ingredient only
  2830. // If it fails to buy or craft task cannot be completed anyway
  2831. // If it succeeds script will search for tasks anew
  2832. var itemName = failedResources[0].hdef.match(/\[(\w+)\]/)[1];
  2833.  
  2834. // Buy purchasable resources if auto-purchase setting is enabled
  2835. if (getSetting('professionSettings','autoPurchaseRes') && itemName.match(/^Crafting_Resource_(Charcoal|Rocksalt|Spool_Thread|Porridge|Solvent|Brimstone|Coal|Moonseasalt|Quicksilver|Spool_Threadsilk)$/)) {
  2836. // returns null if successful (task will try again) and false if unsuccessful (task will be skipped)
  2837. return buyResource(itemName);
  2838. }
  2839. // Matched profession auto-purchase item found but auto-purchase is not enabled
  2840. else if (!getSetting('professionSettings','autoPurchaseRes') && itemName.match(/^Crafting_Resource_(Charcoal|Rocksalt|Spool_Thread|Porridge|Solvent|Brimstone|Coal|Moonseasalt|Quicksilver|Spool_Threadsilk)$/)) {
  2841. console.log("Purchasable resource required:", itemName, "for task:", taskname, ". Recommend enabling Auto Purchase Resources.");
  2842. if (pleaseBuy.push("Please buy " + itemName + " for " + unsafeWindow.client.getCurrentCharAtName()) > 5) {
  2843. pleaseBuy.shift();
  2844. }
  2845. return false;
  2846. }
  2847. // craftable ingredient set to search for
  2848. else {
  2849. console.log("Found required ingredient:", itemName);
  2850. searchItem = itemName;
  2851. }
  2852. }
  2853. }
  2854.  
  2855. // either no craftable items/assets found or other task requirements are not met
  2856. // Skip crafting ingredient tasks for Leadership
  2857. if (searchItem === null || !searchItem.length || (profname == 'Leadership' && !searchAsset && !searchItem.match(/Crafting_Asset_Craftsman/))) {
  2858. console.log("Failed to resolve item requirements for task:", taskname);
  2859. return false;
  2860. }
  2861.  
  2862. var massTaskAllowed = ((profile !== undefined) && (profile.useMassTask !== undefined) && (profile.useMassTask === true));
  2863.  
  2864. // Generate list of available tasks to search ingredients/assets from
  2865. console.log("Searching ingredient tasks for:", profname);
  2866. var taskList = unsafeWindow.client.dataModel.model.craftinglist['craft_' + profname].entries.filter(function(entry) {
  2867. // remove header lines first to avoid null def
  2868. if (entry.isheader) {
  2869. return false;
  2870. }
  2871.  
  2872. // Too high level
  2873. if (entry.failslevelrequirements) {
  2874. return false;
  2875. }
  2876.  
  2877. // Rewards do not contain item we want to make
  2878. if (searchAsset) {
  2879. if (entry.def.icon != searchItem || !entry.def.name.match(/Recruit/) || entry.def.requiredrank > 14) {
  2880. return false;
  2881. }
  2882. } else {
  2883. if (!(entry.rewards.some(function(itm) {
  2884. try {
  2885. return itm.hdef.match(/\[(\w+)\]/)[1] == searchItem;
  2886. } catch (e) {}
  2887. }))) {
  2888. return false;
  2889. }
  2890. }
  2891.  
  2892. // Skip mass production tasks (don't skip for profiles with useMassTask flag == true)
  2893. if (! massTaskAllowed) {
  2894. if (entry.def.displayname.match(/^(Batch|Mass|Deep|Intensive) /)) {
  2895. return false;
  2896. }
  2897. }
  2898.  
  2899. // Skip trading tasks
  2900. if (entry.def.displayname.match(/rading$/)) {
  2901. return false;
  2902. }
  2903.  
  2904. // Skip looping Transmute tasks
  2905. if (entry.def.displayname.match(/^(Transmute|Create) /)) {
  2906. return false;
  2907. }
  2908.  
  2909. return true;
  2910. });
  2911.  
  2912. if (!taskList.length) {
  2913. console.log("No ingredient tasks found for:", taskname, searchItem);
  2914. if (!searchItem.match(/(_Research)|(_Craftsman_)|(Crafted_)/)) {
  2915. if (pleaseBuy.push("Please buy " + searchItem + " for " + unsafeWindow.client.getCurrentCharAtName()) > 5) {
  2916. pleaseBuy.shift();
  2917. }
  2918. }
  2919. return false;
  2920. }
  2921.  
  2922. // for profiles with useMassTask flag == true select Mass task
  2923. if (massTaskAllowed) {
  2924. for (var i=0; i<taskList.length; i++) {
  2925. if (taskList[i].def.displayname.match(/^(Batch|Mass|Deep|Intensive) /)) {
  2926. taskList = taskList.splice(i, 1);
  2927. break;
  2928. }
  2929. }
  2930. }
  2931.  
  2932. // Use more efficient Empowered task for Aqua if available.
  2933. if ((searchItem == "Crafting_Resource_Aquavitae" || searchItem == "Crafting_Resource_Aquaregia") && taskList.length > 1) {
  2934. taskList.shift();
  2935. }
  2936.  
  2937. // Should really only be one result now but lets iterate through anyway.
  2938. for (var i = 0; i < taskList.length; i++) {
  2939. console.log("Attempting search for ingredient task:", taskList[i].def.name);
  2940. var task = searchForTask(taskList[i].def.name, profname, profile, professionLevel);
  2941. if (task === null || task) {
  2942. return task;
  2943. }
  2944. }
  2945. return false;
  2946. }
  2947.  
  2948.  
  2949. /**
  2950. * Selects the highest level asset for the i'th button in the list. Uses an iterative approach
  2951. * in order to apply a sufficient delay after the asset is assigned
  2952. *
  2953. * @param {Array} The list of buttons to use to click and assign assets for
  2954. * @param {int} i The current iteration number. Will select assets for the i'th button
  2955. * @param {Deferred} jQuery Deferred object to resolve when all of the assets have been assigned
  2956. */
  2957.  
  2958. function SelectItemFor(buttonListIn, i, def, prof) {
  2959. buttonListIn[i].click();
  2960. WaitForState("").done(function() {
  2961.  
  2962. var $assets = $("div.modal-item-list a").has("img[src*='_Resource_'],img[src*='_Assets_'],img[src*='_Tools_'],img[src*='_Tool_'],img[src*='_Jewelersloupe_'],img[src*='_Bezelpusher_']"); //edited by RottenMind
  2963. var $persons = $("div.modal-item-list a").has("img[src*='_Follower_']");
  2964. var quality = [".Special", ".Gold", ".Silver", ".Bronze"];
  2965. var ic,
  2966. $it;
  2967.  
  2968. var clicked = false;
  2969.  
  2970. // Try to avoid using up higher rank assets needlessly
  2971. if (prof.taskName === "Leadership") {
  2972. var mercenarys = $('div.modal-item-list a.Bronze img[src*="Crafting_Follower_Leader_Generic_T1_01"]').parent().parent();
  2973. var guards = $('div.modal-item-list a.Bronze img[src*="Crafting_Follower_Leader_Guard_T2_01"]').parent().parent();
  2974. var footmen = $('div.modal-item-list a.Bronze img[src*="Crafting_Follower_Leader_Private_T2_01"]').parent().parent();
  2975.  
  2976. var T3_Epic = 0;
  2977. var T3_Rare = 0;
  2978. var T3_Uncommon = 0;
  2979. var usedCommon;
  2980. var _enableSmartLeadership = getSetting('professionSettings','smartLeadershipAssets');
  2981. if (_enableSmartLeadership) {
  2982. T3_Epic = countResource("Crafting_Asset_Craftsman_Leadership_T3_Epic"); // number of heroes in inventory
  2983. T3_Rare = countResource("Crafting_Asset_Craftsman_Leadership_T3_Rare"); // number of adventurers in inventory
  2984. T3_Uncommon = countResource("Crafting_Asset_Craftsman_Leadership_T3_Uncommon"); // number of man-at-arms in inventory
  2985. usedCommon = countUsedResource("Crafting_Asset_Craftsman_Leadership_T3_Common") + countUsedResource("Crafting_Asset_Craftsman_Leadership_T2_Common") + countUsedResource("Crafting_Asset_Craftsman_Leadership_T1_Common_1"); //number of used mercenarys, guards and footmans
  2986. }
  2987.  
  2988. if (!(_enableSmartLeadership) || (_enableSmartLeadership && (T3_Epic + T3_Rare + T3_Uncommon + usedCommon < parseInt(charSettingsList[curCharName].taskListSettings["Leadership"].taskSlots) * 2))) {
  2989. if (mercenarys.length) {
  2990. clicked = true;
  2991. mercenarys[0].click();
  2992. } else if (guards.length) {
  2993. clicked = true;
  2994. guards[0].click();
  2995. } else if (footmen.length) {
  2996. clicked = true;
  2997. footmen[0].click();
  2998. }
  2999. }
  3000. }
  3001.  
  3002.  
  3003. // check resources & assets for best quality, in descending order
  3004. for (ic in quality) {
  3005. $it = $assets.filter(quality[ic]);
  3006. if ($it.length) {
  3007. $it[0].click();
  3008. clicked = true;
  3009. break;
  3010. }
  3011. }
  3012.  
  3013. // if no asset was selected, check for persons for best speed, in descending order
  3014. if (!clicked) {
  3015. for (ic in quality) {
  3016. $it = $persons.filter(quality[ic]);
  3017. if ($it.length) {
  3018. $it[0].click();
  3019. clicked = true;
  3020. break;
  3021. }
  3022. }
  3023. }
  3024.  
  3025. // if nothing was found at all, return immediately (skip other optional slots)
  3026. if (!clicked) {
  3027. $("button.close-button").trigger('click');
  3028. console.log("Nothing more to click..");
  3029. WaitForState("").done(function() {
  3030. // Let main loop continue
  3031. def.resolve();
  3032. });
  3033. }
  3034.  
  3035. console.log("Clicked item");
  3036. WaitForState("").done(function() {
  3037. // Get the new set of select buttons created since the other ones are removed when the asset loads
  3038. var buttonList = $('.taskdetails-assets:eq(1)').find("button");
  3039. if (i < buttonList.length - 1) {
  3040. SelectItemFor(buttonList, i + 1, def, prof);
  3041. } else {
  3042. // Let main loop continue
  3043. def.resolve();
  3044. }
  3045. });
  3046. });
  3047. }
  3048.  
  3049.  
  3050. /**
  3051. * Will buy a given purchasable resource
  3052. *
  3053. * @param {String} item The data-tt-item id of the Resource to purchase
  3054. */
  3055.  
  3056. function buyResource(item) {
  3057. var _resourceID = {
  3058. Crafting_Resource_Charcoal: 0,
  3059. Crafting_Resource_Rocksalt: 1,
  3060. Crafting_Resource_Spool_Thread: 2,
  3061. Crafting_Resource_Porridge: 3,
  3062. Crafting_Resource_Solvent: 4,
  3063. Crafting_Resource_Brimstone: 5,
  3064. Crafting_Resource_Coal: 6,
  3065. Crafting_Resource_Moonseasalt: 7,
  3066. Crafting_Resource_Quicksilver: 8,
  3067. Crafting_Resource_Spool_Threadsilk: 9,
  3068. };
  3069. var _resourceCost = {
  3070. Crafting_Resource_Charcoal: 30,
  3071. Crafting_Resource_Rocksalt: 30,
  3072. Crafting_Resource_Spool_Thread: 30,
  3073. Crafting_Resource_Porridge: 30,
  3074. Crafting_Resource_Solvent: 20,
  3075. Crafting_Resource_Brimstone: 100,
  3076. Crafting_Resource_Coal: 500,
  3077. Crafting_Resource_Moonseasalt: 500,
  3078. Crafting_Resource_Quicksilver: 500,
  3079. Crafting_Resource_Spool_Threadsilk: 500,
  3080. };
  3081. var _charGold = unsafeWindow.client.dataModel.model.ent.main.currencies.gold;
  3082. var _charSilver = unsafeWindow.client.dataModel.model.ent.main.currencies.silver;
  3083. var _charCopper = unsafeWindow.client.dataModel.model.ent.main.currencies.copper;
  3084. var _charCopperTotal = _charCopper + (_charSilver * 100) + (_charGold * 10000);
  3085. var _resourcePurchasable = Math.floor(_charCopperTotal / _resourceCost[item]);
  3086. // Limit resource purchase to 50 quantity
  3087. var _purchaseCount = (_resourcePurchasable >= 50) ? 50 : _resourcePurchasable;
  3088.  
  3089. if (_purchaseCount < 1) {
  3090. // Not enough gold for 1 resource
  3091. console.log("Purchasing profession resources failed for: ", item, " Have: ",_charCopperTotal, " Cost Per Item: ", _resourceCost[item], " Can buy: ", _resourcePurchasable);
  3092. if (pleaseBuy.push("Please buy " + item + " for " + unsafeWindow.client.getCurrentCharAtName()) > 5) {
  3093. pleaseBuy.shift();
  3094. }
  3095. return false;
  3096. } else {
  3097. // Make purchase
  3098. console.log("Purchasing profession resources:", _purchaseCount + "x", item, ". Total copper available:", _charCopperTotal, ". Spending ", (_purchaseCount * _resourceCost[item]), "copper.");
  3099. unsafeWindow.client.sendCommand("GatewayVendor_PurchaseVendorItem", {
  3100. vendor: 'Nw_Gateway_Professions_Merchant',
  3101. store: 'Store_Crafting_Resources',
  3102. idx: _resourceID[item],
  3103. count: _purchaseCount
  3104. });
  3105. WaitForState("button.closeNotification").done(function() {
  3106. $("button.closeNotification").trigger('click');
  3107. });
  3108. return null;
  3109. }
  3110. }
  3111.  
  3112. /** DRAFT
  3113. * Will buy a missing leadership assets
  3114. *
  3115. * @param {String} item reference from assetID
  3116. */
  3117.  
  3118. function buyTaskAsset(_itemNo) {
  3119. var _returnHast = unsafeWindow.location.hash;
  3120. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')/professions/vendor');
  3121. WaitForState("").done(function() {
  3122. if ($('span.alert-red button[data-url-silent="/professions/vendor/Store_Crafting_Assets/' + _itemNo + '"]').length) {
  3123. return false;
  3124. } else if ($('button[data-url-silent="/professions/vendor/Store_Crafting_Assets/' + _itemNo + '"]').length) {
  3125. $('button[data-url-silent="/professions/vendor/Store_Crafting_Assets/' + _itemNo + '"]').trigger('click');
  3126. WaitForState(".modal-confirm button").done(function() {
  3127. $('.modal-confirm button').eq(1).trigger('click');
  3128. unsafeWindow.location.hash = _returnHast;
  3129. return null;
  3130. });
  3131. }
  3132. });
  3133. }
  3134.  
  3135. // Function used to check exchange data model and post calculated AD/Zen for transfer if all requirements are met
  3136.  
  3137. function postZaxOffer() {
  3138. // Make sure the exchange data is loaded to model
  3139. if (unsafeWindow.client.dataModel.model.exchangeaccountdata) {
  3140. // Check that there is atleast 1 free ZAX order slot
  3141. if (unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.length < 5) {
  3142. // Place the order
  3143. var exchangeDiamonds = parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  3144. if (exchangeDiamonds > 0) {
  3145. console.log("AD in exchange: " + exchangeDiamonds);
  3146. }
  3147. // Domino effect: this new order will post all the gathered diamonds until now
  3148. var charDiamonds = parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds);
  3149. var ZenRate = parseInt(accountSettings.consolidationSettings.transferRate);
  3150. if (!ZenRate) return;
  3151. var ZenQty = Math.floor((charDiamonds + exchangeDiamonds - parseInt(getSetting('consolidationSettings','minCharBalance'))) / ZenRate);
  3152. ZenQty = (ZenQty > 5000) ? 5000 : ZenQty;
  3153. console.log("Posting ZAX buy listing for " + ZenQty + " ZEN at the rate of " + ZenRate + " AD/ZEN. AD remainder: " + charDiamonds + " - " + (ZenRate * ZenQty) + " = " + (charDiamonds - (ZenRate * ZenQty)));
  3154. unsafeWindow.client.createBuyOrder(ZenQty, ZenRate);
  3155. // set moved ad to the ad counter zax log
  3156. var ADTotal = ZenRate * ZenQty - exchangeDiamonds;
  3157. if (ADTotal > 0) {
  3158. console.log("AD moved to ZAX from", charNamesList[lastCharNum] + ":", ADTotal);
  3159. chardiamonds[lastCharNum] -= ADTotal;
  3160. console.log(charNamesList[lastCharNum] + "'s", "Astral Diamonds:", chardiamonds[lastCharNum]);
  3161. zaxdiamonds += ADTotal;
  3162. console.log("Astral Diamonds on the ZAX:", zaxdiamonds);
  3163. }
  3164. } else {
  3165. console.log("Zen Max Listings Reached (5). Skipping ZAX Posting..");
  3166. }
  3167. } else {
  3168. console.log("Zen Exchange data did not load in time for transfer. Skipping ZAX Posting..");
  3169. }
  3170. }
  3171.  
  3172. // Function used to check exchange data model and withdraw listed orders that use the settings zen transfer rate
  3173.  
  3174. function cancelZaxOffer() {
  3175. // Make sure the exchange data is loaded to model
  3176. if(unsafeWindow.client.dataModel.model.exchangeaccountdata) {
  3177. if(unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.length >= 1) {
  3178. console.log("Canceling ZAX orders");
  3179.  
  3180. var charDiamonds = parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds);
  3181. var ZenRate = parseInt(getSetting('consolidationSettings','transferRate'));
  3182.  
  3183. // cycle through the zax listings
  3184. unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.forEach(function(item) {
  3185. // find any buy orders in the list with our set zen rate
  3186. if (parseInt(item.price) == ZenRate && item.ordertype == "Buy") {
  3187. // cancel/withdraw the order
  3188. client.withdrawOrder(item.orderid);
  3189. console.log("Canceling ZAX offer for " + item.quantity + " ZEN at the rate of " + item.price + " . Total value in AD: " + item.totaltc);
  3190. }
  3191. });
  3192. } else {
  3193. console.log("No listings found on ZAX. Skipping ZAX Withrdaw..");
  3194. }
  3195. } else {
  3196. console.log("Zen Exchange data did not load in time for transfer. Skipping ZAX Withrdaw..");
  3197. }
  3198. }
  3199.  
  3200. function claimZaxOffer() {
  3201. if (unsafeWindow.client.dataModel.model.exchangeaccountdata) {
  3202. if (parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow) > 0) {
  3203. unsafeWindow.client.sendCommand("GatewayExchange_ClaimTC", unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  3204. console.log("Attempting to withdraw exchange balancees... ClaimTC: " + unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  3205. // clear the ad counter zax log
  3206. zaxdiamonds = 0;
  3207. }
  3208. if (parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimmtc) > 0) {
  3209. unsafeWindow.client.sendCommand("GatewayExchange_ClaimMTC", unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimmtc);
  3210. console.log("Attempting to withdraw exchange balancees... ClaimMT: " + unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimmtc);
  3211. }
  3212. } else {
  3213. window.setTimeout(claimZaxOffer, delay.SHORT);
  3214. }
  3215. }
  3216.  
  3217. // MAC-NW
  3218.  
  3219. function vendorItemsLimited(_items) {
  3220. var _pbags = client.dataModel.model.ent.main.inventory.playerbags;
  3221. var _delay = 400;
  3222. var _sellCount = 0;
  3223. var _classType = unsafeWindow.client.dataModel.model.ent.main.classtype;
  3224. var _bagCount = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags.length;
  3225. var _bagUsed = 0;
  3226. var _bagUnused = 0;
  3227. var _tmpBag = [];
  3228. var _profitems = [];
  3229. // Pattern for items to leave out of auto vendoring (safeguard)
  3230. var _excludeItems = /(Gemfood|Gem_Upgrade_Resource_R[3-9]|Artifact(?!_Upgrade_Resource_R1_)|Hoard|Coffer|Fuse|Ward|Preservation|Armor_Enhancement|Weapon_Enhancement|T[5-9]_Enchantment|T[5-9]_Runestones|T10_Enchantment|T10_Runestones|4c_Personal|Item_Potion_Companion_Xp|Gateway_Rewardpack|Consumable_Id_Scroll|Dungeon_Delve_Key)/; // edited by RottenMind 17.01.2015
  3231.  
  3232. /** Profession leveling result item cleanup logic for T1-4 crafted results
  3233. * Created by RM on 14.1.2015.
  3234. * List contains crafted_items, based "Mustex/Bunta NW robot 1.05.0.1L crafting list, can be used making list for items what are "Auto_Vendored".
  3235. * Items on list must be checked and tested.
  3236. */
  3237. if (getSetting('vendorSettings', 'vendorProfResults')) {
  3238. /*#2, Tier2 - tier3 mixed, upgrade, sell if inventory full, "TierX" is here "TX" */
  3239. _profitems[_profitems.length] = {
  3240. pattern: /^Crafted_(Jewelcrafting_Neck_Misc_2|Jewelcrafting_Waist_Misc_2|Med_Armorsmithing_T3_Chain_Pants|Med_Armorsmithing_T3_Chain_Shirt|Hvy_Armorsmithing_T3_Plate_Pants|Hvy_Armorsmithing_T3_Plate_Shirt|Leatherworking_T3_Leather_Pants|Leatherworking_T3_Leather_Shirt|Tailoring_T3_Cloth_Shirt|Tailoring_T3_Cloth_Pants||Artificing_T3_Pactblade_Temptation_4|Artificing_T3_Icon_Virtuous_4|Weaponsmithing_T2_Dagger_3|Weaponsmithing_T2_Dagger_3)$/,
  3241. limit: 0,
  3242. count: 0
  3243. };
  3244. /*#3, Tier2, upgrade, sell if inventory full, "TierX" is here "TX" */
  3245. _profitems[_profitems.length] = {
  3246. pattern: /^Crafted_(Jewelcrafting_Neck_Offense_2|Jewelcrafting_Waist_Offense_2|Med_Armorsmithing_T2_Chain_Armor_Set_1|Med_Armorsmithing_T2_Chain_Pants_2|Med_Armorsmithing_T2_Chain_Boots_Set_1|Med_Armorsmithing_T2_Chain_Shirt_2|Med_Armorsmithing_T2_Chain_Pants_1|Med_Armorsmithing_T2_Chain_Shirt|Hvy_Armorsmithing_T2_Plate_Armor_Set_1|Hvy_Armorsmithing_T2_Plate_Pants_2|Hvy_Armorsmithing_T2_Plate_Boots_Set_1|Hvy_Armorsmithing_T2_Plate_Shirt_2|Hvy_Armorsmithing_T2_Plate_Pants_1|Hvy_Armorsmithing_T2_Shield_Set_1|Hvy_Armorsmithing_T2_Plate_Shirt|Leatherworking_T2_Leather_Shirt|Leatherworking_T2_Leather_Boots_Set_1|Leatherworking_T2_Leather_Shirt_2|Leatherworking_T2_Leather_Pants_1|Leatherworking_T2_Leather_Armor_Set_1|Leatherworking_T2_Leather_Pants_2|Tailoring_T2_Cloth_Armor_Set_1|Tailoring_T2_Cloth_Pants_2|Tailoring_T2_Cloth_Boots_Set_1|Tailoring_T2_Cloth_Shirt_2|Tailoring_T2_Cloth_Pants_1|Artificing_T2_Pactblade_Temptation_3|Artificing_T1_Icon_Virtuous_2|Weaponsmithing_T2_Dagger_2)$/,
  3247. limit: 0,
  3248. count: 0
  3249. };
  3250. /*#4, Tier1, upgrade, sell if inventory full, "TierX" is here "TX" */
  3251. _profitems[_profitems.length] = {
  3252. pattern: /^Crafted_(Jewelcrafting_Neck_Misc_1|Jewelcrafting_Waist_Misc_1|Med_Armorsmithing_T1_Chain_Armor_Set_1|Med_Armorsmithing_T1_Chain_Boots_Set_1|Hvy_Armorsmithing_Plate_Armor_1|Hvy_Armorsmithing_T1_Plate_Armor_Set_1|Hvy_Armorsmithing_T1_Plate_Boots_Set_1|Leatherworking_T1_Leather_Boots_Set_1|Leatherworking_T1_Leather_Boots_Set_1|Leatherworking_T1_Leather_Armor_Set_1|Tailoring_T1_Cloth_Armor_1|Tailoring_T1_Cloth_Pants_1|Tailoring_T1_Cloth_Boots_Set_1|Artificing_T1_Pactblade_Convergence_2|Artificing_T1_Icon_Virtuous_2|Weaponsmithing_T1_Dagger_1)$/,
  3253. limit: 0,
  3254. count: 0
  3255. };
  3256. /*#5, Tier0, upgrade, sell if inventory full, taskilist "Tier1" is here "empty" or "_" must replace (_T1_|_)*/
  3257. _profitems[_profitems.length] = {
  3258. pattern: /^Crafted_(Jewelcrafting_Waist_Offense_1|Jewelcrafting_Neck_Offense_1|Med_Armorsmithing_Chain_Boots_1|Med_Armorsmithing_Chain_Shirt_1|Med_Armorsmithing_Chain_Armor_1|Med_Armorsmithing_Chain_Pants_1|Hvy_Armorsmithing_Plate_Boots_1|Hvy_Armorsmithing_Plate_Shirt_1|Hvy_Armorsmithing_Shield_1|Leatherworking_Tier0_Intro_1|Leatherworking_Leather_Boots_1|Leatherworking_Leather_Shirt_1|Leatherworking_Leather_Armor_1|Leatherworking_Leather_Pants_1|Tailoring_Cloth_Boots_1|Tailoring_Cloth_Shirt_1|Artificing_T1_Pactblade_Convergence_1|Artificing_Icon_Virtuous_1|Artificing_Symbol_Virtuous_1|Weaponsmithing_Dagger_1)$/,
  3259. limit: 0,
  3260. count: 0
  3261. };
  3262. }
  3263.  
  3264. $.each(_pbags, function(bi, bag) {
  3265. bag.slots.forEach(function(slot) {
  3266. // Match unused slots
  3267. if (slot === null || !slot || slot === undefined) {
  3268. _bagUnused++;
  3269. }
  3270. // Match items to exclude from auto vendoring, dont add to _tmpBag: Exclude pattern list - bound - Epic Quality - Blue Quality
  3271. else if (_excludeItems.test(slot.name) || slot.rarity == "Special" || slot.rarity == "Gold") {
  3272. _bagUsed++;
  3273. }
  3274. // Match everything else
  3275. else {
  3276. if (getSetting('vendorSettings', 'vendorProfResults')) {
  3277. for (i = 0; i < _profitems.length; i++) {
  3278. if (_profitems[i].pattern.test(slot.name))
  3279. _profitems[i].count++;
  3280. }
  3281. }
  3282. _tmpBag[_tmpBag.length] = slot;
  3283. _bagUsed++;
  3284. }
  3285. });
  3286. });
  3287.  
  3288. if (getSetting('vendorSettings', 'vendorProfResults')) {
  3289. _tmpBag.forEach(function(slot) {
  3290. for (i = 0; i < _profitems.length; i++) { // edited by RottenMind
  3291. if (slot && _profitems[i].pattern.test(slot.name) && Inventory_bagspace() <= 7) { // !slot.bound && _profitems[i].count > 3 &&, edited by RottenMind
  3292. var vendor = {
  3293. vendor: "Nw_Gateway_Professions_Merchant"
  3294. };
  3295. vendor.id = slot.uid;
  3296. vendor.count = 1;
  3297. console.log('Selling', vendor.count, slot.name, 'to vendor.');
  3298. window.setTimeout(function() {
  3299. client.sendCommand('GatewayVendor_SellItemToVendor', vendor);
  3300. }, _delay);
  3301. _profitems[i].count--;
  3302. break;
  3303. }
  3304. }
  3305. });
  3306. }
  3307.  
  3308. _tmpBag.forEach(function(slot) {
  3309. for (i = 0; i < _items.length; i++) {
  3310. var _Limit = (parseInt(_items[i].limit) > 99) ? 99 : _items[i].limit;
  3311. if (slot && _items[i].pattern.test(slot.name)) {
  3312. // Node Kits vendor logic for restricted bag space
  3313. if (getSetting('vendorSettings', 'vendorKitsLimit') && /^Item_Consumable_Skill/.test(slot.name)) {
  3314. if (_bagCount < 2 || _bagUnused < 6 ||
  3315. (slot.name == "Item_Consumable_Skill_Dungeoneering" && (_classType == "Player_Guardian" || _classType == "Player_Greatweapon")) ||
  3316. (slot.name == "Item_Consumable_Skill_Arcana" && (_classType == "Player_Controller" || _classType == "Player_Scourge")) ||
  3317. (slot.name == "Item_Consumable_Skill_Religion" && _classType == "Player_Devoted") ||
  3318. (slot.name == "Item_Consumable_Skill_Thievery" && _classType == "Player_Trickster") ||
  3319. (slot.name == "Item_Consumable_Skill_Nature" && _classType == "Player_Archer")) {
  3320. _Limit = 0;
  3321. }
  3322. }
  3323. // Sell Items
  3324. if (slot.count > _Limit) {
  3325. _sellCount++;
  3326. var vendor = {
  3327. vendor: "Nw_Gateway_Professions_Merchant"
  3328. };
  3329. vendor.id = slot.uid;
  3330. vendor.count = slot.count - _Limit;
  3331. console.log('Selling', vendor.count, slot.name, 'to vendor.');
  3332. window.setTimeout(function() {
  3333. client.sendCommand('GatewayVendor_SellItemToVendor', vendor);
  3334. }, _delay);
  3335. _delay = _delay + 400;
  3336. break;
  3337. }
  3338. }
  3339. }
  3340. });
  3341.  
  3342. return _sellCount;
  3343. }
  3344.  
  3345. function switchChar() {
  3346.  
  3347. // detect if daily reset occurs (no more frequently than every 16 hours)
  3348. var oldRefineToday = charStatisticsList[curCharName].general.refined[0] | 0;
  3349. var newRefineToday = unsafeWindow.client.dataModel.model.ent.main.currencies.diamondsconverted | 0;
  3350. if (newRefineToday < oldRefineToday) {
  3351. if (accountSettings.generalSettings.SCADailyReset < Date.now() - 16*60*60*1000) {
  3352. accountSettings.generalSettings.SCADailyReset = Date.now();
  3353. GM_setValue("settings__account__" + loggedAccount, JSON.stringify(accountSettings));
  3354. }
  3355. }
  3356.  
  3357. if (newRefineToday < oldRefineToday || charStatisticsList[curCharName].general.lastVisit < lastDailyResetTime) {
  3358. if (!Array.isArray(charStatisticsList[curCharName].general.refined)) {
  3359. var temp = [0,0,0,0,0,0,0,0];
  3360. temp[0] = charStatisticsList[curCharName].general.refined;
  3361. charStatisticsList[curCharName].general.refined = temp;
  3362. }
  3363. charStatisticsList[curCharName].general.refined.unshift(0);
  3364. charStatisticsList[curCharName].general.refined.length = 8;
  3365. }
  3366.  
  3367. var refined_diamonds = 0;
  3368. if (getSetting('generalSettings', 'refineAD')) {
  3369. var _currencies = unsafeWindow.client.dataModel.model.ent.main.currencies;
  3370. if (_currencies.diamondsconvertleft && _currencies.roughdiamonds) {
  3371. if (_currencies.diamondsconvertleft < _currencies.roughdiamonds) {
  3372. refined_diamonds = _currencies.diamondsconvertleft
  3373. } else {
  3374. refined_diamonds = _currencies.roughdiamonds
  3375. }
  3376. chardiamonds[curCharNum] += refined_diamonds
  3377. console.log("Refining AD for", curCharName + ":", refined_diamonds);
  3378. console.log(curCharName + "'s", "Astral Diamonds:", chardiamonds[curCharNum]);
  3379. unsafeWindow.client.sendCommand('Gateway_ConvertNumeric', 'Astral_Diamonds');
  3380. WaitForState("button.closeNotification").done(function() {
  3381. $("button.closeNotification").click();
  3382. });
  3383. charStatisticsList[curCharName].general.refineCounter += refined_diamonds;
  3384.  
  3385. }
  3386. }
  3387.  
  3388. // MAC-NW -- AD Consolidation
  3389. //if (accountSettings.consolidationSettings.consolidate) {
  3390. if (getSetting('consolidationSettings','consolidate')) {
  3391. // Check that we dont take money from the character assigned as the banker // Zen Transfer / Listing
  3392. if ((accountSettings.consolidationSettings.bankCharName) && (accountSettings.consolidationSettings.bankCharName !== unsafeWindow.client.dataModel.model.ent.main.name)) {
  3393. // Check the required min AD amount on character
  3394. if (getSetting('consolidationSettings','minToTransfer') &&
  3395. parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds) >= (parseInt(getSetting('consolidationSettings','minToTransfer')) + parseInt(getSetting('consolidationSettings','minCharBalance')))) {
  3396. // Check that the rate is not less than the min & max
  3397. if (accountSettings.consolidationSettings.transferRate && parseInt(accountSettings.consolidationSettings.transferRate) >= 50 && parseInt(accountSettings.consolidationSettings.transferRate) <= 500) {
  3398. window.setTimeout(postZaxOffer, delay.SHORT);
  3399. } else {
  3400. console.log("Zen transfer rate does not meet the minimum (50) or maximum (500). Skipping ZAX Posting..");
  3401. }
  3402. } else {
  3403. console.log("Character does not have minimum AD balance to do funds transfer. Skipping ZAX Posting..");
  3404. }
  3405. }
  3406. else {
  3407. console.log("Bank char not set or bank char, skipping posting.");
  3408. }
  3409. } else {
  3410. console.log("Zen Exchange AD transfer not enabled. Skipping ZAX Posting..");
  3411. }
  3412.  
  3413. if (getSetting('generalSettings','openRewards')) {
  3414. var _pbags = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags;
  3415. var _cRewardPat = /Reward_Item_Chest|Gateway_Rewardpack/;
  3416. console.log("Opening Rewards");
  3417. $.each(_pbags, function(bi, bag) {
  3418. bag.slots.forEach(function(slot) {
  3419. if (slot && _cRewardPat.test(slot.name)) {
  3420. if (slot.count >= 99)
  3421. slot.count = 99;
  3422. var reserve = getSetting('generalSettings', 'keepOneUnopened') ? 1 : 0;
  3423. for (i = 1; i <= (slot.count - reserve); i++) {
  3424. window.setTimeout(function() {
  3425. client.sendCommand('GatewayInventory_OpenRewardPack', slot.uid);
  3426. }, 500);
  3427. }
  3428. }
  3429. });
  3430. });
  3431. }
  3432.  
  3433. if (getSetting('generalSettings','openCelestialBox')) {
  3434. var _pbags = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags;
  3435. var _cRewardPat = /Invocation_Reward_Celestial_Artifact_Equipment_Box|Invocation_Reward_Celestial_Artifacts_Box|Invocation_Reward_Celestial_Enchantments_Box/;
  3436. console.log("Opening Celestial Boxes");
  3437. $.each(_pbags, function(bi, bag) {
  3438. bag.slots.forEach(function(slot) {
  3439. if (slot && _cRewardPat.test(slot.name)) {
  3440. if (slot.count >= 99)
  3441. slot.count = 99;
  3442.  
  3443. var reserve = getSetting('generalSettings', 'keepOneUnopened') ? 1 : 0;
  3444. for (i = 1; i <= (slot.count - reserve); i++) {
  3445. window.setTimeout(function() {
  3446. client.sendCommand('GatewayInventory_OpenRewardPack', slot.uid);
  3447. }, 500);
  3448. }
  3449. }
  3450. });
  3451. });
  3452. }
  3453.  
  3454. if (getSetting('generalSettings','openInvocation')) {
  3455. var _pbags = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags;
  3456. var _cRewardPat = /Invocation_Rp_Bag/;
  3457. console.log("Opening Invocation Rewards");
  3458. $.each(_pbags, function(bi, bag) {
  3459. bag.slots.forEach(function(slot) {
  3460. if (slot && _cRewardPat.test(slot.name)) {
  3461. window.setTimeout(function() {
  3462. client.sendCommand('GatewayInventory_OpenRewardPack', slot.uid);
  3463. }, 500);
  3464. }
  3465. });
  3466. });
  3467. }
  3468. // Check Vendor Options & Vendor matched items
  3469. vendorJunk();
  3470.  
  3471. // MAC-NW (endchanges)
  3472.  
  3473. // Updating statistics
  3474. console.log('Updating statistics');
  3475. var _stat = charStatisticsList[curCharName].general;
  3476. var _chardata = unsafeWindow.client.dataModel.model.ent.main.currencies;
  3477. _stat.lastVisit = Date.now();
  3478. _stat.gold = parseInt(_chardata.gold);
  3479. _stat.rad = parseInt(_chardata.roughdiamonds - refined_diamonds); // refined_diamonds: removing and adding manually to compensate for slow model update
  3480. _stat.diamonds = parseInt(_chardata.diamonds + refined_diamonds);
  3481. _stat.rBI = parseInt(_chardata.rawblackice);
  3482. _stat.BI = parseInt(_chardata.blackice);
  3483. _stat.refined[0] = parseInt(_chardata.diamondsconverted + refined_diamonds);
  3484. _stat.diamondsconvertleft = parseInt(_chardata.refineLimitLeft);
  3485. _stat.activeSlots = unsafeWindow.client.dataModel.model.ent.main.itemassignments.active;
  3486. _stat.celestial = parseInt(_chardata.celestial);
  3487. _stat.ardent = parseInt(_chardata.ardent);
  3488. //clearing
  3489. charStatisticsList[curCharName].trackedResources = [];
  3490. $.each(charStatisticsList[curCharName].tools, function(name, obj) {
  3491. obj.used = [];
  3492. obj.unused = [];
  3493. });
  3494. $.each(charStatisticsList[curCharName].professions, function(name, obj) {
  3495. obj.workersUsed = [];
  3496. obj.workersUnused = [];
  3497. obj.level = 0;
  3498. });
  3499.  
  3500. trackResources.forEach(function(resource, ri) {
  3501. charStatisticsList[curCharName].trackedResources[ri] = 0;
  3502. });
  3503.  
  3504. // Counting main inventory bags
  3505. charStatisticsList[curCharName].general.emptyBagSlots = 0;
  3506. unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags
  3507. .forEach(function (bag) {
  3508. bag.slots.forEach( function (slot, slotNum) {
  3509. if (!slot) {
  3510. charStatisticsList[curCharName].general.emptyBagSlots += 1;
  3511. return;
  3512. }
  3513. trackResources.forEach(function(resource, ri) {
  3514. if (slot.name === resource.name) {
  3515. if ((resource.unbound && !slot.bound && !slot.boundtoaccount) ||
  3516. (resource.btc && slot.bound && !slot.boundtoaccount) ||
  3517. (resource.bta && slot.boundtoaccount)) {
  3518. charStatisticsList[curCharName].trackedResources[ri] += slot.count;
  3519. }
  3520. }
  3521. });
  3522. });
  3523. });
  3524.  
  3525. // Counting the rest of the bags
  3526. trackResources.forEach(function(resource, ri) {
  3527. unsafeWindow.client.dataModel.model.ent.main.inventory.bags
  3528. .filter(function(bag) {
  3529. return ((["CraftingResources", "Overflow", "CraftingInventory"].indexOf(bag.bagid) > -1) || (resource.bank && bag.bagid == "Bank"));
  3530. })
  3531. .forEach(function(bag) {
  3532. bag.slots.forEach( function (slot, slotNum) {
  3533. if (slot && slot.name === resource.name) {
  3534. if ((resource.unbound && !slot.bound && !slot.boundtoaccount) ||
  3535. (resource.btc && slot.bound && !slot.boundtoaccount) ||
  3536. (resource.bta && slot.boundtoaccount)) {
  3537. charStatisticsList[curCharName].trackedResources[ri] += slot.count;
  3538. }
  3539. }
  3540. });
  3541. });
  3542. });
  3543. // Slot assignment
  3544. unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.forEach(function(slot, ix) {
  3545. if (!slot.islockedslot && slot.category !== "None") {
  3546. charStatisticsList[curCharName].slotUse[ix] = slot.category;
  3547. } else if (slot.islockedslot) {
  3548. charStatisticsList[curCharName].slotUse[ix] = "----"; // Locked Slot
  3549. } else {
  3550. charStatisticsList[curCharName].slotUse[ix] = "OPEN"; // Un-Assigned Slot!!!
  3551. }
  3552. });
  3553.  
  3554. // Workers and tools assignment and qty
  3555. unsafeWindow.client.dataModel.model.ent.main.inventory.assignedslots
  3556. .forEach(function(item) {
  3557. $.each(workerList, function(pName, pList) {
  3558. var index = pList.indexOf(item.name);
  3559. if (index > -1) {
  3560. charStatisticsList[curCharName].professions[pName].workersUsed[index] = item.count;
  3561. }
  3562. });
  3563. $.each(toolList, function(tName, tList) {
  3564. var index = tList.indexOf(item.name);
  3565. if (index > -1) {
  3566. charStatisticsList[curCharName].tools[tName].used[index] = item.count;
  3567. }
  3568. });
  3569. });
  3570.  
  3571. unsafeWindow.client.dataModel.model.ent.main.inventory.notassignedslots
  3572. .forEach(function(item) {
  3573. $.each(workerList, function(pName, pList) {
  3574. var index = pList.indexOf(item.name);
  3575. if (index > -1) {
  3576. charStatisticsList[curCharName].professions[pName].workersUnused[index] = item.count;
  3577. }
  3578. })
  3579. $.each(toolList, function(tName, tList) {
  3580. var index = tList.indexOf(item.name);
  3581. if (index > -1) {
  3582. charStatisticsList[curCharName].tools[tName].unused[index] = item.count;
  3583. }
  3584. })
  3585. });
  3586.  
  3587. // getting profession levels from currentrank, model has displayname, name, and category, using displayname (platesmithing)
  3588. // Must match the names in charStatisticsList[curCharName].professions
  3589. unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories
  3590. .forEach(function(prof) {
  3591. if (charStatisticsList[curCharName].professions[prof.displayname]) {
  3592. charStatisticsList[curCharName].professions[prof.displayname].level = prof.currentrank;
  3593. }
  3594. });
  3595.  
  3596. charStatisticsList[curCharName].general.nextTask = chartimers[curCharNum];
  3597. GM_setValue("statistics__char__" + curCharFullName , JSON.stringify(charStatisticsList[curCharName]));
  3598. updateCounters();
  3599.  
  3600. // TODO: refactor this block into function and merge with the similar in charSCA()
  3601. console.log("Switching Characters");
  3602. lastCharNum = curCharNum;
  3603.  
  3604. var chardelay,
  3605. chardate = null,
  3606. nowdate = new Date();
  3607. nowdate = nowdate.getTime();
  3608. var not_active = 0;
  3609. charNamesList.every( function (charName, idx) {
  3610. if (!charSettingsList[charName].general.active) {
  3611. not_active++;
  3612. return true;
  3613. }
  3614. if (chartimers[idx] != null) {
  3615. console.log("Date found for " + charName);
  3616. if (!chardate || chartimers[idx] < chardate) {
  3617. chardate = chartimers[idx];
  3618. curCharNum = idx;
  3619. chardelay = chardate.getTime() - nowdate - unsafeWindow.client.getServerOffsetSeconds() * 1000;
  3620. if (chardelay < delay.SHORT) {
  3621. chardelay = delay.SHORT;
  3622. }
  3623. }
  3624. return true;
  3625. }
  3626. curCharNum = idx;
  3627. chardelay = delay.SHORT;
  3628. chardate = null;
  3629. console.log("No date found for " + charName + ", switching now.");
  3630. return false; // = break;
  3631. });
  3632. // Change to optional ?
  3633. if (chardelay > delay.SHORT) chardelay = chardelay + (Math.random() + 0.3) * delay.DEFAULT;
  3634.  
  3635. curCharName = charNamesList[curCharNum];
  3636. curCharFullName = curCharName + "@" + loggedAccount;
  3637. failedTasksList = [];
  3638. failedProfiles = {};
  3639. var k = 9; while (k) {collectTaskAttempts[--k] = 0}; //collectTaskAttempts.fill(0);
  3640.  
  3641. if (getSetting('consolidationSettings','consolidate')) {
  3642. // Withdraw AD from the ZAX into the banker character
  3643. if (accountSettings.consolidationSettings.bankCharName == curCharName) {
  3644. window.setTimeout(cancelZaxOffer, delay.SHORT);
  3645. }
  3646. }
  3647.  
  3648. // Count AD & Gold
  3649. var curdiamonds = zaxdiamonds;
  3650. var curgold = 0;
  3651. charNamesList.forEach( function (charName, idx) {
  3652. if (chardiamonds[idx] != null) {
  3653. curdiamonds += Math.floor(chardiamonds[idx] / 50) * 50;
  3654. }
  3655.  
  3656. if (chargold[idx] != null) {
  3657. curgold += chargold[idx];
  3658. }
  3659. });
  3660.  
  3661. console.log("Next run for " + curCharName + " in " + parseInt(chardelay / 1000) + " seconds.");
  3662. $("#prinfopane").empty();
  3663. var ptext = $("<h3 class='promo-image copy-top prh3'>Professions Robot<br />Next task for " + curCharName + "<br /><span data-timer='" + chardate + "' data-timer-length='2'></span><br />Diamonds: " + curdiamonds.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + "<br />Gold: " + curgold + (pleaseBuy.length > 0 ? "<br />" : "") + pleaseBuy.join("<br />") + "</h3>")
  3664. .appendTo("#prinfopane");
  3665.  
  3666. charNamesList.forEach( function (charName, idx) {
  3667. if (leadershipSlots[charName] > new Date()) {
  3668. ptext.append("<div>Open Leadership slot for " + charName + "! (<span data-timer='" + leadershipSlots[charName] + "' data-timer-length='2'></span>) <span id='lsignore" + idx + "' " +
  3669. "style='cursor: pointer'>Ignore</span> / <span id='lsdone" + idx + "' " + "style='cursor: pointer'>Done</span></div>");
  3670. $("#lsignore" + idx).click( function () {
  3671. IgnoreButton(idx, false);
  3672. $(this).parent().empty();
  3673. });
  3674. $("#lsdone" + idx).click( function () {
  3675. IgnoreButton(idx, true);
  3676. $(this).parent().empty();
  3677. });
  3678. }
  3679. });
  3680. if (not_active == charNamesList.length) {
  3681. ptext.append("<div class='h_warning'>No Active chars found!</div>");
  3682. console.warn("No Active chars found!");
  3683. }
  3684. GM_setValue("curCharNum_" + loggedAccount, curCharNum);
  3685.  
  3686.  
  3687. var runSCAtime = !charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit
  3688. || ((charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit + (1000*60*60*24)) < Date.now())
  3689. || (charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit < accountSettings.generalSettings.SCADailyReset)
  3690. || (charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit < lastDailyResetTime.getTime());
  3691. var sca_setting = getSetting('generalSettings','runSCA');
  3692. var runSCA = (runSCAtime && (sca_setting !== 'never'));
  3693. runSCA = runSCA && (sca_setting === 'always' || (sca_setting === 'free' && chardelay > 7000)); // More than 7 seconds for the next char swap
  3694. console.log("Check if need to run SCA for " + charNamesList[lastCharNum] + ": " + sca_setting + " " + runSCAtime);
  3695. if (runSCA) {
  3696. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')' + "/adventures");
  3697. processCharSCA(lastCharNum);
  3698. return;
  3699. }
  3700. dfdNextRun.resolve(chardelay);
  3701. }
  3702. /**
  3703. * Waits for the loading symbol to be hidden.
  3704. *
  3705. * @return {Deferred} A jQuery defferred object that will be resolved when loading is complete
  3706. */
  3707.  
  3708. function WaitForLoad() {
  3709. return WaitForState("");
  3710. }
  3711. /**
  3712. * Creates a deferred object that will be resolved when the state is reached
  3713. *
  3714. * @param {string} query The query for the state to wait for
  3715. * @return {Deferred} A jQuery defferred object that will be resolved when the state is reached
  3716. */
  3717.  
  3718. function WaitForState(query) {
  3719. var dfd = $.Deferred();
  3720. window.setTimeout(function() {
  3721. AttemptResolve(query, dfd);
  3722. }, delay.SHORT); // Doesn't work without a short delay
  3723. return dfd;
  3724. }
  3725.  
  3726. function WaitForNotState(query) {
  3727. var dfd = $.Deferred();
  3728. window.setTimeout(function() {
  3729. AttemptNotResolve(query, dfd);
  3730. }, delay.SHORT); // Doesn't work without a short delay
  3731. return dfd;
  3732. }
  3733. /**
  3734. * Will continually test for the given query state and resolve the given deferred object when the state is reached
  3735. * and the loading symbol is not visible
  3736. *
  3737. * @param {string} query The query for the state to wait for
  3738. * @param {Deferred} dfd The jQuery defferred object that will be resolved when the state is reached
  3739. */
  3740.  
  3741. function AttemptResolve(query, dfd) {
  3742. if ((query === "" || $(query).length) && $("div.loading-image:visible").length === 0) {
  3743. dfd.resolve();
  3744. } else {
  3745. window.setTimeout(function() {
  3746. AttemptResolve(query, dfd);
  3747. }, delay.SHORT); // Try again in a little bit
  3748. }
  3749. }
  3750. /* Opposite of AttemptResolve, will try to resolve query until it doesn't resolve. */
  3751.  
  3752. function AttemptNotResolve(query, dfd) {
  3753. if (!$(query).length && $("div.loading-image:visible").length === 0) {
  3754. dfd.resolve();
  3755. } else {
  3756. window.setTimeout(function() {
  3757. AttemptNotResolve(query, dfd);
  3758. }, delay.SHORT); // Try again in a little bit
  3759. }
  3760. }
  3761. /**
  3762. * The main process loop:
  3763. * - Determine which page we are on and call the page specific logic
  3764. * - When processing is complete, process again later
  3765. * - Use a short timer when something changed last time through
  3766. * - Use a longer timer when waiting for tasks to complete
  3767. */
  3768.  
  3769. function process() {
  3770. waitingNextChar = false;
  3771. // Calculating last daily reset time
  3772. var today = new Date();
  3773. var todayRest = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 10,0,0));
  3774. if (today > todayRest) lastDailyResetTime = todayRest;
  3775. else lastDailyResetTime = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate()-1, 10,0,0));
  3776. // Make sure the settings button exists
  3777. addSettings();
  3778.  
  3779. // Enable/Disable the unconditional page reload depending on settings
  3780. loading_reset = scriptSettings.general.scriptAutoReload;
  3781. // Check if timer is paused
  3782. s_paused = scriptSettings.general.scriptPaused; // let the Page Reloading function know the pause state
  3783. if (s_paused) {
  3784. // Just continue later - the deferred object is still set and nothing will resolve it until we get past this point
  3785. timerHandle = window.setTimeout(function() {
  3786. process();
  3787. }, delay.DEFAULT);
  3788. return;
  3789. }
  3790.  
  3791. // Check for Gateway down
  3792. if (window.location.href.indexOf("gatewaysitedown") > -1) {
  3793. // Do a long delay and then retry the site
  3794. console.log("Gateway down detected - relogging in " + (delay.MINS / 1000) + " seconds");
  3795. window.setTimeout(function() {
  3796. unsafeWindow.location.href = current_Gateway;
  3797. }, delay.MINS);
  3798. return;
  3799. }
  3800.  
  3801. // Check for login or account guard and process accordingly
  3802. var currentPage = GetCurrentPage();
  3803. if (currentPage === "Login") {
  3804. page_LOGIN();
  3805. return;
  3806. } else if (currentPage === "Guard") {
  3807. page_GUARD();
  3808. return;
  3809. }
  3810.  
  3811. if (pleaseBuy.length == 0) {
  3812. pleaseBuy['ts'] = Date.now() + 15*60*1000;
  3813. } else if ((pleaseBuy['ts']||0) < Date.now()) {
  3814. pleaseBuy.shift();
  3815. pleaseBuy['ts'] = Date.now() + 15*60*1000;
  3816. }
  3817. window.setTimeout(function() {
  3818. loginProcess();
  3819. }, delay.SHORT);
  3820.  
  3821. // Continue again later
  3822. dfdNextRun.done(function(delayTimer) {
  3823. waitingNextChar = true;
  3824. dfdNextRun = $.Deferred();
  3825. timerHandle = window.setTimeout(function() {
  3826. process();
  3827. }, typeof delayTimer !== 'undefined' ? delayTimer : delay.DEFAULT);
  3828. });
  3829. //console.log("Process Timer Handle: " + timerHandle);
  3830. }
  3831.  
  3832. function loginProcess() {
  3833. // Get logged on account details
  3834. var accountName;
  3835. try {
  3836. accountName = unsafeWindow.client.dataModel.model.loginInfo.publicaccountname;
  3837. } catch(e) {
  3838. // TODO: Use callback function
  3839. window.setTimeout(function() {
  3840. loginProcess();
  3841. }, delay.SHORT);
  3842. return;
  3843. }
  3844.  
  3845. // Check if timer is paused again to avoid starting new task between timers
  3846. s_paused = scriptSettings.general.scriptPaused; // let the Page Reloading function know the pause state
  3847. if (s_paused) {
  3848. // Just continue later - the deferred object is still set and nothing will resolve it until we get past this point
  3849. timerHandle = window.setTimeout(function() {
  3850. process();
  3851. }, delay.DEFAULT);
  3852. return;
  3853. }
  3854.  
  3855. if (accountName) {
  3856. if (!loggedAccount || (loggedAccount != accountName)) {
  3857. loggedAccount = accountName;
  3858. console.log("Loading settings for " + accountName);
  3859.  
  3860. var tempAccountSetting;
  3861. try {
  3862. tempAccountSetting = JSON.parse(GM_getValue("settings__account__" + accountName, "{}"));
  3863. } catch (e) {
  3864. tempAccountSetting = null;
  3865. }
  3866. if (!tempAccountSetting) {
  3867. console.log('Account settings couldn\'t be retrieved, loading defaults.');
  3868. tempAccountSetting = {};
  3869. };
  3870. accountSettings = $.extend(true, {}, defaultAccountSettings, tempAccountSetting);
  3871.  
  3872. console.log("Loading character list");
  3873. charNamesList = [];
  3874. client.dataModel.model.loginInfo.choices.forEach(function(char) {
  3875. if (char.shardname == "Dungeon") return;
  3876. charNamesList.push(char.name);
  3877. });
  3878. console.log("Found names: " + charNamesList);
  3879.  
  3880. charNamesList.forEach(function(charName) {
  3881. console.log("Loading settings for " + charName);
  3882.  
  3883. var tempCharsSetting;
  3884. try {
  3885. tempCharsSetting = JSON.parse(GM_getValue("settings__char__" + charName + "@" + accountName, "{}"));
  3886. } catch (e) {
  3887. tempCharsSetting = null;
  3888. }
  3889. if (!tempCharsSetting) {
  3890. tempCharsSetting = {};
  3891. console.log('Character settings couldn\'t be retrieved, loading defaults.');
  3892. };
  3893. charSettingsList[charName] = $.extend(true, {}, defaultCharSettings, tempCharsSetting);
  3894. charSettingsList[charName].charName = charName; // for compatibility
  3895.  
  3896. console.log("Loading saved statistics for " + charName);
  3897. var tempCharsStatistics;
  3898. try {
  3899. tempCharsStatistics = JSON.parse(GM_getValue("statistics__char__" + charName + "@" + accountName, "{}"));
  3900. } catch (e) {
  3901. tempCharsStatistics = null;
  3902. }
  3903. if (!tempCharsStatistics) {
  3904. console.log('Character statistics couldn\'t be retrieved, loading defaults.');
  3905. tempCharsStatistics = {};
  3906. };
  3907. charStatisticsList[charName] = $.extend(true, {}, defaultCharStatistics, tempCharsStatistics);
  3908. })
  3909. if (scriptSettings.general.saveCharNextTime)
  3910. charNamesList.forEach( function(name, idx) {
  3911. chartimers[idx] = (new Date(charStatisticsList[name].general.nextTask));
  3912. chargold[idx] = charStatisticsList[name].general.gold;
  3913. chardiamonds[idx] = charStatisticsList[name].general.diamonds;
  3914. });
  3915. // Adding the Account and character settings / info to the UI
  3916. addSettings();
  3917. }
  3918.  
  3919. // load current character position and values
  3920. curCharNum = GM_getValue("curCharNum_" + accountName, 0);
  3921. curCharName = charNamesList[curCharNum];
  3922. curCharFullName = curCharName + '@' + accountName;
  3923.  
  3924. if (unsafeWindow.client.getCurrentCharAtName() != curCharFullName) {
  3925. loadCharacter(curCharFullName);
  3926. return;
  3927. }
  3928.  
  3929. // Try to start tasks
  3930. if (processCharacter()) {
  3931. return;
  3932. }
  3933.  
  3934. // Switch characters as necessary
  3935. switchChar();
  3936. }
  3937. }
  3938.  
  3939. function loadCharacter(charname) {
  3940. // Load character and restart next load loop
  3941. console.log("Loading gateway script for", charname);
  3942. if (unsafeWindow.location.hash != "#char(" + encodeURI(charname) + ")/professions") {
  3943. unsafeWindow.location.hash = "#char(" + encodeURI(charname) + ")/professions";
  3944. }
  3945. unsafeWindow.client.dataModel.loadEntityByName(charname);
  3946.  
  3947. try {
  3948. var testChar = unsafeWindow.client.dataModel.model.ent.main.name;
  3949. unsafeWindow.client.dataModel.fetchVendor('Nw_Gateway_Professions_Merchant');
  3950. console.log("Loaded datamodel for", charname);
  3951. } catch (e) {
  3952. // TODO: Use callback function
  3953. window.setTimeout(function() {
  3954. loadCharacter(charname);
  3955. }, delay.SHORT);
  3956. return;
  3957. }
  3958.  
  3959. // MAC-NW -- AD Consolidation -- Banker Withdraw Section
  3960. if (getSetting('consolidationSettings','consolidate')) {
  3961.  
  3962. unsafeWindow.client.dataModel.fetchExchangeAccountData();
  3963.  
  3964. try {
  3965. var testExData = unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders;
  3966. console.log("Loaded zen exchange data for", charname);
  3967. } catch (e) {
  3968. // TODO: Use callback function
  3969. window.setTimeout(function() {
  3970. loadCharacter(charname);
  3971. }, delay.SHORT);
  3972. return;
  3973. }
  3974.  
  3975. // First check if there's anything we have to withdraw and claim it
  3976. // Sometimes the system will literally overwrite canceled and unclaimed orders and return AD to that character
  3977. // Example: if you cancel 5 orders, don't claim them, then create another order and cancel it, that last order
  3978. // will overwrite one of your previous orders and return the AD to that other character
  3979. var exchangeDiamonds = parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  3980. if (exchangeDiamonds > 0) {
  3981. claimZaxOffer();
  3982. }
  3983.  
  3984. // Domino effect: first check if we're out of space for new offers
  3985. if (unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.length == 5) {
  3986. // Domino effect: then withdraw as much offers as we can and claim the diamonds
  3987. window.setTimeout(cancelZaxOffer, delay.SHORT);
  3988. }
  3989.  
  3990. WaitForState("button.closeNotification").done(function() {
  3991. $("button.closeNotification").click();
  3992. });
  3993.  
  3994. unsafeWindow.client.dataModel.loadEntityByName(charname);
  3995.  
  3996. } else {
  3997. console.log("Zen Exchange AD transfer not enabled. Skipping ZAX Posting..");
  3998. }
  3999. // MAC-NW
  4000.  
  4001. // MAC-NW -- Moved Professoin Merchant loading here with testing/waiting to make sure it loads
  4002. try {
  4003. var testProfMerchant = client.dataModel.model.vendor.items;
  4004. console.log("Loaded profession merchant for", charname);
  4005. } catch (e) {
  4006. // TODO: Use callback function
  4007. window.setTimeout(function() {
  4008. loadCharacter(charname);
  4009. }, delay.SHORT);
  4010. return;
  4011. }
  4012.  
  4013. // Check Vendor Options & Vendor matched items
  4014. vendorJunk();
  4015.  
  4016. dfdNextRun.resolve();
  4017. }
  4018.  
  4019. function addSettings() {
  4020. var setEventHandlers = false;
  4021. if (!($("#settingsButton").length)) {
  4022. // Add the required CSS
  4023. AddCss("\
  4024. #settingsButton{border-bottom: 1px solid rgb(102, 102, 102); border-right: 1px solid rgb(102, 102, 102); background: none repeat scroll 0% 0% rgb(238, 238, 238); display: block; position: fixed; overflow: auto; right: 0px; top: 0px; padding: 3px; z-index: 1000;}\
  4025. #pauseButton{border-bottom: 1px solid rgb(102, 102, 102); border-right: 1px solid rgb(102, 102, 102); background: none repeat scroll 0% 0% rgb(238, 238, 238); display: block; position: fixed; overflow: auto; right: 23px; top: 0px; padding: 3px; z-index: 1000;}\
  4026. #manualButton{border-bottom: 1px solid rgb(102, 102, 102); border-right: 1px solid rgb(102, 102, 102); background: none repeat scroll 0% 0% rgb(238, 238, 238); display: block; position: fixed; overflow: auto; right: 46px; top: 0px; padding: 3px; z-index: 1000;}\
  4027. #settingsPanel{position: fixed; overflow: auto; right: 0px; top: 0px; width: 700px;max-height:100%;font: 12px sans-serif; text-align: left; display: block; z-index: 1001;}\
  4028. #settings_title{font-weight: bolder; background: none repeat scroll 0% 0% rgb(204, 204, 204); border-bottom: 1px solid rgb(102, 102, 102); padding: 3px;}\
  4029. #settingsPanelButtonContainer {background: none repeat scroll 0% 0% rgb(204, 204, 204); border-top: 1px solid rgb(102, 102, 102);padding: 3px;text-align:center} \
  4030. #charSettingsAccordion h3.inactive {color: LightGray ;}\
  4031. #charPanel {width:98%;max-height:550px;overflow:auto;display:block;padding:3px;}\
  4032. .inventory-container {float: left; clear: none; width: 270px; margin-right: 20px;}\
  4033. #prinfopane {position: fixed; top: 5px; left: 200px; display: block; z-index: 1000;}\
  4034. .prh3 {padding: 5px; height: auto!important; width: auto!important; background-color: rgba(0, 0, 0, 0.7);}\
  4035. .custom-radio{width:16px;height:16px;display:inline-block;position:relative;z-index:1;top:3px;background-color:#fff;margin:0 4px 0 2px;}\
  4036. .custom-radio:hover{background-color:black;} .custom-radio.selected{background-color:red;} .custom-radio-selected-text{color:darkred;font-weight:500;}\
  4037. .custom-radio input[type='radio']{margin:1px;position:absolute;z-index:2;cursor:pointer;outline:none;opacity:0;_nofocusline:expression(this.hideFocus=true);-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);filter:alpha(opacity=0);-khtml-opacity:0;-moz-opacity:0}\
  4038. .charSettingsTab { overflow: auto; }\
  4039. .charSettingsTab div { overflow: auto; }\
  4040. #rcounters ul li span { display: inline-block; min-width: 125px; }\
  4041. #settingsPanel table { width: 100%; }\
  4042. .ranked:nth-child(6n+2) { color: purple; } .ranked:nth-child(6n+3) { color: blue; } .ranked:nth-child(6n+4) { color: green } \
  4043. .ranked2:nth-child(6n+1) { color: purple; } .ranked2:nth-child(6n+2) { color: blue; } .ranked2:nth-child(6n+3) { color: green } \
  4044. .tranked:nth-child(4n+2) { color: purple; } .tranked:nth-child(4n+3) { color: blue; } .tranked:nth-child(4n) { color: green } \
  4045. .tranked2:nth-child(4n+1) { color: purple; } .tranked2:nth-child(4n+2) { color: blue; } .tranked2:nth-child(4n+3) { color: green } \
  4046. table.professionRanks { border-collapse: collapse; } \
  4047. table.professionRanks td { height: 14px; } \
  4048. td.ranked2, td.tranked2 { border-bottom: solid 1px #555; border-top: dashed 1px #888 }\
  4049. #resource_tracker {overflow-x:auto;}\
  4050. table.withRotation td.rotate, table.withRotation th.rotate { height: 125px; } \
  4051. table.withRotation td.rotate, table.withRotation th.rotate > div { transform: translate(0, 30px) rotate(290deg); width: 30px; } \
  4052. table.withRotation td.rotate, table.withRotation th.rotate > div > span { border-bottom: 1px solid #ccc; padding: 5px 10px; white-space: nowrap; } \
  4053. table.withRotation td { border-right: 1px solid #ccc;} \
  4054. input[type='checkbox'].settingsInput { margin: 5px 10px 5px 5px; }\
  4055. input.settingsInput { margin: 5px 5px; }\
  4056. label.settingsLabel { margin: 5px 5px; min-width: 150px; display: inline-block; }\
  4057. .inputSaved { color: #66FF66; }\
  4058. .inputSaved:after { content: \"\"; width: 8px; height: 8px; display: inline-block; background-color: #66FF66; position:relative; right: 10px; }\
  4059. .h_warning { color: red !important; }\
  4060. label.customProfiles {min-width: 150px; }\
  4061. select.customProfiles { margin: 10px }\
  4062. textarea.customProfiles { width: 500px; height: 350px; margin: 10px 0; }\
  4063. .custom_profiles_delete { height: 16px; } #custom__profiles__viewbase_btn { height: 16px; } .custom_profiles_view {height: 16px; margin: 0 4px; }\
  4064. .custom_resources_delete { height: 16px; } .customResources input:not([type='checkbox']) { margin: 3px 10px } .customResources label { margin-right: 10px; }\
  4065. .customResources input[type='checkbox'] { margin-right: 10px } .customResources button { margin: 0 10px } div.customResources { margin: 10px 0;} \
  4066. #settingsPanel table {border-collapse: collapse; }\
  4067. tr.totals > td { border-top: 1px solid grey; padding-top: 3px; color: #000080 } \
  4068. .rarity_Gold {color: blue; } .rarity_Silver {color: green; } .rarity_Special {color: purple; } \
  4069. #dialog-inventory { overflow-y: scroll; font: 10px Arial; } #dialog-inventory table { width: 100% } #dialog-inventory table th { text-align: left; font-weight: bold; }\
  4070. .slt_None {color: red;} .slt_Lead {color: blue;} .slt_Alch {color: green;} .slt_Jewe {color: gold;} .slt_Leat {color: brown;}\
  4071. #copy_settings_to { width: 200px; height: 350px; margin: 5px 0;} #copy_settings_from { margin: 5px 0;}\
  4072. ");
  4073.  
  4074. // Add settings panel to page body
  4075. $("body").append(
  4076. '<div id="settingsPanel" class="ui-widget-content">\
  4077. <div id="settings_title">\
  4078. <span class="ui-icon ui-icon-wrench" style="float: left;"></span>\
  4079. <span id="settings_close" class="ui-icon ui-icon-closethick" title="Click to hide preferences" style="float: right; cursor: pointer; display: block;"\></span>\
  4080. <span style="margin:3px">Settings (version ' + microVersion + ')</span>\
  4081. </div>\
  4082. <div id="script_settings"><ul></ul></div>\
  4083. <div id="account_settings">\
  4084. <div id="main_tabs"><ul></ul></div></div>\
  4085. <div id="account_info">\
  4086. <div id="info_tabs"><ul></ul></div></div>\
  4087. <div id="char_settings"></div>\
  4088. </div>');
  4089. // Add open settings button to page
  4090. $("body").append('<div id="settingsButton"><span class="ui-icon ui-icon-wrench" title="Click to show preferences" style="cursor: pointer; display: block;"></span></div>');
  4091. $("#settingsPanel").hide();
  4092. $("#settingsButton").click(function() {
  4093. $("#settingsButton").hide();
  4094. $("#pauseButton").hide();
  4095. $("#manualButton").hide();
  4096. $("#settingsPanel").show();
  4097. });
  4098.  
  4099. $("body").append(audioFile());
  4100.  
  4101. // Add pause button to page
  4102. $("body").append('<div id="pauseButton"></div>');
  4103. displayPause();
  4104. $("#pauseButton").click( function () {
  4105. PauseSettings();
  4106. });
  4107.  
  4108. // Add manual button to page
  4109. $("body").append('<div id="manualButton"></div>');
  4110. displayManual();
  4111. $("#manualButton").click( function () {
  4112. ManualSettings();
  4113. });
  4114. // Add info pane
  4115. $("body").append("<div id='prinfopane' class='header-newrelease'>");
  4116.  
  4117. $('#update-content-inventory-bags-0 .bag-header').waitUntilExists(function() {
  4118. if ($('#update-content-inventory-bags-0 .bag-header div').length && !$('#update-content-inventory-bags-0 .bag-header div.autovendor').length) {
  4119. $('#update-content-inventory-bags-0 .bag-header').append('<div class="input-field button light autovendor"><div class="input-bg-left"></div><div class="input-bg-mid"></div><div class="input-bg-right"></div><button id="nwprofs-autovendor">Auto Vendor</button></div>');
  4120. $("button#nwprofs-autovendor").on("click", vendorJunk);
  4121. }
  4122. });
  4123.  
  4124.  
  4125. $("#settings_close,settings_cancel").click(function() {
  4126. $("#settingsButton").show();
  4127. $("#pauseButton").show();
  4128. $("#manualButton").show();
  4129. $("#settingsPanel").hide();
  4130. });
  4131. //$('#script_settings').html('');
  4132. var tab = addTab("#script_settings", tr('tab.scriptSettings'));
  4133. addInputsUL(tab, 'script', 'main');
  4134. tab = addTab("#script_settings", tr('tab.advanced'));
  4135. var thtml = "<button id='reset_settings_btn'>Reset ALL Settings</button><br /><br />";
  4136. thtml += "Must be logged in and at the correct charactar to list it's items.<br />";
  4137. thtml += "<button id='list_inventory_btn'>List Inventory</button><br /><br />";
  4138. thtml += "List settings (display all the configuration and obscure char names to char 1,2... and banker)<br />";
  4139. thtml += "<button id='list_settings_btn'>Dump settings </button><br /><br />";
  4140. tab.html(thtml);
  4141.  
  4142. $('#reset_settings_btn').button();
  4143. $('#reset_settings_btn').click(function() {
  4144. window.setTimeout(function() {
  4145. GM_setValue("settings__char__" + c_name + "@" + loggedAccount, JSON.stringify(charSettingsList[c_name]));
  4146. console.log("Saved char_task setting: " + scope + "." + group + "." + name + "." + sub_name + " For: " + c_name);
  4147. var keys = GM_listValues();
  4148. for (i = 0; i < keys.length; i++) {
  4149. var key = keys[i];
  4150. GM_deleteValue(key);
  4151. }
  4152. GM_setValue("script_version", scriptVersion);
  4153. window.setTimeout(function() {
  4154. unsafeWindow.location.href = current_Gateway;
  4155. }, 0);
  4156. }, 0);
  4157. });
  4158.  
  4159. $('#list_inventory_btn').button();
  4160. $('#list_inventory_btn').click(function() {
  4161. var _inventory;
  4162. try {
  4163. _inventory = client.dataModel.model.ent.main.inventory;
  4164. }
  4165. catch (e) {
  4166. var str = "Inventory could not be loaded, make sure you are logged in and at the correct character."
  4167. $('<div id="dialog-error-inventory" title="Error loading inventory">' + str + '</div>').dialog({
  4168. resizable: true,
  4169. width: 500,
  4170. modal: false,
  4171. });
  4172. return;
  4173. }
  4174. var inv_tbl_head = "<table><tr><th>Slot #</th><th>Qty</th><th>Item Name</th><th>Rarity</th><th>Bound</th></tr>";
  4175. var str = '';
  4176. var slotCnt = 0;
  4177. _inventory.playerbags.forEach(function (bag) {
  4178. str += '<div>' + bag.name + '</div>';
  4179. str += inv_tbl_head;
  4180. bag.slots.forEach( function (slot, slotNum) {
  4181. if (!slot) return;
  4182. slotCnt++;
  4183. str += '<tr><td>' + slotNum +
  4184. '</td><td>' + slot.count + '</td><td class=" rarity_' + slot.rarity + '">' + slot.name +
  4185. '</td><td>' + slot.rarity + '</td><td>' + (slot.bound || slot.boundtoaccount) + '</td></tr>';
  4186. });
  4187. str += '</table><br/>';
  4188. });
  4189.  
  4190.  
  4191. _inventory.bags.filter(function(bag) {
  4192. return (["CraftingResources", "Overflow", "CraftingInventory", "Bank"].indexOf(bag.bagid) != -1);
  4193. })
  4194. .forEach(function(bag) {
  4195. str += '<div>' + bag.bagid + '</div>';
  4196. str += inv_tbl_head;
  4197. bag.slots.forEach( function (slot, slotNum) {
  4198. if (!slot) return;
  4199. str += '<tr><td>' + slotNum +
  4200. '</td><td>' + slot.count + '</td><td class=" rarity_' + slot.rarity + '">' + slot.name +
  4201. '</td><td>' + slot.rarity + '</td><td>' + (slot.bound || slot.boundtoaccount) + '</td></tr>';
  4202. });
  4203. str += '</table><br />';
  4204. });
  4205. $('<div id="dialog-inventory" title="Inventory listing">' + str + '</div>').dialog({
  4206. resizable: true,
  4207. width: 550,
  4208. height: 550,
  4209. modal: false,
  4210. });
  4211. });
  4212.  
  4213. $('#list_settings_btn').button();
  4214. $('#list_settings_btn').click(function() {
  4215. var str = 'Script Settings (version ' + microVersion + ')\n';
  4216. var tempObj;
  4217. tempObj = $.extend(true, {}, scriptSettings);
  4218. tempObj.autoLoginAccount = "";
  4219. tempObj.autoLoginPassword = "";
  4220. str += '' + JSON.stringify(tempObj,null,4) + '\n';
  4221. str += 'Account Settings\n';
  4222. tempObj = $.extend(true, {}, accountSettings);
  4223. if (accountSettings.consolidationSettings.bankCharName) {
  4224. var bankIndex = charNamesList.indexOf(accountSettings.consolidationSettings.bankCharName);
  4225. if (bankIndex == -1) str += "Bank set but not found in charNamesList\n";
  4226. else str += "Bank set and found at index:" + bankIndex + "\n";
  4227. tempObj.consolidationSettings.bankCharName = "Char " + bankIndex;
  4228. }
  4229. str += '' + JSON.stringify(tempObj,null,4) + '\n';
  4230. //str += '<pre>' + JSON.stringify(tempObj,null,4) + '</pre>';
  4231.  
  4232. str += 'Char Settings\n';
  4233. charNamesList.forEach(function (charName, idx){
  4234. tempObj = $.extend(true, {}, charSettingsList[charName]);
  4235. str += 'Char ' + idx + '\n';
  4236. tempObj.charName = "Char " + idx;
  4237. str += '' + JSON.stringify(tempObj,null,4) + '\n';
  4238. })
  4239.  
  4240. $('<div id="dialog-settings" title="Settings listing"><textarea style=" width: 98%; height: 98%;">' + str + '</textarea></div>').dialog({
  4241. resizable: true,
  4242. width: 550,
  4243. height: 750,
  4244. modal: false,
  4245. });
  4246. });
  4247.  
  4248. // Custom profiles
  4249. tab = addTab("#script_settings", tr('tab.customProfiles'));
  4250. var temp_html = '';
  4251. temp_html += '<div><label class="customProfiles">Task name: </label><select class=" custom_input customProfiles " id="custom_profiles_taskname">';
  4252. tasklist.forEach(function(task) {
  4253. if (!task.taskActive) return;
  4254. temp_html += '<option value="' + task.taskListName + '">' + task.taskListName + '</option>';
  4255. })
  4256. temp_html += '</select>';
  4257. temp_html += '<label class="customProfiles">Base Profile: </label><select class=" custom_input customProfiles " id="custom__profiles__baseprofile"></select>';
  4258. temp_html += '<button id="custom__profiles__viewbase_btn"></button>';
  4259. temp_html += '</div>';
  4260. temp_html += 'Input must be valid JSON: double quotes on property names & no trailing commas. <br /> Use any online validator to easily find errors. <br /> like: http://jsonformatter.curiousconcept.com/ <br /> http://json.parser.online.fr/';
  4261. temp_html += '<div><textarea id="custom_profile_textarea" class=" custom_input customProfiles ">';
  4262. temp_html += '{\n "profileName": "Example",\n "isProfileActive": true,\n "level": {\n "0": ["Alchemy_Tier0_Intro_1"],\n "1": ["Alchemy_Tier1_Refine_Basic", "Alchemy_Tier1_Gather_Components"]\n }\n}';
  4263. temp_html += '</textarea></div>';
  4264. temp_html += '<div><button id="custom__profiles__import_btn">Import</button></div>';
  4265. temp_html += '<table><tr><th>#</th><th>Task Name</th><th>Base Profile</th><th>Profile Name</th><th><th></tr>';
  4266. customProfiles.forEach(function (cProfile, idx) {
  4267. temp_html += '<tr><td>' + (idx+1) + '</td>';
  4268. temp_html += '<td>' + cProfile.taskName + '</td>';
  4269. temp_html += '<td>' + cProfile.baseProfile + '</td>';
  4270. if (typeof cProfile.profile === 'object')
  4271. temp_html += '<td>' + cProfile.profile.profileName + '</td>';
  4272. temp_html += '<td><button class="custom_profiles_view" value=' + idx + '></button><button class="custom_profiles_delete" value=' + idx + '></button></td></tr>';
  4273. });
  4274. temp_html += '</table>';
  4275. tab.html(temp_html);
  4276. $( ".custom_profiles_view" ).button({
  4277. icons: {
  4278. primary: "ui-icon-zoomin"
  4279. },
  4280. text: false
  4281. });
  4282. $( ".custom_profiles_view" ).click( function(e) {
  4283. var pidx = $(this).val();
  4284. var str = "Task name : " + customProfiles[pidx].taskName + "\n";
  4285. str += "Base Profile : " + customProfiles[pidx].baseProfile + "\n"
  4286. str += "Profile : \n\n";
  4287. str += JSON.stringify(customProfiles[pidx].profile,null,4);
  4288.  
  4289. $('<div id="dialog-display-custom-profile" title="Custom profile"><textarea style=" width: 98%; height: 98%;">' + str + '</textarea></div>').dialog({
  4290. resizable: true,
  4291. width: 550,
  4292. height: 750,
  4293. modal: false,
  4294. });
  4295. });
  4296.  
  4297. $( ".custom_profiles_delete" ).button({
  4298. icons: {
  4299. primary: "ui-icon-trash"
  4300. },
  4301. text: false
  4302. });
  4303. $( ".custom_profiles_delete" ).click( function(e) {
  4304. var pidx = $(this).val();
  4305. customProfiles.splice(pidx,1);
  4306. GM_setValue("custom_profiles", JSON.stringify(customProfiles));
  4307. console.log('Deleted custom profile ' + pidx);
  4308. window.setTimeout(function() {
  4309. unsafeWindow.location.href = current_Gateway;
  4310. }, 0);
  4311. });
  4312. // Set up the advanced slot selects
  4313. $("#custom_profiles_taskname").change(function(e) {
  4314. var _taskname = $(this).val();
  4315. var _profiles = tasklist.filter(function(task) {
  4316. return task.taskListName == _taskname;
  4317. })[0].profiles.filter(function(profile) {
  4318. return profile.isProfileActive
  4319. });
  4320. var profileSelect = $("#custom__profiles__baseprofile").html("");
  4321. profileSelect.append($("<option />").val(null).text("new"));
  4322. _profiles.forEach(function(profile) {
  4323. profileSelect.append($("<option />").val(profile.profileName).text(profile.profileName));
  4324. });
  4325. });
  4326. $("#custom_profiles_taskname").change();
  4327.  
  4328. $('#custom__profiles__viewbase_btn').button({
  4329. icons: {
  4330. primary: "ui-icon-zoomin"
  4331. },
  4332. text: false
  4333. });
  4334. $('#custom__profiles__viewbase_btn').click(function() {
  4335. var _taskName = $("#custom_profiles_taskname").val();
  4336. var _baseProfile = $("#custom__profiles__baseprofile").val();
  4337. var _profiles = tasklist.filter(function(task) {
  4338. return task.taskListName == _taskName;
  4339. })[0].profiles.filter(function(profile) {
  4340. return profile.profileName === _baseProfile;
  4341. });
  4342. var str = JSON.stringify(_profiles,null,4);
  4343.  
  4344. $('<div id="dialog-display-profile" title="Profile"><textarea style=" width: 98%; height: 98%;">' + str + '</textarea></div>').dialog({
  4345. resizable: true,
  4346. width: 550,
  4347. height: 750,
  4348. modal: false,
  4349. });
  4350. });
  4351.  
  4352.  
  4353. $('#custom__profiles__import_btn').button();
  4354. $('#custom__profiles__import_btn').click(function() {
  4355. window.setTimeout(function() {
  4356. var taskName = $("#custom_profiles_taskname").val();
  4357. var baseProfile = $("#custom__profiles__baseprofile").val();
  4358. var profile;
  4359. try {
  4360. profile = JSON.parse($('#custom_profile_textarea').val());
  4361. }
  4362. catch (e) {
  4363. alert("Failed to parse custom profile. JSON not valid.");
  4364. return;
  4365. }
  4366. customProfiles.push({ taskName: taskName, baseProfile: baseProfile, profile: profile });
  4367. GM_setValue("custom_profiles", JSON.stringify(customProfiles));
  4368. window.setTimeout(function() {
  4369. unsafeWindow.location.href = current_Gateway;
  4370. }, 0);
  4371. }, 0);
  4372. });
  4373. //Tracked resources tab
  4374. tab = addTab("#script_settings", tr('tab.trackedResources'));
  4375. var temp_html = 'Insert human readable resource name and NeverWinter gateway internal resource name (from Inventory Listing)';
  4376. temp_html += '<div class="customResources"><label>Resource name: </label>';
  4377. temp_html += '<input type="text" name="" id="custom_resource_fname" \>';
  4378. temp_html += '<label>Inventory name: </label>';
  4379. temp_html += '<input type="text" name="" id="custom_resource_name" \>';
  4380. temp_html += '<br />'
  4381. temp_html += '<input type="checkbox" name="" id="custom_resource_countbank" \><label>Count in bank</label>';
  4382. temp_html += '<input type="checkbox" name="" id="custom_resource_unbound" checked="checked" \><label>unbound </label>';
  4383. temp_html += '<input type="checkbox" name="" id="custom_resource_btc" checked="checked" \><label>BtC </label>';
  4384. temp_html += '<input type="checkbox" name="" id="custom_resource_bta" checked="checked" \><label>BtA </label>';
  4385. temp_html += '<button id="custom_resources_add_btn">Add</button>';
  4386. temp_html += '</div>';
  4387. temp_html += '<table><tr><th>#</th><th>Resource Name</th><th>bank</th><th>unbound</th><th>BtC</th><th>BtA</th><th><th></tr>';
  4388.  
  4389. trackResources.forEach(function (trRes, idx) {
  4390. temp_html += '<tr><td>' + (idx+1) + '</td>';
  4391. temp_html += '<td>' + trRes.fname + '</td>';
  4392. temp_html += '<td><span class=" ui-icon ' + (trRes.bank ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4393. temp_html += '<td><span class=" ui-icon ' + (trRes.unbound ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4394. temp_html += '<td><span class=" ui-icon ' + (trRes.btc ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4395. temp_html += '<td><span class=" ui-icon ' + (trRes.bta ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4396. temp_html += '<td><button class="custom_resources_delete" value=' + idx + '></button></td></tr>';
  4397. });
  4398. temp_html += '</table><br /><button id="custom_resources_reset">Reset to default</button>';
  4399. tab.html(temp_html);
  4400.  
  4401. $( ".custom_resources_delete" ).button({
  4402. icons: {
  4403. primary: "ui-icon-trash"
  4404. },
  4405. text: false
  4406. });
  4407. $( ".custom_resources_delete" ).click( function(e) {
  4408. if ( !loggedAccount ) {
  4409. var str = "Tracked resource could not be removed, make sure you are logged in.";
  4410. $('<div id="dialog-error-inventory" title="Error deleting tracked resource">' + str + '</div>').dialog({
  4411. resizable: true,
  4412. width: 500,
  4413. modal: false,
  4414. });
  4415. return;
  4416. }
  4417. var pidx = $(this).val();
  4418. trackResources.splice(pidx,1);
  4419. GM_setValue("tracked_resources", JSON.stringify(trackResources));
  4420. charNamesList.forEach( function (charName) {
  4421. charStatisticsList[charName].trackedResources.splice(pidx, 1);
  4422. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  4423. });
  4424. window.setTimeout(function() {
  4425. unsafeWindow.location.href = current_Gateway;
  4426. }, 0);
  4427. });
  4428. $( "#custom_resources_reset" ).button();
  4429. $( "#custom_resources_reset" ).click( function(e) {
  4430. if ( !loggedAccount ) {
  4431. var str = "Tracked resource could not be removed, make sure you are logged in.";
  4432. $('<div id="dialog-error-inventory" title="Error deleting tracked resource">' + str + '</div>').dialog({
  4433. resizable: true,
  4434. width: 500,
  4435. modal: false,
  4436. });
  4437. return;
  4438. }
  4439. GM_deleteValue("tracked_resources");
  4440. charNamesList.forEach( function (charName) {
  4441. charStatisticsList[charName].trackedResources = [];
  4442. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  4443. });
  4444. window.setTimeout(function() {
  4445. unsafeWindow.location.href = current_Gateway;
  4446. }, 0);
  4447. });
  4448.  
  4449. $('#custom_resources_add_btn').button();
  4450. $('#custom_resources_add_btn').click( function (e) {
  4451. var _fname = $("#custom_resource_fname").val();
  4452. var _name = $("#custom_resource_name").val();
  4453. var _bank = $("#custom_resource_countbank").prop('checked');
  4454. var _unbound = $("#custom_resource_unbound").prop('checked');
  4455. var _btc = $("#custom_resource_btc").prop('checked');
  4456. var _bta = $("#custom_resource_bta").prop('checked');
  4457. if ( _fname.length == 0 || _name.length == 0) {
  4458. var str = "Tracked resource could not be added. You have to enter both values!";
  4459. $('<div id="dialog-error-inventory" title="Error adding tracked resource">' + str + '</div>').dialog({
  4460. resizable: true,
  4461. width: 500,
  4462. modal: false,
  4463. });
  4464. return;
  4465. }
  4466. trackResources.push({ fname: _fname, name: _name, bank: _bank, unbound: _unbound, btc: _btc, bta: _bta });
  4467. GM_setValue("tracked_resources", JSON.stringify(trackResources));
  4468. window.setTimeout(function() {
  4469. unsafeWindow.location.href = current_Gateway;
  4470. }, 0);
  4471. });
  4472.  
  4473. tab = addTab("#script_settings", tr('tab.manualSettings'));
  4474. temp_html = '<p>In manual mode the script will stop when encountering a Leadership task.</p><br />';
  4475. temp_html += '<p>You will be notified with a text message and a sound so you can start a Leadership task from within the game. ';
  4476. temp_html += 'After a while the script will go ahead and continue looking for (non-Leadership) tasks for that slot.</p><br />';
  4477. temp_html += '<p>There are two buttons on the notification: "Ignore" tells the script to ignore Leadership and assign another (non-leadership) task. ';
  4478. temp_html += '"Done" tells it to re-scan the tasks after you manually assigned a Leadership task.</p><br />';
  4479. temp_html += '<p>This mode is enabled and disabled with the button next to the pause button.<p><br />';
  4480. temp_html += '<p><i>Note:</i> For this mode to work, Leadership has to have a higher priority than other professions. If the script finds any non-Leadership task to start, it will do so.</p><br /><br />';
  4481. tab.html(temp_html);
  4482. addInputsUL(tab, 'script', 'manual');
  4483.  
  4484.  
  4485. $("#script_settings").tabs({ active: false, collapsible: true });
  4486. setEventHandlers = true;
  4487. }
  4488.  
  4489. // Refresh is needed / Loading all the info (account, statistics and chars)
  4490. if (UIaccount != loggedAccount) {
  4491. UIaccount = loggedAccount;
  4492.  
  4493. var tabs = {
  4494. main: tr('tab.general'),
  4495. prof: tr('tab.professions'),
  4496. vend: tr('tab.vendor'),
  4497. bank: tr('tab.consolidation')
  4498. };
  4499.  
  4500. for (var key in tabs) {
  4501. var temp_tab = addTab("#main_tabs", tabs[key]);
  4502. addInputsUL(temp_tab, 'account', key);
  4503. }
  4504. var settings_copy_tab = addTab("#main_tabs", tr('tab.copySettings'));
  4505. $("div#main_tabs").tabs({ active: false, collapsible: true });
  4506.  
  4507. // Settings copy Tab
  4508. var temp_html = '';
  4509. temp_html += '<div><label class="">Copy settings from: </label><select class=" custom_input " id="copy_settings_from">';
  4510. charNamesList.forEach( function (charName) {
  4511. temp_html += '<option value="' + charName + '">' + charName + '</option>';
  4512. })
  4513. temp_html += '</select></div>';
  4514. temp_html += '<div><label class="">Copy settings to: (multiple select by holding ctrl/shift)</label></div><div><select multiple="multiple" class=" custom_input " id="copy_settings_to">';
  4515. charNamesList.forEach( function (charName) {
  4516. temp_html += '<option value="' + charName + '">' + charName + '</option>';
  4517. })
  4518. temp_html += '</select></div><div><button id="copy_settings_button" class="" value="">copy</button></div>';
  4519. settings_copy_tab.html(temp_html);
  4520. $( "#copy_settings_button" ).button();
  4521. $( "#copy_settings_button" ).click( function(e) {
  4522. var _from = $("#copy_settings_from").val();
  4523. var _fromSettings = charSettingsList[_from];
  4524. if (!_fromSettings) return;
  4525. var _to = $("#copy_settings_to").val();
  4526. _to.forEach(function (toName){
  4527. if (charNamesList.indexOf(toName) == -1) return;
  4528. var newSettings = $.extend(true, {}, _fromSettings);
  4529. newSettings.charName = toName;
  4530. charSettingsList[toName] = newSettings;
  4531. GM_setValue("settings__char__" + toName + "@" + loggedAccount, JSON.stringify(newSettings));
  4532. console.log("Copied settings from: ", _from, " to: ", toName);
  4533. })
  4534. window.setTimeout(function() {
  4535. unsafeWindow.location.href = current_Gateway;
  4536. }, 0);
  4537. });
  4538.  
  4539. //Statisitcs Tabs
  4540. var temp_tab = addTab("#info_tabs", tr('tab.counters'));
  4541. temp_tab.append("<div id='rcounters'></div>");
  4542.  
  4543. temp_tab = addTab("#info_tabs", tr('tab.refine_hist'));
  4544. temp_tab.append("<div id='refine_hist'></div>");
  4545. temp_tab = addTab("#info_tabs", tr('tab.visits'));
  4546. temp_tab.append("<div id='sca_v'></div>");
  4547. temp_tab = addTab("#info_tabs", tr('tab.workers'));
  4548. temp_tab.append("<div id='worker_overview'></div>");
  4549. temp_tab = addTab("#info_tabs", tr('tab.tools'));
  4550. temp_tab.append("<div id='tools_overview'></div>");
  4551. temp_tab = addTab("#info_tabs", tr('tab.resources'));
  4552. temp_tab.append("<div id='resource_tracker'></div>");
  4553. temp_tab = addTab("#info_tabs", tr('tab.levels'));
  4554. temp_tab.append("<div id='profession_levels'></div>");
  4555. temp_tab = addTab("#info_tabs", tr('tab.slots'));
  4556. temp_tab.append("<div id='slot_tracker'></div>");
  4557. $("#info_tabs").tabs({ active: false, collapsible: true });
  4558.  
  4559. // Adding per char settings UI
  4560. var wrp = $('<div id="charSettingsAccordion">');
  4561. $("#char_settings").append(wrp);
  4562. charNamesList.forEach( function(charName, idx) {
  4563. if (charSettingsList[charName].general.active) {
  4564. wrp.append('<h3>' + charName + '</h3>');
  4565. } else {
  4566. wrp.append("<h3 class='inactive'>" + charName + '</h3>');
  4567. }
  4568. var wrp2 = $('<div id="charContainer' + idx + '">');
  4569. wrp.append(wrp2);
  4570. addInputsUL(wrp2[0], 'char', 'main_not_tab', charName);
  4571. var char_tabs = $('<div class="charSettingsTabs" id="char_tabs_' + idx + '"><ul></ul></div>');
  4572. wrp2.append(char_tabs);
  4573. var task_tab = addTab(char_tabs[0], "Tasks");
  4574.  
  4575. // Creating the Tasks custom tab
  4576. var tableHTML = $('<table><thead><tr><th>Task name</th><th># of slots</th><th>profile</th><th>priority</th><th>stop at lvl</th></tr></thead><tbody>');
  4577. var _slotOptions = [];
  4578. for (var i = 0; i < 10; i++)
  4579. _slotOptions.push({
  4580. name: i,
  4581. value: i
  4582. });
  4583. var _priorityOptions = [{name:'high',value:0},{name:'medium',value:1},{name:'low',value:2}];
  4584. var _stopTaskAtLevelOptions = [];
  4585. _stopTaskAtLevelOptions.push({name: 'none', value: 0});
  4586. for (var i = 1; i < 26; i++) _stopTaskAtLevelOptions.push({name: i, value: i});
  4587.  
  4588. tasklist.forEach(function(task) {
  4589. if (!task.taskActive) return;
  4590. var _profileNames = [];
  4591. task.profiles.forEach(function(profile) {
  4592. if (profile.isProfileActive) _profileNames.push({
  4593. name: profile.profileName,
  4594. value: profile.profileName
  4595. });
  4596. });
  4597. var _slots = {scope: 'char_task', group: 'taskListSettings', name: task.taskListName, sub_name: 'taskSlots', opts: _slotOptions ,title: task.taskListName, type: 'select', pane: 'tasks1', tooltip: 'Number of slots to assign to ' + task.taskListName};
  4598. var _profile = {scope: 'char_task', group: 'taskListSettings', name: task.taskListName, sub_name: 'taskProfile', opts: _profileNames ,title: task.taskListName, type: 'select', pane: 'tasks1', tooltip: ''};
  4599. var _priority = {scope: 'char_task', group: 'taskListSettings', name: task.taskListName, sub_name: 'taskPriority', opts: _priorityOptions ,title: task.taskListName, type: 'select', pane: 'tasks1', tooltip: ''};
  4600. var _stop = {scope: 'char_task', group: 'taskListSettings', name: task.taskListName, sub_name: 'stopTaskAtLevel', opts: _stopTaskAtLevelOptions ,title: task.taskListName, type: 'select', pane: 'tasks1', tooltip: ''};
  4601.  
  4602. var _slt = createInput(_slots, charName, 'settingsInput', 'settingsLabel');
  4603. var _prf = createInput(_profile, charName, 'settingsInput', 'settingsLabel');
  4604. var _pr = createInput(_priority, charName, 'settingsInput', 'settingsLabel');
  4605. var _stp = createInput(_stop, charName, 'settingsInput', 'settingsLabel');
  4606. var tr = $("<tr>");
  4607. $("<td>").append(_slt.label).appendTo(tr);
  4608. $("<td>").append(_slt.input).appendTo(tr);
  4609. $("<td>").append(_prf.input).appendTo(tr);
  4610. $("<td>").append(_pr.input).appendTo(tr);
  4611. $("<td>").append(_stp.input).appendTo(tr);
  4612. tr.appendTo(tableHTML);
  4613. });
  4614. task_tab.append(tableHTML);
  4615.  
  4616. // Manual Slots allocation tab
  4617. var task2_tab = addTab(char_tabs[0], "Manual Tasks");
  4618. var tableHTML2 = $('<table><thead><tr><th>Slot #</th><th>Profession</th><th>Profile</th></tr></thead><tbody>');
  4619.  
  4620. var taskOpts = [];
  4621. tasklist.forEach(function(task) {
  4622. if (!task.taskActive) return;
  4623. taskOpts.push({ name: task.taskListName, value: task.taskListName });
  4624. })
  4625. function fillProfile(taskName) {
  4626. var _profiles = tasklist.filter(function(task) {
  4627. return task.taskListName == taskName;
  4628. })[0].profiles.filter(function(profile) {
  4629. return profile.isProfileActive
  4630. });
  4631. var options = [];
  4632. _profiles.forEach(function(profile) {
  4633. options.push({ name: profile.profileName, value: profile.profileName });
  4634. });
  4635. return options;
  4636. }
  4637. // 9 slots
  4638. for (var j = 0; j < 9; j++) {
  4639. var _tasks = {scope: 'char_task', group: 'taskListSettingsManual', name: j, sub_name: 'Profession', opts: taskOpts ,title: 'Assign to slot #' +(j+1), type: 'select', pane: 'tasks2', tooltip: '',
  4640. onchange: function (newValue, elm) {
  4641. var profileId = $(elm).attr('id').split('__');
  4642. profileId[profileId.length-1] = 'Profile';
  4643. profileId = profileId.join('__');
  4644. var profileSelect = $("[id='" + profileId + "']").empty();
  4645. fillProfile(newValue).forEach(function(option) {
  4646. profileSelect.append($("<option />").val(option.value).text(option.name));
  4647. });
  4648. profileSelect.change();
  4649. }
  4650. };
  4651. var _tsk = createInput(_tasks, charName, 'settingsInput taskListSettingsManual taskListSettingsManualTask', 'settingsLabel');
  4652. var _profile = {scope: 'char_task', group: 'taskListSettingsManual', name: j, sub_name: 'Profile', opts: fillProfile($(_tsk.input).val()) ,title: '', type: 'select', pane: 'tasks2', tooltip: ''};
  4653. var _prf = createInput(_profile, charName, 'settingsInput taskListSettingsManual taskListSettingsManualProfile', 'settingsLabel');
  4654. var tr = $("<tr>");
  4655. //$("<td>").append(_slt.label).appendTo(tr);
  4656. $("<td>").append(_tsk.label).appendTo(tr);
  4657. $("<td>").append(_tsk.input).appendTo(tr);
  4658. $("<td>").append(_prf.input).appendTo(tr);
  4659. tr.appendTo(tableHTML2);
  4660. }
  4661. task2_tab.append(tableHTML2);
  4662.  
  4663. // Char settings tabs
  4664. var tabs_c = {
  4665. main: 'General settings',
  4666. prof: 'Professions',
  4667. vend: 'Vendor options',
  4668. bank: 'AD Consolidation'
  4669. };
  4670.  
  4671. for (var key in tabs_c) {
  4672. var temp_tab = addTab(char_tabs[0], tabs_c[key]);
  4673. addInputsUL(temp_tab, 'char', key, charName);
  4674. }
  4675. });
  4676. $("#charSettingsAccordion").accordion({
  4677. heightStyle: "content",
  4678. autoHeight: false,
  4679. clearStyle: true,
  4680. active: false,
  4681. collapsible: true,
  4682. });
  4683. $(".charSettingsTabs").tabs();
  4684. setEventHandlers = true;
  4685. updateCounters();
  4686. }
  4687.  
  4688. // Adding the save events
  4689. if (setEventHandlers) {
  4690. $("#settingsPanel input[type='checkbox'], #settingsPanel select").not(".custom_input").unbind("change");
  4691. $("#settingsPanel input[type='checkbox'], #settingsPanel select").change(function (evt) {
  4692. saveSetting(evt.target);
  4693. });
  4694. $("#settingsPanel input[type='text'], #settingsPanel input[type='password']").not(".custom_input").unbind("input");
  4695. $("#settingsPanel input[type='text'], #settingsPanel input[type='password']").on('input', function (evt) {
  4696. var value = $(evt.target).val();
  4697. setTimeout(function(value) {
  4698. if ($(evt.target).val() !== value) return;
  4699. saveSetting(evt.target);
  4700. }, 1000, value);
  4701. });
  4702. }
  4703. function saveSetting(elm) {
  4704. var scope = $(elm).data('scope');
  4705. var group = $(elm).data('group');
  4706. var name = $(elm).data('name');
  4707.  
  4708. var value;
  4709. if ($(elm).prop('type') === 'checkbox') value = $(elm).prop('checked');
  4710. else value = $(elm).val();
  4711.  
  4712. var fun = $(elm).data('onchange');
  4713. if (typeof fun === 'function') {
  4714. var retval = fun(value, elm);
  4715. if (retval === false ) return; // Allowing the onchange function to stop the save
  4716. }
  4717. switch (scope) {
  4718. case 'script':
  4719. scriptSettings[group][name] = value;
  4720. setTimeout(function() {
  4721. GM_setValue("settings__script", JSON.stringify(scriptSettings));
  4722. console.log("Saved script setting: " + scope + "." + group + "." + name + " Value: " + value);
  4723. $(elm).addClass("inputSaved");
  4724. setTimeout(function() {
  4725. $(elm).removeClass("inputSaved");
  4726. },1500);
  4727. }, 0);
  4728. break;
  4729. case 'account':
  4730. accountSettings[group][name] = value;
  4731. setTimeout(function() {
  4732. GM_setValue("settings__account__" + loggedAccount, JSON.stringify(accountSettings));
  4733. console.log("Saved account setting: " + scope + "." + group + "." + name + " Value: " + value + " For: " + loggedAccount);
  4734. $(elm).addClass("inputSaved");
  4735. setTimeout(function() {
  4736. $(elm).removeClass("inputSaved");
  4737. },1500);
  4738. }, 0);
  4739. break;
  4740. case 'char':
  4741. var c_name = $(elm).data('charName');
  4742. if (c_name && charSettingsList[c_name]) {
  4743. charSettingsList[c_name][group][name] = value;
  4744. setTimeout(function() {
  4745. GM_setValue("settings__char__" + c_name + "@" + loggedAccount, JSON.stringify(charSettingsList[c_name]));
  4746. console.log("Saved char setting: " + scope + "." + group + "." + name + " Value: " + value + " For: " + c_name);
  4747. $(elm).addClass("inputSaved");
  4748. setTimeout(function() {
  4749. $(elm).removeClass("inputSaved");
  4750. },1500);
  4751. }, 0);
  4752. }
  4753. break;
  4754. case 'char_task':
  4755. var sub_name = $(elm).data('sub_name');
  4756. var c_name = $(elm).data('charName');
  4757. if (c_name && charSettingsList[c_name]) {
  4758. charSettingsList[c_name][group][name][sub_name] = value;
  4759. setTimeout(function() {
  4760. GM_setValue("settings__char__" + c_name + "@" + loggedAccount, JSON.stringify(charSettingsList[c_name]));
  4761. console.log("Saved char_task setting: " + scope + "." + group + "." + name + "." + sub_name + " Value: " + value + " For: " + c_name);
  4762. $(elm).addClass("inputSaved");
  4763. setTimeout(function() {
  4764. $(elm).removeClass("inputSaved");
  4765. },1500);
  4766. }, 0);
  4767. }
  4768. break;
  4769. }
  4770. }
  4771.  
  4772. // Helper function to create input elements
  4773. function createInput( settingsItem, charName , input_css_classes, label_css_classes) {
  4774. var input;
  4775. var label;
  4776.  
  4777. var id_name;
  4778. var value;
  4779. switch (settingsItem.scope) {
  4780. case 'script':
  4781. value = scriptSettings[settingsItem.group][settingsItem.name];
  4782. id_name = "setting__script__" + settingsItem.group + "__" + settingsItem.name;
  4783. break;
  4784. case 'account':
  4785. id_name = "setting__account__" + settingsItem.group + "__" + settingsItem.name;
  4786. value = accountSettings[settingsItem.group][settingsItem.name];
  4787. break;
  4788. case 'char':
  4789. id_name = "setting__char__" + charName + "__" + settingsItem.group + "__" + settingsItem.name;
  4790. value = charSettingsList[charName][settingsItem.group][settingsItem.name];
  4791. break;
  4792. case 'char_task':
  4793. id_name = "setting__char__" + charName + "__" + settingsItem.group + "__" + settingsItem.name+ "__" + settingsItem.sub_name;
  4794. value = charSettingsList[charName][settingsItem.group][settingsItem.name][settingsItem.sub_name];
  4795. break;
  4796.  
  4797. }
  4798.  
  4799. switch (settingsItem.type) {
  4800. case 'checkbox':
  4801. case 'text':
  4802. case 'password':
  4803. input = $("<input type=\"" + settingsItem.type + "\" name=\"" + id_name + "\" id=\"" + id_name + "\" class=\"" + input_css_classes + "\" \>");
  4804. break;
  4805. case 'select':
  4806. input = $("<select name=\"" + id_name + "\" id=\"" + id_name + "\" class=\"" + input_css_classes + "\" >");
  4807. settingsItem.opts.forEach( function (option) {
  4808. input.append($("<option value=\"" + option.value + "\">" + option.name + "</option>"));
  4809. });
  4810. break;
  4811. case 'void':
  4812. break;
  4813. default:
  4814. break;
  4815.  
  4816. }
  4817. if (settingsItem.type == 'checkbox') input.prop('checked', value);
  4818. else input.val(value);
  4819. input.data('scope', settingsItem.scope);
  4820. input.data('group', settingsItem.group);
  4821. input.data('name', settingsItem.name);
  4822. if (settingsItem.sub_name) input.data('sub_name', settingsItem.sub_name);
  4823. if (charName) input.data('charName', charName);
  4824. if (settingsItem.onchange) input.data('onchange', settingsItem.onchange);
  4825. label = $('<label title="' + settingsItem.tooltip + '" class="' + label_css_classes + '" for="' + id_name + '">' + settingsItem.title + '</label>');
  4826. return { input: input, label: label };
  4827. }
  4828.  
  4829.  
  4830. function addInputsUL(parentSelector, scope, pane, charName) {
  4831.  
  4832. var settingListToAdd = settingnames.filter(function(element) {
  4833. return (element.scope == scope && element.pane == pane);
  4834. });
  4835.  
  4836. if (!charName) charName = '';
  4837. var ul = $("<ul></ul>");
  4838. settingListToAdd.forEach( function (setting) {
  4839. var to_add = createInput(setting, charName, 'settingsInput', 'settingsLabel');
  4840. var li = $("<li>");
  4841. switch (setting.type) {
  4842. case 'checkbox':
  4843. li.append(to_add.input);
  4844. li.append(to_add.label);
  4845. break;
  4846. case 'text':
  4847. case 'password':
  4848. case 'select':
  4849. case 'void':
  4850. li.append(to_add.label);
  4851. li.append(to_add.input);
  4852. break;
  4853. }
  4854. ul.append(li);
  4855. })
  4856. $(parentSelector).append(ul);
  4857. }
  4858.  
  4859. function addTab(parentSelector, tabTitle, tabId) {
  4860. if (!tabId) {
  4861. var tabs_num = $(" > ul > li", parentSelector).length + 1;
  4862. tabId = $(parentSelector).attr('id') + "_tab_" + tabs_num;
  4863. }
  4864. $(" > ul", parentSelector).append("<li><a href='#" + tabId + "'>" + tabTitle + "</a></li>");
  4865. var tab = $("<div id='" + tabId + "'></div>");
  4866. $(parentSelector).append(tab);
  4867. return tab;
  4868. }
  4869. // Close the panel
  4870. /*
  4871. $("#settingsButton").show();
  4872. $("#pauseButton img").attr("src", (settings["paused"] ? image_play : image_pause));
  4873. $("#pauseButton img").attr("title", "Click to " + (settings["paused"] ? "resume" : "pause") + " task script");
  4874. $("#pauseButton").show();
  4875. $("#settingsPanel").hide();
  4876. */
  4877. }
  4878.  
  4879. function displayPause() {
  4880. if (scriptSettings.general.scriptPaused) {
  4881. $('#pauseButton').html('<span class="ui-icon ui-icon-play" title="Click to resume task script" style="cursor: pointer; display: block;"></span>');
  4882. }
  4883. else {
  4884. $('#pauseButton').html('<span class="ui-icon ui-icon-pause" title="Click to pause task script" style="cursor: pointer; display: block;"></span>');
  4885. }
  4886. }
  4887. function PauseSettings(_action) {
  4888. switch (_action) {
  4889. case true:
  4890. case "pause":
  4891. scriptSettings.general.scriptPaused = true;
  4892. break;
  4893. case false:
  4894. case 'unpause':
  4895. scriptSettings.general.scriptPaused = false;
  4896. break;
  4897. default:
  4898. scriptSettings.general.scriptPaused = !scriptSettings.general.scriptPaused;
  4899. break;
  4900. }
  4901. setTimeout(function() {
  4902. //console.log("Pause set to", scriptSettings.general.scriptPaused);
  4903. GM_setValue("settings__script", JSON.stringify(scriptSettings));
  4904. }, 0);
  4905. displayPause();
  4906. }
  4907.  
  4908. function displayManual() {
  4909. if (scriptSettings.general.leadershipMode) {
  4910. $('#manualButton').html('<span class="ui-icon ui-icon-transfer-e-w" title="Click to disable manual leadership handling" style="cursor: pointer; display: block;"></span>');
  4911. }
  4912. else {
  4913. $('#manualButton').html('<span class="ui-icon ui-icon-person" title="Click to enable manual leadership handling" style="cursor: pointer; display: block;"></span>');
  4914. }
  4915. }
  4916.  
  4917. function ManualSettings() {
  4918. charNamesList.forEach( function (charName, idx) {
  4919. if (leadershipSlots[charName]) {
  4920. chartimers[idx] = null;
  4921. }
  4922. });
  4923. scriptSettings.general.leadershipMode = !scriptSettings.general.leadershipMode;
  4924. leadershipSlots = {};
  4925. setTimeout(function() {
  4926. GM_setValue("settings__script", JSON.stringify(scriptSettings));
  4927. }, 0);
  4928. displayManual();
  4929. if (waitingNextChar) {
  4930. clearTimeout(timerHandle);
  4931. timerHandle = window.setTimeout(function() {
  4932. process();
  4933. }, delay.SHORT);
  4934. }
  4935. }
  4936.  
  4937. function IgnoreButton(idx, done) {
  4938. if (done) {
  4939. chartimers[idx] = leadershipSlots[charNamesList[idx]] = null;
  4940. } else {
  4941. chartimers[idx] = leadershipSlots[charNamesList[idx]] = new Date();
  4942. }
  4943. if (waitingNextChar) {
  4944. clearTimeout(timerHandle);
  4945. curCharNum = GM_setValue("curCharNum_" + loggedAccount, idx);
  4946. timerHandle = window.setTimeout(function() {
  4947. process();
  4948. }, delay.SHORT);
  4949. }
  4950. }
  4951.  
  4952. function updateCounters() {
  4953.  
  4954. function formatNum(num) {
  4955. if ((num / 1000000) > 1)
  4956. return ((num / 1000000).toFixed(1) + 'm');
  4957. if ((num / 1000) > 1)
  4958. return ((num / 1000).toFixed(1) + 'k');
  4959. return Math.floor(num);
  4960. }
  4961.  
  4962. var total = [0, 0, 0, 0];
  4963. var html = '<table>';
  4964. html += "<tr><th>Character Name</th><th>#slots</th><th>R.Counter</th><th>~ad/h</th>";
  4965. html += "<th>RAD</th><th>AD</th><th>gold</th><th>rBI</th><th>BI</th><th>R.today<th></th></tr>";
  4966.  
  4967.  
  4968. charNamesList.forEach(function(charName) {
  4969. var counterTime = (Date.now() - charStatisticsList[charName].general.refineCounterReset) / 1000 / 60 / 60; // in hours.
  4970. var radh = 0;
  4971. if (counterTime > 0) radh = charStatisticsList[charName].general.refineCounter / counterTime;
  4972. var outdated = (charStatisticsList[charName].general.lastVisit < lastDailyResetTime);
  4973.  
  4974. total[0] += charStatisticsList[charName].general.refineCounter;
  4975. total[1] += charStatisticsList[charName].general.diamonds;
  4976. total[2] += charStatisticsList[charName].general.gold;
  4977. total[3] += outdated ? 0 : (charStatisticsList[charName].general.refined[0] | 0);
  4978.  
  4979. html += "<tr>";
  4980. html += "<td>" + charName + "</td>";
  4981. html += "<td>" + charStatisticsList[charName].general.activeSlots + "</td>";
  4982. html += "<td>" + formatNum(charStatisticsList[charName].general.refineCounter) + "</td>";
  4983. html += "<td>" + formatNum(radh) + "</td>";
  4984. html += "<td>" + formatNum(charStatisticsList[charName].general.rad) + "</td>";
  4985. html += "<td>" + formatNum(charStatisticsList[charName].general.diamonds) + "</td>";
  4986. html += "<td>" + formatNum(charStatisticsList[charName].general.gold) + "</td>";
  4987. html += "<td>" + formatNum(charStatisticsList[charName].general.rBI) + "</td>";
  4988. html += "<td>" + formatNum(charStatisticsList[charName].general.BI) + "</td>";
  4989. html += "<td>" + (outdated ? "0*" : formatNum(charStatisticsList[charName].general.refined[0] | 0)) + "</td>";
  4990. //html += "<td>" + formatNum(charStatisticsList[charName].general.refineLimitLeft) + "</td>";
  4991. html += "</tr>";
  4992. });
  4993. html += "<tr class='totals'><td>Totals (without AD in ZAX):</td><td></td><td>" + formatNum(total[0]) + "</td><td></td>";
  4994. html += "<td></td><td>" + formatNum(total[1]) + "</td><td>" + formatNum(total[2]) + "</td>";
  4995. html += "<td></td><td></td><td>" + formatNum(total[3]) + "<td></td></tr>";
  4996. html += "</table>";
  4997. html += "*No info for this reset yet. <br />";
  4998. html += "<button>Reset Refined Counter</button>";
  4999. $('#rcounters').html(html);
  5000.  
  5001. $('#rcounters button').button();
  5002. $('#rcounters button').click(function() {
  5003. charNamesList.forEach(function(charName) {
  5004. charStatisticsList[charName].general.refineCounter = 0;
  5005. charStatisticsList[charName].general.refineCounterReset = Date.now();
  5006. // !! This can couse a freeze on slow computers.
  5007. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  5008. });
  5009. updateCounters();
  5010. });
  5011.  
  5012. //refine_hist
  5013. var total = [];
  5014. var slotSum = 0;
  5015. var html = '<table>';
  5016. html += "<tr><th>Character Name</th>"
  5017. for (var i = 0; i < 8; i++) {
  5018. html += "<th>" + (-1 * i) + "</th>";
  5019. total[i] = 0;
  5020. }
  5021. html += "<th>avg</th>"
  5022. html += "<th>per slot</th>"
  5023. html += "</tr>";
  5024.  
  5025. charNamesList.forEach(function(charName) {
  5026. var outdated = (charStatisticsList[charName].general.lastVisit < lastDailyResetTime);
  5027.  
  5028. html += "<tr>";
  5029. html += "<td>" + charName + "</td>";
  5030. html += "<td>" + (outdated ? "0*" : formatNum(charStatisticsList[charName].general.refined[0] | 0)) + "</td>";
  5031. var sum = 0; var cnt = 0;
  5032. for (var i = 1; i < 8; i++) {
  5033. var refined = charStatisticsList[charName].general.refined[i] | 0
  5034. sum += refined; if (refined) cnt++;
  5035. html += "<td>" + formatNum(refined) + "</td>";
  5036. total[i] += refined;
  5037. }
  5038. html += "<td>" + formatNum(sum/cnt) + "</td>";
  5039. html += "<td>" + formatNum(sum / cnt / (charStatisticsList[charName].general.activeSlots)) + "</td>";
  5040. html += "</tr>";
  5041. total[0] += outdated ? 0 : charStatisticsList[charName].general.refined[0] | 0;
  5042. slotSum += charStatisticsList[charName].general.activeSlots;
  5043. });
  5044. html += "<tr class='totals'><td>Totals (without AD in ZAX):</td>";
  5045. var tsum = 0; var cnt = 0;
  5046. for (var i = 1; i < 8; i++) {
  5047. tsum += total[i]; if (total[i]) cnt++;
  5048. }
  5049. for (var i = 0; i < 8; i++) {
  5050. html += "<td>" + formatNum(total[i]) + "</td>";
  5051. }
  5052. html += "<td>" + formatNum(tsum/cnt) + "</td>";
  5053. html += "<td>" + formatNum(tsum / cnt / slotSum) + "</td>";
  5054. html += "</tr></table><br />";
  5055. html += "Total (1 - 7): " + formatNum(tsum);
  5056. $('#refine_hist').html(html);
  5057.  
  5058. // Worker tab update.
  5059. html = '<table class="professionRanks">';
  5060. var temp = "";
  5061. html += "<tr><th>Char name</th>";
  5062. var options = "";
  5063. var workerTabSelects = ["Leadership", "Alchemy", "Jewelcrafting"];
  5064. $.each(charStatisticsList[charNamesList[0]].professions, function(profession) {
  5065. options += "<option value='" + profession + "'>" + profession + "</option>";
  5066. })
  5067.  
  5068. for (var i = 0; i < 3; i++) {
  5069. //saving current select values
  5070. if ($('#setting__worker__tab__p' + i).val()) workerTabSelects[i] = $('#setting__worker__tab__p' + i).val();
  5071. html += "<th colspan=6>" + "<select name='setting__worker__tab__p" + i + "' id='setting__worker__tab__p" + i + "'>" + options + "</select></th>";
  5072. temp += "<th>p</th><th>b</th><th>g</th><th>t3</th><th>t2</th><th>t1</th>";
  5073. }
  5074. html += "</tr><tr><th></th>" + temp + "</tr>";
  5075. charNamesList.forEach(function(charName) {
  5076. temp = "";
  5077. html += "<tr><td rowspan=2>" + charName + "</td>";
  5078. for (var i = 0; i < 3; i++) {
  5079. var list = charStatisticsList[charName].professions[workerTabSelects[i]];
  5080. for (var ix = 0; ix < 6; ix++) {
  5081. html += "<td class='ranked'>" + $.trim(list.workersUsed[ix]) + "</td>";
  5082. temp += "<td class='ranked2'>" + $.trim(list.workersUnused[ix]) + "</td>";
  5083. };
  5084. }
  5085. /*
  5086. $.each(charStatisticsList[charName].workers, function (pf, list) {
  5087. for (var ix = 0; ix < 6; ix++) {
  5088. html += "<td class='ranked'>" + $.trim(list.used[ix]) + "</td>";
  5089. temp += "<td class='ranked2'>" + $.trim(list.unused[ix]) + "</td>";
  5090. };
  5091. })
  5092. */
  5093. html += "</tr><tr>" + temp + "</tr>";
  5094. })
  5095.  
  5096. html += "</table>";
  5097. $('#worker_overview').html(html);
  5098. for (var i = 0; i < 3; i++) {
  5099. $('#setting__worker__tab__p' + i).val(workerTabSelects[i]);
  5100. $('#setting__worker__tab__p' + i).change(function() {
  5101. updateCounters();
  5102. });
  5103. }
  5104.  
  5105. // Tools tab update.
  5106. html = '<table class="professionRanks">';
  5107. var temp = "";
  5108. html += "<tr><th>Char name</th>";
  5109. var options = "";
  5110. var toolsTabSelects = ["Crucible", "Mortar", "Philosophersstone", "Graver"];
  5111. $.each(charStatisticsList[charNamesList[0]].tools, function(tool) {
  5112. options += "<option value='" + tool + "'>" + tool + "</option>";
  5113. });
  5114.  
  5115. for (var i = 0; i < 4; i++) {
  5116. //saving current select values
  5117. if ($('#setting__tools__tab__p' + i).val()) toolsTabSelects[i] = $('#setting__tools__tab__p' + i).val();
  5118. html += "<th colspan=4>" + "<select name='setting__tools__tab__p" + i + "' id='setting__tools__tab__p" + i + "'>" + options + "</select></th>";
  5119. temp += "<th>p</th><th>b</th><th>g</th><th>w</th>";
  5120. }
  5121. html += "</tr><tr><th></th>" + temp + "</tr>";
  5122. charNamesList.forEach(function(charName) {
  5123. temp = "";
  5124. html += "<tr><td rowspan=2>" + charName + "</td>";
  5125. for (var i = 0; i < 4; i++) {
  5126. var list = charStatisticsList[charName].tools[toolsTabSelects[i]];
  5127. for (var ix = 0; ix < 4; ix++) {
  5128. html += "<td class='tranked'>" + $.trim(list.used[ix]) + "</td>";
  5129. temp += "<td class='tranked2'>" + $.trim(list.unused[ix]) + "</td>";
  5130. };
  5131. }
  5132. html += "</tr><tr>" + temp + "</tr>";
  5133. })
  5134.  
  5135. html += "</table>";
  5136. $('#tools_overview').html(html);
  5137. for (var i = 0; i < 4; i++) {
  5138. $('#setting__tools__tab__p' + i).val(toolsTabSelects[i]);
  5139. $('#setting__tools__tab__p' + i).change(function() {
  5140. updateCounters();
  5141. });
  5142. }
  5143.  
  5144.  
  5145. // Resource tracker update.
  5146. html = "<table class='withRotation'><tr><th class='rotate'><div><span>Character Name</div></span></th>";
  5147. html += "<th class='rotate'><div><span>Main bags empty slots</div></span></th>";
  5148. html += "<th class='rotate'><div><span>Celestials</div></span></th>";
  5149. html += "<th class='rotate'><div><span>Ardents</div></span></th>";
  5150. trackResources.forEach(function(item) {
  5151. html += "<th class='rotate'><div><span>" + item.fname + "</div></span></th>";
  5152. })
  5153. var total = []; for (var i = 0; i < trackResources.length; i++) total[i] = 0;
  5154. html += '</tr>';
  5155. charNamesList.forEach(function(charName) {
  5156. html += '<tr><td>' + charName + '</td>';
  5157. html += '<td>' + charStatisticsList[charName].general.emptyBagSlots + '</td>';
  5158. html += '<td>' + charStatisticsList[charName].general.celestial + '</td>';
  5159. html += '<td>' + charStatisticsList[charName].general.ardent + '</td>';
  5160. charStatisticsList[charName].trackedResources.forEach(function(count, idx) {
  5161. html += '<td>' + count + '</td>';
  5162. total[idx] += count;
  5163. })
  5164. html += '</tr>';
  5165. })
  5166. html += "<tr class=\" totals\"><td>Totals:</td><td>--</td><td>--</td><td>--</td>";
  5167. for (var i = 0; i < total.length; i++) html += "<td>" + total[i] + "</td>";
  5168. html += "</tr>";
  5169. html += "</table>";
  5170. $('#resource_tracker').html(html);
  5171.  
  5172.  
  5173. // 'profession_levels' tab
  5174. html = '<table class="withRotation">';
  5175. html += "<tr><th class='rotate'><div><span>Character Name</div></span></th>";
  5176. html += "<th class='rotate'><div><span>#slots</div></span></th>";
  5177. $.each(charStatisticsList[charNamesList[0]].professions, function(profession) {
  5178. html += "<th class='rotate'><div><span>" + profession + "</div></span></th>";
  5179. });
  5180. html += "</tr>";
  5181. charNamesList.forEach(function(charName) {
  5182. html += "<tr>";
  5183. html += "<td>" + charName + "</td>";
  5184. html += "<td>" + charStatisticsList[charName].general.activeSlots + "</td>";
  5185. $.each(charStatisticsList[charName].professions, function(name, profData) {
  5186. html += "<td>" + profData.level + "</td>";
  5187. });
  5188. html += "</tr>";
  5189. });
  5190. html += "</table>";
  5191. $('#profession_levels').html(html);
  5192.  
  5193. // 'slot_tracker' tab
  5194. html = '<table>';
  5195. html += "<tr><th>Character Name</th>";
  5196. for (var i = 0; i < 9; i++) {
  5197. html += "<th> #" + (i + 1) + " </th>";
  5198. }
  5199. html += "</tr>";
  5200.  
  5201. charNamesList.forEach(function(charName) {
  5202. html += "<tr>";
  5203. html += "<td>" + charName + "</td>";
  5204. for (var i = 0; i < 9; i++) {
  5205. var _slot = charStatisticsList[charName].slotUse[i];
  5206. html += "<td class=' slt_"+ $.trim(_slot).substring(0, 4) + "'>" + $.trim(_slot).substring(0, 4) + " </td>";
  5207. }
  5208. html += "</tr>";
  5209. });
  5210. html += "</table>";
  5211. $('#slot_tracker').html(html);
  5212. // Visit times and SCA tab
  5213. html = '<table>';
  5214. html += "<tr><th>Character Name</th><th>Next Profession</th><th>Last SCA</th><th>Override</th></tr>";
  5215. charNamesList.forEach(function(charName, idx) {
  5216. html += "<tr>";
  5217. html += "<td>" + charName + "</td>";
  5218. if (!chartimers[idx]) html += "<td>No data</td>";
  5219. else html += "<td><button class=' visitReset ' value=" + (idx + 1) + ">reset</button><span data-timer='" + chartimers[idx] + "' data-timer-length='2'></span></td>";
  5220. if (!charStatisticsList[charName].general.lastSCAVisit) html += "<td>No data</td>";
  5221. else html += "<td>" + (new Date(charStatisticsList[charName].general.lastSCAVisit)).toLocaleString() + "</td>";
  5222. if (charSettingsList[charName].general.overrideGlobalSettings) html += "<td><span class='ui-icon ui-icon-check '></span></td>";
  5223. else html += "<td></td>";
  5224. html += "</tr>";
  5225. });
  5226. html += "</table>";
  5227. html += "<div style='margin: 5px 0;'> Last SCA reset (test #1): " + (new Date(accountSettings.generalSettings.SCADailyReset)).toLocaleString() + "</div>";
  5228. html += "<div style='margin: 5px 0;'> Last SCA reset (test #2): " + (new Date(lastDailyResetTime)).toLocaleString() + "</div>";
  5229. $('#sca_v').html(html);
  5230. $('#sca_v').append("<br /><br /><button id='settings_sca'>Cycle SCA</button>");
  5231. $('#sca_v').append("&nbsp;&nbsp;<button id='reset_all_char_times_btn'>Reset All Visit Times</button>");
  5232. $('#settings_sca').button();
  5233. $("#settings_sca").click(function() {
  5234. $("#settings_close").trigger("click");
  5235. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')' + "/adventures");
  5236. processSwordCoastDailies();
  5237. });
  5238.  
  5239. $('#reset_all_char_times_btn').button();
  5240. $("#reset_all_char_times_btn").click(function() {
  5241. charNamesList.forEach(function (charName, idx) {
  5242. chartimers[idx] = null;
  5243. charStatisticsList[charName].general.nextTask = null;
  5244. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  5245. });
  5246. window.setTimeout(function() {
  5247. unsafeWindow.location.href = current_Gateway;
  5248. }, 0);
  5249. });
  5250.  
  5251.  
  5252. $('.visitReset').button();
  5253. $(".visitReset").click(function() {
  5254. var value = $(this).val();
  5255. if (value) {
  5256. console.log("Reseting for " + charNamesList[value-1]);
  5257. chartimers[parseInt(value)-1] = null;
  5258. updateCounters();
  5259. if (waitingNextChar) {
  5260. clearTimeout(timerHandle);
  5261. curCharNum = GM_setValue("curCharNum_" + loggedAccount, parseInt(value)-1);
  5262. timerHandle = window.setTimeout(function() {
  5263. process();
  5264. }, delay.SHORT);
  5265. }
  5266. }
  5267. });
  5268. }
  5269.  
  5270.  
  5271.  
  5272. function vendorJunk(evnt) {
  5273. var _vendorItems = [];
  5274. var _sellCount = 0;
  5275. if (getSetting('vendorSettings', 'vendorInvocationBlessingsAll')) {
  5276. _vendorItems[_vendorItems.length] = {
  5277. pattern: /^Invocation_Random_Buff$/,
  5278. limit: 0
  5279. };
  5280. }
  5281. if (getSetting('vendorSettings', 'vendorKitsLimit')) {
  5282. _vendorItems[_vendorItems.length] = {
  5283. pattern: /^Item_Consumable_Skill/,
  5284. limit: 50
  5285. };
  5286. }
  5287. if (getSetting('vendorSettings', 'vendorAltarsLimit')) {
  5288. _vendorItems[_vendorItems.length] = {
  5289. pattern: /^Item_Portable_Altar$/,
  5290. limit: 80
  5291. };
  5292. }
  5293. if (getSetting('vendorSettings', 'vendorKitsAll')) {
  5294. _vendorItems[_vendorItems.length] = {
  5295. pattern: /^Item_Consumable_Skill/,
  5296. limit: 0
  5297. };
  5298. }
  5299. if (getSetting('vendorSettings', 'vendorAltarsAll')) {
  5300. _vendorItems[_vendorItems.length] = {
  5301. pattern: /^Item_Portable_Altar(_Bound)?$/,
  5302. limit: 0
  5303. };
  5304. }
  5305. if (getSetting('vendorSettings', 'vendorEnchR1')) {
  5306. _vendorItems[_vendorItems.length] = {
  5307. pattern: /^T1_Enchantment/,
  5308. limit: 0
  5309. };
  5310. _vendorItems[_vendorItems.length] = {
  5311. pattern: /^T1_Runestone/,
  5312. limit: 0
  5313. };
  5314. }
  5315. if (getSetting('vendorSettings', 'vendorEnchR2')) {
  5316. _vendorItems[_vendorItems.length] = {
  5317. pattern: /^T2_Enchantment/,
  5318. limit: 0
  5319. };
  5320. _vendorItems[_vendorItems.length] = {
  5321. pattern: /^T2_Runestone/,
  5322. limit: 0
  5323. };
  5324. }
  5325. if (getSetting('vendorSettings', 'vendorEnchR3')) {
  5326. _vendorItems[_vendorItems.length] = {
  5327. pattern: /^T3_Enchantment/,
  5328. limit: 0
  5329. };
  5330. _vendorItems[_vendorItems.length] = {
  5331. pattern: /^T3_Runestone/,
  5332. limit: 0
  5333. };
  5334. }
  5335. if (getSetting('vendorSettings', 'vendorEnchR4')) {
  5336. _vendorItems[_vendorItems.length] = {
  5337. pattern: /^T4_Enchantment/,
  5338. limit: 0
  5339. };
  5340. _vendorItems[_vendorItems.length] = {
  5341. pattern: /^T4_Runestone/,
  5342. limit: 0
  5343. };
  5344. }
  5345. if (getSetting('vendorSettings', 'vendorLesserMarks')) {
  5346. _vendorItems[_vendorItems.length] = {
  5347. pattern: /^(Gem_Upgrade_Resource_R[1-2]|Artifact_Upgrade_Resource_R1_[A-Z])$/,
  5348. limit: 0
  5349. };
  5350. }
  5351. if (getSetting('vendorSettings', 'vendorPots1')) {
  5352. _vendorItems[_vendorItems.length] = {
  5353. pattern: /^Potion_(Healing|Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)(_Bound)?$/,
  5354. limit: 0
  5355. };
  5356. }
  5357. if (getSetting('vendorSettings', 'vendorPots2')) {
  5358. _vendorItems[_vendorItems.length] = {
  5359. pattern: /^Potion_(Healing|Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_2(_Bound)?$/,
  5360. limit: 0
  5361. };
  5362. }
  5363. if (getSetting('vendorSettings', 'vendorPots3')) {
  5364. _vendorItems[_vendorItems.length] = {
  5365. pattern: /^Potion_(Healing|Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_3(_Bound)?$/,
  5366. limit: 0
  5367. };
  5368. }
  5369. if (getSetting('vendorSettings', 'vendorPots4')) {
  5370. _vendorItems[_vendorItems.length] = {
  5371. pattern: /^Potion_(Healing|Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_4(_Bound)?$/,
  5372. limit: 0
  5373. };
  5374. }
  5375. if(getSetting('vendorSettings', 'vendorPots5')) {
  5376. _vendorItems[_vendorItems.length] = {
  5377. pattern: /^Potion_(Healing|Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_5(_Bound)?$/,
  5378. limit: 0
  5379. };
  5380. }
  5381. if (getSetting('vendorSettings', 'vendorHealingPots')) {
  5382. _vendorItems[_vendorItems.length] = {
  5383. pattern: /^Potion_Healing(_[1-5])?(_Bound)?$/,
  5384. limit: 0
  5385. };
  5386. }
  5387. if (getSetting('vendorSettings', 'vendorJunk')) {
  5388. _vendorItems[_vendorItems.length] = {
  5389. pattern: /^Item_Snowworks_/,
  5390. limit: 0
  5391. }; // Winter Festival fireworks small & large
  5392. _vendorItems[_vendorItems.length] = {
  5393. pattern: /^Item_Skylantern/,
  5394. limit: 0
  5395. }; // Winter Festival skylantern
  5396. _vendorItems[_vendorItems.length] = {
  5397. pattern: /^Item_Partypopper/,
  5398. limit: 0
  5399. }; // Party Poppers
  5400. _vendorItems[_vendorItems.length] = {
  5401. pattern: /^Item_Fireworks/,
  5402. limit: 0
  5403. }; // Fireworks
  5404. _vendorItems[_vendorItems.length] = {
  5405. pattern: /^Object_Plate_/,
  5406. limit: 0
  5407. };
  5408. _vendorItems[_vendorItems.length] = {
  5409. pattern: /^Object_Decoration_/,
  5410. limit: 0
  5411. };
  5412. _vendorItems[_vendorItems.length] = {
  5413. pattern: /^Object_Gem_/,
  5414. limit: 0
  5415. };
  5416. _vendorItems[_vendorItems.length] = {
  5417. pattern: /^Object_Jewelry_/,
  5418. limit: 0
  5419. };
  5420. _vendorItems[_vendorItems.length] = {
  5421. pattern: /^Object_Mug_/,
  5422. limit: 0
  5423. };
  5424. _vendorItems[_vendorItems.length] = {
  5425. pattern: /^Object_Trinket_/,
  5426. limit: 0
  5427. };
  5428. _vendorItems[_vendorItems.length] = {
  5429. pattern: /_Green_T[1-6]_Unid$/,
  5430. limit: 0
  5431. }; // Unidentified Green Gear
  5432. _vendorItems[_vendorItems.length] = {
  5433. pattern: /^Object_Trinket_/,
  5434. limit: 0
  5435. };
  5436. _vendorItems[_vendorItems.length] = {
  5437. pattern: /^Object_Skill_/,
  5438. limit: 0
  5439. };
  5440. }
  5441. if (getSetting('vendorSettings', 'vendorProfResults')) {
  5442. _vendorItems[_vendorItems.length] = {
  5443. pattern: /^Crafted_(Jewelcrafting_Waist_Offense_3|Jewelcrafting_Neck_Defense_3|Jewelcrafting_Waist_Defense_3|Med_Armorsmithing_T3_Chain_Armor_Set_1|Med_Armorsmithing_T3_Chain_Pants2|Med_Armorsmithing_T3_Chain_Shirt2|Med_Armorsmithing_T3_Chain_Helm_Set_1|Med_Armorsmithing_T3_Chain_Pants|Med_Armorsmithing_T3_Chain_Boots_Set_1|Hvy_Armorsmithing_T3_Plate_Armor_Set_1|Hvy_Armorsmithing_T3_Plate_Pants2|Hvy_Armorsmithing_T3_Plate_Shirt2|Hvy_Armorsmithing_T3_Plate_Helm_Set_1|Hvy_Armorsmithing_T3_Plate_Boots_Set_1|Leatherworking_T3_Leather_Armor_Set_1|Leatherworking_T3_Leather_Pants2|Leatherworking_T3_Leather_Shirt2|Leatherworking_T3_Leather_Helm_Set_1|Leatherworking_T3_Leather_Boots_Set_1|Tailoring_T3_Cloth_Armor_Set_3|Tailoring_T3_Cloth_Armor_Set_2|Tailoring_T3_Cloth_Armor_Set_1|Tailoring_T3_Cloth_Pants2_Set2|Tailoring_T3_Cloth_Shirt2|Tailoring_T3_Cloth_Helm_Set_1|Artificing_T3_Pactblade_Temptation_5|Artificing_T3_Icon_Virtuous_5|Weaponsmithing_T3_Dagger_4)|^Potion_Unstable_([1-6])*$/,
  5444. limit: 0
  5445. };
  5446. }
  5447. if (_vendorItems.length > 0) {
  5448. console.log("Attempting to vendor selected items...");
  5449. _sellCount = vendorItemsLimited(_vendorItems);
  5450. if (_sellCount > 0 && !evnt) {
  5451. var _sellWait = _sellCount * 1000;
  5452. PauseSettings("pause");
  5453. window.setTimeout(function() {
  5454. PauseSettings("unpause");
  5455. }, _sellWait);
  5456. }
  5457. }
  5458. }
  5459.  
  5460. function addTranslation() {
  5461. var lang = GM_getValue('language', 'en');
  5462. translation = {
  5463. 'currLang': lang,
  5464. 'en': {
  5465. 'translation.needed': 'translation needed',
  5466. 'tab.scriptSettings': 'Script settings',
  5467. 'tab.advanced': 'Advanced',
  5468. 'tab.customProfiles': 'Custom profiles',
  5469. 'tab.trackedResources': 'Tracked resources',
  5470. 'tab.general': 'General settings',
  5471. 'tab.manualSettings': 'Manual Leadership Mode',
  5472. 'tab.professions': 'Professions',
  5473. 'tab.vendor': 'Vendor options',
  5474. 'tab.consolidation': 'AD Consolidation',
  5475. 'tab.copySettings': 'Settings Copy',
  5476. 'tab.other': 'Other',
  5477. 'tab.counters': 'Refine Counters',
  5478. 'tab.refine_hist': 'Refine-7',
  5479. 'tab.visits': 'SCA & Visits',
  5480. 'tab.workers': 'Workers',
  5481. 'tab.tools': 'Tools',
  5482. 'tab.resources': 'Resource Tracker',
  5483. 'tab.levels': 'Prof levels',
  5484. 'tab.slots': 'Slots',
  5485. 'static.settings': 'Settings',
  5486. 'button.save&apply': 'Save and Apply',
  5487. 'button.close': 'Close',
  5488. 'button.cycle': 'Cycle SCA',
  5489. //'settings.main.paused': 'Pause Script',
  5490. //'settings.main.paused.tooltip': 'Disable All Automation',
  5491. 'settings.main.debug': 'Enable Debug',
  5492. 'settings.main.debug.tooltip': 'Enable all debug output to console',
  5493. 'settings.main.autoreload': 'Auto Reload',
  5494. 'settings.main.autoreload.tooltip': 'Enabling this will reload the gateway periodically. (Ensure Auto Login is enabled)',
  5495. 'settings.main.incdelay': 'Increase script delays by',
  5496. 'settings.main.incdelay.tooltip': 'Increase the delays the script waits before attempting the actions.',
  5497. 'settings.main.language': 'Script language',
  5498. 'settings.main.language.tooltip': 'Set GUI language of this script (change requires reloading the page)',
  5499. 'settings.main.autologin': 'Attempt to login automatically',
  5500. 'settings.main.autologin.tooltip': 'Automatically attempt to login to the neverwinter gateway site',
  5501. 'settings.main.nw_username': 'Neverwinter Username',
  5502. 'settings.main.nw_username.tooltip': '',
  5503. 'settings.main.nw_password': 'Neverwinter Password',
  5504. 'settings.main.nw_password.tooltip': '',
  5505. 'settings.main.savenexttime': 'Save next process times',
  5506. 'settings.main.savenexttime.tooltip': 'Save the next proffesion times persistently',
  5507. 'settings.general.openrewards': 'Open Reward Chests',
  5508. 'settings.general.openrewards.tooltip': 'Enable opening of leadership chests on character switch',
  5509. 'settings.general.opencelestial': 'Open Celestial Chests',
  5510. 'settings.general.opencelestial.tooltip': 'Open Chests bought with Celestial Coins',
  5511. 'settings.general.openInvocation': 'Open Invocation Rewards',
  5512. 'settings.general.openInvocation.tooltip': 'Enable opening rewards from invocation',
  5513. 'settings.general.keepOneUnopened': 'Keep one reward box unopened',
  5514. 'settings.general.keepOneUnopened.tooltip': 'Used to reserve the slots for the reward boxes',
  5515. 'settings.general.refinead': 'Refine AD',
  5516. 'settings.general.refinead.tooltip': 'Enable refining of AD on character switch',
  5517. 'settings.general.runSCA': 'Run SCA',
  5518. 'settings.general.runSCA.tooltip': 'Running SCA adventures reward after professions',
  5519. 'settings.profession.fillOptionals': 'Fill Optional Assets',
  5520. 'settings.profession.fillOptionals.tooltip': 'Enable to include selecting the optional assets of tasks',
  5521. 'settings.profession.autoPurchase': 'Auto Purchase Resources',
  5522. 'settings.profession.autoPurchase.tooltip': 'Automatically purchase required resources from gateway shop (100 at a time)',
  5523. 'settings.profession.trainAssets': 'Train Assets',
  5524. 'settings.profession.trainAssets.tooltip': 'Enable training/upgrading of asset worker resources',
  5525. 'settings.profession.smartLeadership': 'Smart Asset allocation for leadership',
  5526. 'settings.profession.smartLeadership.tooltip': 'Try to spread and fill non-common assets and supplement with common if needed',
  5527. 'settings.profession.skipPatrol': 'Skip Patrol task if > 10 claims',
  5528. 'settings.profession.skipPatrol.tooltip': 'Skip &quot;Patrol the Mines&quot; leadership task if there are more than 10 mining claims in the inventory (Never, Always, On AD profile, if Leadership level is &gt;= 20, or both of the above )',
  5529. 'settings.profession.stopNotLeadership': 'Stop NON-Leadership task at level: ',
  5530. 'settings.profession.stopNotLeadership.tooltip': 'Block All professions except Leadership at level 20 or 25 and above. Make sure you have Leadership set.',
  5531. 'settings.profession.stopAlchemyAt3': 'Stop Alchemy leveling at level 3',
  5532. 'settings.profession.stopAlchemyAt3.tooltip': 'Block Alchemy tasks at level 3 and above. Make sure you have other tasks set.',
  5533. 'settings.consolid.consolidate': 'Consolidate AD via ZAX',
  5534. 'settings.consolid.consolidate.tooltip': 'Automatically attempt to post, cancel and withdraw AD via ZAX and consolidate to designated character',
  5535. 'settings.consolid.bankerName': 'Character Name of Banker',
  5536. 'settings.consolid.bankerName.tooltip': 'Enter name of the character to hold account AD',
  5537. 'settings.consolid.minToTransfer': 'Min AD for Transfer',
  5538. 'settings.consolid.minToTransfer.tooltip': 'Enter minimum AD limit for it to be considered for transfer off a character',
  5539. 'settings.consolid.minCharBalance': 'Min Character balance',
  5540. 'settings.consolid.minCharBalance.tooltip': 'Enter the amount of AD to always keep available on characters',
  5541. 'settings.consolid.transferRate': 'AD per Zen Rate (in zen)',
  5542. 'settings.consolid.transferRate.tooltip': 'Enter default rate to use for transferring through ZAX',
  5543.  
  5544. },
  5545. 'pl': {
  5546. 'translation.needed': 'wymagane tłumaczenie',
  5547. 'tab.scriptSettings': 'Ustawienia skryptu',
  5548. 'tab.advanced': 'Zaawansowane',
  5549. 'tab.customProfiles': 'Własne profile',
  5550. 'tab.trackedResources': 'Śledzone surowce',
  5551. 'tab.general': 'Ogólne',
  5552. 'tab.professions': 'Profesje',
  5553. 'tab.vendor': 'Kupiec',
  5554. 'tab.consolidation': 'Konsolidacja AD',
  5555. 'tab.copySettings': 'Kopiuj ustawienia',
  5556. 'tab.other': 'Pozostałe',
  5557. 'tab.counters': 'Liczniki szlifowania',
  5558. 'tab.visits': 'Nast.zadanie i SCA',
  5559. 'tab.workers': 'Pracownicy',
  5560. 'tab.tools': 'Narzędzia',
  5561. 'tab.resources': 'Surowce',
  5562. 'tab.levels': 'Poziomy prof.',
  5563. 'tab.slots': 'Sloty',
  5564. 'static.settings': 'Ustawienia',
  5565. 'button.save&apply': 'Zapisz i zastosuj',
  5566. 'button.close': 'Zamknij',
  5567. 'button.cycle': 'Runda SCA',
  5568. //'settings.main.paused': 'Zatrzymaj skrypt',
  5569. //'settings.main.paused.tooltip': 'Wyłącz wszelką automatyzację',
  5570. 'settings.main.debug': 'Włącz debugowanie',
  5571. 'settings.main.debug.tooltip': 'Wyświetl wszystkie komunikaty na konsoli (Ctrl+Shift+i w Chrome/Chromium)',
  5572. 'settings.main.autoreload': 'Automatyczne przeładowanie',
  5573. 'settings.main.autoreload.tooltip': 'Włączenie tej opcji powoduje okresowe przeładowanie strony (Upewnij się, że Automatyczne logowanie jest włączone)',
  5574. 'settings.main.incdelay': 'Zwiększ opóżnienia skryptu o...',
  5575. 'settings.main.incdelay.tooltip': 'Zwiększenie opóźnień, gdy skrypt czeka przed próbą działania (pomocne przy wolnych połączeniach).',
  5576. 'settings.main.language': 'Język skryptu',
  5577. 'settings.main.language.tooltip': 'Język interfejsu tego skryptu (zmiana wymaga przeładowania strony)',
  5578. 'settings.main.autologin': 'Próbuj logować automatycznie',
  5579. 'settings.main.autologin.tooltip': 'Próbuj logować automatycznie do strony gateway',
  5580. 'settings.main.nw_username': 'Nazwa użytkownika Neverwinter',
  5581. 'settings.main.nw_username.tooltip': '',
  5582. 'settings.main.nw_password': 'Hasło do Neverwinter',
  5583. 'settings.main.nw_password.tooltip': '',
  5584. 'settings.main.savenexttime': 'Zapisuj czas następnego zadania',
  5585. 'settings.main.savenexttime.tooltip': 'Zapisuj czas następnego zadania w danych międzysesyjnych',
  5586. 'settings.general.openrewards': 'Otwieraj skrzynki',
  5587. 'settings.general.openrewards.tooltip': 'Otwieraj skrzynki z zadań Przywództwa przy zmianie postaci',
  5588. 'settings.general.openInvocation': 'Otwieraj nagrody z inwokacji',
  5589. 'settings.general.openInvocation.tooltip': 'Otwieraj nagrody z inwokacji - zajmują masę miejsca, bo się nie łączą w stosy',
  5590. 'settings.general.opencelestial': 'Otwieraj skrzynki za monety',
  5591. 'settings.general.opencelestial.tooltip': 'Otwieraj skrzynki kupione za 13 monet z inwokacji',
  5592. 'settings.general.keepOneUnopened': 'Pozostaw jedną skrzynkę nieotwartą',
  5593. 'settings.general.keepOneUnopened.tooltip': 'Potrzebne do zarezerwowania miejsca na nagrody',
  5594. 'settings.general.refinead': 'Szlifuj diamenty',
  5595. 'settings.general.refinead.tooltip': 'Przy zmianie postaci szlifuj diamenty astralne jeśli to możliwe',
  5596. 'settings.general.runSCA': 'Uruchom Wybrzeże Mieczy',
  5597. 'settings.general.runSCA.tooltip': 'Uruchom Wybrzeże Mieczy po wybraniu zadań profesji',
  5598. 'settings.profession.fillOptionals': 'Wypełniaj opcjonalnych pracowników',
  5599. 'settings.profession.fillOptionals.tooltip': 'Pozwól na używanie większej ilości pracowników dla zadań, które na to pozwalają',
  5600. 'settings.profession.autoPurchase': 'Autozakup surowców',
  5601. 'settings.profession.autoPurchase.tooltip': 'Automatycznie kupuj wynagane surowce profesji ze sklepu (po 100 sztuk równocześnie)',
  5602. 'settings.profession.trainAssets': 'Trenuj pracowników',
  5603. 'settings.profession.trainAssets.tooltip': 'Pozwól na trenowanie/ulepszanie zwykłych pracowników',
  5604. 'settings.profession.smartLeadership': 'Inteligentny przydział pracowników do Przywództwa',
  5605. 'settings.profession.smartLeadership.tooltip': 'Próbuje przydzielić jak najmniej zwykłych pracowników do zadań przywództwa',
  5606. 'settings.profession.skipPatrol': 'Pomiń zadanie Patrol jeśli masz >10 zezwoleń',
  5607. 'settings.profession.skipPatrol.tooltip': 'Pomiń zadanie Przywództwa &quot;Patroluj kopalnie&quot; jeśli masz więcej niż 10 pozwoleń górniczych (Nigdy, Zawsze, Gdy wybrany profil to AD, jeśli poziom Przywództwa is &gt;= 20, lub jeśli obydwa poprzednie)',
  5608. 'settings.profession.stopNotLeadership': 'Wstrzymaj profesje inne od Przywództwa na poziomie',
  5609. 'settings.profession.stopNotLeadership.tooltip': 'Nie uruchamiaj zadań profesji innej od Przywództwa po osiągnięciu poziomu. Upewnij się, ze masz ustawione Przywództwo.',
  5610. 'settings.profession.stopAlchemyAt3': 'Wstrzymaj naukę Alchemii na poziomie 3',
  5611. 'settings.profession.stopAlchemyAt3.tooltip': 'Wstrzymaj naukę Alchemii na poziomie 3 lub wyższym. Upewnij się, że masz ustawione inne profesje.',
  5612. 'settings.consolid.consolidate': 'Konsoliduj AD przez ZAX',
  5613. 'settings.consolid.consolidate.tooltip': 'Automatycznie próbuj wysyłać Diamenty Astralne przez wymianę ZEN i wypłacać na jednej postaci',
  5614. 'settings.consolid.bankerName': 'Nazwa Bankiera',
  5615. 'settings.consolid.bankerName.tooltip': 'Wprowadź nazwę postaci, która ma zbierać wszystkie Diamenty Astralne konta',
  5616. 'settings.consolid.minToTransfer': 'Min AD do transferowania',
  5617. 'settings.consolid.minToTransfer.tooltip': 'Minimalna ilość Diamentów Astralnych, przy której nastąpi próba przeniesienia do bankiera',
  5618. 'settings.consolid.minCharBalance': 'Min AD do pozostawienia',
  5619. 'settings.consolid.minCharBalance.tooltip': 'Minimalna ilość Diamentów Astralnych, które powinny pozostać na koncie postaci',
  5620. 'settings.consolid.transferRate': 'Stawka AD za Zen',
  5621. 'settings.consolid.transferRate.tooltip': 'Domyślna stawka Diamentów Astralnych za ZEN użyta do transferowania',
  5622. },
  5623. 'fr': {
  5624. 'translation.needed': 'traduction nécessaire',
  5625. }
  5626. };
  5627. }
  5628.  
  5629. function tr(key) {
  5630. var lang = translation['currLang'];
  5631. if (translation['en'][key] === undefined) {
  5632. console.log("translation: unknown key " + key);
  5633. return "unknown key: " + key;
  5634. }
  5635. if (translation[lang][key] === undefined) {
  5636. console.log('translation needed: lang: ' + lang + ", key: " + key);
  5637. return '/-/ ' + translation['en'][key] + ' /-/';
  5638. }
  5639. return translation[lang][key];
  5640. }
  5641.  
  5642. /** Start, Helpers added by users.
  5643. * Adds fetures, options to base script and can be easily removed if needed
  5644. * Add description so anyone can see if they can use Function somewhere
  5645. * Use "brackets" around function start and end //yourname
  5646. */
  5647. //RottenMind, returns inventory space, use Inventory_bagspace(); gives current free bags slots, from MAC-NW function
  5648.  
  5649. function Inventory_bagspace() {
  5650. var _pbags = client.dataModel.model.ent.main.inventory.playerbags;
  5651. var _bagUnused = 0;
  5652. $.each(_pbags, function(bi, bag) {
  5653. bag.slots.forEach(function(slot) {
  5654. if (slot === null || !slot || slot === undefined) {
  5655. _bagUnused++;
  5656. }
  5657. });
  5658. });
  5659. return _bagUnused;
  5660. }
  5661. //RottenMind
  5662. /** End, Helpers added by users.*/
  5663.  
  5664. // Add the settings button and start a process timer
  5665. addSettings();
  5666. timerHandle = window.setTimeout(function() {
  5667. process();
  5668. }, delay.SHORT);
  5669. })();
  5670.  
  5671.  
  5672.  
  5673.  
  5674. function workerDefinition() {
  5675. return {
  5676. // purple, blue, green, t3, t2, t1
  5677. "Leadership": ["Crafting_Asset_Craftsman_Leadership_T3_Epic", "Crafting_Asset_Craftsman_Leadership_T3_Rare", "Crafting_Asset_Craftsman_Leadership_T3_Uncommon",
  5678. "Crafting_Asset_Craftsman_Leadership_T3_Common", "Crafting_Asset_Craftsman_Leadership_T2_Common", "Crafting_Asset_Craftsman_Leadership_T1_Common_1"
  5679. ],
  5680. "Alchemy": ["Asset_Craftsman_Alchemy_T3_Epic", "Asset_Craftsman_Alchemy_T3_Rare", "Asset_Craftsman_Alchemy_T3_Uncommon",
  5681. "Asset_Craftsman_Alchemy_T3_Common", "Asset_Craftsman_Alchemy_T2_Common", "Asset_Craftsman_Alchemy_T1_Common"
  5682. ],
  5683. "Jewelcrafting": ["Crafting_Asset_Craftsman_Jewelcrafter_T3_Epic", "Crafting_Asset_Craftsman_Jewelcrafter_T3_Rare", "Crafting_Asset_Craftsman_Jewelcrafter_T3_Uncommon",
  5684. "Crafting_Asset_Craftsman_Jewelcrafter_T3_Common", "Crafting_Asset_Craftsman_Jewelcrafter_T2_Common", "Crafting_Asset_Craftsman_Jewelcrafter_T1_Common"
  5685. ],
  5686. "Weaponsmithing": ["Crafting_Asset_Craftsman_Weaponsmith_T3_Epic", "Crafting_Asset_Craftsman_Weaponsmith_T3_Rare", "Crafting_Asset_Craftsman_Weaponsmith_T3_Uncommon",
  5687. "Crafting_Asset_Craftsman_Weaponsmith_T3_Common", "Crafting_Asset_Craftsman_Weaponsmith_T2_Common", "Crafting_Asset_Craftsman_Weaponsmith_T1_Common"
  5688. ],
  5689. "Artificing": ["Crafting_Asset_Craftsman_Artificing_T3_Epic", "Crafting_Asset_Craftsman_Artificing_T3_Rare", "Crafting_Asset_Craftsman_Artificing_T3_Uncommon",
  5690. "Crafting_Asset_Craftsman_Artificing_T3_Common", "Crafting_Asset_Craftsman_Artificing_T2_Common", "Crafting_Asset_Craftsman_Artificing_T1_Common"
  5691. ],
  5692. "Mailsmithing": ["Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Epic", "Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Rare", "Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Uncommon",
  5693. "Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Common", "Crafting_Asset_Craftsman_Armorsmithing_Med_T2_Common", "Crafting_Asset_Craftsman_Armorsmithing_Med_T1_Common"
  5694. ],
  5695. "Platesmithing": ["Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Epic", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Rare", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Uncommon",
  5696. "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Common", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T2_Common", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T1_Common"
  5697. ],
  5698. "Leatherworking": ["Crafting_Asset_Craftsman_Leatherworking_T3_Epic", "Crafting_Asset_Craftsman_Leatherworking_T3_Rare", "Crafting_Asset_Craftsman_Leatherworking_T3_Uncommon",
  5699. "Crafting_Asset_Craftsman_Leatherworking_T3_Common", "Crafting_Asset_Craftsman_Leatherworking_T2_Common", "Crafting_Asset_Craftsman_Leatherworking_T1_Common"
  5700. ],
  5701. "Tailoring": ["Crafting_Asset_Craftsman_Tailoring_T3_Epic", "Crafting_Asset_Craftsman_Tailoring_T3_Rare", "Crafting_Asset_Craftsman_Tailoring_T3_Uncommon",
  5702. "Crafting_Asset_Craftsman_Tailoring_T3_Common", "Crafting_Asset_Craftsman_Tailoring_T2_Common", "Crafting_Asset_Craftsman_Tailoring_T1_Common"
  5703. ],
  5704. "Black Ice Shaping": ["Crafting_Asset_Craftsman_Blackice_T3_Epic", "Crafting_Asset_Craftsman_Blackice_T3_Rare", "Crafting_Asset_Craftsman_Blackice_T3_Uncommon",
  5705. "Crafting_Asset_Craftsman_Blackice_T3_Common"
  5706. ],
  5707. /*
  5708. "Winter Event": ["Crafting_Asset_Craftsman_Winter_Event_T1_Common"],
  5709. "Siege Event": [],
  5710. */
  5711. }
  5712. }
  5713.  
  5714. function toolListDefinition() {
  5715. return {
  5716. "Awl": ["Crafting_Asset_Tool_Awl_Epic", "Crafting_Asset_Tool_Awl_Rare", "Crafting_Asset_Tool_Awl_Uncommon", "Crafting_Asset_Tool_Awl_Common"],
  5717. "Shears": ["Crafting_Asset_Tool_Shears_Epic", "Crafting_Asset_Tool_Shears_Rare", "Crafting_Asset_Tool_Shears_Uncommon", "Crafting_Asset_Tool_Shears_Common"],
  5718. "Hammer": ["Crafting_Asset_Tool_Hammer_Epic", "Crafting_Asset_Tool_Hammer_Rare", "Crafting_Asset_Tool_Shears_Uncommon", "Crafting_Asset_Tool_Hammer_Common", ],
  5719. "Needle": ["Crafting_Asset_Tool_Needle_Epic", "Crafting_Asset_Tool_Needle_Rare", "Crafting_Asset_Tool_Needle_Uncommon", "Crafting_Asset_Tool_Needle_Common", ],
  5720. "Bellows": ["Crafting_Asset_Tool_Bellows_Epic", "Crafting_Asset_Tool_Bellows_Rare", "Crafting_Asset_Tool_Bellows_Uncommon", "Crafting_Asset_Tool_Bellows_Common"],
  5721. "Bezelpusher": ["Crafting_Asset_Tool_Bezelpusher_Epic", "Crafting_Asset_Tool_Bezelpusher_Rare", "Crafting_Asset_Tool_Bezelpusher_Uncommon", "Crafting_Asset_Tool_Bezelpusher_Common"],
  5722. "Mortar": ["Asset_Tool_Mortar_Epic", "Asset_Tool_Mortar_Rare", "Asset_Tool_Mortar_Uncommon", "Asset_Tool_Mortar_Common"],
  5723. "Anvil": ["Crafting_Asset_Tool_Anvil_Epic", "Crafting_Asset_Tool_Anvil_Rare", "Crafting_Asset_Tool_Anvil_Uncommon", "Crafting_Asset_Tool_Anvil_Common", ],
  5724. "Grindstone": ["Crafting_Asset_Tool_Grindstone_Epic", "Crafting_Asset_Tool_Grindstone_Rare", "Crafting_Asset_Tool_Grindstone_Uncommon", "Crafting_Asset_Tool_Grindstone_Common", ],
  5725. "Philosophersstone": ["Asset_Tool_Philosophersstone_Epic", "Asset_Tool_Philosophersstone_Rare", "Asset_Tool_Philosophersstone_Uncommon", "Asset_Tool_Philosophersstone_Common"],
  5726. "Loupe": ["Crafting_Asset_Tool_Loupe_Epic", "Crafting_Asset_Tool_Loupe_Rare", "Crafting_Asset_Tool_Loupe_Uncommon", "Crafting_Asset_Tool_Loupe_Common", ],
  5727. "Graver": ["Crafting_Asset_Tool_Graver_Epic", "Crafting_Asset_Tool_Graver_Rare", "Crafting_Asset_Tool_Graver_Uncommon", "Crafting_Asset_Tool_Graver_Common", ],
  5728. "Crucible": ["Asset_Tool_Crucible_Epic", "Asset_Tool_Crucible_Rare", "Asset_Tool_Crucible_Uncommon", "Asset_Tool_Crucible_Common", ],
  5729. "Tongs": ["Crafting_Asset_Tool_Tongs_Epic", "Crafting_Asset_Tool_Tongs_Rare", "Crafting_Asset_Tool_Tongs_Uncommon", "Crafting_Asset_Tool_Tongs_Common", ],
  5730. /*
  5731. "Crafting_Asset_Tool_Leatherworking_T1_Epic",
  5732. "Crafting_Asset_Tool_Gauntlets_Common"
  5733. "Crafting_Asset_Tool_Leadership_T3_Common","Crafting_Asset_Tool_Leadership_T2_Common"
  5734. */
  5735. }
  5736. }
  5737.  
  5738. function audioFile() {
  5739. return "<audio id='soundFX'><source src='"+
  5740. "data:audio/mpeg;base64,//uQZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAABTAAB6WQAABQwUGhogJSkuMjI2OTw/QkJGSUxRVFRXWl1gY2Nnamxvc3N2eXx/goKFiIqPkZGUl"+
  5741. "pqcnJ+ipairq6+ztbi7u77Bw8fLy83Q09XY2Nrd3+Hk5Obo6uzt7fDx8/X29vj6//8AAAA8TEFNRTMuOThyBK8AAAAAAAAAADQgJAbpTQABzAAAelnrZF3hAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+
  5742. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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RhF0QRAwAAAAAA//vgZAaACUZmW35rYKEICuqfzWiAU2kvc"+
  5756. "/2HgAJGtG3/sNAEAAD8yQIwUIHkQCKEyRiQIRIMmlAJtEleYUJNsmBba00l83vLP0q7S6YQT3HAhMEg4TcYvMakCiQHA7ryZncDQXSrCUjdFugIWfeCmmQu6k44aFw0HO2Z0TmWAgF3yhHgC3jG5+KTbLLqPgALA"+
  5757. "CWiTiQBCcRj4KarPmAB5r7llPWJ+BKGNsTUdboCiFbpWOvqnGIh0RkwxWnIApwwUgNuxt/28rXtYSwwkMggCkJIDrfaEjg+yDxpZsHKJoxuZgAmFChMAjSyYIYGJosujFiVv/WafG9f4VARCDgQKDiBWbYGPUH4E"+
  5758. "/wIKEymIxI44dIhQyYpGrwuqVh1Pe////////////kn/JP//kv/9PbsU+dJT16Snu1K92p//nVN1LAEAKQAwCQAAAAAABYTWLBJKAkTKhpKAQpgCRxx8teFLwwcJu6A9sUKVQkiPb5tehgHOQEajLNEf5e+j/wKS"+
  5759. "lmnRqNUEbiuPy5dkMU5EAZoggMoKDFaAR9IsWvhqymZEU0Q4H6i7qlr6AzaE2aGLdZyn4QFx0t+ltDoWkAxsvUIQoqETQBiw2xBA9SlrrPREwhkILoI10L74YpAViBASTnOROOpOAUxdRaujTQQQLnEhYQBKpRTR"+
  5760. "MVKcv/QxswcEu2YEMk1RrRf5FqZFkH++CJ5myIhbkTei/473UrYcwEGDFa//6buURS4gwiERi3//SUl6kpL1/71Pf+npza7VPoO2sur72a3+mYh3BMAAAdDYHrDmB0jkMGSERFrqaL1Z3ynjU/GPhCrXMJnvDw/8"+
  5761. "h2KOsaDau9xcZvrcGdcOWLdtZY4sBFrf//bljH8sZtUg/FG/OlhWA41e8vjWm21ruc42WGLmBLjH2oXaxGrh/Ecr6+NzeTUSP30kBiZXFUs64eRG36gtkf3/hxYbEztz3TM4/+XLirBRpMTOe97z5fWGP/reGiIA"+
  5762. "AAAAYzJORkcjogZmhwiCmFWvjnc60+DohSD1IRFNk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