hello Treeston & other code experts,
im really not an lua expert but I managed by grabing some code here and there to make two macros that worked fine but needed strong improvment for the script part:
Thanks to Ellesardan and Treeston for solving this, so here is the result.
This one is at 251/255
Code:
#showtooltip
/use [help][@pet]Dark Intent
/run local i=GetSpellLink(80398).." on %t!" if UnitExists"target"then SendChatMessage(i,"WHISPER",nil,UnitName"target");SendChatMessage(i,UnitInRaid"player"and"RAID")or(GetNumPartyMembers()>0 and"PARTY"))end
Will cast Dark intent on your target if it's friendly and exist, else will cast on you pet, whisper your buffed target, tell the raid who you buffed it with, or the party if you aren't in a raid.
Then I made a macro for combat rez that worked as intended but needed improvement.
This one 255/255 was solved with the help of Elessardan.
Code:
#showtooltip
/use [help,dead][@player,btn:2]Soulstone;Create Soulstone
/stopmacro [nodead]
/run SendChatMessage("BREZ@ %t!",((UnitInRaid"player"and"RAID")or(GetNumPartyMembers()>0 and"PARTY")));SendChatMessage("REZ @ you!","WHISPER",nil,UnitName"target");
Works for combat rez situation, so basically what it does is: use the soulstone, only if i have a friendly dead target, if not, it creates a soulstone, if I already have a soulstone it does nothing. Then if I really do have a dead friendly target it warn the raid or party who im currently BRezing, and also warn my dead target in whisp, this reduce the risk of accidentally applying the soulstone on a target that has just been rezed by someone else just before you do. Then it applies an emergency soulstone on yourself with right click.
Enjoy !