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

[Plugin] Trinity Fork (Kite/Avoidance)

:D
5yj93RR.png
 
is there any good wiz support in this update with co-routines? :D <3
i will do exactly like trinity for now, i've make a new skill meta system like this:
Code:
/// <summary>
            /// This is the default skill meta for the Companion skill
            /// </summary>
            [XmlElement("Companion")]
            public class Companion : SkillMetaTest
            {
                #region Companion meta

                #region Instance

                private static Companion _instance;
                public static Companion Instance
                {
                    get { return _instance ?? (_instance = new Companion()); }
                    set { _instance = value; }
                }

                #endregion

                #region Construtors

                public Companion() :
                    base("CompanionMeta")
                { }

                #endregion

                public override string DisplayName { get { return "Companion meta"; } }
                public override Skill Skill { get { return Skills.DemonHunter.Companion; } }
                public override int DefaultRange { get { return 0; } }
                public override int MaxRange { get { return 0; } }

                /// <summary>
                /// The target types allowed by the skill
                /// </summary>
                public override TargetTypeFlags TargetTypeFlags
                {
                    get { return GroupTargetTypeFlags.Any; }
                }

                /// <summary>
                /// Get specific skill behavior depend of range and target.
                /// </summary>
                /// <param name="range"> The context range to check. </param>
                /// <param name="target"> The target to handle. </param>
                /// <returns>
                /// The result behavior.
                /// </returns>
                public override async Task<Behavior> GetBehavior(int range, VinciObject target)
                {
                    // Can cast part
                    CanCast = async (cRange, cTarget) =>
                    {
                        if (!await Skill.CanCast())
                            return Return(false, "CantCast");

                        if (!OffCooldown && Skill.TimeSinceUse < ForceCooldown)
                            return Return(false, "ForceCooldown");

                        if (cTarget.IsTrash && !CastOnTrashAllowed)
                            return Return(false, "!CastOnTrashAllowed");

                        if (cTarget.IsEliteRareUnique && !CastOnEliteAllowed)
                            return Return(false, "!CastOnEliteAllowed");

                        if (cTarget.Unit.IsBoss && !CastOnBossAllowed)
                            return Return(false, "!CastOnBossAllowed");

                        if (Runes.DemonHunter.SpiderCompanion.IsActive)
                        {
                            if (Context.TargetUtils.ClusterExists(SpiderCompanionClusterPackRadius, SpiderCompanionClusterPackSize))
                                return Return(true, "SpiderCompanionCluster");

                            if (Context.TargetUtils.EliteOrTrashInRange(SpiderCompanionEliteRange))
                                return Return(true, "SpiderCompanionElite");
                        }

                        if (Runes.DemonHunter.BatCompanion.IsActive && Context.Player.PrimaryResourceMissing >= BatCompanionRessourceMissing)
                            return Return(true, "BatCompanionRessourceMissing");

                        if (Runes.DemonHunter.BoarCompanion.IsActive && ((Context.TargetUtils.ClusterExists(20f, 4) && Context.TargetUtils.EliteOrTrashInRange(20f)) || (Context.Target.IsBossOrEliteRareUnique && Context.Target.Distance <= 20f)))
                            return Return(true, "BoarCompanion");

                        if (Runes.DemonHunter.FerretCompanion.IsActive && Context.GlobesCache.HealthGlobeExist && Context.GlobesCache.HealthGlobe.Distance <= 60f && Context.Player.CurrentHealthPct < Context.CombatUtils.PotionLimit)
                            return Return(true, "FerretCompanion");

                        if (Runes.DemonHunter.WolfCompanion.IsActive && (Context.TargetUtils.AnyElitesInRange(50f) || Context.TargetUtils.AnyMobsInRange(40f, 8)))
                            return Return(true, "WolfCompanion");

                        if (OffCooldown && Context.TargetUtils.AnyMobsInRange(50f))
                            return Return(true, "OffCooldown");

                        return Return(false, "EndCheck");
                    };

                    // Behavior part
                    if (await CanCast(range, target))
                    {
                        if (await Skill.Cast())
                        {
                            LastPost += " => SuccessfullyCast !";
                            return Behaviors.Continue(this);
                        }

                        LastPost += " => CastFailed !";
                    }
                        

                    return Behaviors.Null;
                }

                #region Empty things

                /// <summary>
                /// Execute something like a movement.
                /// </summary>
                /// <param name="target"> The position to handle. </param>
                /// <returns>
                /// If the task was executed something.
                /// </returns>
                public override Task<bool> GetBehavior(Vector3 target)
                {
                    return TaskHelpers.EmptyTaskBool;
                }

                /// <summary>
                /// Called on enable event
                /// </summary>
                public override Task OnInitialize()
                {
                    return TaskHelpers.EmptyTask;
                }

                /// <summary>
                /// Called on disable event
                /// </summary>
                public override Task OnDispose()
                {
                    return TaskHelpers.EmptyTask;
                }

                #endregion

                #region XmlFields

                private int _spiderCompanionClusterPackSize;
                private int _spiderCompanionClusterPackRadius;
                private int _spiderCompanionEliteRange;
                private int _batCompanionRessourceMissing;

                #endregion

                #region XmlProperties

                [Setting]
                [DefaultValue(4)]
                [Limit(0, 20)]
                [TickFrequency(1)]
                [XmlElement("SpiderCompanionClusterPackSize")]
                [DisplayName("Min trash pack size")]
                [Description("Minimum cluster pack size to valid cast")]
                [Category("Specific - SpiderCompanion")]
                public int SpiderCompanionClusterPackSize
                {
                    get { return _spiderCompanionClusterPackSize; }
                    set { _spiderCompanionClusterPackSize = value; OnPropertyChanged("SpiderCompanionClusterPackSize"); }
                }

                [Setting]
                [DefaultValue(25)]
                [Limit(0, 80)]
                [TickFrequency(2.5)]
                [XmlElement("SpiderCompanionClusterPackRadius")]
                [DisplayName("Min trash pack radius")]
                [Description("Minimum cluster pack radius to valid cast")]
                [Category("Specific - SpiderCompanion")]
                public int SpiderCompanionClusterPackRadius
                {
                    get { return _spiderCompanionClusterPackRadius; }
                    set { _spiderCompanionClusterPackRadius = value; OnPropertyChanged("SpiderCompanionClusterPackRadius"); }
                }

                [Setting]
                [DefaultValue(25)]
                [Limit(0, 80)]
                [TickFrequency(2.5)]
                [XmlElement("SpiderCompanionEliteRange")]
                [DisplayName("Elite range")]
                [Description("Minimum distance from an elite to valid cast")]
                [Category("Specific - SpiderCompanion")]
                public int SpiderCompanionEliteRange
                {
                    get { return _spiderCompanionEliteRange; }
                    set { _spiderCompanionEliteRange = value; OnPropertyChanged("SpiderCompanionEliteRange"); }
                }

                [Setting]
                [DefaultValue(60)]
                [Limit(0, 500)]
                [TickFrequency(5)]
                [XmlElement("BatCompanionRessourceMissing")]
                [DisplayName("Max primary ressource missing")]
                [Description("Maximum primary ressource missing to valid cast")]
                [Category("Specific - BatCompanion")]
                public int BatCompanionRessourceMissing
                {
                    get { return _batCompanionRessourceMissing; }
                    set { _batCompanionRessourceMissing = value; OnPropertyChanged("BatCompanionRessourceMissing"); }
                }

                #endregion

                #endregion
            }

