Jump to content
  • Sign Up

API: how to find the remaining "charges" of gathering tools?


GODh.3892

Recommended Posts

Hello all,

I am experimenting a bit with the API. I am a player with many characters and i always forget where i have put certain items, so i am trying to build a tool that helps me find such items (from bank, material storage, shared inventory, player bags and equipement).

Now there are items which have limited uses, like normal salvage kits and gathering tools (not the unlimited ones). I am trying to show the number os remaining uses as well, but thing go not well for gathering tools :angry:

I tried to search for an answer in these forums, but i did not find anything. Hopefully someone here knows how to solve this.

I have an example with a characters who has a few "Frostbitten Orichalcum Mining Picks" equiped/in his bags (item id = 68376).He also has a "Black Lion Salvage Kit" in his bags (item is = 19986).

When i do an api request via characters?ids=charname then i get info about that character, including his inventory (bags) and equiped items (armor, weapons, gathering tools, etc).

When it comes to the mentioned items i find info like this:

    "equipment": [        {            "id": 68376,            "slot": "Pick",            "binding": "Account"        }      "inventory": [        {             "id": 68376,              "count": 1,               "binding": "Account"        },       "inventory": [        {              "id": 19986,               "count": 1,               "charges": 25,                "binding": "Account"        },

The first 2 items are the mining picks (first one is equiped, the 2nd one is in one of the bags)The last item is the salvage kit. It has an extra line with "charges". This reflects the remaining number of uses left.

But the mining picks dont come with this "charges" line :anguished:

Does anyone know how to obtain this info? Thanks in advance :+1:

Link to comment
Share on other sites

@andrewfam.5980 said:I guess you have to use their names to make a distinction.

That's a bit tricky as each item have multiple names (one for each supported language, like english, french, chinese, etc) and its always possible that Anet starts changing a name for whatever reason (i hope not ofc) :'(

I was hoping for a nicer solution like a flag or something :3

Link to comment
Share on other sites

Using the ID instead of the name is better, but only works for the unbreakable tools (both salvage and gathering). Downside is that it would not be good for the application if Anet keeps adding new unbreakable tools (new effects, etc).

And it does not solve the issue with not receiving the remaining charges of breakable gathering tools :'(

Link to comment
Share on other sites

I think i have solved the problem with the unbreakable salvagekits. They all seem to be level 0, details.type is "salvage" and details.charges is 1.. All other kits have differences here. Tested it on 239 salvage kits (over 4 accounts) and i got a 100% correct result (even a normal kit with 1 charge left).

But gathering tools is still a different story :/

And yes, the API is far from complete. I have some items in bags or even equiped which are not in the API. I am able to locate these items (like bagname + slot) and noticed that these items are not on wiki either. So far i could see that these items were all armor which i bought from a karma or wvw merchant. One item i got from doing guild mission (an item that spawns crafting stations). So, these items still exist, but there is no info availabe via the API or even wiki, other than tracking down the items in you bags and staring at them :#

Link to comment
Share on other sites

Knowing how i "fixed" the problem with the unbreakable salvagekits, i did the same thing with unbreakable gathering tools. I had to add a check on rarity as an item like "copper mining tool" is level 0 too. But for now it seems to work 100% (without the need of using names or id's) B)

So 1 problem left: breakable gathering tools... but i dont think there is a fix for that (due lack of info), unless Anet decides to give their API a bit more love

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...