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

Trinity Monk

lilobat

New Member
Joined
Jul 8, 2012
Messages
205
Reaction score
2
Monk & DH Combat's Improvement

Purposes
  1. Share and discuss your build
  2. Show off your Statistic (legend/hour, exp/h, Gold/h)
  3. Importantly let's the helpers do modified monk.cs/DemonHunter.cs to improve your build and overall performance.
  4. Give some thanks to contributor. (Credits to rrrix)

Welcome to make request and contribute your edited script. I will try to fulfill your need when i'm free.
I may not able to achieve what you ask for due to my programming skill limitation.

At the moment only for Monk & DH discussion only.
 
Last edited:
Improved version of InnerSanctuary
Original
// InnerSanctuary
if (!UseOOCBuff && TargetUtil.EliteOrTrashInRange(16f) && CombatBase.CanCast(SNOPower.X1_Monk_InnerSanctuary))
{
return new TrinityPower(SNOPower.X1_Monk_InnerSanctuary, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 1);
}
Modified
// InnerSanctuary
if (!UseOOCBuff && (TargetUtil.EliteOrTrashInRange(3f) || TargetUtil.AnyMobsInRange(3f, 2)) && CombatBase.CanCast(SNOPower.X1_Monk_InnerSanctuary))
{
return new TrinityPower(SNOPower.X1_Monk_InnerSanctuary, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 1);
}

It will cast the skill when very closed range with trash mobs > 2 or any elites. Modify the CDR on trinity's variable depend on your situation.
 
Great idea for a topic!

I am looking to cast Mystic Air Ally every time it is OFF cooldown AND if Player.PrimaryResourceMissing >= 110, yet I have not been able to get it to work..

Currently back to this:
Code:
            // Mystic ally
			if (Player.PrimaryResource <= 170 && (CombatBase.CanCast(SNOPower.X1_Monk_MysticAlly_v2, CombatBase.CanCastFlags.NoTimer)))
            {
                return new TrinityPower(SNOPower.X1_Monk_MysticAlly_v2, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 2, 2);
            }


Any help is very much appreciated!
 
Great idea for a topic!

I am looking to cast Mystic Air Ally every time it is OFF cooldown AND if Player.PrimaryResourceMissing >= 110, yet I have not been able to get it to work..

Currently back to this:
Code:
            // Mystic ally
			if (Player.PrimaryResource <= 170 && (CombatBase.CanCast(SNOPower.X1_Monk_MysticAlly_v2, CombatBase.CanCastFlags.NoTimer)))
            {
                return new TrinityPower(SNOPower.X1_Monk_MysticAlly_v2, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 2, 2);
            }


Any help is very much appreciated!

Replace with this
bool hasAirAlly = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.X1_Monk_MysticAlly_v2 && s.RuneIndex == 3);
// Mystic ally
if (CombatBase.CanCast(SNOPower.X1_Monk_MysticAlly_v2) && hasAirAlly && Player.PrimaryResourceMissing > 100)
{
return new TrinityPower(SNOPower.X1_Monk_MysticAlly_v2, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 2, 2);
}
 
i added that as an extra condition only for air ally, you still need the other mystic ally code if you use any other rune

maybe a better one is something like this

Code:
bool hasAirAlly = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.X1_Monk_MysticAlly_v2 && s.RuneIndex == 3);
// Mystic ally
if (CombatBase.CanCast(SNOPower.X1_Monk_MysticAlly_v2, CombatBase.CanCastFlags.NoTimer) && ((TargetUtil.EliteOrTrashInRange(30f) && !hasAirAlly) || (hasAirAlly && Player.PrimaryResourceMissing > 100)))
{
return new TrinityPower(SNOPower.X1_Monk_MysticAlly_v2, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 2, 2);
}
 
Last edited:
i added that as an extra condition only for air ally, you still need the other mystic ally code if you use any other rune
Credit to koolplay, i tested, it's working with Air ally for no doubt.
1.9.x trinity until the latest tested.
 
DemonHunter Smoke Screen
Original
// Smoke Screen
if ((!UseOOCBuff || Settings.Combat.DemonHunter.SpamSmokeScreen) && CombatBase.CanCast(SNOPower.DemonHunter_SmokeScreen) &&
!GetHasBuff(SNOPower.DemonHunter_ShadowPower) && Player.SecondaryResource >= 14 &&
(
(Player.CurrentHealthPct <= 0.50 || Player.IsRooted || TargetUtil.AnyMobsInRange(15) || Player.IsIncapacitated) ||
Settings.Combat.DemonHunter.SpamSmokeScreen
))
{
return new TrinityPower(SNOPower.DemonHunter_SmokeScreen, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 1);
}

Replacement
// Smoke Screen lilobat
if ((!UseOOCBuff || Settings.Combat.DemonHunter.SpamSmokeScreen) && CombatBase.CanCast(SNOPower.DemonHunter_SmokeScreen) &&
!GetHasBuff(SNOPower.DemonHunter_ShadowPower) && Player.SecondaryResource >= 14 &&
(
(Player.CurrentHealthPct <= 0.50 || Player.IsRooted || (TargetUtil.AnyMobsInRange(10) && Player.CurrentHealthPct <= 0.70) || Player.IsIncapacitated) ||
Settings.Combat.DemonHunter.SpamSmokeScreen
))
{
return new TrinityPower(SNOPower.DemonHunter_SmokeScreen, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 1, 1);
}
Better utilize of ss instead of wasted resources for no reason. With the condition of your toughness is not 1 hit KO. No one shall have such build for afk mode.
 
DemonHunter Vault
Locate at "Plugins\Trinity\Movement\PlayerMover.cs"
Original
// DemonHunter Vault
if (Trinity.Hotbar.Contains(SNOPower.DemonHunter_Vault) && !bTooMuchZChange && Trinity.Settings.Combat.DemonHunter.VaultMode != DemonHunterVaultMode.CombatOnly &&
CombatBase.TimeSincePowerUse(SNOPower.DemonHunter_Vault) > vaultDelay &&
destinationDistance >= 18f &&
PowerManager.CanCast(SNOPower.DemonHunter_Vault) && !ShrinesInArea(vMoveToTarget) &&
// Don't Vault into avoidance/monsters if we're kiting
(CombatBase.PlayerKiteDistance <= 0 || (CombatBase.PlayerKiteDistance > 0 &&
(!CacheData.TimeBoundAvoidance.Any(a => a.Position.Distance(vMoveToTarget) <= CombatBase.PlayerKiteDistance) ||
(!CacheData.TimeBoundAvoidance.Any(a => MathEx.IntersectsPath(a.Position, a.Radius, Trinity.Player.Position, vMoveToTarget))) ||
!CacheData.MonsterObstacles.Any(a => a.Position.Distance(vMoveToTarget) <= CombatBase.PlayerKiteDistance))))
)
Replacement
// DemonHunter Vault lilobat
if (Trinity.Player.SecondaryResource > {Discipline} && Trinity.Hotbar.Contains(SNOPower.DemonHunter_Vault) && !bTooMuchZChange && Trinity.Settings.Combat.DemonHunter.VaultMode != DemonHunterVaultMode.CombatOnly &&
CombatBase.TimeSincePowerUse(SNOPower.DemonHunter_Vault) > vaultDelay &&
destinationDistance >= 18f &&
PowerManager.CanCast(SNOPower.DemonHunter_Vault) && !ShrinesInArea(vMoveToTarget) &&
// Don't Vault into avoidance/monsters if we're kiting
(CombatBase.PlayerKiteDistance <= 0 || (CombatBase.PlayerKiteDistance > 0 &&
(!CacheData.TimeBoundAvoidance.Any(a => a.Position.Distance(vMoveToTarget) <= CombatBase.PlayerKiteDistance) ||
(!CacheData.TimeBoundAvoidance.Any(a => MathEx.IntersectsPath(a.Position, a.Radius, Trinity.Player.Position, vMoveToTarget))) ||
!CacheData.MonsterObstacles.Any(a => a.Position.Distance(vMoveToTarget) <= CombatBase.PlayerKiteDistance))))
)
{Discipline} = Discipline you want to reserve for battle(ss, punishment). eg:20 would be good so it will look like this, this is needed for high tier survival.
Trinity.Player.SecondaryResource > 20
 
