SphereCommunity
Enhancing the power or duration if a spell through an event - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Enhancing the power or duration if a spell through an event (/Thread-Enhancing-the-power-or-duration-if-a-spell-through-an-event)

Pages: 1 2


Enhancing the power or duration if a spell through an event - UltimaAku - 04-24-2014 06:58 PM

Hey there, Ran into a problem. my bro made an idea on making an event which strengthens a particular spell. I've had a go at making this event happen but it doesn't seem to work. there are no console errors. is it just not possible or have I done something wrong?

[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==20)
ARGN3=30
SRC.SOUND=480
RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==30)
ARGN2=65
SRC.SOUND=480
RETURN 1
ENDIF


RE: Enhancing the power or duration if a spell through an event - darksun84 - 04-24-2014 07:05 PM

return 1 prevents the object from being affected by the spell.


RE: Enhancing the power or duration if a spell through an event - UltimaAku - 04-24-2014 07:24 PM

Updated:


[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =20)
ARGN3=30
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =30)
ARGN2=65
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

Still nothing, i added a say, and nothings even appearing.


RE: Enhancing the power or duration if a spell through an event - pinku - 04-24-2014 07:44 PM

On the second example, why are you using ARGN2?

http://wiki.sphere.torfo.org/index.php/@SpellEffect

It says on Wiki: "ARGN3 - A multiplier for the spell's duration or effect."

From this, I understand that you have to multiply it from a number.
Oh well, just trying to help. ;(


RE: Enhancing the power or duration if a spell through an event - darksun84 - 04-24-2014 08:01 PM

(04-24-2014 07:24 PM)UltimaAku Wrote:  Updated:


[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =20)
ARGN3=30
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =30)
ARGN2=65
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

Still nothing, i added a say, and nothings even appearing.

did you put == instead of =


RE: Enhancing the power or duration if a spell through an event - UltimaAku - 04-24-2014 09:06 PM

yea sorry, lol it is ==, still nothing

(04-24-2014 07:44 PM)pinku Wrote:  On the second example, why are you using ARGN2?

http://wiki.sphere.torfo.org/index.php/@SpellEffect

It says on Wiki: "ARGN3 - A multiplier for the spell's duration or effect."

From this, I understand that you have to multiply it from a number.
Oh well, just trying to help. ;(

I wasn't entirely sure, I presumed that the strength of the spell was for damage spells which is ARGN2, but duration for poison is ARGN3. I don't know if it's correct but its a theory. but even when swapping them around still changes nothing.


RE: Enhancing the power or duration if a spell through an event - XuN - 04-24-2014 09:20 PM

AS dark said... IF (<ARGN1> =30) must be IF (<ARGN1> == 30)

There are differences between
Argn1=30 // Sets it as 30
if (<argn1> == 30 ) // == is used for comparisons.


RE: Enhancing the power or duration if a spell through an event - UltimaAku - 04-24-2014 09:26 PM

Updated:

[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==20)
ARGN3=30
SRC.SOUND=480
SRC.SAY WORKED!
RETURN 0
//RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==30)
ARGN3=65
SRC.SOUND=480
SRC.SAY WORKED!
RETURN 0
//RETURN 1
ENDIF

Still got nothing, i can't work out why...


RE: Enhancing the power or duration if a spell through an event - darksun84 - 04-24-2014 09:41 PM

Did you install the events in the caster or in the target? because they have to be installed in the target


RE: Enhancing the power or duration if a spell through an event - UltimaAku - 04-24-2014 10:42 PM

(04-24-2014 09:41 PM)darksun84 Wrote:  Did you install the events in the caster or in the target? because they have to be installed in the target

misread, ill try it when i get back *smacks head*