Skip to content

Commit

Permalink
fix: prevent error in vBot (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
kokekanon authored Jan 24, 2025
1 parent ac3deac commit d45b2b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions mods/game_bot/default_configs/vBot_4.8/vBot/analyzer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@ end
local interface = modules.game_interface

local function setFrames()
if g_game.getFeature(GameColorizedLootValue) then return end
if not storage.analyzers.rarityFrames then return end
for _, container in pairs(getContainers()) do
local window = container.itemsPanel
Expand Down
2 changes: 1 addition & 1 deletion modules/game_interface/gameinterface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ function createThingMenu(menuPosition, lookThing, useThing, creatureThing)
end
end

if g_modules.getModule("game_bot"):isLoaded() and useThing and useThing:isItem() then
if modules.game_bot and useThing and useThing:isItem() then
menu:addSeparator()
local useThingId = useThing:getId()
menu:addOption("ID: " .. useThingId, function() g_window.setClipboardText(useThingId) end)
Expand Down
4 changes: 4 additions & 0 deletions modules/gamelib/player.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- @docclass Player
-- local index = math.log(bit) / math.log(2)
PlayerStates = {
None = 0, -- vbot
Poison = 1,
Burn = 2,
Energy = 4,
Expand All @@ -15,8 +16,11 @@ PlayerStates = {
Cursed = 2048,
PartyBuff = 4096,
RedSwords = 8192,
PzBlock = 8192, -- vbot
Pz = 16384, -- vbot
Pigeon = 16384,
Bleeding = 32768,
Hungry = 65536, -- vbot
LesserHex = 65536,
IntenseHex = 131072,
GreaterHex = 262144,
Expand Down

0 comments on commit d45b2b6

Please sign in to comment.