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
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Mon Oct 26, 2009 1:06 am   

How do you stop triggers spamming
 
When this trigger fires, it continues to cast long after the battle has ended.
I tried condition and abort, yet have been unable to get them working.
zccw = cast critical wounds.

Is there a way of getting the trigger to react only on every 5th line and then read the "(%W) feel a lot better!" to abort the trigger, do the count again 5 lines an then re-enable the trigger.
I don't have a means of using an if statement to do hp check via group as yet, see post http://forums.zuggsoft.com/forums/viewtopic.php?t=34026&highlight= so I have to find another way.

(*) ANNIHILATES (%w)
#IF (%ismember(%2,@groupmem) OR %match(%2, @tank)) {zph %2} {#IF (%ismember(%1,@groupmem) OR %match(%1, @tank)) {zccw %1} {}}


3318/0hp 3606/-5m 905/0mv> You make Sutex feel a lot better!
3318/0hp 3596/-10m 905/0mv> You make Halix feel a lot better!
3318/0hp 3586/-10m 905/0mv> You make Halix feel a lot better!
3318/0hp 3576/-10m 905/0mv> You make Halix feel a lot better!
3318/0hp 3566/-10m 905/0mv> You make Sutex feel a lot better!

Thanks
Ps: all my recent post are related to the same problem running 3 characters 2 doing the fighting while 1 heals. and getting the triggers working perfectly among all 3.
Other related posts http://forums.zuggsoft.com/forums/viewtopic.php?t=34028&highlight=
Reply with quote
Kuga
Beginner


Joined: 21 May 2005
Posts: 24

PostPosted: Mon Oct 26, 2009 1:53 am   
 
You could have one trigger that has a counter, let's say variable x. Variable x increments each time the case is hit. Once x reaches five then you do the command and reset x to zero.

Pseudo Code:
#IF(@x<>5) {#ADD x 1} {do command;x = 0}
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Mon Oct 26, 2009 5:11 am   
 
First thank you so much for the quick response it makes a change from the norm. one post is years old and has never been answered,other posts are weeks old and still looking for the right answer.

I read your post but Iam still confused, what is the variable X is this something I make up and the ,{do command;x = 0} What do I tell it to do?.
In the above Trigger where do i fit this in. When trying to use condition and abort, I could not work out where to place them.I open up Zmud and use the setting editor, I don't write in the command line.
Please use my trigger when explaining this. I am still learning and need example that I can understand.
_________________
Entropy rules
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Nov 03, 2009 5:00 am   
 
I'm going to assume you're using the trigger you stated as the counter line. What Kuga means is this:

Code:
#TRIGGER {(*) ANNIHILATES (%w)} {#IF (@linecount=5) {#IF (%ismember(%2, @groupmem) OR %2=@tank) {zph %2} {#IF (%ismember(%1, @groupmem) OR %1=@tank) {zccw %1}};linecount=0} {#ADD linecount 1}}


That /should/ work. I say should because I'm on the phone and can't test it properly. Let me know if it helps.

Charneus
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