nuclearping

Darkfall Quick Loot Script

Apr 14th, 2016
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #If IsMouseVisible() and WinActive("Darkfall Online")
  2.  
  3. IniFile := "c:\loot.txt"
  4.  
  5. FileGetSize, size, %IniFile%
  6. if (size = "")
  7. {
  8.     IniWrite, 1300, %IniFile%, Loot, xdest ; --- destination x pos
  9.     IniWrite, 700, %IniFile%, Loot, ydest ; --- destination y pos
  10. }
  11. else
  12. {
  13.     IniRead, xdest, %IniFile%, Loot, xdest ; --- destination x pos
  14.     IniRead, ydest, %IniFile%, Loot, ydest ; --- destination y pos
  15. }
  16. CoordMode, Pixel
  17.  
  18. ;quick loot -------------------------
  19. $!Lbutton::
  20. MouseGetPos, x1, y1
  21. MouseClickDrag, left, x1, y1, xdest, ydest, 0 ;0 is mouse speed, 0 is instant
  22. MouseMove, x1, y1, 0 ;0 is mouse speed, 0 is instant
  23.  
  24. return
  25.  
  26. ;loot destination -------------------------
  27. $!Rbutton::
  28. MouseGetPos, xdest, ydest
  29. IniWrite, %xdest%, %IniFile%, Loot, xdest
  30. IniWrite, %ydest%, %IniFile%, Loot, ydest
  31.  
  32. return
  33.  
  34. IsMouseVisible()
  35. {
  36.     StructSize := A_PtrSize + 16
  37.     VarSetCapacity(InfoStruct, StructSize)
  38.     NumPut(StructSize, InfoStruct)
  39.     DllCall("GetCursorInfo", UInt, &InfoStruct)
  40.     Result := NumGet(InfoStruct, 8)
  41.  
  42.     if Result
  43.         return 1
  44.     else
  45.         return 0
  46. }
Advertisement
Add Comment
Please, Sign In to add comment