The switching zone plugin works ok, but it doesn't seem to be compatible with the bot's "Stuck Detection Timer" which is important when you bot multiple zones where there might be stairs, obstacles, etc.
I wonder if pushex has some tips for us for how to do this within the API or bot's settings.
The only up to date CR atm is Exile so I would only recommend using it as the Ranger and Summoner are horribly out dated and may not even function properly with the changes to the bot since they were made.
This is another reason why a lot of our code is being changed right now. Users should be able to do things like this and not have to worry about the bot getting in the way and breaking its behavior.
The stuck detection / idle timer / chicken system has to be (re)written. The game is a lot different today, then it was back when t was first added. There's not much for you guys to change in regards to that, it just has to be removed from the bot and re-added as a user customizable system.
For the actual area changing plugin, I've not checked the code of the one you guys are talking about, but this was the code to the simple one I added for allowing users to override this behavior:
Code:
using System;
using log4net;
using Loki.Bot.Logic;
using Loki.Bot.Logic.Bots.Grind;
using Loki.Utilities;
using Loki.Utilities.Plugins;
namespace GrindZoneChanger
{
/// <summary> </summary>
public class GrindZoneChanger
: 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 Name.Equals(other.Name);
}
#endregion
private static readonly ILog Log = Logger.GetLoggerInstanceForType();
#region Implementation of IPlugin
/// <summary> </summary>
public string Author { get { return "pushedx"; } }
/// <summary> </summary>
public Version Version { get { return new Version(0, 1, 0, 0); } }
/// <summary> </summary>
public string Name { get { return "GrindZoneChanger"; } }
/// <summary> </summary>
public string Description { get { return "This plugin shows how to use the experimental grind zone changing logic."; } }
/// <summary> Executes the start action. This is called when the bot starts. </summary>
public void OnStart()
{
}
/// <summary> Executes the stop action. This is called when the bot is stopped. </summary>
public void OnStop()
{
}
/// <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()
{
// Use our specific runetime
Registry.UserGetGrindZoneId = new MyGetGrindZoneId();
Registry.DontUseSmartLedgeFarming = true;
}
/// <summary> Executes the disabled action. This is called whent he user has disabled this specific plugin via the GUI. </summary>
public void OnDisabled()
{
// Restore the default settings.
Registry.UserGetGrindZoneId = null;
Registry.DontUseSmartLedgeFarming = false;
}
/// <summary> Executes the config action. This is called when the user clicks on the config button.</summary>
public void OnConfig()
{
}
#endregion
/// <summary>
/// An example grind zone changing plugin implementation.
/// </summary>
internal class MyGetGrindZoneId : IGetGrindZoneId
{
private string _grindZoneId;
private int _index;
public MyGetGrindZoneId()
{
_grindZoneId = GrindBotSettings.Instance.GrindZoneId;
}
public string GetGrindZoneId()
{
return _grindZoneId;
}
public void DetermineNextGrindZone()
{
// You can setup how you want to change things. Whether it's in a cycle like this,
// # of runs per area (you'd need to track that yourself) etc...
// The bot would grind from:
// GrindBotSettings.Instance.GrindZoneId -> Mud Flats -> Coves -> Ledge in this example.
// Use the grind area settings gui in the bot to get the id of areas.
if (_index == 0)
{
_grindZoneId = "1_1_3"; // Mud Flats normal
++_index;
}
else if (_index == 1)
{
_grindZoneId = "1_1_10"; // The Coves normal
++_index;
}
else if (_index == 2)
{
_grindZoneId = "1_1_5"; // The Ledge normal
_index = 0;
}
}
}
}
}
Right now, it's mostly going to be a game of patience and waiting as the new stuff makes its way into the api and bot. It is being worked on every day, and progress is always being made. However, we can't really speed things up or rush out the huge changes desired. Just about everything can use a "refresh" with how much the game has changed, so it's being worked on.
We hope by the time it's all done and implemented, users will have felt it was worth the wait.
Patch notes for the next beta are going to be huge, but we've been working on adding in better support for knowing when certain windows are open, and are trying to add in new ways to interact with the game through the gui to cut down on time required each patch. For example, the changes made to the Resurrect api are basically what we want to go for in the long run for most things where possible. Right now, the map device's Activate button, and the Bandits "kill/help" buttons are being tested, but that might not make it into the next beta.