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


Joined: 19 Feb 2008
Posts: 3

PostPosted: Fri Feb 29, 2008 8:52 am   

All I want is kick kick kick
 
Actually, that's the problem, all I get is kick kick kick.

I've been trying to create a command that would realize I'm in combat, send the command kick, and then wait either X lines or X time before being able to be triggered again.

No matter what I try though, I either get nothing, or I get a macro SPAM kick.

Here is the gist of what I've been trying/want to do.

#trigger VictHp: (this is just to let it know i'm in combat)
kick {wait|5000}

This just spams the whole line.

I would also like to add a line that checks my health so that it's not trying to kick while I'm trying to heal myself. So I tried:
#trigger {%d}H
#if {%d}H>=XXXX
#COND {VictHp:} kick {wait|5000}

Obviously I don't have a clue of how to use these commands, because it's not working at all.

Any help at all would be appreciated.
Reply with quote
Seeker
Newbie


Joined: 19 Feb 2008
Posts: 3

PostPosted: Fri Feb 29, 2008 9:41 am   
 
Here is what I ended up doing. Please let me know if there is a cleaner way to do this.

#CLASS {akick}
#TRIGGER {Your kick} {#t+ kick}
#TRIGGER {Your boots} {#t+ kick}
#TRIGGER {Your beautiful full-circle kick misses} {#t+ kick}
#TRIGGER {kick needs an argument to work.} {#t+ kick}
#CLASS 0

#Trigger {VictHp:} {kick} {t- kick}

I would still like to add a health check to it also.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Feb 29, 2008 10:28 am   
 
You don't actually have anything named kick there for those #t+ and #t- to activate and deactivate. You're also missing a # in your trigger at the end.

You're probably making this much more complex than it needs to be. Why not:

#alarm "AutoKick" 5 {kick}
#suspend AutoKick
#alias StartKicking {#resume AutoKick}
#alias StopKicking {#suspend AutoKick}

Or, similarly:

#trig {You can kick something again} {kick} "" {disable}

Then:

#alias StartKicking {#t+ AutoKick}
#alias StopKicking {#t- AutoKick}

or

#alias ToggleKicking {#if %trigger("AutoKick") {#t- AutoKick} {#t+ AutoKick}}

The script at the end of your post above (beginning #trig {%d}H) has a lot of incorrect syntax. You should be using () rather than {} in that context in patterns (see the help), the #cond command isn't used that way, and your #if syntax is wrong - anything that's in brackets () in the pattern is put into a variable %1-%99 in order from left to right. So your %d would be %1, and you'd do:

#if (%1>=50) {do something}

Both your #trigger command and your #if command are missing braces {} too.

Adding a health check is probably best done by adding a totally independent trigger that keeps your health updated in a variable (that way you can use the same variable again if you wish). Something like:

#trig {(%d)H} {#var hp %1}

then in the 5 second alarm you do

#if (@hp>50) {kick}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Feb 29, 2008 10:35 pm   
 
Try looking at the WaitLines trigger condition. That will let you trigger once and then it won't match again until X number of lines go by. Between that an an alarm, you should be able to cover both the wait X lines and wait X time aspects pretty simply.
_________________
EDIT: I didn't like my old signature
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