Aardwolf MUD Home Page Link

Location: Home / Lua Coding / MUD properties

The table below lists global MUD properties visible from Lua at the time of writing. Unlike other properties, these are actually functions running on the mud itself as there is only ever one instance of 'MUD'. For example, to access current mud hour, use mud.time()

FunctionDescription
time()Current hour in MUD time
day()Current day in MUD time
season()Name of current MUD season
whitemoon()Returns 1 if white moon currently up.
blackmoon()Returns 1 if black moon currently up.
greymoon()Returns 1 if grey moon currently up.
threemoons()Returns 1 if all three moons are up.
livemode()Returns 1 if MUD running in live mode - useful for progs that only run on test.
realminutes()Minutes component of real time (not mud time)
realhour()Hours component of real time using 24 hour format
realday()Day of month for real server time.
dayofyear()Number of days real time since beginning of year.
unixtime(arg)*Current unixtime in seconds. Arg can be a date in format HH:MM DD/MM/YYYY.
convtime(arg)Takes an internal unixtime number and returns in a readable format.
rebootsecondsReturns time until reboot if an ice-age countdown is in effect.

*Note that convtime is not actually a mud property - it is it's own function but included here because it goes together with mud.unixtime() - see the time/date section in the Lua Howto Page for more information on using these.