some rooftop agility would be nice since the current agility scrips aren't up to date and dont work well
some rooftop agility would be nice since the current agility scrips aren't up to date and dont work well
This isn't a very good script request! please read the guidelines to requesting a script http://villavu.com/forum/showthread.php?t=99753 so your future requests can be more clear and concise
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols
Why not use [member=fight]'s ape toll script? I used it 2 weeks ago for 70-80 agility. Although oddly it only seem to work on w317 (Guessing there is a colour change between worlds?)
#slack4admin2016
<slacky> I will build a wall
<slacky> I will ban reflection and OGL hooking until we know what the hell is going on
oh hello there harrier
at SRL we use MENTION and /MENTION, not [member=]
so to mention Flight we'd do @Flight;
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols
This might still work, or it might not work:
Simba Code:program AIOAgility;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR\SRL\misc\SmartGraphics.simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
type
TCourseObject = record
Tile, EndTile: TPoint;
Plane, X, Y, Z: Integer;
UpText: String;
end;
TCourseObjectArray = Array of TCourseObject;
TCourse = record
Name: String;
StartPlane: Integer;
CourseObjects: TCourseObjectArray;
end;
TCourseArray = Array of TCourse;
var
Courses: TCourseArray;
CurrentCourse: TCourse;
AgilityDrops: TIntegerArray;
Laps, StartExp, StartLvl: Integer;
const
COURSE_CANIFIS_ROOFTOPS = 0;
COURSE_FALADOR_ROOFTOPS = 1;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';//Username
Players[0].Pass := '';//Password
Players[0].Nick := ''; //Nickname
Players[0].Pin := ''; //Pin
Players[0].Strings[0] := 'Falador Rooftops';
Players[0].LampSkill := SKILL_AGILITY;
Players[0].Active := True;
end;
function GetCourseByName(Name: String): TCourse;
var
I: Integer;
begin
for I := 0 to High(Courses) do
if (Courses[I].Name = Name) then
begin
Result := Courses[I];
Exit;
end;
end;
function CourseObject(Tile, EndTile: TPoint; Plane, X, Y, Z: Integer; UpText: String): TCourseObject;
begin
Result.Tile := Tile;
Result.EndTile := EndTile;
Result.Plane := Plane;
Result.X := X;
Result.Y := Y;
Result.Z := Z;
Result.UpText := UpText;
end;
function Course(Name: String; StartPlane: Integer; CourseObjects: TCourseObjectArray): TCourse;
begin
Result.Name := Name;
Result.StartPlane := StartPlane;
Result.CourseObjects := CourseObjects;
end;
procedure SetupScript;
begin
AgilityDrops := [11849];
Courses := [
Course('Canifis Rooftops', 0, [
CourseObject(Point(3508, 3489), Point(3506, 3492), 0, 0, 0, 20, 'Climb Tall tree'),
CourseObject(Point(3505, 3497), Point(3502, 3504), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3497, 3504), Point(3492, 3504), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3486, 3499), Point(3479, 3499), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3479, 3492), Point(3478, 3486), 3, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3480, 3483), Point(3489, 3476), 2, 0, 0, -5, 'Vault Pole-vault'),
CourseObject(Point(3503, 3476), Point(3510, 3476), 3, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3510, 3483), Point(3510, 3485), 2, 0, 0, 0, 'Jump Gap')
]),
Course('Falador Rooftops', 0, [
CourseObject(Point(3036, 3341), Point(3036, 3342), 0, 0, 64, 120, 'Climb Rough wall'),
CourseObject(Point(3040, 3343), Point(3047, 3344), 3, 50, 0, 0, 'Cross Tightrope'),
CourseObject(Point(3050, 3349), Point(3050, 3357), 3, -60, 30, -30, 'Cross Hand holds'),
CourseObject(Point(3048, 3358), Point(3048, 3361), 3, -32, 0, 0, 'Jump Gap'),
CourseObject(Point(3045, 3361), Point(3041, 3361), 3, -32, 0, 0, 'Jump Gap'),
CourseObject(Point(3034, 3362), Point(3028, 3354), 3, -50, -64, 0, 'Cross Tightrope'),
CourseObject(Point(3026, 3353), Point(3020, 3353), 3, -50, 0, 0, 'Cross Tightrope'),
CourseObject(Point(3018, 3353), Point(3018, 3349), 3, -50, 0, 0, 'Jump Gap'),
CourseObject(Point(3016, 3345), Point(3014, 3345), 3, 0, 0, 0, 'Jump Ledge'),
CourseObject(Point(3012, 3343), Point(3013, 3342), 3, 0, 32, 0, 'Jump Ledge'),
CourseObject(Point(3013, 3335), Point(3012, 3333), 3, 0, -32, 0, 'Jump Ledge'),
CourseObject(Point(3018, 3333), Point(3019, 3333), 3, -32, 0, 0, 'Jump Ledge'),
CourseObject(Point(3023, 3333), Point(3029, 3333), 3, 0, 0, 0, 'Jump Edge')
])
];
end;
procedure SetupPlayer;
begin
StartExp := R_GetSkillExp(SKILL_AGILITY);
StartLvl := R_GetSkillLevel(SKILL_AGILITY);
end;
procedure RandomCamera;
begin
CompassMovement(0, 180, False);
end;
procedure ClickCourseObject(CObject: TCourseObject);
var
MS: TPoint;
begin
if (not R_TileOnMS(CObject.Tile)) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
MS := R_TileOffsetToMS(CObject.Tile, CObject.X, CObject.Y, CObject.Z);
MMouse(MS.X, MS.Y, 2, 2);
Sleep(50 + Random(50));
if (R_IsUpText(CObject.UpText)) then
ClickMouse2(Mouse_Left)
else begin
if (R_IsUpText('Walk here')) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
ClickMouse2(Mouse_Right);
if (not R_WaitChooseOption(CObject.UpText, 1000)) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
end;
end;
function OnePlaneCourse(Course: TCourse): Boolean;
var
I, N: Integer;
begin
for I := 0 to High(Course.CourseObjects) do
if (Course.CourseObjects[I].Plane = Course.CourseObjects[0].Plane) then
Inc(N);
Result := (N = High(Course.CourseObjects) + 1);
end;
procedure LootAgilityDrops;
var
Loots: TGroundItemArray;
MS: TPoint;
I: Integer;
begin
Loots := R_GetGroundItemsDistance(16);
for I := 0 to High(Loots) do begin
if (InIntArray(AgilityDrops, Loots[I].ID)) then begin
Sleep(1000);
if (not R_TileOnMS(Loots[I].Tile)) then begin
R_BlindWalk(Loots[I].Tile);
Flag;
Sleep(250 + Random(250));
end;
MS := R_TileToMS(Loots[I].Tile);
MMouse(MS.X, MS.Y, 2, 2);
Sleep(50 + Random(50));
ClickMouse2(Mouse_Left);
Sleep(500);
Flag;
Sleep(750 + Random(250));
end;
end;
end;
procedure ProgressReport;
var
ExpGained, ExpGainedPerHour, LapsPerHour, LevelsGained: Integer;
begin
ExpGained := R_GetSkillExp(SKILL_AGILITY) - StartExp;
ExpGainedPerHour := Round((ExpGained * 3600) / (GetTimeRunning / 1000));
LapsPerHour := Round((Laps * 3600) / (GetTimeRunning / 1000));
LevelsGained := R_GetSkillLevel(SKILL_AGILITY) - StartLvl;
Writeln('');
Writeln('AIO Agility - By Frement');
Writeln(' - Time Running: ' + TimeRunning);
Writeln(' - Course: ' + CurrentCourse.Name);
Writeln(' - Laps: ' + ToStr(Laps) + ' (' + ToStr(LapsPerHour) + '/H)');
Writeln(' - Experience Gained: ' + ToStr(ExpGained) + ' (' + ToStr(ExpGainedPerHour) + '/H)');
Writeln(' - Levels Gained: ' + ToStr(LevelsGained) + ' (' + ToStr(R_GetSkillLevel(SKILL_AGILITY)) + ')');
end;
procedure DoCourse(Course: TCourse);
var
I, Next, Timer: Integer;
begin
for I := 0 to High(Course.CourseObjects) do begin
R_FindNormalRandoms;
SolveBox;
while (not R_NearTile(Course.CourseObjects[I].Tile, 3)) do // and (not R_TileOnMS(Course.CourseObjects[I].Tile)) do
begin
R_BlindWalk(Point(Course.CourseObjects[I].Tile.X, Course.CourseObjects[I].Tile.Y - 2));
while (R_IsWalking) do
Sleep(250);
end;
Sleep(750 + Random(250));
ClickCourseObject(Course.CourseObjects[I]);
Sleep(500 + Random(250));
while (R_IsWalking) do
Sleep(250);
ProgressReport;
if (I = High(Course.CourseObjects)) then
Next := 0
else
Next := I + 1;
if (Course.CourseObjects[I].EndTile <> Point(0, 0)) then
if (Course.CourseObjects[I].Plane = Course.CourseObjects[Next].Plane) then begin
while (not R_NearTile(Course.CourseObjects[I].Tile, 2)) do
Sleep(250 + Random(250));
while (R_IsWalking) do
Sleep(1000 + Random(500));
end else begin
while (R_GetPlane = Course.CourseObjects[I].Plane) do
Sleep(1000 + Random(500));
end
else begin
MarkTime(Timer);
while (R_GetTileGlobal <> Course.CourseObjects[I].EndTile) do begin
Sleep(500);
if (TimeFromMark(Timer) > 10000) then begin
ClickCourseObject(Course.CourseObjects[I]);
while (R_NearTile(Course.CourseObjects[I].EndTile, 2)) do
Sleep(500);
Break;
end;
end;
end;
Sleep(1000 + Random(250));
if (not OnePlaneCourse(Course)) then
if (R_GetPlane = Course.StartPlane) and (not (I = High(Course.CourseObjects))) then
Exit;
LootAgilityDrops;
end;
Inc(Laps);
end;
begin
DeclarePlayers;
SetupSRL;
SetupReflection;
//Writeln(R_GetTileGlobal);
//Writeln(R_GetPlane);
//TerminateScript;
SetupScript;
SetupPlayer;
CurrentCourse := GetCourseByName(Players[CurrentPlayer].Strings[0]);
repeat
DoCourse(CurrentCourse);
ProgressReport;
until(False);
end.
There used to be something meaningful here.
@ @Frement
ummm how do i actually start this script? at the beggining of the course?
@ @KeepBotting
sorry about that
edit: i get this error:[Error] C:\Users\agility.simba(126:11): Unknown identifier 'R_TileOnMS' at line 126
Compiling failed.
Last edited by goswag; 06-21-2014 at 09:45 PM.
From that error, I'm guessing that you don't have reflection installed, get it here: http://villavu.com/forum/showthread.php?t=107479
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols
If you're receiving the same error and other scripts which utilize the reflection include work well, I'd be willing to bet that it's outdated, @Frement stated in his post that it would be, maybe he can confirm?
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols
Just ran a fast test, started running the course.
There used to be something meaningful here.
Getting an error message when i start it up ;
[Error] C:\Simba\Scripts\ROOFTOPagil.simba(126:11): Unknown identifier 'R_TileOnMS' at line 126
Compiling failed.
on line 126 it says "randomcamera" and on other lines as well..
I have Reflections in stalled.. and SRL-OSR.. It's not the same problem anymore
Now getting this error;
[Error] C:\Simba\Scripts\FALADOR ROOF.simba(126:11): Unknown identifier 'R_TileOnMS' at line 127
Compiling failed.
Any help?
[Error] C:\Simba\Scripts\FALADOR ROOF.simba(126:11): Unknown identifier 'R_TileOnMS'
I get this too
I get the same error as above
[Error] (125:11): Unknown identifier 'R_TileOnMS' at line 125
Compiling failed.
Last edited by laleepop; 08-09-2014 at 11:03 AM.
Simba Code:program AIOAgility;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR\SRL\misc\SmartGraphics.simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
type
TCourseObject = record
Tile, EndTile: TPoint;
Plane, X, Y, Z: Integer;
UpText: String;
end;
TCourseObjectArray = Array of TCourseObject;
TCourse = record
Name: String;
StartPlane: Integer;
CourseObjects: TCourseObjectArray;
end;
TCourseArray = Array of TCourse;
var
Courses: TCourseArray;
CurrentCourse: TCourse;
AgilityDrops: TIntegerArray;
Laps, StartExp, StartLvl: Integer;
const
COURSE_CANIFIS_ROOFTOPS = 0;
COURSE_FALADOR_ROOFTOPS = 1;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';//Username
Players[0].Pass := '';//Password
Players[0].Nick := ''; //Nickname
Players[0].Pin := ''; //Pin
Players[0].Strings[0] := 'Canifis Rooftops';
Players[0].LampSkill := SKILL_AGILITY;
Players[0].Active := True;
end;
function GetCourseByName(Name: String): TCourse;
var
I: Integer;
begin
for I := 0 to High(Courses) do
if (Courses[I].Name = Name) then
begin
Result := Courses[I];
Exit;
end;
end;
function R_TileOnMS(tile:TPoint):boolean;
begin
result := PointInBox(R_TileToMS(tile), MSBox);
end;
function CourseObject(Tile, EndTile: TPoint; Plane, X, Y, Z: Integer; UpText: String): TCourseObject;
begin
Result.Tile := Tile;
Result.EndTile := EndTile;
Result.Plane := Plane;
Result.X := X;
Result.Y := Y;
Result.Z := Z;
Result.UpText := UpText;
end;
function Course(Name: String; StartPlane: Integer; CourseObjects: TCourseObjectArray): TCourse;
begin
Result.Name := Name;
Result.StartPlane := StartPlane;
Result.CourseObjects := CourseObjects;
end;
procedure SetupScript;
begin
AgilityDrops := [11849];
Courses := [
Course('Canifis Rooftops', 0, [
CourseObject(Point(3508, 3489), Point(3506, 3492), 0, 0, 0, 20, 'Climb Tall tree'),
CourseObject(Point(3505, 3497), Point(3502, 3504), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3497, 3504), Point(3492, 3504), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3486, 3499), Point(3479, 3499), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3479, 3492), Point(3478, 3486), 3, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3480, 3483), Point(3489, 3476), 2, 0, 0, -5, 'Vault Pole-vault'),
CourseObject(Point(3503, 3476), Point(3510, 3476), 3, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3510, 3483), Point(3510, 3485), 2, 0, 0, 0, 'Jump Gap')
]),
Course('Falador Rooftops', 0, [
CourseObject(Point(3036, 3341), Point(3036, 3342), 0, 0, 64, 120, 'Climb Rough wall'),
CourseObject(Point(3040, 3343), Point(3047, 3344), 3, 50, 0, 0, 'Cross Tightrope'),
CourseObject(Point(3050, 3349), Point(3050, 3357), 3, -60, 30, -30, 'Cross Hand holds'),
CourseObject(Point(3048, 3358), Point(3048, 3361), 3, -32, 0, 0, 'Jump Gap'),
CourseObject(Point(3045, 3361), Point(3041, 3361), 3, -32, 0, 0, 'Jump Gap'),
CourseObject(Point(3034, 3362), Point(3028, 3354), 3, -50, -64, 0, 'Cross Tightrope'),
CourseObject(Point(3026, 3353), Point(3020, 3353), 3, -50, 0, 0, 'Cross Tightrope'),
CourseObject(Point(3018, 3353), Point(3018, 3349), 3, -50, 0, 0, 'Jump Gap'),
CourseObject(Point(3016, 3345), Point(3014, 3345), 3, 0, 0, 0, 'Jump Ledge'),
CourseObject(Point(3012, 3343), Point(3013, 3342), 3, 0, 32, 0, 'Jump Ledge'),
CourseObject(Point(3013, 3335), Point(3012, 3333), 3, 0, -32, 0, 'Jump Ledge'),
CourseObject(Point(3018, 3333), Point(3019, 3333), 3, -32, 0, 0, 'Jump Ledge'),
CourseObject(Point(3023, 3333), Point(3029, 3333), 3, 0, 0, 0, 'Jump Edge')
])
];
end;
procedure SetupPlayer;
begin
StartExp := R_GetSkillExp(SKILL_AGILITY);
StartLvl := R_GetSkillLevel(SKILL_AGILITY);
end;
procedure RandomCamera;
begin
CompassMovement(0, 180, False);
end;
procedure ClickCourseObject(CObject: TCourseObject);
var
MS: TPoint;
begin
if (not R_TileOnMS(CObject.Tile)) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
MS := R_TileOffsetToMS(CObject.Tile, CObject.X, CObject.Y, CObject.Z);
MMouse(MS.X, MS.Y, 2, 2);
Sleep(50 + Random(50));
if (R_IsUpText(CObject.UpText)) then
ClickMouse2(Mouse_Left)
else begin
if (R_IsUpText('Walk here')) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
ClickMouse2(Mouse_Right);
if (not R_WaitChooseOption(CObject.UpText, 1000)) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
end;
end;
function OnePlaneCourse(Course: TCourse): Boolean;
var
I, N: Integer;
begin
for I := 0 to High(Course.CourseObjects) do
if (Course.CourseObjects[I].Plane = Course.CourseObjects[0].Plane) then
Inc(N);
Result := (N = High(Course.CourseObjects) + 1);
end;
procedure LootAgilityDrops;
var
Loots: TGroundItemArray;
MS: TPoint;
I: Integer;
begin
Loots := R_GetGroundItemsDistance(16);
for I := 0 to High(Loots) do begin
if (InIntArray(AgilityDrops, Loots[I].ID)) then begin
Sleep(1000);
if (not R_TileOnMS(Loots[I].Tile)) then begin
R_BlindWalk(Loots[I].Tile);
Flag;
Sleep(250 + Random(250));
end;
MS := R_TileToMS(Loots[I].Tile);
MMouse(MS.X, MS.Y, 2, 2);
Sleep(50 + Random(50));
ClickMouse2(Mouse_Left);
Sleep(500);
Flag;
Sleep(750 + Random(250));
end;
end;
end;
procedure ProgressReport;
var
ExpGained, ExpGainedPerHour, LapsPerHour, LevelsGained: Integer;
begin
ExpGained := R_GetSkillExp(SKILL_AGILITY) - StartExp;
ExpGainedPerHour := Round((ExpGained * 3600) / (GetTimeRunning / 1000));
LapsPerHour := Round((Laps * 3600) / (GetTimeRunning / 1000));
LevelsGained := R_GetSkillLevel(SKILL_AGILITY) - StartLvl;
Writeln('');
Writeln('AIO Agility - By Frement');
Writeln(' - Time Running: ' + TimeRunning);
Writeln(' - Course: ' + CurrentCourse.Name);
Writeln(' - Laps: ' + ToStr(Laps) + ' (' + ToStr(LapsPerHour) + '/H)');
Writeln(' - Experience Gained: ' + ToStr(ExpGained) + ' (' + ToStr(ExpGainedPerHour) + '/H)');
Writeln(' - Levels Gained: ' + ToStr(LevelsGained) + ' (' + ToStr(R_GetSkillLevel(SKILL_AGILITY)) + ')');
end;
procedure DoCourse(Course: TCourse);
var
I, Next, Timer: Integer;
begin
for I := 0 to High(Course.CourseObjects) do begin
R_FindNormalRandoms;
SolveBox;
while (not R_NearTile(Course.CourseObjects[I].Tile, 3)) do // and (not R_TileOnMS(Course.CourseObjects[I].Tile)) do
begin
R_BlindWalk(Point(Course.CourseObjects[I].Tile.X, Course.CourseObjects[I].Tile.Y - 2));
while (R_IsWalking) do
Sleep(250);
end;
Sleep(750 + Random(250));
ClickCourseObject(Course.CourseObjects[I]);
Sleep(500 + Random(250));
while (R_IsWalking) do
Sleep(250);
ProgressReport;
if (I = High(Course.CourseObjects)) then
Next := 0
else
Next := I + 1;
if (Course.CourseObjects[I].EndTile <> Point(0, 0)) then
if (Course.CourseObjects[I].Plane = Course.CourseObjects[Next].Plane) then begin
while (not R_NearTile(Course.CourseObjects[I].Tile, 2)) do
Sleep(250 + Random(250));
while (R_IsWalking) do
Sleep(1000 + Random(500));
end else begin
while (R_GetPlane = Course.CourseObjects[I].Plane) do
Sleep(1000 + Random(500));
end
else begin
MarkTime(Timer);
while (R_GetTileGlobal <> Course.CourseObjects[I].EndTile) do begin
Sleep(500);
if (TimeFromMark(Timer) > 10000) then begin
ClickCourseObject(Course.CourseObjects[I]);
while (R_NearTile(Course.CourseObjects[I].EndTile, 2)) do
Sleep(500);
Break;
end;
end;
end;
Sleep(1000 + Random(250));
if (not OnePlaneCourse(Course)) then
if (R_GetPlane = Course.StartPlane) and (not (I = High(Course.CourseObjects))) then
Exit;
LootAgilityDrops;
end;
Inc(Laps);
end;
begin
DeclarePlayers;
SetupSRL;
SetupReflection;
//Writeln(R_GetTileGlobal);
//Writeln(R_GetPlane);
//TerminateScript;
SetupScript;
SetupPlayer;
CurrentCourse := GetCourseByName(Players[CurrentPlayer].Strings[0]);
repeat
DoCourse(CurrentCourse);
ProgressReport;
until(False);
end.
here is the new code. no errors last time I tried it, but there is a problem where it only does the first 2 parts of the agility course, im not sure how to fix it.
For anybody wanting to use the above script for Canafis agility course, here is a working version where it does not get stuck on the 2nd wall jump.
Simba Code:program AIOAgility;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR\SRL\misc\SmartGraphics.simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
type
TCourseObject = record
Tile, EndTile: TPoint;
Plane, X, Y, Z: Integer;
UpText: String;
end;
TCourseObjectArray = Array of TCourseObject;
TCourse = record
Name: String;
StartPlane: Integer;
CourseObjects: TCourseObjectArray;
end;
TCourseArray = Array of TCourse;
var
Courses: TCourseArray;
CurrentCourse: TCourse;
AgilityDrops: TIntegerArray;
Laps, StartExp, StartLvl: Integer;
const
COURSE_CANIFIS_ROOFTOPS = 0;
COURSE_FALADOR_ROOFTOPS = 1;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';//Username
Players[0].Pass := '';//Password
Players[0].Nick := ''; //Nickname
Players[0].Pin := ''; //Pin
Players[0].Strings[0] := 'Canifis Rooftops';
Players[0].LampSkill := SKILL_AGILITY;
Players[0].Active := True;
end;
function GetCourseByName(Name: String): TCourse;
var
I: Integer;
begin
for I := 0 to High(Courses) do
if (Courses[I].Name = Name) then
begin
Result := Courses[I];
Exit;
end;
end;
function R_TileOnMS(tile:TPoint):boolean;
begin
result := PointInBox(R_TileToMS(tile), MSBox);
end;
function CourseObject(Tile, EndTile: TPoint; Plane, X, Y, Z: Integer; UpText: String): TCourseObject;
begin
Result.Tile := Tile;
Result.EndTile := EndTile;
Result.Plane := Plane;
Result.X := X;
Result.Y := Y;
Result.Z := Z;
Result.UpText := UpText;
end;
function Course(Name: String; StartPlane: Integer; CourseObjects: TCourseObjectArray): TCourse;
begin
Result.Name := Name;
Result.StartPlane := StartPlane;
Result.CourseObjects := CourseObjects;
end;
procedure SetupScript;
begin
AgilityDrops := [11849];
Courses := [
Course('Canifis Rooftops', 0, [
CourseObject(Point(3508, 3489), Point(3506, 3492), 0, 0, 0, 20, 'Climb Tall tree'),
CourseObject(Point(3505, 3497), Point(3502, 3504), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3497, 3504), Point(3492, 3504), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3485, 3500), Point(3490, 3505), 2, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3479, 3492), Point(3478, 3486), 3, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3480, 3483), Point(3489, 3476), 2, 0, 0, -3, 'Vault Pole-vault'),
CourseObject(Point(3503, 3476), Point(3510, 3476), 3, 0, 0, 0, 'Jump Gap'),
CourseObject(Point(3510, 3483), Point(3510, 3485), 2, 0, 0, 0, 'Jump Gap')
]),
Course('Falador Rooftops', 0, [
CourseObject(Point(3036, 3341), Point(3036, 3342), 0, 0, 64, 120, 'Climb Rough wall'),
CourseObject(Point(3040, 3343), Point(3047, 3344), 3, 50, 0, 0, 'Cross Tightrope'),
CourseObject(Point(3050, 3349), Point(3050, 3357), 3, -60, 30, -30, 'Cross Hand holds'),
CourseObject(Point(3048, 3358), Point(3048, 3361), 3, -32, 0, 0, 'Jump Gap'),
CourseObject(Point(3045, 3361), Point(3041, 3361), 3, -32, 0, 0, 'Jump Gap'),
CourseObject(Point(3034, 3362), Point(3028, 3354), 3, -50, -64, 0, 'Cross Tightrope'),
CourseObject(Point(3026, 3353), Point(3020, 3353), 3, -50, 0, 0, 'Cross Tightrope'),
CourseObject(Point(3018, 3353), Point(3018, 3349), 3, -50, 0, 0, 'Jump Gap'),
CourseObject(Point(3016, 3345), Point(3014, 3345), 3, 0, 0, 0, 'Jump Ledge'),
CourseObject(Point(3012, 3343), Point(3013, 3342), 3, 0, 32, 0, 'Jump Ledge'),
CourseObject(Point(3013, 3335), Point(3012, 3333), 3, 0, -32, 0, 'Jump Ledge'),
CourseObject(Point(3018, 3333), Point(3019, 3333), 3, -32, 0, 0, 'Jump Ledge'),
CourseObject(Point(3023, 3333), Point(3029, 3333), 3, 0, 0, 0, 'Jump Edge')
])
];
end;
procedure SetupPlayer;
begin
StartExp := R_GetSkillExp(SKILL_AGILITY);
StartLvl := R_GetSkillLevel(SKILL_AGILITY);
end;
procedure RandomCamera;
begin
CompassMovement(0, 180, False);
end;
procedure ClickCourseObject(CObject: TCourseObject);
var
MS: TPoint;
begin
if (not R_TileOnMS(CObject.Tile)) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
MS := R_TileOffsetToMS(CObject.Tile, CObject.X, CObject.Y, CObject.Z);
MMouse(MS.X, MS.Y, 2, 2);
Sleep(50 + Random(50));
if (R_IsUpText(CObject.UpText)) then
ClickMouse2(Mouse_Left)
else begin
if (R_IsUpText('Walk here')) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
ClickMouse2(Mouse_Right);
if (not R_WaitChooseOption(CObject.UpText, 1000)) then begin
RandomCamera;
ClickCourseObject(CObject);
Exit;
end;
end;
end;
function OnePlaneCourse(Course: TCourse): Boolean;
var
I, N: Integer;
begin
for I := 0 to High(Course.CourseObjects) do
if (Course.CourseObjects[I].Plane = Course.CourseObjects[0].Plane) then
Inc(N);
Result := (N = High(Course.CourseObjects) + 1);
end;
procedure LootAgilityDrops;
var
Loots: TGroundItemArray;
MS: TPoint;
I: Integer;
begin
Loots := R_GetGroundItemsDistance(16);
for I := 0 to High(Loots) do begin
if (InIntArray(AgilityDrops, Loots[I].ID)) then begin
Sleep(1000);
if (not R_TileOnMS(Loots[I].Tile)) then begin
R_BlindWalk(Loots[I].Tile);
Flag;
Sleep(250 + Random(250));
end;
MS := R_TileToMS(Loots[I].Tile);
MMouse(MS.X, MS.Y, 2, 2);
Sleep(50 + Random(50));
ClickMouse2(Mouse_Left);
Sleep(500);
Flag;
Sleep(750 + Random(250));
end;
end;
end;
procedure ProgressReport;
var
ExpGained, ExpGainedPerHour, LapsPerHour, LevelsGained: Integer;
begin
ExpGained := R_GetSkillExp(SKILL_AGILITY) - StartExp;
ExpGainedPerHour := Round((ExpGained * 3600) / (GetTimeRunning / 1000));
LapsPerHour := Round((Laps * 3600) / (GetTimeRunning / 1000));
LevelsGained := R_GetSkillLevel(SKILL_AGILITY) - StartLvl;
Writeln('');
Writeln('AIO Agility - By Frement');
Writeln(' - Time Running: ' + TimeRunning);
Writeln(' - Course: ' + CurrentCourse.Name);
Writeln(' - Laps: ' + ToStr(Laps) + ' (' + ToStr(LapsPerHour) + '/H)');
Writeln(' - Experience Gained: ' + ToStr(ExpGained) + ' (' + ToStr(ExpGainedPerHour) + '/H)');
Writeln(' - Levels Gained: ' + ToStr(LevelsGained) + ' (' + ToStr(R_GetSkillLevel(SKILL_AGILITY)) + ')');
end;
procedure DoCourse(Course: TCourse);
var
I, Next, Timer: Integer;
begin
for I := 0 to High(Course.CourseObjects) do begin
R_FindNormalRandoms;
SolveBox;
while (not R_NearTile(Course.CourseObjects[I].Tile, 3)) do // and (not R_TileOnMS(Course.CourseObjects[I].Tile)) do
begin
R_BlindWalk(Point(Course.CourseObjects[I].Tile.X, Course.CourseObjects[I].Tile.Y - 2));
end;
Sleep(750 + Random(250));
ClickCourseObject(Course.CourseObjects[I]);
Sleep(500 + Random(250));
while (R_IsWalking) do
Sleep(250);
ProgressReport;
if (I = High(Course.CourseObjects)) then
Next := 0
else
Next := I + 1;
if (Course.CourseObjects[I].EndTile <> Point(0, 0)) then
if (Course.CourseObjects[I].Plane = Course.CourseObjects[Next].Plane) then begin
while (R_IsWalking) do
Sleep(1000 + Random(500));
end else begin
while (R_GetPlane = Course.CourseObjects[I].Plane) do
Sleep(1000 + Random(500));
end
else begin
MarkTime(Timer);
while (R_GetTileGlobal <> Course.CourseObjects[I].EndTile) do begin
Sleep(500);
if (TimeFromMark(Timer) > 10000) then begin
ClickCourseObject(Course.CourseObjects[I]);
while (R_NearTile(Course.CourseObjects[I].EndTile, 2)) do
Sleep(500);
Break;
end;
end;
end;
Sleep(1000 + Random(250));
if (not OnePlaneCourse(Course)) then
if (R_GetPlane = Course.StartPlane) and (not (I = High(Course.CourseObjects))) then
Exit;
LootAgilityDrops;
end;
Inc(Laps);
end;
begin
DeclarePlayers;
SetupSRL;
SetupReflection;
Writeln(R_GetTileGlobal);
Writeln(R_GetPlane);
//TerminateScript;
SetupScript;
SetupPlayer;
CurrentCourse := GetCourseByName(Players[CurrentPlayer].Strings[0]);
repeat
DoCourse(CurrentCourse);
until(False);
end.
I tried using the script and I get the following error
[Reflection Anti-Randoms] Detected we are dead, logging out.
I bypassed that by manually logging in, however after login this error comes up
Math error at line 336
The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 3]
line 336 is
Simba Code:Returns distance from given tile.
EDIT: Somehow I got it running, but after the 8th lap, it got stuck on the 2nd last jump, and during the pole vault, at a certain camera angle it misses the pole, and gets stuck.
Last edited by Silvur; 03-01-2015 at 08:22 PM.
I would like to make a final statement.
So far the logging in does not work. You must manually log in to start the script.
From there, it should proceed normally. However, the most prominent issue, it would occasionally get stuck on the pole vault. The cursor will miss the click on the pole in certain camera angles. Even after pausing the script and readjusting the camera angle, the script won't know what to do, unless you click the pole manually and resume afterwards. The second issue, but not as prominent as the pole vault, the script will get stuck on the 2nd last jump (the jump right before the NPC).
Hopefully these inputs will improve the script for anyone else that would like to tweak it.
Last edited by Silvur; 03-01-2015 at 08:21 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)