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

Trinity - Monk Class

Yeah some optimizations for tempest rush would be really welcome!
 
Here's a quick way to get rid of the stutter step using Tempest Rush.

In GilesTrinity\DbProvider\GilesPlayerMover.cs:

Above this line:
Code:
// Anti-stuck variables
ADD:
Code:
private static bool bCanChannelTR = false;

And then REPLACE the entire code block for Tempest Rush with this:
Code:
				// Tempest rush for a monk
                if (GilesTrinity.hashPowerHotbarAbilities.Contains(SNOPower.Monk_TempestRush) && !bTooMuchZChange) 
                {
			         		if (ZetaDia.Me.CurrentPrimaryResource >= 60 && fDistanceFromTarget > 15f) 
					          	bCanChannelTR = true;
			        		else if (bCanChannelTR && ZetaDia.Me.CurrentPrimaryResource <= 20)
			          			bCanChannelTR = false;

				        	if (bCanChannelTR) 
				                {
			 	        		Vector3 vTargetAimPoint = MathEx.CalculatePointFrom(vMoveToTarget, vMyCurrentPosition, 10f);
				        		ZetaDia.Me.UsePower(SNOPower.Monk_TempestRush, vTargetAimPoint, GilesTrinity.iCurrentWorldID, -1);
				        		return;
			        		}
                }

In the above code block - the following line has configurable values:
if (ZetaDia.Me.CurrentPrimaryResource >= 60 && fDistanceFromTarget > 15f)

The "60" represents the minimum spirit required to fire up TR. If you have below 60 spirit in this case, Trinity will walk until you regenerate enough spirit to reach this value.
The "15f" in the above line represents the minimum distance a target must be from you for TR to be used. If closer than this value, Trinity will walk.

The above values will likely need adjustment based on your particular build and spirit regeneration rate.

Additionally, I highly recommend disabling the constant re-casting of mantras for the 3-second buff when using TR. You can simply delete the corresponding block of code in the \GilesTrinity\Abilities\Monk.cs file.

Once the latest version of trinity stabilizes I will be wrapping several of these mods up with some check boxes in the UI and submitting them for integration into the main line.

Enjoy.
 
Here's a quick way to get rid of the stutter step using Tempest Rush.

In GilesTrinity\DbProvider\GilesPlayerMover.cs:

Above this line:
Code:
// Anti-stuck variables
ADD:
Code:
private static bool bCanChannelTR = false;

And then REPLACE the entire code block for Tempest Rush with this:
Code:
				// Tempest rush for a monk
                if (GilesTrinity.hashPowerHotbarAbilities.Contains(SNOPower.Monk_TempestRush) && !bTooMuchZChange) 
                {
			         		if (ZetaDia.Me.CurrentPrimaryResource >= 60 && fDistanceFromTarget > 15f) 
					          	bCanChannelTR = true;
			        		else if (bCanChannelTR && ZetaDia.Me.CurrentPrimaryResource <= 20)
			          			bCanChannelTR = false;

				        	if (bCanChannelTR) 
				                {
			 	        		Vector3 vTargetAimPoint = MathEx.CalculatePointFrom(vMoveToTarget, vMyCurrentPosition, 10f);
				        		ZetaDia.Me.UsePower(SNOPower.Monk_TempestRush, vTargetAimPoint, GilesTrinity.iCurrentWorldID, -1);
				        		return;
			        		}
                }

In the above code block - the following line has configurable values:
if (ZetaDia.Me.CurrentPrimaryResource >= 60 && fDistanceFromTarget > 15f)

The "60" represents the minimum spirit required to fire up TR. If you have below 60 spirit in this case, Trinity will walk until you regenerate enough spirit to reach this value.
The "15f" in the above line represents the minimum distance a target must be from you for TR to be used. If closer than this value, Trinity will walk.

The above values will likely need adjustment based on your particular build and spirit regeneration rate.

Additionally, I highly recommend disabling the constant re-casting of mantras for the 3-second buff when using TR. You can simply delete the corresponding block of code in the \GilesTrinity\Abilities\Monk.cs file.

