[solved] Is Lootable menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    grosfilsdepute's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [solved] Is Lootable

    Hello!

    I'm using this code snippet to see if an unit is lootable or not:

    Code:
            public bool IsLootable
            {
                get { return Convert.ToBoolean(Memory.Instance.MemoryReader.Read<uint>(new IntPtr(
                            m_ObjectDescriptor + Offsets.UNIT_DYNAMIC_FLAGS)) & 0x0D); }
            }
    Ripped off BabBot, but it doesn't seem to work. It's always returning true even if the mob cannot be looted.

    Any ideas ? Thanks for everything.
    Last edited by grosfilsdepute; 09-29-2009 at 08:29 PM.

    [solved] Is Lootable
  2. #2
    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)
    Maybe you should see how that function and that descriptor work.

  3. #3
    grosfilsdepute's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...
    I don't know what to say.

    Code:
            private enum UnitDynamicFlags
            {
                None = 0,
                Lootable = 0x1,
                TrackUnit = 0x2,
                TaggedByOther = 0x4,
                TaggedByMe = 0x8,
                SpecialInfo = 0x10,
                Dead = 0x20,
                ReferAFriendLinked = 0x40,
                IsTappedByAllThreatList = 0x80,
            }
    Code:
            public bool IsLootable
            {
                get { return Convert.ToBoolean(Memory.Instance.MemoryReader.Read<uint>(new IntPtr(
                            m_ObjectDescriptor + Offsets.UNIT_DYNAMIC_FLAGS)) & 1); }
            }
    Last edited by grosfilsdepute; 09-29-2009 at 08:36 PM.

  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)
    Uhm. I'm pretty sure that means you should use:

    Code:
    Convert.ToBool((retnval) & 0x29);
    For TaggedByMe, Dead, Lootable. Not sure if you have to use all or just lootable in case that it only returns for local char. Just screw around with it and you might learn more.

  5. #5
    ostapus's Avatar Active Member
    Reputation
    60
    Join Date
    Nov 2008
    Posts
    180
    Thanks G/R
    3/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    corpse might not be TaggedByMe but lootable

  6. #6
    EmilyStrange's Avatar Active Member
    Reputation
    34
    Join Date
    Jul 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Keeping a list, checking it twice...

    You can test the lootable flag and you can also keep a list of all mobs you have attacked (and killed). Once you are out of combat, sort your list of mobs by distance (or use a simple connected graph) to built a route to loot all of the corpses. Stick the corpse GUID into the CTM GUID or current target GUID, move close to the corpse, and then interact with the target (CTM->Loot) or send interact key press (whatever you set that as in your key bindings). Once you have looted the corpse, you can remove it from your lootable list.

    You can also, if you are in a party, get the party member list and any time a mob targets the GUID of one of your party members, record that too, once you are out of combat, check that the mob is dead, and then check for lootable status (this can change based on loot preferences in the party), and loot if appropriate.

    Relying just on the lootable flag can get tricky in anything but the most simplistic of situations.

  7. #7
    grosfilsdepute's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by EmilyStrange View Post
    You can test the lootable flag and you can also keep a list of all mobs you have attacked (and killed). Once you are out of combat, sort your list of mobs by distance (or use a simple connected graph) to built a route to loot all of the corpses. Stick the corpse GUID into the CTM GUID or current target GUID, move close to the corpse, and then interact with the target (CTM->Loot) or send interact key press (whatever you set that as in your key bindings). Once you have looted the corpse, you can remove it from your lootable list.

    You can also, if you are in a party, get the party member list and any time a mob targets the GUID of one of your party members, record that too, once you are out of combat, check that the mob is dead, and then check for lootable status (this can change based on loot preferences in the party), and loot if appropriate.

    Relying just on the lootable flag can get tricky in anything but the most simplistic of situations.
    Thanks for this complete answer. I'm rewriting parts of my bot now.

  8. #8
    EmilyStrange's Avatar Active Member
    Reputation
    34
    Join Date
    Jul 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting snazzy for snazzy's s(n)ake

    If you want to get really snazzy, you can check where the mob died, and see if it is surrounded by other (currently alive) mobs and therefore, not safely lootable. This can happen if you have a patrolling group of mobs, or just managed to get off a lucky shot.

    If the corspse is too close, ignore looting it for now and leave it for later.

    Time stamping the unit's corpse in your lootable list will let you expire the corpse from the lootable list if you haven't been able to get close within a preset time limit, e.g. five minutes.

    This functionality provides the facility of not dieing quite so often when running your bot. It is also very useful if your bot runs through dungeons, or works within a party, as the last thing you want is your bot running off to loot something that might pull another group or the boss.

    This is essentially how my multiboxing "bot" works, (not really a bot in the classic sense as it is meant to aid the human player, not supplant them) ensuring that extra mobs aren't pulled until everyone has recuperated from the last fight.

  9. #9
    grosfilsdepute's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For the searchers, or for those who can't get a proper working loot function, here is how I make it. It's not perfect but it works fine.

    I'm not using CTM loot because it doesn't work as expected, the player is bending down but it's not getting items.

    Before the loot and when the combat is finished (the mob died), I'm checking if the mob is lootable.

    So, I'm making this by writing in the player target GUID (for the current version 3.2.2a: 0x113D7A the GUID of the last killed. EmilyStrange explained this in her post. And I'm pressing the key "Interact with target". I'm always checking if the lootframe is opened so, I'm pressing another time the key "Interact with target" and I'm waiting 1 second. The loot is finished.

    Hope this helps. Feel free to comment.
    Last edited by grosfilsdepute; 10-01-2009 at 08:59 PM.

Similar Threads

  1. How To Make Your Server Public With Out Hamachi Problem Solved
    By bomber1392 in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 12-12-2007, 03:35 AM
  2. Help solve world hunger.
    By Poofy in forum World of Warcraft General
    Replies: 18
    Last Post: 10-29-2007, 01:05 PM
  3. Solve this for rep!
    By Gelormino in forum Community Chat
    Replies: 21
    Last Post: 09-22-2007, 01:14 PM
  4. if you solve this i will reward you
    By Ark in forum Gaming Chat
    Replies: 39
    Last Post: 08-08-2007, 12:56 PM
All times are GMT -5. The time now is 03:11 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