TargetBot Blacklist
#50
Add blacklisted items to TargetingBot.
Example from 1.3
Example from 1.3
-- main loop, controlled by config
targetbotMacro = macro(100, function()
local pos = player:getPosition()
local creatures = g_map.getSpectatorsInRange(pos, false, 6, 6) -- 12x12 area
if #creatures > 10 then -- if there are too many monsters around, limit area
creatures = g_map.getSpectatorsInRange(pos, false, 3, 3) -- 6x6 area
end
local highestPriority = 0
local dangerLevel = 0
local targets = 0
local highestPriorityParams = nil
+ local tblackList = { "rat", "dog", "cat", "training dummy"}
for i, creature in ipairs(creatures) do
local path = findPath(player:getPosition(), creature:getPosition(), 7, {ignoreLastCreature=true, ignoreNonPathable=true, ignoreCost=true})
- if creature:isMonster() and (oldTibia or creature:getType() < 3) and path then
+ if creature:isMonster() and (oldTibia or creature:getType() < 3) and path and not table.contains(tblackList, creature:getName(), true) then
local params = TargetBot.Creature.calculateParams(creature, path) -- return {craeture, config, danger, priority}
- remove | + add
24 Jul 2021