SRL Archive - Help and Support

Moves to compass?


rkroxpunk

2007-05-15 08:50:30

Hmm well here is a pretty nooby mineing script by me 2 things:
1: When it's mining maybe 2 or 3 times per load it moves the mouse to the compass on MM and clicks which makes it count as it mining an ore and it waits for the text or timer this happens every single time with every findobj as well so I can't get that to work either.
2: Mining procedure is very slow should I just use findfastrandoms and feedback on what else I should take out.

function Mine: Boolean;
var
Bx, By: Integer;
begin
if not (LoggedIn) then Exit;
HighestAngle;
MakeCompass('N')
repeat
if not (LoggedIn) then Exit;
wait(5 + random(5));
Gametab(4)
if FindColorSpiralTolerance(x, y, OreColour, MSX1, MSY1, MSX2, MSY2, 4) then
begin
Writeln('Found ore starting Mineing')
MMouse(x, y, -1, 0)
end;
wait(50+random(160))
if (IsUpText('Min')) then
begin
if (GasCheck(Bx, By)) then
begin
HandleGas;
end;
wait(50 + random(5));
Mouse(x, y, 2, 2, true);
Flag;
wait(200+random(200));
Result:=True
Break;
end;
until (false)
end;

procedure UntilMined;
var
timer, Ax, Ay: integer;
begin
if not (LoggedIn) then Exit;
Writeln('waiting for pick swing')
DoAntiRandoms;
wait(1000 + random(200));
if FindText(x, y, 'wing you', smallchars, 18, 414, 123, 434) then
begin
marktime(Timer);
repeat
if not (LoggedIn) then Exit;
wait(200 + random(400));
DoAntiRandoms;
FindPick;
ClickToContinue;
until FindText(x, y, 'anage', smallchars, 18, 414, 123, 434) or
(timefrommark(Timer) > WaitTime);
end;
end;

thx.
-RK

JuKKa

2007-05-19 10:58:56

why dont u have gas check befor it moves the mouse? a bit more undetectable?

rkroxpunk

2007-05-19 21:15:40

Oops yeah I forgot to move that back up. thx :D Findobj still ain't working for me >.<

JuKKa

2007-05-20 05:46:31

ur not using the srl function "FindObj".

rkroxpunk

2007-05-20 05:53:59

I know I'm not in there but when I do it automatically moves to the compass….

JuKKa

2007-05-20 10:07:42

i think i have a solution, dunno if it makes sence but:

it first moves the compass using the variables: x,y which will then give the x,y values that are around the compass. then by ?? PLAIN LUCK ?? u have ur mouse hovering over a rock, and it thinks it should click THERE but instead it clicks on the compass because of x,y are at the compass..?

dunno if it makes ANY sence at all but it could be: try using: GETMOUSEPOS(x,y) right after the "Mouse(x,y,randx,randy,left)" cmd

Special Ed

2007-05-20 20:48:07

Try using different variables for the two parts. Meaning use different co-ordinates for different functions unless your using the same cords for clicking.

rkroxpunk

2007-05-21 03:02:51

thx guys will try in a minute

dontpanic

2007-05-22 00:28:13

Though you probably know this, just reminding you to make sure the coords in the findobj are the same as your Mouse()ing to.

rkroxpunk

2007-05-22 03:18:22

yeah they were :p but for some reason unbeknown to me it's decided to start working again :D oh well thx for all ur suggestions that I didn't use :P