Disclaimer: This bot is WIP and this repo tracks ongoing development. Some code may be buggy, and some information may be out of date.
Python implementation of a bot for PixelWalker, including low-level websocket/API stuff.
Description | URL |
---|---|
PixelWalker Website | https://pixelwalker.net/ |
Block IDs | ./blockIDs/README.md |
Room Types | https://game.pixelwalker.net/listroomtypes |
Block Mappings | https://game.pixelwalker.net/mappings |
PixelWalker Forum Thread | https://forums.everybodyedits.com/viewtopic.php?id=48007 |
PixelWalker Discord | https://discord.com/invite/rDgtbbzDqX |
- Go to the PixelWalker website and log in
- Open developer tools (F12) and go to the Network tab
- Refresh the website
- Look for a file called
auth-refresh
near the bottom of the list and click on it - Under "Request Headers", find the "Authorization" key (see screenshot below)
- The value of this key is your auth token. DO NOT SHARE IT!!
- This token lasts for two weeks before expiring. You can check this using https://jwt.io/
Source: Priddle, 2024-04-21
First byte of a websocket response is the header, this can either be 0x3F for a ping (which must be returned!) or 0x6B for a message.
If it's a message, second entry is a 7-bit encoded integer, which is the message type.After that comes the message data. Each entry starts with an entry type, which is a byte.
For strings and byte array entries, the data is prefixed with a length, which is also a 7-bit encoded integer.Byte order of entry values are big endian btw. World data byte array in init message is little endian (I forgot to change that, will do soon)
All websocket messages sent by the bot (init, ping, chat etc.) should use the BINARY opcode (0x02).