[HELP]  Working with inventory Build: 46368 menu

User Tag List

Results 1 to 12 of 12
  1. #1
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    [HELP] Working with inventory Build: 3.4.2

    Greetings, can anyone help with the implementation of work with inventory?
    We have the possibility of a repeat (For which many thanks to Razzue)

    Code:
            //Player offset
            public const int Inventory = 0x12408; // Updated
           //And
            public const int BagSlot1       = 0x130; // Updated
            public const int BagSlot2       = 0x140; // Updated
            public const int BagSlot3       = 0x150; // Updated
            public const int BagSlot4       = 0x160; // Updated
    
            public const int BackpackFirst  = 0x170; // Updated
            public const int BackpackLast   = 0x260; // Updated
    It’s a little unclear to me what types to read, I searched the forum for answers and did not find
    I understand Inventory = 0x12408; this is an address and reads like [Entry+Inventory]
    Then in order to get into the specific bag you need to read [ [Entry+Inventory]+BagSlot4]
    Well, we read the cell of a particular bag [ [Entry+Inventory]+BagSlot4]+BackpackLast

    If I'm doing everything right, what type should I read in [ [Entry+Inventory]+BagSlot4]+BackpackLast?

    and what value should be returned?
    or am I doing something wrong?

    I need to find out if the last cell in a particular bag is free, but so far I can’t do it(
    Last edited by Hrap; 08-28-2023 at 03:38 PM.

    [HELP]  Working with inventory Build: 46368
  2. #2
    Razzue's Avatar Contributor Avid Ailurophile

    CoreCoins Purchaser Authenticator enabled
    Reputation
    379
    Join Date
    Jun 2017
    Posts
    588
    Thanks G/R
    185/268
    Trade Feedback
    2 (100%)
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Hrap View Post
    ~~
    Inventory is [PlayerBase + 0xF5C8] in wrath
    From inventory you are reading the bag's Guid
    Code:
    for(var i = 0; i < 4; i++)
        var Guid = [PlayerBase + 0xF5C8] + (0x140 + (i * 0x10));
    You then get the bag entries from the object manager via guid.
    After you get that, items in X bag are at 0x418; (slot count 0x410)

    So to count "empty" slots in bags (not including backpack)
    Code:
    var empty = 0;
    for(var a = 0; a < 4; a++)
    {
        var bag = GetBag("guid from a");
        for(var b = 0; b < bag.Slots; b++)
            if(bag.Items[b].IsEmpty())
                empty++;
    }
    "May all your bacon burn"

  3. #3
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much you helped a lot

  4. #4
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    .................................................
    Last edited by Hrap; 11-18-2022 at 12:42 PM.

  5. #5
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Understood everything works)
    Last edited by Hrap; 11-18-2022 at 01:31 PM.

  6. #6
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Razzue View Post
    Inventory is [PlayerBase + 0xF5C8] in wrath
    From inventory you are reading the bag's Guid
    Code:
    for(var i = 0; i < 4; i++)
        var Guid = [PlayerBase + 0xF5C8] + (0x140 + (i * 0x10));
    You then get the bag entries from the object manager via guid.
    After you get that, items in X bag are at 0x418; (slot count 0x410)

    So to count "empty" slots in bags (not including backpack)
    Code:
    var empty = 0;
    for(var a = 0; a < 4; a++)
    {
        var bag = GetBag("guid from a");
        for(var b = 0; b < bag.Slots; b++)
            if(bag.Items[b].IsEmpty())
                empty++;
    }
    Hi, how to i get baseadress or guid of backpack?
    I also want to know the free cells in it
    Last edited by Hrap; 11-22-2022 at 04:47 AM.

  7. #7
    tayl's Avatar Member
    Reputation
    6
    Join Date
    Aug 2020
    Posts
    17
    Thanks G/R
    3/5
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Hrap View Post
    Hi, how to i get baseadress or guid of backpack?
    I also want to know the free cells in it
    AFAIK backpack slots implemented as part of character inventory and placed right after bagslots (not sure about this), so you basically work with them like with bags, but skipping step where you getting bag object.
    BTW please start using forum/google search, every question you asked so far was previously answered with copypaste ready code :/

  8. #8
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thank you all figured it out
    Last edited by Hrap; 11-26-2022 at 04:41 PM.

  9. #9
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Greetings to all, again something has changed in working with inventory, who knows the correct field offset in 3.4.2
    I try to use
    Code:
     
    
    InvSlots = 0x12988;
    Bagslot1 = 0x1E0;
    
    DWORD_PTR adress = read<DWORD_PTR>(PlayerBase + 0x12988);
    GUID First = read<GUID>(adress + 0x1E0);
    But I don't get Guid first bag
    It seems to me that something is wrong with the offsets

  10. #10
    imzz's Avatar Active Member
    Reputation
    24
    Join Date
    May 2011
    Posts
    36
    Thanks G/R
    37/17
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Hrap View Post
    Greetings to all, again something has changed in working with inventory, who knows the correct field offset in 3.4.2
    I try to use
    Code:
     
    
    InvSlots = 0x12988;
    Bagslot1 = 0x1E0;
    
    DWORD_PTR adress = read<DWORD_PTR>(PlayerBase + 0x12988);
    GUID First = read<GUID>(adress + 0x1E0);
    But I don't get Guid first bag
    It seems to me that something is wrong with the offsets
    InvSlots = 0x12990 ?
    回首向来萧瑟处,归去,也无风雨也无晴。

  11. Thanks Hrap (1 members gave Thanks to imzz for this useful post)
  12. #11
    Fakekx's Avatar Member
    Reputation
    4
    Join Date
    Aug 2023
    Posts
    3
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Field_LocalPlayer_Inventory = 0x0000000000012990
    this = LocalPlayer ptr
    
    std::vector<wItem*> GetAllBagItems() {
    	std::vector<wItem*> ItemsArr;
    	for (int i = 0; i < 4; i++)
    	{
    		auto ContainerGuid = this->GetInventory()->GetBagByID(i);
    		auto entity = GameMethods::getEntityByGuid<wContainer*>(ContainerGuid, GlobalVars::WoW::ContainerObjects); 
    		if (entity->isValid()) 
    		{
    			for (int j = 0; j < entity->GetSlots(); j++)
    			{
    				auto ItemGuid = entity->GetSlotById(j);
    				auto Item = GameMethods::getEntityByGuid<wItem*>(ItemGuid, GlobalVars::WoW::ItemObjects); 
    				if (Item->isValid())
    				{
    					ItemsArr.push_back(Item);
    				}
    			}
    		}
    	}
    	return ItemsArr;
    }
    
    	CGGuid GetBagByID(int ID)
    	{
    		auto res = *(CGGuid*)((uintptr_t)InventoryPtr+ 0x1E0 + (ID * 0x10)); //+
    		return res;
    	}
    Last edited by Fakekx; 08-30-2023 at 04:42 PM.

  13. Thanks Hrap (1 members gave Thanks to Fakekx for this useful post)
  14. #12
    Hrap's Avatar Member
    Reputation
    12
    Join Date
    Oct 2018
    Posts
    111
    Thanks G/R
    12/4
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thank you so much, it turns out I had the wrong offset

Similar Threads

  1. [Buying] I want buy working pick pocket profiles for 6.0.2 or someone can help me with mine
    By xtc6900 in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 10-18-2014, 01:44 PM
  2. [Help] Router problem - LAN cable not working with it
    By [Soul Eater] in forum Community Chat
    Replies: 3
    Last Post: 08-23-2010, 09:17 PM
  3. Replies: 18
    Last Post: 11-14-2008, 03:48 PM
  4. Help! my server wont work with hamachi!
    By kodekraker in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 09-25-2008, 11:08 AM
  5. help display id not working in inventory
    By backlash52 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 06-11-2008, 12:31 PM
All times are GMT -5. The time now is 03:45 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search