Jump to content

Manual Looting of bodies?


Zan

Recommended Posts

Is there a way to move to a lootable corpse and loot it manually? I attempted a few ways but I just couldn't get it to work. I was wondering if anyone knew a way. Thanks in advance!

Link to comment
Share on other sites

This should work in a pulse method:

        WoWLocalPlayer me = ObjectManager.Me;
        WoWUnit LootableUnit =
            ObjectManager.GetObjectWoWUnit()
                .Where(i => i.IsLootable)
                .OrderBy(i => i.Position.DistanceTo(ObjectManager.Me.Position))
                .FirstOrDefault();

        if (LootableUnit != null
            && MovementManager.CurrentPath.LastOrDefault() != LootableUnit.Position
            && LootableUnit.Position.DistanceTo(me.Position) > 5)
        {
            MovementManager.Go(PathFinder.FindPath(LootableUnit.Position));
        }
        else if (LootableUnit.Position.DistanceTo(me.Position) < 5
            && !me.IsLooting())
        {
            Interact.InteractGameObject(LootableUnit.GetBaseAddress, true);
        }

 

Link to comment
Share on other sites

        var lootables = ObjectManager.GetObjectWoWUnit().Where(u => u != null && u.IsValid && u.IsLootable).ToList();
        if (lootables != null && lootables.Count > 0)
        {
            LootingTask.Pulse(lootables);
        }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...