Last active
December 12, 2022 13:32
-
-
Save addohm/29a9e829eb0e9f7441de96669a9d86fd to your computer and use it in GitHub Desktop.
Auto Fishing Macro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #showtooltip Fishing | |
// /use Shiny Bauble | |
// /use 16 | |
// /click StaticPopup1Button2 | |
// /stopspelltarget | |
// /cast fishing | |
begin | |
// | |
// ==========Set below RGB Values using the Investigate Tool for the current environment========== | |
// | |
// Feather Color Setting | |
Variable.Set("featherR", "100") | |
Variable.Set("featherG", "40") | |
Variable.Set("featherB", "35") | |
Variable.Set("featherD", "12") | |
// Bobber\Cork Color Setting | |
Variable.Set("bobberR", "155") | |
Variable.Set("bobberG", "140") | |
Variable.Set("bobberB", "155") | |
Variable.Set("bobberD", "14") | |
// Splash Color Setting | |
Variable.Set("splashR", "255") | |
Variable.Set("splashG", "255") | |
Variable.Set("splashB", "255") | |
Variable.Set("splashD", "20") | |
// | |
// ==========There should be no need to alter anything below========== | |
// ==========Main========== | |
// | |
Variable.Set("Bobber Found", "false") | |
Variable.Set("Splash Found", "false") | |
Function.Execute("Setup and Cast") | |
// Find the red feather | |
Function.Execute("Find Red Feather") | |
begin loop() | |
Function.Execute("Failsafe Check") | |
// Find the bobber | |
Function.Execute("Find Bobber") | |
if Variable.Is equal to("Bobber Found", "true") | |
begin | |
begin loop() | |
// Look for splash | |
Function.Execute("Find Splash") | |
if Variable.Is equal to("Splash Found", "true") | |
begin | |
Function.Execute("Catch Fish") | |
end | |
Function.Execute("Failsafe Check") | |
end | |
end | |
end | |
end | |
// | |
// ==========Functions========== | |
// | |
function("Setup and Cast") | |
begin | |
Window.Wait for window to be top most("World of Warcraft", "yes") | |
Window.Get size("World of Warcraft", "yes", "windowX", "windowY") | |
Macro.Pause("3000") | |
// Move the mouse out of the way | |
Mouse.Set coordinate("1", "1") | |
// Cast the lure | |
Keyboard.Press key("9") | |
Macro.Pause("3000") | |
end | |
function | |
function("Failsafe Check") | |
begin | |
if Macro.Execution time of current global loop has exceeded("30000") | |
begin | |
Macro.Restart("True") | |
end | |
end | |
function | |
function("Find Red Feather") | |
begin | |
Color.Find coordinate of occurrence on screen closest to coordinate (RGB)("{featherR}", "{featherG}", "{featherB}", "{featherD}", "960", "440", "x", "y") | |
Mouse.Set coordinate("{x}", "1") | |
end | |
function | |
function("Find Bobber") | |
begin | |
if Color.Near coordinate is within (RGB range)("{bobberR}", "{bobberG}", "{bobberB}", "{bobberD}", "{x}", "{y}", "45") | |
begin | |
// Move the mouse to show that the bobber has been found | |
Variable.Set("yOffset", "{y}") | |
Variable.Add (Math)("yOffset", "100") | |
Mouse.Set coordinate("{x}", "{yOffset}") | |
Variable.Set("Bobber Found", "true") | |
end | |
end | |
function | |
function("Find Splash") | |
begin | |
if Color.Near coordinate is within (RGB range)("{splashR}", "{splashG}", "{splashB}", "{splashD}", "{x}", "{y}", "45") | |
begin | |
Variable.Set("Splash Found", "true") | |
end | |
end | |
function | |
function("Catch Fish") | |
begin | |
Mouse.Set coordinate("{x}", "{y}") | |
Mouse.Set coordinate("{x}", "{y}") | |
Macro.Pause("500") | |
Mouse.Click("Right") | |
Mouse.Click("Right") | |
Macro.Pause("2000") | |
Macro.Restart("True") | |
end | |
function | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How i can use that? i don't know , you can explain?