The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hello guys
Author Message
Dullais
Journeyman
*

Posts: 65
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #1
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
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #2
RE: Hello guys
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 <argn1dam_pierce <uid>
SRC.SPELLEFFECT s_paralyze 1000 <uid>
SRC.SAY @5467 Paralyze
return 1
ENDIF 
(This post was last modified: 04-06-2013 02:05 AM by Shaklaban.)
04-06-2013 02:04 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #3
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
Find all posts by this user Like Post Quote this message in a reply
Dullais
Journeyman
*

Posts: 65
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #4
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 <argn1dam_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 Smile
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 Smile
(This post was last modified: 04-06-2013 03:08 AM by Dullais.)
04-06-2013 03:00 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)