![](templates/Classic/images/spacer.gif) |
balrugh Newbie
Joined: 20 Apr 2004 Posts: 9
|
Posted: Mon Jan 22, 2007 4:32 pm
Using ( in a trigger |
Hello,
i have the next line in my mud:
Pv: 457(457) Pe: 270(345) Pm: 32(32) Px: 5035629 Psoc: 108
I want to capture hpnow and maxhp. In zmud i do anything so
Pv: (%d){(}(%d){) Pe: }(%d){(}(%d){) Pm: }(%d)
#var hpnow %1
#var maxhp %2
But in cmud it doesnt work. I think that it is for the (, i try to put in the script "#echo Any", but it doesnt go. Any idea?
Sorry for my english.
Balrugh. |
|
|
![](templates/Classic/images/spacer.gif) |
Fang Xianfu GURU
![](images/avatars/1763170544a2093e7e85da.gif)
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jan 22, 2007 4:59 pm |
Braces {} aren't the proper way to comment something, that creates a stringlist such as {tea|biscuits|cakes} that will all match. The proper way to comment is this:
Pv: (%d)~((%d)~) Pe: (%d)~((%d)~) Pm: (%d)
Just add a ~ before the special character you want to match. If the pattern was this:
(Blah)
you'd use this:
~(Blah~)
because brackets () are special characters. |
|
|
![](templates/Classic/images/spacer.gif) |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Mon Jan 22, 2007 5:01 pm |
I'm surprised it works in zMUD, as the syntax isn't quite correct. Use ~ to escape special characters
This should work in both
Pv: (%d)~((%d)~) Pe: (%d)~((%d)~) Pm: (%d)~((%d)~) Px: (%d) Psoc: (%d)
Edit: Bah, you beat me to it Fang |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
![](templates/Classic/images/spacer.gif) |
balrugh Newbie
Joined: 20 Apr 2004 Posts: 9
|
Posted: Tue Jan 23, 2007 2:42 pm |
Very Thanks :) I probe it and it function.
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|