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
Help with Explosion Potion
Author Message
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #1
Help with Explosion Potion
Hello guys,

I'm having a problem on my explosion potions

Code:
[ITEMDEF i_potion_ExplosionLess]
NAME=Lesser Explosion
ID=i_bottle
TYPE=T_POTION
WEIGHT=7
TDATA1=0
RESOURCES=i_reag_sulfur_ash 3, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 29.0

ON=@DCLICK
if ! (<src.targ.cont>==<src.findlayer(21).UID>)
Src.sysmessage Only on backpack.
return 1
endif

IF (<eval <SRC.REGION.FLAGS>>&04000)
SRC.SYSMESSAGE You cant use <SRC.TARG.NAME> on pretection.
RETURN 1
ELSE

if (<src.flags> & statf_dead) || (<src.flags> & statf_freeze) || (<src.flags> & statf_stone)
src.sysmessage @07a1 You cant use this potion now
return 1
endif

If (<src.restest i_delay_explosion>)
   Src.message [<eval <src.findid.(i_delay_explosion).timer>> Segs]
return 1
endif
IF
src.consume 1 i_potion_ExplosionLess
Src.newitem i_delay_explosion
Src.act.equip
ENDIF

ON=@Create
COLOR=07b2
MORE1=s_explosion
MORE2=0.1

[ITEMDEF i_delay_explosion]      
NAME=Delay Explosion
ID=i_handr_1
TYPE=T_EQ_SCRIPT
WEIGHT=0
LAYER=0

ON=@Equip
TIMER=3

ON=@TIMER
REMOVE
RETURN 1

Ok, this is my Explosion Potion script, and it works... but i have this error:


When a player use explosion potion, the potion will explode in 3 seconds... but if on this 3 seconds, the player cast a spell, and the potion explodes, the player still casting (the player has not been hit by the explosion).

Another example:
If a player cast a spell on you, and you use a explosion potion to cancel the player spell, it works... but if u are casting a spell, your spell isn't canceled and the spell of the other player is cancelled.


I need help to fix this problem.


Thanks!

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
01-28-2013 03:19 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Help with Explosion Potion - escribano - 01-28-2013 03:19 PM
RE: Help with Explosion Potion - RanXerox - 01-28-2013, 03:55 PM
RE: Help with Explosion Potion - escribano - 01-29-2013, 05:04 AM

Forum Jump:


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