|
Mad_geezer Newbie
Joined: 05 Dec 2010 Posts: 8
|
Posted: Sun Dec 12, 2010 4:48 am
CMUD variable help please |
Ive tried all different combos i could think of but i cant get following to work - seemed much easier with zmud
<trigger priority="8730" newline="false" prompt="true" id="882">
<pattern>^You survey your surroundings. "(*)" has atmospheric type: (%w).</pattern>
<value>#va terrain %2
</value>
</trigger>
The * and %w patterns work but not the variable line.
thanks for help, |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sun Dec 12, 2010 9:51 am |
You have the trigger set as a prompt trigger.
|
|
|
|
Fizgar Magician
Joined: 07 Feb 2002 Posts: 333 Location: Central Virginia
|
Posted: Sun Dec 12, 2010 10:35 am |
If the line is actually coming from the mud as a prompt type line, your trigger should fire just fine. If you are trying to manually fire it while testing, be sure you are quoting the quotation marks like I have below.
Code: |
#showp {You survey your surroundings. ~"a~" has atmospheric type: b.} |
If setting the trigger to, trigger on new line doesn't give you the desired results, you might try pasting a bit of raw data from the mud, captured with the script debugger, with all messages enabled, showing the line when it is received and a few lines after it. |
|
_________________ Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34 |
|
|
|
Mad_geezer Newbie
Joined: 05 Dec 2010 Posts: 8
|
Posted: Sun Dec 12, 2010 7:40 pm Still cant fire it |
Here is a copy of the text from the mud after doing a survey command for the location
You stand within the Animists Guild.
You are standing in: Greenwood.
You survey your surroundings. "Glade of wildflowers" has atmospheric type: Forest.
You know this locale to be part of the Northern Greenwood.
This location is on the surface of the land.
The environment is suitable for herb or poison growth.
sometimes the words can wrap to the next line like next unless i increase the default width
You stand within the Animists Guild.
You are standing in: Greenwood.
You survey your surroundings. "Glade of wildflowers" has atmospheric type:
Forest.
You know this locale to be part of the Northern Greenwood.
This location is on the surface of the land.
The environment is suitable for herb or poison growth.
What i want to do is capture what type of atmospheric type it is in a variable
That shouldnt require a great deal of effort this is taking me should it ?
Thanks for any replies though, |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sun Dec 12, 2010 9:40 pm |
Try this trigger.
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="10" regex="true" copy="yes">
<pattern>^You survey your surroundings\. \"[^"]+\" has atmospheric type\: (\w+)\.$</pattern>
<value>terrain = %1</value>
</trigger>
</cmud>
|
|
|
|
|
|
|