Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Lostego
Beginner


Joined: 14 Oct 2001
Posts: 12

PostPosted: 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.
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: 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
Reply with quote
cingulli
Wanderer


Joined: 30 Aug 2001
Posts: 53
Location: Finland

PostPosted: 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!
Reply with quote
Lostego
Beginner


Joined: 14 Oct 2001
Posts: 12

PostPosted: 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.
Reply with quote
Lostego
Beginner


Joined: 14 Oct 2001
Posts: 12

PostPosted: Wed Nov 21, 2001 1:50 am   
 
btw need to mention im using version 6.22
Reply with quote
cingulli
Wanderer


Joined: 30 Aug 2001
Posts: 53
Location: Finland

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net