Item Count menu

Shout-Out

User Tag List

Thread: Item Count

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Item Count

    I've looked around and I couldn't find the item count, I found the item stack count though...
    Does anyone know how to get the count?

    Item Count
  2. #2
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shamun View Post
    I've looked around and I couldn't find the item count, I found the item stack count though...
    Does anyone know how to get the count?
    Increment your itemcounter by the stackcount for each item with identical name, filter out by containerID if you only want items from your bags for example
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  3. #3
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    stackcount returns the max count that a stack has not the current =\

  4. #4
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He meant make a counter that increases by 1 for each object with the same name in your bags. When you finally parse through all objects, it will tell you how many you have.

  5. #5
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Each object represents one stack so counting the objects will give me how much stacks I've got in my inventory...
    I want to know how much I've got in one stack (e.g. 17 bright baubles or something like that).

  6. #6
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    struct { int id, int num } itemstack;
    
    for <all objects> {
    increase itemstackvector where id == object_item_id
    }
    Or MySQL-based:
    Code:
    CREATE TABLE itemstacks (ID INT UNIQUE PRIMARY KEY, num INT);
    
    _for <all objects>: 
    INSERT INTO itemstacks (ID, num) 
       VALUES (object_item_id,object_item_count) 
       ON DUPLICATE KEY 
          UPDATE num=num+object_item_count;

  7. #7
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it isn't what I ment...
    I want something like GetItemCount

  8. #8
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shamun View Post
    it isn't what I ment...
    I want something like GetItemCount
    Atleast try the code people give you...

    The ITEM_FIELD_STACK_COUNT descriptor does not contain the "maximum stack amount" as you say, it contains the current number of items in that stack for that item in the list. If you would just have done a quick dump you would have seen this.

    Lets say I have 3 stacks of Silverleaf in my bags, last stack is only 17 (so I have 57 Silverleaf) A dump could look like this:

    Item Silverleaf found, stackcount: 20
    Item Silverleaf found, stackcount: 20
    Item Silverleaf found, stackcount: 17
    Item Swifthistle found, stackcount: 14

    Now, just iterate through the list and add the stackcount of each Silverleaf object to a counter, voila "getItemCount"
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  9. #9
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wouldn't have say that is the maximum stack without checking it before...
    Maybe I've the wrong address for it and if so I'm sorry for bothering you.
    Code:
    ITEM_FIELD_STACK_COUNT = 0x20

  10. #10
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shamun View Post
    I wouldn't have say that is the maximum stack without checking it before...
    Maybe I've the wrong address for it and if so I'm sorry for bothering you.
    Code:
    ITEM_FIELD_STACK_COUNT = 0x20
    Straight from the sticky :
    Code:
    ITEM_FIELD_STACK_COUNT = 0xE
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  11. #11
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've got mine straight from wowx but I'll try your

  12. #12
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The descriptor value you use will depend on whether your enum is pre or post multiplication, and whether your enums are generated using inheritance.

    Keep that in mind at all times and be consistent.

  13. #13
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use wowx frameworks so it uses inheritance and multiplication...
    The sticky should be multiple by 4 right?

  14. #14
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shamun View Post
    I use wowx frameworks so it uses inheritance and multiplication...
    The sticky should be multiple by 4 right?
    yes sir! .. 0xE * 4
    Last edited by Nesox; 12-28-2008 at 06:07 PM.

  15. #15
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks...

Page 1 of 2 12 LastLast

Similar Threads

  1. count items in bag
    By wineggdrop in forum Diablo 3 Memory Editing
    Replies: 2
    Last Post: 03-01-2013, 03:54 AM
  2. item count vs paragon levels
    By KillerJohn in forum Diablo 3 Bots and Programs
    Replies: 5
    Last Post: 12-01-2012, 02:04 PM
  3. Full Guide for Dungeon Set 1 items (all classes)
    By Cush in forum World of Warcraft Guides
    Replies: 13
    Last Post: 09-07-2006, 03:07 PM
  4. Double Disenchant items MAKE TONS OF GOLD
    By Matt in forum World of Warcraft Exploits
    Replies: 16
    Last Post: 04-05-2006, 03:07 AM
  5. Replies: 1
    Last Post: 03-20-2006, 12:16 AM
All times are GMT -5. The time now is 07:32 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search