What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Plugin] IDonLoot - Identify Items while in game IDonLoot

WhereIsMyMind

Member
Joined
Oct 12, 2013
Messages
848
o/

For Animate Guardian and Animate weapon I need ID'd items. So this plugin does that.
The name is a little misleading as the plugin does not ID at looting time as I could not find a way to hook that. So once a minute the bot will check, once out of combat, for unID'd items and, if rare, will ID them.

Things you can change with a text editor against the IDonLoot.cs:
1) private static readonly TimeSpan ExecuteInterval = new TimeSpan(0, 1, 0); //hr,min,sec this is the period between checks
2) private bool ShouldIdItem(Item item, object user). You can change this method to configure what you wanted ID'd or not.

Note this is fresh off the IDE and I have seen it working a few times, so untested is the best way to put it.

Thanks to:
toNyx

WIMM
 

Attachments

o/

For Animate Guardian and Animate weapon I need ID'd items. So this plugin does that.
The name is a little misleading as the plugin does not ID at looting time as I could not find a way to hook that. So once a minute the bot will check, once out of combat, for unID'd items and, if rare, will ID them.

Things you can change with a text editor against the IDonLoot.cs:
1) private static readonly TimeSpan ExecuteInterval = new TimeSpan(0, 1, 0); //hr,min,sec this is the period between checks
2) private bool ShouldIdItem(Item item, object user). You can change this method to configure what you wanted ID'd or not.

Note this is fresh off the IDE and I have seen it working a few times, so untested is the best way to put it.

Thanks to:
toNyx

WIMM
Hey WhereIsMyMind, I'm working on something similar for maps to drop trash after Iding them.
What you want to do is the event listener for item pickup.

But first, ExVault's cheat
Code:
using Inventory = Loki.Game.LokiPoe.InGameState.InventoryPanel;
then for good measure declare a int in our main for our check in case;
Code:
int _dropErrorCount = 0;
then in our main's start method add the listener
Code:
BasicGrindBot.OnLoot += BgbOnOnLoot;
don't forget to add it to be removed in our main's stop method
Code:
BasicGrindBot.OnLoot -= BgbOnOnLoot;
then the code that it checks on every item loot
Code:
private void BgbOnOnLoot(object sender, BasicGrindBot.OnLootEventArgs onLootEventArgs)
        {
            if (onLootEventArgs.Rarity == Rarity.Rare)
            {
                //Do Checks here for items
                //.....

                //then call the drop function if it's trash
            }
        }

For Dropping simply do this.

Code:
public async Task<bool> DropItemToGround(Item item)
        {
            
            if (_dropErrorCount == 30)
            {
                Log.ErrorFormat("[DropItemToGround] Drop Error Count Exceeded Limit. Stoping Bot");
                BotManager.Stop();
            }
            if (!LokiPoe.InGameState.IsInventoryPanelOpen)
            {
                await Coroutines.OpenInventoryPanel();
                if (!LokiPoe.InGameState.IsInventoryPanelOpen)
                {
                    Log.ErrorFormat("[DropItemToGround] Open Inventory Failed, retry");
                    return false;
                }
            }
            if (item != null)
            {
                foreach (Item invItems in Inventory.MainInventory.Items)
                {
                    if (item.Name == invItems.Name)
                    {
                        string itemName = item.Name;
                        Inventory.PickupMainToCursor(item);
                        await Coroutine.Sleep(Utility.LatencySafeValue(400));
                        if (!Inventory.CursorInventory.ContainsItem(item.Name))
                        {
                            Log.ErrorFormat("[DropItemToGround] Pickup {0} failed, retry", item.Name);
                            return false;
                            //Inventory.PickupMainToCursor(item);
                        }
                        LokiPoe.Input.MoveMouseToPosition(LokiPoe.Me.Position);
                        await Coroutine.Sleep(Utility.LatencySafeValue(100));

                        LokiPoe.Input.ClickLMB();
                        await Coroutine.Sleep(Utility.LatencySafeValue(500));

                        if (Inventory.CursorInventory.ContainsItem(itemName))
                        {
                            _dropErrorCount++;
                            Log.ErrorFormat("[DropItemToGround] Drop {0} failed, retry #{1}", itemName, _dropErrorCount);
                            return false;
                            //LokiPoe.Input.ClickLMB();
                        }
                    }
                }
            }
            return false;
        }

Of Course you have to code the item check stats yourself, look at jyam's code for examples.
But that's the jist of that, I have a similar code running that saves substantial amount of space since I run 74 maps mainly and the rares are absurd. It logs all the rares it drops, then grabs them after map is 100% and there are portals remaining.
Best of luck, and keep at it, you get better with practice.
 
Back
Top