Neverwinter gateway - Professions Robot

Automatically selects professions for empty slots

目前為 2015-12-09 提交的版本,檢視 最新版本

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