SCAR Code:
program AbsTrACtAutoAlcherSmartVersion;//This is my very first script but I believe it is a pretty good one.
{///////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}
{ Title: AbsTrACtAutoAlcher }
{ Version: 1.01 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 = 20; //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[0].Name := 'USERNAME';//Your account username
Players[0].Pass := 'PASSWORD';//Your account password
Players[0].Nick := 'ser'; //3-4 Small letters of your username
Players[0].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
FindTalk; //finds talkin randoms
FindNormalRandoms; //finds normal randoms
SolveChatRandom; //solves chat randoms
FindLamp('Magic'); //solves lamp and then choses a skill to update
SolvePinball; //solves pinball random
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 AntiBan;
begin
case Random(3) of
0:
begin
Wait(3137 + (Random(1350)));
HoverSkill('Magic', false);
Wait(3137 + (Random(711)));
Randoms;
KeyDown(118);
Wait(50 + Random(100));
KeyUp(118);
end;
1:
begin
Wait(3137 + (Random(1250)));
AlmostLogout;
Wait(3137 + (Random(747)));
Randoms;
KeyDown(118);
Wait(50 + Random(100));
KeyUp(118);
end;
2:
begin
Wait(3000 + (Random(1000)));
RandomMovement;
Wait(3000 + (Random(1000)));
Randoms;
KeyDown(118);
Wait(50 + Random(100));
KeyUp(118);
end;
end;
end;
procedure DTMs;
begin
Alchspell := DTMFromString('78DA63E465606010624001BFBEF1806946289' +
'F1124CFCA80061851D50802092E026AF8895443C82E1120C14F84' +
'7BB8A9E06651202148408D18901026A006242F46400D1F116A388' +
'950C342841A6622DCCC4A4438731356030042560420');
AlchLong := DTMFromString('78DA631463606010674001F9497C0CFF81342' +
'310FF07024690BC06031A604422813427905024428D1A0135DC40' +
'429D801A4122D4C803094D026A5488700F488D340135AA4042888' +
'01A5038F31250230724F808A8E123C21C2E202146445CC8E25703' + '0048AA08EE');
end;
procedure Report;
begin
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Writeln('| AbsTrACt Auto Alcher Report! Feel free to post');
Writeln('| Alched ' + IntToStr(Alch) + ' ' + 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
KeyDown(118)
Wait(50 + Random(100))
KeyUp(118)
repeat
Wait(500 + Random(150))
if FindDTM(Alchspell, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 10, 10, true);
if FindDTM(AlchLong, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 10, 10, true);
end;
Wait(2000 + Random(100));
case Random(7) of
0:
Wait(150 + (Random(376)));
1:
Wait(55 + (Random(10)));
2:
Wait(0 + (Random(250)));
3:
AntiBan;
4:
Wait(0 + (Random(150)));
5:
Wait(150 + (Random(100)));
6:
Wait(0 + (Random(100)));
end;
Finished;
until alchs = alchstodo;
end;
procedure Setup;
begin
smartSetup('world158', 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);
Report;
end.
The error is that the script doesn't click on the yew longs when it should. The DTM's are correct.
Any help?