begin Color.Limit area of interest to window("Ragnarok", "yes") Window.Bring to front("Ragnarok", "No") Window.Set location("Ragnarok", "yes", "0", "0") Function.Execute("AutoPots") end function("AutoPots") begin if Color.At coordinate is (RGB)("206", "206", "214", "159", "82") and Color.At coordinate is (RGB)("189", "66", "49", "240", "48") and Color.At coordinate is (RGB)("156", "181", "231", "155", "140") begin Keyboard.Press key("{}") if Color.At coordinate is (RGB)("156", "173", "222", "168", "83") or Color.At coordinate is (RGB)("165", "189", "231", "768", "489") or Color.At coordinate is not (RGB)("214", "222", "222", "168", "189") begin Macro.Break from loop("yes") end end function