[PlusEMU] Badge error

Ezklade

Member
Apr 18, 2014
96
4
Hi,
I am running a testserver where i use Habboon Plus Emulator, and have a problem. I cant see my badges, and my friend sees his, but cant wear them.. anyone knows anything? And, my badge_definiations is empty, because i think i only need to add the badges i add myself?

Any help?
 

Rain

c
Mar 13, 2015
563
251
I was coming on to see if this bug has been fixed or solved, and after reading this I made a script to add ur badges automatically.
I can't understand what you put in required_right. That's where i'm stuck.
Bits of this are from boost CMS.
PHP:
$config['dbhost'] = "127.0.0.1";
$config['dbuser'] = "root";
$config['dbpass'] = "Brah";
$config['dbname'] = "habwire";
$db = mysqli_connect($config['dbhost'],$config['dbuser'],$config['dbpass'],$config['dbname']);

$root = $_SERVER['DOCUMENT_ROOT'];

    $promo = '/gamedata/c_images/album1584/';
    $img_extentions = Array('gif', 'lols');
    foreach (glob($root.$promo.'*') as $filename)
    {
        if (in_array(pathinfo($filename, PATHINFO_EXTENSION), $img_extentions))
        {
            $filename = basename($filename);
            $filename = explode('.', $filename)[0];
            if($filename == 'ADM'){
                $right = 2;
            }else{
                $right = 1;
            }
            mysqli_query($db, "INSERT INTO badge_definitions (code, required_right) VALUES ('".$filename."', '".$right."')");
        }
    }
 
Last edited:

Ezklade

Member
Apr 18, 2014
96
4
I was coming on to see if this bug has been fixed or solved, and after reading this I made a script to add ur badges automatically.
I can't understand what you put in required_right. That's where i'm stuck.
Bits of this are from boost CMS.
PHP:
$config['dbhost'] = "127.0.0.1";
$config['dbuser'] = "root";
$config['dbpass'] = "Brah";
$config['dbname'] = "habwire";
$db = mysqli_connect($config['dbhost'],$config['dbuser'],$config['dbpass'],$config['dbname']);

$root = $_SERVER['DOCUMENT_ROOT'];

    $promo = '/gamedata/c_images/album1584/';
    $img_extentions = Array('gif', 'lols');
    foreach (glob($root.$promo.'*') as $filename)
    {
        if (in_array(pathinfo($filename, PATHINFO_EXTENSION), $img_extentions))
        {
            $filename = basename($filename);
            $filename = explode('.', $filename)[0];
            if($filename == 'ADM'){
                $right = 2;
            }else{
                $right = 1;
            }
            mysqli_query($db, "INSERT INTO badge_definitions (code, required_right) VALUES ('".$filename."', '".$right."')");
        }
    }
You need to add the badges to badge_definitions, otherwise you wont be able to see/use it.
I dont understand, do i need to put ALL the badges in the table? (and, i want to edit the staffbadge over my head, but cant find the badge id)
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
@Sledmore @Brad - Can you explain the badge_definitions table or how to get the badges working so users can put them on etc...
ok, here goes.
`badge_definitions` is the table which sets the required right for each badge & its badge_code.
you can use this that will work, once uploaded restart your emulator.
the table `client_external_badge_texts` is where you add badges to and set it's name, code & description. once adding don't forget to do :update badge_definitions (you will have to add the same badge to the `badge_definitions` table) .

basically.
`badge_definitions` = Set the Required Rank for a certain badge.
`client_external_badge_texts` = Add/edit a badge to the client.

You MUST use the external_flash_overrides_texts = "external.override.texts.txt" : "{url}/swfs/gamedata/override/external_flash_override_texts/" in order for this to work.
 

Modo

blame it on my asd
May 27, 2013
137
42
ok, here goes.
`badge_definitions` is the table which sets the required right for each badge & its badge_code.
you can use this that will work, once uploaded restart your emulator.
the table `client_external_badge_texts` is where you add badges to and set it's name, code & description. once adding don't forget to do :update badge_definitions (you will have to add the same badge to the `badge_definitions` table) .

basically.
`badge_definitions` = Set the Required Rank for a certain badge.
`client_external_badge_texts` = Add/edit a badge to the client.

You MUST use the external_flash_overrides_texts = "external.override.texts.txt" : "{url}/swfs/gamedata/override/external_flash_override_texts/" in order for this to work.
Thank you, perfect explanation. One more thing, I have changed the credit timer and things in server_settings and restarted the EMU but it still gives 300 credits out every 15 mins. Is there a way to change this? I have looked in other tables but not found anything.
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
Thank you, perfect explanation. One more thing, I have changed the credit timer and things in server_settings and restarted the EMU but it still gives 300 credits out every 15 mins. Is there a way to change this? I have looked in other tables but not found anything.
change it in the `subscriptions` table.
 

Johan03

New Member
Dec 21, 2015
11
0
@Brad Umm The badges wont show up and i did everything and the badges are still not showing up. Plus The badge.image.path thingy i set the link up correctly plus i putted a slash in the end


 

Modo

blame it on my asd
May 27, 2013
137
42
Check the badge link in /app/management/config.php
I can't tell exactly but looks like the 3rd link is in your external variables file. Try checking the config.php and see if that makes a difference.
 

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
Basically, if there is nothing in badge definitons, then there is some time wasting going here.

You would need to set every single badges in there aswell as achievement badges.

Go to and download it, it does include both the emu and database but you will only need the file which you will not upload to your database.

Edit the database.sql file or whatever it is named, and then find the badge_definitions sql code and it will more or likely come with the data.

If you add a badge into album1584, it wont let you give you the badge, simply rhen go to badge_definitions, add then code and the required rank, you can just leave required rank blank.
 
Last edited:

Users who are viewing this thread

Top