RyGuy
2012-01-19 13:30:57
About This Script.
This is my first script. I know it has it's bugs that need to be worked out, but i thought i'd get an initial release out to see what you guys thought. EDIT: Not many bugs left, if you find any please post them!
You can begin running the course at level 85 agility, however you have a chance at failing the signpost until level 89. There is no support for failing the signpost as i did not have an account with a low enough agility to test it. EDIT: However, the way i have it coded, the script may work with failing the signpost, just a bit slower. If you have 85-88 agility please test it and let me know :)
So, if you have 89+ agility try out my script, and let me know what you think. I'm very open to suggestions!
Start it at the log balance, and please
Make sure Game Chat is set to All!
Versions
0.10 - Initial Release
0.15 - Some small changes made
0.20 - Finds Branch#2 much better than before
- Worked on some standards
- More Stable than previous versions
0.30 - SPS added to walk back to beginning
- Failsafes added
0.35 - Changed a DTM that would fail occasionally
0.50 - Rewrote most parts of the script to try making it more reliable. I think i was successful for the most part :P
0.60 - Fixed the barrier
0.70 - Fixed the first branch
0.80 - Added time running, xp, and xp/h
Known Bugs:
- Occasionally fails to climb first branch
Time: 1 Hours, 39 Minutes and 55 Seconds
We have gained 165353 Agility Experience!
We are gaining 99294 Agility Experience per Hour!This report is with the penance horn. Actual xp/h without modifiers is about 50kp/hprogram AdvancedGnomeAgility;
//////////////////////////WRITTEN BY RYGUY//////////////////////////////
////////////////////////////VERSION 0.80////////////////////////////////
{$DEFINE SMART}
{$DEFINE SRL5}
{$loadlib sps}
{$i SRL/srl.simba}
{$i sps/sps.simba}
var
Log, Branch1, Branch2, Post, Hurdle, TimeBegan, StartingXP: integer;
aFound: extended;
///////////////////////////PLAYER SETUP//////////////////////////////////
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:=True;
end;
////////////////////DO NOT TOUCH BELOW THIS LINE/////////////////////////
procedure SetDTMs;
begin
Log := DTMFromString('mlwAAAHicY2dgYFBjZGDgB2JpINYEYkUgVgViHSDeDJQ/BsSbgHgVEM8A4lNAvA2IixwFGHLiFRkKHPgZ0qz4GLwtxRnCnaQYcuz4GdiA8rgwIx4MBQAxWws7');
Branch1 := DTMFromString('mbQAAAHicY2VgYNBjZGBQAmILIPYC4kQgngMUnwnEM5BwfqgSQ02KOUNxjDFDfqQhmOYHinOhYUYsGAwAfOwJcQ==');
Branch2 := DTMFromString('mKgEAAHic42NgYOACYm4g9gRiOyA2YYAAViDmAWIZIBYBYkGoOnaoHBsQS0BpmBl8UD0wdSA5RgYEAOlL91dg8LaWYkjykWdI8JID4yhXGYYYd1mGOA85huwgJYbMAEWGwnBlhvxQCAbp4QDqJQczkolRAQDIyg2R');
Hurdle := DTMFromString('mQwAAAHicY2ZgYJBlZGBQBmJtIK4A8quAuBKI/95dwfDr9jKG7zeWMHAB+TDMiISBAABdxglu');
Post := DTMFromString('mQwAAAHicY2aAAA4g5oRiaajYxj4/hu6uVoaSknwGNiAfhhmRMBAAAKdUBMw=');
end;
procedure FreeDTMs;
begin
FreeDTM(Log);
FreeDTM(Branch1);
FreeDTM(Branch2);
FreeDTM(Hurdle);
FreeDTM(Post);
end;
procedure Report;
var
Exp, ExpHr, TimeRan: integer;
begin
TimeRan := (1+((GetSystemTime - TimeBegan) / 1000));
Exp := (GetXPBarTotal - StartingXP);
ExpHr := Round((Exp * 3600) / (TimeRan));
WriteLn('Time: ' + TimeRunning);
WriteLn('We have gained ' + IntToStr(Exp) + ' Agility Experience!');
WriteLn('We are gaining ' + IntToStr(ExpHr) + ' Agility Experience per Hour!');
end;
procedure AntiBan;
begin
if not(LoggedIn)then
Exit;
FindNormalRandoms;
LevelUpEx(True, True);
case Random(300)of
0: HoverSkill('Agility', false);
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
procedure LogBalance;
var
x, y: integer;
begin
repeat
if FindDTMRotated(Log, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
WriteLn('Found Log');
Mouse(x, y, 5, 5, True);
Wait(500+random(50));
until(IsMoving);
while(IsMoving) do
WaitNone;
AntiBan;
end;
procedure ObstacleNet;
var
x, y: integer;
begin
x := MSCX;
y := MSCY;
if FindObjTPA(x, y, 466484, 5, 1, 50, 150, 200, ['over'])then
begin
ClickMouse2(True);
WriteLn('Found Net');
AntiBan;
Wait(4000+random(100));
end;
end;
procedure TreeBranch1;
var
x, y: integer;
begin
x := MSCX;
y := MSCY;
FindDTMRotated(Branch1, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)
Mouse(x, y, 4, 4, True);
if DidRedClick then
begin
WriteLn('Found Branch 1');
AntiBan;
SetAngle(SRL_ANGLE_LOW);
end;
end;
procedure TreeBranch2;
var
x, y: integer;
begin
if FindDTM(Branch2, x, y, MSX1, MSY1, MSX2, MSY2)then
Mouse(x, y, 4, 4, True);
WriteLn('Found Branch 2');
AntiBan;
Wait(3000+random(50));
end;
procedure Signpost;
var
x, y: integer;
begin
if FindDTMRotated(Post, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
Mouse(x, y, 4, 4, True);
WriteLn('Found Signpost');
AntiBan;
Wait(3000+random(50));
end;
procedure Pole;
var
x, y: integer;
begin
ClickNorth(SRL_ANGLE_NONE);
Wait(100+random(50));
if FindObjTPAMulti(x, y, [4541520, 2566185], 4, 1, 220, 7, 200, ['Swing'])then
ClickMouse2(True);
WriteLn('Found Pole');
AntiBan;
Wait(12000+random(100));
end;
procedure Barrier;
var
x, y: integer;
begin
if FindDTM(Hurdle, x, y, MSX1, MSY1, MSX2, MSY2)then
begin
MMouse(x, y, 3, 4);
ClickMouse2(True);
if DidRedClick then
begin
WriteLn('Found Barrier');
AntiBan;
Wait(6500+random(100));
Report;
end;
end;
end;
procedure BackToLog;
begin
repeat
case Random(3) of
0: SPS_WindWalk(Point(1736, 2910));
1: SPS_WindWalk(Point(1736, 2912));
2: SPS_WindWalk(Point(1734, 2910));
end;
WriteLn('Attempting To Run Back To Log')
until (IsMoving);
begin
MakeCompass('E');
SetAngle(SRL_ANGLE_HIGH);
end;
end;
procedure WhereAreWe;
var
x, y: integer;
begin
if FindDTMRotated(Log, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Trying Balence');
LogBalance;
end;
if FindBlackChatMessage('other')then
begin
WriteLn('Trying Net');
ObstacleNet;
end;
if FindBlackChatMessage('netting')then
begin
WriteLn('Trying First Branch');
TreeBranch1;
end;
if FindBlackChatMessage('above')then
begin
WriteLn('Trying Second Branch');
TreeBranch2;
end;
if FindDTMRotated(Post, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Trying Signpost');
Signpost;
end;
if FindColoredAreaTolerance(x, y, 6270424, MSX1, MSY1, MSX2, MSY2, 600, 5)then
begin
WriteLn('Trying Pole');
Pole;
end;
if FindDTM(Hurdle, x, y, MSX1, MSY1, MSX2, MSY2)then
begin
WriteLn('Trying Barrier');
Barrier;
end;
if FindColoredAreaTolerance(x, y, 10129284, MMX1, MMY1, MMX2, MMY2, 100, 10)then
begin
WriteLn('Trying Walk Back To Log')
BackToLog;
end;
end;
begin
Smart_Server := 86;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetUpSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['4_7']);
ActivateClient;
DeclarePlayers;
LoginPlayer;
TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);
WriteLn('We are starting with ' + IntToStr(StartingXP) + ' xp');
ClickNorth(SRL_ANGLE_HIGH);
MakeCompass('E');
repeat
SetDTMs;
WhereAreWe;
FreeDTMs;
until(false);
end.