marpis
2009-06-01 17:08:50
writeln('FightMode = '+inttostr(m+1));
SetFightMode(m+1);
In the debug i get:
FightMode = 1
but it won't change fightmode, just moves the mouse to the upper left corner
-_-'
2009-06-01 17:08:50
writeln('FightMode = '+inttostr(m+1));
SetFightMode(m+1);
FightMode = 1
2009-06-01 17:11:41
2009-06-01 17:25:20
From: Hermen
Drag the crosshair on the client.
Restart scar, if you use smart, restart smart.
2009-06-01 17:25:56
2009-06-01 17:46:47
{*******************************************************************************
function SetFightMode(oFightMode: Integer): Boolean;
By: Nielsie95, Quickmarch, Timer, and Nava2
Description: Sets fight mode. Returns false if failed to set desired mode.
*******************************************************************************}
function SetFightMode(oFightMode: Variant): Boolean;
var
i, x, y, r: Integer;
b: TBox;
cmbBoxes: array of TBox;
strs: array of array of String;
begin
Result := False;
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'])];
case VarType(oFightMode) of
3: begin b := cmbBoxes[Integer(oFightMode) - 1]; r := oFightMode; end;
256: for x := 0 to 3 do
begin
i := High(strs[x]);
for y := 0 to i do
if Lowercase(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) 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;
if (not Result) and (r = 4) then
SetFightMode(3);
end;
2009-06-02 01:51:24
2009-06-02 05:46:06
From: Narcle
Only problem I don't like with that function is it uses high trust that all weapons have that setup (att, str, con, def) when they don't. Good thing its Boolean now tho.
2009-06-02 05:49:39
2009-06-02 06:15:09
2009-06-02 06:19:35
From: noidea
The old one had a fail safe for Range, and weapons with only 3 options.
2009-06-02 06:53:56
2009-06-02 07:55:25
2009-06-02 16:25:16
From: Narcle
Well I'm going to figure something out for this. I know I had a nice one that u put in SRL I've heard some problems with it but maybe thats just me. I want to get a fool proof one somehow.
2009-06-03 02:47:24
From: Nava2
We should create a function that will I identify the layout, then just use that to create the boxes.