Thumbs upPatchedTrove Fishing Bot v2

Posts 1–15 of 50 · Page 1 of 4
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.

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!)

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.
Have 8 accounts, have 8 threads, only 7 work, and they only cast the pole and reel once, and stop working.
Quote Originally Posted by ragecrysux View Post
Have 8 accounts, have 8 threads, only 7 work, and they only cast the pole and reel once, and stop working.


o.O Wtff. Got 6 up and all are botting just fine. Do you have your lures in slot 1?
For only 7 working, do you have skype so I can debug it real fast with 8 accounts?


EDIT: Code edit, edit main script Line: 139 change "6" to "8" so it's 8Handle = %this_id%
Quote Originally Posted by HaHaItsJake View Post
o.O Wtff. Got 6 up and all are botting just fine. Do you have your lures in slot 1?
For only 7 working, do you have skype so I can debug it real fast with 8 accounts?
Sent you pm, and i think max limit is 7 only? because threads 1-7 are running, thread 8 is not
If I just want to use the script for 1 account like v1 I just follow the same steps as v1 on the other thread with this script?
Quote Originally Posted by jacce View Post
If I just want to use the script for 1 account like v1 I just follow the same steps as v1 on the other thread with this script?
No, the v1.0.2 is the old one. It doesn't have any Lava fishing. That hasn't changed at all.

For this one, with a single account - Just follow the steps and just create the Thread1.exe instead of all 8.

I'll be waiting to see what the patch is going to do and decide if I should continue this project or not.
Couldn't get this to work, but took the lava code from this and put it in the old code.

EDIT: O_o

Ohhhh Default settings!

Got it working. Forgot to change key binds.

Also can only get it to work on 3 accounts. Forth account just poops out.
Working fine with 3 bots (atm, going to test more accounts soon).

Multi fishing at once - works.
Lava fishing *cry* 9 scales for 3 bots *cry* xD - works.
Main account as "main" if not running while bot activation - works.


Another rep+!
Nice work.
HaHaItsJake me and my friend from europe have those "delay" problems where sometimes the fishes dont get caught at the right moment and then it doesnt want do throw out the Fishing Rod again.. Can you make it that as long as it isnt out it always try to throw it out again so no bugs can happen?
I can't get this to work, how can i just take the lava code and use the first script?
Well, the script is working - if people are not interacting with the Keyboard at all.
I notice, while using secondary keys like ALT, CTRL, SHIFT, etc. may be blocked due to the Catch/Throw process, and this will most likely cause one or multiple trove chars being stuck at pulling/throwing and gets bugged afterall.

Otherwise, currently using 6 accounts, works flawless. 3 on lava, 3 on water.
Quote Originally Posted by blapanda View Post
Well, the script is working - if people are not interacting with the Keyboard at all.
I notice, while using secondary keys like ALT, CTRL, SHIFT, etc. may be blocked due to the Catch/Throw process, and this will most likely cause one or multiple trove chars being stuck at pulling/throwing and gets bugged afterall.

Otherwise, currently using 6 accounts, works flawless. 3 on lava, 3 on water.
first account works i keep pressing open on 2nd thread but nothing happens please help
Quote Originally Posted by pasi123 View Post
HaHaItsJake me and my friend from europe have those "delay" problems where sometimes the fishes dont get caught at the right moment and then it doesnt want do throw out the Fishing Rod again.. Can you make it that as long as it isnt out it always try to throw it out again so no bugs can happen?
I will add in a if statement if the pole is "0" it will fish again and only if it's value is "0".
On your EACH Threads1-8.ahk
Line: 16 to 60 change to the following code:
 
Thread1-8.ahk Change

Code:
LureCount := 0
Loop %Lure%
{
	
	base := getProcessBaseAddress()
	pointerBase := base + 0x008E8E18
	y1 := ReadMemory(pointerBase)
	y2 := ReadMemory(y1 + 0x9c)
	y3 := ReadMemory(y2 + 0x78)
	y4 := ReadMemory(y3 + 0x0)
	y5 := y4 + 0x58
	Lure := ReadMemory(y5)	
	
	FileRead, Break, %A_ScriptDir%\tmp\break.txt
	If (Break = 1)
	{
		break
	}
	else
	{
			
	}
	LureCount := LureCount +1
	CaughtWater := ReadMemory((ReadMemory(base + 0x008E5360) + 0xBD150))
	CaughtLava := ReadMemory(((ReadMemory(base + 0x008E5360) + 0xBD150) + 0x4A4))
	If (CaughtWater = 0 or CaughtLava = 0)
	{
		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
				}
			}
		}
	}
	Else 
	{
		Random, Wait, 1000, 2500
		Sleep, %Wait%
	}
}
ExitApp


