Missing an end in SetTree after case:
SCAR Code:
Procedure SetTree;
begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'copper' : begin
Rock := 5083645;
end;
'tin' : begin
Rock := 9868957;
end;
'iron' : begin
Rock := 3029075;
end;
'gold' : begin
Rock := 2344440;
end;
Text := ['ine', 'Min', 'in']
end; //HERE
end;
You always need an end when done with a case of statement.
Also, no begin end is necessary in the cases if only doing 1 thing. So it could look better like:
SCAR Code:
Procedure SetTree;
begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'copper' : Rock := 5083645;
'tin' : Rock := 9868957;
'iron' : Rock := 3029075;
'gold' : Rock := 2344440;
Text := ['ine', 'Min', 'in']
end;
end;
In AntiBan it will never do anything because you do 7+random, when the options only go up to 6. Try doing like:
SCAR Code:
Procedure AntiBan;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
Inc(AntibanUsed);
case random(7) of
0: HoverSkill('Random', false);
1: PickUpMouse;
3: BoredHuman;
4: begin
MakeCompass('N');
wait(10+random(55));
MakeCompass('S');
wait(10+random(55));
MakeCompass('N');
end;
5: RandomRClick;
6: RandomMovement;
end; //HERE
end;
Also missed an end after case. That will do something every time, because the random will pick a number 0-6, and which ever it matches it will do in the instances. If you don't want it to do anti ban every time, try increasing the randomness.
ArewestillMining should be:
SCAR Code:
Procedure AreWeStillMinning;
Var Col, Fail: Integer;
begin
if(findcolorspiraltolerance(x,y,Rock,msx1,msy1,msx2,msy2,25))then
begin //Missed begin
Col := GetColor(x,y);
repeat
wait(900+random(300));
inc(failed);
until(not(GetColor(x,y) = Col)) or Fail >= 9 .//Changed operator to >=
if Failed = 9 then
begin //Missed begin
inc(CantFind);
Antiban;
end; //Missed end
end; //Missed end
end;
Read comments. Also removed an unnecessary begin end in the repeat until.
Here:
SCAR Code:
Procedure Mine;
Begin
If (not LoggedIn) then
Exit;
MouseSpeed := RandomRange(14, 19);
SetRock;
repeat
if(FindObjTPA(x, y, Rock, 7, 2, 20, 20, 12, Text))then //Added to make sure it found the obj before proceeding
begin
GetMousePos(x,y);
Wait(50 + random(150));
if(random(8) = 1)then
begin
Mouse(x, y, 0, 0, False); //Changed to 00 so it would click in the same spot it moved the mouse to
ChooseOption('ine');
end else
Mouse(x, y, 0, 0, True); //Changed to 00 so it would click in the same spot it moved the mouse to
AreWeStillMining; //Put here because it was called either way
end;
until (Invfull);
end;
For Drop, you should ues a Booleans instead of Strings since it is true/false:
SCAR Code:
procedure Drop;
begin
Inc(LoadsDone);
if(Players[CurrentPlayer].Booleans[0])then
begin
for i:= 1 to 28 do
DropAll;
IncEx(LogsCut, 28); //Moved outside of loop so it doesn't repeat IncEx multiple times
Exit;
end;
for i:= 2 to 28 do
DropItem(i);
IncEx(LogsCut, 27);; //Also moved outside loop
end;
Much more efficient too, without all the begins/ends. Just add to the player array that Booleans instead of Strings.