Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
How does the emulator communicate with the swfs?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Synt4x" data-source="post: 378083" data-attributes="member: 65632"><p>Hi everybody.</p><p></p><p>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#.</p><p></p><p>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.</p><p><strong></strong></p><p><strong>My current understanding:</strong></p><p><strong></strong></p><p>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:</p><p></p><p><strong>ServerPacketHeader.cs</strong></p><p>[CODE]public const int MOTDNotificationMessageComposer = 705;[/CODE]</p><p></p><p><strong>Habbo.swf</strong></p><p>[CODE]_SafeStr_5698[705] = _SafeStr_3230;[/CODE]</p><p>[CODE]this.addMessageEvent(new _SafeStr_2660(this._SafeStr_10206));[/CODE]</p><p>[CODE]</p><p></p><p>public function _SafeStr_2660(k:Function)</p><p>{</p><p> super(k, CallForHelpPendingCallsMessageParser);</p><p>}</p><p></p><p></p><p>public function _SafeStr_5423():CallForHelpPendingCallsMessageParser</p><p>{</p><p> return ((_SafeStr_5424 as CallForHelpPendingCallsMessageParser));</p><p>}</p><p></p><p></p><p>[/CODE]</p><p></p><p>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?</p><p></p><p>[CODE]public MOTDNotificationComposer(string Message) : base(ServerPacketHeader.MOTDNotificationMessageComposer)</p><p>{</p><p> base.WriteInteger(1);</p><p> base.WriteString(Message);</p><p>}[/CODE]</p><p></p><p>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.</p><p></p><p>Thank you, any light shed on this situation would be greatly appreciated.</p></blockquote><p></p>
[QUOTE="Synt4x, post: 378083, member: 65632"] 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. [B] My current understanding: [/B] 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: [B]ServerPacketHeader.cs[/B] [CODE]public const int MOTDNotificationMessageComposer = 705;[/CODE] [B]Habbo.swf[/B] [CODE]_SafeStr_5698[705] = _SafeStr_3230;[/CODE] [CODE]this.addMessageEvent(new _SafeStr_2660(this._SafeStr_10206));[/CODE] [CODE] public function _SafeStr_2660(k:Function) { super(k, CallForHelpPendingCallsMessageParser); } public function _SafeStr_5423():CallForHelpPendingCallsMessageParser { return ((_SafeStr_5424 as CallForHelpPendingCallsMessageParser)); } [/CODE] 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); }[/CODE] 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. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
How does the emulator communicate with the swfs?
Top