|
uviel Beginner
Joined: 24 Feb 2007 Posts: 12
|
Posted: Sat Feb 24, 2007 6:43 pm
Stat trigger |
Hi, I am trying to capture stats to a variable via trigger. The mud I am on displays stats as:
------------------------------------------------------------------------
Str: 23 (23.4) Plat: 2
Int: 14 (14.0) Aqp: 0 Gold: 96
Wis: 16 (16.0) Iqp: 0 Silv: 30
Dex: 15 (15.0)
Con: 22 (22.0)
I made the followng trigger:
%s Str: %s %d (?%a?)
with @str = %1 in the value field
The above is not firing. Any hel would be appreciated. BTW I am new to this so if at all possible take it easy on me :P |
|
|
|
uviel Beginner
Joined: 24 Feb 2007 Posts: 12
|
Posted: Sat Feb 24, 2007 6:53 pm |
Oh yeah also havng problem with capturing decimal numbers I just capture 23. the number after the decimal point is not getting captured
|
|
|
|
uviel Beginner
Joined: 24 Feb 2007 Posts: 12
|
Posted: Sat Feb 24, 2007 7:53 pm |
Solved it with the following trigger
Str: %d (%1) %s Plat: %d
Thanks |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Feb 24, 2007 8:00 pm |
%a isn't a valid wildcard, and I'm not sure what's going on with that (??) stuff. Technically, %1 isn't a valid wildcard either, you'll should really use something like:
%sStr:%s%d (%d.%d)
You could also create a regex using [\d\.]+ |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Feb 25, 2007 3:16 am |
Umm, yeah it is, Fang (but you're correct in that it wouldn't work in this situation). %a equates to any letter OR number combination similar to %w:
%w -- one-word combination of only letters (ie, "cat" but not "cat-dog")
%d -- one-word combination of only numbers (ie, "123" but not "1,000")
%a -- one-word combination of anything %w or %d matches (ie, "123abc")
%p -- one-word cominbation of only punctuation symbols (ie, "...")
%x -- one-word combination of anything %w, %d, or %p matches |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|