Milton

Powershift macro

37 posts in this topic

Hey, how does a macro look that shifts out of cat form and into cat form again in 1 global (Powershifting)?

Share this post


Link to post
Share on other sites

/script u=UnitMana('Player'); c=CastSpellByName; f=UnitPowerType("Player"); if (u<=30) and (f==3) then c"Cat Form"; elseif (f==0) then c"Cat Form"; end;

Share this post


Link to post
Share on other sites
On 22/1/2017 at 10:12 PM, Lorilay said:

/script u=UnitMana('Player'); c=CastSpellByName; f=UnitPowerType("Player"); if (u<=30) and (f==3) then c"Cat Form"; elseif (f==0) then c"Cat Form"; end;

Works pretty fair. It seems to get stuck sometimes. How would the same look for bear? I tried editing your macro using f==1 instaed of f==3 following the API from this link http://vanilla-wow.wikia.com/wiki/API_UnitPowerType . This doesn't work at all tho. What I have is this: 

/script u=UnitMana('Player'); c=CastSpellByName; f=UnitPowerType("Player"); if (u<=30) and (f==1) then c"Bear Form"; elseif (f==0) then c"Bear Form"; end;

Share this post


Link to post
Share on other sites
4 minutes ago, Milton said:

Works pretty fair. It seems to get stuck sometimes. How would the same look for bear? I tried editing your macro using f==1 instaed of f==3 following the API from this link http://vanilla-wow.wikia.com/wiki/API_UnitPowerType . This doesn't work at all tho. What I have is this: 

/script u=UnitMana('Player'); c=CastSpellByName; f=UnitPowerType("Player"); if (u<=30) and (f==1) then c"Bear Form"; elseif (f==0) then c"Bear Form"; end;

Thats cause you dont have no bearform. You have a dire bear form if you're above lvl 40. which i presume is the case.

Share this post


Link to post
Share on other sites
1 minute ago, Wortgewandt said:

Thats cause you dont have no bearform. You have a dire bear form if you're above lvl 40. which i presume is the case.

I dont have Dire Bear yet. I am level 32.

Share this post


Link to post
Share on other sites
1 hour ago, Milton said:

I dont have Dire Bear yet. I am level 32.

Now my bear form macro works. But I cannot shift to bear if I'm in cat form. Can I just add this in front of the macro: /script if not buffed("Cat Form") then cast("Cat Form") end ?

 

Edit: I found myself with the macro: 

/script if not buffed("Bear Form") then cast("Bear Form") end
/unbuff Bear Form
 

This does the trick. Thanks for your input too tho.

Edited by Milton

Share this post


Link to post
Share on other sites

Here my macro for cat (it's designed to remove snares in PvP)

1) removes Prowling (rarely useful)

2) shift to cat form if in caster form

3) remove current form if cat form is not on GCD

I'm using Super Macro, but I guess you could squeeze it in a couple of macros

 

/run if IsActive('Prowl') then CastSpellByName("Prowl") else local a=GetActiveForm() if a==0 then CastShapeshiftForm(3) else if not IsSpellOnCD('Cat Form') then CastShapeshiftForm(a)end end end

 

Support lua:
 

function GetSpellID(sn)
  local i,a
  i=0
  while a~=sn do
    i=i+1
    a=GetSpellName(i,"spell")
  end
  return i
end

function IsActive(sn)
  return ({GetSpellCooldown(GetSpellID(sn),"spell")})[3]==0
end

function IsSpellOnCD(sn)
 return GetSpellCooldown(GetSpellID(sn),"spell")~=0
end

function GetActiveForm()
  for i=1,GetNumShapeshiftForms() do
    if  ({GetShapeshiftFormInfo(i)})[3]
    then return i end
  end
  return 0
end

function CancelForm()
  local f = GetActiveForm()
  if f ~= 0 then
    CastShapeshiftForm(f)
  end
end

 

Share this post


Link to post
Share on other sites

@WobLight Is the purpose of the global cooldown check to ensure that you are less likely to get stuck in caster form?

 

Share this post


Link to post
Share on other sites
1 minute ago, Razorwynd said:

@WobLight Is the purpose of the global cooldown check to ensure that you are less likely to get stuck in caster form?

 

The cooldown check is just a way to prevent accidental caster form -> cat -> caster form due to spamming

Share this post


Link to post
Share on other sites

Then what advantage does this confer over something like 

/unbuff Dire Bear Form
/unbuff Aquatic Form
/unbuff Travel Form
/script if not buffed("Cat Form") then cast("Cat Form") end

Is there anything that works more effectively when considering latency etc?

Edited by Razorwynd
I am a noob

Share this post


Link to post
Share on other sites
2 minutes ago, Razorwynd said:

nevermind I get the issue now

 

Nice thing the forum notify you almost in real time XD