Create a new meta is now realy easy, i will ask to community to update every skill behavior,
the Ui is generate auto with this code, no longer need to create xaml element etc, realy hop the community should help me to create all skill metas
 
Last edited:
i will do exactly like trinity for now, i've make a new skill meta system like this:
Code:
/// <summary>
            /// This is the default skill meta for the Companion skill
            /// </summary>
            [XmlElement("Companion")]
            public class Companion : SkillMetaTest
            {
                #region Companion meta

                #region Instance

                private static Companion _instance;
                public static Companion Instance
                {
                    get { return _instance ?? (_instance = new Companion()); }
                    set { _instance = value; }
                }

                #endregion

                #region Construtors

                public Companion() :
                    base("CompanionMeta")
                { }

                #endregion

                public override string DisplayName { get { return "Companion meta"; } }
                public override Skill Skill { get { return Skills.DemonHunter.Companion; } }
                public override int DefaultRange { get { return 0; } }
                public override int MaxRange { get { return 0; } }

                /// <summary>
                /// The target types allowed by the skill
                /// </summary>
                public override TargetTypeFlags TargetTypeFlags
                {
                    get { return GroupTargetTypeFlags.Any; }
                }

                /// <summary>
                /// Get specific skill behavior depend of range and target.
                /// </summary>
                /// <param name="range"> The context range to check. </param>
                /// <param name="target"> The target to handle. </param>
                /// <returns>
                /// The result behavior.
                /// </returns>
                public override async Task<Behavior> GetBehavior(int range, VinciObject target)
                {
                    // Can cast part
                    CanCast = async (cRange, cTarget) =>
                    {
                        if (!await Skill.CanCast())
                            return Return(false, "CantCast");

                        if (!OffCooldown && Skill.TimeSinceUse < ForceCooldown)
                            return Return(false, "ForceCooldown");

                        if (cTarget.IsTrash && !CastOnTrashAllowed)
                            return Return(false, "!CastOnTrashAllowed");

                        if (cTarget.IsEliteRareUnique && !CastOnEliteAllowed)
                            return Return(false, "!CastOnEliteAllowed");

                        if (cTarget.Unit.IsBoss && !CastOnBossAllowed)
                            return Return(false, "!CastOnBossAllowed");

                        if (Runes.DemonHunter.SpiderCompanion.IsActive)
                        {
                            if (Context.TargetUtils.ClusterExists(SpiderCompanionClusterPackRadius, SpiderCompanionClusterPackSize))
                                return Return(true, "SpiderCompanionCluster");

                            if (Context.TargetUtils.EliteOrTrashInRange(SpiderCompanionEliteRange))
                                return Return(true, "SpiderCompanionElite");
                        }

                        if (Runes.DemonHunter.BatCompanion.IsActive && Context.Player.PrimaryResourceMissing >= BatCompanionRessourceMissing)
                            return Return(true, "BatCompanionRessourceMissing");

                        if (Runes.DemonHunter.BoarCompanion.IsActive && ((Context.TargetUtils.ClusterExists(20f, 4) && Context.TargetUtils.EliteOrTrashInRange(20f)) || (Context.Target.IsBossOrEliteRareUnique && Context.Target.Distance <= 20f)))
                            return Return(true, "BoarCompanion");

                        if (Runes.DemonHunter.FerretCompanion.IsActive && Context.GlobesCache.HealthGlobeExist && Context.GlobesCache.HealthGlobe.Distance <= 60f && Context.Player.CurrentHealthPct < Context.CombatUtils.PotionLimit)
                            return Return(true, "FerretCompanion");

                        if (Runes.DemonHunter.WolfCompanion.IsActive && (Context.TargetUtils.AnyElitesInRange(50f) || Context.TargetUtils.AnyMobsInRange(40f, 8)))
                            return Return(true, "WolfCompanion");

                        if (OffCooldown && Context.TargetUtils.AnyMobsInRange(50f))
                            return Return(true, "OffCooldown");

                        return Return(false, "EndCheck");
                    };

                    // Behavior part
                    if (await CanCast(range, target))
                    {
                        if (await Skill.Cast())
                        {
                            LastPost += " => SuccessfullyCast !";
                            return Behaviors.Continue(this);
                        }

                        LastPost += " => CastFailed !";
                    }
                        

                    return Behaviors.Null;
                }

                #region Empty things

                /// <summary>
                /// Execute something like a movement.
                /// </summary>
                /// <param name="target"> The position to handle. </param>
                /// <returns>
                /// If the task was executed something.
                /// </returns>
                public override Task<bool> GetBehavior(Vector3 target)
                {
                    return TaskHelpers.EmptyTaskBool;
                }

                /// <summary>
                /// Called on enable event
                /// </summary>
                public override Task OnInitialize()
                {
                    return TaskHelpers.EmptyTask;
                }

                /// <summary>
                /// Called on disable event
                /// </summary>
                public override Task OnDispose()
                {
                    return TaskHelpers.EmptyTask;
                }

                #endregion

                #region XmlFields

                private int _spiderCompanionClusterPackSize;
                private int _spiderCompanionClusterPackRadius;
                private int _spiderCompanionEliteRange;
                private int _batCompanionRessourceMissing;

                #endregion

                #region XmlProperties

                [Setting]
                [DefaultValue(4)]
                [Limit(0, 20)]
                [TickFrequency(1)]
                [XmlElement("SpiderCompanionClusterPackSize")]
                [DisplayName("Min trash pack size")]
                [Description("Minimum cluster pack size to valid cast")]
                [Category("Specific - SpiderCompanion")]
                public int SpiderCompanionClusterPackSize
                {
                    get { return _spiderCompanionClusterPackSize; }
                    set { _spiderCompanionClusterPackSize = value; OnPropertyChanged("SpiderCompanionClusterPackSize"); }
                }

                [Setting]
                [DefaultValue(25)]
                [Limit(0, 80)]
                [TickFrequency(2.5)]
                [XmlElement("SpiderCompanionClusterPackRadius")]
                [DisplayName("Min trash pack radius")]
                [Description("Minimum cluster pack radius to valid cast")]
                [Category("Specific - SpiderCompanion")]
                public int SpiderCompanionClusterPackRadius
                {
                    get { return _spiderCompanionClusterPackRadius; }
                    set { _spiderCompanionClusterPackRadius = value; OnPropertyChanged("SpiderCompanionClusterPackRadius"); }
                }

                [Setting]
                [DefaultValue(25)]
                [Limit(0, 80)]
                [TickFrequency(2.5)]
                [XmlElement("SpiderCompanionEliteRange")]
                [DisplayName("Elite range")]
                [Description("Minimum distance from an elite to valid cast")]
                [Category("Specific - SpiderCompanion")]
                public int SpiderCompanionEliteRange
                {
                    get { return _spiderCompanionEliteRange; }
                    set { _spiderCompanionEliteRange = value; OnPropertyChanged("SpiderCompanionEliteRange"); }
                }

                [Setting]
                [DefaultValue(60)]
                [Limit(0, 500)]
                [TickFrequency(5)]
                [XmlElement("BatCompanionRessourceMissing")]
                [DisplayName("Max primary ressource missing")]
                [Description("Maximum primary ressource missing to valid cast")]
                [Category("Specific - BatCompanion")]
                public int BatCompanionRessourceMissing
                {
                    get { return _batCompanionRessourceMissing; }
                    set { _batCompanionRessourceMissing = value; OnPropertyChanged("BatCompanionRessourceMissing"); }
                }

                #endregion

                #endregion
            }

Create a new meta is now realy easy, i will ask to community to update every skill behavior,
the Ui is generate auto with this code, no longer need to create xaml element etc, realy hop the community should help me to create all skill metas


I understand like 10% of that but that is still impressive. Can't wait :O
 
what data do you need to figure out the problem with YAR? D3 & DB crashes multiple times a day on me so its not practical to bot without it.

I am running this now on my DH in Grifts without any issue so far.

Is there any way to identify buff's from shrines? Its a shame to get a shrine and the bot still kites/avoids when its not needed. pipe dreams I suppose
 
Okay since there isn't any type of installation instructions for whatever reason being, Can someone please walk me through how to install this plugin? I extracted it to the plugin folder but i keep getting compiling errors. Would greatly appreciate any advice because there are no instructions apparently.
 
Okay since there isn't any type of installation instructions for whatever reason being, Can someone please walk me through how to install this plugin? I extracted it to the plugin folder but i keep getting compiling errors. Would greatly appreciate any advice because there are no instructions apparently.

Same here, would be great to have a small explanation on how to install :)

EDIT : ok so I used this one : Trinity fork fix
And it's all good.

Should update the first post for the quick link to fix :)
 
Last edited:
i continue the job, beta soon i hope

I would love to help you test your Beta plugin. I have almost BIS geared Monk, DH and Barb. I have a Crusader and WD with some gear as well. I can run detailed logs and help report issues for you ti fix as needed!

