Trove Fishing Bot v2
WARNING:
http://forums.trovegame.com/showthread.php?15338-A-reminder-about-botting
They will be patching this this week! Once the games up-dates DON'T USE IT! Until then, you're safe.
Thank You!: Takeon for shorting the ReadMemory codes and Lava Pointer's. http://forums.trovegame.com/showthread.php?15338-A-reminder-about-botting
They will be patching this this week! Once the games up-dates DON'T USE IT! Until then, you're safe.
Background botting (Don't minimize it!)
What's been added:
Lava Fishing
Mutli-Accounting (Easy)
Auto Lure Find (Reads Slot #1 for the lure amount!)
DOWNLOAD HERE: Thank you Trove for compiling it.
http://www.mpgh.net/forum/showthread.php?t=938049&p=10365629&viewfull=1#post 10365629
1. Downlaod AHK if you haven't!
2. Create a New Desktop Folder! (Folder can be named what ever you want and placed anywhere on computer)
3. Copy the main script code into a new file that's inside the folder you just created (File can be named anything but ends with .ahk). You Can compile this code if you want.
Trove Fishing Bot v2.0.0.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
Numpad9::
FileDelete, %A_ScriptDir%\tmp\break.txt
FileAppend, 0, %A_ScriptDir%\tmp\break.txt
GetWindowsHandle()
return
!Numpad9::
FileDelete, %A_ScriptDir%\tmp\break.txt
FileAppend, 1, %A_ScriptDir%\tmp\break.txt
return
Numpad7::
ExitApp
GetWindowsHandle()
{
Global
AccNum := 0
WinGet, id, list, Trove
Loop, %id%
{
AccNum := AccNum + 1
ids := id%A_Index%
SetWindowHandle(AccNum, ids)
}
}
SetWindowHandle(AccNumF, this_id)
{
Global
If (AccNumF = 1)
{
1Handle = %this_id%
WinGet, pid1, PID, ahk_id %1Handle%
pid1 := pid1
Lure1 := GetLureAmmount(1Handle, pid1)
FileDelete, %A_ScriptDir%\tmp\lure1.txt
FileAppend, %Lure1%, %A_ScriptDir%\tmp\lure1.txt
FileDelete, %A_ScriptDir%\tmp\pid1.txt
FileAppend, %pid1%, %A_ScriptDir%\tmp\pid1.txt
FileDelete, %A_ScriptDir%\tmp\handle1.txt
FileAppend, %1Handle%, %A_ScriptDir%\tmp\handle1.txt
Run, %A_ScriptDir%\Thread1.exe
}
else If (AccNumF = 2)
{
2Handle = %this_id%
WinGet, pid2, PID, ahk_id %2Handle%
pid2 := pid2
Lure2 := GetLureAmmount(2Handle, pid2)
FileDelete, %A_ScriptDir%\tmp\lure2.txt
FileAppend, %Lure2%, %A_ScriptDir%\tmp\lure2.txt
FileDelete, %A_ScriptDir%\tmp\pid2.txt
FileAppend, %pid2%, %A_ScriptDir%\tmp\pid2.txt
FileDelete, %A_ScriptDir%\tmp\handle2.txt
FileAppend, %2Handle%, %A_ScriptDir%\tmp\handle2.txt
Run, %A_ScriptDir%\Thread2.exe
}
else If (AccNumF = 3)
{
3Handle = %this_id%
WinGet, pid3, PID, ahk_id %3Handle%
pid3 := pid3
Lure3 := GetLureAmmount(3Handle, pid3)
FileDelete, %A_ScriptDir%\tmp\lure3.txt
FileAppend, %Lure3%, %A_ScriptDir%\tmp\lure3.txt
FileDelete, %A_ScriptDir%\tmp\pid3.txt
FileAppend, %pid3%, %A_ScriptDir%\tmp\pid3.txt
FileDelete, %A_ScriptDir%\tmp\handle3.txt
FileAppend, %3Handle%, %A_ScriptDir%\tmp\handle3.txt
Run, %A_ScriptDir%\Thread3.exe
}
else If (AccNumF = 4)
{
4Handle = %this_id%
WinGet, pid4, PID, ahk_id %4Handle%
pid4 := pid4
Lure4 := GetLureAmmount(4Handle, pid4)
FileDelete, %A_ScriptDir%\tmp\lure4.txt
FileAppend, %Lure4%, %A_ScriptDir%\tmp\lure4.txt
FileDelete, %A_ScriptDir%\tmp\pid4.txt
FileAppend, %pid4%, %A_ScriptDir%\tmp\pid4.txt
FileDelete, %A_ScriptDir%\tmp\handle4.txt
FileAppend, %4Handle%, %A_ScriptDir%\tmp\handle4.txt
Run, %A_ScriptDir%\Thread4.exe
}
else If (AccNumF = 5)
{
5Handle = %this_id%
WinGet, pid5, PID, ahk_id %5Handle%
pid5 := pid5
Lure5 := GetLureAmmount(5Handle, pid5)
FileDelete, %A_ScriptDir%\tmp\lure5.txt
FileAppend, %Lure5%, %A_ScriptDir%\tmp\lure5.txt
FileDelete, %A_ScriptDir%\tmp\pid5.txt
FileAppend, %pid5%, %A_ScriptDir%\tmp\pid5.txt
FileDelete, %A_ScriptDir%\tmp\handle5.txt
FileAppend, %5Handle%, %A_ScriptDir%\tmp\handle5.txt
Run, %A_ScriptDir%\Thread5.exe
}
else If (AccNumF = 6)
{
6Handle = %this_id%
WinGet, pid6, PID, ahk_id %6Handle%
pid6 := pid6
Lure6 := GetLureAmmount(6Handle, pid6)
FileDelete, %A_ScriptDir%\tmp\lure6.txt
FileAppend, %Lure6%, %A_ScriptDir%\tmp\lure6.txt
FileDelete, %A_ScriptDir%\tmp\pid6.txt
FileAppend, %pid6%, %A_ScriptDir%\tmp\pid6.txt
FileDelete, %A_ScriptDir%\tmp\handle6.txt
FileAppend, %6Handle%, %A_ScriptDir%\tmp\handle6.txt
Run, %A_ScriptDir%\Thread6.exe
}
else If (AccNumF = 7)
{
7Handle = %this_id%
WinGet, pid7, PID, ahk_id %7Handle%
pid7 := pid7
Lure7 := GetLureAmmount(7Handle, pid7)
FileDelete, %A_ScriptDir%\tmp\lure7.txt
FileAppend, %Lure7%, %A_ScriptDir%\tmp\lure7.txt
FileDelete, %A_ScriptDir%\tmp\pid7.txt
FileAppend, %pid7%, %A_ScriptDir%\tmp\pid7.txt
FileDelete, %A_ScriptDir%\tmp\handle7.txt
FileAppend, %7Handle%, %A_ScriptDir%\tmp\handle7.txt
Run, %A_ScriptDir%\Thread7.exe
}
else If (AccNumF = 8)
{
8Handle = %this_id%
WinGet, pid8, PID, ahk_id %8Handle%
pid8 := pid8
Lure8 := GetLureAmmount(8Handle, pid8)
FileDelete, %A_ScriptDir%\tmp\lure8.txt
FileAppend, %Lure8%, %A_ScriptDir%\tmp\lure8.txt
FileDelete, %A_ScriptDir%\tmp\pid8.txt
FileAppend, %pid8%, %A_ScriptDir%\tmp\pid8.txt
FileDelete, %A_ScriptDir%\tmp\handle8.txt
FileAppend, %8Handle%, %A_ScriptDir%\tmp\handle8.txt
Run, %A_ScriptDir%\Thread8.exe
}
}
GetLureAmmount(HandleL, pidL)
{
base := getProcessBaseAddress(HandleL)
pointerBase := base + 0x008E8E18
y1 := ReadMemory(pointerBase, pidL)
y2 := ReadMemory(y1 + 0x9c, pidL)
y3 := ReadMemory(y2 + 0x78, pidL)
y4 := ReadMemory(y3 + 0x0, pidL)
y5 := y4 + 0x58
Return Lure := ReadMemory(y5, pidL)
}
getProcessBaseAddress(HandleUse)
{
return DllCall( A_PtrSize = 4
? "GetWindowLong"
: "GetWindowLongPtr"
, "Ptr", HandleUse
, "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, PIDUse)
{
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", PIDUse, "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
}
4. How many accounts do you want? 8 is the limit for this. Copy the following code(s) for each account. Inside the folder you made. Name then the following for each account! Thread1.ahk Thread2.ahk , etc NOTE: If you're using 2 accounts, use only 1, 2 thread code. (Can put all 8 in, doesn't matter)
Thread1.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure1.txt
FileRead, pid, %A_ScriptDir%\tmp\pid1.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle1.txt
FileDelete, %A_ScriptDir%\tmp\lure1.txt
FileDelete, %A_ScriptDir%\tmp\handle1.txt
FileDelete, %A_ScriptDir%\tmp\pid1.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
Thread2.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure2.txt
FileRead, pid, %A_ScriptDir%\tmp\pid2.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle2.txt
FileDelete, %A_ScriptDir%\tmp\lure2.txt
FileDelete, %A_ScriptDir%\tmp\handle2.txt
FileDelete, %A_ScriptDir%\tmp\pid2.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
Thread3.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure3.txt
FileRead, pid, %A_ScriptDir%\tmp\pid3.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle3.txt
FileDelete, %A_ScriptDir%\tmp\lure3.txt
FileDelete, %A_ScriptDir%\tmp\handle3.txt
FileDelete, %A_ScriptDir%\tmp\pid3.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
Thread4.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure4.txt
FileRead, pid, %A_ScriptDir%\tmp\pid4.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle4.txt
FileDelete, %A_ScriptDir%\tmp\lure4.txt
FileDelete, %A_ScriptDir%\tmp\handle4.txt
FileDelete, %A_ScriptDir%\tmp\pid4.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
Thread5.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure5.txt
FileRead, pid, %A_ScriptDir%\tmp\pid5.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle5.txt
FileDelete, %A_ScriptDir%\tmp\lure5.txt
FileDelete, %A_ScriptDir%\tmp\handle5.txt
FileDelete, %A_ScriptDir%\tmp\pid5.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
Thread6.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure6.txt
FileRead, pid, %A_ScriptDir%\tmp\pid6.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle6.txt
FileDelete, %A_ScriptDir%\tmp\lure6.txt
FileDelete, %A_ScriptDir%\tmp\handle6.txt
FileDelete, %A_ScriptDir%\tmp\pid6.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
Thread7.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure7.txt
FileRead, pid, %A_ScriptDir%\tmp\pid7.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle7.txt
FileDelete, %A_ScriptDir%\tmp\lure7.txt
FileDelete, %A_ScriptDir%\tmp\handle7.txt
FileDelete, %A_ScriptDir%\tmp\pid7.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
Thread8.ahk
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2
FileRead, Lure, %A_ScriptDir%\tmp\lure8.txt
FileRead, pid, %A_ScriptDir%\tmp\pid8.txt
FileRead, Handle, %A_ScriptDir%\tmp\handle8.txt
FileDelete, %A_ScriptDir%\tmp\lure8.txt
FileDelete, %A_ScriptDir%\tmp\handle8.txt
FileDelete, %A_ScriptDir%\tmp\pid8.txt
FileRead, Break, %A_ScriptDir%\tmp\break.txt
LureCount := 0
Loop %Lure%
{
FileRead, Break, %A_ScriptDir%\tmp\break.txt
If (Break = 1)
{
break
}
else
{
}
LureCount := LureCount +1
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Catch := 0
Loop
{
If (Catch = 1)
{
break
}
else
{
Base := getProcessBaseAddress()
CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
If (CaughtWater = 1 or CaughtLava = 1)
{
ControlSend, , {f down}, ahk_pid %pid%
Sleep, 86
ControlSend, , {f up}, ahk_pid %pid%
Random, Wait, 2000, 3500
Sleep, %Wait%
Catch := 1
}
else
{
Sleep, 500
}
}
}
}
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
}
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
}
5. Create folder "tmp" inside the Trove folder you made.
6. You'll need to right click, hit "Compile" on each Thread#.ahk you have. They need to be Thread#.exe (Thread1.exe)
Folder Should like the the following;

7. Launch the Trove Fishing Bot v2.0.0.ahk (or .exe if you complied it too).
8. Log-in all your accounts and align them in front of the water/lava! (Characters can be in different worlds/hubs. 1 can be at lava, others can be at water!)
9. Put all Lures into slot 1 of bags for all accounts before running!
10. Hit "NumPad9" the script will launch the threads and start fishing all at once. No need to highlight/activate any windows.
11. To Stop The Bot(s): Alt+NumPad9 (will send a break file, threads will read the file and stop after they catch the next fish)
NOTE:
Start: NumPad9
Stop: Alt+NumPad9
Exit Main Script: NumPad7 (Send Stop First!)
Want to bot while playing on your main?
Start the bots first, once your bots are running, run another Trove and log in with your main. Bots will run while you have control of your main.
If you Stop the bot, hit Numpad9 again you need to close your main first. Welcome to add a SetWinTitle command for your main so it doesn't bot.
