DPB1Class · Game state and actions

LokiPoe

Start here to check the client state, access the local player and identify the current area. Read in-game data only after checking IsInGame.

Namespace: DreamPoeBot.Loki.Game

public static class LokiPoe
Reference: DPB1 0.3.29.56Compare the DPB2 reference → Check signatures and usage notes separately; a matching type is not a compatibility guarantee.

Use this API

Class usage example: Check the client before reading →

Members and overloads

37 declared here

OnPasteTextFailed

EventLink ↗
public static LokiPoe.PasteTextFailedEvent LokiPoe.OnPasteTextFailed

Raised for on paste text failed. Subscribe with the callback type shown in the signature.

Event handler type: staticNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

ApplicationRuntime

FieldLink ↗
public static readonly Stopwatch LokiPoe.ApplicationRuntime

Return a StopWatch representing the current application runtime.

Value type: StopwatchNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

LabyrinthTrialAreaIds

FieldLink ↗
public static readonly string[] LokiPoe.LabyrinthTrialAreaIds

Return an array of strings representing the AreaId of all game areas that has a Trial area.

Value type: string[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Random

FieldLink ↗
public static readonly Random LokiPoe.Random

Return a global Random number generator class

Value type: RandomNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

StringStatTypeGGG

FieldLink ↗
public static readonly Dictionary<string, StatTypeGGG> LokiPoe.StringStatTypeGGG

Return a dictionary containing all the StatTypeGGG contained in the game data file.

Value type: Dictionary<string, StatTypeGGG>
Explore StatTypeGGG → members & methods

Stats Type as rapresented in the game ggpk file.

shouldDeclineNotification

FieldLink ↗
public static bool LokiPoe.shouldDeclineNotification

Reads or assigns should decline notification on LokiPoe as bool. The exact type and accessors are shown below.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

BeginDispatchIfNecessary

MethodLink ↗
public static void LokiPoe.BeginDispatchIfNecessary(Dispatcher dispatcher, Action action)

Utility to Dispatcher.BeginInvoke Actions only if necessary using a specific Dispatcher.

Return type: voidNo return value.

Parameters

dispatcher
Parameter type: DispatcherNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies dispatcher.

action
Parameter type: ActionNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies action.

BeginDispatchIfNecessary

MethodLink ↗
public static void LokiPoe.BeginDispatchIfNecessary(Action action)

Utility to Dispatcher.BeginInvoke Actions only if necessary.

Return type: voidNo return value.

Parameters

action
Parameter type: ActionNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies action.

DispatchIfNecessary

MethodLink ↗
public static void LokiPoe.DispatchIfNecessary(Dispatcher dispatcher, Action action)

Utility to Dispatcher.Invoke Actions only if necessary using a specific Dispatcher.

Return type: voidNo return value.

Parameters

dispatcher
Parameter type: DispatcherNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies dispatcher.

action
Parameter type: ActionNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies action.

DispatchIfNecessary

MethodLink ↗
public static void LokiPoe.DispatchIfNecessary(Action action)

Utility to Dispatcher.Invoke Actions only if necessary.

Return type: voidNo return value.

Parameters

action
Parameter type: ActionNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies action.

ElementClickLocation

MethodLink ↗
public static Vector2i LokiPoe.ElementClickLocation(Element element)

Calls ElementClickLocation on LokiPoe with element and returns Vector2i. Open the return contract below before using the result.

Return type: Vector2i
Explore Vector2i → members & methods

A two-dimensional integer position. Used by grid-position and pathfinding APIs; screen-position APIs may expect a different coordinate type.

Parameters

element

Specifies element.

Returns: The Vector2i result.

GetDescriptionFromStatTypeGGG

MethodLink ↗
public static string LokiPoe.GetDescriptionFromStatTypeGGG(StatTypeGGG stat)

Calls GetDescriptionFromStatTypeGGG on LokiPoe with stat and returns string. Open the return contract below before using the result.

Return type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

stat

Specifies stat.

Returns: The string result.

GetElement

MethodLink ↗
public static Element LokiPoe.GetElement<Element>(long address) where Element : RemoteMemoryObject, new()

Calls GetElement on LokiPoe with address and returns Element. Open the return contract below before using the result.

Return type: ElementNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

address
Parameter type: longNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies address.

Returns: The Element result.

GetGuiElements

MethodLink ↗
public static List<Element> LokiPoe.GetGuiElements()

Return a List of Elements that rapresent the entire game Gui.

Return type: List<Element>
Explore Element → members & methods

A game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.

Returns: The List<Element> result.

InvokeEvent

MethodLink ↗
public static void LokiPoe.InvokeEvent(Delegate d, params object[] args)

EventsInvoker.

Return type: voidNo return value.

Parameters

d
Parameter type: DelegateNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies d.

args
Parameter type: object[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies args.

MatchesSocketColors

MethodLink ↗
public static bool LokiPoe.MatchesSocketColors(string filterFormat, SocketColor[] itemSocketColors, byte[] itemSocketLinks)

Return a bool representing if a conbination of SocketColors and SoocketLinks array, contain a specific sockets patterns.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

filterFormat
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

A specific socket pattern that we are looking for: "R-G-B", "G-G R-B"

itemSocketColors
Parameter type: SocketColor[]

An array of SocketColor representing the colors in the item.

itemSocketLinks
Parameter type: byte[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

An array of byte representing the Links in the item.

Returns: A Boolean result. The member description explains the condition being checked.

MatchesSocketLayout

MethodLink ↗
public static bool LokiPoe.MatchesSocketLayout(Item item, string filterFormat)

Return a bool representing if a specific Item contain a specific sockets patterns. Ex "B W-B-B".

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

item

The item that will be checked.

filterFormat
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

A specific socket pattern that we are looking for: "R-G-B", "G-G R-B"

Returns: A Boolean result. The member description explains the condition being checked.

ScrapUI

MethodLink ↗
public static void LokiPoe.ScrapUI()

Calls ScrapUI on LokiPoe without arguments. This overload has no return value.

Return type: voidNo return value.

SignalPasteTextFailed

MethodLink ↗
public static void LokiPoe.SignalPasteTextFailed()

Calls SignalPasteTextFailed on LokiPoe without arguments. This overload has no return value.

Return type: voidNo return value.

BotWindow

PropertyLink ↗
public static Window LokiPoe.BotWindow { get; internal set; }

Return a Window object representing this application main window.

Value type: WindowNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

ClientVersion

PropertyLink ↗
public static LokiPoe.PoeVersion LokiPoe.ClientVersion { get; internal set; }

Game client Type of the selected instance of the game, only the Official Type is supported. ///

Value type: staticNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Initialized

PropertyLink ↗
public static bool LokiPoe.Initialized { get; set; }

Return a bool indicating the this application finished the initialization stag.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsBotFullyLoaded

PropertyLink ↗
public static bool LokiPoe.IsBotFullyLoaded { get; internal set; }

Return a bool indicatinf if this application has finished the loading stage and is ready to be used.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsInCharacterSelectionScreen

PropertyLink ↗
public static bool LokiPoe.IsInCharacterSelectionScreen { get; }

Return a bool indicating if we are in the Character Selection Screen.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsInCreateCharacterScreen

PropertyLink ↗
public static bool LokiPoe.IsInCreateCharacterScreen { get; }

Return a bool indicating if we are in the Create Character Screen.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsInGame

PropertyLink ↗
public static bool LokiPoe.IsInGame { get; }

Return a bool indicating if we are in game and ready to accept commands.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Class usage examples

These examples demonstrate the class, not every member listed above. Each example links the declarations it teaches.

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;

Check the client before reading

if (!LokiPoe.IsInGame || LokiPoe.Me == null)
    return;

var player = LokiPoe.Me;
var area = LokiPoe.CurrentWorldArea;

Run this guard in the bot workflow before reading character or area data.

Guides using this class

See how these APIs fit together. Labs include complete source; the FollowBot walkthrough teaches you to build your own bot from selected fragments and checkpoints.

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