Habbo Badges Generator [PHP 7.0]

Results 1 to 12 of 12
  1. #1
    Apprentice Xdr Master is offline
    MemberRank
    Feb 2013 Join Date
    14Posts

    Habbo Badges Generator [PHP 7.0]

    Habbo Badges Generator for PHP 7.0 or higher.

    Almost all hotels have a badge generator, created by me(you can see the credits) for get the group badges work. (AzureCMS has a custom based generator)

    In a few days, PHP Group will release his new version 7.0, it's fine but there is 1 compatibily issue and that is the new version doesn't parse hex code from string to decimal, and you will get black images.

    It can be easily fixed adding hex2bin, but I prefered to improve the code a little, and now it's about 30% more faster.

    This version only works for PHP 7.0

    DOWNLOADS

    https://github.com/XdrAzure/hbg

    REQUIREMENTS

    - PHP 7.0 or higher.

    TUTORIAL

    If you have already a Generator, just only remplaze badge.php in habbo-imaging.
    If not, put all habbo-imaging content.

    MY OTHER PROGRAMS

    Azure Habbo Scout V4: https://forum.ragezone.com/f353/azure-habbo-scout-r4-developers-1062156/
    Azure Habbo Files Extractor: https://forum.ragezone.com/f353/azure-habbo-files-extractor-r4-1061609/
    Azure Habbo Packets Updater: https://forum.ragezone.com/f353/ahpu-azure-habbo-packets-updater-1081884/

    CREDITS

    Me (Xdr)
    Original creators
    Jaym/Kreechin (HoloCMS)


    If I helped you a lot, you can donate me in PP: xdr@outlook.es
    You have a good day :)


  2. #2
    The **** Keiz is offline
    MemberRank
    Nov 2015 Join Date
    238Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Useful! Thanks.

  3. #3
    Furnibuilder creator MovieGuy is offline
    MemberRank
    Jul 2012 Join Date
    NLLocation
    245Posts

    Re: Habbo Badges Generator [PHP 7.0]

    "This version only works for PHP 7.0"

    How is this usefull? PHP 7.0 shouldn't even be used in production mode and isn't finished yet, there's no stable release

  4. #4
    Apprentice Xdr Master is offline
    MemberRank
    Feb 2013 Join Date
    14Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Quote Originally Posted by MovieGuy View Post
    "This version only works for PHP 7.0"

    How is this usefull? PHP 7.0 shouldn't even be used in production mode and isn't finished yet, there's no stable release
    I know.

    In a few days, PHP Group will release his new version 7.0
    Let's say... this is anticipation for day-1 release, imagine that day I can't post, and one hotel updates to PHP 7, so he doesn't needs to wait :)

  5. #5
    Account Upgraded | Title Enabled! Jamal7 is offline
    MemberRank
    Dec 2013 Join Date
    547Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Thanks for sharing

  6. #6
    Furnibuilder creator MovieGuy is offline
    MemberRank
    Jul 2012 Join Date
    NLLocation
    245Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Quote Originally Posted by Xdr Master View Post
    I know.



    Let's say... this is anticipation for day-1 release, imagine that day I can't post, and one hotel updates to PHP 7, so he doesn't needs to wait :)
    I wouldn't recommend any website or hotel to update to php 7 as soon as it's released, I myself will also wait a few months, maybe longer untill I'm sure most bugs or exploits are gone

  7. #7
    Proficient Member Boraida is offline
    MemberRank
    May 2011 Join Date
    The NetherlandsLocation
    161Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Why are you using the 'goto' statement if the only thing you had to do is just removing the exclamation mark in the 'if' statement? AND tell me why you are mixing alternative syntax with traditional syntax!? ( talking about the if, else, while, for(each) statements )

  8. #8
    Apprentice Xdr Master is offline
    MemberRank
    Feb 2013 Join Date
    14Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Quote Originally Posted by Boraida View Post
    Why are you using the 'goto' statement if the only thing you had to do is just removing the exclamation mark in the 'if' statement? AND tell me why you are mixing alternative syntax with traditional syntax!? ( talking about the if, else, while, for(each) statements )
    1. About 'goto': I prefer that than if(...) { if(...) { if(...) { }}}. There aren't performance issues.
    2. Where? There are only traditional syntax.

  9. #9
    Apprentice Sander Hoekstra is offline
    MemberRank
    Jul 2014 Join Date
    17Posts

    Re: Habbo Badges Generator [PHP 7.0]

    I only get blank 39x39 images -,-

  10. #10
    Right here, right now.. jordynegen11 is offline
    MemberRank
    Jul 2009 Join Date
    NetherlandsLocation
    398Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Very nice, im gonna use it.

  11. #11
    Member XxMurphyxX is offline
    MemberRank
    Jun 2012 Join Date
    71Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Hi I've been using this Generator, and it was giving me blank images, only on BASES, I read the file and I noticed this:

    Can someone explain me this line:

    $partKey = substr($partCode, 0, (strlen($partCode) == 6 || (!$isSymbol && strlen($partCode) == 5)) ? 3 : 2);

    Why ( (strlen($partCode) == 6 || (!$isSymbol && strlen($partCode) == 5)) ? 3 : 2)?

    Why 3? I solved the base problem by just using 2, why would you take 3 chars

  12. #12
    Apprentice Xdr Master is offline
    MemberRank
    Feb 2013 Join Date
    14Posts

    Re: Habbo Badges Generator [PHP 7.0]

    Quote Originally Posted by XxMurphyxX View Post
    Hi I've been using this Generator, and it was giving me blank images, only on BASES, I read the file and I noticed this:

    Can someone explain me this line:

    $partKey = substr($partCode, 0, (strlen($partCode) == 6 || (!$isSymbol && strlen($partCode) == 5)) ? 3 : 2);

    Why ( (strlen($partCode) == 6 || (!$isSymbol && strlen($partCode) == 5)) ? 3 : 2)?

    Why 3? I solved the base problem by just using 2, why would you take 3 chars
    I followed Habbo standard, when Habbo had 'Habbo group pages', the badge editor(web) only had 2 length, and then they released client inside badge editor, that have 2-3 length partKey and working together (compatibility).

    I think your problem is your emulator that you are using generating non-standard codes or you are using diferent database group codes.

    I suggest use this code:

    Code:
            public string GenerateGuildImage(ClientMessage message)        {
                var count = message.ReadIntegerPositiveOrNeutral();
                if (count < 2)
                    throw new Exception("Not valid habbo value");
    
    
                string badgeCode = "b";
    
    
                for (var i = 1; i != count + 1; i++)
                {
                    var integer = message.ReadIntegerPositiveOrNeutral();
    
    
                    if (i%3 == 0)
                    {
                        if (integer > 0 && i != 3)
                            badgeCode += integer;
                    }
                    else
                        badgeCode += $"{integer:00}";
    
    
                    if (i != count && i % 3 == 0)
                        badgeCode += "s";
                }
    
    
                return badgeCode;
            }



Advertisement