Fixed discord mod message logging

Fixed a typo when attempting to sell an item on the GE that is blacklisted
Implemented grinding of suqah teeth
This commit is contained in:
Player Name 2025-11-27 12:03:16 +00:00 committed by Ryan
parent 846d55365a
commit 5533a2f78a
2 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,24 @@
package content.global.handlers.item.withitem
import core.api.*
import org.rs09.consts.Items
import core.game.interaction.InteractionListener
import core.game.interaction.IntType
import core.game.node.entity.player.info.LogType
import core.game.node.entity.player.info.PlayerMonitor
import core.game.node.item.Item
class GrindToothListener : InteractionListener {
override fun defineListeners() {
onUseWith(IntType.ITEM, Items.PESTLE_AND_MORTAR_233, Items.SUQAH_TOOTH_9079) { player, _, with ->
val item = with as Item
val res = replaceSlot(player, item.slot, Item(Items.GROUND_TOOTH_9082))
if (res?.id == Items.SUQAH_TOOTH_9079) {
sendMessage(player, "You grind the suqah tooth to dust.") //https://www.youtube.com/watch?v=RdIcNH50v7I
} else {
PlayerMonitor.log(player, LogType.DUPE_ALERT, "Player ground item ${res?.name} instead of a suqah tooth - potential slot-based manipulation attempt")
}
return@onUseWith true
}
}
}

View file

@ -188,7 +188,7 @@ object PacketProcessor {
offer.itemID = pkt.itemId offer.itemID = pkt.itemId
offer.sell = false offer.sell = false
if (!PriceIndex.canTrade(pkt.itemId)) { if (!PriceIndex.canTrade(pkt.itemId)) {
sendMessage(pkt.player, "That item is blacklisted from the grand exchange.") sendMessage(pkt.player, "That item is blacklisted from the Grand Exchange.")
return return
} }
offer.player = pkt.player offer.player = pkt.player
@ -215,6 +215,7 @@ object PacketProcessor {
val messages = splitChatMessage(pkt.message.substring(2), pkt.player.name.length + 3, false) val messages = splitChatMessage(pkt.message.substring(2), pkt.player.name.length + 3, false)
for (message in messages) { for (message in messages) {
if (message.isNotBlank()) if (message.isNotBlank())
PlayerMonitor.logChat(pkt.player, "global", message)
GlobalChat.process(pkt.player.username, message, Rights.getChatIcon(pkt.player)) GlobalChat.process(pkt.player.username, message, Rights.getChatIcon(pkt.player))
} }
return return
@ -228,6 +229,7 @@ object PacketProcessor {
builder.clanName = pkt.player.communication.clan.owner.lowercase().replace(" ", "_") builder.clanName = pkt.player.communication.clan.owner.lowercase().replace(" ", "_")
builder.message = message builder.message = message
builder.rank = Rights.getChatIcon(pkt.player) builder.rank = Rights.getChatIcon(pkt.player)
PlayerMonitor.logChat(pkt.player, "clan", message)
ManagementEvents.publish(builder.build()) ManagementEvents.publish(builder.build())
} }
return return