PDA

View Full Version : [WoW] BIG MACRO - lil problem



yoyobarazani
01-05-2011, 08:43 AM
im trying to get my CLC_DK into a 1 button macro that will work so if i spam that key it will actually do OPTIMAL dps now that is what i got so far:


#showtooltip

/startattack

/stopmacro [noexists][noharm][dead]

/console Sound_EnableSFX 0

/cast [combat]14

/cast [combat]Blood Tap

/cast [combat]Unholy Frenzy

/cast [combat]Claw

/script UIErrorsFrame:Clear()
/script local CS=CastSpell;

/script local GS=GetSpellID;

/script local class=UnitClass("target");

/script local function runeCDs (r) { local a, b { if r == "unholy" then a, b = 3, 4; elseif r == "frost" then a, b = 5, 6; elseif r == "blood" then a, b = 1, 2; end; } local time1, time2 = 20, 20; local start, dur, cool = GetRuneCooldown(a); time1 = (cool and 0) or (dur - (curtime - start + GCD)); local start, dur, cool = GetRuneCooldown(b); time2 = (cool and 0) or (dur - (curtime - start + GCD)); if time1 > time2 then { return time2, time1, GetRuneType(b) == 4, GetRuneType(a) == 4l; } else { return time1, time2, GetRuneType(a) == 4, GetRuneType(b) == 4; } end; end; }

/script local frost, lfrost, fd, lfd = runeCDs("frost")

/script local unholy, lunholy = runeCDs("unholy")

/script local blood, lblood, bd, lbd = runeCDs("blood")

/script local death = availableDeathRunesCount()

/script local OB=GS("Outbreak");

/script local IT=GS("Icy Touch");

/script local PS=GS("Plague Strike");

/script local DT=GS("Dark Transformation");

/script local FS=GS("Festering Strike");

/script local SS=GS("Scourge Strike");

/script local SS=GS("Blood Strike");

/script local HW=GS("Horn of Winter");

/script local expires1 = select(7,UnitDebuff("TARGET", spells["Frost Fever"], nil, "PLAYER"))

/script local expires2 = select(7,UnitDebuff("TARGET", spells["Blood Plague"], nil, "PLAYER"))

/script if (expires1 == nil and expires2 == nil and GetSpellCooldown(spells["Outbreak"]) == 0) then CS(OB,0);end;

/script if (expires1 == nil and ((runeCDs("frost") <= 0) or availableDeathRunesCount() >= 1)) then CS(IT,0);end;
/script if (expires2 == nil and ((runeCDs("unholy") <= 0) or availableDeathRunesCount() >= 1)) then CS(PS,0);end;

/script if (select(4, UnitBuff("PET",spells["Shadow Infusion"])) == 5 and ((unholy <= 0) or (death >= 1))) then CS(DT,0);end;

/script if ((lunholy <= 0) or (lfrost <= 0 and (lfd or (frost <= 0 and fd))) or (lblood <= 0 and (lbd or (blood <= 0 and bd)))) then CS(SS,0);end;

/script if ((lfrost <= 0) and (lblood <= 0)) then CS(FS,0);end;

/script if ((UnitPower("player") >= (UnitPowerMax("player")-20)) or (select(7, UnitBuff("PLAYER",spells["Sudden Doom"]))~= nil) or (select(1, UnitBuff("PLAYER",spells["Runic Corruption"])) == nil and UnitPower("player") >= (40 - DC))) then CS(DC,0);end;

/script if ((unholy <= 0) or (death >= 1)) then CS(SS,0);end;

/script if ((frost <= 0) and (blood <= 0)) then CS(FS,0);end;

/script if (UnitPower("player") >= (40 - DC) or select(7, UnitBuff("PLAYER",spells["Sudden Doom"]))~= nil) then CS(DC,0);end;

/script if (GetSpellCooldown(spells["Horn of Winter"]) == 0) then CS(HW,0);end;


can ANYONE plz help me fix it?
btw not only it doesnt work but it gets my screen stuck for a second or two too...

Khatovar
01-05-2011, 09:29 AM
That looks like something that should in no way work. You aren't allowed to use macros that make combat decisions for you, including casting based on the presence or absence or buffs/debuffs, amount of health or energy.

Kromtor
01-05-2011, 09:47 AM
castspell is a protected function, you can't call it like that and expect it to work in a macro anymore. those days are long gone.

Siaea
01-05-2011, 11:57 AM
They're spamming us in Russian now?

Anyways, that won't work. Bliz doesn't let macros make decisions for you (and hasn't in forever). Just do a simple /castsequence, and for a tanking dk there are threads with several ideas (I copied one word for word, maybe from Mercurio, not sure).

Ualaa
01-05-2011, 07:42 PM
Depending on your spec, end your macro with:


Blood:
/cast Rune Strike

Frost:
/cast Frost Strike

Unholy:
/cast Death Coil

Preface this with four to six abilities, which combine for two Blood, two Frost and two Unholy runes.
The castsequence should run pretty good.



Alternatively, put abilities on different buttons and mash all of the buttons.
If something cannot fire, it won't even if it is pushed.

You can "weigh" an ability, by including it three times on seven buttons.
Or whatever you want to do.