using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace ShadowLeech
{
public class SL : Core
{
////////////////////////////////////////////////////////
//////// Mainloop
////////////////////////////////////////////////////////
public void PluginRun()
{
ClearLogs();
DebugLog("[SL]: Initialized ShadowLeech.");
Combat();
while (true)
{
Thread.Sleep(20);
}
}
/// <summary>
/// Range Check
/// </summary>
public bool RangeCheck(int yards)
{
if (me.dist(me.target) <= yards) { return true; }
else { return false; }
}
/// <summary>
/// Combos
/// </summary>
public int ComboId;
public void ExecuteCombo()
{
if (ComboId == 0)
{ return; }
else if (ComboId == 1)
{
UseSkill("Leech", 4, 0);
return;
}
}
public void Combat()
{
if (me.isAlive() && me.target.isAlive() && me.target.factionId != me.factionId)
{
ExecuteCombo();
UseSkill("Shadow Step", 20, 1);
}
}
////////////////////////////////////////////////////////
//////// UseSkill
////////////////////////////////////////////////////////
public bool UseSkill(string CurrentSkill, int yard, int ComboNo)
{
DebugLog(": CurrentSkill ->" + CurrentSkill);
if (CanCast(CurrentSkill) && RangeCheck(yard))
{
if (me.isCasting || me.isGlobalCooldown)
{
return false;
}
else
{
UseSkill(CurrentSkill, false, false);
ComboId = ComboNo;
DebugLog(": Used ->" + CurrentSkill);
return true;
}
}
return false;
}
public bool CanCast(string Skill)
{
if (isSkillLearned(Skill) && skillCooldown(Skill) == 0) { return true; }
else { return false; }
}
public void DebugLog(string Logger_string)
{
Log(Time() + Logger_string);
}
public string Time() //- Get Time
{
string A = DateTime.Now.ToString("[hh:mm:ss] ");
return A;
}
public void PluginStop()
{
DebugLog("Script stoped");
}
public static string GetPluginAuthor()
{
return "p4mdude";
}
public static string GetPluginVersion()
{
return "0.0.0.1";
}
public static string GetPluginDescription()
{
return "ShadowStep + Leech";
}
}
}