[Plusr2] How to create room bundles (for newbs)

Rystbo

-Hotel Owner, -Customs Developer, -Arcturus
Apr 16, 2018
390
200
Hello, this is a very in-depth tutorial on how to create room bundles for plusr2. More specifically im using build PRODUCTION-201812272209-984739530 , now im not sure if this matters but im almost positive you need this build or newer not sure when Plusr2 implemented the bundles. Also i would like to note, these bundles i use are copys of habbos, you can use what ever furni and images you want, customize your bundles as you please. So with that being said lets dive into this

STEP 1:
- You first need to decide on the room bundle you want, google habbo room bundles. I decided to go with the Desert Oasis Bundle for this tutorial. More info on it can be found at the link below

Link -->

***Now i want to mention, you want to find a bundle page similar to the one i posted above, this is because it displays the exact furni in the bundle we need that. We also need the images and texts with it, i will get to that later. Habbquest also has threads that show the exact furni in each room bundle and list the furni, this is excellent for creating room bundles*****

STEP 2:
-Now before you move on be sure you have all the furni needed in your hotel, if your missing a furni item you wont have it for the bundle. Bundles can contain what ever furni you want but im making a habbo bundle copy.

NOW- if you have all the correct furni go ahead and create the room. Here is a the room i created. I also named the room after the room bundle to keep things simple and easy for when i get to mysql.

Preview ---->

STEP 3:
-Now that we have our room we need to get some images together, remember the link from before?

Link ---->

We need the circular image for our catalog cause remember we want a replica from habbo. This image has to be a .gif not png its best to take this image and edit it in gimp and save as gif. Below is the gif. and me with it in gimp.

Preview ---->

GIF--->

STEP 4:

Now once you have the image, you want to save it into your swf\c_images\catalogue folder.

STEP 5:

Next we have to add the bundle to the catalog. From here its quite simple. But first we need to get some information. We need the room id for the room bundle you created
simply go into your rooms table in navicat, find the room and the room id and take note of this id.

Step 6:

Now we have to get the sql together for the room bundle. You should have a table in navicat named catalog_deals when you open it, there might or might not be anything here. But if you dont have a bundle already,
it should be empty. Now let me explain each field and what it does.

- Id: this can be what ever number you want just remember it because we need it for the furnisql
-Items: this is going to match the furnisql id
-Name: the room bundle name
-room id: the id to the room bundle you created

Here is an example, this is the room i created from the image before ;
INSERT INTO `hotel`.`catalog_deals`(`id`, `items`, `name`, `room_id`) VALUES (11, '1100001799', 'Desert Oasis Bundle', 788);

*** Now its important to note an id number down so we can use it for the furni sql in the next step.*****
Your welcome to use this sql and adjust it as needed to your room id, bundle name and the id for the next step, the furni sql


Step 7: Now we want to create the furniture sql, im not going to explain each field because there is alot there but i will discuss the necessary room bundle ones.


