|
Fallen.Anvil Novice
Joined: 12 Jul 2012 Posts: 47
|
Posted: Sun May 01, 2016 6:29 am
Auto Logging |
How can I have Cmud start a log every time I log in with a character and store that log in a specific directory?
I'll be wanting to log different characters so if they could have their name added to the log.txt file that would be great. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sun May 01, 2016 1:41 pm |
#EVENT onConnect {
#LOG %concat(%sessionid, " ", %char, " ", %time(yyyy-mm-dd), " ", %time(hh), "00.txt")
}
%char is only defined as the character name if you have auto log in set up i believe.
So you may need some other way of automatically determining which character the log is for.
#LOG defaults to the session folder, unless you specify a full path name. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Bradley21 Beginner
Joined: 08 Jan 2016 Posts: 16
|
Posted: Sun May 29, 2016 12:59 am |
So...to set up something like this...where would you create it? A trigger?
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sun May 29, 2016 1:45 am |
That snippet of code could be entered on the command line.
#EVENTs are like an alias, but they go off based on other criteria than a line of text from the game.
Though you can #RAISE them from inside a trigger.
The onConnect #EVENT will fire whenever you establish a connection between your client and the game server. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|