Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b6f5b3d
layout flex
mehah Oct 14, 2025
a9fc4e0
fixes
mehah Oct 14, 2025
a3132fc
layout_flex to uilayoutflexbox
mehah Oct 14, 2025
9f37a0f
Merge branch 'main' of github.com:gabrielew/otclient into flex_box
gabrielew Oct 15, 2025
e4b6c40
feat: assets
gabrielew Oct 15, 2025
cf1b17f
refactor: change folder name
gabrielew Oct 15, 2025
a964cb0
wip: prey
gabrielew Oct 15, 2025
127e184
fix: func name
gabrielew Oct 15, 2025
6800594
Merge branch 'main' of github.com:gabrielew/otclient into feat/prey_c…
gabrielew Oct 16, 2025
e1771af
merge main
gabrielew Oct 16, 2025
c1aad5c
wip: layout
gabrielew Oct 16, 2025
cb8608a
feat: choose monster
gabrielew Oct 16, 2025
c460bf8
feat: label colors
gabrielew Oct 16, 2025
10ff8f3
feat: list reroll
gabrielew Oct 16, 2025
96a63b1
fix: progress bart
gabrielew Oct 16, 2025
1e2155a
feat: layout
gabrielew Oct 16, 2025
0414f4e
Merge branch 'main' of github.com:gabrielew/otclient into feat/prey_c…
gabrielew Oct 16, 2025
7ee65d7
Merge branch 'main' of github.com:gabrielew/otclient into feat/prey_c…
gabrielew Oct 16, 2025
beb7dea
Merge branch 'main' of github.com:gabrielew/otclient into feat/prey_c…
gabrielew Oct 16, 2025
13deb1c
wip: layout
gabrielew Oct 16, 2025
4cd5aa1
feat: layout and on hover
gabrielew Oct 17, 2025
1ef4f01
refactor: use registerEvents
gabrielew Oct 17, 2025
3617774
Implement lazy loading for prey selection list
gabrielew Oct 17, 2025
84d7de3
Merge pull request #108 from gabrielew/2025-10-17/implement-infinite-…
gabrielew Oct 17, 2025
d9dcbe4
refactor: remove unnecessary param
gabrielew Oct 17, 2025
f45439f
Stop reloading prey UI after confirmation
gabrielew Oct 17, 2025
22b905f
Merge pull request #110 from gabrielew/2025-10-17/reload-only-changed…
gabrielew Oct 17, 2025
ae69ebb
fix: do not show active monster in list names
gabrielew Oct 17, 2025
122a814
chore: remove unnecessary logs
gabrielew Oct 17, 2025
1b635af
Reset prey slot state on type changes
gabrielew Oct 17, 2025
50533a0
Merge pull request #111 from gabrielew/2025-10-17/remove-history-when…
gabrielew Oct 17, 2025
5aed8d9
Merge branch 'main' of github.com:gabrielew/otclient into 2025-10-17/…
gabrielew Oct 17, 2025
ce2cee5
fix: layout
gabrielew Oct 17, 2025
b495c79
Merge pull request #112 from gabrielew/2025-10-17/remove-history-when…
gabrielew Oct 17, 2025
d8771c3
fix: update resources
gabrielew Oct 17, 2025
fb8fb41
Improve prey resource validation across events
gabrielew Oct 17, 2025
84d6097
fix: color
gabrielew Oct 17, 2025
11902ea
Merge pull request #113 from gabrielew/2025-10-17/update-preycontroll…
gabrielew Oct 17, 2025
0ace8ab
Merge branch 'main' of github.com:gabrielew/otclient into feat/prey_c…
gabrielew Oct 17, 2025
8a5ad9e
fix: get wildcards
gabrielew Oct 17, 2025
997a5dd
chore: remove unnecessary var
gabrielew Oct 17, 2025
de564fe
Update modules/game_prey_html/game_prey_html.lua
libergod Nov 19, 2025
29ef283
Merge branch 'main' into pr/1380
libergod Nov 19, 2025
5783806
Revert "Merge branch 'main' into pr/1380"
libergod Nov 19, 2025
c040565
Merge remote-tracking branch 'upstream/main' into pr/1380
libergod Nov 19, 2025
2980d1c
Reapply "Merge branch 'main' into pr/1380"
libergod Nov 20, 2025
5d7b610
fix: update after new ui
libergod Nov 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions modules/game_interface/gameinterface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ function createThingMenu(menuPosition, lookThing, useThing, creatureThing)

