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


Joined: 02 Dec 2004
Posts: 1

PostPosted: Wed Dec 08, 2004 2:35 am   

How to repeat attack until miss or designated number reached
 
I need help setting up a couple triggers to attack a certain way depending on if it's a hit or miss and the number of same attacks used. Here are the conditions: I want to "slash @target" 3 times, then I want to do one "feint slash @target" then continue doing 3 more "slash @target", etc. until a trigger detects that a slash missed (pattern: "You take a slash, missing" Once the trigger recognizes a miss, I want it to close the folder with slashing and open up another class folder that will lunge/feint lunge. Below is what I've come up with, please let me know what I need to change to get it to work.

(Note: "#var X 0" will be on a macro and pressed before fighting)

Class Folder: SlashAttack
Trigger
Pattern:
"You are re-balanced."
Value:
#IF @X = 3 {Feint Slash @Target; @var X 0} {Slash @Target}
#ADD X +1
Trigger
Pattern:
"You take a slash, missing as"
Value:
T+ LungeAttack
T- SlashAttack

Class Folder: LungeAttack
Trigger
Pattern:
"You are re-balanced."
Value:
#IF @X = 3 {Feint Lunge @Target; @var X 0} {Lunge @Target}
#ADD X +1
Trigger
Pattern:
"You lunge, missing as"
Value:
T+ SlashAttack
T- LungeAttack

Hopefully you can get the idea of what I'm trying to get. Thanks for any help I can get.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Dec 13, 2004 11:54 pm   
 
I think this would work better if you would tell us what it says when you actually hit something.

Also there is no reson to turn off a class, you can have eveything in one class and turn off and on individual Triggers.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
remus
Wanderer


Joined: 06 Jul 2002
Posts: 53
Location: Australia

PostPosted: Tue Dec 14, 2004 9:56 am   
 
Code:

#Class SlashAttack
#TR {~"You are re-balanced.~"} {#IF (@X =3) {Feint Slash @Target; X=0} {Slash @Target;#ADD X 1}}
#TR {~"You take slash, missing as~"} {T+ LungeAttack;T- SlashAttack }
#class 0
#Class LungeAttack
#TR {~"You are re-balanced.~"} {#IF (@X =3) {Feint Lunge @Target; X=0} {Lunge @Target;#ADD X 1}}
#TR {~"You lunge, missing as~"} {T+ SlashAttack;T- LungeAttack }
#class 0


I might be wrong but that seems to work on my test bench.
The only thing is if you are using an older version than 7.x you will need to change where it says x=0 to #VAR X 0
_________________
Once the Known was unknown now its Known...
Do you know it???
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