Ok, I've done my best but I keep getting
[Error] (16253:1): Identifier expected, without a line so I cant find it.
And concidering that some way more experienced scripters helped you I guess you no-longer need, it. anyway, ill submit it here :P
Code:
Procedure Alch;
begin
repeat if (not(LoggedIn)) then LoginPlayer;
FindNonInventoryRandoms;
begin
if (FirstCast = true) then
begin
if (GetCurrentTab <> 7) then
begin
GameTab(7);
Wait(500 + Random(500));
if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
begin
Status('alching.');
MMouse(cx, cy, 0, 0);
wait(random(100));
if (IsUpText('ast')) then
begin
mouse(cx, cy, 0, 0, true);
FirstCast := false;
end;
end;
end;
begin
findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5);
mmouse(a + random(5), b + random(5), 0, 0);
wait(1600 + random(100));
if not findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5) then
begin
buyrings;
end else
begin
getmousepos(a, b);
mouse(a, b, 1, 1, true);
end;
checkrunes;
exp := exp + 65;
counter:= counter + 1;
progress;
end;
end;
end;
end;
EDIT: error came from this piece of code :
"repeat if (not(LoggedIn)) then LoginPlayer;"
The rest seems to work fine.
EDIT2:
ow, i took a look at what Wizup wrote, and I think that matches better what you are looking for, you wrote the same as me however,
and "if (not(LoggedIn)) then LoginPlayer;" works fine, something wrong with repeat statement :S
EDIT3: Changed "repeat" by "while (true) do" and it works, here's what i have now:
Code:
Procedure Alch;
begin
while (true) do
begin
if (not(LoggedIn)) then LoginPlayer;
FindNonInventoryRandoms;
begin
if (FirstCast = true) then
begin
if (GetCurrentTab <> 7) then
begin
GameTab(7);
Wait(500 + Random(500));
if FindDTM(HAlchDTM, cx, cy, 559, 336, 583, 360) then
begin
Status('alching.');
MMouse(cx, cy, 0, 0);
wait(random(100));
if (IsUpText('ast')) then
begin
mouse(cx, cy, 0, 0, true);
FirstCast := false;
end;
end;
end;
begin
findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5);
mmouse(a + random(5), b + random(5), 0, 0);
wait(1600 + random(100));
if not findcolortolerance(a, b, 1749707, 555, 213, 722, 453, 5) then
begin
buyrings;
end else
begin
getmousepos(a, b);
mouse(a, b, 1, 1, true);
end;
checkrunes;
exp := exp + 65;
counter:= counter + 1;
progress;
end;
end;
end;
end;
end;
That should work fine I think.