Table of Contents

Class NoOpAutomationSurface

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

The automation surface a host hands out when there is no session to act on. It implements every area, reports itself unavailable, returns empty lists, and refuses every command instead of throwing, so a plugin can call into it safely before login.

public sealed class NoOpAutomationSurface : IAutomationSurface, ICharacterInfo, ISpellCatalog, IMagicCommands, IPluginChat, ICombatAutomation, IEquipmentAutomation, IItemAutomation, ILootAutomation, IFellowshipAutomation, IAllegianceAutomation, IEnchantmentAutomation, INavigationAutomation, IWorldObjectAutomation, IRecallAutomation, IWorldTimeAutomation, ILoginAutomation, INetworkAutomation, IRecoveryAutomation, IProjectileAutomation, IWorldLabelAutomation, IDungeonMapAutomation, ISelectionAutomation, IDialogAutomation, ITradeAutomation, IVendorAutomation, ICharacterOptionsAutomation
Inheritance
NoOpAutomationSurface
Implements
Inherited Members

Properties

ActiveEnchantments

Enchantments in force on the local player. Snapshot semantics: the list is rebuilt by the host, never mutated in place under a reader.

public IReadOnlyList<PluginActiveEnchantment> ActiveEnchantments { get; }

Property Value

IReadOnlyList<PluginActiveEnchantment>

Allegiance

Authoritative allegiance identity and membership state.

public IAllegianceAutomation Allegiance { get; }

Property Value

IAllegianceAutomation

Attributes

The six primary attributes.

public IReadOnlyList<PluginAttributeInfo> Attributes { get; }

Property Value

IReadOnlyList<PluginAttributeInfo>

Character

The local character.

public ICharacterInfo Character { get; }

Property Value

ICharacterInfo

CharacterOptions

The character's own on/off options, as on the character options page.

public ICharacterOptionsAutomation CharacterOptions { get; }

Property Value

ICharacterOptionsAutomation

Chat

Reading and writing the client's text.

public IPluginChat Chat { get; }

Property Value

IPluginChat

Combat

Combat state, nearby hostiles, and melee/missile attacks.

public ICombatAutomation Combat { get; }

Property Value

ICombatAutomation

CurrentHealth

Current health.

public uint CurrentHealth { get; }

Property Value

uint

CurrentMana

Current mana.

public uint CurrentMana { get; }

Property Value

uint

CurrentStamina

Current stamina.

public uint CurrentStamina { get; }

Property Value

uint

Dialogs

Answering the server's yes/no confirmation dialogs.

public IDialogAutomation Dialogs { get; }

Property Value

IDialogAutomation

DungeonMap

The shape of the dungeon the character is in, for drawing a map of it.

public IDungeonMapAutomation DungeonMap { get; }

Property Value

IDungeonMapAutomation

Enchantments

Enchantments in force on other objects, as the client tracks them.

public IEnchantmentAutomation Enchantments { get; }

Property Value

IEnchantmentAutomation

Equipment

What the character owns to wear or wield, and equipping it.

public IEquipmentAutomation Equipment { get; }

Property Value

IEquipmentAutomation

Fellowship

Authoritative fellowship vitals for helper spell policy.

public IFellowshipAutomation Fellowship { get; }

Property Value

IFellowshipAutomation

Instance

The shared instance; this type holds no state.

public static NoOpAutomationSurface Instance { get; }

Property Value

NoOpAutomationSurface

IsAvailable

Whether there is a live in-world session behind this surface. False before login, after logout, and on a surface the host never bound -- read it before trusting anything else here.

public bool IsAvailable { get; }

Property Value

bool

IsCasting

Whether the client is still working on a request that blocks a new cast. EvaluateGate(uint) reports Busy while this is true.

public bool IsCasting { get; }

Property Value

bool

IsInFellowship

True when the local player is currently in a fellowship.

public bool IsInFellowship { get; }

Property Value

bool

IsInWorld

Whether the character is in the world right now.

public bool IsInWorld { get; }

Property Value

bool

Items

The character's inventory, and using or applying items.

public IItemAutomation Items { get; }

Property Value

IItemAutomation

KnownAttackSpells

Known spells that attack a target directly, strongest first. Debuffs and self- or untargeted spells are not in this list.

public IReadOnlyList<PluginSpellInfo> KnownAttackSpells { get; }

Property Value

IReadOnlyList<PluginSpellInfo>

KnownCombatSpells

Every known spell used against an enemy, attacks and debuffs alike, strongest first.

public IReadOnlyList<PluginSpellInfo> KnownCombatSpells { get; }

Property Value

