|
miischi Beginner
Joined: 04 Jan 2009 Posts: 20
|
Posted: Wed Jun 10, 2020 12:10 pm
Mud clock in status bar / window |
Hey!
A fellow mudder who uses a different Client has a pretty cool feature I'd like to adapt myself. He scripted himself a "mud clock" that would always display
the current in game time in his status bar in 24hr format. I wonder if this can be achieved with CMUD as well.
The mud I'm playing has the ingame time run 5 times as fast as real time:
Code: |
1 minute RL - 5 minutes IC
12 minutes RL - 1 hour IC
1 hour RL - 5 hours IC
4 hours 48 minutes RL - 1 day IC
1 day RL - 5 days IC
1 day 14 hours 24 minutes RL - 1 week IC
4 days 9 hours 36 minutes RL - 1 month IC
70 days 9 hours 36 minutes RL - 1 year IC
|
There is also certain ingame events that would allow me to 'sync' a certain game time with realtime.
The way my fellow mudder did it, is to 'sync' a certain event with the specific realtime and have his client
calculate the current ingame time based on the current realtime.
Is something like this achievable with CMUD as well? If yes, could anyone please tell me where I have to look
or if you're super nice, help with some code? :)
Thanks a lot in advance for any reply! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Jun 10, 2020 1:22 pm |
You should only need one #ALARM to handle most of that
Code: |
#ALARM "ClockSync" -1:00 {
min=(@min+5)
#IF (@min=60) {
hour=(@hour+1}
min=00
}
#IF (@hour=24) {hour=0}
} |
#STATUS {IC Time: @hour:@min} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
miischi Beginner
Joined: 04 Jan 2009 Posts: 20
|
Posted: Wed Jun 10, 2020 7:01 pm |
Thanks for the reply!
It actually seems that the actual game time is calculated from the servers RL time, which is backed up by reocurring events
(there is sermons at fixed IC times started by an NPC) being at the exact same RL time - every day. From how I understand
I'd have to manually sync the time every game session with the above #ALARM approach, no? Is there a way to make use
of the new information so I won't have to sync the time more than once? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Jun 10, 2020 7:33 pm |
If you have a command that returns the time, you can just set @hour and @min off of that information.
Same for if a random line of text goes scrolls by at specific times of the day.
Unless you are staying connected 24/7 you are gonna have to sync up the clock every time you log in.
Nothing is going to update when CMUD isn't even running. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|