Script powermines essense - 17k xp - 20k xp per hour starting at level 1. Much faster for the lower levels than mining copper/tin. It uses isplayeranimating to see if the player is mining or not, this sensitivity can be adjusted depending on what cape you are wearing.
Problems I'm having:
1) It was working fine but I'm getting an error in the playerform in the declareplayers procedure in this line of code:
minutesToRun := StrToInt(playerForm.players[currentPlayer].settings[0]) * 60000;
The error:
Error: "True" is an invalid integer at line 46
I'm declaring it at the top as an integer so why is it even a true false at all?
If I comment these playerform lines out it works fine.
2) The progress report just spams in the debug box, its very annoying to look at. How can I make it just update after every full inventory when it drops using the action bar?
3) I'd like to add stopping after the user selects how many they want to mine, any suggestions on this?
Code:
program nvEssence;
//{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$i SRL-6/LIB/MISC/SRLPLAYERFORM.simba}
{==============================================================
\ Setup: /
/ 1) Add your player to player manager. \
\ 2) Set player up in front of the essence rock. /
/ 3) Click Run, make sure you stop it yourself when done. \
\ 4) If clicking rock too often, change camera angle /
/ if not fixed, adjust sensitivity in clickRock procedure \
\ 5) Enjoy. /
============================================================}
var
{PlayerForm Variables}
minutesToRun : integer;
var
loadsDone, antiBans: integer;
antiBanB : boolean;
procedure initPlayerForm();
begin
with playerForm do
begin
name := 'nv Essence v3.1';
scriptHelpThread := '';
scriptSettingsPath := '';
checkBoxLabels := ['Antiban'];
checkBoxDefaults := ['True'];
checkBoxHints := ['Want to use antibans?'];
end;
end;
procedure declarePlayers();
begin
players.setup(playerForm.players);
currentPlayer := 0;
minutesToRun := StrToInt(playerForm.players[currentPlayer].settings[0]) * 60000;
antiBanB := StrToBool(playerForm.players[currentPlayer].settings[1]);
end;
{Antiban}
procedure antiBan(randomNumber: Integer);
var
i: Integer;
begin
if not isLoggedIn() then
exit;
i := random(randomNumber);
if i < 62 then
begin
inc(antiBans);
case i of
0 .. 9: mouseMovingObject();
10..20: sleepAndMoveMouse(500);
21..30: sleepAndMoveMouse(randomRange(500, 2000));
31..39: begin
mouseOffClient(random(4));
wait(randomRange(8000, 5000));
end;
40..41: begin
mouseOffClient(random(4));
wait(randomRange(5000, 10000));
end;
42..55: pickUpMouse();
56..57: begin
mouseOffClient(random(4));
wait(randomRange(20000, 30000));
end;
end;
end;
end;
{Proggy}
procedure progressReport();
var
oreMined, xpPerHour: integer;
begin
oreMined := LoadsDone * 28;
xpPerHour := round(((oreMined * 5) * 60) / (getTimeRunning() / 60000));
writeLn('========================================================');
writeLn('NV ESSENCE POWERMINER');
writeLn('Time Running: ' + timeRunning);
writeLn('Ores Mined: ' + intToStr(oreMined));
writeLn('XP Per Hour: ' + intToStr(xpPerHour));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('========================================================');
end;
{Clicks the rock based on whether player is moving or not, can adjust sensitivity}
procedure clickRock();
var
x, y: integer;
begin
if (not (mainScreen.isPlayerAnimating(70))) then
begin
wait(randomRange(100, 200));
mainscreen.findObject(x, y, 8881809, 3, ['ine'], MOUSE_LEFT);
mouse(x, y, 150, 150, MOUSE_MOVE);
end;
end;
{Action Bar Key 114 is F3}
procedure dropping();
var
x, y: integer;
begin
begin
if (tabBackpack.isItemInSlot(25)) then
begin
wait(randomRange(1000,1200));
if conversationBox.continue(32, 500) then
begin
writeLn('We Clicked The Box Baby');
KeyDown(114);
wait(randomRange(5000,5250));
KeyUp(114);
wait(randomRange(5150,5200));
mainscreen.findObject(x, y, 8881809, 3, ['ine'], MOUSE_LEFT);
inc(loadsDone);
end else
begin
KeyDown(114);
wait(randomRange(5000,5250));
KeyUp(114);
wait(randomRange(5150,5200));
inc(loadsDone);
end;
end;
end;
end;
{Main Loop}
begin
clearDebug();
initPlayerForm();
runPlayerForm();
if not playerForm.isScriptReady then
Exit;
setupSRL();
declarePlayers();
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitTreasure();
closePopup();
end;
begin
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;
repeat
clickRock();
dropping();
progressReport();
antiBan(3000);
until false;
end.