SRL Archive - First Scripts

GE vial filler


lanadekat

2014-08-02 14:24:14

My first script :D Works pretty well, running for a few hours now.
known problems:
Sometimes doesn't click banker ( I have tried many things to fix this )
No antiban ( looking for a tutorial on how to make one)


program vialfiller;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

var
i : integer;

procedure Clickbank();
var
x, y: integer;
begin

if mainscreen.findObject(x, y, 1398387, 55, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['ank Banker'], MOUSE_LEFT) then
begin
wait(randomRange(540, 861));
writeLn('bank opened!');
wait(randomRange(531, 712));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomRange(540, 861));
bankScreen.withdraw(1, WITHDRAW_AMOUNT_ALL, ['ial']);
wait(randomRange(512, 1312));
bankScreen.close();
end;
end;



procedure fillvials();
var
x, y: integer;

begin
tabBackPack.mouseSlot(1, MOUSE_LEFT); //clicks vial in backpack
if mainscreen.findObject(x, y, 12757145, 25, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['se Vial'], MOUSE_LEFT) then //clicks fontain
begin
wait(randomRange(2000, 3000));
mouse(391, 338, 5, 20, MOUSE_MOVE); //click Fill
fastClick(MOUSE_LEFT);
wait(randomRange(17001, 18005));
writeLn('Fountain clicked!')
end;
end;

procedure walkfontain();
var
pathfontain: TPointArray;
begin
pathfontain := [Point(192, 205), Point(158, 223), Point(140, 249)]

if SPS.walkPath(pathfontain) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the mine');
end;

procedure walkbank();
var
pathbank: TPointArray;
begin
pathbank := [Point(140, 249), Point(158, 223), Point(192, 205)]

if SPS.walkPath(pathbank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the mine');
end;


begin
// initialize and prepare things
//
addOnTerminate('scriptTerminate');
ClearDebug();
smartEnableDrawing := true;
SetupSRL();
Players.Setup(['lol'], 'lol');
currentPlayer := 0;
SPS.setup('GEmap', RUNESCAPE_OTHER); // Setup our map
for i := 0 to high(players) do
begin
players[i].isActive := true;
end;
// do the work
//
while (players.getActive() > 0) do
begin
if (not isLoggedIn()) then
begin
if (not players[currentPlayer].login()) then break;
mainscreen.setangle(MS_ANGLE_HIGH);
exitSquealOfFortune();
end;
Clickbank();
walkfontain();
fillvials();
walkbank();
end;
end.

Spaceblow

2014-08-02 21:05:34

I'm still a noob, I just discovered Simba a few days ago, but I can tell your script does look good. You probably learned scripting by following The Mayor's guides, right? (that's what I'm doing atm :) )

I suggest you replace this:
exitSquealOfFortune();

By this:
exitTreasure();

Why? Because from what I've read the squeel of fortune doesn't exist anymore in RS3 and is now replaced by treasure hunter, correct me if I'm wrong.

For the antiban I advise you to explore the following link. You don't have to listen to me because I'm really just a beginner but that's what I would do.

http://docs.villavu.com/srl-6/antiban.html

Spaceblow

2014-08-02 21:47:21

Although I'm a noob myself this looks like a pretty good script to begin with. You probably learned all of this from Mayor's guides, right? I can see it by the style you made this script (I'm following his AIO guide at the moment).

You probably want to edit the writeLn lines at your walkfountain() and walkbank() procedures. It's saying something about mines while this script is clearly not about mining. I also suggest you to enter tabs at some places so it would look more organized. You should go to the following link (The Mayor's AIO guide). Do CTRL+F and type 'Indentation standards' so you would know what I'm talking about.
Link: villavu.com/forum/showthread.php?t=107757

I also advise you to change the following:
exitSquealOfFortune();

Into:
exitTreasure();

Why? Because the squeal of fortune is changed into treasure hunter in RS3, correct me if I'm wrong.

You don't have to do anything what I'm saying because I'm also a total beginner (I actually started to get into Simba a few days ago), but I think I could help you with the knowledge I've already achieved. I also recommend you to check out the following link about the antiban:
Link: docs.villavu.com/srl-6/antiban.html

Good job so far and keep up the good work! :)

KeepBotting

2014-08-02 22:05:14

From: Spaceblow

I also advise you to change the following:
exitSquealOfFortune();

Into:
exitTreasure();

Why? Because the squeal of fortune is changed into treasure hunter in RS3, correct me if I'm wrong.

You don't have to do anything what I'm saying because I'm also a total beginner (I actually started to get into Simba a few days ago), but I think I could help you with the knowledge I've already achieved. I also recommend you to check out the following link about the antiban:
Link: docs.villavu.com/srl-6/antiban.html

Good job so far and keep up the good work! :)

exitSquealOfFortune() is now a wrapper for exitTreasure(). The reason behind this is that the transition from SoF to Treasure Hunter only required a small update to SRL-6, and it would have been silly to remove the old routine, as that would have broken all the RS3 scripts. So it was left in.

