Purchasable Namecolors from Catalog [Plus]

Results 1 to 11 of 11
  1. #1
    Member CUS7OM is offline
    MemberRank
    Apr 2014 Join Date
    62Posts

    Purchasable Namecolors from Catalog [Plus]

    Hi, I implemented this some months ago and as everyone seems to like it I've decided to share this with everyone on the community, to fulfill the impact that namecolors and tags have on a Hotel, as everyone likes customizing all the possible content.

    First step:
    Creating all the references.

    Go to your Habbo.cs and add:

    Code:
    public string _nameColor;
    On the public Habbo void add to the brackets:
    Code:
    string NameColor

    Below the public Habbo void add:
    Code:
    this._nameColor = NameColor;
    Ok, Habbo.cs done, now let's go to Authenticator.cs and add:
    (remember you need to set it up on the same position you put the string NameColor on Habbo's void)

    Code:
    Convert.ToString(Row["namecolor"])
    Perfect, now all Habbo stuff is done, let's go for the item / catalog related stuff, on PurchaseFromCatalogEvent.cs, add this condition:
    ( Custom - Purchase from catalog namecolors for RageZone. - Pastebin.com )
    Code:
    if (baseItem.InteractionType == InteractionType.namecolor)                {                    if (Item.CostGOTWPoints > Session.GetHabbo().GOTWPoints)                        return;                    if (Item.CostGOTWPoints > 0)                    {                        Session.GetHabbo().GOTWPoints -= Item.CostGOTWPoints;                        Session.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().GOTWPoints, 0, 103));                    }                    using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor())                    {                        dbClient.RunQuery("UPDATE `users` SET `namecolor` = '" + Item.Name + "' WHERE `user_id` = '" + Session.GetHabbo().Id + "' LIMIT 1");                    }                    Session.GetHabbo()._nameColor = Item.Name;                    Session.SendMessage(new ScrSendUserInfoComposer(Session.GetHabbo()));                    Session.SendMessage(new PurchaseOKComposer(Item, Item.Data));                    Session.SendMessage(new FurniListUpdateComposer());                    return;                }
    Now just create the interaction namecolor on InteractionType.cs, add to the enum:

    Code:
    namecolor,
    Then add on the switch from below:

    Code:
    case "namecolor":                    return InteractionType.namecolor;
    Finally, on the packet where you change the username just addapt it:

    EG:
    Code:
    user.GetClient().SendMessage(new UserNameChangeComposer(mRoom.Id, VirtualId, "<font color=\"#" + GetClient().GetHabbo()._nameColor + "\">" + GetUsername() + "</font>"));
    So, as you can see I handle the HTML color from the Item.Name, so just name the color you want to add like you wish and go for it. Then, for maximum customization add a proper productdata so you don't have an ugly result.

    Do not forget to run this so you add the colum to the users table:

    Code:
    ALTER TABLE `users` ADD `namecolor` varchar(125) NOT NULL DEFAULT '000000';
    Here's an example from my hotel: Screenshot by Lightshot

    I'll update the badges I designed if you wish later on, now I'm leaving as I'm kinda busy with university. Have a nice day.

    Regards, Custom.
    Last edited by CUS7OM; 07-02-17 at 12:20 AM.


  2. #2
    Valued Member Mackors is offline
    MemberRank
    Aug 2016 Join Date
    100Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    @CUS7OM Can you post your Habbo.cs and Authenticator.cs?

  3. #3
    Member CUS7OM is offline
    MemberRank
    Apr 2014 Join Date
    62Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    Quote Originally Posted by Mackors View Post
    @CUS7OM Can you post your Habbo.cs and Authenticator.cs?
    You just need to create a string on Habbo and define it, I think it's perfectly explained on the thread, lol.

  4. #4
    Proficient Member Seat is offline
    MemberRank
    Dec 2010 Join Date
    153Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    Thank you for the release !

    Look your pm

  5. #5
    Valued Member Mackors is offline
    MemberRank
    Aug 2016 Join Date
    100Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    Quote Originally Posted by CUS7OM View Post
    You just need to create a string on Habbo and define it, I think it's perfectly explained on the thread, lol.
    It's missing more. That's why i asking to help me with the .cs's files.
    Like on InteractionType.cs it's missing private (readonly?) baseItem (don't know which to use).

    Btw, ScrSendUserInfoComposer is also missing. We don't have that.

  6. #6
    Member CUS7OM is offline
    MemberRank
    Apr 2014 Join Date
    62Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    I'm pretty sure you have not added the packet references on the top.
    Use the little light for dummies by rightclicking, it will recommend you to add an using reference etc.

    Sent from my Kappaphone on Barcelona streeterinos.

  7. #7
    Valued Member Mackors is offline
    MemberRank
    Aug 2016 Join Date
    100Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    @CUS7OM I was missing using Plus.HabboHotel.Users; at the top.

    Now i have a annoying error, I can't solve it. Any help?



    My ScrSendUserInfoComposer.cs: (pastebin, click here)

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Plus.HabboHotel.Users;namespace Plus.Communication.Packets.Outgoing.Users{ class ScrSendUserInfoComposer : ServerPacket { public ScrSendUserInfoComposer() : base(ServerPacketHeader.ScrSendUserInfoMessageComposer) { int DisplayMonths = 0; int DisplayDays = 0; base.WriteString("habbo_club"); base.WriteInteger(DisplayDays); base.WriteInteger(2); base.WriteInteger(DisplayMonths); base.WriteInteger(1); base.WriteBoolean(true); // hc base.WriteBoolean(true); // vip base.WriteInteger(0); base.WriteInteger(0); base.WriteInteger(495); } }}

  8. #8
    Apprentice JordyNL is offline
    MemberRank
    Feb 2017 Join Date
    8Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    Catalog_items, furnuture sql's and furnidata.xml pls?

    - - - Updated - - -

    This is shit: https://www.yor-game.nl/screenshots/...7_22-27-31.png

  9. #9
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,372Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    Quote Originally Posted by JordyNL View Post
    Catalog_items, furnuture sql's and furnidata.xml pls?

    - - - Updated - - -

    This is shit: https://www.yor-game.nl/screenshots/...7_22-27-31.png
    Just because you can't make it work, doesn't mean it's shit. Modify this to your needs:

    http://pastebin.com/raw/JbdwkFyQ

  10. #10
    Apprentice Uknown is offline
    MemberRank
    Feb 2017 Join Date
    9Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    Quote Originally Posted by JordyNL View Post
    Catalog_items, furnuture sql's and furnidata.xml pls?

    - - - Updated - - -

    This is shit: https://www.yor-game.nl/screenshots/...7_22-27-31.png
    Not need furnidata.xml, only catalog_items and furniture.

    I have a question, what page_layout it is from your hotel?

  11. #11
    Member CUS7OM is offline
    MemberRank
    Apr 2014 Join Date
    62Posts

    Re: Purchasable Namecolors from Catalog [Plus]

    Quote Originally Posted by Uknown View Post
    Not need furnidata.xml, only catalog_items and furniture.

    I have a question, what page_layout it is from your hotel?
    Just use the default_3x3 but setup the items like badges so you get that cool effect.

    Regards.



Advertisement