SRL Archive - Jr. Member RS3 Scripts

Barbarian Assault Portable Wells


Thomas

2015-04-11 10:39:23

Instructions:
I would recommend using it on newly made accounts.
Start at barbarian outpost bank chest, have portable well on action bar bound to 'w'.
Have quickbank button 1 set to empty inventory and button 2 set to portable well in first inventory slot.

Makes up to 500k/hr (on newly made accounts) while placing wells, close to 800k/hr when you have a second account that leeches the wells from first account.

Please feel free to give me feedback!
Bans have been reported, use at your own risk.

This script has minor antiban and little waits, feel free to add more random waits wherever you like and lower the antiban case for more frequent antibans.


Running For: 9 Hours, 12 Minutes and 56 Seconds
Vials: 253,680 Vials/H: 27,527
Wells placed: 106

Justin

2015-04-11 11:22:58

Nice release, I'll give it a run in the morning and post results :)

Thomas

2015-04-11 17:15:57

I suppose there isn't a time-out for accounts that dont set up a new well. They'll just keep on repeating the antiban. Will fix tomorrow!

Justin

2015-04-11 21:05:21

Running For: 4 Hours, 59 Minutes and 38 Seconds
Vials: 67,676 Vials/H: 13,551

Only ran 1 account, works very well, good job!

Thomas

2015-04-12 03:30:54

From: Justin
Running For: 4 Hours, 59 Minutes and 38 Seconds
Vials: 67,676 Vials/H: 13,551

Only ran 1 account, works very well, good job!


I almost get double the vials/hr? I average around 20-21k? Have you altered the code at all?

Justin

2015-04-12 03:35:02

From: lovebotter
I almost get double the vials/hr? I average around 20-21k? Have you altered the code at all?


I'm running the script on one of my servers. The FPS isn't the best on it and i'm also running at 300+ ms ping to the current world :)

I have made changes to the script (I never run a stock-standard script).

One thing I suggest you add into the main script is this (in the findNormalrandoms procedure)


procedure findNormalrandoms;
begin
exitSquealOfFortune;
ClaimSpinTicket;
closePollWindow();
if not (bankScreen.isOpen()) then
closepopup();
end;

Since I have all the delays, the closepopup() would try to close the banking interface, but while the mouse was moving to the X on screen, the bank screen would close (from pushing the preset buttons) and therefor making my character walk and then the script would stop as it was unable to find the well.

Thomas

2015-04-12 05:00:44

@Justin
Anything else you changed and might consider worth adding?
I will add that whenever I get home today. I assume it's a good habbit to have my findnormalrandoms setupinstructies like that in the feature?

Renzanity

2015-04-12 14:19:57

Great release! And thanks, now I can improve the procedure where I type in the amount of vials to get from the well. :D
Mine always misses when hitting enter so I had to use it in a quickchat world(W96) in 3 different locations. Thanks again!

Thomas

2015-04-12 16:55:41

From: renzanity
Great release! And thanks, now I can improve the procedure where I type in the amount of vials to get from the well. :D
Mine always misses when hitting enter so I had to use it in a quickchat world(W96) in 3 different locations. Thanks again!


Yes, I was torn about what I should use, as there wasn't a conversationbox function for that. I suppose the bankscreen withdraw window is exactly the same.

Will post an update to the script later today, optimized the script for accounts that don't place wells. Should be flawless now. I had a 8hr proggy at 21k vials/hr last night.

Hitting 27k vials/hr now since I switched to desktop.
Also found a new error in the script; it got stuck hovering over portable well when invent was full, probably trying to get another load. Fixed it already, will upload later today.

loginor

2015-04-13 03:30:34

Works great, but I have problems with relogging. Is it only related to this script or globally have been changed in the lobby view?

Thomas

2015-04-13 03:44:05

From: loginor
Works great, but I have problems with relogging. Is it only related to this script or globally have been changed in the lobby view?


I'm in the process of updating the login/setup procedures.

Rewritten the entire procedure, try again now if you can.

