Advertisement
Guest User

hordes v1.2.ahk

a guest
Jan 21st, 2017
907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  3. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  4.  
  5. ; my code starts below (Locomule)...
  6.  
  7. ; note: Alt-O (the letter,not #) terminates
  8. ; this macro
  9.  
  10. ; note: the auto-alt loading function requires a text
  11. ; file "HORDESdata.txt" placed in the same folder as
  12. ; this macro that has the password for each alt as
  13. ; a seperate line entry
  14.  
  15. ; note: various portions of this script send data
  16. ; to locations on the screen via X and Y coordinates.
  17. ; I was using a 1360x768 desktop setting and Chrome. ; If something doesn't work right for you, use AHK's ; WindowSpy to get the right coords for your setup.
  18.  
  19. TTshowing = 0
  20. Gui, -Caption +LastFound +AlwaysOnTop
  21. Gui, Add, Checkbox, gRefocus cWhite, Q
  22. Gui, Add, Checkbox, gRefocus cWhite, W
  23. Gui, Add, Checkbox, gRefocus cWhite, E
  24. Gui, Add, Checkbox, gRefocus cWhite, Z
  25. Gui, Add, Checkbox, gRefocus cWhite, C
  26.  
  27. ; note: replace my alt names below with yours in
  28. ; the same order as your HORDESdata.txt file
  29. Gui, Add, DDL, vAltChoice w100, BL-Archer||BL-Mage|BL-Shaman|BL-Warrior|One-Shot-Archer| V-Archer
  30.  
  31. ; don't change these coords..
  32. GuiControl, Move, ComboBox1, x45 y0
  33. Gui, Add, Button, gChangeAlts, Change Alt
  34. GuiControl, Move, Button6, x60 y27
  35. Gui, Add, Button, gHelp, ?
  36. GuiControl, Move, Button7, x50 y75
  37. Gui, Add, Button, gUncheck, uncheck all
  38. GuiControl, Move, Button8, x75 y75
  39. Gui, Color, EEAA99
  40. ; Gui +LastFound
  41. ; SendMessage, 0xC00000
  42. WinSet, TransColor, EEAA99
  43. Gui, Show, AutoSize
  44.  
  45. ; you can change these as it places the gui onscreen
  46. Gui, Show, X420 Y640
  47.  
  48. Loop
  49. {
  50. GuiControlGet, Qb, , Button1
  51. GuiControlGet, wb, , Button2
  52. GuiControlGet, Eb, , Button3
  53. GuiControlGet, Zb, , Button4
  54. GuiControlGet, Cb, , Button5
  55. if Cb = 1
  56. Send c
  57. if Zb = 1
  58. Send z
  59. if Eb = 1
  60. Send e
  61. if Qb = 1
  62. Send q
  63. if Wb = 1
  64. Send {w down}
  65. else
  66. GetKeyState, keyWstate, W
  67. if %keyWstate% = up
  68. Send {w up}
  69. Sleep 600
  70. }
  71. Return
  72.  
  73. !o::
  74. ExitApp
  75. Return
  76.  
  77. !f::
  78. send {Enter}/respawn{Enter}
  79. Return
  80.  
  81. !r::
  82. ; this should click somewhere inside
  83. ; the chat window..
  84. click 200, 660
  85.  
  86. Loop 13
  87. Click WheelDown
  88. send {Enter}/rebind skill1 q{Enter}
  89. send {Enter}/rebind skill2 e{Enter}
  90. send {Enter}/rebind skill3 z{Enter}
  91. send {Enter}/rebind skill4 c{Enter}
  92. Return
  93.  
  94. ChangeAlts:
  95. GuiControlGet, AltPicked, , ComboBox1
  96.  
  97. ; again, replave my alt names with yours below,,
  98. if AltPicked = BL-Archer
  99. ReadLine = 1
  100. if AltPicked = BL-Mage
  101. ReadLine = 2
  102. if AltPicked = BL-Shaman
  103. ReadLine = 3
  104. if AltPicked = BL-Warrior
  105. ReadLine = 4
  106. if AltPicked = One-Shot-Archer
  107. ReadLine = 5
  108. if AltPicked = V-Archer
  109. ReadLine = 6
  110. FileReadLine, AltData, HORDESdata.txt, ReadLine
  111. ControlFocus,, Hordes.io | 3D Browser MMORPG - Google Chrome
  112.  
  113. ; this needs to click inside where you type the name
  114. Click 1020, 95
  115.  
  116. Sleep 750
  117. MouseClickDrag, Left, 815, 350, 550, 350
  118. Send %AltData%
  119. Click 700, 400
  120. Sleep 500
  121. Click 818, 202
  122. Return
  123.  
  124. Refocus:
  125. ; note: I used AHK's Window Spy to get the name
  126. ; below that matched my browser. Used again below
  127. ControlFocus,, Hordes.io | 3D Browser MMORPG - Google Chrome
  128. Return
  129.  
  130. Help:
  131. if TTshowing = 0
  132. {
  133. ToolTip, alt-O closes helper`nalt-R rebinds keys`n scrolls window`nalt-F respawns
  134. TTshowing = 1
  135. }
  136. Else
  137. {
  138. ToolTip,
  139. TTshowing = 0
  140. }
  141. Return
  142.  
  143. Uncheck:
  144. ControlFocus,, ahk_class AutoHotkeyGUI
  145. Control, Uncheck,, Q
  146. Control, Uncheck,, W
  147. Control, Uncheck,, E
  148. Control, Uncheck,, Z
  149. Control, Uncheck,, C
  150. ControlFocus,, Hordes.io | 3D Browser MMORPG - Google Chrome
  151. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement