Greasy Fork is available in English.

Neverwinter gateway - Profession Automation

Automatically selects professions for empty slots

< Feedback on Neverwinter gateway - Profession Automation

Review: OK - Skripti toimii, mutta siinä on ongelmia

§
Posted: 4.5.2015

Possible if Alchemy is training, skip potion vendor?

Would it be possible to add a code line that says if Alchemy is being trained on the character, don't sell any potions other than the Unstable ones?

Otherwise, if you have sell potions on, you'll never level alchemy.

Rotten_mindAuthor
§
Posted: 4.5.2015
Edited: 4.5.2015

Yeah, I should add it, something like this, not sure if ! work here.

if (settings["autovendor_pots2"] && settings['Alchemy'] = 0) {
        _vendorItems[_vendorItems.length] = {
            pattern: /^Potion_(Healing|Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)_2$/,
            limit: 0
        };
    }

Alchemy is value 0 - 99 and only if its 0 its safe to Vendor potions, I did this same mistake many times and sold potions when leveling alchemy.... can blame script when itself make foul moves, ;)

§
Posted: 5.5.2015

I have always wanted the vendor settings in particular to be able to be character specific, overriding the global settings per character.

Rotten_mindAuthor
§
Posted: 5.5.2015
I have always wanted the vendor settings in particular to be able to be character specific, overriding the global settings per character.

Three ways to go if like do, if make level check then can vendor lower rank stuff if level X...

Check if Alchemy is active, simple,

  (settings["autovendor_pots2"] && settings['Alchemy'] = 0)

add level check, not sure if its same array allways

        var Alchemy_rank = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories[7].currentrank;

make level check with function, need variables....

 // Check level
                var level = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories.filter(function (entry) {
                    return entry.name == prof.taskName; //
                })[0].currentrank;
                var list = prof.level[level];
§
Posted: 5.5.2015
Edited: 5.5.2015

I might want to move those lower level potions to another character when I am done with alchemy on the character they are currently on. Leveling alchemy one character at a time is what I often do.

So, disabling all potion vendoring on a character that is using alchemy would at least allow that.

§
Posted: 6.5.2015

keep in mind some lower lvl potions sell VERY well on AH

Rotten_mindAuthor
§
Posted: 6.5.2015
Edited: 6.7.2015

hmmm, then it should be, need check that value also against "undefined" and "null"?

   (settings["autovendor_pots_1_2"] && settings['Alchemy'] == 0) //logical  ;)

and I add higher level potions too, but they will be "nested" on groups, two potions level per group.

I think lvl60 stuff is mostly trash now so will it be,

  • potions rank 1 - 3 (or 1-2)
  • potions rank 3 - 5 (2 - 4)
  • potions rank 5
  • potions Health 1 - 5 (6?)

What you think, separate all heath potions to one section.

...hmm, need TAB´s but dont want extra java stuff...

Rotten_mindAuthor
§
Posted: 6.5.2015
Edited: 6.5.2015

RegEx Experts, check it out http://regexpal.com/ (dot matches all, ^$ match at line breaks), still need test it.

Check what needs add in Junk -section,

This is how I think it must be done, I edited two sections for test purpose and both gives same results,

  • script rotations, no potions Vendored if Alchemy

  • users switch new character by hand

    • character stats not loaded
    • per character professions not updated
    • sells potions if use "Inventory Autovendor"

Solution is look if character data can loaded if use "Inventory Vendor", but just now IDK if its needed... normal exclude list works anyway and per profession works if script do rotation.

Vendor exclude is here, just simple REgexp concatenate... testing it,

// MAC-NW
function vendorItemsLimited(_items) {
    var _Alchemy_state = parseInt(settings["Alchemy"]);
    var _charGold = unsafeWindow.client.dataModel.model.ent.main.currencies.gold;
    var _pbags = client.dataModel.model.ent.main.inventory.playerbags;
    var _pbags_crafting = client.dataModel.model.ent.main.inventory.tradebag; //tradebag
    var _delay = 400;
    var _sellCount = 0;
    var _classType = unsafeWindow.client.dataModel.model.ent.main.classtype;
    var _bagCount = unsafeWindow.client.dataModel.model.ent.main.inventory.playerbags.length;
    var _bagUsed = 0;
    var _bagUnused = 0;
    var _tmpBag1 = [];
    var _tmpBag2 = [];
    //var _tmpBag = [];
    var _profitems = [];
    // Pattern for items to leave out of auto vendoring (safeguard)
    var _exclude_Alchemy = /^Potion_(Healing|Tidespan|Force|Fortification|Reflexes|Accuracy|Rejuvenation)(|_[1-5])$/;
    var _excludeItems = /(Charcoal|Rocksalt|Spool_Thread|Porridge|Solvent|Brimstone|Coal|Moonseasalt|Quicksilver|Spool_Threadsilk|Clues_Bandit_Hq|Clothscraps_T4|Clothbolt_T4|Potion_Potency|Potion_Protection|Taffeta|Crafting_Asset|Craftsman|Aqua|Vitriol|Residuum|Shard|Crystal|District_Map|Local_Map|Bill_Of_Sale|Refugee|Asset_Tool|Tool|Gemfood|Gem_Upgrade_Resource|Crafting_Resource_Elemental|Elemental|Artifact|Hoard|Coffer|Fuse|Ward|Preservation|Armor_Enhancement|Weapon_Enhancement|T[5-9]_Enchantment|T[5-9]_Runestones|T10_Enchantment|T10_Runestones|4c_Personal|Item_Potion_Companion_Xp|Gateway_Rewardpack|Consumable_Id_Scroll|Dungeon_Delve_Key)/; // edited by RottenMind 08.03.2015

    if (_Alchemy_state !== 0) {
        _excludeItems = new RegExp(_exclude_Alchemy.source + "|" + _excludeItems.source); // make sure that we DONT sell potions if leveling
    }
    console.log(_excludeItems);

Test it,

https://greasyfork.org/en/scripts/7808-neverwinter-gateway-professions-robot

Rotten_mindAuthor
§
Posted: 6.5.2015

I think its good to go,

https://greasyfork.org/en/scripts/7808-neverwinter-gateway-professions-robot

, and need investigate more this REgeX concatenate. Now exclude is one list and it prevent some sales we want do, so splitting it parts will help with VEndor options.

Any way quality filter prevents 90% unwanted anyway.

§
Posted: 6.7.2015
Edited: 6.7.2015

The original code listed here was working, and for some reason after a failed upgrade, it kills the script. Odd. (the minor update in the second post that is - it was working great then BAM.)

I'll just turn off selling potions till I'm done with the last few alchemy chars (due to Invoking changes, Im stopping at 30 I think).

Rotten_mindAuthor
§
Posted: 6.7.2015
Edited: 6.7.2015

So how it is not working?

ps. option is done "just incase", normally recommend turn off potions sale.

§
Posted: 6.7.2015

The script totally breaks when I add this (the buttons to run the script vanish):

if (settings["autovendor_pots2"] && settings['Alchemy'] = 0) {

Again, not a huge deal.

§
Posted: 6.7.2015
Edited: 6.7.2015

```if (settings["autovendor_pots2"] && settings['Alchemy'] = 0) {


Can't be correct to begin with, comparison operator in JavaScript is either `==` or `===` .

`=` is an assignment operator. 

But it is a logical error, if the script button doesn't appear it means most likely  a syntax / parsing error. 
Try checking the log (ctrl+shift+j) to see where it was.
Rotten_mindAuthor
§
Posted: 6.7.2015

Heh, that was draft what I tested, was funny to check "==" "!==" "=" difference.

Post reply

Sign in to post a reply.