Thread Tools Display Modes
12-17-12, 03:29 AM   #1
démamik
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 10
macro switch by sacrified (or summoned) pet

Hi

I would like to switch a macro when I sacrifice (or summon) my voidwalker because with the grimoire of sacrifice I must use "command demon" instead of "Shadow Bulwark" so I can't use this macro with my others pets/sacrifice ...

Thanks
  Reply With Quote
12-17-12, 04:27 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
From my testing, using /cast Command Demon after sacrificing a Voidwalker uses Shadow Bulwark anyway. I think it's safe to say that command will work on any ability granted by sacrifice.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-17-12, 05:08 AM   #3
démamik
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 10
I know that, it's my problem...

It will be more explicit by example

My first macro was:
/cast Shadow Bulwark
/cast Unending Resolve

but shadow bulwark doesn't work when I sacrifice the voidwalker

So my actual macro:
/cast [pet:voidwalker]Shadow Bulwark
/cast [no pet] Command Demon
/cast Unending Resolve

but I don't want to use spell lock or seduce when I use Unending Resolve...

Last edited by démamik : 12-17-12 at 05:16 AM.
  Reply With Quote
12-17-12, 05:53 AM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
/cast [pet:voidwalker] Shadow Bulwark should only activate when you have your Voidwalker out, not sacrificed. Note, the condition may still turn out true until your demon's corpse despawns. Also the spell seems to continue pointing to the ability on your now dead Voidwalker instead of the one you were just granted. It seems going through Control Demon is the only way to access the ability sacrifice grants you.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 12-17-12 at 05:58 AM.
  Reply With Quote
12-17-12, 07:02 AM   #5
démamik
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 10
thanks to translate me, maybe someone have a solution?

Note, that's not related to my problem but you could avoid the despawn duration problem with a sacrifice macro:
/cast Grimoire of Sacrifice
/script PetDismiss()
  Reply With Quote
12-17-12, 07:17 AM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by démamik View Post
thanks to translate me, maybe someone have a solution?
It's how the game handles the demon and player-given abilities, there's no way around it.



Originally Posted by démamik View Post
Note, that's not related to my problem but you could avoid the despawn duration problem with a sacrifice macro:
/cast Grimoire of Sacrifice
/script PetDismiss()
It doesn't really bother me anyway.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-17-12, 04:36 PM   #7
démamik
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 10
is there something that prevents an addon to switch a macro with events summon/sacrifice?
  Reply With Quote
12-17-12, 09:22 PM   #8
d87
A Chromatic Dragonspawn
 
d87's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 163
It should be "nopet", without a space. Other than that your macro should work.
  Reply With Quote
12-17-12, 10:01 PM   #9
démamik
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 10
Sorry for this mistake and apologize for not being clear about what I'm looking for...

I know these marco "works" but they doesn't respond to my needs.

I want a macro that cast shadow bulwark when I have my voidwalker up AND when I sacrifice it BUT that doesn't cast others demon abilities when I have summoned or sacrificed another one.

And actually, the only way to do it is to switch the macro when I summon/sacrifice another demon, so maybe there's an addon to fix that...

Note: a macro that could change another macro will do the trick too
Note2: something that only works out of combat should be convenient enough

Last edited by démamik : 12-17-12 at 10:22 PM.
  Reply With Quote
12-17-12, 10:46 PM   #10
d87
A Chromatic Dragonspawn
 
d87's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 163
Code:
local f = CreateFrame("Frame")

local function MacroEdit(name, body)
    if not InCombatLockdown() then
	   local macroid = GetMacroIndexByName(name)
	   EditMacro(macroid, name, 1, body, 1)
    end
end

f:RegisterEvent("PLAYER_LOGIN");
f:RegisterEvent("PLAYER_REGEN_ENABLED");
f:RegisterEvent("SPELLS_CHANGED");
f:SetScript("OnEvent", function()
    local name, _, tex = GetSpellInfo(119898)
    if tex == "Interface\\Icons\\Spell_Shadow_AntiShadow" then -- idk how else to check which pet was sacrificed
        MacroEdit("YourMacroName", [[/say macrotext1 ]])
    else
        MacroEdit("YourMacroName", [[/say macrotext2 ]])
    end
end)
Something like that, I haven't tried it myself tho... Also you should create macro named "YourMacroName" beforehand

Last edited by d87 : 12-17-12 at 10:54 PM.
  Reply With Quote
12-17-12, 11:23 PM   #11
démamik
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 10
Thank you very much! It looks like what I'm looking for

I will try it when I have more time and give you returns.
  Reply With Quote
12-18-12, 01:41 AM   #12
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
The problem with trying to have an addon deal with macros is Blizzard locks them when you're in combat. Trying to get around this throws up taint errors. This is the reason I was trying to stick with macro conditionals. I know I'm picky when it comes to addon code I develop. If for any reason, an addon isn't able to function 100% of the time (in and out of combat), I don't release it.



If you're going to try to have it use the Voidwalker's ability instead when it's up, you can have it written with one /cast command instead of two. The following macro command has your Voidwalker use Shadow Bulwark if it's out and alive, otherwise, it forces Control Demon to cast on yourself. This means Control Demon will only cast successfully if the spell can target the player. This can only happen with Shadow Bulwark and Singe Magic. There's also a safety mechanism built into the first condition to prevent Control Demon to be used if any demon other than your Voidwalker is out. The command will just fail silently.
Code:
/cast [pet,@pet,nodead] Shadow Bulwark; [@player] Command Demon
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 12-18-12 at 02:07 AM.
  Reply With Quote
12-18-12, 11:50 PM   #13
démamik
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 10
Thanks SDPHantom, the @player is a good trick and I misunderstood the behavior of Shadow Bulwark without sacrifice...
So my final macro is:

#showtooltip Unending Resolve
/cast [@player,nopet] Command Demon
/cast Unending Resolve

It will also cast cauterize master when I sacrifice my imp but that shouldn't be a problem.

@d87:
Sorry there will be no use this time for your code, but it's very instructional, and maybe I will use some parts of it for another macro idea... So, thanks again.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » macro switch by sacrified (or summoned) pet


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