Guest User

DETOX's REIGN OF KINGS AUTO BROADCASTER SCRIPT!!

a guest
Apr 12th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; DETOX's REIGN OF KINGS AUTO BROADCASTER SCRIPT!!
  2. ; FOLLOW THE COMMENTS, SOME SETUP IS REQUIRED!!!
  3.  
  4. #SingleInstance
  5. #UseHook On
  6.  
  7. ; GLOBAL FKN VARS YO!
  8. ToggledOn := 0
  9.  
  10. ; SET THE AMOUNT OF TIME BETWEEN A MESSAGE SPAM
  11. ; (MILISECONDS) (EQUAL TO 10 MINUTES)
  12. Global TimeBetween := 600000
  13.  
  14. ; (PANIC EXIT BUTTON)
  15. ; INCASE YOU NEED TO STOP THE SCRIPT
  16. END::ExitApp
  17.  
  18. ; (PANIC PAUSE BUTTON)
  19. ; INCASE YOU NEED TO PAUSE THE SCRIPT
  20. INS::Pause
  21.  
  22. ; MAIN FUNCTION (START/STOP)
  23. HOME::
  24.  
  25.     ToggledOn := !ToggledOn ; IF ON, TURN OFF. IF OFF, TURN ON
  26.    
  27.     if (ToggledOn) {
  28.        
  29.         SendMessageToChat() ; INITIATE MESSAGE SPAM FUNCTION (BELOW)
  30.         SetTimer, Timer_Spam, %TimeBetween% ; SET MESSAGE SPAM TO REPEAT AFTER CERTAIN AMOUNT OF TIME (SET THIS ABOVE)
  31.        
  32.     } else {
  33.        
  34.         SetTimer, Timer_Spam, Off ; TOGGLE OFF SCRIPT
  35.        
  36.     }
  37.  
  38. return
  39.  
  40. Timer_Spam:
  41. SendMessageToChat() ; INITIATE MESSAGE SPAM FUNCTION (BELOW)
  42. return
  43.  
  44. SendMessageToChat() {
  45.        
  46. ; Messages Array (Simply add another line to this if you want to have more messages
  47. Messages := []
  48. Messages.insert("This is my first auto-announced message!")
  49. Messages.insert("This is my second auto-announced message!")
  50. Messages.insert("This is my third auto-announced message!")
  51. Messages.insert("This is my fourth auto-announced message!")
  52. Messages.insert("This is my fifth auto-announced message!")
  53. Messages.insert("This is my sixth auto-announced message!")
  54.        
  55. ; Get total amount of messages
  56. TotalMessages := Messages.MaxIndex()
  57.  
  58. Loop %TotalMessages%
  59. {
  60.            
  61. ; For this part... you will have to change the
  62. ; "ahk_class Sandbox:SteamSecond:UnityWndClass"
  63. ; To whatever your second reign of kings window class is.
  64. ; To get this.. Run "AutoIt3 Window Spy" (Comes with AutoHotKey)
  65. ; Then while its up on your screen, have the second reign of kings window ACTIVE/SELECTED
  66. ; The top box of the AutoIt3 Window Spy will have something like this:
  67. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  68. ;;;;;;;;;;;;;;;;;;;;;;;;;   Reign of Kings
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;   ahk_class Sandbox:SteamSecond:UnityWndClass
  70. ;;;;;;;;;;;;;;;;;;;;;;;;;   ahk_exe Reign of Kings.exe
  71. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  72. ;
  73. ; Copy and Paste the second line in that box
  74. ; Ex. "ahk_class Sandbox:SteamSecond:UnityWndClass"
  75.  
  76. SetKeyDelay, 20, 20
  77. ControlSend,, {Enter}, ahk_class Sandbox:SteamSecond:UnityWndClass ; CHANGE THIS TO YOUR OWN. INFO ABOVE!
  78. sleep, 100
  79. ControlSend,, % Messages[A_Index], ahk_class Sandbox:SteamSecond:UnityWndClass ; CHANGE THIS TO YOUR OWN. INFO ABOVE!
  80. sleep, 100
  81. ControlSend,, {Enter}, ahk_class Sandbox:SteamSecond:UnityWndClass ; CHANGE THIS TO YOUR OWN. INFO ABOVE!
  82. sleep 2000
  83. }  
  84. }
Advertisement
Add Comment
Please, Sign In to add comment