Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[RELEASE] Swift Emulator - Fixes / Edits

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jul 15, 2012
Messages
12
Reaction score
0

SWF Pack link is down..

Someone can upload?
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
This is a core fix, sorry for the delay on doing it. Was busy with the college.

By doing this, your relationship composer will be 100% retail-like.

At GameClientMessageHandler.cs

Look for internal void SetRelationshipsStatus() and replace the whole method with:

Code:
        internal void SetRelationshipsStatus()        {
            uint requester = this.Request.PopWiredUInt();
            uint newStatus = this.Request.PopWiredUInt();
            if (this.Session.GetHabbo().GetRelationshipComposer().GetRelationshipList.ContainsKey(requester))
            {
                if (this.Session.GetHabbo().GetRelationshipComposer().GetRelationshipList[requester] != newStatus)
                {
                    this.Response = this.Session.GetHabbo().GetRelationshipComposer().SerializeRelationshipUpdate(requester, newStatus);
                    this.SendResponse();
                }
            }
            else if ((!this.Session.GetHabbo().GetRelationshipComposer().GetRelationshipList.ContainsKey(requester)) && (newStatus != 0))
            {
                this.Response = this.Session.GetHabbo().GetRelationshipComposer().SerializeRelationshipUpdate(requester, newStatus);
                this.SendResponse();
            }
            else
                return;
        }

At RelationshipComposer.cs look for : internal void RelationshipStatusUpdate(uint targetID, uint newRelationshipStatus) and replace the whole function with:

Code:
internal void RelationshipStatusUpdate(uint targetID, uint newRelationshipStatus)        {
                if (newRelationshipStatus != 0)
                {
                    if (this.HasRelationshipWith(targetID))
                    {
                        using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                        {
                            adapter.setQuery("UPDATE user_relationships SET relationshipstatus=@newstatus WHERE requester_id = @sender AND target_id = @target LIMIT 1");
                            adapter.addParameter("sender", this.UserID);
                            adapter.addParameter("target", targetID);
                            adapter.addParameter("newstatus", newRelationshipStatus);
                            adapter.runQuery();
                        }


                        relationshipStatusIndex[composedRelations[targetID] - 1]--;
                        composedRelations[targetID] = newRelationshipStatus;
                        relationshipStatusIndex[newRelationshipStatus - 1]++;
                    }
                    else
                    {
                        using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                        {
                            adapter.setQuery("INSERT INTO user_relationships (requester_id,target_id,relationshipstatus) VALUES (@sender,@target,@newstatus)");
                            adapter.addParameter("sender", this.UserID);
                            adapter.addParameter("target", targetID);
                            adapter.addParameter("newstatus", newRelationshipStatus);
                            adapter.runQuery();
                        }
                        relationshipStatusIndex[newRelationshipStatus - 1]++;
                        this.composedRelations.Add(targetID, newRelationshipStatus);
                    }


                }
                else
                {
                    using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        adapter.setQuery("DELETE FROM user_relationships WHERE requester_id = @sender AND target_id = @target LIMIT 1");
                        adapter.addParameter("sender", this.UserID);
                        adapter.addParameter("target", targetID);
                        adapter.runQuery();
                    }
                    relationshipStatusIndex[composedRelations[targetID] - 1]--;
                    this.composedRelations.Remove(targetID);
                }
        }


SWF Pack link is down..

Someone can upload?


Here are my own htdocs folder from he hotel I used to run:
. Should have everything you need inside the the main swfs folder ( htdocs/swfs ). Make sure you change the furnidata.txt and external_flash_texts.txt because they are in Portuguese.
 
Last edited:
Newbie Spellweaver
Joined
Apr 18, 2013
Messages
56
Reaction score
3
weird the groups worked like good on the old SwiftEMU ehm...

Still thinking why you need to restart your emu for the groups.

Someone a idea?
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
weird the groups worked like good on the old SwiftEMU ehm...

Still thinking why you need to restart your emu for the groups.

Someone a idea?

Yes. It's that Quackster's patch for memory leak. Remove It and groups will work fine. However, it's leaky so I might complete that patch for a full task cycle
 
