Skip to content
ASArcaneMP Scripting APIScripting reference
Data shapeClient APIGenerated

EventMap

Defined in: client/api.d.ts:572

Native events dispatched through Events.on. Each property is the exact callback argument tuple for that event.

readonly abilityStatus: [AbilityHandle]

Defined in: client/api.d.ts:631

A local ability handle started or settled. handle.status is never “requested” here.


readonly anchorReleased: [string, Vec3]

Defined in: client/api.d.ts:641

The local player’s anchor ended. reason is “script”, “death”, “kneel”, “mount”, “teleport”, “hold”, “travel” or “pawn”; at is the floor-level point they were anchored at. Raised the frame after.


readonly blueprintEvent: [number, string, Record<string, string | number | boolean | { x: number; y: number; z: number; }>]

Defined in: client/api.d.ts:741

The engine dispatched a function Blueprints.watch() named on a spawned Blueprint. params holds its parameters by name, read after the call.


readonly breakableState: [number, "broken" | "repaired", string]

Defined in: client/api.d.ts:586

The local player broke or repaired a repairable world object. Raised after Breakables.arm().


readonly brewingInput: [string]

Defined in: client/api.d.ts:591

The local player began, collected or destroyed a potion at a cauldron. The argument is JSON text to parse: { action: "begin" | "collect" | "destroy", siteUid, stationUid, potionId, yield }.


browserConsoleMessage: [BrowserConsoleMessageEvent]

Defined in: client/api.d.ts:826

Dispatched for console output of an owned view; the framework logs these regardless.


browserCreated: [BrowserCreatedEvent]

Defined in: client/api.d.ts:776

Dispatched once per view, before any navigation, to the resource that created it.


browserCursorChange: [BrowserCursorChangeEvent]

Defined in: client/api.d.ts:806

Dispatched when an owned view’s requested cursor shape changes.


browserDocumentReady: [BrowserDocumentReadyEvent]

Defined in: client/api.d.ts:786

Dispatched when an owned view’s main document is ready; the earliest point at which the page can receive Web.emit.


browserInputFocusChange: [BrowserInputFocusChangeEvent]

Defined in: client/api.d.ts:816

Dispatched when focus enters or leaves an editable element of an owned view; use it to stop routing keys to the game.


browserLoadingFailed: [BrowserLoadingFailedEvent]

Defined in: client/api.d.ts:791

Dispatched when a frame of an owned view fails to load.


browserLoadingStart: [BrowserLoadingStartEvent]

Defined in: client/api.d.ts:781

Dispatched when any frame of an owned view begins loading.


browserNavigate: [BrowserNavigateEvent]

Defined in: client/api.d.ts:796

Dispatched for every navigation an owned view is asked to perform, refused or not.


browserOriginChange: [BrowserOriginChangeEvent]

Defined in: client/api.d.ts:831

Dispatched on view creation and whenever Web.loadURL re-locks an owned view to a different origin.


browserPopup: [BrowserPopupEvent]

Defined in: client/api.d.ts:801

Dispatched when an owned view blocks a popup; windowless views cannot host one, so handle the URL yourself.


browserResourceBlocked: [BrowserResourceBlockedEvent]

Defined in: client/api.d.ts:821

Dispatched when an owned view rejects a navigation or a page event from outside its locked origin.


browserTooltip: [BrowserTooltipEvent]

Defined in: client/api.d.ts:811

Dispatched when an owned view requests a tooltip; windowless rendering draws none, so the script must.


chatMessage: [object]

Defined in: client/api.d.ts:836

Dispatched for every chat line the server sends. An empty author is a notice line; color is packed 0xRRGGBBAA, 0 for the chat box’s default.


chatSend: [string]

Defined in: client/api.d.ts:841

Dispatched synchronously for a line the player typed into the chat box, before it is sent. A handler returning false, not a Promise of it, blocks it; Chat.send does not raise this.


readonly creatorChanged: [CreatorState & object]

Defined in: client/api.d.ts:616

The creator’s state changed during a session. change says which selection caused it and whether it applied, when one did.


