SRL Archive - First Scripts

Vial of water retriever from portable well. Currently 1 MILLION GP/HOUR


loginor

2015-04-04 18:36:34

Vial retriever

Version: 1.0
OUTDATED


Greetings!

My first published script. I hope you will enjoy this.

Features:
- Places well if there isn't one next to you.
- Retrieves vial of waters.
- Basic progress report.

Setup:
- Interpreter: LAPE
- You have to be member to use this.
- Be at Shantay past in front of the bank chest.
- Chat must be as little as possible
- MUST set preset 1 and preset 2
-Preset 1: Make it an empty iventory
-Preset 2: 1 portable well
- Put portable well into the first actionbar slot!
- At the start of your script look for username, password, and current vial of water price.


Currently, if you lag free, it makes about 1.000.000 gp per hour. I'm sure it will crash pretty soon if you use this.

CAUTION!
It doesn't have any antiban, so use it at your own risk.

I would like to hear some feedback about the programming idea, it's look, what I should and should not do next time.

Also looking for bug reports.
When you make a feedback, keep in mind that this is my first script.

If you want to read the code on the forum, look for it in the next post.

Progress report from yesterday:

========================================================
========================================================
========================================================
193648 vial-t szereztem eddig.
7745920GP hasznot hoztam eddig
Ennyi ideje fut: 8 Hours, 29 Minutes and 1 Second
========================================================
========================================================
========================================================

