SRL Archive - RS3 Outdated / Broken Scripts

[Rewrite] Advanced Barbarian Agility


Failed4life

2012-02-01 16:10:20

This script was originally written by Anyhow.

I rewrote his script to make it faster and make less missclicks.

The script does not eat food so if u are 90-92 agility please use a regen bracelet.

This script does not currently have a progress report but i am looking into adding one soon.

v1.0 - Initial Release
v1.01 - DTMs added, antiban fixed
v1.02 - Progress Report added! Thanks RyGuy for the help :)
v1.021 - Pie Support Added!
v1.022 - Bug fixes and SMART Paint added
v1.023 - New gap DMT, Pie Toggle Switch added
v1.03 - Customizable HP Checker, logs out if low HP
v1.031 - Bugs Fixed

program AdvanceBarbarianAgility;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$I SRL/SRL/misc/paintsmart.simba}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Developer Log:

Original Author: Anyhow
Rewritten by: Failed4life
Johnnimms13

A hattip to [Nathan] for his skeleton of this script
--------------------------------------------------------------------------------
Version History:

0: Original by Anyhow
v1.0 - Initial Release
v1.01 - DTMs added, antiban fixed
v1.02 - Progress Report added! Thanks RyGuy for the help :)
v1.021 - Pie Support Added!
v1.022 - Bug fixes and SMART Paint added
v1.023 - New gap DMT, Pie Toggle Switch added
v1.03 - Customizable Hp checker, logs out if Hp is low
v1.031 - Bug Fixes
-------------------------------------------------------------------------------

Instructions:
Use the Setup and position your player in the agility course by the ropes.

If you wish to use Summer Pies to boost your Agility level, have them in your
inventory.

Note: This Script requires atleast 85 agility to run with boosts, 90 to run
Without boosts, and 93+ to run without mistakes.

---------------------------------------SETUP-----------------------------------}
const
//User Options
SERVER = 23; //Replace with desired server number
Username = ''; //Enter your Username
Password = ''; //Enter your Password
Nickname = ''; //Enter 3-4 digits of your Username
ar = 0; //AntiRandom switch (0 = off, 1 = on)
PieLevel = 90; //What level would u like to eat a summer pie at? (0 to disable)
PLogOut = True; //True logs out when summer pies are gone
HP = 20; //LogsOut if below this percentage of HP

{---------------------------------Do Not Touch---------------------------------}
mmdebug = 0; //mmBlack function debug switch (0 = off, 1 = on)
debugwfloor = 0; //Wfloor function debug switch (0 = off, 10~14 = on)


var
x,y:LongInt;
Rope, Log, Plate, Ledge, Launch, Pole, Gap, Roof, TimeBegan, Exp, ExpHr,
laps, StartingXP:Integer;
aFound:Extended;
myPos: TPoint;
reRunUpWall: Boolean;
Clock: TIntegerArray;

