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