SphereCommunity
poison disturb - Printable Version

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

Pages: 1 2


poison disturb - jexnico - 03-23-2018 08:22 AM

i need the hit of my poison (s_poison) cancel the target's magic if hes trying to use some magic, how do i do that?
my poison script

Quote:[Spell 20]
DEFNAME=s_poison
NAME=Poison
SOUND=snd_spell_poison
RUNES=IN
CAST_TIME=3.0
RESOURCES=i_reag_nightshade
RUNE_ITEM=i_rune_poison
SCROLL_ITEM=i_scroll_poison
FLAGS=spellflag_nounparalyze | SPELLFLAG_TARG_CHAR | spellflag_resist | SPELLFLAG_HARM | spellflag_targ_noself
EFFECT_ID=i_fx_curse
EFFECT=100,750
DURATION=3.0
LAYER=layer_flag_poison
MANAUSE=7
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

ON=@Effect
damage 1,dam_poison,<src.uid>,0,0,0,100,0
effect 3,i_fx_glow_spike,6,15,0
timerf 0,updatex

i was thinking of leaving the player in warmode with each poisons hit, so the spells would be disturbed, but i can not do, some help?


RE: poison disturb - jexnico - 03-23-2018 01:10 PM

i was thinking of creating a trigger, maybe
ON=@GetHit

but i can not seem to make the player stay warmode

sry, im noob :c


RE: poison disturb - jexnico - 04-07-2018 01:11 PM

it will be like this

ON=@GetHit
if (<action> == skill_magery) !(<uid> = <src.uid>)
message @0790,1,1 You fail!
effect 3 i_fx_smoke_small 1 40 0
sound 92
action -1
endif


RE: poison disturb - azmanomer - 04-07-2018 07:41 PM

https://wiki.spherecommunity.net/index.php?title=@Effect


RE: poison disturb - Coruja - 04-12-2018 04:32 AM

poison spell uses damage type 'dam_nodisturb' set oby default, so you must remove this damage type manually on your script

maybe something like
Code:
[Spell 20]
DEFNAME=s_poison
...

ON=@Effect
LOCAL.DamageType &= ~dam_nodisturb
PS: LOCAL.DamageType is used by internal code, so you just need to set the value and let the internal code execute it


RE: poison disturb - kduzera - 08-29-2018 08:29 AM

I have same problem here...

ON=@Effect
LOCAL.DamageType &= ~dam_nodisturb

i've try

ON=@Effect
LOCAL.DamageType &= ~dam_nodisturb

didn't work.

My Script.
[SPELL 20]
DEFNAME=s_poison
NAME=Poison
SOUND=snd_spell_poison
RUNES=IN
CAST_TIME=3.3
RESOURCES=i_reag_nightshade
RUNE_ITEM=i_rune_poison
SCROLL_ITEM=i_scroll_poison
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_fx_targ|spe​llflag_resist|
EFFECT_ID=i_fx_curse
EFFECT=100,750 //Only used without Magicf_OsiFormulas
LAYER=layer_flag_poison
DURATION=1.0,15.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

on=@effect
damage 0


RE: poison disturb - darksun84 - 08-29-2018 10:12 PM

You have to set it in a @getHit trigger in a character event:

Code:
[EVENTS e_test]
ON=@GetHit

if <argn2>&dam_poison|dam_magic|dam_nodisturb
argn2 &= ~dam_nodisturb

endif



RE: poison disturb - kduzera - 08-29-2018 11:05 PM

Thank U my friend!!


RE: poison disturb - kduzera - 08-30-2018 01:07 AM

Very thak u darksun84. Its Working. =D

Just one more little thing...

whats is the best way to put event on char?

I'm using the skill class_undeclared.

something like that.

ON=@Login
SRC.EVENTS +e_test

ON=@LogOut
SRC.EVENTS -e_test


RE: poison disturb - darksun84 - 08-30-2018 01:39 AM

All the skillclass are considered events