-
Notifications
You must be signed in to change notification settings - Fork 0
@NpcActCast
This trigger is fired when the NPC is about to select a spell to cast. When assigning spells to a NPC make sure these spells does not have the SPELLFLAG_PLAYERONLY flag.
Fires on:
The following object references are explicitly available for this trigger:
{| border="1" cellspacing="4" cellpadding="4" | Name || Description |- | ARGO || The current NPC's target. |- | I || The NPC caster. |- | SRC || The NPC caster. |- | REF1 ||The new target, this will override the target set on ARGO. |}
The following arguments are set for this trigger. If an argument is marked as "In" then a value will be passed in to the trigger, if an argument is marked as "Out" then it can be set to a value to affect Sphere's behaviour:
{| border="1" cellspacing="4" cellpadding="4" | Argument || In/Out || Description |- | ARGN1 || IO || The spell being cast, this can be a spell not found in the NPC's spellbook. |- | ARGN2 || O || If 1 the spell is being cast by a wand. (If the NPC is wielding a wand it has a 50% chance to cast the spell from the wand instead of the spellbook. |- | local.healthreshold || IO || This value determines at what health threshold (in percent) the NPC will successfully select a spell with the SPELLFLAG_HEAL flag. The value is taken from the sphere.ini property NPCHealThreshold and the default value is 30. |}
The following return values are explicitly defined for this trigger:
{| border="1" cellspacing="4" cellpadding="4" | Return Value || Description |- | 1 || Interrupts the spell selection. |}
Category: Reference Compendium Category: Triggers