SCAR Code:
////////////////////////////////////////////////////////////////////////////////
// Electron Man Presents //
// //
// Name: Chicken Killer //
// Description: Finds and kills chickens. This program allows the user to //
// choose which skills he/she would like to train, or they can //
// have the program choose the lowest skill. //
// Date: 11/12/07 //
// //
// Directions: //
// 1) Target the Runescape Client with the cross hairs. //
// 2) Fill out player info in lines 39 - 71. //
// 3) Change lines 26 and 27 if you want to change the settings. //
// 4) Make sure all players are by some chickens. //
// 5) Press play. //
////////////////////////////////////////////////////////////////////////////////
program ChickenKiller;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Fighting.scar}
var
intKilled, SkillXP : integer;
CurSkill : string;
const
Chick = 1121677; // Color of the red on the chickens.
WaitTime = 14; // Time in seconds to wait to kill chicken.
NumToKill = 200; // Number to kill per account.
////////////////////////////////////////////////////////////////////////////////
// Procedure: DeclarePlayers; //
// Author: Wizzup? //
// Description: Declare the players that will be running the script. //
// //
// Note: When setting a Nick, make sure it has no capital letters or spaces. //
// ex: If your username is 'Damon B4ird' make your nick '4ird' //
////////////////////////////////////////////////////////////////////////////////
procedure DeclarePlayers;
begin
HowManyPlayers := 5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='USERNAME1';
Players[0].Pass :='PASSWORD1';
Players[0].Nick :='';
Players[0].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
Players[0].Active:=True;
Players[1].Name :='USERNAME2';
Players[1].Pass :='PASSWORD2';
Players[1].Nick :='';
Players[1].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
Players[1].Active:=True;
Players[2].Name :='USERNAME3';
Players[2].Pass :='PASSWORD3';
Players[2].Nick :='';
Players[2].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
Players[2].Active:=True;
Players[3].Name :='USERNAME4';
Players[3].Pass :='PASSWORD4';
Players[3].Nick :='';
Players[3].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
Players[3].Active:=True;
Players[4].Name :='USERNAME5';
Players[4].Pass :='PASSWORD5';
Players[4].Nick :='';
Players[4].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
Players[4].Active:=True;
end;
////////////////////////////////////////////////////////////////////////////////
// Procedure: ProgressReport; //
// Author: Electron Man //
// Description: Prints out a progress report. //
////////////////////////////////////////////////////////////////////////////////
procedure ProgressReport;
begin
Writeln('<=================================================>');
Writeln(' Chicken Killer v1 ');
Writeln(' ');
Writeln('Worked for ' + TimeRunning );
Writeln('Killed ' + IntToStr(intKilled) + ' Chickens' );
Writeln('<=================================================>');
end;
////////////////////////////////////////////////////////////////////////////////
// Function: FindChicken; //
// Author: Electron Man //
// Description: Return true if it finds a chicken on the screen. //
////////////////////////////////////////////////////////////////////////////////
function FindChicken: Boolean;
var
x, y : integer;
found : boolean;
begin
found := FindColorSpiralTolerance(x, y, Chick, MSX1, MSY1, MSX2, MSY2, 25);
if found then
begin
MMouse(x, y, 0, 0);
if IsUpText('hicken') then
begin
Mouse(x, y, 0, 0, true);
Result := true;
end else
Result := false;
end;
end;
////////////////////////////////////////////////////////////////////////////////
// Procedure: SetFightStyle; //
// Author: Electron Man (Inspired by MasterKill) //
// Description: Sets the fight style to whatever 'style' is. //
////////////////////////////////////////////////////////////////////////////////
procedure SetFightStyle(style : string);
var
Three : boolean;
x, y : integer;
begin
GameTab(1);
Wait(200 + Random(50));
if FindColorTolerance (x, y, 2070783, 651, 302, 718, 348, 10) then
Three := false
else
Three := true;
if Three then
begin
case style of
'attack': SetFightMode(1);
'strength': SetFightMode(2);
'defense': SetFightMode(3);
end;
end else
begin
case style of
'attack': SetFightMode(1);
'strength': SetFightMode(2);
'defense': SetFightMode(4);
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
// Function: GetLowestSkill; //
// Author: Electron Man //
// Description: Returns the fight skill with the lowest level. //
////////////////////////////////////////////////////////////////////////////////
function GetLowestSkill: String;
var
LowestSkill : string;
begin
LowestSkill := 'attack';
if GetSkillLevel('strength') < GetSkillLevel(LowestSkill) then
LowestSkill := 'strength';
if GetSkillLevel('defence') < GetSkillLevel(LowestSkill) then
LowestSkill := 'defence';
CurSkill := LowestSkill;
Result := LowestSkill;
end;
////////////////////////////////////////////////////////////////////////////////
// Procedure: ChooseFightStyle; //
// Author: Electron Man //
// Description: Chooses the correct fight style. //
////////////////////////////////////////////////////////////////////////////////
procedure ChooseFightStyle;
begin
case LowerCase(Players[currentplayer].strings[0]) of
'auto' : SetFightStyle(GetLowestSkill);
'attack' : SetFightStyle('attack');
'defence' : SetFightStyle('defence');
'strength': SetFightStyle('strength');
end;
end;
////////////////////////////////////////////////////////////////////////////////
// Function: CheckIfFought; //
// Author: Electron Man //
// Description: Returns true if player has killed a chicken. //
////////////////////////////////////////////////////////////////////////////////
function CheckIfFought: Boolean;
var
AfterXP : integer;
begin
Wait(WaitTime * 1000 + Random(1000));
AfterXP := GetXP(CurSkill);
if SkillXP < AfterXP then
begin
SkillXP := AfterXP;
Result := true;
end else
Result := false;
end;
////////////////////////////////////////////////////////////////////////////////
// Procedure: StartUp; //
// Author: Electron Man //
// Description: Prepares for the slaughtering of chicken. //
////////////////////////////////////////////////////////////////////////////////
procedure StartUp;
begin
if LoggedIn then
begin
ChooseFightStyle;
SetRun(true);
SkillXP := GetXP(CurSkill);
PerfectNorth;
HighestAngle;
end else
Writeln('Not logged in, but why was this called?');
end;
begin
SetUpSRL;
DeclarePlayers;
Disguise('Norton Anti-Virus 2007');
ClearDebug;
ActivateClient;
LoginPlayer;
repeat
StartUp;
while(intKilled < NumToKill) do
begin
if FindChicken then
begin
if CheckIfFought then
begin
intKilled := intKilled + 1;
ProgressReport;
FindNormalRandoms;
end;
end;
end;
NextPlayer(true);
until(false);
end.