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

[Guide] A walkthrough of changing skill activation criteria (range etc) for Dummies!

cant get it to work... but i wanted the bot to cast earthquake (barbarian) when surrounded by 5> enemies. Could anyone help?

I don't have a Barbarian so I can't test this, but it should work.

Open Plugins\Trinity\Combat\Abilities\BarbarianCombat.cs and find:
Code:
        public static bool CanCastEarthquake
        {
            get
            {
                return
                    !UseOOCBuff &&
                    !IsCurrentlyAvoiding &&
                    !Player.IsIncapacitated &&
                    CanCast(SNOPower.Barbarian_Earthquake) &&
                    !GetHasBuff(SNOPower.Barbarian_Earthquake) &&
                    TargetUtil.IsEliteTargetInRange(6f) &&
                    Player.PrimaryResource > 50;
            }
        }

And replace it with this:
Code:
        public static bool CanCastEarthquake
        {
            get
            {
                return
                    (!UseOOCBuff &&
                    !IsCurrentlyAvoiding &&
                    !Player.IsIncapacitated &&
                    CanCast(SNOPower.Barbarian_Earthquake) &&
                    !GetHasBuff(SNOPower.Barbarian_Earthquake) &&
					Player.PrimaryResource > 50) &&
                    (TargetUtil.IsEliteTargetInRange(6f) || TargetUtil.AnyMobsInRange(10, 5));
            }
        }
 
Is there a way to incorporate:
Code:
(TargetUtil.AnyElitesInRange(15, 1) || TargetUtil.AnyMobsInRange(15, 10) || ((CurrentTarget.IsEliteRareUnique || CurrentTarget.IsTreasureGoblin || CurrentTarget.IsBoss)
on Locust Swarm skill? i'm trying but w/o sucess.

Trying on TrinityPlugin-1.8.18 WD file.
 
how can i edit the wave of force code that the bot use it always when he have enough arcanepower even if there are 1 or more mops?

PHP:
 // Wave of force
                if (!UseOOCBuff && !Player.IsIncapacitated && Player.PrimaryResource >= 25 && CombatBase.CanCast(SNOPower.Wizard_WaveOfForce) &&
                    (TargetUtil.AnyElitesInRange(1, 1) || TargetUtil.AnyMobsInRange(1, 4) || Player.CurrentHealthPct <= 0.7 || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 23f)))
                {
                    return new TrinityPower(SNOPower.Wizard_WaveOfForce, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 2, WAIT_FOR_ANIM);
                }

                //SkillDict.Add("Blizzard", SNOPower.Wizard_Blizzard);
                //RuneDict.Add("GraspingChill", 2);
                //RuneDict.Add("FrozenSolid", 4);
                //RuneDict.Add("Snowbound", 3);
                //RuneDict.Add("StarkWinter", 1);
                //RuneDict.Add("UnrelentingStorm", 0);

                bool hasSnowBoundRune = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Wizard_Blizzard && s.RuneIndex == 3);

i have changed the (TargetUtil.AnyElitesInRange(15, 1) to (1, 1) and TargetUtil.AnyMobsInRange(15, 4) to (1, 4) but nothing happens with this settings.
the bot use wave of force only sometimes.
 
Last edited:
how can i edit the wave of force code that the bot use it always when he have enough arcanepower even if there are 1 or more mops?

PHP:
 // Wave of force
                if (!UseOOCBuff && !Player.IsIncapacitated && Player.PrimaryResource >= 25 && CombatBase.CanCast(SNOPower.Wizard_WaveOfForce) &&
                    (TargetUtil.AnyElitesInRange(1, 1) || TargetUtil.AnyMobsInRange(1, 4) || Player.CurrentHealthPct <= 0.7 || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 23f)))
                {
                    return new TrinityPower(SNOPower.Wizard_WaveOfForce, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 2, WAIT_FOR_ANIM);
                }

                //SkillDict.Add("Blizzard", SNOPower.Wizard_Blizzard);
                //RuneDict.Add("GraspingChill", 2);
                //RuneDict.Add("FrozenSolid", 4);
                //RuneDict.Add("Snowbound", 3);
                //RuneDict.Add("StarkWinter", 1);
                //RuneDict.Add("UnrelentingStorm", 0);

                bool hasSnowBoundRune = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Wizard_Blizzard && s.RuneIndex == 3);

i have changed the (TargetUtil.AnyElitesInRange(15, 1) to (1, 1) and TargetUtil.AnyMobsInRange(15, 4) to (1, 4) but nothing happens with this settings.
the bot use wave of force only sometimes.

The first number is the minimum distance in feet away from your character the mob has to be before the skill will be used. The second number is the amount of mobs that need to be within that distance before the skill will be used.
You would want to change TargetUtil.AnyElitesInRange(15, 1) to something like TargetUtil.AnyElitesInRange(20, 1) and TargetUtil.AnyMobsInRange(15, 4) to TargetUtil.AnyMobsInRange(20, 1)
 
The first number is the minimum distance in feet away from your character the mob has to be before the skill will be used. The second number is the amount of mobs that need to be within that distance before the skill will be used.
You would want to change TargetUtil.AnyElitesInRange(15, 1) to something like TargetUtil.AnyElitesInRange(20, 1) and TargetUtil.AnyMobsInRange(15, 4) to TargetUtil.AnyMobsInRange(20, 1)

thank you!
now the bot can play my melee build.
 
Can someone help me get my WD to use big bad voodoo on ghom? I managed to get him to use fetish army using these instructions but I can't get BBV to work still. My pets tank him so far away.
 
Are the if-conditions for using a certain skill checked in order ? Or are there other factors that influence those ?

Cause i want my monk to use exploding palm before everything else, cant really get that working though. He's still using epiphany and mystic ally first.
 
Is there a way to completely disable the use of skills, while in town? Bot keeps wasting the cooldowns of mobility spells to get to the tp/waypoint.
 
Last edited:
Code:
 //Use Mantra of Healing active if health is low for shield.
            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2) && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") &&
                !Player.IsIncapacitated && !GetHasBuff(SNOPower.X1_Monk_MantraOfHealing_v2))
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
            }

            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfEvasion_v2) && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") &&
                !GetHasBuff(SNOPower.X1_Monk_MantraOfEvasion_v2) && CurrentTarget != null)
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfEvasion_v2);
            }

To have it use this mantra @ 60% health should i change Player.CurrentHealthPct <= V.F to Player.CurrentHealthPct <= 0.60 ?
Or do i leave the V.F there.
And where does that V.F stands for ?

Cheers
 
how can i edit the wave of force code that the bot use it always when he have enough arcanepower even if there are 1 or more mops?

PHP:
 // Wave of force
                if (!UseOOCBuff && !Player.IsIncapacitated && Player.PrimaryResource >= 25 && CombatBase.CanCast(SNOPower.Wizard_WaveOfForce) &&
                    (TargetUtil.AnyElitesInRange(1, 1) || TargetUtil.AnyMobsInRange(1, 4) || Player.CurrentHealthPct <= 0.7 || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 23f)))
                {
                    return new TrinityPower(SNOPower.Wizard_WaveOfForce, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 2, WAIT_FOR_ANIM);
                }

                //SkillDict.Add("Blizzard", SNOPower.Wizard_Blizzard);
                //RuneDict.Add("GraspingChill", 2);
                //RuneDict.Add("FrozenSolid", 4);
                //RuneDict.Add("Snowbound", 3);
                //RuneDict.Add("StarkWinter", 1);
                //RuneDict.Add("UnrelentingStorm", 0);

                bool hasSnowBoundRune = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Wizard_Blizzard && s.RuneIndex == 3);

i have changed the (TargetUtil.AnyElitesInRange(15, 1) to (1, 1) and TargetUtil.AnyMobsInRange(15, 4) to (1, 4) but nothing happens with this settings.
the bot use wave of force only sometimes.

I'm playing Meteor / wave of force and would like it to be that the bot spams WoF / Meteor as available. Currently even with full AP it ends up melleeing stuff - is this a seperate issue? If so can I resolve it?
 
Code:
// Epiphany 
           if (!UseOOCBuff && !IsCurrentlyAvoiding && CombatBase.CanCast(SNOPower.X1_Monk_Epiphany, CombatBase.CanCastFlags.NoTimer) &&
                (TargetUtil.EliteOrTrashInRange(15f) || TargetUtil.AnyMobsInRange(15f, 5)) && 
                (Player.PrimaryResourcePct < 0.50 || ((hasDesertShroud || hasSoothingMist) && Player.CurrentHealthPct < 0.50))
                )
            {
                return new TrinityPower(SNOPower.X1_Monk_Epiphany);
            }

please help me with this if i understand the code correctly... im not really a programmer or anything but im trying to learn things :)

