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

Change trinity to spawn 2 hydras

qutazs

New Member
Joined
May 10, 2014
Messages
60
Reaction score
1
Hi,

I got the Serpent's Sparker wand which makes it possible to have 2 hydra's out at the same time.

Any way to change trinity to spawn 2?
 
Hi,

I got the Serpent's Sparker wand which makes it possible to have 2 hydra's out at the same time.

Any way to change trinity to spawn 2?

i have same wand i thought it did already could be wrong though!
 
In the Hydra part of Wizard.cs this is stated as one of the conditions:
CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15)

Seems to only cast it once every 15 seconds if facing an elite.. I could lower it, but I don't want it to spam it too often, just twice when meeting a pack, then do whatever it usually does :p
 
Disclaimer: I did this quickly and without the ability to test it in any way. Just trying to help.

in Plugins/Trinity/Combat/Abilities/Wizard.cs find

Code:
                // Hydra
                if (!useOocBuff && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Wizard_Hydra, CombatBase.CanCastFlags.NoTimer) &&
                    (CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) && //LastPowerUsed != SNOPower.Wizard_Hydra &&
                    (TargetUtil.AnyElitesInRange(15, 1) || TargetUtil.AnyMobsInRange(15, 4) || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 15f)) &&
                    Player.PrimaryResource >= 15)
                {

And replace it with


Code:
                // Hydra
		int timeSinceHydra = SpellHistory.TimeSinceUse(SNOPower.Wizard_Hydra).Milliseconds;
                if (!useOocBuff && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Wizard_Hydra, CombatBase.CanCastFlags.NoTimer) &&
                    (CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) && //LastPowerUsed != SNOPower.Wizard_Hydra &&
                    (TargetUtil.AnyElitesInRange(15, 1) || TargetUtil.AnyMobsInRange(15, 4) || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 15f)) &&
                    Player.PrimaryResource >= 15 || SpellHistory.HistoryQueue.Count(i => i.TimeSinceHydra.TotalMilliseconds < 1200) <= 1)
                {
 
Disclaimer: I did this quickly and without the ability to test it in any way. Just trying to help.

in Plugins/Trinity/Combat/Abilities/Wizard.cs find

Code:
                // Hydra
                if (!useOocBuff && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Wizard_Hydra, CombatBase.CanCastFlags.NoTimer) &&
                    (CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) && //LastPowerUsed != SNOPower.Wizard_Hydra &&
                    (TargetUtil.AnyElitesInRange(15, 1) || TargetUtil.AnyMobsInRange(15, 4) || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 15f)) &&
                    Player.PrimaryResource >= 15)
                {

And replace it with


Code:
                // Hydra
		int timeSinceHydra = SpellHistory.TimeSinceUse(SNOPower.Wizard_Hydra).Milliseconds;
                if (!useOocBuff && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Wizard_Hydra, CombatBase.CanCastFlags.NoTimer) &&
                    (CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) && //LastPowerUsed != SNOPower.Wizard_Hydra &&
                    (TargetUtil.AnyElitesInRange(15, 1) || TargetUtil.AnyMobsInRange(15, 4) || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 15f)) &&
                    Player.PrimaryResource >= 15 || SpellHistory.HistoryQueue.Count(i => i.TimeSinceHydra.TotalMilliseconds < 1200) <= 1)
                {

Nice try but I got this error :
error CS1061: 'Trinity.Combat.Abilities.SpellHistoryItem' does not contain a definition for 'TimeSinceHydra' and no extension method 'TimeSinceHydra' accepting a first argument of type 'Trinity.Combat.Abilities.SpellHistoryItem' could be found (are you missing a using directive or an assembly reference?)
 
Disclaimer: I did this quickly and without the ability to test it in any way. Just trying to help.

in Plugins/Trinity/Combat/Abilities/Wizard.cs find

Code:
                // Hydra
                if (!useOocBuff && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Wizard_Hydra, CombatBase.CanCastFlags.NoTimer) &&
                    (CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) && //LastPowerUsed != SNOPower.Wizard_Hydra &&
                    (TargetUtil.AnyElitesInRange(15, 1) || TargetUtil.AnyMobsInRange(15, 4) || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 15f)) &&
                    Player.PrimaryResource >= 15)
                {

And replace it with


Code:
                // Hydra
		int timeSinceHydra = SpellHistory.TimeSinceUse(SNOPower.Wizard_Hydra).Milliseconds;
                if (!useOocBuff && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Wizard_Hydra, CombatBase.CanCastFlags.NoTimer) &&
                    (CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) && //LastPowerUsed != SNOPower.Wizard_Hydra &&
                    (TargetUtil.AnyElitesInRange(15, 1) || TargetUtil.AnyMobsInRange(15, 4) || (CurrentTarget.IsBossOrEliteRareUnique && CurrentTarget.RadiusDistance <= 15f)) &&
                    Player.PrimaryResource >= 15 || SpellHistory.HistoryQueue.Count(i => i.TimeSinceHydra.TotalMilliseconds < 1200) <= 1)
                {

Doesn't work:

Compiler Error: d:\Program Files (x86)\Demonbuddy\Plugins\Trinity\Combat\Abilities\Wizard.cs(186,92) : error CS1061: 'Trinity.Combat.Abilities.SpellHistoryItem' does not contain a definition for 'TimeSinceHydra' and no extension method 'TimeSinceHydra' accepting a first argument of type 'Trinity.Combat.Abilities.SpellHistoryItem' could be found (are you missing a using directive or an assembly reference?)

should it be i.timeSinceHydra rather than i.TimeSinceHydra? I don't know a thing about this code.
 
I changed it to CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) but get a compiler error Compiler Error: d:\Program Files (x86)\Demonbuddy\Plugins\Trinity\Combat\Abilities\Wizard.cs(186,90) : error CS0019: Operator '<' cannot be applied to operands of type 'System.TimeSpan' and 'int'

