For Ru servers if anyone can translate it will work on EU y need to change a skills & debuffs on fish
If anyone will give me skill name & fish debufs from EU server i vill change it for y
If anyone will give me skill name & fish debufs from EU server i vill change it for y
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace Bolge
{
public class Fisher : Core
{
protected Dictionary<string,string> actions;
public static string GetPluginAuthor ()
{
return "Bolge";
}
public static string GetPluginVersion ()
{
return "1.0.0.0";
}
public static string GetPluginDescription ()
{
return "Fishing machine";
}
public Fisher ()
: base ()
{
actions = new Dictionary<string,string> ()
{
{ "Рывок влево", "Отвести удилище влево" },
{ "Рывок вправо", "Отвести удилище вправо" },
{ "Отчаянное сопротивление", "Ослабить леску" },
{ "Рывок на глубину", "Подкрутить катушку" },
{ "Прыжок над водой", "Подсечь" }
};
}
protected void Wait ()
{
while (me.target == null || // Если не выбрана цель
(me.target.target != null && me.target.target != me) || // Или у цели мы не в таргете (не наша рыба)
getBuff (me.target, "Рыбак и море") == null) // Или это вообще не рыба
{
Thread.Sleep (1000);
}
}
protected void Stopper ()
{
Buff check;
while (true)
{
Wait ();
check = getBuff (me.target, "Натяжение лески");
if (check != null && isCasting ())
{
//CancelSkill(); // Увы, с рыбалкой сейчас не пашет, отменяем каст иначе
try
{
MoveForward (true);
Thread.Sleep (100);
} finally {
MoveForward (false);
}
Log ("Cancel");
Thread.Sleep (1500);
}
Thread.Sleep (100);
}
}
public void PluginRun ()
{
Thread stopper = new Thread (Stopper); // Поток, который будет отменять каст, если кастуется что-то не то.
stopper.Start ();
while (true)
{
Wait ();
String skill = null;
// Выбираем подходящую реакцию на бафы рыбы
foreach (Buff enBuff in me.target.getBuffs())
{
if (actions.ContainsKey (enBuff.name))
{
skill = actions [enBuff.name];
break;
}
}
// Кастуем, если есть что
if (!isCasting () && skill != null)
{
if (!isGliding ())
{
TurnDirectly ();
}
Log ("Used: " + skill);
UseSkill (skill, true);
}
Thread.Sleep (100);
}
}
}
}
Last edited: