SRL Archive - S.M.A.R.T.

My smarterizer


jhildy

2007-12-15 14:02:40

yea i decided to make one after is saw the thread below. it has a nice gui and opening options and all the good stuff. Save doesn't work though anyone can feel free to fix it.

Dan Cardin

2007-12-15 14:43:05

i didnt have a script to smarterize at the time so i just pressed go and got this
scabeginnc  martSetup(ny2,False,False)ncclude Smart.scar}nc r}
:p

EDIT: worked when i put jason's script in
{
Start off here: (Incase your a leecher and didn't bother to read the thread :(

[url]http://i49.photobucket.com/albums/f286/jason2gs/StartHere.jpg[/url]

(That's Edgeville Bank BTW)

And place item to cook in your first bank space.
}

program New;
{.include Smart.scar}
{.include SRL/SRL.Scar}

const
Loads = 5; // Loads per player.

var
Tries, ItemsToCook, Items, Color, LoadsDone, LoadsPerPlayer : Integer;

procedure TheDeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers( HowManyPlayers );
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; //2-4 letters of your username
Players[0].Active := True;

Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := True;

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := True;
end;

procedure DoorOpener(DoorColor, Tol:Integer); //[slightly]Universal Door-Opener. Feel free to use.
var
Tries : Integer;
begin
repeat
Wait(500 + Random(100));
if(FindColorSpiralTolerance(x, y, DoorColor, MSX1, MSY1, MSX2, MSY2, Tol))then
MMouse(x, y, 1, 1);
Tries := Tries + 1;
if(Tries >= 5)then
begin
KeyDown(37);
Wait(1000 + Random(500));
KeyUp(37);
Tries := 0;
end;
until(IsUpText('Door') or IsUpText('Gate'));
if(IsUpText('Open'))then
begin
Writeln('Found a door.');
Mouse(x, y, 0, 0, False);
ChooseOption(x, y, 'Open');
Writeln('Opened door.');
end;
if(IsUpText('Close'))then
begin
Writeln('Door was already open.');
Exit;
end;
end;

procedure TheOpenBank;
begin
repeat
Wait(500 + Random(500));
if(FindColorSpiralTolerance(x, y, 2842746, MSX1, MSY1, MSX2, MSY2, 5))then
MMouse(x, y, 2, 2);
Tries := Tries + 1;
if(Tries >= 5)then
begin
KeyDown(37);
Wait(1000 + Random(500));
KeyUp(37);
Tries := 0;
end;
until(IsUpText('booth'));
Mouse(x, y, 1, 1, False);
ChooseOption(x, y, 'uickly');
Wait(1000 + Random(1000));
end;

procedure TheBank;
begin
DepositAll;
FixBank;
Withdraw(1, 1, 28);
CloseBank;
end;

procedure TheWalkTo;
begin
MakeCompass('N');
if(FindSymbol(x, y, 'Cook'))then
begin
Mouse(x, y, 2, 2, True);
FindTalk;
Wait(5000 + Random(5000));
FindTalk;
end;
end;

procedure TheCook;
begin
MMouseItem(1);
Color := GetColor(x, y);
FindTalk;
Wait(500 + Random(500));
repeat
Wait(500 + Random(500));
if(FindColorSpiralTolerance(x, y, 924552, MSX1, MSY1, MSX2, MSY2, 5))then
MMouse(x, y, 1, 1);
until(IsUpText('tove'));
Wait(500 + Random(500));
FindTalk;
ChooseOption(x, y, 'Cook X');
FindTalk;
Wait(1000 + Random(1000));
ItemsToCook := 28 + Random(400); //Thanks, Ejj!
TypeSend(IntToStr(ItemsToCook));
FindTalk;
Wait(2000 + Random(1000));
Items := CountItemColorTol(Color, 5);
Writeln(IntToStr(Items) + ' to cook this time.');
repeat
CountItemColorTol(Color, 5);
Wait(2000);
until(Items = 0);
LoadsDone := LoadsDone + 1;
Exit;
end;

procedure TheWalkBack;
begin
MakeCompass('N');
Mouse(715, 100, 5, 5, True); // Coord-Clicking, yes, but don't worry. Just look at the randomness :) WILL BE UPDATING IN THE NEAR FUTURE.
FindTalk;
Wait(5000 + Random(5000));
FindTalk;
MakeCompass('N');
end;

procedure TheAntis;
begin
FindTalk;
Wait(1000 + Random(500));
FindNormalRandoms;
Wait(1000 + Random(500));
FindTalk;
Wait(1000 + Random(500));
end;
begin
SmartSetup(ny2,False,False)
SetupSRL;
SRLRandomsReport;
ActivateClient;
TheDeclarePlayers;
if(Not(LoggedIn))then
LoginPlayer;
repeat
AntiBan;
TheOpenBank;
TheBank;
TheAntis;
TheWalkTo;
TheAntis;
DoorOpener(1791084, 5);
TheAntis;
TheCook;
TheAntis;
DoorOpener(1791084, 5);
TheAntis;
TheWalkBack;
TheAntis;
if(LoadsDone >= LoadsPerPlayer)then
NextPlayer(True);
if(Not(LoggedIn))then
NextPlayer(False);
until(False);
end.

gj :)

jhildy

2007-12-15 14:44:16

lol you have to have one because it searches for begins/program whatever.

Thanks. The only thing i see that it might mess up a little is the standards but shouldn't make a difference on how it works.

7 views 1 post. This is not like SRL members. Post some feedback please!

TheGuyWhoGotOn

2007-12-16 15:57:24

From: jhildy
lol you have to have one because it searches for begins/program whatever.

Thanks. The only thing i see that it might mess up a little is the standards but shouldn't make a difference on how it works.

7 views 1 post. This is not like SRL members. Post some feedback please!


Sorry but I don't see why we need this. You only have to add one line to a script and on this one if I try to add it to the main loop it messes up my script.

Dan Cardin

2007-12-16 20:24:16

Its not needed but its cool. and for lazy people like me it might be useful. Im too lazy to edit srl so i only have to add 1 line, so meh in ur direction. (no offense :p)

@Jhildy-u could add it in so if it nothing's in there then it wont do anything, or if it cant find where it needs to put things it wont do it.

if memo1.text = '' then 
terminatescript;

Smartzkid

2007-12-16 20:28:25

Meh, what kind of person can't convert a script to smart?

Dan Cardin

2007-12-16 20:30:35

well jhildy obviously, or he wouldnt have made it :)

its not the thought that counts its the fact that it looks pretty and it works :p

jhildy

2007-12-16 21:41:56

Its just something i was determined to do it adds the smartsetup to main loop as well i didn't say you had to use it. It was just a project i wanted to do for my own purposes.

Smartzkid

2007-12-19 21:44:27

Good job, then.

Sp0rky

2007-12-19 21:53:05

Awesome job, wasn't expecting it to have a choose world (number) in it. Fantastic. I don't need it, but it's still great coding. Gj.

jhildy

2007-12-19 22:06:23

thanks. I took the case from a thread i don't know which one it was.