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-nmm7 (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-nmm7 (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-nmm7 (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
attacker.x.ignore problem
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
attacker.x.ignore problem
PHP Code:
@gethit

IF (<CTAG0.war_targ> != <src.uid>)
    FOR 
X 0 <attacker>
        IF (<
attacker.<dLOCAL.X>> == <src.uid>)
            
attacker.<dLOCAL.X>.threat=0
            attacker
.<dLOCAL.X>.ignore=1
        
ENDIF
    ENDFOR
    
ENDIF 

CTAG0.war_targ is taken from PACKET5.

This code should prevent the automatic attack when you get hit by someone but it doesn't work...
If you get a hit, you'll start to attack instead of ignore the new target.
Where is the problem?

I don't wanna use @combatadd bcuz I need the attacker join to the list.
(This post was last modified: 05-09-2015 07:09 AM by Rizz.)
05-09-2015 07:07 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: attacker.x.ignore problem
Do you have more attackers in the list? The problem here (I bet) is that when there is no more characters to fight on it will fight this one, i'll commit a fix for this, if this is not the case reply here.

BTW: Your loop is wrong, use this syntax: FOR X 0 <eval <attacker>-1> // so if you have 10 attackers it runs from 0 to 9 (which results a total of 10).

BTW2: Argn2 from @CombatAdd sets automatically ignore to 1


EDIT: It seems I did not update the wiki when added arguments to this trigger, updated it now Smile
(This post was last modified: 05-09-2015 05:06 PM by XuN.)
05-09-2015 05:02 PM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #3
RE: attacker.x.ignore problem
I tried with an empty and not empty attacker list, still the same.

I cannot use @combatadd bcuz this one will trigger only one time (when the new attacker joins the list).
05-11-2015 04:01 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: attacker.x.ignore problem
Try build from here, I added some code: https://www.dropbox.com/s/k1aqepw37wytzn...r.exe?dl=0

The point on using @CombatAdd was to set this to ignore 1/0 instead of using @gethit (which the less you use, the better... ) and update ignore in the packet5? IDK what you want to achieve in here, it was just an idea.
05-11-2015 05:19 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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