using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace DefaultNameSpace{
public class DefaultClass : Core
{
public static string GetPluginAuthor(){return "Remark";}
public static string GetPluginVersion(){return "0.0.0.1";}
public static string GetPluginDescription(){return "Performer";}
private Double followrange= 2.0;
private Double combatrange= 15.0;
private Creature leader= null;
private bool following = false;
void keypressed(Keys key, bool isCtrlPressed, bool isShiftPressed, bool isAltPressed)
{
// look here to see what other keys you can use https://msdn.microsoft.com/en-us/library/system.windows.forms.keys.aspx
if(key == Keys.Scroll) // change only the scroll part for changing to another key.
{
if(me.target != null && following == false)
{
leader = me.target;
Log("Following: " +leader.name);
following = true;
}
else
{
Log("Stop following: " + leader.name);
leader = null;
following = false;
CancelMoveTo();
CancelSkill();
}
}
}
//Call on plugin start
public void PluginRun()
{
ClearLogs();
onKeyDown +=keypressed;
int c=0;
while (true)
{
if (following)
if(leader.inFight)
{
c++;
if(c == 1)
Cast("[Perform] Quickstep",false);
if(c == 21)
Cast("[Perform] Ode To Recovery",false);
if(c == 41)
Cast("[Perform] Bulwark Ballad",false);
if(c == 61)
Cast("[Perform] Bloody Chantey",false);
if(c ==149)
c=0;
ComeTo(leader, combatrange);
}
else
{
c=0;
ComeTo(leader, followrange);
}
Thread.Sleep(100);
}
}
public void PluginStop()
{
CancelMoveTo();
CancelSkill();
}
public void Cast(string skillName, bool selfTarget = false)
{
while (me.isCasting || me.isGlobalCooldown)
{
Thread.Sleep(40);
}
if (!UseSkill(skillName, false, selfTarget))
{
while (me.isCasting || me.isGlobalCooldown)
{
Thread.Sleep(40);
}
}
// else
//Log(": Used -> " +skillName);
}
}
}