multiple /doevents

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

RDPidb
a lesser mummy
a lesser mummy
Posts: 69
Joined: Mon Dec 15, 2003 1:14 am

multiple /doevents

Post by RDPidb » Mon Feb 02, 2004 12:38 pm

Im just learning this, and I understand /doevents to basicly be like "interupts" that watch for a certain event.

my question is, will it work to have multiple /doevents in one sub.
for example I am writing a script that will have a sub that is for casting Fieghn Death on my SK. SO far it looks leik this:

sub playdead
/doevents SKDead
/doevents FDBreak
/doevents FDFail
/if "$char(state)"=="SIT" /stand
/if "$combat"=="TRUE" /attack
/cast "Death Peace"
/delay 2
/cast "Death Peace"
/delay 2
/cast "Death Peace"
/delay 2
/cast "Death Peace"
/delay 2
/return

See i need to check and make sure that FD isnt broken by a mob casting on me, and I need to make sure that it doesnt flat out fail i.e. "soandso has fallen to the ground", and of course check to see if I die.

SO is this legal, and if not how would I go about doign it better.

also is there a more elegant(and more important, reliable) way to account for fizzles and interuptions than just castign it 4 tiems in a row like I have done.
:D
Thanks
-Ryan

Gumby
a ghoul
a ghoul
Posts: 99
Joined: Sat Jan 24, 2004 5:27 pm

Post by Gumby » Mon Feb 02, 2004 1:08 pm

Yes to both questions.

You can /doevents globally, or /doevents with the individual events like you listed.

You either die or FD fails right? (I don't play a SK / Necro / or even Monk). If that's the case you can do a one or the other instead of checking each (or check both in the same doevents, whatever, is your code :))

As for the fizzles, you can write a doevents for it and if fizzle, recast... or you can be lazy like me and use the spellcast.inc file as a starting point (check Macro Snippets though I think it's in the Depot too) and use it to cast your spells. Works well for a basis, can customize it from there if you need to.

G

RDPidb
a lesser mummy
a lesser mummy
Posts: 69
Joined: Mon Dec 15, 2003 1:14 am

Post by RDPidb » Mon Feb 02, 2004 2:05 pm

"You either die or FD fails right? (I don't play a SK / Necro / or even Monk). "

Well no not exactly.
a) you can FD, and everythign is ok, and the mobs leave you alone.
b) the skill can flat out fail, in which case u get a msg "soandso has fallen to the ground" , in which case you want to imidiatly stand back up and cast again.
c)You can get interupted, or the spell can fizzle
d)and this one is the sucky one, you can succesfully FD< but the mob is in mid-cast of a spell, and the spell lands on you after your FD and thus breaks the FD, in which case u must stand and cast FD again.
e) you keep failign repeatedly for any of the above reasons and you DIE> :(

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Mon Feb 09, 2004 2:52 am

Because you're learning, and after reading all your requests for help, I'm going to give you a friendly pointer that will help us to help you better.

[quote] and especially

Code: Select all

 are your (and our) friends.

Especially [code] when you're posting your script lines.  Makes reading soooo much easier!  =)

no flame intended (this time).  Just a pointer, like I've said.

[edit]
[size=75]OMG....I get pulled away for a while due to work and I come back acting all...nice...and stuff!  WTF!?  ;)[/size]
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!