Edited by WobLight

Share this post


Link to post
Share on other sites

Absolutely, the notifications makes conversations quite easy.

You seem quite knowledgeable regarding these things, Is there any reason to believe that one macro might be "faster" than another. Sometimes I find that I get stuck in caster form for a second when trying to go from Cat to Bear, which is really annoying in PvP.

Share this post


Link to post
Share on other sites

Also, unbuff is a supermacro defined command, it scans buffs using an invisible tooltip and is much slower than scanning the spellbook.

Share this post


Link to post
Share on other sites

Right now I am using the CastModifier Addor (https://github.com/DennisWG/CastModifier) with the following macro:

/unshift [stance:1/2/4];
/cast [stance:0] Cat Form; Track Humanoids


I imagine this probably works the same way... I gather you feel like the way you have coded it is "most efficient"

Share this post


Link to post
Share on other sites

I don't know how CastModifier checks for stances, but it does most probably in the same way I do.

I doubt that it will check your cooldown before unshifting, this is just too bad, especially in PvP you will often be spamming your macro to fast shift out and reshift in cat (e.g. to restore energy or remove snares), without a check you will often press your macro 1 time too much before noticing you shifted, that will result in unwanted unshift (cat->caster->cat->caster). In expansions wow default UI does a very similar thing behind the scene.

Share this post


Link to post
Share on other sites

Just to make things clear, using unbuff is slower and less "reliable" than checking for the stance directly, but I'm quite sure nobody would ever notice the difference.

Share this post


Link to post
Share on other sites

Well I will have to try out your macro to see how it feels...

Right now I have mouse scroll down set to:

/unshift [stance:1/2/4]
/cast [stance:0] Cat Form; Track Humanoids

and mouse wheel up set to: 

/unshift [stance:2/3/4]
/cast [stance:0] Dire Bear Form;

This nicely allows me to spam the mouse wheel to get into the desired forms from any form... and with just one scroll of the mouse wheel (towards the opposite form) I can return to caster form. This works kind of like forward-neutral-reverse in a transmission except for bear-caster-cat.

As you can imagine cat to caster to cat is a bit more tricky since I have to scroll forward just once and then back...

Share this post


Link to post
Share on other sites

Using a macro to reshift is definitely faster than unshifting and shifting manually (especially if you have low ping), but checking for GCD it may also be a drawback in some situations. I have indeed keybindings to: unshift, both reshifting and shift for cat, shift-to for bear and reshift for travel.

EDIT:

I use Cat Form + Prowl instead of Cat Form + Track Humanoid, caster form -> cat form -> prowl is really fast and very useful for pvp

EDIT2:

Checking for time passed since last shapeshift would be more proper way to avoid unwanted unshifts, but it's not trivial to achieve.

Edited by WobLight

Share this post


Link to post
Share on other sites
On 14/3/2017 at 10:01 AM, WobLight said:

Using a macro to reshift is definitely faster than unshifting and shifting manually (especially if you have low ping), but checking for GCD it may also be a drawback in some situations. I have indeed keybindings to: unshift, both reshifting and shift for cat, shift-to for bear and reshift for travel.

EDIT:

I use Cat Form + Prowl instead of Cat Form + Track Humanoid, caster form -> cat form -> prowl is really fast and very useful for pvp

EDIT2:

Checking for time passed since last shapeshift would be more proper way to avoid unwanted unshifts, but it's not trivial to achieve.

WobLight, very nice macro. I use it for my cat, bear and moonkin forms. Is there any way to have the same for travel form and aquatic form in the same macro?

Share this post


Link to post
Share on other sites
2 hours ago, Milton said:

WobLight, very nice macro. I use it for my cat, bear and moonkin forms. Is there any way to have the same for travel form and aquatic form in the same macro?

afaik, there's no way to tell whatever you're swimming or not. Attempting to cast both at same time will work, but one will always give error.

Share this post


Link to post
Share on other sites
20 hours ago, WobLight said:

afaik, there's no way to tell whatever you're swimming or not. Attempting to cast both at same time will work, but one will always give error.

I am not super good at macros. In fact I don't know how to write one at all :(. Can u write it for me? I would be grateful.

Edited by Milton

Share this post


Link to post
Share on other sites
1 minute ago, Milton said:

I am not super good at macros. In fact I don't know how to write one at all :(. Can u write it for me?

with cooldown check?

Share this post


Link to post
Share on other sites
Just now, WobLight said:

with cooldown check?

Oh fast reply :D. Yes pls. With CD check (so I don't stay in caster form too long).

Share this post


Link to post
Share on other sites
/run if  not IsSpellOnCD('Travel Form') then if GetActiveForm() == 0 then CastShapeshiftForm(2) CastShapeshiftForm(4) else CancelForm() end end

With same SuperMacro extended lua as others.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now