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

How do i blacklist by name?

Unknown Buddy

Member
Joined
May 20, 2015
Messages
603
Reaction score
17
Trying to improve the AutoCastVaalSkills for my own builds. The default logic just has the Vaal skill fire immediately when its available.

I am wanting to have it use the skill only on bosses, which was easy enough with:

Code:
if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 [COLOR="#00FF00"]&& cachedRarity >= Rarity.Unique[/COLOR])

The only issue with this is Tormented Spirits are classified as Rarity.Unique.

I have tried adding things like
Code:
cachedName != "Tormented Spirit"
but it just crashes EB.


Clearly i am just messing up the syntax, but ive tried several different variations. Hopefully someone can help me out.

Code:
var cachedPosition = bestTarget.Position;
var targetPosition = bestTarget.ModelCenterWorld;
var cachedId = bestTarget.Id;
var cachedName = bestTarget.Name;
var cachedRarity = bestTarget.Rarity;

These var's are able to be used.
 
An EB crash is when the process dies with a Windows error. It's highly unlikely anything you've posted would cause EB to crash.

Now, you can have exceptions thrown, which is red text, but those are just that, exceptions. They can result from syntax errors, or runtime errors (like memory being bad for an object)

Please post the exact code you're using, and the actual log that results from running it and I'll take a look over it.
 
This is the entire code, its literally just OldRoutines code while trying to add a few more checks.

Code:
// Auto-cast any vaal skill at the best target as soon as it's usable.