does this code mean this:
that it willl use epiphany if :
not using an out of combat skill
not avoiding
the skill is usable(not on cooldown)
and it will activate if an elite is within range of 15 or trashmob of 5?? and that spirit is less than 50%??

so if i change it to
Code:
// Epiphany 
           if (!UseOOCBuff && !IsCurrentlyAvoiding && CombatBase.CanCast(SNOPower.X1_Monk_Epiphany, CombatBase.CanCastFlags.NoTimer) &&
                (TargetUtil.EliteOrTrashInRange(15f) || TargetUtil.AnyMobsInRange(25f, 2)) && 
                (Player.PrimaryResourcePct < 0.95 || ((hasDesertShroud || hasSoothingMist) && Player.CurrentHealthPct < 0.50))
                )
            {
                return new TrinityPower(SNOPower.X1_Monk_Epiphany);
            }

will it activate on 2 trash mobs if it has less than 95% resource and a range of 25?
 
How do I make it so that the my wizard spams arcane blast aoe as soon as its up? right now its timing is off and it doesn't use it efficiently enough.

I found the code but i have no idea how to make it from a 2second timer to something lower.

// Arcane Blast - 2 second cooldown, big AoE
if (!UseOOCBuff && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Wizard_Archon_ArcaneBlast, CombatBase.CanCastFlags.NoTimer) && TargetUtil.AnyMobsInRange(15, 1) && CurrentTarget.IsFacingPlayer)
{
return new TrinityPower(SNOPower.Wizard_Archon_ArcaneBlast, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 1, WAIT_FOR_ANIM);
}
 
Trying to figure out how to cast leap and earth quake when ever its up on one or more mobs. Got a fire barb i'm trying to fine tune with lut socks so needs to always 3 leap.

