Hi everybody.
I've been a coder for the best part of 7 years now. PHP is my strongest language and thus I have good knowledge about Object-Orientated Programming. I know a little bit of C#, I picked the basics fairly fast as PHP was strongly influenced by C#.
Anyway, to the point - I want to further develop Plus Emulator and start coding in stuff that's already within the swfs that hasn't been developed yet. I believe this would be the best way to start. However, my biggest problem is I can't find any tutorials or posts explaining how the emulator sends and receives data to the swfs.
My current understanding:
I know that data is transferred over sockets and sent in packets. I believe that packets are used to send information to the swfs which can be used to trigger functions within classes. But how do I know what information to send to the swf? I have decompiled Habbo.swf and took a look at some of the functions that are linked to the packet headers. I.e. the MOTD notification:
ServerPacketHeader.cs
Habbo.swf
What I don't understand however, is how MOTDNotificationComposer.cs communicates the values necessary to provide the text to the MOTD notification as I don't see where there is a string or integer parameter being required?
Maybe I have the wrong understanding of how this all works, but I'd really like someone to be able to help me out with all of this, I want to be able to start developing emulators more.
Thank you, any light shed on this situation would be greatly appreciated.
I've been a coder for the best part of 7 years now. PHP is my strongest language and thus I have good knowledge about Object-Orientated Programming. I know a little bit of C#, I picked the basics fairly fast as PHP was strongly influenced by C#.
Anyway, to the point - I want to further develop Plus Emulator and start coding in stuff that's already within the swfs that hasn't been developed yet. I believe this would be the best way to start. However, my biggest problem is I can't find any tutorials or posts explaining how the emulator sends and receives data to the swfs.
My current understanding:
I know that data is transferred over sockets and sent in packets. I believe that packets are used to send information to the swfs which can be used to trigger functions within classes. But how do I know what information to send to the swf? I have decompiled Habbo.swf and took a look at some of the functions that are linked to the packet headers. I.e. the MOTD notification:
ServerPacketHeader.cs
Code:
public const int MOTDNotificationMessageComposer = 705;
Habbo.swf
Code:
_SafeStr_5698[705] = _SafeStr_3230;
Code:
this.addMessageEvent(new _SafeStr_2660(this._SafeStr_10206));
Code:
public function _SafeStr_2660(k:Function)
{
super(k, CallForHelpPendingCallsMessageParser);
}
public function _SafeStr_5423():CallForHelpPendingCallsMessageParser
{
return ((_SafeStr_5424 as CallForHelpPendingCallsMessageParser));
}
What I don't understand however, is how MOTDNotificationComposer.cs communicates the values necessary to provide the text to the MOTD notification as I don't see where there is a string or integer parameter being required?
Code:
public MOTDNotificationComposer(string Message) : base(ServerPacketHeader.MOTDNotificationMessageComposer)
{
base.WriteInteger(1);
base.WriteString(Message);
}
Maybe I have the wrong understanding of how this all works, but I'd really like someone to be able to help me out with all of this, I want to be able to start developing emulators more.
Thank you, any light shed on this situation would be greatly appreciated.