|
palmste Newbie
Joined: 28 Feb 2006 Posts: 4
|
Posted: 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? |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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? |
|
|
|
palmste Newbie
Joined: 28 Feb 2006 Posts: 4
|
Posted: 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.. |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: 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 :) |
|
|
|
palmste Newbie
Joined: 28 Feb 2006 Posts: 4
|
Posted: 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!
> |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: 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 :) |
|
|
|
palmste Newbie
Joined: 28 Feb 2006 Posts: 4
|
Posted: 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?
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Fri Mar 10, 2006 2:26 pm |
Upgrade to the latest version which is 7.21
|
|
_________________ Taz :) |
|
|
|
|
|