Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: 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.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: 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.
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: 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
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Wed Feb 01, 2006 11:59 pm   
 
I was told %q translate into \b when you convert it?
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Thu Feb 02, 2006 12:01 am   
 
But i've tried both, and they give the same result that i already have
Reply with quote
nkei0
Beginner


Joined: 08 Oct 2005
Posts: 19

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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