Advertisement
FlufferBuffer

updated autoplay

Oct 6th, 2023
1,584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Updated code with some optimizations
  2.  
  3. ; Function to send control commands
  4. SendControl(char, key, delay := 255)
  5. {
  6.     ControlSend,, {%key%}, ahk_id %char%
  7.     Sleep %delay%
  8. }
  9.  
  10. Gui, Color, EEAA99 ; Fancy Color
  11. Gui, Font, S12  ; Change font size to 12
  12. Gui, Add, GroupBox, x0 w460 h350, AO - Autoplay ; Add a groupbox
  13.  
  14. Gui, Add, Edit , x20 y30 vchar
  15. Gui, Add, Checkbox, checked0 vrun, Run
  16. Gui, Add, Checkbox, checked0 vPressF1, F1 (Target self)
  17. Gui, Add, Checkbox, checked0 vPressX, x-0-x (Sit and then stand up after 0)
  18. Gui, Add, Checkbox, checked0 vPress9, 9 (Stim on 9)
  19. Gui, Add, Checkbox, checked0 vPressTab, Tab (Target closest enemy)
  20. Gui, Add, Checkbox, checked0 vPressF, F (Do stuff, bind to this key)
  21.  
  22. Gui, Show
  23.  
  24. Loop
  25. {
  26.     WinGet, char1, ID, Anarchy Online -
  27.     Sleep 222
  28.     Gui, Submit, nohide
  29.     If (vrun) ; Changed to vrun to match the variable name of the checkbox
  30.     {
  31.         If (vPressF1)
  32.             SendControl(char1, "F1")
  33.        
  34.         If (vPressX)
  35.         {
  36.             SendControl(char1, "x", 155)
  37.             SendControl(char1, "0", 155)
  38.             SendControl(char1, "x", 155)
  39.         }
  40.        
  41.         If (vPress9)
  42.             SendControl(char1, "9")
  43.        
  44.         If (vPressTab)
  45.             SendControl(char1, "Tab")
  46.        
  47.         If (vPressF)
  48.             SendControl(char1, "f")
  49.     }
  50.     Else
  51.     {
  52.         Continue
  53.     }
  54. }
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement