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

CCWatcher - Automated CC removal

Karls

New Member
Joined
Apr 11, 2014
Messages
324
Reaction score
2
[Plugin] CCWatcher - Automated CC removal

Simple plugin that watches out for crowd control effect and keeps immunity buffs up:
- Courageous Action (from Witchcraft) is being recasted when it expires to provide Sleep immunity
- Shrug if Off (Auramancy) is being used when a stun is detected
- Liberation (Auramancy) is being used when a silence is detected

If you're interested in different behaviours or support for more CC breakers, post here and I might be able to implement them.

How-To:
1. Create a new plugin in AB's plugin editor
2. Copy the code below in the file and save it
3. Compile it, it's ready to run now!

Code:
using System;
using System.Threading;
using System.Threading.Tasks;
using ArcheBuddy.Bot.Classes;
using System.Collections.Generic;
using System.Linq;

namespace CCWatcher
{
    public class CCWatcher : Core
    {
        public static string GetPluginAuthor()
        {
            return "Karls";
        }

        public static string GetPluginVersion()
        {
            return "1.0.1";
        }

        public static string GetPluginDescription()
        {
            return "CCWatcher";
        }

        public void PluginStop()
        {
            
        }

        private bool UseSkillAndWait(uint skillId, bool selfTarget = true)
        {
            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(10);

            UseSkill(skillId, true, selfTarget);

            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(10);

            return true;
        }

        const uint _COURAGEOUS_ACTION = 11424;
        const uint _SHRUF_IT_OFF = 11429;
        const uint _LIBERATION = 11380;
        
        const uint _BF_AWAKENING = 499;

        public void PluginRun()
        {
            ClearLogs();

            List<Skill> skills = me.getSkills();

            bool hasCourageousAction = skills.Any(s => s.id == _COURAGEOUS_ACTION);
            bool hasShrugItOff = skills.Any(s => s.id == _SHRUF_IT_OFF);
            bool hasLiberation = skills.Any(s => s.id == _LIBERATION);

            while (true)
            {
                Territory zone = getCurrentTerritory();

                // check that we're in a pvp zone and able to cast
                if (!me.sitOnMount && !me.isClimb && me.isAlive()
                    && (me.isInsideBattleField  || (zone.state != TerritoryState.Peace && zone.state != TerritoryState.Truce))
                )
                {
                    if (hasCourageousAction && buffTime(_BF_AWAKENING) == 0 && skillCooldown(_COURAGEOUS_ACTION) == 0)
                        UseSkillAndWait(_COURAGEOUS_ACTION);

                    else if (hasShrugItOff && isStun() && skillCooldown(_SHRUF_IT_OFF) == 0)
                        UseSkillAndWait(_SHRUF_IT_OFF);

                    else if (hasLiberation && isSilense() && skillCooldown(_LIBERATION) == 0)
                        UseSkillAndWait(_LIBERATION);
                }

                Thread.Sleep(10);
            }
        }
    }
}

Liked my plugins? Buy me a coffee (or more!) to help additional development :cool:
 
Last edited:
Wow such a quick turnaround, I just sent you a tip for the amazing work. Tested and looks like it works as well.
 
Made a few changes to stop the crashing in arenas (at least from the few attempts I could do so far, the queues make it a bit annoying to test) and added a few more checks for when to not cast at all.
 
Hey Karls, I am testing the new version and it doesn't seem to be applying the buff at all anymore, it is running but doesn't apply or reply CA.

Maybe I didn't notice the check for PVP zone now? Is it set to only stay live in Arena now?

*Update* I think it was because I was temporarily in a peace zone. It seems to be working in Ynystere now, I will test out arena
 
Last edited:
Yes, it should only cast it in arenas and non-peace zones, so plugin can stay on without your character rebuffing every minute for nothing while standing in Marianople (or whatever zone you're queueing from)
 
Great work Karls. I tested it for a few hours and it never went down! The only way it fails to rebuff is when you are at fault and casting something manually. Seems to be the best way we can have the logic work for now.
 
Can you please create one for Auramancy users (e.g. primevals) that uses:

1.Shrug it Off when stunned or impaled.

2.Liberation when Shackled or silenced.
 
Something I considered, but still unsure on how to detect the stun/silence/... I'll have to go get pwned in arena a bit with some dumper plugin to see if it's always the exact same debuff getting applied for each effect or if I need to collect a list of all stuns/silences/...
 
Karls, can u make something to spam Thwart from Auramancy? For Dreambreaker it's a good thing stack inspired
 
Can you please create one for Auramancy users (e.g. primevals) that uses:

1.Shrug it Off when stunned or impaled.

2.Liberation when Shackled or silenced.

Bit late on that update, but better late than never! Should work at least for the stun/silence parts.
 
Maybe you have checked that during your tests, does "isStun" check only for stun or also for impaled?
Same for Shackled and Silenced?
 
I didn't have time to test it out yet (not in the right spec + no time to queue for arenas at the moment), so counting on feedback to know if this works ;)
 
Can you please add these if its not much trouble?
Bondbreaker (Battlerage)
Snare (Archery) [Removes shackle]
Dropback/Shadowstep (Shadowplay) [Helpful in dodging Earthengrip/Bubble trap when cast right before its gonna hit]
I don't know if stillness falls under cc breaker but Stillness (Occultism) [Silences casts being made around you]
 
Love your plugin Karls

Is there anyway to have it not use Courageous Action while stealth? Keeps popping me out of stealth to recast.
 
Back
Top