Jump to content

Fixing the target switch (no more rambo mode)


ScripterQQ

Recommended Posts

It's been some weeks since I started using wrobot again for battlegrounds (I was creating leveling profiles), and the bot is kinda good but still it has the same problems that I always hated and tried to fix somehow, without results.

First of all, I'm a bit confused, in General Settings there is "Search Radius", and in Product Settings "Distance Search Target", so what's the difference between them, what do they do exactly?

I go to the point: my character often goes suicide 1vs5, 1vs10, and keeps following the target he picks up. You know you can't switch the target unless it dies, or you die, so if the target start to move away, blink, teleport, whatever, you end up forever running towards a target too far from you, and this may work in a 1v1 situation, that you keep following the target, but most of times in bg, you really need to stop chasing the target and switch to another one, specially if it's in melee zone.

I tried to put in both Search Radius and Distance Search Target 20 yard, but looks like I need a larger radius to engage combat, otherwise the char just passes next to enemies ignoring them because they are more than 20 yards away. But if I put a larger radius like 40 yard, the character picks up someone correctly, but keeps targeting that one eve if it's 40 yard from you, so both way are wrong and bottish.

In few words:

1) What do those 2 radius do exactly? Are them a pickup target radius, a following-max radius..what value should I put in those fields?

2) How can I force the bot to switch to the target that requires less movement? I want it to pick the closest one ALWAYS, like "the target is now 20 yard away, but hey there is another one at 3 yard distance, so I switch to that one because it's closer"

Thanks for reading.

Link to comment
Share on other sites

Yes I have it but I thought that feature (focus healer) was not working, since I was targeting a Balance Druid and there was a Paladin spamming heals behind him. Now I don't know exactly the algorythm you created, but I will try again, even if it doesn't get the healer right 100% of times, the closest target thing is something that I really need.

 

EDIT: Ok I'm trying, as a melee class, what radius should I put in your plugin? And what about other two radius I mentioned?

Link to comment
Share on other sites

Yes, i looked into robot code, its not enough to find new target, but need to cancel current fight too. Added it into new plugin version (2.1.0), now switching is more precious (look code for FightEvents.OnFightStart and FightEvents.OnFightLoop).

You can see switch events in log (">>>>Attack enemy healer<<<< ")

Link to comment
Share on other sites

I'm testing it at the moment, I just noticed in the log a Debug line that says "Target has moved more than 45 yards", and it changed target to a closer one, my question is, where does that 45 come from?

So in Gerneral settings I have 300 "Search Radius", on Product Settings I have 40 "Distance Search Target" and Fight Class is 5 yard, and in your plugin is 8 "Search Distance".

I can only think it is Distance Search target (product) + Range of the Fight Class. If it is like this, then the robot has priority over the addon. But I am not sure 100% I should mess with ranges and see what happens.

Link to comment
Share on other sites

I just changed Distance Search Target to 45, to see if the Debug line would have changed to 50, but still it's 45. I think it's definitely something inside wrobot that can't be fixed (or idk then, I didn't set "change target on 45 yard" anywhere)

Link to comment
Share on other sites

plugin can switch target only if distance to new target is less than CustomClass.GetRange

To be more precise, it switch and bot starts move to target, but if someone attack you while move, bot will switch to nearest attacker. So works robot's algorithm

Link to comment
Share on other sites

1 hour ago, scripterx said:

Ok maybe I don't get your reply at all, but I just want to know where that 45 comes from.

45f is hardcoded in FightBG private function. 

Do you have decompiler? Try to find old, non-obfuscated robot and open function used in FightBG.StartFight. You will see something like this:

	if (woWUnit.Position.DistanceTo(position) > 45f)
	{
		Logging.WriteDebug(BlackListSerializable.Icaleodoarea());
		return Int128.Zero();
	}

In old versions you can change this value and recompile, new versions are obfuscated, only byte-patch can help

Link to comment
Share on other sites

I wish I could do that, I have absolutely no clue about C# language or how to get source from a compiled .exe, I know only lua at the moment (and some other languages but they have nothing to do with WoW) :(

Thanks for the info by the way, at least I know what's happening!

Link to comment
Share on other sites

You can do some research with dnSpy. Download dnSpy.zip, unpack, run and open wManager.dll - and you will see how robot works. New versions are obfuscated, and is impossible to understand what's going on inside, but old are pretty clear (if you know c# or resembling language). Using old and new versions you can find similar places in code and even do patch, for example, change this 45f to 60f. Or understand, is it possible to customize robot with plugin

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...