MAJ AU 19-02-2016
Donc voici le source du bot de peche posté section bot
MAJ Offset version Offset 6.2.3.20886 (officiel au 19-02-2016)
Pour WOW version 32bits
Code:
#RequireAdmin
#include <NomadMemory.au3>
SetPrivilege("SeDebugPrivilege", 1)
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiToolTip.au3>
#include "Offset_6.2.3.20886.au3"
HotKeySet("{esc}", "_esc")
Global $go = 0, $Conf, $posHG, $posBD, $CaptureH, $CaptureL, $plouf, $found, $bober2, $posPech, $posFoyer
$Processid = WinGetProcess("World of Warcraft")
$Wow = _MemoryOpen($Processid)
$Modul = _GetWowBaseA($Processid)
#region ### START Koda GUI section ### Form=
Global $decompte = False, $timerstop1
$Form1 = GUICreate("Némo !!", 235, 281, 280, 514)
$Etalon = GUICtrlCreateButton("Etalon", 16, 224, 75, 25, $WS_GROUP)
$Action = GUICtrlCreateButton("Start", 128, 224, 75, 25, $WS_GROUP)
$Label4 = GUICtrlCreateLabel("Hotkey stop : ESCAPE", 48, 88, 112, 17)
$Label5 = GUICtrlCreateLabel("Vitesse souris", 24, 56, 68, 17)
$Label1 = GUICtrlCreateLabel("Pas de scan H / V ", 24, 24, 95, 17)
GUICtrlCreateLabel("Timer (min)", 24, 2, 95, 17)
$timerstop = GUICtrlCreateInput("", 85, 2, 40, 21)
$Arret = GUICtrlCreateCheckbox("Arret PC", 140, 2, 80, 21)
$PasHori = GUICtrlCreateInput("30", 136, 24, 33, 21)
$PasVert = GUICtrlCreateInput("30", 182, 24, 33, 21)
$Vitesse = GUICtrlCreateInput("3", 137, 52, 33, 21)
$Checkbox1 = GUICtrlCreateCheckbox("Toujours devant", 56, 112, 97, 17)
$Slider1 = GUICtrlCreateSlider(40, 176, 150, 45)
GUICtrlSetLimit(-1, 150)
$Label2 = GUICtrlCreateLabel("Transparence", 72, 144, 70, 17)
If FileExists(@ScriptDir & "\svchost.ini") Then
GUICtrlSetData($PasHori, IniRead(@ScriptDir & "\svchost.ini", "", "PasH", ""))
GUICtrlSetData($PasVert, IniRead(@ScriptDir & "\svchost.ini", "", "PasV", ""))
GUICtrlSetData($Vitesse, IniRead(@ScriptDir & "\svchost.ini", "", "Vite", ""))
GUICtrlSetData($Slider1, IniRead(@ScriptDir & "\svchost.ini", "", "Tran", ""))
GUICtrlSetState($Checkbox1, IniRead(@ScriptDir & "\svchost.ini", "", "TopM", ""))
WinSetTrans("Némo !!", "", 255 - GUICtrlRead($Slider1))
EndIf
GUISetState(@SW_SHOW)
If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then WinSetOnTop("Némo !!", "", 1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
IniWrite(@ScriptDir & "\svchost.ini", "", "PasH", GUICtrlRead($PasHori))
IniWrite(@ScriptDir & "\svchost.ini", "", "PasV", GUICtrlRead($PasVert))
IniWrite(@ScriptDir & "\svchost.ini", "", "Vite", GUICtrlRead($Vitesse))
IniWrite(@ScriptDir & "\svchost.ini", "", "Tran", GUICtrlRead($Slider1))
IniWrite(@ScriptDir & "\svchost.ini", "", "TopM", GUICtrlRead($Checkbox1))
Exit
Case $Etalon
Defenetre()
Case $Action
If $Conf > 0 Then $go = 1
$stop = GUICtrlRead($timerstop)
If $stop <> "" Then
$decompte = True
$timerstop1 = TimerInit()
EndIf
scan()
Case $Checkbox1
If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
WinSetOnTop("Némo !!", "", 1)
Else
WinSetOnTop("Némo !!", "", 0)
EndIf
Case $Slider1
WinSetTrans("Némo !!", "", 255 - GUICtrlRead($Slider1))
EndSwitch
WEnd
Func scan()
$size = WinGetPos("World of Warcraft")
$WoWActif = WinGetHandle("World of Warcraft")
While 1
If $go = 0 Then ExitLoop
If $decompte Then
If TimerDiff($timerstop1) > ($stop * 60) * 1000 Then
MouseClick("right", $posFoyer[0], $posFoyer[1])
Sleep(40000)
If GUICtrlRead($Arret) = 1 Then
Shutdown(5)
Else
Exit
EndIf
EndIf
EndIf
WinActivate("World of Warcraft", "")
WinWaitActive("World of Warcraft", "")
$found = False
$timer = TimerInit()
MouseClick("right", $posPech[0], $posPech[1])
Sleep(1500)
$vit = GUICtrlRead($Vitesse)
$pas_x = GUICtrlRead($PasHori)
$pas_y = GUICtrlRead($PasVert)
For $y = $posHG[1] To $posHG[1] + $CaptureH Step $pas_y
For $x = $posHG[0] To $posHG[0] + $CaptureL Step $pas_x
MouseMove($x, $y, $vit)
$souri = _memoryread($Modul + $CursorType, $Wow, "dword")
If $souri = $MouseID Then
$found = True
ExitLoop (2)
EndIf
If $go=0 Then Return
Next
Next
If $found = True And TimerDiff($timer) < 20000 Then
scanobj()
If $plouf > 0 Then
Do
$bober2 = _MEMORYREAD($plouf, $Wow, "short")
ToolTip("Etat de bouchon " & $bober2, $size[0], $size[1])
If TimerDiff($timer) > 20000 Then ExitLoop
Until $bober2 = 1
$bober2 = 255
Sleep(1000)
ToolTip("Ca klik", $size[0], $size[1])
MouseClick("right")
Sleep(3000)
EndIf
EndIf
WEnd
EndFunc ;==>scan
Func scanobj()
$plouf = 0
Local $AdrSo2, $Type, $Firstob, $Curobj,$guidobj,$display,$created
$AdrSo2 = _MEMORYREAD($Modul + $clientConnection, $Wow, "dword")
$Firstob = _MEMORYREAD($AdrSo2 + +$firsEnty, $Wow, "dword")
$Curobj = $Firstob
$Type = _MEMORYREAD($Curobj + $TypeObj, $Wow, "dword")
$playerguid = _MEMORYREAD($AdrSo2 + $localGuid, $Wow, "byte[16]")
While $Type < 9 And $Type > 0
Switch $Type
Case 5
$guidobj=_MEMORYREAD($Curobj+$Guid_obj,$Wow,"byte[16]")
$display=_MEMORYREAD(_MEMORYREAD($Curobj+$Descriptors,$Wow,"dword")+($DisplayID*4),$Wow,"DWORD")
$created=_MEMORYREAD(_MEMORYREAD($Curobj+$Descriptors,$Wow,"dword")+($CreatedBy*4),$Wow,"byte[16]")
If $display = $bouchonID And $created=$playerguid Then
ToolTip("created ok")
$plouf = $Curobj + $Isbobbing
Return
EndIf
EndSwitch
$Curobj = _MEMORYREAD($Curobj + $nextObject, $Wow, "dword")
$Type = _MEMORYREAD($Curobj + $TypeObj, $Wow, "dword")
WEnd
EndFunc
Func Defenetre()
Local $size
WinActivate("World of Warcraft", "")
$size = WinGetPos("World of Warcraft")
ToolTip("F1 pour defnir coin haut gauche" & @CRLF & "F2 pour definir coin bas droite", $size[0], $size[1])
$Conf = 0
HotKeySet("{f1}", "_HG")
HotKeySet("{f2}", "_BD")
Do
Sleep(100)
Until $Conf = 2
HotKeySet("{f1}")
HotKeySet("{f2}")
$CaptureL = $posBD[0] - $posHG[0]
$CaptureH = $posBD[1] - $posHG[1]
SplashTextOn("", "Surface de capture", $CaptureL, $CaptureH, $posHG[0], $posHG[1], 5, "", 24)
Sleep(3000)
SplashOff()
HotKeySet("{f1}", "_Pech")
$Conf = 0
ToolTip("Placez la souris sur le bouton de peche et appuyez sur F1", $size[0], $size[1])
Do
Sleep(100)
Until $Conf = 1
Sleep(250)
HotKeySet("{f1}")
ToolTip("")
EndFunc ;==>Defenetre
Func _Pech()
$posPech = MouseGetPos()
$Conf += 1
EndFunc ;==>_Pech
Func _HG()
$posHG = MouseGetPos()
$Conf += 1
EndFunc ;==>_HG
Func _BD()
$posBD = MouseGetPos()
$Conf += 1
EndFunc ;==>_BD
Func _esc()
$go = 0
EndFunc ;==>_esc
Func get_utf8($string)
Local $chaine = BinaryToString(StringToBinary($string), 4)
Return $chaine
EndFunc ;==>get_utf8
Func _GetWowBaseA($PID)
If $PID = 0 Then
MsgBox(0, "Erreur", "Erreur Numero de process invalide")
Exit
EndIf
$HSNAP = DllCall("Kernel32.dll", "HANDLE", "CreateToolhelp32Snapshot", "DWORD", 8, "DWORD", $PID)
$STMODULE = DllStructCreate("DWORD dwSize;DWORD th32ModuleID;DWORD th32ProcessID;" & "DWORD GlblcntUsage;DWORD ProccntUsage;ptr modBaseAddr;" & "DWORD modBaseSize;HANDLE hModule;WCHAR szModule[256];" & "WCHAR szExePath[260]")
DllStructSetData($STMODULE, "dwSize", DllStructGetSize($STMODULE))
$RET = DllCall("Kernel32.dll", "BOOLEAN", "Module32FirstW", "HANDLE", $HSNAP[0], "ptr", DllStructGetPtr($STMODULE))
If ($RET[0] = False) Then
DllCall("Kernel32.dll", "BOOLEAN", "CloseHandle", "HANDLE", $HSNAP[0])
Return 0
Else
$RET[0] = True
Do
If DllStructGetData($STMODULE, "szModule") = "Wow.exe" Then
DllCall("Kernel32.dll", "BOOLEAN", "CloseHandle", "HANDLE", $HSNAP[0])
Return DllStructGetData($STMODULE, "modBaseAddr")
EndIf
$RET = DllCall("Kernel32.dll", "BOOLEAN", "Module32NextW", "HANDLE", $HSNAP[0], "ptr", DllStructGetPtr($STMODULE))
Until $RET[0] = False
EndIf
EndFunc ;==>_GetWowBaseA
Pour le fonctionnement du bot allez voir le post en section bot
Pour le principe du prog c est assez simple
--
Edit : 19-02-2016
Quelques petits changements sur le mécanisme **
--
je défini une zone d écran ou je vais chercher le bouchon
je passe la souris sur cette zone en surveillant l offset du
type de curseur
--
(le numéro du type de curseur a changer ) **
(l offset de la liste des objet a un pointeur en moins ) **
--
quand le type est celui de l hameçon je stop la recherche
je trouve mon bouchon dans le game object manager
--
(la recherche du bouchon se fait par le DisplayID (apparence a l écran ) et plus par le nom "flotteur" ) **
(plus de problème de langage du jeux ) **
--
(pas surveiller le bouchon du voisin)
quand il est trouver je surveille l etat du bouchon
quand il passe a 1 c est le sa a mordu alors je klik
--
La touche escape arrete directement le bot , plus apres un scan complet **
--
voila c est tout con et tres simple
et largement améliorable:RIRE:
** modif du code
Last edited: