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

[Plugin] Trinity Fork (Kite/Avoidance)

hey buddme, thx for this new version. i found one thing strange that is the bot will stop when the bot reach the entry for next level of rift. do you know how to fix it? i am using ur trinity and latest questtool
 
For rend :
601 - 647
Code:
public static bool CanUseRend
        {
            get
            {
                bool hasReserveEnergy = (!IsWaitingForSpecial && Player.PrimaryResource >= 25) || (IsWaitingForSpecial && Player.PrimaryResource > MinEnergyReserve);

                return
                    !UseOOCBuff &&
                    !Player.IsIncapacitated &&
                    hasReserveEnergy &&
                    CanCast(SNOPower.Barbarian_Rend) &&
                    (TimeSincePowerUse(SNOPower.Barbarian_Rend) >= RendTime || SpellHistory.GetSpellLastMyPosition(SNOPower.Barbarian_Rend).Distance2D(Player.Position) >= RendRadius) &&
                    (Trinity.ObjectCache.Count(o => o.IsUnit && !o.HasDotDPS && o.RadiusDistance <= RendRadius) >= RendMinCount || TargetUtil.AnyMobsInRange(RendRadius, RendMinCount + 5, false));
            }
        }
        private static int RendMinCount
        {
            get
            {
                if (Sets.WrathOfTheWastes.IsFirstBonusActive)
                    return 5;

                return 3;
            }
        }
        private static float RendRadius
        {
            get
            {
                if (Runes.Barbarian.Ravage.IsActive)
                    return 18f -1;
                if (Runes.Barbarian.Bloodbath.IsActive)
                    return 10f - 1;

                return 12f - 1;
            }
        }
        private static int RendTime
        {
            get
            {
                if (Sets.WrathOfTheWastes.IsFirstBonusActive)
                    return 14500;

                return 4500;
            }
        }

For hydra:
Combat/TargetUtil line 1089-1240, add :
Code:
/// <summary>
        /// search for hydra point, support Zei's of stone
        /// </summary>
        /// <returns></returns>
        internal static Vector3 GetBestHydraPoint()
        {
            var list = ListUnitsInRangeOfPosition(Player.Position, 65f);
            if (list == null)
            {
                if (Trinity.CurrentTarget != null && Trinity.CurrentTarget.IsUnit)
                    return Trinity.CurrentTarget.Position;

                return Vector3.Zero;
            }

            Vector3 cluster = GetBestClusterPoint(CombatBase.IsZeisOfStoneEquipped ? 45f : 25f);
            if (!CombatBase.IsZeisOfStoneEquipped || !MainGrid.Map.Any())
                return cluster;

            var nodes = (
                from n in MainGrid.Map
                where
                    n.Position.Distance2D(cluster) <= 45f
                select n).ToList();

            if (nodes.Any())
            {
                foreach (var node in nodes)
                {
                    foreach (var u in list)
                    {
                        float distance = node.Position.Distance2D(u.Position);
                        if (distance <= 25f)
                        {
                            node.SpecialWeight += distance * u.Weight;
                        }
                    }
                }

                nodes = (
                    from n in nodes
                    orderby
                        n.SpecialWeight descending
                    select n).ToList();

                var bestNode = nodes.FirstOrDefault();
                if (bestNode.SpecialWeight > 0)
                    return bestNode.Position;
            }

            return cluster;
        }

and change in WizardCombat.cs
203-204
Code:
var pos = TargetUtil.GetBestHydraPoint();
                    return new TrinityPower(SNOPower.Wizard_Hydra, 55f, pos);

dunno if it work can't test it, let me know

For any report, plz active Targeting logging, weight logging and cache logging and attach a log
i've seen 0 door issue since my fix, i need to know your class, build etc, all is in log
 
Thank you BuddyMe will test immediatly!

Any news regarding the Dynamo Change? It works with 5 stacks but then it only puts down one I guess because TimeSpan / TimeUsed

edit: damn dude, awesome work, hydra placement is way way way better!

Now for a perfect melee wiz we only need the dynamo fix and you will see some bot players in the ladderboard :D!!!
 
Last edited:
He is not using Vengeance in trials, even tho i have it unmarked.
and always running in to the middle after etch wave.... Not got for DH / Range

Any chance to fix both of these ? ( change it to the position where he starts, thats fine. )
 
Thank you BuddyMe will test immediatly!

Any news regarding the Dynamo Change? It works with 5 stacks but then it only puts down one I guess because TimeSpan / TimeUsed

edit: damn dude, awesome work, hydra placement is way way way better!

Now for a perfect melee wiz we only need the dynamo fix and you will see some bot players in the ladderboard :D!!!
cool :) when the second need to cast how much dynamo has stack ?

edit:
He is not using Vengeance in trials, even tho i have it unmarked.
and always running in to the middle after etch wave.... Not got for DH / Range

Any chance to fix both of these ? ( change it to the position where he starts, thats fine. )
my DH running in middle before wave 4-5, after it kite at up-right, i add an unsafe zone to the middle ?
are you using the settings attach in first page ?

