What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

WingIt - All In One

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?
 
Where do you want to place:

Code:
public const float RangedDistance = 2.8f;
public const float MeleeDistance = 0.3f;

I'm sure there are going to be some other things that are used a lot, but so far those are the biggest magic numbers I see.

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. :P

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?

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.
 
Last edited:
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?

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 ?
 
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.
 
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.()
 
Last edited:
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.
 
Last edited:
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.()

The spec is missing.

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 41728

Going to make a start on Assault Specialist for Commando and Vanguard next.

I can't see any changes Oo
 
Last edited:
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

using System;
using System.Linq;
using Buddy.BehaviorTree;
using Buddy.Common;
using Buddy.CommonBot;
using Buddy.Swtor;

using WingIt.Dynamics;

using Action = Buddy.BehaviorTree.Action;

namespace WingIt.Routines
{
public static class AssassinMadness
{
[Class(CharacterClass.Inquisitor, AdvancedClass.Assassin, SkillTreeId.AssassinMadness)]
[Behavior(BehaviorType.Combat)]
public static Composite AssassinMadnessCombat()
{
return new PrioritySelector(
Movement.StopInRange(0.3f),
Spell.WaitForCast(),

Spell.Cast("Lightning Charge", ret => !BuddyTor.Me.HasBuff("Lightning Charge")),

Spell.Cast("Mark of Power", ret => !BuddyTor.Me.HasBuff("Mark of Power")),

Spell.Cast("Unbreakable Will", ret => BuddyTor.Me.IsStunned),

// Crowd controls!
//Spell.Cast("Electrocute", onUnit => Helpers.Targets.FirstOrDefault(t => t.Toughness == CombatToughness.Strong), ret => Helpers.Targets.Count() > 3 && Helpers.Targets.FirstOrDefault(t => t.Toughness == CombatToughness.Strong) != null),
Spell.Cast("Whirlwind", onUnit =>
{
var previousTarget = BuddyTor.Me.CurrentTarget;
return
Helpers.Targets.FirstOrDefault(
t =>
t != previousTarget && (t.Toughness == CombatToughness.Strong) && !t.IsDead) ??
Helpers.Targets.FirstOrDefault(t => t != previousTarget);
}, castWhen => Helpers.Targets.Count() >= 3),

// Interrupts
Spell.Cast("Jolt", ret => BuddyTor.Me.CurrentTarget.IsCasting),
Spell.Cast("Overload", ret => BuddyTor.Me.CurrentTarget.IsCasting),
Spell.Cast("Electrocute", ret => BuddyTor.Me.CurrentTarget.IsCasting),

// Defensive Cooldowns
Spell.Cast("Deflection", ret => BuddyTor.Me.InCombat && BuddyTor.Me.HealthPercent <= 80),
Spell.Cast("Force Shroud", ret => BuddyTor.Me.InCombat && BuddyTor.Me.HealthPercent <= 70),

// Buffs
Spell.Cast("Recklessness", castWhen => BuddyTor.Me.InCombat && !BuddyTor.Me.HasBuff("Recklessness")),
Spell.Cast("Force Cloak", castWhen => BuddyTor.Me.InCombat && !BuddyTor.Me.HasBuff("Dark Embrace")),
Spell.Cast("Overcharge Saber", castWhen => BuddyTor.Me.InCombat && !BuddyTor.Me.HasBuff("Overcharge")),

Spell.CastOnGround("Death Field", ret => Helpers.Targets.Count() >= 1, ret => BuddyTor.Me.CurrentTarget.Position),
Spell.Debuff("Crushing Darkness", castWhen => BuddyTor.Me.HasBuff("Raze") && !BuddyTor.Me.CurrentTarget.HasDebuff("Crushed (Force)")),
Spell.Debuff("Discharge", castWhen => !BuddyTor.Me.CurrentTarget.HasDebuff("Shocked (Force)")),
Spell.Cast("Assassinate", castWhen => BuddyTor.Me.CurrentTarget.HealthPercent <= 30),
Spell.Debuff("Creeping Terror", castWhen => !BuddyTor.Me.CurrentTarget.HasDebuff("Creeping Terror (Force)")),
Spell.Cast("Maul", castWhen => BuddyTor.Me.HasBuff("Exploit Weakness")),
Spell.Cast("Thrash", castWhen => BuddyTor.Me.ResourceStat > 45),
Spell.Cast("Saber Strike"),
Movement.MoveTo(ret => BuddyTor.Me.CurrentTarget.Position, 0.3f)

);
}

[Behavior(BehaviorType.OutOfCombat)]
public static Composite AssassinMadnessRest()
{
return new PrioritySelector(
Spell.Cast("Seethe", ret => BuddyTor.Me.HealthPercent <= 90)
);
}

//[Behavior(BehaviorType.Pull)]
//public static Composite AssassinMadnessPull()
//{
// return new PrioritySelector(
// Spell.CastOnGround("Death Field", ret => Helpers.Targets.Count() >= 1, ret => BuddyTor.Me.CurrentTarget.Position))
//}
}
}
 
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
 
Last edited:
If you want to send us the patch and the cs, im sure we will add it to the existing project.
 
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.
 
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.

Which spec? Log?
 
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?
 
Back
Top