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

Repeat attack with fortify?

kenjou

New Member
Joined
Oct 15, 2013
Messages
140
Reaction score
0
Hi there

Is there a way to make to bot use repeat attacks after x seconds?

Basically I linked Flicker Strick, Melee Splash, Fortiy and Inc. Duration togehter and I use it to gain additional damage reduction. However Foritfy only lasts a few secs so it would be good if the Bot could repeatedly use this attack to maintain Fortify.
 
Hello everyone,
Yes please, make this possible. I was about to create a thread asking for same thing...
I also have Fortify linked to Flicker Strike. If you guys can make the bot to use any melee skill that is linked to Fortify to enable its buff, use again right before the buff runs out, maintaining it on, please do it. It could be an option on OldRoutine that we enable or disable.

Thanks in advance.
 
I'm 99% sure that increased duration has no effect on fortify, Support Gems affect Active Gems.

I'm sure you can use something like this :

you need to first set up the flickerslot, if you look into oldroutine you can figure out every step needed.


var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_flickerSlot);
if (skill.CanUse() && !LokiPoe.Me.HasBuff("WHATEVER THE NAME OF FORTIFY IS, CAN'T CHECK NOW CUZ ITS DOWN :D"))
{
LokiPoe.InGameState.SkillBarPanel.UseOn(_flickerSlot, true, bestTarget);

}

If you want it to be even better instead of casting when it doesn't have the buff you cast it before the buff runs out for higher uptime.
 
I'm 99% sure that increased duration has no effect on fortify, Support Gems affect Active Gems.

Don't really know what else to put in the 4th slot. Inc. duration sounded like a good idea :)

As for the rest, I'll have a look. I don't really know much about coding.

Right now I have Flicker Strike as Ranged and Range AoE attack setup. It works fine. It flickers to the enemy and the buff is triggered. Only problem is how to repeat it (before buff runs out).
 
Need some help please :D

I'm 99% sure that increased duration has no effect on fortify, Support Gems affect Active Gems.

I'm sure you can use something like this :

you need to first set up the flickerslot, if you look into oldroutine you can figure out every step needed.




If you want it to be even better instead of casting when it doesn't have the buff you cast it before the buff runs out for higher uptime.

Hello tozededao
I tried what you said using the _tempestShield as example from OldRoutine.cs. Unfortunately the bot couldn't load it after changes.
I tried this line: if (skill.CanUse() && !LokiPoe.Me.HasBuff("Fortify"))
Bot closed right after I clicked it and a error log appeared.
I also tried: if (skill.CanUse() && !LokiPoe.Me.HasFortifyBuff)
Bot loaded and a red message on console saying some like couldn't find LokiPoe.Me.HasFortifyBuff. I guess we just have to add that fortify buff somewhere so it can work...

I don't know how to code. Tried to copy some lines from tempest shield as I said. If you or anyone else can help us here, it would be very appreciated.
I'll add a copy of the modification I made on OldRoutine so you guys can take a look :D
Thanks in advance.
View attachment OldRoutine.cs
 
if (skill.CanUse() && !LokiPoe.Me.HasFortifyBuff)

and replace that with

if (skill.CanUse() && !LokiPoe.Me.HasBuff("fortify"))
 
Ok, I tried it now also and it complains about _flikcerStrikeSolot not available in current context:

Compiler Error: warning CS2029: Ungültiger Wert für /define; '' ist kein gültiger Bezeichner.
Compiler Error: xxx\Routines\OldRoutine\OldRoutine.cs(1046,9) : error CS0103: Der Name '_flickerStrikeSlot' ist im aktuellen Kontext nicht vorhanden.
Compiler Error: xxx\Routines\OldRoutine\OldRoutine.cs(1048,57) : error CS0103: Der Name '_flickerStrikeSlot' ist im aktuellen Kontext nicht vorhanden.
Compiler Error: xxx\Routines\OldRoutine\OldRoutine.cs(1050,56) : error CS0103: Der Name '_flickerStrikeSlot' ist im aktuellen Kontext nicht vorhanden.

I checked for tempest shield but that's only defined in that subroutine right above. So why doesn't tempest shield produce the same error?
 
Ok, I have this meanwhile:

1. find in your oldroutine.cs this line:
Code:
private int _arcticArmourSlot = -1;

2. insert as new line below:
Code:
		private int _flickerStrikeSlot = 6;  // Set slot to your flicker strike attack

3. find in the oldroutine.cs this line:
Code:
// Simply cast Hearld of Ash if we have it.

4. enter as new block above
Code:
				// Use Flicker Strike to get Fortify buffs.
				if (_flickerStrikeSlot != -1) {
					// See if we can use the skill.
                                        var fortifyTarget = CombatTargeting.Targets<Monster>().FirstOrDefault();
                                        var fortifyPosition = fortifyTarget .Position;
					var fortifyDist = LokiPoe.Me.Position.Distance(fortifyPosition);
					var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_flickerStrikeSlot);
					if (skill.CanUse() && !LokiPoe.Me.HasBuff("fortify") && fortifyDist > OldRoutineSettings.Instance.MaxMeleeRange) {
						var err1 = LokiPoe.InGameState.SkillBarPanel.Use(_flickerStrikeSlot, true);
						if (err1 == LokiPoe.InGameState.UseError.None) {
							await Coroutine.Sleep(Utility.LatencySafeValue(500));
							await Coroutines.FinishCurrentAction(false);
							await Coroutine.Sleep(Utility.LatencySafeValue(100));
							return true;
						}
						Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name);
					}
				}

However there must be another check so that it tries to cast flicker strike when mobs are close.

I tried to add it so I added from other parts of the routines the commands for "besttarget", "cacheposition" and "dist" and renamed them to "fortifyXXX" because otherwise EB complained. However the bot doesn't complain now on start up but when I actually press the "start" button.

The problem still is, that it should only try to renew the fortify buff when mobs are close.
 
Ok friends,

I've been changing/testing the OldRoutine.cs trying to make the bot to keep fortify buff up.
I added some lines on the file and looks like some progress was made. Now it's not crashing or giving any red errors on console.
I tried it on 2 different ways and gave me 2 different results.
1. If I set Flicker Strike skill number from skillbar on OldRoutine settings on any position (single ranged/aoe ranged/single melee/aoe melee), the bot will keep using FS with higher priority than my main skill and will ignore the "!LokiPoe.Me.HasBuff("fortify")" and also ignore the 5secs timewatcher that I added.
2. If I don't set FS on OldRoutine settings, bot will rarely use FS and when it's used, it's on melee range. Here my main skill has the priority, as it supposed to be. Also the bot acts slower than the normal...
Here is the OldRoutine.cs file.
View attachment OldRoutine.cs
Any help will be appreciated. I really need this working so I ca move to merciless HC :D
Again, thanks in advance.
 
Back
Top