Jump to content

Recommended Posts

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
https://wrobot.eu/forums/topic/5754-manual-looting-of-bodies/#findComment-26198
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
https://wrobot.eu/forums/topic/5754-manual-looting-of-bodies/#findComment-26230
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...