Few questions on writing CC's: 1) Is there a way to give a general priority of one ability over another, when the CastWhen requirements for both abilities are met? A way to specify when the bot has the requirements do two abilities it knows which one is more important. For example, I have: Code: Spell.Cast("Cauterize", castWhen => !BuddyTor.Me.CurrentTarget.HasDebuff("Bleeding") && BuddyTor.Me.CurrentTarget.HealthPercent >= 80 && BuddyTor.Me.ResourceStat >= 2), Spell.Cast("Merciless Slash", castWhen => BuddyTor.Me.ResourceStat >= 5), Spell.Cast("Master Strike"),//30s CD castWhen for both Cauterize and Master Strike are both met, yet it chooses to Master Strike first, when I'd like it to Cauterize first. 2) Stack checking on buffs like Centering. I pulled the stack code from Immortal, but it doesnt seem to actually allow the ability to trigger: Code: BuddyTor.Me.CurrentTarget.Debuffs.FirstOrDefault(B => B.Name == "Centering").Stacks == 30 Am I doing it correctly? Not entirely sure if FirstOrDefault is having an affect or even what it refers to, but there isnt much detail on the API right now. 3) Is there an api call to check if an ability is currently on cooldown?
Yeah I'm going to have to take a big broom and sweep it across WingIt somewhere in the coming few days. It needs some proper clean up, thanks for pointing that out. CastWhen is just something I wrote to make the whole thing understandable to outsiders. You'll see "ret" being used a whole lot more across the CCs; it's basically the same thing. It's a retriever expression which returns a value, in this case a boolean. If the condition is met, it'll execute the branch. The order of execution is the order it's written in: Code: Spell.Cast("Spell", ret => someVal = true), Spell.Cast("Spell 2", ret => someOtherVal = true), If someVal is true, that'll execute, and it'll cast Spell. If someOtherVal is true, it'll cast that one obviously. However, if both are true, Spell will be cast over Spell 2, simply because that Composite is defined higher up in the tree. Makes sense? If you have a spell whose condition is always true, like "Spell.Cast("Foo"),", it should still behave in the same manner, if it's not, chances are the retriever expression of other spells isn't returning true, even though you might expect it to. For your second question, FirstOrDefault just picks the first element that matches the expression from an IEnumerable, and returns the default value if it can't find any. So in this case, yes - you're doing it right. Third question - AbilityManager.CanCast. If it's on cooldown or it can't cast the spell for whatever reason, that'll return false.
In general, the one you set first, is going to be the one that gets run first, there are ways to change that but i will leave that up to the reader. could use a probability selector, if it works now? does it ?
It should, but often doesnt seem to. Placing certain abilities on lines above others doesnt seem to be affecting their attack order, at least not in my attempts. For example, I place Cauterize above Master Strike in the CC code I'm using, yet Master Strike always seems to attack first.
Nevermind, it does seem to work properly as far as general order goes. Still having trouble getting it to detect Centering stacks (though i fixed the line to actually check me and not the target, heh).
OK updated Gunnery Commando done and dusted need to implement AOE and CC + not breaking CC but its solid as is tested for 15+ hours, low lvl support (Pre Grav Round) is in and working. View attachment Commando.cs Going to make a start on Assault Specialist for Commando and Vanguard next.
not sure what happen. was using my commando gunnery last night fine. but today it doesnt attack. targets then nothing. tried deleting whole wingit folder, update from svn, copy over to BW folder. not working. protopally tried your cs and get Code: Compiler Error: c:\swtor bot\BuddyWing 0.1.744.210\Routines\WingIt\Routines\Advanced\Commando\Commando.cs(16,10) : error CS1729: 'WingIt.Dynamics.ClassAttribute' does not contain a constructor that takes 2 arguments Compiler Error: c:\swtor bot\BuddyWing 0.1.744.210\Routines\WingIt\Routines\Advanced\Commando\Commando.cs(31,10) : error CS1729: 'WingIt.Dynamics.ClassAttribute' does not contain a constructor that takes 2 arguments Compiler Error: c:\swtor bot\BuddyWing 0.1.744.210\Routines\WingIt\Routines\Advanced\Commando\Commando.cs(58,10) : error CS1729: 'WingIt.Dynamics.ClassAttribute' does not contain a constructor that takes 2 arguments Unhandled exception during init: System.InvalidOperationException: No routines were loaded. Please ensure there is a routine for your class before starting the bot. at Buddy.CommonBot.BotMain.SetCurrentCombatRoutine() at Buddywing.MainWindow.()
Update to Sorc, lightning spec Hi there, After a lot more testing and tweaking, the Sorc lightning cc has been updated. Source Lightning.cs Patch Patch I would like to thank tokyov for helping me with this.
Madness Assassin based upon Simulationcraft and the current best spec for Madness 5/5/31, dps on dummies I got is 1517 and I am in rakata
Empire - Sniper Latest Version will always be: SVN: https://hbxsol.googlecode.com/svn/trunk/WingIt/Routines/Advanced/Sniper/ The code has been cleaned up. Added SniperUtility class for constants and common routines etc Re-factored code to use SniperUtility Added basic support for Lethality Added basic support for Engineering Add logic to attempt to help reduce CC breaks Added logic to help control Flash Bang usage and Frag. Grenade usage. It is running very well right now and except for breaking CC is probably playing better than I normally do. I'm probably going to work on changing over skill names for Gunslinger next. Marksmanship InAction with CombatBot: [video=youtube;7ZIYDqERWXM]http://www.youtube.com/watch?v=7ZIYDqERWXM[/video] Patch: https://hbxsol.googlecode.com/svn/trunk/WingIt/Routines/Advanced/Sniper/sniper.10.5.2012.patch
Lvl 12 commando. Seems to just spam Charged Bolts. Will pull with Sticky Grenade, then Charged Bolts till all dead. If one gets close will use Stockstrike. Not sure if this is best dps or not.
Hey Neo, i wanted to test some of the CC's with my 50's but can't figure out what to load, tried the combat bot file, but nothing happens, is it because it's the wrong file, or because i'm trying my Assa tank?