Code:
program RangedGuilder;
{$DEFINE SMART}
{$DEFINE SPS}
{$i SRL/SRL/misc/SMART.simba}
{$i SRL/SRL.simba}
{$i SPS/SPS.simba}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{User Config}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
const
World = 65; // World The Player Logs into.
RightClickMethod = False; // Use Right Click To Schoot The Target.
// (For Low End Computers.)
LaggyComputer = 0; // Choose 0 (Fast), 1 (Normal) or 2 (Slow)
// Depending On Your Computer Speed.
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Player Username.
Pass := ''; // Player Password.
Nick := ''; //Player nickname, 3-4 letters of Player username.
Pin := ''; // Bank PIN
Active := True;
end;
end;
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{End of User Config}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
const
Version = '1.23';
var
x, y, Laggy, StartXP{, CoursesDone}, ClientTokenLogout, CTLRandom,
ArrowDTM, TicketDTM, StartTickets, CurrentTickets : Integer;
{*******************************************************************************
function InCords(x1, y1, x2, y2 : Integer) : Boolean;
by; putonajonny
Description: Checks if player is in certain SPS area, returns true if in area.
*******************************************************************************}
function InCords(x1, y1, x2, y2 : Integer) : Boolean;
var
Location : TPoint; xL, yL : Integer;
begin
Location := SPS_GetMyPos;
xL := Location.x;
yL := Location.y;
if(xL < x1) then
exit;
if(xL > x2) then
exit;
if(yL < y1) then
exit;
if(yL > y2) then
exit;
Result := True;
end;
procedure LaggyComp;
begin
if LaggyComputer = 0 then
Laggy := 0;
if LaggyComputer = 1 then
Laggy := 500;
if LaggyComputer = 2 then
Laggy := 1000;
end;
procedure StatsGuise(wat:string);
begin
Status(wat);
Disguise(wat);
end;
procedure Antiban;
begin
case Random(225) of
0..15: begin StatsGuise('Antiban...') GameTab(Tab_Stats) HoverSkill('Ranged', False); Wait(500 + Random(300)); GameTab(Tab_Inv); end;
25..30: begin StatsGuise('Antiban...') SleepAndMoveMouse(3000 + Random(500)); end;
50..55: begin StatsGuise('Antiban...') GameTab(Tab_Inv) ExamineInv; GameTab(Tab_Inv); end;
70..75: begin StatsGuise('Antiban...') GameTab(Tab_Stats); Wait(2000 + Random(500)); GameTab(Tab_Inv); end;
90..95: begin StatsGuise('Antiban...') GameTab(Tab_Stats) HoverSkill('random', False); GameTab(Tab_Inv); end;
end;
end;
procedure GetIntoPos; // (2515, 2970) // (2530, 2985) // (2520, 2980)
var
myPath: TPointArray;
begin
if not InCords(2510, 2965, 2545, 2990) then
myPath := [Point(2520, 2980)];
SPS_WalkPath(myPath);
end;
procedure MainLoop;
var
i, Timer : Integer;
Judge, Judge2, RoundFin : Boolean;
myPath: TPointArray;
begin
StatsGuise('MainLoop');
if FindNormalRandoms then
if not LoggedIn then
Exit;
StatsGuise('Finding Judge');
repeat
MarkTime(Timer);
repeat
if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
begin
Mouse(x, y, 5, 5, False);
Wait(200 + Random(150) + Laggy);
if OptionsExist(['mpete'], Nothing) then
begin
Judge := True;
ChooseOption('mpete');
end else
Judge2 := True;
end else
begin
Mouse(266, 136, 10, 30, False);
if WaitOption('mpete', 500) then
Judge := True;
end;
until((TimeFromMark(Timer) > 20000) or Judge or Judge2);
if TimeFromMark(Timer) > 20000 then
begin
if not InCords(2510, 2965, 2545, 2990) then
myPath := [Point(2554, 2927), Point(2542, 2935), Point(2534, 2947), Point(2524, 2955), Point(2515, 2963), Point(2515, 2982)];
SPS_WalkPath(myPath);
ClickNorth(1);
MakeCompass(35 + Random(5));
if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
Mouse(x, y, 5, 5, False);
Wait(200 + Random(150) + Laggy);
if WaitOption('to C', 500) then
Judge2 := True;
end;
until (Judge or Judge2)
StatsGuise('MainLoop');
Wait(800 + Random(150));
if Judge then
begin
KeyDown(49);
Wait(20+random(20));
KeyUp(49);
Wait(1500);
KeyDown(49);
Wait(20+random(20));
KeyUp(49);
Wait(800 + Random(150) + (Laggy * 2));
If PinScreen Then
begin
StatsGuise('Enter pin...');
InPin(Players[CurrentPlayer].Pin);
end;
ArrowDTM := DTMFromString('mggAAAHicY2NgYOACYhEgFgBiXiDmYIAAZigN4vMDsTCUdtEA6WDCwCIM2AEjDgwBAGIcASA=');
If FindDTM(ArrowDTM, x, y, MIX1, MIY1, MIX2, MIY2) Then
begin
Mouse(x, y, 5, 5, True);
end;
FreeDTM(ArrowDTM)
end;
if not RightClickMethod then
begin
StatsGuise('Spamming Targets');
MarkTime(Timer);
repeat
if FindColorTolerance(x, y, 4310482, 230, 162, 296, 219, 11) then
MMouse(487, 42, 5, 5);
Wait(600);
if IsUpText('lose') then
ClickMouse2(True);
if FindObjEx(x, y, ['arget'], [5041405, 5238269], 7, 31, MSX1, MSY1, 375, 65) then
repeat
ClickMouse2(True);
Wait(RandomRange(15, 40));
if FindNPCChatText('orry', Nothing) then
RoundFin := True;
until(not IsUpText('-at') or RoundFin);
until(RoundFin or (TimeFromMark(Timer) > 40000));
if TimeFromMark(Timer) > 40000 then
begin
if not InCords(2510, 2965, 2545, 2990) then
myPath := [Point(2554, 2927), Point(2542, 2935), Point(2534, 2947), Point(2524, 2955), Point(2515, 2963), Point(2515, 2982)];
SPS_WalkPath(myPath);
ClickNorth(1);
MakeCompass(35 + Random(5));
end;
end;
if RightClickMethod then
begin
StatsGuise('Shooting Targets');
for i := 1 to 10 do
begin
if FindObjEx(x, y, ['arget'], [5041405, 5238269], 7, 31, MSX1, MSY1, 375, 65) then
ClickMouse2(False);
Wait(200 + Random(150));
ChooseOptionEx('arget', 'object');
Wait(2400 + Random(150) + Laggy);
MMouse(487, 42, 3, 3);
Wait(550 + Random(150) + Laggy);
if IsUpText('lose') then
ClickMouse2(True);
end;
if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
Mouse(x, y, 5, 5, False);
WaitOption('to C', 500);
end;
CoursesDone := (CoursesDone + 1);
end;
procedure Proggy;
var
XPGained : Integer;
begin
ClearDebug;
TicketDTM := DTMFromString('mggAAAHicY2NgYFjBxMCwhAlCbwDi9UC8FohDgTgRiJOAOBKIY4A4HoiLu+OAupgwsAgDdsCIA0MAABRsB8s=');
CurrentTickets := (ItemAmount('inv', 'dtm', TicketDTM, []));
FreeDTM(TicketDTM);
XPGained := GetXPBarTotal - StartXP;
WriteLn('[~~~~~~RangeGuilder by Riyyi - Version ' + Version + '~~~~~]')
WriteLn(' Time Running : ' + TimeRunning)
WriteLn(' XP Gained : ' + ToStr(XPGained))
WriteLn(' XP Per Hour : ' + FloatToStr((3600000 / GetTimeRunning) * XPGained))
WriteLn(' Courses Done : ' + ToStr(CoursesDone))
WriteLn(' Tickets Gained : ' + ToStr(CurrentTickets - StartTickets))
WriteLn(' Time Until Logout : ' + ToStr(MsToTime((CTLRandom - TimeFromMark(ClientTokenLogout)), Time_Formal)))
WriteLn('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]')
end;
procedure GeneralCheck;
begin
if (not LoggedIn()) then
begin
LoginPlayer();
end;
Antiban;
end;
procedure SetupScript;
begin
Smart_Server := World;
Smart_Members:= True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
GeneralCheck;
SPS_Areas := ['6_7'];
SPS_Setup(RUNESCAPE_SURFACE, ['6_7']);
ToggleXPPopUp(True);
ToggleXPBar(True);
StartXP := GetXPBarTotal;
MarkTime(ClientTokenLogout);
CTLRandom := (RandomRange(20400000, 21060000));
GameTab(Tab_Inv);
if not (StartTickets > 0) then
begin
TicketDTM := DTMFromString('mggAAAHicY2NgYFjBxMCwhAlCbwDi9UC8FohDgTgRiJOAOBKIY4A4HoiLu+OAupgwsAgDdsCIA0MAABRsB8s=');
StartTickets := (ItemAmount('inv', 'dtm', TicketDTM, []));
FreeDTM(TicketDTM);
end;
ClearDebug();
end;
begin
repeat
SetupScript;
GetIntoPos;
ClickNorth(1);
MakeCompass(35 + Random(5));
repeat
GeneralCheck;
MainLoop;
Proggy;
until(TimeFromMark(ClientTokenLogout) < CTLRandom)
Logout;
Wait(RandomRange(600000,650000))
until(true)
end;