DPB1Class ยท Bots, plugins and tasks

Coroutines

Asynchronous helpers for timing, interaction and common game actions. Await these helpers within the bot workflow.

Namespace: DreamPoeBot.Loki.Bot

public static class CoroutinesView DPB2 version โ†’

Examples

Imports used by these examples
using System;
using System.Linq;
using DreamPoeBot.Loki.Game;
using DreamPoeBot.Loki.Game.Objects;
using DreamPoeBot.Loki.Bot;
using DreamPoeBot.Loki.Bot.Pathfinding;
using DreamPoeBot.Loki.Common;

Yield to the normal interaction timing

if (!LokiPoe.IsInGame)
    return;

await Coroutines.FinishCurrentAction();
await Coroutines.LatencyWait();

Use inside the bot's asynchronous workflow. Do not block the bot thread with Thread.Sleep.

Members and overloads

1 results
Show all members

Loot

MethodLink โ†—
public static Task<LootResult> Coroutines.Loot(NetworkObject obj, bool shouldMove = true, int tmeout = 250, bool autoEquip = true)

Attempts to pick up a WorldItem. When shouldMove is enabled, the character may move into interaction range before picking it up.

objNetworkObject
The WorldItem to pick up.
shouldMovebool
Whether the character may move into interaction range. If false, the method returns DreamPoeBot.Loki.Game.LootResult.ShouldMove when movement is required.
tmeoutint
The maximum time, in milliseconds, to wait for the interaction. Allow enough time for movement when shouldMove is true.
autoEquipbool
True to allow the game to equip the collected item automatically when the game permits it; false to collect it without requesting automatic equipment.

Returns: DreamPoeBot.Loki.Game.LootResult.None when the interaction was started; otherwise, a value describing why it could not be started.

DPB1 0.3.29.47 ยท Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.