Last edited:
as a warning, i will post some stuff i find useful and specific to my needs - some of these may not be useful to you or even buggy

first i use a minenergyreserve of 0 because i wouldnt use sweeping winds without innas since sweeping winds sucks, so theres no real reason to save that much spirit

Code:
if (!UseOOCBuff && !IsCurrentlyAvoiding && (TargetUtil.EliteOrTrashInRange(25f)|| TargetUtil.AnyMobsInRange(25f, 3)) && CombatBase.CanCast(SNOPower.X1_Monk_Epiphany, CombatBase.CanCastFlags.NoTimer) && 
				GetHasBuff(SNOPower.Monk_BlindingFlash) )
			{
			     return new TrinityPower(SNOPower.X1_Monk_Epiphany);
			}
since my cdr is over 50% i tend to want to use epiphany more in order to regen spirit since i dont use a generator and also the fact that epiphany is able to capture your damage buffs i also use blinding flash and use it as a prerequisite to epiphany

as a side note, i removed most of the sweeping winds checks in the combat routine since it is a little outdated and sweeping winds is no longer capturing your damage buffs

Code:
// Blinding Flash
            if (Player.PrimaryResource <= 150 && CombatBase.CanCast(SNOPower.Monk_BlindingFlash, CombatBase.CanCastFlags.NoTimer) )
			{
				return new TrinityPower(SNOPower.Monk_BlindingFlash, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 1);
			}
i use this when i have laws of seph on, this and epiphany allows me to not use a generator

Code:
if (Settings.Combat.Monk.HasInnaSet && CombatBase.CanCast(SNOPower.Monk_SweepingWind) && !GetHasBuff(SNOPower.Monk_SweepingWind)) {
				SweepWindSpam = DateTime.UtcNow;
                return new TrinityPower(SNOPower.Monk_SweepingWind, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 0);
			}
i added this to always sweeping winds when i have innas 3pc, only because i use warchezian and since the spirit cost is so low; also helps with barricades and such slowing me down

Code:
// dashing strike
                if (!bFoundSpecialMovement && Hotbar.Contains(SNOPower.X1_Monk_DashingStrike) &&
                    TimeSinceUse(SNOPower.X1_Monk_DashingStrike) >= CombatBase.GetSNOPowerUseDelay(SNOPower.X1_Monk_DashingStrike) &&
                    PowerManager.CanCast(SNOPower.X1_Monk_DashingStrike))
                {
                    ZetaDia.Me.UsePower(SNOPower.X1_Monk_DashingStrike, CurrentDestination, CurrentWorldDynamicId, -1);
                    SpellHistory.RecordSpell(SNOPower.X1_Monk_DashingStrike);
                    bFoundSpecialMovement = true;
                }
somewhere in handletarget.cs around line 1150 under UsedSpecialMovement i added this; since dashing strike was changed a few patches back i think it is useful to add this in there now

Code:
if( GetHasBuff(SNOPower.X1_Monk_Epiphany) && (CurrentTarget.Type == GObjectType.Unit || CurrentTarget.Type == GObjectType.Barricade || CurrentTarget.Type == GObjectType.Destructible))
						{
							if(NavHelper.CanRayCast(Player.Position, CurrentDestination))
								noRangeRequired = true;
						}
i added this in handletarget.cs around line 375 for the noRangeRequired check, it is buggy since i am not sure how to better handle LOS check or somesuch but for most situations it works well enough. basically says if you are in epiphany then all your abilities have no range but will stand there if there if you are in LOS but dont really have a path to your target - need a better check for this.

