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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Odd issue with my potion drinking EVENT.
Author Message
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #1
Odd issue with my potion drinking EVENT.
I'm trying to get my potion drinking script to work, and the only way I can is with a little work around. But, the work around should *not* be required. I'm totally puzzled why it's acting the way it is.

The "Working" script with the work around, you'll notice I had to create a new potion, have the NPC drink that, then consume the original one:

Code:
ON=@GetHit
    IF (<RESTEST 1 i_potion_regeneration_health>) && (<HITPOINTS> < <STR>) && (<EVAL RAND(5)> == 1)
            SERV.NEWITEM i_potion_regeneration_health
            EMOTE drink a <NEW.NAME>!
            NEW.CONT=<findlayer.21.uid>
            USEITEM <NEW>
                 return 1
    ENDIF

What SHOULD work, but isn't. It's actually making the NPC's target attempt to drink the potion in the NPC's backpack.

Code:
ON=@GetHit
    IF (<RESTEST 1 i_potion_regeneration_health>) && (<HITPOINTS> < <STR>) && (<EVAL RAND(5)> == 1)
            EMOTE drink a <NEW.NAME>!
                 findid.i_potion_regeneration_health.useitem
                 return 1
    ENDIF

Any advice? Tongue

[Image: 4_Logo.png]
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
(This post was last modified: 09-18-2012 11:15 PM by Rayvolution.)
09-18-2012 11:14 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Odd issue with my potion drinking EVENT. - Rayvolution - 09-18-2012 11:14 PM

Forum Jump:


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