From 76d6f2ce7d56cc35978ba4b5a4a829abbf10f8b9 Mon Sep 17 00:00:00 2001 From: OTCv8 Date: Thu, 16 Apr 2020 00:36:47 +0200 Subject: [PATCH] Fixed bug with TargetBot.useAttackItem --- modules/game_bot/default_configs/cavebot_1.1/hp.lua | 2 +- .../game_bot/default_configs/cavebot_1.1/targetbot/target.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/game_bot/default_configs/cavebot_1.1/hp.lua b/modules/game_bot/default_configs/cavebot_1.1/hp.lua index 43a001d..88b44d1 100644 --- a/modules/game_bot/default_configs/cavebot_1.1/hp.lua +++ b/modules/game_bot/default_configs/cavebot_1.1/hp.lua @@ -181,7 +181,7 @@ macro(250, function() for __, item in ipairs(container:getItems()) do if item:getId() == autoEquip.item1 or item:getId() == autoEquip.item2 then g_game.move(item, {x=65535, y=autoEquip.slot, z=0}, item:getCount()) - delay(1000) -- don't call it to often + delay(1000) -- don't call it too often return end end diff --git a/modules/game_bot/default_configs/cavebot_1.1/targetbot/target.lua b/modules/game_bot/default_configs/cavebot_1.1/targetbot/target.lua index 639c319..803ea12 100644 --- a/modules/game_bot/default_configs/cavebot_1.1/targetbot/target.lua +++ b/modules/game_bot/default_configs/cavebot_1.1/targetbot/target.lua @@ -249,7 +249,7 @@ TargetBot.useAttackItem = function(item, subType, target, delay) if not tmpItem then return end g_game.useWith(tmpItem, target, subType) -- using item from bp else - g_game.useInventoryItemWith(healingInfo.item, target, subType) -- hotkey + g_game.useInventoryItemWith(item, target, subType) -- hotkey end lastRuneAttack = now end