Kashub's Code Barn - "asdasdasdas"

podświetlone jako ini (dodał(a) asdasdas @ 2021-04-21 16:57:23)

Twoja wyszukiwarka
Podświetl ten kod w:
Ostatnio dodane:
Losowe wpisy:
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
| Sklep z oponami | | Opony letnie | | Opony motocyklowe | | Sklep z artykułami dla zwierząt | | Przenieś bloga z onetu | | Wklejacz kodów | | Skróć link | | Gnieżdżewo | | Smutne Opisy |