MercuryTrade-Community-Fork icon indicating copy to clipboard operation
MercuryTrade-Community-Fork copied to clipboard

[FEATURE REQUEST] - add name automatically

Open 8Times opened this issue 4 years ago • 1 comments

There are two things to add:

  1. Two optional input fields named account name and POESESSID.
  2. A HTTP request.

You can access ones public character list with https://www.pathofexile.com/character-window/get-characters?accountName= and a private character list with an additional POESESSID cookie.

How I imagine it to work:

When you save after inputting your account name you do an initial HTTP request and if you get error "code: 6" prompt a message that the account is set private and you need to add a POESESSID.

After that I would suggest doing a HTTP request after every start checking if the character list can be accessed and if not then do a prompt about the issue

Additionally I would suggest adding a listener to when someone changes global chat and trade chat within 5 seconds as that usually only happens when someone joins with a character (is language depending!).

To know which character is the currently logged in you simply need to filter for the one which is lastActive: true and get the name.

8Times avatar Jan 31 '21 01:01 8Times

I came up with another method which is a little bit more manual but doesn't require a HTTP request:

Add a button which sends a random string in the local chat. Use that random string to determine the current character's name.

8Times avatar Feb 10 '21 11:02 8Times

wont be longer needed since after next update leave function will be changed

Morph21 avatar Aug 29 '23 16:08 Morph21