auto(100) IF NOT g_game.isOnline() then RETURN END LOCAL messagesToDetect = {"[BR] BOT/MACRO", "[PL] BOT/MACRO", "[EN] BOT/MACRO", "check"} -- which words should it look FOR? LOCAL respondToMessage = false -- should it respond IF trigger WORD is found? LOCAL messageToRespond = "jestem xd" -- what should it respond? LOCAL pauseBot = false -- should it pause the bot? LOCAL playAlarm = true -- should it play alarm? connect("g_game", "onTalkMessage", checkBotMessage) FUNCTION checkBotMessage(name, level, mode, message, channelId, creaturePos) FOR _, messageToDetect in pairs(messagesToDetect) do IF STRING.find(message, messageToDetect, 1, true) then IF respondToMessage then g_game.talk(messageToRespond) END IF pauseBot then setOption("Global/BotPaused", "true") END IF playAlarm then FOR i = 1, 5 do playSound("alarm.wav") sleep(1000) END END RETURN END END END