Simba Code:
program DraynorAgility;
{$DEFINE SMART}
{$DEFINE WALKER}
{$i AeroLib/AeroLib.Simba}
//Made By Rules
Var
X, Y, Agility :Integer;
Walker : TRSWalker;
Const
//Locations
Rope1 := Point(214, 133);
Rope2 := Point(166, 149);
Balance := Point(173, 188);
Jump := Point(157, 207);
Gap := Point(157, 231);
Crate := Point(189, 228);
procedure declarePlayer();
begin
Me.Name := '';
Me.Pass := '';
Me.Pin := '';
Me.Nick := '';
Me.LampSkill := SKILL_FARMING;
Me.Member := True;
Me.Active := True;
end;
Procedure Login;
begin
loginPlayer(false)
end;
Procedure DTMz;
begin
Agility := DTMFromString('m6wAAAHic42ZgYGADYm4g5oNiEJsViBkZEIAZiNmhahmhNCcQ8yLp4UDTx8jISDQmBTCSgJEAAIodAMo=');
end;
function pointsInDist(Pt1, Pt2: TPoint; Dist: Integer): Boolean;
begin
result := (distance(Pt1.X, Pt1.Y, Pt2.X, Pt2.Y) <= Dist);
end;
Function ClimbWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Climb', 'Rou', 'ough wa'], [858658, 2243147, 2045767], 6)then
if findMSObjectSimple([858658, 2243147, 2045767], ['Climb', 'Rou', 'ough wa']) then
begin
writeLn('Climbing Wall');
fastClick(mouse_Right);
WaitUpText('Cimb', randomrange(300, 400));
ChooseOptionMulti(['Cimb', 'Rou']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;
Function CrossTightRope: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Cross', 'Tigh', 'rope'], [2504771, 3032659, 3493725], 6)then
if findMSObjectSimple([2504771, 3032659, 3493725], ['Cross', 'Tigh', 'rope']) then
begin
writeLn('Crossing Rope');
fastClick(mouse_Right);
WaitUpText('Cross', randomrange(300, 400));
ChooseOptionMulti(['Cross', 'Tighrope']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;
Function BalanceNarrowWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Balance', 'Narrow', 'wall'], [14401, 605511, 13115], 6)then
if findMSObjectSimple([14401, 605511, 13115], ['Balance', 'Narrow', 'wall']) then
begin
writeLn('Balancing Wall');
fastClick(mouse_Right);
WaitUpText('Balance', randomrange(300, 400));
ChooseOptionMulti(['Balance', 'Narrow', 'wall']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;
Function JumpUpWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Jump', '-up', 'wall'], [7982, 4013377, 12347], 6)then
if findMSObjectSimple([7982, 4013377, 12347], ['Jump', '-up', 'wall']) then
begin
writeLn('Jumping Wall');
fastClick(mouse_Right);
WaitUpText('Jump', randomrange(300, 400));
ChooseOptionMulti(['Jump', '-up', 'wall']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;
Function JumpGap: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('E');
//if FindObjCustom(X, Y, ['Gap'], [3752543, 1845581, 1320014], 6)then
if findMSObjectSimple([3752543, 1845581, 1320014], ['Gap']) then
begin
writeLn('Jumping Gap');
fastClick(mouse_Right);
WaitUpText('Gap', randomrange(300, 400));
ChooseOptionMulti(['Gap']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;
Function ClimbCrate: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('E');
//if FindObjCustom(X, Y, ['Climb-','-down','Crate'], [6184542, 5658198, 5263440], 6)then
if findMSObjectSimple([6184542, 5658198, 5263440], ['Climb-','-down','Crate']) then
begin
writeLn('Climb Boxes');
fastClick(mouse_Right);
WaitUpText('Climb-', randomrange(300, 400));
ChooseOptionMulti(['Climb-','-down','Crate']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;
Function AgilityIcon: Boolean;
var
mmPnt : TPoint;
begin
if DTM_findBestPointEx([Agility], AREA_MM, mmPnt) then
begin
Result := True;
mouse(mmPnt, 5, 5, MOUSE_LEFT);
end;
end;
Procedure WalkSetup;
begin
{$IFDEF SMART}
Walker.Init('custom', 'DraynorRoof', OS_SMART.ID);
{$ELSE}
Walker.Init('custom', 'DraynorRoof', w_getClientPID());
{$ENDIF}
Walker.skipClose := 5;
Walker.walkStyle := wsSPS;
Walker.anyAngle := True;
//writeln('MyPos: '+toStr(Walker.getMyPos()));
end;
Procedure FreeDTMz;
begin
FreeDTM(Agility);
Walker.Free();
end;
Procedure Loop;
begin
if AgilityIcon then
begin
ClimbWall;
Wait(RandomRange(1000,1500));
setCompass('N');
end;
if pointsInDist(Walker.getMyPos(), Rope1, 10) then
begin
CrossTightRope;
Wait(RandomRange(1000,1500));
setCompass('N');
end else Exit;
if pointsInDist(Walker.getMyPos(), Rope2, 10) then
begin
CrossTightRope;
Wait(RandomRange(1000,1500));
setCompass('N');
end else
begin
Wait(RandomRange(1500,2500));
CrossTightRope;
Wait(RandomRange(1000,1500));
setCompass('N');
end;
if pointsInDist(Walker.getMyPos(), Balance, 10) then
begin
BalanceNarrowWall;
Wait(RandomRange(1000,1500));
setCompass('N');
end else
begin
Wait(RandomRange(1500,2500));
BalanceNarrowWall;
Wait(RandomRange(1000,1500));
setCompass('N');
end;
if pointsInDist(Walker.getMyPos(), Jump, 10) then
begin
JumpUpWall;
Wait(RandomRange(1000,1500));
setCompass('N');
end else
begin
Wait(RandomRange(1500,2500));
JumpUpWall;
Wait(RandomRange(1000,1500));
setCompass('N');
end
if pointsInDist(Walker.getMyPos(), Gap, 10) then
begin
JumpGap;
Wait(RandomRange(1000,1500));
setCompass('N');
end else
begin
Wait(RandomRange(1500,2500));
JumpGap;
Wait(RandomRange(1000,1500));
setCompass('N');
end;
if pointsInDist(Walker.getMyPos(), Crate, 10) then
begin
ClimbCrate;
Wait(RandomRange(1000,1500));
setCompass('N');
end else
begin
Wait(RandomRange(1500,2500));
ClimbCrate;
Wait(RandomRange(1000,1500));
setCompass('N');
end;
if not AgilityIcon then
begin
AgilityIcon;
Wait(RandomRange(1000,1500));
ClimbWall;
Wait(RandomRange(1000,1500));
end;
end;
begin
DISABLE_RANDOMS := False;
declarePlayer();
initAL();
MouseSpeed:=30;
DTMz;
WalkSetup;
addOnTerminate('FreeDTMz');
waitEx(1);
//MapTest;
repeat;
loop;
Until(False);
end.