Below is the Blue Eye Macro code for my Rift fishing assistant. So far it will catch the fish, but the looping capability is lacking. So if I initiate the macro, it will cast and reel as many times as needed to catch a single fish, but then the macro must be disabled and re-enabled. Feel free to use this (you'll have to modify with your own RGB values), and if you want you can tell me where I went wrong with the looping action
Note: This code was inspired by leandrol9 from this board, pieces of the code are taken almost directly from there. Thanks leandrol9!
Code:
begin
//I thought the variable always being less than 2 would keep it looping, but alas it doesn't
Variable.Set("count", "1")
while Variable.Is less than (Math)("count", "2")
begin
Function.Execute("CastIt")
when Color.At coordinate is within (RGB range)("213", "213", "2", "4", "41", "879")
begin
Function.Execute("JerkIt")
end
if Color.At coordinate is within (RGB range)("213", "213", "2", "4", "41", "879")
begin
when Color.At coordinate is within (RGB range)("213", "213", "2", "4", "41", "859")
begin
Function.Execute("JerkIt")
end
end
if Color.At coordinate is within (RGB range)("213", "213", "2", "4", "41", "879")
begin
if Color.At coordinate is within (RGB range)("213", "213", "2", "4", "41", "859")
begin
when Color.At coordinate is within (RGB range)("213", "213", "2", "4", "41", "839")
begin
Function.Execute("JerkIt")
end
end
end
end
end
function("JerkIt")
begin
Keyboard.Press key("1")
Macro.Pause("50")
Keyboard.Release keys("1")
Macro.Pause("500")
end
function
function("CastIt")
begin
Mouse.Move to coordinate("974", "451")
Macro.Wait for current global loop execution time to exceed("725")
Function.Execute("JerkIt")
Macro.Pause("450")
Mouse.Hold button("left")
Mouse.Move to coordinate("974", "451")
Mouse.Release button("left")
Macro.Pause("50")
end
function
---------- Post added at 11:01 PM ---------- Previous post was at 09:18 PM ----------
Got it. It ain't pretty but it's been working for a while now with no real flaws.
Code:
begin
Variable.Set("count", "1")
while Variable.Is less than (Math)("count", "4")
begin
Function.Execute with timeout("Fishing", "25000")
end
end
function("Fishing")
begin
Function.Execute("CastIt")
when Color.At coordinate is within (RGB range)("213", "213", "2", "10", "41", "879")
begin
Function.Execute("JerkIt")
end
if Color.At coordinate is within (RGB range)("213", "213", "2", "10", "41", "879")
begin
when Color.At coordinate is within (RGB range)("213", "213", "2", "10", "41", "859")
begin
Function.Execute("JerkIt")
end
end
if Color.At coordinate is within (RGB range)("213", "213", "2", "10", "41", "879")
begin
if Color.At coordinate is within (RGB range)("213", "213", "2", "10", "41", "859")
begin
when Color.At coordinate is within (RGB range)("213", "213", "2", "10", "41", "839")
begin
Function.Execute("JerkIt")
end
end
end
end
function
function("JerkIt")
begin
Macro.Pause("50")
Keyboard.Press key("1")
Macro.Pause("50")
Keyboard.Release keys("1")
Macro.Pause("300")
end
function
function("CastIt")
begin
Macro.Wait for current global loop execution time to exceed("52")
Mouse.Move to coordinate("974", "451")
Macro.Wait for current global loop execution time to exceed("468")
Function.Execute("JerkIt")
Macro.Pause("450")
Mouse.Hold button("left")
Macro.Wait for current global loop execution time to exceed("556")
Mouse.Move to coordinate("974", "451")
Mouse.Release button("left")
Macro.Pause("7000")
end
function