10-22-2014, 05:35 AM
Hi there all!
I've created a system where some characters have unique abilities they can use, which creates an item that has a timer on it that prevents the ability from working (the item is invisible and on the person).
The ability works perfectly, but i don't have a method of showing the current Cool-down time remaining on the ability. anyone know how I can go about it? I would guess a gump but i wouldn't know how to check the timer of an item in your backpack.
///Human Active - Restore///
///This Active ability was deemed too powerful and thus removed
IF <SRC.RESTEST 1 i_timer_ua_human>
SRC.SYSMESSAGE You must wait until your skill becomes active again.
RETURN 1
ELSE
IF (<tag0.race>==1)
SRC.HITS=(<SRC.HITS>+(<SRC.MAXHITS>/2))
SRC.STAM=(<SRC.STAM>+(<SRC.MAXSTAM>/2))
SRC.MANA=(<SRC.MANA>+(<SRC.MAXMANA>/2))
MHC
MMC
MSC
SRC.NEWITEM=i_timer_UA_Human
SRC.ACT.EQUIP
SRC.SOUND 491
effect=3,i_fx_sparkle,6,15,1
RETURN 0
ENDIF
[function MHC]
IF (<SRC.HITS> > <SRC.MAXHITS>)
SRC.HITS=<SRC.MAXHITS>
RETURN 0
ENDIF
[function MMC]
IF (<SRC.MANA> > <SRC.MAXMANA>)
SRC.MANA=<SRC.MAXMANA>
RETURN 0
ENDIF
[function MSC]
IF (<SRC.STAM> > <SRC.MAXSTAM>)
SRC.STAM=<SRC.MAXSTAM>
RETURN 0
ENDIF
[ITEMDEF i_timer_UA_human]
NAME=Delay Teleport
ID=i_handr_1
TYPE=T_EQ_SCRIPT
ON=@Create
ATTR=attr_invis|attr_decay
MORE1=24
ON=@Equip
TIMER=1
ON=@Timer
// Take the effect we would like.
if ( <CONT> )
if ( <MORE1> )
MORE1 -= 1
TIMER=1
return 1
else
CONT.SYSMESSAGE Your Refresh ability is ready
CONT.TAG.UA1=
SOUND=1450
remove
endif
endif
// normal timer fall through is to delete the item
remove
return 1
I've created a system where some characters have unique abilities they can use, which creates an item that has a timer on it that prevents the ability from working (the item is invisible and on the person).
The ability works perfectly, but i don't have a method of showing the current Cool-down time remaining on the ability. anyone know how I can go about it? I would guess a gump but i wouldn't know how to check the timer of an item in your backpack.
///Human Active - Restore///
///This Active ability was deemed too powerful and thus removed
IF <SRC.RESTEST 1 i_timer_ua_human>
SRC.SYSMESSAGE You must wait until your skill becomes active again.
RETURN 1
ELSE
IF (<tag0.race>==1)
SRC.HITS=(<SRC.HITS>+(<SRC.MAXHITS>/2))
SRC.STAM=(<SRC.STAM>+(<SRC.MAXSTAM>/2))
SRC.MANA=(<SRC.MANA>+(<SRC.MAXMANA>/2))
MHC
MMC
MSC
SRC.NEWITEM=i_timer_UA_Human
SRC.ACT.EQUIP
SRC.SOUND 491
effect=3,i_fx_sparkle,6,15,1
RETURN 0
ENDIF
[function MHC]
IF (<SRC.HITS> > <SRC.MAXHITS>)
SRC.HITS=<SRC.MAXHITS>
RETURN 0
ENDIF
[function MMC]
IF (<SRC.MANA> > <SRC.MAXMANA>)
SRC.MANA=<SRC.MAXMANA>
RETURN 0
ENDIF
[function MSC]
IF (<SRC.STAM> > <SRC.MAXSTAM>)
SRC.STAM=<SRC.MAXSTAM>
RETURN 0
ENDIF
[ITEMDEF i_timer_UA_human]
NAME=Delay Teleport
ID=i_handr_1
TYPE=T_EQ_SCRIPT
ON=@Create
ATTR=attr_invis|attr_decay
MORE1=24
ON=@Equip
TIMER=1
ON=@Timer
// Take the effect we would like.
if ( <CONT> )
if ( <MORE1> )
MORE1 -= 1
TIMER=1
return 1
else
CONT.SYSMESSAGE Your Refresh ability is ready
CONT.TAG.UA1=
SOUND=1450
remove
endif
endif
// normal timer fall through is to delete the item
remove
return 1
