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

lyvewyre

Member
Joined
Jan 3, 2013
Messages
418
Reaction score
12
Hi All,

I've been trying to set OR up to only use Vaal skill on encountering a rare. I tried following the recommendation from here:

https://www.thebuddyforum.com/exile...bot-vaal-skills-rare-mobs.html?highlight=Vaal

But where I believe I am meant to slot cachedRarity >= Rarity.Rare into isn't working:

Code:
if ((skill.SkillTags.Contains("aura") && !skill.SkillTags.Contains("vaal")) || IsAuraName(skill.Name))
						{
							if ([B]!LokiPoe.Me.HasAura(skill.Name) && skill.CanUse(OldRoutineSettings.Instance.DebugAuras, true)[/B])
							{
								var doCast = true;

								while (skill.Slot == -1)
								{
									Log.InfoFormat("[Logic] Now assigning {0} to the skillbar.", skill.Name);

									var sserr = LokiPoe.InGameState.SkillBarPanel.SetSlot(_auraSlot, skill);

									if (sserr != LokiPoe.InGameState.SetSlotError.None)
									{
										Log.ErrorFormat("[Logic] SetSlot returned {0}.", sserr);

										doCast = false;

										break;
									}

									await Coroutine.Sleep(Utility.LatencySafeValue(1000));
								}

								if (!doCast)
								{
									continue;
								}

								await Coroutines.FinishCurrentAction();

								await Coroutine.Sleep(Utility.LatencySafeValue(1000));

								var err1 = LokiPoe.InGameState.SkillBarPanel.Use(skill.Slot, false);
								if (err1 == LokiPoe.InGameState.UseError.None)
								{
									await Coroutine.Sleep(Utility.LatencySafeValue(250));

									await Coroutines.FinishCurrentAction(false);

									await Coroutine.Sleep(Utility.LatencySafeValue(500));

									return true;
								}

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

I tried if (!LokiPoe.Me.HasAura(skill.Name) && skill.CanUse(OldRoutineSettings.Instance.DebugAuras, true) && cachedRarity >= Rarity.Rare) but I get the following error:

Compiler Error: warning CS2029: Invalid value for '/define'; '' is not a valid identifier
Compiler Error: ...\Routines\OldRoutine\OldRoutine.cs(1279,109) : error CS0841: Cannot use local variable 'cachedRarity' before it is declared

Can anyone enlighten me as to where I am going wrong?
 
Hi All,

I've been trying to set OR up to only use Vaal skill on encountering a rare. I tried following the recommendation from here:

https://www.thebuddyforum.com/exile...bot-vaal-skills-rare-mobs.html?highlight=Vaal

But where I believe I am meant to slot cachedRarity >= Rarity.Rare into isn't working:

Code:
if ((skill.SkillTags.Contains("aura") && !skill.SkillTags.Contains("vaal")) || IsAuraName(skill.Name))
						{
							if ([B]!LokiPoe.Me.HasAura(skill.Name) && skill.CanUse(OldRoutineSettings.Instance.DebugAuras, true)[/B])
							{
								var doCast = true;

								while (skill.Slot == -1)
								{
									Log.InfoFormat("[Logic] Now assigning {0} to the skillbar.", skill.Name);

									var sserr = LokiPoe.InGameState.SkillBarPanel.SetSlot(_auraSlot, skill);

									if (sserr != LokiPoe.InGameState.SetSlotError.None)
									{
										Log.ErrorFormat("[Logic] SetSlot returned {0}.", sserr);

										doCast = false;

										break;
									}

									await Coroutine.Sleep(Utility.LatencySafeValue(1000));
								}

								if (!doCast)
								{
									continue;
								}

								await Coroutines.FinishCurrentAction();

								await Coroutine.Sleep(Utility.LatencySafeValue(1000));

								var err1 = LokiPoe.InGameState.SkillBarPanel.Use(skill.Slot, false);
								if (err1 == LokiPoe.InGameState.UseError.None)
								{
									await Coroutine.Sleep(Utility.LatencySafeValue(250));

									await Coroutines.FinishCurrentAction(false);

									await Coroutine.Sleep(Utility.LatencySafeValue(500));

									return true;
								}

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

I tried if (!LokiPoe.Me.HasAura(skill.Name) && skill.CanUse(OldRoutineSettings.Instance.DebugAuras, true) && cachedRarity >= Rarity.Rare) but I get the following error:

Compiler Error: warning CS2029: Invalid value for '/define'; '' is not a valid identifier
Compiler Error: ...\Routines\OldRoutine\OldRoutine.cs(1279,109) : error CS0841: Cannot use local variable 'cachedRarity' before it is declared

Can anyone enlighten me as to where I am going wrong?

Cannot use local variable 'cachedRarity' before it is declared

Place the snippet after the variables declaration.
 
Yep, found it. Cheers for that Tony.

Code:
// Auto-cast any vaal skill at the best target as soon as it's usable.
				if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000)
				{
					foreach (var skill in LokiPoe.InGameState.SkillBarPanel.Skills)
					{
						if (skill.SkillTags.Contains("vaal"))
						{
							[B]if (skill.CanUse() && cachedRarity >= Rarity.Rare)[/B]
							{
								await DisableAlwaysHiglight();

								var err1 = LokiPoe.InGameState.SkillBarPanel.UseAt(skill.Slot, false, cachedPosition);
								if (err1 == LokiPoe.InGameState.UseError.None)
								{
									await Coroutine.Sleep(Utility.LatencySafeValue(250));

									await Coroutines.FinishCurrentAction(false);

									await Coroutine.Sleep(Utility.LatencySafeValue(250));

									return true;

For those who stumble across the same thing.
 
hello i want use ****Vaal Righteous Fire , can someone help me add code for meele use vaal gem ??? thank you
 
Back
Top