• Visit Rebornbuddy
  • DefaultCombat 4.0 Consolidated Changes

    Discussion in 'Archives' started by alltrueist, Nov 6, 2015.

    1. Gualtiero

      Gualtiero New Member

      Joined:
      Jun 27, 2014
      Messages:
      51
      Likes Received:
      0
      Trophy Points:
      0
      Tried this new version.
      It does not work.
      Problem is with this line:

      Code:
      Spell.Buff("Awe", !Buddy.CommonBot.AbilityManager.CanCast("Force Sweep", Me.CurrentTarget) || !Buddy.CommonBot.AbilityManager.CanCast("Cyclone Slash", Me.CurrentTarget)),
      I see that at the top of the code you deleted

      Code:
      using Buddy.CommonBot;
      that was present in the previous version
      Without these lines the code is loaded

      If I add only the "using Buddy.CommonBot" to the code it does not work
       
      Last edited: Nov 10, 2015
    2. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Weird, as my old code pre 4.x did run:
      Code:
      using Buddy.BehaviorTree;
      using DefaultCombat.Core;
      using DefaultCombat.Helpers;
      
      namespace DefaultCombat.Routines
      {
          class Combat : RotationBase
          {
              public override string Name { get { return "Sentinel Combat"; } }
      
              public override Composite Buffs
              {
                  get
                  {
                      return new PrioritySelector(
                          Spell.Buff("Ataru Form"),
                          Spell.Buff("Force Might")
                          );
                  }
              }
      
              public override Composite Cooldowns
              {
                  get
                  {
                      return new LockSelector(
                          Spell.Buff("Resolute"),
                          Spell.Buff("Rebuke", ret => Me.HealthPercent <= 90 && !Me.HasBuff("Precision")),
                          Spell.Buff("Saber Reflect", ret => Me.HealthPercent <= 70 && !Me.HasBuff("Precision")),
      					//Spell.Buff("Awe", ret => Me.HealthPercent <= 50 && Me.Level < 60 && Targeting.CheckDPSAOE(2, Distance.MeleeAoE, Me.Position) && !Me.HasBuff("Precision")),
                          Spell.Buff("Saber Ward", ret => Me.HealthPercent <= 50 && !Me.HasBuff("Precision")),
      					//Spell.Buff("Heroic Moment: Call on the Force", ret => Me.HealthPercent <= 10 && Me.Companion != null && !Me.HasBuff("Precision")),
      					//Spell.Buff("Guarded by the Force", ret => Me.HealthPercent <= 5),
                          Spell.Buff("Valorous Call", ret => Me.BuffCount("Centering") < 5 && !Me.HasBuff("Precision")),
                          Spell.Buff("Zen", ret => Me.CurrentTarget.Distance <= 0.4f && !Me.HasBuff("Precision")),
      					Spell.Cast("Precision", ret => Me.CurrentTarget.Distance <= 0.4f && ([B]Buddy.CommonBot.AbilityManager.CanCast[/B]("Master Strike", Me.CurrentTarget) || Buddy.CommonBot.AbilityManager.CanCast("Dispatch", Me.CurrentTarget)))
                          );
                  }
              }
      
       
    3. Gualtiero

      Gualtiero New Member

      Joined:
      Jun 27, 2014
      Messages:
      51
      Likes Received:
      0
      Trophy Points:
      0
      Based on your previous post I modified the line:

      Code:
      						Spell.Buff("Awe", ret => Me.CurrentTarget.Distance <= 0.4f && (Buddy.CommonBot.AbilityManager.CanCast("Force Sweep", Me.CurrentTarget) || Buddy.CommonBot.AbilityManager.CanCast("Cyclone Slash", Me.CurrentTarget))),
      
      This way the code is loaded.
      Just added
      Code:
      ret => Me.CurrentTarget.Distance <= 0.4f
      and a parenthesis before "Buddy.Common....." followed by another parenthesis at the end.

      Don't know if the distance I copied from your previous code can do the job.

      Let me know
       
      Last edited: Nov 10, 2015
    4. Gualtiero

      Gualtiero New Member

      Joined:
      Jun 27, 2014
      Messages:
      51
      Likes Received:
      0
      Trophy Points:
      0
      Just another thing.
      If I compare your code and the default one I see that you changed some of the PrioritySelector to LockSelector.
      Can you explain me why?
      Sorry to bore you but I'm trying to understand as much as I can and your experience is invaluable to me
       
    5. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Nea im n00b myself in this code ;)
      Priorityselector is without Framelock and Lockselector WITH Framelock.
      Framelock is the currently DPS drop.
      Alltrueist was changing everything back to Prio, as Aevitas is going to implement an option to choose what you want (Framelock or not).

      Anyways, im gonna mess with you once more.
      I think we can take out the Cancast part, as my code was to check when they where NOT ready.
      BUT as soon as we are going to spam Cyclone Slash we cancel Awe.
      So in the end i think its best to just cast Awe to cancel dmg for 1-2sec.
      But ive been reading through the build on Dulfy.net, but they suggest to do more with AOE.
      There is also a building part with Zealous Strike and Twin Saber Throw.
       
    6. Gualtiero

      Gualtiero New Member

      Joined:
      Jun 27, 2014
      Messages:
      51
      Likes Received:
      0
      Trophy Points:
      0
      Anyway.......
      I'm just using your code with Twin Saber Throw addition in the main rotaion.
      I find it a very good filler.
      Probably not the best solution, but until I can find more time to study the situation I find this is a good solution.
      I have to understand where to place the Heroic moment to use it at his best.

      Code:
      // Copyright (C) 2011-2015 Bossland GmbH
      // See the file LICENSE for the source code's detailed license
      
      using Buddy.BehaviorTree;
      using DefaultCombat.Core;
      using DefaultCombat.Helpers;
      
      namespace DefaultCombat.Routines
      {
      	internal class Combat : RotationBase
      	{
      		public override string Name
      		{
      			get { return "Sentinel Combat"; }
      		}
      
      		public override Composite Buffs
      		{
      			get
      			{
      				return new PrioritySelector(
      					Spell.Buff("Ataru Form"),
      					Spell.Buff("Force Might")
      					);
      			}
      		}
      
      		public override Composite Cooldowns
      		{
      			get
      			{
      				return new LockSelector(
      					Spell.Buff("Resolute"),
      					Spell.Buff("Rebuke", ret => Me.HealthPercent <= 90),
      					Spell.Buff("Saber Reflect", ret => Me.HealthPercent <= 70),
      					Spell.Buff("Saber Ward", ret => Me.HealthPercent <= 50),
      					Spell.Buff("Force Camouflage", ret => Me.HealthPercent <= 50 && Me.HasBuff("Saber Ward")),
      					Spell.Buff("Guarded By The Force", ret => Me.HealthPercent <= 25 && Me.HasBuff("Saber Ward") || !Me.HasBuff("Force Camouflage")),
      					Spell.Buff("Heroic Moment", ret => Me.HealthPercent <= 30),
      					Spell.Buff("Valorous Call", ret => Me.BuffCount("Centering") < 5),
      					Spell.Buff("Zen", ret => Me.CurrentTarget.Distance <= 0.4f),
      					Spell.Cast("Pacify", ret => Me.CurrentTarget.StrongOrGreater() && Me.CurrentTarget.BossOrGreater())
      					);
      			}
      		}
      
      		public override Composite SingleTarget
      		{
      			get
      			{
      				return new PrioritySelector(
      					Spell.Cast("Twin Saber Throw",
      						ret => !DefaultCombat.MovementDisabled && Me.CurrentTarget.Distance >= 1f && Me.CurrentTarget.Distance <= 3f),
      					Spell.Cast("Force Leap",
      						ret => !DefaultCombat.MovementDisabled && Me.CurrentTarget.Distance >= 1f && Me.CurrentTarget.Distance <= 3f),
      
      					//Movement
      					CombatMovement.CloseDistance(Distance.Melee),
      
      					//Rotation
      					Spell.Cast("Force Kick", ret => Me.CurrentTarget.IsCasting && !DefaultCombat.MovementDisabled),
      					Spell.Cast("Force Stasis", ret => Me.CurrentTarget.IsCasting && !DefaultCombat.MovementDisabled),
      					Spell.Cast("Dispatch", ret => Me.HasBuff("Hand of Justice") || Me.CurrentTarget.HealthPercent <= 30),
      					Spell.Cast("Precision", ret => Me.CurrentTarget.Distance <= 0.4f),
      					Spell.Cast("Blade Dance", ret => Me.HasBuff("Precision")),
      					Spell.Cast("Clashing Blast", ret => Me.HasBuff("Opportune Attack") && Me.Level >= 57),
      					Spell.Cast("Blade Storm", ret => Me.HasBuff("Opportune Attack") && Me.Level < 57),
      					Spell.Cast("Blade Rush"),
      					Spell.Cast("Slash", ret => Me.ActionPoints >= 7 && Me.Level < 26),
      					Spell.Cast("Zealous Strike", ret => Me.ActionPoints <= 7),
      					Spell.Cast("Strike", ret => Me.ActionPoints <= 10),
      					Spell.Cast("Twin Saber Throw")
      					);
      			}
      		}
      
      		public override Composite AreaOfEffect
      		{
      			get
      			{
      				return new Decorator(ret => Targeting.ShouldPbaoe,
      					new LockSelector(
      						Spell.Cast("Force Sweep"),
      						Spell.Buff("Awe", ret => Me.CurrentTarget.Distance <= 3f && (Buddy.CommonBot.AbilityManager.CanCast("Force Sweep", Me.CurrentTarget) || Buddy.CommonBot.AbilityManager.CanCast("Cyclone Slash", Me.CurrentTarget))),
      						Spell.Cast("Cyclone Slash")
      						));
      			}
      		}
      	}
      }
      Everyone is welcome to suggest something about this.
      Thank you in advance
       
    7. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
    8. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
    9. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
      Word that guy also made a guide for marauders which is basically a copy paste of that sent guide im trying to code it so that it will cast ravage only when gore is fully up cause you waste it with the cast time if not so I was wondering what lines would I use to that it will cast ravage if I have the gore buff at 2.91 seconds and up? If that made sence
       
    10. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
      Also was thinking maybe a hot key for burst so if you presss "L" that will change to burst for 2 or 3 rotations?
       
    11. alltrueist

      alltrueist Active Member

      Joined:
      Dec 10, 2012
      Messages:
      1,424
      Likes Received:
      16
      Trophy Points:
      38
      Both those things are possible.

      Code:
      Spell.Cast("Ravage", ret => Me.BuffTimeLeft("Gore") >= 2910)
      If BuffTimeLeft is in MS. If it's in seconds, then 2.91 obviously.

      I don't know the exact syntax for setting hotkeys, but it's totally possible to do what you're asking.
       
    12. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
      I would also put in the build up condition in that hotkey as well so if you are low on energy it will build up before executing your bust rotation
       
    13. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Just put gore before ravage and it Will cast it right after gore is activated.
      If you get another spell between gore and ravage, you need to add a parameter that if gore is activate that ability is ignore.
      Something like ret => !Me.HasBuff("Gore")
       
    14. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
      By putting the condition of the time left you wont run into an issue where it is casting ravage on the tail end of the gore and you waste the gore window
       
    15. Bigboom

      Bigboom Member

      Joined:
      Feb 23, 2012
      Messages:
      93
      Likes Received:
      0
      Trophy Points:
      6
      Thanks man! I appreciate the work you put into this. I'm having a killer time with this bot!
       
    16. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Can you give an example in code?
       
    17. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
      Im talking about cool downs if they get off timing but im going to use this coding for my ravage
      Code:
      Spell.Cast("Ravage", ret => Me.BuffTimeLeft("Gore") >= 2.9)
      
      If I remeber right it has a 2.91 cast time of ravage
       
      Last edited: Nov 10, 2015
    18. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      True but no other stuff must be casted in the meantime, else it will never activate.
      Still good option
       
    19. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
      See the logic you have is to to cast ravage (or your sent equivalent) when ever your gore is up, say the cds during your rotation is off and your gore is on cd and you have 1 second left on the buff the logic you have says cast it anyways well the ability wont fully cast before the gore buff runs out im just saying the extra coding prevents that issue from happening because ravage is only in the rotaion if and only if you can fully complete the cast time of ravage and you have it using gore on cooldown essentially
       
    20. willz916

      willz916 Member Legendary

      Joined:
      Jan 22, 2014
      Messages:
      303
      Likes Received:
      2
      Trophy Points:
      18
      did a translation from seer to corruption so if your seer was good your corruption is good now **i cant check to see if it works cause i dont have a healer lol**
      **EDIT**
      missed some buffs
      Code:
       // Copyright (C) 2011-2015 Bossland GmbH
      // See the file LICENSE for the source code's detailed license
      
      using Buddy.BehaviorTree;
      using DefaultCombat.Core;
      using DefaultCombat.Helpers;
      
      namespace DefaultCombat.Routines
      {
      	internal class Corruption : RotationBase
      	{
      		public override string Name
      		{
      			get { return "Sorcerer Corruption"; }
      		}
      
      		public override Composite Buffs
      		{
      			get
      			{
      				return new PrioritySelector(
      					Spell.Buff("Mark of Power")
      					);
      			}
      		}
      
              public override Composite Cooldowns
              {
                  get
                  {
                      return new PrioritySelector(
                          Spell.Buff("Recklessness", ret => Targeting.ShouldAoeHeal),
                          Spell.Buff("Polarity Shift", ret => Targeting.ShouldAoeHeal),
                          Spell.Buff("Consuming Darkness", ret => NeedForce()),
                          Spell.Buff("Unnatural Preservation", ret => Me.HealthPercent <= 75)
                          );
                  }
              }
      
              public override Composite SingleTarget
              {
                  get
                  {
                      return new PrioritySelector(
                          //Movement
                          CombatMovement.CloseDistance(Distance.Ranged),
                          Spell.Cast("Mind Snap", ret => Me.CurrentTarget.IsCasting && !DefaultCombat.MovementDisabled),
                          Spell.Cast("Force Stun", ret => Me.CurrentTarget.IsCasting && !DefaultCombat.MovementDisabled),
                          Spell.Cast("Force Storm", ret => Targeting.ShouldAoe),
                          Spell.Cast("Crushing Darkness"),
                          Spell.DoT("Affliction", "Affliction"),
                          Spell.Cast("Shock"),
                          Spell.Cast("Force Lightning"),
                          Spell.Cast("Lightning Strike")
                          );
                  }
              }
      
              public override Composite AreaOfEffect
              {
                  get
                  {
                      return new PrioritySelector(
                          //Cleanse if needed
                          Spell.Cleanse("Expunge"),
      
                          //Emergency Heal (Insta-cast)
                          Spell.Heal("Dark Heal", 80, ret => Me.HasBuff("Dark Concentration")),
      
                          //Aoe Heal
                          Spell.HealGround("Revivification", ret => Targeting.ShouldAoe),
      
                          //Single Target Healing
                          Spell.Heal("Innervate", 80),
                          Spell.Heal("Static Barrier", 90,
                              ret => HealTarget != null && !HealTarget.HasDebuff("Deionized") && !HealTarget.HasBuff("Static Barrier")),
      
                          //Buff Tank
                          Spell.Heal("Static Barrier", on => Tank, 100,
                              ret => Tank != null && Tank.InCombat && !Tank.HasDebuff("Deionized") && !Tank.HasBuff("Static Barrier")),
                          Spell.Heal("Roaming Mend", on => Tank, 100, ret => Tank != null && Tank.InCombat && Me.BuffCount("Roaming Mend Charges") <= 1),
      
                          //Use Force Bending
                          new Decorator(ret => Me.HasBuff("Force Bending"),
                              new LockSelector(
                                  Spell.Heal("Innervate", 90),
                                  Spell.Heal("Dark Infusion", 50)
                                  )),
      
                          //Build Force Bending
                          Spell.HoT("Resurgence", 80),
                          Spell.HoT("Resurgence", on => Tank, 100, ret => Tank != null && Tank.InCombat),
      
                          //Single Target Healing                  
                          Spell.Heal("Dark Heal", 35),
                          Spell.Heal("Dark Infusion", 80)
                          );
                  }
              }
      
              private bool NeedForce()
              {
                  if (Me.ForcePercent <= 20)
                      return true;
                  if (Me.HasBuff("Revivification") && Me.ForcePercent < 80 && !Me.HasBuff("Reverse Corruptions"))
                      return true;
                  return false;
              }
          }
      }
      
       
      Last edited: Nov 11, 2015

    Share This Page