Experienced Elementalist
- Joined
- Jun 7, 2012
- Messages
- 288
- Reaction score
- 250
using System.Collections.Generic;
namespace CatalogRipper
{
public class CatalogJson
{
public CatalogPage p { get; set; } = new CatalogPage();
public Dictionary<int, CatalogPage> all { get; set; } = new Dictionary<int, CatalogPage>();
}
public class CatalogPage
{
public int Id { get; set; }
public int Icon { get; set; }
public int ParentId { get; set; }
public string Name { get; set; }
public string Caption { get; set; }
public List<CatalogPage> SubPages { get; set; } = new List<CatalogPage>();
public string Layout { get; set; }
public List<string> Images { get; set; } = new List<string>();
public List<string> Texts { get; set; } = new List<string>();
public List<CatalogItem> Items { get; set; } = new List<CatalogItem>();
public bool Loaded { get; internal set; }
}
public class CatalogItem
{
public int Id { get; set; }
public string Catalogname { get; set; }
public int sprite_id { get; set; }
public string SpecialData { get; set; }
public int CreditCost { get; set; }
public int SpecialCost { get; set; }
public int SpecialType { get; set; }
public bool AllowGift { get; set; }
public string Badge { get; set; }
public int Amount { get; set; }
public bool Limited { get; set; }
public int page_id { get; internal set; }
}
}
Containing all pages, items etc? Sounds like a great release!
string query = $"INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `cost_belcredits`, `cost_duckets`, `amount`, `badge`) VALUES ('{item.Id}', '{item.page_id}', (SELECT furniture.id from furniture where furniture.item_name = '{item.Catalogname}' ORDER BY furniture.id DESC LIMIT 1),'{item.Catalogname}','{item.CreditCost}', '{(item.SpecialType == 103 ? item.SpecialCost : 0)}', '{(item.SpecialType == 105 ? item.SpecialCost : 0)}', '{item.Amount}','{item.Badge}');";
Jup containing all pages including the name, description, layout, images, texts, all items with the spriteid, price, specialprice (diamonds or duckets), special type.
So if you have a complete furniture table you can just do this sort of queries to insert them:
or select with the sprite_idCode:string query = $"INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `cost_belcredits`, `cost_duckets`, `amount`, `badge`) VALUES ('{item.Id}', '{item.page_id}', (SELECT furniture.id from furniture where furniture.item_name = '{item.Catalogname}' ORDER BY furniture.id DESC LIMIT 1),'{item.Catalogname}','{item.CreditCost}', '{(item.SpecialType == 103 ? item.SpecialCost : 0)}', '{(item.SpecialType == 105 ? item.SpecialCost : 0)}', '{item.Amount}','{item.Badge}');";
If anyone wants the catalogue ripper source I already wrote something like this ago as a plugin for Tanji, and it does the same thing, puts all the output in JSON files.
You must be registered to see links
Weird how similar the projects are, huh? [emoji57]
If anyone wants the catalogue ripper source I already wrote something like this ago as a plugin for Tanji, and it does the same thing, puts all the output in JSON files.
You must be registered to see links
Weird how similar the projects are, huh?
True but I didn't release the tool because it can just be used to rip a whole catalogus from a retro. And this section is already full of ripped content so I was like nah I will just release the habbo catalogueI see what you mean, though I think OP’s release is more focused on the gathered data than the tool itself. Nice plugin by the way!
I just made a catalogue ripper and ripped habbo.com,habbo.nl catalogus. The output what I have is just from the packets so it doesn't include the furniture data itself but it does include the page data with the catalogue items with: spriteid, price, badge, amount
You can use this to generate your whole catalog using the sprite_id or the catalogname in the json.
To make it easier here are the C# classes that I used for the JSON:
PHP:using System.Collections.Generic; namespace CatalogRipper { public class CatalogJson { public CatalogPage p { get; set; } = new CatalogPage(); public Dictionary<int, CatalogPage> all { get; set; } = new Dictionary<int, CatalogPage>(); } public class CatalogPage { public int Id { get; set; } public int Icon { get; set; } public int ParentId { get; set; } public string Name { get; set; } public string Caption { get; set; } public List<CatalogPage> SubPages { get; set; } = new List<CatalogPage>(); public string Layout { get; set; } public List<string> Images { get; set; } = new List<string>(); public List<string> Texts { get; set; } = new List<string>(); public List<CatalogItem> Items { get; set; } = new List<CatalogItem>(); public bool Loaded { get; internal set; } } public class CatalogItem { public int Id { get; set; } public string Catalogname { get; set; } public int sprite_id { get; set; } public string SpecialData { get; set; } public int CreditCost { get; set; } public int SpecialCost { get; set; } public int SpecialType { get; set; } public bool AllowGift { get; set; } public string Badge { get; set; } public int Amount { get; set; } public bool Limited { get; set; } public int page_id { get; internal set; } } }
Habbo.nl Catalogue JSON:You must be registered to see links
Habbo.com Catalogue JSON:You must be registered to see links
I don't know if this release handy for someone but it helped me so hopfully it will help you as well
(Oh btw I'm not sure if I need to release the catalog ripper itself as well because it is pretty easy to steal a catalogus from a retro)