|
Eyeless Wanderer
Joined: 02 Dec 2001 Posts: 80 Location: Canada
|
Posted: Sun Jan 25, 2004 11:20 am
Capturing wildcards into variables |
Im having trouble catching variables that are bigger than one word when using wildcards.
E.g.:
#tr {To get home, you need to go: &directions} {@directions}
The problem here is... the mud reports something like (North.) or (Climb wall.) so the trigger sends North. or Climb wall. to the mud... this ALMOST works... it would work without . on the end.
What I need to know, is there way to strip it? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jan 25, 2004 11:44 am |
If you don't need to store this command into a variable, you can just use the * wildcard:
#TRIGGER {To get home, you need to go: (*).} {#EXEC {%1}}
If you want to capture it into a variable, then you can use {} to tell zMUD where the name of the variable ends:
#TRIGGER {To get home, you need to go: &{directions}.} {#EXEC {@directions}} |
|
|
|
Eyeless Wanderer
Joined: 02 Dec 2001 Posts: 80 Location: Canada
|
Posted: Sun Jan 25, 2004 2:12 pm |
Sweet.
Works perfectly. |
|
|
|
|
|