Greasy Fork is available in English.

NW - inventory names

Prints NeverWinterOnline items in inventory (including content of user bags!)

< 腳本NW - inventory names的回應

提問/評論

§
發表於:2015-03-11

inventory listings, ;D

Hello,

I need look profession names closer and add your stuff in, but as you can see Im not too much familiar with JAVA so it takes some time do simple things, but here is something for "Inventory" listing.

I did it because I wanted sell "Gathered" items, I stripped all not needed filters away,

var _pbags = client.dataModel.model.ent.main.inventory.playerbags;
var _pbags_crafting = client.dataModel.model.ent.main.inventory.tradebag; //tradebag
var _tmpBag1 = [];
var _tmpBag2 = [];
//var _tmpBag = [];
$.each(_pbags, function (bi, bag) {
    bag.slots.forEach(function (slot) {
        _tmpBag1[_tmpBag1.length] = slot;
        //console.log(slot.name); // normal inventory debug msg
    });
});
_pbags_crafting.forEach(function (slot) {
    _tmpBag2[_tmpBag2.length] = slot;
    //console.log(slot.name); // tradebag debug msg
});

var _tmpBag = _tmpBag1.concat(_tmpBag2);
_tmpBag.forEach(function (slot) {
    // avoid  NullPointerException. this was silly mistake fixed now
    if (slot === !null || slot || slot === !undefined) {
        console.log(slot.name); // normal and profession inventory names
    }
});
WloBeb作者
§
發表於:2015-03-12

Thanks, playerbags implemented.
Tradebag is unusable for me because is part of another bags.

發表回覆

登入以回復