SCAR Code:
program DemonMager;
{.Include SRL\SRL\misc\Smart.scar}
{.Include SRL\SRL.scar}
{.Include SRL\SRL\reflection\Reflection.scar}
{.Include SRL\SRL\skill\Magic.scar}
{****************************************************************************************************
Start setting up the script
****************************************************************************************************}
const spell = 'wind strike'; // Type in the name of your attack spell. 'Wind Strike' is an example.
defensive = false; // True if you want to gain Magic and Defense XP at the same time. False otherwise.
username = ''; // The player's username.
password = ''; // The player's password.
nickname = ''; // The first 3-4 letters of the player's username.
{****************************************************************************************************
Stop setting up the script
****************************************************************************************************}
var xx, yy, Mark, DeadDemons, StartRunes, StartXP: Integer;
RuneType: String;
procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := username;
Players[0].Pass := password;
Players[0].Nick := nickname;
Players[0].Active := true;
end;
procedure AntiBan;
begin
case RandomRange(1, 50) of
1: BoredHuman;
3: RandomMovement;
4: GameTab(RandomRange(1, 15));
5: Sleep(RandomRange(4000, 10000));
6: HoverSkill('magic', false);
end;
end;
procedure SetupSMART;
begin
Smart_Members := true;
Smart_Server := RandomWorld(Smart_Members, False);
Smart_Signed := False;
Smart_SuperDetail := False;
end;
procedure SetupPlayer;
begin
{ if (not pos('strike', spell) = 0) then} RuneType := 'mind';
{ if (not pos('bolt', spell) = 0) then RuneType := 'chaos';
if (not pos('blast', spell) = 0) then RuneType := 'death';
if (not pos('wave', spell) = 0) then RuneType := 'blood';}
FixSpells;
SetUpAutoCast(spell, defensive);
StartRunes := RuneAmount('inv', RuneType);
writeln('You have ' + IntToStr(StartRunes) + ' ' + RuneType + ' runes.');
StartXP := GetXP('magic');
writeln('You have ' + IntToStr(StartXP) + ' Magic XP.');
MakeCompass('n');
SendArrowWait(0, RandomRange(1000, 1500));
end;
function IsCasting: boolean;
var A1, A2: Integer;
begin
A1 := RuneAmount('inv', RuneType);
sleep(RandomRange(1000, 1200));
A2 := RuneAmount('inv', RuneType);
if not(A1 = A2) then
begin
Result := true;
end else
begin
Result := false;
end;
end;
procedure PrintProggy;
begin
writeln('[--------------------------------->');
Sleep(300);
writeln('[ Spells Cast: ' + IntToStr(StartRunes - RuneAmount('inv', RuneType)));
Sleep(300);
writeln('[ Demons killed: ' + IntToStr(DeadDemons));
Sleep(300);
writeln('[ Total XP Gained: ' + IntToStr(GetXP('magic') - StartXP));
Sleep(300);
writeln('[--------------------------------->');
end;
procedure PrintSiggy;
begin
ClearDebug;
writeln('[--------------------------------->');
Sleep(300);
writeln('[ Demon Mager v. 1.0.0.0');
Sleep(300);
writeln('[--------------------------------->');
end;
begin
ClearDebug;
SetupSRL;
SetupReflection;
SetupSMART;
PrintSiggy;
DeclarePlayer;
LoginPlayer;
SetupPlayer;
repeat
if not(LoggedIn) then LoginPlayer;
FindNormalRandoms;
if (FindObjCustom(xx, yy, ['2'], [2964863, 2110593, 1846639], 5)) then
begin
DeadDemons := DeadDemons + 1;
GetMousePos(xx, yy);
Mouse(xx, yy, 0, 0, False);
Wait(50 + Random(500));
ChooseOption('tack');
FFlag(10);
if (FindBlackChatMessage('ough run')) then
begin
writeln('You are out of runes!');
PrintProggy;
Logout;
TerminateScript;
end;
MarkTime(Mark);
repeat
if (not(LoggedIn) or (FindNormalRandoms)) then Break;
Sleep(1000 + Random(500));
until (TimeFromMark(Mark) > 10000);
end;
while (IsCasting) do
begin
AntiBan;
FindNormalRandoms;
end;
until false;
end.