From 7bda3e46c3534cca130180cb0a9b83b5590d5dfa Mon Sep 17 00:00:00 2001 From: divinity76 Date: Wed, 11 Sep 2024 00:34:43 +0200 Subject: [PATCH 1/2] looting blacklist When "loot every item" is off, it will loot everything in the loot list. When "loot every item" is on, it will loot everything that is *not* in the loot list, effectively making the loot list a blacklist when "loot every item" is on. --- targetbot/looting.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targetbot/looting.lua b/targetbot/looting.lua index 9e41528..fb6ce87 100644 --- a/targetbot/looting.lua +++ b/targetbot/looting.lua @@ -224,7 +224,7 @@ TargetBot.Looting.lootContainer = function(lootContainers, container) for i, item in ipairs(container:getItems()) do if item:isContainer() and not itemsById[item:getId()] then nextContainer = item - elseif itemsById[item:getId()] or (ui.everyItem:isOn() and not item:isContainer()) then + elseif (not ui.everyItem:isOn() and itemsById[item:getId()]) or (ui.everyItem:isOn() and (not item:isContainer() and not itemsById[item:getId()])) then item.lootTries = (item.lootTries or 0) + 1 if item.lootTries < 5 then -- if can't be looted within 0.5s then skip it return TargetBot.Looting.lootItem(lootContainers, item) From 4e7dc95b0923cb86f9d72dd098288d912b8c5ca0 Mon Sep 17 00:00:00 2001 From: divinity76 Date: Wed, 11 Sep 2024 00:58:23 +0200 Subject: [PATCH 2/2] loot every item, except these --- targetbot/looting.otui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targetbot/looting.otui b/targetbot/looting.otui index aa973e3..027f7af 100644 --- a/targetbot/looting.otui +++ b/targetbot/looting.otui @@ -17,7 +17,7 @@ TargetBotLootingPanel < Panel BotSwitch id: everyItem - !text: tr("Loot every item") + !text: tr("Loot every item, except these") margin-top: 2 Label @@ -66,4 +66,4 @@ TargetBotLootingPanel < Panel anchors.left: parent.left anchors.verticalCenter: prev.verticalCenter text: Min. capacity: - margin-left: 5 \ No newline at end of file + margin-left: 5