(It's hungarian, but I am pretty sure you will understand, first row is number of vials retrieved, second is the overall value of the stuff and last is the time it ran for.)

loginor

2015-04-04 18:37:35

//—reserved—//

program scriptTemplate;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
//-----------------------------------VARIABLES-------------------------------------------
var
X, Y, kesz, profitss, vialPrice: Integer;
bankhely, wellhely: TBox;
//------------------------------------PROCEDURES-----------------------------------------
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
vialPrice := ; //Vial price for stats
loginName := ''; //Username
password := ''; //Password
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;
procedure kezdes();
begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();

if not isLoggedIn() then
begin
players[currentPlayer].login();
wait(randomRange(20000, 30000));
exitTreasure();
wait(randomRange(2000, 5000));
end;
minimap.clickCompass();
mainscreen.setZoom(false);
end;

procedure visszalog();
begin
players[currentPlayer].login();
wait(randomRange(20000, 30000));
exitTreasure();
wait(randomRange(2000, 5000));
minimap.clickCompass();
mainscreen.setZoom(false);
end;

procedure wellplace();
begin
mouseBox(wellhely, MOUSE_MOVE);
fastClick(MOUSE_RIGHT);
end;

procedure bankplace();
begin
mouseBox(bankhely, MOUSE_MOVE);
fastClick(MOUSE_RIGHT);
end;

procedure freshwell();
begin
bankplace();
if (chooseOption.isOpen(2500)) then
begin
chooseOption.select(['pen', 'Open', 'pen Sha', 'pen Shantay' ], 2000);
if bankScreen.isOpen(5000) then
begin
typeSend('2', false);
if tabBackpack.waitWhileLocked(5000) then
begin
typeSend('1', false);
if conversationBox.isOpen(3000) then
begin
conversationBox.selectOption(1);
wait(15000);
end else
begin
typeSend('1');
end;
end else
begin
typeSend('2', false);
end;
end else
begin
chooseOption.select(['pen', 'Open', 'pen Sha', 'pen Shantay' ], 2000);
end;
end else
begin
bankplace();
end;
end;

procedure depositnow();
begin
bankplace();
if (chooseOption.isOpen(2500)) then
begin
chooseOption.select(['pen', 'Open', 'pen Sha', 'pen Shantay' ], 2000);
if bankScreen.isOpen(5000) then
begin
typeSend('1', false);
if tabBackpack.waitWhileLocked(5000) then
begin
end else
begin
typeSend('1', false);
end;
end else
begin
chooseOption.select(['pen', 'Open', 'pen Sha', 'pen Shantay' ], 2000);
end;
end else
begin
bankplace();
end;
end;

procedure stats();
begin
kesz := kesz + 28;
profitss := kesz * vialPrice;
writeLn('========================================================');
writeLn('========================================================');
writeLn('========================================================');
writeln(IntToStr(kesz) + ' Vial has been retrieved');
writeln(IntToStr(profitss) + 'GP has been earned!');
writeln('Time it ran for: '+timeRunning);
writeLn('========================================================');
writeLn('========================================================');
writeLn('========================================================');
end;

//----------------------------------------MAIN LOOP---------------------------------------------------
begin
wellhely := IntToBox(260, 280, 300, 360);
bankhely:= IntToBox(401, 191, 446, 257);
mouseSpeed:= 50;
kezdes();
While true do
begin
if not isLoggedin() then
begin
visszalog();
end;
if not (tabBackpack.isOpen()) then
begin
tabBackpack.Open();
end;
While isLoggedin() do
begin
wellplace();
if (chooseOption.isOpen(2500)) then
begin
if chooseOption.select(['ake vials', 'Take', 'ake', 'vials', 'ials', 'vial' ], 2000) then
begin
while actionBar.isSlotEmpty(6) and tabBackpack.isEmpty do
begin
wait(200);
end;
typeSend('28');
depositnow();
stats();
end else
begin
freshwell();
end;
end else
begin
wellplace();
end;
end;
end;
end.

chubeam

2015-04-04 21:12:23

Grats on script!

J_R

2015-04-05 05:36:27

Grats on release, I would suggest changing your wait(xxxx) to wait(randomRange(xxxx, yyyy)) everywhere in your script though as static waits are usually a red flag for bots as humans can't do things exactly on the same time every time.

loginor

2015-04-05 11:05:41

In fact, when there is static wait time, it's actually not, because the following procedures always have different finish time, so clicking occurs dinamically randoms.

Renzanity

2015-04-05 14:47:24

Nice 1st script!:norris:

I actually have this one as a private script.:p
Porta-well riot ftw!

Clutch

2015-04-06 14:34:44

Needs some improvement. You had a 200 (.2 sec) wait time to type in 28 which was causing it to not work and several other bugs. I altered that to this; (starts at line 158)
     begin
if chooseOption.select(['ake vials', 'Take', 'ake', 'vials', 'ials', 'vial' ], 2000) then
wait(RandomRange(1000,1400));
typeSend('28', True);
depositnow();
stats();
end else
Performance is still there and it's much smoother. Still got some kinks that need working out though.
1. If you run out of wells, it will endlessly spam click, try implementing a timer so that if it spam clicks for x amount of time it'll terminate the script.
2. It will sometimes spawn 2 wells

Renzanity

2015-04-06 14:46:15

When you get to the part where you can finally use TPA/findObj, you'll be able to make this run smoother than butter on pancakes. ;)

Polack

2015-04-06 16:54:24

Add to requirements that you need to set interpreter to Lape.

J_R

2015-04-06 18:32:53

From: loginor
In fact, when there is static wait time, it's actually not, because the following procedures always have different finish time, so clicking occurs dinamically randoms.


As unintuitive as it sounds, this is absolutely not true. Computers are super fast, all the procedures will actually probably run in a time which is far less than the millisecond range. If I see 1k clicks/patterns separated by the same time +- like a millisecond it's one of the biggest red flags you can see. You'll find that the clicking occurs not dynamically at random, but uniformly at almost the same time with a standard deviation of like 0.

loginor

2015-04-07 08:44:33

As unintuitive as it sounds, this is absolutely not true. Computers are super fast, all the procedures will actually probably run in a time which is far less than the millisecond range. If I see 1k clicks/patterns separated by the same time +- like a millisecond it's one of the biggest red flags you can see. You'll find that the clicking occurs not dynamically at random, but uniformly at almost the same time with a standard deviation of like 0.


Is this still true if I run several clients on the same cpu?

Add to requirements that you need to set interpreter to Lape.


Fixed.

When you get to the part where you can finally use TPA/findObj, you'll be able to make this run smoother than butter on pancakes.


I'm pretty sure I will be able to use them pretty soon.

Needs some improvement. You had a 200 (.2 sec) wait time to type in 28 which was causing it to not work and several other bugs. I altered that to this; (starts at line 158)
Simba Code:
begin
if chooseOption.select(['ake vials', 'Take', 'ake', 'vials', 'ials', 'vial' ], 2000) then
wait(RandomRange(1000,1400));
typeSend('28', True);
depositnow();
stats();
end else
Performance is still there and it's much smoother. Still got some kinks that need working out though.
1. If you run out of wells, it will endlessly spam click, try implementing a timer so that if it spam clicks for x amount of time it'll terminate the script.
2. It will sometimes spawn 2 wells



That random time would decrease the performance by a signifficant amount. This vial method needs as little wait times as possible.

Nice 1st script!

I actually have this one as a private script.
Porta-well riot ftw!


If I had the money, I would buy a hell lot of PWs, then publish a far better script (If I had the knowledge of course), and boom, PWs will be in the range of 35-40k in a few days. That's how you make money :P





EVERYONE!
Thank you for your feedback, still waiting ideas for discussion.

J_R

2015-04-08 02:27:15

Should be, I'm not super experienced in running like 50 accounts on the same cpu though. I would not depend on trying to run so many things on your CPU that you 'intentionally' turn it into something that is random…that's about as bad design as you could do

But it's such a simple fix that the benefits of changing wait(200) to like wait(randomrange(175,225)) or 200,250 if 200 is the absolute minimum you can get, the benefits (harder to detect, increasing longevity), at least in my opinion, far outweigh the 'costs' in performance which will probably be negligible

loginor

2015-04-08 03:23:33

From: J_R
Should be, I'm not super experienced in running like 50 accounts on the same cpu though. I would not depend on trying to run so many things on your CPU that you 'intentionally' turn it into something that is random…that's about as bad design as you could do

But it's such a simple fix that the benefits of changing wait(200) to like wait(randomrange(175,225)) or 200,250 if 200 is the absolute minimum you can get, the benefits (harder to detect, increasing longevity), at least in my opinion, far outweigh the 'costs' in performance which will probably be negligible



I see your point, the question is how much +- between click would be enough to make their botwatch a little bit softer?

Thomas

2015-04-08 08:51:30

I would recommend looking for colors of the well instead of using a Tbox.
Here are the colors I got from ACA (CTS 2):

color: 3031686
Hue mod: 0,19
HSL tol: 16
Sat mod: 1,07

loginor

2015-04-08 09:02:55

From: lovebotter
I would recommend looking for colors of the well instead of using a Tbox.
Here are the colors I got from ACA (CTS 2):

color: 3031686
Hue mod: 0,19
HSL tol: 16
Sat mod: 1,07



Thank you very much, in the next 2 week, I will publish a new version with color recognition, and some kind of antiban.

J_R

2015-04-09 02:16:58

From: loginor
I see your point, the question is how much +- between click would be enough to make their botwatch a little bit softer?


I normally try to make it 50ms at least (+-25), for much longer waits you probably want something larger, but you should model it after what a human would do.

loginor

2015-04-09 03:20:20

From: J_R
I normally try to make it 50ms at least (+-25), for much longer waits you probably want something larger, but you should model it after what a human would do.


A massive test would be needed to compare, would the human-like behavior longer the accounts lifetime that it would worth scripting or not. It's requirement free method, so account replaceable everytime (only the membership, but thats about 10 hour of running only).

J_R

2015-04-09 06:16:08

I'm just suggesting something that I see almost every good script on the site does. I'd rather not try to risk it as I don't think it's worth 1/20 of a ms faster action on something that takes at least a second to complete. At the end of the day though only jagex truly knows what they ban for, you could be right in that it might not matter for you/jagex but I don't think it's wise to avoid something which can only help you while probably only costing you something like a couple k per hour profit if even that (if you go 175,225 instead of 200 it should in theory even out to be exactly the same). It's generally a good practice to try to not appear bot-like if you are coding for a bot somewhere it isn't exactly sanctioned.

If you do start getting banned though (which becomes more likely if/when tons of people start using this), do get rid of the static waits and see if that helps.

loginor

2015-04-09 06:57:45

From: J_R
I'm just suggesting something that I see almost every good script on the site does. I'd rather not try to risk it as I don't think it's worth 1/20 of a ms faster action on something that takes at least a second to complete. At the end of the day though only jagex truly knows what they ban for, you could be right in that it might not matter for you/jagex but I don't think it's wise to avoid something which can only help you while probably only costing you something like a couple k per hour profit if even that (if you go 175,225 instead of 200 it should in theory even out to be exactly the same). It's generally a good practice to try to not appear bot-like if you are coding for a bot somewhere it isn't exactly sanctioned.

If you do start getting banned though (which becomes more likely if/when tons of people start using this), do get rid of the static waits and see if that helps.



I agree with you, we will see, as I meantioned earlier, I will release an update with some kind of antiban (wil lfix the statics in it) in the upcoming weeks.

ckbbe

2015-04-12 13:05:49

I have no idea how u managed to run it for 8 hours,it does whatever it wants,doesnt wait for nothing.Get vials,open bank,type 28 send,spawn new well.. horrible.
Altho nice idea and script,but doesnt work for me.

Thomas

2015-04-12 17:30:19

@ckbbe I have a pretty flawless version with minor antiban etc in the junior member section.

iriep12345

2015-04-19 11:29:24

does this still make 1m an hour or did it crash?

loginor

2015-04-21 03:16:21

From: iriep12345
does this still make 1m an hour or did it crash?


Sinking quite badly and I'm pretty sure it's sensitive to bans. No longer 1 mill.

iriep12345

2015-04-21 11:26:46

oh is there a high ban rate ?