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
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sun Aug 28, 2011 4:18 am   

Command input triggers and repeat within line
 
Repeat within line appears to do nothing with command input triggers. Simple test:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger type="Command Input" priority="27030" repeat="true" copy="yes">
    <pattern>test</pattern>
    <value>#sub replace</value>
  </trigger>
</cmud>

Type test test test on the command line, and it changes to replace test test. Intentional or bug?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Aug 30, 2011 12:45 pm   
 
A command input trigger is designed to match commands, which only occur at the beginning of the line, so it seems to me this is operating as it should.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Aug 30, 2011 1:12 pm   
 
I disagree. The trigger above doesn't only match commands at the beginning of the line, for example foobar test test changes to foobar replace test. Command input triggers still use normal pattern rules, and can be anchored to the beginning and/or the end of the line if that's what you want, but they're certainly not by default.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Aug 30, 2011 1:16 pm   
 
Rahab wrote:
A command input trigger is designed to match commands, which only occur at the beginning of the line, so it seems to me this is operating as it should.


I don't believe this is correct.

I use command input triggers all the time as substitutions -- for example, I type 'get all bag1' instead of remembering that the serial number for bag1 is 832810. It correctly substitutes 832810 in place of bag1, so what's sent to the MUD is 'get all 832810.'

This makes it impossible for me to do something like 'pour contents bag1 bag2.' Or, for some, impossible to do things like 'The prizes are 1m, 2m, 3m, and 10m.' and have it send 'The prizes are 1,000,000, 2,000,000, 3,000,000, and 10,000,000.'
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Aug 30, 2011 7:00 pm   
 
Hm, you're right. Sorry. I've only ever used them for matching commands.
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