Code:
program RangingGuild;
{$DEFINE SRL5}
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i SRL/SRL/misc/paintsmart.simba}
const
RandAmount = 200;
SWorld = 138;
function FindArrows(var X, Y: Integer) :Boolean;
var
TPA: TPointArray;
aTPA : T2DPointArray;
MiddlePoint :TPoint;
Hi, I, TempCTS :Integer;
begin
If Not LoggedIn then Exit;
TempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.17);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1781567, MIX1, MIY1, MIX2, MIY2, 8);
If Length(TPA) = 0 Then Exit;
aTPA := TPAToATPAEx(TPA, 5, 5);
SortATPAFromFirstPoint(aTPA, Point(0, 0));
MiddlePoint := MiddleTPA(aTPA[0]);
MMouse(MiddlePoint.X, MiddlePoint.Y, 2, 2);
If WaitUpTextMulti(['ronze', 'rrow'], 250) then
begin
GetMousePos(X, Y);
Result := True;
end;
ColorToleranceSpeed(TempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
function WaitArrow(var X, Y :Integer; Time :Integer) :Boolean;
var
T :Integer;
begin
If Not LoggedIn then Exit;
MarkTime(T);
while (TimeFromMark(T) < Time) do
begin
If Not LoggedIn then Exit;
Wait(RandomRange(10, 25));
if FindArrows(X, Y) then
begin
Result := True;
Break;
end;
end;
end;
function WaitNPCText(Text :String; Time :Integer) :Boolean;
var
T :Integer;
begin
If Not LoggedIn then Exit;
MarkTime(T);
while (TimeFromMark(T) < Time) do
begin
If Not LoggedIn then Exit;
Wait(RandomRange(10, 25));
if FindNPCChatText(Text, Nothing) then
begin
Result := True;
Break;
end;
end;
end;
function FindJudge :Boolean;
var
TPA: TPointArray;
aTPA: T2DPointArray;
MiddlePoint :TPoint;
X, Y, Hi, I, TempCTS :Integer;
begin
If Not LoggedIn then Exit;
TempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.40, 0.06);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6512479, MSX1, MSY1, MSX2, MSY2, 14);
If Length(TPA) = 0 Then Exit;
aTPA := TPAToATPAEx(TPA, 20, 20);
SortATPAFromFirstPoint(aTPA, Point(260, 32));
Hi := Length(aTPA);
for I := 0 to Hi - 1 do
begin
If Length(aTPA[I]) < 40 then Continue;
MiddlePoint := MiddleTPA(aTPA[I]);
MMouse(MiddlePoint.X, MiddlePoint.Y, 2, 2);
If WaitUpTextMulti(['Competition', 'ompeti', 'Judge', 'udge'], 250) then
begin
ClickMouse2(False);
If WaitOptionEx('alk', 'All', Nothing, 250) then
begin
If WaitOptionMulti(['Compete', 'ompete'], 250) then
begin
Flag;
If WaitNPCText('Yes', 1500) then
begin
TypeSendEx('1', False);
If WaitArrow(X, Y, 3500) then Mouse(X, Y, 2, 2, True);
end;
end;
Result := True;
Break;
end;
end;
end;
ColorToleranceSpeed(TempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
function FireTarget(var X, Y: Integer) :Boolean;
var
TPA: TPointArray;
aTPA : T2DPointArray;
MiddlePoint :TPoint;
Hi, I, TempCTS :Integer;
begin
If Not LoggedIn then Exit;
TempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.15, 1.28);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 4672674, MSX1, MSY1, MSX2, MSY2, 2); //5330874
If Length(TPA) = 0 Then Exit;
aTPA := TPAToATPAEx(TPA, 20, 20);
SortATPAFromFirstPoint(aTPA, Point(0, 0));
MiddlePoint := MiddleTPA(aTPA[0]);
MMouse(MiddlePoint.X, MiddlePoint.Y, 2, 2);
If WaitUpTextMulti(['Fire', 'Target', 'arget'], 250) then
begin
GetMousePos(X, Y);
Result := True;
end;
ColorToleranceSpeed(TempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Active := True;
End;
End;
procedure SetupChar;
begin
LoginPlayer;
//MakeCompass('e');
setAngle(SRL_ANGLE_LOW);
ToggleXPBar(True);
end;
procedure SpamMouse(var x, y: Integer; Time: Integer);
begin
If Not LoggedIn then Exit;
HoldMouse(x, y, mouse_left);
Wait(Round(Time / 1.2));
ReleaseMouse(x, y, mouse_left);
Wait(Time);
end;
procedure AntiBan;
begin
writeln('Choosing random antiban');
case random(11) of
0 : begin
writeln('Random click selected');
RandomRClick;
end;
1 : begin
writeln('Random movement selected');
RandomMovement;
end;
2 : begin
writeln('Hover skill strength');
HoverSkill(skill_strength,false);
end;
3 : begin
writeln('Prayer tab selected');
GameTab(27);
Wait(randomrange(400,800));
end;
4 : begin
writeln('Random Fkey selected');
HoverSkill(skill_hitpoints,false);
end;
5 : begin
writeln('Hover Skill (HP) selected');
HoverSkill(skill_hitpoints,false);
Wait(randomrange(300,600));
end;
6 : begin
writeln('Game Tab stats selected');
GameTab(23);
end;
7 : begin
writeln('Pickup Mouse selected');
PickUpMouse;
end;
8 : begin
writeln('Random wait selected');
Wait(randomrange(1000,2000));
end;
9 : begin
writeln('Hover Skill attack selected');
HoverSkill('attack',false);
end;
end;
Wait(randomrange(500,1000));
end;
Procedure RAntiBan;
begin
Wait(randomrange(200,400));
case random(RandAmount) of
0 : begin
writeln('Random Wait AntiBan');
Wait(randomrange(1100,2500));
end;
1 : begin
AntiBan;
end;
end;
end;
procedure Competition;
var
X, Y, C :Integer;
begin
If Not LoggedIn then Exit;
while not FindNPCChatText('orry', Nothing) do
begin
FindJudge;
If FindNPCChatText('standard', Nothing) then
If WaitArrow(X, Y, 1500) then Mouse(X, Y, 2, 2, True);
if FireTarget(X, Y) then
SpamMouse(x, y, RandomRange(Players[CurrentPlayer].Integers[1], Players[CurrentPlayer].Integers[2]));
if not DidClick(True, 30) then Inc(C)
else
C := 0;
if (C >= 2) then CloseWindow;
RAntiBan;
end;
end;
procedure Startup;
begin
Smart_Server := SWorld;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
MouseSpeed := 15;
wait(100+random(100));
end;
begin
Startup;
SetupChar;
repeat
if not LoggedIn then
begin
LoginPlayer;
ClickNorth(SRL_ANGLE_HIGH);
end;
competition;
until(AllPlayersInactive)
end.
i cant figure out how to let him click on the fire range he after he get the 10 bronze arrows he is trying to get it again i already changet the collour of the fire range but still nothing can some one help me?