SCAR Code:
{Thanks to Smartzkid for all the help and looking over of my script}
{.Script Info:
-=ScriptName=- = SecretFighter
-=Author=- = HyperSecret
-=Description=- = Kills Any Monster
-=Version=- = 0.10
-=Comments=- = SRL 4+
(C) 2007 TeamSecret Productions
/Script Info}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
// *
// * NAME : SecretFighter
// * WRITER : HyperSecret
// * CATEGORY : Fighting
// * DESCRIPTION : Kills Any Monster
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
// Took script info setup from Fawaki\\
program HSAutoFighter;
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
var
Killed, Killed2: integer;
var
x, y: integer;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
const Color1 = 2638679;//1st color of monster
const Color2 = 3957891;//2nd color of monster
const Color3 = 8233913;//3rd color of monster
const MonsterName = 'Chicken';//name of the monster (case sensative)
const ToKill = 25;//how many monsters for each player to kill
const eatfood = 'no';//yes or no, for if you want to eat food
const FoodName = 'Salmon';//name of 1st food your eating (case sensative)
const foodcolor = 7040901;//color of food your eating
const eathp = 70;//Hp you want your guy to eat at
const runhp = 65;//HP you want your guy to run at
const RunDirection = 'e';//n,s,e,w which way you want to run when hp get to runhp
const MySRLID = '';// Stats ID.
const MySRLPassword = '';//<- Your SRL Password here if you want to have yout stats logged
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLID := doritoz;
SRLPassword := *******;
Players[0].Name :='treeslayerr'; //Character name
Players[0].Pass :='**********'; //Character PAss
Players[0].Nick :='Tree'; //Nickname 3 Letter of char name
Players[0].Active:=True; //True if you want this player to be ran in the script, false if not
Players[0].Skill := 'defense'; //the skill you want to train, strength, attack, defense
Players[0].Integers[0] := 0;
WriteLn('Using '+ IntToStr(HowManyPlayers) +' Players');
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure HyperSecretTAG;
begin
ClearDebug;
Writeln(' _ _ _____ _ ');
Writeln('| | | | / ___| | | ');
Writeln('| |_| |_ _ _ __ ___ _ __\ `--. ___ ___ _ __ ___| |_');
Writeln('| _ | | | | ''_ \ / _ \ ''__|`--. \/ _ \/ __| ''__/ _ \ __|');
Writeln('| | | | |_| | |_) | __/ | /\__/ / __/ (__| | | __/ |_ ');
Writeln('\_| |_/\__, | .__/ \___|_| \____/ \___|\___|_| \___|\__|');
Writeln(' __/ | | ');
Writeln(' |___/|_| ');
Writeln('HyperSecret''s AutoFighter!');
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=0 to 7 do
begin
case I of
0: if SolveChatRandom then
Result := True;
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: RC;
end;
wait(1);
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure HSAntiBAN;
begin
if(not(LoggedIn))then
Exit;
case Random(20) of
0: PickUpMouse;
1: PickUpMouse;
5: PickUpMouse;
6: case Random(4) of
0: TypeSend('Combat Lvl?');
1: TypeSend('Str Lvl?');
2: TypeSend('Att Level?');
3: TypeSend('D Level?');
end;
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function HSFindRandoms: boolean;
begin
if FindFastRandoms or
FindNormalRandoms then
begin
result := true;
end else
begin
result := false;
end;
FindTalk
HSAntiBan;
SRLRandomsReport;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure AutoRetaliate(Retaliate:Boolean); //thx to fawaki for autoretaliate
begin
GameTab(1);
if Retaliate then
begin
If not FindColor(x, y, 1777020, 624, 385, 719, 396) then
begin
Mouse(666, 381, 8, 8, True);
end;
end;
if not Retaliate then
begin
If FindColor(x, y, 1777020, 624, 385, 719, 396) then
begin
Mouse(666, 381, 8, 8, True);
end;
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure HSChooseSkill;
begin
if (not(LoggedIn)) then Exit;
GameTab(1);
begin
if Players[CurrentPlayer].Skill = 'attack' then SetFightMode(1);
if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
end;
if (HSFindRandoms = true) then
begin
nextplayer(true);
end;
AutoRetaliate(True);
SetChat('off', 1);
SetChat('off', 2);
SetChat('off', 3);
SetChat('off', 1);
SetRun(True);
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure HSHighestAngle;
begin
KeyDown(38);
Wait(3000 + random(100));
KeyUp(38);
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure StatsDePlayer;
var Active: string;
var i: Integer;
begin
if Players[CurrentPlayer].Active=True then
Active:='In Use'
else
Active:='Not In Use';
WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
Writeln (' Player Name : '+ Players[CurrentPlayer].Name);
Writeln (' Player Number : '+inttostr(CurrentPlayer));
Writeln (' Active : '+ Active);
if ( Players[CurrentPlayer].Worked > 0 ) then
Writeln (' Worked : '+ inttostr(Players[CurrentPlayer].Worked) +' min.');
WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
GetAllLevels;
for i := 0 to HowManyPlayers - 1 do
begin
if Players[i].Active = True then Active:='T' else Active:='F';
WriteLn ( ' ' + Inttostr (I) + ' : ' + Players[i].Name + ' = ' + Active
+'. - Lvl : '
+' '+inttostr(Players[i].level[1])+
+' '+inttostr(Players[i].level[2])+
+' '+inttostr(Players[i].level[3])+
+' '+inttostr(Players[i].level[8])+'. '
+'W : '+IntToStr(Players[i].Worked)+' min. '
+'K : '+ IntToStr(Players[i].integers[0]) +' '+ MonsterName +'s. ');
end
WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
Procedure ReportDeProgress;
begin
writeln(' ');
WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
WriteLn (' -= AutoFighter v0.10 -Progress Report- By : HyperSecret =-');
Writeln ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
Writeln(' Worked for '+ TimeRunning);
Writeln(' Killed Total of '+inttostr(Killed2)+' '+ MonsterName +'s.');
StatsDePlayer;
SRLRandomsReport;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function HSFindFood(Name: string; color, maxtol, maxtime: integer): boolean;
var
box: TBoxArray;
tolerance, time: integer;
begin
result := false;
MarkTime(time);
repeat
if(FindColorSkipBoxArrayTolerance(x, y, color, 548, 205, 734, 461, tolerance, box)) then
begin
MMouse(x, y, 0, 0);
wait(50 + random(250));
if(IsUpText('Eat'))then
begin
result := true;
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
ChooseOption('at');
Exit;
end else
begin
SetLength(box, Length(box) + 1);
box[Length(box) - 1].X1 := x - 15;
box[Length(box) - 1].Y1 := y - 15;
box[Length(box) - 1].X2 := x + 15;
box[Length(box) - 1].Y2 := y + 15;
end;
end else
tolerance := tolerance + 1;
wait(50);
until(tolerance > maxtol) or (TimeFromMark(time) > maxtime);
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure HSHpCheck;
var
i, n: Integer;
TimeToEat: integer;
begin
MarkTime(TimeToEat);
repeat
for i:= 0 to 2 do
begin
gethp;
if (gethp <= eathp) then
GameTab(4);
begin
if(HSFindFood(FoodName, FoodColor, 5, 2000)) then
begin
if (gethp < runhp) then
begin
Status('Running Because Low HP');
RunAwayDirection(RunDirection);
begin
nextplayer(false);
end;
if (HSFindRandoms = true) then
begin
nextplayer(true);
end;
end;
end;
end;
end;
until (gethp > eathp) or (TimeFromMark(TimeToEat) > 300000+random(30000));
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function HSOtherPlayerFighting(txt: string): Boolean;
var
x, y: integer;
begin
Result := FindText(x, y, txt, SmallChars, 9, 442, 182, 459);
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function HSFighting(Name: string; color, maxtol, maxtime: integer): boolean;
var
box: TBoxArray;
tolerance, time: integer;
begin
result := false;
MarkTime(time);
repeat
if(FindColorSkipBoxArrayTolerance(x, y, color, msx1, msy1, msx2, msy2, tolerance, box)) then
begin
MMouse(x, y, 0, 0);
wait(50 + random(250));
if(IsUpText(Name))then
begin
result := true;
GetMousePos(x, y);
case Random(2) of
0: begin
Mouse(x, y, 0, 0, false);
ChooseOption('ttack');
Exit;
end;
1: begin
Mouse(x, y, 0, 0, true);
Exit;
end;
end;
end else
begin
SetLength(box, Length(box) + 1);
box[Length(box) - 1].X1 := x - 15;
box[Length(box) - 1].Y1 := y - 15;
box[Length(box) - 1].X2 := x + 15;
box[Length(box) - 1].Y2 := y + 15;
Exit;
end;
end else
tolerance := tolerance + 1;
wait(50);
until(tolerance > maxtol) or (TimeFromMark(time) > maxtime);
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure HSAttack;
var
MonsterColors: array[0..2] of integer;
i: Integer;
TimeToKill: Integer;
begin
if (not (LoggedIn)) then
Exit;
MonsterColors[0] := color1;
MonsterColors[1] := color2;
MonsterColors[2] := color3;
MarkTime(TimeToKill);
Killed := 0;
repeat
for i := 0 to 2 do
begin
if(HSFighting(MonsterName, MonsterColors[i], 5, 2000))then
begin
if (HSOtherPlayerFighting('omeone else is fighting that')) then
begin
Killed := Killed - 1;
case Random(5) of
0: TypeSend('Ah');
1: TypeSend('Bah');
2: TypeSend('Shucks');
3: TypeSend('Dangit');
4: TypeSend('Blah');
end;
Exit;
end;
Wait(1000 + random(500));
OutFight;
Killed := Killed + 1;
Killed2 := Killed2 + 1;
ReportVars[0] := ReportVars[0] + 1;
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + 1;
end;
end;
wait(10);
if (HSFindRandoms = true) then
begin
nextplayer(true);
end;
if (eatfood = 'yes') then
begin
HSHpCheck;
end;
until (Killed >= ToKill) or (TimeFromMark(TimeToKill) > 300000+random(30000));
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure SetUp;
begin
SetupSRL;
ScriptID := '269';
HyperSecretTAG;
DeclarePlayers;
if(not(loggedin))then LoginPlayer;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure SetUp2;
begin
HSChooseSkill;
HSHighestAngle;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
begin
SetUp;
Killed2 := 0;
repeat
if(not(loggedin))then LoginPlayer;
SetUp2;
HSAttack;
If (Killed >= ToKill) then
begin
Wait(5000 + random(1000));
nextplayer(true);
end;
ReportDeProgress;
until(false);
end.