Self \ friendly cast macro.

Self \ friendly cast macro.

by vasecha » Thu Mar 24, 2016 11:32 am

Hello everyone. Im looking for a macro with such features:
If there is no friendly target or an enemy(harm) then self cast - if there is friendly target then cast on it.
Is this even possible without using default autoself cast option which buggs other addons?
Last edited by vasecha on Thu Mar 24, 2016 11:37 am, edited 1 time in total.
vasecha
Private
Private
 

Re: Self \ friendly cast macro.

by Dreez » Thu Mar 24, 2016 11:35 am

Code: Select all
/run if UnitIsFriend("player", "target") then CastSpellByName("Flash Heal") else CastSpellByName("Flash Heal", 1)end

Replace "Flash Heal" by whatever spell you want to cast
Dreez - PvP server
<Endzeit>
User avatar
Dreez
Knight-Lieutenant
Knight-Lieutenant
 

Re: Self \ friendly cast macro.

by vasecha » Thu Mar 24, 2016 11:38 am

HORRAY thank You!!!!
vasecha
Private
Private
 

Re: Self \ friendly cast macro.

by Forcerius » Fri Mar 25, 2016 2:07 pm

Do you know a way to get /cast [target=Sanderic] Flash Heal to work?
I need a macro that self casts while still having a friendly targeted and without changing my current target.

Also, is there no command for /use? I need the same macro but for bandages and can't find any command that works on here for using items. Only on live.
studyquran.org/resources/Quran_Reformist_Translation.pdf
Submission to God alone and doing good work is the only path to Paradise.
Peace be upon you.
User avatar
Forcerius
Sergeant Major
Sergeant Major
 

Re: Self \ friendly cast macro.

by Dreez » Fri Mar 25, 2016 2:27 pm

Forcerius wrote:Do you know a way to get /cast [target=Sanderic] Flash Heal to work?
I need a macro that self casts while still having a friendly targeted and without changing my current target.

Also, is there no command for /use? I need the same macro but for bandages and can't find any command that works on here for using items. Only on live.

/run CastSpellByName("Name of your spell", 1) does this, it will always cast on yourself

/use is provided in supermacro, I'd suggest you to use that addon, there's different solutions to this but they require 200+ figure macros

Code: Select all
/run local i,j for i=0,4 do for j=1,18 do local d=GetContainerItemInfo(i,j) if d then local l=GetContainerItemLink(i,j) if strfind(l, "Conjured Mineral Water") then UseContainerItem(i,j) end end end end

is a macro to use an item (in this case Conjured Mineral Water)
Dreez - PvP server
<Endzeit>
User avatar
Dreez
Knight-Lieutenant
Knight-Lieutenant
 

Re: Self \ friendly cast macro.

by Forcerius » Sat Mar 26, 2016 12:11 pm

Dreez wrote:
Forcerius wrote:Do you know a way to get /cast [target=Sanderic] Flash Heal to work?
I need a macro that self casts while still having a friendly targeted and without changing my current target.

Also, is there no command for /use? I need the same macro but for bandages and can't find any command that works on here for using items. Only on live.

/run CastSpellByName("Name of your spell", 1) does this, it will always cast on yourself

/use is provided in supermacro, I'd suggest you to use that addon, there's different solutions to this but they require 200+ figure macros

Code: Select all
/run local i,j for i=0,4 do for j=1,18 do local d=GetContainerItemInfo(i,j) if d then local l=GetContainerItemLink(i,j) if strfind(l, "Conjured Mineral Water") then UseContainerItem(i,j) end end end end

is a macro to use an item (in this case Conjured Mineral Water)


Wow awesome thanks alot dude. Havn't had a chance to try it yet but I will when I can, seems legit.
studyquran.org/resources/Quran_Reformist_Translation.pdf
Submission to God alone and doing good work is the only path to Paradise.
Peace be upon you.
User avatar
Forcerius
Sergeant Major
Sergeant Major
 


Return to Priest