Jump to content

[Fight] Manually target change


Recommended Posts

Hello everyone

I've got a problem with some of my fight classes

The bot reinitialize his target very often without any action from me 

Several times during an encounter I have the message : [Fight] Manually target change

For Hunter it deactivate Auto Shot and trigger Attack, most of the time, without going throught my tests.

Some times it completly deactivate combat routine

Here is a log sample


[F] 00:05:07 - [Spell] Cast Hunter's Mark (Hunter's Mark)
00:05:07 - Target Faction : 82
00:05:09 - [Looting] Loot Blackwood Pathfinder
00:05:11 - [Fight] Player Attack Blackwood Windtalker (lvl 14)
[F] 00:05:11 - [Spell] Cast Serpent Sting (Serpent Sting)
[D] 00:05:12 - [Fight] Manually target change
[D] 00:05:12 - Attack repetable=False
[D] 00:05:12 - Autoshot repetable=True
00:05:12 - [Fight] Player Attack Blackwood Windtalker (lvl 14)
[D] 00:05:13 - Attack repetable=False
[D] 00:05:13 - Autoshot repetable=True
[F] 00:05:13 - [Spell] Cast Arcane Shot (Arcane Shot)
[F] 00:05:14 - [Spell] Cast Auto Shot (Auto Shot)
[D] 00:05:14 - [Fight] Manually target change
[D] 00:05:15 - Attack repetable=False
[D] 00:05:15 - Autoshot repetable=True
00:05:17 - [Fight] Player Attack Blackwood Windtalker (lvl 14)
[D] 00:05:17 - Attack repetable=False
[D] 00:05:17 - Autoshot repetable=True
[F] 00:05:18 - [Spell] Cast Auto Shot (Auto Shot)
[F] 00:05:19 - [Spell] Cast Auto Shot (Auto Shot)
[D] 00:05:19 - Attack repetable=False
[D] 00:05:19 - Autoshot repetable=True
[F] 00:05:20 - [Spell] Cast Arcane Shot (Arcane Shot)
[D] 00:05:21 - Attack repetable=False
[D] 00:05:21 - Autoshot repetable=True
[F] 00:05:21 - [Spell] Cast Auto Shot (Auto Shot)
[D] 00:05:21 - [Fight] Manually target change
[D] 00:05:22 - Attack repetable=False
[D] 00:05:22 - Autoshot repetable=True
00:05:23 - [Fight] Player Attack Blackwood Windtalker (lvl 14)
[D] 00:05:23 - Attack repetable=False
[D] 00:05:24 - Autoshot repetable=True
[F] 00:05:24 - [Spell] Cast Auto Shot (Auto Shot)
[F] 00:05:25 - [Spell] Cast Auto Shot (Auto Shot)
[D] 00:05:25 - [Fight] Manually target change
[D] 00:05:26 - Attack repetable=False
[D] 00:05:26 - Autoshot repetable=True
00:05:26 - [Fight] Player Attack Blackwood Windtalker (lvl 14)
[F] 00:05:26 - [Spell] Cast Arcane Shot (Arcane Shot)
[D] 00:05:27 - Attack repetable=False
[D] 00:05:27 - Autoshot repetable=False
00:05:27 - [Fight] Player Attack Blackwood Pathfinder (lvl 12)

I join the fight Class to this message: 


I managed to mostly overcome the problem but it could look like a bit botish to expert eyes  

Tested without any addon

Vanilla version / Server Elysium

McRo Hunter 10-X.cs

Link to comment
Share on other sites

Hello that doesn't help.

Auto Shot trigger works OK

But I'm noticying that : SpellManager.IsRepeating(Attack.Ids) always return false (even when Attack is on).

even SpellManager.IsRepeating(new List<uint> { 6603 })  6603 being Hunter Attack SpellID (from what wrobot is displaying)

no more chances with Lua.LuaDoString<bool>("return IsAutoRepeatAction(" + (SpellManager.GetSpellSlotId(SpellListManager.SpellIdByName("Attack")) + 1) + ")");

(<= by the way it doesn't add +1 it concatenates inside of LuaDoString)



I tried to add Thread.Sleep(Usefuls.Latency + 2000); but doesn't help either


Anyway before reaching  Attack test trigger toon should go throught Raptor Strike test, and it doesn't reach it.

The "Manual target change" disable combat state

That's when I start combat with right mouse click.


Starting it with direct press on Auto shot, the bot stay in combat as long as it is in Ranged combat distance.

Once in Close combat it activates Raptor strike, then directly, Attack and => Manual target change



OK I think I've got what's going on 

look at spell definition : http://db.vanillagaming.org/?spell=6603

It's cast on SELF.

That's why there's a manual target change




Link to comment
Share on other sites

OK !!!!!!!!!!!!!!!!!!!!


I finally found the bloody solution :

The problems : 

Hunter Attack spell is cast on SELF  (So when you cast Attack you target yourself => Manual Target change ... Doh ! And you leave combat mode... but not your target if you hit it)


When you don't have target GetDistance functions gives insane results (distance >6000  for the record distance of sight is 100)


There's no way to know if Hunter Attack is repeating




So the point is to manage to save the target at start of the fight (if ranged).

Then when target change, mostly because you're getting in close combat mode, (you leave combat) you test if your old target is dead. If no => get target and Attack again

The surprise is that your "not new" target is not in SpellRange => Distance : more than 6600  o_O

Well sorry ... I can't explain better in english...

Here is the code solution  (tested on newbie and lvl 16 char to be sure):

McRo Hunter.cs

Drawback :

You must :

- check "Launch rotation when combat start" if you want to use right mouse click but you'll attack every Hostile targets. Should be used only by hunters lvl <10 not having pets

- start combat manually with auto Shot

- have your pet on defensive (will attack first and then trigger combat routine) 

McRo Hunter.cs

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...