Advertisement
S1L1R

lazy_chat

Jan 24th, 2023 (edited)
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include %A_AppData%\LazyHub\lib
  2. #include headers.ahk
  3. #include game_settings.ahk
  4.  
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6. ;;               Globals               ;;
  7. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  8. textToSend := [     "Cat :poop: 1"
  9.                 ,   "Cat :poop: 2"
  10.                 ,   "Cat :poop: 3"]
  11. cooldownInSec := 2
  12.  
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14. ;;               Macros                ;;
  15. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  16. ChatSpamKey = F2
  17. InGameChat := True
  18.  
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;               Hotkeys               ;;
  21. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  22. Hotkey, *%ChatSpamKey%, ChatSpam
  23. Return
  24.  
  25. ChatSpam:
  26.    SendInput % textToSend[1] "{Enter}"
  27.     Sleep cooldownInSec * 1000
  28.  
  29.     loop
  30.     {
  31.         if InGameChat
  32.         {
  33.             SendInput % chatKey
  34.             Sleep 50
  35.         }
  36.        
  37.         SendInput % textToSend[mod(A_Index, textToSend.Length())+1] "{Enter}"
  38.         Sleep cooldownInSec * 1000
  39.     }
  40. return
  41.  
  42. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  43. ;;                Misc                 ;;
  44. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  45. *Insert::reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement