• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Default Combat Discussion

    Discussion in 'Combat Routines' started by Ama, Jan 5, 2015.

    1. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      I can look into that. So we would call spells by ID's and not by their name?
       
    2. james6345

      james6345 Member

      Joined:
      Apr 24, 2014
      Messages:
      160
      Likes Received:
      0
      Trophy Points:
      16
      How could we find a spell's Id? Any thing would be nice but all I can see is this thing casting pound and not a id.
       
    3. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      Yesterday I was playing around and managed to echo all the available spells for my char by Name and I see no problems getting their Name & Guid which is Id -> http://docs.buddywing.com/html/T_Buddy_Swtor_Objects_TorAbility.htm

      We can then rewrite or add a function to Spell section of DefaultRoutine to call them by Id. Should work. It can also solve the translation problems.
       
      Last edited: Jan 8, 2016
    4. alltrueist

      alltrueist Active Member

      Joined:
      Dec 10, 2012
      Messages:
      1,424
      Likes Received:
      16
      Trophy Points:
      38
      ID is always preferable, provided we have access to the IDs as routine writers. However, if we can't get IDs, name would work fine.
       
    5. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      You can get IDs. We'd just need every adv class and discipline to run some diagnostic plugin and we'd have ourselves a database of skill names with IDs. There is no other way than having that character class to output IDs.

      Here just an example for Merc
      Code:
      ...
      Name: Thermal Sensor Override ID: 147672092606
      Name: Jet Boost ID: 147672092608
      Name: Chaff Flare ID: 147672092610
      Name: Rapid Shots ID: 147672092612
      Name: Kolto Overload ID: 147672092614
      Name: Death from Above ID: 147672092616
      Name: Kolto Shot ID: 147672092628
      Name: Flame Thrower ID: 147672092630
      Name: Fusion Missile ID: 147672092638
      Name: Rocket Punch ID: 147672092640
      ...
      
      Plugin:
      Code:
      using System;
      using System.Windows;
      using Buddy.Common;
      using Buddy.CommonBot;
      using Buddy.Common.Plugins;
      using Buddy.Swtor;
      using Buddy.Swtor.Objects;
      
      namespace Buddywing.Plugins
      {
          public class Test : IPlugin
          {
              #region Implementation of IEquatable<IPlugin>
      
              /// <summary>
              /// Indicates whether the current object is equal to another object of the same type.
              /// </summary>
              /// <returns>
              /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
              /// </returns>
              /// <param name="other">An object to compare with this object.</param>
              public bool Equals(IPlugin other)
              {
                  return other.Name == Name;
              }
      
              #endregion
      
              #region Implementation of IPlugin
      
              public string Author { get { return "pindleskin"; } }
              public Version Version { get { return new Version(1, 0); } }
              public string Name { get { return "Use Test"; } }
              public string Description { get { return "Test Plugin"; } }
              public Window DisplayWindow { get { return null; } }
      
              /// <summary> Executes the pulse action. This is called every "tick" of the bot. </summary>
              public void OnPulse()
              {
              }
      
              /// <summary> Executes the initialize action. This is called at initial bot startup. (When the bot itself is started, not when Start() is called) </summary>
              public void OnInitialize()
              {
              }
      
              /// <summary> Executes the shutdown action. This is called when the bot is shutting down. (Not when Stop() is called) </summary>
              public void OnShutdown()
              {
              }
      
              /// <summary> Executes the enabled action. This is called when the user has enabled this specific plugin via the GUI. </summary>
              public void OnEnabled()
              {
      			foreach (var ability in AbilityManager.KnownAbilities)
      			{
      				Logging.Write("Name: " + ability.Name + " ID: " + ability.Guid + Environment.NewLine);
      			}
              }
      
              /// <summary> Executes the disabled action. This is called whent he user has disabled this specific plugin via the GUI. </summary>
              public void OnDisabled()
              {
              }
      
              #endregion
          }
      }
      
      
       
    6. tavi8767

      tavi8767 New Member

      Joined:
      Sep 27, 2010
      Messages:
      76
      Likes Received:
      0
      Trophy Points:
      0
      Hi Markeen. I will do some testing and join that group. My problem right now is the Combat Medic routine doesn't even load. It doesn't find an advanced class. I am at work right now but I will post a log later showing it not loading the advanced class.
       
    7. Teo

      Teo Member

      Joined:
      Oct 6, 2012
      Messages:
      35
      Likes Received:
      1
      Trophy Points:
      8
      pindleskin the plugin looks great, but for proper interrupt wouldnt we need the ids of the spells being cast by the NPCs, because if I understand correctly you are showing a list of all known spells by the player?
       
    8. Markeen

      Markeen Member

      Joined:
      Oct 14, 2012
      Messages:
      153
      Likes Received:
      3
      Trophy Points:
      18
      Probably because the routine wasn't updated for a very long time, it looks like a a copy paste from PureSwtor.
       
    9. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      Yeah I thought we need this for ourselves?

      then
      Code:
      BuddyTor.Me.CurrentTaget.KnownAbilitiesContainer
      instead of
      Code:
      AbilityManager.KnownAbilities
      or find it here for example by name -> http://swtor.jedipedia.net/en/npc/white-maw-trapper
       
      Last edited: Jan 8, 2016
    10. alltrueist

      alltrueist Active Member

      Joined:
      Dec 10, 2012
      Messages:
      1,424
      Likes Received:
      16
      Trophy Points:
      38
      What we need to do is create a new .cs file in DefaultCombat named "Spell Book". In that file we'll have it set up like
      Code:
      class Spell_Book
          {
              public const int
      
              #region [Jedi Guardian]
                  spellWardingStrike = 12345,
              #endregion
      
              #region [Jedi Consular]
                  spellProject = 54321,
              #endregion
          }
      et cetera for everything. We can keep adding to it. Someone else will need to do it, my git version is fucked up and I haven't had time to fix it.
       
    11. alltrueist

      alltrueist Active Member

      Joined:
      Dec 10, 2012
      Messages:
      1,424
      Likes Received:
      16
      Trophy Points:
      38
      Here's a mock-up I did using pindleskin's information. We can't use int's because the numbers aren't 64-bit, so I had to use long's instead.

      Code:
      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using System.Threading.Tasks;
      
      namespace DefaultCombat.Helpers
      {
          class SpellBook
          {
              public const long
      
              #region [Mercenary]
                  spellThermalSensorOverride = 147672092606,
                  spellJetBoost = 147672092608,
                  spellChaffFlare = 147672092610,
                  spellRapidShots = 147672092612,
                  spellKoltoOverload = 147672092614,
                  spellDFA = 147672092616,
                  spellKoltoShot = 147672092628,
                  spellFlameThrower = 147672092630,
                  spellFusionMissile = 147672092638,
                  spellRocketPunch = 147672092640;
              #endregion
          }
      }
      
       
    12. mtown

      mtown New Member

      Joined:
      Mar 17, 2014
      Messages:
      9
      Likes Received:
      0
      Trophy Points:
      0
      Having Issues with routines for trooper here is the log. Should be a Vanguard Shield Specialist. But for some reason its saying Can not be Determined

      2016-01-09 03:58:13,222 [1] INFO Log - Starting Buddy Wing v1.0.1252.800
      2016-01-09 03:59:15,754 [3] INFO Log - Logging in...
      2016-01-09 03:59:17,056 [3] INFO Log - T: 5247565105989897645 H: 2243719007
      2016-01-09 03:59:17,081 [3] INFO Log - Login Success!
      2016-01-09 03:59:20,347 [6] INFO Log - First CPU: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
      2016-01-09 03:59:20,348 [6] INFO Log - OS Version: Windows NT 6.2.9200.0
      2016-01-09 03:59:20,349 [6] INFO Log - App Path: C:\Users\Downloads\BuddyWing 1.0.1252.800\Buddywing.exe
      2016-01-09 03:59:29,098 [6] INFO Log - User is a Trooper
      2016-01-09 03:59:30,402 [6] INFO Log - Advanced Class: Vanguard / Discipline: CanNotBeDetermined
      2016-01-09 03:59:30,403 [6] INFO Log - Routine Path: Routines
      2016-01-09 03:59:36,615 [6] INFO Log - Medpac Created!
      2016-01-09 03:59:36,696 [6] INFO Log - [DefaultCombat] Level: 12
      2016-01-09 03:59:36,698 [6] INFO Log - [DefaultCombat] Class: Trooper
      2016-01-09 03:59:36,698 [6] INFO Log - [DefaultCombat] Advanced Class: Vanguard
      2016-01-09 03:59:36,728 [6] INFO Log - [DefaultCombat] Discipline: CanNotBeDetermined
      2016-01-09 03:59:36,783 [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 c:\Users\Downloads\BuddyWing 1.0.1252.800\Routines\DefaultCombat\Core\RotationFactory.cs:line 54
      at DefaultCombat.DefaultCombat.Initialize() in c:\Users\Downloads\BuddyWing 1.0.1252.800\Routines\DefaultCombat\DefaultCombat.cs:line 69
      at Buddy.CommonBot.RoutineManager.set_Current(ICombat value)
      at Buddy.CommonBot.BotMain.SetCurrentCombatRoutine()
      at Buddywing.MainWindow.?????????????????????????????????????????()
      2016-01-09 03:59:36,821 [6] INFO Log - Buddy Wing: The Old Robot is ready!
      2016-01-09 04:04:51,538 [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 )
      2016-01-09 04:04:55,783 [1] INFO Log - Current bot set to Quest Bot
      2016-01-09 04:04:55,818 [1] INFO Log - Loaded profile [R - Light] 1-10 Trooper and Smuggler - Ord Mantell [Kick]
      2016-01-09 04:04:58,797 [1] INFO Log - Forcing profile reload. -- Temporary fix for behavior cache issues during start/stop.
      2016-01-09 04:04:59,193 [1] INFO Log - Current bot set to Quest Bot
      2016-01-09 04:04:59,197 [1] INFO Log - Loaded profile [R - Light] 1-10 Trooper and Smuggler - Ord Mantell [Kick]
      2016-01-09 04:05:00,379 [Main Bot Thread] ERROR Log - TorNpc.Name Exception
      System.Exception: Function GetName does not exist.
      at ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????[](Boolean , String , Object[] )
      at Buddy.Swtor.Objects.TorObject.CallScript[T](Boolean hasReturnValue, String function, Object[] args)
      at Buddy.Swtor.Objects.TorNpc.get_Name()
      2016-01-09 04:05:00,401 [Main Bot Thread] INFO Log - [Poi.Clear] Reason: Current quest behavior changed to PickupQuestTag: ObjectName: Corporal Dregg, X: -26.3844, Y: 2.823806, Z: -27.7099, Position: <-26.3844, 2.823806, -27.7099>, Type: Npc, ProfileUseRange: 5, ProfileSearchRadius: 5, SearchRadius: 0.5, WaitTime: 1, IgnoreLOS: False, UseRange: 0.5, Object: null, QuestId: 16140942117854255232, BranchId: 0, StepId: 0, TaskId: 0, QuestName: Republic Roulette: Questionable Ethics, IsDoneCache: False, Behavior: Buddy.BehaviorTree.PrioritySelector, .
      2016-01-09 04:05:00,654 [Main Bot Thread] ERROR Log - TorNpc.Name Exception
      System.Exception: Function GetName does not exist.
      at ?????????????????????????????????????????.?????????????????????????????????????????.?????????????????????????????????????????[](Boolean , String , Object[] )
      at Buddy.Swtor.Objects.TorObject.CallScript[T](Boolean hasReturnValue, String function, Object[] args)
      at Buddy.Swtor.Objects.TorNpc.get_Name()
      2016-01-09 04:05:06,540 [1] INFO Log - Reason:
      2016-01-09 04:05:06,581 [Main Bot Thread] INFO Log - Bot Thread Ended. Was this requested?
      2016-01-09 04:05:08,647 [1] INFO Log - We slept way too long waiting for the bot thread to give control back. Aborting thread. Client may crash!
      2016-01-09 04:05:08,648 [1] INFO Log - [Poi.Clear] Reason: Bot Stopped
       
    13. Markeen

      Markeen Member

      Joined:
      Oct 14, 2012
      Messages:
      153
      Likes Received:
      3
      Trophy Points:
      18
    14. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      weird. in the docs its UInt64 for that id. BTW why do we need this Ids? It will be hard to edit the rotations with all those numbers :) very confusing since every spell has a decent name.
       
      Last edited: Jan 9, 2016
    15. alltrueist

      alltrueist Active Member

      Joined:
      Dec 10, 2012
      Messages:
      1,424
      Likes Received:
      16
      Trophy Points:
      38
      Numbers are universal, which would allow people to use the routine in other languages. It would also prevent stupid shit like when I misspelled "missile" in the Merc rotations for like a month. You wouldn't use the numbers outside of the spell book, that's the point. You'd call a spell like:
      Code:
      Spell.Cast(SB.spellDFA)
      And the bot would use the spell book to cast spellID 147672092616=
       
    16. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      seams reasonable yes :)
       
    17. alltrueist

      alltrueist Active Member

      Joined:
      Dec 10, 2012
      Messages:
      1,424
      Likes Received:
      16
      Trophy Points:
      38
      It could also make tracking auras 1000% easier, since they like to change the name of DoTs every patch it seems. Not sure if we can get auras using your plugin though
       
    18. pindleskin

      pindleskin Community Developer

      Joined:
      Oct 24, 2012
      Messages:
      1,124
      Likes Received:
      2
      Trophy Points:
      38
      I can modify it to detect our buffs/debuffs or current target's. Let me know if you need anything more for making this routine better...
       
    19. alltrueist

      alltrueist Active Member

      Joined:
      Dec 10, 2012
      Messages:
      1,424
      Likes Received:
      16
      Trophy Points:
      38
      We'd need both our buffs and target's debuffs. That way we can start building a massive spellbook with spells, buffs, and debuffs. When an entry changes, we'd just need to update the spellbook instead of each entry for each spec.

      This will be a massive undertaking though.
       
    20. logon1

      logon1 New Member

      Joined:
      Oct 26, 2015
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0
      The sentinal aoe spec is not using its aoe abilities.
       

    Share This Page