Thread Tools Display Modes
09-12-06, 08:57 AM   #1
Melizar
A Murloc Raider
Join Date: Sep 2006
Posts: 4
Possible or not?

First mod and I think it would be handy in Raids and PvP...

Trying to mod this, but I'm wondering if this is still possible. I am wanting to make a small addon that will Demonic Sacrifice ANY PET whenever their life or yours goes to 25% of max or less...

Possible? Let me know...
  Reply With Quote
09-12-06, 11:24 AM   #2
Silversage
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 132
Originally Posted by Melizar
First mod and I think it would be handy in Raids and PvP...

Trying to mod this, but I'm wondering if this is still possible. I am wanting to make a small addon that will Demonic Sacrifice ANY PET whenever their life or yours goes to 25% of max or less...

Possible? Let me know...
You might be able to do something close, but you can't do that exactly. At least, you can't do it automagically, because it requires casting a spell, and Blizzard has made it so that casting a spell can only be done as a direct response to human input.

Options: (1) You could make a macro/addon that alerts you when it's time. (2) You could make a button/binding/whatever that does nothing unless your conditions are met. (3) You could achieve the effect of this by installing whispercast and automagically queueing up demonic sacrifice whenever you reach that point. You'd still have to hit something to do the spell, tho.

Good luck.
  Reply With Quote
09-12-06, 01:27 PM   #3
sid67
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 78
Originally Posted by Qzot
You might be able to do something close, but you can't do that exactly. At least, you can't do it automagically, because it requires casting a spell, and Blizzard has made it so that casting a spell can only be done as a direct response to human input.

Options: (1) You could make a macro/addon that alerts you when it's time. (2) You could make a button/binding/whatever that does nothing unless your conditions are met. (3) You could achieve the effect of this by installing whispercast and automagically queueing up demonic sacrifice whenever you reach that point. You'd still have to hit something to do the spell, tho.

Good luck.
I find option (2) works the best. I just write a little function that does nothing unless the condition is met and plug it into the Macros I use the most often. Obviously, if I'm not hitting one of those keys I won't do it, but more often than not I am hitting one of them and then it fires.

The function would look something like this...

Code:
function Auto_PetSacrifice()
  local pethealth = (UnitHeath("pet") / UnitHealthMax("pet")) * 100
  local myhealth = (UnitHeath("player") / UnitHealthMax("player")) * 100
  if pethealth < 25 or myhealth < 25 then
    TargetUnit("pet");
    CastSpellByName("Demonic Sacrifice");  -- might check the spelling here
    TargetLastTarget();
  end
end

To use it, put this in your Macros.

/script Auto_PetSacrifice();
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Possible or not?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off