SRL Archive - First Scripts

POH Planker


ireallyliketo69

2010-01-12 23:01:17

So this is one of my favorite methods to make money, and it seems it's one of the most repetitive tasks in the game.

I've been working on this for a while on and off, and I have redone it twice to make it run smoothly.

After testing it for a while, it appears that the loop is pretty good. I couldn't get it to find text, so I used bitmaps, as it accomplishes the same goal here.

There is currently no log-in feature, meaning if you dc, you're done. It's not getting the player logged back in that's the problem, it's getting him inside the house and finding the servant that's the problem. Also, once a log in feature is implemented there needs to be a FirstTime procedure or something, telling the butler to uncert 26 logs.

[ATTACH]9054[/ATTACH]

Other than that, it does what it's supposed to.

Simtoon

2010-01-12 23:09:56


if FindFight then
RunAway('N', True, 1, 5000);

theres no more fighting randoms

also


Stop;
?

ireallyliketo69

2010-01-12 23:47:11

The anti-randoms was a copy and paste, since it wasn't in the original script because it wasn't needed.

Stop was based on memory, didn't produce errors, and I never thought to look to see if it accomplished what it was supposed to.

Fixed.

Thank you.

0wn 4 skill

2010-01-13 13:17:35

harharhar, love the name :P ME TOO!

Looks like a pretty decent first script! Keep it up dude xoxoxox

Dynamite

2010-01-13 14:09:59

BColor = 1711163; // Set the color of the butler here
You should use an autocolor for this, it will be a lot more accurate.
Use Nielsies ACA in your Scripting Tools folder.

procedure NormalMouse;
begin
case random(20) of
1: PickUpMouse;
1: Writeln('Picked Up Mouse');
end;
end;

What do you use this for?
Why not just put in AntiBan?

if(FindBitmapTolerance(Logs,x,y,50)) then

Use, FindBMP().
AFAIK, it is a lot more accurate.

begin
Writeln('Found Logs!');
counter:= 0;
wait(200+random(300));
Writeln('Moving to Logs');
NormalMouse;
MMouse(x,y,15,15);
GetMousePos(x,y);
wait(600+random(200));
Writeln('Clicking Logs');
Mouse(x,y,0,0,true);
wait(500+random(100));
end else

This is very botlike, make it random.
You are doing everything in exactly the same order.
Try:

begin
Writeln('Found Logs!');
counter:= 0;
begin
case Random(5) of
1: wait(200+random(300));
NormalMouse;
Antiban;
AntiRandoms;
MMouse(x,y,15,15);
GetMousePos(x,y);

2: NormalMouse;
MMouse(x,y,15,15);
GetMousePos(x,y);
AntiBan;
end;

wait(600+random(200));
Mouse(x,y,0,0,true);
wait(500+random(100));
end else

You didnt have any Antiban, Antirandoms etc.
So I put in for you.
I added a bit of randomness etc.

procedure ClickButler;
begin
if(FindColorSpiralTolerance(x,y,BColor,0,0,515,335,10)) then
begin
Writeln('Moving to Butler');
NormalMouse;
MMouse(x,y,5,5);
GetMousePos(x,y);
wait(750+random(300));
Writeln('Clicking Butler');
Mouse(x,y,0,0,true);
wait(1200+random(300));
end;
end;

As said before, I suggest using AutoColor.
Why not just have:

procedure ClickButler;
begin
if(FindColorSpiralTolerance(x,y,BColor,0,0,515,335,10)) then
begin
NormalMouse;
wait(750+random(300));
Mouse(x,y,0,0,true);
wait(1200+random(300));
end;
end;

Much shorter.

procedure CheckPay;
begin
if (FindBitmapTolerance(desirest,x,y,50)) then
begin
rep:=0
Writeln('Butler Needs Pay!');
mousex:=230+random(150);
mousey:=450+random(10);
Writeln('Moving to Pay Butler');
NormalMouse;
MMouse(230,450,150,10);
GetMousePos(x,y);
wait(500+random(300));
Writeln('Clicking First Butler Pay Message');
Mouse(x,y,0,0,true);
wait(700+random(800));
mousex:=175+random(150);
mousey:=385+random(10);
Writeln('Moving to 10k payment option');
NormalMouse;
MMouse(175,385,150,10);
GetMousePos(x,y);
wait(300+random(300));
Writeln('Clicking 10k payment option');
Mouse(x,y,0,0,true);
wait(900+random(200));
ClickContinue(true,true);
ClickLogs;
ClickButler;
pay:=1;
end else
begin
Writeln('Butler does not need payment yet.');
pay:=1;
end;
end;

Very messy, try learning TPA's and use on stuff like this.

procedure Uncert;
begin
CheckPay;
if (pay=1) then
begin
Writeln('Moving to Uncert');
NormalMouse;
MMouse(235,390,30,7);
GetMousePos(x,y);
wait(800+random(100));
Writeln('Clicking Uncert');
Mouse(x,y,0,0,true);
AntiBan;
wait(7800+random(700));
end;
end;

Again, could be much shorter:

procedure Uncert;
begin
UncertDTM := DTMFromString() / UncertBMP := BMPFromString() // Much more accurate
CheckPay;
if (pay=1) then
begin
NormalMouse;
wait(800+random(100));
if FindDTM(UncertDTM) then begin
Mouse(x,y,0,0,true);
AntiBan;
wait(7800+random(700));
end;
end;

DTMs for less botlike behaviour and more accuracy, and get rid of the MMouse and GetMousePos.

procedure Sawmill;
begin
if (FindBitmapTolerance(sawmillbmp,x,y,50)) then
begin;
Writeln('Moving to sawmill option');
MMouse(150,427,200,10);
GetMousePos(x,y);
wait(500+random(300));
Writeln('Clicking sawmill option');
Mouse(x,y,0,0,true);
AntiBan;
wait(6500+random(500));
end;
end;

Use TPA's instead of FBT.
As I said, no need for MMouse etc.

procedure FreeBmps;
begin
FreeBitmap(Logs);
end;

Dont you want to free the rest of the BMPs?
Could cause memory leak.

Hope this helps.
Not scripted in a while so I am a bit rusty :P
If you need any help PM me :)

T~M

weequ

2010-01-15 14:51:38

Sweet :D How much money/hr you can make with that method? :o

ireallyliketo69

2010-01-16 02:04:44

Right now it seems it's only about 300k/hr. It used to be a lot higher, but planks dropped in price.

PremiumBotter

2011-11-11 14:23:08

does it work in simba?

Yago

2011-11-11 14:30:11

Look at the day the first post was. Then look at date of the last post.

Now notice you just grave-dug this thread.

Edit: To test if it works all you have to do is simply run it. If it doesn't work then report it as an outdated script.