#WinActivateForce
Numpad6::
WinGet, pidn, PID, A
pid := pidn
WinGet, hwnds, ID, A
Handle := hwnds
;InputBox, Lure, Lure's, How many Lure's do you have in inventory
Lure := 9999
Base := getProcessBaseAddress()
WaterAddress := GetAddressWater(Base,0x009570DC)
Loop %Lure%
{
ControlSend, , {c down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {c up}, ahk_pid %pid%
Sleep, 1000
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Sleep, 2000
CaughtWater := ReadMemory(WaterAddress)
Timer := 0
While Timer = 0
{
Loop
{
If (CaughtWater = 1)
{
Break
}
if Timer = 40
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Break
}
Sleep, 1000
CaughtWater := ReadMemory(WaterAddress)
Timer := Timer + 1
}
}
Timer := 0
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Sleep, 2000
}
ExitApp
Numpad7::
ExitApp
getProcessBaseAddress()
{
Global Handle
return DllCall( A_PtrSize = 4
? "GetWindowLong"
: "GetWindowLongPtr"
, "Ptr", Handle
, "Int", -6
, "Int64") ; Use Int64 to prevent negative overflow when AHK is 32 bit and target process is 64bit
; If DLL call fails, returned value will = 0
}
GetAddressWater(Base, Address)
{
pointerBase := base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x144)
y3 := ReadMemory(y2 + 0xe4)
Return WaterAddress := (y3 + 0x70)
}
ReadMemory(MADDRESS)
{
Global pid
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
;DllCall("ReadProcessMemory","UInt",ProcessHandle, "UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "Ptr", MADDRESS, "Ptr", &MVALUE, "Uint",4)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
return, result
}
This one is still working for me
I hope this helps
It's Zog's updated script
Only works in water though, if you want the lava or chooco one you have to got the the forum, im sure you will be able to find it.
Num Pad 6 to start
Num Pad 7 to end
#WinActivateForce
Numpad6::
WinGet, pidn, PID, A
pid := pidn
WinGet, hwnds, ID, A
Handle := hwnds
Lure := 9999
Base := getProcessBaseAddress()
WaterAddress := GetAddressWater(Base,0x00964208)
LavaAddress := GetAddressLava(Base,0x00964208)
ChocoAddress := GetAddressChoco(Base,0x00964208)
LureCount := 0
Loop %Lure%
{
LureCount := LureCount +1
ControlSend, , {c down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {c up}, ahk_pid %pid%
Sleep, 500
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
PoleCheck := 40
Loop
{
If (Catch = 1)
{
break
}
else
{
If (PoleCheckN = PoleCheck)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
LureCount := 0
}
else
{
}
CaughtWater := ReadMemory(WaterAddress)
CaughtLava := ReadMemory(LavaAddress)
CaughtChoco := ReadMemory(ChocoAddress)
If (CaughtWater = 1 or CaughtLava = 1 or CaughtChoco = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
PoleCheckN := PoleCheckN +1
Sleep, 1000
}
}
}
}
ExitApp
Numpad7::
ExitApp
GetAddressWater(Base, Address)
{
pointerBase := base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x144)
y3 := ReadMemory(y2 + 0xe4)
Return WaterAddress := (y3 + 0x70)
}
GetAddressLava(Base, Address)
{
pointerBase := base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x144)
y3 := ReadMemory(y2 + 0xe4)
Return LavaAddress := (y3 + 0x514)
}
GetAddressChoco(Base, Address)
{
pointerBase := base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x144)
y3 := ReadMemory(y2 + 0xe4)
Return ChocoAddress := (y3 + 0x2c0)
}
getProcessBaseAddress()
{
Global Handle
return DllCall( A_PtrSize = 4
? "GetWindowLong"
: "GetWindowLongPtr"
, "Ptr", Handle
, "Int", -6
, "Int64") ; Use Int64 to prevent negative overflow when AHK is 32 bit and target process is 64bit
; If DLL call fails, returned value will = 0
}
ReadMemory(MADDRESS)
{
Global pid
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
;DllCall("ReadProcessMemory","UInt",ProcessHandle, "UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "Ptr", MADDRESS, "Ptr", &MVALUE, "Uint",4)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
return, result
}
Fishing bot that works for all liquids, also press the thanks button k? thanks.
Last edited by LifeLiving; 07-22-2015 at 12:10 PM.
SlaiiZ (07-22-2015)
with which program I open ?
Hi,guys,i am from Belarus(my english is bad)and i don't understand what i must do for working my bot(( i edit .afk file and inpoot text !and it doesnt work!And one question Somebody can help me with skype? please
#WinActivateForce
^j::
shouldRun = 1
if !setupDone
{
WinGet, pidn, PID, A
pid := pidn
WinGet, hwnds, ID, A
Handle := hwnds
Base := getProcessBaseAddress()
WaterAddress := GetAddressWater(Base,0x00964208)
LavaAddress := GetAddressLava(Base,0x00964208)
ChocoAddress := GetAddressChoco(Base,0x00964208)
setupDone = 1
}
Loop
{
if shouldRun
{
ControlSend, , {c down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {c up}, ahk_pid %pid%
Sleep, 500
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
PoleCheck := 40
While Catch = 0
{
If (PoleCheckN = PoleCheck)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
}
CaughtWater := ReadMemory(WaterAddress)
CaughtLava := ReadMemory(LavaAddress)
CaughtChoco := ReadMemory(ChocoAddress)
If (CaughtWater = 1 or CaughtLava = 1 or CaughtChoco = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
PoleCheckN := PoleCheckN +1
Sleep, 1000
}
FindAndDropBoots()
}
}
else
{
Return
}
}
Return
GetAddressWater(Base, Address)
{
pointerBase := base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x144)
y3 := ReadMemory(y2 + 0xe4)
Return WaterAddress := (y3 + 0x70)
}
GetAddressLava(Base, Address)
{
pointerBase := base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x144)
y3 := ReadMemory(y2 + 0xe4)
Return LavaAddress := (y3 + 0x514)
}
GetAddressChoco(Base, Address)
{
pointerBase := base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x144)
y3 := ReadMemory(y2 + 0xe4)
Return ChocoAddress := (y3 + 0x2c0)
}
getProcessBaseAddress()
{
Global Handle
return DllCall( A_PtrSize = 4
? "GetWindowLong"
: "GetWindowLongPtr"
, "Ptr", Handle
, "Int", -6
, "Int64") ; Use Int64 to prevent negative overflow when AHK is 32 bit and target process is 64bit
; If DLL call fails, returned value will = 0
}
ReadMemory(MADDRESS)
{
Global pid
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
;DllCall("ReadProcessMemory","UInt",ProcessHandle, "UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "Ptr", MADDRESS, "Ptr", &MVALUE, "Uint",4)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
return, result
}
FindAndDropBoots()
{
Imagesearch, Foundx, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 c:\boot.bmp
While errorlevel = 0
{
MouseClickDrag, Left, %FoundX%, %FoundY%, 779, 412
Imagesearch, Foundx, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 c:\boot.bmp
}
}
^k::
shouldRun = 0
Return
it's not working. anyone can help me? plz.
Meeby anybody has a tutorial-video?