 |
The Newbie Newbie
Joined: 17 May 2003 Posts: 2 Location: Denmark
|
Posted: 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! |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
 |
The Newbie Newbie
Joined: 17 May 2003 Posts: 2 Location: Denmark
|
Posted: Sun May 18, 2003 10:36 am |
Wow! Awesome! Thanks a bunch!
Aloha! |
|
|
 |
|
|
|
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
|
|