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


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sun Feb 02, 2003 2:05 am   

Point me in the right direction please.
 
First question: whats that command that echos all your aliases triggers etc to the mud output window?

I am having a problem capturing multiline stuff to my #CAP TellWindow I've read quite a few posts on it but the results im getting aren't what I want heh
heres an example text
<2514/2624hp 889/889m 1120/1120mv, 989xp> scan
Looking around you see:
here:
Hastrom
Mixxel
south:
Master of death
Mistress of death
Man of death

My ultimate goal is to capture the 3 lines of text after South: to my TellWindow then if Master of death is there zmud will walk me into that room.
But I would just be happy with help having those 3 lines after South: going to my #CAP TellWindow

Any Help Mucho appreciated
M
Oh yea I'm a reg'd user of 6.40 (best quarter franklin I ever spent IMO)
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sun Feb 02, 2003 3:47 am   
 
Hmm any one have a previous post address that would help?
or something hehe

Spin
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sun Feb 02, 2003 5:18 am   
 
this should work for you:

#tr {^Looking around you see:} {#t+ capping}
#class capping
#tr {^$} {#t- capping}
#tr {(%w):} {#var dir %1
#cap TellWindow
}
#tr {(*)} {#cap TellWindow
#if (%1 =~ Master of Death) {#exec @dir}
}
#class 0

--note: this is assuming a blank line follows the end of the scan output. if it doesn't then make the #tr {^$} have a pattern matching your prompt. What i've given above will actually capture all of the scan output to your TellWindow, but if you'd rather ONLY have the contents of the south room, change the first trigger to have a pattern of "south:"
-untested-

--------

moon.icebound.net:9000
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sun Feb 02, 2003 9:32 pm   
 
hmm thats close, here's my litte script and then the result
#tr {^Looking around you see:} {#t+ capping}
#class capping
#tr {>} {#t- capping}
#tr {(%w):} {#var dir %1
#cap OOC
}
#tr {(*)} {#cap OOC
#if (%1 =~ Magic) {#exec @dir}
}
#class 0
then it when i type scane it does this...

> scan
Looking around you see:
see
here:
Mixxel
Hastrom
east:
the beastly fido
east
west:
the beastly fido
west
it goes huh? on the see of course then it walks east then west. heh I think you got me pretty close im gonna have some fun and try to figure this out (tis great when i make something work) but if i cant ill be back to bug ya.
thanks
M



Spin
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sun Feb 02, 2003 9:48 pm   
 
ah, well i'm seeing a few logic problems with my original script, and i have a few suggestions:

#tr {^(%w):} {#var dir %1

adding the ^ to the front of that pattern should stop the trigger from firing on the first line.

#if ("%1" =~ Magic) {#exec @dir}

adding the quotes around the %1 will stop it from matching on _anything_

these two changes should make it work like you want (i hope!)


--------

moon.icebound.net:9000
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sun Feb 02, 2003 11:49 pm   
 
aaah yep that was it, was scratching my head looking through the helps, i gotta learn these syntaxs symbols more,
Mucho thanks!


Spin
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