SphereCommunity
ON=@HIT, Poison - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: ON=@HIT, Poison (/Thread-ON-HIT-Poison)



ON=@HIT, Poison - pinku - 06-12-2013 05:14 PM

Using the wiki, I got to this trigger:

Quote:@Hit - Fires when the character hits another in combat.

So, I wrote these lines in hope to get poisoned when the character hits me.

Code:
ON=@HIT
IF !(<SRC.FLAGS> &statf_poisoned)
SRC.SPELLEFFECT S_POISON,800,<UID>
ENDIF

This above does not work, however, if I use @GETHIT, for example:

Code:
ON=@GETHIT
IF !(<SRC.FLAGS> &statf_poisoned)
SRC.SPELLEFFECT S_POISON,800,<UID>
ENDIF

Works just fine.

Where am I going wrong?
Thanks!


RE: ON=@HIT, Poison - Alaric - 06-12-2013 06:10 PM

Where do you use those triggers?

Look at this. http://wiki.sphere.torfo.org/index.php/How_Combat_Works


RE: ON=@HIT, Poison - Monty - 06-12-2013 06:17 PM

Code:
ON=@GETHIT
IF !(<SRC.FLAGS> &statf_poisoned)
SRC.SPELLEFFECT S_POISON,800,<UID>
ENDIF

It this triger:
I The character being damaged. (defender)
SRC The character responsible for the damage. (attacker)

why you check if is attacker poisoned?


RE: ON=@HIT, Poison - pinku - 06-13-2013 12:55 PM

Thank you two!
This link was very useful.

@Monty

I'm SO used with checking that I thought I needed to check, but now, thinking of it..... hahaha.

Thanks again. Smile


RE: ON=@HIT, Poison - Alaric - 06-13-2013 08:42 PM

But I guess the poison can be reflected... you might find more issues. Poison is always problematical.