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


Joined: 28 Feb 2006
Posts: 4

PostPosted: Tue Feb 28, 2006 3:59 am   

trigger help
 
ok for an output i have :
In the (zone name) you notice:
bill
bob
joe
sam
blah
blah

well i can have anywere from 1 name to infinite number of names and need to have a trigger that takes teh name in variables and prints them out 'say In the zone i see %2 %3...%X' any help please?
Reply with quote
Vitae
Enchanter


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

PostPosted: Tue Feb 28, 2006 1:36 pm   
 
a help on there would be what is the final thing you see with the output?
Is there a prompt, something that shows the total amount of people?
_________________
http://www.Aardwolf.com
Reply with quote
palmste
Newbie


Joined: 28 Feb 2006
Posts: 4

PostPosted: Tue Feb 28, 2006 8:52 pm   
 
no i either get :
In the tree you notice:
Nobody!

OR

In the tree you notice:
list of names, new line per name like example above..
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Thu Mar 02, 2006 2:31 pm   
 
Some type of text must come after the last name otherwise the game would be no more. What comes after the last name?
_________________
Taz :)
Reply with quote
palmste
Newbie


Joined: 28 Feb 2006
Posts: 4

PostPosted: Thu Mar 09, 2006 1:53 am   
 
when i do it there are just the 3 zones:

In the forest you notice:
Nobody!

In the tree you notice:
Nobody!

In the buffer zone you notice:
Nobody!

so i use a variable for the zone, and i need someway to get the names... here is an example of 2 names the output i see:

In the forest you notice:
Nobody!

In the tree you notice:
Kril the Drow.
Geliz the Drow.

In the buffer zone you notice:
Nobody!
>
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Thu Mar 09, 2006 3:43 pm   
 
So it looks like you either have a blank line between them or perhaps a prompt of > who knows anyway here is one to use for a blank line
Code:
#REGEX {In the (\S+(?:\s+\S+){0,}) you notice:} {#va place {%1};#va person %null}
#COND {^(*)$} {#va person %additem({%1},@person)} {looppat}
#COND {^$} {say In the @place I see @person}
You more than likely need to do some formatting work on @person before outputting it or you will end up with it saying:

In the tree I see Kril the Drow.|Geliz the Drow.

If you get a prompt of > then it is likely to match on the second trigger state and keep matching until you get a blank line.

Anyway it's something to get you started and get some feedback on.
_________________
Taz :)
Reply with quote
palmste
Newbie


Joined: 28 Feb 2006
Posts: 4

PostPosted: Fri Mar 10, 2006 4:33 am   
 
using zMUD 6.16 and it dosent reconize #REGEX or #COND....is that newer version or may i be doing something wrong?
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Mar 10, 2006 2:26 pm   
 
Upgrade to the latest version which is 7.21
_________________
Taz :)
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