So, I had this thought... The bot should basically pick up any items that are visible (leveraging PoE's built in item filtering). This is mostly for those of us who are really only interested in picking up items that our current in-game filters show. (This also makes switching between sets of filters very easy) That said, here's my stuff that I'm currently using. Please note; the sell requirements are pretty much my own, and I don't suggest using this as-is unless you can read and understand what it does. Code: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Controls; using log4net; using Loki.Bot; using Loki.Common; using Loki.Game; using Loki.Game.GameData; using Loki.Game.Objects; using Newtonsoft.Json; namespace PathFilterToExileFilter { public class GameItemEvaluator : IItemEvaluator { private static readonly ILog Log = Logger.GetLoggerInstanceForType(); public static GameItemEvaluator Instance = new GameItemEvaluator(); /// <inheritdoc /> public bool Match(Item item, EvaluationType type) { switch (type) { case EvaluationType.None: break; case EvaluationType.PickUp: if (item.HasWorldItemInformation && LokiPoe.Input.HasVisibleHighlightLabel(LokiPoe.ObjectManager.GetObjectById<WorldItem>(item.WorldItemId))) { Log.Info("[GameItemEvaluator] Picking up " + item.Name + " because it is visible!"); return true; } // Include all currency, because why not? Right? if (item.Rarity == Loki.Game.GameData.Rarity.Currency) { Log.Info("[GameItemEvaluator] Picking up " + item.Name + " because it is currency!"); return true; } return false; case EvaluationType.Save: // Save everything by default? return true; case EvaluationType.Sell: // Sell 6L shitty gear var sockets = item.SocketCount; var links = item.LinkedSocketColors; // Pls no sell currency... kthx if (item.Rarity == Loki.Game.GameData.Rarity.Currency) return false; // Don't sell any 6L items, ever. We always want to trade these off to people. 6L's are way too rare. if (item.SocketLinks.Max() == 6) return false; // 6S low item level if (item.Rarity <= Loki.Game.GameData.Rarity.Magic && item.ItemLevel < 74 && sockets == 6) return true; // RGB low item level if (item.Rarity <= Loki.Game.GameData.Rarity.Magic && item.ItemLevel < 74 && LokiPoe.MatchesSocketColors("R-G-B", item.SocketColors, item.SocketLinks)) return true; break; case EvaluationType.Buy: break; case EvaluationType.Id: break; default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } return false; } /// <inheritdoc /> public string Name { get; } = "GameItemEvaluator"; } public class GameItemEvaluatorPlugin : IPlugin, IStartStopEvents { /// <inheritdoc /> public UserControl Control { get; } /// <inheritdoc /> public JsonSettings Settings { get; } /// <inheritdoc /> public MessageResult Message(Message message) { return MessageResult.Unprocessed; } /// <inheritdoc /> public string Name { get; } = "GameItemEvaluator"; /// <inheritdoc /> public string Author { get; } = "Apoc"; /// <inheritdoc /> public string Description { get; } = "A simple item evaluator that uses the in-game item filter to pick items, and some simple rules to sell items"; /// <inheritdoc /> public string Version { get; } = "1.0.0.1"; /// <inheritdoc /> public void Initialize() { } /// <inheritdoc /> public void Deinitialize() { } /// <inheritdoc /> public void Enable() { ItemEvaluator.Instance = GameItemEvaluator.Instance; } /// <inheritdoc /> public void Disable() { } /// <inheritdoc /> public async Task<LogicResult> Logic(Logic logic) { return LogicResult.Unprovided; } /// <inheritdoc /> public void Start() { ItemEvaluator.Instance = GameItemEvaluator.Instance; } /// <inheritdoc /> public void Stop() { } } }
apoc this sounds really cool, can you write a short approach how to utilize this? copy it as an plugin in an own folder?
Code: public static readonly GameItemEvaluator ItemEvaluator = new GameItemEvaluator(); Loki.Bot.ItemEvaluator.Instance = ItemEvaluator;
I understand right? That's addon, that pickups items based on thier visiblity with ingame itemfilter(like neversink)?
looks like but i didn't manage to make it work - tried to copy it with a 3rdparty json, and it loads... but it doesn't seem to work what it should would be so perfect to have thing like this. Someone could explain a bit how to make use of it?
Using this with AIF... if possible might be a great solution. No idea if it would help, but might speed up bot looting to only look at visible items for evaluation (not sure how this works at all). Or just customize filter to only show what you want then add the chaos recipe. Could do a filter to just show ilevel 60+ and currency/maps/uniques etc.