Page 1 of 1

Cast spell when Friendly target only.

PostPosted: Mon Jun 08, 2015 8:46 am
by roestvrijstaal
Hello,

I'm trying to make a macro that ONLY let's me cast a spell when I have a FRIENDLY unit targeted.

I looked around on google but could not find any working one.

Any help appreciated.

Re: Cast spell when Friendly target only.

PostPosted: Tue Jun 09, 2015 11:11 am
by roestvrijstaal
Any one know the working macro or scrip for this?
Pleas this would really help me

thanks

Re: Cast spell when Friendly target only.

PostPosted: Tue Jun 09, 2015 2:37 pm
by DEDRICK
/script if UnitCanAssist("player","target") then CastSpellByname("something") else CastSpellByName("something","player"); end

if target is friend then cast spell on target, else cast spell on self (if needed, you can get rid of the else portion)

Re: Cast spell when Friendly target only.

PostPosted: Wed Jun 10, 2015 9:12 am
by roestvrijstaal
DEDRICK wrote:/script if UnitCanAssist("player","target") then CastSpellByname("something") else CastSpellByName("something","player"); end

if target is friend then cast spell on target, else cast spell on self (if needed, you can get rid of the else portion)


I don't need the else part so I cut it down to what you said:
/script if UnitCanAssist("player","target") then CastSpellByname("something"); end

But this is not working and gives me an LUA error. Yes I have supermacros.

Any one has a working macro for this? would be great thank you.

Re: Cast spell when Friendly target only.

PostPosted: Wed Jun 10, 2015 2:11 pm
by DEDRICK
I'll go over my macros when I get home, there is no reason for it not to work

Re: Cast spell when Friendly target only.

PostPosted: Thu Jun 11, 2015 12:41 pm
by roestvrijstaal
DEDRICK wrote:I'll go over my macros when I get home, there is no reason for it not to work

Found anything yet? Because it's not working for me.

Re: Cast spell when Friendly target only.

PostPosted: Thu Jun 11, 2015 2:05 pm
by Mr_Rosh
Forget stupid macros, just use Discord Action Bars. You can let the default UI or customize them as you wish. Above that, it has a lot of option to work with, like the one you want. Give it a try ;) .

Re: Cast spell when Friendly target only.

PostPosted: Thu Jun 11, 2015 10:57 pm
by DEDRICK
roestvrijstaal wrote:
DEDRICK wrote:I'll go over my macros when I get home, there is no reason for it not to work

Found anything yet? Because it's not working for me.


The problem was really simple....It's case sensitive FML

This works, replace lesser heal. It will not cast unless you have a target, and that target is friendly

/script if UnitCanAssist("player","target") then CastSpellByName("Lesser Heal") end;