Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- ;==================================================================
- ;TORCHLIGHT 2 FISHING AHK SCRIPT BY WIKING
- ;V0.8 - working
- ;efficiency:
- ;~8/10 fishes during day/night
- ;~7/10 fishes during transition time when shadows move
- ;controls:
- ;F5 to start fishing
- ;P hold for 5s+ to stop fishing
- ;F6 to start/stop color and coordinate find
- ;F7 to copy color and coordinate values to clipboard
- ;==================================================================
- ;**************************************************************
- ;***********************Fishing Script*************************
- F5::
- loop {
- PixelSearch, Px, Py, 780, 493, 811, 539, 0x80798F, 20, Fast ;search box coordinates go here x1, y1, x2, y2, color, shades, speed
- GetKeyState, state, P
- if state = D
- {
- ToolTip
- break
- }
- else{
- if ErrorLevel
- {
- ToolTip SEARCHING
- MouseMove, 955, 444 ;clicks on the fishing hole
- Sleep 200
- Send, {LButton down}
- Sleep 100
- Send, {LButton up}
- Sleep 200
- }
- else
- {
- ToolTip MATCH
- sleep 20
- MouseMove, 1680/2, 1050/2 ;clicks on the centre of the screen, aka catch fish
- Sleep 40
- Send, {LButton down}
- Sleep 40
- Send, {LButton up}
- Sleep 100
- MouseMove, 955, 444 ;clicks on the fishing hole
- Sleep 3000
- Send, {LButton down}
- Sleep 100
- Send, {LButton up}
- Sleep 100
- }
- }
- }
- return
- ;**************************************************************
- ;***********************Get Color**************************
- ;F6 = Start stop Color Detection
- ;F7 = Copy currently color to clipboard
- ;***********************************************************
- #MaxThreadsPerHotkey 2
- F6::
- Toggle := !Toggle
- While Toggle {
- MouseGetPos Xpos, Ypos
- PixelGetColor Colour, %Xpos%, %Ypos%, RGB
- StringTrimLeft Colour, Colour, 2 ; Remove 0x
- ToolTip %Colour% X%Xpos% Y%Ypos%
- }
- ToolTip
- Return
- F7::
- StringTrimLeft Colour, Colour, 2 ; Remove 0x
- Clipboard = %Colour% X%Xpos% Y%Ypos%
- ToolTip Copied to the clipboard:`n%Colour% X%Xpos% Y%Ypos%
- Sleep 3000
- ToolTip %Colour%
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement