Advertisement
Guest User

main.au3

a guest
Apr 17th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Icon=lib\ico\icon.ico
  3. #AutoIt3Wrapper_Compression=0
  4. #AutoIt3Wrapper_Res_Fileversion=1.2.0.0
  5. #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
  6. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  7.  
  8. ;;================================================================================
  9. ;; PRE CHECKS
  10. ;;================================================================================
  11.  
  12. ;;--------------------------------------------------------------------------------
  13. ;; Make sure you are running in x86
  14. ;;--------------------------------------------------------------------------------
  15. $checkx64 = @AutoItX64
  16. If $checkx64 = 1 Then
  17. WinSetOnTop("Diablo III", "", 0)
  18. MsgBox(0, "Erreur : ", "Script lancé en x64, merci de le lancer en x86 ")
  19. Terminate()
  20. EndIf
  21.  
  22. ;;--------------------------------------------------------------------------------
  23. ;; Make sure you are running as admin
  24. ;;--------------------------------------------------------------------------------
  25.  
  26. $Admin = IsAdmin()
  27. If $Admin <> 1 Then
  28. MsgBox(0x30, "ERROR", "This program require administrative rights you fool!")
  29. Exit
  30. EndIf
  31.  
  32. ;;--------------------------------------------------------------------------------
  33. ;; Open the process
  34. ;;--------------------------------------------------------------------------------
  35. Opt("WinTitleMatchMode", -1)
  36. SetPrivilege("SeDebugPrivilege", 1)
  37. Global $ProcessID = WinGetProcess("[CLASS:D3 Main Window Class]", "")
  38. $d3 = _MemoryOpen($ProcessID)
  39. If @error Then
  40. WinSetOnTop("[CLASS:D3 Main Window Class]", "", 0)
  41. MsgBox(4096, "ERROR", "Failed to open memory for process;" & $ProcessID)
  42. Exit
  43. EndIf
  44.  
  45. ;;--------------------------------------------------------------------------------
  46. ;; Initialize MouseCoords
  47. ;;--------------------------------------------------------------------------------
  48. Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client
  49. Opt("MouseClickDownDelay", Random(10, 20))
  50. Opt("SendKeyDownDelay", Random(10, 20))
  51.  
  52. ;;--------------------------------------------------------------------------------
  53. ;; Set tray icon
  54. ;;--------------------------------------------------------------------------------
  55. $icon = @ScriptDir & "\lib\ico\icon.ico"
  56. TraySetIcon($icon)
  57.  
  58. ;;--------------------------------------------------------------------------------
  59. ;; Include some files
  60. ;;--------------------------------------------------------------------------------
  61. #include "lib\Variables.au3"
  62. #include "lib\Utils.au3"
  63. #include "lib\sequence.au3"
  64. #include "lib\settings.au3"
  65. #include "lib\skills.au3"
  66. #include "lib\toolkit.au3"
  67. #include "lib\botting.au3"
  68. #include "lib\stats.au3"
  69. #include "lib\Affix.au3"
  70. ;Automatisation des séquences
  71. #include "lib\GestionMenu.au3"
  72. ; TChat
  73. #include "lib\GestionChat.au3"
  74. #include "lib\dev_tools.au3"
  75.  
  76. ;;================================================================================
  77. ;; Set Some Hotkey
  78. ;;================================================================================
  79. HotKeySet("{F2}", "Terminate")
  80. HotKeySet("{F3}", "TogglePause")
  81. HotKeySet("{F5}", "StashAndRepairTerminate")
  82.  
  83. ;;--------------------------------------------------------------------------------
  84. ;; Initialize the data and offsets
  85. ;;--------------------------------------------------------------------------------
  86. offsetlist()
  87. LoadingSNOExtended()
  88. InitSettings()
  89.  
  90. ; Vérification présence de la fenêtre
  91. CheckWindowD3()
  92.  
  93. ; Lancement du bot
  94. If Not $Devmode Then
  95. _botting()
  96. Else
  97. _log("Dev mode ready", $LOG_LEVEL_WARNING)
  98. ShowDebugTools()
  99. EndIf
  100.  
  101. ; Attente en fin de script pour conserver la console ou utiliser les devs tools
  102. While 1
  103. Sleep(15)
  104. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement