Khal Drogo
2013-02-25 15:47:32
Hello, I'm trying to create a simple power miner using the unoffical 2007 include and my code is working fine but I have no idea how to prevent the script from clicking a rock if i'm already mining it without being able to detect animations and color bots can't do that well so any ideas?
Also here is my code if that helps you any.
EDIT: Also does the FindObj function return a random part of the object each call? It looks like it does but i'm not sure, I don't know if I need to randomize the pixels to avoid clicking the exact pixel over and over.
Also here is my code if that helps you any.
Program test;
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
var cx, cy: integer;
var count: integer;
begin
SetupP07Include;
repeat
if P07_FindObj(cx, cy, 'Mine Rocks', 2305614, 5) then
ClickMouse2(mouse_left);
writeln('Found rocks, clicked them, waiting 1.5s');
wait(1500);
count := 0;
if P07_FindObj(cx, cy, 'Mine Rocks', 2305614, 5) = false then
writeln('cant find rocks');
count := count+1;
until count = 5;
writeln('count was 5, no rocks for 7+ seconds. stopped');
end.EDIT: Also does the FindObj function return a random part of the object each call? It looks like it does but i'm not sure, I don't know if I need to randomize the pixels to avoid clicking the exact pixel over and over.