digitalninja
2013-02-05 10:34:14
How Long have You Played Runescape?
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I have limited programming knowledge especially when it comes to pascal and C++. I am a marketer by profession but have a working knowledge of HTML and CSS especially when it comes to wordpress and other CMS solutions.
The script I am submitting took a long time mostly since I was learning from scratch but the tutorials on the forums were phenomenal.
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I have limited programming knowledge especially when it comes to pascal and C++. I am a marketer by profession but have a working knowledge of HTML and CSS especially when it comes to wordpress and other CMS solutions.
The script I am submitting took a long time mostly since I was learning from scratch but the tutorials on the forums were phenomenal.
Are you a member of any other communities?
No
Tell us about yourself…
From: digitalninja
I am a long time player of runescape and enjoy the game when not dealing with my kids. I also like that you can do something productive in a few minutes if needed unlike other games I used to play that required hours and hours for anything substantial to happen.
I have lived all over the world although currently reside in Canada. One of my favorite places to live was Japan where I became a HUGE fan of anime. I grew up watching Laputa and DragonBall and have since continued to watch anything and everything I can. Currently I am watching Sword Art Online, Naruto, Fairy Tail, along with a huge list of others I have that I havent gotten around to watching yet.
SRL has made it so I can still play the game I love and watch anime or spend time with family … its a win win win for me and I am proud to be part of the community.
For the script below I created a custom SPS map which can be found here - http://s18.postimage.org/ss17lomqx/Ape_Atoll.png.
The script is working and is fairly stable for me. I need to make the banking just a touch more stable but other than that I am proud to submit it for my membership application.
Next I will be trying my hand at a Port P Cannonball Maker :).
Please show us one (or multiple) of your scripts.
program MahoganyPro;
{$DEFINE SMART8}
{$i SRL/srl.simba}
{$I sps/sps.simba}
//Version: Mahogany Pro V1.0 :Credit goes to Benny for his Teak Pro which
//helped me create this script. Huge props also to YoHoJo for his tutorials
//especially his beginners tutorials 1 and 2 and DTM tutorial.
//Huge props to Google as well for his SPS guide which was awesome and Footy's CTS2 TPA
//guide!
var
TimeBegan, StartingXP, Loads, MahoganyLogs: integer;
Const
WaitTime = 5000; // Amount of time you want to wait until it tries to chop
// another tree, lower levels want a higher wait time as logs come slower.
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Username
Players[0].Pass := ''; //Password
Players[0].Active := True; //Leave this alone.
Players[0].Pin := ''; //You DO NOT need to enter your bank PIN!
end;
procedure AntiBan;
begin
FindNormalRandoms;
case Random(100) of
0..7:
begin
case Random(4) of
0:
begin
HoverSkill('Woodcutting', false);
wait(1200 + random(100));
end;
1: PickUpMouse;
2: RandomMovement;
3: RandomRClick;
end;
end;
8..99: Wait(50 + random(50));
end;
end;
procedure WaitChop;
var
Time, Count: integer;
begin
while IsMoving do Wait(50 + random(50));
MarkTime(Time);
Count := InvCount;
repeat
Wait(3000 + random(1000));
AntiBan;
if InvCount > Count then
begin
MarkTime(Time);
Count := InvCount;
end;
if FindBlackChatMessage('invent') then Exit;
until(TimeFromMark(Time) > WaitTime);
end;
procedure ChopTree;
var
x, y, MahoganyTree: integer;
begin
SetAngle(SRL_ANGLE_LOW);
MahoganyTree := DTMFromString('mggAAAHicY2NgYPBhZGDwAGJ3IA6CYpDYSaDcESA+C8TngfgYEB8E4qPL8sD41MoChj3zMhjWT05kOLQ4hwEXYMSBIQAAXSQRWQ==');
if InvFull then Exit;
repeat
if FindObjTPA(x, y, 7251653, 5, 2, 20, 20, 20, ['Mahogany', 'Chop', 'hop']) or FindDTM(MahoganyTree, x, x, msx1, msy1, msx2, msy2) then
begin
Writeln('Tree Found!');
case Random(2) of
0:
begin
Mouse(x, y, 7, 20, false);
WaitOptionMulti(['hop', 'Mahogany'], 10000);
Wait(500 + random(250));
WaitChop;
Writeln('Choppin like a lumberjack!');
end;
1:
begin
Mouse(x, y, 7, 20, true);
Wait(5000 + random(250));
WaitChop;
Writeln('Choppin like a lumberjack!');
end;
end;
end;
until(InvFull);
FreeDTM(MahoganyTree);
end;
procedure WalktoDepositBox;
var
GEToDepositBox: tpointarray;
Begin
SPS_Setup(RUNESCAPE_OTHER, ['ApeAtoll']);
GEToDepositBox := [Point(84, 84), Point(83, 85), Point(93, 93), Point(104, 101), Point(120, 109), Point(136, 120), Point(156, 124), Point(169, 127), Point(186, 128), Point(198, 129), Point(214, 130), Point(229, 132), Point(244, 132)];
SPS_WalkPath(GEToDepositBox);
Writeln('Walkin to da bank');
End;
function MahoganyColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.64);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 5868456, MSX1, MSY1, MSX2, MSY2, 12);
if (Length(arP) = 0) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 8.53) and (X <= 27.47) and (Y >= 8.83) and (Y <= 28.26) and (Z >= 8.26) and (Z <= 26.57) then
begin
Result := arC[i];
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
function BankerColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.64);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2506342, MSX1, MSY1, MSX2, MSY2, 12);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 2.72) and (X <= 16.97) and (Y >= 2.31) and (Y <= 13.88) and (Z >= 0.90) and (Z <= 5.77) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure BankLogs;
var
x, y, MahoganyLog, SpecialMahoganyLog, BankBox, i: integer;
tmpCTS, counter:integer;
ChestTPA:TPointArray;
begin
SetAngle(SRL_ANGLE_HIGH);
MahoganyLog := DTMFromString('mbQAAAHicY2VgYHjGxMBwB4gfAvFbIH4FxPmMDAw5QFwJxGVAnAXEy3tiGdZOTADjLdNTGBa2RzGAACsaZsSCwQAAJ5AO2Q==');
SpecialMahoganyLog := DTMFromString('m1gAAAHic42JgYHjFysDwAIjvAvEzIH4PxN+A+BcQ/wDiT6wQNVlMDAypQFwMxOVAXAZl50DFE4A4CYgbgi2BpjIRgYkDjERiBAAAOZ8O7g==');
BankBox := DTMFromString('mbQAAAHicY2VgYLBiZmAwAWJjIHYEYicgfsfIwPAYiL9AMYg9IUiHIctGgaHAw5ChPsiCoc5DjQEEWNEwIxYMBgDmiQql');
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed (2);
SetToleranceSpeed2Modifiers(0.03, 0.07);
FindColorsTolerance(ChestTPA, 2574721, MSX1, MSY1, MSX2, MSY2, 33);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
if FindObjTPA(x, y, 2904720, 5, 2, 60, 30, 15, ['epo', 'Deposit', 'chest', 'Bank']) or FindDTM(BankBox, x, x, msx1, msy1, msx2, msy2) then
begin
Mouse(x, y, 7, 7, mouse_left);
repeat
Wait(250 + random(100));
Inc(i);
until(FindDTM(MahoganyLog, x, y, msx1, msy1, msx2, msy2) or (FindDTM(SpecialMahoganyLog, x, y, msx1, msy1, msx2 ,msy2)) or (i > 20));
if FindDTM(MahoganyLog, x, y, msx1, msy1, msx2, msy2) then
begin
Mouse(x, y, 7, 7, false);
WaitOptionMulti(['All', '-All', 'sit-All'], 1000);
Wait(500 + random(250));
WriteLn('Found logs');
if FindDTM(SpecialMahoganyLog, x, y, msx1, msy1, msx2 ,msy2) then
begin
Mouse(x, y, 7, 7, false);
WaitOptionMulti(['All', '-All', 'sit-All'], 1000);
Wait(500 + random(250));
WriteLn('Found special logs');
end;
CloseBank;
Inc(Loads);
IncEx(MahoganyLogs, 27);
end else WriteLn('Not Finding Logs');
end else
begin
WriteLn('Couldnt find the bank, exiting!');
TerminateScript;
end;
FreeDTM(MahoganyLog);
FreeDTM(SpecialMahoganyLog);
FreeDTM(BankBox);
end;
procedure WalktoMahogTree;
var
GEToMahogTree: tpointarray;
Begin
SPS_Setup(RUNESCAPE_OTHER, ['ApeAtoll']);
GEToMahogTree := [Point(276, 130), Point(275, 131), Point(268, 131), Point(259, 131), Point(249, 128), Point(241, 130), Point(230, 130), Point(219, 130), Point(208, 130), Point(198, 130), Point(188, 130), Point(177, 128), Point(163, 124), Point(150, 124), Point(140, 122), Point(130, 120), Point(117, 114), Point(105, 109), Point(94, 101)];
SPS_WalkPath(GEToMahogTree);
Writeln('Walkin to da tree');
End;
procedure Proggy;
var
WCExp, WCExpHr, TimeRan, MahoganyLogsHr, LoadsHr: integer;
begin
TimeRan := (1+((GetSystemTime - TimeBegan) / 1000));
WCExp := (GetXPBarTotal - StartingXP);
WCExpHr := Round((WCExp * 3600) / (TimeRan));
//MahoganLogs := Round(WCExp / 125);
MahoganyLogsHr := Round((MahoganyLogs * 3600) / (TimeRan));
LoadsHr := Round((Loads * 3600) / (TimeRan));
ClearDebug;
WriteLn('*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('*Digital Ninja''s Mahogany Chopper Progress Report');
WriteLn('*Time: ' + TimeRunning);
WriteLn('*We have chopped ' + IntToStr(Loads) + ' Loads! (' + IntToStr(LoadsHr) + ' per Hour)');
WriteLn('*We have gained ' + IntToStr(WCExp) + ' Woodcutting Experience! (' + IntToStr(WCExpHr) + ' per Hour)');
Writeln('*We have chopped ' +IntToStr(MahoganyLogs) + ' MahoganyLogs!(' + IntToStr(MahoganyLogsHr) + ' per Hour)');
WriteLn('*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;
begin
{$IFDEF SMART}
{$IFDEF SIMBAMAJOR980}
Smart_Server := 72;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
{$ENDIF}
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
TimeBegan := GetSystemTime;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);
AddOnTerminate('Proggy');
SPS_Setup(runescape_other,['ApeAtoll']);
ClickNorth(0);
repeat
WalktoMahogTree;
ChopTree;
WalktoDepositBox;
BankLogs;
Proggy;
until(AllPlayersInactive);
end.