procedure AntiBan;
begin
if not(LoggedIn)then
Exit;
case Random(300)of
0: HoverSkill('Agility', false);
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
{///////////////////RyGay's Style DTM setting by Johnnimms13///////////////////}
procedure SetDTMs;
begin
Rope := DTMFromString('mlwAAAHicY2dgYFjNyMAwF4h3MELYa4B4HxBPA+ImIK6D4i6oGIhdD8RaqrwMlYWxYGygzc+gq8EH5/MDzcWFGfFgKAAA+1wPEQ==');
Log := DTMFromString('m6wAAAHic42ZgYMhgZGBIZ4TQAUAcBMTNQFwBxIFQ2hGKZwLxciCeAMTrgLgdiFcDcQcQzwbiGUC8Foi7gbi/qZohNFSKwd9PgiEq0IYhyV+bIT1IlyE91oXB1VANTKcXdTHU96xk4Ae6g1jMRAJGAgB2cRcQ');
Plate := DTMFromString('mkwEAAHicE2ZgYKhhZGAoBuIiIC4E4gJGiFg7EHdAcRuUDxKPB+J6IF4OxIlAXAfE04F4IxBrAbEVEOsAsQwQCwCxMJSWBmJVINaDqjEEYk8g9oZiFiD+BXQPO5AWAuKqJBeGzjxfhuIYB4byeCeG2TXhDPPrIxlmVocxlMY6MlQkOINxd74fWK2/owQYh7pJMQTbSzL4WIkzxIXagzE/0FxqYSYqYiwAAPEbInA=');
Ledge := DTMFromString('mKgEAAHic42NgYPBnZGB4CKQFgbQbEMcBcQ0QLwTidUC8CohXAvFMIM4BYjsg/g1U/xqIbYBsDyAOA+IyII4C4mAgtgdifiB+B1RzBIj3APECIJ4PxCkBFgzBbnoM6UGWDFEeRgz+NhIMMZ7GDMHOKgxJkU4MSd5yDHEesgyhjlJgfHx5PsOBhdkM/4F6+cnATGRiVAAA+zEdZw==');
Launch := DTMFromString('mrAAAAHic42BgYDBiZGBQBGInIA4EYl4gNgBiLSC2AuI2IO4E4g4gngPEs4B4GRCXQPHzhycYGnI8GFryvRh2bN3AMLs5nOHlo5MMp1cVMhxclMPwH2gHPx7MSADDAACXeBZH');
Pole := DTMFromString('mggAAAHicY2NgYJgKxIpAzMIAAdFA/AaIvaF8eShbEIh9gLgwP4chPVSBwdnWhCEiwIXhx4dlDFH+Ngz8QDlsmBEHhgAAN88KtQ==');
Gap := DTMFromString('mrAAAAHic42BgYLBgZGBwg2IjIDYEYhUgDgdiaSA+CVRzB4i3AvEbIN4ExK+A+AQQHwPiIA9zhqQgc4boYDeGJC9thgw/PYbG+hqGtFg/hkgXGQYRoBp8mJEAhgEA+WsQlw==');
Roof := DTMFromString('m6wAAAHic42ZgYLjPyMCgzMTAIA3E54DsXUB8FYgPAPEdIH4CxPuB+AgQ1wDxHiDOAOJOIG4H4iwgTgHiBUAcDcTWQLwYiJ1sjBlC3Q0YYkLcGZysdFAwSCwuyJ7h4KJchu2z0hn4ge4gFjOSgJEAAMpXGCo=');
end;
Procedure FreeDTMs;
begin
FreeDTM(Rope);
FreeDTM(Log);
FreeDTM(Plate);
FreeDTM(Ledge);
FreeDTM(Launch);
FreeDTM(Pole);
FreeDTM(Gap);
FreeDTM(Roof);
end;
{//////////////////////////////////////////////////////////////////////////////}
function MSToHour(mstime :Extended): Extended;
begin
result := mstime/3600000;
end;
{///////////////////////////////by RyGay///////////////////////////////////////}
procedure Report;
var
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 PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
{///////////////////////////////Johnnimms13////////////////////////////////////}
procedure PaintReport;
begin
Clock := [0,0,0];
ConvertTime(GetTimeRunning,Clock[0],Clock[1],Clock[2]);
PrintOnSmart(['ABBA', 'Time Ran: '+tostr(Clock[0])+':'+tostr(Clock[1])+':'+tostr(Clock[2]),
'Laps Done: '+IntToStr(laps), 'EXP Gained: '+tostr(EXP), 'EXP Per Hour: '+ToStr(EXPhr)], Point(10, 255), 255);
end;
{//////////////////////////////////////////////////////////////////////////////}
procedure AntiRandoms;
begin
if ((not LoggedIn) or (ar = 0)) then Exit;
FindNormalRandoms; // find random events
end;
function mmBlack:Boolean;
var
blackSpot : array [0..7] of TPoint;
color : array [0..7] of Integer;
i,kk,res:Integer;
begin
result:= false;
blackSpot[0]:= Point(587,43);
blackSpot[1]:= Point(575,112);
blackSpot[2]:= Point(577,115);
blackSpot[3]:= Point(672,122);
blackSpot[4]:= Point(627,139);
blackSpot[5]:= Point(611,134);
blackSpot[6]:= Point(622,152);
blackSpot[7]:= Point(622,152);

color[0]:= 512;
color[1]:= 393990;
color[2]:= 198400;
color[3]:= 65537;
color[4]:= 131072;
color[5]:= 1797;
color[6]:= 459782;
color[7]:= 328705;

res := 0;
for i := 0 to 7 do
begin
for kk := 0 to 7 do
begin
if(FindColorTolerance(x,y,color[kk],blackSpot[i].x,blackSpot[i].y,blackSpot[i].x,blackSpot[i].y,7)) then
begin
res := res + 1;
//debug
if mmdebug = 1 then
writeln('i = ' + inttostr(i) + ' kk = ' + inttostr(kk));
end;
end;
end;

if(res > 7) then
result:= true;
end;

function Wfloor:Integer;


begin
result:= 99;

if((FindColorTolerance(x,y,2247007,633,56,633,56,15) or
FindColorTolerance(x,y,2247007,629,52,629,52,15) or
FindColorTolerance(x,y,2247007,628,60,628,60,15) or
FindColorTolerance(x,y,2247007,634,51,634,51,15) or
FindColorTolerance(x,y,2247007,633,60,633,60,15) or
FindColorTolerance(x,y,2247007,629,49,629,49,15)) and
FindColorTolerance(x,y,395009,634,84,634,84,15) and
(mmblack())) then
result:= 10;

if((FindColorTolerance(x,y,1655633,615,84,615,84,15) or
FindColorTolerance(x,y,1521998,621,57,621,57,15)) and
(mmblack())) then
result:= 11;

if((FindColorTolerance(x,y,1853268,630,113,630,113,15) or
FindColorTolerance(x,y,1853268,636,116,636,116,15)) and (mmblack())) then
result:= 12;

if(FindColorTolerance(x,y,4873321,530,184,530,184,15) and (mmblack())) then
result:= 13;

if((FindColorTolerance(x,y,2180188,621,113,621,113,15) or
FindColorTolerance(x,y,2180188,625,114,625,114,15) or
FindColorTolerance(x,y,2180188,627,112,627,112,15) or
FindColorTolerance(x,y,2180188,622,113,622,113,15)) and
FindColorTolerance(x,y,393218,643,114,643,114,15) and
FindColorTolerance(x,y,393218,632,114,632,114,15) and
not(FindColorTolerance(x,y,4873321,530,184,530,184,15))and
(mmblack())) then
result:= 14;
//Debug
if debugwfloor = 10 then
begin
writeln('Debug Start');
writeln(FindColorTolerance(x,y,2247007,633,56,633,56,15));
writeln(FindColorTolerance(x,y,2247007,629,52,629,52,15));
writeln(FindColorTolerance(x,y,2247007,628,60,628,60,15));
writeln(FindColorTolerance(x,y,2247007,634,51,634,51,15));
writeln(FindColorTolerance(x,y,2247007,633,60,633,60,15));
writeln('Debug End');
end;
if debugwfloor = 14 then
begin
writeln('Debug Start');
writeln(FindColorTolerance(x,y,2180188,621,113,621,113,15));
writeln(FindColorTolerance(x,y,2180188,625,114,625,114,15));
writeln(FindColorTolerance(x,y,2180188,627,112,627,112,15));
writeln(FindColorTolerance(x,y,393218,643,114,643,114,15));
writeln(FindColorTolerance(x,y,393218,632,114,632,114,15));
writeln(FindColorTolerance(x,y,4873321,530,184,530,184,15));
writeln('Debug End');
end;

end;

Procedure sleepWhileMMBlack();
var t:Integer;

begin
t := 0;
while((mmBlack) and (t < 25)) do
begin
sleep(250+random(5))
t:=t+1;
writeln('SLeeping while mm is blacked');
end;
end;

function distanceTo(var point:TPoint): Extended;
var myLoc:TPoint;
begin
myLoc:= SPS_GetMyPos();
Result:= Sqrt((Sqr((Abs((point.x - myLoc.x)))) + Sqr((Abs((point.y - myLoc.y))))))
end;
procedure FreeAll;
begin
SMART_ClearCanvas;
writeln('free');
end;

procedure sleepWhileMoving();
var t:Integer;

begin
t := 0;
while((IsMoving) and (t < 12)) do
begin
sleep(250+random(5))
writeln('Sleeping while moving');
t:=t+1;
end;
end;
{/////////////////////////////by Johnnimms13//////////////////////////////////}
procedure EatPie;
var SPie, HPie, x, y: integer;
begin
if PieLevel > 0 then
begin;

SPie := DTMFromString('mlwAAAHicY2dgYPjIxMDwFoi/I9FfgPgDEL9kZGB4xgih3wPxYyB+B8SPgDhLTxGOK9JMGVJCdRiyovQZov00GPiB5uLCjHgwFAAAE+UTaw==');
HPie := DTMFromString('mlwAAAHicY2dgYDjBxMBwBIhPA/FhID4OxKeA+CIQH2NkYDgJxIegeD8QnwXiI0DsrSDOEKAsCcYZugoMScHaDNEBtgwp4c4M+AAjHgwFALfwEBg=');

if GetSkillInfo('agility', True) < (PieLevel+1) then
begin
writeln('below 91 agility, trying to find pie');
if ExistsItemDTM(spie, x, y) then
begin
writeln('found pie');
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(hpie, x, y) then
begin
writeln('found 1/2 pie');
mouse(x, y, 2, 2, true);
end else
begin
writeln('no pies!')
if PLogOut = True then
begin
logout;
TerminateScript;
end;
end;
end else
begin
writeln('No Pie for you!');
end;
freedtm(SPie);
FreeDtm(HPie);
end;
end;
{//////////////////////////////////////////////////////////////////////////////}
function getLocation(): integer;
var myPos, First, Second, Third, Fourth: TPoint;
begin
result := 0;
if (mmblack = true) then
result := Wfloor()
else
begin
First := Point(2045, 2430); //Beginning Point
Second := Point(2045, 2445); //After swinging the rope
Third := Point(2005, 2460); //After log balancing
Fourth := Point(1940, 2415); //Before running up the wall

myPos := SPS_GetMyPos();

if ((distanceTo(First) <= 5) and (myPos.y < 2435)) then
begin
result:=1;
end;
if (distanceTo(Second) <= 5) then
begin
result:=2;
end;

if (distanceTo(Third) <= 15) then
begin
reRunUpWall := True;
result:=3;
end;

if (reRunUpWall = True) then
result:=3;

if (myPos = Fourth) then
begin
result:=4;
end;
end;
end;
procedure handleObstacle(spot: integer);
begin
SetDTMs;
writeln(spot);
if (spot = 0) then
begin
AntiRandoms;
EatPie;
writeln('Walk to beginning Point(2045, 2430)');
SPS_WalkToPos(Point(2045, 2430));
sleepWhileMoving();
end;

if (spot = 1) then
begin
writeln('Swing on rope');
if FindDTMRotated(Rope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(2300+random(175));
sleepWhileMoving();
Report;
PaintReport;
end;
end;

if (spot = 2) then
begin
writeln('Walk across log balance');
if FindDTMRotated(Log, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(x,y,5,5);
Mouse(x, y, 3, 3, True);
sleep(1900+random(150));
sleepWhileMoving();
end;
end;

if (spot = 3) then
begin
writeln('Run up and jump the plate');
SPS_WalkToPos(Point(1996, 2478));
writeln(SPS_GetMyPos());
if FindDTMRotated(Plate, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(6400+random(150));
sleepWhileMoving();
end;
end;

if (spot = 10) then
begin
if (reRunUpwall = True) then
reRunUpwall := False;
AntiRandoms;
writeln('Climb up Ledge');
if FindDTMRotated(Ledge, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MakeCompass('n');
Mouse(x, y, 0, 0, True);
sleep(3300+random(150));
sleepWhileMoving();
end;
end;
if (spot = 11) then
begin
writeln('Fire Spring Device');
if FindDTMRotated(Launch, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(4300+random(150));
sleepWhileMoving();
end;
end;
if (spot = 12) then
begin
writeln('Cross Balance Beam if Healthy');
If not HPPercent > HP then
begin
logout;
TerminateScript;
end;

if FindDTMRotated(Pole, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2000+random(150));
sleepWhileMoving();
end;
end;
if (spot = 13) then
begin
writeln('Jump over gap');
if not MakeCompass('n') then
begin
MakeCompass('n');
end;
if FindDTMRotated(Gap, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2000+random(150));
sleepWhileMoving();
end;
end;
if (spot = 14) then
begin
AntiRandoms;
writeln('Slide down roof');
if FindDTMRotated(Roof, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(1800+random(150));
sleepWhileMoving();
IncEx(Laps, 1);
PaintReport;
end;
end;
FreeDTMs;
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;
end;
procedure LogMeIn;
begin
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(SERVER);
LoginPlayer;
end;

{//////////////////////////////////Main Loop///////////////////////////////////}
begin

Smart_Server := SERVER;
Smart_Members := True;

SetupSRL;
DeclarePlayers;
SPS_Setup(RUNESCAPE_SURFACE, ['4_5','4_6']);

TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);

AddOnTerminate('FreeAll');
if not(LoggedIn) then
LogMeIn;
while not(LoggedIn) do
sleep(1000);
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
while(true) do //Main loop
begin
while not(LoggedIn) do
LoginPlayer;
handleObstacle(getLocation());
myPos := SPS_GetMyPos();
writeln(Wfloor());
writeln(myPos);
writeln(mmBlack);
end;
end.

Reinier

2012-02-01 16:39:38

I am going to test it very soon! I saw someone else with another advanced barbarian script which I also saw that you kinda helped him and fixed some things.
Could you maybe make a elite gnome course script?
I don't want to sound like a leecher, but I can't script myself after like 5 attemps I can't set my mind to it sorry…

chiefcharlie

2012-02-01 22:13:38

kinda weird agile gets in the way :P will try this out tho

Failed4life

2012-02-01 22:46:59

ik its stupid, but for the cross balance beam part, the little metal thing it clicks on is the same color as part of the agile, so it tries to click on the agile first sometimes

Version 1.01 is out! Not many changes but i deleted a few things and fixed the antiban.

Overtime

2012-02-02 01:08:07

How is this running for you?

This doesn't work with SRL 5 you have to update a couple of standards..

tdawg777

2012-02-02 02:53:24

Looking forward to using this, at 88 agility now o.O

Iced_Liquid

2012-02-02 05:34:02

Any good progies?

Quintessence

2012-02-02 05:52:23

I doubt there'll be any good progress reports until this script is updated to SRL 5. :P

Failed4life

2012-02-02 06:32:17

From: Quintessence
I doubt there'll be any good progress reports until this script is updated to SRL 5. :P


i have srl 5 and its running fine.. also there isnt going to be any progress reports because i dont have a report thing added to the script atm.

Quintessence

2012-02-02 06:36:11

From: Failed4life
i have srl 5 and its running fine.. also there isnt going to be any progress reports because i dont have a report thing added to the script atm.


That's probably because you still have the old .scar files from when you updated from SRL 4 -> 5. I did a clean installation of Simba so I don't access to any of the outdated .scar files.

From: Simba
Exception in Script: Unable to find file 'srl/srl.scar' used from ''

Failed4life

2012-02-02 07:00:56

From: Quintessence
That's probably because you still have the old .scar files from when you updated from SRL 4 -> 5. I did a clean installation of Simba so I don't access to any of the outdated .scar files.


oh well ill look at it later to day, have to go to school really soon

Heterodox

2012-02-02 07:09:48

awesome, I will try it out soon

Ricky

2012-02-02 10:21:04

Can you add a feature so it runs the low level course as well? Because I don't have 90 Agility.

imscaredtolosemymain

2012-02-02 10:30:33

ok so i am using this and playing with it, to get it to boost with summer pies. So far so good.

I made dtms for summer pie and half pie, but only added the full pie so far:

Procedure Eatpie;
Var spie,x,y: integer;
Begin
writeln('below 90 agility, trying to find pie');
spie := DTMFromString('mwQAAAHic42RgYGAHYhYGCGACYl4gFgFiISAWB2J+IOaAyvNA5USg4lxQDNKfpqsANiEjUh9qEgTH+GmC6XAvdbAeQpiRCAwHAOsOBKs=');
if ExistsItemDTM(spie, x, y) then
writeln('found pie');
mouse(x, y, 2, 2, true);
freedtm(spie);


End;

can someone help me with the syntax for the if commands if i have either a full pie or a half pie?

so
if below 90 agility, look for a pie, eat pie.
if no pie, eat half pie?

is there and if..then..else type command in simba?

G

JN13

2012-02-02 13:39:32

procedure EatPie;  //by Johnnimms13
var SPie, HPie, x, y: integer;
begin

SPie := DTMFromString('mlwAAAHicY2dgYPjIxMDwFoi/I9FfgPgDEL9kZGB4xgih3wPxYyB+B8SPgDhLTxGOK9JMGVJCdRiyovQZov00GPiB5uLCjHgwFAAAE+UTaw==');
HPie := DTMFromString('mlwAAAHicY2dgYDjBxMBwBIhPA/FhID4OxKeA+CIQH2NkYDgJxIegeD8QnwXiI0DsrSDOEKAsCcYZugoMScHaDNEBtgwp4c4M+AAjHgwFALfwEBg=');

if GetSkillInfo('agility', True) < 91 then
begin
writeln('below 91 agility, trying to find pie');
if ExistsItemDTM(spie, x, y) then
begin
writeln('found pie');
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(hpie, x, y) then
begin
writeln('found 1/2 pie');
mouse(x, y, 2, 2, true);
end else
begin
writeln('no pies!')
end;
end else
begin
writeln('No Pie for you!');
end;
freedtm(SPie);
FreeDtm(HPie);
end;
heres my version of your eat pie procedure, I'm going to see about adding it to the script…

Failed4life

2012-02-02 15:13:13

v1.02 is out! Progress Report added! Thanks RyGuy!

JN13

2012-02-02 15:31:30

lol… he beat me to it. I added paint and summer pie support.

imscaredtolosemymain

2012-02-02 15:42:21

excellent - i will edit v1.02 and add my own pie support :)

learning scripting from scratch one function at a time :)

Failed4life

2012-02-02 15:47:38

From: imscaredtolosemymain
excellent - i will edit v1.02 and add my own pie support :)

learning scripting from scratch one function at a time :)

dont worry, just added it, uploading new version now

RyGuy

2012-02-02 15:51:12

From: Failed4life
v1.02 is out! Progress Report added! Thanks RyGuy!


No problem :)

Failed4life

2012-02-02 15:51:25

v1.021 is out! Pie Support added!

imscaredtolosemymain

2012-02-02 15:53:44

er…ok, then i will add….er

damn it! lol

JN13

2012-02-02 16:01:33

ok, heres the latest, It has pie support, paint, and RuGay's report :) as well as bug fixes. Oh! and would anybody like it if i made the script log out if you ran out of pies?

program AdvanceBarbarianAgility;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$I SRL/SRL/misc/paintsmart.simba}
// Dev Log:
// Original Author: Anyhow
// Rewritten by: Failed4life
// Further Reworking by Johnnimms13
// Version: (idk what u want to name it)
// Runs Advance Barbarian Agility Course
// A hattip to [Nathan] for his skeleton of this script
// Paint(Johnnimms13) and report(RyGay) added.

// *** Notice, Pay No Heed to Exp/Hr till it runs a bit (5 mins.) :)

//SETUP
const
SERVER = 23; //Replace with desired server number
Username = '';
Password = '';
Nickname = '';
ar = 0; //AntiRandom switch (0 = off, 1 = on)
mmdebug = 0; //mmBlack function debug switch (0 = off, 1 = on)
debugwfloor = 0; //Wfloor function debug switch (0 = off, 10~14 = on)
PieLevel = 90; // What level would u like to eat a summer pie at? (90 req)
//Vars
var x,y:LongInt;
var Rope, Log, Plate, Ledge,
Launch, Pole, Gap, Roof, TimeBegan, Exp, ExpHr, laps, StartingXP:Integer;
var aFound:Extended;
var myPos: TPoint;
var reRunUpWall: Boolean;
var Clock: TIntegerArray;

procedure AntiBan;
begin
if not(LoggedIn)then
Exit;
case Random(300)of
0: HoverSkill('Agility', false);
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
{//////////////////////////////////////////////////////////////////////////////}
// RyGay's Style DTM setting by Johnnimms13
procedure SetDTMs;
begin
Rope := DTMFromString('mlwAAAHicY2dgYFjNyMAwF4h3MELYa4B4HxBPA+ImIK6D4i6oGIhdD8RaqrwMlYWxYGygzc+gq8EH5/MDzcWFGfFgKAAA+1wPEQ==');
Log := DTMFromString('m6wAAAHic42ZgYMhgZGBIZ4TQAUAcBMTNQFwBxIFQ2hGKZwLxciCeAMTrgLgdiFcDcQcQzwbiGUC8Foi7gbi/qZohNFSKwd9PgiEq0IYhyV+bIT1IlyE91oXB1VANTKcXdTHU96xk4Ae6g1jMRAJGAgB2cRcQ');
Plate := DTMFromString('mkwEAAHicE2ZgYKhhZGAoBuIiIC4E4gJGiFg7EHdAcRuUDxKPB+J6IF4OxIlAXAfE04F4IxBrAbEVEOsAsQwQCwCxMJSWBmJVINaDqjEEYk8g9oZiFiD+BXQPO5AWAuKqJBeGzjxfhuIYB4byeCeG2TXhDPPrIxlmVocxlMY6MlQkOINxd74fWK2/owQYh7pJMQTbSzL4WIkzxIXagzE/0FxqYSYqYiwAAPEbInA=');
Ledge := DTMFromString('mKgEAAHic42NgYPBnZGB4CKQFgbQbEMcBcQ0QLwTidUC8CohXAvFMIM4BYjsg/g1U/xqIbYBsDyAOA+IyII4C4mAgtgdifiB+B1RzBIj3APECIJ4PxCkBFgzBbnoM6UGWDFEeRgz+NhIMMZ7GDMHOKgxJkU4MSd5yDHEesgyhjlJgfHx5PsOBhdkM/4F6+cnATGRiVAAA+zEdZw==');
Launch := DTMFromString('mrAAAAHic42BgYDBiZGBQBGInIA4EYl4gNgBiLSC2AuI2IO4E4g4gngPEs4B4GRCXQPHzhycYGnI8GFryvRh2bN3AMLs5nOHlo5MMp1cVMhxclMPwH2gHPx7MSADDAACXeBZH');
Pole := DTMFromString('mrAAAAHic42BgYHjFyMDwFIgfAfF9IH4AxPegYl+AuAqI24G4BogLgTgLiJOBOBoqV1pcwBDoosvg62bN4GFvwBAT4g7m10aoMfi7mjLwA+3AhxkJYBgAAKwpEmw=');
Gap := DTMFromString('mrAAAAHic42BgYLBmZGCwAGJzKG0KxMVAnAfEgUB8CqjmHhBvAeK5QPwbiP8C8UIgPgPEIV4WDFmR1gwhvo4Mu+ZmMqR5KDCcXVPMMK81kiHSz5qBH6gGH2YkgGEAANU5EsY=');
Roof := DTMFromString('mlwAAAHicY2dgYHjDyMDwAIjvADErEwMDCxCzATEDEFcDxdYBsTMQxwDxFiBWAuKjQBzlb8Owd14mw6WNZQypMb4M6WGWDHPrIhhamuoY/gO18+PAjHgwFAAAOdkRMQ==')
end;
Procedure FreeDTMs;
begin
FreeDTM(Rope);
FreeDTM(Log);
FreeDTM(Plate);
FreeDTM(Ledge);
FreeDTM(Launch);
FreeDTM(Pole);
FreeDTM(Gap);
FreeDTM(Roof);

end;
{//////////////////////////////////////////////////////////////////////////////}

function MSToHour(mstime :Extended): Extended;
begin
result := mstime/3600000;
end;


procedure Report; //by RyGay
var
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 PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
// Modified by Johnnimms13
procedure PaintReport;
begin
Clock := [0,0,0];
ConvertTime(GetTimeRunning,Clock[0],Clock[1],Clock[2]);
PrintOnSmart(['ABBA', 'Time Ran: '+tostr(Clock[0])+':'+tostr(Clock[1])+':'+tostr(Clock[2]),
'Laps Done: '+IntToStr(laps), 'EXP Gained: '+tostr(EXP), 'EXP Per Hour: '+ToStr(EXPhr)], Point(10, 255), 255);
end;


procedure AntiRandoms;
begin
if ((not LoggedIn) or (ar = 0)) then Exit;
FindNormalRandoms; // find random events
end;

function mmBlack:Boolean;
var blackSpot : array [0..7] of TPoint;
var color : array [0..7] of Integer;
var i,kk,res:Integer;
begin

result:= false;
blackSpot[0]:= Point(587,43);
blackSpot[1]:= Point(575,112);
blackSpot[2]:= Point(577,115);
blackSpot[3]:= Point(672,122);
blackSpot[4]:= Point(627,139);
blackSpot[5]:= Point(611,134);
blackSpot[6]:= Point(622,152);
blackSpot[7]:= Point(622,152);

color[0]:= 512;
color[1]:= 393990;
color[2]:= 198400;
color[3]:= 65537;
color[4]:= 131072;
color[5]:= 1797;
color[6]:= 459782;
color[7]:= 328705;

res := 0;
for i := 0 to 7 do
begin
for kk := 0 to 7 do
begin
if(FindColorTolerance(x,y,color[kk],blackSpot[i].x,blackSpot[i].y,blackSpot[i].x,blackSpot[i].y,7)) then
begin
res := res + 1;
//debug
if mmdebug = 1 then
writeln('i = ' + inttostr(i) + ' kk = ' + inttostr(kk));
end;
end;
end;

if(res > 7) then
result:= true;
end;

function Wfloor:Integer;


begin
result:= 99;

if((FindColorTolerance(x,y,2247007,633,56,633,56,15) or
FindColorTolerance(x,y,2247007,629,52,629,52,15) or
FindColorTolerance(x,y,2247007,628,60,628,60,15) or
FindColorTolerance(x,y,2247007,634,51,634,51,15) or
FindColorTolerance(x,y,2247007,633,60,633,60,15) or
FindColorTolerance(x,y,2247007,629,49,629,49,15)) and
FindColorTolerance(x,y,395009,634,84,634,84,15) and
(mmblack())) then
result:= 10;

if((FindColorTolerance(x,y,1655633,615,84,615,84,15) or
FindColorTolerance(x,y,1521998,621,57,621,57,15)) and
(mmblack())) then
result:= 11;

if((FindColorTolerance(x,y,1853268,630,113,630,113,15) or
FindColorTolerance(x,y,1853268,636,116,636,116,15)) and (mmblack())) then
result:= 12;

if(FindColorTolerance(x,y,4873321,530,184,530,184,15) and (mmblack())) then
result:= 13;

if((FindColorTolerance(x,y,2180188,621,113,621,113,15) or
FindColorTolerance(x,y,2180188,625,114,625,114,15) or
FindColorTolerance(x,y,2180188,627,112,627,112,15) or
FindColorTolerance(x,y,2180188,622,113,622,113,15)) and
FindColorTolerance(x,y,393218,643,114,643,114,15) and
FindColorTolerance(x,y,393218,632,114,632,114,15) and
not(FindColorTolerance(x,y,4873321,530,184,530,184,15))and
(mmblack())) then
result:= 14;

//Debug
if debugwfloor = 10 then
begin
writeln('Debug Start');
writeln(FindColorTolerance(x,y,2247007,633,56,633,56,15));
writeln(FindColorTolerance(x,y,2247007,629,52,629,52,15));
writeln(FindColorTolerance(x,y,2247007,628,60,628,60,15));
writeln(FindColorTolerance(x,y,2247007,634,51,634,51,15));
writeln(FindColorTolerance(x,y,2247007,633,60,633,60,15));
writeln('Debug End');
end;
if debugwfloor = 14 then
begin
writeln('Debug Start');
writeln(FindColorTolerance(x,y,2180188,621,113,621,113,15));
writeln(FindColorTolerance(x,y,2180188,625,114,625,114,15));
writeln(FindColorTolerance(x,y,2180188,627,112,627,112,15));
writeln(FindColorTolerance(x,y,393218,643,114,643,114,15));
writeln(FindColorTolerance(x,y,393218,632,114,632,114,15));
writeln(FindColorTolerance(x,y,4873321,530,184,530,184,15));
writeln('Debug End');
end;

end;

Procedure sleepWhileMMBlack();
var t:Integer;

begin
t := 0;
while((mmBlack) and (t < 25)) do
begin
sleep(250+random(5))
t:=t+1;
writeln('SLeeping while mm is blacked');
end;
end;

function distanceTo(var point:TPoint): Extended;
var myLoc:TPoint;
begin
myLoc:= SPS_GetMyPos();
Result:= Sqrt((Sqr((Abs((point.x - myLoc.x)))) + Sqr((Abs((point.y - myLoc.y))))))
end;
procedure FreeAll;
begin
SMART_ClearCanvas;
writeln('free');
end;

procedure sleepWhileMoving();
var t:Integer;

begin
t := 0;
while((IsMoving) and (t < 12)) do
begin
sleep(250+random(5))
writeln('Sleeping while moving');
t:=t+1;
end;
end;
procedure EatPie; //by Johnnimms13
var SPie, HPie, x, y: integer;
begin

SPie := DTMFromString('mlwAAAHicY2dgYPjIxMDwFoi/I9FfgPgDEL9kZGB4xgih3wPxYyB+B8SPgDhLTxGOK9JMGVJCdRiyovQZov00GPiB5uLCjHgwFAAAE+UTaw==');
HPie := DTMFromString('mlwAAAHicY2dgYDjBxMBwBIhPA/FhID4OxKeA+CIQH2NkYDgJxIegeD8QnwXiI0DsrSDOEKAsCcYZugoMScHaDNEBtgwp4c4M+AAjHgwFALfwEBg=');

if GetSkillInfo('agility', True) < (PieLevel+1) then
begin
writeln('below 91 agility, trying to find pie');
if ExistsItemDTM(spie, x, y) then
begin
writeln('found pie');
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(hpie, x, y) then
begin
writeln('found 1/2 pie');
mouse(x, y, 2, 2, true);
end else
begin
writeln('no pies!')
end;
end else
begin
writeln('No Pie for you!');
end;
freedtm(SPie);
FreeDtm(HPie);
end;





function getLocation(): integer;
var myPos, First, Second, Third, Fourth: TPoint;
begin
result := 0;
if (mmblack = true) then
result := Wfloor()
else
begin
First := Point(2045, 2430); //Beginning Point
Second := Point(2045, 2445); //After swinging the rope
Third := Point(2005, 2460); //After log balancing
Fourth := Point(1940, 2415); //Before running up the wall

myPos := SPS_GetMyPos();

if ((distanceTo(First) <= 5) and (myPos.y < 2435)) then
begin
result:=1;
end;
if (distanceTo(Second) <= 5) then
begin
result:=2;
end;

if (distanceTo(Third) <= 15) then
begin
reRunUpWall := True;
result:=3;
end;

if (reRunUpWall = True) then
result:=3;

if (myPos = Fourth) then
begin
result:=4;
end;


end;
end;
procedure handleObstacle(spot: integer);

begin
SetDTMs;
writeln(spot);
if (spot = 0) then
begin
AntiRandoms;
EatPie;
writeln('Walk to beginning Point(2045, 2430)');
SPS_WalkToPos(Point(2045, 2430));
sleepWhileMoving();
end;

if (spot = 1) then
begin
writeln('Swing on rope');
if FindDTMRotated(Rope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(2300+random(175));
sleepWhileMoving();
Report;
PaintReport;
end;
end;

if (spot = 2) then
begin
writeln('Walk across log balance');
if FindDTMRotated(Log, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(x,y,5,5);
Mouse(x, y, 3, 3, True);
sleep(1900+random(150));
sleepWhileMoving();


end;
end;

if (spot = 3) then
begin
writeln('Run up and jump the plate');
SPS_WalkToPos(Point(1996, 2478));
writeln(SPS_GetMyPos());
if FindDTMRotated(Plate, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(6400+random(150));
sleepWhileMoving();

end;
end;

if (spot = 10) then
begin
if (reRunUpwall = True) then
reRunUpwall := False;
AntiRandoms;
writeln('Climb up Ledge');
if FindDTMRotated(Ledge, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
if not MakeCompass('n') then
begin
MakeCompass('n');
end;
Mouse(x, y, 0, 0, True);
sleep(3300+random(150));
sleepWhileMoving();


end;
end;

if (spot = 11) then
begin
writeln('Fire Spring Device');
if FindDTMRotated(Launch, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(4300+random(150));
sleepWhileMoving();

end;
end;

if (spot = 12) then
begin
writeln('Cross Balance Beam');
if FindDTMRotated(Pole, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2000+random(150));
sleepWhileMoving();

end;
end;
if (spot = 13) then
begin
writeln('Jump over gap');
if not MakeCompass('n') then
begin
MakeCompass('n');
end;
if FindDTMRotated(Gap, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2000+random(150));
sleepWhileMoving();

end;
end;

if (spot = 14) then
begin
AntiRandoms;
writeln('Slide down roof');
if FindDTMRotated(Roof, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(1800+random(150));
sleepWhileMoving();
IncEx(Laps, 1);

PaintReport;
end;
end;
FreeDTMs;
end;



procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;

end;

procedure LogMeIn;
begin
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(SERVER);
LoginPlayer;
end;



begin

Smart_Server := SERVER;
Smart_Members := True;

//Setup
SetupSRL;
DeclarePlayers;
SPS_Setup(RUNESCAPE_SURFACE, ['4_5','4_6']);

TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);

AddOnTerminate('FreeAll');
if not(LoggedIn) then
LogMeIn;
while not(LoggedIn) do
sleep(1000);
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
while(true) do //Main loop
begin
while not(LoggedIn) do
LoginPlayer;
handleObstacle(getLocation());
myPos := SPS_GetMyPos();
writeln(Wfloor());
writeln(myPos);
writeln(mmBlack);
end;

end.

Failed4life

2012-02-02 16:25:43

his name is RyGuy not RuGay.. no offense but if ur gonna give ppl credit in the script atleast spell there name right :)

JN13

2012-02-02 16:36:16

LOL! SORRY!!!! I'm Laughing my *** off I am so sorry! I did a typo once, and then i guess i just used that forever after :(

on a side note, I have noticed that with Mass amounts of people, the script fails at the log, resulting in it looping the rope (only happened once) I've been baby sitting it for Hours and its the first hard failure I've seen. Also, It MUST be facing north to find the ledge…

lilcmp1

2012-02-02 16:39:32

From: johnnimms13
LOL! SORRY!!!! I'm Laughing my *** off I am so sorry! I did a typo once, and then i guess i just used that forever after :(

on a side note, I have noticed that with Mass amounts of people, the script fails at the log, resulting in it looping the rope (only happened once) I've been baby sitting it for Hours and its the first hard failure I've seen. Also, It MUST be facing north to find the ledge…


You could add in a compass change to north

Failed4life

2012-02-02 16:50:57

From: lilcmp1
You could add in a compass change to north

already is one :)

Failed4life

2012-02-02 16:51:57

v1.022 is out! Smart Paint added and some bugs fixed!

JN13

2012-02-02 16:55:37

Heavy update day… Btw… I have another update too. added a switch to turn off pies, and an option to logout when your out of pies.

Failed4life

2012-02-02 18:05:17

v1.023 is out! New gap DMT, Pie Toggle Switch added!

Adobe

2012-02-02 18:06:09

:o nice, gonna try this when i get 94 rc :3

tdawg777

2012-02-02 18:57:14

For some reason it sits at the plate for ages spamming false or something.
Edit: keeps spamming this while next to the wall run
(1995, 2475)
False

Quintessence

2012-02-02 18:59:51

There are quite a few flaws.

It's too slow to do the swing > log balance > wall jump and also too slow overall. It also tends to misclick the balance beam A LOT. Even when it is already on the last part of the course (the slide down) it will instead constantly click the balance beam due to its visibility. Only gaining 25K experience an hour.

Failed4life

2012-02-02 19:00:07

v1.03 is out! Customizable Hp checker, logs out if Hp is low!

Failed4life

2012-02-02 19:03:12

From: Quintessence
There are quite a few flaws.

It's too slow to do the swing > log balance > wall jump and also too slow overall. It also tends to misclick the balance beam A LOT. Even when it is already on the last part of the course (the slide down) it will instead constantly click the balance beam due to its visibility. Only gaining 25K experience an hour.

are u using the latest version of the script?

Quintessence

2012-02-02 19:04:47

I was using version 1.023. Did you fix any of those errors in 1.3? It's barely running a full lap at the moment. Gets stuck at the ledge now too and spams:

True
99
99
(1900, 2085)
True
99
(1900, 2085)
True
99
99
(1900, 2085)
True
99
99
(1900, 2085)
True
99
99
(1900, 2085)
True
99
99
(1900, 2085)
True
99
99
(1900, 2085)
True
99
99
(1900, 2085)
True
99
99
(1900, 2085)
True
99

tdawg777

2012-02-02 19:08:21

From: Quintessence
There are quite a few flaws.

It's too slow to do the swing > log balance > wall jump and also too slow overall. It also tends to misclick the balance beam A LOT. Even when it is already on the last part of the course (the slide down) it will instead constantly click the balance beam due to its visibility. Only gaining 25K experience an hour.


Mine seems to be running the same… I'm getting 20k/hr with Skoll boots…

Failed4life

2012-02-02 19:13:58

I'm not having any troubles with v1.03 :o?

Failed4life

2012-02-02 19:16:44

Please make sure u download the newest version if u havent, and try starting the script with your xp counter open, screen facing north, and at the highest point

Quintessence

2012-02-02 19:23:37

Seems to be working well except it's way too slow! If there is a way to speed it up overall, it would be great because currently, even Ape Atoll would be faster. :P

It's just mainly from end -> back to beginning point -> rope swing > log balance > wall jump that is incredibly slow.

Edit: just got stuck at the fire spring device. Seems to be frozen and the debug box is spamming again.

It did this three times in a row. :s

(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device

Failed4life

2012-02-02 19:29:55

From: Quintessence
Seems to be working well except it's way too slow! If there is a way to speed it up overall, it would be great because currently, even Ape Atoll would be faster. :P

It's just mainly from end -> back to beginning point -> rope swing > log balance > wall jump that is incredibly slow.

Edit: just got stuck at the fire spring device. Seems to be frozen and the debug box is spamming again.

It did this two times in a row. :s

(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device
11
(1940, 2760)
True
11
Fire Spring Device

we have recognized the spring device problem and it is caused when another person is using the spring device (shape changes) when the script goes to click on it. We are looking for a fix. For now try using a world that doesnt have many ppl on the course or heck if u can find 1 and empty world.

I dont really see many problems with the speed, im getting 45k/hr without skoll boots, but ill experiment with it.

Quintessence

2012-02-02 19:34:14

You should add in a failsafe for if no experience is gained in 1 minute~ -> logout.

Quintessence

2012-02-02 19:41:19

It still tends to misclick the balance beam a lot. I've noticed that the script aims to click it on the borderline. Is it possible to change it so it aims for a bit further to the right?

tdawg777

2012-02-02 19:41:22

I found out why mine gas been messing up, when it goes to the wall run and it is one step to the east it starts throwing similar messages to what Quintessence has been getting.
I also found when it is doing the slide down it only clicks one space infront of the character and not on the actual slide, could you add in an uptext check or something?

Quintessence

2012-02-02 19:50:42

From: Quintessence
Even when it is already on the last part of the course (the slide down) it will instead constantly click the balance beam due to its visibility.


It's doing this again.

JN13

2012-02-02 23:34:46

Play with the DTM's :) I'm getting about 45k exp per hour. We are still in version 1, so its more like a beta. Thank you for your help and understanding :)

PS, the problem is probably that your window is ever so slightly not north… I've had that problem too. A complete rework to make it fast is underway, hopefully done with it soon.

Quintessence

2012-02-02 23:57:55

I'll test it out soon with the window perfectly north. Can't wait for the rework though. Hopefully a couple failsafe mechanisms are implemented. :)

JN13

2012-02-03 00:35:05

So! Heres my idea, have the main loop completely based on mmouse and IsUpTextEx, then when those fail, DTM the hotzone and use it as a failsafe, and include a "fail counter". I just did a sketch, and my skeleton script (has no hope if it moves compass) was promising at a 37 second lap! thats around 65k exp per hour or so I'm guessing.

InHuman

2012-02-03 00:40:05

only eats full pies? not the halves? lol

Quintessence

2012-02-03 00:41:29

From: johnnimms13
So! Heres my idea, have the main loop completely based on mmouse and IsUpTextEx, then when those fail, DTM the hotzone and use it as a failsafe, and include a "fail counter". I just did a sketch, and my skeleton script (has no hope if it moves compass) was promising at a 37 second lap! thats around 65k exp per hour or so I'm guessing.


That sounds fantastic! Any ETA on the official release?

JN13

2012-02-03 01:15:09

Well… The problem I'm having, is if I do that, it will be absoFreekingLutely useless. I think I'll try to optumize the current one first, as it actually detects where u are.

Example: U get randomed on the pole. If u were using the current script (which is a tank) you would be fine. it would start right up and go like nothing happened. If I use the other… well… it would die badly.

So I will probably get rid of some DTM, slim down the features, and hope for 55k exp (which still is awesome). Then when I have another week ill work on the Lightning version…

In any case! here is the latest HotFix!
program AdvanceBarbarianAgility;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$I SRL/SRL/misc/paintsmart.simba}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Developer Log:

Original Author: Anyhow
Rewritten by: Failed4life
Johnnimms13

A hattip to [Nathan] for his skeleton of this script
--------------------------------------------------------------------------------
Version History:

0: Original by Anyhow
v1.0 - Initial Release
v1.01 - DTMs added, antiban fixed
v1.02 - Progress Report added! Thanks RyGuy for the help :)
v1.021 - Pie Support Added!
v1.022 - Bug fixes and SMART Paint added
v1.023 - New gap DMT, Pie Toggle Switch added
v1.03 - Customizable Hp checker, logs out if Hp is low
v1.031 - Bug Fixes
-------------------------------------------------------------------------------

Instructions:
Use the Setup and position your player in the agility course by the ropes.

If you wish to use Summer Pies to boost your Agility level, have them in your
inventory.

Note: This Script requires atleast 85 agility to run with boosts, 90 to run
Without boosts, and 93+ to run without mistakes.

---------------------------------------SETUP-----------------------------------}
const
//User Options
SERVER = 23; //Replace with desired server number
Username = ''; //Enter your Username
Password = ''; //Enter your Password
Nickname = ''; //Enter 3-4 digits of your Username
ar = 0; //AntiRandom switch (0 = off, 1 = on)
PieLevel = 90; //What level would u like to eat a summer pie at? (0 to disable)
PLogOut = True; //True logs out when summer pies are gone
HP = 20; //LogsOut if below this percentage of HP

{---------------------------------Do Not Touch---------------------------------}
mmdebug = 0; //mmBlack function debug switch (0 = off, 1 = on)
debugwfloor = 0; //Wfloor function debug switch (0 = off, 10~14 = on)


var
x,y:LongInt;
Rope, Log, Plate, Ledge, Launch, Pole, Gap, Roof, TimeBegan, Exp, ExpHr,
laps, StartingXP:Integer;
aFound:Extended;
myPos: TPoint;
reRunUpWall: Boolean;
Clock: TIntegerArray;

procedure AntiBan;
begin
if not(LoggedIn)then
Exit;
case Random(300)of
0: HoverSkill('Agility', false);
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
{///////////////////RyGay's Style DTM setting by Johnnimms13///////////////////}
procedure SetDTMs;
begin
Rope := DTMFromString('mlwAAAHicY2dgYFjNyMAwF4h3MELYa4B4HxBPA+ImIK6D4i6oGIhdD8RaqrwMlYWxYGygzc+gq8EH5/MDzcWFGfFgKAAA+1wPEQ==');
Log := DTMFromString('m6wAAAHic42ZgYMhgZGBIZ4TQAUAcBMTNQFwBxIFQ2hGKZwLxciCeAMTrgLgdiFcDcQcQzwbiGUC8Foi7gbi/qZohNFSKwd9PgiEq0IYhyV+bIT1IlyE91oXB1VANTKcXdTHU96xk4Ae6g1jMRAJGAgB2cRcQ');
Plate := DTMFromString('mkwEAAHicE2ZgYKhhZGAoBuIiIC4E4gJGiFg7EHdAcRuUDxKPB+J6IF4OxIlAXAfE04F4IxBrAbEVEOsAsQwQCwCxMJSWBmJVINaDqjEEYk8g9oZiFiD+BXQPO5AWAuKqJBeGzjxfhuIYB4byeCeG2TXhDPPrIxlmVocxlMY6MlQkOINxd74fWK2/owQYh7pJMQTbSzL4WIkzxIXagzE/0FxqYSYqYiwAAPEbInA=');
Ledge := DTMFromString('mKgEAAHic42NgYPBnZGB4CKQFgbQbEMcBcQ0QLwTidUC8CohXAvFMIM4BYjsg/g1U/xqIbYBsDyAOA+IyII4C4mAgtgdifiB+B1RzBIj3APECIJ4PxCkBFgzBbnoM6UGWDFEeRgz+NhIMMZ7GDMHOKgxJkU4MSd5yDHEesgyhjlJgfHx5PsOBhdkM/4F6+cnATGRiVAAA+zEdZw==');
Launch := DTMFromString('mrAAAAHic42BgYDBiZGBQBGInIA4EYl4gNgBiLSC2AuI2IO4E4g4gngPEs4B4GRCXQPHzhycYGnI8GFryvRh2bN3AMLs5nOHlo5MMp1cVMhxclMPwH2gHPx7MSADDAACXeBZH');
Pole := DTMFromString('mggAAAHicY2NgYJgKxIpAzMIAAdFA/AaIvaF8eShbEIh9gLgwP4chPVSBwdnWhCEiwIXhx4dlDFH+Ngz8QDlsmBEHhgAAN88KtQ==');
Gap := DTMFromString('mrAAAAHic42BgYLBgZGBwg2IjIDYEYhUgDgdiaSA+CVRzB4i3AvEbIN4ExK+A+AQQHwPiIA9zhqQgc4boYDeGJC9thgw/PYbG+hqGtFg/hkgXGQYRoBp8mJEAhgEA+WsQlw==');
Roof := DTMFromString('m6wAAAHic42ZgYLjPyMCgzMTAIA3E54DsXUB8FYgPAPEdIH4CxPuB+AgQ1wDxHiDOAOJOIG4H4iwgTgHiBUAcDcTWQLwYiJ1sjBlC3Q0YYkLcGZysdFAwSCwuyJ7h4KJchu2z0hn4ge4gFjOSgJEAAMpXGCo=');
end;
Procedure FreeDTMs;
begin
FreeDTM(Rope);
FreeDTM(Log);
FreeDTM(Plate);
FreeDTM(Ledge);
FreeDTM(Launch);
FreeDTM(Pole);
FreeDTM(Gap);
FreeDTM(Roof);
end;
{//////////////////////////////////////////////////////////////////////////////}
function MSToHour(mstime :Extended): Extended;
begin
result := mstime/3600000;
end;
{///////////////////////////////by RyGay///////////////////////////////////////}
procedure Report;
var
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 PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
{///////////////////////////////Johnnimms13////////////////////////////////////}
procedure PaintReport;
begin
Clock := [0,0,0];
ConvertTime(GetTimeRunning,Clock[0],Clock[1],Clock[2]);
PrintOnSmart(['ABBA', 'Time Ran: '+tostr(Clock[0])+':'+tostr(Clock[1])+':'+tostr(Clock[2]),
'Laps Done: '+IntToStr(laps), 'EXP Gained: '+tostr(EXP), 'EXP Per Hour: '+ToStr(EXPhr)], Point(10, 255), 255);
end;
{//////////////////////////////////////////////////////////////////////////////}
procedure AntiRandoms;
begin
if ((not LoggedIn) or (ar = 0)) then Exit;
FindNormalRandoms; // find random events
end;
function mmBlack:Boolean;
var
blackSpot : array [0..7] of TPoint;
color : array [0..7] of Integer;
i,kk,res:Integer;
begin
result:= false;
blackSpot[0]:= Point(587,43);
blackSpot[1]:= Point(575,112);
blackSpot[2]:= Point(577,115);
blackSpot[3]:= Point(672,122);
blackSpot[4]:= Point(627,139);
blackSpot[5]:= Point(611,134);
blackSpot[6]:= Point(622,152);
blackSpot[7]:= Point(622,152);

color[0]:= 512;
color[1]:= 393990;
color[2]:= 198400;
color[3]:= 65537;
color[4]:= 131072;
color[5]:= 1797;
color[6]:= 459782;
color[7]:= 328705;

res := 0;
for i := 0 to 7 do
begin
for kk := 0 to 7 do
begin
if(FindColorTolerance(x,y,color[kk],blackSpot[i].x,blackSpot[i].y,blackSpot[i].x,blackSpot[i].y,7)) then
begin
res := res + 1;
//debug
if mmdebug = 1 then
writeln('i = ' + inttostr(i) + ' kk = ' + inttostr(kk));
end;
end;
end;

if(res > 7) then
result:= true;
end;

function Wfloor:Integer;


begin
result:= 99;

if((FindColorTolerance(x,y,2247007,633,56,633,56,15) or
FindColorTolerance(x,y,2247007,629,52,629,52,15) or
FindColorTolerance(x,y,2247007,628,60,628,60,15) or
FindColorTolerance(x,y,2247007,634,51,634,51,15) or
FindColorTolerance(x,y,2247007,633,60,633,60,15) or
FindColorTolerance(x,y,2247007,629,49,629,49,15)) and
FindColorTolerance(x,y,395009,634,84,634,84,15) and
(mmblack())) then
result:= 10;

if((FindColorTolerance(x,y,1655633,615,84,615,84,15) or
FindColorTolerance(x,y,1521998,621,57,621,57,15)) and
(mmblack())) then
result:= 11;

if((FindColorTolerance(x,y,1853268,630,113,630,113,15) or
FindColorTolerance(x,y,1853268,636,116,636,116,15)) and (mmblack())) then
result:= 12;

if(FindColorTolerance(x,y,4873321,530,184,530,184,15) and (mmblack())) then
result:= 13;

if((FindColorTolerance(x,y,2180188,621,113,621,113,15) or
FindColorTolerance(x,y,2180188,625,114,625,114,15) or
FindColorTolerance(x,y,2180188,627,112,627,112,15) or
FindColorTolerance(x,y,2180188,622,113,622,113,15)) and
FindColorTolerance(x,y,393218,643,114,643,114,15) and
FindColorTolerance(x,y,393218,632,114,632,114,15) and
not(FindColorTolerance(x,y,4873321,530,184,530,184,15))and
(mmblack())) then
result:= 14;
//Debug
if debugwfloor = 10 then
begin
writeln('Debug Start');
writeln(FindColorTolerance(x,y,2247007,633,56,633,56,15));
writeln(FindColorTolerance(x,y,2247007,629,52,629,52,15));
writeln(FindColorTolerance(x,y,2247007,628,60,628,60,15));
writeln(FindColorTolerance(x,y,2247007,634,51,634,51,15));
writeln(FindColorTolerance(x,y,2247007,633,60,633,60,15));
writeln('Debug End');
end;
if debugwfloor = 14 then
begin
writeln('Debug Start');
writeln(FindColorTolerance(x,y,2180188,621,113,621,113,15));
writeln(FindColorTolerance(x,y,2180188,625,114,625,114,15));
writeln(FindColorTolerance(x,y,2180188,627,112,627,112,15));
writeln(FindColorTolerance(x,y,393218,643,114,643,114,15));
writeln(FindColorTolerance(x,y,393218,632,114,632,114,15));
writeln(FindColorTolerance(x,y,4873321,530,184,530,184,15));
writeln('Debug End');
end;

end;

Procedure sleepWhileMMBlack();
var t:Integer;

begin
t := 0;
while((mmBlack) and (t < 25)) do
begin
sleep(250+random(5))
t:=t+1;
writeln('SLeeping while mm is blacked');
end;
end;

function distanceTo(var point:TPoint): Extended;
var myLoc:TPoint;
begin
myLoc:= SPS_GetMyPos();
Result:= Sqrt((Sqr((Abs((point.x - myLoc.x)))) + Sqr((Abs((point.y - myLoc.y))))))
end;
procedure FreeAll;
begin
SMART_ClearCanvas;
writeln('free');
end;

procedure sleepWhileMoving();
var t:Integer;

begin
t := 0;
while((IsMoving) and (t < 12)) do
begin
sleep(250+random(5))
writeln('Sleeping while moving');
t:=t+1;
end;
end;
{/////////////////////////////by Johnnimms13//////////////////////////////////}
procedure EatPie;
var SPie, HPie, x, y: integer;
begin
if PieLevel > 0 then
begin;

SPie := DTMFromString('mlwAAAHicY2dgYPjIxMDwFoi/I9FfgPgDEL9kZGB4xgih3wPxYyB+B8SPgDhLTxGOK9JMGVJCdRiyovQZov00GPiB5uLCjHgwFAAAE+UTaw==');
HPie := DTMFromString('mlwAAAHicY2dgYDjBxMBwBIhPA/FhID4OxKeA+CIQH2NkYDgJxIegeD8QnwXiI0DsrSDOEKAsCcYZugoMScHaDNEBtgwp4c4M+AAjHgwFALfwEBg=');

if GetSkillInfo('agility', True) < (PieLevel+1) then
begin
writeln('below 91 agility, trying to find pie');
if ExistsItemDTM(spie, x, y) then
begin
writeln('found pie');
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(hpie, x, y) then
begin
writeln('found 1/2 pie');
mouse(x, y, 2, 2, true);
end else
begin
writeln('no pies!')
if PLogOut = True then
begin
logout;
TerminateScript;
end;
end;
end else
begin
writeln('No Pie for you!');
end;
freedtm(SPie);
FreeDtm(HPie);
end;
end;
{//////////////////////////////////////////////////////////////////////////////}
function getLocation(): integer;
var myPos, First, Second, Third, Fourth: TPoint;
begin
result := 0;
if (mmblack = true) then
result := Wfloor()
else
begin
First := Point(2045, 2430); //Beginning Point
Second := Point(2045, 2445); //After swinging the rope
Third := Point(2005, 2460); //After log balancing
Fourth := Point(1940, 2415); //Before running up the wall

myPos := SPS_GetMyPos();

if ((distanceTo(First) <= 5) and (myPos.y < 2435)) then
begin
result:=1;
end;
if (distanceTo(Second) <= 5) then
begin
result:=2;
end;

if (distanceTo(Third) <= 15) then
begin
reRunUpWall := True;
result:=3;
end;

if (reRunUpWall = True) then
result:=3;

if (myPos = Fourth) then
begin
result:=4;
end;
end;
end;
procedure handleObstacle(spot: integer);
begin
SetDTMs;
writeln(spot);
if (spot = 0) then
begin
AntiRandoms;
EatPie;
writeln('Walk to beginning Point(2045, 2430)');
SPS_WalkToPos(Point(2045, 2430));
sleepWhileMoving();
end;

if (spot = 1) then
begin
writeln('Swing on rope');
if FindDTMRotated(Rope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(2300+random(175));
sleepWhileMoving();
Report;
PaintReport;
end;
end;

if (spot = 2) then
begin
writeln('Walk across log balance');
if FindDTMRotated(Log, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(x,y,5,5);
Mouse(x, y, 3, 3, True);
sleep(1900+random(150));
sleepWhileMoving();
end;
end;

if (spot = 3) then
begin
writeln('Run up and jump the plate');
SPS_WalkToPos(Point(1996, 2478));
writeln(SPS_GetMyPos());
if FindDTMRotated(Plate, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(6400+random(150));
sleepWhileMoving();
end;
end;

if (spot = 10) then
begin
if (reRunUpwall = True) then
reRunUpwall := False;
AntiRandoms;
writeln('Climb up Ledge');
if FindDTMRotated(Ledge, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MakeCompass('n');
Mouse(x, y, 0, 0, True);
sleep(3300+random(150));
sleepWhileMoving();
end;
end;
if (spot = 11) then
begin
writeln('Fire Spring Device');
if FindDTMRotated(Launch, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(4300+random(150));
sleepWhileMoving();
end;
end;
if (spot = 12) then
begin
writeln('Cross Balance Beam if Healthy');
If not HPPercent > HP then
begin
logout;
TerminateScript;
end;

if FindDTMRotated(Pole, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2000+random(150));
sleepWhileMoving();
end;
end;
if (spot = 13) then
begin
writeln('Jump over gap');
if not MakeCompass('n') then
begin
MakeCompass('n');
end;
if FindDTMRotated(Gap, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2000+random(150));
sleepWhileMoving();
end;
end;
if (spot = 14) then
begin
AntiRandoms;
writeln('Slide down roof');
if FindDTMRotated(Roof, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(1800+random(150));
sleepWhileMoving();
IncEx(Laps, 1);
PaintReport;
end;
end;
FreeDTMs;
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;
end;
procedure LogMeIn;
begin
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(SERVER);
LoginPlayer;
end;

{//////////////////////////////////Main Loop///////////////////////////////////}
begin

Smart_Server := SERVER;
Smart_Members := True;

SetupSRL;
DeclarePlayers;
SPS_Setup(RUNESCAPE_SURFACE, ['4_5','4_6']);

TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);

AddOnTerminate('FreeAll');
if not(LoggedIn) then
LogMeIn;
while not(LoggedIn) do
sleep(1000);
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
while(true) do //Main loop
begin
while not(LoggedIn) do
LoginPlayer;
handleObstacle(getLocation());
myPos := SPS_GetMyPos();
writeln(Wfloor());
writeln(myPos);
writeln(mmBlack);
end;
end.

Quintessence

2012-02-03 03:15:12

Version 1.031 seems to work pretty decently. No major problems so far except it did seem to have a very delayed reaction to the slide down at one point. The script stood there for about a minute before actually detecting it was on the roof and then clicking to slide down.

Edit: seems to do this every few laps.

Other than that, just the usual issues of the script being slow. I'm currently averaging about 34K experience an hour whereas the Ape Atoll script manages to average at 38K experience an hour and no chance of random events.

imscaredtolosemymain

2012-02-03 04:09:42

Got to say, i have only been here a few weeks, but i love the organic nature of how these scripts get improved on by numerous people :)

On script speed, i am kind of spoiled as i had the perfecticus reflection bot, which was so easy to run and then ran at like 65k/H. This was because it could track the target click points moving during animations (while you were on previous obstacle) so was already clicking when you finished one obstacle.

Why are scripts slow? is it just a function of the colour finding/ dtm finding? Could this be sped up by moving the mouse to a specific area of the screen before looking for the colour/dtm?

G

imscaredtolosemymain

2012-02-03 04:52:43

oh and the half pie dtm is not working - use this one:

DTMFromString('mlwAAAHicY2dgYOAAYkYozcIAATxALATEnFA+M1RMBIiFoeLBKlJAkokhIUibIUBZEsyGYX4giQsz4sFQAAD5DgL1');       

G

Hoppers

2012-02-03 09:42:57

I've been running this I'm 95 agility and ape toll was too slow, I'm going to get 99 now :D brilliant work mate well done *pat on the back* :)

plekter

2012-02-03 09:57:34

I am not sure whats the problem but it just does not do the last Slide Down Roof. I downloaded the v103. I will test the older version.

// Just tested the older version too. Everything runs fine until the last obsticle(slide down roof). It just gets stuck in a loop it seems somewhere.

"…14
(1895, 2070)
True
14
Slide down roof
…"

Spamming the upper stuff over and over.

EDIT 2// I let it run a bit and approx. after 2 minutes it got over the obsticle and continued the race. Now its back there waiting.


l337murd3r

2012-02-03 10:58:17

dam guys this script is lookin good! im 99 agility already or id be usin this!

JN13

2012-02-03 11:54:49

From: imscaredtolosemymain
Got to say, i have only been here a few weeks, but i love the organic nature of how these scripts get improved on by numerous people :)

On script speed, i am kind of spoiled as i had the perfecticus reflection bot, which was so easy to run and then ran at like 65k/H. This was because it could track the target click points moving during animations (while you were on previous obstacle) so was already clicking when you finished one obstacle.

Why are scripts slow? is it just a function of the colour finding/ dtm finding? Could this be sped up by moving the mouse to a specific area of the screen before looking for the colour/dtm?

G


Yes, The script detects the position with the black space but it takes quite a while to do it! I'm in the process of speeding it up. there are actually only about 4 Actual clicks in the whole thing. The rest can be blind clicking its just getting the failsafes when they fail right :) This Script is slow, but a tank. in its current state it works everywhere. I'm going to remove the DTM of the Roof and the Gap, so it will quit hovering.

Failed4life

2012-02-03 15:10:00

v1.031 is out! Bugs Fixed! Please Update to Newest Version!

Mink

2012-02-03 15:15:58

excited to test once i get 94 agility on my main(100% chance no falls)

Failed4life

2012-02-03 15:43:28

From: Mink
excited to test once i get 94 agility on my main(100% chance no falls)

93+ is no chance of failing :)

Failed4life

2012-02-03 15:57:19

v1.031 is having problems! Please revert back to 1.03!

InHuman

2012-02-04 12:11:19

so, is this stable enough to run to get my 99? :)

JN13

2012-02-04 12:47:02

not quite yet… I'm working on it tho :)

AZsFinest

2012-02-04 12:47:52

THANKS, I'm currently 85 agility.. I'll post a proggy soon.

Destined2bGreat

2012-02-05 14:53:06

I'd love to know how you plan on doing that when you can't even use the course. I'd try this out if I wasn't 70k form 99 =\ Had been looking for this before.

Quintessence

2012-02-05 17:49:47

From: Destined2bGreat
I'd love to know how you plan on doing that when you can't even use the course. I'd try this out if I wasn't 70k form 99 =\ Had been looking for this before.


Summer pies.

Technologic

2012-02-05 18:09:59

Very slow.

JN13

2012-02-05 23:10:43

From: Technologic
Very slow.



I'm working on a complete rewrite, probably have it stable in a week.

FayBro

2012-02-06 16:48:06

Im new to this site, and im seeing so many great scripts! but how do i download them? please reply shortly. (: -FayBro

rice

2012-02-06 18:06:57

From: FayBro
Im new to this site, and im seeing so many great scripts! but how do i download them? please reply shortly. (: -FayBro


all you do is download the Simba program copy paste script, fill in the blanks, then hit run

Reinier

2012-02-06 18:14:34

From: FayBro
Im new to this site, and im seeing so many great scripts! but how do i download them? please reply shortly. (: -FayBro


Go to faq.

I Bot Phats

2012-02-07 00:09:55

Looks like a good script, will definitely use this after I get herby done

Andres

2012-02-07 00:56:07

I'm currently training agility using the RyGuy's Ape Atoll script. I'm 87 so I can use pies to boost 90.

I'm going to stick with RyGuy's for now (at least one or two levels) and then switch over. In the meantime, please let me know if you'd like me to help in anyway. I can't script, but I can do testing if you need it!

firevenge007

2012-02-07 11:24:45

I keep having problems with the ledge at the end.
Last night it was smooth as butter, and did everything, but as i logged on today and tried doing it, it would never go on the ledge.

kumatora

2012-02-07 12:20:02

From: firevenge007
I keep having problems with the ledge at the end.
Last night it was smooth as butter, and did everything, but as i logged on today and tried doing it, it would never go on the ledge.


I have the same problem since the patch today, takes a few minutes to go over the last ledge, sometimes it finds it eventually, sometimes it just times out, immediately logs back in and finds the ledge, usually. Otherwise this is perfect, running 6 or 7 hours without fail.

edit: Another thing I've noticed, that started today. Sometime's it clicks on the right-most rope swing, instead of the left one like normal, and then just goes back to the start and begins the lap again.

firevenge007

2012-02-08 01:01:36

From: kumatora
I have the same problem since the patch today, takes a few minutes to go over the last ledge, sometimes it finds it eventually, sometimes it just times out, immediately logs back in and finds the ledge, usually. Otherwise this is perfect, running 6 or 7 hours without fail.

edit: Another thing I've noticed, that started today. Sometime's it clicks on the right-most rope swing, instead of the left one like normal, and then just goes back to the start and begins the lap again.

how did you run it for so long? I get caught after 1-2 hours eventually because of the random events.:mad:

newy1

2012-02-09 18:18:56

It Swings the rope twice :/
Edit: Now it keeps swinging the rope nonstop.

14
Slide down roof
99
(2015, 2430)
False
0
Walk to beginning Point(2045, 2430)
99
(2045, 2425)
False
1
Swing on rope
Time: 26 Minutes and 58 Seconds
We have gained 39688366 Agility Experience!
We are gaining 714676 Agility Experience per Hour!
99
(2050, 2425)
False
0
Walk to beginning Point(2045, 2430)
99
(2035, 2440)
False
0
Walk to beginning Point(2045, 2430)
99
(2045, 2425)
False
1
Swing on rope
Time: 27 Minutes and 15 Seconds
We have gained 39688388 Agility Experience!
We are gaining 707216 Agility Experience per Hour!
99
(2050, 2445)
False
2
Walk across log balance

Technologic

2012-02-10 10:08:41

From: johnnimms13
I'm working on a complete rewrite, probably have it stable in a week.


Its stable but 15-20k an hour at this course is not optimalish.

exilednoob

2012-02-10 13:19:51

From: Technologic
Its stable but 15-20k an hour at this course is not optimalish.




hopefully its done soon. i can use me some agility exp

Andres

2012-02-10 14:26:16

I mostly need it for the 200 laps I have left to get my Agile Top and finish the Frem Elite Tasks.

InHuman

2012-02-11 19:25:04

this shit working or broke?

JN13

2012-02-12 00:01:29

Ok, I overhauled it but it still needs work. I raised it by about 10k exp, but it still runs around 39-45k exp/hr. Realistically without OGL or a miracle its hard to make it faster :mad:

So here it is:
P.S. It still gets stuck on the ledge, I have plans to fix it, but this is all I have for now.

program AdvanceBarbarianAgility;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Developer Log:

Original Author: Anyhow
Rewritten by: Failed4life
Johnnimms13

A hattip to [Nathan] for his skeleton of this script
--------------------------------------------------------------------------------
Version History:

0: Original by Anyhow
v1.0 - Initial Release
v1.01 - DTMs added, antiban fixed
v1.02 - Progress Report added! Thanks RyGuy for the help :)
v1.021 - Pie Support Added!
v1.022 - Bug fixes and SMART Paint added
v1.023 - New gap DMT, Pie Toggle Switch added
v1.03 - Customizable Hp checker, logs out if Hp is low
v1.031 - Bug Fixes
v1.4 - overhaul
-------------------------------------------------------------------------------

Instructions:
Use the Setup and position your player in the agility course by the ropes.

If you wish to use Summer Pies to boost your Agility level, have them in your
inventory.

Note: This Script requires atleast 85 agility to run with boosts, 90 to run
Without boosts, and 93+ to run without mistakes.

---------------------------------------SETUP-----------------------------------}
const
//User Options
SERVER = 23; //Replace with desired server number
Username = ''; //Enter your Username
Password = ''; //Enter your Password
Nickname = ''; //Enter 3-4 digits of your Username
ar = 0; //AntiRandom switch (0 = off, 1 = on)
PieLevel = 0; //What level would u like to eat a summer pie at? (0 to disable)
PLogOut = False; //True logs out when summer pies are gone
HP = 20; //LogsOut if below this percentage of HP

var
x,y:LongInt;
TimeBegan, Exp, ExpHr,
StartingXP:Integer;
aFound:Extended;
myPos: TPoint;
DTM: array [0..8] of integer;
PieGo: Boolean;

procedure AntiBan;
begin
if not(LoggedIn)then
Exit;
case 300 of
0: HoverSkill('Agility', false);
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
procedure SetDTMs;
begin
DTM[0] := DTMFromString('mlwAAAHicY2dgYFjNyMAwF4h3MELYa4B4HxBPA+ImIK6D4i6oGIhdD8RaqrwMlYWxYGygzc+gq8EH5/MDzcWFGfFgKAAA+1wPEQ==');
DTM[1] := DTMFromString('m6wAAAHic42ZgYMhgZGBIZ4TQAUAcBMTNQFwBxIFQ2hGKZwLxciCeAMTrgLgdiFcDcQcQzwbiGUC8Foi7gbi/qZohNFSKwd9PgiEq0IYhyV+bIT1IlyE91oXB1VANTKcXdTHU96xk4Ae6g1jMRAJGAgB2cRcQ');
DTM[2] := DTMFromString('mFQEAAHic42VgYHgHxHuB+AQjA8NnIF4OxP+B/GdA/BmIpYB8ASC+AsQXgPgfUKwOSIsBsSAQOwPxU6DYWyB2ALK9gDgLiKuAmAuIDYCYGYj93E0YEnxMGSrblzDkVk1mcDFUY8hL8WQIsJVgiA62ZQh1lGLwc1JiaOpbwZBZ3MVQkRvAwA80k1TMSAZGAQACvBzJ');
DTM[3] := DTMFromString('mkwEAAHicE2ZgYKhhZGAoBuIiIC4E4gJGiFg7EHdAcRuUDxKPB+J6IF4OxIlAXAfE04F4IxBrAbEVEOsAsQwQCwCxMJSWBmJVINaDqjEEYk8g9oZiFiD+BXQPO5AWAuKqJBeGzjxfhuIYB4byeCeG2TXhDPPrIxlmVocxlMY6MlQkOINxd74fWK2/owQYh7pJMQTbSzL4WIkzxIXagzE/0FxqYSYqYiwAAPEbInA=');
DTM[4] := DTMFromString('mKgEAAHic42NgYPBnZGB4CKQFgbQbEMcBcQ0QLwTidUC8CohXAvFMIM4BYjsg/g1U/xqIbYBsDyAOA+IyII4C4mAgtgdifiB+B1RzBIj3APECIJ4PxCkBFgzBbnoM6UGWDFEeRgz+NhIMMZ7GDMHOKgxJkU4MSd5yDHEesgyhjlJgfHx5PsOBhdkM/4F6+cnATGRiVAAA+zEdZw==');
DTM[5] := DTMFromString('mrAAAAHic42BgYDBiZGBQBGInIA4EYl4gNgBiLSC2AuI2IO4E4g4gngPEs4B4GRCXQPHzhycYGnI8GFryvRh2bN3AMLs5nOHlo5MMp1cVMhxclMPwH2gHPx7MSADDAACXeBZH');
DTM[6] := DTMFromString('m6wAAAHic42ZgYNjOyMCwD4i3AfE5IL4BxK+BeC4QLwDiaiCuA+I5QHwcqu42EO8G4ptAfAKITwLxZiDuAeL7QPwMiPMSvBi8rcQZoj01GAJsJcF0fUEoQ7i/M4ONqQbD788rGQqi7MGYH+gOYjEjCRgJAAB0PRxC');
DTM[7] := DTMFromString('mrAAAAHic42BgYLBgZGBwg2IjIDYEYhUgDgdiaSA+CVRzB4i3AvEbIN4ExK+A+AQQHwPiIA9zhqQgc4boYDeGJC9thgw/PYbG+hqGtFg/hkgXGQYRoBp8mJEAhgEA+WsQlw==');
DTM[8] := DTMFromString('m6wAAAHic42ZgYLjPyMCgzMTAIA3E54DsXUB8FYgPAPEdIH4CxPuB+AgQ1wDxHiDOAOJOIG4H4iwgTgHiBUAcDcTWQLwYiJ1sjBlC3Q0YYkLcGZysdFAwSCwuyJ7h4KJchu2z0hn4ge4gFjOSgJEAAMpXGCo=');
end;
Procedure FreeDTMs;
begin
FreeDTM(DTM[0]);
FreeDTM(DTM[1]);
FreeDTM(DTM[2]);
FreeDTM(DTM[3]);
FreeDTM(DTM[4]);
FreeDTM(DTM[5]);
FreeDTM(DTM[6]);
FreeDTM(DTM[7]);
FreeDTM(DTM[8]);
end;
{///////////////////////////////by RyGay///////////////////////////////////////}
procedure Report;
var
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 AntiRandoms;
begin
if ((not LoggedIn) or (ar = 0)) then Exit;
FindNormalRandoms; // find random events
end;

function Wfloor:Integer;

begin
result:= 99;

if((FindColorTolerance(x,y,2247007,633,56,633,56,15) or
FindColorTolerance(x,y,2247007,629,52,629,52,15) or
FindColorTolerance(x,y,2247007,628,60,628,60,15) or
FindColorTolerance(x,y,2247007,634,51,634,51,15) or
FindColorTolerance(x,y,2247007,633,60,633,60,15) or
FindColorTolerance(x,y,2247007,629,49,629,49,15)) and
FindColorTolerance(x,y,395009,634,84,634,84,15) and
(PercentBlackMM > 95)) then
result:= 10;

if((FindColorTolerance(x,y,1655633,615,84,615,84,15) or
FindColorTolerance(x,y,1521998,621,57,621,57,15)) and
(PercentBlackMM > 95)) then
result:= 11;

if((FindColorTolerance(x,y,1853268,630,113,630,113,15) or
FindColorTolerance(x,y,1853268,636,116,636,116,15)) and (PercentBlackMM > 95)) then
result:= 12;

if(FindColorTolerance(x,y,4873321,530,184,530,184,15) and (PercentBlackMM > 95)) then
result:= 13;

if((FindColorTolerance(x,y,2180188,621,113,621,113,15) or
FindColorTolerance(x,y,2180188,625,114,625,114,15) or
FindColorTolerance(x,y,2180188,627,112,627,112,15) or
FindColorTolerance(x,y,2180188,622,113,622,113,15)) and
FindColorTolerance(x,y,393218,643,114,643,114,15) and
FindColorTolerance(x,y,393218,632,114,632,114,15) and
not(FindColorTolerance(x,y,4873321,530,184,530,184,15))and
(PercentBlackMM > 95)) then
result:= 14;

end;

function distanceTo(var point:TPoint): Extended;
var myLoc:TPoint;
begin
myLoc:= SPS_GetMyPos();
Result:= Distance(point.x, point.y, myLoc.x, myLoc.y);
end;

procedure sleepWhileMoving();
var t:Integer;

begin
t := 0;
while((IsMoving) and (t < 12)) do
begin
writeLn('Sleeping'+tostr(t));
sleep(350+random(5))
t:=t+1;
end;
end;
{/////////////////////////////by Johnnimms13//////////////////////////////////}
procedure EatPie;
var SPie, HPie, x, y: integer;
begin
if PieGo then
begin
if PieLevel > 0 then
begin

SPie := DTMFromString('mlwAAAHicY2dgYPjIxMDwFoi/I9FfgPgDEL9kZGB4xgih3wPxYyB+B8SPgDhLTxGOK9JMGVJCdRiyovQZov00GPiB5uLCjHgwFAAAE+UTaw==');
HPie := DTMFromString('mggAAAHicY2NgYHBhYmAwB2JHIHYCYmsg9gTiB0C5R0D8AojvAPFdIH4MxGGqUgyZkXoMEb7WDLkJtgwJQVoM5Rn+DPxAOWyYEQeGAAAW8Qy0');

if GetSkillInfo('agility', True) < (PieLevel+1) then
begin
writeln('below 91 agility, trying to find pie');
if ExistsItemDTM(spie, x, y) then
begin
writeln('found pie');
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(hpie, x, y) then
begin
writeln('found 1/2 pie');
mouse(x, y, 2, 2, true);
end else
begin
writeln('no pies!')
if PLogOut = True then
begin
logout;
TerminateScript;
end;
end;
end else
begin
writeln('No Pie for you!');
end;
freedtm(SPie);
FreeDtm(HPie);
end;
PieGo := False;
end;
end;
{//////////////////////////////////////////////////////////////////////////////}
function getLocation(): integer;
var First, Second, Third, Fourth: TPoint;
begin
result := 0;
if (PercentBlackMM > 96) then
result := Wfloor()
else
begin
First := Point(2045, 2430); //Beginning Point
Second := Point(2045, 2445); //After swinging the rope
Third := Point(2005, 2460); //After log balancing
Fourth := Point(1995, 2475); //Before running up the wall


if ((distanceTo(First) <= 5) and (myPos.y < 2435)) then
begin
result:=1;
exit;
end;
if (distanceTo(Second) <= 5) then
begin
result:=2;
exit;
end;

if (distanceTo(Third) <= 10) then
begin
result:=3;
exit;
end;

if (distanceTo(Fourth) <= 10) then
begin
result:=4;
exit;
end;
end;
end;
procedure handleObstacle(spot: integer);
begin
SetDTMs;
case spot of

0:
begin
AntiRandoms;
EatPie;
writeln('Walk to beginning Point(2045, 2430)');
SPS_WalkToPos(Point(2045, 2430));
sleepWhileMoving();
end;

1:
begin
writeln('rope');
if FindDTMRotated(DTM[0], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(2300+random(175));
sleepWhileMoving();
Report;
end;
end;

2:
begin
writeln('log');
if FindDTMRotated(DTM[1], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(x,y,5,5);
Mouse(x, y, 3, 3, True);
sleep(1900+random(150));
sleepWhileMoving();
end;
end;

3:
begin
writeln('Walking To plate');
if FindDTMRotated(DTM[2], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(800+random(150));
sleepWhileMoving();
end;
end;

4:
begin
WriteLn('hitting plate');
if FindDTMRotated(DTM[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(5500+random(150));
sleepWhileMoving();
end;
end;

10:
begin
MMouse(205, 120, 3, 3);
writeln('Climb up Ledge');
if isUptextEx('all') then
begin
ClickMouse2(true);
sleep(3300+random(150));
sleepWhileMoving();
end
end;

11:
begin
mmouse( 142, 177, 3, 3);
writeln('Fire the Springy Thingy!');
if isuptext('pring') then
begin
clickmouse2(true);
sleep(4300+random(150));
sleepWhileMoving();
end;
end;

12:
begin
writeln('Pole');
if FindDTMRotated(DTM[6], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2500+random(150));
sleepWhileMoving();
end;
end;

13:
begin
writeln('Gap');
MMouse(267, 176, 2, 2);
if isUptextEx('ump') then
begin
ClickMouse2(True);
wait(3000+random(100));
end;
end;

14:
begin
WriteLn('WEEEEEE!');
MMouse(330, 178, 2, 2);
if isUptextEx('oof') then
begin
ClickMouse2(True);
Sleep(1300 + random(200));
wait(2500+random(100));;
PieGo := True;
end;
end;
end;
FreeDTMs;
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;
end;
procedure LogMeIn;
begin
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(SERVER);
LoginPlayer;
end;

{//////////////////////////////////Main Loop///////////////////////////////////}
begin

Smart_Server := SERVER;
Smart_Members := True;

SetupSRL;
DeclarePlayers;
SPS_Setup(RUNESCAPE_SURFACE, ['4_5','4_6']);

TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);

if not(LoggedIn) then
LogMeIn;
while not(LoggedIn) do
sleep(1000);
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
while(true) do //Main loop
begin
while not(LoggedIn) do
LoginPlayer;
handleObstacle(getLocation());
myPos := SPS_GetMyPos();
// writeln(Wfloor());
// writeln(myPos);
end;
end.

Reinier

2012-02-12 08:27:46

From: johnnimms13
Ok, I overhauled it but it still needs work. I raised it by about 10k exp, but it still runs around 39-45k exp/hr. Realistically without OGL or a miracle its hard to make it faster :mad:

So here it is:
P.S. It still gets stuck on the ledge, I have plans to fix it, but this is all I have for now.

program AdvanceBarbarianAgility;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Developer Log:

Original Author: Anyhow
Rewritten by: Failed4life
Johnnimms13

A hattip to [Nathan] for his skeleton of this script
--------------------------------------------------------------------------------
Version History:

0: Original by Anyhow
v1.0 - Initial Release
v1.01 - DTMs added, antiban fixed
v1.02 - Progress Report added! Thanks RyGuy for the help :)
v1.021 - Pie Support Added!
v1.022 - Bug fixes and SMART Paint added
v1.023 - New gap DMT, Pie Toggle Switch added
v1.03 - Customizable Hp checker, logs out if Hp is low
v1.031 - Bug Fixes
v1.4 - overhaul
-------------------------------------------------------------------------------

Instructions:
Use the Setup and position your player in the agility course by the ropes.

If you wish to use Summer Pies to boost your Agility level, have them in your
inventory.

Note: This Script requires atleast 85 agility to run with boosts, 90 to run
Without boosts, and 93+ to run without mistakes.

---------------------------------------SETUP-----------------------------------}
const
//User Options
SERVER = 23; //Replace with desired server number
Username = ''; //Enter your Username
Password = ''; //Enter your Password
Nickname = ''; //Enter 3-4 digits of your Username
ar = 0; //AntiRandom switch (0 = off, 1 = on)
PieLevel = 0; //What level would u like to eat a summer pie at? (0 to disable)
PLogOut = False; //True logs out when summer pies are gone
HP = 20; //LogsOut if below this percentage of HP

var
x,y:LongInt;
TimeBegan, Exp, ExpHr,
StartingXP:Integer;
aFound:Extended;
myPos: TPoint;
DTM: array [0..8] of integer;
PieGo: Boolean;

procedure AntiBan;
begin
if not(LoggedIn)then
Exit;
case 300 of
0: HoverSkill('Agility', false);
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
procedure SetDTMs;
begin
DTM[0] := DTMFromString('mlwAAAHicY2dgYFjNyMAwF4h3MELYa4B4HxBPA+ImIK6D4i6oGIhdD8RaqrwMlYWxYGygzc+gq8EH5/MDzcWFGfFgKAAA+1wPEQ==');
DTM[1] := DTMFromString('m6wAAAHic42ZgYMhgZGBIZ4TQAUAcBMTNQFwBxIFQ2hGKZwLxciCeAMTrgLgdiFcDcQcQzwbiGUC8Foi7gbi/qZohNFSKwd9PgiEq0IYhyV+bIT1IlyE91oXB1VANTKcXdTHU96xk4Ae6g1jMRAJGAgB2cRcQ');
DTM[2] := DTMFromString('mFQEAAHic42VgYHgHxHuB+AQjA8NnIF4OxP+B/GdA/BmIpYB8ASC+AsQXgPgfUKwOSIsBsSAQOwPxU6DYWyB2ALK9gDgLiKuAmAuIDYCYGYj93E0YEnxMGSrblzDkVk1mcDFUY8hL8WQIsJVgiA62ZQh1lGLwc1JiaOpbwZBZ3MVQkRvAwA80k1TMSAZGAQACvBzJ');
DTM[3] := DTMFromString('mkwEAAHicE2ZgYKhhZGAoBuIiIC4E4gJGiFg7EHdAcRuUDxKPB+J6IF4OxIlAXAfE04F4IxBrAbEVEOsAsQwQCwCxMJSWBmJVINaDqjEEYk8g9oZiFiD+BXQPO5AWAuKqJBeGzjxfhuIYB4byeCeG2TXhDPPrIxlmVocxlMY6MlQkOINxd74fWK2/owQYh7pJMQTbSzL4WIkzxIXagzE/0FxqYSYqYiwAAPEbInA=');
DTM[4] := DTMFromString('mKgEAAHic42NgYPBnZGB4CKQFgbQbEMcBcQ0QLwTidUC8CohXAvFMIM4BYjsg/g1U/xqIbYBsDyAOA+IyII4C4mAgtgdifiB+B1RzBIj3APECIJ4PxCkBFgzBbnoM6UGWDFEeRgz+NhIMMZ7GDMHOKgxJkU4MSd5yDHEesgyhjlJgfHx5PsOBhdkM/4F6+cnATGRiVAAA+zEdZw==');
DTM[5] := DTMFromString('mrAAAAHic42BgYDBiZGBQBGInIA4EYl4gNgBiLSC2AuI2IO4E4g4gngPEs4B4GRCXQPHzhycYGnI8GFryvRh2bN3AMLs5nOHlo5MMp1cVMhxclMPwH2gHPx7MSADDAACXeBZH');
DTM[6] := DTMFromString('m6wAAAHic42ZgYNjOyMCwD4i3AfE5IL4BxK+BeC4QLwDiaiCuA+I5QHwcqu42EO8G4ptAfAKITwLxZiDuAeL7QPwMiPMSvBi8rcQZoj01GAJsJcF0fUEoQ7i/M4ONqQbD788rGQqi7MGYH+gOYjEjCRgJAAB0PRxC');
DTM[7] := DTMFromString('mrAAAAHic42BgYLBgZGBwg2IjIDYEYhUgDgdiaSA+CVRzB4i3AvEbIN4ExK+A+AQQHwPiIA9zhqQgc4boYDeGJC9thgw/PYbG+hqGtFg/hkgXGQYRoBp8mJEAhgEA+WsQlw==');
DTM[8] := DTMFromString('m6wAAAHic42ZgYLjPyMCgzMTAIA3E54DsXUB8FYgPAPEdIH4CxPuB+AgQ1wDxHiDOAOJOIG4H4iwgTgHiBUAcDcTWQLwYiJ1sjBlC3Q0YYkLcGZysdFAwSCwuyJ7h4KJchu2z0hn4ge4gFjOSgJEAAMpXGCo=');
end;
Procedure FreeDTMs;
begin
FreeDTM(DTM[0]);
FreeDTM(DTM[1]);
FreeDTM(DTM[2]);
FreeDTM(DTM[3]);
FreeDTM(DTM[4]);
FreeDTM(DTM[5]);
FreeDTM(DTM[6]);
FreeDTM(DTM[7]);
FreeDTM(DTM[8]);
end;
{///////////////////////////////by RyGay///////////////////////////////////////}
procedure Report;
var
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 AntiRandoms;
begin
if ((not LoggedIn) or (ar = 0)) then Exit;
FindNormalRandoms; // find random events
end;

function Wfloor:Integer;

begin
result:= 99;

if((FindColorTolerance(x,y,2247007,633,56,633,56,15) or
FindColorTolerance(x,y,2247007,629,52,629,52,15) or
FindColorTolerance(x,y,2247007,628,60,628,60,15) or
FindColorTolerance(x,y,2247007,634,51,634,51,15) or
FindColorTolerance(x,y,2247007,633,60,633,60,15) or
FindColorTolerance(x,y,2247007,629,49,629,49,15)) and
FindColorTolerance(x,y,395009,634,84,634,84,15) and
(PercentBlackMM > 95)) then
result:= 10;

if((FindColorTolerance(x,y,1655633,615,84,615,84,15) or
FindColorTolerance(x,y,1521998,621,57,621,57,15)) and
(PercentBlackMM > 95)) then
result:= 11;

if((FindColorTolerance(x,y,1853268,630,113,630,113,15) or
FindColorTolerance(x,y,1853268,636,116,636,116,15)) and (PercentBlackMM > 95)) then
result:= 12;

if(FindColorTolerance(x,y,4873321,530,184,530,184,15) and (PercentBlackMM > 95)) then
result:= 13;

if((FindColorTolerance(x,y,2180188,621,113,621,113,15) or
FindColorTolerance(x,y,2180188,625,114,625,114,15) or
FindColorTolerance(x,y,2180188,627,112,627,112,15) or
FindColorTolerance(x,y,2180188,622,113,622,113,15)) and
FindColorTolerance(x,y,393218,643,114,643,114,15) and
FindColorTolerance(x,y,393218,632,114,632,114,15) and
not(FindColorTolerance(x,y,4873321,530,184,530,184,15))and
(PercentBlackMM > 95)) then
result:= 14;

end;

function distanceTo(var point:TPoint): Extended;
var myLoc:TPoint;
begin
myLoc:= SPS_GetMyPos();
Result:= Distance(point.x, point.y, myLoc.x, myLoc.y);
end;

procedure sleepWhileMoving();
var t:Integer;

begin
t := 0;
while((IsMoving) and (t < 12)) do
begin
writeLn('Sleeping'+tostr(t));
sleep(350+random(5))
t:=t+1;
end;
end;
{/////////////////////////////by Johnnimms13//////////////////////////////////}
procedure EatPie;
var SPie, HPie, x, y: integer;
begin
if PieGo then
begin
if PieLevel > 0 then
begin

SPie := DTMFromString('mlwAAAHicY2dgYPjIxMDwFoi/I9FfgPgDEL9kZGB4xgih3wPxYyB+B8SPgDhLTxGOK9JMGVJCdRiyovQZov00GPiB5uLCjHgwFAAAE+UTaw==');
HPie := DTMFromString('mggAAAHicY2NgYHBhYmAwB2JHIHYCYmsg9gTiB0C5R0D8AojvAPFdIH4MxGGqUgyZkXoMEb7WDLkJtgwJQVoM5Rn+DPxAOWyYEQeGAAAW8Qy0');

if GetSkillInfo('agility', True) < (PieLevel+1) then
begin
writeln('below 91 agility, trying to find pie');
if ExistsItemDTM(spie, x, y) then
begin
writeln('found pie');
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(hpie, x, y) then
begin
writeln('found 1/2 pie');
mouse(x, y, 2, 2, true);
end else
begin
writeln('no pies!')
if PLogOut = True then
begin
logout;
TerminateScript;
end;
end;
end else
begin
writeln('No Pie for you!');
end;
freedtm(SPie);
FreeDtm(HPie);
end;
PieGo := False;
end;
end;
{//////////////////////////////////////////////////////////////////////////////}
function getLocation(): integer;
var First, Second, Third, Fourth: TPoint;
begin
result := 0;
if (PercentBlackMM > 96) then
result := Wfloor()
else
begin
First := Point(2045, 2430); //Beginning Point
Second := Point(2045, 2445); //After swinging the rope
Third := Point(2005, 2460); //After log balancing
Fourth := Point(1995, 2475); //Before running up the wall


if ((distanceTo(First) <= 5) and (myPos.y < 2435)) then
begin
result:=1;
exit;
end;
if (distanceTo(Second) <= 5) then
begin
result:=2;
exit;
end;

if (distanceTo(Third) <= 10) then
begin
result:=3;
exit;
end;

if (distanceTo(Fourth) <= 10) then
begin
result:=4;
exit;
end;
end;
end;
procedure handleObstacle(spot: integer);
begin
SetDTMs;
case spot of

0:
begin
AntiRandoms;
EatPie;
writeln('Walk to beginning Point(2045, 2430)');
SPS_WalkToPos(Point(2045, 2430));
sleepWhileMoving();
end;

1:
begin
writeln('rope');
if FindDTMRotated(DTM[0], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(2300+random(175));
sleepWhileMoving();
Report;
end;
end;

2:
begin
writeln('log');
if FindDTMRotated(DTM[1], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(x,y,5,5);
Mouse(x, y, 3, 3, True);
sleep(1900+random(150));
sleepWhileMoving();
end;
end;

3:
begin
writeln('Walking To plate');
if FindDTMRotated(DTM[2], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(800+random(150));
sleepWhileMoving();
end;
end;

4:
begin
WriteLn('hitting plate');
if FindDTMRotated(DTM[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
sleep(5500+random(150));
sleepWhileMoving();
end;
end;

10:
begin
MMouse(205, 120, 3, 3);
writeln('Climb up Ledge');
if isUptextEx('all') then
begin
ClickMouse2(true);
sleep(3300+random(150));
sleepWhileMoving();
end
end;

11:
begin
mmouse( 142, 177, 3, 3);
writeln('Fire the Springy Thingy!');
if isuptext('pring') then
begin
clickmouse2(true);
sleep(4300+random(150));
sleepWhileMoving();
end;
end;

12:
begin
writeln('Pole');
if FindDTMRotated(DTM[6], x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 0, 0, True);
sleep(2500+random(150));
sleepWhileMoving();
end;
end;

13:
begin
writeln('Gap');
MMouse(267, 176, 2, 2);
if isUptextEx('ump') then
begin
ClickMouse2(True);
wait(3000+random(100));
end;
end;

14:
begin
WriteLn('WEEEEEE!');
MMouse(330, 178, 2, 2);
if isUptextEx('oof') then
begin
ClickMouse2(True);
Sleep(1300 + random(200));
wait(2500+random(100));;
PieGo := True;
end;
end;
end;
FreeDTMs;
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;
end;
procedure LogMeIn;
begin
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(SERVER);
LoginPlayer;
end;

{//////////////////////////////////Main Loop///////////////////////////////////}
begin

Smart_Server := SERVER;
Smart_Members := True;

SetupSRL;
DeclarePlayers;
SPS_Setup(RUNESCAPE_SURFACE, ['4_5','4_6']);

TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);

if not(LoggedIn) then
LogMeIn;
while not(LoggedIn) do
sleep(1000);
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
while(true) do //Main loop
begin
while not(LoggedIn) do
LoginPlayer;
handleObstacle(getLocation());
myPos := SPS_GetMyPos();
// writeln(Wfloor());
// writeln(myPos);
end;
end.


So far so good :D, though can you make it faster when it is trying to climb up the wall? it clicks, but clicks wrong then it stands there for 5 seconds and then it clicks and it climbs up, every lap.
Best version I had so far :D.

newy1

2012-02-13 08:10:45

Unable to get it started any more.

JN13

2012-02-13 11:49:52

From: newy1
Unable to get it started any more.


Can u be more specific? Like what does the Debug say?:confused:

newy1

2012-02-13 12:45:21

From: johnnimms13
Can u be more specific? Like what does the Debug say?:confused:


Couldn't load Smart. I'm running other scripts too only this script was having the problem. But it's working now.

Technologic

2012-02-13 15:51:44

Stuck on last obstacle.

Magicjerk

2012-02-14 22:42:52

Exception in Script: Unable to find file 'SRL/SRL/misc/SMART.simba' used from ''


says this when i try to run it….what do i do?

JN13

2012-02-16 12:11:58

News: Failed4Life has given me authorization to take over this thread. I plan on moving it to another one soon!

Reinier

2012-02-16 14:04:19

From: johnnimms13
News: Failed4Life has given me authorization to take over this thread. I plan on moving it to another one soon!


Cool, how do you mean moving it to another one?
And what are your future updates on the script?

JN13

2012-02-16 14:21:06

The script needs to be really lean to be fast enough to look human. I plan on speed increases, more options for food, and basic upkeep. But for now, I'm going to enter into Sin's competition with another script ive been working on…

Sir R. M8gic1an

2012-02-16 14:32:44

Closed on request.

-RM