Jump to content

Party Buffing


Dashia

Recommended Posts

Hello, im running Wrotations on a priest with a ret pala on party bot. I want the Priest to rebuff  as soon as someone is missing Fortitude and Paladin should buff Priest with Wisdom and himself with Might. Cant get it to work properly. Im playing on 3.3.5, atm still with the trial version.

Link to comment
Share on other sites

Hello, in you spell activate option "For friends (party)".

When you use "For friends (party)", you need to use spell condition "Target..." (replace condition "Buff" by "Target Buff"), and check manually target distance (put spell range) with conditon "Target Distance". This option works only on product "WRotation" and "Party".

Link to comment
Share on other sites

I tried to do it like that , but still doesnt work. Priest runs on Partybot. I took Dreamfuls profile as base, so props to him

 

 

 

Ok , the priest buffs now both when his fortitude runs out, but not when the buff is gone on the other toon only. Can live with that, if there's no better way to do it. But is it somehow possible to modify the partybot, that he sits down and drinks if mana is low? Also can the partybot target questgivers and such, when my character does, somehow? Can someone write a plugin for that? Besides these small things it works really great, especially with 2 displays and a multiboxing tool like pwnboxer to instantly log in 5 windows. Jamba is a very good addon for those interested in multibotting/boxing leveling/dungeons.

If it were somehow possible that the bots dont follow in a straight line but offset, nobody could even notice they are "multiboxed". Anyways Wrobot is awesome, even a programming newb like me can do some really good combat routines. Gonna buy it!

Im working on 1-80 Class Routines for all classes, as i lvl up. Will be both usable in a group and solo. I'll share them as soon as i feel they work reliable and intelligent all the way.

 

Priest [Shadow] [Leveling 1-80] [WotLK] - Dreamful Reedit.xml

Link to comment
Share on other sites

That would be nice of you!

I figured out how to make the followers target questgivers and such automatically, the Jamba addon lets them autoturnin and even pick the right reward for their respective class.

I made a  "/assist *Name/Focus* in WoW , put an unused keybind to it, then in the advanced settings of wrobot i went to the tab "Macros" and set a 1s pulse on this keybind, but only out of combat. So they target, what i target, when not in fight.

Is also helpful for Multiboxing keymapping, i target some stranger walking by, press a keybind on my main char and the other buffs him as its custom when meeting people. :)

Link to comment
Share on other sites

private Spell _motw;
_motw = new Spell("Mark of the Wild"); //change Mark of the Wild to your buff name you wanna give people same for other mark of the wild below
if (!_motw.KnownSpell) return false;
if (!_motw.IsSpellUsable) return false;
int motwmana = 80;
if (motwmana == 0) return false;
var members = getPartymembers().Where(o => o.IsValid && o.IsAlive && !o.HaveBuff("Mark of the Wild") && !o.HaveBuff("Drums of the Wild") && ObjectManager.Me.ManaPercentage >= motwmana && !TraceLine.TraceLineGo(o.Position)).OrderBy(o => o.HealthPercent);
if (members.Count() > 0)
{
	var u = members.First();
	WoWPlayer healTarget = new WoWPlayer(u.GetBaseAddress);
	if (!TraceLine.TraceLineGo(healTarget.Position) && healTarget.IsAlive)
	{
		Interact.InteractGameObject(healTarget.GetBaseAddress, false);
		_motw.Launch();
	}
}

i believe it works like this. If not then i can't help cuz i'm too busy with other projects

Link to comment
Share on other sites

You don't need to cast it on the target, if you cast it on yourself, then everyone get the buff. Don't make things too complicate.

private Spell MoTW = new Spell("Mark of the Wild");
    public bool needMotw(bool reqs)
    {
        if (!reqs) return false;
        if (!MoTW.KnownSpell) return false;
        if (!MoTW.IsSpellUsable) return false;
        var t = GetPartyMembers().Where(p => p != null

            && p.GetDistance <= 40
            && !p.HaveBuff(MoTW.Name)
            && !p.HaveBuff("Legacy of the Emperor")
            && !p.HaveBuff("Blessing of Kings")
            && !p.HaveBuff("Lone Wolf: Power of the Primates")
            && !p.HaveBuff("Bark of the Wild")
            && !p.HaveBuff("Blessing of Kongs")
            && !p.HaveBuff("Embrace of the Shale Spider")
            && !p.HaveBuff("Strength of the Earth"));
        if (t != null)
        {
            try
            {
                SpellManager.CastSpellByNameOn(MoTW.Name, ObjectManager.Me.Name);
                Logging.WriteFight(MoTW.Name);
                return true;
            }
            catch (Exception e)
            {
                Logging.WriteFight("MotW: " + e.Message);
            }
        }
        return false;
    }

 

Then just look if you need it :

if (needMotw(Party.GetPartyNumberPlayers() > 0)) return true;

Link to comment
Share on other sites

No, this is WotLk 3.3.5, where GroupBuffing is available at 50 -60 first. I need something for lvl 1-50~. Thanks for the input tho, i still have use for this :)

Link to comment
Share on other sites

don't matter if it's 3.3.5, the code checks if you are in a party and if some1 doesn't have a stats buff, if not, cast it on yourself, and the others in your party get it also. Even buffs from MoP or Draenor, don't matter, they will not have it and cause no error.

Link to comment
Share on other sites

2 minutes ago, Pasterke said:

