SphereCommunity
SPELLEFFECT - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: SPELLEFFECT (/Thread-SPELLEFFECT--2677)



SPELLEFFECT - mlyon83 - 06-25-2013 08:35 AM

I'm confused on how to properly execute SPELLEFFECT. Could someone provide me with a clear example on how to use this command? Thanks.


RE: SPELLEFFECT - Mordaunt - 06-25-2013 08:47 AM

SPELLEFFECT spell_id, strength, source_character_uid, source_item_uid


RE: SPELLEFFECT - mlyon83 - 06-25-2013 08:55 AM

I'm still confused. Could you give me an example of how you would use it?


RE: SPELLEFFECT - darksun84 - 06-25-2013 10:33 AM

SPELLEFFECT
spell_id, //id of the spell
strength, // value of the skill used for determining the spell effect (usually magery)
source_character_uid, //who cast the spell
source_item_uid //the item uid, used only if the spell was casted by scroll/wand etc,optional then

So spelleffect is called upon the person that will receive the effect!


RE: SPELLEFFECT - RanXerox - 06-25-2013 10:43 AM

Here is an example of it being used in a monster's @Hit trigger to "cast" poison spell on the thing getting hit:

If the monster has at least 10 mana, AND a 20% random chance, AND the thing being hit is not already poisoned... Then remove 10 MANA from the monster, AND use the monster's POISONING skill to determine how powerful the poison spell effect will be on the victim:

Code:
ON=@Hit
   IF ( (<MANA> >= 10) && (RAND(4)==0) && !(<SRC.FLAGS>&statf_poisoned) )
      MANA -= 10
      SRC.SPELLEFFECT s_poison,<POISONING>,1,<UID>
   ENDIF