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
Taguya
Newbie


Joined: 25 Feb 2009
Posts: 3

PostPosted: Wed Feb 25, 2009 3:14 am   

Help automatically generating equipment list.
 
Hi, I'm a bit of a newbie so I apologize for my ignorance.
I want to set up ZMud to automatically dump certain information to a text file.
In the MUD I play, there is an "identification spell" which will give me a readout of an item's stats.
Can I have ZMud automatically dump this information into a seperate text file for record purpose?
Here's a sample of the returned text when identifying something (In this case "an orb of souls").

Keywords: orb, Item Type: LIGHT
Short description: an orb of souls
Long description:
A small purple glowing orb has been left here.
Can be worn on: TAKE,HOLD
Set char bits:
Extra flags: GLOW,NOLOCATE,FRAGILE
Anti-classes: Cl,Th,Wa,Dr,Ba,Bd
Weight: 5 pounds, Value: [5200], Min level: [45]
2) Hours: [-1]
Equipment Status: Special
Char affects: +13 MANA, +5 SAVING_FIRE
Ok.

Any advice is appreciated.
Reply with quote
Taguya
Newbie


Joined: 25 Feb 2009
Posts: 3

PostPosted: Wed Feb 25, 2009 9:51 am   
 
Sorry, just to specify what I'm looking for... I don't want the information to be sorted into a "database" file, like many of the examples on this forum. If possible, I'd like to have the information copied UNMODIFIED into a text file.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Feb 25, 2009 10:49 am   
 
Simplest method would be to turn on logging when you are identifying items then turn it off afterwards. You do it by script with an #ONINPUT trigger to turn on the #LOG command, and another trigger to turn it off.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Feb 25, 2009 6:45 pm   
 
But if he/she wants it in a database as well, she'd need to have the proper triggers to make the database records.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Taguya
Newbie


Joined: 25 Feb 2009
Posts: 3

PostPosted: Thu Feb 26, 2009 12:26 pm   
 
OK, from your response, I have an idea about how to set it up...
if "identify" is my alias for casting identify:
#oninput {identify} {#LO eqlist.txt}
From there, how can I set it to automatically turn logging off once the item is identified?
The MUD will always output "Ok." after the item identification is finished, so I assume I'd want to set a trigger to that to turn off the log file?
I read that I can enter #LO by itself to end a logging session, but if I simply make it a trigger to the dialogue "Ok.", I'm worried that will cause problems with other MUD functions (the MUD will send back "Ok." after many actions). Can you give me an example of the exact syntax I'd need?
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Thu Feb 26, 2009 4:34 pm   
 
Just turn on/off the trigger so it isn't always on.

#oninput {indetify} {#LOG eqlist.txt;#T+ Ident_End}
#TRIGGER "Ident_End" {^Ok.} {#LOG;#T- Ident_End}
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Fri Feb 27, 2009 8:08 am   
 
I don't mean to take this off topic, but I've seen this a couple of times..
In the previous post, you put
#trigger "Ident_end" {^Ok.} {#log;#t- Ident_end}.. that turns the trigger off, without having to stash it away in its own class to enable/disable?
_________________
Win7-home - Cmud 3.33a
WinXP-pro - Zmud 7.21
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Feb 27, 2009 9:27 am   
 
Yes.. Here is more detail on the #T- command.
_________________
Asati di tempari!
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Sun Mar 01, 2009 12:38 pm   
 
I was suggesting FILE as an argument, and withdraw my post given it was just an argument
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