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
rwfrk
Wanderer


Joined: 26 Feb 2002
Posts: 81
Location: USA

PostPosted: Fri Dec 27, 2002 5:14 pm   

#write help?
 
Ok..I'd like to set it up to capture all of the following text to a file..I can see that i'd use write..but i've got no real understanding of how to go about using it to accomplish my objective.
My Guess is it would be EASIEST to capture everything between the 2 sets of _-ed lines and then write to the file. This file will NOT ever need to be appeneded to..replace is prefered.
Thanks in advance .

---TEXT Examples Follow of a the command caccount ---
<8801/8801hp 6856/6856m 1302/4372mv> <Exits:S> <Qst: 13 TNL: 682> <ROOM: Solomon's Chamber >

Clan : Fallen
____________________________________________________________________________

Current Balance Total Value
----------------------------------------------------------------------------

Silver : [ 4037353] | Total invested Diamonds : [ 31200]
Gold : [10400627] | Total invested Quest Points : [ 6240]
Quest Points : [ 5486] | Total invested AotC Points : [ 624]
AotC Points : [ 35] | Total invested AotC Tokens : [ 1534]
AotC Tokens : [ 105] | Current balance in Diamonds : [ 94918]
____________________________________________________________________________


<8801/8801hp 6856/6856m 1302/4372mv> <Exits:S> <Qst: 13 TNL: 682> <ROOM: Solomon's Chamber >
Reply with quote
rwfrk
Wanderer


Joined: 26 Feb 2002
Posts: 81
Location: USA

PostPosted: Fri Dec 27, 2002 5:17 pm   
 
Oh..forgot to say I've got w95 version 6.16 ..although I would like it to be useable from 6.16+ ;)..So try not to make use of any of the the new nifty fuctions in 6.40
--Thanks In advance--
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Dec 27, 2002 6:29 pm   
 
#TRIGGER {Clan : %w$____________________________________________________________________________$%sCurrent%sBalance%sTotal%sValue} {#FILE 1 caccount.txt;#ERASE 1;#FILE 1 caccount.txt;#TEMP {____________________________________________________________________________} {#T- getcaccount;#CLOSE 1};#T+ getcaccount}
#TRIGGER "getcaccount" {(*)} {#WRITE 1 {%1}}

By the way, why don't you upgrade to 6.40? It's free and a lot better than 6.16.

Kjata
Reply with quote
rwfrk
Wanderer


Joined: 26 Feb 2002
Posts: 81
Location: USA

PostPosted: Sat Dec 28, 2002 4:02 pm   
 
Thanks..havent given that a try but knowing the work you've done I'm sure it will do the job.
As to why i havent upgraded there are 2 primary reasons. The first and foremost is i've got a low end system that really had probblems every time i tried to put MDAC on to install those beta's. The 2nd is: I have spent a great deal of time mapping my favorite mud. Part of the only reason I got it done was because the .map format..although it had its probblems was quite easy to keep everyone using the right version on.If someone had a bettter copy of one zone they sent it out to the rest of us. I saved my self lots of time with mazes and things by spliting up the work between various people. All though i recall reading something here awhile back about plans to write some kind of plugin to keep everyone in a group synced on the map or something of that nature I get the feeling its aways off. However that would be a welcome addition to me and would probbly entice me to spend my hours downloading Zmud 6.40 on my 56k modem.
Reply with quote
rwfrk
Wanderer


Joined: 26 Feb 2002
Posts: 81
Location: USA

PostPosted: Sat Dec 28, 2002 4:25 pm   
 
I had to change the trigger to Clan : %w$____________________________________________________________________________$ to get it to work..thanks ;)
Reply with quote
the_demagogue
Newbie


Joined: 28 Dec 2002
Posts: 3
Location: USA

PostPosted: Sat Dec 28, 2002 7:07 pm   
 
Okay, rwfrk was doing this at my request, and he's kinda reworked some of it, and then I did too...
Now, in the 'perfectionist' stage, i'm trying to figure out how to make zmud put the ['s and the ]'s and the white spaces in between into the .txt
I'm probably going to feel dumb once i get the answer, but you know... thanks for re-humbling me.


the Demagogue
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Dec 29, 2002 12:31 pm   
 
Try enclosing the %1 in double quotes. Maybe instead you will need to put it inside %quote (although %quote should not be able to solve the problem with the spaces). Or perhaps you could do:
%expand("%1", 1)

Kjata
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