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
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Mon Oct 15, 2012 2:16 pm   

Pattern Conflict in Prompt Trigger
 
I get 3 different prompts from the Mud I play.

Only 2 are of my concern at the moment.

The standard prompt of:
<552/712hp 283/355m 580/580mv 100br (-607)al spl:ilmpqSVwf -r>

After my conversion trigger it looks like this:
Hit Points: 671(712)(2) Mana: 299(355)(10) Moves: 569(580)(8) 100br (-607)al spl:ilmpqSVwf -r>

And the change when I mount a beast of burden:

<502/712hp 251/355m 3000/3000Mountmv 100Mountbr (-607)al spl:ilmpqSVwf -r>

And the conversion trigger FAIL looks like this:
Hit Points: 671(712)(2) Mana: 299(355)(10) Moves: 1850(2000Mount)(8) 100br (-607)al spl:ilmpqSVwf -r>

The problem I have is capturing the br (aka breath) value without including the Mount. Here is what I have:

#TRIGGER {<(&curHp)/(&maxHp)hp (&curMana)/(&maxMn)m (&curMv)/(&maxMv){Mountmv|mv}} {<code here>} "" "prompt"

It seems the {Mountmv|mv} will only match the mv and not the Mountmv.
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Mon Oct 15, 2012 3:31 pm   
 
The problem is that (&maxMv) is matching 3000Mount which leaves {Mountmv|mv} to match only mv. In trigger patterns, more specific is always better than more generic - your first six captures should be set to match digits only. This pattern should do what you want:
Code:
<(&%dcurHp)/(&%dmaxHp)hp (&%dcurMana)/(&%dmaxMn)m (&%dcurMv)/(&%dmaxMv){Mountmv|mv}
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Mon Oct 15, 2012 4:41 pm   
 
Ah! Didn't know you could mix the wild chars like that...Good to know. Thanks.
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Thu Oct 18, 2012 12:25 pm   
 
Quote:
After my conversion trigger it looks like this:


Most of these MUDs allow you to change your prompt in game and set it the way you want it to display. Is that possible on your MUD? If so, I would do that instead of converting it through a trigger.
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