Let me know if I can be of any help!

Great job BuddyMe!
 
Well next update seems promising.

I hope you will add some guide/hints on what the setting are for.
 
omg can't wait!!! im so exciting!!! :)

thank you so much for your work

I always appreciate!!! Thank you Thank you!
 
can help ???
when i download all replace my old trinity with fork Demonbuddy not showing any trinity ><
 
This plugin seems to be broken, any ideas on how to get it working with the latest beta build?

Also, is there a way we can use EZUpdater with this?
 
the fork project is discontinued for now, i work on a new plugin to replace Trinity, a beta should be ready soon.
 
the fork project is discontinued for now, i work on a new plugin to replace Trinity, a beta should be ready soon.

Where'd you learn to write these plugins? I'm a web developer. I'd like to help, but I don't know where to get started.
 
trinity fork doesnt work....it doesnot shows out.. log:
Flashing window
Compiler Error: d:\Arzes\Desktop\DB\DB612\Plugins\Trinity\Items\ItemWrapper.cs(12,18) : warning CS0660: 'Trinity.Items.ItemWrapper' defines operator == or operator != but does not override Object.Equals(object o)
Compiler Error: d:\Arzes\Desktop\DB\DB612\Plugins\Trinity\Combat\Enemies.cs(156,37) : warning CS0108: 'Trinity.Combat.TargetCluster.GetTargetWithoutDebuffs(System.Collections.Generic.IEnumerable<Zeta.Game.Internals.Actors.SNOPower>)' hides inherited member 'Trinity.Combat.TargetArea.GetTargetWithoutDebuffs(System.Collections.Generic.IEnumerable<Zeta.Game.Internals.Actors.SNOPower>)'. Use the new keyword if hiding was intended.
Compiler Error: d:\Arzes\Desktop\DB\DB612\Plugins\Trinity\Items\CachedACDItem.cs(294,41) : error CS0266: Cannot implicitly convert type 'long' to 'int'. An explicit conversion exists (are you missing a cast?)
Compiler Error: d:\Arzes\Desktop\DB\DB612\Plugins\Trinity\Items\ItemWrapper.cs(83,37) : error CS0266: Cannot implicitly convert type 'long' to 'int'. An explicit conversion exists (are you missing a cast?)
Compiler Error: d:\Arzes\Desktop\DB\DB612\Plugins\Trinity\Items\TrinityItemManager.cs(1043,49) : error CS0266: Cannot implicitly convert type 'long' to 'int'. An explicit conversion exists (are you missing a cast?)
 
Back
Top