don't matter if it's 3.3.5, the code checks if you are in a party and if some1 doesn't have a stats buff, if not, cast it on yourself, and the others in your party get it also. Even buffs from MoP or Draenor, don't matter, they will not have it and cause no error.

not every buff go to everyone on wotlk

Link to comment
Share on other sites

But Motw and Power Word; Fortitude does. And with a range class, never use interact + launch, because using that wil try the toon to get in meleerange. Use SpellManager.CastSpellByNameLUAOn(name spell, name target);

Link to comment
Share on other sites

Doesnt help until then, Mark of the Wild at lvl 5  and Gift of the Wild at lvl 50 as example given. also as betterSister said, there are still some single target buffs, dor which i want to be able to fully control conditions. 

Its obvious, that  Raid Buffs like Gift of the Wild are supereasy to add in the config. But if i say have a paladin who can buff Wisdom, Might or Kings on my 5man grp plus pets, i want it to be configurable individual. I havent tested your script yet, @betterSister, but will try tonight. Thanks for the help, ill figure it out.

Link to comment
Share on other sites

Ok, here you go

public static List<WoWUnit> getPartyPets()
        {
            Vector3 myPos = ObjectManager.Me.Position;
            var ret = new List<WoWUnit>();
            var pets = ObjectManager.GetObjectWoWUnit().Where(p => p != null
                && p.IsPet).ToList();
            foreach (var m in pets)
            {
                if (m.IsValid && m.IsAlive && m.InCombat && m.Target.IsNotZero() && m.Position.DistanceTo2D(myPos) <= 40 && !TraceLine.TraceLineGo(m.Position))
                {
                    if (ret.All(u => u.Guid != m.Target))
                    {
                        var targetUnit = new WoWUnit(ObjectManager.GetObjectByGuid(m.Target).GetBaseAddress);
                        if (targetUnit.IsValid && targetUnit.IsAlive)
                        {
                            ret.Add(targetUnit);
                        }
                    }
                }
            }
            return ret;
        }
        public static List<WoWUnit> GetPartyTargets()
        {
            Vector3 myPos = ObjectManager.Me.Position;
            var partyMembers = Party.GetPartyHomeAndInstance();
            
            var ret = new List<WoWUnit>();

            foreach (var m in partyMembers)
            {
                if (m.IsValid && m.IsAlive && m.InCombat && m.Target.IsNotZero() && m.Position.DistanceTo2D(myPos) <= 40 && !TraceLine.TraceLineGo(m.Position))
                {
                    if (ret.All(u => u.Guid != m.Target))
                    {
                        var targetUnit = new WoWUnit(ObjectManager.GetObjectByGuid(m.Target).GetBaseAddress);
                        if (targetUnit.IsValid && targetUnit.IsAlive)
                        {
                            ret.Add(targetUnit);
                        }
                    }
                }
            }
            return ret;
        }

        public static int partyCount { get { return GetPartyTargets().Count(); } }

        public static bool buffExists(WoWUnit unit, string buff)
        {
            return unit.HaveBuff(buff);
        }

        public static bool petBuffExists(string buff)
        {
            return ObjectManager.Pet.HaveBuff(buff);
        }

        public HashSet<string> statsBuffs = new HashSet<string>()
        {
            "Mark of the Wild",
            "Blessing of Kings",
            "Gift of the Wild"
        };

        public bool checkBuff(WoWUnit unit)
        {
            var a = unit.GetAllBuff();
            foreach(var aura in a)
            {
                if (statsBuffs.Contains(aura.ToString())) return false;
            }
            return true;
        }

        public bool needStatsBuff(string buff, bool reqs)
        {
            if (!reqs) return false;
            foreach(WoWUnit t in GetPartyTargets())
            {
                if (!buffExists(t, buff) && !checkBuff(t))
                {
                    try
                    {
                        SpellManager.CastSpellByNameOn(buff, t.Name);
                        Logging.WriteFight(buff + "on " + t.Name);
                        return true;
                    }
                    catch(Exception e) { Logging.WriteFight("Single StatsBuffs: " + e.Message); }
                }
            }
            return false;
        }
       public bool petsNeedStats(string buff, bool reqs)
        {
            if (!reqs) return false;
            foreach (WoWUnit t in getPartyPets())
            {
                if (!buffExists(t, buff) && !checkBuff(t))
                {
                    try
                    {
                        SpellManager.CastSpellByNameOn(buff, t.Name);
                        Logging.WriteFight(buff + "on " + t.Name);
                        return true;
                    }
                    catch (Exception e) { Logging.WriteFight("Pet StatsBuffs: " + e.Message); }
                }
            }
            return false;
        }
        private Spell motw = new Spell("Mark of the Wild");
        public void Routine()
        {
            if (partyCount > 0 && needStatsBuff("Mark of the Wild", motw.KnownSpell && motw.IsSpellUsable)) return;
            if (partyCount > 0 && petsNeedStats("Mark of the Wild", motw.KnownSpell && motw.IsSpellUsable)) return;
        }

To check for other buffs make a new hashset and new bools, eg. needFortitude, petsNeedFortitude

Link to comment
Share on other sites

That's the c# programming language, not scripts.

Install visual studio (the free version) and learn how to work with it. It's not that difficult :)

You can load a .cs files in visual studio and see the code. With intellisense it helps you alot to add or change code.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...