Once the latest version of trinity stabilizes I will be wrapping several of these mods up with some check boxes in the UI and submitting them for integration into the main line.

Enjoy.
You are my hero of the week
 
Here's a quick way to get rid of the stutter step using Tempest Rush.

In GilesTrinity\DbProvider\GilesPlayerMover.cs:

Above this line:
Code:
// Anti-stuck variables
ADD:
Code:
private static bool bCanChannelTR = false;

And then REPLACE the entire code block for Tempest Rush with this:
Code:
				// Tempest rush for a monk
                if (GilesTrinity.hashPowerHotbarAbilities.Contains(SNOPower.Monk_TempestRush) && !bTooMuchZChange) 
                {
			         		if (ZetaDia.Me.CurrentPrimaryResource >= 60 && fDistanceFromTarget > 15f) 
					          	bCanChannelTR = true;
			        		else if (bCanChannelTR && ZetaDia.Me.CurrentPrimaryResource <= 20)
			          			bCanChannelTR = false;

				        	if (bCanChannelTR) 
				                {
			 	        		Vector3 vTargetAimPoint = MathEx.CalculatePointFrom(vMoveToTarget, vMyCurrentPosition, 10f);
				        		ZetaDia.Me.UsePower(SNOPower.Monk_TempestRush, vTargetAimPoint, GilesTrinity.iCurrentWorldID, -1);
				        		return;
			        		}
                }

In the above code block - the following line has configurable values:
if (ZetaDia.Me.CurrentPrimaryResource >= 60 && fDistanceFromTarget > 15f)

The "60" represents the minimum spirit required to fire up TR. If you have below 60 spirit in this case, Trinity will walk until you regenerate enough spirit to reach this value.
The "15f" in the above line represents the minimum distance a target must be from you for TR to be used. If closer than this value, Trinity will walk.

The above values will likely need adjustment based on your particular build and spirit regeneration rate.

Additionally, I highly recommend disabling the constant re-casting of mantras for the 3-second buff when using TR. You can simply delete the corresponding block of code in the \GilesTrinity\Abilities\Monk.cs file.

Once the latest version of trinity stabilizes I will be wrapping several of these mods up with some check boxes in the UI and submitting them for integration into the main line.

Enjoy.
REP bro!!!

THANK YOU VERY MUCH!!!!!!
 
Okay, the stutter-issue is solved with this code! :D
But TR is not only used for MS, I've got 150k DPS, 500% critdmg but only 1.1 ApS, because you don't need that normally for TR, and that's why autoattacking too much is slowing the runs :P I'm able to run through trashmobs and also some elites with TR like a hatchet.
How is it possible to make the bot zigzag through trashmobs and only autoattack elites?
I'm sure this will speed the whole thing much more.
My Exp/H decreased from 32m to 20m using this code with TR, because it isn't killing the mobs with it..
 
Last edited:
got the same problem as junky.
I'd like the bot to run allways TR, cast Sweeping wind only when it's vanishing and do the same with mantra.
My spirit regen is over the amount needed so I'm generating more spirit then strictly needed for TR, but not as much to cast mantra so often..
I think it requires more code modifications, but maybe someone already got the solution
 
Sorry fellas, my code is all based around using TR as movement, and not for combat.

I can look into adjusting it for combat use but that will take me a bit longer.
 
Is SDK's mod ready be included in the main code as-is? Or should I wait?
 
Hey rrrix, you can take it as-is if you like, it's not going to hurt anything.

That being said, I will be making more changes related to this and submitting a merge request to you, probably early next week.
 
SDK,
I put in your code but my monk still seems to be using TR when he is in the middle of mobs instead of just attacking and saving TR for quick movement. It is your intent to just use it for travel right?
 
SDK,
I put in your code but my monk still seems to be using TR when he is in the middle of mobs instead of just attacking and saving TR for quick movement. It is your intent to just use it for travel right?

Please make sure you've deleted the tempest rush code block out of the Monk.cs file. This will remove Trinity's ability to use TR for combat.

Edit: I'll paste the code block below just for reference. You'll need to REMOVE this from your Monk.cs file:
Code:
  // Tempest rush at elites or groups of mobs
            if (!bOOCBuff && !bCurrentlyAvoiding && !playerStatus.IsIncapacitated && !playerStatus.IsRooted &&
                (iElitesWithinRange[RANGE_25] > 0 || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 14f) || iAnythingWithinRange[RANGE_15] > 2) &&
                hashPowerHotbarAbilities.Contains(SNOPower.Monk_TempestRush) && ((playerStatus.CurrentEnergy >= 20 && !playerStatus.WaitingForReserveEnergy) || playerStatus.CurrentEnergy >= iWaitingReservedAmount) &&
                PowerManager.CanCast(SNOPower.Monk_TempestRush))
            {
                bool bGenerateNewZigZag = (DateTime.Now.Subtract(lastChangedZigZag).TotalMilliseconds >= 1500 ||
                    (vPositionLastZigZagCheck != vNullLocation && playerStatus.CurrentPosition == vPositionLastZigZagCheck && DateTime.Now.Subtract(lastChangedZigZag).TotalMilliseconds >= 200) ||
                    Vector3.Distance(playerStatus.CurrentPosition, vSideToSideTarget) <= 4f ||
                    CurrentTarget.ACDGuid != iACDGUIDLastWhirlwind);
                vPositionLastZigZagCheck = playerStatus.CurrentPosition;
                if (bGenerateNewZigZag)
                {
                    float fExtraDistance = CurrentTarget.CentreDistance <= 20f ? 15f : 5f;
                    vSideToSideTarget = FindZigZagTargetLocation(CurrentTarget.Position, CurrentTarget.CentreDistance + fExtraDistance);
                    // Resetting this to ensure the "no-spam" is reset since we changed our target location
                    powerLastSnoPowerUsed = SNOPower.None;
                    iACDGUIDLastWhirlwind = CurrentTarget.ACDGuid;
                    lastChangedZigZag = DateTime.Now;
                }
                return new GilesPower(SNOPower.Monk_TempestRush, 23f, vSideToSideTarget, iCurrentWorldID, -1, 0, 0, USE_SLOWLY);
            }
 
Last edited:
This part?

// Tempest rush at elites or groups of mobs
if (!bOOCBuff && !bCurrentlyAvoiding && !playerStatus.IsIncapacitated && !playerStatus.IsRooted &&
(iElitesWithinRange[RANGE_25] > 0 || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 14f) || iAnythingWithinRange[RANGE_15] > 2) &&
hashPowerHotbarAbilities.Contains(SNOPower.Monk_TempestRush) && ((playerStatus.CurrentEnergy >= 20 && !playerStatus.WaitingForReserveEnergy) || playerStatus.CurrentEnergy >= iWaitingReservedAmount) &&
PowerManager.CanCast(SNOPower.Monk_TempestRush))
{
bool bGenerateNewZigZag = (DateTime.Now.Subtract(lastChangedZigZag).TotalMilliseconds >= 1500 ||
(vPositionLastZigZagCheck != vNullLocation && playerStatus.CurrentPosition == vPositionLastZigZagCheck && DateTime.Now.Subtract(lastChangedZigZag).TotalMilliseconds >= 200) ||
Vector3.Distance(playerStatus.CurrentPosition, vSideToSideTarget) <= 4f ||
CurrentTarget.ACDGuid != iACDGUIDLastWhirlwind);
vPositionLastZigZagCheck = playerStatus.CurrentPosition;
if (bGenerateNewZigZag)
{
float fExtraDistance = CurrentTarget.CentreDistance <= 20f ? 15f : 5f;
vSideToSideTarget = FindZigZagTargetLocation(CurrentTarget.Position, CurrentTarget.CentreDistance + fExtraDistance);
// Resetting this to ensure the "no-spam" is reset since we changed our target location
powerLastSnoPowerUsed = SNOPower.None;
iACDGUIDLastWhirlwind = CurrentTarget.ACDGuid;
lastChangedZigZag = DateTime.Now;
}
return new GilesPower(SNOPower.Monk_TempestRush, 23f, vSideToSideTarget, iCurrentWorldID, -1, 0, 0, USE_SLOWLY);
 
What portion of the code do you delete from Monk.cs to stop the spamming of mantras?
 
What portion of the code do you delete from Monk.cs to stop the spamming of mantras?

Code:
            // 4 Mantra spam for the 4 second buff
            if (!bOOCBuff && (!hashPowerHotbarAbilities.Contains(SNOPower.Monk_TempestRush) || playerStatus.CurrentEnergy >= 98 ||
                (playerStatus.CurrentHealthPct <= 0.55 && playerStatus.CurrentEnergy >= 75) || CurrentTarget.IsBoss) &&
                    (playerStatus.CurrentEnergy >= 135 ||
                    (GilesHasBuff(SNOPower.Monk_SweepingWind) && (playerStatus.CurrentEnergy >= 60 && !Settings.Combat.Monk.SweepingWindWeaponSwap ||
                    playerStatus.CurrentEnergy >= 110 || (playerStatus.CurrentEnergy >= 100 && playerStatus.CurrentHealthPct >= 0.6) ||
                    (playerStatus.CurrentEnergy >= 50 && playerStatus.CurrentHealthPct >= 0.6 && !Settings.Combat.Monk.SweepingWindWeaponSwap)) &&
                // Checking we have no expensive finishers
                    !hashPowerHotbarAbilities.Contains(SNOPower.Monk_SevenSidedStrike) && !hashPowerHotbarAbilities.Contains(SNOPower.Monk_LashingTailKick) &&
                    !hashPowerHotbarAbilities.Contains(SNOPower.Monk_WaveOfLight) && !hashPowerHotbarAbilities.Contains(SNOPower.Monk_CycloneStrike) &&
                    !hashPowerHotbarAbilities.Contains(SNOPower.Monk_ExplodingPalm))) &&
                (iElitesWithinRange[RANGE_15] >= 1 || iAnythingWithinRange[RANGE_15] >= 3 ||
                (iAnythingWithinRange[RANGE_15] >= 1 && (Settings.Combat.Monk.HasInnaSet && playerStatus.CurrentEnergy >= 70)))) //intell -- inna
            {
                if (hashPowerHotbarAbilities.Contains(SNOPower.Monk_MantraOfEvasion) && GilesUseTimer(SNOPower.Monk_MantraOfEvasion))
                {
                    return new GilesPower(SNOPower.Monk_MantraOfEvasion, 0f, vNullLocation, iCurrentWorldID, -1, 1, 1, USE_SLOWLY);
                }
                if (hashPowerHotbarAbilities.Contains(SNOPower.Monk_MantraOfConviction) && GilesUseTimer(SNOPower.Monk_MantraOfConviction))
                {
                    return new GilesPower(SNOPower.Monk_MantraOfConviction, 0f, vNullLocation, iCurrentWorldID, -1, 1, 1, USE_SLOWLY);
                }
                if (hashPowerHotbarAbilities.Contains(SNOPower.Monk_MantraOfRetribution) && GilesUseTimer(SNOPower.Monk_MantraOfRetribution))
                {
                    return new GilesPower(SNOPower.Monk_MantraOfRetribution, 0f, vNullLocation, iCurrentWorldID, -1, 1, 1, USE_SLOWLY);
                }
                if (hashPowerHotbarAbilities.Contains(SNOPower.Monk_MantraOfHealing) && GilesUseTimer(SNOPower.Monk_MantraOfHealing))
                {
                    return new GilesPower(SNOPower.Monk_MantraOfHealing, 0f, vNullLocation, iCurrentWorldID, -1, 1, 1, USE_SLOWLY);
                }
            }
 
there may be advanced tips on custom-tweaks you can make to skills people commonly request changes for with instructions on how to safely edit the code to your liking.
18.jpg

13.jpg

19.jpg

20.jpg
 
Last edited:
I don't like to consume mantras in order to maintain the sweeping winds 3 charges. i want to fix it where can i have fixed?
 
So TempestRush fix is working? could you guys merge it with official trinity ??
 
Back
Top