[Release / Fix] Working and flawless catalog search on older PRODUCTION revisions

Jerry

not rly active lol
Jul 8, 2013
1,956
522
Hi,

Today, I will be releasing a fix on search functionality for catalogs.

I know for a fact that the majority of you retro owners haven't noticed this issue because all you care about is updating the catalog with new furniture additions and new furnilines from Habbo instead of completely fixing the catalog to be more efficient (searching for furniture, etc). I haven't noticed this too because I thought it was normal until my developer pointed this out like a week ago.

I have noticed that most hotels (e.g., and ) have a catalog with broken search because they're on a SWF revision with broken search. I'm not sure how long the search functionality for the catalog has been broken for, but it seemed to be broken when Habbo rolled out the new catalog UI with the tabs and was recently fixed in PRODUCTION-201707041014-428081343 (or earlier.. not bothered checking).

You can either upgrade your revision to the latest build or apply my fix. Up to you!

Here's a GIF demonstrating a catalog with broken search:
bDgVGyN.gif


See that? Instead of getting the red furniture, it's showing me wired, all brick block colors and different color rares? I can't also search for individual furniture like the "Porch" from the Halloween 2010 furniline.

To fix this, you'll need to use JPEXS Free Flash Decomplier. You can download it by going to if you do not have the program. You may use other decompliers to apply the fix (if they work).

Let's go ahead with ActionScripts once you've opened your Habbo.swf with JPEXS. In the script HabboCatalog, search for:
this.localization.registerParameter("catalog.search.results", "count", k.length.toString());
this.localization.registerParameter("catalog.search.results", "needle", _arg1);

And finding that code should show you a private function like this (yes, function name is obfuscated):
Code:
private function _-3sq(_arg1:String):void
        {
            var k:_-61k;
            var k:String;
            var _local7:Vector.<_-0Qi>;
            var _local8:Vector.<_-0Qi>;
            if (this._-1zq){
                this._-1zq.stop();
            };
            if ((((((this._-g0 == null)) || ((_arg1 == null)))) || ((_arg1.length == 0)))){
                return;
            };
            var k:Array = [];
            var k:Vector.<_-61k> = new <_-61k>[];
            var k:String = _arg1.toLowerCase().replace(" ", "");
            for each (k in this._-g0) {
                if ((((this._-6fK == _-6eh.BUILDER)) && (!(k._-4wY)))){
                } else {
                    if ((((this._-6fK == _-6eh.NORMAL)) && (k._-3vw))){
                    } else {
                        k = [k._-1cw, k.description, k._-2u5].join(" ");
                        k = k.replace(/ /gi, "");
                        if ((((((this._-6fK == _-6eh.BUILDER)) && ((k._-3Bt == _-4kY)))) && ((k._-6fb == _-4kY)))){
                            if (((!((k._-b4 == ""))) && ((k.indexOf(k._-b4) < 0)))){
                                if (k.indexOf(k) >= 0){
                                    k.push(k._-b4);
                                };
                            };
                        } else {
                            _local7 = this._-2PA._-2GU(k._-3Bt, true);
                            _local8 = this._-2PA._-2GU(k._-6fb, true);
                            if (((!((_local7 == null))) || ((((this._-6fK == _-6eh.NORMAL)) && (!((_local8 == null))))))){
                                if (k.indexOf(k) >= 0){
                                    k.push(k);
                                    if (k.length >= _-5AR){
                                        break;
                                    };
                                };
                            };
                        };
                    };
                };
            };
            this.localization.registerParameter("catalog.search.results", "count", k.length.toString());
            this.localization.registerParameter("catalog.search.results", "needle", _arg1);
            this._-49L.findChildByName(PageLocalization._-sW).caption = "${catalog.search.header}";
            this._-2PA._-6ka();
            this._-54A._-64x(k);
            this._-2PA.filter(k, k);
        }

In the function I pasted above, search for:
var k:String = _arg1.toLowerCase().replace(" ", "");

Replace it with:
var k:String = _arg1.toLocaleLowerCase().replace(" ", "");

Then search for:
if (k.indexOf(k) >= 0)
There are two of them.

Replace with:
if (k.toLocaleLowerCase().indexOf(k) >= 0)

And that's it. Save changes when done.

Here's a functional catalog search when you've applied the fixes to the Habbo.swf:
50qsoXg.gif
 
Last edited:

Darkle

Member
Jul 13, 2017
52
15
Could you help me with my directories by chance? doesn't seem to exist the way you've described it.
 

Users who are viewing this thread

Top