Neverwinter gateway - Professions Robot

Automatically selects professions for empty slots

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

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