• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Agility

    Discussion in 'Botbases' started by Deathdisguise, May 19, 2015.

    1. kenshio

      kenshio New Member

      Joined:
      Oct 16, 2015
      Messages:
      7
      Likes Received:
      0
      Trophy Points:
      1
    2. Flitsbue

      Flitsbue Member

      Joined:
      Jan 2, 2013
      Messages:
      31
      Likes Received:
      1
      Trophy Points:
      6
      Hey Deathdisguise.

      I changed a few things in the default.warrior routine, cause of savage strike interrupting the rampage cast.
      only tested it once, but I think its working a lot better. http://pastebin.com/Mvq1TKgg

      I changed;

      -moving rampage up, so it has a higher priority.

      -changed minimum resource use to 250 at T8. This seemed to be where the issue were. if you dropped below 500 before the third or fourth hit, you would cast Savage strike or some other filler.
      You will still cast most of the hit above 500 energy, 95% of the time, so think this solution is justified.

      -moved down Savage strike above tremor (maybe below since you want to prioritize tremor over savage strike due to the long animation of Savage Strike)

      - changed the value on (SpellController.Cooldown("Rampage") > 3250) to 250 instead of 3250 for both Tremor and Savage Strike. You want to use it on cooldown if rampage and WW is on cooldown, rather than casting Relentless strike, in my opinion. (but maybe that's because I am using both Savage Strike and Tremor)

      Hope you can use the changes or test them yourself to see if its done correctly.

      Best regard /flitsbue
       
      Last edited: Nov 1, 2015
    3. Cardsmall

      Cardsmall Member

      Joined:
      Oct 7, 2010
      Messages:
      103
      Likes Received:
      0
      Trophy Points:
      16
      [Compiler Error] d:\Downloads\Wildbuddy 1.1.604.3\Bots\Agility\Routines\Stalker\Stalker_Drop6.cs(8,11) : error CS0535: 'Agility.Routines.Stalker_Drop6' does not implement interface member 'Agility.Routines.IAgilityRoutine.Class'

      Getting this error when trying to use a user submitted profile from a few pages back. Anyway I can fix this?
       
    4. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0

      Awesome! I'll look over these changes and adapt them to the routine!

      Add the class line in that you'll be able to find on the other routine files!
       
    5. Cardsmall

      Cardsmall Member

      Joined:
      Oct 7, 2010
      Messages:
      103
      Likes Received:
      0
      Trophy Points:
      16
      Add the class line in that you'll be able to find on the other routine files![/QUOTE]

      Yeah, I'm retarded with this stuff. I looked between the default stalker and the drop6 stalker and couldn't see what I need to match. Did something change that broke this profile? Attached is the profile I'm using.

      View attachment Stalker_Drop6.cs
       
    6. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Every routine now has a field that determines the class the routine is meant for (for a future revision to Agility)

      You'll need to add the following:
      Code:
      public Class Class { get { return Class.Stalker; } }
      
       
    7. Cardsmall

      Cardsmall Member

      Joined:
      Oct 7, 2010
      Messages:
      103
      Likes Received:
      0
      Trophy Points:
      16
      Thanks for your help DD and quick reply. Got it working
       
    8. SimplyEternal

      SimplyEternal New Member

      Joined:
      Jan 14, 2013
      Messages:
      22
      Likes Received:
      0
      Trophy Points:
      0
      Hey DD.

      Is there no way to get party member values/targeting yet? I've been looking for days, but I can't find anywhere that lets me pull HP values of party members, or even target them.

      I'm probably just being blind.
       
    9. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      There's a GUID based implementation in the Default Combat Routine you can look at for collecting your party members into a collection! But until previewing telegraphs are implemented, I won't bother including anything in SpellController for it. (The same reason why I'm not implementing healing/auto-stuns right now) =(

      Basically, once you find and collect your party members, you can just cast them as Player objects and use the fields like HealthPercent, Targer() or CurrentTarget, etc!
       
    10. kenshio

      kenshio New Member

      Joined:
      Oct 16, 2015
      Messages:
      7
      Likes Received:
      0
      Trophy Points:
      1
      DD, how can I get this routine to work with agility. I took it from guy90210 spellslinger routine

      Code:
      using Buddy.Wildstar.Game;
      using Buddy.Wildstar.Game.Actors;
      using log4net;
      using System;
      
      namespace Agility.Routines
      {
          class Spellslinger_flawd : IAgilityRoutine
          {
              private static ILog Log = LogManager.GetLogger("Agility [SpellController]");
      
              public string Name { get { return "Sling Ding"; } }
              public string Version { get { return "0.1"; } }
              public string Author { get { return "flawd"; } }
      
              private Player Me { get { return GameManager.LocalPlayer; } }
              private Actor Target { get { return GameManager.LocalPlayer.CurrentTarget; } }
      
              public string Routine()
              {
                  // Log current Spell Surge and Spell Power state
                  string msg = ">>[DEBUG]: ";
                  msg = msg + string.Format("SS: [{0}] SP: [{1}] ", Me.HasBuff("Spell Surge"), Me.SpellPower);
      
      
                  // If player can Flame Burst
                  if (SpellController.CanCast("Flame Burst"))
                  {
                      Log.Info(msg + ">> Flame Burst!");
                      return "Flame Burst";
                  }
      
                  // If player is currently casting
                  if (Me.IsCasting)
                  {
                      msg = msg + string.Format(">> Casting : [{0}] C#: [{1}] ", Me.CurrentCast.Name, SpellController.CastBar.CurrentThresshold);
      
                      // Charge Shot: charge up to 3
                      if (Me.CurrentCast.Name == "Charged Shot")
                      {
                          if (SpellController.CastBar.CurrentThresshold != 3)
                          {
                              Log.Info(msg + ">> Waiting for charge up!");
                              return null;
                          }
                          else
                          {
                              Log.Info(msg + ">> Fire!");
                              return "Charged Shot";
                          }
                      }
      
                      // True Shot: Spam it! Maybe some timing later?
                      if (Me.CurrentCast.Name == "True Shot")
                      {
                          Log.Info(msg + ">> Fire!");
                          return "True Shot";
                      }
      
                      // True Shot: Spam it! Maybe some timing later?
                      if (Me.CurrentCast.Name == "Rapid Fire")
                      {
                          Log.Info(msg + ">> Fire!");
                          return "Rapid Fire";
                      }
      
                      //Weird Surge issue needs looking into.
                      //Log.Info(MSG + ">> Wait for Cast!"); 
                      //return null;
      
                  }
      
                  // Pull with Charged Shot
                  if (SpellController.CanCast("Charged Shot") && !Me.IsInCombat)
                  {
                      Log.Info(msg + ">> Pull with charged shot");
                      return "Charged Shot";
                  }
      
                  // If currently Surged
                  if (Me.HasBuff("Spell Surge"))
                  {
                      msg = msg + ">> Spell Surged: ";
      
                      // IF Surged and need non surged Ignite drop
      
                      if (SpellController.CanCast("Ignite") && IgniteDue(0))
                      {
                          Log.Info(msg + ">> Unsurge for normal Ignite!");
                          return "Spell Surge";
                      }
      
                      if (SpellController.CanCast("Ignite") && Me.SpellPower > 25 && IgniteDue(1))
                      {
                          Log.Info(msg + ">> Ignite!");
                          return "Ignite";
                      }
      
                      if (SpellController.CanCast("True Shot") && Me.SpellPower > 25) //18
                      {
                          Log.Info(msg + ">> True Shot");
                          return "True Shot";
                      }
      
                      if (SpellController.CanCast("Arcane Missiles") && Me.SpellPower > 25) //18
                      {
                          Log.Info(msg + ">> Arcane Missiles");
                          return "Arcane Missiles";
                      }
      
                      if (SpellController.CanCast("Wild Barrage") && Me.SpellPower > 25) //12
                      {
                          Log.Info(msg + ">> Wild Barrage!");
                          return "Wild Barrage";
                      }
      
                      if (SpellController.CanCast("Charged Shot") && Me.SpellPower > 25) //10
                      {
                          Log.Info(msg + ">> Charged Shot!");
                          return "Charged Shot";
                      }
      
                      if (SpellController.CanCast("Rapid Fire") && Me.SpellPower > 25) //10
                      {
                          Log.Info(msg + ">> Rapid Fire!");
                          return "Rapid Fire";
                      }
      
                      if (SpellController.CanCast("Chill") && Me.SpellPower > 25) // 7
                      {
                          Log.Info(msg + ">> Chill!");
                          return "Chill";
                      }
      
                      if (SpellController.CanCast("Quick Draw") && Me.SpellPower > 40)
                      {
                          Log.Info(msg + ">> Quick Draw!");
                          return "Quick Draw";
                      }
                      if (SafeToSurge())
                      {
                          Log.Info(msg + ">> Unsurge!");
                          return "Spell Surge";
                      }
                  }
                  else
                  {
                      msg = msg + "||Not Surged: ";
      
                      // In Before Surge Check: Is normal ignite needed?
      
                      if (SpellController.CanCast("Ignite") && IgniteDue(0))
                      {
                          Log.Info(msg + ">> Normal Ignite!");
                          return "Ignite";
                      }
      
                      if (SafeToSurge() &&
                          (SpellController.CanCast("Quick Draw") && Me.SpellPower > 40) ||
                          (SpellController.CanCast("Charged Shot") && Me.SpellPower > 25) ||
                          (SpellController.CanCast("Ignite") && Me.SpellPower > 25 && IgniteDue(1)) ||
                          (SpellController.CanCast("Wild Barrage") && Me.SpellPower > 25) ||
                          (SpellController.CanCast("Chill") && Me.SpellPower > 25) ||
                          (SpellController.CanCast("Rapid Fire") && Me.SpellPower > 25) ||
                          (SpellController.CanCast("True Shot") && Me.SpellPower > 25) ||
                          (SpellController.CanCast("Arcane Missiles") && Me.SpellPower > 25)
                          )
                      {
                          Log.Info(msg + ">> Surge!");
                          return "Spell Surge";
                      }
      
                      if (SpellController.CanCast("Flash Freeze")) //30
                      {
                          Log.Info(msg + ">> Flash Freeze!");
                          return "Flash Freeze";
                      }
      
                      if (SpellController.CanCast("True Shot")) //18
                      {
                          Log.Info(msg + ">> True Shot");
                          return "True Shot";
                      }
      
                      if (SpellController.CanCast("Arcane Missiles")) //18
                      {
                          Log.Info(msg + ">> Arcane Missiles");
                          return "Arcane Missiles";
                      }
      
                      if (SpellController.CanCast("Wild Barrage")) //12
                      {
                          Log.Info(msg + ">> Wild Barrage!");
                          return "Wild Barrage";
                      }
      
                      if (SpellController.CanCast("Charged Shot")) //10
                      {
                          Log.Info(msg + ">> Charged Shot!");
                          return "Charged Shot";
                      }
      
                      if (SpellController.CanCast("Rapid Fire")) //10
                      {
                          Log.Info(msg + ">> Rapid Fire!");
                          return "Rapid Fire";
                      }
      
                      if (SpellController.CanCast("Chill")) // 7
                      {
                          Log.Info(msg + ">> Chill!");
                          return "Chill";
                      }
      
                      if (SpellController.CanCast("Quick Draw"))
                      {
                          Log.Info(msg + ">> Quick Draw!");
                          return "Quick Draw";
                      }
                  }
                  return null;
              }
      
              // Check if we Need an ignite. Both normal and surged 
              private bool IgniteDue(int Surged)
              {
                  TimeSpan span = DateTime.Now - SpellController.CastTracker.Ignite;
                  int SpellTier = SpellController.Tier("Ignite");
                  int CastTime;            
                  int SpellID = 0;
      
                  //           0                                                       8
                  //normal = 34754, 49142, 49143, 49144, 49145, 49146, 49147, 49148, 49149
                  //surged = 34755, 49151, 49152, 49153, 49154, 49155, 49156, 49157, 77138
      
                  // Get BuffID of Target Ignite Tier
                  if (Surged == 1) // Surged Ignite
                  {
                      if (SpellTier == 8)
                          SpellID = 77138;
                      else if (SpellTier == 7)
                          SpellID = 49157;
                      else if (SpellTier == 6)
                          SpellID = 49156;
                      else if (SpellTier == 5)
                          SpellID = 49155;
                      else if (SpellTier == 4)
                          SpellID = 49154;
                      else if (SpellTier == 3)
                          SpellID = 49153;
                      else if (SpellTier == 2)
                          SpellID = 49152;
                      else if (SpellTier == 1)
                          SpellID = 49151;
                      else if (SpellTier == 0)
                          SpellID = 34755;
                  }
      
                  else if (Surged == 0) // Normal Ignite
                  {
                      if (SpellTier == 8)
                          return false; // Tier 8 Applies both Surged and non Surged ignore
                      else if (SpellTier == 7)
                          SpellID = 49148;
                      else if (SpellTier == 6)
                          SpellID = 49147;
                      else if (SpellTier == 5)
                          SpellID = 49146;
                      else if (SpellTier == 4)
                          SpellID = 49145;
                      else if (SpellTier <=3)
                          return false; // Can Only apply one Ignite prioritize Surged.
                  }
      
                  // Pad cast time for hit recognition
                  if (SpellTier >= 4)
                      CastTime = 500 + 250;
                  else
                      CastTime = 1000 + 250;
      
                  // Don't recast till CastTime + 250 ms has passed to prevent Spam. Only cast it target is missing Ignite or it has been 8 sec since you last cast Ignite.
                  if ((int)span.TotalMilliseconds > CastTime && (((int)span.TotalMilliseconds > 8000) || !SpellController.IsTickingID(SpellID)))
                  {
                      //Log.Info(string.Format(">>[DEBUG]: IgniteDue >> Need Ignite! Last Cast: {0} IsTicking: {1}.", span.TotalMilliseconds, SpellController.IsTickingID(SpellID)));
                      return true;
                  }
      
                  //Log.Info(string.Format(">>[DEBUG]: IgniteDue >> Not Needed! Last Cast: {0} IsTicking: {1}.", span.TotalMilliseconds, SpellController.IsTickingID(SpellID)));
                  return false;
              }
      
              private bool SafeToSurge()
              {
                  TimeSpan span = DateTime.Now - SpellController.CastTracker.Surge;
                  if ((int)span.TotalMilliseconds > 500)
                  {
                      //Log.Info(string.Format(">>[DEBUG]: SafeToSurge >> Safe! Last Cast: {0}", span.TotalMilliseconds));
                      return true;
                  }
                  //Log.Info(string.Format(">>[DEBUG]: SafeToSurge >> {0}! Last Cast: {1}", (int)span.TotalMilliseconds > 500, (int)span.TotalMilliseconds));
                  return false;
              }
          }
      }
      
      
       
    11. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Unfortunately changes outside of the routine themselves aren't supported (although I try to help out), so this routine isn't compatible with the current build of Agility. :(
       
    12. guy90210

      guy90210 New Member

      Joined:
      Apr 10, 2014
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      0
      Hehe. I ran into a few issues getting a cool down and facing check working. But I'll post an update here soon.
       
    13. Konfettos

      Konfettos New Member

      Joined:
      Oct 9, 2011
      Messages:
      41
      Likes Received:
      0
      Trophy Points:
      0
      hey still w8 stalker - aoe build rotation and tank build =) :rolleyes:
       
    14. Majik01

      Majik01 New Member

      Joined:
      Jan 16, 2013
      Messages:
      99
      Likes Received:
      0
      Trophy Points:
      0
      If you actually read this post he actually stated he is not going to do any new rotations.

       
      Last edited: Nov 5, 2015
    15. guy90210

      guy90210 New Member

      Joined:
      Apr 10, 2014
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      0
      Attached is my current Spell Slinger updated for Revision 65

      It changes core parts of Agility and may break things or cause issues in other Routines.
      <<USE AT YOUR OWN RISK>>​

      Installation:
      • Checkout Agility to your 'Bots' folder. [See : How to : Checkout an SVN]
      • Extract SpellSlinger Mod R65.zip to the Agility folder. (\..\Bots\Agility\)
      • Select Sling Ding Damage and Stun routines.
      • To Customize the routine see the top of Agility\Routines\Spellslinger\Spellslinger_fDPS.cs

      Changes
      [hide]Spells\AgilitySpell.cs
      -- Added Spell Missed variable as Boolean
      -- Added return for LastCast as double

      Controllers\SpellController.cs
      -- Added return for spell LastCast in Milliseconds as double
      -- Added return for spell Missed as Boolean

      Routines\Spellslinger\Spellslinger_fDPS.cs - Renamed DPS Routine
      -- Added Routine Initialization
      -- Implemented event handlers and cast systems from previous SpellController modifications
      -- Removed Targeting systems
      --- Note: Will work on later
      -- corrected and cleaned code

      Routines\Spellslinger\Spellslinger_fStun.cs
      -- Adding basic stun rotation of Gate, Spatial Shift and Arcane Shock[/hide]

      Issues
      [hide]Spell Threshold uses actual SpellID
      1.AgilitySpell references the base spell ID and reflects the unsurged spell.
      2.Spell Threshold references the actual spell ID which can be surged or unsurged.
      ---Issue: Can’t look up Spell by Spell ID for surged casts.
      ----Fix: Pull players current cast.
      -----Issue: True Shot calls CastBar after the cast. Thus player is not casting?

      Spell cooldown sometimes reports incorrectly.
      -Issue: Prevents optimization of rotation.
      [/hide]

      To Do
      [hide]1. Get combat targets to improve situational awareness
      2. Fix Cooldown issue to optimize rotation
      3. Fix AgilitySpell spell ID issue to refine Spell Tracking
      4. Change rotation settings without having to restart
      5. Improve Ignite Tracking for raids and shit.
      6. Improve fStun Rotation
      [/hide]
      Big thanks to Deathdisguise
       

      Attached Files:

      Last edited: Nov 27, 2015
    16. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Well, I'll be adding support to Stalker_Default that will handle tanking and (in time, AoE, but that's another bag of worms), I just won't be doing specialized routines for specs. :)
       
      Last edited: Nov 5, 2015
    17. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      I've been slowly adding support for more complicated routines (thanks to guy90210, mainly =P) that don't involve leaving the AgilityRoutine class (makes them update safe(ish)!)

      For devs in the next update, wrapped Events!

      Code:
      using Agility.Events;
      
      class RoutineName : IAgilityRoutine
      {
      
      
      
      
         //Events
         AgilityEvent testEvent = new AgilityEvent(LuaEvent.ChatMessage, HandleChatMessage);
         private static void HandleChatMessage(string eventName, LuaEventArgument[] args)
         {
            // Chat message fired, omg!
         }
      
      
      
      
         // Routine.
         public string Routine()
         {
            // Events.
            AgilityEvents.RegisterEvent(testEvent);
      
            // Your routine stuff here!
            return null;
         }
      
      
      
      
      }
      
      Essentially the same usage as regular GameLuaEvents, but it adds handling for duplicates (so it will simply do nothing on multiple attempts to register), and Agility will remove them all automatically on bot stop/unregistration!
       
      Last edited: Nov 8, 2015
    18. Flitsbue

      Flitsbue Member

      Joined:
      Jan 2, 2013
      Messages:
      31
      Likes Received:
      1
      Trophy Points:
      6
      Hey Deathdisguise.

      Sometimes I get an issue with the routine not working.
      instead of using the abilities, its writing "Severity" (dont have a log)

      What is it trying to do when spamming this? would love to know, so I can fix it in the future.

      I fixed it by reinstalling WB, so dont have a log of the issue.
      but found a single line with severity;
      "[Pulsator Thread] INFO Agility [SpellController] - [52593] [0] [Ok] Severity"
       
    19. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Severity is likely your equipped gadget spell that was attempting to be used, it shouldn't be doing that, and the fact that it is worries me. :(
       
    20. Palenie

      Palenie New Member

      Joined:
      Dec 7, 2014
      Messages:
      42
      Likes Received:
      0
      Trophy Points:
      0
      I've the same issue, different gadget thou. I just removed the whole gadget out of the routine and do it manually for now.
       

    Share This Page