• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • WingIt - All In One

    Discussion in 'Archives' started by Neo93, May 7, 2012.

    1. Mizzy

      Mizzy Member

      Joined:
      Mar 5, 2011
      Messages:
      114
      Likes Received:
      3
      Trophy Points:
      18
      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?
       
    2. Aevitas

      Aevitas Well-Known Member Staff Member Buddy Core Dev

      Joined:
      Mar 2, 2010
      Messages:
      2,307
      Likes Received:
      36
      Trophy Points:
      48
      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

      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: May 9, 2012
    3. Pios

      Pios New Member

      Joined:
      Jul 1, 2010
      Messages:
      160
      Likes Received:
      1
      Trophy Points:
      0
      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 ?
       
    4. Aevitas

      Aevitas Well-Known Member Staff Member Buddy Core Dev

      Joined:
      Mar 2, 2010
      Messages:
      2,307
      Likes Received:
      36
      Trophy Points:
      48
      It should.
       
    5. Mizzy

      Mizzy Member

      Joined:
      Mar 5, 2011
      Messages:
      114
      Likes Received:
      3
      Trophy Points:
      18
      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.
       
    6. Mizzy

      Mizzy Member

      Joined:
      Mar 5, 2011
      Messages:
      114
      Likes Received:
      3
      Trophy Points:
      18
      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).
       
    7. protopally

      protopally Member

      Joined:
      Jan 15, 2010
      Messages:
      391
      Likes Received:
      8
      Trophy Points:
      18
      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.
       
    8. in2fun

      in2fun New Member

      Joined:
      Sep 23, 2010
      Messages:
      871
      Likes Received:
      8
      Trophy Points:
      0
      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: May 9, 2012
    9. Pios

      Pios New Member

      Joined:
      Jul 1, 2010
      Messages:
      160
      Likes Received:
      1
      Trophy Points:
      0
      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: May 10, 2012
    10. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      The spec is missing.

      I can't see any changes Oo
       
      Last edited: May 10, 2012
    11. protopally

      protopally Member

      Joined:
      Jan 15, 2010
      Messages:
      391
      Likes Received:
      8
      Trophy Points:
      18
    12. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      That look good, thank you :)
       
    13. cystacae

      cystacae New Member

      Joined:
      Jul 17, 2011
      Messages:
      56
      Likes Received:
      1
      Trophy Points:
      0
      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

       
    14. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      @cystacae
      Thank you! :)
       
    15. xsol

      xsol Member

      Joined:
      Nov 7, 2011
      Messages:
      503
      Likes Received:
      12
      Trophy Points:
      18
      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: May 10, 2012
    16. Pios

      Pios New Member

      Joined:
      Jul 1, 2010
      Messages:
      160
      Likes Received:
      1
      Trophy Points:
      0
      If you want to send us the patch and the cs, im sure we will add it to the existing project.
       
    17. in2fun

      in2fun New Member

      Joined:
      Sep 23, 2010
      Messages:
      871
      Likes Received:
      8
      Trophy Points:
      0
      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.
       
    18. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      Which spec? Log?
       
    19. Starbrox

      Starbrox Member

      Joined:
      Mar 10, 2012
      Messages:
      413
      Likes Received:
      0
      Trophy Points:
      16
      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?
       
    20. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      Post your log please :)
       

    Share This Page