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
PlusEMU Football Gate
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="Mythic" data-source="post: 429334" data-attributes="member: 79389"><p>Depends on which SWF Revision you are using. I am using the SWF revision provided with the first Sledmore release. My solution is not complete, as I am working on it. But yes, it fucks me up as well. Since I am a noob, do not expect to work it properly. But considering the fact that nobody else can help, it may be useful for further investigation.</p><p></p><p>I did the saving and change clothes function when the user goes through the gate. But as you can see, the figure code is wrong. Actually, the user would also have a face and skin color. But I dont figured it out how to do this.</p><p><img src="https://i.imgur.com/qGuvzEj.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>This is just the structures, you have to code it yourself.</p><p></p><p><strong>1. Add the packets (ClientPacketHeader and PacketManager)</strong></p><p>[PHP]public const int FootballGateUpdateEvent = 887; // just in my case[/PHP]</p><p>[PHP]this._incomingPackets.Add(ClientPacketHeader.FootballGateUpdateEvent, new FootballGateUpdateEvent());[/PHP]</p><p></p><p>2. <strong>Create FootballGateUpdateEvent.cs</strong></p><p>[PHP] </p><p>int ItemId = Packet.PopInt(); // returns the ItemId of the gate</p><p>string Gender = Packet.PopString().ToUpper(); // returns the gender M or F</p><p>string Look = PlusEnvironment.GetGame().GetAntiMutant().RunLook(Packet.PopString()); // returns the figure code</p><p>// Do several checks here, e.g user has rights, anti mutant... and then update the ExtraData of Gate</p><p></p><p>using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p>{</p><p> dbClient.RunQuery("UPDATE items SET extra_data = '" + Gender + ";" + Look + "' WHERE `id` = '" + Item.Id + "' LIMIT 1");</p><p>}</p><p>[/PHP]</p><p><strong>3. Edit Item.cs UserWalksOnFurni and add the following</strong></p><p>[CODE] if (GetBaseItem().InteractionType == InteractionType.FOOTBALL_GATE)</p><p>{</p><p></p><p>string[] Info = ExtraData.Split(';');</p><p>string Gender = Info[0];</p><p>string NewLook = Info[1];</p><p> // Change the avatar figure of the user after doing the anti mutant & gender checks ...</p><p>user.GetClient().SendMessage(new AvatarAspectUpdateMessageComposer(NewLook, Gender));</p><p>// SQL Update... </p><p>}[/CODE]</p><p></p><p>In the example above, I'm getting this figure code.</p><p><img src="https://i.imgur.com/r0Ha31c.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>How to convert this to a figure with skin and face?</p></blockquote><p></p>
[QUOTE="Mythic, post: 429334, member: 79389"] Depends on which SWF Revision you are using. I am using the SWF revision provided with the first Sledmore release. My solution is not complete, as I am working on it. But yes, it fucks me up as well. Since I am a noob, do not expect to work it properly. But considering the fact that nobody else can help, it may be useful for further investigation. I did the saving and change clothes function when the user goes through the gate. But as you can see, the figure code is wrong. Actually, the user would also have a face and skin color. But I dont figured it out how to do this. [IMG]https://i.imgur.com/qGuvzEj.png[/IMG] This is just the structures, you have to code it yourself. [B]1. Add the packets (ClientPacketHeader and PacketManager)[/B] [PHP]public const int FootballGateUpdateEvent = 887; // just in my case[/PHP] [PHP]this._incomingPackets.Add(ClientPacketHeader.FootballGateUpdateEvent, new FootballGateUpdateEvent());[/PHP] 2. [B]Create FootballGateUpdateEvent.cs[/B] [PHP] int ItemId = Packet.PopInt(); // returns the ItemId of the gate string Gender = Packet.PopString().ToUpper(); // returns the gender M or F string Look = PlusEnvironment.GetGame().GetAntiMutant().RunLook(Packet.PopString()); // returns the figure code // Do several checks here, e.g user has rights, anti mutant... and then update the ExtraData of Gate using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.RunQuery("UPDATE items SET extra_data = '" + Gender + ";" + Look + "' WHERE `id` = '" + Item.Id + "' LIMIT 1"); } [/PHP] [B]3. Edit Item.cs UserWalksOnFurni and add the following[/B] [CODE] if (GetBaseItem().InteractionType == InteractionType.FOOTBALL_GATE) { string[] Info = ExtraData.Split(';'); string Gender = Info[0]; string NewLook = Info[1]; // Change the avatar figure of the user after doing the anti mutant & gender checks ... user.GetClient().SendMessage(new AvatarAspectUpdateMessageComposer(NewLook, Gender)); // SQL Update... }[/CODE] In the example above, I'm getting this figure code. [IMG]https://i.imgur.com/r0Ha31c.png[/IMG] How to convert this to a figure with skin and face? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEMU Football Gate
Top