[BCSTORM] Multi-Height Feature for furnitures

Page 1 of 3 123 LastLast
Results 1 to 15 of 34
  1. #1
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    [BCSTORM] Multi-Height Feature for furnitures

    I've coded furniture fix for BCstorm.

    Find from Butterfly -> HabboHotel - > Items -> Item.cs

    Code:
    internal int Width;
    Add after:

    Code:
    internal string VariableHeight;
    Replace after internal Item(uint id..) to

    Code:
    internal Item(uint Id, int Sprite, string PublicName, string Name, string Type, int Width, int Length, double Height, bool Stackable, bool Walkable, bool IsSeat, bool AllowRecycle, bool AllowTrade, bool AllowMarketplaceSell, bool AllowGift, bool AllowInventoryStack, bool AllowGroupItem, Butterfly.HabboHotel.Items.InteractionType InteractionType, int Modes, string VendingIds, string VariableHeight)
    Find this.VendingIds = new List<int>();:

    Add after:

    Code:
    this.VariableHeight = VariableHeight;
    Find string vendingIds = (string) row[0x13]; from Butterfly -> HabboHotel - > Items -> ItemManager.cs

    Add after

    Code:
    string variableheights = (string)row[20];
    Replace after line to:

    Code:
    Item item = new Item(id, sprite, publicName, name, str3, width, length, height, stackable, walkable, isSeat, allowRecycle, allowTrade, allowMarketplaceSell, allowGift, allowInventoryStack, allowGroupItem, typeFromString, modes, vendingIds, variableheights);
    Go to Butterfly -> HabboHotel - > Items -> Interactors -> InteractorGenericSwitch.cs

    Find:

    Code:
    Item.ExtraData = num2.ToString();
                    Item.UpdateState();
    Add after:

    Code:
    if (Item.GetBaseItem().VariableHeight != "")
                    {
                        Item.GetRoom().GetGameMap().updateMapForItem(Item);
                        if (Item.GetX == Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username).X && Item.GetY == Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username).Y)
                        {
                            Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username).Z = Item.TotalHeight;
                            Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username).ClearMovement(true);
                        }
                        
                    }
    Find
    Code:
    internal double TotalHeight
            {
                get
                {
    from RoomItem.cs

    Replace

    Code:
    return (this.mZ + this.GetBaseItem().Height);
    to:

    Code:
    if (this.GetBaseItem().VariableHeight != "")
                    {
                        string[] Heights = this.GetBaseItem().VariableHeight.Split(';');
                        if (this.ExtraData == "")
                        {
                            this.ExtraData = "0";
                        }
                        if (this.ExtraData == "0")
                        {
                            return (this.mZ + double.Parse(Heights[0]));
                        }
                        else
                        {
                            return (this.mZ + double.Parse(Heights[int.Parse(this.ExtraData) - 1]));
                        }
                    }
                    else
                    {
                        return (this.mZ + this.GetBaseItem().Height);
                    }
    Go to Rooms -> Gamemap.cs find:

    Code:
    internal double SqAbsoluteHeight(int X, int Y, List<RoomItem> ItemsOnSquare)
    Add after
    Code:
    if (item.TotalHeight > totalHeight)
                        {
                            if (item.GetBaseItem().IsSeat || (item.GetBaseItem().InteractionType == InteractionType.bed))
                            {
                                flag = true;
                                height = item.GetBaseItem().Height;
                            }
                            else
                            {
                                flag = false;
                            }
    
                           
                        }
    this:

    Code:
      if (item.GetBaseItem().VariableHeight != "")
                        {
                            string[] Heights = item.GetBaseItem().VariableHeight.Split(';');
                            if (item.ExtraData == "")
                            {
                                item.ExtraData = "0";
                                item.UpdateState();
                            }
                            if (int.Parse(item.ExtraData) != 0)
                            {
                                totalHeight = totalHeight + double.Parse(Heights[int.Parse(item.ExtraData) - 1]);
                            }
                        }
    Add variable_heights column to items_base table.

    When you set heights make height for all states etc. 5 states furni: 0.50;1.00;1.25;1.60;1.85.



  2. #2
    Member Qbus is offline
    MemberRank
    Mar 2012 Join Date
    In your mind.Location
    60Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Whoaa Nice!

    I'm now just adding it into my Emulator =]

    +1

  3. #3
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    [BCSTORM] Multi-Height Feature for furnitures

    Amazing. Thank. You x500<3

  4. #4
    Banned Habp is offline
    BannedRank
    Mar 2012 Join Date
    TCPOELocation
    208Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Thanks! :)

  5. #5
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,607Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    So when you got time to code snowstorm for me?

    Anyways nice share though :)

  6. #6
    C# Developer neto737 is offline
    MemberRank
    Oct 2010 Join Date
    Environment.csLocation
    274Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Nice fix ...

  7. #7
    Account Upgraded | Title Enabled! Giles121 is offline
    MemberRank
    Jul 2011 Join Date
    EnglandLocation
    291Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Nice fix mate, could you add the sql?
    Last edited by Giles121; 01-02-13 at 03:12 PM. Reason: Add more info

  8. #8
    Developer PremiumEye is offline
    MemberRank
    Nov 2011 Join Date
    NetherlandsLocation
    550Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Nice fix but it causes a new bug. You can't add wall furniture anymore. Deleted all changed code and still doesn't work. Thanks mate ;)

  9. #9
    En Français? Bjork is offline
    MemberRank
    Apr 2007 Join Date
    854Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Nice release.

    Can you take a look at the memory leak on Guilds Things (Related to joindates) if you know how to correct this ?

  10. #10
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Quote Originally Posted by PremiumEye View Post
    Nice fix but it causes a new bug. You can't add wall furniture anymore. Deleted all changed code and still doesn't work. Thanks mate ;)

    Wall furniture works for me. You maybe added some code to wrong place?

  11. #11
    Developer PremiumEye is offline
    MemberRank
    Nov 2011 Join Date
    NetherlandsLocation
    550Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Quote Originally Posted by =dj.matias= View Post
    Wall furniture works for me. You maybe added some code to wrong place?
    hmm. I already found it.
    But your fix isn't working for me? And I'm sure I placed the code on the right place.
    I walk though everything.

  12. #12
    Member jales is offline
    MemberRank
    Sep 2011 Join Date
    55Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    My emulator does not load after adding the code it hangs in navigator, can someone help?

  13. #13
    Zephyr Studios PRIZM is offline
    MemberRank
    Feb 2012 Join Date
    DenmarkLocation
    2,291Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Thanks for the fix. You are GREAT!

  14. #14
    Developer PremiumEye is offline
    MemberRank
    Nov 2011 Join Date
    NetherlandsLocation
    550Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Why does this work to everybody except me? O.O

  15. #15
    Banned V for Vendetta is offline
    BannedRank
    Feb 2007 Join Date
    1,809Posts

    Re: [BCSTORM] Multi-Height Feature for furnitures

    Quote Originally Posted by PremiumEye View Post
    Why does this work to everybody except me? O.O
    Because clearly you've done something wrong here. Which didn't make it work. As it works fine for me.



Page 1 of 3 123 LastLast

Advertisement