Trove自动钓鱼脚本(国际服
#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
}
}
Trove自动钓鱼脚本(国际服的更多相关文章
- SQL Server镜像自动生成脚本
SQL Server镜像自动生成脚本 镜像的搭建非常繁琐,花了一点时间写了这个脚本,方便大家搭建镜像 执行完这个镜像脚本之后,最好在每台机器都绑定一下hosts文件,不然的话,镜像可能会不work 1 ...
- 企业IT管理员IE11升级指南【15】—— 代理自动配置脚本
企业IT管理员IE11升级指南 系列: [1]—— Internet Explorer 11增强保护模式 (EPM) 介绍 [2]—— Internet Explorer 11 对Adobe Flas ...
- mysql 自动备份和nginx自动安装脚本
一.自动备份Mysql脚本: 如下脚本为mysql自动备份脚本,仅供参考,可以根据实际情况修改. #!/bin/sh #auto backup mysql #wugk #Define PATH定义变量 ...
- Windows环境下Oracle数据库的自动备份脚本
批处理文件(.bat) @echo off echo ================================================ echo Windows环境下Oracle数据 ...
- 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 ...
- 做了一个简易的git 代码自动部署脚本
做了一个简易的git 代码自动部署脚本 http://my.oschina.net/caomenglong/blog/472665 发表于2个月前(2015-06-30 21:08) 阅读(200 ...
- 使用php作linux自动执行脚本
使用php作linux自动执行脚本 [来源] 达内 [编辑] 达内 [时间]2013-03-21 在作社区时, 时常需要统计上线人数等数据. 一般做法是, 把这段代码放在用户 login或者 ...
- 【LVM】LVM自动扩容脚本
概要说明: /dev/mapper/vg0-data挂载在目录/data下: 当新增物理磁盘时,需要自动对/dev/mapper/vg0-data磁盘时进行扩容(自动化脚本): 当新增物理磁盘时,自动 ...
- Iptables DDOS/CC 自动屏蔽脚本
Iptables DDOS/CC 自动屏蔽脚本 May 20, 2013 最近不停地被 CC (DDOS的一种)频繁干扰,分享一个 iptables 屏蔽 DDOS 的脚本.让 crond 每分钟运行 ...
随机推荐
- CountDownLatch深度剖析
场景引入 日常开发中,有个需求,要求主线程开启多个线程去并行执行任务,并且主线程需要等待所有的子线程执行完成后进行汇总.我们很容易找到 jion()方法来实现这个功能 缺点:由于工作中,我们不会直接创 ...
- ubuntu安装nfs服务
安装: sudo apt-get install nfs-kernel-server 修改配置文件 /etc/exports 增加以下内容: /NFS *(rw,sync,no_root_squash ...
- package和import机制
package是Java中的包机制,包机制的作用是方便为了程序的管理.不同功能的类机制分别存放在不同的包下面.(按照功能划分,不同的包有着不同的性质) package怎么使用:package是一个关键 ...
- 什么是CDN?哪些是流行的jQuery CDN?使用CDN有什么好处?
内容传送网络或内容分发网络(CDN)是部署在因特网上的多个数据中心的大型分布式服务器系统.CDN的目标是为具有高可 用性和高性能的最终用户提供内容. 有3个流行的jQuery CDN:谷歌,微软jQu ...
- PHPer 面试
A:怎么保证促销商品不会超卖? 答:这个问题是我们当时开发时遇到的一个难点,超卖的原因主要是下的订单的数目和我们要促销的商品的数目不一致导致的,每次总是订单的数比我们的促销商品的数目要多,当时我们的小 ...
- 数据库(MySQL)最新版8.0安装教程,小白都能学会安装
首先打开数据库官网 接下来点击不用登录注册 下载好软件,双击运行程序(中间不需要点击其他,等他运行好) 点击安装服务端 ,然后点击下一步 选择自己安装目录(一定要牢记)这里我选择默认目录,点击下一步 ...
- shell脚本学习之6小时搞定(1)
shell脚本学习之6小时搞定(1) 简介 Shell是一种脚本语言,那么,就必须有解释器来执行这些脚本. Unix/Linux上常见的Shell脚本解释器有bash.sh.csh.ksh等,习惯上把 ...
- 用python+sklearn(机器学习)实现天气预报 准备
用python+sklearn机器学习实现天气预报 准备 项目地址 系列教程 0.流程介绍 1. 环境搭建 a.python b.涉及到的机器学习相关库 sklearn panda seaborn j ...
- 如何实现一个简易版的 Spring - 如何实现 Constructor 注入
前言 本文是「如何实现一个简易版的 Spring」系列的第二篇,在 第一篇 介绍了如何实现一个基于 XML 的简单 Setter 注入,这篇来看看要如何去实现一个简单的 Constructor 注入功 ...
- 【SpringBoot】Spring Boot 集成SwaggerAPI
Spring Boot 集成SwaggerAPI 文章目录 Spring Boot 集成SwaggerAPI Swagger 添加依赖 配置类 config 控制类 controller 接口测试 页 ...