How to get all of Habbo's latest badges! (SQL)

Bop

Member
May 28, 2020
56
49
NOTICE: This script isn't mine! I found it somewhere and decided to share it. Idk who wrote this script but all credits to him!

Okay so... you ripped all of Habbo's latest badges and don't know why they're not working on your hotel?
That's because they're not updated in your badge_definitions table within your database!

You don't want to add them individually so why not just use this script?
Place it in a location where you can navigate to and go to or wherever you place it.

Make sure it's also linked correctly to your badges folder and make sure to change the database name to your database! DO NOT change "DATABASENAME" (Check the link below)

This will generate a badge_definitions.sql file for you to run in your database and replace your old badge_definitions file.

DOWNLOAD SCRIPT HERE
 

Joe

Well-Known Member
Jun 10, 2012
4,090
1,918
Pretty nice, I saw the same thing coded a while back now, @Meap coded something similar.

 

TesoMayn

Boredom, it vexes me.
Oct 30, 2011
1,482
1,482
Why do you people use Mega for a six-line script, instead of just embedding it into your post?
Why echo it, instead of just executing the SQL from the PHP file?

And this can also be achieved in one line lol
PHP:
array_map(function($badge) { echo nl2br("INSERT INTO badge_definitions (`code`, `required_rights`) VALUES ('$badge', '');\n"); }, glob('c_images/album1584/*.{gif,GIF}', GLOB_BRACE));

Edit::
This title is also misleading, this is how to get SQL for your badges, not how to get all of Habbo's latest badges...

The current title would make one presume this is a script that automatically grabs badges from Habbo, which it is not.
 

Joe

Well-Known Member
Jun 10, 2012
4,090
1,918
Why do you people use Mega for a six-line script, instead of just embedding it into your post?
Why echo it, instead of just executing the SQL from the PHP file?

And this can also be achieved in one line lol
PHP:
array_map(function($badge) { echo nl2br("INSERT INTO badge_definitions (`code`, `required_rights`) VALUES ('$badge', '');\n"); }, glob('c_images/album1584/*.{gif,GIF}', GLOB_BRACE));

Edit::
This title is also misleading, this is how to get SQL for your badges, not how to get all of Habbo's latest badges...

The current title would make one presume this is a script that automatically grabs badges from Habbo, which it is not.
Can grab badges from habboassets.com very good points though!
 

TesoMayn

Boredom, it vexes me.
Oct 30, 2011
1,482
1,482
Can grab badges from habboassets.com very good points though!
I used to have a script that ran daily and grabbed any new badges, saved them in the badges folder, and automatically ran the SQL
If I find it, I'll post it lol

But with the script he posted, you really can't get from habboassets, because it just uses glob() and cycles the files on the local server
 

Bran

mediocre graphics artist
Mar 13, 2017
1,726
1,530
Can grab badges from habboassets.com very good points though!
can grab badges from a bunch of websites ahaha

 

Joe

Well-Known Member
Jun 10, 2012
4,090
1,918
can grab badges from a bunch of websites ahaha

Not really my point - I only suggested habboassets ‘cause it’s Sledmores and there’s a download all button
 

Bop

Member
May 28, 2020
56
49
Why do you people use Mega for a six-line script, instead of just embedding it into your post?
Why echo it, instead of just executing the SQL from the PHP file?

And this can also be achieved in one line lol
PHP:
array_map(function($badge) { echo nl2br("INSERT INTO badge_definitions (`code`, `required_rights`) VALUES ('$badge', '');\n"); }, glob('c_images/album1584/*.{gif,GIF}', GLOB_BRACE));

Edit::
This title is also misleading, this is how to get SQL for your badges, not how to get all of Habbo's latest badges...

The current title would make one presume this is a script that automatically grabs badges from Habbo, which it is not.
Would you like be to provide all of Habbo’s latest badges that you can download from other a bunch archives out there? It’s common sense buddy where one would think to their self, “Why is it not generating any SQL for the badges I don’t have?”. Also, like I said at the notice on the top that this script isn’t mines and believe it is useful for a lot of users in the community so I shared it. Thanks for yours your one line script anyways.
 

Users who are viewing this thread

Top