SphereCommunity
Spells effects going off if cast 2 times same spell - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Spells effects going off if cast 2 times same spell (/Thread-Spells-effects-going-off-if-cast-2-times-same-spell)



Spells effects going off if cast 2 times same spell - escribano - 07-27-2015 12:52 PM

Dudes, another strange behavior i noticed this days is when a players cast the same spell two times on self.

ex: Night sight

Pic 1: here i do not casted any spell and the lights is off
[Image: Captura_de_tela_2015_07_27_02_45_53.jpg]

Pic 2: after cast night sight i ".edit" myself and there the spell effect memory was there and the light is on
[Image: Captura_de_tela_2015_07_27_02_46_07.jpg]

Pic 3: after cast night sight for the second time i've ".edit" myself again and there is the speel effect memory again but the light is off
[Image: Captura_de_tela_2015_07_27_02_46_28.png]

This happens on every single spell that can be casted on self, like magic reflection, bless, etc..

I need some help to fix this, i've tryied to update sphere to the last nightly build, but it didn't fixed the problem.

If someone could help i would thank!


RE: Spells effects going off if cast 2 times same spell - Paulo_BR - 07-29-2015 05:18 AM

Someone can help us?


RE: Spells effects going off if cast 2 times same spell - Skul - 07-29-2015 01:13 PM

Code:
on=@spelleffect
if (<src.findid.i_rune_<strsub 2 0 <serv.spell.<argn1>.defname>>>)
  src.findid.i_rune_<strsub 2 0 <serv.spell.<argn1>.defname>>.remove //remove rune spell icon
endif



RE: Spells effects going off if cast 2 times same spell - Coruja - 07-30-2015 05:22 AM

check if your nightsight memory have TIMER=-1 (DURATION=0 on sphere_spells.scp)

it's not really a but, because the correct behavior for nightsight is have TIMER=-1 and only goes off on logout
so the first cast you add the spell and the second cast will remove it


RE: Spells effects going off if cast 2 times same spell - escribano - 07-30-2015 05:44 AM

Skul and Coruja, thanks for the reply!

Skul: I'll try this tonight and i post the results later.

Coruja: This happens on all spells that can be target on self.

Anyway, this is my Night Sight spell script:
Code:
[SPELL 6]
DEFNAME=s_night_sight
NAME=Night Sight
SOUND=snd_spell_night_sight
RUNES=IL
CAST_TIME=0.5
RESOURCES=i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_night_sight
SCROLL_ITEM=i_scroll_night_sight
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|sp​ellflag_playeronly
EFFECT_ID=i_fx_heal_effect
EFFECT=0
DURATION=10*60.0,10*60.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0


It happens with Night Sight, Bless, Strength, Magic Reflection and many other spells.


Thanks dudes


RE: Spells effects going off if cast 2 times same spell - escribano - 07-30-2015 11:18 AM

Skul, worked like a charm!!!! Smile

thanks so much!!!!!!