Neverwinter Gateway - Professions Robot

Automatically selects professions for empty slots

< 脚本Neverwinter Gateway - Professions Robot的反馈

评价:一般 - 脚本能用,但还有一些问题

§
发表于:2014-06-01

Some improvements...

Hi Bunta,

sorry for commenting here, but userscripts.org doesn't remember my account anymore :/

First off, thanks for the script - saved me a lot of clicking (and time ^^ )

I've added/changed a few things, maybe you want to include that in your version, too.
(see attached files; .js is not allowed as attachment, so I added a .txt)

1) Code to switch Characters only when needed (your // TODO: Add code to get next task finish time)
431 : a variable to store the finishing dates
847 : setting the date for the current char
851 : new function to find date
1251 : modified function for switching chars & displaying the next run time
--(1257 : remove notification after refining ADs)
1454/1455 : css for info box
--(1453 : only my personal preference to have the inventory shown in rows of 6 items, the way I have it ingame)
1551 : adding the info box

2) Alternative way of chosing assets - first by quality, then by speed.
1129 : modified function SelectItemFor
Perhaps a switch (for each character) would be fine, because it assumes that you have plenty of assets for all occasions.
Additionally, the iteration stops when no asset was found (the original function loops through every optional slot nonetheless)

3) Black Ice Shaping.
498, 750
My task list includes only refining; the other tasks are mostly done only once; but a full task dump is included in the 2nd attached file.

Cheers,
Bluep

§
发表于:2014-06-04

hello. i was wondering until wait for bunta to update his script i wanna add black ice shaping to the 1.0.03 version of his. will it work if i copy paste to same location these 2 portions of your code?

{
// Black Ice Shaping
taskName:"BlackIce",
level: {
1:["Blackice_Tier1_Process_Blackice"],
2:["Blackice_Tier1_Process_Blackice"],
3:["Blackice_Tier1_Process_Blackice"],
/*
1:["Forge Hammerstone Pick","Gather Raw Black Ice","Truesilver Pick Grip","Process Raw Black Ice","Upgrade Chillwright","Hire an additional Chillwright"],
2:["Forge Hammerstone Pick","Gather Raw Black Ice","Truesilver Pick Grip","Process Raw Black Ice","Upgrade Chillwright","Hire an additional Chillwright"],
3:["Forge Hammerstone Pick","Gather Raw Black Ice","Truesilver Pick Grip","Process Raw Black Ice","Upgrade Chillwright","Hire an additional Chillwright"],
*/
},

and

charSettings.push({name: 'BlackIce'+i, title: 'Black Ice Shaping',def: '0', type:'text', tooltip:'Number of slots to assign to BIS'});

§
发表于:2014-06-04

it looks like it works fine. thanks a lot for the contribution to black ice shaping.

§
发表于:2014-08-22

You sir have made my life that much simpler! Highfive!

§
发表于:2014-08-25

Is there any way to get the display working for debug. Like a log that tells me what the bot is doing so i can do it too. if it helps https://greasyfork.org/scripts/1896-nwpb this one has it wrote out. i just dont know what part it is. and where to put it in your script so it works. PS tested the other script. it works just not as efficent as yours/Bunta's

§
发表于:2014-08-25

..debug (messages) are working; just make sure that you've enabled debug in the script options (where you assign slots etc), and have the console open ( either browser console, Ctrl-Shift-j ; or page inspector console, Ctrl-Shift-k )

§
发表于:2014-08-26
编辑于:2014-08-26

bluep -- love the timer based task switching!!

§
发表于:2014-09-01

is script still maintained?

§
发表于:2014-09-15

Many thanks bluep!
How did you get the dump in the 2nd listing?

§
发表于:2014-09-15
编辑于:2014-09-15

...that's just a copy of client.dataModel.model.craftinglist.craft_*professionname*
You have to open the specific profession in the crafting section first for getting the data loaded (so the profession must be availiable at that time (event professions..), and it contains only those rare tasks which are currently availiable for you)

§
发表于:2014-09-17

Thanks, have you tried to make some cyclic tasks? Not always first available but make first from list, then second and third ... To make different items.

§
发表于:2014-09-17

no, never found the time for that; in fact the whole script would need a rewrite to work with GM 2.x at all... and I can't promise when (or even if) I find the time to work on it.
Sorry!

§
发表于:2014-09-19

There is quite annoying bug in Bluep's, script in Alchemy leveling - if you got more then one profession slot open and script sets "Alchemy Experimentation" it waits until task is done, all other characters tasks are ignored.
There is simple workaround - you just have to add simple task to end of each line in the list:

taskName:"Alchemy",
level: {
0:["Alchemy_Tier0_Intro_1"],
1:["Alchemy_Tier1_Experiment_Rank2","Alchemy_Tier1_Experimentation_Rank1","Alchemy_Tier1_Gather_Components"],
2:["Alchemy_Tier1_Experiment_Rank3","Alchemy_Tier1_Experimentation_Rank2","Alchemy_Tier1_Gather_Components"],
3:["Alchemy_Tier1_Experiment_Rank4","Alchemy_Tier1_Experimentation_Rank3","Alchemy_Tier1_Gather_Components"],
4:["Alchemy_Tier1_Experiment_Rank5","Alchemy_Tier1_Experimentation_Rank4","Alchemy_Tier1_Gather_Components"],
5:["Alchemy_Tier1_Experiment_Rank6","Alchemy_Tier1_Experimentation_Rank5","Alchemy_Tier1_Gather_Components"],
6:["Alchemy_Tier1_Experiment_Rank7","Alchemy_Tier1_Experimentation_Rank6","Alchemy_Tier1_Gather_Components"],
7:["Alchemy_Tier2_Experiment_Rank08","Alchemy_Tier2_Experimentation_Rank07","Alchemy_Tier2_Gather_Components"],
8:["Alchemy_Tier2_Experiment_Rank09","Alchemy_Tier2_Experimentation_Rank08","Alchemy_Tier2_Gather_Components"],
9:["Alchemy_Tier2_Experiment_Rank10","Alchemy_Tier2_Experimentation_Rank09","Alchemy_Tier2_Gather_Components"],
10:["Alchemy_Tier2_Experiment_Rank11","Alchemy_Tier2_Experimentation_Rank10","Alchemy_Tier2_Gather_Components"],
11:["Alchemy_Tier2_Experiment_Rank12","Alchemy_Tier2_Experimentation_Rank11","Alchemy_Tier2_Gather_Components"],
12:["Alchemy_Tier2_Experiment_Rank13","Alchemy_Tier2_Experimentation_Rank12","Alchemy_Tier2_Gather_Components"],
13:["Alchemy_Tier2_Experiment_Rank14","Alchemy_Tier2_Experimentation_Rank13","Alchemy_Tier2_Gather_Components"],
14:["Alchemy_Tier3_Experiment_Rank15","Alchemy_Tier3_Experimentation_Rank14","Alchemy_Tier3_Gather_Components"],
15:["Alchemy_Tier3_Experiment_Rank16","Alchemy_Tier3_Experimentation_Rank15","Alchemy_Tier3_Gather_Components"],
16:["Alchemy_Tier3_Experiment_Rank17","Alchemy_Tier3_Experimentation_Rank16","Alchemy_Tier3_Gather_Components"],
17:["Alchemy_Tier3_Experiment_Rank18","Alchemy_Tier3_Experimentation_Rank17","Alchemy_Tier3_Gather_Components"],
18:["Alchemy_Tier3_Experiment_Rank19","Alchemy_Tier3_Experimentation_Rank18","Alchemy_Tier3_Gather_Components"],
19:["Alchemy_Tier3_Experiment_Rank20","Alchemy_Tier3_Experimentation_Rank19","Alchemy_Tier3_Gather_Components"],
20:["Alchemy_Tier1_Refine_Basic"],
},
},

