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
@DeathCorpse - ATTACKER problem
Author Message
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #3
RE: @DeathCorpse - ATTACKER problem
Yeah, I just tried it but the problem is, <UID> (which is npc) doesn't attacker either.

On=@Death, I can see attackers, but on=@Deathcorpse, Attacker returns 0 for NPC, I change my code that to save attackers (maybe someone need it);

Code:
[Events e_npc_level]
On=@Death
IF !<dTAG0.LEVEL>
TAG0.LEVEL=1
ENDIF

IF <dATTACKER>
  FOR x 0 <EVAL <ATTACKER> - 1>
    REF1=<ATTACKER.<DLOCAL.X>>
    SERV.LIST.<UID>.ADD <REF1>
  ENDFOR
ENDIF

On=@DeathCorpse
IF ((<BRAIN> == brain_monster) && (<SERV.LIST.<UID>.COUNT> > 0))
  LOCAL.TOT=<EVAL <TAG0.LEVEL> * 2>
  LOCAL.TOT=<EVAL <DLOCAL.TOT> / <SERV.LIST.<UID>.COUNT>>
  FOR a 0 <EVAL <SERV.LIST.<UID>.COUNT> - 1>
    REF2=<SERV.LIST.<UID>.<DLOCAL.A>>
    IF <REF2.ISINPARTY>
      LOCAL.TOT=<EVAL <DLOCAL.TOT> / <REF2.PARTY.MEMBERS>>
      FOR b 0 <EVAL <REF2.PARTY.MEMBERS> - 1>
        REF3=<REF2.PARTY.MEMBER.<DLOCAL.B>>
        SERV.LIST.<ARGO>.ADD <REF3>
        REF3.GIVEXP <DLOCAL.TOT>
      ENDFOR
    ELSE
      REF2.GIVEXP <DLOCAL.TOT>
      SERV.LIST.<ARGO>.ADD <REF2>
    ENDIF
  ENDFOR
  SERV.LIST.<UID>.CLEAR
ENDIF
02-01-2017 01:42 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: @DeathCorpse - ATTACKER problem - xwerswoodx - 02-01-2017 01:42 AM

Forum Jump:


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