RanXerox 
Master
 
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
![]()
|
RE: Help with Explosion Potion
Try this version instead:
Code:
[ITEMDEF i_potion_explosionless]
ID=i_bottle_purple
NAME=exploding potion
TYPE=t_thrown_explosive
VALUE=25
WEIGHT=1.0
RESOURCES=i_reag_sulfur_ash 3,1 i_bottle_empty
SKILLMAKE=Alchemy 30.1
CATEGORY=Magic
SUBSECTION=Potions
DESCRIPTION=Explosion (lesser)
ON=@Create
COLOR=012
TAG.Damage=6,15
TAG.Range=1
It uses a special type:
Code:
[TYPEDEF t_thrown_explosive]
ON=@DClick
IF (<SRC.RESTEST i_throw_delay>)
SRC.SYSMESSAGE @color_text,,1 You must wait a moment to throw this potion.
ELSE
SERV.NEWITEM i_throw_delay,1,<SRC>
NEW.TIMER=1
LINK=<SRC>
TARGETG @color_text,,2 1113280//"Which target do you wish to throw this at?"
ENDIF
RETURN 1
ON=@Targon_Ground
IF (<SRC.CANSEELOSFLAG 0 <SRC.TARGP>>==0)
SRC.SYSMESSAGELOC color_text,500237//"Target cannot be seen!"
ELSEIF (<SRC.DISTANCE <SRC.TARGP>> < 3)
SRC.SYSMESSAGELOC color_text,1063303//"Your target is too close!"
ELSEIF (<SRC.DISTANCE <SRC.TARGP>> > 10)
SRC.SYSMESSAGELOC color_text,1063304//"Your target is too far!"
ELSE
SRC.SPELLEFFECT s_reveal,100.0,<SRC>
SRC.ANIM 11
P=<SRC.TARGP>
MORE2=4
TIMER=1
EFFECT 0,0f0d,8,16
ENDIF
RETURN 1
ON=@Targon_Char
IF !(<SRC.TARG.CANSEELOS>)
SRC.SYSMESSAGELOC color_text,500237//"Target cannot be seen!"
ELSEIF (<SRC.TARG>==<SRC>)
SRC.SYSMESSAGELOC color_text,1005576//"You can't throw this at yourself."
ELSEIF (<SRC.CHECKDIST> < 2)
SRC.SYSMESSAGE color_text,1063303//"Your target is too close!"
ELSEIF (<SRC.CHECKDIST> > 10)
SRC.SYSMESSAGELOC color_text,1063304//"Your target is too far!"
ELSE
SRC.SPELLEFFECT s_reveal,100.0
SRC.ANIM 11
P=<SRC.TARGP>
MORE2=4
TIMER=1
EFFECT 0,0f0d,8,16
ENDIF
RETURN 1
ON=@Targon_Item
SRC.SYSMESSAGE @color_text,,1 You can not target that!
RETURN 1
ON=@Timer
MORE2 --
IF (<MORE2>)
SAY <dMORE2>
TIMER=1
ELSE
REMOVE
LINK.SFX 519
SERV.NEWITEM=i_fx_explode
NEW.TYPE=t_explosion
NEW.ATTR=attr_move_never|attr_can_decay
NEW.LINK=<LINK> //this should link the explosion to thrower - possibly making them a criminal
NEW.MOREX=<R<STRARG <TAG0.Damage>>,<STREAT <TAG0.Damage>>>
NEW.MOREY=dam_fire|dam_general
NEW.MOREZ=<TAG0.Range>
NEW.P=<P>
NEW.TIMERD=1
ENDIF
RETURN 1
Which requires a "delay" item:
Code:
[ITEMDEF i_throw_delay]
ID=i_handr_1
NAME=throwing delay
TYPE=t_eq_script
WEIGHT=0
LAYER=layer_special
ON=@Create
ATTR=attr_invis|attr_decay
MORE1=4
ON=@Equip
TIMER=1
ON=@Timer
IF (<CONT>)
IF (<MORE1>)
MORE1 --
TIMER=1
RETURN 1
ENDIF
ENDIF
REMOVE
RETURN 1
|
|
01-28-2013 03:55 PM |
|
|