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
Odd issue with my potion drinking EVENT.
Author Message
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #11
RE: Odd issue with my potion drinking EVENT.
TRYSRC <UID of who you want to become the SRC> ARGS

Args will be called on UID, and in args UID will be the SRC
Example:

TRYSRC <YOUR NPC UID> FINDID.I_POTION_HEAL_MINOR.USEITEM

So, in @DCLICK, your npc who is drinking the potion will be the SRC and it should work.

PHP Code:
[EVENTS E_AI_POTION_DRINKER]
ON=@GETHIT
IF <RESTEST 1 I_POTION_HEAL_MINOR>
 IF <
HITS> < <MAXHITS>
  
TRYSRC <UIDFINDID.I_POTION_HEAL_MINOR.USEITEM
 
ENDIF
ENDIF

[
SPELL 805]
DEFNAME S_HEAL_POTION
NAME Heal
FLAGS SPELLFLAG_SCRIPTED
ON
=@EFFECT
IF (<SRC.ISTEVENT.E_AI_POTION_DRINKER>)
ELSE
SERV.B BEFORE <SRC.HITS>
 IF <
SRC.HITS> < <SRC.MAXHITS>
  
SRC.HITS += <ARGO.dMORE2>
  IF <
SRC.HITS> > <SRC.MAXHITS>
   
SRC.HITS <SRC.MAXHITS>
  ENDIF
 ENDIF
SERV.B AFTER <SRC.HITS>
ENDIF 
Worked fine here.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 09-20-2012 08:06 AM by Extreme.)
09-20-2012 07:52 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Odd issue with my potion drinking EVENT. - Extreme - 09-20-2012 07:52 AM

Forum Jump:


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