Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program copperMiner;
- {$I SRL-OSR/SRL.simba}
- {$I SRL-OSR/SRL/misc/al_functions.simba}
- var
- a, CopperColor, foundX, foundY, clientW, clientH: Integer;
- foundOre, allGood: Boolean;
- procedure initDTMs;
- begin
- CopperColor := DTMFromString('mGQAAAHicY2RgYPBgZmDQY2RgUHfzZGAF8oFMBgYAEgwBOA==');
- end;
- procedure LClickXY(x,y: Integer);
- begin
- MoveMouse(x,y);
- ClickMouse(x,y,0);
- end;
- procedure RClickXY(x,y: Integer;doubleClick: boolean);
- begin
- MoveMouse(x,y);
- ClickMouse(x,y,1);
- if doubleClick then
- begin
- ClickMouse(x,y,1);
- end;
- end;
- procedure compareDTMScreen(DTM: Integer);
- begin
- foundOre := FindDTM(CopperColor,foundX,foundY,0,0,clientW-1,clientH-1);
- end;
- begin
- writeln('=================================================');
- writeln('Initializing...');
- GetClientDimensions(clientW,clientH);
- initDTMs;
- writeln('done');
- allGood:= true;
- while allGood do
- begin
- if isKeyDown(112) then
- allGood:=false;
- compareDTMScreen(CopperColor);
- sleep(400);
- if foundOre then
- begin
- writeln('Found ore at ['+toStr(foundX)+','+toStr(foundY)+'] - Mining...');
- RClickXY(foundX,foundY,true);
- for a := 0 to 3 do
- begin
- if isKeyDown(112) then
- allGood:=false
- else
- sleep(1000);
- end;
- sleep(Random(1000))
- end
- else
- allGood:= false;
- end;
- if foundOre then
- writeln('Stopped by user.')
- else
- writeln('Can not find ore. Stopping...');
- writeln('=================================================');
- FreeDTM(CopperColor);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement