|
Strakc Apprentice
Joined: 31 Jan 2006 Posts: 106 Location: Virginia Beach, Virginia
|
Posted: Wed Feb 01, 2006 7:02 pm
Trigger help, I guess |
A sprig of mistletoe (mistletoe) 60 left.
I want to know if i can turn this into like...
* (@herb) * * left. and have the 3rd * take the number and send it to a variable, and then have an if statement in the trigger to see if the amount variable is greater then 10 and if so harvest @herb. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Feb 01, 2006 10:05 pm |
You can, and you seem to have a nice grasp on how to do it. Look up #TRIGGER if you run into problems.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Strakc Apprentice
Joined: 31 Jan 2006 Posts: 106 Location: Virginia Beach, Virginia
|
Posted: Wed Feb 01, 2006 10:56 pm |
Thanks for the help, I found what I was looking for, and have made what I was looking for even upped it a bit to be fancy.
|
|
|
|
Strakc Apprentice
Joined: 31 Jan 2006 Posts: 106 Location: Virginia Beach, Virginia
|
Posted: Wed Feb 01, 2006 11:31 pm |
Well since i have this topic still, I have this trigger. #REGEX {(\b@LGuildEnemies\b)} {#CW red}
and it will match everyone in my variable, one of the things in it is Ele. Now it will match any reference to Ele, in any word. Like it will match celest or bracelet but i only want it to match on the word Ele |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Feb 01, 2006 11:57 pm |
check out the %q or %y wildcard (I think it's %q you need, though). It matches on whitespace as well as line boundaries (ie, ^ and $ all rolled into one).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Strakc Apprentice
Joined: 31 Jan 2006 Posts: 106 Location: Virginia Beach, Virginia
|
Posted: Wed Feb 01, 2006 11:59 pm |
I was told %q translate into \b when you convert it?
|
|
|
|
Strakc Apprentice
Joined: 31 Jan 2006 Posts: 106 Location: Virginia Beach, Virginia
|
Posted: Thu Feb 02, 2006 12:01 am |
But i've tried both, and they give the same result that i already have
|
|
|
|
nkei0 Beginner
Joined: 08 Oct 2005 Posts: 19
|
Posted: Sat Feb 04, 2006 8:16 am |
You could try...
A sprig of mistletoe (mistletoe) 60 left. converted to
#AC {^*~(@herb~) (%d) left.$} {#VA numherb %2;#IF @numherb<10 {harvest @herb} {#NOOP}
that will work if you have less than 10 herbs
however if you only have one left, and it doesn't have the number it probably won't work. |
|
|
|
|
|