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

FinishCurrentAction

MethodLink โ†—
public static Task Coroutines.FinishCurrentAction(bool resetInput = true)

This function make sure we are not actually performing another action, and if so, it wait till the end of that action, or the default timeout (5000ms). You usually call this to make sure a previous action you performed (cast a non instant skill, MoveToward etc etc) run to completition, before to perform another one.

resetInputbool
True, if you want to reset all key state after the current action completed.

Returns: An asynchronous operation. Await it before reading the result or continuing the workflow.

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.