No idea, no more time to screw around with this.
 
I tried this, but it didn't work. I don't know C# (but I know java) but mostly I don't really know how his code works.
I thought it would work though so maybe it's a good start for someone (or that other guy can get his idea he posted earlier to work):

in SpellHistory.cs create a field:
Code:
public static bool hydraCastLast = false;

then in Wizard.cs in the method where hydra is cast I added
Code:
SpellHistory.hydraCastLast = true;

and created a new method in Wizard.cs that should have just created a new hydra at the same spot as the old one if SpellHistory.hydraCastLast == true;

Code:
if (SpellHistory.hydraCastLast == true){//&& CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(1)){
					SpellHistory.hydraCastLast = false;
					float fExtraDistance = 0f;
                    if (CurrentTarget.Distance > 17f && !CurrentTarget.IsTreasureGoblin)
                    {
                        fExtraDistance = CurrentTarget.Distance - 17f;
                       if (fExtraDistance > 5f)
                           fExtraDistance = 5f;
                        if (CurrentTarget.Distance - fExtraDistance < 15f)
                            fExtraDistance -= 2;
                    }
					Vector3 vNewTarget = MathEx.CalculatePointFrom(CurrentTarget.Position, Player.Position, CurrentTarget.Distance - fExtraDistance);
					return new TrinityPower(SNOPower.Wizard_Hydra, 30f, vNewTarget, CurrentWorldDynamicId, -1, 1, 2);
				}
 
Can you get me the "ActorSNO" of Serpent's Sparker?

Stop the bot and press this button ("Debug" tab)

Post the output here

0QVXpOb.png


I'll add some appropriate logic into the main release, but, I want it to be able to be backwards-compatible with those who don't have this item.
 
Last edited:
Can you get me the "ActorSNO" of Serpent's Sparker?

Stop the bot and press this button ("Debug" tab)

Post the output here

0QVXpOb.png


I'll add some appropriate logic into the main release, but, I want it to be able to be backwards-compatible with those who don't have this item.

Name=Serpent's Sparker InternalName=x1_wand_norm_unique_02-198 ActorSNO=272084 DynamicID=2024079578 InventorySlot=LeftHand

is that what you need?
 
I'm glad Ganom was able to find it as I'm getting this:
Code:
[Trinity] 
############################################

Quick Dumping Items. This will hang your client. Please wait....
##########################
[Trinity]

And thats it :p
 
Name=Serpent's Sparker InternalName=x1_wand_norm_unique_02-125 ActorSNO=272084 DynamicID=2017198196 InventorySlot=LeftHand
 
What about just having the hydra spawn more then once during boss fight.

I do T6 ghom kills and it uses hydra at the start of the fight, after 12 seconds it does not recast..

Is there anyway I can make it so that hydra is casted again after the 12 seconds when im fighting ghom?
 
should it be i.timeSinceHydra rather than i.TimeSinceHydra? I don't know a thing about this code.

Apologies, that line is indeed meant to read i.timeSinceHydra. My mistake.

I assume you tried it with that corrected anyway, and it still didn't work?
 
What about just having the hydra spawn more then once during boss fight.

I do T6 ghom kills and it uses hydra at the start of the fight, after 12 seconds it does not recast..

Is there anyway I can make it so that hydra is casted again after the 12 seconds when im fighting ghom?

Go to line 187 in "Wizard.cs" and change it from:
Code:
                        ((CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) || serpentSparkerRecast) &&

to

Code:
                        ((CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15)) || serpentSparkerRecast) &&

EDIT: This is from Trinity 1.9.8..

You basicly just need to remove " && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f " in Wizard.cs in the Hydra section.
 
Last edited:
Go to line 187 in "Wizard.cs" and change it from:
Code:
                        ((CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15) && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f) || serpentSparkerRecast) &&

to

Code:
                        ((CombatBase.TimeSpanSincePowerUse(SNOPower.Wizard_Hydra) > TimeSpan.FromSeconds(15)) || serpentSparkerRecast) &&

EDIT: This is from Trinity 1.9.8..

You basicly just need to remove " && SpellHistory.DistanceFromLastTarget(SNOPower.Wizard_Hydra) > 30f " in Wizard.cs in the Hydra section.

Just wait for 1.9.8... otherwise you'll break it
 
Back
Top