|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Mon Sep 17, 2007 8:24 pm
pattern with [] in it |
I am havint trouble creating a trigger that captures a variable with a number in it
example
mud output
Gold: 0 Encumbrance: unencumbered
You are carrying the following on your person:
A pair of leather bracers (worn).
A simple bow.
A leather archer's quiver [60 arrows].
my current trigger is #trigger {A leather archer's quiver [%d arrows].} {#var arrowsinquiver %1}
so that the arrowsinquiver variable would hold the number 60
for some reason i think the brackets are messing up the trigger |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Mon Sep 17, 2007 8:48 pm |
its
Code: |
#trigger {A leather archer's quiver ~[(%d) arrows~].} {#var arrowsinquiver %1}
|
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Sep 18, 2007 7:12 pm |
As Prog pointed out, any time you have a character that's defined as a special character (Such as [], @, %, *, (), etc.) you must include the quote character (~) in front of it. This is to tell zMUD "Hey, this is the pattern I want to match, not a special character!" I forget, but I believe if you want to see a list of all special characters, type #SHOW %def on the command line.
Charneus |
|
|
|
|
|