Also how to I make the progress report run every 5 minutes of runtime?
Currently I have added 5-6 rules and a global variable for something rather minor.

loginor

2015-04-13 04:12:00

From: lovebotter
Also how to I make the progress report run every 5 minutes of runtime?


I'm not sure, but maybe start a timer, convert it, then make an if, and after that start the timer again from 0.

Thomas

2015-04-13 04:43:20

From: loginor
I'm not sure, but maybe start a timer, convert it, then make an if, and after that start the timer again from 0.



That's what im doing currently, but would just like it to be based on runtime somehow

Renzanity

2015-04-13 04:49:31

Hey @lovebotter,

I suggest that you randomize your mouseSpeed so that it'd be more human-like and it could also improve the script's speed.

Add this line on your mainLoop and see the difference. -Originally got the tip from @Clarity:)

mouseSpeed := random(20, 40);

Thomas

2015-04-13 04:51:48

From: renzanity
Hey @lovebotter,

I suggest that you randomize your mouseSpeed so that it'd be more human-like and it could also improve the script's speed.

Add this line on your mainLoop and see the difference. -Originally got the tip from @Clarity:)

mouseSpeed := random(20, 40);


I aleady have that implemented a while back, it's in the antiban.

Renzanity

2015-04-13 13:19:00

From: lovebotter

Bans have been reported, use at your own risk.


Phew, I guess I'm lucky that mine haven't gotten me banned yet.

Thomas

2015-04-14 12:34:49

Can this thread be moved to the public money making section?

loginor

2015-04-14 12:39:42

From: lovebotter
Can this thread be moved to the public money making section?


Why would you do that?

Thomas

2015-04-14 12:51:39

From: loginor
Why would you do that?


Mainly for more feedback/bug reports.

loginor

2015-04-14 17:07:45

From: lovebotter
Mainly for more feedback/bug reports.


- Now with 1.3, It quite frequently open the preset settings at the bank interface, bugging out the whole program.
- It doesn't clear the debug boxes

Thomas

2015-04-14 17:41:15

From: loginor
- Now with 1.3, It quite frequently open the preset settings at the bank interface, bugging out the whole program.
- It doesn't clear the debug boxes

It has never cleared the debug boxes once they were drawn. I will add the clear atpa again in 1.4.

I would not know why it opens the preset settings tbh, do you know why it might happen?
I'll have a look for it later!

Can you try this version for me?
program Vials;
{$DEFINE SMART}
{$I srl-6/srl.simba}
{$i srl-6/lib/misc/srlplayerform.simba}

var
VialCount, WellCount: integer;
Timer: TTimeMarker;
ProgressTimer: TTimemarker;

const
TIMEOUT = 20000;

procedure initPlayerForm();
begin
with playerForm do
begin
name := 'Vials';
editBoxLabels := ['World'];
editBoxDefaults := ['124'];
checkBoxLabels := ['Placewell'];
checkBoxDefaults := ['True'];
end;
end;

procedure declarePlayers();
var
i: Integer;
begin
players.setup(playerForm.players);
currentPlayer := 0;
for i := 0 to high(players) do
with players[i] do
begin
world := strToInt(playerForm.players[i].settings[0]);
isMember := True;
booleans[0] := strToBool(playerForm.players[i].settings[1]);
end;
end;

procedure findNormalrandoms();
begin
claimTicket;
if (not bankScreen.isOpen()) then
closepopup();
tabBackpack.Open;
end;

procedure afk(duration: integer);
begin
if duration = 1 then
wait(gaussRangeInt(50, 160))
else
wait(gaussRangeInt(1100, 2200));
end;

procedure setCamera();
begin
afk(2);
minimap.clickCompass();
afk(2);
mainScreen.setAngle(MS_ANGLE_HIGH);
afk(2);
mainscreen.setZoom(true);
end;

function loginCheck(): boolean;
begin
if isLoggedIn() then
exit(true);
if not players[currentPlayer].login() then
exit(false);
findNormalrandoms();
mouseSpeed := 35;
setCamera();
exit(true);
end;

