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
jjloraine
Novice


Joined: 10 Jul 2006
Posts: 30

PostPosted: Mon Sep 18, 2006 8:43 am   

Multiple logs in a row - problem with capturing text...
 
So, recent divine interference in my mud has made me a bit paranoid and I want to set a log (replaced each time I come on by an updated one) to automatically check all my equipment when I log in, before starting up my normal autolog for my session.

here's what I've got:

#lo c:\zmud\aaa-Narissa-inventory new
#show ****INVENTORY FOR %time( yyyy/mm/dd)****
#show ***INFO INV***
info inv
#show ***INFO INSIDE SACK***
info inside sack
#show ***INFO INSIDE PACK***
info inside pack
#lo c:\zmud\narissa%time( yyyymmdd)

now the log makes itself just fine, however the only text that gets captured into it is info inv, info inside sack and info inside pack. not the shows, and more importantly, not the text from the mud with my item numbers - those appear in the second log. I've tried various options, waits, making a trigger for the second log to start, etc, and it's still not working.

Am I missing something obvious, or is there a preference I need to enable, or...?

Any help is appreciated, thanks.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Sep 18, 2006 7:21 pm   
 
Try
#lo c:\zmud\aaa-Narissa-inventory new
#echo ****INVENTORY FOR %time( yyyy/mm/dd)****
#echo ***INFO INV***
info inv
#echo ***INFO INSIDE SACK***
info inside sack
#echo ***INFO INSIDE PACK***
info inside pack
#lo c:\zmud\narissa%time( yyyymmdd)

I don't have any exp with logs, but i know that #show and #echo are there for a reason cause they are different somehow slightly.
_________________
http://www.Aardwolf.com
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Sep 18, 2006 10:30 pm   
 
You could also try using #SAY. The use of #ECHO will not be logged unless a certain preference is set.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Sep 19, 2006 2:06 pm   
 
Thanks Vij, I'd forgotten all about the #say command.
_________________
http://www.Aardwolf.com
Reply with quote
jjloraine
Novice


Joined: 10 Jul 2006
Posts: 30

PostPosted: Mon Sep 25, 2006 7:18 pm   
 
#say, #show, #echo, none of those work. i don't really care if those display, it's just cosmetic. it's the output from the MUD itself that isn't logging.

in my little thing I want to run, I SEND info inv, info inside sack and info inside pack to the mud. The mud then sends back a list of all the items I am holding, eg:

"an x item" item123
"a b item" item246
etc....

however, this text isn't logging, NOTHING is logging except for the commands I have entered. All of the output from the mud isn't being captured in the first log...but EVERYTHING is going into the second, no matter how many delays and other commands I enter.

I've tried disabling save buffer when logging. No change.

Any suggestions? Does zmud have some setting or required syntax for multiple logs created in a row?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Sep 25, 2006 7:42 pm   
 
you could use #FILE and #WRITE to create your own secondary logs
_________________
Discord: Shalimarwildcat
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Sep 25, 2006 8:20 pm   
 
oh geezz, I totally misread your 1st post.
What it sounds like is that the log is being closed and the 2nd being opened before the output appears.
If the end of the output has the same type of info all the time, then make a trigger to activate the 2nd one.

#lo c:\zmud\aaa-Narissa-inventory new
#show ****INVENTORY FOR %time( yyyy/mm/dd)****
#show ***INFO INV***
info inv
#show ***INFO INSIDE SACK***
info inside sack
#show ***INFO INSIDE PACK***
info inside pack
#trigger {There are %d items in your pack} {#lo c:\zmud\narissa%time( yyyymmdd)}

Something like that?
_________________
http://www.Aardwolf.com
Reply with quote
jjloraine
Novice


Joined: 10 Jul 2006
Posts: 30

PostPosted: Mon Sep 25, 2006 11:12 pm   
 
using #file and #write, can I overwrite an existing file of the same name? the idea is that I have a file that shows my inventory, updating to my most recent login, replacing the old one.
Reply with quote
jjloraine
Novice


Joined: 10 Jul 2006
Posts: 30

PostPosted: Mon Sep 25, 2006 11:15 pm   
 
and nope, it's not a matter of making a trigger. something in zmud is set that the first log just isn't going at all IF the second one is started after it. All the info from the first log goes into the second one if I make a second one after the first. I've tried using alarms, waits, triggers, etc to set the second log, with the same result each time. my guess is it's some tweaky little setting about how logs work...

for now, I'll try out that #file suggestion :D

thanks everyone for the responses :)
Reply with quote
jjloraine
Novice


Joined: 10 Jul 2006
Posts: 30

PostPosted: Tue Sep 26, 2006 3:09 am   
 
sooo....ended up trying to figure out how works, getting a bit distracted by a fun idea of tracking changes to my inventory...came up with this...I'm guessing it's a bit bulky. It works, but i'm sure there's a more elegant way?

#ALIAS invcheck {#t+ inventory;inventory}

#CLASS {inventory}
#ALIAS inventory {info inv;info inside sack;info inside pack;#wa 1000;updateinventory;#var inventorynew {0};#alarm +3 {#t- inventory}}
#TRIGGER {*~"(%w)(%d)~"*} {#additem inventorynew %1%2}
#TRIGGER {*~"(%w) (%w)(%d)~"} {#additem inventorynew %2%3}
#ALIAS updateinventory {#loo 1,%numitems( @inventorynew) {#if %ismember( %item( @inventorynew, %i), @inventory) {} {#echo added %item( @inventorynew, %i)}}
; #loo 1,%numitems( @inventory) {#if %ismember( %item( @inventory, %i), @inventorynew) {} {#echo lost %item( @inventory, %i)}}
;#var inventory {0};#loo 1,%numitems( @inventorynew) {#additem inventory %item( @inventorynew, %i)}
;#file 1 inventory.txt
;#era 1
;#file 1 inventory.txt
;#write 1 {INVENTORY}
;#write 1 {%time( )}
;#loo 1,%numitems( @inventory) {#write 1 %item( @inventory, %i)}
;#close 1}
#VAR inventorynew {0}
#VAR inventory {0}
#CLASS 0

....it looks so icky and messy....

edit: just realized that this will be a quick easy way for me to see what items I've stolen or lost after the end of a fight, etc, but will all the ifs/string lists slow my zmud down?
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