Procedure GetMenu(var ErrorMsg: String; var Error: Boolean; x, y, dx, dy, px, py, nx, ny, Option, SubOption, Chars: Integer; Name: String; Progress, Stamina: Boolean); var xx, m, yy, rep: Integer; begin MoveMouseSmooth(x, y); Wait(300); if not(IsTextAtFromMouse(15, 4, Chars, Name))then begin ErrorMsg := 'Error: Could not find Object! Please edit your constants'; Error := True; exit; end; while not(IsTextAtFromMouse(-4 ,-14, Chars, Name))do begin ClickMouse(x, y, False); Wait(200); end; while not(IsTextInAreaEx(x, y, dx - 20, dy - 20, xx, yy, 'this?', 0, Chars, False, False, 0, 1, $FFFFFF))do Wait(100); WriteLn(IntToStr(xx) + ' ' + IntToStr(yy)); xx := 0; yy := xx; MoveMouse(x, y + 6); Wait(100); while(FindColorTolerance(xx, yy, 16777215, x + m, y, x + m, y + 2, 0))do m := m + 10; GetMousePos(x, y); Option := Option - 1; MoveMouseSmooth(x, y + (Option * 16)); Wait(100); GetMousePos(x, y); if not(SubOption = 0)then begin SubOption := SubOption - 1; MoveMouse(x + m + 10, y); Wait(100); GetMousePos(x, y); MoveMouseSmooth(x, y + (SubOption * 16)); Wait(100); GetMousePos(x, y); end; if(Progress)then while(GetColor(px, py) = 13408665)do Wait(100); if(Stamina)then while not(FindColorTolerance(xx, yy, 3644729, nx, ny , nx, ny + 1, 50))do Wait(100); ClickMouse(x, y, True); if(Progress)then begin while(FindColor(x, y, 2694943, px, py, px, py))and(rep < 10)do begin wait(500); rep := rep + 1; end; end; end;