§
发表于:2014-09-19

..now that's really strange - is it possible that you haven't enabled "Auto Purchase Resources"?
Since my code (line 930 ff) adds (the highest possible) vitriol extraction as a temporary task whenever a research/experimentation is running; and that always worked for me.
The effect you're describing happens whenever the script finds no availiable task anymore to fill the slots assigned to that profession (that also is the case in Bunta's original version).

So the most plausible case would be: You have no brimstone/solvent availiable and purchase is disabled.

§
发表于:2014-09-20

Strange indeed, I had all needed resources.. It happen only in alchemy - I blame monkey, greasy one.

§
发表于:2014-09-20

I'm having odd problems with Alchemy as well. I have a toon that's at max level of Alchemy (has been for a long time) and I wanted to have him only do the Gather Complex Components task but he keeps doing simple vitriol extraction no matter what. I've removed all references to simple vitriol extraction and he still does it. Here's the last 2 lines of the Alchemy tasks:

19:["Alchemy_Tier3_Experiment_Rank20","Alchemy_Tier3_Experimentation_Rank19"],
20:["Alchemy_Tier3_Gather_Components"],

Thanks for the awesome updates, BlueP. I've been using a heavily customized older version of Mustex's script and this is a huge improvement. The only features I'm really missing are daily SCA dice roll and a conservation setting I added myself. In my script the conservation setting can be checked on each character and will populate any optional assets with common assets. This speeds things up a little without wasting all my uncommon assets. With it unchecked it will use whatever is available.

Something else I tried adding to my script but never could get to work is something to allow failover so that if a task fails it picks another task. My plan was to setup leadership as the failover and then if say black ice refining failed it would just allocate that slot into leadership instead.

§
发表于:2014-09-20

... guess I have to create a new toon to test it out, my chars are all at max Alchemy...

