|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sat Aug 04, 2012 2:39 pm
Help with a bash trigger |
Hey guys, I'm very new to zmud (actually only been using for 2 weeks)
I'm trying to make a trigger for bashing.
Currently I have
#TRIGGER END: (%d)
#var bashes %1
#if (@bashes > 150) {bash} {}
#TRIGGER (Your opponent appears momentarily stunned and confused.) {#WA 2000}
#TRIGGER (Your opponent appears briefly stunned and confused.) {#WA 40000}
#var bashes %1
#if (@bashes > 450) {bash} {}
____________________
Once a bash lands it has the chance to stun an opponent.
Momentarily is for one round
briefly is for 3 rounds
I'd like to have the trigger pause when one of the conditions is hit, so as not to waste more endurance (END) by continuing to bash.
Any idea how to make this happen? Thanks |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Aug 04, 2012 11:37 pm |
First off, you need curly braces around the trigger pattern, unless its an expression trigger.
Second #WA should not be used in zMUD, as it is rather broken. This is fixed in CMUD.
I dont see how you are getting a value to set your bashes variable, or resetting it..
From what I see I would suggest another route entirely
#TRIGGER {Your opponent appears momentarily stunned and confused.} {bashRounds=1}
#TRIGGER {Your opponent appears briefly stunned and confused.} {bashRounds=3}
#TR {some means of determining when a round has gone by} {#IF (@bashRounds>0) {#ADD bashRounds -1}}
then you can add an expression trigger...
#TR (@bashRounds=0) {#IF (@target) {bash @target}} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sun Aug 05, 2012 9:33 am |
Ok, I see how that would work.
Here is one problem I run into still though,
bashing does not always result in a stun.
I have made a trigger to bash again on a miss, but sometimes a hit will not stun the opponent, but I get the damage message.
How can I add a trigger if I don't see Your opponent appears * stunned and confused. _ .. bash again that round.
Thanks for the help btw. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Aug 05, 2012 12:41 pm |
Does the miss result in a special line of text recieved at no other time?
If so, just make another trigger on that to rebash. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sun Aug 05, 2012 1:34 pm |
shalimar wrote: |
Does the miss result in a special line of text recieved at no other time?
If so, just make another trigger on that to rebash. |
Unfortunately it doesn't. You get the hit message, just this time no stun message whatsoever.
I'd like to bash until I get the stun message or until I get You are already engaged (indicating I used up all my attempts for this round) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Aug 05, 2012 2:05 pm |
hmm... how much delay you want for this? i would suggest something like...
#ALARM "keepBashing" -2 {#IF (@target AND %null(@bashRounds)) {bash @target}}
as it checks the condition of two variables, you can ensure that the alarm does nothing by setting them accordingly |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sun Aug 05, 2012 2:18 pm |
shalimar wrote: |
hmm... how much delay you want for this? i would suggest something like...
#ALARM "keepBashing" -2 {#IF (@target AND %null(@bashRounds)) {bash @target}}
as it checks the condition of two variables, you can ensure that the alarm does nothing by setting them accordingly |
Thanks for the quick replies,
Well, I'm not sure. I have basically 3-4 (depending on my settings) attempts at bash each round. I want to keep attempting to bash until I get the stun message. Your getting a little deep for my zmud knowledge (which isn't much, I apologize.)
How would this look all together? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Aug 05, 2012 2:27 pm |
on second thought, scrap the keepbashing alarm and the following trigger from your settings:
#TR (@bashRounds=0) {#IF (@target) {bash @target}}
then enter this at the command line
#TR (@bashRounds=0 AND @target) {bash @target} "" "LoopExp"
that should fire on every line of text received from the mud until it no longer matches |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sun Aug 05, 2012 2:29 pm |
You rock!
Thanks for the help, Shalimar |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sun Aug 05, 2012 8:50 pm |
Ok having a weird problem with the script
for #TR (bashRounds=0 AND @target {bash @target} " "Loopexp"
it will bash even though bashrounds doesn't = 0
under test I can see
3=0 AND spider
it will flood my screen with bash spider
obviously 3 =/ 0 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Aug 05, 2012 9:29 pm |
instead of
@bashRounds=0
try
%null(@bashRounds) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sun Aug 05, 2012 9:34 pm |
Nope it still just goes crazy
Heres what I have:
#CLASS {bash}
#TRIGGER {You're already engaged this round!} {#ADD @bashrounds+1}
#TRIGGER {Your bash does no damage.} {bash}
#TRIGGER {Your shield bash soundly trounces the air!} {bash}
#TRIGGER {Your opponent appears briefly stunned and confused.} {#ADD @bashRounds+3}
#TRIGGER {Your shield whooshes through the air.} {bash}
#TRIGGER {Your opponent appears momentarily stunned and confused.} {#ADD @bashRounds+1}
#TRIGGER {%null(bashRounds) AND @target} {bash @target} "" {loopexp|notrig}
#TRIGGER {Bash whom?} {#T- bash}
#TRIGGER {EXP (*)} {#IF (@bashRounds>0) {#ADD bashRounds -1}}
#CLASS 0 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Aug 05, 2012 9:38 pm |
in a lot of your triggers you are missing the space between the variable and the amount in your #ADD
also, you are missing the @ for the variable inside the %null
one more thing, your triggers the reissue the bash should no longer be needed, the expression checker should take care of those |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Sun Aug 05, 2012 9:53 pm |
#CLASS {bash}
#TRIGGER {You're already engaged this round!} {#AD @bashrounds 1}
#TRIGGER {Your opponent appears briefly stunned and confused.} {#AD @bashRounds 3}
#TRIGGER {Your opponent appears momentarily stunned and confused.} {#AD @bashRounds 1}
#TRIGGER {%null(@bashRounds) AND @target} {bash @target} "" {loopexp|notrig}
#TRIGGER {Bash whom?} {#T- bash}
#TRIGGER {EXP (*)} {#IF (@bashRounds>0) {#AD @bashRounds -1}}
#CLASS 0
Ok, still spams nonstop.
Sorry to be such a pain, Shalimar |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Aug 05, 2012 11:38 pm |
i guess the expression trigger doesnt support multiple expressions... try changing it back to...
#TR (@bashRounds=0) {#IF (@target) {bash @target}} "" {loopexp|notrig} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daoshai Beginner
Joined: 04 Aug 2012 Posts: 13 Location: Milton
|
Posted: Mon Aug 06, 2012 12:52 am |
Ok it works
#CLASS {bash}
#TRIGGER {You're already engaged this round!} {#ADD bashRounds 1}
#TRIGGER {Your opponent appears briefly stunned and confused.} {#ADD bashRounds 3}
#TRIGGER {Your opponent appears momentarily stunned and confused.} {#ADD bashRounds 1}
#TRIGGER {Bash whom?} {#T- bash}
#TRIGGER {EXP: (*)} {#IF (@bashRounds > 0) {#ADD bashRounds -1}}
#TRIGGER {@bashRounds = 0} {#IF (@target) {bash @target}} "" {loopexp|notrig}
#CLASS 0
BUT, I have too many lines of combat and it'll spam bash when @bashRounds = 0 for one round, then not bash again until it hits 0 again.
There a better kind of loop? |
|
|
|
Petrograd Novice
Joined: 08 Dec 2005 Posts: 35 Location: Sweden
|
Posted: Mon Aug 20, 2012 11:35 am |
Hmm, it'll try to bash too many times? You want it to only do it up to a preset number of times?
If so just add a variable to keep track of it?
Like when bashrounds go to 0, do numbashes = 0
and then do #add numbashes 1 whenever you bash.
And then stop trying to bash when you react your mark.
I can't fully decipher your code, but it could be sorta like this:?
#TRIGGER {@bashRounds = 0} {numbashes = 0;#IF (@target) {#while (@numbashes<4) {bash @target;#add numbashes 1}}} "" {loopexp|notrig} |
|
|
|
|
|