diff --git a/src/main/kotlin/com/lambda/client/module/modules/combat/AutoOffhand.kt b/src/main/kotlin/com/lambda/client/module/modules/combat/AutoOffhand.kt index 1d027b275..8e75e5a81 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/combat/AutoOffhand.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/combat/AutoOffhand.kt @@ -67,6 +67,9 @@ object AutoOffhand : Module( private val priority by setting("Priority", Priority.HOTBAR) private val switchMessage by setting("Switch Message", true) + // Represents the remaining number of items of type AutoOffhandType in the inventory + private var hudInfo = "" + private enum class Type(val filter: (ItemStack) -> Boolean) { TOTEM({ it.item.id == 449 }), GAPPLE({ it.item is ItemAppleGold }), @@ -98,9 +101,13 @@ object AutoOffhand : Module( updateDamage() switchToType(getType(), true) + + hudInfo = player.allSlots.countByStack { type.filter(it) }.toString() } } + override fun getHudInfo() = hudInfo + private fun SafeClientEvent.getType() = when { checkTotem() -> Type.TOTEM checkStrength() -> Type.STRENGTH