Incurable
2014-08-17 09:29:09
STATUS: I have no plans to release an updated version. If enough people REALLY want it, I will, but this is an onion collector, lol… that won't happen. ;)
G'day,
This is a very simple script that will collect a pack of onions at the Draynor onion patch, bank them, and then repeat the process until the desired number of onions has been banked. It was written in a total of around 6 hours, and as such features no anti-ban and a (very) dodgy progress report. I got the idea from The Mayor/Solaire and used the invaluable tutorials created by C0h3n and The Mayor to create it.
Any feedback is welcome, though I'm unsure whether to continue to learn by improving this script, or whether I should use what I know to create a more valuable script with a higher gold/hr rate and then make that one worth using.
Known issues:
On the plus side, the script can run for several hours without interruption and is able to be started in the onion patch, close to it, or in the bank. It can also be started whether logged in or out, though logged out is much preferred.
Here's a proggy, I'm unsure why it stopped short of its goal, but it did run for 3.5 hours. :D
Make sure to place the DRAYNOR_BANK_MAP.png file in the C:\Simba\Includes\SPS\img\runescape_other folder before running.
Cheers!
-Inc.
G'day,
This is a very simple script that will collect a pack of onions at the Draynor onion patch, bank them, and then repeat the process until the desired number of onions has been banked. It was written in a total of around 6 hours, and as such features no anti-ban and a (very) dodgy progress report. I got the idea from The Mayor/Solaire and used the invaluable tutorials created by C0h3n and The Mayor to create it.
Any feedback is welcome, though I'm unsure whether to continue to learn by improving this script, or whether I should use what I know to create a more valuable script with a higher gold/hr rate and then make that one worth using.
Known issues:
- PickOnions(): If an onion can't be found then the mouse will be randomly moved around in a completely inhuman fashion.
- ProgRep(): It works, but it's totally crap. Doesn't update once a second, instead updates each time an onion is picked or a load is deposited. I would love to make it update once per second.
- LoginSteps(): Sometimes this won't actually run if the player is already logged in when the script is started, I have no idea why though.
- Anti-ban: There's almost none.
Anti-randoms: Still yet to see a random? Not even sure what's going on there… o.OTurns out there are none in RS3… WHY?! XD
On the plus side, the script can run for several hours without interruption and is able to be started in the onion patch, close to it, or in the bank. It can also be started whether logged in or out, though logged out is much preferred.
Here's a proggy, I'm unsure why it stopped short of its goal, but it did run for 3.5 hours. :D
Inc's Onion Collector
Onions/hr: 769
Profit/hr: 48468 <--- Ignore that, had a bug.
Total collected: 2658/2800
Total profit: 13290gp
Time running: 3 Hours, 27 Minutes and 17 SecondsMake sure to place the DRAYNOR_BANK_MAP.png file in the C:\Simba\Includes\SPS\img\runescape_other folder before running.
Cheers!
-Inc.
program OnionCollector;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
{ ******************** BEGIN USER SCRIPT SETUP ********************
Instructions:
1. Make sure that DRAYNOR_BANK_MAP.png is correctly placed in
"C:\Simba\Includes\SPS\img\runescape_other" before running
2. Check that Simba is using Lape (Script > Interpreter > Lape)
3. Setup the script by changing the values below
}
var
numToPick := 1000; // Number of onions to pick?
onionPrice := 5; // Current price of onions?
numPicked: integer; // Ignore
numBanked: integer; // Ignore
procedure DeclarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'username';
password := 'password';
isActive := true;
end
currentPlayer := 0;
end;
{ ******************** END USER SCRIPT SETUP ******************** }
// Steps to be completed at login
procedure LoginSteps();
begin
wait(randomRange(1000, 3000));
if not isLoggedIn() then
exit;
mainscreen.setZoom(true);
wait(randomRange(200, 500));
minimap.setAngle(MM_DIRECTION_NORTH);
wait(randomRange(200, 500));
mainScreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(200, 500));
exitTreasure();
wait(randomRange(1000, 3000));
end;
procedure ProgRep();
var
onionPh, profit, profitPh: integer;
x := 0;
y := 295;
begin
profit := numPicked * onionPrice;
onionPh := round((numPicked * 3600) / (getTimeRunning() / 1000));
profitPh := round((numPicked * onionPrice) * 3600 / (getTimeRunning() / 1000));
clearDebug();
writeLn('Inc''s Onion Collector');
writeLn('Onions/hr: ' + intToStr(onionPh));
writeLn('Profit/hr: ' + intToStr(profitPh));
writeLn('Total collected: ' + intToStr(numPicked) + '/' + intToStr(numToPick));
writeLn('Total profit: ' + intToStr(profit) + 'gp');
writeLn('Time running: ' + TimeRunning);
writeLn('============================================');
smartImage.clear();
smartImage.drawText('Inc''s Onion Collector', point(10, 290), upchars, true, clWhite);
smartImage.drawText('Onions/hr: ' + intToStr(onionPh), point(10, 305), upchars, true, clWhite);
smartImage.drawText('Profit/hr: ' + intToStr(profitPh), point(10, 320), upchars, true, clWhite);
smartImage.drawText('Total profit: ' + intToStr(profit) + 'gp', point(10, 335), upchars, true, clWhite);
smartImage.drawText('Total collected: ' + intToStr(numPicked) + '/' + intToStr(numToPick), point(10, 350), upchars, true, clWhite);
smartImage.drawText('Time running: ' + TimeRunning, point(10, 365), upchars, true, clWhite);
end;
// Pick a full inventory of onions
procedure PickOnions();
var
x, y, bpCountBeforeWait: integer;
begin
if not isLoggedIn() then
exit;
if mainscreen.findObject(x, y, 5142619, 10, ['ick'], MOUSE_LEFT) then
begin
bpCountBeforeWait := tabBackpack.count();
tabBackPack.waitForShift(5000);
if tabBackpack.count() > bpCountBeforeWait then
numPicked := numPicked + 1;
ProgRep();
wait(randomRange(200, 500));
end else
wait(randomRange(2000, 4000));
end;
// Walk to the bank from the onion patch
// Is this even needed???
procedure WalkToBank();
begin
end;
// Deposits the onions at a bank NPC
procedure DepositOnions();
var
quickDepInvBox: TBox;
begin
quickDepInvBox := intToBox(392, 564, 421, 587);
if not isLoggedIn() then
exit;
bankScreen.open(BANK_NPC_DRAYNOR);
if (minimap.isPlayerMoving()) then
minimap.waitPlayerMoving();
mouseBox(quickDepInvBox, MOUSE_LEFT);
numBanked := numBanked + 28;
ProgRep();
wait(randomRange(500, 1500));
bankScreen.close();;
end;
// Walk to the onion patch from the bank
procedure WalkToPatch();
var
pathToPatch: TPointArray;
begin
if not isLoggedIn() then
exit;
pathToPatch := [Point(208, 207), Point(225, 188), Point(241, 216), Point(231, 236)];
if SPS.walkPath(pathToPatch) then
minimap.waitPlayerMoving()
else
writeLn('ERROR: Failed to walk to the onion patch');
end;
// main loop
begin
clearDebug();
smartEnableDrawing := true;
SmartShowConsole := false;
SetupSRL();
DeclarePlayers();
SPS.setup('DRAYNOR_BANK_MAP', RUNESCAPE_OTHER);
wait(1000);
if not isLoggedIn() then
begin
players[currentPlayer].login();
LoginSteps();
ProgRep();
end;
if isLoggedIn() and tabBackpack.isFull() then
begin
LoginSteps();
ProgRep();
DepositOnions();
end else
ProgRep();
WalkToPatch();
repeat
repeat
PickOnions();
until tabBackPack.isFull();
//WalkToBank();
DepositOnions();
if numBanked < numToPick then
WalkToPatch();
until numBanked >= numToPick;
wait(randomRange(2000, 3000));
players[currentPlayer].logout();
smartImage.clear();
end.