phoenixgold
New Member
- Joined
- Mar 10, 2014
- Messages
- 16
- Reaction score
- 0
is there a way the bot do /oos when stuck in loop patern,its always unblock after i hit my /oos macro.
or a plugin thx
or a plugin thx
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using Loki;
using Loki.Game;
using Loki.Game.Objects;
using Loki.TreeSharp;
using Loki.Utilities;
using Loki.Utilities.Plugins;
using log4net;
using Action = System.Action;
namespace ExileBot
{
class simpleOOS : IPlugin
{
// Set it to FALSE to disable /oos spam
private bool DoResync = true;
#region Implementation of IEquatable<IPlugin>
public bool Equals(IPlugin other) { return Name.Equals(other.Name); }
#endregion
#region Implementation of IPlugin
public string Author { get { return "Emmitt"; } }
public Version Version { get { return new Version(1, 0, 0, 0); } }
public string Name { get { return "Simple OOS"; } }
public string Description { get { return "Da resync"; } }
public void OnInitialize() {}
public void OnStop() {}
public void OnShutdown() {}
public void OnEnabled() {}
public void OnDisabled() {}
public void OnConfig() {}
public void OnStart() {}
#endregion
private static readonly ILog Log = Logger.GetLoggerInstanceForType();
private string CurrentAreaID { get { return LokiPoe.LocalData.WorldAreaName; } }
private readonly WaitTimer _resyncWait = WaitTimer.FiveSeconds;
private readonly Random _random = new Random();
public void OnPulse()
{
if (DoResync && !CurrentAreaID.Contains("town") && _resyncWait.IsFinished)
{
_resyncWait.Reset(TimeSpan.FromMilliseconds(_random.Next(15000, 45000)));
Log.Debug(string.Format("--Resync {0}",DateTime.Now.ToString(CultureInfo.InvariantCulture)));
LokiPoe.Resync();
}
}
}
}
resyncWait.Reset(TimeSpan.FromMilliseconds(_random.Next(15000, 45000)));