INSERT INTO `hotel`.`furniture`(`id`, `item_name`, `public_name`, `type`, `width`, `length`, `stack_height`, `can_stack`, `can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, `behaviour_data`, `interaction_modes_count`, `vending_ids`, `height_adjustable`, `effect_id`, `wired_id`, `is_rare`, `clothing_id`, `extra_rot`) VALUES (1100001799, 'Desert Oasis Bundle', 'Desert Oasis Bundle', 's', 1, 1, 0, '1', '0', '0', 1100001799, '1', '1', '1', '1', '1', 'roomdeal', 11, 1, '0', '0', 0, 0, '0', 0, '0');

The important ones are the id, this must match the id from the sql i showed you in step 6, the items id. I also try to keep the names to match that of the bundle. For interaction type we select roomdeal, and then behavior data has to match the id of the catalog_deals from step 6. If you notice mine says 11 it matches the id from step 6. What this does is tell the database that this piece of furni isn't actually an item but a room with furni inside. Not only that it tells the database that this furni item is room id 788 for our example. And the 11 links that to catalog_deal id 11 which contains the room info.

Your welcome to use the sql above and adjust it to the room bundle your creating.

Step 8:

Now we need the cat_item sql this is pretty basic, what this does is just create the item in the catalog with a price. I try to keep my ids similar for simplicity and future if i need to find it

INSERT INTO `hotel`.`catalog_items`(`id`, `page_id`, `item_id`, `catalog_name`, `cost_credits`, `cost_pixels`, `cost_diamonds`, `amount`, `limited_sells`, `limited_stack`, `offer_active`, `extradata`, `badge`, `offer_id`) VALUES (1100001799, 10117, '1100001799', 'Desert Oasis Bundle', 100000, 0, 0, 1, 0, 0, '1', '', '', -1);

The first id can be what ever you like, but i try to keep mine similar, the second number is the cat_page id, the 3d id has to be the same as the id for the furniture sql we use in step 7, as you see mine match, then the bundle name price and so on. Your welcome to adjust this sql to your room bundle at this time.

-Step 9:

Now at this point you just need the catalog page, this has to be created a certain way to display our room bundle so let me show you the sql and break it down

INSERT INTO `hotel`.`catalog_pages`(`id`, `parent_id`, `caption`, `icon_image`, `visible`, `enabled`, `min_rank`, `min_vip`, `order_num`, `page_link`, `page_layout`, `page_strings_1`, `page_strings_2`) VALUES (10117, 10069, 'Desert Oasis Bundle', 10026, '1', '1', 1, 0, 210, 'Oasis', 'single_bundle', '|spromo_Desert_Oasis_Bundle|spromo_Desert_Oasis_Bundle|', 'Feeling thirsty? Well, as well as water, included in this bundle is an exclusive Emperor Scorpion! ||<font size=\'20px\' color=\'#8b0000\'> What\'s Included?</font>|Buy direct, and save|');

Here we have a few things i want to note, i match the page id with the page id from catalog_items in step 8 but most importantly under where it says page_layout in the field on navicat you want this to say single_bundle and now the most important part under page string one, this is the name of the gif we created early for our catalog folder. As you can see below i have mine. Be sure to adjust it to your image name and place it under page string one

|spromo_Desert_Oasis_Bundle|spromo_Desert_Oasis_Bundle|

Now the next part is this for page string 2

'Feeling thirsty? Well, as well as water, included in this bundle is an exclusive Emperor Scorpion! ||<font size=\'20px\' color=\'#8b0000\'> What\'s Included?</font>|Buy direct, and save|'

The first bit of text i coppied directly from the link back in step 1 where i first found the bundle. As i want it to be a replica. Once you adjust this text, you can save it into page string 2


-Step 10

Now that we have the room bundle made and our sqls done, we need to run a few commands in the hotel
first do :update items and then :update catalog

You should have a room bundle in your catalog like this




At this point you have created the tutorial. Feel free to drop a like. This is a very good tutorial if you cant figure it out please do not message me for help, be sure to go back through and read it over. This is very very simple to do. I dont have time to assist every one. Sorry, the only way for newbs to get better is for them to learn things for them selfs other wise if we all do for them they will never learn. This is all you need to create bundles and i told you what production it works with and so on. If it doesnt work for your hotel then that more than likely means your hotel doesn't have bundles coded into it.

Enjoy!
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
Just tested this, although it's not written the best and can get a little confusing, it works :)
Post automatically merged:

Only problem I had testing this is when I made a room with holodice, they don't show on the bundle page however everything else does.

Not sure if Habbo blocked dices or something, weird.
 

Rystbo

-Hotel Owner, -Customs Developer, -Arcturus
Apr 16, 2018
390
200
Just tested this, although it's not written the best and can get a little confusing, it works :)
Post automatically merged:

Only problem I had testing this is when I made a room with holodice, they don't show on the bundle page however everything else does.

Not sure if Habbo blocked dices or something, weird.

Thanks for putting it to the test, and yea im not sure about the dice i haven't had to use them yet :D lol, And im not to good at making tutorials i suppose i could spruce this up a bit
 
Dec 17, 2017
151
19
You must be registered for see images attach


I have this error.. why?

N.B Thanks for release :)
Post automatically merged:

This is my catalog_deals
You must be registered for see images attach
 

Hypothesis

Programmer
Jan 6, 2019
524
361
You must be registered for see images attach


I have this error.. why?

N.B Thanks for release :)
Post automatically merged:

This is my catalog_deals
You must be registered for see images attach
Your column called 'items' is obstructed, the number range is higher than the index. Check MySQL errors for any table/column issues.
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
You must be registered for see images attach

This is catalog_items
After looking into this I noticed the catalog_deals he had were causing this error. I'm not sure if the tutorial was followed properly or whether it's only supported for Plus as he was using Moon emulator or something.

The emulator is now working however I would attempt the tutorial again, if you're getting the same error compare your catalog_deals with the one in the original Plus in the emulator .cs files.
 

Rystbo

-Hotel Owner, -Customs Developer, -Arcturus
Apr 16, 2018
390
200
You must be registered for see images attach


I have this error.. why?

N.B Thanks for release :)
Post automatically merged:

This is my catalog_deals
You must be registered for see images attach


This is a shit tutoria
After looking into this I noticed the catalog_deals he had were causing this error. I'm not sure if the tutorial was followed properly or whether it's only supported for Plus as he was using Moon emulator or something.

The emulator is now working however I would attempt the tutorial again, if you're getting the same error compare your catalog_deals with the one in the original Plus in the emulator .cs files.


Do me a favor, post the sql structures your executing here so i can compare them and further assit you
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Alright, so I have been fucking with these room bundles all day. When I click on the damn page, I disconnect and I can't figure out why. Did you have this issue at first? Updated my revision to the one you suggested in the tutorial.
 

Hypothesis

Programmer
Jan 6, 2019
524
361
Alright, so I have been fucking with these room bundles all day. When I click on the damn page, I disconnect and I can't figure out why. Did you have this issue at first? Updated my revision to the one you suggested in the tutorial.
That emulator doesn't support Room Bundles, if you're still using the one that I sold Drey, it doesn't support room bundles, I've already tried coding them, either I didn't code them right or it doesn't support them. It's too outdated in revisions.
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
That emulator doesn't support Room Bundles, if you're still using the one that I sold Drey, it doesn't support room bundles, I've already tried coding them, either I didn't code them right or it doesn't support them. It's too outdated in revisions.
I'm not using anything you sold him. I'm using the plus emulator straight from sledmores GitHub and I updated the revisions as I said above. Room bundles are coded into the catalogpagecomposer and the interaction type for room bundles exist.
 

Hypothesis

Programmer
Jan 6, 2019
524
361
I'm not using anything you sold him. I'm using the plus emulator straight from sledmores GitHub and I updated the revisions as I said above. Room bundles are coded into the catalogpagecomposer and the interaction type for room bundles exist.
Well if it's disconnecting you and room bundles are coded and work, then it's something you aren't adding correctly with the values.
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Well if it's disconnecting you and room bundles are coded and work, then it's something you aren't adding correctly with the values.
My friend, I am not an idiot. My values are correct, and I actually ran these queries after I did it manually the first time to try to get these to work. If I put in wrong values, I get exceptions on the emulator so I know thats working.

I don't know why it would disconnect me? It disconnected me before and after updating revision from 2017-01 to 2018-12
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
can confirm @JayCustom is not stupid, he's added multiple things for me in the past, probably one of the best dev's on here
I stepped through on debug mode, and its getting the items correctly. If I put nothing on the page, the page loads in the catalog. The items are being created with the correct Item ID and amount. Here is my catalog composer:
Code:
if (!Page.Template.Equals("frontpage") && !Page.Template.Equals("club_buy"))
            {
                base.WriteInteger(Page.Items.Count);
                foreach (CatalogItem Item in Page.Items.Values)
                {
                    base.WriteInteger(Item.Id);
                    base.WriteString(Item.Name);
                    base.WriteBoolean(false);//IsRentable
                    base.WriteInteger(Item.CostCredits);

                    
if (Item.CostDiamonds > 0)
                    {
                        WriteInteger(Item.CostDiamonds);
                        WriteInteger(5); // Diamonds
                    }

                    if (Item.CostPixels > 0)
                    {
                        WriteInteger(Item.CostPixels);
                        WriteInteger(0); // Duckets
                    }

                    if (Item.CostPoints > 0)
                    {
                        WriteInteger(Item.CostPoints);
                        WriteInteger(103); // GOTW Points
                    }

                    base.WriteBoolean(ItemUtility.CanGiftItem(Item));

                    if (Item.Data.InteractionType == InteractionType.DEAL || Item.Data.InteractionType == InteractionType.ROOMDEAL)
                    {
                        CatalogDeal deal = null;
                        if (!PlusEnvironment.GetGame().GetCatalog().TryGetDeal(Item.Data.BehaviourData, out deal))
                        {
                            WriteInteger(0);//Count
                        }
                        else
                        {
                            WriteInteger(deal.ItemDataList.Count);

                            foreach (CatalogItem dealItem in deal.ItemDataList.ToList())
                            {
                                WriteString(dealItem.Data.Type.ToString());
                                WriteInteger(dealItem.Data.SpriteId);
                                WriteString("");
                                WriteInteger(dealItem.Amount);
                                WriteBoolean(false);
                            }
                        }
                    }
                    else
                    {
                        base.WriteInteger(string.IsNullOrEmpty(Item.Badge) ? 1 : 2);//Count 1 item if there is no badge, otherwise count as 2.
                        {
                            if (!string.IsNullOrEmpty(Item.Badge))
                            {
                                base.WriteString("b");
                                base.WriteString(Item.Badge);
                            }

                            base.WriteString(Item.Data.Type.ToString());
                            if (Item.Data.Type.ToString().ToLower() == "b")
                            {
                                //This is just a badge, append the name.
                                base.WriteString(Item.Data.ItemName);
                            }
                            else
                            {
                                base.WriteInteger(Item.Data.SpriteId);
                                if (Item.Data.InteractionType == InteractionType.WALLPAPER || Item.Data.InteractionType == InteractionType.FLOOR || Item.Data.InteractionType == InteractionType.LANDSCAPE)
                                {
                                    base.WriteString(Item.Name.Split('_')[2]);
                                }
                                else if (Item.Data.InteractionType == InteractionType.BOT)//Bots
                                {
                                    CatalogBot CatalogBot = null;
                                    if (!PlusEnvironment.GetGame().GetCatalog().TryGetBot(Item.ItemId, out CatalogBot))
                                        base.WriteString("hd-180-7.ea-1406-62.ch-210-1321.hr-831-49.ca-1813-62.sh-295-1321.lg-285-92");
                                    else
                                        base.WriteString(CatalogBot.Figure);
                                }
                                else if (Item.ExtraData != null)
                                {
                                    base.WriteString(Item.ExtraData != null ? Item.ExtraData : string.Empty);
                                }
                                base.WriteInteger(Item.Amount);
                                base.WriteBoolean(Item.IsLimited); // IsLimited
                                if (Item.IsLimited)
                                {
                                    base.WriteInteger(Item.LimitedEditionStack);
                                    base.WriteInteger(Item.LimitedEditionStack - Item.LimitedEditionSells);
                                }
                            }
                            base.WriteInteger(0); //club_level
                            base.WriteBoolean(ItemUtility.CanSelectAmount(Item));
                            base.WriteBoolean(true);
                            base.WriteString("");
                        }
                    }
                }
            }

My guess is I am not writing out to the packet correctly.
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
Probably a packet issue as I set this up on Sledmore’s R2 with the old SWF (173) and it worked fine.
 

Users who are viewing this thread

Top