SRL Archive - Help

Checking if you actually mined the rock?


mcbain

2013-01-11 02:30:11

EDIT: Thanks to this amazing community.. and my awesome programming skills. (hehe :D) My autominer is doing great.

lastprojectrs

2013-01-11 02:54:21

i am also looking for how do u kno when u hav a full invent of fish on projectrs06? ty

mcbain

2013-01-11 03:13:27

From: lastprojectrs
i am also looking for how do u kno when u hav a full invent of fish on projectrs06? ty


Ill be sure to relay any information i get :)

Mr[S]

2013-01-11 03:15:22

Didn't this server shut down or something?

lastprojectrs

2013-01-11 05:03:42

From: Mr[S]
Didn't this server shut down or something?


can u stop posting unesscary things pls. if you want to check the server, head to the website, ty.

Sin

2013-01-11 07:22:01

From: Mr[S]
Didn't this server shut down or something?


This

John

2013-01-11 07:24:06

From: Mr[S]
Didn't this server shut down or something?

No this is a different server.
From: lastprojectrs
can u stop posting unesscary things pls. if you want to check the server, head to the website, ty.

Mate, how is he meant to check the website if you don't even give him a link?

mcbain

2013-01-11 13:16:43

Yepp, its a different server. But let's try to keep the conversation to my scripting problem :D

Runaway

2013-01-11 13:24:58

Check your inventory count right after clicking the rock. Check it again constantly as you mine so you know you've mined an ore when the inventory count is greater than the original count. Repeat.

Austin

2013-01-11 14:38:26

From: Sin
This

That's 2006scape I believe. But yeah, this will probably shut down soon too.

rj

2013-01-11 16:57:31

To check if your inventory is full I would advise checking for clay and gems int he last slot. To check when the characor is done mining you have 2 options:

1) Use pixel shift ( It's usable in RSPS )

2) Make the charactor wait between 2-4 seconds, this is the best wait timing for a rock

Pixel shift tutorial: http://villavu.com/forum/showthread.php?t=74090

Here is a example, you may have to change some settings but that is what the tut above is for :p

program test;
{$i srl/srl.simba}

var
Status: string;

function Mining: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(249, 134, 277, 180);
Result := (AveragePixelShift(PBox, 200, 300) > 150);
Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
end;

procedure Findrock;
var
X, Y: Integer;
begin
if (mining) then
begin
ClearDebug;
Status := ('Waiting to stop mining')
Writeln('Status:' + Status)
wait(500);
end
else
begin
MouseSpeed := 15;
if FindColorTolerance(X, Y, 2569557, 11, 27, 522, 360, 3) then
begin
ClearDebug;
Status := ('Mining')
Writeln('Status:' + Status)
mmouse(x, y, 1, 1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
wait(randomrange(2500, 3500));
end;
end;
end;

begin
repeat
Findrock;
until (IsKeyDown(114));
end.

mcbain

2013-01-11 17:48:53

From: rjj95
To check if your inventory is full I would advise checking for clay and gems int he last slot. To check when the characor is done mining you have 2 options:

1) Use pixel shift ( It's usable in RSPS )

2) Make the charactor wait between 2-4 seconds, this is the best wait timing for a rock

Pixel shift tutorial: http://villavu.com/forum/showthread.php?t=74090

Here is a example, you may have to change some settings but that is what the tut above is for :p

program test;
{$i srl/srl.simba}

var
Status: string;

function Mining: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(249, 134, 277, 180);
Result := (AveragePixelShift(PBox, 200, 300) > 150);
Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
end;

procedure Findrock;
var
X, Y: Integer;
begin
if (mining) then
begin
ClearDebug;
Status := ('Waiting to stop mining')
Writeln('Status:' + Status)
wait(500);
end
else
begin
MouseSpeed := 15;
if FindColorTolerance(X, Y, 2569557, 11, 27, 522, 360, 3) then
begin
ClearDebug;
Status := ('Mining')
Writeln('Status:' + Status)
mmouse(x, y, 1, 1);
wait(randomrange(150, 250));
ClickMouse(X, Y, mouse_Left)
wait(randomrange(2500, 3500));
end;
end;
end;

begin
repeat
Findrock;
until (IsKeyDown(114));
end.


AHHH! Okayy, so you are saying, if the pixels are shifting then i must be mining, else, i must not be mining and should find the color and click. Very nice.. I really like that idea Rjj :)

