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

Override - A Targeting Override Plugin

Heey it can't be compiled neither in the stable release or in the beta... :S
This is the error given.
Code:
[21:47:38:908] Plugin Override.cs could not be compiled! Compiler errors:
[21:47:38:910] File: Override.cs Line: 146 Error: Styx.Logic.Questing.PlayerQuest bevat geen definitie voor IsCompleted en er is geen extensiemethode IsCompleted gevonden waarmee het eerste argument van het type Styx.Logic.Questing.PlayerQuest wordt geaccepteerd (mogelijk ontbreekt er een gebruiksinstructie of een assembly-verwijzing)
File: Override.cs Line: 154 Error: Styx.WoWInternals.WoWObjects.LocalPlayer bevat geen definitie voor IsInRaid en er is geen extensiemethode IsInRaid gevonden waarmee het eerste argument van het type Styx.WoWInternals.WoWObjects.LocalPlayer wordt geaccepteerd (mogelijk ontbreekt er een gebruiksinstructie of een assembly-verwijzing)
File: Override.cs Line: 165 Error: Styx.WoWInternals.WoWObjects.LocalPlayer bevat geen definitie voor IsInRaid en er is geen extensiemethode IsInRaid gevonden waarmee het eerste argument van het type Styx.WoWInternals.WoWObjects.LocalPlayer wordt geaccepteerd (mogelijk ontbreekt er een gebruiksinstructie of een assembly-verwijzing)
File: Override.cs Line: 165 Error: Styx.WoWInternals.WoWObjects.LocalPlayer bevat geen definitie voor IsInParty en er is geen extensiemethode IsInParty gevonden waarmee het eerste argument van het type Styx.WoWInternals.WoWObjects.LocalPlayer wordt geaccepteerd (mogelijk ontbreekt er een gebruiksinstructie of een assembly-verwijzing)
 
First off, I'd like to say this is an awesome plugin. I've been running the latest questing beta and actually completing quests and not running thorugh hordes of mobs and creating an aggro train behind me. Sweet!
Two things I did notice with this plugin though.
1) It spends a lot of time killing the mobs around it and not focusing on the quests mobs/items. Is there a way to change the weighting so it makes a more direct line to the quest mobs instead of wandering around killing everything around it. Don't get me wrong, it eventually does get to the quest mobs, but only once it's killed everything else in the area.
2) I ran into a situation where there was a dwarf nearby in Un'Goro Crater. I play a troll mage on a PVE server. As soon as the dwarf was in range, all my toon wanted to do was kill the dwarf. However I was not PVP flagged, so it kept spamming 'invalid target'. Is there a way to ignore player characters when not in PVP mode or BG?

Thanks

