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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
JerleMin
Novice


Joined: 17 Oct 2000
Posts: 38

PostPosted: Fri Nov 09, 2001 11:01 pm   

A unique coding problem
 
Greetings.. I need some help with an interesting coding problem..

Essentially the problem is such..
A MUD i build on likes you to keep track of each room you build, and what commands you use to build it.. So i'm wondering if it's possible to set up something to log only the commands prefixed with a * to a log..

I need soemthing like..

start_room
all the *commands log to rooms.txt
end_room

start_obj
all the *commands log to objects.txt
end_obj

start_mob
all the *commands log to mobs.txt
end_mob

Help appreciated.. Thanks!

Edit: Bump

Jerle Minara,
zMUD 6.22 Win98
Aetolia and Achaea Addict!
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Nov 10, 2001 6:07 am   
 
gack, how do you make the dang plus sign appear?
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Nov 10, 2001 6:12 am   
 
...i'll improvise
the blue @ in the code should be changed to a plus sign.
this should work fine, it tested well at least
just enter :
logto rooms.txt
then do your building like normal
then enter :
endfile
to close the file and disable the trigger :)
it'll work for any filenames you want

#alias logto {

filename = %1
#t+ commandlog
#file 1 @filename
}
#alias endfile {#close 1;#t- commandlog}

#oninput {^~*(*)$} {#write 1 "*%1"} {commandlog}


btw, the red part should be changed to {^~~*(*)} if you enter the line in the command line.


Edited by Kjata to change the @ to a + - "Never trust the Edit Window"

Edited by - Kjata on 11/10/2001 05:40:38
Reply with quote
JerleMin
Novice


Joined: 17 Oct 2000
Posts: 38

PostPosted: Sat Nov 10, 2001 8:00 pm   
 
Hmm didn't work for me.. Just added a bunch of stars to the logfile..

Jerle Minara,
zMUD 6.22 Win98
Aetolia and Achaea Addict!
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Mon Nov 12, 2001 10:18 pm   
 
when your're ready to start building, make sure the file name you specify isn't being used for something else. also, the filename you specify will allways appear in zmuds program folder. You should choose a unique file name for building rooms, objects, and mobs
Emit
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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