it's a bit buggy for me aswell... mostly it's not working when you got Buddywing open. double klicking on the buddywing reference seemed to have helped aswell.
you're going the wrong way ;-)
Code:
Spell.Cast("Affliction", ret => !Me.CurrentTarget.HasDebuff("Affliction (Force)")),
Spell.Cast("Thundering Blast"),
Spell.Cast("Crushing Darkness", ret => !Me.CurrentTarget.HasDebuff("Crushed (Force)")),
Spell.Cast("Force Lightning", ret => Me.HasBuff("Lightning Barrage")),
Spell.Cast("Chain Lightning", ret => Me.HasBuff("Lightning Storm")),
Spell.Cast("Lightning Strike", ret => Me.HasBuff("Subversion") && Me.Buffs.FirstOrDefault(B => B.Name == "Subversion").Stacks < 3 || Me.HasBuff("Subversion") && Me.Buffs.FirstOrDefault(B => B.Name == "Subversion").TimeLeft.Seconds < 8 || !Me.HasBuff("Subversion")),
check this for example
affliction has top prio, after that Thundering Blast and crushing darkness.
if lightning barrage is up (which is triggered by an affliction crit) go for a lighning,
chain lightning should only be cast if lightning storm is up which is triggered by lightning strike. and lightning strike should be cast alot to keep up the subversion buff at 3 stacks.
for you problem that would mean:
Spell.Cast("Skill you want to cast with 5 Tracer Stacks", Me.HasBuff("Tracer Stack") && Me.Buffs.FirstOrDefault(B => B.Name == "Tracer Stack").Stacks < 5),
< Whatever you like>
< Whatever you like>
< Whatever you like>
Spell.Cast("Tracer Missle", !Me.HasBuff("Tracer Stack") || Me.Buffs.FirstOrDefault(B => B.Name == "Tracer Stack").Stacks < 5),
this way your skill will be top priority but only casted if you got 5 stacks of the tracer buff.
not sure since i havent played BH for quite some time now.. if the target get's a debuff from Tracer Missle it would be Me.CurrentTarget.Buffs.FirstOrDefault(B => B.Name == "Name of Debuff").Stacks < 5),
ect.