if not g_game.isOnline() then return end
local messageToDetect = {"msgheck", "bot"}
local lastMessage = g_game.lastTextMessage().message
if not lastMessage then return end
for v, k in pairs(messageToDetect) do
if string.find(lastMessage, k, 1, true) then
g_game.talk("im here") -- message to talk in default chat
setOption("Global/BotPaused", "true")
g_game.lastTextMessage().message = ""
for i = 1, 5 do
playSound("alarm.wav")
sleep(1000)
end
end
end
auto(50)
It may be that they changed how things works, but I highly doubt that.