Spell wearing off alert

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

Wraeth
orc pawn
orc pawn
Posts: 16
Joined: Sun Dec 21, 2003 10:18 am

Spell wearing off alert

Post by Wraeth » Sat Feb 14, 2004 10:57 pm

Is it possible to have an alert when a buff/debuff is about to wear off of a mob/player? Say 10 seconds before it wears off? I did several searches but I didn't find anything made.

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Sun Feb 15, 2004 12:33 am

Uh...

There's been lots of things made.

Buff tracker.
Radial Debuff...


Take a look around the depot, it would help your situation immensely.
-Elric

Wraeth
orc pawn
orc pawn
Posts: 16
Joined: Sun Dec 21, 2003 10:18 am

Post by Wraeth » Fri Feb 20, 2004 2:07 pm

I did, perhaps I should clarify what I'm after:

I'm an enchanter. I mez, I tash, I slow, and I cripple. I have a vested interest in learning when my debuffs are about to wear off. I searched through the depot, using various terms including the ones you gave, but I couldn't find anything that would give me an alert when a debuff was about to wear off of a mob.

I'm not so worried about buffs wearing off on me or my group members, as I use a UI that tells me how long my buffs have left.

DyvimTvar
orc pawn
orc pawn
Posts: 16
Joined: Wed Oct 22, 2003 1:21 pm

Post by DyvimTvar » Fri Feb 20, 2004 2:27 pm

Wraeth wrote:I did, perhaps I should clarify what I'm after:

I'm an enchanter. I mez, I tash, I slow, and I cripple. I have a vested interest in learning when my debuffs are about to wear off. I searched through the depot, using various terms including the ones you gave, but I couldn't find anything that would give me an alert when a debuff was about to wear off of a mob.

I'm not so worried about buffs wearing off on me or my group members, as I use a UI that tells me how long my buffs have left.
Wraeth,

What you are missing i sthat the macros Elric pointed you to do essentially what you want, often more. For example from the radial defuf macro in the depot:
This script automatically debuffs mobs that enter the radius that you specify. The script should then not cast on the mobs after they are debuffed (unless the buff duration you use is exceeded). Once the mob is dead the script cleans up its tracking of the mob. By default it will retry resists 2 times.
emphasis mine. Just a bit of work (I know but I am assuming he is willing to work) will get you what you need. If you have trouble re-working the script, a more detailed question will get a much better response.
DyvimTvar

Wraeth
orc pawn
orc pawn
Posts: 16
Joined: Sun Dec 21, 2003 10:18 am

Post by Wraeth » Fri Feb 20, 2004 4:46 pm

That's all fine and good, and I looked through it, and it still doesn't give me what I want. I don't want it to automatically debuff for me. That's not a good idea in a raid situation where there's mez/unmez as well as any number of spells I must cast in the interim. What I want is something that gives me a text warning say 'Your spell will wear off of <mob> in 10 seconds". Now, I'm not very good at writing macros yet, I've been messing around with them but more interested in adapting my UI. So maybe there's something in there that can be adapted, but I can't do it.

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 » Fri Feb 20, 2004 7:49 pm

Wraeth wrote:What I want is something that gives me a text warning say 'Your spell will wear off of <mob> in 10 seconds".
Ok....it's been answered before. Quite repeating yourself.
Ok....it's been answered before. Quite repeating yourself.
Ok....it's been answered before. Quite repeating yourself.

Are you even LOOKING at (o reven for) the posts that everyone is directing you to?
Wraeth wrote:...more interested in adapting my UI. So maybe there's something in there that can be adapted, but I can't do it.
Does this not contridict what you just asked for in the previous sentance?

So, what do you want? a smiple message that says your buff is about to go bye-bye or a mod to your UI? WHAT on your UI do you expect to mod?

Maybe you might be better off with a buff timer freely available at eqinterface.com.

Look at the macros already pointed out to get ideas on how to set up timers and check the durations remaining. Then call to check the durations and recast as necessary. AutoDebuff.mac does this nicely. Change the formula to fire off the warning or auto-recast for how many xx seconds before it actually drops.
[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]!!!!!!!!!

User avatar
htw
a grimling bloodguard
a grimling bloodguard
Posts: 512
Joined: Wed Feb 18, 2004 8:30 pm
Location: Albuquerque, NM USA
Contact:

Post by htw » Wed Mar 03, 2004 1:14 am

OK, I threw this together real quick, I'm sure it can be optimized, or some crappy code dropped out/ replaced, but it does work I think for what you want. Finish it up, touch it up, and make it do what you want. :)

Code: Select all

| 
| dbtime.mac 
| Times debuffs of mobs, modified from autodebuff.mac 
| Version 1.00 
| Date:2/25/2004 10:00am 
| 
|   NOTE: You must use the spellcast.inc that I posted in the snippets forum under 
|         the title of: "spellcast.inc --- This will cast a spell reliably for you." 
|         Be sure to use the one in that thread that was posted by ml2517. 
|         This should only be necessary if you are going to use AA skill activations. 
| 
| 
| Variable Examples: 
| --------------------- 
| 
| Example for using spells: 
| 
| Debuff=Tashania 
| DebuffDuration=0 <----------- Uses default spell duration IE: $spell("Spell Name",duration). 
| DebuffDuration=60 <---------- Uses custom duration of 60 seconds. 
| DebuffStartWait=0 <---------- Uses wait time of 0 seconds which means to cast immediately. 
| DebuffStartWait=20 <--------- Uses wait time of 20 seconds.  After 20 seconds the mob will be debuffed.
| DebuffMinHealth=100 <-------- Casts at 100 percent health, i.e., immediately. 
| DebuffMinHealth=90 <--------- Casts at 90 percent health.  Mob gets under 90 percent he's debuffed. 
| 
| Example for using casting items: 
| 
| Debuff=item Gloves of Fire <- Notice: the name of the item is preceded with "item ". 
| DebuffDuration=1 <----------- Set this to the duration of the debuff, in seconds. DO NOT use 0, as this is not a spell.
| DebuffStartWait=0 <---------- Uses wait time of 0 seconds which means to cast immediately. 
| DebuffMinHealth=20 <--------- You wouldn't cast until the mob was at 20 percent. 
| 
| Example for using AA skill activations: 
| 
| Debuff=activate 169 <-------- Notice: the number of the AA Skill is preceded with "activate ". 
| DebuffDuration=1 <----------- AA skill duration in seconds. DO NOT use 0, as this is not a spell.
| DebuffStartWait=0 <---------- Activate the AA skill immediately. 
| DebuffMinHealth=20 <--------- Activate the AA skill when the mob is at 20 percent health. 

#turbo 
#include spellcast.inc 

| ----------------------------------------------------------------------------- 
Sub Main(DbfName) 

| Declare Variables 
/declare Debuff local
/declare DebuffAlertDuration local
/declare DebuffStartWait local
/declare DebuffMinHealth local
/declare DefaultAlertSecs local
/declare MyTemp local
/declare MyTime local

| Defaults
/varset DefaultAlertSecs 60
/varset DebuffAlertDuration 0
/varset DebuffStartWait 0
/varset DebuffMinHealth 100

/if $defined(DbfName)==FALSE {
  /echo -Usage:	dbtime.mac "Debuffname" [duration] [wait] [minhealth]
  /echo -
  /echo -	duration=	Alert duration of debuff.  If debuff duration is 0 (default),
  /echo -			then the spell duration minus @DefaultAlertSecs seconds is used.
  /echo -	wait=		Time to wait before casting.  Default is 0 seconds, immediately.
  /echo -	minhealth=	Percent of mob health to wait before casting.  Default is 100 percent,
  /echo -			which will debuff immediately.  Passing 90 would wait and debuff when
  /echo -			the mob was at 90 percent health.
  /return
}
/varset Debuff "@DbfName"
/if $defined(Param1)==TRUE {
  /varset DebuffAlertDuration @Param1
}
/if $defined(Param2)==TRUE {
  /varset DebuffStartWait @Param2
}
/if $defined(Param3)==TRUE {
  /varset DebuffMinHealth @Param3
}
|/echo Parameters: @Debuff @DebuffAlertDuration @DebuffStartWait @DebuffMinHealth
| Add check to make sure we are not debuffing ourself.  Maybe verify it's NPC completely (no PVP capability).
/delay 0 

/if n @DebuffStartWait>0 {
  /varcalc MyTemp @DebuffStartWait*10
  /echo Waiting @DebuffStartWait seconds before debuffing $target(name,clean) with @Debuff.
  /delay @MyTemp  
}

| Fix this, what if $target changes?  Need to find it in spawn list, and reference that way.
/if n @DebuffMinHealth<100 {
  /echo Waiting until $target(name,clean) health is @DebuffMinHealth% or less before debuffing.
  :HLoop
  /varset MyTemp $target(hp,pct)
  /if n @MyTemp>@DebuffMinHealth {
    /delay 10
    /doevents
    /goto :HLoop
  }
 /echo $target(name,clean) health at $target(hp,pct)%, debuffing with @Debuff.
}


/if $char(state)==SIT /stand 

/echo Debuffing $target(name,clean) with @Debuff
/if "$mid(0,4,"@Debuff")"=="item" { 
    /call Cast "$mid(5,$calc($strlen("@Debuff")-5),"@Debuff")" "item" 
} else /if "$mid(0,8,"@Debuff")"=="activate" { 
    /call Cast "$mid(9,$calc($strlen("@Debuff")-9),"@Debuff")" "activate" 
} else { 
    /call Cast "@Debuff" 
} 
/echo $return

/if "$return"=="CAST_RESISTED" { 
    /echo $target(name,clean) resisted @Debuff!
} 
/if ("$return"=="CAST_CANNOTSEE" || "$return"=="CAST_OUTOFRANGE") { 
    /echo $target(name,clean) out of range or cannot be seen.
} 
/if "$return"=="CAST_UNKNOWNSPELL" { 
    /echo Unknown spell.
} 
/if "$return"=="CAST_OUTOFMANA" { 
    /echo Insufficient mana to cast @Debuff on $target(name,clean).
} 
/if "$return"=="CAST_STUNNED" { 
    /echo You cannot cast while stunned!
} 
/if "$return"=="CAST_TOOK2LONG" { 
    /echo Took too long.
} 
/if "$return"=="CAST_ABILITYNOTREADY" { 
    /echo Ability not ready for use.
} 
/if "$return"=="CAST_SUCCESS" { 
    /varset MyTemp 0
    /echo $target(name,clean) debuffed with @Debuff, starting timer.
    /if n @DebuffAlertDuration==0 { 
        /if "$spell("@Debuff",duration)"=="INSTANT" { 
            /echo Duration instant (effect).
        } else { 
            /echo Duration "$spell("@Debuff",duration)"
            /varset MyTemp $spell("@Debuff",duration)
            /varcalc MyTemp @MyTemp-@DefaultAlertSecs
        } 
    } else { 
        /varcalc MyTemp @DebuffAlertDuration-@DefaultAlertSecs
        /echo Duration override, @DebuffAlertDuration seconds.
    } 
    /echo ALERT: @Debuff on $target(name,clean) wears off in $spell("@Debuff",duration) seconds, Alert in @MyTemp seconds.
    /varcalc MyTemp @MyTemp*10
    /delay @MyTemp
    /echo
    /echo ALERT!!!  @Debuff wears off on $target(name,clean) in @DefaultAlertSecs seconds!!
} 
/return 


User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Wed Mar 03, 2004 2:46 am

EQ Watcher works really well for that also. You can set it to watch whatever spells you want and it'll notify you when they're going to wear off -- buffs, debuffs, etc. If that's what you want to do be sure to grab Panamah's buff2 script from the "addons" section.

JGC84
a ghoul
a ghoul
Posts: 116
Joined: Sat Nov 29, 2003 2:51 am

Post by JGC84 » Wed Mar 03, 2004 7:39 am

you know... as a thought.... if you have a macro that auto-debuffs mobs for you.... if you change the

Code: Select all

 /target @whatever 
/call cast @whatever2
to somthing more like

Code: Select all

 /echo @whatever needs to be debuffed with @whatever2 soon 
then you got what you want.. may require a touch of other editing but i dont see why it would
ACK! I think I blew it up....

I dont think your allowed to talk about this outside of a "free speech zone" anymore.