using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace Nuker{
public class NukerClass : Core
{
public static string GetPluginAuthor(){return "Remark";}
public static string GetPluginVersion(){return "0.0.1.0";}
public static string GetPluginDescription(){return "God's Whip Caster";}
void keypressed(Keys key, bool isCtrlPressed, bool isShiftPressed, bool isAltPressed)
{
if(key == Keys.D7)
{
{
UseSkillAndWait(23593,false);
UseSkillAndWait(23593,false);
UseSkillAndWait(23593,false);
UseSkillAndWait(23593,false);
UseSkillAndWait(23593,false);
}
}
}
//Call on plugin start
public void PluginRun()
{
onKeyDown +=keypressed;
while(true)
{
Thread.Sleep(150);
}
}
public void PluginStop()
{
CancelSkill();
}
public void UseSkillAndWait(uint skillId, bool selfTarget = false)
{
//wait cooldowns first, before we try to cast skill
while (me.isCasting || me.isGlobalCooldown)
{
Thread.Sleep(50);
}
if (!UseSkill(skillId, true, selfTarget))
{
if (me.target != null && GetLastError() == LastError.NoLineOfSight)
{
//No line of sight, try come to target.
if (dist(me.target) <= 5)
ComeTo(me.target, 2);
else if (dist(me.target) <= 10)
ComeTo(me.target, 3);
else if (dist(me.target) < 20)
ComeTo(me.target, 8);
else
ComeTo(me.target, 8);
}
}
//wait cooldown again, after we start cast skill
while (me.isCasting || me.isGlobalCooldown)
{
Thread.Sleep(50);
}
}
}
}