how to cancel buffs?

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

xdrakonisx
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Jul 27, 2006 1:10 am

how to cancel buffs?

Post by xdrakonisx » Tue Aug 01, 2006 3:55 am

I'm writing a macro for my necro, and I'm looking for a way to end a current buff (namely, Seduction of Saryrn). Currently the "ghetto" fix I've been using for it is to recast the buff, and duck during the cast, since it will cancel itsself on re-casting the buff. However this doesn't work while riding a mount, although I suppose I could write a /dismount into the script too...still really ghetto fix.. definitely not very universal in possibilities.

I thought about sending a left click to the buffs window, but since I can't guarantee that buff will always land in the same spot, I could end up clicking off useful buffs (conviction etc) and still have the lich spell on.

Basically I'm wanting this for those times when I'm not watching necro's health, or afk reading the internet and still standing around in lich form, so that he doesn't lich to death.

I edited the wiki to show what my current guess is for how this should work, here is the link to the page: [[Notify]]

I can post the code for my macro on request, if necessary. Thanks in advance for help.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Aug 01, 2006 5:06 am

Code: Select all

 /if (${Me.Buff[Divine Barrier].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[Divine Barrier].ID}-1].Int} leftmouseup 

drzoon
a hill giant
a hill giant
Posts: 239
Joined: Tue May 04, 2004 5:38 pm

Post by drzoon » Tue Aug 01, 2006 5:07 am

This is a piece of code from autoenc.mac, which is what I've used to click off buffs when needed.

Code: Select all

Sub ClickOffBuff(string buffName) 
   /declare i int local 
   /for i 1 to 20 
      /if ( ${Me.Buff[${i}].Name.Equal[${buffName}]} ) /notify BuffWindow buff${Math.Calc[${i}-1].Int} leftmouseup 
   /next i 
/return

inspiration
orc pawn
orc pawn
Posts: 12
Joined: Sat May 14, 2005 5:17 pm

Post by inspiration » Sun Oct 15, 2006 9:25 am

I think i got something wrong as I cannot make this thing to work.

My line looks like this -

Code: Select all

/if (${Me.Buff[Aura of Taelosia].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[Aura of Taelosia].ID}-1].Int} leftmouseup
any idea?


I guess it because of the menu added when you click on spells, but in that case I got no lcue how to click off buffs inside a macro (not a plug-in)

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Mon Oct 16, 2006 3:27 am

Here's something you could look into: Check if Aura is in the Buff window or Song window or Short Buff window and revise accordingly.

inspiration
orc pawn
orc pawn
Posts: 12
Joined: Sat May 14, 2005 5:17 pm

Post by inspiration » Wed Oct 18, 2006 4:56 am

it goes into the regular buff window not the short duration / songs window

s0rcier
a grimling bloodguard
a grimling bloodguard
Posts: 876
Joined: Mon Aug 02, 2004 10:49 pm

Post by s0rcier » Thu Oct 19, 2006 6:36 am

Well if you dont have the buff window open you might end up in a dead loop :( this is problems with removing buff with method suggested :(

s0rCieR
s0rCieR
Many sleepless nights... many years writing plugins... many years without supports... many years without contributions ... many people take credits for my job on... MQ2Melee, MQ2Cursor and MQ2Cast. If you?ve used any of these plugins at some points and would like me to come back ... please consider taking a moment to make a small donation to help me. Thank You.

toomanynames
a grimling bloodguard
a grimling bloodguard
Posts: 1844
Joined: Mon Apr 11, 2005 11:10 am

Post by toomanynames » Thu Oct 19, 2006 8:34 am

But this should avoid a loop should it not?

Code: Select all

/if ( ${Window[BuffWindow].Open} && ${Me.Buff[${i}].Name.Equal[${buffName}]} ) /notify BuffWindow buff${Math.Calc[${i}-1].Int} leftmouseup 
I may not have my ${Window} part correct (not sure what the buff window is called), but something along those lines should work or stop a loop.
[quote="DKAA"]You cant. Only the server knows.[/quote]