Helper
2012-01-08 22:40:19
Hellow, i want to know how to make a procedure to loot gold charms.
:norris:
:norris:
2012-01-08 22:40:19
2012-01-08 23:04:50
procedure Loot;
begin
If(FindColorTolerance(x,y,COLOR,msx1,mxy1,msx2,msy2,10)then
begin
mousebox(x,y,x,y,0);
if WaitUpText('Gold',RandomRange(150,250)) then
begin
clickmouse2(true);
end
end;
end;
2012-01-09 16:44:23
From: belbn
procedure Loot;
begin
If(FindColorTolerance(x,y,COLOR,msx1,mxy1,msx2,msy2,10)then
begin
mousebox(x,y,x,y,0);
if WaitUpText('Gold',RandomRange(150,250)) then
begin
clickmouse2(true);
end
end;
end;
2012-01-10 03:14:58
Function Loot: boolean; //Returns true if successful, false if not
var
x, y: integer;
if FindObjCustom(x, y, ['old'], 1234, 5) then //1234 is the color of the looted and old is Gold without the first letter
begin
Mouse(x, y, 1, 1, true);
wait(100 + random(250));
WriteLn('Found and clicked!');
Result := true;
end
else
begin
WriteLn('Didn''t find :(');
Result := false;
end;2012-01-10 19:51:30
From: cause
Maybe an easier way is to use:Function Loot: boolean; //Returns true if successful, false if not
var
x, y: integer;
if FindObjCustom(x, y, ['old'], 1234, 5) then //1234 is the color of the looted and old is Gold without the first letter
begin
Mouse(x, y, 1, 1, true);
wait(100 + random(250));
WriteLn('Found and clicked!');
Result := true;
end
else
begin
WriteLn('Didn''t find :(');
Result := false;
end;
Belbn's procedure won't work because he forgot his variables :P