SRL Archive - General Botting Help

Need to edit the LRC Miner


BanditBob

2014-12-29 14:44:44

Hello folks, before I start I would like to say I don't know if this is in the right section or not. Second of all, I would also like to say I'm a total newb at what I am about to ask, hence why I have decided to come to write this thread.

I would like to someone to tell me or if they are kind enough for them to edit it for me so this script just mines coal instead of gold. Thanks.

Script: https://villavu.com/forum/showthread.php?t=89755

KeepBotting

2014-12-29 17:29:00

Doesn't it already mine both?

BanditBob

2014-12-29 17:31:31

From: KeepBotting
Doesn't it already mine both?


It will only mine coal if there's no gold left. I can't mine gold atm.

Rlp

2014-12-29 17:33:09

From: KeepBotting
Doesn't it already mine both?


I believe it only mines coal when both gold deposits are exhausted.


OP have you tried to edit it yourself?

BanditBob

2014-12-29 17:38:48

From: Rlp
I believe it only mines coal when both gold deposits are exhausted.


OP have you tried to edit it yourself?


Yeah but trust me I'm awful at it…

KeepBotting

2014-12-29 17:44:02

From: BanditBob
It will only mine coal if there's no gold left. I can't mine gold atm.


Oh, okay.

From a quick gander through the script's sauce code, I _think_ the variable used in determining which type of rock to mine is EmptySpot. No idea what that means or what it refers to, but from the writeLn()'s, I conclude that when EmptySpot >= 2, the script will go mine coal.

Relevant code:

    SkipUp:
If (Spot=1) Then
If FindGoldDTM Then //low or high spot
Begin
If Debug Then
Writeln('Found Gold, EmptySpot back to 0');
EmptySpot:=0;
Mining;
BreakHandler(BreakIn,BreakFor,Bir,Bfr);
If (Not TabBackpack.IsFull) And (Spot=1) Then
GoTo SkipDown;
End Else
Begin
BreakHandler(BreakIn,BreakFor,Bir,Bfr);
EmptySpot := EmptySpot + 1;
If Debug Then
Writeln('Did not find gold, emptyspot is: '+ToStr(EmptySpot));

SkipDown:
If RunPercent < 50 Then
Begin
If Debug Then
Writeln('Run energy low, resting');
Setrest;
Repeat
Timeout.Reset;
Timeout.Start;
Timeout2.Reset;
Timeout2.Start;
If Runaways Then
Exit;
CheckStuff;
If Not IsLoggedIn Then
Exit;
setrest;
wait(100);
Until RunPercent > 90;
Minimap.ToggleRun(True);

If Debug Then
Writeln('Run energy restored');

GoTo SkipUp;
End;
CheckStuff;

If EmptySpot >= 2 Then
Begin
If Debug Then
Writeln('EmptySpot too high, going to look for coal');

So the solution to your problem would be to a) remove all lines in the script which forcibly reset EmptySpot to below 2 and b) add a line in the mainloop which will keep EmptySpot above 2. Therefore, everytime the script checks the value of EmptySpot, it will always find it at a suitable value to mine coal.

BanditBob

2014-12-29 17:51:48

From: KeepBotting
Oh, okay.

From a quick gander through the script's sauce code, I _think_ the variable used in determining which type of rock to mine is EmptySpot. No idea what that means or what it refers to, but from the writeLn()'s, I conclude that when EmptySpot >= 2, the script will go mine coal.

Relevant code:

    SkipUp:
If (Spot=1) Then
If FindGoldDTM Then //low or high spot
Begin
If Debug Then
Writeln('Found Gold, EmptySpot back to 0');
EmptySpot:=0;
Mining;
BreakHandler(BreakIn,BreakFor,Bir,Bfr);
If (Not TabBackpack.IsFull) And (Spot=1) Then
GoTo SkipDown;
End Else
Begin
BreakHandler(BreakIn,BreakFor,Bir,Bfr);
EmptySpot := EmptySpot + 1;
If Debug Then
Writeln('Did not find gold, emptyspot is: '+ToStr(EmptySpot));

SkipDown:
If RunPercent < 50 Then
Begin
If Debug Then
Writeln('Run energy low, resting');
Setrest;
Repeat
Timeout.Reset;
Timeout.Start;
Timeout2.Reset;
Timeout2.Start;
If Runaways Then
Exit;
CheckStuff;
If Not IsLoggedIn Then
Exit;
setrest;
wait(100);
Until RunPercent > 90;
Minimap.ToggleRun(True);

If Debug Then
Writeln('Run energy restored');

GoTo SkipUp;
End;
CheckStuff;

If EmptySpot >= 2 Then
Begin
If Debug Then
Writeln('EmptySpot too high, going to look for coal');

So the solution to your problem would be to a) remove all lines in the script which forcibly reset EmptySpot to below 2 and b) add a line in the mainloop which will keep EmptySpot above 2. Therefore, everytime the script checks the value of EmptySpot, it will always find it at a suitable value to mine coal.


No idea when it comes to code language, so will let you know if it works. Thanks.

EDIT: The code you pasted there, is that the original or what you changed?