06.11Code Shrinking Basic
See the above link for the full scoop, but for basics; assign variables to anything that that is repeated more than once inside your macro. Also note that the Rank of the spell is no longer required – the highest Rank that is available to you is automatically used. Semi-colons are not necessary – you can use spaces, or use the “)†as you delimiter. Be sure to remove as many unnecessary spaces as you can – they count against your text limit of 255 characters. One more thing; “/run†and “/script†are the same, except /run is shorter…
For example, this string has 184 characters…
- /script if (GetComboPoints()>=5) and UnitMana(“Playerâ€)>=45 then CastSpellByName(“Eviscerate(Rank8)â€);end
/script if UnitMana(“Playerâ€)>=35 CastSpellByName(“Sinister Strike(Rank8)”);end
But can be shortened easily with…
- /script C=CastSpellByName;U=UnitMana(“Playerâ€);if (GetComboPoints()>=5) and U>=45 then C(“Eviscerate”);end;if U>=35 C(“Sinister Strike”);end
That gets us down to 140 words. But, even better, if we are gonna be spamming SS anyhow, who cares how much energy we have? Lets make it shorter…
- /run C=CastSpellByName;if (GetComboPoints()>=5) then C(“Eviscerate”) else C(“Sinister Strike”);end
“Yeah Lir, but who cares if it’s down to 98 characters? What am I gonna do with the other 157 characters?†Well, now you can throw in more specifics for your macro and tailor it to your needs. Want some instant energy via ThistleTea, or some Riposte or Cold Blood action? Now you have room…
- /run C=CastSpellByName;G=GetComboPoints()if IsUsableAction(5)then C(“Riposte”)end;if G>=5 or UnitHealth(“Targetâ€)/UnitHealthMax(“Targetâ€)<.2 and G>=2 then C(“Eviscerateâ€)else C(“Sinister Strike”)end
So now we have a squeezed macro that will automatically fire off Riposte when it can, and will Evis when we get 5 CPs or if the target’s health is below 20% and we have 2 or more CP’s on it. Otherwise it will just spam SS until another condition is met. All that in 198 characters! Heck, you could probably squeeze in a “use potion if low on health†string if we wanted to…
Grab from :Â Rogue Macro Guide at WOW Forums






Leave a Reply