File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
src/main/kotlin/com/lambda/module/modules/combat Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,9 @@ import com.lambda.event.events.TickEvent
2323import com.lambda.event.listener.SafeListener.Companion.listen
2424import com.lambda.friend.FriendManager
2525import com.lambda.interaction.material.StackSelection.Companion.select
26- import com.lambda.interaction.material.container.ContainerManager.transfer
27- import com.lambda.interaction.material.container.containers.OffHandContainer
26+ import com.lambda.interaction.request.inventory.InventoryRequest.Companion.inventoryRequest
2827import com.lambda.module.Module
2928import com.lambda.module.tag.ModuleTag
30- import com.lambda.task.RootTask.run
31- import com.lambda.util.Communication.info
3229import com.lambda.util.NamedEnum
3330import com.lambda.util.combat.CombatUtils.hasDeadlyCrystal
3431import com.lambda.util.combat.DamageUtils.isFallDeadly
@@ -64,9 +61,13 @@ object AutoTotem : Module(
6461
6562 if ((! ignoreWhenHolding || ! player.isHolding(Items .TOTEM_OF_UNDYING )) && player.offHandStack.item != Items .TOTEM_OF_UNDYING ) {
6663 Items .TOTEM_OF_UNDYING .select()
67- .transfer(OffHandContainer )
68- ?.finally { if (log) info(" Swapped the off-hand item with a totem" ) }
69- ?.run ()
64+ .filterSlots(player.currentScreenHandler.slots)
65+ .takeIf { it.isNotEmpty() }
66+ ?.let { totems ->
67+ inventoryRequest {
68+ swap(totems.first().id, 40 )
69+ }.submit()
70+ }
7071 }
7172 }
7273 }
You can’t perform that action at this time.
0 commit comments