escribano 
Journeyman

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

|
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 |
|
|