spellcast
The spellcast
script command is used to cast spells or cancel active spells for an entity. The spell caster is always the entity executing the command. To draw individual runes without actually casting a spell use the drawsymbol
command.
To add a spell to the player's list of prepared spells use the precast
command.
Usage
spellcast [-dxmsfzo] [d?duration*] <spelllevel*> <spell> <target>
spellcast -k <spell>
Context: Any Entity
Flags:
-k
: Abort the first instance of the given spell for this caster
-d
: Specify a spell duration - otherwise the duration is 1 + <spelllevel> * 2
seconds
-x
: No sound
-m
: Not drawn, no checks
-s
: No animation, no checks
-f
: No mana cost, no checks
-z
: Restore (used for fields in the game world, making sure they appear already casted upon game load)
-o
: Orphan the spell after casting so that will not be affected by changes to the caster (Added in Arx Libertatis 1.2)
Parameters:
Parameter | Type | Description |
---|---|---|
duration (requires -d ) |
int or variable |
Spell duration in milliseconds |
spelllevel |
int or variable [1,10] |
Spellcaster level to cast the spell at |
spell |
string |
Spell script name |
target |
entity |
Spell target |
The ID of the cast spell can be retrieved using the ^spell
system variable which allows the spell to be ended using the destroy
command.
game_ready
event using the -z
flag.Spell names
Spell | Page | Script name |
---|---|---|
Teleport | 0 | |
Mega cheat | 0 | |
Activate portal | 1 | activate_portal |
Magic missile | 1 | magic_missile |
Night vision | 1 | magic_sight |
Douse | 1 | douse |
Ignite | 1 | ignit |
Armor | 2 | armor |
Harm | 2 | harm |
Lower armor | 2 | lower_armor |
Heal | 2 | heal |
Detect trap | 2 | detect_trap |
Fireball | 3 | fireball |
Reveal | 3 | dispell_illusion |
Ice projection | 3 | ice_projectile |
Speed | 3 | speed |
Feed | 3 | create_food |
Telekinesis | 4 | telekinesis |
Protection from cold | 4 | cold_protection |
Bless | 4 | bless |
Dispel field | 4 | dispell_field |
Protection from fire | 4 | fire_protection |
Curse | 4 | curse |
Trap | 5 | rune_of_guarding |
Cure effects of poison | 5 | cure_poison |
Repel undead | 5 | repel_undead |
Levitate | 5 | levitate |
Poison projection | 5 | poison_projectile |
Slow down | 6 | slowdown |
Disable trap | 6 | disarm_trap |
Create field | 6 | create_field |
Raise dead | 6 | raise_dead |
Paralyze | 6 | paralyse |
Fire field | 7 | fire_field |
Ice field | 7 | ice_field |
Confuse | 7 | confuse |
Lightning projection | 7 | lightning_strike |
Flying eye | 7 | flying_eye |
Mana drain | 8 | mana_drain |
Enchant object | 8 | enchant_weapon |
Chaos | 8 | explosion |
Invisibility | 8 | invisibility |
Life drain | 8 | life_drain |
Summon | 9 | summon_creature |
Mass paralyze | 9 | mass_paralyse |
Incinerate | 9 | incinerate |
Negate magic | 9 | negate_magic |
Fake summon | 9 | fake_summon |
Mass lightning projection | 10 | mass_lightning_strike |
Mass incinerate | 10 | mass_incinerate |
Slow time | 10 | freeze_time |
Control demon | 10 | control |