mdperdu

Bot de peche

14 messages dans ce sujet

MAJ AU 15-07-2014

Donc voici le source du bot de peche posté section bot

 

MAJ Offset version Offset 5.4.8.18414 (officiel au 15-07-2014)

Pour WOW version 32bits

 



#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>

HotKeySet("{esc}","_esc")


#Region Offset 5.4.8.18414
Global $clientConnection=0xEC4628,$objectManager=0x462C,$NextObject=0x34,$FirstObject=0xcC,$LocalGUID=0xE8 ; ok ?
Global $objname01=0x1c0,$objname02=0xB0 ; ok
Global $Playername = 0xEC4668 ; ok 0xE3CB40
Global $Isbobbing = 0xcc ;0xC4 ok
Global $Descriptors =0x04 ; ok
Global $TypeObj = 0xC; ok
Global $creaby = 0x20 ; ok ?
Global $CursorType = 0xD2E558 ; ok0xCA5300
#endregion


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=53 then
$found=True
ExitLoop(2)
EndIf
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

Func scanobj()
$plouf=0
Local $AdrSo1,$AdrSo2,$Type,$Firstob,$Curobj
$AdrSo1=_MEMORYREAD($Modul+$clientConnection,$Wow,"dword")
$AdrSo2=_MEMORYREAD($AdrSo1+$objectManager,$Wow,"dword")
$Firstob=_MEMORYREAD($AdrSo2+$firstObject,$Wow,"dword")
$Curobj=$Firstob
$Type=_MEMORYREAD($Curobj+$TypeObj,$Wow,"dword")

$playerguid=_MEMORYREAD($AdrSo2+$localGuid,$Wow,"int64")

$cptobj=0
While $Type < 8 And $Type > 0

Switch $Type


Case 5
$nom01 = _MEMORYREAD($Curobj+$objname01,$Wow,"dword")
$nom02 = _MEMORYREAD($nom01+$objname02,$Wow,"dword")
$name = _MEMORYREAD($nom02,$Wow,"char[40]")
If $name="Flotteur" Then

$cptobj +=1

$descri=_MEMORYREAD($Curobj+$Descriptors,$Wow,"dword")


$my=$cptobj
$created=_MEMORYREAD($descri+$creaby,$Wow,"int64")
If $created=$playerguid Then
ToolTip("created ok")
$plouf=$Curobj+$ISBOBBING
Return
EndIf

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


Func _Pech()
$posPech = MouseGetPos()
$Conf +=1
EndFunc

Func _HG()
$posHG = MouseGetPos()
$Conf +=1
EndFunc

Func _BD()
$posBD = MouseGetPos()
$Conf +=1
EndFunc

Func _esc()
$go=0
EndFunc

func get_utf8($string)
Local $chaine= BinaryToString(StringToBinary($string), 4)
Return $chaine
EndFunc

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

>

 

 

 

Pour le fonctionnement du bot allez voir le post en section bot

 

Pour le principe du prog c est assez simple

 

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

 

quand le type est celui de l hameçon je stop la recherche

 

je trouve mon bouchon dans le game object manager

 

(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

 

voila c est tout con et tres simple

 

et largement améliorable:RIRE:

Modifié par mdperdu

Partager ce message


Lien à poster
Partager sur d’autres sites

>Global $guidperso        = 
Global $TypeObj          = 
Global $clientConnection = 0x9BE7E0
Global $objectManager    = 0x463C
Global $nextObject       = 0x3C
Global $firstObject      = 0xC0
Global $localGuid        = 0xC8
Global $ISBOBBING        = 
Global $CursorType       = 0x93D250
Global $objName01        = 0x1CC
Global $objName02        = 0xB4
Global $creaby           = 

 

Il en manque quelques-un

Partager ce message


Lien à poster
Partager sur d’autres sites
>
#Region Offset 5.3.0.17128
Global $clientConnection=0xE3CB00,$objectManager=0x462C,$NextObject=0x34,$FirstObject=0xCC,$LocalGUID=0xE0
Global $objname01=0x1B8,$objname02=0xB0
Global $Playername = 0xE3CB40
Global $Isbobbing = 0xC4
Global $Descriptors =0x04
Global $TypeObj = 0xC
Global $guidperso = 0xC8A7B0
Global $creaby = 0x20
Global $CursorType = 0xCA5300
#endregion

Partager ce message


Lien à poster
Partager sur d’autres sites

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant