
Originally Posted by
J_Pizzle
where is that on srl?
GameTab.scar
SCAR Code:
{*******************************************************************************
function SetFightMode(oFightMode: Integer): Boolean;
By: Nielsie95, Nava2
Description: Sets fight mode. Returns false if failed to set desired mode.
*******************************************************************************}
function SetFightMode(oFightMode: Integer): Boolean;
var
i, x, y: Integer;
b: TBox;
cmbBoxes: array of TBox;
begin
Result := False;
if not(Loggedin)then Exit;
GameTab(tab_Combat);
Wait(200 + Random(100));
cmbBoxes := [IntToBox(575, 255, 630, 290), IntToBox(660, 255, 710, 290),
IntToBox(575, 310, 630, 345), IntToBox(660, 310, 710, 345)];
b := cmbBoxes[oFightMode - 1];
if (not FindColorTolerance(x, y, 5527896, b.x1, b.y1, b.x2, b.y2, 2)) and (oFightMode = 4) then
b := cmbBoxes[2];
i := 0;
while (i < 4) do
begin
Result := FindColorTolerance(x, y, 1777020, b.x1, b.y1, b.x2, b.y2, 2);
if (Result) then Exit;
Mouse(RandomRange(b.x1, b.x2), RandomRange(b.y1, b.y2), 0, 0, True);
Wait(500 + Random(300));
Inc(i);
end;
end;