//=======================================================================\\
// Created By: Aztek \\
// Basic Layout: Neon, Pwnd \\
// Help Also From: ___________________ \\
// Use: AutoFights Monster Of Color Picked Choice \\
// Trains: Specified Skill \\
// Eats: Yes, If You Want It To \\
// SRL Version: Im Sure It Is Compatable With Most Versions \\
//=======================================================================\\
Program AutoFighter;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\Fighting.scar}
Const
LoginPerson = ''; //UserName
PassPerson = ''; //PassWord
MCol1 = 1998964; //Monster Color 1
MCol2 = 2863510; //Monster Color 2
MCol3 = 8305575; //Monster Color 3
Times = 12; //Approximate times to kill things
EatB = False; //Wanna Eat?
FoodCol = 0; //FoodColor
Direction = 'S'; //Run Direction
NickName = 'sir'; //4 letters for Randoms
HowToFight = 2; //FightMode//1 = Att/2 = Str/3 = Mixed/4 = Def/
Var
Kills, LogTime: integer;
procedure Startup;
begin
SetupSRL;
NickNameBMP:= CreateBitmapMaskFromText(NickName, UpChars);
SetChat('Hide', 1);
SetChat('Off', 2);
SetChat('Off', 3);
SetFightMode(HowToFight);
End;
procedure FindRandoms;
begin
FindNormalRandoms;
if(FindNewBox)then
SolveBox;
end;
procedure Eat(FoodCol: integer; Dir: string);
var
Sex, Sey: integer;
begin
Sex:= 594;
Sey:= 149;
if(FindColorSpiral(Sex, Sey, FoodCol, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(Sex, Sey, 0, 0, True);
end else
begin
WriteLn('No food!');
RunTo(Dir, False);
LogOut;
end;
end;
Procedure LogBack(UserLogin: String; PassLogin: String);
Begin
If Not (LoggedIn) Then
WriteLn('Logging Player In');
Begin
If (GetColor(278, 292) = 16777215) And (GetColor(430, 293) = 16777215) And (GetColor(313, 249) = 65535) And (GetColor(442, 250) = 65535) Then
begin
Wait(1000 + Random(500));
MoveMouseSmooth(466, 290);
Mouse(x, y, 0, 0, true);
wait(500);
end;
If (GetColor(419, 222) = 65535) Then
Begin
WriteLn(UserLogin);
TypeSend(UserLogin);
Wait(200 + Random(800));
WriteLn(PassLogin);
TypeSend(PassLogin);
Wait(300 + Random(700));
MoveMouseSmooth(302, 323);
Mouse(x, y, 0, 0, true);
End;
End;
End;
procedure RWait(Base, Rand: integer);
begin
if((Base > 100) and (Rand > 100))then
begin
Wait(Base + Random(Rand));
end else
Wait(Base * 100 + Random(Rand * 100));
end;
procedure Fight(Color1, Color2, Color3, FoodColor: integer; Dir: string);
var
Sex, Sey: integer;
begin
Sex:= 259;
Sey:= 196;
if((FindColorSpiral2(Sex, Sey, Color1, MSX1, MSY1, MSX2, MSY2)) or
(FindColorSpiral2(Sex, Sey, Color2, MSX1, MSY1, MSX2, MSY2)) or
(FindColorSpiral2(Sex, Sey, Color3, MSX1, MSY1, MSX2, MSY2)))then
begin
MMouse(Sex, Sey, 3, 3);
if(IsUpText('Att'))then
begin
Mouse(x, y, 0, 0, True);
RWait(1, 2);
Flag;
while(InFight) do
if (getHp < 41) then
begin
Eat(FoodColor, Dir);
end;
Kills := Kills + 1;
LogTime:= ((LogTime + 1) + Random(3));
end;
end;
end;
procedure ProgressReport;
var
Counter: integer;
begin
ClearDebug;
Counter:= 0;
repeat
WriteLn('');
Counter:= Counter + 1;
until(Counter = 3)
WriteLn('///////////////////////////');
WriteLn('//// Progress Report ////');
WriteLn('///////////////////////////');
WriteLn('//// Killed: ' + IntToStr(Kills) + ' ////');
WriteLn('//// ' + ScriptTime2(2) + ' ////');
WriteLn('////////////////////////////');
if(talks>0)then
WriteLn(' Talked to ' + IntToStr(talks) + ' Random event[s].');
if(lamps>0)then
WriteLn(' Used lamps ' + IntToStr(lamps) + ' Time[s].');
if(frogs>0)then
WriteLn(' Solved ' + IntToStr(frogs) + ' Frog[s].');
if(newboxes>0)then
WriteLn(' Solved ' + IntToStr(newboxes) + ' Box[es].');
if(demons>0)then
WriteLn(' Solved ' + IntToStr(demons) + ' Demon[s].');
if(logs>0)then
WriteLn(' Logged in ' + IntToStr(logs) + ' Time[s].');
WriteLn('<=====================================================>');
end;
begin
ClearDebug;
Kills:= 0;
Startup;
repeat
Fight(MCol1, MCol2, MCol3, FoodCol, Direction);
if(Kills mod 5 = 0)Then
FindRandoms;
if(Kills mod 10 = 0)Then
ProgressReport;
if(LogTime mod 2 = 0)Then
Begin
Logout;
LogBack(LoginPerson, PassPerson);
End;
until((Times = Kills) or WeAreDead)
end.
That compiles.