SRL Archive - First Scripts

First script (auto alcher)


Mamby

2007-10-21 02:32:57

Finally finished my first script, woot. Auto alcher with anti-randoms. Started out earlier today, and then finally just redid it with SRL stuff in it. After i added anti-randoms, it was a bit wierd, but it gets the job done. Havent tested the progress report either.

**v02 of the autoalcher.
program AutoAlch;
{.include SRL/SRL.scar}
var
AlchsToDo: integer;
//////////////////////////////////////////////
// AutoAlcher v .1 //
// RECOMMENDED-> SCAR Divi 3.12c & SRL 4.0 //
//////////////////////////////////////////////
// BY MAMBY //
// SET UP LINES 28-42 //
//////////////////////////////////////////////
// INSTRUCTIONS //
// ------------------- //
// 1.)Get Alching Supplies out of the bank //
// 2.)Place your item that you wish to alch //
// in the first inventory slot //
// 3.)Log out //
// 4.)Start the script //
//////////////////////////////////////////////
// Fixes //
// ------------------- //
// v.01 - Release //
// v.02 - Fixed Anti Randoms //
// Fixed Alch wait time //
//////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
const //
Alchs =43; //Number of high alchs you need to do //
Genie = 'Magic'; //Genie Lamp //
RunDir = 'n'; // N, W, E, S, Choose wisely //
//
//
Procedure DeclarePlayers; //
begin //
HowManyPlayers :=1; //
NumberOfPlayers(HowManyPlayers); //
CurrentPlayer:=0; //
//
Players[0].Name :=''; //Username //
Players[0].Pass :=''; //Password //
Players[0].Nick :=''; // 3 letters in the middle of your name
Players[0].Active:=True; //
end; //
/////////////////////////////////////////////////////////////////
//=============================================//
Procedure Alch;
begin
Mouse(716,336,6,6,true);
wait(200+random(700));
FindNormalRandoms;
FindLamp(Genie);
Mouse(577,225,5,8,true);
wait(600+random(800));
end;
//=============================================//
procedure AntiRandom;
begin
FindTalk;
// FindNormalRandoms;
// FindLamp(Genie);
if FindFight then
begin
RunAwayDirection(RunDir);
Wait(10000+random(2000));
RunBack;
end;
end;
//=============================================//
procedure ProgressReport;
begin
writeln('//=============================================//');
writeln('// Progress Report //');
writeln('//=============================================//');
writeln(' Total Alchs: ' + IntToStr(AlchsToDo));
writeln(' Total Time: ' + TimeRunning);
writeln('//=============================================//');
writeln('// MAMBYS AUTO ALCHER v.1 //');
writeln('//=============================================//');
end;
//=============================================//
begin
cleardebug;
SetupSRL;
DeclarePlayers;
activateclient;
wait(1000);
loginplayer;
wait(1000+random(500));
repeat
GameTab(7);
Alch;
AntiRandom;
AlchsToDo:= AlchsToDo+1;
until(AlchsToDo = Alchs);
logout;
ProgressReport;
TerminateScript;
end.
//=============================================//


Any suggestions are welcome :).

beanman

2007-10-21 02:37:32

i don't get why anyone would want to alch a lot of stuff. but for a first script and with what you described it sounds pretty good.

kingarabian

2007-10-21 04:03:59

Looks good and simple. not bad 4 a 1st script.

Mamby

2007-10-21 15:05:32

Yea, i wanted it to be simple. And whoever took out my password and stuff, thanks :-D, just realized that I forgot to take it out.

+rep to you :)

Someone wasn't too smart, me obviously, but if your gonna try to change my bank pin, you should probably change my password also? lol

ZaSz

2007-10-21 15:39:30

pretty nice script. I would recommend that you should make the script so it takes the items out of the first inventory slot in the bank, by creating a row so it takes all of 1 item and then when done alching open the bank again and take all of the next item.

Hmm, that give me an idea to make my alching script!

the scar noob

2007-10-21 15:41:38

it's really a nice first script ;)
try to incorportae more SRL and antirandom + antiban next time, the step after that maybe multiplayer..?:)

Keep up the good work,

-Tsn.

Mamby

2007-10-21 16:54:05

Thanks. I just fixed it so it doesn't keep looking at your inventory after you alch something, instead it checks for inventory randoms after it clicks the alch button.