Skip to content
ASArcaneMP Scripting APIScripting reference
Global objectServer APIGenerated

Spells

const Spells: object

Defined in: server/api.d.ts:6098

Server-defined spells. A defined spell gets its own name, lock, spell-bar slot and numbers, and runs an existing player spell’s class for its look and behaviour. Every client registers it in the game’s own spell table, so it is cast, cooled down and priced like a game spell. No asset package is involved.

define(definition): SpellDefinitionInfo

Adds a spell, or replaces the one with the same id, on every client now and on every client that joins later. Throws on a bad id, an unknown base, stat, part or incantation, a record path that is not plugin-rooted, a name or description that is too long or holds markup, or a full table (32). Grant it through its lock, e.g. with the spells resource’s /grantspell .

SpellDefinitionInput

SpellDefinitionInfo

The stored definition.

get(id): SpellDefinitionInfo | null

One defined spell, by id (case-blind).

string

SpellDefinitionInfo | null

list(): SpellDefinitionInfo[]

Every defined spell.

SpellDefinitionInfo[]

remove(id): boolean

Removes a defined spell for players who join later. Connected clients keep it, numbers included, until they reconnect, so revoke its lock as well.

string

boolean

False for an unknown id.