Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Drahkuna
Beginner


Joined: 15 Apr 2005
Posts: 15
Location: MO

PostPosted: Thu Jul 13, 2006 12:48 am   

My EasyLog script
 

#CLASS {EasyLog}
#ALIAS do_log {
logging = 1
#lo %time
#say %ansi( 15)~[%ansi( 10)Logging Enabled%ansi( 15)~]
}
#ALIAS end_log {
logging = 0
#lo
#say %ansi( 15)~[%ansi( 12)Logging Disabled%ansi( 15)~]
}
#ALIAS clearlog {
log_end_record=""
log_start_record=""
#say ~<b>*Log record cleared*~</b>
}
#ALIAS logdisplay {
#show ~<color darkorange>"==========================="~</color>
#loopdb @log_start_record {
#mxp ~<color red>~<b>%key~</b>~</color>
#addi log_to_send %key
}
#show ~<color green>--------********--------********--------~</color>
#loopdb @log_end_record {#show ~<color white>~<b>%key~</b>~</color>}
#show ~<color darkorange>"==========================="~</color>
}
#ALIAS showlog {
log_number=%1
#launch {notepad.exe %item( @log_to_send, @log_number)}
}
#VAR logging {0} {0}
#VAR log_start {}
#VAR log_start_record {}
#VAR log_end {}
#VAR log_end_record {}
#VAR log_to_send {}
#VAR log_number {}
#TRIGGER {Log is on: &log_start$} {#addkey log_start_record @log_start}
#TRIGGER {Log is off$} {
log_end=%time
#addkey log_end_record @log_end
}
#BUTTON 1 {Logging Disabled} {#if (!@logging) {do_log} {end_log}} {Logging Enabled} {#if (@logging) {end_log} {do_log}} {} {1} {} {} {} {} {} {} {} {79} {47} {} {} "" {} {} {log_toggle}
#CLASS 0



A little logging script that keeps track of recent logs and allows you to access the logs through a simple alias.



LOGDISPLAY - shows a list of recent logs, the start date/time's in red and end date/time's in white.


CLEARLOG - empties the log record.


SHOWLOG <#> - opens the log file corresponding to its position in the log record. i.e. if the log at the very top of your list is "Log of July 11th, 2006...", typing in SHOWLOG 1 will open up the file titled "Log of July 11th, blah blah, .txt"
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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