From: Runaway
Check your inventory count right after clicking the rock. Check it again constantly as you mine so you know you've mined an ore when the inventory count is greater than the original count. Repeat.


Use of the inventory count works on an RSPS? Ill try this. if it does then i love you.

weequ

2013-01-11 17:55:51

You could use the dtm that you made but only search the last (most recent) line. Also only do the checking after you find dtm of the "You swing your pick at the rock.". Otherwise it will think you already mined immediately after clicking (before moving to the rock).

mcbain

2013-01-11 18:14:03

From: weequ
You could use the dtm that you made but only search the last (most recent) line. Also only do the checking after you find dtm of the "You swing your pick at the rock.". Otherwise it will think you already mined immediately after clicking (before moving to the rock).


Ahh! Yes, this would solve my problem of it freaking out and clicking madly after it finds the DTM of the text :p So, I would have to check if "you swing balbalbalba" On the last line of the text box, then if thats true, check if "You manage to mine blabalalb" If and only if that is true, increment a counter. else, retry. Brilliant. Will post back with results! :)

rj

2013-01-11 21:37:17

From: mcbain
Ahh! Yes, this would solve my problem of it freaking out and clicking madly after it finds the DTM of the text :p So, I would have to check if "you swing balbalbalba" On the last line of the text box, then if thats true, check if "You manage to mine blabalalb" If and only if that is true, increment a counter. else, retry. Brilliant. Will post back with results! :)


Add a fail-safe in-case it does not find that next for a certain amount of time then just move on to the next rock
I have something like this in my herb cleaner for SS:

repeat
if BankTry >= 7 then
begin
FindTheBank;
end;
IncEx(BankTry, 1);
wait(randomrange(500, 750));
until
(FindBitmapToleranceIn(BankSoulSplit, X, Y,181, 27, 359, 52, 145)=true)
BankTry := 0;
StoreHerbs;
end;
end;

What this does is, after it clicks the bank and it does not find the 'Bank of soulsplit" Text then it adds to the BankTry variable and repeats the procedure to click the bank, and after it tries 7 times it stops trying, and once it finds it, it sets the variable back to 0 so it can be used the next time.

This may not be the best way to do it but it works great for me

lastprojectrs

2013-01-12 03:23:57

From: John
No this is a different server.

Mate, how is he meant to check the website if you don't even give him a link?


well Im sure he's familiar or been on it atleast once if it got shutdown. or :google: :l

mcbain

2013-01-13 02:53:47

From: rjj95
Add a fail-safe in-case it does not find that next for a certain amount of time then just move on to the next rock
I have something like this in my herb cleaner for SS:

repeat
if BankTry >= 7 then
begin
FindTheBank;
end;
IncEx(BankTry, 1);
wait(randomrange(500, 750));
until
(FindBitmapToleranceIn(BankSoulSplit, X, Y,181, 27, 359, 52, 145)=true)
BankTry := 0;
StoreHerbs;
end;
end;

What this does is, after it clicks the bank and it does not find the 'Bank of soulsplit" Text then it adds to the BankTry variable and repeats the procedure to click the bank, and after it tries 7 times it stops trying, and once it finds it, it sets the variable back to 0 so it can be used the next time.

This may not be the best way to do it but it works great for me


I just added one now :) thanks rjj. i just have it now that if it tries more than 5 times without mining to terminate. will make it do something different later. Im having trouble with my text DTM though, it only finds it if the text is in the top of the chat box. :mad: I don't understand why it wont find the DTM when i have the coordinates at the bottom of the chat box. Frustrating.

rj

2013-01-13 11:38:35

From: mcbain
I just added one now :) thanks rjj. i just have it now that if it tries more than 5 times without mining to terminate. will make it do something different later. Im having trouble with my text DTM though, it only finds it if the text is in the top of the chat box. :mad: I don't understand why it wont find the DTM when i have the coordinates at the bottom of the chat box. Frustrating.


Use bitmaps for selection options like 'drop'

mcbain

2013-01-14 03:59:16

From: rjj95
Use bitmaps for selection options like 'drop'


Baboom, got it working. Pixel shift works extremely well for the waiting. no more spam clicking if i take longer than usual to mine the rock :) and also, i used a bitmap to find the ore in the second last inventory slot(for some reason it won't find the ore in the last inventory slot :S) to find if it is time to drop. works like a charm :D

Thanks to everyone who replied. this community rocks my socks off.