SH UnOfficial Build113a
We can't be held responsible for anything!
UnOfficial
Build113a is here! Download UnOff-Build113a.rar! Version 0
This is a slightly modified exe of Build113a, which you can easily set up to connect to your own server via the ini file.
UnOfficial Build113a SERVER (MMF) is here! Download UnOff-Build113a-Server-MMF.rar! Version 0
This is Source code (cca) to the old MMF1.5 server that was used before Build112 (when the server was recoded in Jamagic). This version was slightly updated to work with Build113a.
Registration
When a client registers, it sends the information along with the current build.
112 Client-> Server: Password*Version*E-Mail
e.g mypass*SmileyHouse-NoRegCode*joshtek@hotmail.com
113 note: similar to 112, but also contains newsletter option.
Server response (sub-channel 1):
"Reg OK" <-- Registration is okay
"In use" <-- Account exists
"Invalid" <-- Uses disallowed characters
"Wrong Key" <-- Invalid registration code (for old system when a code was needed for signup)
Login
113 Before a user logs in, they get a message on sub-channel 9 from the server saying vip-nu if they are a normal user or vip-do if they are a donator (this affects if they have ads or not).
Client-> Server: Username*Password*Version[*Mode]
112 e.g Joshtek*we1rd*(alpha)build112*DebugMode
113 e.g Joshtek*we1rd*(alpha)build113*DebugMode
Server response and clients error (sub-channel 1):
"Your version is outdated. You must upgrade!" = BadVersion <-- Client needs to update
"Your game is currupt!" = BadCRC <-- For system where the client was MD5ed on login (this was later removed)
"Your username is not valid." Invalid <-- Name is not valid
"Someone else with your IP is playing. Please close all other instances of SmileyHouse." = IPOnline <-- Already logged in with this IP (for old system where only one user could be logged in per IP address)
"Your account has been disabled." = Disabled <-- Account is not enabled, so no login
"Wrong password!" = Wrong Password! <-- Incorrect password for account
"Someone is using your account!" = Already loggedin <-- Account currently in-use
112 Note: anything else on sub-channel 1 will make "The server is not speaking my language. Do a raw update please."
If login is successful, the server sends "Login OK_" followed by the room on sub-channel 1. Example: Login OK_Trigger
Note: After logging in successfully from the login screen, they will login again from the actual game.
Chat (inc. private messages and popup messages)
Although some chat is only for people in the room, to prevent muted people from talking it all goes through the server in a processed manner anyway.
Server popup message (sub-channel 10 to client): Title¤Message
The client can make the server send this to a user with /pmsg or to all with /msg.
Users message for in-room chat: If bob wanted to say hello, he'd send to the server (on sub-channel 3): "c heya y'all". Then everyone in the room receives on sub-chan 0: "<" +Their name + "< " + Their Message + "<" + Their ID or <Bob< Heya y'all<44
If the user wishes to shout, its s heya y'all and the server sends on sub-chan 0 to all: * Name shouts, "Message"
/me emotions are similar to talking, but the user sends e not c, and there's a different message and no ID.
If a user wishes to private message someone, they just type /pm username which gets sent unedited on sub-channel 3. This message is sent to the specified person on sub-channel 0 in the format {Name{ Message
In-room avatar (and moving)
Although chatting and virtually everything is done by sending a "client->server" or "server->client" message, the way you see and interact with other players is on a "client->server(unprocessed)->client" basis.
[Stuff unrelated to server]
If the room is locked (+l) or unlocked (-l) is sent on room sub-channel 10.
+f (user frozen) and -f (user not frozen) is transmitted on room sub-channel 10.
To buy 5 health packs you send "healthpack5" on sub-channel 5", to buy 1 health pack you send "healthpack1".
You tell the server your health on sub-channel 4.
If the player dies, it sends "death" on sub-channel 3.
Sending details
The server can give the player information over the various sub-channels. Most of these can be figured out through trial and error.
Sub-channel 9: addH[amount] for health, addA for armour, subH/setH for hunger, w[weight]*[max] for weight, poison for poison, typeDuel for type dual, noF to exit fishing mode.
Once people have got that done then I'll write more.