here are the lines i'm looking at.
-------------------------------------------------------------------------------------------------------------
public static TrinityPower PowerLeap
{
get
{
Vector3 aoeTarget = TargetUtil.GetBestClusterPoint(15f, 35f, false, true);

return new TrinityPower(SNOPower.Barbarian_Leap, V.F("Barbarian.Leap.UseRange"), aoeTarget);
}

--------------------------------------------------------------------------------------------------------------------------------------------
public static bool CanUseLeap
{
get
{
return
!UseOOCBuff &&
!Player.IsIncapacitated &&
CanCast(SNOPower.Barbarian_Leap) &&
(TargetUtil.ClusterExists(15f, 35f, V.I("Barbarian.Leap.TrashCount")) || CurrentTarget.IsBossOrEliteRareUnique);
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
public static bool ShouldWaitForEarthquake
{
get
{
return
Hotbar.Contains(SNOPower.Barbarian_Earthquake) &&
!UseOOCBuff &&
!IsCurrentlyAvoiding &&
!CanCast(SNOPower.Barbarian_Earthquake) &&
TargetUtil.EliteOrTrashInRange(45) &&
Player.PrimaryResource <= 50;
}
}
public static bool CanCastEarthquake
{
get
{
return
!UseOOCBuff &&
!IsCurrentlyAvoiding &&
!Player.IsIncapacitated &&
CanCast(SNOPower.Barbarian_Earthquake) &&
TargetUtil.IsEliteTargetInRange(45f);
}
-----------------------------------------------------------------------------------------------------------------------------
those are the sections I am looking at but i'm not entirly sure what alot of it means should also note I am using this with the beta I dont know if the trinety in it is a special beta too. its v1.8.28
 
Last edited:
Code:
            // Cluster Arrow
            if (!UseOOCBuff && !IsCurrentlyAvoiding && CombatBase.CanCast(SNOPower.DemonHunter_ClusterArrow) && !Player.IsIncapacitated &&
                Player.PrimaryResource >= 20)
            {
                return new TrinityPower(SNOPower.DemonHunter_ClusterArrow, V.F("DemonHunter.ClusterArrow.UseRange"), CurrentTarget.ACDGuid);
            }

How do you change the range on this? It says V.F and when I try to change it, it doesn't compile and breaks trinity ;__;

Edit: How do I make it so that my character stands a little closer to the mob when using cluster arrow. I'm using cluster grenades so it has a 30feet range, and if I want to maximize it I'll need my character to come in a little closer. But at the moment my character just shoots from max range so most of the grenades barely hit.
 
Hi maybe someone can help me to set a timeout(1-5s) for Rend.
(Best would be an option for Bosses and for more then X enemys)
Now he uses it with enough fury, and with full fury he tends to spam it which is useless since it do not stack.

If someone can provide me a hint how to do such a timer i will try out the rest.

Ok found the variable to set Rend timeout its under advanced .
 
Last edited:
Hey i try to change Hota to be used also on trash when Fury is over X(100 for example).

this is the original code
Code:
public static bool CanUseHammerOfTheAncients
        {
            get
            {
                return !UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && !IsWaitingForSpecial && CanCast(SNOPower.Barbarian_HammerOfTheAncients) &&
                    (Player.PrimaryResource >= V.F("Barbarian.HammerOfTheAncients.MinFury") || LastPowerUsed == SNOPower.Barbarian_HammerOfTheAncients) &&
                    (!Hotbar.Contains(SNOPower.Barbarian_Whirlwind) || (Player.CurrentHealthPct >= Settings.Combat.Barbarian.MinHotaHealth && Hotbar.Contains(SNOPower.Barbarian_Whirlwind)));
            }
        }
        public static bool CanUseHammerOfTheAncientsElitesOnly
        {
            get
            {
                bool canUseHota = CanUseHammerOfTheAncients;

                if (canUseHota)
                {
                    bool hotaElites = (CurrentTarget.IsBossOrEliteRareUnique || CurrentTarget.IsTreasureGoblin) && TargetUtil.EliteOrTrashInRange(10f);

                    bool hotaTrash = IgnoringElites && CurrentTarget.IsTrashMob &&
                        (TargetUtil.EliteOrTrashInRange(6f) || CurrentTarget.MonsterSize == Zeta.Game.Internals.SNO.MonsterSize.Big);

                    return canUseHota && (hotaElites || hotaTrash);
                }
                return false;
            }
        }

As far as i understand, he is not using Hota since he detect WW.(first part)?
And the Elite part is he only use Hota until Elite are in Range.
Those Monstersize is used for target Elite companions?.

MFG
 
I've been trying to edit monk.cs so that it will cast Mystic Air Ally whenever my spirit is below 150, regardless of whether the bot is in combat or not.

Currently looks like this:
Code:
            // Mystic ally
			if (Player.PrimaryResource <= 150 &&(CombatBase.CanCast(SNOPower.X1_Monk_MysticAlly_v2)))
            {
                return new TrinityPower(SNOPower.X1_Monk_MysticAlly_v2);
            }

But unfortunately it doesn't work, what am I doing wrong?
 
Trying to figure out how to change the minium health value for the skill Ignore Pain. I want to change it to 80% or higher currently experimenting with a build that has ignore pain up 12/15 seconds But I cant for the life of me figure out how to change the code to get the bot to just spam it.

well cancel that as with most time i give up and ask the forums, 5 minutes later I figure it out. happy hunting. FYI this build rocks almost perm ignore pain is lol t6
 
Last edited:
so i was trying to make a check for units over a certain distance for use with dashing strike and jaw breaker.


Code:
        /// <summary>
        /// Fast check to see if there are any attackable units within a certain distance
        /// </summary>
        /// <param name="range"></param>
        /// <returns></returns>
        internal static bool AnyMobsOverRange(float range = 10f, int minCount = 1, bool useWeights = true)
        {
            if (range < 32f)
                range = 32f;
            if (minCount < 1)
                minCount = 1;
            return (from o in ObjectCache
                    where o.IsUnit &&
                     ((useWeights && o.Weight > 0) || !useWeights) &&
                    o.RadiusDistance >= range
                    select o).Count() >= minCount;
        }
this is what i came up with but it froze up d3 everytime. I'm assumming thats because its checking the whole map past 32f and freezing the game. anyone have any idea how to fix this?
 
Back
Top