Advertisement
se7enek

Untitled

Oct 14th, 2014
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.67 KB | None | 0 0
  1. program copperMiner;
  2. {$I SRL-OSR/SRL.simba}
  3. {$I SRL-OSR/SRL/misc/al_functions.simba}
  4.  
  5. var
  6.   a, CopperColor, foundX, foundY, clientW, clientH: Integer;
  7.   foundOre, allGood: Boolean;
  8.  
  9. procedure initDTMs;
  10. begin
  11.   CopperColor := DTMFromString('mGQAAAHicY2RgYPBgZmDQY2RgUHfzZGAF8oFMBgYAEgwBOA==');
  12.  
  13. end;
  14.  
  15. procedure LClickXY(x,y: Integer);
  16. begin
  17.   MoveMouse(x,y);
  18.   ClickMouse(x,y,0);
  19. end;
  20.  
  21. procedure RClickXY(x,y: Integer;doubleClick: boolean);
  22. begin
  23.   MoveMouse(x,y);
  24.   ClickMouse(x,y,1);
  25.   if doubleClick then
  26.     begin
  27.       ClickMouse(x,y,1);
  28.     end;
  29. end;
  30.  
  31. procedure compareDTMScreen(DTM: Integer);
  32. begin
  33.   foundOre := FindDTM(CopperColor,foundX,foundY,0,0,clientW-1,clientH-1);
  34. end;
  35.  
  36. begin
  37.   writeln('=================================================');
  38.   writeln('Initializing...');
  39.   GetClientDimensions(clientW,clientH);
  40.   initDTMs;
  41.   writeln('done');
  42.   allGood:= true;
  43.   while allGood do
  44.     begin
  45.       if isKeyDown(112) then
  46.         allGood:=false;
  47.       compareDTMScreen(CopperColor);
  48.       sleep(400);
  49.       if foundOre then
  50.         begin
  51.           writeln('Found ore at ['+toStr(foundX)+','+toStr(foundY)+'] - Mining...');
  52.           RClickXY(foundX,foundY,true);
  53.           for a := 0  to 3 do
  54.             begin
  55.               if isKeyDown(112) then
  56.                 allGood:=false
  57.               else
  58.                 sleep(1000);
  59.             end;
  60.           sleep(Random(1000))
  61.         end
  62.       else
  63.         allGood:= false;
  64.     end;
  65.   if foundOre then
  66.     writeln('Stopped by user.')
  67.   else
  68.     writeln('Can not find ore. Stopping...');
  69.   writeln('=================================================');
  70.   FreeDTM(CopperColor);
  71. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement