|
nilse75 Newbie
Joined: 23 Nov 2010 Posts: 5
|
Posted: Tue Nov 23, 2010 5:49 pm
Problem with prompt |
I play on a MUD where I sometimes get a prompt like this
Code: |
You get a longsword.
> You wield longsword in right hand.
Hp: 215/235
> look
You are standing in a small room ...
|
Sometimes, when you send a lot of commands to the MUD you can get a line like this
Code: |
> > > You wield longsword ... |
To prevent abuse, all my triggers use the ^ to start a line. The problem is that I want to remove
any combination of > characters so I don't need to do like this on all triggers.
Code: |
#TRIGGER {^{|> |> > |> > > }...} {...}
|
How can I write a trigger that will remove all the > from the start of my lines so I can write
normal triggers using ^? I hope you understand what I mean.
Thanks! |
|
|
|
Fizgar Magician
Joined: 07 Feb 2002 Posts: 333 Location: Central Virginia
|
Posted: Tue Nov 23, 2010 6:17 pm |
Try this.
Code: |
<trigger priority="10" regex="true" id="1">
<pattern>^(>\s)*(.*)</pattern>
<value>#sub %2</value>
</trigger> |
|
|
_________________ Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34 |
|
|
|
nilse75 Newbie
Joined: 23 Nov 2010 Posts: 5
|
Posted: Tue Nov 23, 2010 6:30 pm |
Thanks! Works perfect
|
|
|
|
Fizgar Magician
Joined: 07 Feb 2002 Posts: 333 Location: Central Virginia
|
Posted: Tue Nov 23, 2010 6:31 pm |
I forgot to mention that you will want to set the priority of that trigger lower than any trigger, you want to fire off of anything that get's #sub'ed.
|
|
_________________ Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34 |
|
|
|
|
|