ZMUD Help: Log Script
ZMUD Help: Log Script
Hi friends,
I've been re-making my zmud files since my hard drive crash and just discovered that my logging script is creating files, but not writing. When I go to open the file, it says "Cannot find the *insertfilelocation*.txt file. Do you want to create a new file?"
I know I've dealt with this before on a new computer, but cant remember how. Any suggestions?
I've been re-making my zmud files since my hard drive crash and just discovered that my logging script is creating files, but not writing. When I go to open the file, it says "Cannot find the *insertfilelocation*.txt file. Do you want to create a new file?"
I know I've dealt with this before on a new computer, but cant remember how. Any suggestions?
Re: ZMUD Help: Log Script
This is the script I use for Cmud. It might be compatable.
Code: Select all
#EVENT onConnect {#show LOGGING STARTED: %time(yyyymmd).txt
#log "C:\Users\insert-path-file-here\"%time(yyyymmdd).txt
}
Re: ZMUD Help: Log Script
That won't work for zMUD, zMUD doesn't use #EVENT.
Running zMUD as admin? Installed in different folder than program files?
*Edit for clarity*
Running zMUD as admin? Installed in different folder than program files?
*Edit for clarity*
Re: ZMUD Help: Log Script
I'll post mine when I get home in ~6 hours.
Re: ZMUD Help: Log Script
Well, hot damn. Didn't realize they had added extra triggers and such. My bad.Taziar wrote:That won't work for zMUD, zMUD doesn't use #EVENT.
Running it as admin? Installed in different folder than program files?
Re: ZMUD Help: Log Script
Yeah, some different commands added and some were changed/depreciated. cMUD has the ability to make some older zMUD scripts work, but zMUD most likely will have a problem with stuff written for cMUD.
Re: ZMUD Help: Log Script
#ALIAS startlog {#LOG Wotmud_%time( mmmddyy).log}
You can use any trigger or alias to start recording. For example:
#KEY F12 {startlog}
- starts loggin if you press F12.
#ALIAS atconnect {startlog}
- starts logging at soon as your "atconnect" alias goes. which always goes when you first login to the mud, as long as zmud is working correctly.
You could have something like this as well:
#TRIGGER {You receive your change from rent.} {startlog}
- this will start logging as soon as you unrent any character.
This will create log files in the root folder and should work with zmud, since it's what i've used and I've had this for like ever. It can get more complicated for that, and it's not in a beautiful "paste-in" script format, but if you're using zmud, I suggest you learn enough to at least learn where to put these lines of code. I'm sure Taziar can pretty it up and make it user friendly.
You can use any trigger or alias to start recording. For example:
#KEY F12 {startlog}
- starts loggin if you press F12.
#ALIAS atconnect {startlog}
- starts logging at soon as your "atconnect" alias goes. which always goes when you first login to the mud, as long as zmud is working correctly.
You could have something like this as well:
#TRIGGER {You receive your change from rent.} {startlog}
- this will start logging as soon as you unrent any character.
This will create log files in the root folder and should work with zmud, since it's what i've used and I've had this for like ever. It can get more complicated for that, and it's not in a beautiful "paste-in" script format, but if you're using zmud, I suggest you learn enough to at least learn where to put these lines of code. I'm sure Taziar can pretty it up and make it user friendly.
Re: ZMUD Help: Log Script
#CLASS {Logging}
#ALIAS setuplogging {
#VARIABLE PathToCurrentLog {%concat( @PathToLog, %time( yyyymmdd), ".txt")}
#LOG @PathToCurrentLog
}
#ALIAS readlog {#LAUNCH {notepad.exe @PathToCurrentLog}}
#ALIAS gologs {#IF (@PathToLog ="") {#LAUNCH {explorer ..\wotMUD}} {#LAUNCH {explorer @PathToLog}}}
#ALIAS logpath {
#VARIABLE PathToLog {%1}
#IF (@PathToLog ="") {#VARIABLE PathToLog {}} {
#IF (%numparam( ) > 1) {#LOOP 2,%numparam( ) {#VARIABLE PathToLog %concat( @PathToLog, " ", %param( %i))}}
#IF (NOT %ends( @PathToLog, "\")) {#VARIABLE PathToLog {%concat( @PathToLog, "\")}}
}
setuplogging
#NOOP
}
#VAR PathToLog {}
#VAR PathToCurrentLog {20170712.txt}
#TRIGGER "SetupLoggingAtMUDLogon" {^%sMichael Seifert, and Sebastian Hammer$} {setuplogging}
#CLASS 0
#ALIAS setuplogging {
#VARIABLE PathToCurrentLog {%concat( @PathToLog, %time( yyyymmdd), ".txt")}
#LOG @PathToCurrentLog
}
#ALIAS readlog {#LAUNCH {notepad.exe @PathToCurrentLog}}
#ALIAS gologs {#IF (@PathToLog ="") {#LAUNCH {explorer ..\wotMUD}} {#LAUNCH {explorer @PathToLog}}}
#ALIAS logpath {
#VARIABLE PathToLog {%1}
#IF (@PathToLog ="") {#VARIABLE PathToLog {}} {
#IF (%numparam( ) > 1) {#LOOP 2,%numparam( ) {#VARIABLE PathToLog %concat( @PathToLog, " ", %param( %i))}}
#IF (NOT %ends( @PathToLog, "\")) {#VARIABLE PathToLog {%concat( @PathToLog, "\")}}
}
setuplogging
#NOOP
}
#VAR PathToLog {}
#VAR PathToCurrentLog {20170712.txt}
#TRIGGER "SetupLoggingAtMUDLogon" {^%sMichael Seifert, and Sebastian Hammer$} {setuplogging}
#CLASS 0
Re: ZMUD Help: Log Script
FWIW here is mine (for CMUD), it creates only a single log for each day upon connection. Also turns tick timer on:
Code: Select all
#event OnConnect {
#LOG D:\username\My%char(32)Documents\Games\WoTMUD\Logs\CMUD\%time("yyyymmdd").txt
#timer 1}
#event OnDisconnect {#LOG 0
#timer 0} "AliasesMacros"
Re: ZMUD Help: Log Script
Thanks all - I'd apparently already fixed this with switching on "run as admin" but didn't realize it. Sorry :p
Side note - my zmud crashes sometimes and I will lose any changes I've made since last time I opened it (which is usually weeks at least). If I manually close it, changes save fine. It seems like if I manually save settings, sometimes it will save and sometimes it won't. Any advice other than regularly close/re-open?
Side note - my zmud crashes sometimes and I will lose any changes I've made since last time I opened it (which is usually weeks at least). If I manually close it, changes save fine. It seems like if I manually save settings, sometimes it will save and sometimes it won't. Any advice other than regularly close/re-open?