• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [BETA] BuddyWing for 4.01a

    Discussion in 'Buddy Wing Forum' started by Aevitas, Nov 5, 2015.

    1. Cass

      Cass New Member

      Joined:
      Jan 24, 2014
      Messages:
      98
      Likes Received:
      2
      Trophy Points:
      0
      Hello there

      Tried using both Spell.GetCooldown and Ability.Cooldown and BW wont recognize the routine on bot start and wont compile it.

      Any clues?

      edit: tried using AbilityManager.KnownAbilities(a => a.Name.Contains("Shiv")).CooldownTime > 1.5 too as conditional but cant compile it ether (didnt put on miliseconds since on this case the value its on seconds, miliseconds its on the getspellcooldown on spell.cs
       
      Last edited: Nov 8, 2015
    2. ludijak559

      ludijak559 Member

      Joined:
      Nov 23, 2012
      Messages:
      273
      Likes Received:
      2
      Trophy Points:
      18
      Btw a random question, whats up with credits in the game, GPH for all grind is nerfed to the ground, but the price for creds is droping. Is there maybe some new exploit out, or the demind is down or any1 has any idea ?
       
    3. steadygrind

      steadygrind Member

      Joined:
      Jan 29, 2015
      Messages:
      63
      Likes Received:
      1
      Trophy Points:
      8
      OK got merc IO to 2600+ DPS deleted rail shot from rotation and added mag shot and power shot to fire with instant activiate boffs

      Code:
       
      using Buddy.BehaviorTree;
      using DefaultCombat.Core;
      using DefaultCombat.Helpers;
      
      namespace DefaultCombat.Routines
      {
      	public class InnovativeOrdnance : RotationBase
      	{
      		public override string Name
      		{
      			get { return "Mercenary Innovative Ordnance"; }
      		}
      
      		public override Composite Buffs
      		{
      			get
      			{
      				return new PrioritySelector(
      					Spell.Buff("Combustible Gas Cylinder"),
      					Spell.Buff("Hunter's Boon")
      					);
      			}
      		}
      
      		public override Composite Cooldowns
      		{
      			get
      			{
      				return new PrioritySelector(
      					Spell.Buff("Determination", ret => Me.IsStunned),
      					Spell.Buff("Vent Heat", ret => Me.ResourcePercent() >= 50),
      					Spell.Buff("Energy Shield", ret => Me.HealthPercent <= 50),
      					Spell.Buff("Kolto Overload", ret => Me.HealthPercent <= 30)
      					);
      			}
      		}
      
      		public override Composite SingleTarget
      		{
      			get
      			{
      				return new LockSelector(
      
      					//Movement
      					CombatMovement.CloseDistance(Distance.Ranged),
      					new Decorator(ret => Me.ResourcePercent() > 40,
      						new PrioritySelector(
      							Spell.Cast("Rapid Shots")
      							)),
      
      					//Rotation
      					Spell.Cast("Disabling Shot",
      						ret =>
      							Me.CurrentTarget.IsCasting && Me.CurrentTarget.Distance <= Distance.Melee && !DefaultCombat.MovementDisabled),
      					Spell.DoT("Incendiary Missile", "", 12000),
      					Spell.Cast("Thermal Detonator"),
      					Spell.Cast("Electro Net"),
                                              Spell.Cast("Unload"),
      					Spell.Cast("Power Shot", ret => Me.HasBuff("Speed to Burn")),
                                              Spell.Cast("Mag Shot", ret => Me.HasBuff("Innovative Particle Accelerator")),
                                              Spell.Cast("Rapid Shots")
      					);
      			}
      		}
      
      		public override Composite AreaOfEffect
      		{
      			get
      			{
      				return new Decorator(ret => Targeting.ShouldAoe,
      					new PrioritySelector(
      						Spell.CastOnGround("Death from Above"),
      						Spell.Cast("Fusion Missle", ret => Me.HasBuff("Thermal Sensor Override")),
      						Spell.Cast("Explosive Dart"))
      					);
      			}
      		}
      	}
      }
      
       
    4. willz916

      willz916 Member Legendary

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


      i think you posted this in the wrong spot
       
    5. ruy.pimentel

      ruy.pimentel New Member

      Joined:
      Oct 10, 2012
      Messages:
      22
      Likes Received:
      0
      Trophy Points:
      1
      My Powertech is not playing the routine because it can't detect Shield Tech Discipline. Logs below:

      Code:
      2015-11-09 10:30:02,741 [1] INFO  Log - Starting Buddy Wing v1.0.1247.784
      2015-11-09 10:33:17,954 [3] INFO  Log - Logging in...
      2015-11-09 10:33:19,681 [3] INFO  Log - T: 5247512638407649506 H: 1849662223
      2015-11-09 10:33:19,683 [3] INFO  Log - Login Success!
      2015-11-09 10:33:20,787 [6] INFO  Log - First CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
      2015-11-09 10:33:20,788 [6] INFO  Log - OS Version: Windows NT 6.2.9200.0
      2015-11-09 10:33:20,789 [6] INFO  Log - App Path: D:\Buddy\Buddywing.exe
      2015-11-09 10:33:25,299 [6] INFO  Log - User is a BountyHunter
      2015-11-09 10:33:26,608 [6] INFO  Log - Advanced Class: Powertech / Discipline: CanNotBeDetermined
      2015-11-09 10:33:26,608 [6] INFO  Log - Routine Path: Routines
      2015-11-09 10:33:29,023 [6] INFO  Log - Medpac  Created!
      2015-11-09 10:33:30,881 [6] INFO  Log - [DefaultCombat] Level: 60
      2015-11-09 10:33:30,882 [6] INFO  Log - [DefaultCombat] Class: BountyHunter
      2015-11-09 10:33:30,883 [6] INFO  Log - [DefaultCombat] Advanced Class: Powertech
      2015-11-09 10:33:30,902 [6] INFO  Log - [DefaultCombat] Discipline: CanNotBeDetermined
      2015-11-09 10:33:30,922 [6] ERROR Log - Unhandled exception during init:
      System.ArgumentNullException: Value cannot be null.
      Parameter name: type
         at System.Activator.CreateInstance(Type type, Boolean nonPublic)
         at System.Activator.CreateInstance(Type type)
         at DefaultCombat.Core.RotationFactory.Build(String name) in d:\Buddy\Routines\DefaultCombat\Core\RotationFactory.cs:line 54
         at DefaultCombat.DefaultCombat.Initialize() in d:\Buddy\Routines\DefaultCombat\DefaultCombat.cs:line 69
         at Buddy.CommonBot.RoutineManager.set_Current(ICombat value)
         at Buddy.CommonBot.BotMain.SetCurrentCombatRoutine()
         at Buddywing.MainWindow.?????????????????????????????????????????()
      2015-11-09 10:33:30,923 [6] INFO  Log - Buddy Wing: The Old Robot is ready!
      2015-11-09 10:33:37,915 [1] ERROR Log - System.Exception: There is no profile loaded. Please load a profile before starting the bot.
         at Buddy.CommonBot.BotMain.Start()
         at Buddywing.MainWindow.?????????????????????????????????????????(Object , RoutedEventArgs )
      2015-11-09 10:33:50,649 [1] INFO  Log - Current bot set to Grind Bot
      2015-11-09 10:33:50,653 [1] INFO  Log - Loaded profile Ilum Pub Grind
      2015-11-09 10:33:51,763 [1] INFO  Log - Forcing profile reload. -- Temporary fix for behavior cache issues during start/stop.
      2015-11-09 10:33:51,889 [1] INFO  Log - Current bot set to Grind Bot
      2015-11-09 10:33:51,891 [1] INFO  Log - Loaded profile Ilum Pub Grind
      2015-11-09 10:33:59,832 [Main Bot Thread] ERROR Log - Engine class is null, TorObject may no longer be valid!
      2015-11-09 10:34:04,507 [Main Bot Thread] ERROR Log - System.Exception: Function GetHealth does not exist.
         at ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????[](Boolean , String , Object[] )
         at Buddy.Swtor.Objects.TorObject.CallScript[T](Boolean hasReturnValue, String function, Object[] args)
         at Buddy.Swtor.Objects.TorCharacter.get_Health()
         at Buddy.Swtor.Objects.TorCharacter.get_IsDead()
         at Buddy.Swtor.Objects.TorNpc.get_IsLootable()
         at Buddy.CommonBot.DefaultLootTargetingProvider.?????????????????????????????????????????.?????????????????????????????????????????(TorNpc )
         at System.Linq.Enumerable.<>c__DisplayClass0`1.<CombinePredicates>b__1(TSource x)
         at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
         at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         at Buddy.CommonBot.DefaultLootTargetingProvider.GetObjectsByWeight()
         at Buddy.CommonBot.Targeting.Pulse()
         at Buddy.CommonBot.Logic.BrainBehavior.?????????????????????????????????????????()
      2015-11-09 10:34:15,847 [Main Bot Thread] ERROR Log - Engine class is null, TorObject may no longer be valid!
      2015-11-09 10:34:15,849 [Main Bot Thread] ERROR Log - Engine class is null, TorObject may no longer be valid!
      2015-11-09 10:34:15,849 [Main Bot Thread] ERROR Log - System.Exception: DbOffset is Zero.
       
      Last edited by a moderator: Nov 9, 2015
    6. Aevitas

      Aevitas Well-Known Member Staff Member Buddy Core Dev

      Joined:
      Mar 2, 2010
      Messages:
      2,307
      Likes Received:
      36
      Trophy Points:
      48
      We'll be looking into that one, thanks for reporting.
       
    7. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
    8. Ama

      Ama New Member

      Joined:
      Jun 6, 2011
      Messages:
      1,171
      Likes Received:
      33
      Trophy Points:
      0

      Try pasting this at the somewhere towards the beginning on DefaultCombat.cs. Try it a few times when loading the bot and check for the spell name and the guid. If the guid is the same everytime, it would be a better.

      PHP:
      foreach(TorAbility a in AbilityManager.KnownAbilities)
      {
                  
      Logger.Write(a.Guid "\t" a.Name "\t" a.CooldownTime);
      }
      Then you just use one of the various ways to get the ability from the list
      PHP:
      AbilityManager.KnownAbilities.Find(=> a.Guid == SomeGUID));
       
    9. Ama

      Ama New Member

      Joined:
      Jun 6, 2011
      Messages:
      1,171
      Likes Received:
      33
      Trophy Points:
      0
      if you get a chance, these have been hardcoded in for quite a while.

      PHP:
      public RotationBase Build(string name)
              {
                  
      //Set the basic class as the rotation if char has no advanced class
                  
      if (BuddyTor.Me.AdvancedClass == AdvancedClass.None)
                  {
                      
      name BuddyTor.Me.CharacterClass.ToString();
                  }

                  if (
      name == "Rage" && BuddyTor.Me.AdvancedClass == AdvancedClass.Marauder)
                  {
                      
      name "Fury";
                  }

                  if (
      name == "Focus" && BuddyTor.Me.AdvancedClass == AdvancedClass.Sentinel)
                  {
                      
      name "Concentration";
                  }

                  if (
      name == "DirtyFighting" && BuddyTor.Me.AdvancedClass == AdvancedClass.Scoundrel)
                  {
                      
      name "Ruffian";
                  }

                  if (
      name == "Balance" && BuddyTor.Me.AdvancedClass == AdvancedClass.Shadow)
                  {
                      
      name "Serenity";
                  }

                  if (
      name == "CombatMedic" && BuddyTor.Me.AdvancedClass == AdvancedClass.Mercenary)
                  {
                      
      name "Bodyguard";
                  }

                  if (
      name == "Firebug" && BuddyTor.Me.AdvancedClass == AdvancedClass.Powertech)
                  {
                      
      name "Pyrotech";
                  }

                  var 
      ns "DefaultCombat.Routines";
                  var 
      assembly Assembly.GetExecutingAssembly();
                  var 
      type assembly.GetType(ns "." name);
                  var 
      instance Activator.CreateInstance(type);
                  return (
      RotationBaseinstance;
              }
       
    10. Cass

      Cass New Member

      Joined:
      Jan 24, 2014
      Messages:
      98
      Likes Received:
      2
      Trophy Points:
      0
      I guess the problems lies within Abilitymanager itself. I tried to paste the code on several parts of defaultcombat.cs and the bot wont compile it.

      For example

      PHP:
      public override void Initialize()
              {
                  
      Logger.Write("Level: " BuddyTor.Me.Level);
                  
      Logger.Write("Class: " + Class);
                  
      Logger.Write("Advanced Class: " BuddyTor.Me.AdvancedClass);
                  
      Logger.Write("Discipline: " BuddyTor.Me.Discipline);
                  
                  foreach(
      TorAbility a in AbilityManager.KnownAbilities
                  { 
                  
      Logger.Write(a.Guid "\t" a.Name "\t" a.CooldownTime); 
                  }
                  
                  var 
      = new RotationFactory();
                  var 
      f.Build(BuddyTor.Me.Discipline.ToString());

                  
      CombatHotkeys.Initialize();

                  if (
      == null)
                      
      f.Build(BuddyTor.Me.CharacterClass.ToString());
       
    11. Aevitas

      Aevitas Well-Known Member Staff Member Buddy Core Dev

      Joined:
      Mar 2, 2010
      Messages:
      2,307
      Likes Received:
      36
      Trophy Points:
      48
      Yeah, because their ability nodes aren't unique - they were wrongly detected by the bot for quite a while. This is, believe it or not, the most reliable way of detecting those specs.
       
    12. 056

      056 New Member

      Joined:
      May 21, 2014
      Messages:
      67
      Likes Received:
      1
      Trophy Points:
      0
      Two questions:

      How do I get the bot to do a rotation without being in combat? I was able to get this to work with the old pure rotations.

      There was discussion in either this thread or in one of the default combat threads about "burst" rotations. How can the bot check to see if an ability is on cooldown to manage energy for burst? i.e. spend the entire energy bar on burst. Hit energy CD and then do a more conservative energy rotation. I know this isn't the main goal of the bot, but it's difficult to make raid viable rotations without that ability.
       
    13. Ama

      Ama New Member

      Joined:
      Jun 6, 2011
      Messages:
      1,171
      Likes Received:
      33
      Trophy Points:
      0
      you may need to also put these at the top
      PHP:
      using Buddy.CommonBot;
      using Buddy.Swtor.Objects;
      If you are still having trouble, you can send me your code you are trying to get working in a PM
       
    14. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Can anyone enlighten me more on the new Sequence part?
      Doesnt this do the same as priority?
      When the first spell is casted, doesnt it 'restart' and start from top again?
      Or when it has parameters, does it do everything inside and then restart?

      am i correct by doing this?
      Code:
      return new Sequence(ret => Me.Actionpoints >9,
         new Action(ret => SpellManager.Cast("Precision"),
         new Action(ret => SpellManager.Cast("Blade Dance"),
         new Action(ret => SpellManager.Cast("Clashing Blast"),
      );
      But if i use this, how can i give another parameter to Clashing Blast to only fire when Me.HasBuff("Opportune Attack")?

      Also can we make the routine more aware of the GCD?
      When im doing a check if ability is ready and its on GCD, it will ignore that spell and goes further down the list, althow it should be casted, just 1sec later :)
       
    15. Aevitas

      Aevitas Well-Known Member Staff Member Buddy Core Dev

      Joined:
      Mar 2, 2010
      Messages:
      2,307
      Likes Received:
      36
      Trophy Points:
      48
      https://github.com/aevitas/treesharp/blob/master/TreeSharp/Sequence.cs

      No, you'll want to use a Sequence nested inside a Decorator if you want to execute the sequence conditionally.
       
    16. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Thanks for the reply, so basically im looking at this then?
      Code:
      return new Decorator(ret => Me.Actionpoints > 9,
      	new Sequence(
      		new Action(ret => SpellManager.Cast("Precision"),
      		new Action(ret => SpellManager.Cast("Blade Dance"),
      		[B]new Action(ret => SpellManager.Cast("Clashing Blast"),[/B]
      	));
      
      But how can i give Clashing Blast extra parameters inside this sequence?
      Code:
      new Action(ret => SpellManager.Cast("Clashing Blast", ret => Me.HasBuff("Opportune Attack")),
      
      Dont think this is correct...
       
    17. Aevitas

      Aevitas Well-Known Member Staff Member Buddy Core Dev

      Joined:
      Mar 2, 2010
      Messages:
      2,307
      Likes Received:
      36
      Trophy Points:
      48
      DefaultCombat comes with a ton of spell wrappers for this, have a look at the public static Composite Cast(string spell, Selection<bool> reqs = null) overload in https://github.com/BosslandGmbH/Bud...blob/master/trunk/DefaultCombat/Core/Spell.cs
       
    18. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      What does Me.Actionpoints do? :)
       
    19. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      Its your resource bar (ie Mana bar or Ragebar)
       
    20. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      So what does it mean Me.Actionpoints > 9 ? If your resource is above 90% ?
       

    Share This Page