impr: Custom AntiAFK AutoReply (#2168)

* impr: Custom AntiAFK AutoReply

* Shorten default AntiAFK reply
This commit is contained in:
Jacob Herd 2021-03-29 09:25:14 -04:00 committed by GitHub
parent f60cc0e074
commit 936df66e77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ internal object AntiAFK : Module(
private val delay by setting("Action Delay", 50, 5..100, 5)
private val variation by setting("Variation", 25, 0..50, 5)
private val autoReply by setting("Auto Reply", true)
private val replyMessage by setting("Reply Message", "I am AFK with KAMI Blue!", { autoReply })
private val swing = setting("Swing", true)
private val jump = setting("Jump", true)
private val turn = setting("Turn", true)
@ -86,7 +87,7 @@ internal object AntiAFK : Module(
listener<PacketEvent.Receive> {
if (!autoReply || it.packet !is SPacketChat) return@listener
if (MessageDetection.Direct.RECEIVE detect it.packet.chatComponent.unformattedText) {
sendServerMessage("/r I am currently AFK and using KAMI Blue!")
sendServerMessage("/r $replyMessage")
}
}