Personal bard[debug]
This script has been mainly used for barding support while farming at library. Script checks if the buffs are on, if not he plays the songs that are missing. You can use it while the bard is mounted on your horse, or let him follow your party leader. If you are playing on english servers, please correct the buff/spellnames e.g. from RUSSIAN Calculator to - ENGLISH Calculator
for normal usage.
Скрипт използовался для суппорт барда, в освновном в библе. Скрипт проверяет есть ли баф с песен, если нету то играет именно ту которой нету. Скрипт можно използовать на коне - дабы ускоритъ процесс перебежки с комнаты вкомнату. Или же он побежит за пати лидером, если он будет далъше 15 метров.
This script has been mainly used for barding support while farming at library. Script checks if the buffs are on, if not he plays the songs that are missing. You can use it while the bard is mounted on your horse, or let him follow your party leader. If you are playing on english servers, please correct the buff/spellnames e.g. from RUSSIAN Calculator to - ENGLISH Calculator
Code:
CheckBuffCastBuff("buff name", "spellname");
Скрипт използовался для суппорт барда, в освновном в библе. Скрипт проверяет есть ли баф с песен, если нету то играет именно ту которой нету. Скрипт можно използовать на коне - дабы ускоритъ процесс перебежки с комнаты вкомнату. Или же он побежит за пати лидером, если он будет далъше 15 метров.
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace Bard
{
public class BardClass : Core
{
////////////////////////////////////////////////////////
//////// EDITABLES
////////////////////////////////////////////////////////
bool doBarding = true; // Rotate barding skills.
bool doLoot = false; // Run and loot corpses.
bool diceLoot = true; // Dice mode selection. It will roll if true and won't if false.
bool doLogs = true; // Logging for debug purposes.
bool followleader = true; // follow the party leader
private Double _followRange = 15.0; // follow range
////////////////////////////////////////////////////////
//////// DO NOT EDIT
////////////////////////////////////////////////////////
Random randomRollTime = new Random();
private Creature _leader = null;
////////////////////////////////////////////////////////
//////// BARD SKILL ROTATION
////////////////////////////////////////////////////////
public void BardSkillRotation()
{
if (doBarding == true)
{
CheckBuffCastBuff("Гимн земли II", "Гимн земли");
CheckBuffCastBuff("Рапсодия битвы I", "Рапсодия битвы");
CheckBuffCastBuff("Песнь исцеления III", "Песнь исцеления");
CheckBuffCastBuff("Походный марш V", "Походный марш");
}
}
////////////////////////////////////////////////////////
//////// MAINLOOP
////////////////////////////////////////////////////////
public void PluginRun()
{
ClearLogs();
DebugLog("Script started");
BlockClientDice(true);
_leader = getPartyLeaderObj();
if(_leader == null || _leader == me)
{
DebugLog("There is no party leader to setup.");
}
while(true)
{
if (me.isAlive())
{
BardSkillRotation();
LootAround();
RollDice();
moveToPlayer(_leader);
}
Thread.Sleep (500);
}
}
////////////////////////////////////////////////////////
//////// Debug
////////////////////////////////////////////////////////
public void DebugLog(string Logger_string)
{
if (doLogs == true)
{
Log(Time() + Logger_string);
}
}
////////////////////////////////////////////////////////
//////// GetTime
////////////////////////////////////////////////////////
public string Time() //- Get Time
{
string A = DateTime.Now.ToString("[hh:mm:ss] ");
return A;
}
////////////////////////////////////////////////////////
//////// Move to
////////////////////////////////////////////////////////
public void moveToPlayer(Creature obj)
{
if (followleader == true)
{
ComeTo(obj, _followRange);
}
}
////////////////////////////////////////////////////////
//////// CheckBuffCastBuff
////////////////////////////////////////////////////////
public void CheckBuffCastBuff(string Buffname, string Buffspell)
{
if (buffTime(Buffname) == 0)
{
UseSkillAndWait(Buffspell);
Thread.Sleep (500);
}
}
////////////////////////////////////////////////////////
//////// Loot
////////////////////////////////////////////////////////
public void LootAround()
{
if (doLoot == true)
{
foreach (var corps in getCreatures())
{
if (corps.dropAvailable && me.dist(corps) <= 20)
{
if (me.dist(corps) <= 2)
{
PickupAllDrop(corps);
}
else
{
ComeTo(corps, 2);
PickupAllDrop(corps);
}
}
Thread.Sleep(100);
}
}
}
////////////////////////////////////////////////////////
//////// RollDice
////////////////////////////////////////////////////////
public void RollDice()
{
if (diceLoot == true)
{
foreach (var item in me.getDiceItems())
{
item.Dice(true);
Thread.Sleep(randomRollTime.Next(1000, 2500));
DebugLog("Rolling on item: " + item.name);
}
}
else
{
foreach (var item in me.getDiceItems())
{
item.Dice(false);
Thread.Sleep(randomRollTime.Next(1000, 2500));
DebugLog("Decline on item: " + item.name);
}
}
}
////////////////////////////////////////////////////////
//////// UseSkill
////////////////////////////////////////////////////////
public void UseSkillAndWait(string skillName, bool selfTarget = false)
{
while (me.isCasting || me.isGlobalCooldown)
{
Thread.Sleep(50);
}
if (!UseSkill(skillName, false, selfTarget))
{
while (me.isCasting || me.isGlobalCooldown)
{
Thread.Sleep(50);
}
}
else
DebugLog(": Used ->" +skillName);
}
////////////////////////////////////////////////////////
//////// Info
////////////////////////////////////////////////////////
public void PluginStop()
{
DebugLog("Thank you for using Personal Bard.");
}
public static string GetPluginAuthor()
{
return "CAMOTbIK";
}
public static string GetPluginVersion()
{
return "0.0.0.2 Alpha";
}
public static string GetPluginDescription()
{
return "Personal Bard";
}
}
}
Last edited:






