Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
AutoPot weakness friend range
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna5ama committed Jan 20, 2023
1 parent 861f8ba commit 170322d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ internal object AutoPot : Module(
private val healHealth by setting("Heal Health", 12.0f, 0.0f..20.0f, 0.5f, ::heal)
private val healDelay by setting("Heal Delay", 500, 0..10000, 50, ::heal)
private val weakness by setting("Weakness", false)
private val weaknessFriendRange by setting("Weakness Friend Range", 5.0f, 0.0f..10.0f, 0.5f, ::weakness)
private val weaknessRange by setting("Weakness Range", 1.8f, 0.0f..4.0f, 0.1f, ::weakness)
private val weaknessDelay by setting("Weakness Delay", 1500, 0..10000, 50, ::weakness)
private val speed by setting("Speed", true)
Expand Down Expand Up @@ -186,6 +187,10 @@ internal object AutoPot : Module(
return weakness
&& timer.tick(weaknessDelay)
&& super.check(event)
&& (weaknessFriendRange == 0.0f || EntityManager.players.asSequence()
.filterNot { it.isFakeOrSelf }
.filter { it.isFriend }
.all { event.player.getDistanceSq(it) > weaknessFriendRange * weaknessFriendRange })
&& EntityManager.players.asSequence()
.filterNot { it.isFriend }
.filterNot { it.isFakeOrSelf }
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/me/luna/trollhack/util/ClassUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object ClassUtils {
} else {
classLoader.getResource(packagePath)!!
}
println(root)

val isJar = root.toString().startsWith("jar")
val classes = ArrayList<Class<*>>()

Expand Down

1 comment on commit 170322d

@iWoodz
Copy link

@iWoodz iWoodz commented on 170322d Jan 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 😃

Please sign in to comment.