Inventory R63+ New Items

Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. #1
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Inventory R63+ New Items

    InventoryComponent.cs find:
    Code:
            private SafeList<UserItem> InventoryItems;
    After that add:
    Code:
            private static Item mItems; // Initializes update R63+
    Find:
    Code:
           public void UpdateItems(bool FromDatabase)
            {
                if (FromDatabase)
                {
                    LoadInventory();
                }
    
                GetClient().GetMessageHandler().GetResponse().Init(101);
                GetClient().GetMessageHandler().SendResponse();
            }
    Replace with:
    Code:
            public void UpdateItems(bool FromDatabase) // R63 From Achievement Categories use this
            {
                if (FromDatabase)
                {
                    LoadInventory();
                }
                GetClient().GetMessageHandler().GetResponse().Init(832);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true);
                GetClient().GetMessageHandler().GetResponse().AppendString(mItems.Type);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true);
                GetClient().GetMessageHandler().GetResponse().AppendUInt(mItems.ItemId);
                GetClient().GetMessageHandler().SendResponse();
            }
    Find:
    Code:
     public void AddItem(uint Id, uint BaseItem, string ExtraData, bool InDatabase)
            {
                InventoryItems.Add(new UserItem(Id, BaseItem, ExtraData));
    
                if (InDatabase)
                {
                    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                    {
                        dbClient.AddParamWithValue("extra_data", ExtraData);
                        dbClient.ExecuteQuery("INSERT INTO items (id,user_id,room_id,base_item,extra_data,x,y,z,rot,wall_pos) VALUES ('" + Id + "','" + UserId + "','0','" + BaseItem + "',@extra_data,'0','0','0','0','')");
                    }
                }
    }
    Replace with:
    Code:
            public void AddItem(uint Id, uint BaseItem, string ExtraData, bool InDatabase)
            {
                InventoryItems.Add(new UserItem(Id, BaseItem, ExtraData));
    
                if (InDatabase)
                {
                    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                    {
                        dbClient.AddParamWithValue("extra_data", ExtraData);
                        dbClient.ExecuteQuery("INSERT INTO items (id,user_id,room_id,base_item,extra_data,x,y,z,rot,wall_pos) VALUES ('" + Id + "','" + UserId + "','0','" + BaseItem + "',@extra_data,'0','0','0','0','')");
                    }
                }
    
                UpdateItems(true);
            }
    IfDatabase have not to be true if you do false it still works.

    Credits:
    Me - Coding
    Meth0d - UberEmu (lawls)


  2. #2
    Account Upgraded | Title Enabled! TheNikolas is offline
    MemberRank
    Jul 2011 Join Date
    NorwayLocation
    216Posts

    Re: Inventory R63+ New Items

    Do you have any screens on what this does? Like before or after? :-D

  3. #3
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: Inventory R63+ New Items

    It fixes the inventory since the packet structure changed.

  4. #4
    Account Upgraded | Title Enabled! TheNikolas is offline
    MemberRank
    Jul 2011 Join Date
    NorwayLocation
    216Posts

    Re: Inventory R63+ New Items

    Quote Originally Posted by Roper View Post
    It fixes the inventory since the packet structure changed.
    Ok. Thanks. :)

  5. #5
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Inventory R63+ New Items

    Nope I don't know what this exactly does but I think this do the red 1,2(amount of new furniture)

  6. #6
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: Inventory R63+ New Items

    Quote Originally Posted by George2000 View Post
    Nope I don't know what this exactly does but I think this do the red 1,2(amount of new furniture)
    Yes, it updates the structure which makes it all work perfectly.

  7. #7
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Inventory R63+ New Items

    People someone could test it for me? My uber is broken (I dunno why)

  8. #8
    Minor Devolper ntl200 is offline
    MemberRank
    Dec 2007 Join Date
    EnglandLocation
    538Posts

    Re: Inventory R63+ New Items

    hang on wait what you couldnt of made produced these codes then if you dont even know how they work or what they do :o too bad...

    but on a lighter note still very helpful to uberemu _ duckemu users

  9. #9
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: Inventory R63+ New Items

    This doesn't work, You're structure is a bit off, Brohan.

  10. #10
    Valued Member TenShie is offline
    MemberRank
    Apr 2011 Join Date
    Frankfurt a. M.Location
    115Posts

    Re: Inventory R63+ New Items

    Woho NICE !

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

    Re: Inventory R63+ New Items

    Can you please test it yourself first.
    Last edited by Quackster; 04-08-11 at 03:51 AM.

  12. #12

    Re: Inventory R63+ New Items

    Quote Originally Posted by Quackster View Post
    Can you please test it yourself first.
    I'm going to quote you on your earlier point, before you edited this post. 832 is the message id for the UnseenItemsEvent it has nothing to do with 'messenger update'.

    The message id i think you're referring to is 15, the FriendListUpdateMessage.

  13. #13
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Inventory R63+ New Items

    I tested it on ION and worked,
    offtopic: Quackster I luv ur avatar

  14. #14
    Valued Member ItachiKM is offline
    MemberRank
    Jan 2011 Join Date
    133Posts

    Re: Inventory R63+ New Items

    It isn't the new structure, it is for make this:

    But it a wrong form of the packet...

  15. #15
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Inventory R63+ New Items

    Itachi, nice! Which emulator is that you're using? Still blizzard?

  16. #16
    Valued Member ItachiKM is offline
    MemberRank
    Jan 2011 Join Date
    133Posts

    Re: Inventory R63+ New Items

    Quote Originally Posted by George2000 View Post
    Itachi, nice! Which emulator is that you're using? Still blizzard?
    Yes, I will finish Blizzard!
    With that, it will be sended when you purchase the item, and with the id of the new item purchased only.

    It Will Be like this:
    Code:
            public void UpdateItems(bool FromDatabase) // R63 From Achievement Categories use this
            {
                if (FromDatabase)
                {
                    LoadInventory();
                }
                GetClient().GetMessageHandler().GetResponse().Init(832);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true);
    
                if(mItems.Type != "s")
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(2);
                else
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(1);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true); // total count of furnis
                GetClient().GetMessageHandler().GetResponse().AppendUInt(mItems.ItemId); // id of furni purchased on inventory
                GetClient().GetMessageHandler().SendResponse();
            }
    Last edited by ItachiKM; 04-08-11 at 03:18 PM.

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

    Re: Inventory R63+ New Items

    Quote Originally Posted by ItachiKM View Post
    Yes, I will finish Blizzard!
    With that, it will be sended when you purchase the item, and with the id of the new item purchased only.

    It Will Be like this:
    Code:
            public void UpdateItems(bool FromDatabase) // R63 From Achievement Categories use this
            {
                if (FromDatabase)
                {
                    LoadInventory();
                }
                GetClient().GetMessageHandler().GetResponse().Init(832);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true);
    
                if(mItems.Type == "s")
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(2);
                else
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(1);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true); // total count of furnis
                GetClient().GetMessageHandler().GetResponse().AppendUInt(mItems.ItemId); // id of furni purchased on inventory
                GetClient().GetMessageHandler().SendResponse();
            }
    The part

    Code:
                if(mItems.Type == "s")
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(2);
                else
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(1);
    Should be

    Code:
                if(mItems.Type == "s")
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(1);
                else
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(2);
    Then it has been fixed, because it would show you purchased a wall item even if it was a floor item. Or it would show you purchased a floor item even though if it was a wall item.


  18. #18
    Valued Member ItachiKM is offline
    MemberRank
    Jan 2011 Join Date
    133Posts

    Re: Inventory R63+ New Items

    Quote Originally Posted by Quackster View Post
    The part

    Code:
                if(mItems.Type == "s")
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(2);
                else
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(1);
    Should be

    Code:
                if(mItems.Type == "s")
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(1);
                else
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(2);
    Then it has been fixed, because it would show you purchased a wall item even if it was a floor item. Or it would show you purchased a floor item even though if it was a wall item.

    Sorry, I copy bad the code, it's a != not a ==, but in your way is good too, thank u!

  19. #19
    Valued Member unkn0wn32 is offline
    MemberRank
    Jul 2011 Join Date
    FloridaLocation
    124Posts

    Re: Inventory R63+ New Items

    can someone help me?
    i've added all correctly but when buy something, i get DC.

  20. #20
    this is title Shredinator is offline
    MemberRank
    May 2011 Join Date
    399Posts

    Re: Inventory R63+ New Items

    Quote Originally Posted by unkn0wn32 View Post
    can someone help me?
    i've added all correctly but when buy something, i get DC.
    Well, you didn't add it correctly then, did you?

  21. #21
    Valued Member unkn0wn32 is offline
    MemberRank
    Jul 2011 Join Date
    FloridaLocation
    124Posts

    Re: Inventory R63+ New Items

    i don't know, i've replaced all correctly.
    @off
    do u have TV?
    add my msn pls, scott-hey@live.com

  22. #22

    Re: Inventory R63+ New Items

    Quote Originally Posted by unkn0wn32 View Post
    can someone help me?
    i've added all correctly but when buy something, i get DC.
    i dont know but...

    in many Emulator the id in the Item.cs is private. change it to public

    Works???

    ---------- Post added at 09:06 PM ---------- Previous post was at 08:42 PM ----------

    I have searched a own method ^^
    i found a method for peoples he have problems with it ^^

    search for the void
    Code:
    public void UpdateItems(bool FromDatabase)
    and replace it with
    Code:
    public void UpdateItems(bool FromDatabase)
            {
    
                    if (FromDatabase)
                    {
                        LoadInventory();
                        RunDBUpdate();
                    }
    
                    GetClient().GetMessageHandler().GetResponse().Init(101);
                    GetClient().GetMessageHandler().SendResponse();
            }
    
            public void UpdateItems(bool FromDatabase, string Type, uint Id)
            {
    
                if (FromDatabase)
                {
                    LoadInventory();
                    RunDBUpdate();
                }
    
                GetClient().GetMessageHandler().GetResponse().Init(832);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true);
    
                if (Type != "s")
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(1);
                else
                    GetClient().GetMessageHandler().GetResponse().AppendInt32(2);
                GetClient().GetMessageHandler().GetResponse().AppendBoolean(true); // total count of furnis
                GetClient().GetMessageHandler().GetResponse().AppendUInt(Id); // id of furni purchased on inventory
                GetClient().GetMessageHandler().SendResponse();
    
            }
    Then search the void:
    Code:
    public void AddItem(UInt32 Id, UInt32 BaseItem, string ExtraData)
    and replace it with:
    Code:
            public void AddItem(UInt32 Id, UInt32 BaseItem, string ExtraData)
            {
                using (TimedLock.Lock(this.InventoryItems))
                {
                    UserItem ItemToAdd = new UserItem(Id, BaseItem, ExtraData);
    
                    InventoryItems.Add(ItemToAdd);
    
                    if (mRemovedItems.Contains(Id))
                        mRemovedItems.Remove(Id);
                    if (mAddedItems.ContainsKey(Id))
                        return;
    
                    mAddedItems.Add(Id, ItemToAdd);
    
                    RunDBUpdate();
                    UpdateItems(true, ItemToAdd.GetType().ToString(), ItemToAdd.Id);
    }
                }
            }
    This is coded in a very old R63 Uber. when you dont must edit the code, you have luck xD

    Sry for my bad english i come from germany ^^
    Last edited by Lukadora; 06-08-11 at 11:07 PM.

  23. #23
    What about no. Davidaap is offline
    MemberRank
    Nov 2009 Join Date
    773Posts

    Re: Inventory R63+ New Items

    @above timedlock /facepalm
    Posted via Mobile Device

  24. #24
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Inventory R63+ New Items

    The first time I used timedlock my whole emu crashed at more then 5 functions. After removing, everything was perfect. Edit: Guys, this can maybe not work, but I mostly released this for you because most people don't know how to get this.

  25. #25
    HTML,CSS and a bit C# Richardjuhh is offline
    MemberRank
    Dec 2010 Join Date
    NetherlandsLocation
    351Posts

    Re: Inventory R63+ New Items

    lolz, this fix didnt work and it sucks :D

    also itachi you can do this

    GetClient().GetMessageHandler().GetResponse().AppendInt32(((mItems.Type == "s")) ? 1 : 2);

    :)



Page 1 of 2 12 LastLast

Advertisement