#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# 高并发、抢单解决思路

    高并发 高并发(High Concurrency)是互联网分布式系统架构设计中必须考虑的因素之一,它通常是指,通过设计保证系统能够同时并行处理很多请求.高并发相关常用的一些指标有响应时间(Respon ...

  2. 搜索引擎优化(SEO)解决方案

      搜索引擎优化(SEO)解决方案 在此之前,希望大家能重新审视搜索引擎,通俗来讲就是我们日常所用的百度.谷歌.搜狗.雅虎等.磨刀不误砍柴工,知己知彼,百战不殆! 一.搜索引擎是什么? 搜索引擎(Se ...

  3. (四)、vim的缓冲区、标签、窗口操作

    1.缓冲区的基本操作 a.文件与缓冲区的区别 vim file1   打开一个文件时,其实是从磁盘中读取文件到内存中,文件的内容会被加载到缓冲区中, 这个缓冲区在一个窗口上显示,所以他是一个已激活的缓 ...

  4. springboot 中yml配置

    springboot 中各种配置项纪录 1. @Value 最早获取配置文件中的配置的时候,使用的就是这个注解,SpEL表达式语言. // 使用起来很简单 @Value("${config. ...

  5. Cannot assign requested address 和 SO_REUSEADDR 参数

    1. 错误 今天项目中出现了大量的java.net.ConnectException: Cannot assign requested address (connect failed) 错误. 刚开始 ...

  6. 十个最常用的JVM 配置参数

    1.-Xms:初始堆大小.只要启动,就占用的堆大小. 2.-Xmx:最大堆大小.java.lang.OutOfMemoryError:Java heap这个错误可以通过配置-Xms和-Xmx参数来设置 ...

  7. shell编程-bash教程入门

    Shell脚本与Windows/Dos下的批处理相似,也就是用各类命令预先放入到一个文件中,方便一次性执行的一个程序文件,主要是方便管理员进行设置或者管理用的.但是它比Windows下的批处理更强大, ...

  8. 批量修改vsphere共享存储多路径选择策略

    传统方式修改存储的多路径选择策略 首先说一下传统web界面操作方式: 可以看到至少需要6次才能修改完成一个.在生产环境中一般会挂载很多FC存储,这时候就需要一个批量快捷的方式来修改. 使用Powerc ...

  9. CAP理论和BASE理论及数据库的ACID中关于一致性及不同点的思考

    CAP定理又被称作是布鲁尔定理,是加州大学伯克利分销计算机科学家里克在2000年提出,是分布式理论基础. CAP:是分布式系统的理论基础 [一致性  可用性   分区容错性] BASE理论是对CAP中 ...

  10. Net/NetCore/.NET5 ORM 六大查询体系 - SqlSugar 高级篇

    框架介绍 SqlSugar ORM是一款老牌国产ORM框架,生命力也比较顽强,从早期ORM不成熟阶段,一直存活到现在,我为什么要一直坚持,那是因为还有很多用户在使用,本来我能够较早推出新开源框架 ,可 ...