DPB2Class ยท 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 DPB1 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

ExInteractWith

MethodLink โ†—
public static Task<Vector2i> Coroutines.ExInteractWith(NetworkObject obj, bool holdCtrl = false, int timeout = 1000)

Attempts to interact with a game object and reports the resulting interaction position. The character may move into range first.

objNetworkObject
The game object to interact with.
holdCtrlbool
Whether to hold the Control key during the interaction.
timeoutint
The maximum time, in milliseconds, allowed for the interaction.

Returns: The reported interaction position, or DreamPoeBot.Common.Vector2i.Zero when the attempt fails.

DPB2 0.4.5.88 ยท 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.