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
The Newbie
Newbie


Joined: 17 May 2003
Posts: 2
Location: Denmark

PostPosted: Sat May 17, 2003 7:22 pm   

Making a Clock
 
Heya!

I hope someone here can help me, Coding stuff is so out of my lead..

But, still, i want some :)

I'm playing on a mud where 2hours = 24hours and i really would like a running cloak in my status windows there shows me what the time is, Problem is, i have no idea how to make this. on the mud i can see what the time is, however, i do see the time as:
l clock,'Its face shows that it is a quarter past midnight.'

How can i make such a cloak, typing in hour and so myself would be the fine, i just want a running cloak!

Someone has the skills and -time- to help me?

Aloha!
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat May 17, 2003 8:33 pm   
 
Here you go:
#VAR hours 0
#VAR mins 0
#VAR secs 0
#ALARM {*1} {#ADD secs 12;#IF (@secs >= 60) {#ADD mins 1;#VAR secs 0};#IF (@mins >= 60) {#ADD hours 1;#VAR mins 0};#IF (@hours >= 24) {#VAR hours 0}}
#STATUS {MUD Time: @hours:@mins}
#ALIAS settime {#VAR hours %1;#VAR mins %2;#VAR secs 0}

To set the time call the settime alias and pass it the hours and minutes in military format. Example:
settime 7 23
settime 21 15

If you want it in the status window and not the status bar, change the command #STATUS to #STW. Also, if you prefer am/pm instead of military time, change the contents of that command to:
MUD Time: %if(@hours > 12, %eval(@hours - 12), @hours):@mins %if(@hours > 12, "pm", "am")

Kjata
Reply with quote
The Newbie
Newbie


Joined: 17 May 2003
Posts: 2
Location: Denmark

PostPosted: Sun May 18, 2003 10:36 am   
 
Wow! Awesome! Thanks a bunch!

Aloha!
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