Greasy Fork is available in English.

NW_profession_names

Prins NW professions name to console

< Feedback on NW_profession_names

Question/comment

§
Posted: 10.03.2015.

This script doesn't work for me :(

I think it list only tasks with not empty list of consumables.

this piece of code lists everything:

    var professuinlist = tasks.forEach(function (main) {
        console.log("LVL:" + main.def.requiredrank, ",name:" + '"' + main.def.displayname + '"', "taskname:" + '"' + main.def.name + '".'/*,",SELL_list name:"+ slotrewards.hdef,"Required crafted item:"+ slotconsum.hdef*/);
        main.consumables.forEach(function (slotconsum) {
            console.log("Required crafted item:"+ slotconsum.hdef.replace("@ItemDef[","").replace("]",""));
        });
        main.rewards.forEach(function (slotrewards) {
            console.log("Reward is:"+ slotrewards.hdef.replace("@ItemDef[","").replace("]",""));
        });
    });

If you want this in one line just concatenate strings and log at the end.

Rotten_mindAuthor
§
Posted: 10.03.2015.
Edited: 10.03.2015.

Leadership, not listing, others yes.

yes, with "concat" can join them.

I made it because wanted update profession lists and it did most... also with tools and premade list I can direct some questions away or make people find answers easier .

Maybe need join "inventory & profession names", :-/.

Rotten_mindAuthor
§
Posted: 11.03.2015.

Still not perfect, but prints now items I needed, THX for advice.

function Print_prodessions(proffession) {

var tasks = unsafeWindow.client.dataModel.model.craftinglist['craft_' + proffession].entries.filter(function (entry) {
    return entry.def && entry.def.displayname;
});
//var tasks = unsafeWindow.client.dataModel.model.craftinglist['craft_' + 'Artificing'];
var professuinlist = tasks.forEach(function (main) {
    main.consumables.forEach(function (slotconsum) {
        main.rewards.forEach(function (slotrewards) {
            console.log("LVL:" + main.def.requiredrank + ", ", "name: " + '"' + main.def.displayname + '", ', "task: " + '"' + main.def.name + '", ', main.rewards[0].hdef.replace('[',': "').replace(']', '", '), "Required:" + main.consumables[0].hdef.replace('@ItemDef[',' "').replace(']', '",'));
        });
    });
});
}

Post reply

Sign in to post a reply.