IReadOnlyList<PluginSpellInfo>

KnownSelfBuffs

Beneficial spells the character can cast on themselves, ordered by family with the strongest of each family first.

public IReadOnlyList<PluginSpellInfo> KnownSelfBuffs { get; }

Property Value

IReadOnlyList<PluginSpellInfo>

Labels

Text labels hung over objects in the world.

public IWorldLabelAutomation Labels { get; }

Property Value

IWorldLabelAutomation

LastCompletion

How the most recent cast ended. Its revision counter rises each time a cast completes, so a caller can tell a fresh outcome from a repeat of the last one; the default value means nothing has completed yet.

public PluginCastCompletion LastCompletion { get; }

Property Value

PluginCastCompletion

Login

The account's character list, and logging out.

public ILoginAutomation Login { get; }

Property Value

ILoginAutomation

Loot

Corpses and containers, and taking things out of them.

public ILootAutomation Loot { get; }

Property Value

ILootAutomation

Magic

Casting spells.

public IMagicCommands Magic { get; }

Property Value

IMagicCommands

MaxHealth

Health at full.

public uint MaxHealth { get; }

Property Value

uint

MaxMana

Mana at full.

public uint MaxMana { get; }

Property Value

uint

MaxStamina

Stamina at full.

public uint MaxStamina { get; }

Property Value

uint

Navigation

Where things are, and moving and turning the character.

public INavigationAutomation Navigation { get; }

Property Value

INavigationAutomation

Network

The other clients on this computer: the local client list, and the casts they report.

public INetworkAutomation Network { get; }

Property Value

INetworkAutomation

ObjectId

The character's own object id; 0 before login.

public uint ObjectId { get; }

Property Value

uint

Objects

The world objects the client is tracking.

public IWorldObjectAutomation Objects { get; }

Property Value

IWorldObjectAutomation

Projectiles

Whether a missile or spell would reach a target.

public IProjectileAutomation Projectiles { get; }

Property Value

IProjectileAutomation

Recalls

Generation-safe recall commands and portal transition state.

public IRecallAutomation Recalls { get; }

Property Value

IRecallAutomation

Recovery

Recovering after death.

public IRecoveryAutomation Recovery { get; }

Property Value

IRecoveryAutomation

Selection

What the player has selected, and acting on it.

public ISelectionAutomation Selection { get; }

Property Value

ISelectionAutomation

Skills

Every skill the client can describe, sorted by name. Empty before the server has sent the character's skills.

public IReadOnlyList<PluginSkillInfo> Skills { get; }

Property Value

IReadOnlyList<PluginSkillInfo>

Snapshot

The current combat state. Reads as its default value when the session is not in the world.

public PluginCombatSnapshot Snapshot { get; }

Property Value

PluginCombatSnapshot

Spells

The spells the character knows, and every spell description loaded.

public ISpellCatalog Spells { get; }

Property Value

ISpellCatalog

SummoningMastery

How many creatures the character may have summoned at once, as the server reports it; 0 when it has said nothing.

public int SummoningMastery { get; }

Property Value

int

Trade

Trading directly with another player.

public ITradeAutomation Trade { get; }

Property Value

ITradeAutomation

Vendor

Buying from and selling to a vendor.

public IVendorAutomation Vendor { get; }

Property Value

IVendorAutomation

WorldTime

The in-game clock and calendar.

public IWorldTimeAutomation WorldTime { get; }

Property Value

IWorldTimeAutomation

Methods

AbortPhysicalAttack()

Calls off the attack in progress, including any repeating one, without swinging. Safe to call when nothing is running.

public PluginCombatCommandResult AbortPhysicalAttack()

Returns

PluginCombatCommandResult

Apply(uint, uint)

Uses one owned item on another object -- a lockpick on a chest, a tinkering tool on a weapon. The first object must be one the player owns; the second only has to be one the client knows about.

public PluginItemCommandResult Apply(uint objectId, uint targetObjectId)

Parameters

objectId uint
targetObjectId uint

Returns

PluginItemCommandResult

BeginPhysicalAttack(uint, PluginAttackHeight, float)

Selects the target and begins a physical attack at the given height and power (0 to 1, clamped), the same as holding the attack button down. Reports InvalidTarget for anything that is not an attackable creature, WrongMode when the stance cannot make a targeted attack, and Busy while an earlier attack is still running. A Refused result carries a short reason in Notice when the host has one. Finish it with ReleasePhysicalAttack().

public PluginCombatCommandResult BeginPhysicalAttack(uint targetObjectId, PluginAttackHeight height, float power)

Parameters

targetObjectId uint
height PluginAttackHeight
power float