I haven't tested it, but it should check to see if the pole has a fish, if it does it will wait another 1-2.5 seconds. If it waits, it will check the lures again and fix the extra loop(s) that it does.

Quote Originally Posted by jacce View Post
I can't get this to work, how can i just take the lava code and use the first script?
If you follow the steps correctly it will work. If you want to use the first version, You'll have to click the window and activate it before starting. Lava Code added;
 
"Trove Fish Bot v1.0.2 With Lava Code

Code:
#NoEnv
SendMode Input
CoordMode, ToolTip, Screen
SetTitleMatchMode, 3
SetKeyDelay, 0, 2

Numpad9::
	WinGet, pidn, PID, A
	pid := pidn
	WinGet, hwnds, ID, A
	Handle := hwnds
	Break := 0
	InputBox, Lure, Lure's, How many Lure's do you have in inventory?
	LureCount := 0
	Loop %Lure%
	{
		LureCount := LureCount +1
		ControlSend, , {f down}, ahk_pid %pid%
		Sleep, 86
		ControlSend, , {f up}, ahk_pid %pid%
		Catch := 0
		Loop  
		{
			If (Break = 1 or Catch = 1)
			{	
				break
			}
			else
			{
				Base := getProcessBaseAddress()
				pointerBase := base + 0x008E5360
				y1 := ReadMemory(pointerBase)
				y2 := ReadMemory(y1 + 0x20)
				y3 := ReadMemory(y2 + 0x4)
				y4 := y3 + 0x320
				CameraY := ReadMemory(y4)
				If (CameraY = 1)
				{
					ToolTips = 1
					SetTimer, ToolTip, 500
					ControlSend, , {f down}, ahk_pid %pid%
					Sleep, 86
					ControlSend, , {f up}, ahk_pid %pid%
					Random, Wait, 2000, 3500
					Sleep, %Wait%
					Catch := 1
				}
				else 
				{
					ToolTips = 0
					SetTimer, ToolTip, 500
					Sleep, 500
				}
			}
		}
	}
	Break := 1
	ToolTips = 2
	SetTimer, ToolTip, 500
return

!Numpad9::
	Break := 1
	ToolTip
return

Numpad7::
ExitApp


ToolTip:
	If (ToolTips = 0)
		ToolTip, Waiting.. %LureCount%/%Lure% Lures used, 0, 0
	Else If (ToolTips = 1)
		ToolTip, Catching Fish! %LureCount%/%Lure% Lures used, 0, 0
	Else If (ToolTips = 2)
		ToolTip, !!All Lure's Have Been Used!!, 0, 0
Return

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
}


Quote Originally Posted by blapanda View Post
Well, the script is working - if people are not interacting with the Keyboard at all.
I notice, while using secondary keys like ALT, CTRL, SHIFT, etc. may be blocked due to the Catch/Throw process, and this will most likely cause one or multiple trove chars being stuck at pulling/throwing and gets bugged afterall.

Otherwise, currently using 6 accounts, works flawless. 3 on lava, 3 on water.
Yes, forgot to mention that like how I did in the first version. Since the control send only works that way as I know of, it will stop any typing on certain windows. Holding any other keys while the bot(s) send the "f" key will make it not catch that fish, but will send it back out.

Quote Originally Posted by sam3333 View Post
first account works i keep pressing open on 2nd thread but nothing happens please help
Keep pressing "open"?
Should have a Thread#.ahk for each account. If you use 2, there should be the Thread1.ahk and Thread2.ahk, don't forget to compile them and copy the code from the Thread1-8.ahk from above.
Do i need to wait till you update the code above or should i change it manually??? (Or have you already?)
Posts 1–15 of 50 · Page 1 of 4
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?