that's the member that I was looking for since I run a different AIF now.
item.ItemLevel >= 80 should work
Thanks a lot mate
that's the member that I was looking for since I run a different AIF now.
item.ItemLevel >= 80 should work
Thanks a lot mate
item.PROPERTY
item.FullName
item.IsGem
item.InventorySquareValue
item.OverallResistancesPct
Dude y? It's gonna break my custom shit kappa. No more Mirror Dupe creation task for you tonyx.Everything you can find in the "/Classes/EvaluableItem.cs" file can be used with
Code:item.PROPERTY
like
Code:item.FullName item.IsGem item.InventorySquareValue item.OverallResistancesPct
// EDIT //
And for InfiniteMonkey's suggestion about dropping items on floor, I'll figure a way to code it, tho You'll have to let the "On-the-fly identification" checked.
For a simple reason, I don't want the bot to be slowed down for everyone or block currency farming.
It's gonna be optional ofc. I don't want my bot to force that kind of logic Kappa
Some of the devs have snippets for it, I'll add it as a generic task so I don't have to figure out any execution flow.
Anyway, I have to modify the way "specific tab" stashing works, I want it to work on FullName instead of fixed currency, so people can stash anything in any tabs.
How exactly does on-the-fly identification work? Whenever I tested it, I just ended up selling a bunch of unidentified rares.And for InfiniteMonkey's suggestion about dropping items on floor, I'll figure a way to code it, tho You'll have to let the "On-the-fly identification" checked.
For a simple reason, I don't want the bot to be slowed down for everyone or block currency farming.
It's gonna be optional ofc. I don't want my bot to force that kind of logic Kappa
It identifies as things get picked up. If recipe slider is full for that item. Ie item is not recipe item. I think I was the logic for that and I derped somewhere, and totally forgot.How exactly does on-the-fly identification work? Whenever I tested it, I just ended up selling a bunch of unidentified rares.
Neat Idea.Feature request.
Could you add some delegate to ItemEvaluator so I could add my IItemEvaluator to work with AIF? Right now it's only possible to replace ;/ API lacks in supporting multipe IItemEvaluator (I think, am I wrong?)
Feature request.
Could you add some delegate to ItemEvaluator so I could add my IItemEvaluator to work with AIF? Right now it's only possible to replace ;/ API lacks in supporting multipe IItemEvaluator (I think, am I wrong?)
I could add my item as Loki.Bot.ItemEvaluator.Instance and AIF will use it as static evaluator but I dont know what does DefaultItemEvaluator do and I'm afraid I'll fuck something up.- Not going to work
Doesn't the Evaluator get set on start()? AFIK you gota stop bot and start to load a new eval? Unless we can load multi eval like before.give me an example of usage or the use of it and i'll take a look at it
AIF overwrites the ItemEvaluator in each tick. Multiple ItemEvaluators that could work at once would be badass.Doesn't the Evaluator get set on start()? AFIK you gota stop bot and start to load a new eval? Unless we can load multi eval like before.
Had to check to make sure, that's not the case, it only overwrites if it's not said eval.https://stackoverflow.com/questions...re-a-good-practice-for-this/26452223#26452223
AIF overwrites the ItemEvaluator in each tick. Multiple ItemEvaluators that could work at once would be badass.
if (Loki.Bot.ItemEvaluator.Instance.Name != ItemEvaluator.Name)
{
DefaultItemEvaluator = Loki.Bot.ItemEvaluator.Instance;
ItemEvaluator.StaticItemEvaluator = DefaultItemEvaluator;
Loki.Bot.ItemEvaluator.Instance = ItemEvaluator;
Log.DebugFormat("[{0}] Default ItemEvaluator : {1}", Name, DefaultItemEvaluator.Name);
Log.DebugFormat("[{0}] AIF ItemEvaluator {1}", Name, Loki.Bot.ItemEvaluator.Instance.Name == ItemEvaluator.Name ? "has been set properly" : "has not been set properly ! BE CAREFUL !");
}
static event Func<string, bool> TheEvent;
static bool Program_TheEvent(string arg)
{
Console.WriteLine("1");
return false;
}
static bool Program_TheEvent2(string arg)
{
Console.WriteLine("2");
return false;
}
static bool Program_TheEvent3(string arg)
{
Console.WriteLine("3");
return true;
}
TheEvent += Program_TheEvent;
TheEvent += Program_TheEvent2;
TheEvent += Program_TheEvent3;
//Calling each function in the list
bool isValid = false;
if (TheEvent != null)
{
foreach (Func<string, bool> func in TheEvent.GetInvocationList())
{
isValid = func("s");
if (isValid)
break;
Console.WriteLine("isValid {0}", isValid);
}
}
Console.WriteLine("isValid {0}", isValid);
It would write 3?Ok here's working example
Code:static event Func<string, bool> TheEvent; static bool Program_TheEvent(string arg) { Console.WriteLine("1"); return false; } static bool Program_TheEvent2(string arg) { Console.WriteLine("2"); return false; } static bool Program_TheEvent3(string arg) { Console.WriteLine("3"); return true; } TheEvent += Program_TheEvent; TheEvent += Program_TheEvent2; TheEvent += Program_TheEvent3; //Calling each function in the list bool isValid = false; if (TheEvent != null) { foreach (Func<string, bool> func in TheEvent.GetInvocationList()) { isValid = func("s"); if (isValid) break; Console.WriteLine("isValid {0}", isValid); } } Console.WriteLine("isValid {0}", isValid);
For my AutoEquip to pickup flasks if they are better than the ones currently held, also item stashing based on their weight. Much easier to write cool stuff than in json.OH, I get what you are getting at. But why do you need multi evals?
It would break on the first function that returns true.It would write 3?
We have python for that, and Quest items are picked up by default. I have that check in QP's Tick because I need to know if it's actually picked up. Since OnLoot does a notify of an attempt, but has no return if it's actually picked up.For my AutoEquip to pickup flasks if they are better than the ones currently held, also item stashing based on their weight. Much easier to write cool stuff than in json.
With this you could edit your QuestPlugin to pickup all those quests stuff just with one file with few lines of code.
We have python for that, and Quest items are picked up by default. I have that check in QP's Tick because I need to know if it's actually picked up. Since OnLoot does a notify of an attempt, but has no return if it's actually picked up.
Still don't get what you are trying to do, if you customize something, talk to tony about adding it into AIF, otherwise, be like me and keep a separate copy.I know we have python, that would be much easier and won't require forking the whole AIF (in my cause it would be a must).
Still don't get what you are trying to do, if you customize something, talk to tony about adding it into AIF, otherwise, be like me and keep a separate copy.
Ah, what I do is just make my tasks on my own file and call it. That's the jist of it. Talk to tonyx and tell him what you did, he's really, easy on things like this. Just don't tell him his p- nm.The problem with forking is that each time tony's realease new version I'd need to check every file for changes he made. And he's not releasing them in small portions, it's always huge big ass whole new logic updates![]()
Ah, what I do is just make my tasks on my own file and call it. That's the jist of it. Talk to tonyx and tell him what you did, he's really, easy on things like this. Just don't tell him his p- nm.
public event Func<Item, EvaluationType, bool> MatchEvent;
//Calling each function in the event list
if (MatchEvent != null)
{
foreach (var func in MatchEvent.GetInvocationList().Cast<Func<Item, EvaluationType, bool>>())
if (func(item, type))
return true;
}
if (name == "ItemEvaluatorMatch")
{
var itemParam = param[0] as Func<Item, EvaluationType, bool>;
ItemEvaluator.MatchEvent += itemParam;
return true;
}
public bool MyMatch(Item item, EvaluationType type)
{
StashBuddy.Log.DebugFormat("[MyMatch] Found: {0}", item.Name);
return false;
}
dynamic[] obj =
{
(Func<Item, EvaluationType, bool>)MyMatch
};
MiscHelpers.GenericExecute<bool>("AdvancedItemFilter", "ItemEvaluatorMatch", obj );