Automatically selects professions for empty slots
< Feedback on Neverwinter gateway - Profession Automation
Not sure where look that issue because asset selection is still intact.
If you have "Use optional asset" selected it should pick them.
I can test it after I get "Crafted Items" sell list + function for it ready. I need anyway do all professions full levelling test so if there is issue then we find it.
If interested, link to list is below. Idea is use current script "bag space" function and sell items from list "1" then check bagspace and if fail sell list "2"... after list "5" script must stop because there is nothing to sell("force to sell" list can be made)
https://gist.github.com/RottenMind/6d2ca8a74daad22fb669
like i said. it used to work. now it doesnt. yes i have select optional assets on (it works to use optional in leadership as well).
it opens the window and it "sees" 3 assets 1 time selects none. then it tries to open the window again and it is empty all the while the task has started with 1 asset instead of 4.
hmmm, I got all the time "Inventory full" messages, but there is space left and even trashed "overflowbag".... well, as long basic stuff are trashed we are all good.
what does inventory got to do with this man? script simply cant use the extra assets for those tasks.
...Gateway errors have something to do with script errors and inventory errors are new like "asset selection" failure and there was long "Server failure" on las week.
Anyway you can switch back old asset selection just moving /* */ -brackets, if its solving problem then need check why other one stopped working.
Did original asset selection work?
the original one works fine. now letting it run to see if it uses correct assets for leadership as well.
for reference it is this part of the code (the one that works for my rare tasks):
/* ################# original */
function SelectItemFor(buttonListIn, i, def, prof) {
buttonListIn[i].click();
WaitForState("").done(function() {
var specialItems = $("div.modal-item-list a.Special");
var goldItems = $("div.modal-item-list a.Gold");
var silverItems = $("div.modal-item-list a.Silver");
var bronzeItems = $("div.modal-item-list a.Bronze");
var clicked = false;
// Try to avoid using up higher rank assets needlessly
if (prof.taskName === "Leadership") {
var mercenarys = $("div.modal-item-list a.Bronze:contains('Mercenary')");
var guards = $("div.modal-item-list a.Bronze:contains('Guard')");
var footmen = $("div.modal-item-list a.Bronze:contains('Footman')");
if (mercenarys.length) { clicked = true; mercenarys[0].click(); }
else if (guards.length) { clicked = true; guards[0].click(); }
else if (footmen.length) { clicked = true; footmen[0].click(); }
}
// TODO: add remaining professions in the same way for bronze tier assets.
if (!clicked) {
// Click the highest slot
if (specialItems.length) { specialItems[0].click(); }
else if (goldItems.length) { goldItems[0].click(); }
else if (silverItems.length) { silverItems[0].click(); }
else if (bronzeItems.length) { bronzeItems[0].click(); }
else { $("button.close-button").click(); }
}
console.log("Clicked item");
WaitForState("").done(function() {
// Get the new set of select buttons created since the other ones are removed when the asset loads
var buttonList = $("h3:contains('Optional Assets:')").closest("div").find("button");
if (i < buttonList.length - 1) {
SelectItemFor(buttonList, i+1, def, prof);
}
else {
// Let main loop continue
def.resolve();
}
});
});
}
looks like the other method has problems now. manually it works. but not with the script. weird. it was fixed for a bit using the original method.
i accidentally started another thread on this. I am having the same problem.
Can you send failed task names?
It is easy switch back, Buntas original selection script, but I want replicate this so we can fork out gateway/script errors.
Just now I tested this with Alchemy and all assets were selected correctly, 1.10.1 and Github -latest(what has other problems) , task "Alchemy_Tier1_Accuracy_Potion_Minor_Mass"
I check Leatherwork next, if I can catch some Rares...
Well, it seems to be pretty simple BUG, tested it wit Tailoring/Leaterworking.
Tailoring use "Tool" and Leatherworking "Tools". Buntas original worked because it just looked "quality" and not checked if there is need for workers or tools.
Main page script is not yet updated.
var $assets = $("div.modal-item-list a").has("img[src*='_Resource_'],img[src*='_Assets_'],img[src*='_Tools_'],img[src*='_Tool_']");
Thanks! I looked at the code and I *think* I understand what you are saying. When it looks for _Assets_ or _Resources_ is it looking for what is in the .png string (for instance Inventory_Crafting_Assets_Crucible_02.png)? Or is there another element that i am not finding that has a similar name?
get the code that rotten mind posted and substitute the old one.
for example search for : var $assets = $("div.modal-item-list
in the code you are running. then change the line there with the one rotten mind has posted 2 posts above this one. save. and reload page or close tab and reopen.
feedback: it worked one time rotten mind for me. i will let it run more and let you know if it breaks again.
get the code that rotten mind posted and substitute the old one.
for example search for : var $assets = $("div.modal-item-list
in the code you are running. then change the line there with the one rotten mind has posted 2 posts above this one. save. and reload page or close tab and reopen.
feedback: it worked one time rotten mind for me. i will let it run more and let you know if it breaks again.
Well, I can say that something was rotten there, but codeblock itself is brilliant, just something what your yes cant catch. ;)
yes,i understood what Rotten Mind said to do. And i did it. And it worked. I was asking a question so i could understand more about HOW it worked.
sorry i misunderstood and thought you needed help on how to change it.
I changed the line but it doesn't worked for jewelcrafting. First I shows all 3 assets, but then no asset is added. see screenshots
yes,i understood what Rotten Mind said to do. And i did it. And it worked. I was asking a question so i could understand more about HOW it worked.
Well, it is how you understand it, it look .png names(what are same in (DE/RU/EN). IMHO
For me it took time to detect "why" and I used first "Buntas assets" to see that its was not Gateway error... and after that found human error.
Assets name seems to made "unique" so thats why there is so many variations, like "Tool", "Tools", etc. we just missed few variations.
Can I help you to determine the missing jewelcrafting assets?
If you can find item names, then you can confirm them.
...and Jewelcrafting was just profession I tested it worked... human error.
img src="tex/Inventory_Jewelcrafting_Bezelpusher_01.png" alt=""
img src="tex/Inventory_Jewelcrafting_Jewelersloupe_01.png" alt=""
...damn, did we catch all?
huh, soon all tools are list individual,
var $assets = $("div.modal-item-list a").has("img[src*='_Resource_'],img[src*='_Assets_'],img[src*='_Tools_'],img[src*='_Tool_'],img[src*='_Jewelersloupe_'],img[src*='_Bezelpusher_']"); //edited by RottenMind
ha. I just logged in to let you know about this, but you were faster. I was going to use "Inventory_" with the hopes that it might catch whatever new tools they create. Wouldn't this work:
var $assets = $("div.modal-item-list a").has("img[src*='_Resource_'],img[src*='_Assets_'],img[src*='_Tools_'],img[src*='_Tool_'],img[src*='Inventory_']");
ha. I just logged in to let you know about this, but you were faster. I was going to use "Inventory_" with the hopes that it might catch whatever new tools they create. Wouldn't this work:
var $assets = $("div.modal-item-list a").has("img[src*='_Resource_'],img[src*='_Assets_'],img[src*='_Tools_'],img[src*='_Tool_'],img[src*='Inventory_']");
...no it cant work... ask yourself "what inventory I look" and you see confusion and if you click that inventory... you get nothing, ;).
Better just check items more often and do updates.
Updates just ruins all "user edits" if edited options are not included to update so thats why I dont like do mainscript updates too often...
users can have a small .txt or something with their personal edits and use that to make the changes really fast when script updates.
or just keep a backup copy of their current script and remember/note where their personal changes are.
that's what i do for my personal changes to the script (nothing special just professions tasks and format of astral diamonds)
Well, I can confirm that this was undefined asset in script, NOT Gateway problem.
About updating script, maybe new thread for it, "How to use Winmerge" or similar for update, many customize script and want keep their own stuff.
Bug with extra assets for rare task
using version 1.05.0.1f with chrome Version 39.0.2171.95 m and Tampermonkey 3.9.131.
script works fine with everything (does cycles and leadership flawless) BUT
when i add a rare task at tailoring or leatherworking it uses only 1 purple tool instead of the 4 purple i have.
some versions ago it was using all 4 purple. right now it show the purple worker adds the first purple tool, pops up the window showing 3 purple tools, then it adds none, pops up same window without any purple tool showing then goes into loop trying and showing the empty tool window. meanwhile the task has started with using 1 tool only instead of 4 which is not acceptable for the rare tasks at leatherworking or tailoring.
any help with that will be appreciated.