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
Garrison
Beginner


Joined: 21 Oct 2003
Posts: 21
Location: USA

PostPosted: Wed Nov 12, 2003 6:45 pm   

Help creating triggers for group and self.
 
Me again!

Have I told you lately how much I appreciate all of you for your help?
If not, I really appreciate all of your help :)

Here are my questions about triggers:

1) How would you go about setting up a trigger to auto cast a spell on someone that asks for it in your group?

For an example of what I'd like to accomplish:
Garrison (me) and Bob are grouped.
Bob tells the group: heal please
Garrison casts "heal" on Bob.
Bob tells the group: shield please
Garrison casts "shield" on Bob.
(etc, etc)

2) How would you recommend creating a trigger to auto-heal the group tank? Our mud doesn't have a feature for following group members specifically, short of typing "group" which display a format like this:
Name: HP: MANA: MOVE:
Garrison 100% 100% 100%
Bob 50% 100% 80%

What I'm thinking is to somehow be able to somehow set Bob as a "target" (if you will) so that when I type "Group" and it comes up, if zMUD sees a set HP % (say, 50%) it casts a heal spell on Bob. Btw, our mud dosn't have a specific "target" feature.

I think that's all I've got questions on, for now :)

I'm sure I'll think of more in the future!

Again, I appreciate all of your help!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Nov 12, 2003 8:02 pm   
 
1) "How would you go about setting up a trigger...?" Decide what the pattern will look like by copying a sample line to the Pattern: box, and replacing changeable information with appropriate wildcards from the Pattern Matching topic. Information which will be used in the value should be surrounded with (), this will usually be the same information you used wildcards for. Once the pattern is finished, put the desired commands in the Value: box.
Pattern:
(%w) tells the group: (%w) please
Value:
cast '%1' %2

2) "How would you recommend creating a trigger to auto-heal the group tank? " Use a variable for the tank name. I'd just type the #VAR command into the command line to change it, it's simple enough.
#VAR tank Bob

You then use the variable in a trigger so you'll cast the spell when the tank's HP drops below the threshold.
Pattern:
@tank%s(%d)~%%s%d~%%s%d~%
Value:
#IF (%1 < 51) {cast 'heal' @tank}
NOTE: The %s is needed since the number of spaces between items may change. The ~ is needed so that zMUD will treat the % after each number as a normal character.

Finally, if the group hp display doesn't come up automatically you'll need an alarm to send the necessary command every couple seconds.
#ALA *2 {group}
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Wed Nov 12, 2003 10:51 pm   
 
quote:

1) "How would you go about setting up a trigger...?" Decide what the pattern will look like by copying a sample line to the Pattern: box, and replacing changeable information with appropriate wildcards from the Pattern Matching topic. Information which will be used in the value should be surrounded with (), this will usually be the same information you used wildcards for. Once the pattern is finished, put the desired commands in the Value: box.
Pattern:
(%w) tells the group: (%w) please
Value:
cast '%1' %2


cast '%2' %1.
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