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

Ignore totems

MORZIL

New Member
Joined
Jan 4, 2014
Messages
31
Reaction score
0
hi im botting a RF build and wondering if theres a way to ignore totems because he just waste time on them

also sometimes i run in an instance that my bot already cleared and find many orbs/unique that were not looted by the bot even tho he loot that type of orb normally,and this happen very frequently
 
Last edited:
The next time your bot clears an area, and you check over it to see if any items are missed, please post the full log from that botting session and make a note of which items you saw weren't looted.

All looting behaviors are being logged now, so there should be a reason why the bot didn't loot the item, even though it was supposed to.

If you want to ignore totems, you'll have to make a modification to ExampleRoutine. If you search for "CombatTargetingOnInclusionCalcuation", that function controls which mobs are included for combat targeting. If you were to replace that function with this code, Totems should be ignored:
Code:
private bool CombatTargetingOnInclusionCalcuation(NetworkObject entity)
        {
            try
            {
                var m = entity as Monster;
                if (m == null)
                    return false;

                if (AreaStateCache.Current.IsBlacklisted(m))
                    return false;

                // Do not consider inactive/dead mobs.
                if (!m.IsActive)
                    return false;

                // Ignore any mob that cannot die.
                if (m.CannotDie)
                    return false;

                // Ignore mobs that are too far to care about.
                if (m.Distance > (_currentLeashRange != -1 ? ExampleRoutineSettings.Instance.CombatRange : 300))
                    return false;

                if (m.Rarity == Rarity.Normal && m.Type.Contains("/Totems/"))
                    return false;
            }
            catch (Exception ex)
            {
                Log.Error("[CombatOnInclusionCalcuation]", ex);
                return false;
            }
            return true;
        }

ExampleRoutine gets updated each bot update, so keep that in mind that you'll need to re-modify future versions.
 
You're using the MapRunner plugin, which has it's own system for full clearing via TrackMobsTask. With that change, the CR is ignoring the mobs as it should, but the plugin is taking the bot there for the CR to kill it.

Try this instead:
Code:
private bool CombatTargetingOnInclusionCalcuation(NetworkObject entity)
        {
            try
            {
                var m = entity as Monster;
                if (m == null)
                    return false;

                if (AreaStateCache.Current.IsBlacklisted(m))
                    return false;

                // Do not consider inactive/dead mobs.
                if (!m.IsActive)
                    return false;

                // Ignore any mob that cannot die.
                if (m.CannotDie)
                    return false;

                // Ignore mobs that are too far to care about.
                if (m.Distance > (_currentLeashRange != -1 ? ExampleRoutineSettings.Instance.CombatRange : 300))
                    return false;

                if (m.Rarity == Rarity.Normal && m.Type.Contains("/Totems/"))
                {
                    AreaStateCache.Current.Blacklist(m.Id, TimeSpan.FromHours(1), "Ignore totems.");
                    return false;
                }
            }
            catch (Exception ex)
            {
                Log.Error("[CombatOnInclusionCalcuation]", ex);
                return false;
            }
            return true;
        }
 
ty for all the info,one last question,what would happen if i meet a Cannot kill totem,would the bot stay and try to kill the mobs or would he ignore them?
 
They would be ignored, but you'd most likely die if they were blocking the path since you weren't killing the totem or the mobs themselves and were unable to move further.
 
Back
Top