SCAR Code:
program RangeGuilder;
{.include srl/srl.scar}
{I have to say thanks to Sand Storm for cleaning up my script and helping me with
cases. He hopped on MSN and taught me the quick way. Also, thanks to Tootoot22
for helping me over IRC! Thanks to so many more people over IRC for being patient
and helping me through so many problems.}
const
Version = 'V0.1';//Don't touch!
SRLStatsID = '';
SRLStatsPW = '';
var
x, y, Arrows, Ticket, JudgeColor, RTargetColor, RArrows: Integer;
ShotTarget, Games, Pop, Ground, GroundColor: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'al capone xx'; //Runescape account
Players[0].Pass := '9494444'; //Runescape password
Players[0].Nick := 'al c'; //3-4 letters of your runscape username
Players[0].Active := True; //In the script or not
Players[0].Integers[0] := 3;//Number of games to do
Players[0].Strings[0] := 'Arrows';//This is all for now.
{Players[1].Name := ''; //Runescape account
Players[1].Pass := ''; //Runescape password
Players[1].Nick := ''; //3-4 letters of your runscape username
Players[1].Active := True; //In the script or not
Players[1].Integers[0] := 3;//Number of games to do
Players[1].Strings[0] := 'Arrows';//This is all for now.}
SetPlayerNameTPAs;
end;
procedure LoadDTMs;
begin
Arrows := DTMFromString('78DA633CC4C4C0F0880105849A7031F0036 94' +
'620FE0F048C1B816ADE32A001462412481F01AA794F40CD79 A09A' +
'3B04D4EC05AAB94940CD71A09A6B04D4EC21EC66005F70103 D');
Ticket := DTMFromString('78DA63CC61626078CC80029AE7663170016 94' +
'620FE0F048C5540357719D000231209A4E3816A5E1350930F 54F3' +
'81809A54A09AB704D49400D53C27A02609A8E609013569403 5EF0' +
'8A8C906AA794F404D196618A2AB01005FB5130B');
RArrows := DTMFromString('78DA63DCC7C0C010C28002424DB8C034239 4C' +
'F780A487830A001465435EB80442C013520BBE209A83986E9 1E0C' +
'355B8950731848B81350B38D08F79C001201B8D5B00331007 1CB0' +
'A5B');
end;
procedure IfFight;
begin
if (FindFight) Then
begin
RunAway('E', False, 1, 1000 + Random(500));
end;
end;
procedure AntiRandoms;
begin
LampSkill := 'Range';
FindTalk;
FindNormalRandoms;
IfFight;
end;
procedure AntiBan;
begin
case random(7) of
0 : MMouse(0, 0, 700, 500);
1 : Hoverskill('Range', false);
2 : BoredHuman;
3 : RandomMovement;
4 : GameTab(1);
5 : PickupMouse;
end;
end;
function ResultScreen: Boolean;
var
CBBM, CBx, CBy: Integer;
begin
CBBM := BitmapFromString(4, 3, 'z78DA3330000243030CD2C' +
'CC4D4DC848008320900F6350DC1');
if FindBitmapToleranceIn(CBBM, CBx, CBy, 450, 30, 500, 50, 50) then
begin
Mouse(CBx, CBy, 4, 4, True);
Result := True;
end;
FreeBitmap(CBBM);
end;
procedure SetColors;
begin
case Pop of
0: JudgeColor:= 9866123;
1: JudgeColor:= 1410467;
2: JudgeColor:= 4348768;
3: JudgeColor:= 4490642;
end
end;
function GetTicketCount: integer;
begin
Result := ItemAmount('inv', 'dtm', ticket, []);
end;
procedure FindJudge;
var
Counter : Integer;
begin
if (not LoggedIn) then
Exit;
MakeCompass('E');
SetColors;
if FindColorSpiralTolerance(x, y, JudgeColor, MSX1, MSY1, MSX2, MSY2, 10) then
begin
MMouse(x, y, 2, 2);
Wait(100);
if IsUpText('petition Jud') then
begin
Mouse(x, y, 3, 3, False);
ChooseOption('alk');
Wait(100 + Random(300));
ClickToContinue;
WriteLn('Found Judge');
end;
end else
Inc(Counter);
if (Counter = 5) then
begin
WriteLn('Couldn''t find the judge');
Logout;
NextPlayer(False);
end;
end;
procedure TalkToJudge;
begin
if (not LoggedIn) then
Exit;
Wait(1000 + Random(200));
if FindNpcChatText('give', ClickLeft) then
begin
ClickToContinue;
Wait(1000 + Random(200));
ClickToContinue;
Wait(1000 + Random(200));
ClickToContinue;
Wait(1000 + Random(200));
WriteLn('Sucessfully Talked to Judge');
end;
end;
procedure EquipArrows;
begin
if (not LoggedIn) then
Exit;
LoadDTMs;
Wait(100 + Random(500));
if FindDTM(Arrows, x, y, MIX1, MIY1, MIX2, MIY2)then
begin
MMouse(x, y, 5, 5);
Wait(1000 + Random(40));
if IsUpText('ield Bronz') then
begin
GetMousePos(x, y);
Mouse(x, y, 2, 2, True);
WriteLn('Equipped Arrows');
Exit;
end;
end;
FreeDTM(Arrows);
end;
procedure TargetColor;
begin
case Random(5) of
0: RTargetColor := 9866123;
1: RTargetColor := 8446700;
2: RTargetColor := 5857214;
3: RTargetColor := 3431278;
end;
end;
procedure FireAtTarget;
begin
if (not LoggedIn) then
Exit;
MakeCompass('N');
TargetColor;
if FindColorTolerance(x, y, RTargetcolor, MSX1, MSY1, MSX2, MSY2, 10) then
begin
MMouse(x, y, 2, 2);
Wait(100);
if IsupText('ire') then
begin
Wait(100);
GetMousePos(x, y);
Mouse(x, y, 2, 2, False);
ChooseOption('re-a');
WriteLn('Fired at Target');
if ShotTarget = 12 then
ShotTarget := 0;
end;
end;
end;
function FindJudgeChat : Boolean;
begin
if SimilarColors(GetColor(44, 401), 2638151, 5) then
Result := True
else
Result := False;
end;
procedure WalkToTrader;
begin
if (not LoggedIn) then
Exit;
Ground := BitmapFromString(11, 10, 'beNqLcSiKGUXUQAD8wnQF');
GroundColor := AutoColorThis(Ground,100,MMX1,MMY1,MMX2,MMY2);
RadialWalk(GroundColor, 305, 321, 60, 4, 4);
Flag;
SetAngle(True);
if (GroundColor = 0) then
begin
WriteLn('Couldn''t walk to Trader');
Logout;
NextPlayer(False);
end;
end;
procedure CheckTicketCount;
begin
if (GetTicketCount >= 2000) then
begin
WalkToTrader;
end;
end;
procedure TradeTrader;
begin
if (not LoggedIn) then
Exit;
if FindColorSpiralTolerance(x, y, 527941, MSX1, MSY1, MSX2, MSY2, 10) then
MMouse(x, y, 2, 2);
if IsUpText('icket Merch') then
begin
Mouse(x, y, 3, 3, False);
ChooseOption('rade');
Wait(1000 + Random(700));
end;
end;
function CloseTrade: Boolean;
var
CBBM, CBx, CBy: Integer;
begin
CBBM := BitmapFromString(4, 3, 'z78DA3330000243030CD2C' +
'CC4D4DC848008320900F6350DC1');
if FindBitmapToleranceIn(CBBM, CBx, CBy, 450, 30, 500, 50, 50) then
begin
Mouse(CBx, CBy, 4, 4, True);
Result := True;
end;
FreeBitmap(CBBM);
end;
procedure GetItem;
begin
if (not LoggedIn) then
Exit;
LoadDTM;
case lowercase(Players[CurrentPlayer].strings[0]) of
'arrows' : begin
if FindDTM(RArrows, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Wait(200 + Random(500));
Mouse(x, y, 2, 2, False);
ChooseOption('uy');
Wait(100 + Random(300));
CloseTrade;
FreeDTM(RArrows);
end;
end;
end
end;
procedure SymbolWalk;
begin
if FindSymbol(x, y, 'minigame') then
Mouse(x, y, 2, 2, True);
SetAngle(False);
end;
procedure WalkNTradeSetup;
begin
CheckTicketCount;
TradeTrader;
GetItem;
CloseTrade;
SymbolWalk;
end;
procedure Setup;
begin
ScriptID := '1103';
SRLID := SRLStatsID;
SRLPassword := SRLStatsPW;
if ( SRLID = '' ) or ( SRLPassword = '' )then
begin
Writeln('You Need SRL Stats.');
Writeln('Go here <url>http://www.stats.srl-forums.com/</url> to get one');
end;
Wait(1000);
ActivateClient;
DeclarePlayers;
LoginPlayer;
SetAngle(False);
end;
procedure IntroText;
begin
ClearDebug;
WriteLn('__________');
WriteLn('\______ \_____ ____ ____ ____');
WriteLn(' | _/\__ \ / \ / ___\_/ __ \');
WriteLn(' | | \ / __ \| | \/ /_/ > ___/')
WriteLn(' |____|_ /(____ /___| /\___ / \___ >');
WriteLn(' \/ \/ \//_____/ \/ ');
WriteLn(' ________ .__.__ .___ ');
WriteLn(' / _____/ __ __|__| | __| _/___________');
WriteLn('/ \ ___| | \ | | / __ |/ __ \_ __ \');
WriteLn('\ \_\ \ | / | |__/ /_/ \ ___/| | \/');
WriteLn(' \______ /____/|__|____/\____ |\___ >__| ');
WriteLn(' \/ \/ \/ ');
WrietLn(' by Camo Kyle' );
Wait(2000);
ClearDebug;
end;
procedure Proggy;
begin
ClearDebug;
Writeln('==========RangeGuilder by Camo Kyle V: ' +Version+ ' ==========');
Writeln('||===== Time Running : ' +TimeRunning);
Writeln('||===== Games Completed : ' +IntToStr(Games));
Writeln('||===== Tickets Earned : ' +IntToStr(GetTicketCount));
Writeln('||===== GP Spent : ' +IntToStr(Games * 200));
Writeln('========================================= ==========');
Writeln('======= Don''t forget to Rep++ if you like ======');
Writeln('========================================= ==========');
Writeln('==============NO PROGGY''S NO UPDATES!=============');
Writeln('========================================= ==========');
ReportVars[0] := ReportVars[0] + 1;
ReportVars[1] := ReportVars[1];
ReportVars[2] := ReportVars[2] + 1;
SRLRandomsReport;
end;
procedure FireLoop;
begin
repeat
TargetColor;
FireAtTarget;
AntiRandoms;
AntiBan;
Wait(2200 + Random(200));
if ResultScreen then
begin
ShotTarget := ShotTarget+1;
Wait(500 + Random(100));
end;
if FindJudgeChat then
begin
ClickToContinue;
ShotTarget := 0;
Break;
end;
if ShotTarget = 12 then Break;
until ShotTarget = 11;
Wait(1000 + Random(400));
ClickToContinue;
end;
begin
SetupSRL;
MouseSpeed := RandomRange(13, 17);
IntroText;
Wait(2000);
SetUp;
GameTab(4);
repeat
FindJudge;
TalkToJudge;
EquipArrows;
Wait(2000);
FireLoop;
Games := Games +1;
begin
WriteLn(IntToStr(Games));
end;
GetTicketCount;
WalkNTradeSetup;
Proggy;
until (AllPlayersInactive);
Proggy;
TerminateScript;
end.