//upgrade to rare if needed
if (map.Rarity == Rarity.Normal && Settings.UpgradeTo == Rarity.Rare)
{
Log.Info("Now upgrading map to Rare.");
try
{
map = await StashHelper.UseOrbOnMap(map, "Orb of Alchemy");
}
catch (StashHelper.OrbNotFoundException ex)
{
Settings.UpgradeTo = Rarity.Magic;
Log.Error(ex.Message);
Log.Error("There are no required orbs. From now bot will use Magic maps.");
return true;
}
catch (StashHelper.StashException ex)
{
Log.Error(ex.Message);
return true;
}
if (StashHelper.HasBannedAffix(map))
{
Log.WarnFormat("[TakeMapTask] Banned affix spawned on rare map. Lets try another one.");
return true;
}
Log.Info("Map has been successfully upgraded to Rare.");
}
//upgrade to rare if needed
if (map.Rarity == Rarity.Normal && Settings.UpgradeTo == Rarity.Rare)
{
Log.Info("Now upgrading map to Rare.");
try
{
map = await StashHelper.UseOrbOnMap(map, "Orb of Alchemy");
[B]map = await StashHelper.RerollRareMap(map);[/B]
}
catch (StashHelper.OrbNotFoundException ex)
{
Settings.UpgradeTo = Rarity.Magic;
Log.Error(ex.Message);
Log.Error("There are no required orbs. From now bot will use Magic maps.");
return true;
}
catch (StashHelper.StashException ex)
{
Log.Error(ex.Message);
return true;
}
Log.Info("Map has been successfully upgraded to Rare.");
}
public static async Task<Map> RerollRareMap(Map map)
{
bool isGood = false;
Map goodMap = map;
while (!isGood)
{
if (HasBannedAffix(goodMap))
{
goodMap = await UseOrbOnMap(goodMap, "Orb of Scouring");
continue;
}
isGood = true;
}
return goodMap;
}
the desert anyone? That map killed my bot instantly.
i watched a bot and realized when they come back in they try to use enduring cry which takes off immunity, they do this before leaping/lightning warping away or before attackingIs there a way to change the behavior of TPing inside a boss room to TPing outside a boss room? With my DeathLogger, I found that most of my deaths happen when TPing back into a boss room. Somehow, while initializing itself, the bot triggers the in-game immunity off while still performing no actions. The monsters of the boss room then have a free second to try to kill you, which is often enough.
Is there a way to change the behavior of TPing inside a boss room to TPing outside a boss room? With my DeathLogger, I found that most of my deaths happen when TPing back into a boss room. Somehow, while initializing itself, the bot triggers the in-game immunity off while still performing no actions. The monsters of the boss room then have a free second to try to kill you, which is often enough.
private static async Task<bool> TakeTransition(NetworkObject transitionObject)
{
if (transitionObject == null)
{
Log.Error("[AreaTransitionTask] Fail to detect area transition.");
return false;
}
await Coroutine.Sleep(1000);
await Coroutines.CreatePortalToTown();
await Coroutine.Sleep(1000);
const int maxAttempts = 5;
int attempts = 0;
while (true)
{
++attempts;
var isTaken = await Coroutines.TakeAreaTransition(transitionObject, false, int.MaxValue, true);
if (isTaken == Coroutines.TakeAreaTransitionError.None) break;
Log.ErrorFormat("[AreaTransitionTask] Fail to take area transition. Error: \"{0}\". Attempt {1}/{2}",
isTaken, attempts, maxAttempts);
if (attempts >= maxAttempts) return false;
}
FlushTransitions();
AreaStateCache.Current.ClearBlacklist();
AreaStateCache.Current.Explorer.Reset();
MapRunner.EventInvocators.RaiseAreaTransitionEnteredEvent();
return true;
}
await Coroutine.Sleep(1000);
await Coroutines.CreatePortalToTown();
await Coroutine.Sleep(1000);
Found 137 maps in current stash tab
Found 108 maps with proper level range
Found 108 maps with proper name.
Map of choice is "Dunes Map" (68).
[FastMoveFromStash] Fast moving Dunes Map from {2, 9}.
[Tick] Exception during execution:Buddy.Coroutines.CoroutineUnhandledException: Exception was thrown by coroutine ---> System.Exception: Nur ein Teil der ReadProcessMemory- oder WriteProcessMemory-Anforderung wurde abgeschlossen, at addr: C0E00000, Size: 16
bei GreyMagic.ExternalProcessMemory.ReadByteBuffer(IntPtr addr, Void* buffer, Int32 count)
bei GreyMagic.MemoryBase.Read[T](IntPtr addr)
bei Loki.Game.Std.Containers.StdList[TValue](NativeList nativeList, ExternalProcessMemory m)
bei Loki.Game.Std.Containers.StdHashMap[TKey,TValue](NativeHashMap nativeHashMap, ExternalProcessMemory m)
bei Loki.Game.LokiPoe.InGameState.StashPanel.get_CurrentTabsVisibleItemControls()
bei Loki.Game.LokiPoe.**********(IntPtr )
bei Loki.Game.LokiPoe.InGameState.StashPanel.FastMove(Item item)
bei MapRunner.StashHelper.<FastMoveFromStash>d__26.MoveNext() in g:\Users\XXX\Desktop\xxxXXXxxx3\Plugins\MapRunner\StashHelper.cs:Zeile 243.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
bei MapRunner.TakeMapTask.<Logic>d__0.MoveNext() in g:\Users\XXX\Desktop\xxxXXXxxx3\Plugins\MapRunner\TakeMapTask.cs:Zeile 52.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Loki.Bot.TaskManager._Q:\,\\kl@PV\&vQ{}`Iw)(qPn`.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
bei Loki.Bot.Logic.Bots.OldGrindBot.OldGrindBot.GDCw)@3tWW1^ZG/%J)\[s |6l>.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Buddy.Coroutines.Coroutine.e\*5p8)V4)\]AB!\\2W%SnBMe$E'.nCBI65V\]\[|'ma`}<zW>SqxZ^!.MoveNext()
--- Ende der internen Ausnahmestapelüberwachung ---
bei Buddy.Coroutines.Coroutine.************(Boolean )
bei Buddy.Coroutines.Coroutine.*******(Boolean )
bei Buddy.Coroutines.Coroutine.Resume()
bei Loki.Bot.Logic.Bots.OldGrindBot.OldGrindBot.Tick()
bei Loki.Bot.BotManager.**********(IBot )
bot is not taking the scrolls from the stashThat was the bot API issue. Pushedx fixed it. Plugin is working as before.