Code:
#SingleInstance force
#IfWinActive,Trove
#NoEnv
#Persistent
SetWorkingDir %A_ScriptDir%
SendMode Input
SetBatchLines -1
if NOT A_IsAdmin{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
Process,Exist,TeamViewer.exe
If (ErrorLevel)
Msgbox,% "Teamviewer is currenly running. This is a known program to cause issues with the fishbot. Please close it or disable quick connect feature. If issues still happen try to uninstall it."
SplashTextOn,500,25,mpPassiveFishingBot,Initializing and updating pointer and offsets, please wait...
global Active:=Object()
global ver:=3.4
global dataVer:=1
global ptr:="0x0"
global wOfts:="0x0"
global lOfts:="0x0"
global cOfts:="0x0"
global wSOfts:="0x0"
global lSOfts:="0x0"
global cSOfts:="0x0"
global ptrPTS:="0x0"
global wOftsPTS:="0x0"
global lOftsPTS:="0x0"
global cOftsPTS:="0x0"
global wSOftsPTS:="0x0"
global lSOftsPTS:="0x0"
global cSOftsPTS:="0x0"
global iniFile:=A_ScriptDir "/config"ver ".ini"
if (FileExist(iniFile)){
IniRead,dataVer,%iniFile%,Global,dataVer
IniRead,ptr,%iniFile%,Global,ptr
IniRead,wOfts,%iniFile%,Global,wOfts
IniRead,lOfts,%iniFile%,Global,lOfts
IniRead,cOfts,%iniFile%,Global,cOfts
IniRead,wSOfts,%iniFile%,Global,wSOfts
IniRead,lSOfts,%iniFile%,Global,lSOfts
IniRead,cSOfts,%iniFile%,Global,cSOfts
IniRead,ptrPTS,%iniFile%,Global,ptrPTS
IniRead,wOftsPTS,%iniFile%,Global,wOftsPTS
IniRead,lOftsPTS,%iniFile%,Global,lOftsPTS
IniRead,cOftsPTS,%iniFile%,Global,cOftsPTS
IniRead,wSOftsPTS,%iniFile%,Global,wSOftsPTS
IniRead,lSOftsPTS,%iniFile%,Global,lSOftsPTS
IniRead,cSOftsPTS,%iniFile%,Global,cSOftsPTS
}
WebRequest:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET","https://dl.dropb"+"oxuserconten*****m/u/52517919/MpFishPointer.txt")
WebRequest.Send()
global res:=StrSplit(WebRequest.ResponseText,"$")
if (res[1]>dataVer){
global dataVer:=res[1]
global ptr:=res[2]
global wOfts:=res[3]
global lOfts:=res[4]
global cOfts:=res[5]
global wSOfts:=res[6]
global lSOfts:=res[7]
global cSOfts:=res[8]
global ptrPTS:=res[9]
global wOftsPTS:=res[10]
global lOftsPTS:=res[11]
global cOftsPTS:=res[12]
global wSOftsPTS:=res[13]
global lSOftsPTS:=res[14]
global cSOftsPTS:=res[15]
IniWrite,%dataVer%,%iniFile%,Global,dataVer
IniWrite,%ptr%,%iniFile%,Global,ptr
IniWrite,%wOfts%,%iniFile%,Global,wOfts
IniWrite,%lOfts%,%iniFile%,Global,lOfts
IniWrite,%cOfts%,%iniFile%,Global,cOfts
IniWrite,%wSOfts%,%iniFile%,Global,wSOfts
IniWrite,%lSOfts%,%iniFile%,Global,lSOfts
IniWrite,%cSOfts%,%iniFile%,Global,cSOfts
IniWrite,%ptrPTS%,%iniFile%,Global,ptrPTS
IniWrite,%wOftsPTS%,%iniFile%,Global,wOftsPTS
IniWrite,%lOftsPTS%,%iniFile%,Global,lOftsPTS
IniWrite,%cOftsPTS%,%iniFile%,Global,cOftsPTS
IniWrite,%wSOftsPTS%,%iniFile%,Global,wSOftsPTS
IniWrite,%lSOftsPTS%,%iniFile%,Global,lSOftsPTS
IniWrite,%cSOftsPTS%,%iniFile%,Global,cSOftsPTS
TrayTip ,mpPassiveFishingBot,Pointers and offsets updated
}
Gui,1:New
Gui 1:-Resize -MinimizeBox
Gui,1:Add,ListView,Checked -Hdr grid -ReadOnly -LV0x10 w250,| | | | |
Gui,1:Add,Button,gInfo w250,&Info
Gui,2:New
Gui 2:-Resize -MinimizeBox +ToolWindow
Gui,2:Add,Text,,% "Current version : "ver "`nPointer : "ptr "`nWater offsets : "wOfts "`nLava offsets : "lOfts "`nChocolate offsets : "cOfts "`nWater state offsets : "wSOfts "`nLava state offsets : "lSOfts "`nChocolate state offsets : "cSOfts "`nPTS Pointer : "ptrPTS "`nPTS Water offsets : "wOftsPTS "`nPTS Lava offsets : "lOftsPTS "`nPTS Chocolate offsets : "cOftsPTS "`nPTS Water state offsets : "wSOftsPTS "`nPTS Lava state offsets : "lSOftsPTS "`nPTS Chocolate state offsets : "cSOftsPTS
Gui,2:Add,Button,gDebug ,&Copy Debug Data
SplashTextOff
if (res[16]>ver){
MsgBox,4,,% "Version "res[16] " available, go to MPGH topic ? (press Yes or No)"
IfMsgBox Yes
Run % "https://www.mpgh.net/forum/showthread.php?t="res[17]
}
GUI,1:Show,,mpPassiveFishingBot
SetTimer,Scan,250
SetTimer,Update,999
TrayTip,mpPassiveFishingBot,Bot started ! Press "Ctrl + f"on water/lava/chocolate !
return
^f::
WinGet,pid,pid,A
nActive:=Object()
fnd:=false
for i,Cur in Active{
if (Cur[1]=pid)
fnd:=true
else
nActive.Insert(Cur)
}
if (!fnd){
nActive.Insert([pid,0,0,0,0,"Detecting","Detecting"])
TrayTip,mpPassiveFishingBot,Bot started on %pid%!
}else
TrayTip,mpPassiveFishingBot,Bot stopped on %pid%!
global Active:=nActive
return
Scan:
for i,C in Active
if (C[4]=0){
pid:=C[1]
WinGet,h,ID,ahk_pid %pid%
Base:=getProcessBaseAddress(h)
wSAdr:=GetAddress(pid,Base,ptr,wSOfts)
lSAdr:=GetAddress(pid,Base,ptr,lSOfts)
cSAdr:=GetAddress(pid,Base,ptr,cSOfts)
wSAdrPTS:=GetAddress(pid,Base,ptrPTS,wSOftsPTS)
lSAdrPTS:=GetAddress(pid,Base,ptrPTS,lSOftsPTS)
cSAdrPTS:=GetAddress(pid,Base,ptrPTS,cSOftsPTS)
if (ReadMemory(wSAdr,pid)=1){
C[4]:=GetAddress(pid,Base,ptr,wOfts)
C[5]:=wSAdr
C[6]:="Water"
C[7]:="Live"
}else if (ReadMemory(lSAdr,pid)=1){
C[4]:=GetAddress(pid,Base,ptr,lOfts)
C[5]:=lSAdr
C[6]:="Lava"
C[7]:="Live"
}else if (ReadMemory(cSAdr,pid)=1){
C[4]:=GetAddress(pid,Base,ptr,cOfts)
C[5]:=cSAdr
C[6]:="Chocolate"
C[7]:="Live"
}else if (ReadMemory(wSAdrPTS,pid)=1){
C[4]:=GetAddress(pid,Base,ptrPTS,wOftsPTS)
C[5]:=wSAdrPTS
C[6]:="Water"
C[7]:="PTS"
}else if (ReadMemory(lSAdrPTS,pid)=1){
C[4]:=GetAddress(pid,Base,ptrPTS,lOftsPTS)
C[5]:=lSAdrPTS
C[6]:="Lava"
C[7]:="PTS"
}else if (ReadMemory(cSAdrPTS,pid)=1){
C[4]:=GetAddress(pid,Base,ptrPTS,cOftsPTS)
C[5]:=cSAdrPTS
C[6]:="Chocolate"
C[7]:="PTS"
}else if (C[3]>5){
SendF(pid)
C[3]:=0
}
}else
if (C[3]>10&&ReadMemory(C[4],C[1])=1){
C[2] ++
C[3]:=0
SendF(C[1])
}else if (C[3]>5&&ReadMemory(C[5],C[1])=0){
SendF(C[1])
C[3]:=0
}
return
Info:
Gui,2:Show,,Info
return
Debug:
msg:="[SP" "OILER=Debug][CO" "DE]Version = "ver "`nPointer = "ptr "`nWater Offsets = "wOfts "`nLava Offsets = "lOfts "`nChocolate Offsets = "cOfts "`nWater State Offsets = "wSOfts "`nLava State Offsets = "lSOfts "`nChocolate State Offsets = "cSOfts "`nPTS Pointer = "ptrPTS "`nPTS Water Offsets = "wOftsPTS "`nPTS Lava Offsets = "lOftsPTS "`nPTS Chocolate Offsets = "cOftsPTS "`nPTS Water State Offsets = "wSOftsPTS "`nPTS Lava State Offsets = "lSOftsPTS "`nPTS Chocolate State Offsets = "cSOftsPTS
WinGet,l,list,ahk_exe Trove.exe
loop %l%{
WinGet,pid,pid,% "ahk_id "l%a_index%
Base:=getProcessBaseAddress(l%a_index%)
msg:=msg "`nClient"a_index ":`nPID = "pid "`nHandle = "l%a_index% "`nBase = "Base "`nWater Address = "GetAddress(pid,Base,ptr,wOfts) "`nLava Address = "GetAddress(pid,Base,ptr,lOfts) "`nChocolate Address = "GetAddress(pid,Base,ptr,cOfts) "`nWater State Address = "GetAddress(pid,Base,ptr,wSOfts) "`nLava State Address = "GetAddress(pid,Base,ptr,lSOfts) "`nChocolate State Address = "GetAddress(pid,Base,ptr,cSOfts) "`nPTS Water Address = "GetAddress(pid,Base,ptrPTS,wOftsPTS) "`nPTS Lava Address = "GetAddress(pid,Base,ptrPTS,lOftsPTS) "`nPTS Chocolate Address = "GetAddress(pid,Base,ptrPTS,cOftsPTS) "`nPTS Water State Address = "GetAddress(pid,Base,ptrPTS,wSOftsPTS) "`nPTS Lava State Address = "GetAddress(pid,Base,ptrPTS,lSOftsPTS) "`nPTS Chocolate State Address = "GetAddress(pid,Base,ptrPTS,cSOftsPTS)
}
msg:=msg "[/CO" "DE][/SPO" "ILER]"
clipboard=%msg%
MsgBox,Debug data copied to clipboard
return
GuiClose:
ExitApp
Update:
for i,C in Active
C[3]++
LV_DELETE()
LV_Add("","PID","Server","Liquid","Reeled","Timer")
WinGet,l,list,ahk_exe Trove.exe
WinGet,cur,pid,A
WinGet,name,ProcessName,ahk_pid %cur%
if(name !="Trove.exe")
ToolTip
loop %l%{
WinGet,pid,PID, % "ahk_id " l%a_index%
found:=false
for i,C in Active
if (C[1]=pid){
found:=true
LV_Add("Check",C[1],C[7],C[6],C[2],C[3])
if (cur=pid)
ToolTip,% "Fishing`nPID : "C[1] "`nServer : "C[7] "`nLiquid : "C[6] "`nReeled : "C[2] "`nTimer : "C[3],0,0
}
if (!found){
LV_Add("",PID,"Not fishing","Not fishing",0,0)
if (cur=pid)
ToolTip,% "Not fishing`nPid : "pid,0,0
}
}
LV_ModifyCol()
return
SendF(PID){
ControlSend,ahk_parent,{f down},ahk_pid %pid%
Sleep,90
ControlSend,ahk_parent,{f up},ahk_pid %pid%
}
getProcessBaseAddress(hnd){
return DllCall( A_PtrSize=4 ? "GetWindowLong": "GetWindowLongPtr","Ptr",hnd,"Int",-6,"Int64")
}
GetAddress(PID,Base,Adr,Ofts){
p:=ReadMemory(base + Adr,PID)
OftsSpl:=StrSplit(Ofts,"+")
loop,% (OftsSpl.MaxIndex() - 1)
p:=ReadMemory(p + OftsSpl[a_index],PID)
if (Ofts != "")
p:=p + OftsSpl[OftsSpl.MaxIndex()]
return p
}
ReadMemory(MADDRESS,pid){
VarSetCapacity(MVALUE,4,0)
ProcessHandle:=DllCall("OpenProcess","Int",24,"Char",0,"UInt",pid,"UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"Ptr",MADDRESS,"Ptr",&MVALUE,"Uint",4)
loop 4
result +=*(&MVALUE + A_Index-1) << 8*(A_Index-1)
return result
}