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

Can't get Tempest Shield to work

PrinzValium

New Member
Joined
Sep 6, 2014
Messages
19
Reaction score
0
I tried to make the bot cast tempest shield but for some reason it doesn't work.


I added a variable where all other slots are declared as variables:

Code:
private int _tempestShieldSlot = -1;

added a stopwatch:

Code:
private readonly Stopwatch _tempestShieldStopwatch = Stopwatch.StartNew();

added this single line ( _tempestShieldSlot = -1; ) under public void Tick () where all the other slots are reset

Code:
public void Tick()
		{
			if (!LokiPoe.IsInGame)
				return;

			if (_needsUpdate)
			{
				_tempestShieldSlot = -1;

added this where the other skills in the skill bar get recognized:

Code:
				var tempestShield = LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Tempest Shield");
				if (IsCastableHelper(tempestShield))
				{
					_tempestShieldSlot = tempestShield.Slot;
				}

and finally the logic for casting:

Code:
				// Tempest Shield
				if (_tempestShieldSlot != -1 && _tempestShieldStopwatch.ElapsedMilliseconds > 15000)
				{
					// See if we can use the skill.
					var skill = LokiPoe.InGameState.SkillBarHud.Slot(_tempestShieldSlot);
					if (skill.CanUse() && skill.NumberDeployed < 1)
					{
						await DisableAlwaysHiglight();

							await Coroutines.FinishCurrentAction();

							var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_tempestShieldSlot, true, myPos);
							if (err1 == LokiPoe.InGameState.UseResult.None)
							{
								_tempestShieldStopwatch.Restart();

								await Coroutines.FinishCurrentAction(false);

								return true;
							}

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


When I try using it like this "OldRoutine" doesn't even show up in Exilebuddy.
Any ideas how to solve this?
 
Last edited:
What slot on the skillbar did you put tempest shield on?
 
Slot 5
I feel like you wanted to assure that I didn't put it on slot 1/left mousebutton
 
Yes I was making sure, since there was no log, I can't be too sure. Little mistakes makes big ones seem hard.
 
The problem is I couldn't choose old routine after customizing so I couldn't even start the bot, hence there is no log
 
The problem is I couldn't choose old routine after customizing so I couldn't even start the bot, hence there is no log

You couldn't choose it because there was a compile error, but there should be a log generated with what went wrong, so double check please. :)
 
I solved my problem btw.
Blood Rage works the same way as Tempest Shield so I just duplicated every Blood Rage variable and logic and swapped in "Tempest Shield". Seems to work now.
 
Yeah for future troubleshooting, if you edit OldRoutine and it does't load (can't even select it), scroll up in your log. You'll see errors as it tries to load it and point you to the line in the .cs file it's having issues with. Makes troubleshooting pretty easy.
 
Back
Top