Code:
// Dashing Strike
            if (!UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && CurrentTarget.Distance >= 16f &&
                CombatBase.CanCast(SNOPower.X1_Monk_DashingStrike, CombatBase.CanCastFlags.NoTimer) && !GetHasBuff(SNOPower.X1_Monk_Epiphany))
            {
                Monk_TickSweepingWindSpam();
                return new TrinityPower(SNOPower.X1_Monk_DashingStrike, Monk_MaxDashingStrikeRange, CurrentTarget.Position, CurrentWorldDynamicId, -1, 2, 2);
            }
since i added the two above i only want to use dashing strike when im not epiphany, this saves me dashing strike charges for when i want movement since i usually like dashing strike for better mobility
 
i added that as an extra condition only for air ally, you still need the other mystic ally code if you use any other rune

maybe a better one is something like this

Code:
bool hasAirAlly = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.X1_Monk_MysticAlly_v2 && s.RuneIndex == 3);
// Mystic ally
if (CombatBase.CanCast(SNOPower.X1_Monk_MysticAlly_v2, CombatBase.CanCastFlags.NoTimer) && ((TargetUtil.EliteOrTrashInRange(30f) && !hasAirAlly) || (hasAirAlly && Player.PrimaryResourceMissing > 100)))
{
return new TrinityPower(SNOPower.X1_Monk_MysticAlly_v2, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 2, 2);
}

This works like a charm, thanks!
 
DemonHunter Vault
Locate at "Plugins\Trinity\Movement\PlayerMover.cs"
Original

Replacement

{Discipline} = Discipline you want to reserve for battle(ss, punishment). eg:20 would be good so it will look like this, this is needed for high tier survival.

@lilobat,
Hey i've tried unsuccessfully to copy paste the vault script into playermover, i also tried the other mods for DH ect. but it just puts out errors.
I don't know if it would help if you wrapped the code tag around the lines we need to copy or if i am the only one experiencing this?

Also what editor do you use to edit and check the .cs files?

it worked when i only copied the first line.
 
Last edited:
@botheric

I had the same issue. The reason why it fails is because there is a space in the following line:
CombatBase.TimeSincePowerUse(SNOPower.DemonHunter_ Vault)

If you remove the space, it should work just fine!
 
random code to save blinding flash with laws of seph until resources are low The Laws of Seph - Game Guide - Diablo III

Code:
            var hasLawsOfSeph = ZetaDia.Me.Inventory.Equipped.Any(i => i.ActorSNO == 299454);            
            var hasReplenishingLight = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Monk_BlindingFlash && s.RuneIndex == 3);            
            
            // Blinding Flash
            if (hasLawsOfSeph)
            {
                // Use only as a spirit generator                                
                if(
                  CombatBase.CanCast(SNOPower.Monk_BlindingFlash) && (                    
                      (!hasReplenishingLight && Player.PrimaryResourcePct < 0.20) ||
                      (hasReplenishingLight && Player.PrimaryResourcePct < 0.30 && TargetUtil.AnyMobsInRange(20, 5) || Player.PrimaryResourcePct < 0.10)
                  )
                )
                {                    
                    Logger.Log("Blinding Flash for Spirit Generation");
                    return new TrinityPower(SNOPower.Monk_BlindingFlash, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 1);                
                }
            }
            else if (!UseOOCBuff && CombatBase.CanCast(SNOPower.Monk_BlindingFlash) &&
                (
                    TargetUtil.AnyElitesInRange(15, 1) ||
                    Player.CurrentHealthPct <= 0.4 ||
                    (TargetUtil.AnyMobsInRange(15, 3)) ||
                    (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 15f) ||
                    // as pre-sweeping wind buff
                    (TargetUtil.AnyMobsInRange(15, 1) && CombatBase.CanCast(SNOPower.Monk_SweepingWind) && !GetHasBuff(SNOPower.Monk_SweepingWind) && Settings.Combat.Monk.HasInnaSet)
                ) &&
                // Check if either we don't have sweeping winds, or we do and it's ready to cast in a moment
                (CheckAbilityAndBuff(SNOPower.Monk_SweepingWind) ||
                 (!GetHasBuff(SNOPower.Monk_SweepingWind) &&
                 (CombatBase.CanCast(SNOPower.Monk_SweepingWind, CombatBase.CanCastFlags.NoTimer))) ||
                 Player.CurrentHealthPct <= 0.25))
            {
                return new TrinityPower(SNOPower.Monk_BlindingFlash, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 1);
            }
            // Blinding Flash as a DEFENSE
            else if (!UseOOCBuff && Player.PrimaryResource >= 10 && CombatBase.CanCast(SNOPower.Monk_BlindingFlash) &&
                Player.CurrentHealthPct <= 0.75 && TargetUtil.AnyMobsInRange(15, 1))
            {
                return new TrinityPower(SNOPower.Monk_BlindingFlash, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 1);
            }
 
