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

Bot Character Disconnects After 50 Seconds or When NetStatusRequest Sent #7

Open
HitboxInteractive opened this issue Feb 3, 2022 · 5 comments

Comments

@HitboxInteractive
Copy link

The bot is functional both sending and receiving messages from chat.

The in-game character is disconnected when NetStatusRequest is sent.

If the delay to send NetStatusRequest is increased beyond 50 seconds, the in-game character is also disconnected.

@swginfinity
Copy link

Ever find a solution?

@swginfinity
Copy link

I think this is the commit that broke it, haven't been able to figure out a solution yet. swgemu/engine3@27ce644#diff-cf1ef8a5f4ad5b27bcd23f651fe4ef1d586c4ca53cdf05d1e172e617f28f7e0c

@swginfinity
Copy link

This will fix it. Update this NetStatusRequest in SOEProtocol.js

EncodeSWGPacket["NetStatusRequest"] = function() {
var buf = Buffer.alloc(40); //Need to send the complete 40 byte packet
buf.writeUInt16BE(0x07, 0); //00 07 - Client Network Status Update
var tick = new Date().getTime() & 0xFFFF; //Convert to uint16
buf.writeUInt16LE(tick, 2); //Convert to little endian (same as htons in c++)
return Encrypt(buf);
}

@dpwhittaker
Copy link
Owner

Create a pull request and I'll approve blindly. I'm not playing SWG currently.

@swginfinity
Copy link

I'll put in a pull request for the netstatuspacket update, but you have a lot of other updates needed for Discord.js newer versions.

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

No branches or pull requests

3 participants