readonly damageReceived: [number, string, number, boolean, string, boolean]

Defined in: client/api.d.ts:596

An NPC or the local player took damage. Raised after CombatEvents.arm(). Class names are empty for an actor that is gone; targetNpcId is 0 unless the target is a replicated NPC.


readonly dialogueMuted: [DialogueLine]

Defined in: client/api.d.ts:576

The server’s Audio.setDialoguePolicy kept one of the game’s own spoken lines from starting on this client. Raised on the next frame, for a script to play a replacement in its place.


entityStateChange: [Entity, string, any, any]

Defined in: client/api.d.ts:771

Dispatched when one key of an entity’s state changes: on the server when a script writes it, on a client when the write arrives. value is undefined when the key was removed and previous is undefined when it held nothing before, so a stored null stays distinguishable from an absent key. The entity is whatever the game’s WrapScriptEntity answers, and the base Entity handle by default.


readonly fieldGuideChallengeChanged: [FieldGuideChallenge]

Defined in: client/api.d.ts:736

A challenge record changed: progress, a finished tier or a claimed reward. At most once per record per frame; not raised by a restore or a save load.


readonly fieldGuideCollectionChanged: [FieldGuideCollectionItem]

Defined in: client/api.d.ts:731

The game wrote a collection item’s state: a page collected, a trait learned, a beast seen. Not raised by a restore or a save load.


readonly gameEvent: [string, string]

Defined in: client/api.d.ts:611

A native function a script asked to watch ran, such as through Races.watchEvents or Brewing.watchNative. objectClass is empty for an object that is gone.


readonly herbInput: [string]

Defined in: client/api.d.ts:621

The local player planted, fertilized, harvested or destroyed at a herb plot. The argument is JSON text to parse: { action: "plant" | "fertilize" | "harvest" | "destroy", plotUid, plantId, fertilizerId, state }, where state is the plot’s growth state after the action.


readonly incantation: [object]

Defined in: client/api.d.ts:756

The local player said an incantation. The client raises it only for resources whose Speech.listen list holds the id, at most a few times a second, and gives only the id: no audio, text or score. Forwarded with Events.emitServer it is the client’s claim, which the server must check.


readonly localDowned: []

Defined in: client/api.d.ts:636

The local player went down. The client twin of the server’s playerDowned, for presentation.


readonly localDownedEnd: [object]

Defined in: client/api.d.ts:651

Raised alongside localDownedEnded with the same arguments; listen to that instead.


readonly localDownedEnded: [object]

Defined in: client/api.d.ts:646

The local player got back up; wasDead when it was a respawn after death.


readonly localSpellCast: [string]

Defined in: client/api.d.ts:681

The local player cast a spell; spellPath is its spell record, or a server-defined spell’s id.


readonly localSpellStopped: [string]

Defined in: client/api.d.ts:691

A toggle spell the local player cast went off: Lumos’s light or Disillusionment’s charm, ended by a recast or anything else. spellPath is what its localSpellCast reported.


readonly mailRead: [string, string]

Defined in: client/api.d.ts:656

The player read an owl post letter, theirs or the game’s. sender is the sender id, not the display name. Not raised for a letter that loads, restores or is composed already read.


readonly mapCaptured: [MapCaptureResult]

Defined in: client/api.d.ts:751

A MapCapture.capture finished, written or failed. One capture runs at a time, across every resource.


readonly minimapChanged: [MinimapState, MinimapState]

Defined in: client/api.d.ts:721

The minimap switched map, Hogwarts floor or tile. Read Minimap.state() at start for the state before the first change.


readonly objectInteracted: [ObjectInteraction]

Defined in: client/api.d.ts:746

The local player pressed F on one of the game’s own interactables that hears the press as InteractionInitiated: chests, doors, locks, notices, portkeys and the like. Raised as the object is told, before it reacts, and whether or not it then does anything. An interactable that takes F another way raises nothing, and neither does a prop of the interactables resource.


readonly playerRegionChanged: [string]

Defined in: client/api.d.ts:626

The local player entered a named region of the game’s map. Empty regions and repeats of the current one are dropped.


readonly pvpRelationChanged: [PvpRelationChange]

Defined in: client/api.d.ts:661

This client resolved its relation to another player for the first time, or the relation changed. Nothing is raised when the player streams out.


readonly raceEnd: [string, boolean, boolean, RaceTimer]

Defined in: client/api.d.ts:676

Raised alongside raceEnded with the same arguments; listen to that instead.


readonly raceEnded: [string, boolean, boolean, RaceTimer]

Defined in: client/api.d.ts:671

A race the local player started ended, once per run. finished once they got past its last ring; false when it was abandoned, by the game or Races.abandon. newBest is the game’s own verdict on timer.total, time trials only.


readonly raceGate: [string, number, boolean, RaceTimer]

Defined in: client/api.d.ts:666

The local player flew through (hit) or past a ring of the race they are running. gate is the ring’s index, from 0; the last is the finish. timer is read once the game counted the ring, so a miss’s penalty is in it.


resourceStart: [string]

Defined in: client/api.d.ts:761

Dispatched after a resource entry point has run and immediately before the resource becomes running.


resourceStop: [string]

Defined in: client/api.d.ts:766

Dispatched while a resource is stopping, before its stop callback, timers, exports and event handlers are cleaned up.


readonly spellAssignment: [SpellAssignment]

Defined in: client/api.d.ts:701

A spell was assigned to a slot of the spell diamond. One event covers a group of native writes, such as both halves of a drag-and-swap; read the loadout again to see the result.


readonly spellCast: [string]

Defined in: client/api.d.ts:686

Raised alongside localSpellCast with the same arguments; listen to that instead.


readonly spellCooldownChanged: [string, SpellCooldown | null]

Defined in: client/api.d.ts:711

One of the local player’s spells went on cooldown, came off it (null), or moved other than by counting down: a reduction, a pause, or a change of drain rate entering or leaving combat. A countdown kept from the last event stays within a quarter second of the game’s own. Read Spells.cooldowns() at start for the cooldowns already running.


readonly spellHit: [string, string, string, number, boolean, string, boolean]

Defined in: client/api.d.ts:601

A spell hit an actor. Raised after CombatEvents.arm(), except a hit on the local player, which is always raised and has an empty spellType.


readonly spellHitPlayer: [number, number, string, number, BodyPart | null]

Defined in: client/api.d.ts:606

A spell of the local player hit another player, and the hit was relayed to the server. bodyPart is where it struck, as this client’s copy of their body read it. Informational; the server arbitrates it.


readonly spellLearningFinished: [SpellLearningResult]

Defined in: client/api.d.ts:716

Native lesson result for the requesting resource; no spell is granted.


readonly spellLoadoutChanged: [number, number]

Defined in: client/api.d.ts:706

The player switched spell sets (0-3), by F1-F4, the mouse wheel, a controller or anything else that moves the game’s active set. Read Spells.currentLoadout() at start for the set already selected.


readonly spellStopped: [string]

Defined in: client/api.d.ts:696

Raised alongside localSpellStopped with the same arguments; listen to that instead.


voiceStart: []

Defined in: client/api.d.ts:846

Dispatched when the local player starts speaking, as isTalking turns true.


voiceStop: []

Defined in: client/api.d.ts:851

Dispatched when the local player stops speaking, as isTalking turns false.


readonly waypointChanged: [Waypoint | null, Waypoint | null]

Defined in: client/api.d.ts:581

The local player placed, moved or removed their map waypoint. Read Blips.waypoint() at start for the waypoint before the first change.


readonly worldLootRequest: [WorldLootInfo]

Defined in: client/api.d.ts:726

Asks whether this client may collect one of the game’s own loot actors; a handler returning false refuses it. Refused loot offers no prompt, the interact button does nothing on it, and a refused moonstone breaks without paying out. Raised once per loot actor as it loads or offers its prompt, the frame after (a moonstone when it breaks, so its payout lands a frame later); the answer holds until WorldLoot.refresh(). Not raised for the moonstones and foragables World.setLootPolicy takes off every client (they are refused and hidden) or for the server’s own Lootables.