Does anyone have Thousand Storms Set boots? I need the actorSNO. To get that put only the boots in your backpack, and then go to Trinity config -> debug -> full dump backpack items. and it should be listed

Code:
            private static DateTime _lastUpdate = DateTime.MinValue;
            private static bool _hasThousandStormsSet;


            private static readonly HashSet<int> ThousandStormsItemIds = new HashSet<int> ()
            {
                338035,//Scales of the Dancing Serpent InternalName=x1_pants_norm_set_08-158 ActorSNO=338035  
                338034,//Mask of the Searing Sky InternalName=x1_Helm_norm_set_08-166 ActorSNO=338034 
                338036,//Mantle of the Upside-Down Sinners InternalName=x1_shoulderPads_norm_set_08-165 ActorSNO=338036
                338032,//Heart of the Crashing Wave InternalName=x1_chestArmor_norm_set_08-184 ActorSNO=338032 
                338033//Fists of Thunder InternalName=x1_Gloves_norm_set_08-183 ActorSNO=338033                 
            };


            public static bool HasThousandStormsSet
            {
                get
                {
                    if (DateTime.UtcNow.Subtract(_lastUpdate).TotalMilliseconds < 5000)
                    {
                        return _hasThousandStormsSet;
                    }


                    var setPieces = ZetaDia.Me.Inventory.Equipped.Count(i => ThousandStormsItemIds.Contains(i.ActorSNO));
                    var hasRRoG = ZetaDia.Me.Inventory.Equipped.Any(i => i.ActorSNO == 298094); //Ring of Royal Grandeur InternalName=x1_Ring_norm_unique_031-163 ActorSNO=298094 DynamicID=2021130412 


                    if(setPieces >= 5 || hasRRoG && setPieces >= 4 )
                    {
                        _lastUpdate = DateTime.UtcNow;
                        return true;
                    }
                    
                    return false;
                }                
            }


Here's a dashing strike for new thousand storms set (which is fucking awesome by the way).

Code:
            // Dashing Strike
            var cluster15Y3M = TargetUtil.ClusterExists(15f, 3);
            var cluster15Y3MPosition = TargetUtil.GetBestClusterPoint(17f);
            if ((!UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.X1_Monk_DashingStrike, CombatBase.CanCastFlags.NoTimer)) &&
               (CurrentTarget.Distance >= 16f || CurrentTarget.IsEliteRareUnique || cluster15Y3M))
            {
                Monk_TickSweepingWindSpam();


                //if (MonkUtils.HasThousandStormsSet)
                //{
                //    Logger.LogNormal("Dashing Strike with Thousand Storms!");
                //}


                if (cluster15Y3M)
                {
                    return new TrinityPower(SNOPower.X1_Monk_DashingStrike, Monk_MaxDashingStrikeRange, cluster15Y3MPosition, CurrentWorldDynamicId, -1, 2, 2);
                } 
                return new TrinityPower(SNOPower.X1_Monk_DashingStrike, Monk_MaxDashingStrikeRange, CurrentTarget.Position, CurrentWorldDynamicId, -1, 2, 2);
            }
 
Last edited:
Thanks for your hard work, here's the dump of the boots!

Dumping Backpack Items. This will hang your client. Please wait....
##########################
[Trinity]
Name=Eight-Demon Boots InternalName=x1_Boots_norm_set_08-115 ActorSNO=338031

I'd like to use your code, but I'm a noob at editing this stuff, which files do these code bits correspond to?
 
Last edited:
Back
Top