From: masterBB
Nice script! A bit of a late run by me, had to work on a iron 'quild mine' miner to get level 72 mining. I now got tons of ores, the dwarves are a bit stingy with the gold nuggets though.
[================================]
[ Runtime : 02H 39M 01S ]
[ XP Gained : 88445(33370 / Hr) ]
[ Nuggets : 23(9 / Hr) ]
[ Coal : 495(187 / Hr) ]
[ Gold : 316(119 / Hr) ]
[ Mithril : 308(116 / Hr) ]
[ Adamantite : 105(40 / Hr) ]
[ Runite : 0(0 / Hr) ]
[ Shutdown : 03H 36M 24S ]
[================================]
[ Motherlode Miner BETA 2 ]
[================================]
I had some trouble getting it past the one hour mark though. I encountered the following bugs:
- Looking for colours outside the mainscreen
- Not finding the deposit box on certain worlds
- Sometimes it gets stuck in this loop where it switches very quickly between mining and clearing the ruble. Usually the pickaxe barely hit the vein before the script clicks on the ruble again.
For point 1 I added the following to the GetVeinsInMyZone function (I can't confirm this fixed it, but I did not see the problem again.):
VeinBox := VeinRect.Bounds;
VeinBox.LimitTo(MainScreen.Bounds);
For point 2 I just hopped worlds. I made some screenshots yesterday but I can't find them.
For point 3 al I got is this log:
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 0
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching spots in zone
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching zones
[Bot]: Navigating to vein zone
[Bot]: Rotating to angle: 44
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 185
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 0
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching spots in zone
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching zones
[Bot]: Navigating to vein zone
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 86
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 0
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching spots in zone
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching zones
[Bot]: Navigating to vein zone
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 180
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 0
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching spots in zone
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching zones
[Bot]: Navigating to vein zone
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 268
[Bot]: Clearing the rockfall
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 0
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching spots in zone
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching zones
[Bot]: Navigating to vein zone
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 46
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 0
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching spots in zone
[Bot]: Rotating to angle: 0
[Bot]: No veins found nearby, switching zones
[Bot]: Navigating to vein zone
[Bot]: Rotating to angle: 43
[Bot]: Clearing the rockfall
[Bot]: Rotating to angle: 354
[Bot]: Clearing the rockfall
Regardless of those bugs, the script runs really well. And with short runs and keeping a bit of an eye on the script, it can achieve nice result. It even got me to write a simba colour script again.
Hi Flight, Great script! I've gotten from 95 mining to 97 so far. Above point 3 is still a bug in BETA_final. The reason I believe is due to the code in TScript.MineVeins:
if 'reach that' in Chat.GetMessage(7, [CHAT_COLOR_BLACK]) then
begin
Self.MineZoneBlock(Self.GetCurrentZone(), True);
Exit;
end;
This will trigger in every loop when mining until some other message appears in the chat. Some thoughts on how to amend this perhaps (I'm sure there's many better ways): Add a 'continue;' for each check above this and move the worldhop check to the top without a continue. I've briefly checked below with 'reach that' in Chat.GetMessage (edit: below solution still mines the rockfall every time the loop finishes such as when the vein depletes or animating/xp drop doesn't trigger. All I can think of if you want to use the chat messages is to keep all the lines in the chatbox remembered in an array and to only activate the condition if the 7th message matches what your looking for and the full array of 0-7 messages are different to the previous time you acted on the chat messages. The only time that wouldn't work is if all 8 messages are the same which is unlikely) :
while (not T.IsFinished) do
begin
if (not RSClient.IsLoggedIn) then Exit;
if Inventory.IsFull() then break;
if HOPONCHAT then
Self.CheckForChat();
if Chat.ClickContinue(False) then
begin
T.Restart;
continue;
end;
if XPBar.Read() > XP then
begin
XP := XPBar.Read();
T.Restart();
continue;
end;
if (SRL.PercentShift(MainScreen.GetPlayerBox(), 500) >= PERCSHIFT) then
begin
T.Restart();
continue;
end;
if Self.DoAB() then
begin
T.Restart();
continue;
end;
if 'reach that' in Chat.GetMessage(7, [CHAT_COLOR_BLACK]) then
begin
Self.MineZoneBlock(Self.GetCurrentZone(), True);
Exit;
end;
Wait(250);
end;
Further edit, I'm now testing the following workaround:
I added PreviousChatArray : TStringArray; to the TScript record
then created the Function:
function TScript.ChatChecker(ChatMessage: String): Boolean;
var i,Count: Int32;
begin
if PreviousChatArray = [] then
begin
for i:=0 to CHAT_INPUT_LINE - 1 do
PreviousChatArray.Append(Chat.GetMessage(i, [CHAT_COLOR_BLACK]));
if ChatMessage in PreviousChatArray[CHAT_INPUT_LINE - 1] then Exit(True);
end else
begin
for i:=0 to CHAT_INPUT_LINE - 1 do
begin
if PreviousChatArray[i] <> Chat.GetMessage(i, [CHAT_COLOR_BLACK]) then
begin
PreviousChatArray[i] := Chat.GetMessage(i, [CHAT_COLOR_BLACK]);
Count += 1;
end;
end;
end;
if ChatMessage in PreviousChatArray[CHAT_INPUT_LINE - 1] then Exit(Count > 0);
end;
I then used the function in the DepositDirt and MineVeins like:
if Self.ChatChecker('reach that') then
begin
Self.MineZoneBlock(Self.GetCurrentZone(), True);
Exit;
end;