#WinActivateForce
; Script config. Do NOT change value here, might working inproperly!
global Version := "v20200909" ; The version number of this script
global FishAddress := "0xF1ABCC" ; The memory address for fishing ; Tooltip settings
global TooltipX := 80 ; Tooltip's X position
global TooltipY := 150 ; Tooltip's Y position ; Hotkeys settings, change the hotkeys here
global HK_AutoFish := "F11" ; Hotkey for auto fishing
global HK_AutoBoot := "F10" ; Hotkey for auto boot throw
global HK_AntiAFK := "F9" ; Hotkey for anti-AFK
global HK_Info := "F8" ; Hotkey for info tooltip toggle
global HK_Exit := "F6" ; Hotkey for exit the script ; Auto Boot Throw settings
global Interval_Boot := 2000 ; Auto Throw Boot trigger interval in milliseconds. The default is 2000ms. Set longer interval to save CPU usage. Set shorter interval to throw boot faster.
global worddir = A_WorkingDir
global BootImgPath := worddir . "\boot.bmp" ; set your Old Boot image path here
global ABootImgPath := worddir . "\Aboot.bmp" ; set your Ancient Boot image path here
global TraserImgPath := worddir . "\traser.bmp" ; set your Traser image path here
global ClickImgPath := worddir . "\click.bmp" ; set your Traser image path here
global FastABTDelay := 0.5 ; Long press delay before triggering Fast ABT. The default is 0.5 seconds ; Anti-AFK settings
global Interval_AFK := 10000 ; Anti-AFK trigger interval in milliseconds. The default is 10 seconds (10000ms)
global AFK_Key := "End" ; The key to send to prevent AFK by Anti-AFK. The default is "End" key which will not effect Trove gameplay ; Flags startup settings. Do NOT change value here, might working inproperly!
global Flag_ABT := false ; Auto boot throw default setting, 1 is on, 0 is off
global Flag_AFK := false ; Anti-AFK default setting, 1 is on, 0 is off
global Flag_Tooltip := true ; 1 for showing tooltip, 0 for hiding tooltip
global Flag_Fishing := false ; If auto fishing started, set to 1 ; Fishing info settings. Do NOT change value here, might working inproperly!
global TimerS := 0 ; Fishing timer seconds
global TimerM := 0 ; Fishing timer minutes
global TimerH := 0 ; Fishing timer hours
global LureCount := 0 ; Used lure count CoordMode, ToolTip, Screen
UpdateTooltip() Hotkey, %HK_AutoFish%, L_AutoFish
Hotkey, %HK_AutoBoot%, L_AutoBoot
Hotkey, %HK_AntiAFK%, L_AntiAFK
Hotkey, %HK_Info%, L_Info
Hotkey, %HK_Exit%, L_Exit
Return L_AutoFish: ; Auto Fishing
if (Flag_Fishing) {
Flag_Fishing := false
TimerS := 0
TimerM := 0
TimerH := 0
LureCount := 0
; Stop fishing timer
SetTimer, UpdateTimer, Off
UpdateTooltip()
} else {
Flag_Fishing := true
SetTimer, AutoFish, -1
; Start fishing timer
SetTimer, UpdateTimer, 1000
}
Return AutoFish:
WinGet, pidn, PID, A
pid := pidn
WinGet, hwnds, ID, A
Handle := hwnds Lure := 9999 ; Set max lure
Base := getProcessBaseAddress()
WaterAddress := GetAddressWater(Base,FishAddress) ; Water memory address
LavaAddress := GetAddressLava(Base,FishAddress) ; Lava memory address
ChocoAddress := GetAddressChoco(Base,FishAddress) ; Choco memory address
PlasmaAddress := GetAddressPlasma(Base,FishAddress) ; Plasma memory address Loop %Lure% {
; If still have lure (by counting)
if (!Flag_Fishing)
break NatualPress("b", pid) ; Open backpack to prevent camera rotate while moving mouse, and also for ImageSearch to find the Old Boot LureCount := LureCount +1
UpdateTooltip() ; Anti-AFK
Gosub, AntiAFK NatualPress("f", pid) ; Casting the line
Sleep, 15000 ; Check for bite after 15 seconds. Players must wait for 20-30 seconds for the lure to start splashing in order to reel in a fish. Reduce the pole checking loop.
FishingTimeCount := 0 Loop {
; Line casted and pole checking loop, 1 second per check
if (!Flag_Fishing)
break UpdateTooltip() ; Already cast and checking for biting
CaughtWater := ReadMemory(WaterAddress)
CaughtLava := ReadMemory(LavaAddress)
CaughtChoco := ReadMemory(ChocoAddress)
CaughtPlasma := ReadMemory(PlasmaAddress) if (CaughtWater || CaughtLava || CaughtChoco || CaughtPlasma) {
; Fish caught, reel in
NatualPress("f", pid)
Random, Wait, 2000, 3500 ; Wait a few seconds
Sleep, %Wait%
NatualPress("b", pid)
break
} ; caught nothing, wait 1 second and continue checking
Sleep, 1000 if (FishingTimeCount++ > 20) { ; If waiting time is over 35 seconds, it must be a miss or something wrong. Re-cast.
NatualPress("b", pid)
break
} }
}
Return L_AutoBoot: ; Toggle auto boot throw
KeyWait, %HK_AutoBoot%, T%FastABTDelay% ;Detect how long HK_AutoBoot has been pressed. Set 0.5 second
if (errorlevel) {
loop {
UpdateTooltip()
if (!GetKeyState(HK_AutoBoot, "P"))
Break
Gosub, AutoBootThrow
Random, Wait, 10, 50 ; Wait a few milliseconds
Sleep, %Wait%
}
} else {
if (Flag_ABT) {
Flag_ABT := false
UpdateTooltip()
SetTimer, AutoBootThrow, Off
} else {
Flag_ABT := true
UpdateTooltip()
Gosub, AutoBootThrow
SetTimer, AutoBootThrow, %Interval_Boot%
}
}
Return L_AntiAFK: ; Anti-AFK
if (Flag_AFK) {
SetTimer, AntiAFK, Off
Flag_AFK := false
} else {
WinGet, pidn, PID, A
pid := pidn SetTimer, AntiAFK, %Interval_AFK%
Flag_AFK := true
}
UpdateTooltip()
Return L_Info: ; Toggle tooltip
if (Flag_Tooltip) {
Flag_Tooltip := false
ToolTip
} else {
Flag_Tooltip := true
UpdateTooltip()
}
Return L_Exit: ; Stop the script
ExitApp AutoBootThrow:
Imagesearch, OBFoundX, OBFoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *70 %BootImgPath%
if (errorlevel = 0) {
if (GetKeyState(HK_AutoBoot, "P")) {
DragSpeed = 2 ; Fast ABT
} else {
Random, DragSpeed, 4, 10 ; Throw naturally
}
Imagesearch, TFoundX,TFoundY,0,0, A_ScreenWidth, A_ScreenHeight, *70 %TraserImgPath%
MouseClickDrag, Left, %OBFoundX%, %OBFoundY%, %TFoundX%, %TFoundY% ,%DragSpeed%
sleep , 500
Imagesearch, CFoundX,CFoundY,0,0, A_ScreenWidth, A_ScreenHeight, *70 %ClickImgPath%
Random, DragSpeed, 4, 10
MouseClick, Left, CFoundX, CFoundY, 1, DragSpeed
}
Imagesearch, ABFoundX, ABFoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *70 %ABootImgPath%
if (errorlevel = 0) {
if (GetKeyState(HK_AutoBoot, "P")) {
DragSpeed = 2 ; Fast ABT
} else {
Random, DragSpeed, 4, 10 ; Throw naturally
}
Imagesearch, TFoundX,TFoundY,0,0, A_ScreenWidth, A_ScreenHeight, *70 %TraserImgPath%
MouseClickDrag, Left, %ABFoundX%, %ABFoundY%, %TFoundX%, %TFoundY% ,%DragSpeed%
sleep , 500
Imagesearch, CFoundX,CFoundY,0,0, A_ScreenWidth, A_ScreenHeight, *70 %ClickImgPath%
Random, DragSpeed, 4, 10
MouseClick, Left, CFoundX, CFoundY, 1, DragSpeed
}
Return AntiAFK:
; Sending key to prevent AFK
NatualPress(AFK_Key, pid)
Return UpdateTimer:
if (TimerS = 59) {
TimerS = 0
TimerM += 1
}
if (TimerM = 60) {
TimerM = 0
TimerH += 1
UpdateTooltip()
Return
}
TimerS += 1
UpdateTooltip()
Return GetAddressWater(Base, Address) {
pointerBase := Base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x68)
y3 := ReadMemory(y2 + 0xe4)
Return WaterAddress := (y3 + 0x3c4) ;1
} GetAddressLava(Base, Address) {
pointerBase := Base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x68)
y3 := ReadMemory(y2 + 0xe4)
Return LavaAddress := (y3 + 0x898) ;3
} GetAddressChoco(Base, Address) {
pointerBase := Base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x68)
y3 := ReadMemory(y2 + 0xe4)
Return ChocoAddress := (y3 + 0x62c) ;2
} GetAddressPlasma(Base, Address){
pointerBase := Base + Address
y1 := ReadMemory(pointerBase)
y2 := ReadMemory(y1 + 0x68)
y3 := ReadMemory(y2 + 0xe4)
Return PlasmaAddress := (y3 + 0xb00) ;4
} 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
} NatualSleep() {
Random, SleepTime, 66, 122
Sleep, %SleepTime%
} NatualPress(npbtn, nppid) {
ControlSend, , {%npbtn% down}, ahk_pid %nppid%
NatualSleep()
ControlSend, , {%npbtn% up}, ahk_pid %nppid%
NatualSleep()
} UpdateTooltip() {
if (!Flag_Tooltip) {
return
} Info_Tips := "`n[" . HK_Info . "] Toggle this info."
Info_Exit := "`n[" . HK_Exit . "] Exit script."
Info_Lure := "`nLure used - " . (LureCount - 1) if (!Flag_Fishing) {
Info_Fish := "`n[" . HK_AutoFish . "] Auto Fishing is OFF."
} else if (Flag_Fishing) {
Info_Fish := "`n[" . HK_AutoFish . "] Auto Fishing is ON."
} if (GetKeyState(HK_AutoBoot, "P")) {
Info_Boot := "`n[FAST] Auto Boot Throw is ON."
} else {
if (!Flag_ABT) {
Info_Boot := "`n[" . HK_AutoBoot . "] Auto Boot Throw is OFF."
} else if (Flag_ABT) {
Info_Boot := "`n[" . HK_AutoBoot . "] Auto Boot Throw is ON."
}
} if (!Flag_AFK) {
Info_AFK := "`n[" . HK_AntiAFK . "] Anti-AFK is OFF."
} else if (Flag_AFK) {
Info_AFK := "`n[" . HK_AntiAFK . "] Anti-AFK is ON."
} TimerS := SubStr("0" . TimerS, -1)
TimerM := SubStr("0" . TimerM, -1)
Timerinfo := "`nFishing Time - " . TimerH . ":" . TimerM . ":" . TimerS HeaderTip := "<AutoFish>` " . Version . "`n Developer : Howar31 `n Updated by MiraculousB `n https://www.cnblogs.com/MiraculousB/"
FuncTip := Info_Fish . Info_Boot . Info_AFK
StatusTip := "" . Info_Lure . Timerinfo
FooterTip := "" . Info_Tips . Info_Exit if (!Flag_Fishing) {
ToolTip, %HeaderTip%%FuncTip%%FooterTip%, TooltipX, TooltipY
} else if (Flag_Fishing) {
ToolTip, %HeaderTip%%FuncTip%%StatusTip%%FooterTip%, TooltipX, TooltipY
}
}
使用AHK编写。下面是可执行文件。

Trove自动钓鱼脚本(国际服的更多相关文章

  1. SQL Server镜像自动生成脚本

    SQL Server镜像自动生成脚本 镜像的搭建非常繁琐,花了一点时间写了这个脚本,方便大家搭建镜像 执行完这个镜像脚本之后,最好在每台机器都绑定一下hosts文件,不然的话,镜像可能会不work 1 ...

  2. 企业IT管理员IE11升级指南【15】—— 代理自动配置脚本

    企业IT管理员IE11升级指南 系列: [1]—— Internet Explorer 11增强保护模式 (EPM) 介绍 [2]—— Internet Explorer 11 对Adobe Flas ...

  3. mysql 自动备份和nginx自动安装脚本

    一.自动备份Mysql脚本: 如下脚本为mysql自动备份脚本,仅供参考,可以根据实际情况修改. #!/bin/sh #auto backup mysql #wugk #Define PATH定义变量 ...

  4. Windows环境下Oracle数据库的自动备份脚本

    批处理文件(.bat) @echo off echo ================================================ echo  Windows环境下Oracle数据 ...

  5. Oracle自动备份脚本(网上找到的资料)

    废话不多说了,直接给大家贴代码了,具体代码如下所示: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ...

  6. 做了一个简易的git 代码自动部署脚本

    做了一个简易的git 代码自动部署脚本 http://my.oschina.net/caomenglong/blog/472665 发表于2个月前(2015-06-30 21:08)   阅读(200 ...

  7. 使用php作linux自动执行脚本

    使用php作linux自动执行脚本 [来源] 达内    [编辑] 达内   [时间]2013-03-21 在作社区时, 时常需要统计上线人数等数据. 一般做法是, 把这段代码放在用户 login或者 ...

  8. 【LVM】LVM自动扩容脚本

    概要说明: /dev/mapper/vg0-data挂载在目录/data下: 当新增物理磁盘时,需要自动对/dev/mapper/vg0-data磁盘时进行扩容(自动化脚本): 当新增物理磁盘时,自动 ...

  9. Iptables DDOS/CC 自动屏蔽脚本

    Iptables DDOS/CC 自动屏蔽脚本 May 20, 2013 最近不停地被 CC (DDOS的一种)频繁干扰,分享一个 iptables 屏蔽 DDOS 的脚本.让 crond 每分钟运行 ...

随机推荐

  1. C#获取时间戳的几种方式

    Console.WriteLine(Convert.ToDouble(DateTime.UtcNow.Ticks - 621355968000000000) / (10 * 1000 * 1000)) ...

  2. MySQL-5.7.29-winx64解压缩版安装

    1.下载压缩包 https://dev.mysql.com/downloads/file/?id=491809 2.解压下载的文件(路径放在哪都可以) 3.配置环境变量 添加变量到path中 4.准备 ...

  3. C# 9 新特性——init only setter

    C# 9 新特性--init only setter Intro C# 9 中新支持了 init 关键字,这是一个特殊的 setter,用来指定只能在对象初始化的时候进行赋值,另外支持构造器简化的写法 ...

  4. jsp文件导包

    可以在一个页面中用上多个<% @ page %>指令,但是其中的属性只能用一次,不过也有个例外,那就是import属性.因为import属性和Java中的import语句差不多(参照Jav ...

  5. request常用方法servlet初步

    1 package com.ycw.newservlet; 2 3 import java.io.IOException; 4 import javax.servlet.ServletExceptio ...

  6. MySQL索引优化,explain详细讲解

    前言:这篇文章主要讲 explain 如何使用,还有 explain 各种参数概念,之后会讲优化 一.Explain 用法 模拟Mysql优化器是如何执行SQL查询语句的,从而知道Mysql是如何处理 ...

  7. 数据库事务特性ACID

    事务 事务(Transaction),一般是指要做的或所做的事情.在计算机术语中是指访问并可能更新数据库中各种数据项的一个程序执行单元(unit).在计算机术语中,事务通常就是指数据库事务. 概念 一 ...

  8. ROS开源小车TurtleBot3详情介绍(Burger)

    您为什么要选择ROS开源智能小车 ROS(RobotOperating System,机器人操作系统)是目前世界上更主流更多人使用的的机器人开源操作系统.它可以提供操作系统应有的服务,包括硬件抽象,底 ...

  9. 微信小程序--投票小程序设计与实现(图片、视频发布、分组、审核、排名)

    投票微信小程序设计与实现(图片.视频发布.分组.审核.排名) ​ 之前接到一个需求,设计一个类似H5 投票系统之类的小程序,我绞尽脑汁,冥思苦想,最后终于做了出来. 再次感谢 @文晓港 的ColorU ...

  10. 联想K5pro手机过夜后声音不能播放录音资源被占用解决方案

    联想K5pro手机过夜后声音不能播放(微信头条等),录音机显示录音资源被占用无法录音,一些有声音的图像播放卡顿,关于app录音的权限我也都开了,只能靠重启才能能恢复正常. 经过实机测试,此方法处理后已 ...