Other than that, you're right, OP you've got some weird naming discrepancies in your script and the standards aren't quite up to par. Fix those and this will be a golden first script.

You may also want to look into tabBackpack.clickDtm() instead of .clickSlot(), it'll be more accurate & stable

The Mayor

2014-08-03 00:54:13

Nice first script, although you can use more some SRL6 functions to replace what you have for filling the vials. The production screen is the one where you select what you want to make and press staft/fill etc, and the progress screen is the one that pops up while your player making something.

You could change this:


procedure fillvials();
var
x, y: integer;
begin
tabBackPack.mouseSlot(1, MOUSE_LEFT); //clicks vial in backpack

if mainscreen.findObject(x, y, 12757145, 25, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['se Vial'], MOUSE_LEFT) then //clicks fontain
begin
wait(randomRange(2000, 3000));
mouse(391, 338, 5, 20, MOUSE_MOVE); //click Fill
fastClick(MOUSE_LEFT);
wait(randomRange(17001, 18005));
writeLn('Fountain clicked!')
end;

end;

To something like:


procedure fillvials();
var
x, y: integer;
begin
tabBackPack.mouseSlot(1, MOUSE_LEFT);

if mainscreen.findObject(x, y, 12757145, 25, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['se Vial'], MOUSE_LEFT) then //clicks fountain
begin
writeLn('Clicked fountain!');

if productionScreen.isOpen(5000) then
begin
writeLn('Production screen is open - pressing fill');
productionScreen.clickStart(true);

if progressScreen.isOpen(5000) then
begin
writeLn('Progress screen is open - waiting');

repeat
//antiBan(); //call your antiban procedure here
wait(randomRange(500, 1000));
until (progressScreen.getButton() < 1);

end else
writeLn('Progress screen didn''t appear within 5 sec');

end else
writeLn('Production screen didn''t appear within 5 sec');

end else
writeLn('Didn''t find the fountain');
end;

lanadekat

2014-08-03 06:19:11

From: The Mayor
Nice first script, although you can use more some SRL6 functions to replace what you have for filling the vials. The production screen is the one where you select what you want to make and press staft/fill etc, and the progress screen is the one that pops up while your player making something.

You could change this:


procedure fillvials();
var
x, y: integer;
begin
tabBackPack.mouseSlot(1, MOUSE_LEFT); //clicks vial in backpack

if mainscreen.findObject(x, y, 12757145, 25, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['se Vial'], MOUSE_LEFT) then //clicks fontain
begin
wait(randomRange(2000, 3000));
mouse(391, 338, 5, 20, MOUSE_MOVE); //click Fill
fastClick(MOUSE_LEFT);
wait(randomRange(17001, 18005));
writeLn('Fountain clicked!')
end;

end;

To something like:


procedure fillvials();
var
x, y: integer;
begin
tabBackPack.mouseSlot(1, MOUSE_LEFT);

if mainscreen.findObject(x, y, 12757145, 25, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['se Vial'], MOUSE_LEFT) then //clicks fountain
begin
writeLn('Clicked fountain!');

if productionScreen.isOpen(5000) then
begin
writeLn('Production screen is open - pressing fill');
productionScreen.clickStart(true);

if progressScreen.isOpen(5000) then
begin
writeLn('Progress screen is open - waiting');

repeat
//antiBan(); //call your antiban procedure here
wait(randomRange(500, 1000));
until (progressScreen.getButton() < 1);

end else
writeLn('Progress screen didn''t appear within 5 sec');

end else
writeLn('Production screen didn''t appear within 5 sec');

end else
writeLn('Didn''t find the fountain');
end;

after using your code, it runs back with only a few vials filled. progressScreen is the screen that opens after filling the vials? Cus it doesn't open , I think I disabled it somewhere in the setting but I don't find where.

edit: enabled the progressScreen again.
changing
if progressScreen.isOpen(5000) then
to
if progressScreen.isOpen(16000) then
works, but isn't there a way to let it wait till progressScreen is closed?

and when productionScreen opens, it clicks Fill really fast, not human like, I'm adding a random wait there.

anyway, I'm really suprised I'm not banned yet, botting money making method like 6 hours a day without antiban. Is this normal ? or I'm just really lucky? I'm used to get banned after botting 2 hours using the most popular rs bot ;)…

The Mayor

2014-08-03 07:27:03

From: lanadekat
progressScreen is the screen that opens after filling the vials?


No, it is the screen that appears while filling the vials. You have to enable 'make x progress window' in interface settings.

From: lanadekat

edit: enabled the progressScreen again.
changing
if progressScreen.isOpen(5000) then
to
if progressScreen.isOpen(16000) then
works, but isn't there a way to let it wait till progressScreen is closed?


This doesn't actually work. It's not detecting the progress screen is open, so it doesn't enter the repeat loop. You are just telling it to wait 16 seconds for the progress screen to be open. If you've enabled it in the interface settings but it's still not working (you can tell if it prints the message) then reset your interfaces to oldschool.

