SCAR Code:
////////////////////////////////////////////////////////////////////////////////
// //
// Maxcore's Chicken Killer //
// //
// Directions: //
// 1) Go to any place that has chickens. //
// 2) Press play //
// //
// Credits: Everyone at Mopar and the SRL forums, keep owning everyone! //
////////////////////////////////////////////////////////////////////////////////
program ChickenKiller;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Fighting.scar}
var
intKilled, intXP, BonesMenu, intPXP : integer;
const
intChicken = 1121677; // Color of the chickens.
intBones = 14803428; // Color of the bones.
procedure DeclarePlayers;
var
i : integer;
begin
Disguise('Norton Anti-Virus');
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'Baird';
Players[0].Active := True;
for i := 0 to Length(Players) - 1 do
SetArrayLength(Players[i].Integers, 4);
for i := 0 to Length(Players) - 1 do
SetArrayLength(Players[i].Strings, 1);
for i := 0 to Length(Players) - 1 do
SetArrayLength(Players[i].Booleans, 1);
end;
procedure ProgressReport;
begin
Writeln('==========================================>');
Writeln('Script running for ' + TimeRunning);
Writeln('You have killed ' + IntToStr(intKilled) + ' for ' + IntToStr(intXP) + ' XP.');
Writeln('You have gained ' + IntToStr(intPXP) + ' prayer XP.');
Writeln('==========================================>');
Writeln('');
Writeln('');
end;
procedure Login;
begin
Mouse(464, 293, 10, 20, true);
TypeSend(Players[CurrentPlayer].Name);
Wait(200 + Random(78));
TypeSend(Players[CurrentPlayer].Pass);
Wait(300 + Random(78));
Mouse(303, 323, 10, 20, true);
Wait(3500 + Random(2500));
Mouse(401, 338, 10, 20, true);
end;
procedure LoadMenuImages;
begin
BonesMenu := BitmapFromString(10, 11, 'beNpjYPg/wQEZMaACZEF' +
'MBZTLYrUXTRCTTWtZXK5iwAMA/Y1f3A==');
end;
procedure FindChicken;
var
found : boolean;
changeDir, x, y : integer;
begin
found := false;
changeDir := 1;
while(not found) do
begin
found := FindColorSpiralTolerance(x, y, intChicken, 5, 5, 515, 337, 15);
if found then
begin
MMouse(x, y, 0, 0);
if IsUpText('Chicken') then
begin
Mouse(x, y, 0, 0, true);
end else
begin
found := false;
end;
end else
begin
if changeDir = 1 then
begin
MakeCompass('n');
changeDir := 2;
wait(400 + Random(1000));
end else
begin
MakeCompass('s');
changeDir := 1;
wait(400 + Random(1000));
end;
end;
end;
end;
procedure PickUpBones;
var
found : boolean;
changeDir, x, y : integer;
begin
changeDir := 0;
repeat
found := FindColorSpiralTolerance(x, y, intBones, 203, 117, 292, 223, 15);
if found then
begin
Mouse(x, y, 0, 0, false);
LoadMenuImages;
if FindBitmapToleranceIn(BonesMenu, x, y, 5, 5, 515, 337, 15) then
begin
Mouse(x, y, 0, 0, true);
FreeBitmap(BonesMenu);
wait(2500 + Random(1500));
Mouse(576, 227, 15, 15, true);
wait(1000);
intPXP := intPXP + 10;
end;
end;
case changeDir of
0: MakeCompass('N');
1: MakeCompass('S');
2: MakeCompass('E');
3: MakeCompass('W');
end;
if changeDir = 3 then
begin
found := true;
end;
changeDir := changeDir + 1;
until(found);
end;
procedure FightChicken;
var
fought : boolean;
begin
fought := false;
if InFight then
begin
intKilled := intKilled + 1;
intXP := intXP + 28;
ProgressReport;
fought := true;
end;
while(InFight) do
begin
wait(2000);
end;
if fought then
begin
PickUpBones;
end;
end;
begin
SetUpSRL;
Cleardebug;
GetSelf.WindowState := wsMinimized;
DeclarePlayers;
ProgressReport;
Login;
wait(4000);
while(not IsFKeyDown(10)) do
begin
FindChicken;
wait(4000);
FightChicken;
end;
GetSelf.WindowState := wsMaximized;
end.