Neverwinter gateway - Professions Robot

Automatically selects professions for empty slots

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