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

Is there a way to add code manually to avoid certain mobs?

DiscoDancer

Member
Joined
Mar 5, 2015
Messages
256
Reaction score
15
Hey,

i've noticed there are a few specific mob types that are abosultly horrible for humans/bots to fight, is there a way I can add code to keep my bot from avoiding them? I.e Sand Wasp/Barbed Lurker are horrible to fight on any higher difficulty.
 
So if i understand correctly you want to always completely ignore certain monsters in all situations. There is no nice friendly way to do that in the settings. But it would be relatively easy to do with code.

For example: \Trinity\Framework\Modules\TargetsCache.cs ~133

replace

Code:
        private bool ShouldTargetActor(TrinityActor cacheObject)
        {
            if (cacheObject == null)
            {
                Logger.LogError("NullObject");
                return false;
            }

with,

Code:
        private static HashSet<int> AlwaysIgnoreActorIds = new HashSet<int>
        {
            786123, 123879, 2358
        };


        private bool ShouldTargetActor(TrinityActor cacheObject)
        {
            if (cacheObject == null)
            {
                Logger.LogError("NullObject");
                return false;
            }


            if (AlwaysIgnoreActorIds.Contains(cacheObject.ActorSnoId))
            {
                cacheObject.AddCacheInfo("My Custom Ignore List");
                return false;
            }

and change the '786123, 123879, 2358' part to the ids of the actors you want to ignore. You can get that info from the log files or visualizer.
 
Back
Top