if g_game.getFeature(GamePrey) then
menu:addOption(tr('Prey Dialog'), function()
modules.game_prey.show()
modules.game_prey_html.show()
end)
end

Expand Down Expand Up @@ -942,10 +942,10 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
end
elseif not modules.client_options.getOption('classicControl') then
local smartLeftClick = modules.client_options.getOption('smartLeftClick')

if smartLeftClick and mouseButton == MouseLeftButton and keyboardModifiers == KeyboardNoModifier then
local player = g_game.getLocalPlayer()

-- Handle creature attacks first
if attackCreature and attackCreature ~= player then
g_game.attack(attackCreature)
Expand All @@ -972,7 +972,7 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
return true
end
end

-- Standard handling for other usable items
-- For containers (including corpses), only execute quicklooting with Smart Left-Click
-- Exception: If container has a parent container, open it instead of quicklooting
Expand All @@ -996,39 +996,39 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
return true
else
local useResult = g_game.use(useThing)

if useResult ~= nil then
return true
end
end

-- If we couldn't use the item through any of the above methods,
-- but it's pickupable, try to pick it up (like in Classic Control mode)
if useThing:isPickupable() then
g_game.move(useThing, useThing:getPosition(), 1)
return true
end

-- If we couldn't use or pick up the item, try to walk to its position if possible
local position = useThing:getPosition()
if position and position.x ~= 0 and autoWalkPos then
local player = g_game.getLocalPlayer()
player:autoWalk(autoWalkPos)
return true
end

return true
end

-- Only look at things if no usable item was found
if lookThing and lookThing ~= useThing then
local lookPosition = lookThing:getPosition()
local lookTile = nil

if lookPosition and lookPosition.x ~= 0 then
lookTile = g_map.getTile(lookPosition)
end

-- For walkable tiles, we want to walk
if lookTile and lookTile:isWalkable() and autoWalkPos then
local player = g_game.getLocalPlayer()
Expand All @@ -1040,14 +1040,14 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
return true
end
end

if autoWalkPos then
local player = g_game.getLocalPlayer()
player:autoWalk(autoWalkPos)
return true
end
end