Returns

PluginCombatCommandResult

Capture(uint)

Lists the still-running effects tracked for one target, ordered by spell family and then spell id. Lapsed entries are discarded first. Returns an empty list for object id zero, for a target with nothing tracked, or on a host that does not provide this surface.

public IReadOnlyList<PluginTrackedEnchantment> Capture(uint targetObjectId)

Parameters

targetObjectId uint

Returns

IReadOnlyList<PluginTrackedEnchantment>

CaptureCorpses(float)

Lists the corpses lying loose within maximumDistance metres, nearest first. Corpses held inside something else are left out. Returns an empty list when the surface is unavailable or the distance is not a positive number.

public IReadOnlyList<PluginLootContainer> CaptureCorpses(float maximumDistance)

Parameters

maximumDistance float

Returns

IReadOnlyList<PluginLootContainer>

CaptureCurrentContents()

Lists everything inside the currently open container, following into any containers nested in it. Returns an empty list when no container is open.

public IReadOnlyList<PluginInventoryItem> CaptureCurrentContents()

Returns

IReadOnlyList<PluginInventoryItem>

CaptureHostileTargets(float)

Lists hostile creatures within maximumDistance metres that the player could attack, leaving out anything hidden, not drawn, or already dead. Returns an empty list when the session is not in the world or the distance is not a positive number.

public IReadOnlyList<PluginCombatTarget> CaptureHostileTargets(float maximumDistance)

Parameters

maximumDistance float

Returns

IReadOnlyList<PluginCombatTarget>

CaptureMembers()

Lists the other members of the fellowship, leaving out the local player and anyone whose distance the client cannot work out right now. Returns an empty list when the player is not in a fellowship.

public IReadOnlyList<PluginFellowMember> CaptureMembers()

Returns

IReadOnlyList<PluginFellowMember>

CaptureOwnedEquipment()

Everything the character owns that can be worn or wielded, in a defined order: what is equipped first, then by name, then by object id. Clients rely on that order — "the first wand" means the one being held if any wand is — so a host must not hand back an arbitrary sequence. Lists every owned item that can occupy an equipment slot, equipped items first and then by name. Returns an empty list when the surface is unavailable.

public IReadOnlyList<PluginEquipmentItem> CaptureOwnedEquipment()

Returns

IReadOnlyList<PluginEquipmentItem>

CaptureOwnedItems()

Lists everything the player owns, including what is inside their packs and what they have equipped, ordered by name. Returns an empty list when the session is not in the world.

public IReadOnlyList<PluginInventoryItem> CaptureOwnedItems()

Returns

IReadOnlyList<PluginInventoryItem>

Cast(uint)

Casts the spell at the current selection. True only when the request went out on the wire; use RequestCast(uint) to learn why it did not.

public bool Cast(uint spellId)

Parameters

spellId uint

Returns

bool

Cast(uint, uint)

Selects the given object, then casts the spell at it. False when the object cannot be selected or the cast was not sent.

public bool Cast(uint spellId, uint targetObjectId)

Parameters

spellId uint
targetObjectId uint

Returns

bool

ClearMovementIntent()

Release every movement key the plugin was holding.

public PluginNavigationCommandStatus ClearMovementIntent()

Returns

PluginNavigationCommandStatus

Unavailable when no session is in the world, otherwise whether the session took the command.

Close(uint)

Closes the open corpse or container: the inverse of Open(uint), through the same use the client's own close sends.

public PluginItemCommandResult Close(uint containerObjectId)

Parameters

containerObjectId uint

Returns

PluginItemCommandResult

EnterDefaultMode()

Puts the character into its default combat stance. Reports AlreadyReady when it is already in a combat stance of any kind.

public PluginCombatCommandResult EnterDefaultMode()

Returns

PluginCombatCommandResult

Equip(uint, uint)

Asks the server to wear or wield an owned item, the same way dragging it onto the character does. Pass zero for requestedLocation to let the client pick the slot, or a slot bit mask to ask for a specific one.

public PluginEquipmentCommandResult Equip(uint objectId, uint requestedLocation = 0)

Parameters

objectId uint
requestedLocation uint

Returns

PluginEquipmentCommandResult

EvaluateGate(uint)

Whether casting this spell at the current selection would be accepted, and if not, why.

public PluginCastGate EvaluateGate(uint spellId)

Parameters

spellId uint

Returns

PluginCastGate

EvaluateGate(uint, uint)

Whether casting this spell at a particular object would be accepted. Reports Refused when that object cannot be selected at all.

public PluginCastGate EvaluateGate(uint spellId, uint targetObjectId)

Parameters

