DPB2Class · 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 LokiPoeView 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;

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.

Members and overloads

33 results

OnGuiTick

EventLink ↗
public static EventHandler<GuiTickEventArgs> LokiPoe.OnGuiTick

an event fired at every Gui Tick.

OnPasteTextFailed

EventLink ↗
public static LokiPoe.PasteTextFailedEvent LokiPoe.OnPasteTextFailed

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

ApplicationRuntime

FieldLink ↗
public static readonly Stopwatch LokiPoe.ApplicationRuntime

Return a StopWatch representing the current application runtime.

Random

FieldLink ↗
public static readonly Random LokiPoe.Random

Return a global Random number generator class

StringStatTypeGGG

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

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

BeginDispatchIfNecessary

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

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

dispatcherDispatcher
Specifies dispatcher.
actionAction
Specifies action.

BeginDispatchIfNecessary

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

Utility to Dispatcher.BeginInvoke Actions only if necessary.

actionAction
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.

dispatcherDispatcher
Specifies dispatcher.
actionAction
Specifies action.

DispatchIfNecessary

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

Utility to Dispatcher.Invoke Actions only if necessary.

actionAction
Specifies action.

GetDescriptionFromStatTypeGGG

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

Returns description from stat type ggg using the supplied arguments.

statStatTypeGGG
Specifies stat.

Returns: The string result.

GetElement

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

Returns element using the supplied arguments.

addresslong
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.

Returns: The List<Element> result.

InvokeEvent

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

EventsInvoker.

dDelegate
Specifies d.
argsobject[]
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.

filterFormatstring
A specific socket pattern that we are looking for: "R-G-B", "G-G R-B"
itemSocketColorsSocketColor[]
An array of SocketColor representing the colors in the item.
itemSocketLinksbyte[]
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".

itemItem
The item that will be checked.
filterFormatstring
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()

Executes the scrap ui operation.

SignalPasteTextFailed

MethodLink ↗
public static void LokiPoe.SignalPasteTextFailed()

Executes the signal paste text failed operation.

BotWindow

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

Return a Window object representing this application main window.

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. ///

CurrentWorldArea

PropertyLink ↗
public static DatWorldAreaWrapper LokiPoe.CurrentWorldArea { get; }

Return a DatWorldAreaWrapper object, representing the current world area.

Initialized

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

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

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.

IsInCharacterSelectionScreen

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

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

IsInCreateCharacterScreen

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

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

IsInGame

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

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

IsInLoginScreen

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

Return a bool indicating if we are in the Login Screen.

Me

PropertyLink ↗
public static LocalPlayer LokiPoe.Me { get; }

Return a LocalPlayer object representing the Playing character.

MyCharacterSize

PropertyLink ↗
public static float LokiPoe.MyCharacterSize { get; }

Return a float representing the Playing character size.

MyId

PropertyLink ↗
public static int LokiPoe.MyId { get; }

Return the Playing character Id.

MyPosition

PropertyLink ↗
public static Vector2i LokiPoe.MyPosition { get; }

Return a Vector2i representing the Playing character position.

Related types

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.