Buff macro

Buff macro

by Bluedoc » Wed Mar 02, 2016 1:08 am

So i tried a bunch of times to make a macro that basically if your target is not buffed mark of the wild and thorns, it'll cast mark of the wild and thorns on them. I use the If not buffed command and it works, i can cast it on me and it doesn't recast if i'm already buffed, but the part where it doesn't work, is when i target an other player and try it on them, it just does nothing, i think it stills checks on me if the buff is there and doesn't apply it but then when i add the command in the macro to check if the target is buffed and i try to buff myself, it just cast mark of the wild non stops...

/run if not buffed("Mark of the Wild") then CastSpellByName("Mark of the Wild"); end
/run if not buffed ("Thorns") then CastSpellByName("Thorns"); end

Here's the macro that only casts on me, it refuses to buff other players...
Bluedoc
Private
Private
 

Re: Buff macro

by Youfie » Wed Mar 02, 2016 1:12 am

I don't know about the custom function of SuperMacro, but maybe there is a "Player" / "Target" argument that needs to be added to your function. And maybe if you set nothing it's Player by default, hence your problem.

This is how some other functions work, so you might wanna give this a try.


You can also try this macro, should work without SuperMacro :

Code: Select all
/script i=1;m=0;while(UnitBuff("target",i)~=nil) do
if(strfind(UnitBuff("target",i),"Regeneration")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName;
if(m==1) then c("Mark of the Wild(Rank 10)");else c("Thorns(Rank 10)");end;
User avatar
Youfie
Knight-Lieutenant
Knight-Lieutenant
 

Re: Buff macro

by Bluedoc » Wed Mar 02, 2016 1:29 am

Tryed your macro, it just posted in chat everything after do
Bluedoc
Private
Private
 

Re: Buff macro

by Youfie » Wed Mar 02, 2016 2:50 am

Try erasing the space & putting it back on there shouldn't be an actual line break, just a space.
User avatar
Youfie
Knight-Lieutenant
Knight-Lieutenant
 

Re: Buff macro

by Bluedoc » Wed Mar 02, 2016 3:04 am

Got something to work i guess, but it only spams Thorns

Here's how i had to change it to make thorns work

/script i=1;m=0;while(UnitBuff("target",i)~=nil) do if(strfind(UnitBuff("target",i),"Regeneration")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("Mark of the Wild");else c("Thorns");end;
Bluedoc
Private
Private
 

Re: Buff macro

by Youfie » Wed Mar 02, 2016 3:27 am

Bluedoc wrote:Got something to work i guess, but it only spams Thorns

Here's how i had to change it to make thorns work

/script i=1;m=0;while(UnitBuff("target",i)~=nil) do if(strfind(UnitBuff("target",i),"Regeneration")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("Mark of the Wild");else c("Thorns");end;


That would be because the rank specified (10) didn't exist!. Anyway glad I could help you out :).
User avatar
Youfie
Knight-Lieutenant
Knight-Lieutenant
 

Re: Buff macro

by Bluedoc » Wed Mar 02, 2016 3:28 am

I had to remove the rank beacuse i don't have rank 10...
Bluedoc
Private
Private
 


Return to Druid