Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #18 from BigRedBrent/patch-3
Browse files Browse the repository at this point in the history
Profession Priority
  • Loading branch information
mac-nw committed Jan 19, 2015
2 parents 4e2b944 + e35d13c commit 101fc3e
Showing 1 changed file with 62 additions and 38 deletions.
100 changes: 62 additions & 38 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ var fouxConsole = {log: function () {
}};
var console = unsafeWindow.console || fouxConsole;
var chardiamonds = {};
var definedTask = {};
// Page Reloading function
// Every second the page is idle or loading is tracked
var loading_reset = false; // Enables a periodic reload if this is toggled on by the Auto Reload check box on the settings panel
Expand Down Expand Up @@ -595,9 +596,8 @@ function _select_Gateway() { // Check for Gateway used to
* Some names above do not match, use below code to check:
* var tasks = client.dataModel.model.craftinglist['craft_' + profname].entries.filter(function(entry) { return entry.def && entry.def.displayname == taskname; }); tasks[0].def.name;
*/
var tasklist;
var defaultTasklist = [
{

definedTask["Leadership"] = {
// modded to prioritize RAD production, added low level task for speeding up levelling up
taskListName: "Leadership",
taskName: "Leadership",
Expand Down Expand Up @@ -628,8 +628,9 @@ function _select_Gateway() { // Check for Gateway used to
// 20
20: ["Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier3_20_Destroy", "Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier2_12_Taxes", "Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol", "Leadership_Tier2_9_Chart", "Leadership_Tier1_5_Explore"],
},
},
{
};

definedTask["Leadership XP"] = {
taskListName: "Leadership_XP",
taskName: "Leadership",
level: {
Expand All @@ -655,9 +656,9 @@ function _select_Gateway() { // Check for Gateway used to
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"],
20: ["Leadership_Tier3_13r_Protectdiamonds", "Leadership_Tier3_20r_Master2", "Leadership_Tier3_20r_Master1", "Leadership_Tier3_20r_Master3", "Leadership_Tier3_20_Destroy", "Leadership_Tier2_12_Taxes","Leadership_Tier3_16_Fight", "Leadership_Tier2_10_Battle", "Leadership_Tier3_13_Patrol"],
},
},
{
//WinterEvent
};
definedTask["Winter Event"] = {
taskListName: "WinterEvent",
taskName: "WinterEvent",
level: {
Expand All @@ -666,8 +667,9 @@ function _select_Gateway() { // Check for Gateway used to
2: ["Event_Winter_Tier1_Rankup_2", /*"Event_Winter_Tier1_Fishingpole_Blue","Event_Winter_Tier1_Shiny_Lure_Mass",*/"Event_Winter_Tier1_Refine_2", "Event_Winter_Tier1_Gather_2"],
3: [/*"Event_Winter_Tier1_Heros_Feast","Event_Winter_Tier1_Lightwine","Event_Winter_Tier1_Sparkliest_Gem","Event_Winter_Tier1_Mesmerizing_Lure",*/"Event_Winter_Tier1_Gather_3"],
},
},
{
};

definedTask["Siege Event"] = {
taskListName: "Event_Siege",
taskName:"Event_Siege",
level: {
Expand All @@ -681,9 +683,9 @@ function _select_Gateway() { // Check for Gateway used to
//1:["Event_Siege_Tier1_Donate_Resources_T3"], // Create Defense Supplies from Tier 3 crafting resources
1:["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"],
},
},
{
// Black Ice Shaping
};
definedTask["Black Ice Shaping"] = {
taskListName: "BlackIce",
taskName: "BlackIce",
level: {
Expand All @@ -696,9 +698,9 @@ function _select_Gateway() { // Check for Gateway used to
3:["Forge Hammerstone Pick","Gather Raw Black Ice","Truesilver Pick Grip","Process Raw Black Ice","Upgrade Chillwright","Hire an additional Chillwright"],
*/
},
},
{
// Jewelcrafting
};
definedTask["Jewelcrafting"] = {
taskListName: "Jewelcrafting",
taskName: "Jewelcrafting",
level: {
Expand All @@ -724,9 +726,9 @@ function _select_Gateway() { // Check for Gateway used to
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"],
20: ["Jewelcrafting_Tier2_Refine_Basic", "Jewelcrafting_Tier1_Refine_Basic"],
},
},
{
// Mailsmithing
};
definedTask["Mailsmithing"] = {
taskListName: "Mailsmithing",
taskName: "Armorsmithing_Med",
level: {
Expand Down Expand Up @@ -754,9 +756,9 @@ function _select_Gateway() { // Check for Gateway used to
//19:["Chain Armor +4","Fancy Chain Pants","Fancy Chain Shirt","Chain Helm +4","Ornate Chain Pants","Upgrade Blacksmith","Upgrade Prospector","Hire an additional Prospector"],
//20:["Forge Steel Rings and Scales"],
},
},
{
// Platesmithing
};
definedTask["Platesmithing"] = {
taskListName: "Platesmithing",
taskName: "Armorsmithing_Heavy",
level: {
Expand Down Expand Up @@ -784,8 +786,9 @@ function _select_Gateway() { // Check for Gateway used to
//19:["Plate Armor +4","Fancy Plate Pants","Fancy Plate Shirt","Plate Helm +4","Ornate Plate Pants","Upgrade Armorer","Upgrade Miner","Hire an additional Miner"],
//20:["Forge Steel Plates"],
},
},
{
};

definedTask["Leatherworking"] = {
taskListName: "Leatherworking",
taskName: "Leatherworking",
level: {
Expand Down Expand Up @@ -813,8 +816,9 @@ function _select_Gateway() { // Check for Gateway used to
//19:["Leather Armor +4","Fancy Leather Pants","Fancy Leather Shirt","Leather Helm +4","Ornate Leather Pants","Upgrade Tanner","Upgrade Skinner","Hire an additional Skinner"],
//20:["Cure Tough Pelts"],
},
},
{
};

definedTask["Tailoring"] = {
taskListName: "Tailoring",
taskName: "Tailoring",
level: {
Expand Down Expand Up @@ -842,8 +846,9 @@ function _select_Gateway() { // Check for Gateway used to
//19:["Cloth Robes +4","Fancy Cloth Pants","Fancy Cloth Shirt","Cloth Cap +4","Ornate Cloth Pants","Upgrade Outfitter","Upgrade Weaver","Hire an additional Weaver"],
//20:["Weave Cotton Cloth"],
},
},
{
};

definedTask["Artificing"] = {
taskListName: "Artificing",
taskName: "Artificing",
level: {
Expand Down Expand Up @@ -871,8 +876,9 @@ function _select_Gateway() { // Check for Gateway used to
//19:["Virtuous Icon +5","Upgrade Engraver","Upgrade Carver","Hire an additional Carver"],
//20:["7:Craft Ornamental metal and Carved Wood"],
},
},
{
};

definedTask["Weaponsmithing"] = {
taskListName: "Weaponsmithing",
taskName: "Weaponsmithing",
level: {
Expand Down Expand Up @@ -900,8 +906,9 @@ function _select_Gateway() { // Check for Gateway used to
//19:["Dagger+4","Upgrade Grinder","Upgrade Smelter","Hire an additional Smelter"],
//20:["Craft Steel Blades and Barausk Hafts"],
},
},
{
};

definedTask["Alchemy"] = {
taskListName: "Alchemy",
taskName: "Alchemy",
level: {
Expand Down Expand Up @@ -930,8 +937,7 @@ function _select_Gateway() { // Check for Gateway used to
//20:["Alchemy_Tier2_Aquavitae_2"],,"Alchemy_Tier3_Potency_Potion_Major"
20: ["Alchemy_Tier3_Protection_Potion_Major", "Alchemy_Tier2_Aquaregia", "Alchemy_Tier3_Refine_Basic", "Alchemy_Tier3_Gather_Components"],
},
},
];
};

// Load Settings
var settingnames = [
Expand Down Expand Up @@ -989,21 +995,39 @@ function _select_Gateway() { // Check for Gateway used to
settings["charcount"] = 99;
}

var tasklist;
// Profession priority list by order
var defaultTasklist = [
definedTask["Winter Event"],
definedTask["Siege Event"],
definedTask["Black Ice Shaping"],
definedTask["Alchemy"],
definedTask["Weaponsmithing"],
definedTask["Artificing"],
definedTask["Jewelcrafting"],
definedTask["Mailsmithing"],
definedTask["Platesmithing"],
definedTask["Leatherworking"],
definedTask["Tailoring"],
definedTask["Leadership"],
definedTask["Leadership XP"],
];

var charSettings = [];
for (var i = 0; i < settings["charcount"]; i++) {
charSettings.push({name: 'nw_charname' + i, title: 'Character', def: 'Character ' + (i + 1), type: 'text', tooltip: 'Characters Name'});
//charSettings.push({name: 'WinterEvent' + i, title: 'WinterEvent', def: '0', type: 'text', tooltip: 'Number of slots to assign to WinterEvent'});
charSettings.push({name: 'Event_Siege' + i, title: 'Siege Event', def: '0', type: 'text', tooltip: 'Number of slots to assign to Siege Event'});
charSettings.push({name: 'Leadership' + i, title: 'Leadership', def: '9', type: 'text', tooltip: 'Number of slots to assign to Leadership'});
charSettings.push({name: 'BlackIce' + i, title: 'Black Ice Shaping', def: '0', type: 'text', tooltip: 'Number of slots to assign to BIS'});
charSettings.push({name: 'Alchemy' + i, title: 'Alchemy', def: '0', type: 'text', tooltip: 'Number of slots to assign to Alchemy'});
charSettings.push({name: 'Weaponsmithing' + i, title: 'Weaponsmithing', def: '0', type: 'text', tooltip: 'Number of slots to assign to Weaponsmithing'});
charSettings.push({name: 'Artificing' + i, title: 'Artificing', def: '0', type: 'text', tooltip: 'Number of slots to assign to Artificing'});
charSettings.push({name: 'Jewelcrafting' + i, title: 'Jewelcrafting', def: '0', type: 'text', tooltip: 'Number of slots to assign to Jewelcrafting'});
charSettings.push({name: 'Mailsmithing' + i, title: 'Mailsmithing', def: '0', type: 'text', tooltip: 'Number of slots to assign to Mailsmithing'});
charSettings.push({name: 'Platesmithing' + i, title: 'Platesmithing', def: '0', type: 'text', tooltip: 'Number of slots to assign to Platesmithing'});
charSettings.push({name: 'Leatherworking' + i, title: 'Leatherworking', def: '0', type: 'text', tooltip: 'Number of slots to assign to Leatherworking'});
charSettings.push({name: 'Tailoring' + i, title: 'Tailoring', def: '0', type: 'text', tooltip: 'Number of slots to assign to Tailoring'});
charSettings.push({name: 'Artificing' + i, title: 'Artificing', def: '0', type: 'text', tooltip: 'Number of slots to assign to Artificing'});
charSettings.push({name: 'Weaponsmithing' + i, title: 'Weaponsmithing', def: '0', type: 'text', tooltip: 'Number of slots to assign to Weaponsmithing'});
charSettings.push({name: 'Alchemy' + i, title: 'Alchemy', def: '0', type: 'text', tooltip: 'Number of slots to assign to Alchemy'});
charSettings.push({name: 'Leadership' + i, title: 'Leadership', def: '9', type: 'text', tooltip: 'Number of slots to assign to Leadership'});
charSettings.push({name: 'Leadership_XP' + i, title: 'Leadership XP', def: '0', type: 'text', tooltip: 'Number of slots to assign to Leadership focused on XP'});

// task settings are slightly different
Expand Down

0 comments on commit 101fc3e

Please sign in to comment.