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.7
  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 forceSettingsResetOnUpgrade = true;
  49. var scriptVersion = 4.7;
  50. var forceResetOnVerBelow = 4.7;
  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: 'Superior Mark of Potency',
  1840. name: 'Gem_Upgrade_Resource_R5',
  1841. bank: false, unbound: true, btc: false, bta: true
  1842. }, {
  1843. fname: 'Greater Mark of Potency',
  1844. name: 'Gem_Upgrade_Resource_R4',
  1845. bank: false, unbound: true, btc: false, bta: true
  1846. }, {
  1847. fname: 'Greater Mark of Power',
  1848. name: 'Artifact_Upgrade_Resource_R3_A',
  1849. bank: false, unbound: true, btc: false, bta: true
  1850. }, {
  1851. fname: 'Greater Mark of Stability',
  1852. name: 'Artifact_Upgrade_Resource_R3_B',
  1853. bank: false, unbound: true, btc: false, bta: true
  1854. }, {
  1855. fname: 'Greater Mark of Union',
  1856. name: 'Artifact_Upgrade_Resource_R3_C',
  1857. bank: false, unbound: true, btc: false, bta: true
  1858. }, {
  1859. fname: 'Greater Resonance Stone',
  1860. name: 'Artifactgear_Food_R4_A',
  1861. bank: false, unbound: true, btc: false, bta: false
  1862. }, {
  1863. fname: 'Greater Thaumaturgic Stone',
  1864. name: 'Gemfood_Stone_R4',
  1865. bank: false, unbound: true, btc: false, bta: false
  1866. }, {
  1867. fname: 'Greater Power Stone',
  1868. name: 'Artifactfood_R4_A',
  1869. bank: false, unbound: true, btc: false, bta: false
  1870. }, {
  1871. fname: 'Greater Stability Stone',
  1872. name: 'Artifactfood_R4_B',
  1873. bank: false, unbound: true, btc: false, bta: false
  1874. }, {
  1875. fname: 'Greater Union Stone',
  1876. name: 'Artifactfood_R4_C',
  1877. bank: false, unbound: true, btc: false, bta: false
  1878. }, {
  1879. fname: 'Black Opal',
  1880. name: 'Gemfood_R5',
  1881. bank: false, unbound: true, btc: false, bta: false
  1882. }, {
  1883. fname: 'Mark of Potency',
  1884. name: 'Gem_Upgrade_Resource_R3',
  1885. bank: false, unbound: true, btc: false, bta: true
  1886. }, {
  1887. fname: 'Mark of Power',
  1888. name: 'Artifact_Upgrade_Resource_R2_A',
  1889. bank: false, unbound: true, btc: false, bta: true
  1890. }, {
  1891. fname: 'Mark of Stability',
  1892. name: 'Artifact_Upgrade_Resource_R2_B',
  1893. bank: false, unbound: true, btc: false, bta: true
  1894. }, {
  1895. fname: 'Mark of Union',
  1896. name: 'Artifact_Upgrade_Resource_R2_C',
  1897. bank: false, unbound: true, btc: false, bta: true
  1898. }, {
  1899. fname: 'Resonance Stone',
  1900. name: 'Artifactgear_Food_R3_A',
  1901. bank: false, unbound: true, btc: false, bta: false
  1902. }, {
  1903. fname: 'Thaumaturgic Stone',
  1904. name: 'Gemfood_Stone_R3',
  1905. bank: false, unbound: true, btc: false, bta: false
  1906. }, {
  1907. fname: 'Power Stone',
  1908. name: 'Artifactfood_R3_A',
  1909. bank: false, unbound: true, btc: false, bta: false
  1910. }, {
  1911. fname: 'Stability Stone',
  1912. name: 'Artifactfood_R3_B',
  1913. bank: false, unbound: true, btc: false, bta: false
  1914. }, {
  1915. fname: 'Union Stone',
  1916. name: 'Artifactfood_R3_C',
  1917. bank: false, unbound: true, btc: false, bta: false
  1918. }, {
  1919. fname: 'Flawless Sapphire',
  1920. name: 'Gemfood_R4',
  1921. bank: false, unbound: true, btc: false, bta: false
  1922. }, {
  1923. fname: 'Aquamarine',
  1924. name: 'Gemfood_R3',
  1925. bank: false, unbound: true, btc: false, bta: false
  1926. }, {
  1927. fname: 'Lesser Mark of Potency',
  1928. name: 'Gem_Upgrade_Resource_R2',
  1929. bank: false, unbound: true, btc: false, bta: true
  1930. }, {
  1931. fname: 'Lesser Mark of Power',
  1932. name: 'Artifact_Upgrade_Resource_R1_A',
  1933. bank: false, unbound: true, btc: false, bta: true
  1934. }, {
  1935. fname: 'Lesser Mark of Stability',
  1936. name: 'Artifact_Upgrade_Resource_R1_B',
  1937. bank: false, unbound: true, btc: false, bta: true
  1938. }, {
  1939. fname: 'Lesser Mark of Union',
  1940. name: 'Artifact_Upgrade_Resource_R1_C',
  1941. bank: false, unbound: true, btc: false, bta: true
  1942. }, {
  1943. fname: 'Lesser Resonance Stone',
  1944. name: 'Artifactgear_Food_R2_A',
  1945. bank: false, unbound: true, btc: false, bta: false
  1946. }, {
  1947. fname: 'Lesser Thaumaturgic Stone',
  1948. name: 'Gemfood_Stone_R2',
  1949. bank: false, unbound: true, btc: false, bta: false
  1950. }, {
  1951. fname: 'Lesser Power Stone',
  1952. name: 'Artifactfood_R2_A',
  1953. bank: false, unbound: true, btc: false, bta: false
  1954. }, {
  1955. fname: 'Lesser Stability Stone',
  1956. name: 'Artifactfood_R2_B',
  1957. bank: false, unbound: true, btc: false, bta: false
  1958. }, {
  1959. fname: 'Lesser Union Stone',
  1960. name: 'Artifactfood_R2_C',
  1961. bank: false, unbound: true, btc: false, bta: false
  1962. }, {
  1963. fname: 'Peridot',
  1964. name: 'Gemfood_R2',
  1965. bank: false, unbound: true, btc: false, bta: false
  1966. }, {
  1967. fname: 'Minor Resonance Stone',
  1968. name: 'Artifactgear_Food_R1_A',
  1969. bank: false, unbound: true, btc: false, bta: false
  1970. }, {
  1971. fname: 'Minor Thaumaturgic Stone',
  1972. name: 'Gemfood_Stone_R1',
  1973. bank: false, unbound: true, btc: false, bta: false
  1974. }, {
  1975. fname: 'Minor Power Stone',
  1976. name: 'Artifactfood_R1_A',
  1977. bank: false, unbound: true, btc: false, bta: false
  1978. }, {
  1979. fname: 'Minor Stability Stone',
  1980. name: 'Artifactfood_R1_B',
  1981. bank: false, unbound: true, btc: false, bta: false
  1982. }, {
  1983. fname: 'Minor Union Stone',
  1984. name: 'Artifactfood_R1_C',
  1985. bank: false, unbound: true, btc: false, bta: false
  1986. }, {
  1987. fname: 'White Pearl',
  1988. name: 'Gemfood_R1',
  1989. bank: false, unbound: true, btc: false, bta: false
  1990. },
  1991. ];
  1992. var trackResources;
  1993. try {
  1994. trackResources = JSON.parse(GM_getValue("tracked_resources", null));
  1995. } catch (e) {
  1996. trackResources = null;
  1997. }
  1998. if (!trackResources) {
  1999. trackResources = defaultTrackResources;
  2000. };
  2001.  
  2002. var defaultScriptSettings = {
  2003. general: {
  2004. saveCharNextTime: true,
  2005. scriptPaused: false,
  2006. leadershipMode: false,
  2007. leadershipSound: 50,
  2008. language: 'en',
  2009. scriptDebugMode: false,
  2010. scriptAutoReload: false,
  2011. autoLogin: false,
  2012. autoLoginAccount: "",
  2013. autoLoginPassword: "",
  2014. autoReload: false,
  2015. scriptDelayFactor: 1,
  2016. maxCollectTaskAttempts: 2,
  2017. defaultVisitTime: 1*60*60*1000, // 1 hour default
  2018. unasignedSlotRecheck: 0.5*60*60*1000, // 0.5 hour default
  2019. leadershipTaskTimeout: 5*60*1000, // 5 minutes default
  2020. leadershipTaskTimeoutRearm: 1*60*1000, // 1 minutes default
  2021. }
  2022. };
  2023.  
  2024.  
  2025. // Loading script settings.
  2026. var tempScriptSettings;
  2027. try {
  2028. tempScriptSettings = JSON.parse(GM_getValue("settings__script", "{}"));
  2029. } catch (e) {
  2030. tempScriptSettings = null;
  2031. }
  2032. if (!tempScriptSettings) {
  2033. console.warn('Script settings couldn\'t be retrieved, loading defaults.');
  2034. tempScriptSettings = {};
  2035. };
  2036. scriptSettings = $.extend(true, {}, defaultScriptSettings, tempScriptSettings);
  2037. // Loading custom profiles.
  2038. try {
  2039. customProfiles = JSON.parse(GM_getValue("custom_profiles", null));
  2040. } catch (e) {
  2041. customProfiles = null;
  2042. }
  2043. if (!customProfiles) {
  2044. console.warn('Custom profiles couldn\'t be retrieved.');
  2045. customProfiles = [];
  2046. };
  2047. customProfiles.forEach(function (cProfile, idx) {
  2048. addProfile(cProfile.taskName, cProfile.profile, cProfile.baseProfile);
  2049. });
  2050. unsafeWindow.console.log('DebugMode set to: ' + scriptSettings.general.scriptDebugMode);
  2051. console = scriptSettings.general.scriptDebugMode ? unsafeWindow.console || fouxConsole : fouxConsole;
  2052.  
  2053. var delay_modifier = parseFloat(scriptSettings.general.scriptDelayFactor);
  2054. delay.SHORT *= delay_modifier; delay.MEDIUM *= delay_modifier; delay.LONG *= delay_modifier;
  2055. delay.MINS *= 1; delay.DEFAULT *= delay_modifier; delay.TIMEOUT *= delay_modifier;
  2056.  
  2057.  
  2058. var defaultAccountSettings = {
  2059. vendorSettings: {
  2060. vendorJunk: false,
  2061. vendorGreenUnidAll: false,
  2062. vendorBlueUnidAll: false,
  2063. vendorInvocationBlessingsAll: false,
  2064. vendorKitsLimit: false,
  2065. vendorAltarsLimit: false,
  2066. vendorKitsAll: false,
  2067. vendorAltarsAll: false,
  2068. vendorProfResults: false,
  2069. vendorPots1: false,
  2070. vendorPots2: false,
  2071. vendorPots3: false,
  2072. vendorPots4: false,
  2073. vendorPots5: false,
  2074. vendorPots6: false,
  2075. vendorHealingPots: false,
  2076. vendorHealingPotsAll: false,
  2077. vendorEnchR1: false,
  2078. vendorEnchR2: false,
  2079. vendorEnchR3: false,
  2080. vendorEnchR4: false,
  2081. vendorLesserMarks: false,
  2082. },
  2083. professionSettings: {
  2084. fillOptionals: true,
  2085. autoPurchaseRes: true,
  2086. trainAssets: true,
  2087. spreadLeadershipAssets: true,
  2088. stopNotLeadership: 0,
  2089. stopAlchemyAt3: false,
  2090. },
  2091. generalSettings: {
  2092. refineAD: true,
  2093. openRewards: false,
  2094. openCelestialBox: false,
  2095. openInvocation: true,
  2096. keepOneUnopened: false,
  2097. runSCA: 'never',
  2098. SCADailyReset: Date.now() - 24*60*60*1000,
  2099. },
  2100. consolidationSettings: {
  2101. bankCharName: "",
  2102. transferRate: 100,
  2103. consolidate: false,
  2104. minCharBalance: 0,
  2105. minToTransfer: 100,
  2106. },
  2107. };
  2108.  
  2109.  
  2110. var defaultCharSettings = {
  2111. charName: "",
  2112. general: {
  2113. active: false,
  2114. overrideGlobalSettings: false,
  2115. manualTaskSlots: false,
  2116. },
  2117. vendorSettings: {
  2118. vendorJunk: false,
  2119. vendorGreenUnidAll: false,
  2120. vendorBlueUnidAll: false,
  2121. vendorInvocationBlessingsAll: false,
  2122. vendorKitsLimit: false,
  2123. vendorAltarsLimit: false,
  2124. vendorKitsAll: false,
  2125. vendorAltarsAll: false,
  2126. vendorProfResults: false,
  2127. vendorPots1: false,
  2128. vendorPots2: false,
  2129. vendorPots3: false,
  2130. vendorPots4: false,
  2131. vendorPots5: false,
  2132. vendorPots6: false,
  2133. vendorHealingPots: false,
  2134. vendorHealingPotsAll: false,
  2135. vendorEnchR1: false,
  2136. vendorEnchR2: false,
  2137. vendorEnchR3: false,
  2138. vendorEnchR4: false,
  2139. vendorLesserMarks: false,
  2140. },
  2141. professionSettings: {
  2142. fillOptionals: true,
  2143. autoPurchaseRes: true,
  2144. trainAssets: true,
  2145. spreadLeadershipAssets: true,
  2146. stopNotLeadership: 0,
  2147. stopAlchemyAt3: false,
  2148. },
  2149. generalSettings: {
  2150. refineAD: true,
  2151. openRewards: false,
  2152. openCelestialBox: false,
  2153. openInvocation: true,
  2154. keepOneUnopened: false,
  2155. runSCA: 'never',
  2156. },
  2157. consolidationSettings: {
  2158. consolidate: false,
  2159. minCharBalance: 0,
  2160. minToTransfer: 100,
  2161. },
  2162. taskListSettings: {},
  2163. taskListSettingsManual: [],
  2164. };
  2165.  
  2166. //Adding taskList defaults.
  2167. tasklist.forEach(function(task) {
  2168. var profileNames = [];
  2169. task.profiles.forEach(function(profile) {
  2170. if (profile.isProfileActive) profileNames.push({
  2171. name: profile.profileName,
  2172. value: profile.profileName
  2173. });
  2174. });
  2175. defaultCharSettings.taskListSettings[task.taskListName] = {};
  2176. defaultCharSettings.taskListSettings[task.taskListName].taskSlots = task.taskDefaultSlotNum;
  2177. defaultCharSettings.taskListSettings[task.taskListName].taskProfile = profileNames[0].value;
  2178. defaultCharSettings.taskListSettings[task.taskListName].taskPriority = task.taskDefaultPriority;
  2179. defaultCharSettings.taskListSettings[task.taskListName].stopTaskAtLevel = 0;
  2180. });
  2181.  
  2182. for (var i = 0; i < 9; i++) {
  2183. defaultCharSettings.taskListSettingsManual[i] = {};
  2184. defaultCharSettings.taskListSettingsManual[i].Profession = tasklist[0].taskListName;
  2185. defaultCharSettings.taskListSettingsManual[i].Profile = tasklist[0].profiles[0].profileName;
  2186. defaultCharSettings.taskListSettingsManual[i].fillAssets = 0;
  2187. }
  2188. // 0 - default, 1 - do not fill, 2 - people (white to purple), 3 - people (purple to white), 4 - tools
  2189. var charSlotsFillAssetsOptions = ['default', 'Do not fill', 'people (white to purple)', 'people (purple to white)', 'tools'];
  2190.  
  2191. // Usable only after login (return account or char settings, depending on override and match)
  2192. function getSetting(group, name) {
  2193. var override = false;
  2194. if (typeof(charSettingsList[curCharName]) !== undefined && typeof(charSettingsList[curCharName].general) !== undefined) {
  2195. override = charSettingsList[curCharName].general.overrideGlobalSettings;
  2196. }
  2197. else console.warn("overrideGlobalSettings could not been reached." );
  2198.  
  2199. if (override) {
  2200. if (typeof(charSettingsList[curCharName][group]) !== undefined &&
  2201. typeof(charSettingsList[curCharName][group][name]) !== undefined) {
  2202. return charSettingsList[curCharName][group][name];
  2203. }
  2204. else console.warn("charSetting value could not been reached for " + group + " " + name);
  2205. }
  2206. if (typeof(accountSettings[group]) !== undefined &&
  2207. typeof(accountSettings[group][name]) !== undefined) {
  2208. return accountSettings[group][name];
  2209. }
  2210. else console.warn("accountSettings value could not been reached for " + group + " " + name);
  2211. return null;
  2212. }
  2213. var defaultVisitTimeOpts = []; defaultVisitTimeOpts.push({ name: 'none', value: 0});
  2214. for (var i = 1; i <= 24; i++) defaultVisitTimeOpts.push({ name: i, value: i*60*60*1000});
  2215.  
  2216. // UI Settings
  2217. var settingnames = [
  2218. //{scope: 'script', group: 'general', name: 'scriptPaused', title: 'Pause Script', type: 'checkbox', pane: 'main', tooltip: 'Disable All Automation'},
  2219. {scope: 'script', group: 'general', name: 'language', title: tr('settings.main.language'), type: 'select', pane: 'main', tooltip: tr('settings.main.language.tooltip'),
  2220. opts: [ { name: 'english', value: 'en'},
  2221. { name: 'polski', value: 'pl'},
  2222. { name: 'français', value: 'fr'}],
  2223. onchange : function(newValue) {
  2224. GM_setValue('language', newValue);
  2225. }
  2226. },
  2227. {scope: 'script', group: 'general', name: 'scriptDebugMode', title: tr('settings.main.debug'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.debug.tooltip'),
  2228. onchange: function(newValue) {
  2229. unsafeWindow.console.log('DebugMode set to: ' + newValue);
  2230. console = newValue ? unsafeWindow.console || fouxConsole : fouxConsole;
  2231. }
  2232. },
  2233. {scope: 'script', group: 'general', name: 'autoReload', title: tr('settings.main.autoreload'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.autoreload.tooltip')},
  2234. {scope: 'script', group: 'general', name: 'scriptDelayFactor', title: tr('settings.main.incdelay'), type: 'select', pane: 'main', tooltip: tr('settings.main.incdelay.tooltip'),
  2235. opts: [ { name: 'default - 1', value: '1'},
  2236. { name: '1.5', value: '1.5'},
  2237. { name: '2', value: '2'},
  2238. { name: '2.5', value: '2.5'},
  2239. { name: '3', value: '3'}],
  2240. },
  2241. {scope: 'script', group: 'general', name: 'autoLogin', title: tr('settings.main.autologin'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.autologin.tooltip')},
  2242. {scope: 'script', group: 'general', name: 'autoLoginAccount', title: tr('settings.main.nw_username'), type: 'text', pane: 'main', tooltip: tr('settings.main.nw_username.tooltip')},
  2243. {scope: 'script', group: 'general', name: 'autoLoginPassword', title: tr('settings.main.nw_password'), type: 'password', pane: 'main', tooltip: tr('settings.main.nw_password.tooltip')},
  2244. {scope: 'script', group: 'general', name: 'saveCharNextTime', title: tr('settings.main.savenexttime'), type: 'checkbox', pane: 'main', tooltip: tr('settings.main.savenexttime.tooltip')},
  2245. {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',
  2246. opts: [ { name: '1', value: 1}, { name: '2', value: 2}, { name: '3', value: 3}], },
  2247. {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',
  2248. opts: defaultVisitTimeOpts, },
  2249. {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',
  2250. 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}], },
  2251.  
  2252. {scope: 'script', group: 'general', name: 'leadershipTaskTimeout', title: 'Timeout in manual leadership mode (in minutes)', type: 'select', pane: 'manual',
  2253. tooltip: 'In manual leadership mode the script will wait this long for you to manually assign a leadership task',
  2254. opts: [ { name: '1', value: 1*60*1000}, { name: '5', value: 5*60*1000}, { name: '10', value: 10*60*1000}], },
  2255. {scope: 'script', group: 'general', name: 'leadershipTaskTimeoutRearm', title: 'Re-arm time in manual leadership mode (in minutes)', type: 'select', pane: 'manual',
  2256. tooltip: 'After a timeout in manual leadership mode the script will do non-leadership tasks for this long',
  2257. opts: [ { name: '1', value: 1*60*1000}, { name: '1.5', value: 1.5*60*1000}, { name: '2', value: 2*60*1000}], },
  2258. {scope: 'script', group: 'general', name: 'leadershipSound', title: 'Volume of notification in manual leadership mode', type: 'select', pane: 'manual',
  2259. tooltip: 'Volume of the sound to be played',
  2260. 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} ], },
  2261.  
  2262.  
  2263. {scope: 'account', group: 'generalSettings', name: 'openRewards', title: tr('settings.general.openrewards'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openrewards.tooltip')},
  2264. {scope: 'account', group: 'generalSettings', name: 'openCelestialBox', title: tr('settings.general.opencelestial'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.opencelestial.tooltip')},
  2265. {scope: 'account', group: 'generalSettings', name: 'keepOneUnopened', title: tr('settings.general.keepOneUnopened'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.keepOneUnopened.tooltip')},
  2266. {scope: 'account', group: 'generalSettings', name: 'openInvocation', title: tr('settings.general.openInvocation'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openInvocation.tooltip')},
  2267. {scope: 'account', group: 'generalSettings', name: 'refineAD', title: tr('settings.general.refinead'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.refinead.tooltip')},
  2268. {scope: 'account', group: 'generalSettings', name: 'runSCA', title: tr('settings.general.runSCA'), type: 'select', pane: 'main', tooltip: tr('settings.general.runSCA.tooltip'),
  2269. opts: [ { name: 'never', value: 'never'},
  2270. { name: 'free time', value: 'free'},
  2271. { name: 'always', value: 'always'}],
  2272. },
  2273. {scope: 'account', group: 'professionSettings', name: 'fillOptionals', type: 'checkbox', pane: 'prof', title: tr('settings.profession.fillOptionals'), tooltip: tr('settings.profession.fillOptionals.tooltip')},
  2274. {scope: 'account', group: 'professionSettings', name: 'autoPurchaseRes', type: 'checkbox', pane: 'prof', title: tr('settings.profession.autoPurchase'), tooltip: tr('settings.profession.autoPurchase.tooltip')},
  2275. {scope: 'account', group: 'professionSettings', name: 'trainAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.trainAssets'), tooltip: tr('settings.profession.trainAssets.tooltip')},
  2276. {scope: 'account', group: 'professionSettings', name: 'spreadLeadershipAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.spreadLeadership'), tooltip: tr('settings.profession.spreadLeadership.tooltip')},
  2277. {scope: 'account', group: 'professionSettings', name: 'stopNotLeadership', type:'select', pane: 'prof', title: tr('settings.profession.stopNotLeadership'), tooltip: tr('settings.profession.stopNotLeadership.tooltip'),
  2278. opts:[{name:'never',value:'0'},{name: '20' ,value: 20},{name: '25' ,value: 25}]},
  2279. {scope: 'account', group: 'professionSettings', name: 'stopAlchemyAt3', type:'checkbox', pane: 'prof', title: tr('settings.profession.stopAlchemyAt3'), tooltip: tr('settings.profession.stopAlchemyAt3.tooltip')},
  2280. {scope: 'account', group: 'vendorSettings', name:'vendorJunk', type:'checkbox', pane:'vend', title:'Vendor junk..', tooltip:'Vendor all junk items (currently) winterfest fireworks+lanterns'},
  2281. {scope: 'account', group: 'vendorSettings', name:'vendorGreenUnidAll', type:'checkbox', pane:'vend', title:'Vendor All Green Unidentified Items', tooltip:'Vendor all green unidentified items'},
  2282. {scope: 'account', group: 'vendorSettings', name:'vendorBlueUnidAll', type:'checkbox', pane:'vend', title:'Vendor All Blue Unidentified Items', tooltip:'Vendor all blue unidentified items'},
  2283. {scope: 'account', group: 'vendorSettings', name:'vendorInvocationBlessingsAll', type:'checkbox', pane:'vend', title:'Vendor All Invocation Blessings', tooltip:'Vendor all Invocation Blessings'},
  2284. {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'},
  2285. {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'},
  2286. {scope: 'account', group: 'vendorSettings', name:'vendorKitsAll', type:'checkbox', pane:'vend', title:'Vendor All Node Kits', tooltip:'Sell ALL skill kits.'},
  2287. {scope: 'account', group: 'vendorSettings', name:'vendorAltarsAll', type:'checkbox', pane:'vend', title:'Vendor All Altar', tooltip:'Sell ALL Altars.'},
  2288. {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.'},
  2289. {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'},
  2290. {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'},
  2291. {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'},
  2292. {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'},
  2293. {scope: 'account', group: 'vendorSettings', name:'vendorPots5', type:'checkbox', pane:'vend', title:'Vendor major potions (lvl 60)', tooltip:'Vendor major potions (lvl 60)'},
  2294. {scope: 'account', group: 'vendorSettings', name:'vendorPots6', type:'checkbox', pane:'vend', title:'Vendor superior potions (lvl 70)', tooltip:'Vendor superior potions (lvl 70)'},
  2295. {scope: 'account', group: 'vendorSettings', name:'vendorHealingPots', type:'checkbox', pane:'vend', title:'Vendor Healing Potions (1-60)', tooltip:'Vendor healing potions (lvl 60)'},
  2296. {scope: 'account', group: 'vendorSettings', name:'vendorHealingPotsAll', type:'checkbox', pane:'vend', title:'Vendor All Healing Potions', tooltip:'Vendor all healing potions'},
  2297. {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'},
  2298. {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'},
  2299. {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'},
  2300. {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'},
  2301. {scope: 'account', group: 'vendorSettings', name:'vendorLesserMarks', type:'checkbox', pane:'vend', title:'Vendor Lesser Marks', tooltip:'Vendor all Lesser Marks found in player bags'},
  2302. {scope: 'account', group: 'consolidationSettings', name:'consolidate', type:'checkbox', pane:'bank', title: tr('settings.consolid.consolidate'), tooltip: tr('settings.consolid.consolidate.tooltip') ,border:true},
  2303. {scope: 'account', group: 'consolidationSettings', name:'bankCharName', type:'text', pane:'bank', title: tr('settings.consolid.bankerName'), tooltip: tr('settings.consolid.bankerName.tooltip')},
  2304. {scope: 'account', group: 'consolidationSettings', name:'minToTransfer', type:'text', pane:'bank', title: tr('settings.consolid.minToTransfer'), tooltip: tr('settings.consolid.minToTransfer.tooltip')},
  2305. {scope: 'account', group: 'consolidationSettings', name:'minCharBalance', type:'text', pane:'bank', title: tr('settings.consolid.minCharBalance'), tooltip: tr('settings.consolid.minCharBalance.tooltip')},
  2306. {scope: 'account', group: 'consolidationSettings', name:'transferRate', type:'text', pane:'bank', title: tr('settings.consolid.transferRate'), tooltip: tr('settings.consolid.transferRate.tooltip')},
  2307.  
  2308. {scope: 'char', group: 'general', name: 'active', type:'checkbox', pane: 'main_not_tab', title: 'Active', tooltip: 'The char will be processed by the script',
  2309. onchange: function(newValue, elm) {
  2310. if (newValue) {
  2311. $(elm).parents('.ui-accordion-content').prev().removeClass('inactive');
  2312. } else {
  2313. $(elm).parents('.ui-accordion-content').prev().addClass('inactive');
  2314. }
  2315. }
  2316. },
  2317. {scope: 'char', group: 'general', name:'overrideGlobalSettings', type:'checkbox', pane:'main_not_tab', title:'Override account settings for this char', tooltip:''},
  2318. {scope: 'char', group: 'general', name:'manualTaskSlots', type:'checkbox', pane:'main_not_tab', title:'Use manual task allocation tab', tooltip:'Per slot profile allocation'},
  2319. {scope: 'char', group: 'generalSettings', name: 'openRewards', title: tr('settings.general.openrewards'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openrewards.tooltip')},
  2320. {scope: 'char', group: 'generalSettings', name: 'openCelestialBox', title: tr('settings.general.opencelestial'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.opencelestial.tooltip')},
  2321. {scope: 'char', group: 'generalSettings', name: 'keepOneUnopened', title: tr('settings.general.keepOneUnopened'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.keepOneUnopened.tooltip')},
  2322. {scope: 'char', group: 'generalSettings', name: 'openInvocation', title: tr('settings.general.openInvocation'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.openInvocation.tooltip')},
  2323. {scope: 'char', group: 'generalSettings', name: 'refineAD', title: tr('settings.general.refinead'), type: 'checkbox', pane: 'main', tooltip: tr('settings.general.refinead.tooltip')},
  2324. {scope: 'char', group: 'generalSettings', name: 'runSCA', title: tr('settings.general.runSCA'), type: 'select', pane: 'main', tooltip: tr('settings.general.runSCA.tooltip'),
  2325. opts: [ { name: 'never', value: 'never'},
  2326. { name: 'free time', value: 'free'},
  2327. { name: 'always', value: 'always'}],
  2328. },
  2329. {scope: 'char', group: 'professionSettings', name: 'fillOptionals', type: 'checkbox', pane: 'prof', title: tr('settings.profession.fillOptionals'), tooltip: tr('settings.profession.fillOptionals.tooltip')},
  2330. {scope: 'char', group: 'professionSettings', name: 'autoPurchaseRes', type: 'checkbox', pane: 'prof', title: tr('settings.profession.autoPurchase'), tooltip: tr('settings.profession.autoPurchase.tooltip')},
  2331. {scope: 'char', group: 'professionSettings', name: 'trainAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.trainAssets'), tooltip: tr('settings.profession.trainAssets.tooltip')},
  2332. {scope: 'char', group: 'professionSettings', name: 'spreadLeadershipAssets', type:'checkbox', pane: 'prof', title: tr('settings.profession.spreadLeadership'), tooltip: tr('settings.profession.spreadLeadership.tooltip')},
  2333. {scope: 'char', group: 'professionSettings', name: 'stopNotLeadership', type:'select', pane: 'prof', title: tr('settings.profession.stopNotLeadership'), tooltip: tr('settings.profession.stopNotLeadership.tooltip'),
  2334. opts:[{name:'never',value:0},{name: '20' ,value: 20},{name: '25' ,value: 25}]},
  2335. {scope: 'char', group: 'professionSettings', name: 'stopAlchemyAt3', type:'checkbox', pane: 'prof', title: tr('settings.profession.stopAlchemyAt3'), tooltip: tr('settings.profession.stopAlchemyAt3.tooltip')},
  2336. {scope: 'char', group: 'vendorSettings', name:'vendorJunk', type:'checkbox', pane:'vend', title:'Vendor junk..', tooltip:'Vendor all junk items (currently) winterfest fireworks+lanterns'},
  2337. {scope: 'char', group: 'vendorSettings', name:'vendorGreenUnidAll', type:'checkbox', pane:'vend', title:'Vendor All Green Unidentified Items', tooltip:'Vendor all green unidentified items'},
  2338. {scope: 'char', group: 'vendorSettings', name:'vendorBlueUnidAll', type:'checkbox', pane:'vend', title:'Vendor All Blue Unidentified Items', tooltip:'Vendor all blue unidentified items'},
  2339. {scope: 'char', group: 'vendorSettings', name:'vendorInvocationBlessingsAll', type:'checkbox', pane:'vend', title:'Vendor All Invocation Blessings', tooltip:'Vendor All Invocation Blessings'},
  2340. {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'},
  2341. {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'},
  2342. {scope: 'char', group: 'vendorSettings', name:'vendorKitsAll', type:'checkbox', pane:'vend', title:'Vendor All Node Kits', tooltip:'Sell ALL skill kits.'},
  2343. {scope: 'char', group: 'vendorSettings', name:'vendorAltarsAll', type:'checkbox', pane:'vend', title:'Vendor All Altar', tooltip:'Sell ALL Altars.'},
  2344. {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.'},
  2345. {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'},
  2346. {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'},
  2347. {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'},
  2348. {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'},
  2349. {scope: 'char', group: 'vendorSettings', name:'vendorPots5', type:'checkbox', pane:'vend', title:'Vendor major potions (lvl 60)', tooltip:'Vendor major potions (lvl 60)'},
  2350. {scope: 'char', group: 'vendorSettings', name:'vendorPots6', type:'checkbox', pane:'vend', title:'Vendor superior potions (lvl 70)', tooltip:'Vendor superior potions (lvl 70)'},
  2351. {scope: 'char', group: 'vendorSettings', name:'vendorHealingPots', type:'checkbox', pane:'vend', title:'Vendor Healing Potions (1-60)', tooltip:'Vendor healing potions (lvl 60)'},
  2352. {scope: 'char', group: 'vendorSettings', name:'vendorHealingPotsAll', type:'checkbox', pane:'vend', title:'Vendor All Healing Potions', tooltip:'Vendor all healing potions'},
  2353. {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'},
  2354. {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'},
  2355. {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'},
  2356. {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'},
  2357. {scope: 'char', group: 'vendorSettings', name:'vendorLesserMarks', type:'checkbox', pane:'vend', title:'Vendor Lesser Marks', tooltip:'Vendor all Lesser Marks found in player bags'},
  2358. {scope: 'char', group: 'consolidationSettings', name:'consolidate', type:'checkbox', pane:'bank', title: tr('settings.consolid.consolidate'), tooltip: tr('settings.consolid.consolidate.tooltip'), border:true},
  2359. {scope: 'char', group: 'consolidationSettings', name:'minToTransfer', type:'text', pane:'bank', title: tr('settings.consolid.minToTransfer'), tooltip: tr('settings.consolid.minToTransfer.tooltip')},
  2360. {scope: 'char', group: 'consolidationSettings', name:'minCharBalance', type:'text', pane:'bank', title: tr('settings.consolid.minCharBalance'), tooltip: tr('settings.consolid.minCharBalance.tooltip')},
  2361. ];
  2362.  
  2363. /*
  2364. // TODO: fix debug console on save call
  2365. // call the onsave for the setting if it exists
  2366. if (typeof(settingnames[i].onsave) === "function") {
  2367. console.log("Calling 'onsave' for", settingnames[i].name);
  2368. settingnames[i].onsave(settings[settingnames[i].name], settings[settingnames[i].name]);
  2369. }
  2370. }
  2371. */
  2372. // Page Settings
  2373. var PAGES = Object.freeze({
  2374. LOGIN: {
  2375. name: "Login",
  2376. path: "div#login"
  2377. },
  2378. GUARD: {
  2379. name: "Guard",
  2380. path: "div#page-accountguard"
  2381. },
  2382. });
  2383.  
  2384. /**
  2385. * Uses the page settings to determine which page is currently displayed
  2386. */
  2387.  
  2388. function GetCurrentPage() {
  2389. var pageReturn;
  2390. $.each(PAGES, function(index, page) {
  2391. if ($(page["path"]).filter(":visible").length) {
  2392. pageReturn = page["name"];
  2393. return false;
  2394. }
  2395. });
  2396. return pageReturn;
  2397. }
  2398.  
  2399. /**
  2400. * Logs in to gateway
  2401. * No client.dataModel exists at this stage
  2402. */
  2403.  
  2404. function page_LOGIN() {
  2405. //if (!$("form > p.error:visible").length && settings["autologin"]) {
  2406. // No previous log in error - attempt to log in
  2407. if (scriptSettings.general.autoLogin) {
  2408. console.log("Setting username");
  2409. $("input#user").val(scriptSettings.general.autoLoginAccount);
  2410. console.log("Setting password");
  2411. $("input#pass").val(scriptSettings.general.autoLoginPassword);
  2412. console.log("Clicking Login Button");
  2413. $("div#login > input").click();
  2414. //}
  2415. }
  2416. dfdNextRun.resolve(delay.LONG);
  2417.  
  2418. }
  2419.  
  2420. /**
  2421. * Action to perform on account guard page
  2422. */
  2423.  
  2424. function page_GUARD() {
  2425. // Do nothing on the guard screen
  2426. // dfdNextRun.resolve(delay.LONG);
  2427. PauseSettings("pause");
  2428. }
  2429.  
  2430. /**
  2431. * Collects rewards for tasks or starts new tasks
  2432. * Function is called once per new task and returns true if an action is created
  2433. * If no action is started function returns false to switch characters
  2434. */
  2435.  
  2436. function processCharacter() {
  2437. // Switch to professions page to show task progression
  2438. unsafeWindow.location.hash = "#char(" + encodeURI(unsafeWindow.client.getCurrentCharAtName()) + ")/professions";
  2439.  
  2440. // Collect rewards for completed tasks and restart
  2441. if (unsafeWindow.client.dataModel.model.ent.main.itemassignments.complete) {
  2442. if (!unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.every(function(entry, idx) {
  2443. if (entry.hascompletedetails && (collectTaskAttempts[idx] < scriptSettings.general.maxCollectTaskAttempts)) {
  2444. unsafeWindow.client.professionTaskCollectRewards(entry.uassignmentid);
  2445. collectTaskAttempts[idx]++;
  2446. return false;
  2447. }
  2448. return true;
  2449. })) {
  2450. dfdNextRun.resolve(delay.SHORT);
  2451. return true;
  2452. }
  2453. }
  2454.  
  2455. // Check for available slots and start new task
  2456. console.log("Looking for empty slots.");
  2457. var slots = unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.filter(function(entry) {
  2458. return (!entry.islockedslot && !entry.uassignmentid);
  2459. });
  2460. if (slots.length) {
  2461. if (charSettingsList[curCharName].general.manualTaskSlots) {
  2462. var slotIndex = slots[0].slotindex;
  2463. var _task = tasklist.filter(function(task) {
  2464. return task.taskListName === charSettingsList[curCharName].taskListSettingsManual[slotIndex].Profession;
  2465. })[0];
  2466. var _profile = _task.profiles.filter(function(profile) {
  2467. return profile.profileName === charSettingsList[curCharName].taskListSettingsManual[slotIndex].Profile;
  2468. })[0];
  2469.  
  2470. if (failedProfiles[_task.taskListName] && failedProfiles[_task.taskListName].indexOf(_profile.profileName) === -1) {
  2471. console.warn("Profile ", _profile.profileName, " for task ", _task.taskListName, " failed previously, skipping slot");
  2472. return false; // TODO: Should skip the slot and not the char entierly.
  2473. }
  2474.  
  2475. console.log("Allocating per slot. For slot #" + slotIndex + " profession: " + _task.taskListName + " profile: " + _profile.profileName);
  2476. unsafeWindow.client.professionFetchTaskList('craft_' + _task.taskName);
  2477. window.setTimeout(function() {
  2478. createNextTask(_task, _profile, 0);
  2479. }, delay.SHORT);
  2480. return true;
  2481. }
  2482. else {
  2483. // Go through the professions to assign tasks until specified slots filled
  2484. console.log("Prioritizing task lists.");
  2485. var charTaskList = tasklist
  2486. .filter(function(task) {
  2487. var level = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories.filter(function(entry) {
  2488. return entry.name == task.taskName;
  2489. })
  2490. level = (level[0]) ? level[0].currentrank : 0;
  2491. console.log(level, task.taskListName, (charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel == 0 || charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel > level));
  2492. return ((charSettingsList[curCharName].taskListSettings[task.taskListName].taskSlots > 0)
  2493. && (failedTasksList.indexOf(task.taskListName) === -1)
  2494. && (charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel == 0 || charSettingsList[curCharName].taskListSettings[task.taskListName].stopTaskAtLevel > level));
  2495. })
  2496. .sort(function(a, b) {
  2497. return (charSettingsList[curCharName].taskListSettings[a.taskListName].taskPriority - charSettingsList[curCharName].taskListSettings[b.taskListName].taskPriority);
  2498. });
  2499.  
  2500. console.log("Attempting to fill the slot.");
  2501. for (var i = 0; i < charTaskList.length; i++) {
  2502. var currentTasks = unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.filter(function(entry) {
  2503. return entry.category == charTaskList[i].taskName;
  2504. });
  2505. if (currentTasks.length < charSettingsList[curCharName].taskListSettings[charTaskList[i].taskListName].taskSlots) {
  2506. unsafeWindow.client.professionFetchTaskList('craft_' + charTaskList[i].taskName);
  2507. var profile = charTaskList[i].profiles.filter(function(profile) {
  2508. return profile.profileName == charSettingsList[curCharName].taskListSettings[charTaskList[i].taskListName].taskProfile;
  2509. })[0];
  2510. console.log('Selecting profile: ' + profile.profileName);
  2511.  
  2512. if (scriptSettings.general.leadershipMode && charTaskList[i].taskName == 'Leadership') {
  2513. var olddate = new Date();
  2514. olddate.setTime( olddate.getTime() - scriptSettings.general.leadershipTaskTimeoutRearm);
  2515. if ( !leadershipSlots[curCharName] || leadershipSlots[curCharName] < olddate) {
  2516. // new slot open for leadership (first time or timer re-armed)
  2517. var tdate = new Date();
  2518. tdate.setTime( tdate.getTime() + parseInt(scriptSettings.general.leadershipTaskTimeout));
  2519. leadershipSlots[curCharName] = tdate;
  2520. var soundFx = $( '#soundFX' );
  2521. if (scriptSettings.general.leadershipSound > 0 && soundFx && soundFx[0]) {
  2522. soundFx[0].volume = scriptSettings.general.leadershipSound / 100;
  2523. soundFx[0].play();
  2524. }
  2525. }
  2526. if ( leadershipSlots[curCharName] > new Date() ) {
  2527. // in waiting
  2528. console.log('Manual Leadership slot, waiting until: ' + leadershipSlots[curCharName]);
  2529. chartimers[curCharNum] = getNextFinishedTask();
  2530. if (chartimers[curCharNum] > leadershipSlots[curCharName]) {
  2531. chartimers[curCharNum] = leadershipSlots[curCharName];
  2532. }
  2533. return false;
  2534. }
  2535. } else {
  2536. window.setTimeout(function() {
  2537. createNextTask(charTaskList[i], profile, 0);
  2538. }, delay.SHORT);
  2539. return true;
  2540. }
  2541. }
  2542. }
  2543. };
  2544. console.log("All task counts assigned");
  2545. } else {
  2546. console.log("No available task slots");
  2547. }
  2548.  
  2549. // TODO: Add code to get next task finish time
  2550. chartimers[curCharNum] = getNextFinishedTask();
  2551.  
  2552. // Add diamond count
  2553. chardiamonds[curCharNum] = unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds;
  2554. console.log(curCharName + "'s", "Astral Diamonds:", chardiamonds[curCharNum]);
  2555. // Add gold count
  2556. chargold[curCharNum] = parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.gold);
  2557. return false;
  2558. }
  2559.  
  2560.  
  2561.  
  2562. // Running SCA for a single Char (based on CycleSCA)
  2563. function processCharSCA(charIdx) {
  2564. var _hasLoginDaily = 0;
  2565. var _scaHashMatch = /\/adventures$/;
  2566. var _charName = charNamesList[charIdx];
  2567. var _fullCharName = _charName + "@" + loggedAccount;
  2568. /*
  2569. if (!scriptSettings.paused)
  2570. PauseSettings("pause");
  2571. */
  2572. if (!_scaHashMatch.test(unsafeWindow.location.hash)) {
  2573. return;
  2574. } else if (unsafeWindow.location.hash != "#char(" + encodeURI(_fullCharName) + ")/adventures") {
  2575. unsafeWindow.location.hash = "#char(" + encodeURI(_fullCharName) + ")/adventures";
  2576. }
  2577.  
  2578. WaitForState("").done(function() {
  2579. try {
  2580. _hasLoginDaily = client.dataModel.model.gatewaygamedata.dailies.left.logins;
  2581. } catch (e) {
  2582. window.setTimeout(function() {
  2583. processCharSCA(charIdx);
  2584. }, delay.SHORT);
  2585. return;
  2586. }
  2587.  
  2588. console.log("Checking SCA Daily for " + _charName );
  2589.  
  2590. // Do SCA daily dice roll if the button comes up
  2591. WaitForState(".daily-dice-intro").done(function() {
  2592. $(".daily-dice-intro button").trigger('click');
  2593. WaitForState(".daily-awards-button").done(function() {
  2594. $(".daily-awards-button button").trigger('click');
  2595. });
  2596. });
  2597. //console.log("after dice");
  2598. WaitForNotState(".modal-window.daily-dice").done(function() {
  2599. charStatisticsList[_charName].general.lastSCAVisit = Date.now();
  2600. GM_setValue("statistics__char__" + _fullCharName , JSON.stringify(charStatisticsList[_charName]));
  2601. updateCounters();
  2602.  
  2603. //Adjusting for the time the SCA took
  2604. var chardelay;
  2605. if (chartimers[curCharNum] != null) {
  2606. chardelay = (chartimers[curCharNum]).getTime() - (new Date()).getTime() - unsafeWindow.client.getServerOffsetSeconds() * 1000;
  2607. if (chardelay < delay.SHORT) {
  2608. chardelay = delay.SHORT;
  2609. }
  2610. }
  2611. else chardelay = delay.SHORT;
  2612. if (chardelay > (delay.SHORT * 3)) unsafeWindow.location.hash = "#char(" + encodeURI(_fullCharName) + ")/professions";
  2613. console.log("Finished SCA check for " + charNamesList[charIdx] + " delay " + chardelay);
  2614. dfdNextRun.resolve(chardelay);
  2615. });
  2616. });
  2617. }
  2618.  
  2619.  
  2620.  
  2621. /**
  2622. * Switch to a character's swordcoast adventures and collect the daily reward
  2623. */
  2624.  
  2625. function processSwordCoastDailies(_charStartIndex) {
  2626. var _accountName = unsafeWindow.client.dataModel.model.loginInfo.publicaccountname;
  2627. var _charIndex = (!_charStartIndex || parseInt(_charStartIndex) > (charNamesList.length + 1) || parseInt(_charStartIndex) < 0) ? 0 : parseInt(_charStartIndex);
  2628. var _fullCharName = charNamesList[_charIndex] + '@' + _accountName;
  2629. var _hasLoginDaily = 0;
  2630. var _isLastChar = false;
  2631. var _scaHashMatch = /\/adventures$/;
  2632. if (!scriptSettings.paused)
  2633. PauseSettings("pause");
  2634.  
  2635. // Switch to professions page to show task progression
  2636. if (!_scaHashMatch.test(unsafeWindow.location.hash)) {
  2637. return;
  2638. } else if (unsafeWindow.location.hash != "#char(" + encodeURI(_fullCharName) + ")/adventures") {
  2639. unsafeWindow.location.hash = "#char(" + encodeURI(_fullCharName) + ")/adventures";
  2640. }
  2641.  
  2642. if (_charIndex >= (charNamesList.length -1))
  2643. _isLastChar = true;
  2644.  
  2645. WaitForState("").done(function() {
  2646. try {
  2647. _hasLoginDaily = client.dataModel.model.gatewaygamedata.dailies.left.logins;
  2648. } catch (e) {
  2649. // TODO: Use callback function
  2650. window.setTimeout(function() {
  2651. processSwordCoastDailies(_charIndex);
  2652. }, delay.SHORT);
  2653. return;
  2654. }
  2655.  
  2656. console.log("Checking SCA Daily for", _fullCharName, "...");
  2657.  
  2658. // Do SCA daily dice roll if the button comes up
  2659. WaitForState(".daily-dice-intro").done(function() {
  2660. $(".daily-dice-intro button").trigger('click');
  2661. WaitForState(".daily-awards-button").done(function() {
  2662. $(".daily-awards-button button").trigger('click');
  2663. });
  2664. });
  2665.  
  2666. // If Dice roll dialogue is non existent
  2667. WaitForNotState(".modal-window.daily-dice").done(function() {
  2668. charStatisticsList[charNamesList[_charIndex]].general.lastSCAVisit = Date.now();
  2669. GM_setValue("statistics__char__" + _fullCharName , JSON.stringify(charStatisticsList[charNamesList[_charIndex]]));
  2670. updateCounters();
  2671. if (_isLastChar) {
  2672. window.setTimeout(function() {
  2673. PauseSettings("unpause");
  2674. }, 3000);
  2675. } else {
  2676. window.setTimeout(function() {
  2677. processSwordCoastDailies(_charIndex + 1);
  2678. }, 3000);
  2679. }
  2680. });
  2681. });
  2682. }
  2683.  
  2684. /**
  2685. * Finds the task finishing next & returns the date or NULL otherwise
  2686. *
  2687. * @return {Date} / {null}
  2688. */
  2689.  
  2690. function getNextFinishedTask() {
  2691. var tmpNext,
  2692. next = null;
  2693. var foundTask = false;
  2694. unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.forEach(function(entry, idx) {
  2695. if (entry.uassignmentid && (collectTaskAttempts[idx] < scriptSettings.general.maxCollectTaskAttempts)) {
  2696. foundTask = true;
  2697. tmpNext = new Date(entry.ufinishdate);
  2698. if (!next || tmpNext < next) {
  2699. next = tmpNext;
  2700. }
  2701. }
  2702. if (!entry.islockedslot && entry.category == "None" && scriptSettings.general.unasignedSlotRecheck) {
  2703. var tdate = new Date();
  2704. tdate.setTime( tdate.getTime() + parseInt(scriptSettings.general.unasignedSlotRecheck));
  2705. console.log("Found unassigned slot, setting it as: ", tdate);
  2706. if (!next || tdate < next) {
  2707. next = tdate;
  2708. }
  2709. }
  2710. });
  2711. if (next && foundTask) {
  2712. console.log("Next finished task at " + next.toLocaleString());
  2713. }
  2714. else {
  2715. console.log("No next finishing date found! All slots unassigned.");
  2716. if (scriptSettings.general.defaultVisitTime) {
  2717. var tdate = new Date();
  2718. tdate.setTime( tdate.getTime() + parseInt(scriptSettings.general.defaultVisitTime));
  2719. console.log("Setting next date using default: ", tdate);
  2720. return tdate;
  2721. }
  2722. }
  2723. return next;
  2724. }
  2725.  
  2726. /**
  2727. * Iterative approach to finding the next task to assign to an open slot.
  2728. *
  2729. * @param {Array} prof The tasklist for the profession being used
  2730. * @param {int} i The current task number being attempted
  2731. */
  2732.  
  2733. function createNextTask(prof, profile, i) {
  2734. // TODO: Use callback function
  2735. 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) {
  2736. console.log('Task list not loaded for:', prof.taskName);
  2737. window.setTimeout(function() {
  2738. createNextTask(prof, profile, i);
  2739. }, delay.SHORT);
  2740. return false;
  2741. }
  2742.  
  2743. // Check level
  2744. var category = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories.filter(function(entry) {
  2745. return entry.name == prof.taskName;
  2746. });
  2747. var level = category ? category[0].currentrank : 0;
  2748. var list = profile.level[level];
  2749. var taskBlocked = ((getSetting('professionSettings','stopNotLeadership') == 20 && prof.taskName != 'Leadership' && level >= 20) ||
  2750. (getSetting('professionSettings','stopNotLeadership') == 25 && prof.taskName != 'Leadership' && level >= 25) ||
  2751. (getSetting('professionSettings','stopAlchemyAt3') && prof.taskName == 'Alchemy' && level > 3)) || !category;
  2752. if(list.length <= i || taskBlocked) {
  2753. if (!taskBlocked) console.log("Task list exhausted for ", prof.taskListName, " at level ", level, " profile: ", profile.profileName);
  2754. else console.warn("Task list blocked for ", prof.taskListName, " at level ", level, " profile: ", profile.profileName);
  2755. failedTasksList.push(prof.taskListName);
  2756. if (typeof failedProfiles[prof.taskListName] === 'undefined') {
  2757. failedProfiles[prof.taskListName] = [];
  2758. }
  2759. failedProfiles[prof.taskListName].push(profile.profileName);
  2760. dfdNextRun.resolve(delay.SHORT);
  2761. //switchChar();
  2762. return false;
  2763. }
  2764. console.log(prof.taskName, "is level", level);
  2765. console.log("createNextTask", list.length, i);
  2766.  
  2767. var taskName = list[i];
  2768. console.log("Searching for task:", taskName);
  2769.  
  2770. // Search for task to start
  2771. var task = searchForTask(taskName, prof.taskName, profile, level);
  2772.  
  2773. // Finish createNextTask function
  2774. if (task === null) {
  2775. console.log("Skipping task selection to purchase resources");
  2776. dfdNextRun.resolve();
  2777. return true;
  2778. }
  2779. if (task) {
  2780. antiInfLoopTrap.currTaskName = task.def.name;
  2781. antiInfLoopTrap.currCharName = unsafeWindow.client.getCurrentCharAtName();
  2782. task = '/professions-tasks/' + prof.taskName + '/' + task.def.name;
  2783. console.log('Task Found');
  2784. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')' + task);
  2785. WaitForState("div.page-professions-taskdetails").done(function() {
  2786. // Click all buttons and select an item to use in the slot
  2787. var def = $.Deferred();
  2788. var buttonList = $('.taskdetails-assets:eq(1)').find("button");
  2789. if (buttonList.length && getSetting('professionSettings','fillOptionals')) {
  2790. SelectItemFor(buttonList, 0, def, prof, taskName, prof.taskName, profile, level);
  2791. } else {
  2792. def.resolve();
  2793. }
  2794. def.done(function() {
  2795. // All items are populated
  2796. console.log("Items Populated");
  2797. // Click the Start Task Button
  2798. //Get the start task button if it is enabled
  2799. var enabledButton = $(".footer-professions-taskdetails .button.epic:not('.disabled') button");
  2800. if (enabledButton.length) {
  2801. console.log("Clicking Start Task Button");
  2802. enabledButton.trigger('click');
  2803. WaitForState("").done(function() {
  2804. // Done
  2805. dfdNextRun.resolve(delay.SHORT);
  2806. });
  2807. if (antiInfLoopTrap.prevCharName == antiInfLoopTrap.currCharName && antiInfLoopTrap.prevTaskName == antiInfLoopTrap.currTaskName) {
  2808. antiInfLoopTrap.startCounter++;
  2809. console.log(antiInfLoopTrap.prevCharName + " starts " + antiInfLoopTrap.prevTaskName + " " + antiInfLoopTrap.startCounter + " time in row");
  2810. } else {
  2811. antiInfLoopTrap.prevCharName = antiInfLoopTrap.currCharName;
  2812. antiInfLoopTrap.prevTaskName = antiInfLoopTrap.currTaskName;
  2813. antiInfLoopTrap.startCounter = 1;
  2814. }
  2815. if (antiInfLoopTrap.startCounter >= 10) {
  2816. console.log("Restart needed: " + (antiInfLoopTrap.trapActivation - antiInfLoopTrap.startCounter) + " loop circuits to restart");
  2817. }
  2818. return true;
  2819. } else { // Button not enabled, something required was probably missing
  2820. // Go back
  2821. $(".footer-professions-taskdetails .button button.resetWindow").trigger('click');
  2822. WaitForState("").done(function() {
  2823. // continue with the next one
  2824. console.log('Finding next task');
  2825. createNextTask(prof, profile, i + 1);
  2826. });
  2827. }
  2828. });
  2829. });
  2830. } else {
  2831. console.log('Finding next task');
  2832. createNextTask(prof, profile, i + 1);
  2833. }
  2834. }
  2835. /** Count resouce in bags
  2836. *
  2837. * @param {string} name The name of resource
  2838. */
  2839.  
  2840. function countResource(name) {
  2841. var count = 0;
  2842. var _bags = unsafeWindow.client.dataModel.model.ent.main.inventory.bags;
  2843. console.log("Checking bags for " + name);
  2844. $.each(_bags, function(bi, bag) {
  2845. bag.slots.forEach(function(slot) {
  2846. if (slot && slot.name === name) {
  2847. count = count + slot.count;
  2848. }
  2849. });
  2850. });
  2851. return count;
  2852. }
  2853.  
  2854. function countUnusedResource(name) {
  2855. var count = 0;
  2856. var bag = unsafeWindow.client.dataModel.model.ent.main.inventory.tradebag;
  2857. bag.forEach(function(slot) {
  2858. if (slot && slot.name === name) {
  2859. count = count + slot.count;
  2860. }
  2861. });
  2862. return count;
  2863. }
  2864.  
  2865. function countUsedResource(name) {
  2866. return countResource(name) - countUnusedResource(name);
  2867. }
  2868.  
  2869. /**
  2870. * Checks task being started for requirements and initiates beginning task if found
  2871. *
  2872. * @param {string} taskname The name of the task being started
  2873. * @param {string} profname The name of the profession being used
  2874. * @param {Deferred} dfd Deferred object to process on return
  2875. */
  2876.  
  2877. function searchForTask(taskname, profname, profile, professionLevel) {
  2878. // Return first object that matches exact craft name
  2879.  
  2880. var thisTask = unsafeWindow.client.dataModel.model.craftinglist['craft_' + profname].entries.filter(function(entry) {
  2881. return entry.def && entry.def.name == taskname;
  2882. })[0];
  2883.  
  2884. // 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
  2885. if (!thisTask) {
  2886. console.log('Could not find task for:', taskname);
  2887. return false;
  2888. }
  2889.  
  2890. // start task if requirements are met
  2891. if (!thisTask.failslevelrequirementsfilter && !thisTask.failslevelrequirements && !thisTask.failsresourcesrequirements) {
  2892. return thisTask;
  2893. }
  2894.  
  2895. // Too high level
  2896. if (thisTask.failslevelrequirements) {
  2897. console.log("Task level is too high:", taskname);
  2898. return false;
  2899. }
  2900.  
  2901. var searchItem = null;
  2902. var searchAsset = false;
  2903.  
  2904. // Check for and buy missing armor & weapon leadership assets
  2905. if (thisTask.failsresourcesrequirements && profname == "Leadership" && getSetting('professionSettings','autoPurchaseRes')) {
  2906. var failedAssets = thisTask.required.filter(function(entry) {
  2907. return !entry.fillsrequirements;
  2908. });
  2909. var failedArmor = failedAssets.filter(function(entry) {
  2910. return entry.categories.indexOf("Armor") >= 0;
  2911. });
  2912. var failedWeapon = failedAssets.filter(function(entry) {
  2913. return entry.categories.indexOf("Weapon") >= 0;
  2914. });
  2915. if (failedArmor.length || failedWeapon.length) {
  2916. var _buyResult = false;
  2917. var _charGold = unsafeWindow.client.dataModel.model.ent.main.currencies.gold;
  2918. var _charSilver = unsafeWindow.client.dataModel.model.ent.main.currencies.silver;
  2919. var _charCopper = unsafeWindow.client.dataModel.model.ent.main.currencies.copper;
  2920. var _charCopperTotal = _charCopper + (_charSilver * 100) + (_charGold * 10000);
  2921.  
  2922. // Buy Leadership Armor Asset
  2923. if (failedArmor.length && _charCopperTotal >= 10000) {
  2924. console.log("Buying leadership asset:", failedArmor[0].icon);
  2925. _buyResult = buyTaskAsset(18);
  2926. unsafeWindow.client.professionFetchTaskList("craft_Leadership");
  2927. }
  2928. // Buy Leadership Infantry Weapon Asset
  2929. else if (failedWeapon.length && _charCopperTotal >= 5000) {
  2930. console.log("Buying leadership asset:", failedWeapon[0].icon);
  2931. _buyResult = buyTaskAsset(4);
  2932. unsafeWindow.client.professionFetchTaskList("craft_Leadership");
  2933. }
  2934. if (_buyResult === false)
  2935. return false;
  2936. else
  2937. return null;
  2938. }
  2939. }
  2940.  
  2941. // Missing assets or ingredients
  2942. if (thisTask.failsresourcesrequirements) {
  2943. var failedAssets = thisTask.required.filter(function(entry) {
  2944. return !entry.fillsrequirements;
  2945. });
  2946.  
  2947. // Missing required assets
  2948. if (failedAssets.length) {
  2949. var failedCrafter = failedAssets.filter(function(entry) {
  2950. return entry.categories.indexOf("Person") >= 0;
  2951. });
  2952.  
  2953. // Train Assets
  2954. if (failedCrafter.length && getSetting('professionSettings','trainAssets')) {
  2955. console.log("Found required asset:", failedCrafter[0].icon);
  2956. searchItem = failedCrafter[0].icon;
  2957. searchAsset = true;
  2958. } else {
  2959. // TODO: Automatically purchase item assets from shop
  2960. console.log("Not enough assets for task:", taskname);
  2961. return false;
  2962. }
  2963. }
  2964. // Check for craftable ingredients items and purchasable profession resources (from vendor)
  2965. else {
  2966. var failedResources = thisTask.consumables.filter(function(entry) {
  2967. return entry.required && !entry.fillsrequirements;
  2968. });
  2969.  
  2970. // Check first required ingredient only
  2971. // If it fails to buy or craft task cannot be completed anyway
  2972. // If it succeeds script will search for tasks anew
  2973. var itemName = failedResources[0].hdef.match(/\[(\w+)\]/)[1];
  2974.  
  2975. // Buy purchasable resources if auto-purchase setting is enabled
  2976. if (getSetting('professionSettings','autoPurchaseRes') && itemName.match(/^Crafting_Resource_(Charcoal|Rocksalt|Spool_Thread|Porridge|Solvent|Brimstone|Coal|Moonseasalt|Quicksilver|Spool_Threadsilk)$/)) {
  2977. // returns null if successful (task will try again) and false if unsuccessful (task will be skipped)
  2978. return buyResource(itemName);
  2979. }
  2980. // Matched profession auto-purchase item found but auto-purchase is not enabled
  2981. else if (!getSetting('professionSettings','autoPurchaseRes') && itemName.match(/^Crafting_Resource_(Charcoal|Rocksalt|Spool_Thread|Porridge|Solvent|Brimstone|Coal|Moonseasalt|Quicksilver|Spool_Threadsilk)$/)) {
  2982. console.log("Purchasable resource required:", itemName, "for task:", taskname, ". Recommend enabling Auto Purchase Resources.");
  2983. if (pleaseBuy.push("Please buy " + itemName + " for " + unsafeWindow.client.getCurrentCharAtName()) > 5) {
  2984. pleaseBuy.shift();
  2985. }
  2986. return false;
  2987. }
  2988. // craftable ingredient set to search for
  2989. else {
  2990. console.log("Found required ingredient:", itemName);
  2991. searchItem = itemName;
  2992. }
  2993. }
  2994. }
  2995.  
  2996. // either no craftable items/assets found or other task requirements are not met
  2997. // Skip crafting ingredient tasks for Leadership
  2998. if (searchItem === null || !searchItem.length || (profname == 'Leadership' && !searchAsset && !searchItem.match(/Crafting_Asset_Craftsman/))) {
  2999. console.log("Failed to resolve item requirements for task:", taskname);
  3000. return false;
  3001. }
  3002.  
  3003. var massTaskAllowed = ((profile !== undefined) && (profile.useMassTask !== undefined) && (profile.useMassTask === true));
  3004.  
  3005. // Generate list of available tasks to search ingredients/assets from
  3006. console.log("Searching ingredient tasks for:", profname);
  3007. var taskList = unsafeWindow.client.dataModel.model.craftinglist['craft_' + profname].entries.filter(function(entry) {
  3008. // remove header lines first to avoid null def
  3009. if (entry.isheader) {
  3010. return false;
  3011. }
  3012.  
  3013. // Too high level
  3014. if (entry.failslevelrequirements) {
  3015. return false;
  3016. }
  3017.  
  3018. // Rewards do not contain item we want to make
  3019. if (searchAsset) {
  3020. if (entry.def.icon != searchItem || !entry.def.name.match(/Recruit/) || entry.def.requiredrank > 14) {
  3021. return false;
  3022. }
  3023. } else {
  3024. if (!(entry.rewards.some(function(itm) {
  3025. try {
  3026. return itm.hdef.match(/\[(\w+)\]/)[1] == searchItem;
  3027. } catch (e) {}
  3028. }))) {
  3029. return false;
  3030. }
  3031. }
  3032.  
  3033. // Skip mass production tasks (don't skip for profiles with useMassTask flag == true)
  3034. if (! massTaskAllowed) {
  3035. if (entry.def.displayname.match(/^(Batch|Mass|Deep|Intensive) /)) {
  3036. return false;
  3037. }
  3038. }
  3039.  
  3040. // Skip trading tasks
  3041. if (entry.def.displayname.match(/rading$/)) {
  3042. return false;
  3043. }
  3044.  
  3045. // Skip looping Transmute tasks
  3046. if (entry.def.displayname.match(/^(Transmute|Create) /)) {
  3047. return false;
  3048. }
  3049.  
  3050. return true;
  3051. });
  3052.  
  3053. if (!taskList.length) {
  3054. console.log("No ingredient tasks found for:", taskname, searchItem);
  3055. if (!searchItem.match(/(_Research)|(_Craftsman_)|(Crafted_)/)) {
  3056. if (pleaseBuy.push("Please buy " + searchItem + " for " + unsafeWindow.client.getCurrentCharAtName()) > 5) {
  3057. pleaseBuy.shift();
  3058. }
  3059. }
  3060. return false;
  3061. }
  3062.  
  3063. // for profiles with useMassTask flag == true select Mass task
  3064. if (massTaskAllowed) {
  3065. for (var i=0; i<taskList.length; i++) {
  3066. if (taskList[i].def.displayname.match(/^(Batch|Mass|Deep|Intensive) /)) {
  3067. taskList = taskList.splice(i, 1);
  3068. break;
  3069. }
  3070. }
  3071. }
  3072.  
  3073. // Use more efficient Empowered task for Aqua if available.
  3074. if ((searchItem == "Crafting_Resource_Aquavitae" || searchItem == "Crafting_Resource_Aquaregia") && taskList.length > 1) {
  3075. taskList.shift();
  3076. }
  3077.  
  3078. // Should really only be one result now but lets iterate through anyway.
  3079. for (var i = 0; i < taskList.length; i++) {
  3080. console.log("Attempting search for ingredient task:", taskList[i].def.name);
  3081. var task = searchForTask(taskList[i].def.name, profname, profile, professionLevel);
  3082. if (task === null || task) {
  3083. return task;
  3084. }
  3085. }
  3086. return false;
  3087. }
  3088.  
  3089.  
  3090. /**
  3091. * Selects the highest level asset for the i'th button in the list. Uses an iterative approach
  3092. * in order to apply a sufficient delay after the asset is assigned
  3093. *
  3094. * @param {Array} The list of buttons to use to click and assign assets for
  3095. * @param {int} i The current iteration number. Will select assets for the i'th button
  3096. * @param {Deferred} jQuery Deferred object to resolve when all of the assets have been assigned
  3097. */
  3098.  
  3099. function SelectItemFor(buttonListIn, i, def, prof, taskname, profname, profile, professionLevel) {
  3100. buttonListIn[i].click();
  3101. WaitForState("").done(function() {
  3102.  
  3103. 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
  3104. var $persons = $("div.modal-item-list a").has("img[src*='_Follower_']");
  3105. var quality = [".Mythic", ".Legendary", ".Special", ".Gold", ".Silver", ".Bronze"];
  3106. var ic,
  3107. $it;
  3108.  
  3109. var clicked = false;
  3110.  
  3111. // Try to avoid using up higher rank assets needlessly
  3112. if (prof.taskName === "Leadership") {
  3113.  
  3114. var _enableSpreadLeadership = getSetting('professionSettings','spreadLeadershipAssets');
  3115. var mercenarys = $('div.modal-item-list a.Bronze img[src*="Crafting_Follower_Leader_Generic_T1_01"]').parent().parent();
  3116. var guards = $('div.modal-item-list a.Bronze img[src*="Crafting_Follower_Leader_Guard_T2_01"]').parent().parent();
  3117. var footmen = $('div.modal-item-list a.Bronze img[src*="Crafting_Follower_Leader_Private_T2_01"]').parent().parent();
  3118. var T3_Epic = countResource("Crafting_Asset_Craftsman_Leadership_T3_Epic"); // number of heroes in inventory
  3119. var T3_Rare = countResource("Crafting_Asset_Craftsman_Leadership_T3_Rare"); // number of adventurers in inventory
  3120. var T3_Uncommon = countResource("Crafting_Asset_Craftsman_Leadership_T3_Uncommon"); // number of man-at-arms in inventory
  3121. 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
  3122.  
  3123. // if spread leadership asset allocation is not selected, check for persons for best speed, in descending order
  3124. //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))) {
  3125. if (!_enableSpreadLeadership) {
  3126. for (ic in quality) {
  3127. if (quality[ic] == ".Bronze") {
  3128. break;
  3129. }
  3130. $it = $persons.filter(quality[ic]);
  3131. if ($it.length) {
  3132. $it[0].click();
  3133. clicked = true;
  3134. break;
  3135. }
  3136. }
  3137. }
  3138.  
  3139. if (!clicked) {
  3140. if ((!_enableSpreadLeadership) || (_enableSpreadLeadership && (T3_Epic + T3_Rare + T3_Uncommon + usedCommon < parseInt(charSettingsList[curCharName].taskListSettings["Leadership"].taskSlots) * 2))) {
  3141. if (mercenarys.length) {
  3142. clicked = true;
  3143. mercenarys[0].click();
  3144. } else if (guards.length) {
  3145. clicked = true;
  3146. guards[0].click();
  3147. } else if (footmen.length) {
  3148. clicked = true;
  3149. footmen[0].click();
  3150. }
  3151. }
  3152. }
  3153.  
  3154. }
  3155.  
  3156.  
  3157. // check resources & assets for best quality, in descending order
  3158. if (!clicked) {
  3159. for (ic in quality) {
  3160. $it = $assets.filter(quality[ic]);
  3161. if ($it.length) {
  3162. $it[0].click();
  3163. clicked = true;
  3164. break;
  3165. }
  3166. }
  3167. }
  3168.  
  3169. // if no asset was selected, check for persons for best speed, in descending order
  3170. if (!clicked) {
  3171. for (ic in quality) {
  3172. $it = $persons.filter(quality[ic]);
  3173. if ($it.length) {
  3174. $it[0].click();
  3175. clicked = true;
  3176. break;
  3177. }
  3178. }
  3179. }
  3180.  
  3181. // if nothing was found at all, return immediately (skip other optional slots)
  3182. if (!clicked) {
  3183. $("button.close-button").trigger('click');
  3184. console.log("Nothing more to click..");
  3185. WaitForState("").done(function() {
  3186. // Let main loop continue
  3187. def.resolve();
  3188. });
  3189. }
  3190.  
  3191. console.log("Clicked item");
  3192. WaitForState("").done(function() {
  3193. // Get the new set of select buttons created since the other ones are removed when the asset loads
  3194. var buttonList = $('.taskdetails-assets:eq(1)').find("button");
  3195. if (i < buttonList.length - 1) {
  3196. SelectItemFor(buttonList, i + 1, def, prof, taskname, profname, profile, professionLevel);
  3197. } else {
  3198. // Let main loop continue
  3199. def.resolve();
  3200. }
  3201. });
  3202. });
  3203. }
  3204.  
  3205.  
  3206. /**
  3207. * Will buy a given purchasable resource
  3208. *
  3209. * @param {String} item The data-tt-item id of the Resource to purchase
  3210. */
  3211.  
  3212. function buyResource(item) {
  3213. var _resourceID = {
  3214. Crafting_Resource_Charcoal: 0,
  3215. Crafting_Resource_Rocksalt: 1,
  3216. Crafting_Resource_Spool_Thread: 2,
  3217. Crafting_Resource_Porridge: 3,
  3218. Crafting_Resource_Solvent: 4,
  3219. Crafting_Resource_Brimstone: 5,
  3220. Crafting_Resource_Coal: 6,
  3221. Crafting_Resource_Moonseasalt: 7,
  3222. Crafting_Resource_Quicksilver: 8,
  3223. Crafting_Resource_Spool_Threadsilk: 9,
  3224. };
  3225. var _resourceCost = {
  3226. Crafting_Resource_Charcoal: 30,
  3227. Crafting_Resource_Rocksalt: 30,
  3228. Crafting_Resource_Spool_Thread: 30,
  3229. Crafting_Resource_Porridge: 30,
  3230. Crafting_Resource_Solvent: 20,
  3231. Crafting_Resource_Brimstone: 100,
  3232. Crafting_Resource_Coal: 500,
  3233. Crafting_Resource_Moonseasalt: 500,
  3234. Crafting_Resource_Quicksilver: 500,
  3235. Crafting_Resource_Spool_Threadsilk: 500,
  3236. };
  3237. var _charGold = unsafeWindow.client.dataModel.model.ent.main.currencies.gold;
  3238. var _charSilver = unsafeWindow.client.dataModel.model.ent.main.currencies.silver;
  3239. var _charCopper = unsafeWindow.client.dataModel.model.ent.main.currencies.copper;
  3240. var _charCopperTotal = _charCopper + (_charSilver * 100) + (_charGold * 10000);
  3241. var _resourcePurchasable = Math.floor(_charCopperTotal / _resourceCost[item]);
  3242. // Limit resource purchase to 50 quantity
  3243. var _purchaseCount = (_resourcePurchasable >= 50) ? 50 : _resourcePurchasable;
  3244.  
  3245. if (_purchaseCount < 1) {
  3246. // Not enough gold for 1 resource
  3247. console.log("Purchasing profession resources failed for: ", item, " Have: ",_charCopperTotal, " Cost Per Item: ", _resourceCost[item], " Can buy: ", _resourcePurchasable);
  3248. if (pleaseBuy.push("Please buy " + item + " for " + unsafeWindow.client.getCurrentCharAtName()) > 5) {
  3249. pleaseBuy.shift();
  3250. }
  3251. return false;
  3252. } else {
  3253. // Make purchase
  3254. console.log("Purchasing profession resources:", _purchaseCount + "x", item, ". Total copper available:", _charCopperTotal, ". Spending ", (_purchaseCount * _resourceCost[item]), "copper.");
  3255. unsafeWindow.client.sendCommand("GatewayVendor_PurchaseVendorItem", {
  3256. vendor: 'Nw_Gateway_Professions_Merchant',
  3257. store: 'Store_Crafting_Resources',
  3258. idx: _resourceID[item],
  3259. count: _purchaseCount
  3260. });
  3261. WaitForState("button.closeNotification").done(function() {
  3262. $("button.closeNotification").trigger('click');
  3263. });
  3264. return null;
  3265. }
  3266. }
  3267.  
  3268. /** DRAFT
  3269. * Will buy a missing leadership assets
  3270. *
  3271. * @param {String} item reference from assetID
  3272. */
  3273.  
  3274. function buyTaskAsset(_itemNo) {
  3275. var _returnHast = unsafeWindow.location.hash;
  3276. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')/professions/vendor');
  3277. WaitForState("").done(function() {
  3278. if ($('span.alert-red button[data-url-silent="/professions/vendor/Store_Crafting_Assets/' + _itemNo + '"]').length) {
  3279. return false;
  3280. } else if ($('button[data-url-silent="/professions/vendor/Store_Crafting_Assets/' + _itemNo + '"]').length) {
  3281. $('button[data-url-silent="/professions/vendor/Store_Crafting_Assets/' + _itemNo + '"]').trigger('click');
  3282. WaitForState(".modal-confirm button").done(function() {
  3283. $('.modal-confirm button').eq(1).trigger('click');
  3284. unsafeWindow.location.hash = _returnHast;
  3285. return null;
  3286. });
  3287. }
  3288. });
  3289. }
  3290.  
  3291. // Function used to check exchange data model and post calculated AD/Zen for transfer if all requirements are met
  3292.  
  3293. function postZaxOffer() {
  3294. // Make sure the exchange data is loaded to model
  3295. if (unsafeWindow.client.dataModel.model.exchangeaccountdata) {
  3296. // Check that there is atleast 1 free ZAX order slot
  3297. if (unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.length < 5) {
  3298. // Place the order
  3299. var exchangeDiamonds = parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  3300. if (exchangeDiamonds > 0) {
  3301. console.log("AD in exchange: " + exchangeDiamonds);
  3302. }
  3303. // Domino effect: this new order will post all the gathered diamonds until now
  3304. var charDiamonds = parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds);
  3305. var ZenRate = parseInt(accountSettings.consolidationSettings.transferRate);
  3306. if (!ZenRate) return;
  3307. var ZenQty = Math.floor((charDiamonds + exchangeDiamonds - parseInt(getSetting('consolidationSettings','minCharBalance'))) / ZenRate);
  3308. ZenQty = (ZenQty > 5000) ? 5000 : ZenQty;
  3309. console.log("Posting ZAX buy listing for " + ZenQty + " ZEN at the rate of " + ZenRate + " AD/ZEN. AD remainder: " + charDiamonds + " - " + (ZenRate * ZenQty) + " = " + (charDiamonds - (ZenRate * ZenQty)));
  3310. unsafeWindow.client.createBuyOrder(ZenQty, ZenRate);
  3311. // set moved ad to the ad counter zax log
  3312. var ADTotal = ZenRate * ZenQty - exchangeDiamonds;
  3313. if (ADTotal > 0) {
  3314. console.log("AD moved to ZAX from", charNamesList[lastCharNum] + ":", ADTotal);
  3315. chardiamonds[lastCharNum] -= ADTotal;
  3316. console.log(charNamesList[lastCharNum] + "'s", "Astral Diamonds:", chardiamonds[lastCharNum]);
  3317. zaxdiamonds += ADTotal;
  3318. console.log("Astral Diamonds on the ZAX:", zaxdiamonds);
  3319. }
  3320. } else {
  3321. console.log("Zen Max Listings Reached (5). Skipping ZAX Posting..");
  3322. }
  3323. } else {
  3324. console.log("Zen Exchange data did not load in time for transfer. Skipping ZAX Posting..");
  3325. }
  3326. }
  3327.  
  3328. // Function used to check exchange data model and withdraw listed orders that use the settings zen transfer rate
  3329.  
  3330. function cancelZaxOffer() {
  3331. // Make sure the exchange data is loaded to model
  3332. if(unsafeWindow.client.dataModel.model.exchangeaccountdata) {
  3333. if(unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.length >= 1) {
  3334. console.log("Canceling ZAX orders");
  3335.  
  3336. var charDiamonds = parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds);
  3337. var ZenRate = parseInt(getSetting('consolidationSettings','transferRate'));
  3338.  
  3339. // cycle through the zax listings
  3340. unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.forEach(function(item) {
  3341. // find any buy orders in the list with our set zen rate
  3342. if (parseInt(item.price) == ZenRate && item.ordertype == "Buy") {
  3343. // cancel/withdraw the order
  3344. client.withdrawOrder(item.orderid);
  3345. console.log("Cancelling ZAX offer for " + item.quantity + " ZEN at the rate of " + item.price + " . Total value in AD: " + item.totaltc);
  3346. }
  3347. });
  3348. } else {
  3349. console.log("No listings found on ZAX. Skipping ZAX Withdraw..");
  3350. }
  3351. } else {
  3352. console.log("Zen Exchange data did not load in time for transfer. Skipping ZAX Withdraw..");
  3353. }
  3354. }
  3355.  
  3356. function claimZaxOffer() {
  3357. if (unsafeWindow.client.dataModel.model.exchangeaccountdata) {
  3358. if (parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow) > 0) {
  3359. unsafeWindow.client.sendCommand("GatewayExchange_ClaimTC", unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  3360. console.log("Attempting to withdraw exchange balances... ClaimTC: " + unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  3361. // clear the ad counter zax log
  3362. zaxdiamonds = 0;
  3363. }
  3364. if (parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimmtc) > 0) {
  3365. unsafeWindow.client.sendCommand("GatewayExchange_ClaimMTC", unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimmtc);
  3366. console.log("Attempting to withdraw exchange balances... ClaimMT: " + unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimmtc);
  3367. }
  3368. } else {
  3369. window.setTimeout(claimZaxOffer, delay.SHORT);
  3370. }
  3371. }
  3372.  
  3373. // MAC-NW
  3374.  
  3375. function vendorItemsLimited(_items) {
  3376. var _pbags = client.dataModel.model.ent.main.inventory.playerbags;
  3377. var _delay = 400;
  3378. var _sellCount = 0;
  3379. var _classType = unsafeWindow.client.dataModel.model.ent.main.classtype;
  3380. var _bagCount = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags.length;
  3381. var _bagUsed = 0;
  3382. var _bagUnused = 0;
  3383. var _tmpBag = [];
  3384. var _profitems = [];
  3385. // Pattern for items to leave out of auto vendoring (safeguard)
  3386. 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
  3387.  
  3388. /** Profession leveling result item cleanup logic for T1-4 crafted results
  3389. * Created by RM on 14.1.2015.
  3390. * 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".
  3391. * Items on list must be checked and tested.
  3392. */
  3393. if (getSetting('vendorSettings', 'vendorProfResults')) {
  3394. /*#2, Tier2 - tier3 mixed, upgrade, sell if inventory full, "TierX" is here "TX" */
  3395. _profitems[_profitems.length] = {
  3396. 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)$/,
  3397. limit: 0,
  3398. count: 0
  3399. };
  3400. /*#3, Tier2, upgrade, sell if inventory full, "TierX" is here "TX" */
  3401. _profitems[_profitems.length] = {
  3402. 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)$/,
  3403. limit: 0,
  3404. count: 0
  3405. };
  3406. /*#4, Tier1, upgrade, sell if inventory full, "TierX" is here "TX" */
  3407. _profitems[_profitems.length] = {
  3408. 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)$/,
  3409. limit: 0,
  3410. count: 0
  3411. };
  3412. /*#5, Tier0, upgrade, sell if inventory full, taskilist "Tier1" is here "empty" or "_" must replace (_T1_|_)*/
  3413. _profitems[_profitems.length] = {
  3414. 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)$/,
  3415. limit: 0,
  3416. count: 0
  3417. };
  3418. }
  3419.  
  3420. $.each(_pbags, function(bi, bag) {
  3421. bag.slots.forEach(function(slot) {
  3422. // Match unused slots
  3423. if (slot === null || !slot || slot === undefined) {
  3424. _bagUnused++;
  3425. }
  3426. // Match items to exclude from auto vendoring, don't add to _tmpBag: Exclude pattern list - bound - Epic Quality - Legendary Quality - Mythic Quality
  3427. else if (_excludeItems.test(slot.name) || slot.rarity == "Special" || slot.rarity == "Legendary" || slot.rarity == "Mythic") {
  3428. _bagUsed++;
  3429. }
  3430. // Match everything else
  3431. else {
  3432. if (getSetting('vendorSettings', 'vendorProfResults')) {
  3433. for (i = 0; i < _profitems.length; i++) {
  3434. if (_profitems[i].pattern.test(slot.name))
  3435. _profitems[i].count++;
  3436. }
  3437. }
  3438. _tmpBag[_tmpBag.length] = slot;
  3439. _bagUsed++;
  3440. }
  3441. });
  3442. });
  3443.  
  3444. if (getSetting('vendorSettings', 'vendorProfResults')) {
  3445. _tmpBag.forEach(function(slot) {
  3446. for (i = 0; i < _profitems.length; i++) { // edited by RottenMind
  3447. if (slot && _profitems[i].pattern.test(slot.name) && Inventory_bagspace() <= 7) { // !slot.bound && _profitems[i].count > 3 &&, edited by RottenMind
  3448. var vendor = {
  3449. vendor: "Nw_Gateway_Professions_Merchant"
  3450. };
  3451. vendor.id = slot.uid;
  3452. vendor.count = 1;
  3453. console.log('Selling', vendor.count, slot.name, 'to vendor.');
  3454. window.setTimeout(function() {
  3455. client.sendCommand('GatewayVendor_SellItemToVendor', vendor);
  3456. }, _delay);
  3457. _profitems[i].count--;
  3458. break;
  3459. }
  3460. }
  3461. });
  3462. }
  3463.  
  3464. _tmpBag.forEach(function(slot) {
  3465. for (i = 0; i < _items.length; i++) {
  3466. var _Limit = (parseInt(_items[i].limit) > 99) ? 99 : _items[i].limit;
  3467. if (slot && _items[i].pattern.test(slot.name)) {
  3468. // Node Kits vendor logic for restricted bag space
  3469. if (getSetting('vendorSettings', 'vendorKitsLimit') && /^Item_Consumable_Skill/.test(slot.name)) {
  3470. if (_bagCount < 2 || _bagUnused < 6 ||
  3471. (slot.name == "Item_Consumable_Skill_Dungeoneering" && (_classType == "Player_Guardian" || _classType == "Player_Greatweapon")) ||
  3472. (slot.name == "Item_Consumable_Skill_Arcana" && (_classType == "Player_Controller" || _classType == "Player_Scourge")) ||
  3473. (slot.name == "Item_Consumable_Skill_Religion" && _classType == "Player_Devoted") ||
  3474. (slot.name == "Item_Consumable_Skill_Thievery" && _classType == "Player_Trickster") ||
  3475. (slot.name == "Item_Consumable_Skill_Nature" && _classType == "Player_Archer")) {
  3476. _Limit = 0;
  3477. }
  3478. }
  3479. // Sell Items
  3480. if (slot.count > _Limit) {
  3481. _sellCount++;
  3482. var vendor = {
  3483. vendor: "Nw_Gateway_Professions_Merchant"
  3484. };
  3485. vendor.id = slot.uid;
  3486. vendor.count = slot.count - _Limit;
  3487. console.log('Selling', vendor.count, slot.name, 'to vendor.');
  3488. window.setTimeout(function() {
  3489. client.sendCommand('GatewayVendor_SellItemToVendor', vendor);
  3490. }, _delay);
  3491. _delay = _delay + 400;
  3492. break;
  3493. }
  3494. }
  3495. }
  3496. });
  3497.  
  3498. return _sellCount;
  3499. }
  3500.  
  3501. function switchChar() {
  3502.  
  3503. // detect if daily reset occurs (no more frequently than every 16 hours)
  3504. var oldRefineToday = charStatisticsList[curCharName].general.refined[0] | 0;
  3505. var newRefineToday = unsafeWindow.client.dataModel.model.ent.main.currencies.diamondsconverted | 0;
  3506. if (newRefineToday < oldRefineToday) {
  3507. if (accountSettings.generalSettings.SCADailyReset < Date.now() - 16*60*60*1000) {
  3508. accountSettings.generalSettings.SCADailyReset = Date.now();
  3509. GM_setValue("settings__account__" + loggedAccount, JSON.stringify(accountSettings));
  3510. }
  3511. }
  3512.  
  3513. if (newRefineToday < oldRefineToday || charStatisticsList[curCharName].general.lastVisit < lastDailyResetTime) {
  3514. if (!Array.isArray(charStatisticsList[curCharName].general.refined)) {
  3515. var temp = [0,0,0,0,0,0,0,0];
  3516. temp[0] = charStatisticsList[curCharName].general.refined;
  3517. charStatisticsList[curCharName].general.refined = temp;
  3518. }
  3519. charStatisticsList[curCharName].general.refined.unshift(0);
  3520. charStatisticsList[curCharName].general.refined.length = 8;
  3521. }
  3522.  
  3523. var refined_diamonds = 0;
  3524. if (getSetting('generalSettings', 'refineAD')) {
  3525. var _currencies = unsafeWindow.client.dataModel.model.ent.main.currencies;
  3526. if (_currencies.diamondsconvertleft && _currencies.roughdiamonds) {
  3527. if (_currencies.diamondsconvertleft < _currencies.roughdiamonds) {
  3528. refined_diamonds = _currencies.diamondsconvertleft
  3529. } else {
  3530. refined_diamonds = _currencies.roughdiamonds
  3531. }
  3532. chardiamonds[curCharNum] += refined_diamonds
  3533. console.log("Refining AD for", curCharName + ":", refined_diamonds);
  3534. console.log(curCharName + "'s", "Astral Diamonds:", chardiamonds[curCharNum]);
  3535. unsafeWindow.client.sendCommand('Gateway_ConvertNumeric', 'Astral_Diamonds');
  3536. WaitForState("button.closeNotification").done(function() {
  3537. $("button.closeNotification").click();
  3538. });
  3539. charStatisticsList[curCharName].general.refineCounter += refined_diamonds;
  3540.  
  3541. }
  3542. }
  3543.  
  3544. // MAC-NW -- AD Consolidation
  3545. //if (accountSettings.consolidationSettings.consolidate) {
  3546. if (getSetting('consolidationSettings','consolidate')) {
  3547. // Check that we dont take money from the character assigned as the banker // Zen Transfer / Listing
  3548. if ((accountSettings.consolidationSettings.bankCharName) && (accountSettings.consolidationSettings.bankCharName !== unsafeWindow.client.dataModel.model.ent.main.name)) {
  3549. // Check the required min AD amount on character
  3550. if (getSetting('consolidationSettings','minToTransfer') &&
  3551. parseInt(unsafeWindow.client.dataModel.model.ent.main.currencies.diamonds) >= (parseInt(getSetting('consolidationSettings','minToTransfer')) + parseInt(getSetting('consolidationSettings','minCharBalance')))) {
  3552. // Check that the rate is not less than the min & max
  3553. if (accountSettings.consolidationSettings.transferRate && parseInt(accountSettings.consolidationSettings.transferRate) >= 50 && parseInt(accountSettings.consolidationSettings.transferRate) <= 500) {
  3554. window.setTimeout(postZaxOffer, delay.SHORT);
  3555. } else {
  3556. console.log("Zen transfer rate does not meet the minimum (50) or maximum (500). Skipping ZAX Posting..");
  3557. }
  3558. } else {
  3559. console.log("Character does not have minimum AD balance to do funds transfer. Skipping ZAX Posting..");
  3560. }
  3561. }
  3562. else {
  3563. console.log("Bank char not set or bank char, skipping posting.");
  3564. }
  3565. } else {
  3566. console.log("Zen Exchange AD transfer not enabled. Skipping ZAX Posting..");
  3567. }
  3568.  
  3569. if (getSetting('generalSettings','openRewards')) {
  3570. var _pbags = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags;
  3571. var _cRewardPat = /Reward_Item_Chest|Gateway_Rewardpack/;
  3572. console.log("Opening Rewards");
  3573. $.each(_pbags, function(bi, bag) {
  3574. bag.slots.forEach(function(slot) {
  3575. if (slot && _cRewardPat.test(slot.name)) {
  3576. if (slot.count >= 99)
  3577. slot.count = 99;
  3578. var reserve = getSetting('generalSettings', 'keepOneUnopened') ? 1 : 0;
  3579. for (i = 1; i <= (slot.count - reserve); i++) {
  3580. window.setTimeout(function() {
  3581. client.sendCommand('GatewayInventory_OpenRewardPack', slot.uid);
  3582. }, 500);
  3583. }
  3584. }
  3585. });
  3586. });
  3587. }
  3588.  
  3589. if (getSetting('generalSettings','openCelestialBox')) {
  3590. var _pbags = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags;
  3591. var _cRewardPat = /Invocation_Reward_Celestial_Artifact_Equipment_Box|Invocation_Reward_Celestial_Artifacts_Box|Invocation_Reward_Celestial_Enchantments_Box/;
  3592. console.log("Opening Celestial Boxes");
  3593. $.each(_pbags, function(bi, bag) {
  3594. bag.slots.forEach(function(slot) {
  3595. if (slot && _cRewardPat.test(slot.name)) {
  3596. if (slot.count >= 99)
  3597. slot.count = 99;
  3598.  
  3599. var reserve = getSetting('generalSettings', 'keepOneUnopened') ? 1 : 0;
  3600. for (i = 1; i <= (slot.count - reserve); i++) {
  3601. window.setTimeout(function() {
  3602. client.sendCommand('GatewayInventory_OpenRewardPack', slot.uid);
  3603. }, 500);
  3604. }
  3605. }
  3606. });
  3607. });
  3608. }
  3609.  
  3610. if (getSetting('generalSettings','openInvocation')) {
  3611. var _pbags = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags;
  3612. var _cRewardPat = /Invocation_Rp_Bag/;
  3613. console.log("Opening Invocation Rewards");
  3614. $.each(_pbags, function(bi, bag) {
  3615. bag.slots.forEach(function(slot) {
  3616. if (slot && _cRewardPat.test(slot.name)) {
  3617. window.setTimeout(function() {
  3618. client.sendCommand('GatewayInventory_OpenRewardPack', slot.uid);
  3619. }, 500);
  3620. }
  3621. });
  3622. });
  3623. }
  3624. // Check Vendor Options & Vendor matched items
  3625. vendorJunk();
  3626.  
  3627. // MAC-NW (endchanges)
  3628.  
  3629. // Updating statistics
  3630. console.log('Updating statistics');
  3631. var _stat = charStatisticsList[curCharName].general;
  3632. var _chardata = unsafeWindow.client.dataModel.model.ent.main.currencies;
  3633. _stat.lastVisit = Date.now();
  3634. _stat.gold = parseInt(_chardata.gold);
  3635. _stat.rad = parseInt(_chardata.roughdiamonds - refined_diamonds); // refined_diamonds: removing and adding manually to compensate for slow model update
  3636. _stat.diamonds = parseInt(_chardata.diamonds + refined_diamonds);
  3637. _stat.rBI = parseInt(_chardata.rawblackice);
  3638. _stat.BI = parseInt(_chardata.blackice);
  3639. _stat.refined[0] = parseInt(_chardata.diamondsconverted + refined_diamonds);
  3640. _stat.diamondsconvertleft = parseInt(_chardata.refineLimitLeft);
  3641. _stat.activeSlots = unsafeWindow.client.dataModel.model.ent.main.itemassignments.active;
  3642. _stat.celestial = parseInt(_chardata.celestial);
  3643. _stat.ardent = parseInt(_chardata.ardent);
  3644. //clearing
  3645. charStatisticsList[curCharName].trackedResources = [];
  3646. $.each(charStatisticsList[curCharName].tools, function(name, obj) {
  3647. obj.used = [];
  3648. obj.unused = [];
  3649. });
  3650. $.each(charStatisticsList[curCharName].professions, function(name, obj) {
  3651. obj.workersUsed = [];
  3652. obj.workersUnused = [];
  3653. obj.level = 0;
  3654. });
  3655.  
  3656. trackResources.forEach(function(resource, ri) {
  3657. charStatisticsList[curCharName].trackedResources[ri] = 0;
  3658. });
  3659.  
  3660. // Counting main inventory bags
  3661. charStatisticsList[curCharName].general.emptyBagSlots = 0;
  3662. unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags
  3663. .forEach(function (bag) {
  3664. bag.slots.forEach( function (slot, slotNum) {
  3665. if (!slot) {
  3666. charStatisticsList[curCharName].general.emptyBagSlots += 1;
  3667. return;
  3668. }
  3669. trackResources.forEach(function(resource, ri) {
  3670. if (slot.name === resource.name) {
  3671. if ((resource.unbound && !slot.bound && !slot.boundtoaccount) ||
  3672. (resource.btc && slot.bound && !slot.boundtoaccount) ||
  3673. (resource.bta && slot.boundtoaccount)) {
  3674. charStatisticsList[curCharName].trackedResources[ri] += slot.count;
  3675. }
  3676. }
  3677. });
  3678. });
  3679. });
  3680.  
  3681. // Counting the rest of the bags
  3682. trackResources.forEach(function(resource, ri) {
  3683. unsafeWindow.client.dataModel.model.ent.main.inventory.bags
  3684. .filter(function(bag) {
  3685. return ((["CraftingResources", "Overflow", "CraftingInventory"].indexOf(bag.bagid) > -1) || (resource.bank && bag.bagid == "Bank"));
  3686. })
  3687. .forEach(function(bag) {
  3688. bag.slots.forEach( function (slot, slotNum) {
  3689. if (slot && slot.name === resource.name) {
  3690. if ((resource.unbound && !slot.bound && !slot.boundtoaccount) ||
  3691. (resource.btc && slot.bound && !slot.boundtoaccount) ||
  3692. (resource.bta && slot.boundtoaccount)) {
  3693. charStatisticsList[curCharName].trackedResources[ri] += slot.count;
  3694. }
  3695. }
  3696. });
  3697. });
  3698. });
  3699. // Slot assignment
  3700. unsafeWindow.client.dataModel.model.ent.main.itemassignments.assignments.forEach(function(slot, ix) {
  3701. if (!slot.islockedslot && slot.category !== "None") {
  3702. charStatisticsList[curCharName].slotUse[ix] = slot.category;
  3703. } else if (slot.islockedslot) {
  3704. charStatisticsList[curCharName].slotUse[ix] = "----"; // Locked Slot
  3705. } else {
  3706. charStatisticsList[curCharName].slotUse[ix] = "OPEN"; // Un-Assigned Slot!!!
  3707. }
  3708. });
  3709.  
  3710. // Workers and tools assignment and qty
  3711. unsafeWindow.client.dataModel.model.ent.main.inventory.assignedslots
  3712. .forEach(function(item) {
  3713. $.each(workerList, function(pName, pList) {
  3714. var index = pList.indexOf(item.name);
  3715. if (index > -1) {
  3716. charStatisticsList[curCharName].professions[pName].workersUsed[index] = item.count;
  3717. }
  3718. });
  3719. $.each(toolList, function(tName, tList) {
  3720. var index = tList.indexOf(item.name);
  3721. if (index > -1) {
  3722. charStatisticsList[curCharName].tools[tName].used[index] = item.count;
  3723. }
  3724. });
  3725. });
  3726.  
  3727. unsafeWindow.client.dataModel.model.ent.main.inventory.notassignedslots
  3728. .forEach(function(item) {
  3729. $.each(workerList, function(pName, pList) {
  3730. var index = pList.indexOf(item.name);
  3731. if (index > -1) {
  3732. charStatisticsList[curCharName].professions[pName].workersUnused[index] = item.count;
  3733. }
  3734. })
  3735. $.each(toolList, function(tName, tList) {
  3736. var index = tList.indexOf(item.name);
  3737. if (index > -1) {
  3738. charStatisticsList[curCharName].tools[tName].unused[index] = item.count;
  3739. }
  3740. })
  3741. });
  3742.  
  3743. // getting profession levels from currentrank, model has displayname, name, and category, using displayname (platesmithing)
  3744. // Must match the names in charStatisticsList[curCharName].professions
  3745. unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories
  3746. .forEach(function(prof) {
  3747. if (charStatisticsList[curCharName].professions[prof.displayname]) {
  3748. charStatisticsList[curCharName].professions[prof.displayname].level = prof.currentrank;
  3749. }
  3750. });
  3751.  
  3752. charStatisticsList[curCharName].general.nextTask = chartimers[curCharNum];
  3753. GM_setValue("statistics__char__" + curCharFullName , JSON.stringify(charStatisticsList[curCharName]));
  3754. updateCounters();
  3755.  
  3756. // TODO: refactor this block into function and merge with the similar in charSCA()
  3757. console.log("Switching Characters");
  3758. lastCharNum = curCharNum;
  3759.  
  3760. var chardelay,
  3761. chardate = null,
  3762. nowdate = new Date();
  3763. nowdate = nowdate.getTime();
  3764. var not_active = 0;
  3765. charNamesList.every( function (charName, idx) {
  3766. if (!charSettingsList[charName].general.active) {
  3767. not_active++;
  3768. return true;
  3769. }
  3770. if (chartimers[idx] != null) {
  3771. console.log("Date found for " + charName);
  3772. if (!chardate || chartimers[idx] < chardate) {
  3773. chardate = chartimers[idx];
  3774. curCharNum = idx;
  3775. chardelay = chardate.getTime() - nowdate - unsafeWindow.client.getServerOffsetSeconds() * 1000;
  3776. if (chardelay < delay.SHORT) {
  3777. chardelay = delay.SHORT;
  3778. }
  3779. }
  3780. return true;
  3781. }
  3782. curCharNum = idx;
  3783. chardelay = delay.SHORT;
  3784. chardate = null;
  3785. console.log("No date found for " + charName + ", switching now.");
  3786. return false; // = break;
  3787. });
  3788. // Change to optional ?
  3789. if (chardelay > delay.SHORT) chardelay = chardelay + (Math.random() + 0.3) * delay.DEFAULT;
  3790.  
  3791. curCharName = charNamesList[curCharNum];
  3792. curCharFullName = curCharName + "@" + loggedAccount;
  3793. failedTasksList = [];
  3794. failedProfiles = {};
  3795. var k = 9; while (k) {collectTaskAttempts[--k] = 0}; //collectTaskAttempts.fill(0);
  3796.  
  3797. if (getSetting('consolidationSettings','consolidate')) {
  3798. // Withdraw AD from the ZAX into the banker character
  3799. if (accountSettings.consolidationSettings.bankCharName == curCharName) {
  3800. window.setTimeout(cancelZaxOffer, delay.SHORT);
  3801. }
  3802. }
  3803.  
  3804. // Count AD & Gold
  3805. var curdiamonds = zaxdiamonds;
  3806. var curgold = 0;
  3807. charNamesList.forEach( function (charName, idx) {
  3808. if (chardiamonds[idx] != null) {
  3809. curdiamonds += Math.floor(chardiamonds[idx] / 50) * 50;
  3810. }
  3811.  
  3812. if (chargold[idx] != null) {
  3813. curgold += chargold[idx];
  3814. }
  3815. });
  3816.  
  3817. console.log("Next run for " + curCharName + " in " + parseInt(chardelay / 1000) + " seconds.");
  3818. $("#prinfopane").empty();
  3819. 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>")
  3820. .appendTo("#prinfopane");
  3821.  
  3822. charNamesList.forEach( function (charName, idx) {
  3823. if (leadershipSlots[charName] > new Date()) {
  3824. ptext.append("<div>Open Leadership slot for " + charName + "! (<span data-timer='" + leadershipSlots[charName] + "' data-timer-length='2'></span>) <span id='lsignore" + idx + "' " +
  3825. "style='cursor: pointer'>Ignore</span> / <span id='lsdone" + idx + "' " + "style='cursor: pointer'>Done</span></div>");
  3826. $("#lsignore" + idx).click( function () {
  3827. IgnoreButton(idx, false);
  3828. $(this).parent().empty();
  3829. });
  3830. $("#lsdone" + idx).click( function () {
  3831. IgnoreButton(idx, true);
  3832. $(this).parent().empty();
  3833. });
  3834. }
  3835. });
  3836. if (not_active == charNamesList.length) {
  3837. ptext.append("<div class='h_warning'>No Active chars found!</div>");
  3838. console.warn("No Active chars found!");
  3839. }
  3840. GM_setValue("curCharNum_" + loggedAccount, curCharNum);
  3841.  
  3842.  
  3843. var runSCAtime = !charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit
  3844. || ((charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit + (1000*60*60*24)) < Date.now())
  3845. || (charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit < accountSettings.generalSettings.SCADailyReset)
  3846. || (charStatisticsList[charNamesList[lastCharNum]].general.lastSCAVisit < lastDailyResetTime.getTime());
  3847. var sca_setting = getSetting('generalSettings','runSCA');
  3848. var runSCA = (runSCAtime && (sca_setting !== 'never'));
  3849. runSCA = runSCA && (sca_setting === 'always' || (sca_setting === 'free' && chardelay > 7000)); // More than 7 seconds for the next char swap
  3850. console.log("Check if need to run SCA for " + charNamesList[lastCharNum] + ": " + sca_setting + " " + runSCAtime);
  3851. if (runSCA) {
  3852. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')' + "/adventures");
  3853. processCharSCA(lastCharNum);
  3854. return;
  3855. }
  3856. dfdNextRun.resolve(chardelay);
  3857. }
  3858. /**
  3859. * Waits for the loading symbol to be hidden.
  3860. *
  3861. * @return {Deferred} A jQuery defferred object that will be resolved when loading is complete
  3862. */
  3863.  
  3864. function WaitForLoad() {
  3865. return WaitForState("");
  3866. }
  3867. /**
  3868. * Creates a deferred object that will be resolved when the state is reached
  3869. *
  3870. * @param {string} query The query for the state to wait for
  3871. * @return {Deferred} A jQuery defferred object that will be resolved when the state is reached
  3872. */
  3873.  
  3874. function WaitForState(query) {
  3875. var dfd = $.Deferred();
  3876. window.setTimeout(function() {
  3877. AttemptResolve(query, dfd);
  3878. }, delay.SHORT); // Doesn't work without a short delay
  3879. return dfd;
  3880. }
  3881.  
  3882. function WaitForNotState(query) {
  3883. var dfd = $.Deferred();
  3884. window.setTimeout(function() {
  3885. AttemptNotResolve(query, dfd);
  3886. }, delay.SHORT); // Doesn't work without a short delay
  3887. return dfd;
  3888. }
  3889. /**
  3890. * Will continually test for the given query state and resolve the given deferred object when the state is reached
  3891. * and the loading symbol is not visible
  3892. *
  3893. * @param {string} query The query for the state to wait for
  3894. * @param {Deferred} dfd The jQuery defferred object that will be resolved when the state is reached
  3895. */
  3896.  
  3897. function AttemptResolve(query, dfd) {
  3898. if ((query === "" || $(query).length) && $("div.loading-image:visible").length === 0) {
  3899. dfd.resolve();
  3900. } else {
  3901. window.setTimeout(function() {
  3902. AttemptResolve(query, dfd);
  3903. }, delay.SHORT); // Try again in a little bit
  3904. }
  3905. }
  3906. /* Opposite of AttemptResolve, will try to resolve query until it doesn't resolve. */
  3907.  
  3908. function AttemptNotResolve(query, dfd) {
  3909. if (!$(query).length && $("div.loading-image:visible").length === 0) {
  3910. dfd.resolve();
  3911. } else {
  3912. window.setTimeout(function() {
  3913. AttemptNotResolve(query, dfd);
  3914. }, delay.SHORT); // Try again in a little bit
  3915. }
  3916. }
  3917. /**
  3918. * The main process loop:
  3919. * - Determine which page we are on and call the page specific logic
  3920. * - When processing is complete, process again later
  3921. * - Use a short timer when something changed last time through
  3922. * - Use a longer timer when waiting for tasks to complete
  3923. */
  3924.  
  3925. function process() {
  3926. waitingNextChar = false;
  3927. // Calculating last daily reset time
  3928. var today = new Date();
  3929. var todayRest = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 10,0,0));
  3930. if (today > todayRest) lastDailyResetTime = todayRest;
  3931. else lastDailyResetTime = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate()-1, 10,0,0));
  3932. // Make sure the settings button exists
  3933. addSettings();
  3934.  
  3935. // Enable/Disable the unconditional page reload depending on settings
  3936. loading_reset = scriptSettings.general.scriptAutoReload;
  3937. // Check if timer is paused
  3938. s_paused = scriptSettings.general.scriptPaused; // let the Page Reloading function know the pause state
  3939. if (s_paused) {
  3940. // Just continue later - the deferred object is still set and nothing will resolve it until we get past this point
  3941. timerHandle = window.setTimeout(function() {
  3942. process();
  3943. }, delay.DEFAULT);
  3944. return;
  3945. }
  3946.  
  3947. // Check for Gateway down
  3948. if (window.location.href.indexOf("gatewaysitedown") > -1) {
  3949. // Do a long delay and then retry the site
  3950. console.log("Gateway down detected - relogging in " + (delay.MINS / 1000) + " seconds");
  3951. window.setTimeout(function() {
  3952. unsafeWindow.location.href = current_Gateway;
  3953. }, delay.MINS);
  3954. return;
  3955. }
  3956.  
  3957. // Check for login or account guard and process accordingly
  3958. var currentPage = GetCurrentPage();
  3959. if (currentPage === "Login") {
  3960. page_LOGIN();
  3961. return;
  3962. } else if (currentPage === "Guard") {
  3963. page_GUARD();
  3964. return;
  3965. }
  3966.  
  3967. if (pleaseBuy.length == 0) {
  3968. pleaseBuy['ts'] = Date.now() + 15*60*1000;
  3969. } else if ((pleaseBuy['ts']||0) < Date.now()) {
  3970. pleaseBuy.shift();
  3971. pleaseBuy['ts'] = Date.now() + 15*60*1000;
  3972. }
  3973. window.setTimeout(function() {
  3974. loginProcess();
  3975. }, delay.SHORT);
  3976.  
  3977. // Continue again later
  3978. dfdNextRun.done(function(delayTimer) {
  3979. waitingNextChar = true;
  3980. dfdNextRun = $.Deferred();
  3981. timerHandle = window.setTimeout(function() {
  3982. process();
  3983. }, typeof delayTimer !== 'undefined' ? delayTimer : delay.DEFAULT);
  3984. });
  3985. //console.log("Process Timer Handle: " + timerHandle);
  3986. }
  3987.  
  3988. function loginProcess() {
  3989. // Get logged on account details
  3990. var accountName;
  3991. try {
  3992. accountName = unsafeWindow.client.dataModel.model.loginInfo.publicaccountname;
  3993. } catch(e) {
  3994. // TODO: Use callback function
  3995. window.setTimeout(function() {
  3996. loginProcess();
  3997. }, delay.SHORT);
  3998. return;
  3999. }
  4000.  
  4001. // Check if timer is paused again to avoid starting new task between timers
  4002. s_paused = scriptSettings.general.scriptPaused; // let the Page Reloading function know the pause state
  4003. if (s_paused) {
  4004. // Just continue later - the deferred object is still set and nothing will resolve it until we get past this point
  4005. timerHandle = window.setTimeout(function() {
  4006. process();
  4007. }, delay.DEFAULT);
  4008. return;
  4009. }
  4010.  
  4011. if (accountName) {
  4012. if (!loggedAccount || (loggedAccount != accountName)) {
  4013. loggedAccount = accountName;
  4014. console.log("Loading settings for " + accountName);
  4015.  
  4016. var tempAccountSetting;
  4017. try {
  4018. tempAccountSetting = JSON.parse(GM_getValue("settings__account__" + accountName, "{}"));
  4019. } catch (e) {
  4020. tempAccountSetting = null;
  4021. }
  4022. if (!tempAccountSetting) {
  4023. console.log('Account settings couldn\'t be retrieved, loading defaults.');
  4024. tempAccountSetting = {};
  4025. };
  4026. accountSettings = $.extend(true, {}, defaultAccountSettings, tempAccountSetting);
  4027.  
  4028. console.log("Loading character list");
  4029. charNamesList = [];
  4030. client.dataModel.model.loginInfo.choices.forEach(function(char) {
  4031. if (char.shardname == "Dungeon") return;
  4032. charNamesList.push(char.name);
  4033. });
  4034. console.log("Found names: " + charNamesList);
  4035.  
  4036. charNamesList.forEach(function(charName) {
  4037. console.log("Loading settings for " + charName);
  4038.  
  4039. var tempCharsSetting;
  4040. try {
  4041. tempCharsSetting = JSON.parse(GM_getValue("settings__char__" + charName + "@" + accountName, "{}"));
  4042. } catch (e) {
  4043. tempCharsSetting = null;
  4044. }
  4045. if (!tempCharsSetting) {
  4046. tempCharsSetting = {};
  4047. console.log('Character settings couldn\'t be retrieved, loading defaults.');
  4048. };
  4049. charSettingsList[charName] = $.extend(true, {}, defaultCharSettings, tempCharsSetting);
  4050. charSettingsList[charName].charName = charName; // for compatibility
  4051.  
  4052. console.log("Loading saved statistics for " + charName);
  4053. var tempCharsStatistics;
  4054. try {
  4055. tempCharsStatistics = JSON.parse(GM_getValue("statistics__char__" + charName + "@" + accountName, "{}"));
  4056. } catch (e) {
  4057. tempCharsStatistics = null;
  4058. }
  4059. if (!tempCharsStatistics) {
  4060. console.log('Character statistics couldn\'t be retrieved, loading defaults.');
  4061. tempCharsStatistics = {};
  4062. };
  4063. charStatisticsList[charName] = $.extend(true, {}, defaultCharStatistics, tempCharsStatistics);
  4064. })
  4065. if (scriptSettings.general.saveCharNextTime)
  4066. charNamesList.forEach( function(name, idx) {
  4067. chartimers[idx] = (new Date(charStatisticsList[name].general.nextTask));
  4068. chargold[idx] = charStatisticsList[name].general.gold;
  4069. chardiamonds[idx] = charStatisticsList[name].general.diamonds;
  4070. });
  4071. // Adding the Account and character settings / info to the UI
  4072. addSettings();
  4073. }
  4074.  
  4075. // load current character position and values
  4076. curCharNum = GM_getValue("curCharNum_" + accountName, 0);
  4077. curCharName = charNamesList[curCharNum];
  4078. curCharFullName = curCharName + '@' + accountName;
  4079.  
  4080. if (unsafeWindow.client.getCurrentCharAtName() != curCharFullName) {
  4081. loadCharacter(curCharFullName);
  4082. return;
  4083. }
  4084.  
  4085. // Try to start tasks
  4086. if (processCharacter()) {
  4087. return;
  4088. }
  4089.  
  4090. // Switch characters as necessary
  4091. switchChar();
  4092. }
  4093. }
  4094.  
  4095. function loadCharacter(charname) {
  4096. // Load character and restart next load loop
  4097. console.log("Loading gateway script for", charname);
  4098. if (unsafeWindow.location.hash != "#char(" + encodeURI(charname) + ")/professions") {
  4099. unsafeWindow.location.hash = "#char(" + encodeURI(charname) + ")/professions";
  4100. }
  4101. unsafeWindow.client.dataModel.loadEntityByName(charname);
  4102.  
  4103. try {
  4104. var testChar = unsafeWindow.client.dataModel.model.ent.main.name;
  4105. unsafeWindow.client.dataModel.fetchVendor('Nw_Gateway_Professions_Merchant');
  4106. console.log("Loaded datamodel for", charname);
  4107. } catch (e) {
  4108. // TODO: Use callback function
  4109. window.setTimeout(function() {
  4110. loadCharacter(charname);
  4111. }, delay.SHORT);
  4112. return;
  4113. }
  4114.  
  4115. // MAC-NW -- AD Consolidation -- Banker Withdraw Section
  4116. if (getSetting('consolidationSettings','consolidate')) {
  4117.  
  4118. unsafeWindow.client.dataModel.fetchExchangeAccountData();
  4119.  
  4120. try {
  4121. var testExData = unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders;
  4122. console.log("Loaded zen exchange data for", charname);
  4123. } catch (e) {
  4124. // TODO: Use callback function
  4125. window.setTimeout(function() {
  4126. loadCharacter(charname);
  4127. }, delay.SHORT);
  4128. return;
  4129. }
  4130.  
  4131. // First check if there's anything we have to withdraw and claim it
  4132. // Sometimes the system will literally overwrite cancelled and unclaimed orders and return AD to that character
  4133. // Example: if you cancel 5 orders, don't claim them, then create another order and cancel it, that last order
  4134. // will overwrite one of your previous orders and return the AD to that other character
  4135. var exchangeDiamonds = parseInt(unsafeWindow.client.dataModel.model.exchangeaccountdata.readytoclaimescrow);
  4136. if (exchangeDiamonds > 0) {
  4137. claimZaxOffer();
  4138. }
  4139.  
  4140. // Domino effect: first check if we're out of space for new offers
  4141. if (unsafeWindow.client.dataModel.model.exchangeaccountdata.openorders.length == 5) {
  4142. // Domino effect: then withdraw as much offers as we can and claim the diamonds
  4143. window.setTimeout(cancelZaxOffer, delay.SHORT);
  4144. }
  4145.  
  4146. WaitForState("button.closeNotification").done(function() {
  4147. $("button.closeNotification").click();
  4148. });
  4149.  
  4150. unsafeWindow.client.dataModel.loadEntityByName(charname);
  4151.  
  4152. } else {
  4153. console.log("Zen Exchange AD transfer not enabled. Skipping ZAX Posting..");
  4154. }
  4155. // MAC-NW
  4156.  
  4157. // MAC-NW -- Moved Professoin Merchant loading here with testing/waiting to make sure it loads
  4158. try {
  4159. var testProfMerchant = client.dataModel.model.vendor.items;
  4160. console.log("Loaded profession merchant for", charname);
  4161. } catch (e) {
  4162. // TODO: Use callback function
  4163. window.setTimeout(function() {
  4164. loadCharacter(charname);
  4165. }, delay.SHORT);
  4166. return;
  4167. }
  4168.  
  4169. // Check Vendor Options & Vendor matched items
  4170. vendorJunk();
  4171.  
  4172. dfdNextRun.resolve();
  4173. }
  4174.  
  4175. function addSettings() {
  4176. var setEventHandlers = false;
  4177. if (!($("#settingsButton").length)) {
  4178. // Add the required CSS
  4179. AddCss("\
  4180. #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;}\
  4181. #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;}\
  4182. #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;}\
  4183. #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;}\
  4184. #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;}\
  4185. #settingsPanelButtonContainer {background: none repeat scroll 0% 0% rgb(204, 204, 204); border-top: 1px solid rgb(102, 102, 102);padding: 3px;text-align:center} \
  4186. #charSettingsAccordion h3.inactive {color: LightGray ;}\
  4187. #charPanel {width:98%;max-height:550px;overflow:auto;display:block;padding:3px;}\
  4188. .inventory-container {float: left; clear: none; width: 270px; margin-right: 20px;}\
  4189. #prinfopane {position: fixed; top: 5px; left: 200px; display: block; z-index: 1000;}\
  4190. .prh3 {padding: 5px; height: auto!important; width: auto!important; background-color: rgba(0, 0, 0, 0.7);}\
  4191. .custom-radio{width:16px;height:16px;display:inline-block;position:relative;z-index:1;top:3px;background-color:#fff;margin:0 4px 0 2px;}\
  4192. .custom-radio:hover{background-color:black;} .custom-radio.selected{background-color:red;} .custom-radio-selected-text{color:darkred;font-weight:500;}\
  4193. .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}\
  4194. .charSettingsTab { overflow: auto; }\
  4195. .charSettingsTab div { overflow: auto; }\
  4196. #rcounters ul li span { display: inline-block; min-width: 125px; }\
  4197. #settingsPanel table { width: 100%; }\
  4198. .ranked:nth-child(6n+2) { color: purple; } .ranked:nth-child(6n+3) { color: blue; } .ranked:nth-child(6n+4) { color: green } \
  4199. .ranked2:nth-child(6n+1) { color: purple; } .ranked2:nth-child(6n+2) { color: blue; } .ranked2:nth-child(6n+3) { color: green } \
  4200. .tranked:nth-child(4n+2) { color: purple; } .tranked:nth-child(4n+3) { color: blue; } .tranked:nth-child(4n) { color: green } \
  4201. .tranked2:nth-child(4n+1) { color: purple; } .tranked2:nth-child(4n+2) { color: blue; } .tranked2:nth-child(4n+3) { color: green } \
  4202. table.professionRanks { border-collapse: collapse; } \
  4203. table.professionRanks td { height: 14px; } \
  4204. td.ranked2, td.tranked2 { border-bottom: solid 1px #555; border-top: dashed 1px #888 }\
  4205. #resource_tracker {overflow-x:auto;}\
  4206. table.withRotation td.rotate, table.withRotation th.rotate { height: 125px; } \
  4207. table.withRotation td.rotate, table.withRotation th.rotate > div { transform: translate(0, 38px) rotate(290deg); width: 30px; } \
  4208. table.withRotation td.rotate, table.withRotation th.rotate > div > span { border-bottom: 1px solid #bbb; padding: 0px 0px; white-space: nowrap; } \
  4209. table.withRotation td { border-right: 1px solid #bbb;} \
  4210. input[type='checkbox'].settingsInput { margin: 5px 10px 5px 5px; }\
  4211. input.settingsInput { margin: 5px 5px; }\
  4212. label.settingsLabel { margin: 5px 5px; min-width: 150px; display: inline-block; }\
  4213. .inputSaved { color: #66FF66; }\
  4214. .inputSaved:after { content: \"\"; width: 8px; height: 8px; display: inline-block; background-color: #66FF66; position:relative; right: 10px; }\
  4215. .h_warning { color: red !important; }\
  4216. label.customProfiles {min-width: 150px; }\
  4217. select.customProfiles { margin: 10px }\
  4218. textarea.customProfiles { width: 500px; height: 350px; margin: 10px 0; }\
  4219. .custom_profiles_delete { height: 16px; } #custom__profiles__viewbase_btn { height: 16px; } .custom_profiles_view {height: 16px; margin: 0 4px; }\
  4220. .custom_resources_delete { height: 16px; } .customResources input:not([type='checkbox']) { margin: 3px 10px } .customResources label { margin-right: 10px; }\
  4221. .customResources input[type='checkbox'] { margin-right: 10px } .customResources button { margin: 0 10px } div.customResources { margin: 10px 0;} \
  4222. #settingsPanel table {border-collapse: collapse; }\
  4223. tr.totals > td { border-bottom: 1px solid grey; padding-top: 3px; color: #000080 } \
  4224. .rarity_Gold {color: blue; } .rarity_Silver {color: green; } .rarity_Special {color: purple; } .rarity_Legendary {color: orange; } .rarity_Mythic {color: teal; } \
  4225. #dialog-inventory { overflow-y: scroll; font: 10px Arial; } #dialog-inventory table { width: 100% } #dialog-inventory table th { text-align: left; font-weight: bold; }\
  4226. .slt_None {color: red;} .slt_Lead {color: blue;} .slt_Alch {color: green;} .slt_Jewe {color: gold;} .slt_Leat {color: brown;}\
  4227. #copy_settings_to { width: 200px; height: 350px; margin: 5px 0;} #copy_settings_from { margin: 5px 0;}\
  4228. ");
  4229.  
  4230. // Add settings panel to page body
  4231. $("body").append(
  4232. '<div id="settingsPanel" class="ui-widget-content">\
  4233. <div id="settings_title">\
  4234. <span class="ui-icon ui-icon-wrench" style="float: left;"></span>\
  4235. <span id="settings_close" class="ui-icon ui-icon-closethick" title="Click to hide preferences" style="float: right; cursor: pointer; display: block;"\></span>\
  4236. <span style="margin:3px">Settings (version ' + microVersion + ')</span>\
  4237. </div>\
  4238. <div id="script_settings"><ul></ul></div>\
  4239. <div id="account_settings">\
  4240. <div id="main_tabs"><ul></ul></div></div>\
  4241. <div id="account_info">\
  4242. <div id="info_tabs"><ul></ul></div></div>\
  4243. <div id="char_settings"></div>\
  4244. </div>');
  4245. // Add open settings button to page
  4246. $("body").append('<div id="settingsButton"><span class="ui-icon ui-icon-wrench" title="Click to show preferences" style="cursor: pointer; display: block;"></span></div>');
  4247. $("#settingsPanel").hide();
  4248. $("#settingsButton").click(function() {
  4249. $("#settingsButton").hide();
  4250. $("#pauseButton").hide();
  4251. $("#manualButton").hide();
  4252. $("#settingsPanel").show();
  4253. });
  4254.  
  4255. $("body").append(audioFile());
  4256.  
  4257. // Add pause button to page
  4258. $("body").append('<div id="pauseButton"></div>');
  4259. displayPause();
  4260. $("#pauseButton").click( function () {
  4261. PauseSettings();
  4262. });
  4263.  
  4264. // Add manual button to page
  4265. $("body").append('<div id="manualButton"></div>');
  4266. displayManual();
  4267. $("#manualButton").click( function () {
  4268. ManualSettings();
  4269. });
  4270. // Add info pane
  4271. $("body").append("<div id='prinfopane' class='header-newrelease'>");
  4272.  
  4273. $('#update-content-inventory-bags-0 .bag-header').waitUntilExists(function() {
  4274. if ($('#update-content-inventory-bags-0 .bag-header div').length && !$('#update-content-inventory-bags-0 .bag-header div.autovendor').length) {
  4275. $('#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>');
  4276. $("button#nwprofs-autovendor").on("click", vendorJunk);
  4277. }
  4278. });
  4279.  
  4280.  
  4281. $("#settings_close,settings_cancel").click(function() {
  4282. $("#settingsButton").show();
  4283. $("#pauseButton").show();
  4284. $("#manualButton").show();
  4285. $("#settingsPanel").hide();
  4286. });
  4287. //$('#script_settings').html('');
  4288. var tab = addTab("#script_settings", tr('tab.scriptSettings'));
  4289. addInputsUL(tab, 'script', 'main');
  4290. tab = addTab("#script_settings", tr('tab.advanced'));
  4291. var thtml = "<button id='reset_settings_btn'>Reset ALL Settings</button><br /><br />";
  4292. thtml += "Must be logged in and at the correct character to list it's items.<br />";
  4293. thtml += "<button id='list_inventory_btn'>List Inventory</button><br /><br />";
  4294. thtml += "List settings (display all the configuration and obscure char names to char 1,2... and banker)<br />";
  4295. thtml += "<button id='list_settings_btn'>Dump settings </button><br /><br />";
  4296. tab.html(thtml);
  4297.  
  4298. $('#reset_settings_btn').button();
  4299. $('#reset_settings_btn').click(function() {
  4300. window.setTimeout(function() {
  4301. GM_setValue("settings__char__" + c_name + "@" + loggedAccount, JSON.stringify(charSettingsList[c_name]));
  4302. console.log("Saved char_task setting: " + scope + "." + group + "." + name + "." + sub_name + " For: " + c_name);
  4303. var keys = GM_listValues();
  4304. for (i = 0; i < keys.length; i++) {
  4305. var key = keys[i];
  4306. GM_deleteValue(key);
  4307. }
  4308. GM_setValue("script_version", scriptVersion);
  4309. window.setTimeout(function() {
  4310. unsafeWindow.location.href = current_Gateway;
  4311. }, 0);
  4312. }, 0);
  4313. });
  4314.  
  4315. $('#list_inventory_btn').button();
  4316. $('#list_inventory_btn').click(function() {
  4317. var _inventory;
  4318. try {
  4319. _inventory = client.dataModel.model.ent.main.inventory;
  4320. }
  4321. catch (e) {
  4322. var str = "Inventory could not be loaded, make sure you are logged in and at the correct character."
  4323. $('<div id="dialog-error-inventory" title="Error loading inventory">' + str + '</div>').dialog({
  4324. resizable: true,
  4325. width: 500,
  4326. modal: false,
  4327. });
  4328. return;
  4329. }
  4330. var inv_tbl_head = "<table><tr><th>Slot #</th><th>Qty</th><th>Item Name</th><th>Rarity</th><th>Bound</th></tr>";
  4331. var str = '';
  4332. var slotCnt = 0;
  4333. _inventory.playerbags.forEach(function (bag) {
  4334. str += '<div>' + bag.name + '</div>';
  4335. str += inv_tbl_head;
  4336. bag.slots.forEach( function (slot, slotNum) {
  4337. if (!slot) return;
  4338. slotCnt++;
  4339. str += '<tr><td>' + slotNum +
  4340. '</td><td>' + slot.count + '</td><td class=" rarity_' + slot.rarity + '">' + slot.name +
  4341. '</td><td>' + slot.rarity + '</td><td>' + (slot.bound || slot.boundtoaccount) + '</td></tr>';
  4342. });
  4343. str += '</table><br/>';
  4344. });
  4345.  
  4346.  
  4347. _inventory.bags.filter(function(bag) {
  4348. return (["CraftingResources", "Overflow", "CraftingInventory", "Bank"].indexOf(bag.bagid) != -1);
  4349. })
  4350. .forEach(function(bag) {
  4351. str += '<div>' + bag.bagid + '</div>';
  4352. str += inv_tbl_head;
  4353. bag.slots.forEach( function (slot, slotNum) {
  4354. if (!slot) return;
  4355. str += '<tr><td>' + slotNum +
  4356. '</td><td>' + slot.count + '</td><td class=" rarity_' + slot.rarity + '">' + slot.name +
  4357. '</td><td>' + slot.rarity + '</td><td>' + (slot.bound || slot.boundtoaccount) + '</td></tr>';
  4358. });
  4359. str += '</table><br />';
  4360. });
  4361. $('<div id="dialog-inventory" title="Inventory listing">' + str + '</div>').dialog({
  4362. resizable: true,
  4363. width: 550,
  4364. height: 550,
  4365. modal: false,
  4366. });
  4367. });
  4368.  
  4369. $('#list_settings_btn').button();
  4370. $('#list_settings_btn').click(function() {
  4371. var str = 'Script Settings (version ' + microVersion + ')\n';
  4372. var tempObj;
  4373. tempObj = $.extend(true, {}, scriptSettings);
  4374. tempObj.autoLoginAccount = "";
  4375. tempObj.autoLoginPassword = "";
  4376. str += '' + JSON.stringify(tempObj,null,4) + '\n';
  4377. str += 'Account Settings\n';
  4378. tempObj = $.extend(true, {}, accountSettings);
  4379. if (accountSettings.consolidationSettings.bankCharName) {
  4380. var bankIndex = charNamesList.indexOf(accountSettings.consolidationSettings.bankCharName);
  4381. if (bankIndex == -1) str += "Bank set but not found in charNamesList\n";
  4382. else str += "Bank set and found at index:" + bankIndex + "\n";
  4383. tempObj.consolidationSettings.bankCharName = "Char " + bankIndex;
  4384. }
  4385. str += '' + JSON.stringify(tempObj,null,4) + '\n';
  4386. //str += '<pre>' + JSON.stringify(tempObj,null,4) + '</pre>';
  4387.  
  4388. str += 'Char Settings\n';
  4389. charNamesList.forEach(function (charName, idx){
  4390. tempObj = $.extend(true, {}, charSettingsList[charName]);
  4391. str += 'Char ' + idx + '\n';
  4392. tempObj.charName = "Char " + idx;
  4393. str += '' + JSON.stringify(tempObj,null,4) + '\n';
  4394. })
  4395.  
  4396. $('<div id="dialog-settings" title="Settings listing"><textarea style=" width: 98%; height: 98%;">' + str + '</textarea></div>').dialog({
  4397. resizable: true,
  4398. width: 550,
  4399. height: 750,
  4400. modal: false,
  4401. });
  4402. });
  4403.  
  4404. // Custom profiles
  4405. tab = addTab("#script_settings", tr('tab.customProfiles'));
  4406. var temp_html = '';
  4407. temp_html += '<div><label class="customProfiles">Task name: </label><select class=" custom_input customProfiles " id="custom_profiles_taskname">';
  4408. tasklist.forEach(function(task) {
  4409. if (!task.taskActive) return;
  4410. temp_html += '<option value="' + task.taskListName + '">' + task.taskListName + '</option>';
  4411. })
  4412. temp_html += '</select>';
  4413. temp_html += '<label class="customProfiles">Base Profile: </label><select class=" custom_input customProfiles " id="custom__profiles__baseprofile"></select>';
  4414. temp_html += '<button id="custom__profiles__viewbase_btn"></button>';
  4415. temp_html += '</div>';
  4416. 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/';
  4417. temp_html += '<div><textarea id="custom_profile_textarea" class=" custom_input customProfiles ">';
  4418. 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}';
  4419. temp_html += '</textarea></div>';
  4420. temp_html += '<div><button id="custom__profiles__import_btn">Import</button></div>';
  4421. temp_html += '<table><tr><th>#</th><th>Task Name</th><th>Base Profile</th><th>Profile Name</th><th><th></tr>';
  4422. customProfiles.forEach(function (cProfile, idx) {
  4423. temp_html += '<tr><td>' + (idx+1) + '</td>';
  4424. temp_html += '<td>' + cProfile.taskName + '</td>';
  4425. temp_html += '<td>' + cProfile.baseProfile + '</td>';
  4426. if (typeof cProfile.profile === 'object')
  4427. temp_html += '<td>' + cProfile.profile.profileName + '</td>';
  4428. temp_html += '<td><button class="custom_profiles_view" value=' + idx + '></button><button class="custom_profiles_delete" value=' + idx + '></button></td></tr>';
  4429. });
  4430. temp_html += '</table>';
  4431. tab.html(temp_html);
  4432. $( ".custom_profiles_view" ).button({
  4433. icons: {
  4434. primary: "ui-icon-zoomin"
  4435. },
  4436. text: false
  4437. });
  4438. $( ".custom_profiles_view" ).click( function(e) {
  4439. var pidx = $(this).val();
  4440. var str = "Task name : " + customProfiles[pidx].taskName + "\n";
  4441. str += "Base Profile : " + customProfiles[pidx].baseProfile + "\n"
  4442. str += "Profile : \n\n";
  4443. str += JSON.stringify(customProfiles[pidx].profile,null,4);
  4444.  
  4445. $('<div id="dialog-display-custom-profile" title="Custom profile"><textarea style=" width: 98%; height: 98%;">' + str + '</textarea></div>').dialog({
  4446. resizable: true,
  4447. width: 550,
  4448. height: 750,
  4449. modal: false,
  4450. });
  4451. });
  4452.  
  4453. $( ".custom_profiles_delete" ).button({
  4454. icons: {
  4455. primary: "ui-icon-trash"
  4456. },
  4457. text: false
  4458. });
  4459. $( ".custom_profiles_delete" ).click( function(e) {
  4460. var pidx = $(this).val();
  4461. customProfiles.splice(pidx,1);
  4462. GM_setValue("custom_profiles", JSON.stringify(customProfiles));
  4463. console.log('Deleted custom profile ' + pidx);
  4464. window.setTimeout(function() {
  4465. unsafeWindow.location.href = current_Gateway;
  4466. }, 0);
  4467. });
  4468. // Set up the advanced slot selects
  4469. $("#custom_profiles_taskname").change(function(e) {
  4470. var _taskname = $(this).val();
  4471. var _profiles = tasklist.filter(function(task) {
  4472. return task.taskListName == _taskname;
  4473. })[0].profiles.filter(function(profile) {
  4474. return profile.isProfileActive
  4475. });
  4476. var profileSelect = $("#custom__profiles__baseprofile").html("");
  4477. profileSelect.append($("<option />").val(null).text("new"));
  4478. _profiles.forEach(function(profile) {
  4479. profileSelect.append($("<option />").val(profile.profileName).text(profile.profileName));
  4480. });
  4481. });
  4482. $("#custom_profiles_taskname").change();
  4483.  
  4484. $('#custom__profiles__viewbase_btn').button({
  4485. icons: {
  4486. primary: "ui-icon-zoomin"
  4487. },
  4488. text: false
  4489. });
  4490. $('#custom__profiles__viewbase_btn').click(function() {
  4491. var _taskName = $("#custom_profiles_taskname").val();
  4492. var _baseProfile = $("#custom__profiles__baseprofile").val();
  4493. var _profiles = tasklist.filter(function(task) {
  4494. return task.taskListName == _taskName;
  4495. })[0].profiles.filter(function(profile) {
  4496. return profile.profileName === _baseProfile;
  4497. });
  4498. var str = JSON.stringify(_profiles,null,4);
  4499.  
  4500. $('<div id="dialog-display-profile" title="Profile"><textarea style=" width: 98%; height: 98%;">' + str + '</textarea></div>').dialog({
  4501. resizable: true,
  4502. width: 550,
  4503. height: 750,
  4504. modal: false,
  4505. });
  4506. });
  4507.  
  4508.  
  4509. $('#custom__profiles__import_btn').button();
  4510. $('#custom__profiles__import_btn').click(function() {
  4511. window.setTimeout(function() {
  4512. var taskName = $("#custom_profiles_taskname").val();
  4513. var baseProfile = $("#custom__profiles__baseprofile").val();
  4514. var profile;
  4515. try {
  4516. profile = JSON.parse($('#custom_profile_textarea').val());
  4517. }
  4518. catch (e) {
  4519. alert("Failed to parse custom profile. JSON not valid.");
  4520. return;
  4521. }
  4522. customProfiles.push({ taskName: taskName, baseProfile: baseProfile, profile: profile });
  4523. GM_setValue("custom_profiles", JSON.stringify(customProfiles));
  4524. window.setTimeout(function() {
  4525. unsafeWindow.location.href = current_Gateway;
  4526. }, 0);
  4527. }, 0);
  4528. });
  4529. //Tracked resources tab
  4530. tab = addTab("#script_settings", tr('tab.trackedResources'));
  4531. var temp_html = 'Insert human readable resource name and NeverWinter gateway internal resource name (from Inventory Listing)';
  4532. temp_html += '<div class="customResources"><label>Resource name: </label>';
  4533. temp_html += '<input type="text" name="" id="custom_resource_fname" \>';
  4534. temp_html += '<label>Inventory name: </label>';
  4535. temp_html += '<input type="text" name="" id="custom_resource_name" \>';
  4536. temp_html += '<br />'
  4537. temp_html += '<input type="checkbox" name="" id="custom_resource_countbank" \><label>Count in bank</label>';
  4538. temp_html += '<input type="checkbox" name="" id="custom_resource_unbound" checked="checked" \><label>unbound </label>';
  4539. temp_html += '<input type="checkbox" name="" id="custom_resource_btc" checked="checked" \><label>BtC </label>';
  4540. temp_html += '<input type="checkbox" name="" id="custom_resource_bta" checked="checked" \><label>BtA </label>';
  4541. temp_html += '<button id="custom_resources_add_btn">Add</button>';
  4542. temp_html += '</div>';
  4543. 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>';
  4544.  
  4545. trackResources.forEach(function (trRes, idx) {
  4546. temp_html += '<tr><td>' + (idx+1) + '</td>';
  4547. temp_html += '<td>' + trRes.fname + '</td>';
  4548. temp_html += '<td><span class=" ui-icon ' + (trRes.bank ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4549. temp_html += '<td><span class=" ui-icon ' + (trRes.unbound ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4550. temp_html += '<td><span class=" ui-icon ' + (trRes.btc ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4551. temp_html += '<td><span class=" ui-icon ' + (trRes.bta ? 'ui-icon-check' : 'ui-icon-close') + '"></span></td>';
  4552. temp_html += '<td><button class="custom_resources_delete" value=' + idx + '></button></td></tr>';
  4553. });
  4554. temp_html += '</table><br /><button id="custom_resources_reset">Reset to default</button>';
  4555. tab.html(temp_html);
  4556.  
  4557. $( ".custom_resources_delete" ).button({
  4558. icons: {
  4559. primary: "ui-icon-trash"
  4560. },
  4561. text: false
  4562. });
  4563. $( ".custom_resources_delete" ).click( function(e) {
  4564. if ( !loggedAccount ) {
  4565. var str = "Tracked resource could not be removed, make sure you are logged in.";
  4566. $('<div id="dialog-error-inventory" title="Error deleting tracked resource">' + str + '</div>').dialog({
  4567. resizable: true,
  4568. width: 500,
  4569. modal: false,
  4570. });
  4571. return;
  4572. }
  4573. var pidx = $(this).val();
  4574. trackResources.splice(pidx,1);
  4575. GM_setValue("tracked_resources", JSON.stringify(trackResources));
  4576. charNamesList.forEach( function (charName) {
  4577. charStatisticsList[charName].trackedResources.splice(pidx, 1);
  4578. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  4579. });
  4580. window.setTimeout(function() {
  4581. unsafeWindow.location.href = current_Gateway;
  4582. }, 0);
  4583. });
  4584. $( "#custom_resources_reset" ).button();
  4585. $( "#custom_resources_reset" ).click( function(e) {
  4586. if ( !loggedAccount ) {
  4587. var str = "Tracked resource could not be removed, make sure you are logged in.";
  4588. $('<div id="dialog-error-inventory" title="Error deleting tracked resource">' + str + '</div>').dialog({
  4589. resizable: true,
  4590. width: 500,
  4591. modal: false,
  4592. });
  4593. return;
  4594. }
  4595. GM_deleteValue("tracked_resources");
  4596. charNamesList.forEach( function (charName) {
  4597. charStatisticsList[charName].trackedResources = [];
  4598. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  4599. });
  4600. window.setTimeout(function() {
  4601. unsafeWindow.location.href = current_Gateway;
  4602. }, 0);
  4603. });
  4604.  
  4605. $('#custom_resources_add_btn').button();
  4606. $('#custom_resources_add_btn').click( function (e) {
  4607. var _fname = $("#custom_resource_fname").val();
  4608. var _name = $("#custom_resource_name").val();
  4609. var _bank = $("#custom_resource_countbank").prop('checked');
  4610. var _unbound = $("#custom_resource_unbound").prop('checked');
  4611. var _btc = $("#custom_resource_btc").prop('checked');
  4612. var _bta = $("#custom_resource_bta").prop('checked');
  4613. if ( _fname.length == 0 || _name.length == 0) {
  4614. var str = "Tracked resource could not be added. You have to enter both values!";
  4615. $('<div id="dialog-error-inventory" title="Error adding tracked resource">' + str + '</div>').dialog({
  4616. resizable: true,
  4617. width: 500,
  4618. modal: false,
  4619. });
  4620. return;
  4621. }
  4622. trackResources.push({ fname: _fname, name: _name, bank: _bank, unbound: _unbound, btc: _btc, bta: _bta });
  4623. GM_setValue("tracked_resources", JSON.stringify(trackResources));
  4624. window.setTimeout(function() {
  4625. unsafeWindow.location.href = current_Gateway;
  4626. }, 0);
  4627. });
  4628.  
  4629. tab = addTab("#script_settings", tr('tab.manualSettings'));
  4630. temp_html = '<p>In manual mode the script will stop when encountering a Leadership task.</p><br />';
  4631. 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. ';
  4632. temp_html += 'After a while the script will go ahead and continue looking for (non-Leadership) tasks for that slot.</p><br />';
  4633. temp_html += '<p>There are two buttons on the notification: "Ignore" tells the script to ignore Leadership and assign another (non-leadership) task. ';
  4634. temp_html += '"Done" tells it to re-scan the tasks after you manually assigned a Leadership task.</p><br />';
  4635. temp_html += '<p>This mode is enabled and disabled with the button next to the pause button.<p><br />';
  4636. 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 />';
  4637. tab.html(temp_html);
  4638. addInputsUL(tab, 'script', 'manual');
  4639.  
  4640.  
  4641. $("#script_settings").tabs({ active: false, collapsible: true });
  4642. setEventHandlers = true;
  4643. }
  4644.  
  4645. // Refresh is needed / Loading all the info (account, statistics and chars)
  4646. if (UIaccount != loggedAccount) {
  4647. UIaccount = loggedAccount;
  4648.  
  4649. var tabs = {
  4650. main: tr('tab.general'),
  4651. prof: tr('tab.professions'),
  4652. vend: tr('tab.vendor'),
  4653. bank: tr('tab.consolidation')
  4654. };
  4655.  
  4656. for (var key in tabs) {
  4657. var temp_tab = addTab("#main_tabs", tabs[key]);
  4658. addInputsUL(temp_tab, 'account', key);
  4659. }
  4660. var settings_copy_tab = addTab("#main_tabs", tr('tab.copySettings'));
  4661. $("div#main_tabs").tabs({ active: false, collapsible: true });
  4662.  
  4663. // Settings copy Tab
  4664. var temp_html = '';
  4665. temp_html += '<div><label class="">Copy settings from: </label><select class=" custom_input " id="copy_settings_from">';
  4666. charNamesList.forEach( function (charName) {
  4667. temp_html += '<option value="' + charName + '">' + charName + '</option>';
  4668. })
  4669. temp_html += '</select></div>';
  4670. 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">';
  4671. charNamesList.forEach( function (charName) {
  4672. temp_html += '<option value="' + charName + '">' + charName + '</option>';
  4673. })
  4674. temp_html += '</select></div><div><button id="copy_settings_button" class="" value="">copy</button></div>';
  4675. settings_copy_tab.html(temp_html);
  4676. $( "#copy_settings_button" ).button();
  4677. $( "#copy_settings_button" ).click( function(e) {
  4678. var _from = $("#copy_settings_from").val();
  4679. var _fromSettings = charSettingsList[_from];
  4680. if (!_fromSettings) return;
  4681. var _to = $("#copy_settings_to").val();
  4682. _to.forEach(function (toName){
  4683. if (charNamesList.indexOf(toName) == -1) return;
  4684. var newSettings = $.extend(true, {}, _fromSettings);
  4685. newSettings.charName = toName;
  4686. charSettingsList[toName] = newSettings;
  4687. GM_setValue("settings__char__" + toName + "@" + loggedAccount, JSON.stringify(newSettings));
  4688. console.log("Copied settings from: ", _from, " to: ", toName);
  4689. })
  4690. window.setTimeout(function() {
  4691. unsafeWindow.location.href = current_Gateway;
  4692. }, 0);
  4693. });
  4694.  
  4695. //Statisitcs Tabs
  4696. var temp_tab = addTab("#info_tabs", tr('tab.counters'));
  4697. temp_tab.append("<div id='rcounters'></div>");
  4698.  
  4699. temp_tab = addTab("#info_tabs", tr('tab.refine_hist'));
  4700. temp_tab.append("<div id='refine_hist'></div>");
  4701. temp_tab = addTab("#info_tabs", tr('tab.visits'));
  4702. temp_tab.append("<div id='sca_v'></div>");
  4703. temp_tab = addTab("#info_tabs", tr('tab.workers'));
  4704. temp_tab.append("<div id='worker_overview'></div>");
  4705. temp_tab = addTab("#info_tabs", tr('tab.tools'));
  4706. temp_tab.append("<div id='tools_overview'></div>");
  4707. temp_tab = addTab("#info_tabs", tr('tab.resources'));
  4708. temp_tab.append("<div id='resource_tracker'></div>");
  4709. temp_tab = addTab("#info_tabs", tr('tab.levels'));
  4710. temp_tab.append("<div id='profession_levels'></div>");
  4711. temp_tab = addTab("#info_tabs", tr('tab.slots'));
  4712. temp_tab.append("<div id='slot_tracker'></div>");
  4713. $("#info_tabs").tabs({ active: false, collapsible: true });
  4714.  
  4715. // Adding per char settings UI
  4716. var wrp = $('<div id="charSettingsAccordion">');
  4717. $("#char_settings").append(wrp);
  4718. charNamesList.forEach( function(charName, idx) {
  4719. if (charSettingsList[charName].general.active) {
  4720. wrp.append('<h3>' + charName + '</h3>');
  4721. } else {
  4722. wrp.append("<h3 class='inactive'>" + charName + '</h3>');
  4723. }
  4724. var wrp2 = $('<div id="charContainer' + idx + '">');
  4725. wrp.append(wrp2);
  4726. addInputsUL(wrp2[0], 'char', 'main_not_tab', charName);
  4727. var char_tabs = $('<div class="charSettingsTabs" id="char_tabs_' + idx + '"><ul></ul></div>');
  4728. wrp2.append(char_tabs);
  4729. var task_tab = addTab(char_tabs[0], "Tasks");
  4730.  
  4731. // Creating the Tasks custom tab
  4732. 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>');
  4733. var _slotOptions = [];
  4734. for (var i = 0; i < 10; i++)
  4735. _slotOptions.push({
  4736. name: i,
  4737. value: i
  4738. });
  4739. var _priorityOptions = [{name:'high',value:0},{name:'medium',value:1},{name:'low',value:2}];
  4740. var _stopTaskAtLevelOptions = [];
  4741. _stopTaskAtLevelOptions.push({name: 'none', value: 0});
  4742. for (var i = 1; i < 26; i++) _stopTaskAtLevelOptions.push({name: i, value: i});
  4743.  
  4744. tasklist.forEach(function(task) {
  4745. if (!task.taskActive) return;
  4746. var _profileNames = [];
  4747. task.profiles.forEach(function(profile) {
  4748. if (profile.isProfileActive) _profileNames.push({
  4749. name: profile.profileName,
  4750. value: profile.profileName
  4751. });
  4752. });
  4753. 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};
  4754. var _profile = {scope: 'char_task', group: 'taskListSettings', name: task.taskListName, sub_name: 'taskProfile', opts: _profileNames ,title: task.taskListName, type: 'select', pane: 'tasks1', tooltip: ''};
  4755. var _priority = {scope: 'char_task', group: 'taskListSettings', name: task.taskListName, sub_name: 'taskPriority', opts: _priorityOptions ,title: task.taskListName, type: 'select', pane: 'tasks1', tooltip: ''};
  4756. var _stop = {scope: 'char_task', group: 'taskListSettings', name: task.taskListName, sub_name: 'stopTaskAtLevel', opts: _stopTaskAtLevelOptions ,title: task.taskListName, type: 'select', pane: 'tasks1', tooltip: ''};
  4757.  
  4758. var _slt = createInput(_slots, charName, 'settingsInput', 'settingsLabel');
  4759. var _prf = createInput(_profile, charName, 'settingsInput', 'settingsLabel');
  4760. var _pr = createInput(_priority, charName, 'settingsInput', 'settingsLabel');
  4761. var _stp = createInput(_stop, charName, 'settingsInput', 'settingsLabel');
  4762. var tr = $("<tr>");
  4763. $("<td>").append(_slt.label).appendTo(tr);
  4764. $("<td>").append(_slt.input).appendTo(tr);
  4765. $("<td>").append(_prf.input).appendTo(tr);
  4766. $("<td>").append(_pr.input).appendTo(tr);
  4767. $("<td>").append(_stp.input).appendTo(tr);
  4768. tr.appendTo(tableHTML);
  4769. });
  4770. task_tab.append(tableHTML);
  4771.  
  4772. // Manual Slots allocation tab
  4773. var task2_tab = addTab(char_tabs[0], "Manual Tasks");
  4774. var tableHTML2 = $('<table><thead><tr><th>Slot #</th><th>Profession</th><th>Profile</th></tr></thead><tbody>');
  4775.  
  4776. var taskOpts = [];
  4777. tasklist.forEach(function(task) {
  4778. if (!task.taskActive) return;
  4779. taskOpts.push({ name: task.taskListName, value: task.taskListName });
  4780. })
  4781. function fillProfile(taskName) {
  4782. var _profiles = tasklist.filter(function(task) {
  4783. return task.taskListName == taskName;
  4784. })[0].profiles.filter(function(profile) {
  4785. return profile.isProfileActive
  4786. });
  4787. var options = [];
  4788. _profiles.forEach(function(profile) {
  4789. options.push({ name: profile.profileName, value: profile.profileName });
  4790. });
  4791. return options;
  4792. }
  4793. // 9 slots
  4794. for (var j = 0; j < 9; j++) {
  4795. 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: '',
  4796. onchange: function (newValue, elm) {
  4797. var profileId = $(elm).attr('id').split('__');
  4798. profileId[profileId.length-1] = 'Profile';
  4799. profileId = profileId.join('__');
  4800. var profileSelect = $("[id='" + profileId + "']").empty();
  4801. fillProfile(newValue).forEach(function(option) {
  4802. profileSelect.append($("<option />").val(option.value).text(option.name));
  4803. });
  4804. profileSelect.change();
  4805. }
  4806. };
  4807. var _tsk = createInput(_tasks, charName, 'settingsInput taskListSettingsManual taskListSettingsManualTask', 'settingsLabel');
  4808. var _profile = {scope: 'char_task', group: 'taskListSettingsManual', name: j, sub_name: 'Profile', opts: fillProfile($(_tsk.input).val()) ,title: '', type: 'select', pane: 'tasks2', tooltip: ''};
  4809. var _prf = createInput(_profile, charName, 'settingsInput taskListSettingsManual taskListSettingsManualProfile', 'settingsLabel');
  4810. var tr = $("<tr>");
  4811. //$("<td>").append(_slt.label).appendTo(tr);
  4812. $("<td>").append(_tsk.label).appendTo(tr);
  4813. $("<td>").append(_tsk.input).appendTo(tr);
  4814. $("<td>").append(_prf.input).appendTo(tr);
  4815. tr.appendTo(tableHTML2);
  4816. }
  4817. task2_tab.append(tableHTML2);
  4818.  
  4819. // Char settings tabs
  4820. var tabs_c = {
  4821. main: 'General settings',
  4822. prof: 'Professions',
  4823. vend: 'Vendor options',
  4824. bank: 'AD Consolidation'
  4825. };
  4826.  
  4827. for (var key in tabs_c) {
  4828. var temp_tab = addTab(char_tabs[0], tabs_c[key]);
  4829. addInputsUL(temp_tab, 'char', key, charName);
  4830. }
  4831. });
  4832. $("#charSettingsAccordion").accordion({
  4833. heightStyle: "content",
  4834. autoHeight: false,
  4835. clearStyle: true,
  4836. active: false,
  4837. collapsible: true,
  4838. });
  4839. $(".charSettingsTabs").tabs();
  4840. setEventHandlers = true;
  4841. updateCounters();
  4842. }
  4843.  
  4844. // Adding the save events
  4845. if (setEventHandlers) {
  4846. $("#settingsPanel input[type='checkbox'], #settingsPanel select").not(".custom_input").unbind("change");
  4847. $("#settingsPanel input[type='checkbox'], #settingsPanel select").change(function (evt) {
  4848. saveSetting(evt.target);
  4849. });
  4850. $("#settingsPanel input[type='text'], #settingsPanel input[type='password']").not(".custom_input").unbind("input");
  4851. $("#settingsPanel input[type='text'], #settingsPanel input[type='password']").on('input', function (evt) {
  4852. var value = $(evt.target).val();
  4853. setTimeout(function(value) {
  4854. if ($(evt.target).val() !== value) return;
  4855. saveSetting(evt.target);
  4856. }, 1000, value);
  4857. });
  4858. }
  4859. function saveSetting(elm) {
  4860. var scope = $(elm).data('scope');
  4861. var group = $(elm).data('group');
  4862. var name = $(elm).data('name');
  4863.  
  4864. var value;
  4865. if ($(elm).prop('type') === 'checkbox') value = $(elm).prop('checked');
  4866. else value = $(elm).val();
  4867.  
  4868. var fun = $(elm).data('onchange');
  4869. if (typeof fun === 'function') {
  4870. var retval = fun(value, elm);
  4871. if (retval === false ) return; // Allowing the onchange function to stop the save
  4872. }
  4873. switch (scope) {
  4874. case 'script':
  4875. scriptSettings[group][name] = value;
  4876. setTimeout(function() {
  4877. GM_setValue("settings__script", JSON.stringify(scriptSettings));
  4878. console.log("Saved script setting: " + scope + "." + group + "." + name + " Value: " + value);
  4879. $(elm).addClass("inputSaved");
  4880. setTimeout(function() {
  4881. $(elm).removeClass("inputSaved");
  4882. },1500);
  4883. }, 0);
  4884. break;
  4885. case 'account':
  4886. accountSettings[group][name] = value;
  4887. setTimeout(function() {
  4888. GM_setValue("settings__account__" + loggedAccount, JSON.stringify(accountSettings));
  4889. console.log("Saved account setting: " + scope + "." + group + "." + name + " Value: " + value + " For: " + loggedAccount);
  4890. $(elm).addClass("inputSaved");
  4891. setTimeout(function() {
  4892. $(elm).removeClass("inputSaved");
  4893. },1500);
  4894. }, 0);
  4895. break;
  4896. case 'char':
  4897. var c_name = $(elm).data('charName');
  4898. if (c_name && charSettingsList[c_name]) {
  4899. charSettingsList[c_name][group][name] = value;
  4900. setTimeout(function() {
  4901. GM_setValue("settings__char__" + c_name + "@" + loggedAccount, JSON.stringify(charSettingsList[c_name]));
  4902. console.log("Saved char setting: " + scope + "." + group + "." + name + " Value: " + value + " For: " + c_name);
  4903. $(elm).addClass("inputSaved");
  4904. setTimeout(function() {
  4905. $(elm).removeClass("inputSaved");
  4906. },1500);
  4907. }, 0);
  4908. }
  4909. break;
  4910. case 'char_task':
  4911. var sub_name = $(elm).data('sub_name');
  4912. var c_name = $(elm).data('charName');
  4913. if (c_name && charSettingsList[c_name]) {
  4914. charSettingsList[c_name][group][name][sub_name] = value;
  4915. setTimeout(function() {
  4916. GM_setValue("settings__char__" + c_name + "@" + loggedAccount, JSON.stringify(charSettingsList[c_name]));
  4917. console.log("Saved char_task setting: " + scope + "." + group + "." + name + "." + sub_name + " Value: " + value + " For: " + c_name);
  4918. $(elm).addClass("inputSaved");
  4919. setTimeout(function() {
  4920. $(elm).removeClass("inputSaved");
  4921. },1500);
  4922. }, 0);
  4923. }
  4924. break;
  4925. }
  4926. }
  4927.  
  4928. // Helper function to create input elements
  4929. function createInput( settingsItem, charName , input_css_classes, label_css_classes) {
  4930. var input;
  4931. var label;
  4932.  
  4933. var id_name;
  4934. var value;
  4935. switch (settingsItem.scope) {
  4936. case 'script':
  4937. value = scriptSettings[settingsItem.group][settingsItem.name];
  4938. id_name = "setting__script__" + settingsItem.group + "__" + settingsItem.name;
  4939. break;
  4940. case 'account':
  4941. id_name = "setting__account__" + settingsItem.group + "__" + settingsItem.name;
  4942. value = accountSettings[settingsItem.group][settingsItem.name];
  4943. break;
  4944. case 'char':
  4945. id_name = "setting__char__" + charName + "__" + settingsItem.group + "__" + settingsItem.name;
  4946. value = charSettingsList[charName][settingsItem.group][settingsItem.name];
  4947. break;
  4948. case 'char_task':
  4949. id_name = "setting__char__" + charName + "__" + settingsItem.group + "__" + settingsItem.name+ "__" + settingsItem.sub_name;
  4950. value = charSettingsList[charName][settingsItem.group][settingsItem.name][settingsItem.sub_name];
  4951. break;
  4952.  
  4953. }
  4954.  
  4955. switch (settingsItem.type) {
  4956. case 'checkbox':
  4957. case 'text':
  4958. case 'password':
  4959. input = $("<input type=\"" + settingsItem.type + "\" name=\"" + id_name + "\" id=\"" + id_name + "\" class=\"" + input_css_classes + "\" \>");
  4960. break;
  4961. case 'select':
  4962. input = $("<select name=\"" + id_name + "\" id=\"" + id_name + "\" class=\"" + input_css_classes + "\" >");
  4963. settingsItem.opts.forEach( function (option) {
  4964. input.append($("<option value=\"" + option.value + "\">" + option.name + "</option>"));
  4965. });
  4966. break;
  4967. case 'void':
  4968. break;
  4969. default:
  4970. break;
  4971.  
  4972. }
  4973. if (settingsItem.type == 'checkbox') input.prop('checked', value);
  4974. else input.val(value);
  4975. input.data('scope', settingsItem.scope);
  4976. input.data('group', settingsItem.group);
  4977. input.data('name', settingsItem.name);
  4978. if (settingsItem.sub_name) input.data('sub_name', settingsItem.sub_name);
  4979. if (charName) input.data('charName', charName);
  4980. if (settingsItem.onchange) input.data('onchange', settingsItem.onchange);
  4981. label = $('<label title="' + settingsItem.tooltip + '" class="' + label_css_classes + '" for="' + id_name + '">' + settingsItem.title + '</label>');
  4982. return { input: input, label: label };
  4983. }
  4984.  
  4985.  
  4986. function addInputsUL(parentSelector, scope, pane, charName) {
  4987.  
  4988. var settingListToAdd = settingnames.filter(function(element) {
  4989. return (element.scope == scope && element.pane == pane);
  4990. });
  4991.  
  4992. if (!charName) charName = '';
  4993. var ul = $("<ul></ul>");
  4994. settingListToAdd.forEach( function (setting) {
  4995. var to_add = createInput(setting, charName, 'settingsInput', 'settingsLabel');
  4996. var li = $("<li>");
  4997. switch (setting.type) {
  4998. case 'checkbox':
  4999. li.append(to_add.input);
  5000. li.append(to_add.label);
  5001. break;
  5002. case 'text':
  5003. case 'password':
  5004. case 'select':
  5005. case 'void':
  5006. li.append(to_add.label);
  5007. li.append(to_add.input);
  5008. break;
  5009. }
  5010. ul.append(li);
  5011. })
  5012. $(parentSelector).append(ul);
  5013. }
  5014.  
  5015. function addTab(parentSelector, tabTitle, tabId) {
  5016. if (!tabId) {
  5017. var tabs_num = $(" > ul > li", parentSelector).length + 1;
  5018. tabId = $(parentSelector).attr('id') + "_tab_" + tabs_num;
  5019. }
  5020. $(" > ul", parentSelector).append("<li><a href='#" + tabId + "'>" + tabTitle + "</a></li>");
  5021. var tab = $("<div id='" + tabId + "'></div>");
  5022. $(parentSelector).append(tab);
  5023. return tab;
  5024. }
  5025. // Close the panel
  5026. /*
  5027. $("#settingsButton").show();
  5028. $("#pauseButton img").attr("src", (settings["paused"] ? image_play : image_pause));
  5029. $("#pauseButton img").attr("title", "Click to " + (settings["paused"] ? "resume" : "pause") + " task script");
  5030. $("#pauseButton").show();
  5031. $("#settingsPanel").hide();
  5032. */
  5033. }
  5034.  
  5035. function displayPause() {
  5036. if (scriptSettings.general.scriptPaused) {
  5037. $('#pauseButton').html('<span class="ui-icon ui-icon-play" title="Click to resume task script" style="cursor: pointer; display: block;"></span>');
  5038. }
  5039. else {
  5040. $('#pauseButton').html('<span class="ui-icon ui-icon-pause" title="Click to pause task script" style="cursor: pointer; display: block;"></span>');
  5041. }
  5042. }
  5043. function PauseSettings(_action) {
  5044. switch (_action) {
  5045. case true:
  5046. case "pause":
  5047. scriptSettings.general.scriptPaused = true;
  5048. break;
  5049. case false:
  5050. case 'unpause':
  5051. scriptSettings.general.scriptPaused = false;
  5052. break;
  5053. default:
  5054. scriptSettings.general.scriptPaused = !scriptSettings.general.scriptPaused;
  5055. break;
  5056. }
  5057. setTimeout(function() {
  5058. //console.log("Pause set to", scriptSettings.general.scriptPaused);
  5059. GM_setValue("settings__script", JSON.stringify(scriptSettings));
  5060. }, 0);
  5061. displayPause();
  5062. }
  5063.  
  5064. function displayManual() {
  5065. if (scriptSettings.general.leadershipMode) {
  5066. $('#manualButton').html('<span class="ui-icon ui-icon-transfer-e-w" title="Click to disable manual leadership handling" style="cursor: pointer; display: block;"></span>');
  5067. }
  5068. else {
  5069. $('#manualButton').html('<span class="ui-icon ui-icon-person" title="Click to enable manual leadership handling" style="cursor: pointer; display: block;"></span>');
  5070. }
  5071. }
  5072.  
  5073. function ManualSettings() {
  5074. charNamesList.forEach( function (charName, idx) {
  5075. if (leadershipSlots[charName]) {
  5076. chartimers[idx] = null;
  5077. }
  5078. });
  5079. scriptSettings.general.leadershipMode = !scriptSettings.general.leadershipMode;
  5080. leadershipSlots = {};
  5081. setTimeout(function() {
  5082. GM_setValue("settings__script", JSON.stringify(scriptSettings));
  5083. }, 0);
  5084. displayManual();
  5085. if (waitingNextChar) {
  5086. clearTimeout(timerHandle);
  5087. timerHandle = window.setTimeout(function() {
  5088. process();
  5089. }, delay.SHORT);
  5090. }
  5091. }
  5092.  
  5093. function IgnoreButton(idx, done) {
  5094. if (done) {
  5095. chartimers[idx] = leadershipSlots[charNamesList[idx]] = null;
  5096. } else {
  5097. chartimers[idx] = leadershipSlots[charNamesList[idx]] = new Date();
  5098. }
  5099. if (waitingNextChar) {
  5100. clearTimeout(timerHandle);
  5101. curCharNum = GM_setValue("curCharNum_" + loggedAccount, idx);
  5102. timerHandle = window.setTimeout(function() {
  5103. process();
  5104. }, delay.SHORT);
  5105. }
  5106. }
  5107.  
  5108. function updateCounters() {
  5109.  
  5110. function formatNum(num) {
  5111. if ((num / 1000000) > 1)
  5112. return ((num / 1000000).toFixed(1) + 'm');
  5113. if ((num / 1000) > 1)
  5114. return ((num / 1000).toFixed(1) + 'k');
  5115. return Math.floor(num);
  5116. }
  5117.  
  5118. var total = [0, 0, 0, 0];
  5119. var html = '<table>';
  5120. html += "<tr><th>Character Name</th><th>#slots</th><th>R.Counter</th><th>~ad/h</th>";
  5121. html += "<th>RAD</th><th>AD</th><th>gold</th><th>rBI</th><th>BI</th><th>R.today<th></th></tr>";
  5122.  
  5123.  
  5124. charNamesList.forEach(function(charName) {
  5125. var counterTime = (Date.now() - charStatisticsList[charName].general.refineCounterReset) / 1000 / 60 / 60; // in hours.
  5126. var radh = 0;
  5127. if (counterTime > 0) radh = charStatisticsList[charName].general.refineCounter / counterTime;
  5128. var outdated = (charStatisticsList[charName].general.lastVisit < lastDailyResetTime);
  5129.  
  5130. total[0] += charStatisticsList[charName].general.refineCounter;
  5131. total[1] += charStatisticsList[charName].general.diamonds;
  5132. total[2] += charStatisticsList[charName].general.gold;
  5133. total[3] += outdated ? 0 : (charStatisticsList[charName].general.refined[0] | 0);
  5134.  
  5135. html += "<tr>";
  5136. html += "<td>" + charName + "</td>";
  5137. html += "<td>" + charStatisticsList[charName].general.activeSlots + "</td>";
  5138. html += "<td>" + formatNum(charStatisticsList[charName].general.refineCounter) + "</td>";
  5139. html += "<td>" + formatNum(radh) + "</td>";
  5140. html += "<td>" + formatNum(charStatisticsList[charName].general.rad) + "</td>";
  5141. html += "<td>" + formatNum(charStatisticsList[charName].general.diamonds) + "</td>";
  5142. html += "<td>" + formatNum(charStatisticsList[charName].general.gold) + "</td>";
  5143. html += "<td>" + formatNum(charStatisticsList[charName].general.rBI) + "</td>";
  5144. html += "<td>" + formatNum(charStatisticsList[charName].general.BI) + "</td>";
  5145. html += "<td>" + (outdated ? "0*" : formatNum(charStatisticsList[charName].general.refined[0] | 0)) + "</td>";
  5146. //html += "<td>" + formatNum(charStatisticsList[charName].general.refineLimitLeft) + "</td>";
  5147. html += "</tr>";
  5148. });
  5149. html += "<tr class='totals'><td>Totals (without AD in ZAX):</td><td></td><td>" + formatNum(total[0]) + "</td><td></td>";
  5150. html += "<td></td><td>" + formatNum(total[1]) + "</td><td>" + formatNum(total[2]) + "</td>";
  5151. html += "<td></td><td></td><td>" + formatNum(total[3]) + "<td></td></tr>";
  5152. html += "</table>";
  5153. html += "*No info for this reset yet. <br />";
  5154. html += "<button>Reset Refined Counter</button>";
  5155. $('#rcounters').html(html);
  5156.  
  5157. $('#rcounters button').button();
  5158. $('#rcounters button').click(function() {
  5159. charNamesList.forEach(function(charName) {
  5160. charStatisticsList[charName].general.refineCounter = 0;
  5161. charStatisticsList[charName].general.refineCounterReset = Date.now();
  5162. // !! This can couse a freeze on slow computers.
  5163. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  5164. });
  5165. updateCounters();
  5166. });
  5167.  
  5168. //refine_hist
  5169. var total = [];
  5170. var slotSum = 0;
  5171. var html = '<table>';
  5172. html += "<tr><th>Character Name</th>"
  5173. for (var i = 0; i < 8; i++) {
  5174. html += "<th>" + (-1 * i) + "</th>";
  5175. total[i] = 0;
  5176. }
  5177. html += "<th>avg</th>"
  5178. html += "<th>per slot</th>"
  5179. html += "</tr>";
  5180.  
  5181. charNamesList.forEach(function(charName) {
  5182. var outdated = (charStatisticsList[charName].general.lastVisit < lastDailyResetTime);
  5183.  
  5184. html += "<tr>";
  5185. html += "<td>" + charName + "</td>";
  5186. html += "<td>" + (outdated ? "0*" : formatNum(charStatisticsList[charName].general.refined[0] | 0)) + "</td>";
  5187. var sum = 0; var cnt = 0;
  5188. for (var i = 1; i < 8; i++) {
  5189. var refined = charStatisticsList[charName].general.refined[i] | 0
  5190. sum += refined; if (refined) cnt++;
  5191. html += "<td>" + formatNum(refined) + "</td>";
  5192. total[i] += refined;
  5193. }
  5194. html += "<td>" + formatNum(sum/cnt) + "</td>";
  5195. html += "<td>" + formatNum(sum / cnt / (charStatisticsList[charName].general.activeSlots)) + "</td>";
  5196. html += "</tr>";
  5197. total[0] += outdated ? 0 : charStatisticsList[charName].general.refined[0] | 0;
  5198. slotSum += charStatisticsList[charName].general.activeSlots;
  5199. });
  5200. html += "<tr class='totals'><td>Totals (without AD in ZAX):</td>";
  5201. var tsum = 0; var cnt = 0;
  5202. for (var i = 1; i < 8; i++) {
  5203. tsum += total[i]; if (total[i]) cnt++;
  5204. }
  5205. for (var i = 0; i < 8; i++) {
  5206. html += "<td>" + formatNum(total[i]) + "</td>";
  5207. }
  5208. html += "<td>" + formatNum(tsum/cnt) + "</td>";
  5209. html += "<td>" + formatNum(tsum / cnt / slotSum) + "</td>";
  5210. html += "</tr></table><br />";
  5211. html += "Total (1 - 7): " + formatNum(tsum);
  5212. $('#refine_hist').html(html);
  5213.  
  5214. // Worker tab update.
  5215. html = '<table class="professionRanks">';
  5216. var temp = "";
  5217. html += "<tr><th>Char name</th>";
  5218. var options = "";
  5219. var workerTabSelects = ["Leadership", "Alchemy", "Jewelcrafting"];
  5220. $.each(charStatisticsList[charNamesList[0]].professions, function(profession) {
  5221. options += "<option value='" + profession + "'>" + profession + "</option>";
  5222. })
  5223.  
  5224. for (var i = 0; i < 3; i++) {
  5225. //saving current select values
  5226. if ($('#setting__worker__tab__p' + i).val()) workerTabSelects[i] = $('#setting__worker__tab__p' + i).val();
  5227. html += "<th colspan=6>" + "<select name='setting__worker__tab__p" + i + "' id='setting__worker__tab__p" + i + "'>" + options + "</select></th>";
  5228. temp += "<th>p</th><th>b</th><th>g</th><th>t3</th><th>t2</th><th>t1</th>";
  5229. }
  5230. html += "</tr><tr><th></th>" + temp + "</tr>";
  5231. charNamesList.forEach(function(charName) {
  5232. temp = "";
  5233. html += "<tr><td rowspan=2>" + charName + "</td>";
  5234. for (var i = 0; i < 3; i++) {
  5235. var list = charStatisticsList[charName].professions[workerTabSelects[i]];
  5236. for (var ix = 0; ix < 6; ix++) {
  5237. html += "<td class='ranked'>" + $.trim(list.workersUsed[ix]) + "</td>";
  5238. temp += "<td class='ranked2'>" + $.trim(list.workersUnused[ix]) + "</td>";
  5239. };
  5240. }
  5241. /*
  5242. $.each(charStatisticsList[charName].workers, function (pf, list) {
  5243. for (var ix = 0; ix < 6; ix++) {
  5244. html += "<td class='ranked'>" + $.trim(list.used[ix]) + "</td>";
  5245. temp += "<td class='ranked2'>" + $.trim(list.unused[ix]) + "</td>";
  5246. };
  5247. })
  5248. */
  5249. html += "</tr><tr>" + temp + "</tr>";
  5250. })
  5251.  
  5252. html += "</table>";
  5253. $('#worker_overview').html(html);
  5254. for (var i = 0; i < 3; i++) {
  5255. $('#setting__worker__tab__p' + i).val(workerTabSelects[i]);
  5256. $('#setting__worker__tab__p' + i).change(function() {
  5257. updateCounters();
  5258. });
  5259. }
  5260.  
  5261. // Tools tab update.
  5262. html = '<table class="professionRanks">';
  5263. var temp = "";
  5264. html += "<tr><th>Char name</th>";
  5265. var options = "";
  5266. var toolsTabSelects = ["Crucible", "Mortar", "Philosophersstone", "Graver"];
  5267. $.each(charStatisticsList[charNamesList[0]].tools, function(tool) {
  5268. options += "<option value='" + tool + "'>" + tool + "</option>";
  5269. });
  5270.  
  5271. for (var i = 0; i < 4; i++) {
  5272. //saving current select values
  5273. if ($('#setting__tools__tab__p' + i).val()) toolsTabSelects[i] = $('#setting__tools__tab__p' + i).val();
  5274. html += "<th colspan=4>" + "<select name='setting__tools__tab__p" + i + "' id='setting__tools__tab__p" + i + "'>" + options + "</select></th>";
  5275. temp += "<th>p</th><th>b</th><th>g</th><th>w</th>";
  5276. }
  5277. html += "</tr><tr><th></th>" + temp + "</tr>";
  5278. charNamesList.forEach(function(charName) {
  5279. temp = "";
  5280. html += "<tr><td rowspan=2>" + charName + "</td>";
  5281. for (var i = 0; i < 4; i++) {
  5282. var list = charStatisticsList[charName].tools[toolsTabSelects[i]];
  5283. for (var ix = 0; ix < 4; ix++) {
  5284. html += "<td class='tranked'>" + $.trim(list.used[ix]) + "</td>";
  5285. temp += "<td class='tranked2'>" + $.trim(list.unused[ix]) + "</td>";
  5286. };
  5287. }
  5288. html += "</tr><tr>" + temp + "</tr>";
  5289. })
  5290.  
  5291. html += "</table>";
  5292. $('#tools_overview').html(html);
  5293. for (var i = 0; i < 4; i++) {
  5294. $('#setting__tools__tab__p' + i).val(toolsTabSelects[i]);
  5295. $('#setting__tools__tab__p' + i).change(function() {
  5296. updateCounters();
  5297. });
  5298. }
  5299.  
  5300.  
  5301. // Resource tracker update.
  5302. html = "<table class='withRotation'><tr><th class='rotate'><div><span>Character Name</div></span></th>";
  5303. html += "<th class='rotate'><div><span>Main bags empty slots</div></span></th>";
  5304. html += "<th class='rotate'><div><span>Celestials</div></span></th>";
  5305. html += "<th class='rotate'><div><span>Ardents</div></span></th>";
  5306. trackResources.forEach(function(item) {
  5307. html += "<th class='rotate'><div><span>" + item.fname + "</div></span></th>";
  5308. })
  5309. var total = []; for (var i = 0; i < trackResources.length; i++) total[i] = 0;
  5310. html += '</tr>';
  5311.  
  5312. var endhtml = '';
  5313. charNamesList.forEach(function(charName) {
  5314. endhtml += '<tr><td>' + charName + '</td>';
  5315. endhtml += '<td>' + charStatisticsList[charName].general.emptyBagSlots + '</td>';
  5316. endhtml += '<td>' + charStatisticsList[charName].general.celestial + '</td>';
  5317. endhtml += '<td>' + charStatisticsList[charName].general.ardent + '</td>';
  5318. charStatisticsList[charName].trackedResources.forEach(function(count, idx) {
  5319. endhtml += '<td>' + count + '</td>';
  5320. total[idx] += count;
  5321. })
  5322. endhtml += '</tr>';
  5323. })
  5324. endhtml += "</table>";
  5325.  
  5326. html += "<tr class=\"totals\"><td>Totals:</td><td>--</td><td>--</td><td>--</td>";
  5327. for (var i = 0; i < total.length; i++) html += "<td>" + total[i] + "</td>";
  5328. html += "</tr>";
  5329.  
  5330. html += endhtml
  5331. $('#resource_tracker').html(html);
  5332.  
  5333.  
  5334. // 'profession_levels' tab
  5335. html = '<table class="withRotation">';
  5336. html += "<tr><th class='rotate'><div><span>Character Name</div></span></th>";
  5337. html += "<th class='rotate'><div><span>#slots</div></span></th>";
  5338. $.each(charStatisticsList[charNamesList[0]].professions, function(profession) {
  5339. html += "<th class='rotate'><div><span>" + profession + "</div></span></th>";
  5340. });
  5341. html += "</tr>";
  5342. charNamesList.forEach(function(charName) {
  5343. html += "<tr>";
  5344. html += "<td>" + charName + "</td>";
  5345. html += "<td>" + charStatisticsList[charName].general.activeSlots + "</td>";
  5346. $.each(charStatisticsList[charName].professions, function(name, profData) {
  5347. html += "<td>" + profData.level + "</td>";
  5348. });
  5349. html += "</tr>";
  5350. });
  5351. html += "</table>";
  5352. $('#profession_levels').html(html);
  5353.  
  5354. // 'slot_tracker' tab
  5355. html = '<table>';
  5356. html += "<tr><th>Character Name</th>";
  5357. for (var i = 0; i < 9; i++) {
  5358. html += "<th> #" + (i + 1) + " </th>";
  5359. }
  5360. html += "</tr>";
  5361.  
  5362. charNamesList.forEach(function(charName) {
  5363. html += "<tr>";
  5364. html += "<td>" + charName + "</td>";
  5365. for (var i = 0; i < 9; i++) {
  5366. var _slot = charStatisticsList[charName].slotUse[i];
  5367. html += "<td class=' slt_"+ $.trim(_slot).substring(0, 4) + "'>" + $.trim(_slot).substring(0, 4) + " </td>";
  5368. }
  5369. html += "</tr>";
  5370. });
  5371. html += "</table>";
  5372. $('#slot_tracker').html(html);
  5373. // Visit times and SCA tab
  5374. html = '<table>';
  5375. html += "<tr><th>Character Name</th><th>Next Profession</th><th>Last SCA</th><th>Override</th></tr>";
  5376. charNamesList.forEach(function(charName, idx) {
  5377. html += "<tr>";
  5378. html += "<td>" + charName + "</td>";
  5379. if (!chartimers[idx]) html += "<td>No data</td>";
  5380. else html += "<td><button class=' visitReset ' value=" + (idx + 1) + ">reset</button><span data-timer='" + chartimers[idx] + "' data-timer-length='2'></span></td>";
  5381. if (!charStatisticsList[charName].general.lastSCAVisit) html += "<td>No data</td>";
  5382. else html += "<td>" + (new Date(charStatisticsList[charName].general.lastSCAVisit)).toLocaleString() + "</td>";
  5383. if (charSettingsList[charName].general.overrideGlobalSettings) html += "<td><span class='ui-icon ui-icon-check '></span></td>";
  5384. else html += "<td></td>";
  5385. html += "</tr>";
  5386. });
  5387. html += "</table>";
  5388. html += "<div style='margin: 5px 0;'> Last SCA reset (test #1): " + (new Date(accountSettings.generalSettings.SCADailyReset)).toLocaleString() + "</div>";
  5389. html += "<div style='margin: 5px 0;'> Last SCA reset (test #2): " + (new Date(lastDailyResetTime)).toLocaleString() + "</div>";
  5390. $('#sca_v').html(html);
  5391. $('#sca_v').append("<br /><br /><button id='settings_sca'>Cycle SCA</button>");
  5392. $('#sca_v').append("&nbsp;&nbsp;<button id='reset_all_char_times_btn'>Reset All Visit Times</button>");
  5393. $('#settings_sca').button();
  5394. $("#settings_sca").click(function() {
  5395. $("#settings_close").trigger("click");
  5396. unsafeWindow.location.hash = unsafeWindow.location.hash.replace(/\)\/.+/, ')' + "/adventures");
  5397. processSwordCoastDailies();
  5398. });
  5399.  
  5400. $('#reset_all_char_times_btn').button();
  5401. $("#reset_all_char_times_btn").click(function() {
  5402. charNamesList.forEach(function (charName, idx) {
  5403. chartimers[idx] = null;
  5404. charStatisticsList[charName].general.nextTask = null;
  5405. GM_setValue("statistics__char__" + charName + "@" + loggedAccount , JSON.stringify(charStatisticsList[charName]));
  5406. });
  5407. window.setTimeout(function() {
  5408. unsafeWindow.location.href = current_Gateway;
  5409. }, 0);
  5410. });
  5411.  
  5412.  
  5413. $('.visitReset').button();
  5414. $(".visitReset").click(function() {
  5415. var value = $(this).val();
  5416. if (value) {
  5417. console.log("Reseting for " + charNamesList[value-1]);
  5418. chartimers[parseInt(value)-1] = null;
  5419. updateCounters();
  5420. if (waitingNextChar) {
  5421. clearTimeout(timerHandle);
  5422. curCharNum = GM_setValue("curCharNum_" + loggedAccount, parseInt(value)-1);
  5423. timerHandle = window.setTimeout(function() {
  5424. process();
  5425. }, delay.SHORT);
  5426. }
  5427. }
  5428. });
  5429. }
  5430.  
  5431.  
  5432.  
  5433. function vendorJunk(evnt) {
  5434. var _vendorItems = [];
  5435. var _sellCount = 0;
  5436. if (getSetting('vendorSettings', 'vendorInvocationBlessingsAll')) {
  5437. _vendorItems[_vendorItems.length] = {
  5438. pattern: /^Invocation_Random_Buff$/,
  5439. limit: 0
  5440. };
  5441. }
  5442. if (getSetting('vendorSettings', 'vendorKitsLimit')) {
  5443. _vendorItems[_vendorItems.length] = {
  5444. pattern: /^Item_Consumable_Skill/,
  5445. limit: 50
  5446. };
  5447. }
  5448. if (getSetting('vendorSettings', 'vendorAltarsLimit')) {
  5449. _vendorItems[_vendorItems.length] = {
  5450. pattern: /^Item_Portable_Altar$/,
  5451. limit: 80
  5452. };
  5453. }
  5454. if (getSetting('vendorSettings', 'vendorKitsAll')) {
  5455. _vendorItems[_vendorItems.length] = {
  5456. pattern: /^Item_Consumable_Skill/,
  5457. limit: 0
  5458. };
  5459. }
  5460. if (getSetting('vendorSettings', 'vendorAltarsAll')) {
  5461. _vendorItems[_vendorItems.length] = {
  5462. pattern: /^Item_Portable_Altar(_Bound)?$/,
  5463. limit: 0
  5464. };
  5465. }
  5466. if (getSetting('vendorSettings', 'vendorEnchR1')) {
  5467. _vendorItems[_vendorItems.length] = {
  5468. pattern: /^T1_Enchantment/,
  5469. limit: 0
  5470. };
  5471. _vendorItems[_vendorItems.length] = {
  5472. pattern: /^T1_Runestone/,
  5473. limit: 0
  5474. };
  5475. }
  5476. if (getSetting('vendorSettings', 'vendorEnchR2')) {
  5477. _vendorItems[_vendorItems.length] = {
  5478. pattern: /^T2_Enchantment/,
  5479. limit: 0
  5480. };
  5481. _vendorItems[_vendorItems.length] = {
  5482. pattern: /^T2_Runestone/,
  5483. limit: 0
  5484. };
  5485. }
  5486. if (getSetting('vendorSettings', 'vendorEnchR3')) {
  5487. _vendorItems[_vendorItems.length] = {
  5488. pattern: /^T3_Enchantment/,
  5489. limit: 0
  5490. };
  5491. _vendorItems[_vendorItems.length] = {
  5492. pattern: /^T3_Runestone/,
  5493. limit: 0
  5494. };
  5495. }
  5496. if (getSetting('vendorSettings', 'vendorEnchR4')) {
  5497. _vendorItems[_vendorItems.length] = {
  5498. pattern: /^T4_Enchantment/,
  5499. limit: 0
  5500. };
  5501. _vendorItems[_vendorItems.length] = {
  5502. pattern: /^T4_Runestone/,
  5503. limit: 0
  5504. };
  5505. }
  5506. if (getSetting('vendorSettings', 'vendorLesserMarks')) {
  5507. _vendorItems[_vendorItems.length] = {
  5508. pattern: /^(Gem_Upgrade_Resource_R[1-2]|Artifact_Upgrade_Resource_R1_[A-Z])$/,
  5509. limit: 0
  5510. };
  5511. }
  5512. if (getSetting('vendorSettings', 'vendorPots1')) {
  5513. _vendorItems[_vendorItems.length] = {
  5514. pattern: /^Potion_(Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)(_Bound)?$/,
  5515. limit: 0
  5516. };
  5517. }
  5518. if (getSetting('vendorSettings', 'vendorPots2')) {
  5519. _vendorItems[_vendorItems.length] = {
  5520. pattern: /^Potion_(Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_2(_Bound)?$/,
  5521. limit: 0
  5522. };
  5523. }
  5524. if (getSetting('vendorSettings', 'vendorPots3')) {
  5525. _vendorItems[_vendorItems.length] = {
  5526. pattern: /^Potion_(Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_3(_Bound)?$/,
  5527. limit: 0
  5528. };
  5529. }
  5530. if (getSetting('vendorSettings', 'vendorPots4')) {
  5531. _vendorItems[_vendorItems.length] = {
  5532. pattern: /^Potion_(Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_4(_Bound)?$/,
  5533. limit: 0
  5534. };
  5535. }
  5536. if(getSetting('vendorSettings', 'vendorPots5')) {
  5537. _vendorItems[_vendorItems.length] = {
  5538. pattern: /^Potion_(Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_5(_Bound)?$/,
  5539. limit: 0
  5540. };
  5541. }
  5542. if(getSetting('vendorSettings', 'vendorPots6')) {
  5543. _vendorItems[_vendorItems.length] = {
  5544. pattern: /^Potion_(Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_6(_Bound)?$/,
  5545. limit: 0
  5546. };
  5547. }
  5548. if (getSetting('vendorSettings', 'vendorHealingPots')) {
  5549. _vendorItems[_vendorItems.length] = {
  5550. pattern: /^Potion_Healing(_[1-5])?(_Bound)?$/,
  5551. limit: 0
  5552. };
  5553. }
  5554. if (getSetting('vendorSettings', 'vendorHealingPotsAll')) {
  5555. _vendorItems[_vendorItems.length] = {
  5556. pattern: /^Potion_Healing(_[1-9])?(_Bound)?$/,
  5557. limit: 0
  5558. };
  5559. }
  5560.  
  5561. if (getSetting('vendorSettings', 'vendorJunk')) {
  5562. _vendorItems[_vendorItems.length] = {
  5563. pattern: /^Item_Snowworks_/,
  5564. limit: 0
  5565. }; // Winter Festival fireworks small & large
  5566. _vendorItems[_vendorItems.length] = {
  5567. pattern: /^Item_Skylantern/,
  5568. limit: 0
  5569. }; // Winter Festival skylantern
  5570. _vendorItems[_vendorItems.length] = {
  5571. pattern: /^Item_Partypopper/,
  5572. limit: 0
  5573. }; // Party Poppers
  5574. _vendorItems[_vendorItems.length] = {
  5575. pattern: /^Item_Fireworks/,
  5576. limit: 0
  5577. }; // Fireworks
  5578. _vendorItems[_vendorItems.length] = {
  5579. pattern: /^Object_Plate_/,
  5580. limit: 0
  5581. };
  5582. _vendorItems[_vendorItems.length] = {
  5583. pattern: /^Object_Decoration_/,
  5584. limit: 0
  5585. };
  5586. _vendorItems[_vendorItems.length] = {
  5587. pattern: /^Object_Gem_/,
  5588. limit: 0
  5589. };
  5590. _vendorItems[_vendorItems.length] = {
  5591. pattern: /^Object_Jewelry_/,
  5592. limit: 0
  5593. };
  5594. _vendorItems[_vendorItems.length] = {
  5595. pattern: /^Object_Mug_/,
  5596. limit: 0
  5597. };
  5598. _vendorItems[_vendorItems.length] = {
  5599. pattern: /^Object_Trinket_/,
  5600. limit: 0
  5601. };
  5602. _vendorItems[_vendorItems.length] = {
  5603. pattern: /^Object_Skill_/,
  5604. limit: 0
  5605. };
  5606. }
  5607.  
  5608. if (getSetting('vendorSettings', 'vendorGreenUnidAll')) {
  5609. _vendorItems[_vendorItems.length] = {
  5610. pattern: /_Green_T[1-9]_Unid$/,
  5611. limit: 0
  5612. };
  5613. }
  5614. if (getSetting('vendorSettings', 'vendorBlueUnidAll')) {
  5615. _vendorItems[_vendorItems.length] = {
  5616. pattern: /_Blue_T[1-9]_Unid$/,
  5617. limit: 0
  5618. };
  5619. }
  5620.  
  5621. if (getSetting('vendorSettings', 'vendorProfResults')) {
  5622. _vendorItems[_vendorItems.length] = {
  5623. 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])*$/,
  5624. limit: 0
  5625. };
  5626. }
  5627.  
  5628. if (_vendorItems.length > 0) {
  5629. console.log("Attempting to vendor selected items...");
  5630. _sellCount = vendorItemsLimited(_vendorItems);
  5631. if (_sellCount > 0 && !evnt) {
  5632. var _sellWait = _sellCount * 1000;
  5633. PauseSettings("pause");
  5634. window.setTimeout(function() {
  5635. PauseSettings("unpause");
  5636. }, _sellWait);
  5637. }
  5638. }
  5639. }
  5640.  
  5641. function addTranslation() {
  5642. var lang = GM_getValue('language', 'en');
  5643. translation = {
  5644. 'currLang': lang,
  5645. 'en': {
  5646. 'translation.needed': 'translation needed',
  5647. 'tab.scriptSettings': 'Script settings',
  5648. 'tab.advanced': 'Advanced',
  5649. 'tab.customProfiles': 'Custom profiles',
  5650. 'tab.trackedResources': 'Tracked resources',
  5651. 'tab.general': 'General settings',
  5652. 'tab.manualSettings': 'Manual Leadership Mode',
  5653. 'tab.professions': 'Professions',
  5654. 'tab.vendor': 'Vendor options',
  5655. 'tab.consolidation': 'AD Consolidation',
  5656. 'tab.copySettings': 'Settings Copy',
  5657. 'tab.other': 'Other',
  5658. 'tab.counters': 'Refine Counters',
  5659. 'tab.refine_hist': 'Refine-7',
  5660. 'tab.visits': 'SCA & Visits',
  5661. 'tab.workers': 'Workers',
  5662. 'tab.tools': 'Tools',
  5663. 'tab.resources': 'Resource Tracker',
  5664. 'tab.levels': 'Prof levels',
  5665. 'tab.slots': 'Slots',
  5666. 'static.settings': 'Settings',
  5667. 'button.save&apply': 'Save and Apply',
  5668. 'button.close': 'Close',
  5669. 'button.cycle': 'Cycle SCA',
  5670. //'settings.main.paused': 'Pause Script',
  5671. //'settings.main.paused.tooltip': 'Disable All Automation',
  5672. 'settings.main.debug': 'Enable Debug',
  5673. 'settings.main.debug.tooltip': 'Enable all debug output to console',
  5674. 'settings.main.autoreload': 'Auto Reload',
  5675. 'settings.main.autoreload.tooltip': 'Enabling this will reload the gateway periodically. (Ensure Auto Login is enabled)',
  5676. 'settings.main.incdelay': 'Increase script delays by',
  5677. 'settings.main.incdelay.tooltip': 'Increase the delays the script waits before attempting the actions.',
  5678. 'settings.main.language': 'Script language',
  5679. 'settings.main.language.tooltip': 'Set GUI language of this script (change requires reloading the page)',
  5680. 'settings.main.autologin': 'Attempt to login automatically',
  5681. 'settings.main.autologin.tooltip': 'Automatically attempt to login to the neverwinter gateway site',
  5682. 'settings.main.nw_username': 'Neverwinter Username',
  5683. 'settings.main.nw_username.tooltip': '',
  5684. 'settings.main.nw_password': 'Neverwinter Password',
  5685. 'settings.main.nw_password.tooltip': '',
  5686. 'settings.main.savenexttime': 'Save next process times',
  5687. 'settings.main.savenexttime.tooltip': 'Save the next proffesion times persistently',
  5688. 'settings.general.openrewards': 'Open Reward Chests',
  5689. 'settings.general.openrewards.tooltip': 'Enable opening of leadership chests on character switch',
  5690. 'settings.general.opencelestial': 'Open Celestial Chests',
  5691. 'settings.general.opencelestial.tooltip': 'Open Chests bought with Celestial Coins',
  5692. 'settings.general.openInvocation': 'Open Invocation Rewards',
  5693. 'settings.general.openInvocation.tooltip': 'Enable opening rewards from invocation',
  5694. 'settings.general.keepOneUnopened': 'Keep one reward box unopened',
  5695. 'settings.general.keepOneUnopened.tooltip': 'Used to reserve the slots for the reward boxes',
  5696. 'settings.general.refinead': 'Refine AD',
  5697. 'settings.general.refinead.tooltip': 'Enable refining of AD on character switch',
  5698. 'settings.general.runSCA': 'Run SCA',
  5699. 'settings.general.runSCA.tooltip': 'Running SCA adventures reward after professions',
  5700. 'settings.profession.fillOptionals': 'Fill Optional Assets',
  5701. 'settings.profession.fillOptionals.tooltip': 'Enable to include selecting the optional assets of tasks',
  5702. 'settings.profession.autoPurchase': 'Auto Purchase Resources',
  5703. 'settings.profession.autoPurchase.tooltip': 'Automatically purchase required resources from gateway shop (100 at a time)',
  5704. 'settings.profession.trainAssets': 'Train Assets',
  5705. 'settings.profession.trainAssets.tooltip': 'Enable training/upgrading of asset worker resources',
  5706. 'settings.profession.spreadLeadership': 'Spread Asset allocation for leadership',
  5707. 'settings.profession.spreadLeadership.tooltip': 'Try to spread and fill non-common assets and supplement with common if needed',
  5708. 'settings.profession.stopNotLeadership': 'Stop NON-Leadership task at level: ',
  5709. 'settings.profession.stopNotLeadership.tooltip': 'Block All professions except Leadership at level 20 or 25 and above. Make sure you have Leadership set.',
  5710. 'settings.profession.stopAlchemyAt3': 'Stop Alchemy leveling at level 3',
  5711. 'settings.profession.stopAlchemyAt3.tooltip': 'Block Alchemy tasks at level 3 and above. Make sure you have other tasks set.',
  5712. 'settings.consolid.consolidate': 'Consolidate AD via ZAX',
  5713. 'settings.consolid.consolidate.tooltip': 'Automatically attempt to post, cancel and withdraw AD via ZAX and consolidate to designated character',
  5714. 'settings.consolid.bankerName': 'Character Name of Banker',
  5715. 'settings.consolid.bankerName.tooltip': 'Enter name of the character to hold account AD',
  5716. 'settings.consolid.minToTransfer': 'Min AD for Transfer',
  5717. 'settings.consolid.minToTransfer.tooltip': 'Enter minimum AD limit for it to be considered for transfer off a character',
  5718. 'settings.consolid.minCharBalance': 'Min Character balance',
  5719. 'settings.consolid.minCharBalance.tooltip': 'Enter the amount of AD to always keep available on characters',
  5720. 'settings.consolid.transferRate': 'AD per Zen Rate (in zen)',
  5721. 'settings.consolid.transferRate.tooltip': 'Enter default rate to use for transferring through ZAX',
  5722.  
  5723. },
  5724. 'pl': {
  5725. 'translation.needed': 'wymagane tłumaczenie',
  5726. 'tab.scriptSettings': 'Ustawienia skryptu',
  5727. 'tab.advanced': 'Zaawansowane',
  5728. 'tab.customProfiles': 'Własne profile',
  5729. 'tab.trackedResources': 'Śledzone surowce',
  5730. 'tab.general': 'Ogólne',
  5731. 'tab.professions': 'Profesje',
  5732. 'tab.vendor': 'Kupiec',
  5733. 'tab.consolidation': 'Konsolidacja AD',
  5734. 'tab.copySettings': 'Kopiuj ustawienia',
  5735. 'tab.other': 'Pozostałe',
  5736. 'tab.counters': 'Liczniki szlifowania',
  5737. 'tab.visits': 'Nast.zadanie i SCA',
  5738. 'tab.workers': 'Pracownicy',
  5739. 'tab.tools': 'Narzędzia',
  5740. 'tab.resources': 'Surowce',
  5741. 'tab.levels': 'Poziomy prof.',
  5742. 'tab.slots': 'Sloty',
  5743. 'static.settings': 'Ustawienia',
  5744. 'button.save&apply': 'Zapisz i zastosuj',
  5745. 'button.close': 'Zamknij',
  5746. 'button.cycle': 'Runda SCA',
  5747. //'settings.main.paused': 'Zatrzymaj skrypt',
  5748. //'settings.main.paused.tooltip': 'Wyłącz wszelką automatyzację',
  5749. 'settings.main.debug': 'Włącz debugowanie',
  5750. 'settings.main.debug.tooltip': 'Wyświetl wszystkie komunikaty na konsoli (Ctrl+Shift+i w Chrome/Chromium)',
  5751. 'settings.main.autoreload': 'Automatyczne przeładowanie',
  5752. 'settings.main.autoreload.tooltip': 'Włączenie tej opcji powoduje okresowe przeładowanie strony (Upewnij się, że Automatyczne logowanie jest włączone)',
  5753. 'settings.main.incdelay': 'Zwiększ opóżnienia skryptu o...',
  5754. 'settings.main.incdelay.tooltip': 'Zwiększenie opóźnień, gdy skrypt czeka przed próbą działania (pomocne przy wolnych połączeniach).',
  5755. 'settings.main.language': 'Język skryptu',
  5756. 'settings.main.language.tooltip': 'Język interfejsu tego skryptu (zmiana wymaga przeładowania strony)',
  5757. 'settings.main.autologin': 'Próbuj logować automatycznie',
  5758. 'settings.main.autologin.tooltip': 'Próbuj logować automatycznie do strony gateway',
  5759. 'settings.main.nw_username': 'Nazwa użytkownika Neverwinter',
  5760. 'settings.main.nw_username.tooltip': '',
  5761. 'settings.main.nw_password': 'Hasło do Neverwinter',
  5762. 'settings.main.nw_password.tooltip': '',
  5763. 'settings.main.savenexttime': 'Zapisuj czas następnego zadania',
  5764. 'settings.main.savenexttime.tooltip': 'Zapisuj czas następnego zadania w danych międzysesyjnych',
  5765. 'settings.general.openrewards': 'Otwieraj skrzynki',
  5766. 'settings.general.openrewards.tooltip': 'Otwieraj skrzynki z zadań Przywództwa przy zmianie postaci',
  5767. 'settings.general.openInvocation': 'Otwieraj nagrody z inwokacji',
  5768. 'settings.general.openInvocation.tooltip': 'Otwieraj nagrody z inwokacji - zajmują masę miejsca, bo się nie łączą w stosy',
  5769. 'settings.general.opencelestial': 'Otwieraj skrzynki za monety',
  5770. 'settings.general.opencelestial.tooltip': 'Otwieraj skrzynki kupione za 13 monet z inwokacji',
  5771. 'settings.general.keepOneUnopened': 'Pozostaw jedną skrzynkę nieotwartą',
  5772. 'settings.general.keepOneUnopened.tooltip': 'Potrzebne do zarezerwowania miejsca na nagrody',
  5773. 'settings.general.refinead': 'Szlifuj diamenty',
  5774. 'settings.general.refinead.tooltip': 'Przy zmianie postaci szlifuj diamenty astralne jeśli to możliwe',
  5775. 'settings.general.runSCA': 'Uruchom Wybrzeże Mieczy',
  5776. 'settings.general.runSCA.tooltip': 'Uruchom Wybrzeże Mieczy po wybraniu zadań profesji',
  5777. 'settings.profession.fillOptionals': 'Wypełniaj opcjonalnych pracowników',
  5778. 'settings.profession.fillOptionals.tooltip': 'Pozwól na używanie większej ilości pracowników dla zadań, które na to pozwalają',
  5779. 'settings.profession.autoPurchase': 'Autozakup surowców',
  5780. 'settings.profession.autoPurchase.tooltip': 'Automatycznie kupuj wynagane surowce profesji ze sklepu (po 100 sztuk równocześnie)',
  5781. 'settings.profession.trainAssets': 'Trenuj pracowników',
  5782. 'settings.profession.trainAssets.tooltip': 'Pozwól na trenowanie/ulepszanie zwykłych pracowników',
  5783. 'settings.profession.spreadLeadership': 'Inteligentny przydział pracowników do Przywództwa',
  5784. 'settings.profession.spreadLeadership.tooltip': 'Próbuje przydzielić jak najmniej zwykłych pracowników do zadań przywództwa',
  5785. 'settings.profession.stopNotLeadership': 'Wstrzymaj profesje inne od Przywództwa na poziomie',
  5786. 'settings.profession.stopNotLeadership.tooltip': 'Nie uruchamiaj zadań profesji innej od Przywództwa po osiągnięciu poziomu. Upewnij się, ze masz ustawione Przywództwo.',
  5787. 'settings.profession.stopAlchemyAt3': 'Wstrzymaj naukę Alchemii na poziomie 3',
  5788. 'settings.profession.stopAlchemyAt3.tooltip': 'Wstrzymaj naukę Alchemii na poziomie 3 lub wyższym. Upewnij się, że masz ustawione inne profesje.',
  5789. 'settings.consolid.consolidate': 'Konsoliduj AD przez ZAX',
  5790. 'settings.consolid.consolidate.tooltip': 'Automatycznie próbuj wysyłać Diamenty Astralne przez wymianę ZEN i wypłacać na jednej postaci',
  5791. 'settings.consolid.bankerName': 'Nazwa Bankiera',
  5792. 'settings.consolid.bankerName.tooltip': 'Wprowadź nazwę postaci, która ma zbierać wszystkie Diamenty Astralne konta',
  5793. 'settings.consolid.minToTransfer': 'Min AD do transferowania',
  5794. 'settings.consolid.minToTransfer.tooltip': 'Minimalna ilość Diamentów Astralnych, przy której nastąpi próba przeniesienia do bankiera',
  5795. 'settings.consolid.minCharBalance': 'Min AD do pozostawienia',
  5796. 'settings.consolid.minCharBalance.tooltip': 'Minimalna ilość Diamentów Astralnych, które powinny pozostać na koncie postaci',
  5797. 'settings.consolid.transferRate': 'Stawka AD za Zen',
  5798. 'settings.consolid.transferRate.tooltip': 'Domyślna stawka Diamentów Astralnych za ZEN użyta do transferowania',
  5799. },
  5800. 'fr': {
  5801. 'translation.needed': 'traduction nécessaire',
  5802. }
  5803. };
  5804. }
  5805.  
  5806. function tr(key) {
  5807. var lang = translation['currLang'];
  5808. if (translation['en'][key] === undefined) {
  5809. console.log("translation: unknown key " + key);
  5810. return "unknown key: " + key;
  5811. }
  5812. if (translation[lang][key] === undefined) {
  5813. console.log('translation needed: lang: ' + lang + ", key: " + key);
  5814. return '/-/ ' + translation['en'][key] + ' /-/';
  5815. }
  5816. return translation[lang][key];
  5817. }
  5818.  
  5819. /** Start, Helpers added by users.
  5820. * Adds fetures, options to base script and can be easily removed if needed
  5821. * Add description so anyone can see if they can use Function somewhere
  5822. * Use "brackets" around function start and end //yourname
  5823. */
  5824. //RottenMind, returns inventory space, use Inventory_bagspace(); gives current free bags slots, from MAC-NW function
  5825.  
  5826. function Inventory_bagspace() {
  5827. var _pbags = client.dataModel.model.ent.main.inventory.playerbags;
  5828. var _bagUnused = 0;
  5829. $.each(_pbags, function(bi, bag) {
  5830. bag.slots.forEach(function(slot) {
  5831. if (slot === null || !slot || slot === undefined) {
  5832. _bagUnused++;
  5833. }
  5834. });
  5835. });
  5836. return _bagUnused;
  5837. }
  5838. //RottenMind
  5839. /** End, Helpers added by users.*/
  5840.  
  5841. // Add the settings button and start a process timer
  5842. addSettings();
  5843. timerHandle = window.setTimeout(function() {
  5844. process();
  5845. }, delay.SHORT);
  5846. })();
  5847.  
  5848.  
  5849.  
  5850.  
  5851. function workerDefinition() {
  5852. return {
  5853. // purple, blue, green, t3, t2, t1
  5854. "Leadership": ["Crafting_Asset_Craftsman_Leadership_T3_Epic", "Crafting_Asset_Craftsman_Leadership_T3_Rare", "Crafting_Asset_Craftsman_Leadership_T3_Uncommon",
  5855. "Crafting_Asset_Craftsman_Leadership_T3_Common", "Crafting_Asset_Craftsman_Leadership_T2_Common", "Crafting_Asset_Craftsman_Leadership_T1_Common_1"
  5856. ],
  5857. "Alchemy": ["Asset_Craftsman_Alchemy_T3_Epic", "Asset_Craftsman_Alchemy_T3_Rare", "Asset_Craftsman_Alchemy_T3_Uncommon",
  5858. "Asset_Craftsman_Alchemy_T3_Common", "Asset_Craftsman_Alchemy_T2_Common", "Asset_Craftsman_Alchemy_T1_Common"
  5859. ],
  5860. "Jewelcrafting": ["Crafting_Asset_Craftsman_Jewelcrafter_T3_Epic", "Crafting_Asset_Craftsman_Jewelcrafter_T3_Rare", "Crafting_Asset_Craftsman_Jewelcrafter_T3_Uncommon",
  5861. "Crafting_Asset_Craftsman_Jewelcrafter_T3_Common", "Crafting_Asset_Craftsman_Jewelcrafter_T2_Common", "Crafting_Asset_Craftsman_Jewelcrafter_T1_Common"
  5862. ],
  5863. "Weaponsmithing": ["Crafting_Asset_Craftsman_Weaponsmith_T3_Epic", "Crafting_Asset_Craftsman_Weaponsmith_T3_Rare", "Crafting_Asset_Craftsman_Weaponsmith_T3_Uncommon",
  5864. "Crafting_Asset_Craftsman_Weaponsmith_T3_Common", "Crafting_Asset_Craftsman_Weaponsmith_T2_Common", "Crafting_Asset_Craftsman_Weaponsmith_T1_Common"
  5865. ],
  5866. "Artificing": ["Crafting_Asset_Craftsman_Artificing_T3_Epic", "Crafting_Asset_Craftsman_Artificing_T3_Rare", "Crafting_Asset_Craftsman_Artificing_T3_Uncommon",
  5867. "Crafting_Asset_Craftsman_Artificing_T3_Common", "Crafting_Asset_Craftsman_Artificing_T2_Common", "Crafting_Asset_Craftsman_Artificing_T1_Common"
  5868. ],
  5869. "Mailsmithing": ["Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Epic", "Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Rare", "Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Uncommon",
  5870. "Crafting_Asset_Craftsman_Armorsmithing_Med_T3_Common", "Crafting_Asset_Craftsman_Armorsmithing_Med_T2_Common", "Crafting_Asset_Craftsman_Armorsmithing_Med_T1_Common"
  5871. ],
  5872. "Platesmithing": ["Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Epic", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Rare", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Uncommon",
  5873. "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T3_Common", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T2_Common", "Crafting_Asset_Craftsman_Armorsmithing_Hvy_T1_Common"
  5874. ],
  5875. "Leatherworking": ["Crafting_Asset_Craftsman_Leatherworking_T3_Epic", "Crafting_Asset_Craftsman_Leatherworking_T3_Rare", "Crafting_Asset_Craftsman_Leatherworking_T3_Uncommon",
  5876. "Crafting_Asset_Craftsman_Leatherworking_T3_Common", "Crafting_Asset_Craftsman_Leatherworking_T2_Common", "Crafting_Asset_Craftsman_Leatherworking_T1_Common"
  5877. ],
  5878. "Tailoring": ["Crafting_Asset_Craftsman_Tailoring_T3_Epic", "Crafting_Asset_Craftsman_Tailoring_T3_Rare", "Crafting_Asset_Craftsman_Tailoring_T3_Uncommon",
  5879. "Crafting_Asset_Craftsman_Tailoring_T3_Common", "Crafting_Asset_Craftsman_Tailoring_T2_Common", "Crafting_Asset_Craftsman_Tailoring_T1_Common"
  5880. ],
  5881. "Black Ice Shaping": ["Crafting_Asset_Craftsman_Blackice_T3_Epic", "Crafting_Asset_Craftsman_Blackice_T3_Rare", "Crafting_Asset_Craftsman_Blackice_T3_Uncommon",
  5882. "Crafting_Asset_Craftsman_Blackice_T3_Common"
  5883. ],
  5884. /*
  5885. "Winter Event": ["Crafting_Asset_Craftsman_Winter_Event_T1_Common"],
  5886. "Siege Event": [],
  5887. */
  5888. }
  5889. }
  5890.  
  5891. function toolListDefinition() {
  5892. return {
  5893. "Awl": ["Crafting_Asset_Tool_Awl_Epic", "Crafting_Asset_Tool_Awl_Rare", "Crafting_Asset_Tool_Awl_Uncommon", "Crafting_Asset_Tool_Awl_Common"],
  5894. "Shears": ["Crafting_Asset_Tool_Shears_Epic", "Crafting_Asset_Tool_Shears_Rare", "Crafting_Asset_Tool_Shears_Uncommon", "Crafting_Asset_Tool_Shears_Common"],
  5895. "Hammer": ["Crafting_Asset_Tool_Hammer_Epic", "Crafting_Asset_Tool_Hammer_Rare", "Crafting_Asset_Tool_Shears_Uncommon", "Crafting_Asset_Tool_Hammer_Common", ],
  5896. "Needle": ["Crafting_Asset_Tool_Needle_Epic", "Crafting_Asset_Tool_Needle_Rare", "Crafting_Asset_Tool_Needle_Uncommon", "Crafting_Asset_Tool_Needle_Common", ],
  5897. "Bellows": ["Crafting_Asset_Tool_Bellows_Epic", "Crafting_Asset_Tool_Bellows_Rare", "Crafting_Asset_Tool_Bellows_Uncommon", "Crafting_Asset_Tool_Bellows_Common"],
  5898. "Bezelpusher": ["Crafting_Asset_Tool_Bezelpusher_Epic", "Crafting_Asset_Tool_Bezelpusher_Rare", "Crafting_Asset_Tool_Bezelpusher_Uncommon", "Crafting_Asset_Tool_Bezelpusher_Common"],
  5899. "Mortar": ["Asset_Tool_Mortar_Epic", "Asset_Tool_Mortar_Rare", "Asset_Tool_Mortar_Uncommon", "Asset_Tool_Mortar_Common"],
  5900. "Anvil": ["Crafting_Asset_Tool_Anvil_Epic", "Crafting_Asset_Tool_Anvil_Rare", "Crafting_Asset_Tool_Anvil_Uncommon", "Crafting_Asset_Tool_Anvil_Common", ],
  5901. "Grindstone": ["Crafting_Asset_Tool_Grindstone_Epic", "Crafting_Asset_Tool_Grindstone_Rare", "Crafting_Asset_Tool_Grindstone_Uncommon", "Crafting_Asset_Tool_Grindstone_Common", ],
  5902. "Philosophersstone": ["Asset_Tool_Philosophersstone_Epic", "Asset_Tool_Philosophersstone_Rare", "Asset_Tool_Philosophersstone_Uncommon", "Asset_Tool_Philosophersstone_Common"],
  5903. "Loupe": ["Crafting_Asset_Tool_Loupe_Epic", "Crafting_Asset_Tool_Loupe_Rare", "Crafting_Asset_Tool_Loupe_Uncommon", "Crafting_Asset_Tool_Loupe_Common", ],
  5904. "Graver": ["Crafting_Asset_Tool_Graver_Epic", "Crafting_Asset_Tool_Graver_Rare", "Crafting_Asset_Tool_Graver_Uncommon", "Crafting_Asset_Tool_Graver_Common", ],
  5905. "Crucible": ["Asset_Tool_Crucible_Epic", "Asset_Tool_Crucible_Rare", "Asset_Tool_Crucible_Uncommon", "Asset_Tool_Crucible_Common", ],
  5906. "Tongs": ["Crafting_Asset_Tool_Tongs_Epic", "Crafting_Asset_Tool_Tongs_Rare", "Crafting_Asset_Tool_Tongs_Uncommon", "Crafting_Asset_Tool_Tongs_Common", ],
  5907. /*
  5908. "Crafting_Asset_Tool_Leatherworking_T1_Epic",
  5909. "Crafting_Asset_Tool_Gauntlets_Common"
  5910. "Crafting_Asset_Tool_Leadership_T3_Common","Crafting_Asset_Tool_Leadership_T2_Common"
  5911. */
  5912. }
  5913. }
  5914.  
  5915. function audioFile() {
  5916. return "<audio id='soundFX'><source src='"+
  5917. "data:audio/mpeg;base64,//uQZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAABTAAB6WQAABQwUGhogJSkuMjI2OTw/QkJGSUxRVFRXWl1gY2Nnamxvc3N2eXx/goKFiIqPkZGUl"+
  5918. "pqcnJ+ipairq6+ztbi7u77Bw8fLy83Q09XY2Nrd3+Hk5Obo6uzt7fDx8/X29vj6//8AAAA8TEFNRTMuOThyBK8AAAAAAAAAADQgJAbpTQABzAAAelnrZF3hAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+
  5919. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+
  5920. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQZAAAAAAAf4UAAAgAAA/woAABAAAB/hgAAAAAAD/DAAAAA6V7R6Bsdsd4+"+
  5921. "/9wFKqAA//3mFhPqS9nhxHIoc6l650ckH6sYAA+MbX9b3dlvL34bPex4PXdEha177vhdx9sG0ZrnGr/+6BkIgAEbk7QfmXkgEdpuY3DqAAaaTlJ+awSAfUnJ38w0AD9f/flQ9VqpSKV+rFA4Wm9PdwU6j9KVc627"+
  5922. "x5EjHIqI0S9/imuhzhA3/PNujyL8x0Lh1s803s+/e/7yDehuawyU/U51raF36geaAgGAwAAAAEwF6FgtAA+nqCzyz/////+2pAPx43//05hceEnckQlklAaCxBy/yEiIBgP/AYHHISbr1Pc9+WPiuXQLzwpMX0LQ"+
  5923. "+xFvPJTRUs9f8qgAAAAASwZATU2Crphjxi9ZlxAW0mvCjCsChgEKRyV4sKGSVlV31XYz5/KKibu2eMrufyIQXOUzkwS7sdiUgoGwtEbrG3OujBFRzscupJIXpzzFV1FwvvjcoJDPx21yad998rU3Wfl9Z6M5PAmo"+
  5924. "XiB00MeT7/D13gTscnvbr+SticTWCdiw/jqRJsAEQCkCQ5120hYef5xX5HDy7HCfzm5593dEmmpAtJSKfcfdudkH/EC4izwacvVHUmkqorj6a6OcnkEtiC8JYDOszDwEKEyAB53AAABgAB//rOC5t91hUtjedcM/"+
  5925. "9r6O9ppl9++///jePfQJUpZECKC/+hu5dObHzhnWgRhzhdS61Qdx1JwgbTo3mJWOETg9QzMYcc4WItECzKx6DBC0Ls1yaeJw9gLwooySMAugyE4X4bG6Q68uE1swDnDaru6ZU3/+9BkAgAGhk7T/msEAJfJ2m/Mv"+
  5926. "IIdBT1P+awQQxWnaH81kgCgxixjSfoEQAAAAADLxwzGJSTDFwcIGE5sBQNjjDsSRIJRakFQoQLFrZEWMUPC4aWu2BjnN0NNPb+WRsoNKyET2Vb8ooYbjeTs1LDLVlNSaUnQ4TclZn7oI40keBXx902g6v3ow/kei"+
  5927. "X2oeh+gy1ViEszgmWbjqHdSlirT7F+7DTM2XtPv3qRCRfWxFmSSaOM7e6MNk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WAgF3yhHgC3jG5+KTbLLqPgALA"+
  5934. "CWiTiQBCcRj4KarPmAB5r7llPWJ+BKGNsTUdboCiFbpWOvqnGIh0RkwxWnIApwwUgNuxt/28rXtYSwwkMggCkJIDrfaEjg+yDxpZsHKJoxuZgAmFChMAjSyYIYGJosujFiVv/WafG9f4VARCDgQKDiBWbYGPUH4E"+
  5935. "/wIKEymIxI44dIhQyYpGrwuqVh1Pe////////////kn/JP//kv/9PbsU+dJT16Snu1K92p//nVN1LAEAKQAwCQAAAAAABYTWLBJKAkTKhpKAQpgCRxx8teFLwwcJu6A9sUKVQkiPb5tehgHOQEajLNEf5e+j/wKS"+
  5936. "lmnRqNUEbiuPy5dkMU5EAZoggMoKDFaAR9IsWvhqymZEU0Q4H6i7qlr6AzaE2aGLdZyn4QFx0t+ltDoWkAxsvUIQoqETQBiw2xBA9SlrrPREwhkILoI10L74YpAViBASTnOROOpOAUxdRaujTQQQLnEhYQBKpRTR"+
  5937. "MVKcv/QxswcEu2YEMk1RrRf5FqZFkH++CJ5myIhbkTei/473UrYcwEGDFa//6buURS4gwiERi3//SUl6kpL1/71Pf+npza7VPoO2sur72a3+mYh3BMAAAdDYHrDmB0jkMGSERFrqaL1Z3ynjU/GPhCrXMJnvDw/8"+
  5938. "h2KOsaDau9xcZvrcGdcOWLdtZY4sBFrf//bljH8sZtUg/FG/OlhWA41e8vjWm21ruc42WGLmBLjH2oXaxGrh/Ecr6+NzeTUSP30kBiZXFUs64eRG36gtkf3/hxYbEztz3TM4/+XLirBRpMTOe97z5fWGP/reGiIA"+
  5939. "AAAAYzJORkcjogZmhwiCmFWvjnc60+DohSD1IRFNk0ptpIo//0x+KLedGEKST/+5wvifD1RLBxjGJpL18fS10hzkuF0KJRZIYE1RROBFA5I0E8YBZASHCZf+iPqnvU2r9RfNVvKy+O0lj1Tf//7rdaTOzuxuxugb"+
  5940. "oGZmozMDNRmkdMTIxSRNjE2NTySYgpqKZlxycFxlVVVVVVVVVVVVVVVVVVVVVVV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