SRL Archive - SRL Archives

[Range] Setuprangestyle


JPHamlett

2009-08-24 15:19:23


function setuprangestyle(style : string):boolean;
var
j, p, h, m, tx, ty : integer;
begin
case Lowercase(style) of
'accurate': begin
j := 577; p:= 259; h := 624; m := 285;
end;
'rapid': begin
j := 658; p:= 257; h := 708; m:= 286;
end;
'longrange':begin
j:= 578; p:= 314; h := 628; m:= 340;
end;
end;
gametab(tab_Combat);
mousebox(j, p, h, m, 3);
getmousepos(tx, ty);
if GetColor(tx,ty) > 3000000 then // checks if its red therefore already selected
begin
writeln('Already selected');
exit
end else
mouse(tx, ty, 0, 0, true);
end;

very simple but should work

marpis

2009-08-24 16:29:17

How about SetFightMode(x)
x = 1 -> Accurate
x = 2 -> Rapid
x = 3 -> Long range

JPHamlett

2009-08-24 18:12:17

where is that on srl?

ian.

2009-08-24 18:21:21

From: J_Pizzle
where is that on srl?


GameTab.scar


{*******************************************************************************
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;