About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Kaj Lindholm
Newbie


Joined: 04 Apr 2025
Posts: 5

PostPosted: Sat Apr 05, 2025 11:35 am   

timer to levelling
 
So I am trying to find a way to report to myself the time between levelling

Here is the trigger work(sentence)

You raise a level!!!

so what I am looking for is somehow capturing time when it happens and
time between levelling
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4753
Location: Pensacola, FL, USA

PostPosted: Sun Apr 06, 2025 11:39 am   
 
%time can spit out the current time in a number of ways
#HELP %time

once you have the two times, then you have to do time math
_________________
Discord: Shalimarwildcat
Reply with quote
Kaj Lindholm
Newbie


Joined: 04 Apr 2025
Posts: 5

PostPosted: Mon Apr 07, 2025 11:04 am   
 
true but whats the way to make it calculate diff in time?
capture the message it says about time and it also takes the weekday etc with it.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4753
Location: Pensacola, FL, USA

PostPosted: Mon Apr 07, 2025 3:02 pm   
 
#SAY %time
defaults to:
Monday April 7, 2025 11:07:56 am

or you can make ity output according to your needs

#FORALL {a|d|m|y|e|c|t|h|n|s|z} {#SH %i: %time(%i) | %time(%i%i) | %time(%i%i%i) | %time(%i%i%i%i)}

outputs:

Code:

a: a | aa | Mon | Monday
d: 7 | 07 | Mon | Monday
m: 4 | 04 | Apr | April
y: 25 | 25 | 2025 | 2025
e: 25 | 25 | 2025 | 2025
c: 4/7/2025 11:10:22 AM | 4/7/2025 11:10:22 AM | 4/7/2025 11:10:22 AM | 4/7/2025 11:10:22 AM
t: 11:10 AM | 11:10:22 AM | 11:10:22 AM | 11:10:22 AM
h: 11 | 11 | 11 | 11
n: 10 | 10 | 10 | 10
s: 22 | 22 | 22 | 22
z: 473 | 473 | 473 | 473


As for how to calculate it, use the format that gives the numbers you need do perform basic math

diff=(b-a)
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4753
Location: Pensacola, FL, USA

PostPosted: Mon Apr 07, 2025 3:17 pm   
 
Basically, you wanna convert both dates into pure seconds, do basic math on the seconds, then convert the sum, back into an easy read span.
The latter of which i helped do in a recent thread.
_________________
Discord: Shalimarwildcat
Reply with quote
Kaj Lindholm
Newbie


Joined: 04 Apr 2025
Posts: 5

PostPosted: Tue Apr 08, 2025 1:31 pm   
 
ty i will try with it :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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