How do I make it? I tried but it doesn't work... I want it to stop when it finish's alching. Here's the script.
SCAR Code:
program AbsTrACtAutoAlcherSmartVersion;//This is my very first script but I believe it is a pretty good one.
{///////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}
{ Title: AbsTrACtAutoAlcher }
{ Version: 1.02 SMART }
{ Author: AbsTrACt'^.| }
{ Settings: I don't use colors in this script so it's the same... }
{ Recommendation: Use it in Barrows Tombs as there are no randoms there }
{although you may find some persons there and I didn't made an AutoResponder yet }
{ SetUp Lines: }
{///////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}
{.include SRL\SRL\Misc\Smart.scar}
{.include SRL\SRL.scar}
{.include SRL\SRL\misc\Users.scar}
var
Alch: Integer;
Alchs: Integer;
Alchspell: Integer;
AlchLong: Integer;
x, y: Integer;
{/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\}
{ Begin SetUp }
{\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////}
const
RunD = 'n'; //Direction to run from Attacking Random (n, s, w, e)
ItemToAlchName = 'yew longbow';
//Name of the item you are alching (for antiban)
Alchstodo = 900; //How many alchs the bot should do?
procedure DeclarePlayers; // this procedure is used to log players in
begin
HowManyPlayers := 5; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer := 0; // CurrentPlayer = Array Index
Players[1].Name := 'USERNAME';//Your account username
Players[1].Pass := 'PASSWORD';//Your account password
Players[1].Nick := 'ser'; //3-4 Small letters of your username
Players[1].Active := True;
//Player in use or not in use (True for in use, False for not in use)
Players[1].Name := 'USERNAME';//Your account username
Players[1].Pass := 'PASSWORD';//Your account password
Players[1].Nick := 'ser'; //3-4 Small letters of your username
Players[1].Active := false;
//Player in use or not in use (True for in use, False for not in use)
Players[2].Name := 'USERNAME';//Your account username
Players[2].Pass := 'PASSWORD';//Your account password
Players[2].Nick := 'ser'; //3-4 Small letters of your username
Players[2].Active := false;
//Player in use or not in use (True for in use, False for not in use)
Players[3].Name := 'USERNAME';//Your account username
Players[3].Pass := 'PASSWORD';//Your account password
Players[3].Nick := 'ser'; //3-4 Small letters of your username
Players[3].Active := false;
//Player in use or not in use (True for in use, False for not in use)
Players[4].Name := 'USERNAME';//Your account username
Players[4].Pass := 'PASSWORD';//Your account password
Players[4].Nick := 'ser'; //3-4 Small letters of your username
Players[4].Active := false;
//Player in use or not in use (True for in use, False for not in use)
end;
{/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\}
{ End SetUp }
{\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\}
{ Do Not Touch Below }
{\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
procedure Randoms;
begin
FindNormalRandoms; //finds normal randoms
DwarfItem; //dropes dwarf items
if (FindFight) then //runs away from fight
begin
MakeCompass('n');
RunTo(RunD, true);
Wait(3500 + Random(3000));
RunTo(RunD, true);
end;
end;
procedure DTMs;
begin
Alchspell := DTMFromString('78DA63E461606010644001BFBEF130FC07D28' +
'C40FC1F081805800C560634C08844026911202146400D485E8880' +
'1A6622D470126117C84F5C04D4F011610E1B95EC02F9898708BBF' +
'889081F41FC6A0095B60893');
AlchLong := DTMFromString('78DA631467606090614001BECE9C0CFF81342' +
'310FF0702463120438B010D302291409A0348A81050A304248408' +
'A8510612D244A85123A0461E48681350C303243409A8E126C23D7' +
'2404200BF1A00F35607DF');
end;
procedure AntiBan;
begin
Case Random(5) of
0:
begin
Wait(1000+Random(550));
HoverSkill('Magic', False);
Wait(1000+Random(550));
Randoms;
Wait(1000+Random(550));
GameTab(7);
end;
1:
Begin
Wait(1000+Random(550));
RandomRClick;
Wait(1000+Random(550));
Randoms;
Wait(1000+Random(550));
GameTab(7);
end;
2:
Begin
Wait(1000+Random(550));
RandomMovement;
Wait(1000+Random(550));
Randoms;
Wait(1000+Random(550));
GameTab(7);
end;
3:
Begin
Wait(1000+Random(550));
BoredHuman;
Wait(1000+Random(550));
Randoms;
Wait(1000+Random(550));
GameTab(7);
end;
4:
Begin
Wait(1000+Random(550));
AlmostLogout;
Wait(1000+Random(550));
Randoms;
Wait(1000+Random(550));
GameTab(7);
end;
end;
end;
procedure Report;
begin
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Writeln('| AbsTrACt Auto Alcher Report! Feel free to post');
Writeln('| Alched ' + IntToStr(Alchs) + ' ' + ItemToAlchName + 's.');
Writeln('| Worked for ' + (TimeRunning));
Writeln('| Exp gained ' + IntToStr(alchs * 65));
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Writeln('Made By AbsTrACt!');
end;
procedure Finished;
begin
if (alchs = alchstodo) then
begin
LogOut;
Report;
end;
end;
procedure Alching;
begin
GameTab(7);
repeat
Wait(500 + Random(150));
if FindDTM(Alchspell, x, y, MIX1, MIY1, MIX2, MIY2) then
Wait(100+Random(100));
Mouse(x, y, 5, 5, true);
Wait(100+Random(100));
if FindDTM(AlchLong, x, y, MIX1, MIY1, MIX2, MIY2) then
Wait(100+Random(100));
Mouse(x, y, 10, 10, true);
Wait(2000 + Random(100));
case Random(8) of
0:
Wait(150 + (Random(376)));
1:
Wait(55 + (Random(100)));
2:
Wait(0 + (Random(2500)));
3:
AntiBan;
4:
Wait(0 + (Random(150)));
5:
Wait(150 + (Random(100)));
6:
Wait(0 + (Random(1000)));
7:
Wait(0+ (Random(1000)));
end;
Report;
Finished;
until alchs = alchstodo;
end;
procedure Setup;
begin
smartSetup('World157', true, true);
while not (SmartReady) do
Wait(100);
SetTargetDC(SmartGetDC);
if not (LoggedIn) then
while not (SmartGetColor(386, 249) = 65535) do
Wait(100);
SetupSRL;;
wait(1000)
ActivateClient;
wait(1000)
end;
begin
SetupSRL;
Setup;
DeclarePlayers;
LoginPlayer;
DTMs;
Alching;
FreeDTM(Alchspell);
FreeDTM(AlchLong);
end.
I need help with another 2 things. First is that I need to fix the report (the report doesn't count the alch's done) and second I would like to add this but I don't know how:
if can't find DTM then LogOut
Please help.