procedure antiban();
begin
case random(2000) of
1..3:
begin
hoverRandomSkill();
end;
4..40: mouseMovingObject;
41..60: sleepAndMoveMouse(randomRange(100, 2000));
61..120:
begin
mouseOffClient(4);
afk(2);
end;
121..140: afk(1);
141..200: randomMouseSpeed(2, 30, 40);
end;
end;

procedure progressReport();
var
vialsPH: Integer;
begin
vialsPH := round((VialCount * (3600.0 / (getTimeRunning / 1000.0))));
writeLn(padR('Running For: ' + timeRunning(), 60));
writeLn(padR('Vials: ' + groupDigits(VialCount, ','), 37) + padR('Vials/H: ' + groupDigits(vialsPH, ','), 23));
if players[currentPlayer].booleans[0] then
writeLn(padR('Wells placed: ' + groupDigits(WellCount, ','), 37));
ProgressTimer.start;
end;

function banking(preset: integer): Boolean;
begin
if not isLoggedIn then
exit(False);
Timer.start();
begin
repeat
if bankscreen.open(BANK_CHEST_BARB_OUTPOST) then
break();
setCamera();
if (Timer.getTime > TIMEOUT) or (not isLoggedIn()) then
exit(False);
until bankScreen.isOpen(2000) or pinscreen.isOpen();
if pinScreen.isOpen() then
pinScreen.enter(players[currentPlayer].bankPin);
repeat
if bankScreen.clickButton(preset) then
break;
if (timer.getTime > timeOut) or (not isLoggedIn) then
exit;
until (not bankScreen.isOpen);
end;
result := true;
end;

function findPortable(): Boolean;
var
i, x, y: integer;
portTPA: TPointArray;
portATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit();
findColorsSpiralTolerance(x, y, portTPA, 3031949, mainScreen.getBounds(), 10, colorSetting(2, 0.3, 1.7));
if length(portTPA) < 1 then
exit();
portATPA := portTPA.toATPA(35, 35);
portATPA.filterBetween(0, 20);
portATPA.sortFromSize(25, true);
if length(portATPA) < 1 then
exit();
smartImage.debugATPA(portATPA);
for i := 0 to high(portATPA) do
begin
middleTPAEx(portATPA[i], x, y);
mouse(x, y, 10, 11, MOUSE_MOVE);
if isMouseOverText(['well', 'ortab'], 2500) then
begin
portATPA := [];
exit(true);
end;
end;
end;

function renewPortable(): Boolean;
begin
if not isLoggedIn() then
exit();
writeln('Renewing Portable');
afk(2);
sendKeys('w', 200, 40);
if conversationBox.isOpen(5500) then
begin
conversationBox.selectOption(1);
inc(wellCount);
afk(2);
end;
result := findPortable();
end;

function getVials(): Boolean;
begin
if not isLoggedIn() then
exit();
tabBackpack.open();
if (not tabBackpack.isEmpty) then
exit();
Timer.start();
if isMouseOverText(['well', 'ortab'], 3300) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.isOpen(3000) then
if chooseOption.select(['ake vials', 'vials', 'vial'], 2000) then
if bankScreen._enterAmount(gaussRangeInt(30, 36), 4000) then
repeat
afk(1);
if (not isLoggedIn()) or (Timer.getTime > TIMEOUT) then
exit();
until tabBackpack.isFull();
VialCount := VialCount + 28;
result := true;
end;
end;

procedure waitPortable();
begin
Timer.start();
repeat
antiban();
if (Timer.getTime() > 120000) then
begin
writeln('No new well found in 2 minutes, terminating script');
players[currentPlayer].logout();
terminateScript();
end;
until findPortable() or (not isLoggedIn());
end;

procedure setup();
begin
disableSRLLog := true;
smartShowConsole := false;
disableSRLDebug := true;
smartEnableDrawing := true;
initPlayerForm();
runPlayerForm();
if (not playerForm.isScriptReady) then
terminatescript;
declareplayers();
setupSRL;
end;