spellId uint
targetObjectId uint

Returns

PluginCastGate

FaceHeading(float)

Turn the player on the spot to face a compass direction.

public PluginNavigationCommandStatus FaceHeading(float headingDegrees)

Parameters

headingDegrees float

The direction to face, in degrees clockwise from north.

Returns

PluginNavigationCommandStatus

Unavailable when no session is in the world or the host does not implement turning, which is what the default implementation always returns; otherwise whether the session took the command.

Identify(uint)

Identifies an item scoped to loot handling: only the currently open corpse/container's contents, or the corpse itself, is a valid target. Use IWorldObjectAutomation.Identify to assess any object the client can currently see (owned, equipped, landscape, a vendor listing, or open-container content) -- this member exists separately because a loot-sorting plugin should not accidentally identify something outside the container it is currently working.

public PluginItemCommandResult Identify(uint objectId)

Parameters

objectId uint

Returns

PluginItemCommandResult

Open(uint)

Asks the server to open a corpse or other openable container, exactly as using it does. Reports InvalidTarget for an object that is neither, and Busy while another inventory request is in flight. The container's contents arrive later, not from this call.

public PluginItemCommandResult Open(uint containerObjectId)

Parameters

containerObjectId uint

Returns

PluginItemCommandResult

Pickup(uint, bool)

Asks the server to move one item out of the currently open container and into the player's packs, letting the client choose the pack the same way its own loot click does; pass true for mainPack to prefer the main pack. Reports InvalidItem for anything that is not in the open container. If no pack has room, the client says so locally and nothing goes to the server.

public PluginItemCommandResult Pickup(uint objectId, bool mainPack = false)

Parameters

objectId uint
mainPack bool

Returns

PluginItemCommandResult

PostSystemMessage(string)

Discards the text; there is nowhere to print it.

public void PostSystemMessage(string text)

Parameters

text string

ReleasePhysicalAttack()

Releases an attack begun with BeginPhysicalAttack(uint, PluginAttackHeight, float), sending the swing. Reports Refused when no attack is being held.

public PluginCombatCommandResult ReleasePhysicalAttack()

Returns

PluginCombatCommandResult

ReportCast(uint, uint, double)

Records a cast the client did not observe itself, so its effect shows up in Capture(uint) for the duration given. Keeps whichever expiry is later if the same spell is already tracked on that target. Returns false for a zero target or spell id, a duration that is not a finite positive number, a spell the client's spell table does not know, or a host that does not provide this surface.

public bool ReportCast(uint targetObjectId, uint spellId, double durationSeconds)

Parameters

targetObjectId uint
spellId uint
durationSeconds double

Returns

bool

SetMovementIntent(in PluginMovementIntent)

Hold the given movement keys until the intent is replaced or cleared.

public PluginNavigationCommandStatus SetMovementIntent(in PluginMovementIntent intent)

Parameters

intent PluginMovementIntent

The keys to hold.

Returns

PluginNavigationCommandStatus

Unavailable when no session is in the world, otherwise whether the session took the command.

Submit(string)

Runs text through the client's chat bar exactly as if the player had typed and sent it, commands included. Returns false when the text is blank or the host has no chat bar to submit to.

public bool Submit(string text)

Parameters

text string

Returns

bool

TryGet(uint, out PluginSpellInfo)

Looks up one spell's description. False when the loaded content describes no such spell.

public bool TryGet(uint spellId, out PluginSpellInfo info)

Parameters

spellId uint
info PluginSpellInfo

Returns

bool

TryGetObject(uint, out PluginNavigationObject)

Look up one world object by its id.

public bool TryGetObject(uint objectId, out PluginNavigationObject value)

Parameters

objectId uint

The object id to look up.

value PluginNavigationObject

The object, when one was found.

Returns

bool

False when no session is in the world, the id is zero, the object is unknown to the client, or its position cannot be resolved.

TryGetSkill(uint, out PluginSkillInfo)

Looks up one skill by id. False when the character has no such skill or the server has not sent it yet.

public bool TryGetSkill(uint skillId, out PluginSkillInfo skill)

Parameters

skillId uint
skill PluginSkillInfo

Returns

bool

Use(uint)

Uses an object. An owned item is used where it lies. Anything else -- a vendor, a corpse, a chest, a character to talk to -- is approached first if it is out of reach, exactly as double-clicking it does; in that case Started means the walk began, not that the use has happened. An owned item that needs a target of its own is refused with a notice saying to call Apply(uint, uint) instead.

public PluginItemCommandResult Use(uint objectId)

Parameters

objectId uint

Returns

PluginItemCommandResult