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


Joined: 29 Jun 2002
Posts: 69
Location: USA

PostPosted: Thu Jul 18, 2002 8:20 am   

Timer on Status Bar
 
Ok, I have seen ppl place certain things of need on the status bar on zmud windows. I want to make a timer to put on their, but have no idea of how to do it. Basically I get to use a weapon, then have to wait 1min before I can use it again and I want a timer for that so that I dont have to spam myself with mux commands. This possible?

Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jul 18, 2002 12:35 pm   
 
You need to put the time left into a variable and then put this variable into the status bar. You can do this with an alarm that fires every second:
#ALARM "countdown" {*1} {#ADD timer -1;#IF (@timer = 0) {#T- countdown}}

and then you set the status bar:
#STATUS {Time Left: @timer}

Now, the way to start this up is to set the @timer variable to 60 and then enabling the alarm by doing:
#T+ countdown

An example on how to do this would be using an alias to use the weapon:
#ALIAS useweapon {attack;#VAR timer 60;#T+ countdown}

Kjata
Reply with quote
Deveklem
Newbie


Joined: 06 Sep 2006
Posts: 3

PostPosted: Thu Sep 07, 2006 12:00 am   
 
This is a very old post but helpful to me. Thank you!
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