There is no place to enter player nick?
If this is your first script, wow.
Just make a rock finding function with TPA's, use DTM's to find ores in inventory and it's very usable! Their not hard at all to understand.
Now your mining procedure might click some other object that just happens to have the same color with rocks. Make it go like
procedure Miner;
begin
if not loggedin then exit; //added this
repeat
if FindColorSpiralTolerance(x, y, main_ore_color, MSx1, MSy1, MSx2, MSy2, 5) then
begin
MMouse(x, y, 3, 3);
wait(100+random(100));
If IsUpText('ine') then //find Mine text in the upper left corner
begin
num_ore := num_ore + 1;
GetMousePos(x, y); //save the mouse position to x and y
Mouse(x, y, 0, 0, true); //this is to prevent botlike mousemovement
Wait(rockwait + Random(500));
end;
end
else if FindColorSpiralTolerance(x, y, second_ore_color, MSx1, MSy1, MSx2, MSy2, 5) then
begin
MMouse(x, y, 3, 3);
wait(100+random(100));
If IsUpText('ine') then //find Mine text in the upper left corner
begin
num_ore := num_ore + 1;
GetMousePos(x, y); //save the mouse position to x and y
Mouse(x, y, 0, 0, true); //this is to prevent botlike mousemovement
Wait(rockwait + Random(500));
end;
end
Progress;
until(InvFull)
end;
this could be done even shorter way.
to understand this, recall what
- for i := 0 to (?) do
- arrays
mean
procedure Miner;
var
colours: TIntegerArray;
begin
if not loggedin then exit;
colours:= [main_ore_color, second_ore_color];
repeat
for i:= 0 to 1 do
if FindColorSpiralTolerance(x, y, colours[i], MSx1, MSy1, MSx2, MSy2, 5) then
begin
MMouse(x, y, 3, 3);
wait(100+random(100));
If IsUpText('ine') then //find Mine text in the upper left corner
begin
num_ore := num_ore + 1;
GetMousePos(x, y); //save the mouse position to x and y
Mouse(x, y, 0, 0, true); //this is to prevent botlike mousemovement
Wait(rockwait + Random(500));
exit;
end;
end else Inc(fails);
until(fails > 4);
end;
EDIT: noes, i replied to a month-old thread! again!