[BUTTERFLY][R63B]Mannequin (Rotate not working)

Results 1 to 22 of 22
  1. #1
    BFH Experience Loader Mininova is offline
    MemberRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Today I release my Mannequin Code, but Rotating not working till now. But i think someone can fix them ;)
    The Rest is 100% working ;)



    RoomItem.cs (Serialize):
    Code:
            internal void Serialize(ServerMessage Message, int UserId)
            {
                if (IsFloorItem)
                {
                    Message.AppendUInt(Id);
                    Message.AppendInt32(GetBaseItem().SpriteId);
                    Message.AppendInt32(mX);
                    Message.AppendInt32(mY);
                    Message.AppendInt32(Rot);
                    Message.AppendStringWithBreak(String.Format("{0:0.00}", TextHandling.GetString(mZ)));
                    if (this.GetBaseItem().InteractionType == InteractionType.gift)
                    {
                        int result = 0;
                        if (ExtraData.Contains(Convert.ToChar(5).ToString()))
                        {
                            int color = int.Parse(ExtraData.Split((char)5)[1]);
                            int lazo = int.Parse(ExtraData.Split((char)5)[2]);
                            result = color * 1000 + lazo;
                        }
                        Message.AppendInt32(result);
                        if (this.ExtraData.Contains(Convert.ToChar(5).ToString()))
                        {
                            uint PurchaserId = (uint)int.Parse(ExtraData.Split(';')[0]);
                            Habbo Purchaser = ButterflyEnvironment.getHabboForId(PurchaserId);
                            if (Purchaser != null)
                            {
                                Message.AppendInt32(1);
                                Message.AppendInt32(6);
                                Message.AppendString("EXTRA_PARAM");
                                Message.AppendString("");
                                Message.AppendString("MESSAGE");
                                Message.AppendString(ExtraData.Split(';')[1].Split((char)5)[0]);
                                Message.AppendString("PURCHASER_NAME");
                                Message.AppendString(Purchaser.Username);
                                Message.AppendString("PURCHASER_FIGURE");
                                Message.AppendString(Purchaser.Look);
                                Message.AppendString("PRODUCT_CODE");
                                Message.AppendString("");
                                Message.AppendString("state");
                                Message.AppendString(MagicRemove ? "1" : "0");
                            }
                            else
                            {
                                Message.AppendInt32(0);
                            }
                        }
                        // this.ExtraData.Contains(Convert.ToChar(5).ToString()) ? ExtraData.Split((char)5)[1] : "0"
                        else
                            Message.AppendInt32(0);
                    }
                    else
                    {
                        Message.AppendInt32(0);
    
    
                        if (this.GetBaseItem().Name == "boutique_mannequin1")
                        {
                            Message.AppendInt32(1);
                            Message.AppendInt32(3);
    
    
                            if (ExtraData != "")
                            {
                                Message.AppendString("GENDER");
                                Message.AppendString(ExtraData.Split(Convert.ToChar(9))[1]);
                                Message.AppendString("FIGURE");
                                Message.AppendString(ExtraData.Split(Convert.ToChar(9))[2]);
                                Message.AppendString("OUTFIT_NAME");
                                Message.AppendString(ExtraData.Split(Convert.ToChar(9))[0]);
                            }
                            else
                            {
                                Message.AppendString("GENDER");
                                Message.AppendString("m");
                                Message.AppendString("FIGURE");
                                Message.AppendString("ch-210-62.lg-270-62");
                                Message.AppendString("OUTFIT_NAME");
                                Message.AppendString("");
                            }
                        }
                        else
                        {
                            Message.AppendInt32(0);
    
    
                            if (GetBaseItem().InteractionType != InteractionType.fbgate)
                                Message.AppendStringWithBreak(ExtraData);
                            else
                                Message.AppendStringWithBreak(string.Empty);
                        }
                    }
                    Message.AppendInt32(-1);
                    Message.AppendInt32(1); // Type New R63 ('use bottom')
                    Message.AppendInt32(UserId);
                }
                else if (IsWallItem)
                {
                    Message.AppendStringWithBreak(Id + String.Empty);
                    Message.AppendInt32(GetBaseItem().SpriteId);
                    Message.AppendStringWithBreak(wallCoord.ToString());
                    switch (GetBaseItem().InteractionType)
                    {
                        case InteractionType.postit:
                            Message.AppendStringWithBreak(ExtraData.Split(' ')[0]);
                            break;
    
    
                        default:
                            Message.AppendStringWithBreak(ExtraData);
                            break;
                    }
                    Message.AppendInt32(1); // Type New R63 ('use bottom')
                    Message.AppendInt32(UserId);
                    
                }
            }

    UserItem.cs
    Code:
            internal void SerializeFloor(ServerMessage Message, Boolean Inventory)
            {
                Message.AppendUInt(Id);
                Message.AppendStringWithBreak(mBaseItem.Type.ToString().ToUpper());
                Message.AppendUInt(Id);
                Message.AppendInt32(GetBaseItem().SpriteId);
                Message.AppendInt32(1);
    
    
                    if (this.GetBaseItem().Name == "boutique_mannequin1")
                    {
                        Message.AppendInt32(1);
                        Message.AppendInt32(3);
    
    
                        if (ExtraData != "")
                        {
                            Message.AppendString("GENDER");
                            Message.AppendString(ExtraData.Split(Convert.ToChar(9))[1]);
                            Message.AppendString("FIGURE");
                            Message.AppendString(ExtraData.Split(Convert.ToChar(9))[2]);
                            Message.AppendString("OUTFIT_NAME");
                            Message.AppendString(ExtraData.Split(Convert.ToChar(9))[0]);
                        }
                        else
                        {
                            Message.AppendString("GENDER");
                            Message.AppendString("m");
                            Message.AppendString("FIGURE");
                            Message.AppendString("ch-210-62.lg-270-62");
                            Message.AppendString("OUTFIT_NAME");
                            Message.AppendString("");
                        }
                    }
                    else
                    {
                        Message.AppendInt32(0);
                        Message.AppendStringWithBreak(ExtraData);
                    }
                    Message.AppendBoolean(GetBaseItem().AllowRecycle);
                    Message.AppendBoolean(GetBaseItem().AllowTrade);
                    Message.AppendBoolean(GetBaseItem().AllowInventoryStack);
                    Message.AppendBoolean(Marketplace.CanSellItem(this));
                    Message.AppendInt32(-1);
                    Message.AppendStringWithBreak("");
                    Message.AppendInt32(0);
                
            }
    Rooms.cs:
    Code:
            internal void SaveMannequin()
            {
                try
                {
                    Room Room = ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
    
    
                    if (Room == null)
                    {
                        return;
                    }
    
    
                    int ID = Request.PopWiredInt32();
    
    
                    RoomItem Item = Room.GetRoomItemHandler().GetItem(Convert.ToUInt32(ID));
    
    
                    if (Item == null || Item.GetBaseItem().InteractionType != Butterfly.HabboHotel.Items.InteractionType.mannequin)
                    {
                        return;
                    }
    
    
                    Item.ExtraData = Item.ExtraData.Split(Convert.ToChar(9))[0] + Convert.ToChar(9) + Session.GetHabbo().Gender + Convert.ToChar(9) + Session.GetHabbo().Look;
    
    
                    ServerMessage Message = new ServerMessage(0);
                    Message.Init(Outgoing.UpdateFloorItemExtraData);
                    Message.AppendStringWithBreak(Item.Id.ToString());
                    Message.AppendInt32(1);
                    Message.AppendInt32(3);
                    Message.AppendString("GENDER");
                    Message.AppendString(Item.ExtraData.Split(Convert.ToChar(9))[1]);
                    Message.AppendString("FIGURE");
                    Message.AppendString(Item.ExtraData.Split(Convert.ToChar(9))[2]);
                    Message.AppendString("OUTFIT_NAME");
                    Message.AppendString(Item.ExtraData.Split(Convert.ToChar(9))[0]);
                    Room.SendMessage(Message);
                }
                catch
                {
                }
            }
    
    
            internal void SaveMannequinName()
            {
                try
                {
                    Room Room = ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
    
    
                    if (Room == null)
                    {
                        return;
                    }
    
    
                    uint ID = Request.PopWiredUInt();
    
    
                    RoomItem Item = Room.GetRoomItemHandler().GetItem(ID);
    
    
                    if (Item == null || Item.GetBaseItem().InteractionType != Butterfly.HabboHotel.Items.InteractionType.mannequin)
                    {
                        return;
                    }
    
    
                    string Name = Request.PopFixedString();
    
    
                    Item.ExtraData = Name + Convert.ToChar(9) + Item.ExtraData.Split(Convert.ToChar(9))[1] + Convert.ToChar(9) + Item.ExtraData.Split(Convert.ToChar(9))[2];
    
    
                    ServerMessage Message = new ServerMessage(0);
                    Message.Init(Outgoing.UpdateFloorItemExtraData);
                    Message.AppendStringWithBreak(Item.Id.ToString());
                    Message.AppendInt32(1);
                    Message.AppendInt32(3);
                    Message.AppendString("GENDER");
                    Message.AppendString(Item.ExtraData.Split(Convert.ToChar(9))[1]);
                    Message.AppendString("FIGURE");
                    Message.AppendString(Item.ExtraData.Split(Convert.ToChar(9))[2]);
                    Message.AppendString("OUTFIT_NAME");
                    Message.AppendString(Item.ExtraData.Split(Convert.ToChar(9))[0]);
                    Room.SendMessage(Message);
                }
                catch
                {
                }
            }
    SharedPacketLib.cs:
    Code:
            internal static void SaveMannequin(GameClientMessageHandler handler)
            {
                handler.SaveMannequin();
            }
    
    
            internal static void SaveMannequinName(GameClientMessageHandler handler)
            {
                handler.SaveMannequinName();
            }
    StaticClientMessageHandler.cs:
    Code:
                //MANNEQUIN
                handlers.Add(2868, new StaticRequestHandler(SharedPacketLib.SaveMannequin));
                handlers.Add(2036, new StaticRequestHandler(SharedPacketLib.SaveMannequinName));
                //
    InteractionType.cs (enum InteractionType {):
    Code:
    add:
    mannequin,
    
    search for:
                    case "vendingmachine":
                        return InteractionType.vendingmachine;
    
    add under:
                    case "mannequin":
                        return InteractionType.mannequin;
    
    search for:
                    case InteractionType.vendingmachine:
                        return "vendingmachine";
    
    add under:
                    case InteractionType.mannequin:
                        return "mannequin";

    RoomItem.cs
    Code:
    Search for:
                        case InteractionType.vendingmachine:
                            return new InteractorVendor();
    
    add under:
                        case InteractionType.mannequin:
                            return new InteractorMannequin();
    FurniInteractor.cs
    Code:
    Add:
    
        class InteractorClothes : FurniInteractor
        {
            internal override void OnPlace(GameClient Session, RoomItem Item)
            {
                
            }
    
    
            internal override void OnRemove(GameClient Session, RoomItem Item)
            {
    
    
            }
    
    
            internal override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
            {
                if (Item.ExtraData != "")
                {
                    Session.GetHabbo().Gender = Item.ExtraData.Split(Convert.ToChar(9))[1];
                    Session.GetHabbo().Look = Item.ExtraData.Split(Convert.ToChar(9))[2];
                    Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateUserInformation);
                    Session.GetMessageHandler().GetResponse().AppendInt32(-1);
                    Session.GetMessageHandler().GetResponse().AppendStringWithBreak(Session.GetHabbo().Look);
                    Session.GetMessageHandler().GetResponse().AppendStringWithBreak(Session.GetHabbo().Gender.ToLower());
                    Session.GetMessageHandler().GetResponse().AppendStringWithBreak(Session.GetHabbo().Motto);
                    Session.GetMessageHandler().GetResponse().AppendInt32(Session.GetHabbo().AchievementPoints);
                    Session.GetMessageHandler().SendResponse();
    
    
                    if (Session.GetHabbo().InRoom)
                    {
                        Room Room = Session.GetHabbo().CurrentRoom;
    
    
                        if (Room == null)
                        {
                            return;
                        }
    
    
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
    
    
                        if (User == null)
                        {
                            return;
                        }
    
    
                        ServerMessage RoomUpdate = new ServerMessage(Outgoing.UpdateUserInformation);
                        RoomUpdate.AppendInt32(User.VirtualId);
                        RoomUpdate.AppendStringWithBreak(Session.GetHabbo().Look);
                        RoomUpdate.AppendStringWithBreak(Session.GetHabbo().Gender.ToLower());
                        RoomUpdate.AppendStringWithBreak(Session.GetHabbo().Motto);
                        RoomUpdate.AppendInt32(Session.GetHabbo().AchievementPoints);
                        Room.SendMessage(RoomUpdate);
                    }
                }
            }
    
    
        }


  2. #2
    Eye Eye Capt'n Spheral is offline
    MemberRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    I have all the mannequin packets, including rotate, update look, wear clothing.

    I will add them in a bit, just need to sort my R63B-DEV website out.

  3. #3
    Demi-God tweeney is offline
    MemberRank
    Aug 2008 Join Date
    888Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Oh dear.. you couldn't do rotation LOL. It doesn't even need coding...
    Anyway good release I guess..

  4. #4
    Eye Eye Capt'n Spheral is offline
    MemberRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Quote Originally Posted by tweeney View Post
    Oh dear.. you couldn't do rotation LOL. It doesn't even need coding...
    Anyway good release I guess..
    Look who it is :) Mind giving some advice then?

  5. #5
    Demi-God tweeney is offline
    MemberRank
    Aug 2008 Join Date
    888Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Just to note, this isn't how mannequins work in habbo as it doesn't replace the entire figure but only the top, trousers and shoes ^^

  6. #6
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Why do people still call it R63'B'?
    Anyways, rotating not working..? I can't think of ANY reason why it shouldn't work. It just handles the update furniture packet and it should rotate normally.
    Good release, but don't see why you should use mannequin.

  7. #7
    BFH Experience Loader Mininova is offline
    MemberRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    I dont know why using Mannequin, too. But now we have it, so have fun :D

  8. #8
    The Legend Returns vista4life is offline
    MemberRank
    Mar 2007 Join Date
    The NetherlandsLocation
    843Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    almost complete;P just fix the figure / rotation problem is server side

  9. #9
    Account Upgraded | Title Enabled! SkeetEmUp is offline
    MemberRank
    Aug 2011 Join Date
    358Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Quote Originally Posted by Tha View Post
    Why do people still call it R63'B'?
    Anyways, rotating not working..? I can't think of ANY reason why it shouldn't work. It just handles the update furniture packet and it should rotate normally.
    Good release, but don't see why you should use mannequin.
    Its called R63B because that is the term this community has gotten use too. Its the most easy and identifiable way to distinguish between the two.
    Mannequins rotate differently to normal furni.
    Why would you not use a Mannequin? Its a feature and I don't understand why you or your users wouldn't use it?

  10. #10
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,484Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Bravo!

    Good release Mininova

  11. #11
    BFH Experience Loader Mininova is offline
    MemberRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Thanks :)
    I also want to fix the Rotate Bug Today and Release it here ;)

  12. #12
    The Legend Returns vista4life is offline
    MemberRank
    Mar 2007 Join Date
    The NetherlandsLocation
    843Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Quote Originally Posted by Mininova View Post
    Thanks :)
    I also want to fix the Rotate Bug Today and Release it here ;)
    Don't forget about the figure :D

  13. #13
    BFH Experience Loader Mininova is offline
    MemberRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    I do it via the Config file ;)
    mannequin.with.head=true
    :D

  14. #14
    Proficient Member MrSolution is offline
    MemberRank
    May 2012 Join Date
    174Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    The packetstructure is almost fully hardcoded. The reason of (rotation)bugs it the instability of the packetstructure.

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

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    It's working with BcStorm??

  16. #16
    Banned Divide is offline
    BannedRank
    Aug 2011 Join Date
    British CoderLocation
    1,013Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Quote Originally Posted by tweeney View Post
    Just to note, this isn't how mannequins work in habbo as it doesn't replace the entire figure but only the top, trousers and shoes ^^
    Yea but this guy is stupid and doesn't know what split figures are..

    Quote Originally Posted by MrSolution View Post
    The packetstructure is almost fully hardcoded. The reason of (rotation)bugs it the instability of the packetstructure.
    Euhm not really.. Thats just bullshett!

    Here's how to fix rotation (Because ur all stupid..)

    Search for this in RoomItemHandeling.cs:
    Code:
                    if (newRot != 0 && newRot != 2 && newRot != 4 && newRot != 6 && newRot != 8)
                    {
                        newRot = 0;
                    }
    Replace with:
    Code:
                if (Item.GetBaseItem().Name != "boutique_mannequin1")
                {
                    if (newRot != 0 && newRot != 2 && newRot != 4 && newRot != 6 && newRot != 8)
                    {
                        newRot = 0;
                    }
                }
                else
                {
                    if (newRot != 0 && newRot != 1 && newRot != 2 && newRot != 3 && newRot != 4 && newRot != 5 && newRot != 6 && newRot != 7 && newRot != 8 && newRot != 9 && newRot != 10 && newRot != 11 && newRot != 12) 
                    {
                        newRot = 0;
                    }
                }

  17. #17
    Keep your head up. FlyHotel is offline
    MemberRank
    Apr 2011 Join Date
    The NetherlandsLocation
    570Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    I'm sorry.. Maybe a stupid question but what is Mannequin? :$

  18. #18
    BFH Experience Loader Mininova is offline
    MemberRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    I know what Splitting Figure is, but from now on i only give my fixes to friends.
    I Release it, because anybody else could need it, and not for an 100% Fixed Mannequin like Habbo (Hate some Habbo things, and do it my own way...)

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

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Working with BcStorm??? '---'

  20. #20
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    MemberRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Quote Originally Posted by Mininova View Post
    I know what Splitting Figure is, but from now on i only give my fixes to friends.
    I Release it, because anybody else could need it, and not for an 100% Fixed Mannequin like Habbo (Hate some Habbo things, and do it my own way...)
    Just keep releasing. I'm sure someone pissed in divide's cereal this morning and that's why he is acting the way he does.

    Divide, there is no reason to call everybody stupid.


    Sent from my BlackBerry 9800 using Tapatalk

  21. #21
    Banned Divide is offline
    BannedRank
    Aug 2011 Join Date
    British CoderLocation
    1,013Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    Quote Originally Posted by neto737 View Post
    Working with BcStorm??? '---'
    BCSTORM VERSION BY ME: http://forum.ragezone.com/f353/bcsto...rotate-904071/

    Quote Originally Posted by FlyHotel View Post
    I'm sorry.. Maybe a stupid question but what is Mannequin? :$
    It is the white thing in shops you put clothes on to show it off:

  22. #22
    Valued Member Troll Hotel is offline
    MemberRank
    Nov 2012 Join Date
    SlovakiaLocation
    144Posts

    Re: [BUTTERFLY][R63B]Mannequin (Rotate not working)

    i dont have the furniture i can't find it for r63B can someone post it please :)



Advertisement