Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed login on member worlds #8

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

pedrotk
Copy link

@pedrotk pedrotk commented Jun 4, 2021

still can't use all interfaces
i'm not sure about the GameLoginResponse packet order is right, on isMember parameters shouldn't it be just 0x01?
the client is receiving ex. 0x14 0x16

still can't use all interfaces
@woahscam
Copy link
Contributor

woahscam commented Jun 4, 2021

I'm confused what you mean by not being able to use all interfaces? Whenever I boot up I go straight into lobby, and can click on everything no issues. (Win 64)

If you're talking about the little members icon in the top right not glowing, and it saying you don't have membership:

LoginServerHandler.kt - line 66

val response = LoginPacket.LobbyLoginResponse(
                        ...
                        byte10 = 0,
                        byte11 = 1, // byte11 - 1 membership / 2 active subscription
                        int12 = 0,
                        ...
                        int23 = 0,
                        short24 = 0, // short24 - Current selected world
                        defaultWorld = OpenNXT.config.hostname,
                        ...

This response packet controls things like:

  • subscription days left
  • last login date
  • host ip/port
  • muted/blackmarks

Currently for that response packet:
long8 = subscription days left? (not sure if it's still this one or not)
byte11 = membs [0 non-membs][1 members][2 sub active]
short15 = message amount
short16 = last login date

Some other info/values : LobbyPlayer.kt
varcs
4266 | Lobby THunter Keys
4267 | Lobby THunter hearts of ice
4659 | Lobby runecoins
4660 | Lobby loyalty points

Play around with some of the values and see what else you can find!

@Techdaan
Copy link
Owner

Techdaan commented Jun 4, 2021

Hi, did you test the latest commit on master branch? That might fix the issue. I'll have to look into replicating the issue, I had one field wrong earlier but I'm unsure if that'd cause this issue.

@pedrotk
Copy link
Author

pedrotk commented Jun 4, 2021

@woahscam not on lobby, but ingame
can login in the world, but item actions options will disappear, and interface will show restriction, even still can click and do the action.

@Techdaan
yes, tested with the last commit
got a error when username calls readNullCircumfixedString, but the first byte it's not 0x00
my guess is that the first byte of the username is actually the correct value for isMember

but even replacing the isMember value to a fix 0x01, still get the same situation

@Techdaan
Copy link
Owner

While it's a bit late, I think that the issue lies with the way I read strings in the GameLoginResponse packet.

I use readNullCircumfixedString, but I think normal readString should be used. Same with the encoder. The commented byte should also be uncommented.

I believe those changes should fix the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants