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


Joined: 30 Apr 2004
Posts: 9
Location: Australia

PostPosted: Fri Apr 30, 2004 3:49 am   

Yet another multiline thing
 
I am new to zmud and have been trying to create a trigger to catch names from a list. I figured that it would be easy enough. I looked at the help file for multi-line capture and low and behold I find something WAY out of my league.

All I want to do is capture a name to a variable and create a trigger that colors that name. Here is an example of the list:
Code:

<font color="blue">3220h, 3020m exb-</font id="blue"><font color="red">es cyrene</font id="red">
<font color="green">
Current event: Free-For-All
Player           Location
-------------------------------------------------------------------------
Laurus           Sharp curve in a rocky cavern
Tamlo            Mountainside descending onto clouds
Peggy            Mountainside descending onto clouds
Gilorn           Statue of Sarapis upon the Pantheon
</font id="green">
<font color="blue">3220h, 3020m exb-</font id="blue">


Below is how I am attempting to do it, someone told me it could be done using States but I just end up with infinite loops trying that.

The triggers that I have created are:
#TR {-------------------------} {#T+ LISTCAP}
#CLASS LISTCAP
#TR {^(%w) *} {#addi hitlist %1;#cw (%1) {~@ecol}}
#CLASS 0
#TR {(%n)h,(%n)m (&w)-} {#T- LISTCAP}

(n.b. @ecol is the variable that conatins the color name, this makes changing the color much easier for me due to it not being coded in.)

I have tried this but I end up with it capturing this to the string in @hitlist:
Current|Player|Tamlo|Peggy|Gilorn

Help is greatly appreciated.

Perhaps Zugg could work on a help file for this sort of thing that is a bit simpler to understand. I read through the forum for multi-line capture stuff and there is a lot of it.

Thanks in advance to the person that takes pity on me the newbie! :)
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Apr 30, 2004 5:11 am   
 
#TR {-------------------------} {#T+ LISTCAP}
#CLASS LISTCAP
#TR {^(%w) *} {#addi hitlist %1}
#CLASS 0
#TR {(%n)h,(%n)m (&w)-} {#T- LISTCAP}
#T- LISTCAP
#TR {{@hitlist}} {#COLOR @ecol}
Reply with quote
Mathian
Newbie


Joined: 30 Apr 2004
Posts: 9
Location: Australia

PostPosted: Fri Apr 30, 2004 8:43 am   
 
Nope, your scripting doent work, I did it both cut and paste and Imprt and what I get is the capture works but it doesnt ever close so everything after that becomes magenta. Ia msure it can be multistate triigered but I havent for the foggiest got any idea how.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Apr 30, 2004 10:09 am   
 
#TR {-------------------------} {#VAR hitlist {};#T+ LISTCAP}
#TR {{@hitlist}} {#CW @ecol}
#CLASS LISTCAP disable
#TR {^(%w)} {#ADDI hitlist %1}
#TR {^%d} {#T- LISTCAP} {} {prompt}
#CLASS 0
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