I take a look to the vengeance cast :)
 
Last edited:
it needs to put down the first hydra at 5 stacks and the 2nd again at 5 stacks again
 
it needs to put down the first hydra at 5 stacks and the 2nd again at 5 stacks again
Add this line 64-70
HTML:
// Second hydra
            if (CanCast(SNOPower.Wizard_Hydra, CanCastFlags.NoTimer) &&
                Legendary.SerpentsSparker.IsEquipped && LastPowerUsed == SNOPower.Wizard_Hydra &&
                SpellHistory.SpellUseCountInTime(SNOPower.Wizard_Hydra, TimeSpan.FromSeconds(2)) < 2)
            {
                return new TrinityPower(SNOPower.Wizard_Hydra, 55f, TargetUtil.GetBestHydraPoint());
            }
 
cool :) when the second need to cast how much dynamo has stack ?

edit:

my DH running in middle before wave 4-5, after it kite at up-right, i add an unsafe zone to the middle ?
are you using the settings attach in first page ?

I take a look to the vengeance cast :)

yeah fresh install on beta with your Trinity settings. Not using Vengeance (Seethe rune) in GR ether.
But awesome kite logic, He moves sometimes into melee range tho.. can't complain he finished gr40 in 3.5 min.


Dying alot cause of Grotesque , completely ignoring them.
 
yeah fresh install on beta with your Trinity settings. Not using Vengeance (Seethe rune) in GR ether.
But awesome kite logic, He moves sometimes into melee range tho.. can't complain he finished gr40 in 3.5 min.


Dying alot cause of Grotesque , completely ignoring them.
it kite grotesque at 0.95 pct health, i currently whrite an UI to set all of that :)

40 in 3.5 ? wow
try this in DemonCombat.cs (edit: line 350-358)
Code:
// Vengeance
            if (CanCast(SNOPower.X1_DemonHunter_Vengeance, CanCastFlags.NoTimer) &&
                ((!Settings.Combat.DemonHunter.VengeanceElitesOnly && TargetUtil.AnyMobsInRange(DHSettings.RangedAttackRange + 5f, 5)) || TargetUtil.AnyElitesInRange(DHSettings.RangedAttackRange + 5f)))
            {
                if (Runes.DemonHunter.Seethe.IsActive && Player.PrimaryResourcePct < 0.3 && !CanCast(SNOPower.DemonHunter_Preparation, CanCastFlags.NoTimer) && !CanCast(SNOPower.X1_DemonHunter_Companion, CanCastFlags.NoTimer))
                    return new TrinityPower(SNOPower.X1_DemonHunter_Vengeance);
                else if (!Runes.DemonHunter.Seethe.IsActive)
                    return new TrinityPower(SNOPower.X1_DemonHunter_Vengeance);
            }

And don't forget to uncheck "Use Vengeance on elite only" in your DH settings
 
Add this line 64-70
HTML:
// Second hydra
            if (CanCast(SNOPower.Wizard_Hydra, CanCastFlags.NoTimer) &&
                Legendary.SerpentsSparker.IsEquipped && LastPowerUsed == SNOPower.Wizard_Hydra &&
                SpellHistory.SpellUseCountInTime(SNOPower.Wizard_Hydra, TimeSpan.FromSeconds(2)) < 2)
            {
                return new TrinityPower(SNOPower.Wizard_Hydra, 55f, TargetUtil.GetBestHydraPoint());
            }

He puts down the 1st Hydra at 5 stacks but puts down the 2nd one right after and doesn't wait for 5 new stacks, almost there :D just need to get it to wait for new 5 stacks till 2nd hydra!

edit: sometimes it looks like its working but then he gets 5 stacks and puts down 2 hydras at once
 
Last edited:
thanks, yeah ill try that out and report back.



/// edit
Nope, not using it :confused: :(
 
Last edited:
He puts down the 1st Hydra at 5 stacks but puts down the 2nd one right after and doesn't wait for 5 new stacks, almost there :D just need to get it to wait for new 5 stacks till 2nd hydra!

edit: sometimes it looks like its working but then he gets 5 stacks and puts down 2 hydras at once
Removed my last ask from 63-71 and
add this line 108-115
Code:
// Second hydra
            if (CanCast(SNOPower.Wizard_Hydra, CanCastFlags.NoTimer) &&
                (!Passives.Wizard.ArcaneDynamo.IsActive || Passives.Wizard.ArcaneDynamo.BuffStacks >= 5) &&
                Legendary.SerpentsSparker.IsEquipped && LastPowerUsed == SNOPower.Wizard_Hydra &&
                SpellHistory.SpellUseCountInTime(SNOPower.Wizard_Hydra, TimeSpan.FromSeconds(2)) < 2)
            {
                return new TrinityPower(SNOPower.Wizard_Hydra, 55f, TargetUtil.GetBestHydraPoint());
            }
should work !
thanks, yeah ill try that out and report back.
ok thanks :)
 
