SRL Archive - RS3 Outdated / Broken Scripts

herb cleaner


radiclerobby

2009-09-25 15:57:00

Hello all I know i havent been very active but im going to start being active now this is my herb cleaning script set up bank like so also use this in lumby bank ( reason i picked lumby bank is only 1 bank so faster banking)


also any bugs/ comments/ suggestions are appriciated

you may ask

why clean herbs this is very simple with alot of herbs you can clean them and sell them for profit so thats exp + money what a deal so tell me what you think and i may update

thanks to jad for letting me use his chooseoptionquick function its really ownage

radiclerobby

2009-09-25 20:13:06

bugs?/suggestions?

lightcam999

2009-09-26 21:05:12

will try this out when i get some herbs

edit: suggestion:
use the take all option

bug? if there are to many ppl at the bank it hovers over someones name instead of clicking in the bank

Rich

2009-09-26 22:01:32

Tidied up version with anti-ban, better anti-randoms, banking failsafes, and just neater in general:

program HerbCleaner;
{.include srl/srl.scar}

var
Cords : TBoxArray;
Z, X ,Y, I, D : Integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 2;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin:= '0000';
Players[0].BoxRewards := ['XP', 'Gem', 'oins', 'oal'];
Players[0].Active := True;

Players[1].Name := '';
Players[1].Pass := ''
Players[1].Nick := '';
Players[1].Pin:= '0000';
Players[1].BoxRewards := [ 'XP', 'Gem', 'oins', 'oal'];
Players[1].Active := false;
end;

procedure MouseAntiBan;
var
MS, C, V : Integer;

begin
case Random(3) of
0 : begin
if not LoggedIn then Exit;
MS:= MouseSpeed;
MouseSpeed:= 8 + Random(7);
MouseBox(MSX1, MSY1, MIX2, MIY2, 2);
Wait(1000) + (Random(750)));
repeat
if OptionExist('xamine', False) then
begin
ChooseOption('xamine');
Break;
end else
ChooseOption('ancel');
until(True);
MouseSpeed:= MS;
end;
1 : begin
GetMousePos(C, V);
MMouse(X - 100, Y - 100, 200, 200);
end;
2 : begin
GetClientDimensions(X, Y);
MMouse(0, 0, X, Y);
end;
end;
end;

procedure SRL_AntiBan;
begin
case Random(6) of
0 : BoredHuman;
1 : PickUpMouse;
2 : RandomRClick;
3 : RandomMovement;
4 : ExamineInv;
5 : RandomAngle(True);
end;
end;

procedure AntiBan;
begin
AntiRandoms;
case Random(75) of
0 : MouseAntiBan;
1 : SRL_AntiBan;
end;
end;

procedure AntiRandoms(DoAntiBan : Boolean);
begin
FindNormalRandoms;
if FindFight then
RunAway('N', True, 1, 6);
if LevelUp then
WriteLn('We just leveled up!');
if DoAntiBan then
AntiBan;
end;

function ChooseOptionQuick(XX, YY, Option : Integer): Boolean;//Made by JAD!
var
Mx, My, I, T : Integer

begin
if not LoggedIn then
Exit;
AntiRandoms(False);
My:= YY + 25 + Random(7); //28 = Perfect
Mx:= XX + Random(37);
if Option <> 1 then
for I:= 2 to Option do
IncEx(My, 15);
MMouse(Mx, My, 0, 0);
MarkTime(T);
repeat
Wait(50 + Random(40));
Result:= FindColor(Mx, My, 6121839, Mx-25, My ,Mx+25, My+2)
if Result then
begin
GetMousePos(Mx, My);
Mouse(Mx, My, 0, 0, True);
Wait(40 + Random(60));
Exit;
end;
until(TimeFromMark(T) > 1500 + Random(900));
AntiRandoms(False);
end;

procedure CallArray;
begin
AntiBan(True);
Cords[0]:= IntToBox(564, 215, 589, 233);
Cords[1]:= IntToBox(607, 219, 634, 235);
Cords[2]:= IntToBox(647, 215, 675, 236);
Cords[3]:= IntToBox(689, 215, 717, 232);
Cords[4]:= IntToBox(567, 255, 592, 273);
Cords[5]:= IntToBox(605, 251, 631, 271);
Cords[6]:= IntToBox(650, 253, 673, 269);
Cords[7]:= IntToBox(691, 254, 717, 271);
Cords[8]:= IntToBox(567, 291, 592, 305);
Cords[9]:= IntToBox(607, 287, 635, 308);
Cords[10]:= IntToBox(650, 289, 675, 307);
Cords[11]:= IntToBox(691, 289, 715, 307);
Cords[12]:= IntToBox(566, 322, 591, 342);
Cords[13]:= IntToBox(606, 324, 633, 342);
Cords[14]:= IntToBox(649, 326, 674, 344);
Cords[15]:= IntToBox(691, 323, 716, 342);
Cords[16]:= IntToBox(565, 362, 592, 381);
Cords[17]:= IntToBox(606, 361, 632, 380);
Cords[18]:= IntToBox(648, 362, 674, 378);
Cords[19]:= IntToBox(691, 361, 714, 378);
Cords[20]:= IntToBox(565, 394, 590, 413);
Cords[21]:= IntToBox(607, 400, 633, 415);
Cords[22]:= IntToBox(650, 397, 676, 413);
Cords[23]:= IntToBox(690, 397, 717, 415);
Cords[24]:= IntToBox(564, 434, 591, 450);
Cords[25]:= IntToBox(606, 430, 631, 450);
Cords[26]:= IntToBox(648, 435, 675, 452);
Cords[27]:= IntToBox(691, 431, 717, 448);
end;

procedure CleanHerbs;
begin
if not LoggedIn then
Exit;
AntiRandoms(True);
Z:= InvCount - 1;
CallArray;
for I:= 0 to Z do
begin
AntiRandoms(False);
MouseBox(Cords[I].X1, Cords[I].Y1, Cords[I].X2, Cords[I].Y2, 3);
Wait(1000 + Random(100));
if (IsUptext('rimy')) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Inc(D);
end;
Wait(100);
end;
AntiRandoms(True);
end;

procedure Banking;
begin
AntiRandoms(True);
if not LoggedIn then
Exit;
if not OpenBankFast('lb') then
if not OpenBankGlass('lb', True, True) then
if not OpenBankQuiet('lb') then
Exit;
Wait(100 + Random(20));
if (InvCount > 0) then
DepositAll;
MouseBox(47, 94, 63, 119 ,3);
Wait(1000 + Random(200));
if not (IsUptext('rimy')) then
begin
CloseBank;
NextPlayer(False);
end else
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
ChooseOptionQuick(X, Y, 4);
CloseBank;
AntiRandoms(True);
end;
end;

procedure ScriptTerminate;
begin
WriteLn(Padr('/ Radicalrobbie''s Herb Cleaner \', 70));
WriteLn(Padr('/ Worked for ' + TimeRunning + ' \', 70));
WriteLn(Padr9'/ Cleaned ' + IntToStr(D) + ' herbs \', 70));
end;

begin
SetupSRL;
ActivateClient;
DeclarePlayers;;
LoginPlayer;
repeat
Banking;
CleanHerbs;
until(AllPlayersInactive);
end.

lightcam999

2009-09-27 02:13:30

Line 39: [Error] (20355:37): Unknown identifier 'dom' in script
when i used R1chs
help?

radiclerobby

2009-09-27 02:26:17

rich are you using old includes?

@ lightcam

thats a srl bug not my scripts :P

rogeruk

2009-09-27 02:40:38

OptionExist

Thats not in the latest SRL is it?

Suggestion make a DTM of a herb and set the color to 255 tolerance so it will find ANY herb and then just use FindDTM to click them in Inv.

Rich

2009-09-27 12:33:04

From: rogeruk
OptionExist

Thats not in the latest SRL is it?


Not sure. :confused:

radiclerobby

2009-09-28 05:18:48

rogeruk thats not good cause it will only find the herb i made a dtm for right now the script will click all the grimys

Baked0420

2009-09-28 08:55:47

From: lightcam999
Line 39: [Error] (20355:37): Unknown identifier 'dom' in script
when i used R1chs
help?


he messed up editing the original I think, just on that line, delete this part "dom(1500) + (Random(750)));" it's what's giving you the error.

Rich

2009-09-28 10:17:45

From: Baked0420
he messed up editing the original I think, just on that line, delete this part "dom(1500) + (Random(750)));" it's what's giving you the error.


My bad. I've edited my first post.

radiclerobby

2009-09-30 12:12:16

i guess your hyjaking my script r1ch

Rich

2009-09-30 18:17:18

No, I'm trying to help. I posted a script for you to look at, so you can learn from it. I neatened it, added anti-ban and shortened so you can see how you should make a script. I'm not saying that your script is terrible, but I'm showing you how to improve. If I was hijacking your thread, I would have said
Everyone use this! This one's much better compared the Radiclerobby's!
Get the difference?

rogeruk

2009-09-30 22:09:24

From: radiclerobby
rogeruk thats not good cause it will only find the herb i made a dtm for right now the script will click all the grimys


No it wouldnt.

Guam

Avantoe

They are the same shape. Using a tolerance of 255 would pick up anything that shape with any color. Only herb you would not pick up is Spirit Weed. So you would need 2 DTM's.

As you can see the following are re-colored images of the Guam and Avantoe.