SRL Archive - Archive

lovebotter - SRL Member Application


Thomas

2015-05-09 12:46:31

How Long have You Played Runescape?
10 Year(s)


Are you affilated in anyway with Jagex LTD?
No.

Were you Referred to SRL?
Not via a referring system. An IRL friend told me about it around the clusterflutter era IIRC.


What is your general programming knowledge?
Basic java and html, not much else besides that. Starting out with OGL scripts currently.


Are you a member of any other communities?
Member on powerbot forum (mainly using that for goldselling currently)
On RuneScape I'm member of the DGS clan.


Tell us about yourself…
From: lovebotter
I am a 23 year old, Belgian medicine student, 2nd year of my masters education. Leaving for a year of internships this summer.

Interests are my fraternity, F1 and some geek stuff: mainly computer hardware (sucker for ITX systems, mechanical keyboards and Lian Li computer cases).

Games I play are CS:S, RuneScape (I only stake on various accounts and have a small botting farm) and sometimes CS:GO.
I used to be somewhat of a known DG'er when EoC got released.



Please show us one (or multiple) of your scripts.
BasicCombine script, this gets updated most frequently. Check standards etc in this script.
https://villavu.com/forum/showthread.php?t=112765
program BasicCombine;
{$DEFINE SMART}
{$I srl-6/srl.simba}
{$i srl-6/lib/misc/srlplayerform.simba}

var
FailTimer: TTimeMarker;

type
SPFInteger_Enum = (SPF_BREAK, SPF_BREAK_DURATION);
SPFBoolean_Enum = (SPF_TAKE_BREAKS);
SPFString_Enum = (SPF_BANK);

procedure initPlayerForm();
begin
with playerForm do
begin
name := 'BasicCombine';
editBoxLabels := ['Break after', 'Break for', 'World'];
editBoxDefaults := ['120', '10', '-1'];
checkBoxLabels := ['Take Breaks'];
checkBoxDefaults := ['False'];
comboBoxLabels := ['Bank'];
comboBoxDefaults := ['BANK_NPC_BLUE'];
setLength(comboBoxItems, length(comboBoxLabels));
comboBoxItems[0] := ['BANK_NPC_BLUE', 'BANK_NPC_GREY', 'BANK_NPC_GREEN', 'BANK_NPC_DRAYNOR', 'BANK_BOOTH', 'BANK_GE', 'BANK_CHEST_SW', 'BANK_CHEST_SHANTAY', 'BANK_CHEST_DUEL', 'BANK_CHEST_CW', 'BANK_CHEST_GROTTO', 'BANK_TABLE_BURTHORPE', 'BANK_CHEST_LUMBRIDGE', 'BANK_CHEST_PRIFDDINAS', 'BANK_CHEST_BARB_OUTPOST'];
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
players[i].integers[Ord(SPF_BREAK)] := strToInt(playerForm.players[i].settings[0]);
players[i].integers[Ord(SPF_BREAK_DURATION)] := strToInt(playerForm.players[i].settings[1]);
world := strToInt(playerForm.players[i].settings[2]);
players[i].booleans[Ord(SPF_TAKE_BREAKS)] := strToBool(playerForm.players[i].settings[3]);
players[i].strings[Ord(SPF_BANK)] := playerForm.players[i].settings[4];
end;
end;

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

function loginCheck(): boolean;
begin
if isLoggedIn() then
exit(true);
if (not players[currentPlayer].login()) then
exit(false);
wait(gaussRangeInt(3000, 6000));
findNormalrandoms();
exit(true);
end;

procedure antiban();
begin
case random(200) of
0..10: mouseMovingObject;
11..60: sleepAndMoveMouse(randomRange(500, 2000));
61..120:
begin
mouseOffClient(4);
wait(gaussRangeInt(100, 2500));
end;
121..180: wait(gaussRangeInt(500, 1000));
181..199: randomMouseSpeed(2, 20, 30);
end;
end;

procedure takeBreak();
begin
if (players[currentPlayer].worked.getTime() > (60 * randomRange(1000, 1200) * players[currentPlayer].integers[SPF_BREAK])) then
begin
players[currentPlayer].exitToLobby();
mouseOffClient(OFF_CLIENT_RANDOM);
writeLn('Breaking for ' + toStr(players[currentPlayer].integers[SPF_BREAK_DURATION]) + 'minutes');
wait(60 * randomRange(1000, 1200) * players[currentPlayer].integers[SPF_BREAK_DURATION]);
loginCheck();
players[currentPlayer].worked.start();
end;
end;

function banking(): Boolean;
begin
FailTimer.start();
repeat
if (FailTimer.getTime() > (randomRange(1000, 1200) * 40)) or (not isLoggedIn()) then
begin
writeLn('Failed banking, shutting down');
players[currentPlayer].logout();
terminateScript();
end;
if (not bankscreen.open(GetGlobal(players[currentPlayer].strings[SPF_BANK]))) then
case random(10) of
0..6: minimap.clickCompass(random(2));
7..9: minimap.setAngle(random(360));
end;
pinScreen.enter(players[currentPlayer].bankPin);
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
until waitTypeFunc(@ tabBackpack.isFull, random(300) , randomRange(6000, 8000));
exit(True);
end;

function makeItems(): boolean;
begin
FailTimer.start();
repeat
if (not isLoggedIn()) or (FailTimer.getTime() > (randomRange(1000, 1200) * 50)) then
exit();
tabBackpack.mouseSlot(1, MOUSE_LEFT);
wait(gaussRangeInt(100, 300));
tabBackpack.mouseSlot(2, MOUSE_LEFT);
if productionScreen.IsOpen(randomRange(3000, 5000)) then
begin
wait(randomRange(100, 300));
productionScreen.clickStart();
end;
until tabBackpack.waitForShift(randomRange(4000, 6000));
exit(True);
end;

procedure progressReport();
var
ItemCount, potsPerHour: Integer;
begin
IncEx(ItemCount, 14);
clearDebug();
potsPerHour := round((ItemCount * 60) / (getTimeRunning() / 60000));
writeLn('Runtime: ' + timeRunning(TIME_ABBREV));
writeLn('Items Made: ' + toStr(ItemCount) + ' (' + toStr(potsPerHour) + ' PH)');
end;

procedure mainloop();
begin
findNormalRandoms();
if banking() and makeItems() then
repeat
if (not isLoggedIn()) or (FailTimer.getTime() > (randomRange(1000, 1200) * 90)) then
exit();
findNormalRandoms();
antiBan();
until not (tabBackpack.IsItemInSlot(27));
wait(gaussRangeInt(200, 1000));
progressReport();
if players[currentPlayer].booleans[SPF_TAKE_BREAKS] then
takeBreak();
end;

procedure setup();
begin
initPlayerForm();
runPlayerForm();
if (not playerForm.isScriptReady) then
terminatescript();
declareplayers();
smartShowConsole := False;
setupSRL();
disableSRLDebug := True;
mouseSpeed := 25;
end;

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

Public version of the app script; Barbarian Assault Portable Wells. Check ATPA use in this script. Hasn't been updated much due to bans being reported.
https://villavu.com/forum/showthread.php?t=112694
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
exit(True);
until (Timer.getTime > TIMEOUT) or (not isLoggedIn());
end;
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
exit(true);
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);
wellCount += 1;
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 += 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.

My first guide: Using knownledge of the SRL includes to remove duplicate code and improve logic.
This guide should be updated sometime soon, mainly the layout and more examples.
https://villavu.com/forum/showthread.php?t=112779

SRL backpack function updates (waitTime: integer = 0) (Before I learned about waitTypeFunc)
https://villavu.com/forum/showthread.php?t=112744

Open grandexchange function
https://villavu.com/forum/showthread.php?t=112735

Clarity

2015-05-09 13:11:06

Glad to see you reapply. Please put your scripts in script tags (
)!  We much prefer this over links :)

Thomas

2015-05-09 13:17:21

From: Clarity
Glad to see you reapply. Please put your scripts in script tags (
)!  We much prefer this over links :)


Added the two scripts, the other links are worth looking at aswell imo. (Mainly the guide then, as I need some more feedback there)

The Mayor

2015-05-11 13:47:27

Looks good! Although in your first script, what happens when you run out of items (i.e., the backpack is never full after clicking the preset)? Does it Open bank -> click preset, repeat this for 45sec?

Thomas

2015-05-11 13:52:43

From: The Mayor
Looks good! Although in your first script, what happens when you run out of items (i.e., the backpack is never full after clicking the preset)? Does it Open bank -> click preset, repeat this for 45sec?



Yes, I had it stop after 3 attempts before, could add that again. I also had opening bank and inv check after banking in seperate repeats with seperate failsafes.

The Mayor

2015-05-11 13:57:22

From: lovebotter
Yes, I had it stop after 3 attempts before, could add that again. I also had opening bank and inv check after banking in seperate repeats with seperate failsafes.


Well you seem to know what you're doing. Yes from me :)

CynicRus

2015-05-15 08:11:39

Yes from me.

Hoodz

2015-05-15 12:19:56

yes!

Ian

2015-05-15 12:37:23

Yes :)

Thomas

2015-05-16 08:20:38

From: BMWxi
Yes :)


From: hoodz
yes!


From: CynicRus
Yes from me.


From: The Mayor
Well you seem to know what you're doing. Yes from me :)


Thanks everyone!

StickToTheScript

2015-05-22 22:22:43

Looks good! You show that you know how to use TPAs and ATPAs and the overall basics of SRL. Along with the Snippets and tutorials you have written.

Yes from me!

Good luck!

Incurable

2015-05-22 23:14:35

Yup. :)

King

2015-05-23 01:38:38

Looking at the guides, along with the TPA's and ATPA's, plus the standards are good as well, I see no reason not to vote yes. Good job.

Thomas

2015-05-23 02:24:38

From: StickToTheScript
Looks good! You show that you know how to use TPAs and ATPAs and the overall basics of SRL. Along with the Snippets and tutorials you have written.

Yes from me!

Good luck!


From: Incurable
Yup. :)


From: King
Looking at the guides, along with the TPA's and ATPA's, plus the standards are good as well, I see no reason not to vote yes. Good job.


Thanks!
I might release a combat script soon, unsure about it though as I currently use it to farm dpicks, but could make a public version for various NPCs :) and have it not loot.
I created 3 versions of it, all using different libs: oglib, ogl-srl combination and only srl..
Due to lag occuring after a couple hours of both the OGL versions I currently only use the SRL version. And that would be the one I might release.

Fitta

2015-05-24 11:43:57

Clear yes.

Thomas

2015-05-24 13:52:49

From: Fitta
Clear yes.



Thanks :) either the vote count hasnt gone up yet or you have forgotten to vote ;)

Ian

2015-05-24 13:58:27

From: lovebotter
Thanks :) either the vote count hasnt gone up yet or you have forgotten to vote ;)


Or Fitta voted earlier but only posted now.

Hoodz

2015-05-24 14:55:52

From: lovebotter
Thanks :) either the vote count hasnt gone up yet or you have forgotten to vote ;)

From: BMWxi
Or Fitta voted earlier but only posted now.


the poll is already closed.
@Justin;

Justin

2015-05-24 20:44:53

Accepted.

Congratulations.