Newbie Spellweaver
Joined
Apr 18, 2013
Messages
56
Reaction score
3
Yes. It's that Quackster's patch for memory leak. Remove It and groups will work fine. However, it's leaky so I might complete that patch for a full task cycle

Ehm.. I will look at the groups and look if i can fix it without removing the memory leak patch..
 
Newbie Spellweaver
Joined
Jul 11, 2012
Messages
12
Reaction score
1
@AKllX Can you post a final edition with bots and horse fix thx <3
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
@AKllX Can you post a final edition with bots and horse fix thx <3

I will post what I do when I do it, but I really don't get a lot of free time. Also, I'm focusing now on trying to figure out how to reverve, crack or patch the RC4 system from habbo's swf so I can keep up with it's latest release. Also, after the RELEASE63-201304291103-855522680 It seems that the way that Diffie-Hellman algorithm is structured has changed. Which means, more work !
 
Newbie Spellweaver
Joined
Mar 29, 2011
Messages
54
Reaction score
4
I can teach you how to crack rc4 xd,i learn it a long time ago
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
I use one from Leenster's BCStorm edition + Swift Emu Bots + My Relationships.

// Working on guilds right now. It seems that I got them loading currectly, but not being able to edit them right after creating. Also, must create a system to dispose guilds that have been on Idle State ( a.k.a memory cleaning )
 
Joined
May 8, 2010
Messages
1,902
Reaction score
669
I use one from Leenster's BCStorm edition + Swift Emu Bots + My Relationships.

// Working on guilds right now. It seems that I got them loading currectly, but not being able to edit them right after creating. Also, must create a system to dispose guilds that have been on Idle State ( a.k.a memory cleaning )

Good luck dude, add me on skype, dont want you getting caught by Sulake now do we?
 
Newbie Spellweaver
Joined
Apr 18, 2013
Messages
56
Reaction score
3
Can someone release the fixed swiftemu?
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
Thanks for the commentaries, I really enjoy deving Habbo for knowledment. I got some time today so I finished another core update that was bugging me alot. Since It's release the BCStorm group system was broken. It was leaky, not optimal and, as I got to know later, very ambiguous. For example, every time you request some group to load from your memory, the program used to perfomed that task twice. That is not efficient and can be taken as a bug. However I think that I figured out the whole memory consuming and low performance dilemma for this release and made I good and optimal system to dispose and handle groups objetcs. After hours of testing, I can show you this data:

For each group cached, there is a consume of 13,1 ~ 13,3 K + GroupMemberNumber*0,07K of memory. It means that if you have 5000 groups with average 100 members loaded, you should have a memory consume of ~ 100MBytes. As I don't have acess to any high-populated hotel to test It, I belive that there should be 5000 groups loaded for every 500online users. That seemed a good performance. But It wasn't enough. So I also created a system to dispose unused groups (the ones that are loaded by loading a profile, for example). That system disposes about to 95% of the loaded guilds on every LowPriorityWork.Process cycle ( 30s ). It means that 95% of this 100MBytes used by 5000 loaded groups is free to be used again after 30 seconds.

With that result, I belive that I was able to fix this problem regarding BCStorm's Edits/Upgrates performance instability regarding groups, making it possible to use for high populated live servers. However, this is just a presupposition based on the data I gathered. It requires testing that aspect.

As I did too much edits, I didn't rip the code out like I did for Relationships(zzzzz') . But fell free to use It at your own build. That also fix the problem regarding not being able to Edit your group after buying it, where I did need to reload your emulator to take acess to this function.

Download AKllX's Swift Emulator Revision 2:


To be fixed yet:


Serialize placing bots/pets at the room(client-side speaking they are the same);
Handle owner rights at public furni for :pickall and room deleting. As It is now, all furni placed in a room by some user that doesn't own the room can be picked up by the room owner;
Handle some of these weird bugs that randomly(not really) happen. I'm interested in any bugs you may find. Just post it here.
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
@kiosud Whoever did the first edit of Swift Emulator didn't update that specific structure. Will take a look at it now
 
Last edited:
Status
Not open for further replies.
Back
Top