From 5f4726f26f34f76843ccf28d1cefefd2b8209531 Mon Sep 17 00:00:00 2001 From: cattyn Date: Sun, 14 Dec 2025 01:44:13 +0300 Subject: [PATCH] improved AutoTotem swap when holding an item in cursor --- .../kotlin/com/lambda/module/modules/combat/AutoTotem.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/kotlin/com/lambda/module/modules/combat/AutoTotem.kt b/src/main/kotlin/com/lambda/module/modules/combat/AutoTotem.kt index 9966dbc81..422c91c9f 100644 --- a/src/main/kotlin/com/lambda/module/modules/combat/AutoTotem.kt +++ b/src/main/kotlin/com/lambda/module/modules/combat/AutoTotem.kt @@ -64,7 +64,12 @@ object AutoTotem : Module( .filterSlots(player.currentScreenHandler.slots) .takeIf { it.isNotEmpty() } ?.let { totems -> + val cursor = player.currentScreenHandler.cursorStack + val targetSlot = player.currentScreenHandler.slots + .findLast { !cursor.isEmpty && it.canInsert(cursor) } + inventoryRequest { + targetSlot?.let { pickup(it.id, 0) } swap(totems.first().id, 40) }.submit() }