Since my way of getting quest objective IDs (e.g. the mobs needed to kill for a quest) is a bit dodgey (I don't have all the API I need to make it work, and I cba to wrap the stuff for a simple plugin). If you want to add/remove weight for quest mobs, find the following lines:

Code:
                    if (questObjectiveEntries.Contains((int) u.Entry))
                        t.Weight += 100f;

And change the 100f to something around 150f-250f. That'll add enough weight to try to stay on the mobs you want, but will (hopefully) still avoid pulling the entire pack.

You may also want to change the following:

Code:
                    t.Weight -= 50 * GetAggroWithin(u.Location, 15f);
To
Code:
                    t.Weight -= 15 * GetAggroWithin(u.Location, 15f);

To give less of a detriment to mobs with aggroable units around it. (So it'll go through the pack, from front to back, instead of avoiding it.)

The weighting algorithm is fairly self explanatory, just do the math with (logical) values, and you can figure out the estimated 'good' weights to use.
 
Thanks Apoc. I looked through the code to get an idea of what the plugin is doing, but don't know enough to change it myself. Making your suggested changes now, will report back later with the results. Cheers
 
Some fix for Target Min/Max level

Apoc, superb plugin, thank you!

Just a little additions:
It's essentialy for questing profiles to have right Min/Max levels, but plugin won't take this into account, so i've edited it a bit
and now it selects mobs with Min/Max level specified in Profile tags <TargetMinLevel> <TargetMaxLevel>.
Also changed pack pulling and quest mob weight (as Apoc posted).
Test this out =)

UPDATE: just some more: I didn't found any check if mob is tagged by other player in weight assignment function, so maybe add somthing like:
Code:
   if (u.Tagged && !inParty && !TargetingMeOrPet(u)) // we don't want to attack mobs taged by other players, do we? ;-)
                    {
                        t.Weight = 0;
                    }
after these lines in CreateTargetList() function.
Code:
   // Check these first, since they require 0 reads.
                    if (Blacklist.Contains(guid))
                    {
                        // If the mob is blacklisted, just continue forward. We don't need to worry about it at the moment.
                        if (dist > 20)
                            continue;

                        t.Weight -= 1000f;
                    }
or just add this into possibleTargets, for example:
Code:
possibleTargets = (from o in ObjectManager.ObjectList
                                   where o is WoWUnit && !o.IsMe
                                   let dist = o.Distance
                                   let u = o.ToUnit()
                                   where !u.IsPet && dist < _settings.TargetRange
                                         && !u.Dead && u.CreatureType != WoWCreatureType.Critter && !u.IsFriendly && [B]!u.Tagged[/B]
                                         // Make sure we handle these, since we don't want them to be unreachable
                                         !u.OnTaxi && !u.IsOnTransport && !u.IsFlying &&
                                         // If we can't attack them, or select them, then ignore them.
                                         u.Attackable
                                   // Correct level range...
                                   let l = u.Level
                                   where l >= MinLevel && l <= MaxLevel
                                         // Check player targeting, obviously we only want this to run when we're not in BGs
                                         // Ordering done this way on purpose. 1 read required here.
                                         && (_settings.TargetPlayers || Battlegrounds.IsInsideBattleground || !(u is WoWPlayer))
                                   select u).ToList();
but i think that wouldn't work in party
 

Attachments

Last edited:
Apoc

Your suggestions worked superbly, thank you. Is there a way to prevent the plugin from targetting other players when not in PVP?
 
Apoc

Your suggestions worked superbly, thank you. Is there a way to prevent the plugin from targetting other players when not in PVP?

<TargetPlayers>True</TargetPlayers>

that is in the "OverrideTargetSettings.xml" in the Config folder (In your HB Directory). Change that to False.
 
Also it's good to skip neutral mobs if they are not quest targets and we have quests aviable:
add this in helpers region
Code:
private static bool questsAreAviable()
        {
            // Only grab incomplete quests
            List<int> questsAviable = (from q in StyxWoW.Me.QuestLog.GetAllQuests().Where(q => !q.IsCompleted) 
                                       from o in q.GetObjectives() 
                                       select o.ID).ToList();
            // shit code need to optimize
            if (questsAviable.Count > 0)
            {
                return true;
            }
            return false;
        }
and after
Code:
                    // Current target gets extra weight. This avoids having the bot jump back and forth between targets.
                    if (gotTarget && targetGuid == guid)
                        t.Weight += 100f;
add
Code:
 if (u.IsNeutral && !questObjectiveEntries.Contains((int)u.Entry) && questsAreAviable()) // just skip mobs that are not quest mobs if they are neutral
                    {
                         t.Weight = 0;
                    }

UPDATE: need some logic to not skip mobs that are not "kill mob quest target", but "loot some shit from mob quest target"
 
Last edited:
Bug

Have a Elemental Shaman at lvl 38 using the profile Horde 1-60 (Originally by Bliik) and it only keeps running from hotspot to hotspot in a zone almost without mobs to kill and blacklisting for 10m the few that find, tested with 2 different classes and 2 different versions of honorbuddy, with plugin disabled the problem is solved, log attached.
 

Attachments

Last edited:
Also it's good to skip neutral mobs if they are not quest targets and we have quests aviable:
add this in helpers region
Code:
private static bool questsAreAviable()
        {
            // Only grab incomplete quests
            List<int> questsAviable = (from q in StyxWoW.Me.QuestLog.GetAllQuests().Where(q => !q.IsCompleted) 
                                       from o in q.GetObjectives() 
                                       select o.ID).ToList();
            // shit code need to optimize
            if (questsAviable.Count > 0)
            {
                return true;
            }
            return false;
        }
and after
Code:
                    // Current target gets extra weight. This avoids having the bot jump back and forth between targets.
                    if (gotTarget && targetGuid == guid)
                        t.Weight += 100f;
add
Code:
 if (u.IsNeutral && !questObjectiveEntries.Contains((int)u.Entry) && questsAreAviable()) // just skip mobs that are not quest mobs if they are neutral
                    {
                         t.Weight = 0;
                    }

UPDATE: need some logic to not skip mobs that are not "kill mob quest target", but "loot some shit from mob quest target"

Ilyals, so this just gets added to the override.cs you posted earlier in this thread ?

G
 
Forb1d - Thanks for the info. Didn't even notice the config file. No more problems with targeting player characters.
Ilyals - Great ideas. Implemented them into the code and it's targeting quest mobs much more smoothly. Also, I added
if (!u.IsFriendly && !questObjectiveEntries.Contains((int)u.Entry) && questsAreAviable() && dist > 30) // just skip mobs that are not quest mobs if they are hostile and out of aggro range
{
t.Weight = 0;
}
after
if (u.IsNeutral && !questObjectiveEntries.Contains((int)u.Entry) && questsAreAviable()) // just skip mobs that are not quest mobs if they are neutral
{
t.Weight = 0;
}
so it wouldn't target hostile mobs if out of aggro range as long as quest mobs are available

One thing I have noticed is that since using this plugin, my toon no longer attempts to repair. It's getting constantly caught up in mobs around it that it forgets it needs to repair it's armor. Is there a way to add a check to see if repair is needed and if it is needed, run to repair and only attack mobs that it aggros along the way?

Thanks in advance
 
Just currious, can theese changes be implemented to HB core?

(im not a coder)
 
Yes they could. But it is not needed since we have the plugin system^^ So the Community can decide which system it want to use
 
If it is a plugin everyone can read its source and add suggestions and work on it. If its in the core, you are screwed
 
If it is a plugin everyone can read its source and add suggestions and work on it. If its in the core, you are screwed

But right now, because it is a plugin, it runs slower. HB's system still tries to run, so you have to run through the object list twice. Apoc said they were gonna see about making a way to prevent this iirc though.
 
Is it working with the newest stable version of HB for everyone?
 
TWKing, can you post your latest overide.cs thanks. FWIW mine doesn't repair either when using this and the updated pluging posted a few pages back.
 
lol, my overide will target other player... i mean, yeah its cool~ once i get my good gears and lv80~ will start using this to kill all the botter in my area, kekeke, will test the overide plugin on BG... currently the default target for HB is buggy~ i will update again ^_^
 
WoW dude impressive. I saw a 50k increase
REP
 
Can anyone tell me what I'm doing wrong? I just downloaded HB yesterday and installed it and it gives me this error on both a rogue and sham (Shamwow and rogue mut mut class).
It won't target anything and I'm running a 1-60 profile and the chars are low 20's. Ony way is to be aggro'd.

Code:
Activity: Moving to hotspot
Exception from Override:
System.InvalidCastException: Unable to cast object of type 'Styx.WoWInternals.WoWObjects.WoWUnit' to type 'Styx.WoWInternals.WoWObjects.WoWPlayer'. ---> SmartAssembly.SmartExceptionsCore.UnhandledException: SmartExceptionsCore.UnhandledException @ 988, offset:0 ---> SmartAssembly.SmartExceptionsCore.UnhandledException: SmartExceptionsCore.UnhandledException @ 1309, offset:59
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Styx.WoWInternals.WoWObjects.WoWUnit.get_IsFriendly()
   at Apoc.Plugins.TargetOverride.Override.<CreateTargetList>b__23(<>f__AnonymousType3`2 <>h__TransparentIdentifier19) in c:****\HB\Plugins\Override.cs:line 195
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Apoc.Plugins.TargetOverride.Override.CreateTargetList() in c:****\HB\Plugins\Override.cs:line 191
   at Apoc.Plugins.TargetOverride.Override.Targeting_OnTargetListUpdateFinished(Object context) in c:****\HB\Plugins\Override.cs:line 77

Thanks.
 
Can anyone tell me what I'm doing wrong? I just downloaded HB yesterday and installed it and it gives me this error on both a rogue and sham (Shamwow and rogue mut mut class).
It won't target anything and I'm running a 1-60 profile and the chars are low 20's. Ony way is to be aggro'd.

Code:
Activity: Moving to hotspot
Exception from Override:
System.InvalidCastException: Unable to cast object of type 'Styx.WoWInternals.WoWObjects.WoWUnit' to type 'Styx.WoWInternals.WoWObjects.WoWPlayer'. ---> SmartAssembly.SmartExceptionsCore.UnhandledException: SmartExceptionsCore.UnhandledException @ 988, offset:0 ---> SmartAssembly.SmartExceptionsCore.UnhandledException: SmartExceptionsCore.UnhandledException @ 1309, offset:59
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Styx.WoWInternals.WoWObjects.WoWUnit.get_IsFriendly()
   at Apoc.Plugins.TargetOverride.Override.<CreateTargetList>b__23(<>f__AnonymousType3`2 <>h__TransparentIdentifier19) in c:****\HB\Plugins\Override.cs:line 195
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Apoc.Plugins.TargetOverride.Override.CreateTargetList() in c:****\HB\Plugins\Override.cs:line 191
   at Apoc.Plugins.TargetOverride.Override.Targeting_OnTargetListUpdateFinished(Object context) in c:****\HB\Plugins\Override.cs:line 77

Thanks.

I'm gonna assume you made some changes?

Post the new .cs file so I can take a look at it.
 
Back
Top