if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 [COLOR="#FF0000"]&& cachedRarity >= Rarity.Unique && cachedName != "Tormented Spirit"[/COLOR])
	{
		foreach (var skill in LokiPoe.InGameState.SkillBarPanel.Skills)
		{
			if (skill.SkillTags.Contains("vaal"))
			{
				if (skill.CanUse())
				{
					await DisableAlwaysHiglight();

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

						await Coroutines.FinishCurrentAction(false);

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

						return true;
					}

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

I dont get any errors or crashes anymore, those were just from me being silly at like 4am trying to do things like !cachedName = "Tormented Spirit"

The issue i have now i guess is building a table with all the Tormented Spirits names, unless there is something easier like all Tormented Spirits are classified as X category, or if i can just blacklist anything that starts with "Tormented".

I dont know how to build a table to include all the names i want to blacklist. Worst case i could probably do something like:

Code:
 if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 [COLOR="#FF0000"]&& cachedRarity >= Rarity.Unique && (cachedName != "Tormented Spirit" || "Tormented Arsonist" || "Tormented Aurora Cultist" || Tormented Blasphemer || etc, etc, etc, etc, etc, etc)[/COLOR])

Looks like there are 22 total Tormented Spirit types. http://pathofexile.gamepedia.com/Tormented_Spirit


The idea behind this change is to simply have vaal skills available for bosses. They are the bottleneck for my bots actually leveling past level 80ish in the mid to higher maps (too many boss deaths). Saving vaal skills such as vaal haste / grace / molten shell / etc tremendously helps for taking down the bosses and i rarely die if these are available. Wasting a vaal skill on a Tormented Spirit just before i reach a boss is such a bad feeling!
 
Last edited:
This is the entire code, its literally just OldRoutines code while trying to add a few more checks.

Code:
// Auto-cast any vaal skill at the best target as soon as it's usable.

if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 [COLOR="#FF0000"]&& cachedRarity >= Rarity.Unique && cachedName != "Tormented Spirit"[/COLOR])
	{
		foreach (var skill in LokiPoe.InGameState.SkillBarPanel.Skills)
		{
			if (skill.SkillTags.Contains("vaal"))
			{
				if (skill.CanUse())
				{
					await DisableAlwaysHiglight();

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

						await Coroutines.FinishCurrentAction(false);

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

						return true;
					}

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

I dont get any errors or crashes anymore, those were just from me being silly at like 4am trying to do things like !cachedName = "Tormented Spirit"

The issue i have now i guess is building a table with all the Tormented Spirits names, unless there is something easier like all Tormented Spirits are classified as X category, or if i can just blacklist anything that starts with "Tormented".

I dont know how to build a table to include all the names i want to blacklist. Worst case i could probably do something like:

Code:
 if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 [COLOR="#FF0000"]&& cachedRarity >= Rarity.Unique && (cachedName != "Tormented Spirit" || "Tormented Arsonist" || "Tormented Aurora Cultist" || Tormented Blasphemer || etc, etc, etc, etc, etc, etc)[/COLOR])

Looks like there are 22 total Tormented Spirit types. http://pathofexile.gamepedia.com/Tormented_Spirit


The idea behind this change is to simply have vaal skills available for bosses. They are the bottleneck for my bots actually leveling past level 80ish in the mid to higher maps (too many boss deaths). Saving vaal skills such as vaal haste / grace / molten shell / etc tremendously helps for taking down the bosses and i rarely die if these are available. Wasting a vaal skill on a Tormented Spirit just before i reach a boss is such a bad feeling!

Basically you could do it like this :

- Create a list/array of string entries :
Code:
var tormentedFuckers = new List<string> { "", "", "", "", "", "", "" };

and check if this list contains the name (if you don't want it to be case sensitive lemme know)
Code:
if (tormentedFuckers.Contains(cachedName)...

#Done
 
Code:
var tormentedSpirits = new List<string> { "Tormented Spirit", "Tormented Arsonist", "Tormented Aurora Cultist", "Tormented Blasphemer", "Tormented Cannibal", "Tormented Charlatan", "Tormented Cutthroat", "Tormented Embezzler", "Tormented Illegal Fisherman", "Tormented Forger", "Tormented Martyr", "Tormented Mutilator", "Tormented Necromancer", "Tormented Poisoner", "Tormented Rogue", "Tormented Seditionist", "Tormented Smuggler", "Tormented Spy", "Tormented Storm Cultist", "Tormented Thief", "Tormented Thug", "Tormented Vaal Cultist", "Tormented Warlord" };
				

if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 && cachedRarity >= Rarity.Unique)
{
	foreach (var skill in LokiPoe.InGameState.SkillBarPanel.Skills)
	{
		if (skill.SkillTags.Contains("vaal"))
		{
			if (skill.CanUse())
			{
				await DisableAlwaysHiglight();

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

					await Coroutines.FinishCurrentAction(false);

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

					return true;
				}

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

So the var tormentedSpirits is set up. Where do I insert the var to make sure this code does NOT fire if one of those listed are there.

Would it be like:

Code:
if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 && cachedRarity >= Rarity.Unique && [COLOR="#FF0000"]cachedName != tormentedSpirits[/COLOR])

Code:
if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 && cachedRarity >= Rarity.Unique && [COLOR="#FF0000"]tormentedSpirits = false[/COLOR])

Code:
if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 && cachedRarity >= Rarity.Unique && [COLOR="#FF0000"]!tormentedSpirits[/COLOR])

Code:
if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 && cachedRarity >= Rarity.Unique)
{
[COLOR="#FF0000"]        if (tormentedSpirits.Contains(cachedName)
        {
                return false
         }[/COLOR]
	foreach (var skill in LokiPoe.InGameState.SkillBarPanel.Skills)
	{
		if (skill.SkillTags.Contains("vaal"))
		{
			if (skill.CanUse())

I know this is pretty basic stuff, but i am lost and just doing trial and error. I believe this was working (but it looks really bad)

Code:
if (OldRoutineSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000 && cachedRarity >= Rarity.Unique && cachedName != "Tormented Spirit" && cachedName != "Tormented Arsonist" && cachedName != "Tormented Aurora Cultist" && cachedName != "Tormented Blasphemer" && cachedName != "Tormented Cannibal" && cachedName != "Tormented Charlatan" && cachedName != "Tormented Cutthroat" && cachedName != "Tormented Embezzler" && cachedName !=  "Tormented Illegal Fisherman" && cachedName != "Tormented Illegal Fisherman" && cachedName != "Tormented Martyr" && cachedName !=  "Tormented Mutilator" && cachedName !=  "Tormented Necromancer" && cachedName !=  "Tormented Poisoner" && cachedName !=  "Tormented Rogue" && cachedName !=  "Tormented Seditionist" && cachedName !=  "Tormented Smuggler" && cachedName !=  "Tormented Spy" && cachedName !=  "Tormented Storm Cultist" && cachedName !=  "Tormented Thief" && cachedName != "Tormented Thug" && cachedName != "Tormented Vaal Cultist" && cachedName != "Tormented Warlord")

Will try a few things out. Thanks for the help so far.
 

The way the routine is coded, you shouldn return false at all, returning false in a task pass through the execution and gives the hand to the next one.

so it's more like :

Code:
if (!tormentedSpirits.Contains(cachedName))
{
	// Execution logic...
}

the exclamation mark (!) negates the check, that means it'll return true if the list DOESN'T contain the name.

should do the trick ;)
 
Seems like everything is working as intended. Uses my vaal skills on bosses / uniques and is not using them on any spirits (only seen 2 so far, but no vaal skills pop).

Thanks for help! Merry Christmas!
 
Back
Top