SRL Archive - S.M.A.R.T. Questions and Answers.

S.M.A.R.T Troubles


Kasmember13

2009-01-13 19:24:05

Line 7: [Error] (16216:11): Duplicate identifier 'MOVEMOUSE' in script

It opens a new tab, Smart.Scar and goes to this line.

[B]procedure MoveMouse(x, y: Integer);
[/B]
begin
SmartMoveMouse(x, y);
end;


Cazax

2009-01-13 19:30:29

Put {.include SRL/SRL/Misc/SMART.scar} before including SRL.

Kasmember13

2009-01-13 19:33:55

:) Rep+!!!!

Kasmember13

2009-01-13 19:57:15

I got it to load up and every thing but…
It won't actually work and click on stuff even tho It can locate it and move the dot over it.

It goes and looks for the rock then the mouse appears and it stops working.

program New;
{.Include SRL/SRL/Misc/Smart.scar}
{.Include SRL/SRL.Scar}



Var

Rockcolor, Ironore, i, x, y: Integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'Kasmember';
Players[0].Pass := 'dont type my password';
Players[0].Nick := 'smem'; // 3-4 letters of username
Players[0].Active := True; // Is the player active?

end;



procedure Miner;
begin

Rockcolor:= 2240595 ;//Insert color here

ClearDeBug;
if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 5) then
begin
Writeln('Found Color.');
MMouse(x, y, 3, 3);
wait(1000+random(200));
if FindObjCustom(x , y, ['roc','ock'], [Rockcolor, 1515576, 1647164], 5) then
begin
Writeln('Found Rock.')
wait(1000+random(200));
MMouse(x, y, 3, 3);
ClickMouse(x, y, True);
repeat
i:=i+1;
Wait(500);
Until(FindBlackChatMessage('ore'));

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+5zz8x' +
'17v66h1Kpg7CauzjPd2vFqFmO227aO5uPAurWgDolb1zNS6pINC8m' +
'ta+X6HcTo++3ia4EZW829OFwuozrq7sGkZyjlnPEQuawUcwmUdQlc' +
'i5uHjpiJrFYBSvm0034OmsSyQ1bOU5jFQkuoA1C5+dq9LO+gknENk' +
'VmR7IKDas8TSQ3rO9lYA4qOUSi5dxGbWG3i+7H8yUmhdU47BOZ1fW' +
'89b7sYxiyYesnR8nFAk+uHRu7x4GwRGMOw5KNb0+T72NjvyDZr9mH' +
'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
SMARTSetupEx(2, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
SetUpSRL;
DeclarePlayers;
LogInPlayer;
MakeCompass('180');
keyDown(VK_UP); // VK_UP, VK_LEFT, VK_RIGHT, or VK_DOWN
wait(1000+random(100));
keyUp(VK_UP);

repeat
Miner;
AntiRandoms;
Dropore;
AntiRandoms;
Until(false);
end.