Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Mad_geezer
Newbie


Joined: 05 Dec 2010
Posts: 8

PostPosted: 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 Sad

<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,
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun Dec 12, 2010 9:51 am   
 
You have the trigger set as a prompt trigger.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: 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
Reply with quote
Mad_geezer
Newbie


Joined: 05 Dec 2010
Posts: 8

PostPosted: 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,
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: 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>
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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