procedure mainloop();
var
i, noWell: integer;
begin
while findPortable() do
begin
findNormalRandoms();
if tabBackpack.isEmpty() and getVials() then
begin
findNormalRandoms();
if banking(BANK_BUTTON_PRESET_1) and tabBackpack.isEmpty() then
begin
findNormalRandoms();
if (progressTimer.getTime > 60000) then
progressReport();
antiban();
end;
end;
end;
while (not findPortable()) do
begin
findNormalrandoms();
if players[currentPlayer].booleans[0] then
begin
if banking(BANK_BUTTON_PRESET_2) and tabBackpack.isEmpty() then
inc(nowell);
if (nowell = 4) then
begin
writeln('Failed withdrawing, shutting down');
players[currentPlayer].logout();
terminateScript();
end;
if tabBackpack.isItemInSlot(1) then
begin
findNormalRandoms();
if renewPortable() then
writeLn('renewed portable');
end;
end
else
waitPortable();
end;
end;

begin
setup();
while loginCheck() do
mainLoop();
end.

loginor

2015-04-14 18:46:26

From: lovebotter
It has never cleared the debug boxes once they were drawn. I will add the clear atpa again in 1.4.

I would not know why it opens the preset settings tbh, do you know why it might happen?
I'll have a look for it later!

Can you try this version for me?
program Vials;
{$DEFINE SMART}
{$I srl-6/srl.simba}
{$i srl-6/lib/misc/srlplayerform.simba}

var
VialCount, WellCount: integer;
Timer: TTimeMarker;
ProgressTimer: TTimemarker;

const
TIMEOUT = 20000;

procedure initPlayerForm();
begin
with playerForm do
begin
name := 'Vials';
editBoxLabels := ['World'];
editBoxDefaults := ['124'];
checkBoxLabels := ['Placewell'];
checkBoxDefaults := ['True'];
end;
end;

procedure declarePlayers();
var
i: Integer;
begin
players.setup(playerForm.players);
currentPlayer := 0;
for i := 0 to high(players) do
with players[i] do
begin
world := strToInt(playerForm.players[i].settings[0]);
isMember := True;
booleans[0] := strToBool(playerForm.players[i].settings[1]);
end;
end;

procedure findNormalrandoms();
begin
claimTicket;
if (not bankScreen.isOpen()) then
closepopup();
tabBackpack.Open;
end;

procedure afk(duration: integer);
begin
if duration = 1 then
wait(gaussRangeInt(50, 160))
else
wait(gaussRangeInt(1100, 2200));
end;

procedure setCamera();
begin
afk(2);
minimap.clickCompass();
afk(2);
mainScreen.setAngle(MS_ANGLE_HIGH);
afk(2);
mainscreen.setZoom(true);
end;

function loginCheck(): boolean;
begin
if isLoggedIn() then
exit(true);
if not players[currentPlayer].login() then
exit(false);
findNormalrandoms();
mouseSpeed := 35;
setCamera();
exit(true);
end;

procedure antiban();
begin
case random(2000) of
1..3:
begin
hoverRandomSkill();
end;
4..40: mouseMovingObject;
41..60: sleepAndMoveMouse(randomRange(100, 2000));
61..120:
begin
mouseOffClient(4);
afk(2);
end;
121..140: afk(1);
141..200: randomMouseSpeed(2, 30, 40);
end;
end;

procedure progressReport();
var
vialsPH: Integer;
begin
vialsPH := round((VialCount * (3600.0 / (getTimeRunning / 1000.0))));
writeLn(padR('Running For: ' + timeRunning(), 60));
writeLn(padR('Vials: ' + groupDigits(VialCount, ','), 37) + padR('Vials/H: ' + groupDigits(vialsPH, ','), 23));
if players[currentPlayer].booleans[0] then
writeLn(padR('Wells placed: ' + groupDigits(WellCount, ','), 37));
ProgressTimer.start;
end;

