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
Gear56
Newbie


Joined: 14 Sep 2005
Posts: 4

PostPosted: Thu Sep 29, 2005 3:15 am   

Trigger wait help
 
I use the following trigger to autojoin the tank in battle

TRIGGER {@title punch} {#if {@incombat = "no"} {join @tank}}
#TRIGGER {@title hit} {#if {@incombat = "no"} {join @tank}}
#TRIGGER {@title bite} {#if {@incombat = "no"} {join @tank}}
#TRIGGER {@title whip} {#if {@incombat = "no"} {join @tank}}
#TRIGGER {@title slash} {#if {@incombat = "no"} {join @tank}}
#TRIGGER {@title crush} {#if {@incombat = "no"} {join @tank}}
#TRIGGER {@title smash} {#if {@incombat = "no"} {join @tank}}
#TRIGGER {@title pierce} {#if {@incombat = "no"} {join @tank}}

but it doesnt always kick in right after the first hit, generally right after the first round of combat and it sees X hits several times before incombat is = to yes. Is there a way to fix this? Lags me up a bit and the onjoin triggers dont hit as fast as i would like
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Thu Sep 29, 2005 4:47 am   
 
#IF statement should be in ().

#TRIGGER {@title pierce} {#if (@incombat = "no") {join @tank}}

You might need to expand the @title variable by surrounding it with {}.

#TRIGGER {{@title} pierce} {#if (@incombat = "no") {join @tank}}
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Sep 30, 2005 2:51 am   
 
curly braces mean something entirely different in trigger patterns, so unless @title is actually a stringlist this isn't what you want.
_________________
EDIT: I didn't like my old signature
Reply with quote
Gear56
Newbie


Joined: 14 Sep 2005
Posts: 4

PostPosted: Tue Oct 04, 2005 2:32 am   
 
The trigger works just fine, only it sees the text multiple times and sends 'join @tank' several times... What i'm asking is if there is anyway to only send it once.
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Tue Oct 04, 2005 9:16 am   
 
You need to change the incombat value once you're in combat.

#TRIGGER {@title word} {#if (@incombat = "no") {join @tank; #VAR incombat "yes"}}

Remember to change it back to "no" once you're out of combat.
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
Gear56
Newbie


Joined: 14 Sep 2005
Posts: 4

PostPosted: Wed Oct 05, 2005 1:53 am   
 
In my script I have other triggers that set the incombat variable back to no. The code you gave me Slaem is the exact same code I use in my script, only you suggest I set the incombat variable equal to yes after I issue the command join @tank. I set the incombat variable to yes only after I see the text, you hit/slash/bite. What I am asking here is this: Is there a way only respond once. When running I tend to lag and I am not always able to join the tank as quick as I'd like. The text @title hits/slashes/bites is seen several times before I accually join, making the trigger send join tank several times. This is unnecessary and creates more lag. That is the problem I am trying to correct here. I'm not sure I can clarify this any more.
Thanks for all the suggestions, more are welcome.
Reply with quote
Insomniac
Wanderer


Joined: 25 Mar 2004
Posts: 78
Location: United Kingdom

PostPosted: Thu Oct 06, 2005 1:03 am   
 
#TRIGGER {@title {punch|hit|bite|whip|slash|crush|smash|pierce}} {#IF (@incombat = "no") {join @tank}}

This would be a good start to taking all those triggers down into one.

As for your other problem... I'm not sure.

Maybe another variable is needed to monitor when you're joined and when you're not.

You could #VAR JoinedToTank 1 when you join him, and set up another trigger with #VAR JoinedToTank 0 when you're not joined to him.

I think that's how I'd do it.
_________________

No-one ever gets flamed for posting too much information. Conform to the PPP (Preferred Posting Protocol) and give as much information as possible, including MUD output where needed.

Last edited by Insomniac on Thu Oct 06, 2005 3:01 am; edited 2 times in total
Reply with quote
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: Thu Oct 06, 2005 1:52 am   
 
mebbe make a trigger for whatever it says when yu fail to join @tank to set incombat = "no"
_________________
Kiasyn
Owner of Legends of Drazon
Coder on Dark Legacy
Check out Talon, an easy IMC connection.
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Thu Oct 06, 2005 6:52 am   
 
How about a conditional state to look for the confirmation that you've joined the tank and then return to state 0 once the mob has been slain? Added the alias to turn it on and off.

#ALIAS partyon {#T+ JoinTank; #STATE JoinTank 0}
#ALIAS partyoff {#T- JoinTank}
#TRIGGER JoinTank {@title {punch|hit|bite|whip|slash|crush|smash|pierce}} {#IF (@incombat = "no") {join @tank}} "" {disable}
#COND {you've joined message.} {#VAR incombat "yes"}
#COND {target has been slain message.} {#VAR incombat "no"; #STATE 0}

(written w/o access to zmud - check for bugs)

- are the #IF and #VAR necessary with a conditional? -


Edit: Added #STATE to partyon to reset JoinTank.
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
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