Offical BCStorm Help Thread

How can i add a badge to a furni in the catalogue.
i mean if you buy the furni you will get a badge too.
i have seen this in many different hotel like Habbo.st or so
 
Upvote 0
How can i add a badge to a furni in the catalogue.
i mean if you buy the furni you will get a badge too.
i have seen this in many different hotel like Habbo.st or so
 
Upvote 0
you need to add the packets.

credits: niels

Feature 1# (Buy a badge with a furni in the catalogue)

Find
Code:
if (Item.IsLimited)
{
Session.GetMessageHandler().GetResponse().AppendInt32(Item.LimitedStack);
Session.GetMessageHandler().GetResponse().AppendInt32(Item.LimitedStack - Item.LimitedSelled);
}

Session.GetMessageHandler().GetResponse().AppendInt32(0);
Session.GetMessageHandler().GetResponse().AppendBoolean(false);
Session.GetMessageHandler().SendResponse();
In HabboHotel/Catalogs/Catalog.cs

And add this:
Code:
if (Item.Badge != "")
{
Session.GetHabbo().GetBadgeComponent().GiveBadge(Item.Badge, true);
}
Go to CatalogItem.cs and find
Code:
internal readonly int LimitedStack;
After add:
Code:
internal readonly string Badge;
Now find:
Code:
this.HaveOffer = ((string)Row["offer_active"] == "1");
After add:
Code:
this.Badge = (string)Row["badge"];
Now find:
Code:
Message.AppendUInt(Id);
Message.AppendStringWithBreak(Name);
Message.AppendInt32(CreditsCost);
Message.AppendInt32(PixelsCost);
Message.AppendInt32(0);
Message.AppendBoolean(true);
After this add:
Code:
if (Badge == "")
{
Message.AppendInt32(Items.Count);
}
else
{
Message.AppendInt32(Items.Count + 1);
}

if (Badge != "")
{
Message.AppendStringWithBreak("b");
Message.AppendStringWithBreak(Badge);
}
And as last go to your database (catalog_items) and add a column with the name badge and type varchar length 255 and done.
 
Last edited:
Upvote 0
asl - Offical BCStorm Help Thread - RaGEZONE Forums
 
Upvote 0
Group badge doesn't show in client. Using revcms and habbo_im... folder is in root and htaccess code is added but still not working variables is right to i think

group.badge.url=http://127.0.0.1/habbo-imaging/badge/%imagerdata%.gif

Someone that have a fix for this and like to share :)?
 
Upvote 0
Here's a security patch for Groups. It adds parameters to group name and group description.

You can just search "UPDATE groups SET name" and replace the whole using block with the following:

Code:
                    using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        adapter.setQuery(string.Concat(new object[] { "UPDATE groups SET Name = @groupname, Description = @groupdesc WHERE Id = '", guild.Id, "'" }));
                        adapter.addParameter("groupname", guild.Name);
                        adapter.addParameter("groupdesc", guild.Description);
                        adapter.runQuery();
                    }

I will post other security fixes later as I find them. These are more important than bugs I highly recommend you take these seriously.
 
Upvote 0
Here's a security patch for Groups. It adds parameters to group name and group description.

You can just search "UPDATE groups SET name" and replace the whole using block with the following:

Code:
                    using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        adapter.setQuery(string.Concat(new object[] { "UPDATE groups SET Name = @groupname, Description = @groupdesc WHERE Id = '", guild.Id, "'" }));
                        adapter.addParameter("groupname", guild.Name);
                        adapter.addParameter("groupdesc", guild.Description);
                        adapter.runQuery();
                    }

I will post other security fixes later as I find them. These are more important than bugs I highly recommend you take these seriously.
Moogly can u fix the bug that you cannot place wall items. and you cant push,pul ;/
 
Upvote 0
Moogly can u fix the bug that you cannot place wall items. and you cant push,pul ;/
People already released fixes to them please look in the release thread.

Here's a security patch for Groups. It adds parameters to group name and group description.

You can just search "UPDATE groups SET name" and replace the whole using block with the following:

Code:
                    using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        adapter.setQuery(string.Concat(new object[] { "UPDATE groups SET Name = @groupname, Description = @groupdesc WHERE Id = '", guild.Id, "'" }));
                        adapter.addParameter("groupname", guild.Name);
                        adapter.addParameter("groupdesc", guild.Description);
                        adapter.runQuery();
                    }

I will post other security fixes later as I find them. These are more important than bugs I highly recommend you take these seriously.

Fnx MOOGLY!!!!!! Gonna test now!
 
Last edited:
Upvote 0
Back