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

[Plugin] Four Songs - Party/Raid Buffs ( Songcraft FTW Baby )

Defectuous

New Member
Joined
Dec 17, 2014
Messages
238
Reaction score
1
[Plugin] FourNotes - Party/Raid Buffs ( Songcraft FTW Baby )

[Plugin Name]
FourNotes: a simple Plugin that makes songcraft raid/party easier.

[Description]
A simple plugin designed to play the four party/raid buffs from the songcraft tree

[Working on]
New Party control / follow feature with Configurable set party leader
Resurrection Support
Adding support for Infuse

[Plugin Build]
SongCraft Minimum Build: ArcheAge Builder - Arche-Base

My Current Build ( what I'm working with )
http://arche-base.com/builds/generator#9.10.4/ChA3stAjyTU1

My Current Armor
7/7 Heroic Magnificent Stone
Celestial Cursed Obsidian Great Club



[Notes]
This works well with Hasla Assistant / Arche Grinder ( For looting purposes only ) as long as your not running all over the map to kill things.
Tested this in Serpentise and made the easy job of the bard even easier. ( except learman )

Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

namespace ArcheAgeFourNotes
{
    public class FourNotes : Core
    {
        public static string GetPluginAuthor()
        { return "Defectuous"; }
        public static string GetPluginVersion()
        { return "1.0.1.49"; }
        public static string GetPluginDescription()
        { return "4 Notes: Party/Raid Songcraft Buffs Plugin"; }
        
        // [ Configuration Section Start ]
        
        private bool _followMode = true; // To follow the party / raid leader
        private Double _followRange = 5.0; // follow range
        
        // Looting Management  [ Currently This looks very bottish ]
        private bool _deadloot = false; // Looting the Dead so the leader doesn't have to.
        int _lootdist = 25; // The range to go pick up loot from
        
        // Mana Mangment
        private bool _ManaManage = true; // to enable Mana Mangement with food or pots.
        string _soup = "Hearty Soup"; // Mana Food or Pot
        int    _mana = 60; // Percentage to eat food or put up at
        
        // Buffs 
        private bool _BuffChecks  = true; // Check Each Party Member for the following Buffs.
        private bool _HummingbirdDitty   = true; // To give HUmmingbird Ditty Buff to all Party members in range
        private bool _AranzebsBoon   = true; // To give Aranzeb's Boon to all Party members in range
        private bool _HealthLift = true;
        
        // pick and choose your spells if you want to
        private bool _BulwarkBallad  = true;
        private bool _BloodyChantey = true;
        private bool _OdetoRecovery = true;
        private bool _Quickstep = true;
        
        // Self Buffs
        // Tyrenos's Index ( Library Use Only Item )
        uint _BuffID0  = 8240;
        uint _ItemID0  = 34242;
        bool _Itemuse0 = true;
        
        // Brick Wall
        uint _BuffID1  = 7477;
        uint _ItemID1  = 31776;
        bool _Itemuse1 = true;
        
        
        // [ Configuration Section End ]
        
        // Do not EDIT Below this line 
        // ##########################################################
        //Call on plugin start
        private Creature _leader = null;
        
        public void PluginRun()
        {
            ClearLogs();
            Log(Time() + "[INFO] STARTING 4 NOTES");
            _leader = getPartyLeaderObj();    

            // Starting Threads
            Thread followThread = new Thread(new ThreadStart(FollowTheLeader));
            
            if (_leader == null || _leader == me)
            { Log(Time() + "[WARN] Please set a Leader other than yourself or join a Party/Raid"); } 
                else  { 
                    if (_followMode == true){ followThread.Start(); Log(Time() + "[INFO] Starting Following Thread"); }
                    
                    Songs();
                    
                    if (_followMode == true){ followThread.Abort(); Log(Time() + "[INFO] Ending Following Thread"); }
                }
            Log(Time() + "[INFO] ENDING 4 NOTES");
        }
        
        // Follow the Leader
        public void FollowTheLeader()
        {
            while(true) {
                Thread.Sleep(1000);     
                if (me.dist(_leader) >= _followRange)
                { Log(Time() + "[INFO] Distance to Leader: " + me.dist(_leader)); moveToPlayer(_leader); }
                if (_deadloot == true) { LootDead(); }
                
                } 
        }
        
        public void moveToPlayer(Creature obj)
        {
            ComeTo(obj, _followRange);
        }
        
        public void ManaCheck()
        {
            if (mpp(me) <= _mana && itemCooldown(_soup) >= 1){
                UseItem(_soup); 
                Log(Time() + "[INFO] Mana Below " + _mana + " Percent. Consuming " + _soup + " for mana");
                } Log(Time() + "[INFO] Mana at " + mpp(me) + "%");
        }
        
        // Buff Check
        public void BuffCheck()
        {
            List<Creature> DeadPpl = new List<Creature>(); 
            
            // [ Hummingbird Ditty ]
            if (isSkillLearned(11377) == true && skillCooldown(11377) == 0 && _HummingbirdDitty == true) { 
                foreach (PartyMember member in getPartyMembers()) { 
                    if (!DeadPpl.Contains(member.obj)) { 
                        if (!member.obj.getBuffs().Exists(b => b.id == 462) &&
                            !member.obj.getBuffs().Exists(b => b.id == 463) &&
                            !member.obj.getBuffs().Exists(b => b.id == 464) &&
                            !member.obj.getBuffs().Exists(b => b.id == 465) &&
                            !member.obj.getBuffs().Exists(b => b.id == 466)) { 
                            if (me.dist(member.obj) <=20) { 
                                SetTarget(member.obj); 
                                UseSkill(11377);
                                Log(Time() + "[INFO] Casting Hummingbird Ditty on " + member.obj.name );
                                Thread.Sleep(2000);
                            } 
                        } 
                    } 
                }
            }
            
            // [ Aranzeb's Boon ]
            if (isSkillLearned(16004) == true && skillCooldown(16004) == 0 && _AranzebsBoon == true) { 
                foreach (PartyMember member in getPartyMembers()) { 
                    if (!DeadPpl.Contains(member.obj))  { 
                        if (!member.obj.getBuffs().Exists(b => b.id == 2955) &&
                            !member.obj.getBuffs().Exists(b => b.id == 2956) &&
                            !member.obj.getBuffs().Exists(b => b.id == 7661)) { 
                            if (me.dist(member.obj) <= 20) { 
                                SetTarget(member.obj); 
                                UseSkill(16004); 
                                Log(Time() + "[INFO] Casting Aranzeb's Boon on " + member.obj.name );
                                Thread.Sleep(2250);
                            } 
                        } 
                    } 
                } 
            }
            // [DEBUG] Health Lift (Rank 3) => 796
            // [ Health Lift ]
            if (isSkillLearned(11991) == true && skillCooldown(11991) == 0 && _HealthLift == true) { 
                foreach (PartyMember member in getPartyMembers()) { 
                    if (!DeadPpl.Contains(member.obj))  { 
                        if (//
                            !member.obj.getBuffs().Exists(b => b.name == "Health Lift (Rank 1)") &&
                            !member.obj.getBuffs().Exists(b => b.name == "Health Lift (Rank 2)") &&
                            !member.obj.getBuffs().Exists(b => b.id == 796) &&
                            //!member.obj.getBuffs().Exists(b => b.name == "Health Lift (Rank 3)") &&
                            !member.obj.getBuffs().Exists(b => b.id == 7655)) { 
                            if (me.dist(member.obj) <= 20) { 
                                SetTarget(member.obj); 
                                UseSkill(11991); 
                                Log(Time() + "[INFO] Casting Health Lift on " + member.obj.name );
                                Thread.Sleep(2250);
                            } 
                        } 
                    }
                }
            }
            
            // Self Buffs
            if ( buffTime(8240) == 0 && itemCount(34242) >= 1 && _Itemuse0 == true)
                {
                    Log(Time() + "Using Tyrenos's Index");
                    UseItem(34242);
                    Thread.Sleep(2500); // Rest for 2.5 seconds ( little over the global cooldown )
            }
                
            if (buffTime(7477) == 0 && itemCount(31776) >= 1 && _Itemuse1 == true)
                {
                        Log(Time() + "Using Spellbook: Brick Wall");
                        UseItem(31776);
                        Thread.Sleep(2500); // Rest for 2.5 seconds ( little over the global cooldown )
                    }
            
        }  
        
        // Looting Dead
        public void LootDead() 
        { 
            foreach (var dead in getCreatures()) 
            { 
                if (dead.dropAvailable && me.dist(dead) <= _lootdist) 
                { 
                    if (me.dist(dead) <= 2) 
                    { PickupAllDrop(dead); }
                    else { 
                        ComeTo(dead, 2); 
                        PickupAllDrop(dead); 
                    } 
                    Thread.Sleep(100); 
                } 
            } 
        }
        
        // Play that Funky Music White Boy
        public string Songs()
        {
            Log(Time() + "[INFO]: Starting BuffCheck & Rotation");
            while (true)
            {
                if (_BuffChecks == true) { BuffCheck(); }
                if (isSkillLearned("[Perform] Bulwark Ballad") == true && skillCooldown("[Perform] Bulwark Ballad") == 0 && _BulwarkBallad == true)
                {
                    UseSkill("[Perform] Bulwark Ballad");
                    Log(Time() + "[INFO]: Casting Bulwark Ballad");
                } Thread.Sleep(2000);

                if (isSkillLearned("[Perform] Bloody Chantey") == true && skillCooldown("[Perform] Bloody Chantey") == 0 && _BloodyChantey == true)
                {
                    UseSkill("[Perform] Bloody Chantey");
                    Log(Time() + "[INFO]: Casting Bloody Chantey");
                } Thread.Sleep(2000);

                if (isSkillLearned("[Perform] Ode to Recovery") == true && skillCooldown("[Perform] Ode to Recovery") == 0 && _OdetoRecovery == true)
                {
                    UseSkill("[Perform] Ode to Recovery");
                    Log(Time() + "[INFO]: Casting Ode to Recovery");
                } Thread.Sleep(2000);

                if (isSkillLearned("[Perform] Quickstep") == true && skillCooldown("[Perform] Quickstep") == 0 && _Quickstep == true)
                {
                    UseSkill("[Perform] Quickstep");
                    Log(Time() + "[INFO]: Casting Quickstep");
                } Thread.Sleep(2000);
                
                if (_ManaManage == true) { ManaCheck(); }
                Log(Time() + "[INFO]: Next Song Starts in 22 Seconds");
                Thread.Sleep(21500);
                Log(Time() + "[INFO]: Starting Next Rotation");
                
            }
        }
        
        public string Time()
        {
            string A = DateTime.Now.ToString("[hh:mm:ss] ");
            return A;
        }
        
        //Call on plugin stop
        public void PluginStop()
        {

        }
    }
}

Code:
Revision Notes: 1.0.1.49
Support for Self Buffs ( Brick Wall & Tyrenos's Index )
Support for Health Lift

Revision Notes: 1.0.1.35
Added Looting
Added Food/Pot Usage for Mana
Added Buffs [ Hummingbird Ditty & Aranzeb's Boon ]
Code used from [URL="https://www.thebuddyforum.com/archebuddy-forum/archebuddy-plugins/other/203049-plugin-partybuffer.html"]Party Buffer Plugin[/URL]

As of this time Dice rolls are not going to be added


Buff & Looting Code used from 

Revision Notes: 1.0.1.17
Rebuilt from Ground up & now Supports the full 30 second spell rotation. As well as a proper follow system.

Revision Notes 1.0.0.9
Updated the sleep to 18 seconds so it's going the full rotation properly at the 24-25 second mark.
Updated Songcraft Build

Revision Notes 1.0.0.7
Fixed Spelling Errors
Updated Timing to 2075 as 2000 seemed to miss the spell for some reason
 
Last edited:
Nice, thank you for your contribution. Good to see the Combat section is getting some love
 
Would love to help, unfortunately i wasn't blessed with a smart brain like you guys :) but i am 100% certain anyone here will help.
Thank you, I've had that for a few weeks now decided to develop further but running into issues.
 
Honestly, i'm not all that smart. But if you think of something that might make it better overall and it's not in my todo list let me know what you want and how you want it to actually work.
 
Ahh sorry just of cut the last two brackets off from the end

updated the source above
 
Hey is this possible to add the "Infuse" skill in the first part of the rotation on your selected target?

EDIT: I figured out how to add it myself.
 
Last edited:
Hey is this possible to add the "Infuse" skill in the first part of the rotation on your selected target?

EDIT: I figured out how to add it myself.

awesome, it's thoughts like this that got me started in programming things. Course i Still suck at it and most of what i make is a lot of trial and error to get things right.
 
@defectuous Ok I like this and all and its very helpful however it keep shuting it self off and I don't know why its running very well then noting and I see in plugins manager is turned off, I need to to run nonstop how can I make this do that?


so every time it drops target it clicks off any way I can remove it needing a target?
 
Last edited:
To answer this question It should be a simple remove the following lines

Code:
while (me.target == null)
{
Thread.Sleep(50);
}

Then change this while statement
FROM
Code:
while (me.target != null)
To
Code:
while (true)
 
Bro, your plugin auto stops by itself after a while, say half an hour. The plugin goes from Red square to Green in the Plugins Manager

Nice work nonetheless if you can fix this
 
Bro, your plugin auto stops by itself after a while, say half an hour. The plugin goes from Red square to Green in the Plugins Manager

Nice work nonetheless if you can fix this
This was just answered in the 2 post above yours ;)


@Defectuous:
Can you enlighten us how you properly add infuse at the beginning of the rotation?
I imagine you need to shorten the delay with 1'ich sec too?
 
This was just answered in the 2 post above yours ;)


@Defectuous:
Can you enlighten us how you properly add infuse at the beginning of the rotation?
I imagine you need to shorten the delay with 1'ich sec too?

Thank you. Works awesome now.
 
Revision Notes: 1.0.1.17
Rebuilt from Ground up & now Supports the full 30 second spell rotation. As well as a proper follow system.
 
Revision Notes: 1.0.1.35
Added Looting
Added Food/Pot Usage for Mana
Added Buffs [ Hummingbird Ditty & Aranzeb's Boon ]
Buff Code used from Party Buffer Plugin

As of this time Dice rolls are not going to be added
 
Back
Top