It seems that Darkness Assassin its suffering from the same problem as Madness Sorc the bot cant recognize Harnessed Darkness buff at 3 stacks I even included conditionals to see if the rotation would at least hang on the other skills as you can check on the code below PHP: Spell.Cast("Depredating Volts", ret => Me.BuffCount("Harnessed Darkness") == 3), Spell.Cast("Wither", ret => Me.BuffCount("Harnessed Darkness") <= 2), Spell.Cast("Shock", ret => Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget)), Spell.Cast("Discharge", ret => Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget)), Spell.Cast("Maul", ret => Me.HasBuff("Conspirator's Cloak") && Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget)), Spell.Cast("Assassinate", ret => Me.CurrentTarget.HealthPercent <= 30 && Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget) && !Me.HasBuff("Conspirator's Cloak")), Spell.Cast("Thrash", ret => Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget) && !Me.HasBuff("Conspirator's Cloak") && !Buddy.CommonBot.AbilityManager.CanCast("Assassinate", Me.CurrentTarget)), Spell.Cast("Saber Strike", ret => Me.ForcePercent <= 35 && Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget) && !Me.HasBuff("Conspirator's Cloak") && !Buddy.CommonBot.AbilityManager.CanCast("Assassinate", Me.CurrentTarget)) But the bot nether use depredating volts as the other skills keep firing even when the buff its bigger then 2. If i manually cast it it will break the cast (as it is channeled) and will then cast the skill for some time, but to soon stop using it again. Is another way to specify the buff on the conditional as with a spell id or something, as a way to ensure the routine to run as expected? Thanks for any help, this may help fixing madness sorc too
you could try by dumping the current buff list and check for the buffs and ids? Maybe the buff has this name, but under the hood it has a spelling error (seen this to many times). Or you could write a logline to see what every buff has for the amount of stacks. OR it could be the spell maybe needs the framelock to correctly read the stack? I know, many ifs, but maybe its a solution.
This shit has been going on since before 2.0, it's so damn frustrating. It also happens with the Jedi Shadow version too, and it's only that buff. I beat my head against the wall trying to make it work but finally just gave up. Cryo's ideas are good, and could help us get to the bottom of the problem.
So i did try to run the dumper plugin and made some changes to show stacks and what i could see its: 1 - The plugin doesnt show all the buffs with stacks but only the first one that its refreshed and maitaining only this one on the list on each pulse until it runs off and then get the next one that is cast with stacks. 2 - The id changes on each cast so we cant use them as a way to identify 3 - Sometimes Harnessed Darkness would appear twice on the list with 2 different ids. Those ids sometimes repeats sometimes dont. On this modified dumper i used the code bellow to only show buffs on me on pulse and with stacks. What haapens too its that doesnt show buff with no stacks PHP: public void OnPulse() { foreach (var buffMe in BuddyTor.Me.Buffs) { Logging.Write("#MYSELF# -> Buff Name: " + buffMe.Name + " ID: " + buffMe.Guid + " Count" + buffMe.Stacks); } } So maybe its a problem with Me.BuffCount in the same way as the plugin only gets one spell with stacks. But that doesnt make much sense since in lots of other routines with buffcount it works fine. Maybe in other classes there is only one spell that uses stacks? Any ideas?
If the dumper cant Read the buff stacks then they maybe have a different mem location, which aevitas has to check. In theory the dumper should have clean access to every buff or debuff.
Maybe the problem its with the duplicated entry of the buff. If i use 2 conditionals as in the example below PHP: Spell.Cast("Wither", ret => !Me.HasBuff("Harnessed Darkness") && Me.BuffCount("Harnessed Darkness") <= 2 ), It gets that have the buff from one of the entries, but the same entry dont have stacks so it wont cast wither. What i dont get it its why sometimes it casts normally sometimes not. Why it have 2 entries of the buff sometimes. Is there a way to create a function to check if there is 2 entries of the buff in BuddyTor.Me.Buffs array? something like PHP: foreach (var buffMe in BuddyTor.Me.Buffs) { if (buffMe.Name = "Harnessed Darkness" && buffMe.Stacks < 0) { return buffMe.Stacks } } Thats the logic but i know it wont work the way its written. I dont know how to deal with arrays T.T
I wonder if the 2 different ID's you get are, 1 id is for the first and single debuff and the 2nd id has the stacks and the bot isn't combining them since they have different ID's
So on Extension.cs there is the function buffcount PHP: public static int BuffCount(this TorCharacter p, string buffName) { return !p.HasMyBuff(buffName) ? 0 : p.Buffs.FirstOrDefault(b => b.Name.Contains(buffName) && b.CasterGuid == BuddyTor.Me.Guid).GetStacks(); } Correct me if im wrong but the way its written it will get only the first entry so if stacks are in the second it will return none? How could we change it to look for the second entry?
Have to look later but that seems to be returning first entry, would need to have a foreach loop and not have the firstordefault but I don't know what other options there are from here.
Cass i got it working. dont ask me how but after removing force speed and both interrupts the rotation works perfectly. PHP: // Copyright (C) 2011-2015 Bossland GmbH // See the file LICENSE for the source code's detailed license using Buddy.BehaviorTree; using BenderCombat.Core; using BenderCombat.Helpers; namespace BenderCombat.Routines { internal class Darkness : RotationBase { public override string Name { get { return "Assassin Darkness"; } } public override Composite Buffs { get { return new PrioritySelector( Spell.Buff("Dark Charge"), Spell.Buff("Mark of Power"), Spell.Buff("Stealth", ret => !Rest.KeepResting()) ); } } public override Composite Cooldowns { get { return new PrioritySelector( Spell.Buff("Dark Ward", ret => !Me.HasBuff("Dark Ward")), Spell.Buff("Unbreakable Will", ret => Me.IsStunned), Spell.Buff("Overcharge Saber", ret => Me.HealthPercent <= 85), Spell.Buff("Deflection", ret => Me.HealthPercent <= 60), Spell.Buff("Force Shroud", ret => Me.HealthPercent <= 50), Spell.Buff("Recklessness", ret => Me.CurrentTarget.BossOrGreater()) ); } } public override Composite SingleTarget { get { return new PrioritySelector( //Movement CombatMovement.CloseDistance(Distance.Melee), //Rotation Spell.Cast("Depredating Volts", ret => Me.BuffCount("Harnessed Darkness") == 3), Spell.Cast("Wither", ret => Me.BuffCount("Harnessed Darkness") <= 2), Spell.Cast("Shock", ret => Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget)), Spell.Cast("Discharge", ret => Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget)), Spell.Cast("Maul", ret => Me.HasBuff("Conspirator's Cloak") && Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget)), Spell.Cast("Assassinate", ret => Me.CurrentTarget.HealthPercent <= 30 && Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget) && !Me.HasBuff("Conspirator's Cloak")), Spell.Cast("Thrash", ret => Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget) && !Me.HasBuff("Conspirator's Cloak") && !Buddy.CommonBot.AbilityManager.CanCast("Assassinate", Me.CurrentTarget)), Spell.Cast("Saber Strike", ret => Me.ForcePercent <= 35 && Me.BuffCount("Harnessed Darkness") <= 2 && !Buddy.CommonBot.AbilityManager.CanCast("Wither", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Shock", Me.CurrentTarget) && !Buddy.CommonBot.AbilityManager.CanCast("Discharge", Me.CurrentTarget) && !Me.HasBuff("Conspirator's Cloak") && !Buddy.CommonBot.AbilityManager.CanCast("Assassinate", Me.CurrentTarget)) ); } } public override Composite AreaOfEffect { get { return new PrioritySelector( new Decorator(ret => Targeting.ShouldAoe, new PrioritySelector( Spell.Cast("Wither"), Spell.Cast("Discharge"))), new Decorator(ret => Targeting.ShouldPbaoe, Spell.Cast("Lacerate", ret => Me.ForcePercent >= 50)) ); } } } }