Advertisement
Guest User

DF AHK

a guest
Dec 3rd, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. ;
  2. ; AutoHotkey Version: 1.x
  3. ; Language: English
  4. ; Platform: Win9x/NT
  5. ; Author: A.N.Other <myemail@nowhere.com>
  6. ;
  7. ; Script Function:
  8. ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
  9. ;
  10.  
  11. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  12. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  13. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  14.  
  15. ; For Darkfall: Rise of Agon
  16. #InstallKeybdHook
  17.  
  18. ;-------------Disable when mouse is visible-------------
  19. #Persistent
  20.  
  21. SetScrollLockState, on
  22.  
  23. OnExit, ExitScript
  24. Return
  25.  
  26. ExitScript:
  27. SetScrollLockState, off
  28. ExitApp
  29.  
  30. isMouseShown()
  31. {
  32. StructSize := A_PtrSize + 16
  33. VarSetCapacity(InfoStruct, StructSize)
  34. NumPut(StructSize, InfoStruct)
  35. DllCall("GetCursorInfo", UInt, &InfoStruct)
  36. Result := NumGet(InfoStruct, 8)
  37.  
  38. if Result
  39. return 1
  40. else
  41. return 0
  42. }
  43.  
  44. F8::
  45. Suspend, Permit
  46. GetKeyState, state, ScrollLock, T
  47. If state = D
  48. {
  49. Suspend
  50. SetScrollLockState, off
  51. }
  52. Else if state = U
  53. {
  54. Suspend
  55. SetScrollLockState, on
  56. }
  57. Return
  58.  
  59. ScrollLock::Return
  60.  
  61. ;-----------------------AutoLoot------------------------
  62. IniFile := "C:\loot.txt"
  63. FileGetSize, size, %IniFile%
  64. if (size = "") {
  65. MsgBox Setting up
  66. IniWrite, 1300, %IniFile%, Loot, xdest ; --- destination x pos
  67. IniWrite, 700, %IniFile%, Loot, ydest ; --- destination y pos
  68. } else {
  69. IniRead, xdest, %IniFile%, Loot, xdest ; --- destination x pos
  70. IniRead, ydest, %IniFile%, Loot, ydest ; --- destination y pos
  71. }
  72. CoordMode, Pixel
  73.  
  74.  
  75. $^Lbutton:: ;quick loot -------------------------
  76.  
  77. MouseGetPos, x1, y1
  78. MouseClickDrag, left, x1, y1, xdest, ydest, 0 ;0 is mouse speed, 0 is instant
  79. MouseMove, x1, y1, 0 ;0 is mouse speed, 0 is instant
  80.  
  81. return
  82.  
  83. $^Rbutton:: ;loot destination ------------------------->
  84.  
  85. MouseGetPos, xdest, ydest
  86. IniWrite, %xdest%, %IniFile%, Loot, xdest
  87. IniWrite, %ydest%, %IniFile%, Loot, ydest
  88.  
  89. return
  90.  
  91. ;------------- Two Hander ---------------
  92. *!4::
  93. #If !isMouseShown() and WinActive("Darkfall: Rise of Agon")
  94. {
  95. combatType = melee
  96. send {NUMPAD3};
  97. Send {F3};
  98. Sleep, 10
  99. Send {0};
  100. }
  101. Return
  102.  
  103. ;------------- Bow ---------------
  104. *!5::
  105. #If !isMouseShown() and WinActive("Darkfall: Rise of Agon")
  106. {
  107. combatType = archery
  108. Send {NUMPAD3};
  109. Send {F3};
  110. Sleep, 10
  111. Send {9};
  112. }
  113. Return
  114.  
  115. ;------------- Staff ---------------
  116. *!6::
  117. #If !isMouseShown() and WinActive("Darkfall: Rise of Agon")
  118. {
  119. combatType = magic
  120. Send {NUMPAD3};
  121. Send {F1};
  122. Sleep, 10
  123. Send, {0}
  124. Send {L};
  125. }
  126. Return
  127.  
  128. ;------------- Second staff ---------------
  129. #If !isMouseShown() and WinActive("Darkfall: Rise of Agon")
  130. *WheelDown::
  131. {
  132. Send {F11};
  133. }
  134. Return
  135.  
  136. ;------------- Blind cycle ---------------
  137. {
  138.  
  139. Reset_time:=1000*5 ;5= 5 secs so change to what ever
  140. return
  141.  
  142. Reset_keyblind:
  143. Keyblind := 0
  144. return
  145. {
  146. *TAB::
  147. settimer, reset_keyblind, %reset_time%
  148. keyblind++
  149. if keyblind = 1
  150. SendInput, {Numpad1}
  151. else if keyblind = 2
  152. {
  153. SendInput, {Numpad2}
  154. keyblind = 0
  155. }
  156. Return
  157. }
  158. }
  159.  
  160. ;------------- PotTimer ---------------
  161. *!0::
  162. send {Numpad4}
  163. if (potion_toggle != "cooling") {
  164. potion_toggle := "cooling"
  165. settimer drink_alert, -62000
  166. }
  167. return
  168.  
  169. *!+::
  170. send {Numpad5}
  171. if (potion_toggle != "cooling") {
  172. potion_toggle := "cooling"
  173. settimer drink_alert, -62000
  174. }
  175. return
  176.  
  177. *!'::
  178. send {Numpad6}
  179. if (potion_toggle != "cooling") {
  180. potion_toggle := "cooling"
  181. settimer drink_alert, -62000
  182. }
  183. return
  184.  
  185. *^0::
  186. send {Numpad7}
  187. if (potion_toggle != "cooling") {
  188. potion_toggle := "cooling"
  189. settimer drink_alert, -62000
  190. }
  191. return
  192.  
  193. *^+::
  194. send {Numpad8}
  195. if (potion_toggle != "cooling") {
  196. potion_toggle := "cooling"
  197. settimer drink_alert, -62000
  198. }
  199. return
  200.  
  201. *^'::
  202. send {Numpad9}
  203. if (potion_toggle != "cooling") {
  204. potion_toggle := "cooling"
  205. settimer drink_alert, -62000
  206. }
  207. return
  208.  
  209. drink_alert:
  210. potion_toggle := "notcooling"
  211. loop 5 {
  212. soundbeep
  213. sleep 250
  214. }
  215. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement