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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

xrip565

New Member
Joined
Nov 16, 2015
Messages
2
[Snippet] Better Enduring Cry and Rallying Cry (mostly for TS ranger)

In OldRoutine.cs find line starting with "if (_enduringCrySlot != -1)" and change block of code to
PHP:
				// Since EC has a cooldown, we can just cast it when mobs are in range to keep our endurance charges refreshed.
				if (_enduringCrySlot != -1)
				{
					// See if we can use the skill.
					var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_enduringCrySlot);

					if (!LokiPoe.Me.HasEnduranceCharge && skill.CanUse())
					{
						if (Utility.NumberOfMobsNear(LokiPoe.Me, 60) > 2)
						{
							var err1 = LokiPoe.InGameState.SkillBarPanel.Use(_enduringCrySlot, true);
							if (err1 == LokiPoe.InGameState.UseError.None)
							{
								await Coroutine.Sleep(Utility.LatencySafeValue(500));

								await Coroutines.FinishCurrentAction(false);

								return true;
							}

							Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name);
						}
					}
				}

It would help to cast EC only if no charges left. In default state it casting everytime when there is more than one mob in area of 20 radius.
 
Last edited:
Isn't 60 range a bit too far? I would do this that way

Code:
private int EnduranceCharges
{
	get
	{
		Aura aura = LokiPoe.ObjectManager.Me.Auras.FirstOrDefault(a => a.InternalName == "endurance_charge");
		if (aura != null)
			return aura.Charges;
		
		return 0;
	}
}

private int MaxEnduranceCharges
{
	get
	{
		return LokiPoe.ObjectManager.Me.GetStat(StatTypeGGG.MaxEnduranceCharges);
	}
}

private TimeSpan EnduranceChargesTimeLeft
{
	get
	{
		Aura aura = LokiPoe.ObjectManager.Me.Auras.FirstOrDefault(a => a.InternalName == "endurance_charge");
		if (aura != null)
			return aura.TimeLeft;

		return TimeSpan.Zero;
	}
}






// Since EC has a cooldown, we can just cast it when mobs are in range to keep our endurance charges refreshed. 
if (_enduringCrySlot != -1) 
{ 
	// See if we can use the skill. 
	var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_enduringCrySlot); 

	if ( skill.CanUse() && (EnduranceChargesTimeLeft.TotalSeconds < 5 || EnduranceCharges < MaxEnduranceCharges) ) 
	{ 
		if (Utility.NumberOfMobsNear(LokiPoe.Me, 40) > 2) 
		{ 
			var err1 = LokiPoe.InGameState.SkillBarPanel.Use(_enduringCrySlot, true); 
			if (err1 == LokiPoe.InGameState.UseError.None) 
			{ 
				await Coroutine.Sleep(Utility.LatencySafeValue(500)); 

				await Coroutines.FinishCurrentAction(false); 

				return true; 
			} 

			Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name); 
		} 
	} 
}
 
Isn't 60 range a bit too far? I would do this that way

Code:
private int EnduranceCharges
{
	get
	{
		Aura aura = LokiPoe.ObjectManager.Me.Auras.FirstOrDefault(a => a.InternalName == "endurance_charge");
		if (aura != null)
			return aura.Charges;
		
		return 0;
	}
}

private int MaxEnduranceCharges
{
	get
	{
		return LokiPoe.ObjectManager.Me.GetStat(StatTypeGGG.MaxEnduranceCharges);
	}
}

private TimeSpan EnduranceChargesTimeLeft
{
	get
	{
		Aura aura = LokiPoe.ObjectManager.Me.Auras.FirstOrDefault(a => a.InternalName == "endurance_charge");
		if (aura != null)
			return aura.TimeLeft;

		return TimeSpan.Zero;
	}
}






// Since EC has a cooldown, we can just cast it when mobs are in range to keep our endurance charges refreshed. 
if (_enduringCrySlot != -1) 
{ 
	// See if we can use the skill. 
	var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_enduringCrySlot); 

	if ( skill.CanUse() && (EnduranceChargesTimeLeft.TotalSeconds < 5 || EnduranceCharges < MaxEnduranceCharges) ) 
	{ 
		if (Utility.NumberOfMobsNear(LokiPoe.Me, 40) > 2) 
		{ 
			var err1 = LokiPoe.InGameState.SkillBarPanel.Use(_enduringCrySlot, true); 
			if (err1 == LokiPoe.InGameState.UseError.None) 
			{ 
				await Coroutine.Sleep(Utility.LatencySafeValue(500)); 

				await Coroutines.FinishCurrentAction(false); 

				return true; 
			} 

			Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name); 
		} 
	} 
}

What about Rallying Cry ? can u make it in sameway . I made it one, but im not happy with it.
 
Last edited:
What about Rallying Cry ? can u make it in sameway . I made it one, but im not happy with it.

Code:
private TimeSpan RallyingCryTimeLeft
{
	get
	{
		Aura aura = LokiPoe.ObjectManager.Me.Auras.FirstOrDefault(a => a.InternalName == "inspiring_cry");
		if (aura != null)
			return aura.TimeLeft;

		return TimeSpan.Zero;
	}
}

// Since EC has a cooldown, we can just cast it when mobs are in range to keep our endurance charges refreshed. 
if (_rallyingCrySlot != -1) 
{ 
	// See if we can use the skill. 
	var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_rallyingCrySlot); 

	if ( skill.CanUse() && (RallyingCryTimeLeft.TotalSeconds < 5 ) ) 
	{ 
		if (Utility.NumberOfMobsNear(LokiPoe.Me, 40) > 2) 
		{ 
			var err1 = LokiPoe.InGameState.SkillBarPanel.Use(_rallyingCrySlot, true); 
			if (err1 == LokiPoe.InGameState.UseError.None) 
			{ 
				await Coroutine.Sleep(Utility.LatencySafeValue(500)); 

				await Coroutines.FinishCurrentAction(false); 

				return true; 
			} 

			Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name); 
		} 
	} 
}
 
Last edited:
Code:
private TimeSpan RallyingCryTimeLeft
{
	get
	{
		Aura aura = LokiPoe.ObjectManager.Me.Auras.FirstOrDefault(a => a.InternalName == "inspiring_cry");
		if (aura != null)
			return aura.TimeLeft;

		return TimeSpan.Zero;
	}
}

// Since EC has a cooldown, we can just cast it when mobs are in range to keep our endurance charges refreshed. 
if (_rallyingCrySlot != -1) 
{ 
	// See if we can use the skill. 
	var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_rallyingCrySlot); 

	if ( skill.CanUse() && (RallyingCryTimeLeft.TotalSeconds < 5 ) ) 
	{ 
		if (Utility.NumberOfMobsNear(LokiPoe.Me, 40) > 2) 
		{ 
			var err1 = LokiPoe.InGameState.SkillBarPanel.Use(_rallyingCrySlot, true); 
			if (err1 == LokiPoe.InGameState.UseError.None) 
			{ 
				await Coroutine.Sleep(Utility.LatencySafeValue(500)); 

				await Coroutines.FinishCurrentAction(false); 

				return true; 
			} 

			Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name); 
		} 
	} 
}

Thanks but im getting error. Could u share oldroutine with added rallying cry ?
 
how about sustaining frenzy charges in Serleth's PA build? is there a way to sustain it or how have you guys solved it alternatively?
 
Back
Top