What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Personal bard

MoreFLow

New Member
Joined
Jan 22, 2015
Messages
12
Reaction score
0
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
Code:
 CheckBuffCastBuff("buff name", "spellname");
for normal usage.

Скрипт използовался для суппорт барда, в освновном в библе. Скрипт проверяет есть ли баф с песен, если нету то играет именно ту которой нету. Скрипт можно използовать на коне - дабы ускоритъ процесс перебежки с комнаты вкомнату. Или же он побежит за пати лидером, если он будет далъше 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:
Your script if i read it seems to be very mana inefficent.

As I like to take all aspects of it into play, If you build your songcrafter right the song lasts 25 seconds.
Wouldn't it be better to account for the times after casting rather than the lack of buff.
 
Actually the script is very manna efficent, as he only casts when neded, i.e. the buff lasts for 25 seconds and only after 25 seconds the script will start to play again. No need for random delays or lagspikes that might let you cast early, just scan if the buff is there or not. I would recommend actually trying the script in action to see how it works, before making any conclusions.
 
Last edited:
I meant it as an observation, not as a slight by my words. I have it saved in a folder to be compiled before i go back into library to zerg the dailies tomorrow and see it in action.
 
Perhaps have it take advantage of "meditate" when mana is below 'x' percent?
 
Bards usually dont have any problems with mana, while playing songs. Have you experienced any mana shortages on this script?
 
Last edited:
Back
Top