From: lanadekat

but isn't there a way to let it wait till progressScreen is closed?


It does, this code repeats until it cannot see the red cancel button anymore


repeat
//antiBan(); //call your antiban procedure here
wait(randomRange(500, 1000));
until (progressScreen.getButton() < 1);



From: lanadekat


and when productionScreen opens, it clicks Fill really fast, not human like, I'm adding a random wait there.

anyway, I'm really suprised I'm not banned yet, botting money making method like 6 hours a day without antiban. Is this normal ? or I'm just really lucky? I'm used to get banned after botting 2 hours using the most popular rs bot ;)…


productionScreen.clickStart(true);

The true means it will actually press spacebar. Set it to false if you actually want to click the button. Because your script isn't flawless, you're the only one using it, and more importantly you're using colour (your script can only see what a human can see), why would you expect to be banned? This isn't powerbot.

lanadekat

2014-08-03 07:57:45

From: The Mayor
No, it is the screen that appears while filling the vials. You have to enable 'make x progress window' in interface settings.



This doesn't actually work. It's not detecting the progress screen is open, so it doesn't enter the repeat loop. You are just telling it to wait 16 seconds for the progress screen to be open. If you've enabled it in the interface settings but it's still not working (you can tell if it prints the message) then reset your interfaces to oldschool.



It does, this code repeats until it cannot see the red cancel button anymore


repeat
//antiBan(); //call your antiban procedure here
wait(randomRange(500, 1000));
until (progressScreen.getButton() < 1);





productionScreen.clickStart(true);

The true means it will actually press spacebar. Set it to false if you actually want to click the button. Because your script isn't flawless, you're the only one using it, and more importantly you're using colour (your script can only see what a human can see), why would you expect to be banned? This isn't powerbot.

I'm not the only one botting this. And jagex doesn't like goldfarming bots. And on pb forum they say jagex detects mouse movement and stuff like that.

progressScreen didn't apear after 5 second:
http://prntscr.com/493kpn

anyway, the script is stable right now, and I would like to make a proggy.
like:
time ran:
vials filled:
loads done:
vials p/h:
is there a tutorial or something else to learn it?

Ashaman88

2014-08-03 08:19:52

just wait for the inventory pixel change in slot 28… see my herb or fletch script for an example….. basically there is an srl function that detects pixel changes by slot. You could also just have it wait for the blue color in the last slot… lots of different ways to do it.

The Mayor

2014-08-03 16:46:11

From: lanadekat
I'm not the only one botting this. And jagex doesn't like goldfarming bots. And on pb forum they say jagex detects mouse movement and stuff like that.

progressScreen didn't apear after 5 second:
http://prntscr.com/493kpn

anyway, the script is stable right now, and I would like to make a proggy.
like:
time ran:
vials filled:
loads done:
vials p/h:
is there a tutorial or something else to learn it?


progress screen must not work for vials ?? Do what ashaman said and wait for slot 28 to change colour. Easiest way is:

tabBackpack.waitSlotPixelChange(28, 15000);


RE then progress report, read the progress report part in my AIO tutorial, it shows you how to calculate the variables you want.

lanadekat

2014-08-04 06:08:21

From: The Mayor
progress screen must not work for vials ?? Do what ashaman said and wait for slot 28 to change colour. Easiest way is:

tabBackpack.waitSlotPixelChange(28, 15000);


RE then progress report, read the progress report part in my AIO tutorial, it shows you how to calculate the variables you want.

ok, thanks a lot for your help and your tutorials!


repeat
//antiBan(); //call your antiban procedure here
wait(randomRange(500, 1000));
until tabBackpack.waitSlotPixelChange(28, 15000);

this does it I hope.
I can't test cus I think bankScreen.isOpen(); broke by update notification
I will try it in 25 min

edit: doesn't work lol, just using wait for now, It doesn't need to be failsafe, it's for goldfarming and if it crashes I restart it, this also helps against bans xD
And wait does the same thing , it just waits a second more …

The Mayor

2014-08-04 15:44:49

From: lanadekat


edit: doesn't work lol, just using wait for now, It doesn't need to be failsafe, it's for goldfarming and if it crashes I restart it, this also helps against bans xD
And wait does the same thing , it just waits a second more …


It works, you must have implemented it wrong :(

lanadekat

2014-08-04 16:35:38

From: The Mayor
It works, you must have implemented it wrong :(


Now I see, it doesn't detect the progressScreen so it doesn't enter the repear-untill loop.
I'm gonna try to rewrite that part.

edit: yes it works now, thanks!

CRASH_OVERRIDE

2014-08-23 01:31:15

Obviously my script is really outdated, and since i have made it, theirs been a lot more better functions and procedures invented since, but if you like you can use parts of it if needed as well:

https://villavu.com/forum/showthread.php?t=95571

primaz

2015-01-20 11:52:03

gonna test this script