Kasmember13
01-13-2009, 02:03 AM
I've been watching my program run for a little while and It wont talk to the randoms...
program New;
{.Include SRL/SRL.Scar}
Var
Say: String;
Rockcolor, Ironore, x, y: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Kasmember18';
Players[0].Pass := 'jawbreaker';
Players[0].Nick := 'Kas'; // 3-4 letters of username
Players[0].Active := True; // Is the player active?
end;
procedure Miner;
begin
Rockcolor:= 1515577 ;//Insert color here
ClearDeBug;
if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 2) then
begin
Writeln('Found Color.');
MMouse(x, y, 3, 3);
wait(1000+random(200));
if FindObjCustom(x , y, ['roc','ock'], [Rockcolor, 1581370, 1449782], 2) then
begin
Writeln('Found Rock.')
wait(1000+random(200));
MMouse(x, y, 3, 3);
ClickMouse(x, y, True);
wait(5000+random(1000));//Wait while mining
end
else
Writeln('That color was not a rock.');
end
else
Writeln('Color of rock not found.');
end;//procedure
Procedure Dropore;
begin
Ironore := BitmapFromString(29, 7, 'beNplkW1LAlEQhe1riJQspi' +
'Z6jW1RFs1305W2LCQJQSqQCkEQAiEIIgj69T1wYlgQDsMwd+5 zz8x' +
'17v66h1Kpg7CauzjPd2vFqFmO227aO5uPAurWgDolb1zNS6pI NC8m' +
'ta+X6HcTo++3ia4EZW829OFwuozrq7sGkZyjlnPEQuawUcwmU dQlc' +
'i5uHjpiJrFYBSvm0034OmsSyQ1bOU5jFQkuoA1C5+dq9LO+gk nENk' +
'VmR7IKDas8TSQ3rO9lYA4qOUSi5dxGbWG3i+7H8yUmhdU47BO Z1fW' +
'89b7sYxiyYesnR8nFAk+uHRu7x4GwRGMOw5KNb0+T72NjvyDZ r9mH' +
'6st0BaC+3sbXuwjbhtUGhJ0Gp8JqJyKr7X/tf0mNaEg=');
Repeat
if (FindBitmapToleranceIn(Ironore, x, y, 550, 200, 750, 500, 20)) then
begin
MMouse(x, y, 3, 3);
ClickMouse(x, y, False);
wait(500);
y:=y+40;
MMouse(x, y, 3, 3);
ClickMouse(x, y, True);
end;
Until(Not(FindBitmapToleranceIn(Ironore, x, y, 550, 200, 750, 499, 20)));
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
if not FindNormalRandoms then
begin
FindTalk;
end;
end;
Begin
SetupSRL;
Declareplayers;
repeat
Miner;
AntiRandoms;
Dropore;
AntiRandoms;
Until(false);
end.
program New;
{.Include SRL/SRL.Scar}
Var
Say: String;
Rockcolor, Ironore, x, y: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Kasmember18';
Players[0].Pass := 'jawbreaker';
Players[0].Nick := 'Kas'; // 3-4 letters of username
Players[0].Active := True; // Is the player active?
end;
procedure Miner;
begin
Rockcolor:= 1515577 ;//Insert color here
ClearDeBug;
if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 2) then
begin
Writeln('Found Color.');
MMouse(x, y, 3, 3);
wait(1000+random(200));
if FindObjCustom(x , y, ['roc','ock'], [Rockcolor, 1581370, 1449782], 2) then
begin
Writeln('Found Rock.')
wait(1000+random(200));
MMouse(x, y, 3, 3);
ClickMouse(x, y, True);
wait(5000+random(1000));//Wait while mining
end
else
Writeln('That color was not a rock.');
end
else
Writeln('Color of rock not found.');
end;//procedure
Procedure Dropore;
begin
Ironore := BitmapFromString(29, 7, 'beNplkW1LAlEQhe1riJQspi' +
'Z6jW1RFs1305W2LCQJQSqQCkEQAiEIIgj69T1wYlgQDsMwd+5 zz8x' +
'17v66h1Kpg7CauzjPd2vFqFmO227aO5uPAurWgDolb1zNS6pI NC8m' +
'ta+X6HcTo++3ia4EZW829OFwuozrq7sGkZyjlnPEQuawUcwmU dQlc' +
'i5uHjpiJrFYBSvm0034OmsSyQ1bOU5jFQkuoA1C5+dq9LO+gk nENk' +
'VmR7IKDas8TSQ3rO9lYA4qOUSi5dxGbWG3i+7H8yUmhdU47BO Z1fW' +
'89b7sYxiyYesnR8nFAk+uHRu7x4GwRGMOw5KNb0+T72NjvyDZ r9mH' +
'6st0BaC+3sbXuwjbhtUGhJ0Gp8JqJyKr7X/tf0mNaEg=');
Repeat
if (FindBitmapToleranceIn(Ironore, x, y, 550, 200, 750, 500, 20)) then
begin
MMouse(x, y, 3, 3);
ClickMouse(x, y, False);
wait(500);
y:=y+40;
MMouse(x, y, 3, 3);
ClickMouse(x, y, True);
end;
Until(Not(FindBitmapToleranceIn(Ironore, x, y, 550, 200, 750, 499, 20)));
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
if not FindNormalRandoms then
begin
FindTalk;
end;
end;
Begin
SetupSRL;
Declareplayers;
repeat
Miner;
AntiRandoms;
Dropore;
AntiRandoms;
Until(false);
end.