begin
Macro.Pause("1000")
if Color.At coordinate is not within (RGB range)("246", "171", "185", "5", "613", "83")
// detect mob window hp bar at about 1%, u need to set your coordinate depend on your resolutions.
begin
Memory.Get value("_Launcher", "_Launcher.exe+862E70,C,8", "4", "currentMP")
Memory.Get value("_Launcher", "_Launcher.exe+862E70,C,4C", "4", "maxMP")
Macro.Pause("250")
Variable.Evaluate (Math)("({currentMP} / {maxMP}) * 100", "percentageMP")
if Variable.Is less than (Math)("percentageMP", "20")
// Rest below 20% Mp
begin
Keyboard.Press key("0")
// sitdown
Macro.Pause("50")
Keyboard.Release keys("0")
Macro.Pause("3000")
end
Keyboard.Press key("9")
// pick up item
Macro.Pause("50")
Keyboard.Release keys("9")
Macro.Pause("1000")
Keyboard.Hold keys("{<tab>}")
// next target
Macro.Pause("50")
Keyboard.Release keys("{<tab>}")
end
Keyboard.Hold keys("1")
// attack skill
Macro.Pause("50")
Keyboard.Release keys("1")
Macro.Pause("1500")
Keyboard.Hold keys("2")
// spell skill
Macro.Pause("50")
Keyboard.Release keys("2")
Macro.Pause("1500")
Keyboard.Hold keys("3")
// spell skill
Macro.Pause("50")
Keyboard.Release keys("3")
Macro.Pause("1000")
Memory.Get value("_Launcher", "_Launcher.exe+862E70,C,4", "4", "currentHP")
Memory.Get value("_Launcher", "_Launcher.exe+862E70,C,48", "4", "maxHP")
Macro.Pause("250")
Variable.Evaluate (Math)("({currentHP} / {maxHP}) * 100", "percentage")
if Variable.Is between (Math)("percentage", "31", "50")
// heal spell below 50% hp
begin
Keyboard.Hold keys("{<F1>}")
Macro.Pause("50")
Keyboard.Release keys("{<F1>}")
Macro.Pause("1000")
Keyboard.Hold keys("4")
Macro.Pause("100")
Keyboard.Release keys("4")
Macro.Pause("500")
Keyboard.Hold keys("{<esc>}")
Macro.Pause("100")
Keyboard.Release keys("{<esc>}")
end
Memory.Get value("_Launcher", "_Launcher.exe+862E70,C,4", "4", "currentHP")
Memory.Get value("_Launcher", "_Launcher.exe+862E70,C,48", "4", "maxHP")
Macro.Pause("250")
Variable.Evaluate (Math)("({currentHP} / {maxHP}) * 100", "percentage")
if Variable.Is less than (Math)("percentage", "30")
// heal spell below 30% hp
// detect hp bar at your presetted coordinate and do a heal skill
begin
Keyboard.Hold keys("{<F1>}")
Macro.Pause("50")
Keyboard.Release keys("{<F1>}")
Macro.Pause("500")
Keyboard.Hold keys("5")
Macro.Pause("100")
Keyboard.Release keys("5")
Macro.Pause("2500")
Keyboard.Hold keys("5")
Macro.Pause("100")
Keyboard.Release keys("5")
Macro.Pause("2500")
Keyboard.Hold keys("{<esc>}")
Macro.Pause("100")
Keyboard.Release keys("{<esc>}")
end
while Color.At coordinate is within (RGB range)("157", "152", "140", "3", "935", "375")
begin
Speech.Say("war ning", "yes")
Speech.Say("war ning", "yes")
Speech.Say("war ning", "yes")
Speech.Say("the capcha pop up is on screen", "yes")
end
end
figuring out how to integrate OCR into my bot
I am not too good at coding.