Removed my last ask from 63-71 and
add this line 108-115
Code:
// Second hydra
            if (CanCast(SNOPower.Wizard_Hydra, CanCastFlags.NoTimer) &&
                (!Passives.Wizard.ArcaneDynamo.IsActive || Passives.Wizard.ArcaneDynamo.BuffStacks >= 5) &&
                Legendary.SerpentsSparker.IsEquipped && LastPowerUsed == SNOPower.Wizard_Hydra &&
                SpellHistory.SpellUseCountInTime(SNOPower.Wizard_Hydra, TimeSpan.FromSeconds(2)) < 2)
            {
                return new TrinityPower(SNOPower.Wizard_Hydra, 55f, TargetUtil.GetBestHydraPoint());
            }
should work !

ok thanks :)

yeah, Multishot ftw with the new set is op. 41 in 4 min and 29sec now and he dint use the vengeance.

ps. I noticed he stops for some wired reason and when i push him to mob close by he will start attacking again.
happend 4x now in 2x rifts.
 
BuddyMe you are amazing :D before my wiz was barely able to clear greater rift 39, it just finished 43 with the two changes we did! <3 <3

edit: would it be possible to to put a higher weight? at hydra?

reason: bot would have enough ressource to put down 2nd hydra but does blizzard and afterwards can't cast 2nd hydra

some kind of check like

if hydra count = 1 , cast hydra
if hydra count = 2, cast blizzard (or chosen ressource spender)

is that possible? ^^

or just lower ressource requirement for hydra so it will cast it with 5 stacks if available and blizzard (or other spender) as a filler! because he will only cast hydra with 5 stacks
 
Last edited:
yeah, Multishot ftw with the new set is op. 41 in 4 min and 29sec now and he dint use the vengeance.

ps. I noticed he stops for some wired reason and when i push him to mob close by he will start attacking again.
happend 4x now in 2x rifts.

it should use it when:
- primary resource < 30%
- can't cast preparation
- can't cast companion
and
- EliteOnly checked && Elite
OR EliteOnly unchecked && 5 mobs in range​

this logic seems ok, i dunno why it not use him
are you shure you have "Use on elite only" unchecked ?

BuddyMe you are amazing :D before my wiz was barely able to clear greater rift 39, it just finished 43 with the two changes we did! <3 <3

edit: would it be possible to to put a higher weight? at hydra?

reason: bot would have enough ressource to put down 2nd hydra but does blizzard and afterwards can't cast 2nd hydra

some kind of check like

if hydra count = 1 , cast hydra
if hydra count = 2, cast blizzard (or chosen ressource spender)

is that possible? ^^

or just lower ressource requirement for hydra so it will cast it with 5 stacks if available and blizzard (or other spender) as a filler! because he will only cast hydra with 5 stacks
aha cool !
I think yes, will see
 
Last edited:
What can I do to get my bot break the doors and objects who are blocking the way?
 
it should use it when:
- primary resource < 30%
- can't cast preparation
- can't cast companion
and
- EliteOnly checked && Elite
OR EliteOnly unchecked && 5 mobs in range​

this logic seems ok, i dunno why it not use him
are you shure you have "Use on elite only" unchecked ?


aha cool !
I think yes, will see

Yeah, Stopping now when zoning to another rift for few secounds and after getting killed waiting for few seconds ....
But like you see on the pic I have it unmarked - he died 5x now this run so far and never used vengeance.
Re edit the file just to be 10000% sure and restarted DB.

dno what the hell...

9ormFTp.jpg
 
Last edited:
I'm still having some issues with the bot having WOTB-uptime. May I ask what setup you used when running barb when you tested it?
Seems like he's having some issues keeping WOTB up.

EDIT: He seems to be using Rend very randomly. I did your rend-change posted last page, but that did nothing.
He either doesn't use it any at all, or spams 3-4 in a row.
The file I was supposed to edit was BarbarianCombat correct?

EDIT2:
He just stood still in a pack of Mauler-bosses and spammed rend 10 times after giving me this message:
"[Trinity] Error in HandleTarget.SetQueuedSpecialMovement: System.NullReferenceException: Object reference not set to an instance of an object.
at Trinity.Trinity.SetQueuedSpecialMovement() in c:\Users\Andreas\Desktop\DemonbuddyBETA 1.1.2251.516\Plugins\Trinity\Combat\HandleTarget.cs:line 1052"
 
Last edited:
Is it possible to check the neck piece we are wearing to see which affixes it can ignore or even stand in?
 
I think i figure out why he aren't using Vengeance, Im running UH so keeping up the discipline is a must,
and using Preparation with Invigoration to get more discipline (+rolling so on chest, wep and quiver)
So im never using prep, well the bot isn't but yeah, the logic behind the rune and the spec is needed.
So cause of prep is never on cd, he will not cast Vengeance.

it should use it when:
- primary resource < 30%
- can't cast preparation
- can't cast companion
and
- EliteOnly checked && Elite
OR EliteOnly unchecked && 5 mobs in range
 
Back
Top