Skip to content

Instantly share code, notes, and snippets.

@addohm
Created June 1, 2020 08:54
Show Gist options
  • Save addohm/dec2fef3c811184833750eb3cab9a8b2 to your computer and use it in GitHub Desktop.
Save addohm/dec2fef3c811184833750eb3cab9a8b2 to your computer and use it in GitHub Desktop.
BEM Node Finder Macro
begin
//
// ==========Set below RGB Values using the Investigate Tool for the current environment==========
//
// Feather Color Setting
Variable.Set("nodeR", "255")
Variable.Set("nodeG", "205")
Variable.Set("nodeB", "24")
Variable.Set("nodeD", "10")
Variable.Set("mapCenterX", "1810")
Variable.Set("mapCenterY", "116")
//
// ==========There should be no need to alter anything below==========
// ==========Main==========
//
Variable.Set("Node Found", "false")
Function.Execute("Setup")
// Look for a node
Function.Execute("Find Map Node")
begin loop()
Function.Execute("Find Map Node")
if Variable.Is equal to("Node Found", "true")
begin
Function.Execute("Broadcast Find")
end
end
end
//
// ==========Functions==========
//
function("Setup")
begin
Window.Wait for window to be top most("World of Warcraft", "yes")
Window.Get size("World of Warcraft", "yes", "gameX", "gameY")
Window.Get location("World of Warcraft", "yes", "no", "windowX", "windowY")
Macro.Pause("3500")
end
function
function("Find Map Node")
begin
if Color.Near coordinate is within (RGB range)("{nodeR}", "{nodeG}", "{nodeB}", "{nodeD}", "{mapCenterX}", "{mapCenterY}", "35")
begin
Variable.Set("Node Found", "true")
end
end
function
function("Broadcast Find")
begin
Speech.Say("Node Found", "yes")
Variable.Set("Node Found", "false")
end
function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment