Dullais
Journeyman
Posts: 65
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0
|
Hello guys
Well, my code isn't giving an paralyze to the person who is being damaged. Actualy if i put this one on on=@equip, it wont work either... and if i remove the src it do affect hitter... whats wrong with it ? (it is on event in ON=@Hit trigger) i think it could dont work because of that trigger it self, but why doesn't it work on equip ?
Code:
IF !(STRCMP(<TAG0.WEAPON>, ELECTR)) && (<Eval.rand(1,2)> == 1)
SRC.SPELLEFFECT s_paralyze,1000
SRC.SAY @5467 Paralyze
ENDIF
(This post was last modified: 04-06-2013 01:41 AM by Dullais.)
|
|
04-06-2013 01:40 AM |
|
|
RanXerox
Master
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
|
RE: Hello guys
A couple things:
(<Eval.rand(1,2)> == 1) can be written (<R1,2>==1)
Also, paralyze is a harmful spell (that can also be resisted), by virtue of its flags which by default are: FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM| SPELLFLAG_FX_TARG| SPELLFLAG_RESIST
So when you use SPELLEFFECT, you likely need to indicate the source of the damage etc: SPELLEFFECT spell_id, strength, source_character_uid, source_item_uid
If you don't supply the source of the damage, it probably assumes SRC, and since in these triggers that is you (and you normally don't damage yourself) it may be ignoring the effect.
(This post was last modified: 04-06-2013 02:08 AM by RanXerox.)
|
|
04-06-2013 02:06 AM |
|
|
Dullais
Journeyman
Posts: 65
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0
|
RE: Hello guys
(04-06-2013 02:04 AM)Shaklaban Wrote: because damage will be applied after the hit and remove the statf_freeze flag. you need to apply damage in your script and bypass the hardcoded dmage with return 1:
PHP Code:
IF !(STRCMP(<TAG0.WEAPON>, ELECTR)) && (<Eval.rand(1,2)> == 1) src.damage <argn1> dam_pierce <uid> SRC.SPELLEFFECT s_paralyze 1000 <uid> SRC.SAY @5467 Paralyze return 1 ENDIF
Well this is what i sad here: " think it could don't work because of that trigger it self, but why doesn't it work on equip ? " So i would make timer with timer 0, so it runs as the first script is done. but if i cant make the thing being equiped do this...
(04-06-2013 02:06 AM)RanXerox Wrote: A couple things:
(<Eval.rand(1,2)> == 1) can be written (<R1,2>==1)
Also, paralyze is a harmful spell (that can also be resisted), by virtue of its flags which by default are: FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM| SPELLFLAG_FX_TARG| SPELLFLAG_RESIST
So when you use SPELLEFFECT, you likely need to indicate the source of the damage etc: SPELLEFFECT spell_id, strength, source_character_uid, source_item_uid
If you don't supply the source of the damage, it probably assumes SRC, and since in these triggers that is you (and you normally don't damage yourself) it may be ignoring the effect.
The thing about random, i will use that further, so thanks
The thing about source, well you were right, still it removes itself because hit is made, but iam going to leave it that way, and just make something invisible that is forced to be equiped and removes itself after setting paralyze. so thanks man
(This post was last modified: 04-06-2013 03:08 AM by Dullais.)
|
|
04-06-2013 03:00 AM |
|
|