Difference between revisions of "@SpellEffectTick"

From SphereWiki
Jump to: navigation, search
(Created page with "==Description== Fired when a spell memory has one or more charges (more2) and the spellflag_tick Fires on: * Characters ==References== The following object references...")
 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
Fired when a spell memory has one or more charges (more2) and the spellflag_tick
+
This trigger fires when a character is under effect of a periodic spell (like Poison spell).
  
  
Line 13: Line 13:
 
| '''Name''' || '''Description'''
 
| '''Name''' || '''Description'''
 
|-
 
|-
| [[ARGO]] || The source of the spell. Could be the [[Items|item]] used to cast the spell (e.g. a wand or scroll) or the [[Characters|character]] casting the spell.
+
| [[I]] || The object that is going to be affected.
 
|-
 
|-
| [[I]] || The [[Characters|character]] casting the spell.
+
| [[SRC]] || The object that is going to be affected.
 
|-
 
|-
| [[SRC]] || The [[Characters|character]] casting the spell.
+
| ARGO || The spell memory.(Argo.link holds the caster UID)
|-
 
| [[ACT]] || The target of the spell, if any.
 
 
|}
 
|}
  
Line 28: Line 26:
 
| '''Argument''' || '''In/Out''' || '''Description'''
 
| '''Argument''' || '''In/Out''' || '''Description'''
 
|-
 
|-
| ARGN1 || I || The spell that was cast.
+
| ARGN1 || I || Spell Id
 
|-
 
|-
| ARGN2 || IO || The strength of the spell.
+
| ARGN2 || IO || Spell Level
 
|-
 
|-
| LOCAL.CREATEOBJECT1 || O || For field spells, overrides the item [[BASEID]] to use for the east-west direction.
+
| LOCAL.CHARGES || IO || How many charges are left on the spell memory, this will be automatically decreased by 1 at the end of the method execution. Default value is 1.
 
 
For summon spells, overrides the character [[BASEID]] to summon.
 
 
|-
 
|-
| LOCAL.CREATEOBJECT2 || O || For field spells, overrides the item [[BASEID]] to use for the north-south direction.
+
| LOCAL.DELAY || IO || How many seconds until the next spell effect tick. Default value is 5 seconds.
 
|-
 
|-
| LOCAL.FIELDGAUGE || O || For field spells, overrides the default gauge of the field (1).
+
| LOCAL.EFFECT || IO || The effect value of the spell, harmful or beneficial (if SPELLFLAG_HEAL is enabled).
 
|-
 
|-
| LOCAL.FIELDWIDTH || O || For field spells, overrides the default width of the field (7).
+
| LOCAL.DAMAGETYPE || IO || The damage type of the spell, if you are making a custom spell you must set a value otherwise the spell will not cause damage.
|-
 
| LOCAL.EFFECTCOLOR ||O || For field spells, overrides the color of the fields.
 
 
|}
 
|}
  
Line 51: Line 45:
 
| '''Return Value''' || '''Description'''
 
| '''Return Value''' || '''Description'''
 
|-
 
|-
| 1 || Aborts casting the spell.
+
| 1 || Destroy the spell memory and block the spell execution.
 +
|-
 +
| 0 || If the spell has the flag SPELLFLAG_SCRIPTED blocks the spell execution
 +
 
 
|}
 
|}
  

Latest revision as of 21:54, 4 January 2023

Description

This trigger fires when a character is under effect of a periodic spell (like Poison spell).


Fires on:


References

The following object references are explicitly available for this trigger:

Name Description
I The object that is going to be affected.
SRC The object that is going to be affected.
ARGO The spell memory.(Argo.link holds the caster UID)

Arguments

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:

Argument In/Out Description
ARGN1 I Spell Id
ARGN2 IO Spell Level
LOCAL.CHARGES IO How many charges are left on the spell memory, this will be automatically decreased by 1 at the end of the method execution. Default value is 1.
LOCAL.DELAY IO How many seconds until the next spell effect tick. Default value is 5 seconds.
LOCAL.EFFECT IO The effect value of the spell, harmful or beneficial (if SPELLFLAG_HEAL is enabled).
LOCAL.DAMAGETYPE IO The damage type of the spell, if you are making a custom spell you must set a value otherwise the spell will not cause damage.

Return Values

The following return values are explicitly defined for this trigger:

Return Value Description
1 Destroy the spell memory and block the spell execution.
0 If the spell has the flag SPELLFLAG_SCRIPTED blocks the spell execution