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
Wizard NPC - Caster Only?
Author Message
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Wizard NPC - Caster Only?
try with the @npcactfight trigger

see:
Code:
17-05-2015, XuN
Updated @NPCActFight:
    Added - local.skill // Setting this to any skill will make the NPC begin this skill
    Added - local.spell // For magic skills this will be the casted spell
    Added - ACT // This will refer to the target, must be set since the trigger is using SRC for the first enemy
    Added - return 2 // The code above will only work when return = 2
Removed NPC_AI_STRICTCAST and all the invented casts from npcs.This can be reverted applying a trigger for npcs like this:
    ON=@NPCActFight
    if (<magery> > 0)
        local.spell=<r1,64>
        while (<local.spell> < 64)
            if (<CanCast <local.spell>>)
                local.skill=magery
                return 2
            else
                local.spell ++
            endif
        endwhile
    endif    //same for the other magic skills.
and
https://wiki.spherecommunity.net/index.p...PCActFight
05-24-2017 04:02 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Wizard NPC - Caster Only? - Chukwuemeka - 05-19-2017, 03:58 AM
RE: Wizard NPC - Caster Only? - darksun84 - 05-19-2017, 04:54 AM
RE: Wizard NPC - Caster Only? - WRWR - 05-19-2017, 05:11 PM
RE: Wizard NPC - Caster Only? - darksun84 - 05-24-2017 04:02 AM

Forum Jump:


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