SRL Archive - RS3 Outdated / Broken Scripts

Moon 111's Anything AutoBuyer V1


moon 111

2007-08-02 11:49:17

Moon 111's Anything AutoBuyer V1.1

Features:
Auto World Switching (Now includes member and non-member worlds)
Max Amount option
Max price option

Future plans:
Clean up proggy

Bugs:
Sometimes after left clicking shop owner it offers trade with someone "under" her instead of with her. Fixing…

NOTE: Stackable items only :)
NOTE 2: I did'nt add randoms because I don't think that they can get you when shop screen is open. Am I wrong?

And now - The part you've all been waiting for! THE SCRIPT!

//--------------------------------------------------------------------//
//---------------- Moon 111's Anything AutoBuyer V1.1 ----------------//
//--------------------------------------------------------------------//
//---------------- Requires: SRL 3.81 or better -----------------//
//---------------- and SCAR DIVI 3.11 or better -----------------//
//--------------------------------------------------------------------//
//---------------- Special thanks to the SRL team! -----------------//
//--------------------------------------------------------------------//
//---------------- Instructions: Go to any shop and -----------------//
//---------------- open shop window. Fill out the -----------------//
//---------------- setup section. Start script with -----------------//
//---------------- shop window open. Fill out the -----------------//
//---------------- from (only 1 account). -----------------//
//--------------------------------------------------------------------//
//---------------- Features: Auto world changing, -----------------//
//---------------- max price option, -----------------//
//---------------- max amount option, -----------------//
//--------------------------------------------------------------------//
//--------------------------------------------------------------------//

program New;

{.include SRL/SRL.Scar}
{.include SRL/SRL/Misc/Playerform.scar}

var
a,b,xx,yy,maxprice,maxamount,bought,mrandom,color,tol,worlds:integer;
text:string;
member:boolean;

procedure vars;
begin
//----------------------------- SETUP -----------------------------//
xx := 141; // x coord of the location of the item in the shop to buy.
yy := 86; // y coord of the location of the item in the shop to buy.
maxprice := 8; // max price your willing to play for item.
maxamount := 10000; // max amount of items to buy.
color := 1118484; // color of shopkeeper.
tol := 1; // tolerance from color to use.
text := 'Bet'; // part of the name of shopkeeper (top-left corner).
member := false; // Using member world?
//--------------------------- END SETUP ---------------------------//
mrandom := 16;
end;

procedure orderworlds;
begin
if(not(member))then
begin
Mouse(53,484,10,10,True);
wait(200 + random(400));
Mouse(412, 11, 2, 2, True);
wait(300 + random(300));
Mouse(632, 10, 2, 2, True);
end else
begin
Mouse(53,484,10,10,True);
wait(200 + random(400));
Mouse(412, 11, 2, 2, True);
wait(300 + random(300));
Mouse(616, 11, 2, 2, True);
end;
end;

procedure FixChatA;
begin
wait(100 + random(100));
Mouse(488, 427, 8, 8, true);
wait(100 + random(50));
end;

Procedure chooseworld;
var
aa,bb,c:integer;
begin
if(not(member))then
begin
repeat
c := c + 1;
wait(100 + random(200));
until((findcolortolerance(aa, bb, 9013641, 65 + random(170), 37 + random(300), 272, 419, 1)) OR
(c = 100))
end else
begin
repeat
c := c + 1;
wait(100 + random(200));
until((findcolortolerance(aa, bb, 5143442, 65 + random(170), 37 + random(300), 272, 419, 1)) OR
(c = 100))
end;

if(c = 100)then
begin
Writeln('Could not find world. Ending script.');
TerminateScript;
end;
worlds := worlds + 1;
Mouse(aa, bb, 4, 4, True);
wait(1000 + random(400));
end;

function FindShopOwner:boolean;
var
aa,bb:longint;
begin
if(FindObj(aa, bb, text, color, tol))then
begin
Mouse(aa, bb, 0, 0, False);
ChooseOption(x, y, 'Trade');
flag;
wait(1500 + random(1000));
if(rs_ShopScreen)then
begin
Result := True;
end else
begin
Result := False;
end;
end;
end;

procedure checkifok;
begin
if(not(rs_ShopScreen))then
begin
Writeln('Shop window must be open to run script.');
TerminateScript;
end;
end;

procedure checkprice;
var
d:integer;
begin
Mouse(xx, yy, mrandom, mrandom, true);
wait(400 + random(400));
if(StrToInt(GetNumbers(GetBlackChatMessage)) > maxprice)then
begin
Writeln('The price of what you are buying has passed the max price you set. We are now switching worlds...');
Mouse(486, 40, 8, 8, true);
wait(500 + random(300));
Logout;
wait(300 + random(400));
orderworlds;
wait(300 + random(300));
chooseworld;
wait(300 + random(300));
LoginPlayer;
wait(500 + random(500));
FixChatA;
wait(300 + random(200));
repeat
d := d + 1;
wait(200 + random(200));
until((d = 5) OR (FindShopOwner))

if(d = 10)then
begin
Writeln('Could not find shop owner. Ending script.');
TerminateScript;
end;
checkprice;
end;
end;

procedure checkamount;
begin
if(bought >= maxamount)then
begin
Writeln('You have bought the amount you specified (' + IntToStr(maxamount) + '). Ending script.');
end;
end;

procedure buy;
begin
Mouse(xx, yy, mrandom, mrandom, false);
if(not(PopUp('Buy 10')))then
begin
if(not(mrandom = 1))then
begin
mrandom := mrandom / 2;
end;
end else
begin
bought := bought + 10;
end;
end;

procedure progressreport;
var
TimeR,h,m,s:integer;
begin
TimeR := GetTimeRunning;
ConvertTime(TimeR, h, m, s);
Writeln('------------------- Progress Report --------------------------');
Writeln('Items bought: ' + IntToStr(bought));
Writeln('Worlds changed: ' + IntToStr(worlds));
Writeln('Time running: ' + IntToStr(h) + ' hours ' + IntToStr(m) + ' mins and ' + IntToStr(s) + ' secs');
Writeln('--------------------------------------------------------------');
end;

begin
SetUpSRL;
SetupPlayers;
ClearDebug;
vars;
wait(3000 + random(1000));
FixChatA;
checkifok;
repeat
b := b + 1;
checkprice;
checkamount;
repeat
a := a + 1;
buy;
until(a = 10)

a := 0;

if(b = 10)then
begin
b := 0;
progressreport;
end;
until(false)
end.

Have Fun Autoing! Please post bugs and proggys! thanks a lot! And any suggestions for what to put in the proggy would be appreciated.

moon 111

2007-08-02 11:55:53

First post :)
Now that I'm done with this script I have no ideawhat to make next. Any suggestions?

n3ss3s

2007-08-02 12:05:23

WOAH! Im glad you've taken the advice to use standards, but thats not how they are, its 2 spaces, not length of the word :D


program New;
var
Bla: BlaBla;
begin
repeat
Stuff;
until(Stuff);
end;


Like that istead of


program New;
var
Bla: BlaBla;
begin
repeat
Stuff;
until(Stuff);
end;
:)

moon 111

2007-08-02 12:16:00

I use tabs becuz is easyer then 2 spaces lol

s c a r p i m p

2007-08-02 13:06:31

….:)lmfo

moon 111

2007-08-03 01:47:06

Nobodys try'd it? :( I didnt make it for nothing you know.

mihkel50

2007-08-03 03:46:36

Going to test soon, might be useful for me. - player form would be useful to have it on your script.

moon 111

2007-08-03 06:49:27

It has a player form. Try it and you'll see.

GoF

2007-08-03 06:59:04

From: moon 111
I use tabs becuz is easyer then 2 spaces lol


Tools -> options -> Scripting settings -> Use fixed size tabs -> Tab size = 2..

moon 111

2007-08-03 08:45:10

No comments? :( I'm starting to feel that making this was a waste of time. Oh well… If your intrested my next script will be a willow power choper (Moon 111's Auto Willow Choper N Droper)/

gamer716

2007-08-03 14:15:19

im interested in this. might use in the ranger guild to buy some arrows. does it have member world switcher?

moon 111

2007-08-04 14:25:27

Um… No.. I guess I should add it.

moon 111

2007-08-04 14:36:01

OK I added member/nonmember feature. Enjoy!

Jimmy444

2007-08-06 12:35:22

I'l be trying it now :)

I'm really interested in an auto-buyer for a bronze arrows enterprise (enterprise…one of those words that makes you feel important and big hahaha) in f2p.

Be really awesome if say one player ran out of money it would log out and the next player could log in and start buying. Or/and if the store ran out of arrows you could switch worlds for another large stack of buy…..oh wait, this is starting to sound liek a good script for me to start making, I wont' say anymore haha :P

Timothegreat

2007-09-08 01:04:38

decent autobuyer

ctown

2007-09-26 00:09:58

one problem…

Include file C:\Program Files\SCAR 3.12\includes\SRL\SRL\Misc\Playerform.scar does not exist.
Failed when compiling

before you say anything i already downloaded includes from scar…im using scar 3.12 if that helps.

mynameisjoe

2007-09-28 21:18:17

I'm surely gonna test this out tonight or tomorrow. I really am looking for a decent autobuyer.

tommyboy

2007-09-29 07:19:01

ummm….no you dont get randoms when in the bank window ok

Negaal

2007-10-02 09:11:37

you should update it for srl 4, i tested it btw, bought 3k feathers lol, but it needed modifing

thematpan

2007-10-08 19:28:33

ooo im very much interested in this bad boy:D. it will help me lots for buying bronze arrows then merch them off 15 ea :D bahaha

gamer716

2007-10-09 00:32:00

too late now…rs updated, making all the stores have infinite amount

Sir R. M8gic1an

2007-10-17 10:52:35

love the idea, i'll come back to comment on it when i return home :)

edit: so this script now is useless, but there's one way to make it super cool. make it buy any stackable things from the general shop. sometimes things like arrows and death runes and all other sort of runes end up in the general shop, quite often actually. it would be totally cool to have a script that buys all the arrows and runes off of the general shop ;)

julian0

2007-10-24 17:18:41

Thx for the script dude ill try soon but,anyway its almost useless,cuz theres infinite stuff and u just do a left click and press how much to buy

julian0

2007-10-24 17:22:40

Nice script tho.