SRL Archive - First Scripts

Oak larder maker


SantWrong

2012-01-10 14:43:36

Makes oak larders, fetchs from butler 20 oak planks. Start near larder, it has to be already built. At end of script, there is written until(sr=100), set number how many larders you want to make.

[ATTACH]13272[/ATTACH]


-When script or you manualy login, pause script and walk to oak larder.
-Destroys Strange Rock if found.
-No antiban, so use at your own risk.
-Wear green dhide, wizzard robes or any clothing, which has no similar colors to black or red servant and larder.
-Sometimes it makes one larder ant stops, re-run script.

Helper

2012-01-10 16:04:48

i maybe test it today.

SantWrong

2012-01-10 17:58:38

Maybe a better timing to run a bit more reliable, but slower. Constructive feedback always welcomed

TwoClover

2012-01-10 22:27:39

Seems to have it when i have a larder built already it goes and makes butler fetch planks from bank then after he comes back it builds 1-3 larders depending on if i already had an extra 4 planks in inv or not, then when it fetchs again it removes the larder tries to built again, In game says "you don't have enough materials to build this" then freaks out and clicks in room to left and walks there…

Lights

2012-01-14 06:17:29

From: TwoClover
Seems to have it when i have a larder built already it goes and makes butler fetch planks from bank then after he comes back it builds 1-3 larders depending on if i already had an extra 4 planks in inv or not, then when it fetchs again it removes the larder tries to built again, In game says "you don't have enough materials to build this" then freaks out and clicks in room to left and walks there…


Your post made me lol^^

Same happens to me here, it keeps building to the point it has no planks left.

SantWrong

2012-01-16 08:24:36

I have rewritten script, but I met first time this problem. I'll fin out it and repair. Thanks for feedback

EDIT

I'll uploau rewritten form as soon as new SRL update will be pushed and I can test script. There should some improvement. Last version misclicked, because I wanted to make it run faster and minimised waiting betwen operations. Later I tested with longer waiting time - it ran smoothly for hour.

SantWrong

2012-01-21 06:31:24

Added rewritten version, still antiban needed. Feedback is welcomed!

Lights

2012-01-21 14:45:44

Will give it a try =)

Edit: It works ! I had to delete 2 liines of code which were responsible for printing out experience I guess.

[Hint] (69:5): Variable 'LCOLORS' never used at line 68
[Error] (174:26): Unknown identifier 'Write' at line 173
Compiling failed.

It seems to wiggle a bit before starting to build a larder but I´ll try a darker house decoration setup because atm I use wood and maybe it´s because of this.

momotron

2012-01-21 15:07:42

Should really add an antiban, use the search button and use someone else's (with their permission ofc)

Heya69

2012-01-21 15:47:22

Added antiban

program Con;
{$define SMART}
{$i srl/srl.scar}
//At the end of script (line 153), where until(sr=30), set sr to how many ladders you want to make
var
xSer, ySer, x, y, sr, LarderCount :integer;
LoadBack :Boolean;
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;
End;

procedure Startup;
begin
Smart_Server := 6;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LogInPlayer;
wait(100+random(100));
end;

Procedure Setup;
begin
ToggleXPBar( True);
Wait(500);
LoadBack:= False;
LarderCount:=0;
end;

Procedure SRock;
var xSR, ySR:integer;
Begin
if FindObjEx(xSR, ySR, ['trange'], [7171954], 15, 30, 570, 210, 720, 460) then
Begin
Mouse(xSR, ySR, 2, 2, false);
Wait(RandomRange(100,200));
ChooseOption('estroy');
Wait(RandomRange(100,200));
Mouse(RandomRange(345,405), RandomRange(395,410), 2, 2, True);
end;
end;

Procedure Servant;
begin
Wait(100);
Mouse(xSer, ySer, 2, 2, false);
Wait(RandomRange(100,200));
ChooseOption('etch');
Wait(RandomRange(600,800));
If FindNPCChatText('If', Nothing) then
begin
ClickToContinue;
Wait(RandomRange(800,1000));
FindNPCChatText ('coins.', ClickLeft);
Wait(RandomRange(190,290));
Mouse(xSer, ySer, 2, 2, false);
Wait(RandomRange(400,700));
ChooseOption('etch');
Wait(600);
end;
If not FindNPCChatText ('etch', nothing) then
begin
Wait(RandomRange(100,200));
FindNPCChatText ('Oak', ClickLeft);
Wait(500)
TypeSend('20');
end;
FindNPCChatText ('etch', ClickLeft);
LoadBack:=False;
Wait(500 + Random(300));
end;

Procedure FServant;
var SColors: TIntegerArray;
i: integer;
begin
SColors:= [989748, 1451339, 2174831, 1845343, 1779290];
For i:=0 to 4 do
begin
FreeSRLBitmaps;
If FindObjTPA(xSer, ySer, SColors[i], 30, -1, 10, 15, 1, ['utler', 'Butler']) then
begin
Servant;
Break;
end;
end;
end;


Procedure FLadder;
var LColors:TIntegerArray;
t:integer;
begin
Inc(x); Inc(y);
LColors:=[4613503, 2838371, 2574426];
Writeln('Search ladder');
if FindObjCustom(x, y, ['earch', 'Larder'], [2904421, 8423046], 5)then
begin
Mouse(x, y, 2, 2, false);
Wait(RandomRange(100,150));
ChooseOptionMultiEx(['Remove','emove'], 'Object', ClickLeft);
Wait(RandomRange(750,850));
FindNPCChatText ('Yes', ClickLeft);
Wait(RandomRange(830,1000));
end;
end;

Procedure Build;
var OXP, NXP:integer;
begin
Inc(x); Inc(y);
Mouse(x, y, 2, 2, false);
Wait(RandomRange(150,250));
ChooseOptionMultiEx(['Build','uild'], 'Object', ClickLeft);
Wait(RandomRange(600,700));
Mouse(RandomRange(105,115), RandomRange(135,145) , 2, 2, True);
Wait(RandomRange(450,600));
end;

Procedure AntiBan;
Begin
case Random(2000)of
0: HoverSkill('Construction', False);
1: SleepAndMoveMouse(7000 + Random(500));
2: RandomMovement;
3: PickUpMouse;
4: BoredHuman;
5..15: MakeCompass( RandomRange( -360, 360));
16..60: Wait( Random( 3000));
End;
End;

begin
Startup;
sr:=1;
Inc(x); Inc(y);
repeat
If CountItemsArea ('inv')<16 then FServant;
Wait(RandomRange(500,700));
if CountItemsArea ('inv')>7 then
begin
FLadder;
Wait(RandomRange(300,500));
Build;
Wait(600);
SRock;
AntiBan;
end;
If Not LoadBack then
begin
Repeat
Wait(1000)
if CountItemsArea ('inv')>19 then LoadBack:= True;
Until(LoadBack);
end;
sr:=sr+1;
until(sr=100);
end.

SantWrong

2012-01-22 15:22:53

Thanks for adding Anti Ban, I've been quite busy this weekend so I couldn't make it to the end. Well good luck using, if any bugs please post it here. Besides cause it is working and has antiban it may be moved to construction section from first scripts

EDIT 24/01/2012: Going to add reporting system on wekend.