@Quinncy: If you've changed that script lines and it still does the task - try to use "Clear Tasks" on the specific character's settings - that's the most common source of confusion (and it's quite unlogical at all, but at least Bunta made it possible to have different task lists for different characters at all)

The fallback option would be great - I returned home more than once just to find the bot hanging in some deadlock because of missing assets/workers/etc... but with the current way of task scheduling it's not quite easy to implement that, otherwise I'd have done it already ;)

§
发表于:2014-09-20

@BlueP - I never even notice the Clear Task button. I tried it but it didn't make a difference. For my Alchemy toon I did Clear Tasks, Save Tasks and Save Settings but it's stilll selecting vitriol. I'm not even sure where's it getting that Simple Vitriol Extraction task from since I removed every reference to it I could find. It must be hard-coded in the script somehow.

It's definitely an impressive script. I haven't really delved into the guts of it yet but I'll definitely be doing that soon. Fallback would definitely be a nice feature to have and I thought it would be straightforward to implement but I quickly discovered that it's not.

§
发表于:2014-09-20

BTW, here's what the log shows - Not sure if it helps, though:
Alchemy is level 20 VM46349:908
createNextTask 2 0 VM46349:909
Searching for task: Alchemy_Tier1_Refine_Basic VM46349:912
Task Found VM46349:941
Items Populated VM46349:955
Clicking Start Task Button VM46349:960
Alchemy is level 20 VM46349:908
createNextTask 2 0 VM46349:909
Searching for task: Alchemy_Tier1_Refine_Basic VM46349:912

§
发表于:2014-09-20

Hey, it suddenly started working. All I did was the clear task again. Weird. Thanks again for the help @BlueP.

§
发表于:2014-09-21
编辑于:2014-09-21

I'm not sure if someone is still reading this, Bluep or otherwise. The script seems to work fine except that it ignores my Mercenaries on Protect the Caravan and assigns my Guards to it, which in turn means I have no Guards for Battle the Undead.

This is kind of a deal breaker. I've looked a bit at the code but it's all chinese to me. I did notice the script *was* supposed to use the lower tier NPCs before using the higher ones, but it is obviously not working.

I'm using Greasemonkey 1.5.


P.S. Ok, just to add to this. I tried saving my tasks (3 Protect Caravan, 3 Battle Undead, 1 Explore Local Area). Saved tasks, Save and Apply.

To stop the script from doing the Protect Caravan using my Guards I set it manually and left three slots open for Battle Undead. Except it ignores my Save Tasks (did I misunderstood what this does? Am I supposed to manually edit the script?) and instead of Battle Undead it picks Chart Territory.

§
发表于:2014-09-21
编辑于:2014-09-21

P.P.S Ok, I figured out that I need to edit the script manually. But I still haven't managed to make it use my mercs instead of my guards despite un-commenting the part about not needlessly using high rank assets.

§
发表于:2014-09-21
编辑于:2014-09-21

Delete.

§
发表于:2014-09-22

put them in rev. order always put your highest task first then it should work

( 3 Battle Undead,3 Protect Caravan, 1 Explore Local Area)

§
发表于:2014-09-29

Hi, just to point out what I think is the issue.
in the script it's specified what to use first etc. I haven't tested this but my guess is changing the order might work.

// 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(); }
}

§
发表于:2014-10-09

REally nice addition.

Just wondering if you try add "sell Item" for perfection.

I leveled first 3x Professions and then started Leadership.
With this script it took one week to grind 3x professions up LvL20...and Leadership is slow.

Only manual thing I did was,

- send "trash" resources e.g residuum... etc to chars I used
+ when inventory was filled with crafted item, I needed sell manually!!!

So is it big thing make it "SELL", user of-course must rectify "sell item" list, but can some one here make .js for it!?

§
发表于:2014-10-13
编辑于:2014-10-13

Hello.
I have tested your script and it stuck at the 5th char at the 4th task.
Cound down disapear and nothing happen.
I have restart it few times during the last few days and it's always the same for the same char and the same task.
I use chrome so i don't think i can debug it.
I don't have any problem with Bunta version.
Any idea ?

§
发表于:2014-11-19

Alright, to fix the script so that it doesn't "needlessly use higher tier assets" in leadership or whatever it's called, find this part:


/* ################# original
function SelectItemFor(buttonListIn, i, def, prof) {

What you're looking at there is the commented out version of the "SelectItemFor" function. The NEW version of the function rests right above it. So scroll up in the code to the newer function and right below "var clicked = false;" paste the the better leadership code, like this (both parts combined):


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(); }
}

I'm guessing this was just an oversight when editing the function? not sure. But so far doing this has worked for me.

§
发表于:2014-12-05
编辑于:2014-12-05

Hey @Bluep, thanks for the damn awesome work. I love it.

Btw, there's a bug where if one of your toons has 0 tasks (i.e. you don't want that toon to do anything) and there are empty slots - the script will get stuck there and won't continue to the next toon. This didn't happen with vanilla.

发表回复

登录以发表回复。