Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Simple Client Emulator in Node

Elite Diviner
Joined
Apr 5, 2014
Messages
464
Reaction score
223
Simple node app for creating and maintaining client connections. Created this to do some stress testing.

  • Requires Nodejs
  • Assumes encryption is not enforced in the emulator
Konquer - Simple Client Emulator in Node - RaGEZONE Forums

Konquer - Simple Client Emulator in Node - RaGEZONE Forums
Konquer - Simple Client Emulator in Node - RaGEZONE Forums


In the video above (example.js) it's just using sso's 1-75 from the DB. It's up to you to write good stress tests. It's very easy to add new packets. Packet headers can be changed in messages/header.js

Straight forward example of a user authenticating, entering a room and moving to a square
PHP:
let client = new net.Socket();

client.connect(1232, '127.0.0.1', () => {  

 // User will authenticate with sso "2", enter room id 349, walk to x:4 y:4 
 client.write(ClientVersionMessage());
 client.write(SSOTicketMessage("2"));
 client.write(OpenFlatConnectionMessage(349));
 client.write(GetRoomEntryDataMessage());
 client.write(MoveAvatarMessage(4, 4));

});
Most of the encoding is from this release, thanks @Keiz

 
Junior Spellweaver
Joined
Jun 1, 2018
Messages
105
Reaction score
40
Always a pleasure to see someone else still working on Habbo development :)

& who knows, perhaps this will turn into a full fledged development thread.
 
Newbie Spellweaver
Joined
Apr 19, 2018
Messages
10
Reaction score
2
Says it's depreceated:



It connects trough the cmd node panel, but no users spawn. I changed their auth_ticket/ssoticket to 2-21 and change it in app.js using the example and set everything as i can see it in the gif but still nothing shows up.
 
Elite Diviner
Joined
Apr 5, 2014
Messages
464
Reaction score
223
Says it's depreceated:



It connects trough the cmd node panel, but no users spawn. I changed their auth_ticket/ssoticket to 2-21 and change it in app.js using the example and set everything as i can see it in the gif but still nothing shows up.


It's only a deprecation warning, it won't break anything. You can get rid of it by replacing new Buffer(this._bytes) with one of the following
  • Buffer.from(this._bytes)
  • Buffer.alloc(this._bytes)
  • Buffer.allocUnsafe(this._bytes)
in the ClientPacket.js getBuffer() method.


Regarding it not working, it's probably because of one of these
1. Your emulator is forcing encryption
2. Your emulator is using headers from a different release
3. You did not change the IP or port to the one your emulator uses

You should debug your emulator and see if it receives any packets when running the app. If it does, check if the packet headers are correct and that it gets passed any encryption check.
 
Elite Diviner
Joined
Apr 5, 2014
Messages
464
Reaction score
223
Working great for me although I haven't tested anything past the SSO. Any way of decoding the response packets?

Not with what's included in this release I don't think. I do see the use for clients being able to respond appropriately to different server messages, so if/when I get around to doing that i'll update this thread.
 
Back
Top