
Originally Posted by
Pentti
Oh ok, I think you forget an "end;" somewhere.
Could be
.. I think it could be in my mining procedure but im a bit confused atm. And Pentti tnx a lot for quick reactions.
Here are some procedures that are needed for the mining procedure:
SCAR Code:
procedure CheckPick;
begin
if(FindPick)then
begin
// if(FearlessDebug)then Writeln('Found pickaxe.');
end else
begin
Writeln('Can''t Find(useable)Pick');
Writeln('Switching to next player.');
Players[CurrentPlayer].loc:= 'NoPick';
PlayerProgressReport;
NextPlayer(False);
end;
end;
SCAR Code:
procedure CheckFight;
begin
if(FindFight)then
begin
RunAwayDirection(RunDir);
wait(13000);
RunBack;
FightsPlayer:= FightsPlayer+1;
FightsTotal:= FightsTotal+1;
end;
end;
SCAR Code:
procedure CheckGas;
begin
if(GasColors(gx, gy))then
begin
GassesPlayer:= GassesPlayer+1;
GassesTotal:= GassesTotal+1;
end;
end;
SCAR Code:
function FindFastRandoms: Boolean; //Credits to: WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 10 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := False;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: If RC Then
Result := True;
9: if FindTalk then
Result := True;
{10: If HandleTrade Then
Result := True; }
end;
wait(1);
end;
end;
SCAR Code:
procedure FckRandoms;
begin
FindNormalRandoms;
FindFastRandoms;
end;
Few that's all I think now the mining procedure:
SCAR Code:
procedure MineCoal;
var
MCMark1, MCMark2: integer;
begin
Tries:= 0;
repeat
CheckFight; //Fight
if(FindObjOre2(x, y, 'ine', CoalColor1, CoalTol1, 4))or
(FindObjOre2(x, y, 'ine', CoalColor2, CoalTol2, 4))or
(FindObjOre2(x, y, 'ine', CoalColor3, CoalTol3, 4))or
(FindObjOre2(x, y, 'ine', CoalColor4, CoalTol4, 4))then
begin
MMouse(x, y, 3, 3)
CheckGas; //Gas
wait(50+random(100));
end else
begin
Tries:= Tries+1;
end;
until(IsUpTextMulti('ine','ock','Mine'))or
(Tries= 50)
if(Tries= 50)then
begin
Writeln('Couldn''t find the Coal Ore.')
Players[CurrentPlayer].loc:= 'Failed FindCoal'
PlayerProgressReport;
NextPlayer(False);
end;
if(IsUpTextMulti('ine','ock','Mine'))then
begin
if(Random(20) < 17)then
begin
Mouse(x, y, 0, 0, true);
Flag;
if(InChat('no ore curr'))then
begin
FckRandoms;
MineCoal;
end;
MarkTime(MCMark1);
end;
repeat
CheckGas; //Gas;
CheckPick;
wait(50);
FckRandoms; //Anti-Randoms
wait(50);
CheckPick; //PickAxe
wait(50);
FindFight; //Fight;
until(InChat('ou manage'))or
(TimeFromMark(MCMark1 >= MineCoalTime{*1000}))
end else
begin
Mouse(x, y, 0, 0, false);
ChooseOption(x, y, 'Mine');
Flag;
if(InChat('no ore curr'))then
begin
FckRandoms;
MineCoal;
end;
MarkTime(MCMark2);
repeat
// CheckGas; //Gas;
CheckPick;
wait(50);
FckRandoms; //Anti-Randoms
wait(50);
CheckPick; //PickAxe
wait(50);
FindFight; //Fight;
until(InChat('ou manage'))or
(TimeFromMark(MCMark2 >= MineCoalTime{*1000}))
if(InChat('ou manage'))then
begin
// if(FearlessDebug)then Writeln('Mined a Coal Ore');
OresMinedPlayer:= OresMinedPlayer+1;
OresMinedTotal:= OresMinedTotal+1;
end;
if(TimeFromMark(MCMark2) >= MineCoalTime{*1000})then
begin
Writeln('It took to long to mine the Coal Ore.');
Writeln('Switching to next player.');
Players[CurrentPlayer].loc:= 'Failed MineCoal';
PlayerProgressReport;
NextPlayer(False);
end;
end;
end;
Maybe you can find it?? Cuz I'm not really sure where to place an end cuz with all the repeats 
And BTW Don't even think about stealing this!!!!!
(Not rlly talking to you pentti cuz I doubt it hardly if you gonna steal it
)