function banking(preset: integer): Boolean;
begin
if not isLoggedIn then
exit(False);
Timer.start();
begin
repeat
if bankscreen.open(BANK_CHEST_BARB_OUTPOST) then
break();
setCamera();
if (Timer.getTime > TIMEOUT) or (not isLoggedIn()) then
exit(False);
until bankScreen.isOpen(2000) or pinscreen.isOpen();
if pinScreen.isOpen() then
pinScreen.enter(players[currentPlayer].bankPin);
repeat
if bankScreen.clickButton(preset) then
break;
if (timer.getTime > timeOut) or (not isLoggedIn) then
exit;
until (not bankScreen.isOpen);
end;
result := true;
end;

function findPortable(): Boolean;
var
i, x, y: integer;
portTPA: TPointArray;
portATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit();
findColorsSpiralTolerance(x, y, portTPA, 3031949, mainScreen.getBounds(), 10, colorSetting(2, 0.3, 1.7));
if length(portTPA) < 1 then
exit();
portATPA := portTPA.toATPA(35, 35);
portATPA.filterBetween(0, 20);
portATPA.sortFromSize(25, true);
if length(portATPA) < 1 then
exit();
smartImage.debugATPA(portATPA);
for i := 0 to high(portATPA) do
begin
middleTPAEx(portATPA[i], x, y);
mouse(x, y, 10, 11, MOUSE_MOVE);
if isMouseOverText(['well', 'ortab'], 2500) then
begin
portATPA := [];
exit(true);
end;
end;
end;

function renewPortable(): Boolean;
begin
if not isLoggedIn() then
exit();
writeln('Renewing Portable');
afk(2);
sendKeys('w', 200, 40);
if conversationBox.isOpen(5500) then
begin
conversationBox.selectOption(1);
inc(wellCount);
afk(2);
end;
result := findPortable();
end;

function getVials(): Boolean;
begin
if not isLoggedIn() then
exit();
tabBackpack.open();
if (not tabBackpack.isEmpty) then
exit();
Timer.start();
if isMouseOverText(['well', 'ortab'], 3300) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.isOpen(3000) then
if chooseOption.select(['ake vials', 'vials', 'vial'], 2000) then
if bankScreen._enterAmount(gaussRangeInt(30, 36), 4000) then
repeat
afk(1);
if (not isLoggedIn()) or (Timer.getTime > TIMEOUT) then
exit();
until tabBackpack.isFull();
VialCount := VialCount + 28;
result := true;
end;
end;

procedure waitPortable();
begin
Timer.start();
repeat
antiban();
if (Timer.getTime() > 120000) then
begin
writeln('No new well found in 2 minutes, terminating script');
players[currentPlayer].logout();
terminateScript();
end;
until findPortable() or (not isLoggedIn());
end;

procedure setup();
begin
disableSRLLog := true;
smartShowConsole := false;
disableSRLDebug := true;
smartEnableDrawing := true;
initPlayerForm();
runPlayerForm();
if (not playerForm.isScriptReady) then
terminatescript;
declareplayers();
setupSRL;
end;

procedure mainloop();
var
i, noWell: integer;
begin
while findPortable() do
begin
findNormalRandoms();
if tabBackpack.isEmpty() and getVials() then
begin
findNormalRandoms();
if banking(BANK_BUTTON_PRESET_1) and tabBackpack.isEmpty() then
begin
findNormalRandoms();
if (progressTimer.getTime > 60000) then
progressReport();
antiban();
end;
end;
end;
while (not findPortable()) do
begin
findNormalrandoms();
if players[currentPlayer].booleans[0] then
begin
if banking(BANK_BUTTON_PRESET_2) and tabBackpack.isEmpty() then
inc(nowell);
if (nowell = 4) then
begin
writeln('Failed withdrawing, shutting down');
players[currentPlayer].logout();
terminateScript();
end;
if tabBackpack.isItemInSlot(1) then
begin
findNormalRandoms();
if renewPortable() then
writeLn('renewed portable');
end;
end
else
waitPortable();
end;
end;

begin
setup();
while loginCheck() do
mainLoop();
end.



Yeah, but I wrote you a private messeage, so let's continue our personal discussio nthere, avoiding spamming the forum.