Simba Code:
program ApeAtoll;
//////////////////////////WRITTEN BY RYGUY//////////////////////////////
////////////////////////////VERSION 1.5////////////////////////////////
{$DEFINE SMART}
{$DEFINE SRL5}
{$i SRL/srl.simba}
var
x, y, Stone, Tree1, Bars, Fell, Slope, TopOfSlope,
ToSwingMM, Swing, Tree2, BottomOfSwing, ToStoneMM,
TimeBegan, StartingXP, TimesFailed, PickIt, CutIt,
EatIt, FromPineapple, Stone2, Tree2two: integer;
aFound: extended;
///////////////////////////PLAYER SETUP//////////////////////////////////
const
EatAt = 100; //HP to eat at. Set to 0 to disable.
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
Stone := DTMFromString('mwQAAAHic42RgYNBmhGB9INYCYnUgFgNiNSC2AWIdoJptQLwZiHcA8S4o/zAQnwLiM0BcC8QpUToMaTG6DBlxegyhPmpg3NC7iqG2eyVD66S1DHkZhgxcQHXoWAQNA61kYCKA4QAAp4oTFA==');
Stone2 := DTMFromString('mrAAAAHic42BgYNBkZGDQBWJVIJYCYmUg1gdiSxANlN8CxDuAeCsQ7wXiY0B8AogPA3EFEIuJiTNEB2mCcUXbEoaGvjUM1V1LGZr7VjEUZBkxcAHVwLAIFgy0hoEJD4YBAO33EVM=');
Tree1 := DTMFromString('mggAAAHicY2NgYJBkgABFIFYFYjkoWxyIOaFyIDXyQCwAxFmh+gyvPnxnCHVQZegttGPICzZgiHJWZ+ABymHDjDgwBAAAebwIxQ==');
Bars := DTMFromString('mggAAAHicY2NgYNBgZGBwBGIpKOYEYlkgjgfKpQNxGhA3MUD4ukDcUeTL4GWnxRDsps/g56TDUNE6nyEqTo6BCyiHjEWgGGgUAzMWDAEAytEJWQ==');
Fell := DTMFromString('mggAAAHicY2NgYMhmYmBoA2I/IM4C4iQgrgDiaUC5SUBcA8T1QFwNxJVAHGXIzqAcIcjgaSXI0DFxFhxzAeVgmB8JMwIxExYMAQALBAzO');
Slope := DTMFromString('m6wAAAHic42ZgYChmgIByIC4E4jIonQPEc4B4AhB3AHEtEMsBcSoQm0D1qAKxBBArAbEwEPMCsTgQC4HMyTJhqOtZyeBlr8AQ46fBEBMtw5CRrsCQlCjHkJNkwJARpwdWU5FjysADVC8CxPxImAcHZgRiViBmQsIsODASAABpuxIH');
TopOfSlope := DTMFromString('mbQAAAHicY2VgYAhnZGBIB+JqIO4G4ttAXAAUzwTiFCCOB2JfIA7wsmWIDnVjCPF3BOPkMlUGVqA4MuYHYhY0DDQOAgCYLAla');
ToSwingMM := DTMFromString('mQwAAAHicY2ZgYOBjgAAYzQXEHEDc0DWTQSFMjCE2tYiBB8iHYUYkDAQAgskDvA==');
Swing := DTMFromString('mlwAAAHicY2dgYLgPxJeh+AoU7wHixYwMDM1AejYQLwPirUC8H4jjofJZtaYMy1o9GCbm2jPMKnZmmF/vylDTtYzBP1GLgQsoj45FoJgRBwapgQIAl20TVw==');
Tree2 := DTMFromString('mrAAAAHic42BgYHgDxC+A+C0QnwHiY0C8CYg/APFHIJZmZGAQB2IlIOYA4rtAsctArAtkWwHx7Fo3hroES4aGREsGz0gxhsBkMYagVDGGpCR5hoRobQYuoFoY5sGCGZEwMxJmgmIYAAAd/hF5');
Tree2two := DTMFromString('mrAAAAHic42BgYGBkZGBgAmJ+RghbHIhfA8XfAnEIEF8H4nNA/JABIn4LiK8B8XOoWLyPFoOflRJDfLwsQ2SIOkNSoiyDkRo/GNuaSDHwA9Xgw4xQzISEmZEwDAAAsGkPPQ==');
BottomOfSwing := DTMFromString('mggAAAHicY2NgYAhkYmBIBeIgII4H4glAvBiIVYByGkBsAsRdQGwExNZA3NYzDQX72MszpIZoMfAD5bBhRiTMgoQhAAD5kAy6');
ToStoneMM := DTMFromString('mWAAAAHicY2FgYNjExMCwBIhXAPE0IDYFipkBsQoQmwNxTXMfQ1q4PoNpkgRDiIc6Az9QDBkzomEQAAC7JweS');
PickIt := DTMFromString('mbQAAAHicY2VgYJAGYjkobQnEdkB8B4hvAvEDIP4JxMeAWHSCBMP3RSoM+2ulGYratRiaJ+ky8APF0TEjFgwGAALkC6s=');
CutIt := DTMFromString('mggAAAHicY2NgYMhmYmAoY4LQiUCcDMRFQMzFyMDAA8TiUPoXUO1vIN7RJg0kmTAwF5DEhhmxqoYBAF1YBnE=');
EatIt := DTMFromString('mggAAAHicY2NgYMhlYmDIAuIyIM4G4iQgzgDiJ0C5u0D8EIjfMED4zxlAgAkD758hzcAFZGHDjFh1wAAAeO0JsQ==');
FromPineapple := DTMFromString('mggAAAHicY2NgYGhhZGBoAOJaIO4A4j4gbgbi+UC5GUC8BoinA/EcIN4AxFY6Qgy9U/QY9FT4GLytxBnK4k0Z/OyUGLiAcuiYH4gZoZgJCbMywAAAAMcLtg==');
end;
procedure FreDTMs;
begin
FreeDTM(Stone);
FreeDTM(Stone2);
FreeDTM(Tree1);
FreeDTM(Bars);
FreeDTM(Fell);
FreeDTM(Slope);
FreeDTM(TopOfSlope);
FreeDTM(ToSwingMM);
FreeDTM(Swing);
FreeDTM(Tree2);
FreeDTM(Tree2two);
FreeDTM(BottomOfSwing);
FreeDTM(ToStoneMM);
FreeDTM(PickIt);
FreeDTM(CutIt);
FreeDTM(EatIt);
FreeDTM(FromPineapple);
end;
procedure WaitNone();
begin
end;
procedure Report;
var
Exp, ExpHr, TimeRan: integer;
begin
TimeRan := (1+((GetSystemTime - TimeBegan) / 1000));
Exp := (GetXPBarTotal - StartingXP);
ExpHr := Round((Exp * 3600) / (TimeRan));
WriteLn('*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('*RyGuys Ape Atoll Agility Runner Report');
WriteLn('*Time: ' + TimeRunning);
WriteLn('*We have gained ' + IntToStr(Exp) + ' Agility Experience!');
WriteLn('*We are gaining ' + IntToStr(ExpHr) + ' Agility Experience per Hour!');
WriteLn('*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;
procedure AntiBan;
begin
if not(LoggedIn)then
Exit;
case Random(175)of
0: HoverSkill('Agility', false);
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
WindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
end;
procedure SteppingStone;
begin
if FindDTMRotated(Stone, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) or FindDTMRotated(Stone2, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
HumanMMouse(x, y, 5, 5);
Wait(150 + random(50));
if IsUpText('stone')then
begin
ClickMouse2(True);
Wait(4375 + random(100));
AntiBan;
end;
end;
end;
procedure UpTree;
begin
if FindDTMRotated(Tree1, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
Mouse(x, y, 5, 5, True);
Wait(4375 + random(100));
AntiBan;
end;
procedure MonkeyBars;
var
BarCount: integer;
begin
repeat
Inc(BarCount);
if FindDTMRotated(Bars, x, y, 180, 0, 420, 340, -Pi, Pi, Pi/30, aFound)then
HumanMMouse(x, y, 2, 2);
Wait(150 + random(50));
until IsUpText('wing') or (BarCount > 15);
if IsUpText('wing')then
begin
ClickMouse2(True);
Wait(6675 + random(100));
AntiBan;
end;
end;
procedure SkullSlope;
var
SlopeCount: integer;
begin
repeat
Inc(SlopeCount);
x := MSCX;
y := MSCY;
if FindColorSpiralTolerance(x, y, 3435383, MSX1, MSY1, MSX2, MSY2, 4)then
HumanMMouse(x, y, 0, 0);
Wait(randomrange (25, 50));
until IsUpText('slope') or (SlopeCount > 30);
if IsUpText('slope')then
begin
ClickMouse2(True);
Wait(100 + random(50));
HumanMMouse(580, 45, 10, 10);
Wait(800 + random(100));
AntiBan;
While IsMoving do WaitNone;
end;
end;
procedure RunToSwing;
begin
if FindDTMRotated(ToSwingMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound)then
Mouse(x, y, 5, 5, True);
Wait(1000 + random(100));
AntiBan;
Flag;
Wait(1500 + random(100));
end;
procedure OverWater;
begin
if FindDTMRotated(Swing, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
HumanMMouse(x, y, 5, 5);
Wait(150 + random(50));
if (IsUpText('Rope'))then
begin
ClickMouse2(True);
Wait(100 + random(50));
AntiBan;
Wait(3300 + random(100));
end;
end;
end;
procedure DownTree;
var
tried: integer;
begin
if FindDTMRotated(Tree2, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) or FindDTMRotated(Tree2two, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
repeat
Inc(Tried);
HumanMMouse(x, y, 5, 5);
Wait(150 + random(50));
if (IsUpText('tree'))then
begin
ClickMouse2(True);
Wait(100 + random(50));
HumanMMouse(685, 55, 10, 10);
AntiBan;
TimesFailed := 0;
Wait(10850 + random(100));
end;
until FindDTMRotated(ToStoneMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) or (Tried > 5);
end;
end;
procedure BackToStart;
begin
if FindDTMRotated(ToStoneMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound)then
begin
Mouse(x, y, 5, 5, True);
Wait(100 + random(50));
HumanMMouse(295, 180, 25, 25);
Wait(1000 + random(100));
Report;
AntiBan;
Flag;
end;
end;
procedure GetPineapple;
begin
begin
Wait(400 + random(50));
if FindDTM(PickIt, x, y, MSX1, MSY1, MSX2, MSY2)then
Mouse(x, y, 5, 5, True);
Wait(2000 + random(100));
end;
begin
if FindDTM(CutIt, x, y, MIX1, MIY1, MIX2, MIY2)then
Mouse(x, y, 5, 5, False);
WaitOption('lice', 300);
Wait(400 + random(50));
Mouse(190, 430, 20, 20, True);
Wait(300 + random(50));
end;
begin
if FindDTMRotated(FromPineapple, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
Mouse(x, y, 4, 4, True);
Wait(1750 + random(100));
end;
end;
function CurrentHP:integer;
var
s: string;
begin
Result := GetMMLevels('health', s);
end;
procedure WhereAreWe;
var
x, y: integer;
begin
WriteLn('Failed ' + IntToStr(TimesFailed) + ' Times');
Inc(TimesFailed);
if FindDTMRotated(Stone, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) or FindDTMRotated(Stone2, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Stone');
SteppingStone;
end;
if FindDTMRotated(Tree1, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Tree1');
UpTree;
end;
if FindDTMRotated(Bars, x, y, 180, 0, 420, 340, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Bars');
MonkeyBars;
end;
if FindDTMRotated(Slope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Slope');
SkullSlope;
end;
if FindDTMRotated(TopOfSlope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Top');
RunToSwing;
end;
if FindDTMRotated(Swing, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Swing');
OverWater;
end;
if FindDTMRotated(Tree2, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) or FindDTMRotated(Tree2two, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Tree 2');
DownTree;
end;
if (CurrentHP < 300) and (InvCount < 15)then
begin
WriteLn('Getting a Pineapple for later use');
GetPineapple;
end;
if FindDTMRotated(BottomOfSwing, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Found Bottom');
BackToStart;
end;
if FindDTMRotated(Fell, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound)then
begin
WriteLn('Think you fell.. trying to go back to the stone')
BackToStart;
end;
if TimesFailed > 15 then
begin
WriteLn('We are probably stuck. Logging out to be safe.');
Logout;
TerminateScript;
end;
end;
begin
Smart_Server := 86;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);
repeat
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('S');
SetDTMs;
if (CurrentHP < 30)then logout;
if (CurrentHP < EatAt)then
repeat
begin
FindDTM(EatIt, x, y, MIX1, MIY1, MIX2, MIY2);
Mouse(x, y, 5, 5, True);
end;
until (CurrentHP > EatAt);
WhereAreWe;
FreDTMs;
until(AllPlayersInactive);
end.