SCAR Code:
function SetFightMode(oFightMode: Variant): Boolean;
var
i, x, y, r: Integer;
b: TBox;
cmbBoxes: array of TBox;
strs: array of array of String;
begin
if not(Loggedin)then Exit;
GameTab(1);
Wait(200 + Random(777));
cmbBoxes := [IntToBox(575, 255, 630, 290), IntToBox(660, 255, 710, 290), IntToBox(575, 310, 630, 345), IntToBox(660, 310, 710, 345)];
strs := [TStringArray('attack', 'att'), TStringArray('strength', 'str'), TStringArray('controlled', 'control', 'ctrl', 'multi'), TStringArray('defence', 'def', 'defense')];
try oFightMode := LowerCase(oFightMode); except end;
case VarType(oFightMode) of
3: begin b := cmbBoxs[oFightMode - 1]; r := oFightMode; end;
256: for x := 0 to 3 do
begin
i := High(strs[x]);
for y := 0 to i do
if oFightMode = strs[x][y] then
begin
b := cmbBoxes[x];
r := x + 1;
Break;
end;
if b.x1 <> 0 then Break;
end;
end;
i := 0;
while (i < 4) and (not FindColorTolerance(x, y, 1777020, b.x1, b.y1, b.x2, b.y2, 2)) do
begin
Mouse(RandomRange(b.x1, b.x2), RandomRange(b.y1, b.y2), 0, 0, True);
Wait(200 + Random(300));
Inc(i);
end;
Result := FindColorTolerance(x, y, 1777020, b.x1, b.y1, b.x2, b.y2, 2);
if (not Result) and (r = 4) then
SetFightMode(3);
end;