if keyboardModifiers == KeyboardNoModifier and mouseButton == MouseRightButton then
createThingMenu(menuPosition, lookThing, useThing, creatureThing)
return true
Expand All @@ -1058,7 +1058,7 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
elseif useThing and keyboardModifiers == KeyboardCtrlModifier and
(mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
local smartLeftClick = modules.client_options.getOption('smartLeftClick')

if smartLeftClick then
local player = g_game.getLocalPlayer()
-- For containers in the world, Ctrl+Left Click opens them even if there's a creature
Expand Down Expand Up @@ -1104,7 +1104,7 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
else
local lootControlMode = modules.client_options.getOption('lootControlMode')
local player = g_game.getLocalPlayer()

-- ###############################
-- ### MODE 0: LOOT RIGHT CLICK ##
-- ###############################
Expand Down Expand Up @@ -1149,14 +1149,14 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
return true
end
end

-- Handle pickupable items if no container/corpse was handled
if lookThing and not lookThing:isCreature() and lookThing:isPickupable() then
g_game.move(lookThing, lookThing:getPosition(), 1)
return true
end
end

-- SHIFT+Right click: opens containers without quicklooting
if mouseButton == MouseRightButton and keyboardModifiers == KeyboardShiftModifier then
if useThing then
Expand All @@ -1176,10 +1176,10 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
end
end
end
-- #################################
-- ### MODE 1: LOOT SHIFT+RIGHT ###
-- #################################

-- #################################
-- ### MODE 1: LOOT SHIFT+RIGHT ###
-- #################################
elseif lootControlMode == 1 then
-- Right click with no modifiers: use or open containers
if mouseButton == MouseRightButton and keyboardModifiers == KeyboardNoModifier then
Expand Down Expand Up @@ -1208,7 +1208,7 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
end
end
end

-- SHIFT+Right click: quickloot on containers
if mouseButton == MouseRightButton and keyboardModifiers == KeyboardShiftModifier then
if useThing and (useThing:isContainer() or useThing:isLyingCorpse()) then
Expand All @@ -1217,17 +1217,17 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
return true
end
end

-- Handle pickupable items
if lookThing and not lookThing:isCreature() and lookThing:isPickupable() then
g_game.move(lookThing, lookThing:getPosition(), 1)
return true
end
end
-- #############################
-- ### MODE 2: LOOT LEFT ###
-- #############################

-- #############################
-- ### MODE 2: LOOT LEFT ###
-- #############################
elseif lootControlMode == 2 then
-- Left click with no modifiers: ONLY for loot functionality
if mouseButton == MouseLeftButton and keyboardModifiers == KeyboardNoModifier then
Expand All @@ -1249,14 +1249,14 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
end
end
end

-- Handle pickupable items in the game world
if lookThing and not lookThing:isCreature() and lookThing:isPickupable() then
g_game.move(lookThing, lookThing:getPosition(), 1)
return true
end
end

-- Right click for Loot: Left mode - use items instead of showing context menu
if mouseButton == MouseRightButton and keyboardModifiers == KeyboardNoModifier then
-- Handle creature attacks first
Expand All @@ -1266,7 +1266,7 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
elseif creatureThing and creatureThing ~= player and autoWalkPos and creatureThing:getPosition().z == autoWalkPos.z then
g_game.attack(creatureThing)
return true
-- Use the item if it's a container in inventory or use other items
-- Use the item if it's a container in inventory or use other items
elseif useThing then
if useThing:isContainer() or useThing:isLyingCorpse() then
if useThing:getParentContainer() then
Expand All @@ -1284,15 +1284,15 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
return true
end
end

-- Only show context menu when no usable item is present
if not useThing then
createThingMenu(menuPosition, lookThing, useThing, creatureThing)
return true
end
end
end

-- Common key combinations for all Classic Control modes
if useThing and useThing:isContainer() and keyboardModifiers == KeyboardCtrlShiftModifier and
(mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
Expand Down Expand Up @@ -1328,14 +1328,14 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
-- In Classic Control with Loot: Left option, we want to avoid walking when trying to loot
local classicControl = modules.client_options.getOption('classicControl')
local lootControlMode = modules.client_options.getOption('lootControlMode')

if classicControl and lootControlMode == 2 then
-- Check if there's a corpse or item we should be looting instead of walking
-- If not, proceed with autowalk
local isCorpseOrContainer = useThing and (useThing:isContainer() or useThing:isLyingCorpse())
if not isCorpseOrContainer and
not (lookThing and not lookThing:isCreature() and lookThing:isPickupable()) then

if not isCorpseOrContainer and
not (lookThing and not lookThing:isCreature() and lookThing:isPickupable()) then
player:autoWalk(autoWalkPos)
if g_game.isAttacking() and g_game.getChaseMode() == ChaseOpponent then
g_game.setChaseMode(DontChase)
Expand Down Expand Up @@ -1788,8 +1788,8 @@ end
function testExtendedView(mode)
local extendedView = mode == 2
if extendedView then
local buttons = {leftIncreaseSidePanels, rightIncreaseSidePanels, rightDecreaseSidePanels,
leftDecreaseSidePanels}
local buttons = { leftIncreaseSidePanels, rightIncreaseSidePanels, rightDecreaseSidePanels,
leftDecreaseSidePanels }
for _, button in ipairs(buttons) do
button:hide()
end
Expand Down
2 changes: 1 addition & 1 deletion modules/game_interface/interface.otmod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Module
- game_healthinfo
- game_inventory
- game_mainpanel
- game_prey
- game_prey_html
- game_imbuing
- game_imbuementtracker
- game_hotkeys
Expand Down
Loading