goswag
2014-06-20 09:12:02
some rooftop agility would be nice since the current agility scrips aren't up to date and dont work well
2014-06-20 09:12:02
2014-06-20 10:49:01
2014-06-20 13:03:39
2014-06-20 13:13:23
From: arm2
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?)
2014-06-20 13:20:19
From: KeepBotting
oh hello there harrier
at SRL we use MENTION and /MENTION, not [member=]
so to mention Flight we'd do @Flight;
2014-06-20 14:39:04
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.
2014-06-21 17:32:59
2014-06-21 17:53:58
From: goswagFrom that error, I'm guessing that you don't have reflection installed, get it here: http://villavu.com/forum/showthread.php?t=107479
@ @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.
2014-06-21 17:57:27
From: KeepBotting
From that error, I'm guessing that you don't have reflection installed, get it here: http://villavu.com/forum/showthread.php?t=107479
2014-06-21 18:17:55
From: goswag
but i do have it installed, is there a new version out? the hoodzAIO fighter works well
edit: reinstalled it. same problem. could it be that this agility script ran on an older version of reflection?
2014-06-21 19:23:36
2014-06-22 07:37:49
From: Frement
Just ran a fast test, started running the course.
2014-06-22 16:00:21
From: goswag
do you have any extra includes installed?
2014-06-22 16:26:50
From: Frement
SRL-OSR and Reflection.
2014-06-24 14:13:54
2014-06-26 02:47:10
From: ohegabe
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..
2014-06-29 04:45:56
2014-07-09 16:16:53
2014-08-09 07:00:21
2014-08-11 13:36:27
From: laleepop
I get the same error as above
[Error] (125:11): Unknown identifier 'R_TileOnMS' at line 125
Compiling failed.
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. 2015-02-16 08:31:41
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.
2015-03-01 12:05:50
From: Beoz
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.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.
Returns distance from given tile. 2015-03-01 15:09:31