|
Lostego Beginner
Joined: 14 Oct 2001 Posts: 12
|
Posted: Tue Nov 20, 2001 4:36 am
Timers? |
Was wondering how to set up timers for prots?
Need something in the status bar to show that the prot is off.I have multiply prots I need to do this for. |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Tue Nov 20, 2001 8:19 am |
Do you get wearoff messages for the different prots or are the messages the same for different prots? Do you know how long each prot should hold up? If you do, then you can do something like this:
#alias sanc {cast 'sanctuary';#t+ SancProt}
#trigger {You are surrounded by a white aura.} {#status {Sanc is on!};#alarm +150 {#echo Sanctuary has run out!};#t- SancProt} "SancProt"
You don't have to use classes, just thought I'd throw that in. :)
Iljhar |
|
|
|
cingulli Wanderer
Joined: 30 Aug 2001 Posts: 53 Location: Finland
|
Posted: Tue Nov 20, 2001 4:00 pm |
I play in a mud which displays messages when a prot goes up and when it dissipated
e.g.
goes UP!
#trigger {Gayboy shield goes up.} {#var gayboy_shield_timer %ctime}
this saves the time(%ctime) when the prot went up
goes down
#trigger {Gayboy shield dissipates.} {timer gayboy_shield_timer;#show Gayboy shield lasted @gayboy_shield_timer}
this tells how long it lasted
for viewing:
'timer' is an alias
#math %1 (%ctime-@%1)
#math timer_h @%1/3600
#math timer_m (@%1-@timer_h*3600)/60
#math timer_s @%1-@timer_h*3600-@timer_m*60
#var %1 %char(91)%if(@timer_h!=0,@timer_h%char(104))%if(@timer_m!=0,@timer_m%char(109))%if(@timer_s!=0,@timer_s%char(115))%char(93)
for cuttanpaste:
#ALIAS timer {#math %1 (%ctime-@%1);#math timer_h @%1/3600;#math timer_m (@%1-@timer_h*3600)/60;#math timer_s @%1-@timer_h*3600-@timer_m*60;#var %1 %char(91)%if(@timer_h!=0,@timer_h%char(104))%if(@timer_m!=0,@timer_m%char(109))%if(@timer_s!=0,@timer_s%char(115))%char(93)}
OK ya! |
|
|
|
Lostego Beginner
Joined: 14 Oct 2001 Posts: 12
|
Posted: Tue Nov 20, 2001 10:10 pm |
I get a msg for when the prot falls and for when it goes up.Im not sure how long to prot last... one of my prots are Lostego's nature's blade glows with a sick greenish aura. and when it falls I get Lostego's nature's blade loses the greenish aura surrounding it.
|
|
|
|
Lostego Beginner
Joined: 14 Oct 2001 Posts: 12
|
Posted: Wed Nov 21, 2001 1:50 am |
btw need to mention im using version 6.22
|
|
|
|
cingulli Wanderer
Joined: 30 Aug 2001 Posts: 53 Location: Finland
|
Posted: Wed Nov 21, 2001 9:25 am |
Well its not that difficult :)
e.g.
#trigger {Lostego's nature's blade glows with a sick greenish aura.} {#var nature_blade_timer %ctime}
#trigger {Lostego's nature's blade loses the greenish aura surrounding it.} {timer nature_blade_timer;#show Greenish aura lasted @nature_blade_timer}
and cuttanpaste that 'timer' tr 2 |
|
|
|
|
|