Hey. Um so the coroutine goes like thisIf I use "Coroutines.WithdrawItemsCoroutine", is it true that the routine always starts from the first tab?
If there is a way to start from a particular tab, can you tell me how?
Coroutines.WithdrawItemsCoroutine(ShouldWithdrawFromTab, ShouldWithdrawItem, ContinueWithdrawing);
var wierr =
await
Coroutines.WithdrawItemsCoroutine(ShouldWithdrawFromTab, ShouldWithdrawItem, ContinueWithdrawing);
if (wierr != Coroutines.WithdrawItemsCoroutineError.None)
{
Log.ErrorFormat("[WithDrawItemsTask] WithdrawItemsCoroutine returned {0}.", wierr);
BotManager.Stop();
}
else
{
Log.InfoFormat(
"[WithDrawItemsTask] Withdrawing has completed.");
BotManager.Stop();
}
private bool ShouldWithdrawItem(Item item, out int count, object user)
{
////Your code here
return true
}
private bool ShouldWithdrawFromTab(InventoryTab tab, object user)
{
return true;
}
private bool ContinueWithdrawing(object user)
{
if (LokiPoe.InGameState.InventoryPanel.MainInventory.AvailableInventorySquares == 0)
{
return false;
}
return true;
}
Loki.Bot.Logic.Bots.BasicGrindBot.StashTask.StashTask(Loki.Bot.v3.Coroutines.NeedsToStashDelegate, Loki.Bot.v3.Coroutines.StashingCompleteDelegate, Loki.Bot.v3.Coroutines.StashItemsDelegate, Loki.Bot.v3.Coroutines.BestStashTabForItem, [object])
If I use "Coroutines.WithdrawItemsCoroutine", is it true that the routine always starts from the first tab?
If there is a way to start from a particular tab, can you tell me how?
public class RuntimeCode
{
private static readonly ILog Log = Logger.GetLoggerInstanceForType();
public void Execute()
{
using(LokiPoe.AcquireFrame())
{
List<Item> itemlist=Loki.Game.LokiPoe.InGameState.StashPanel.CurrentTabItems;
foreach(var item in itemlist)
if (item.Name=="Raise Spectre")
Loki.Game.LokiPoe.InGameState.StashPanel.FastMove(item);
}
}
}
Hey dude, did you make sure thatCan you say more how to use the FastMove function?
I tried it in the Dev tab with my stash open:
Code:public class RuntimeCode { private static readonly ILog Log = Logger.GetLoggerInstanceForType(); public void Execute() { using(LokiPoe.AcquireFrame()) { List<Item> itemlist=Loki.Game.LokiPoe.InGameState.StashPanel.CurrentTabItems; foreach(var item in itemlist) if (item.Name=="Raise Spectre") Loki.Game.LokiPoe.InGameState.StashPanel.FastMove(item); } } }
Nothing happened. Do I have to move my cursor to the object first?
Loki.Game.LokiPoe.InGameState.IsStashPanelOpen
Loki.Game.LokiPoe.InGameState.IsInventoryPanelOpen
if (item.Name=="Raise Spectre")
{
var res = Loki.Game.LokiPoe.InGameState.StashPanel.FastMove(item);
Log.InfoFormat("FastMove returned {0}", res);
}
You always want to store the result of the API function and log/process it to know what is going on. Change that to:
to understand why it did nothing.Code:if (item.Name=="Raise Spectre") { var res = Loki.Game.LokiPoe.InGameState.StashPanel.FastMove(item); Log.InfoFormat("FastMove returned {0}", res); }
Once you've done that, you can switch to the client, and press alt + shift + e to enable the ProcessHookManager, and then alt + shift + d to disable it. I thought I had that info in the Dev tab guide, but I'll get it added now, as I see I've only mentioned it in a few threads in response to issues with it.
Alternatively, you'll want to enable/disable it in the code itself by using the API function before calling any functions that perform input actions.