SRL Archive - OSR Help

Problem with moving to next rock,


ownedlikenoob

2010-07-08 13:53:32


Procedure StartMining;
Begin
if(FindObjTPA(x, y, Rune, 5, 2, 26,29, 3, ['Mine', 'Rocks'])) or
(FindObjTPA(x, y, Rune2, 5, 2, 26,29, 3, ['Mine', 'Rocks'])) or
(FindObjTPA(x, y, Rune3, 5, 2, 26,29, 3, ['Mine', 'Rocks'])) then
Begin
WriteLn('Found Rock, Mining');
Wait(700+random(300));
case (Random(2)) of
1: Begin
LastCount := InvCount;
wait(100+random(50));
Mouse(x,y,5,2,False);
wait(100+random(200));
ChooseOption('Mine');
Wait(1300+random(300));
Repeat
Wait(1000+random(500));
InvCount;
Until(LastCount < InvCount) or
(Not(FindObjTPA(x, y, Rune, 5, 2, 26,29, 3, ['Mine', 'Rocks'])));
end;
2: Begin
LastCount := InvCount;
Wait(200+random(200));
Mouse(x,y,2,4,True);
Wait(1300+random(300));
repeat
Wait(1000+random(400));
InvCount;
Until(LastCount < InvCount) or
(Not(FindObjTPA(x, y, Rune, 5, 2, 26,29, 3, ['Mine', 'Rocks'])));
End;
end;
end;
end;

Ok so it finds one rock, Clicks it, waits until the inventory count is +1 then it trys to click the second rock but moves the mouse to it, does not click, then continues with the rest of the script.

So pretty much it finds the first one and clicks it but the second one it finds it but doesn't click it…

Why won't it click?

Xtensity

2010-07-10 21:19:59

You could always add another click/Mouse function in there after it has gotten to where it needs to be.

ownedlikenoob

2010-07-11 10:31:21

From: Xtensity
You could always add another click/Mouse function in there after it has gotten to where it needs to be.


Yeah well I have it set to click with the Mouse(x,y,2,4,true); function. It just seems as if it skips that function entirely. Maybe I will add two Mouse functions, I don't know. I think I'm going to try that or something.

FrostFyr

2010-07-11 19:31:54

I'd like to point out that Random(2) will return either 0 or 1 not 1 and 2

ownedlikenoob

2010-07-13 16:23:54

From: FrostFyr
I'd like to point out that Random(2) will return either 0 or 1 not 1 and 2


LOL THANKS YOU! haha I was trying to figure out why I had to put Random(3) to get it to work…. Thanks, That saves me a lot of questions. lol