http://i.imgur.com/JKTAb.png
Clicks the 3rd box (lunge) when I requested 4th (block). Don't know what the issue is or if it's a PEBKAC or a bug, but just thought I'd throw it out there..
Printable View
http://i.imgur.com/JKTAb.png
Clicks the 3rd box (lunge) when I requested 4th (block). Don't know what the issue is or if it's a PEBKAC or a bug, but just thought I'd throw it out there..
I fixed this long time ago, but I saw some discussion on some other thread, and someone "fixed" it again, maybe this is result of that?
I modified it, then cohen went back to change the GetColor. I feel that the color isn't constant or anything, needs a permanent fix
.. but Fre had already fixed it?
Why did someone modify it again?
The colour in the edit I posted in Fawki's thread in Members was constant.
Simba Code:{function SetFightMode(oFightMode: Integer): Boolean;
By: Nielsie95 & Nava2, fixed by Quickmarch, fixed by Rich
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: TBoxArray;
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(GetColor(657, 345) = 5791325)) 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;
Problem still occurs with R1ch's function for me
Works for meSimba Code:function SetFightMode(FightMode : Integer): Boolean;
var
Boxes : TBoxArray;
Box : TBox;
X, Y, I : Integer;
begin
Result := False;
if not LoggedIn then Exit;
GameTab(tab_Combat);
Boxes := [IntToBox(567, 250, 636, 295), IntToBox(651, 250, 818, 295),
IntToBox(567, 303, 636, 348), IntToBox(651, 303, 818, 348)];
Box := Boxes[FightMode-1];
if FightMode = 4 then
if GetColor(657, 345) <> 5791325 then
Box := Boxes[2];
for I := 0 to 3 do
begin
Result := FindColorTolerance(X, Y, 2106252, Box.X1, Box.Y1, Box.X2, Box.Y2, 10);
if Result then Break;
Mouse(RandomRange(Box.x1, Box.x2), RandomRange(Box.y1, Box.y2), 0, 0, True);
WriteLn(CountColorTolerance(2106252, Box.X1, Box.Y1, Box.X2, Box.Y2, 10));
Wait(500+Random(300));
end;
end;
^ That doesn't work for me. =\ Why is this part even in the function?
Simba Code:if (not(GetColor(662, 336) = 1974407)) and (oFightMode = 4) then
b := cmbBoxes[2];
Ah okay. I'll work on this now then, thanks. :)
E: Fixed. Instead of getting rid of that part, I have it check for the text color instead. Does anyone know if there's a weapon that doesn't have "Block" as the defence attack style? If there is, may have to change it to a FindColor rather than GetColor.
I prefer findcolor, GetColor can easily break from a single pixel shift..