Code:
Program FightBats;
{==========================================================}
{Code based from 'FrostChopper 4 Project Awesome' by Ubuntu}
{==========================================================}
{$DEFINE SMART8}
{$i srl/srl.simba}
{$i SPS/SPS.simba}
{$i SRL/SRL/Misc/SmartGraphics.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
end;
end;
Procedure CheckFriends;
Var
NCx, NCy, ONx, ONy :Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) or (InvFull) then Exit;
gametab(tab_friends);
If FindColorTolerance(NCx, NCy, 16683035, 546, 246, 722, 451, 5) Then
begin
MMouse(NCx, NCy, 5, 5);
Wait(RandomRange(1000, 2000));
end;
If FindColorTolerance(ONx, ONy, 6619135, 546, 246, 722, 451, 5) Then
begin
MMouse(ONx, ONy, 5, 5);
Wait(RandomRange(1000, 2000));
end else
begin
Wait(RandomRange(500, 1000));
end;
FTab(tab_Inv);
end;
procedure Antiban;
begin
case Random(1000) of
0: HoverSkill(skill_attack,false);
10: PickUpMouse;
20: CheckFriends;
30: RandomMovement;
40: BoredHuman;
50: ExamineInv;
60: RandomRClick;
70: begin
HoverSkill('Attack', false);
GameTab(Tab_Inv);
end;
80: Wait(5000+random(2000));
5..12: HoverSkill('random', False);
100:begin
GameTab(Tab_Stats);
Wait(3000 + Random(1500));
GameTab(tab_Inv);
end;
101: begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;
end;
end;
Function IsAttacking: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 500, 650) > 350);
end;
Procedure Attack;
var x, y: integer;
begin
SetAngle(SRL_ANGLE_HIGH);
repeat
FindNormalRandoms;
While IsAttacking Do Wait(500+Random(50));
if (FindObjCustom(x,y,['Attack '], [7238003,4473926,3487032], 3)) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('Attack');
end;
repeat
wait(400+random(250));
AntiBan;
until false;
until false;
end;
begin
SRL_SixHourFix := True;
SetupSRL;
DeclarePlayers;
Repeat
if not LoggedIn then LoginPlayer;
Attack;
Until false;
end.