johnbrown8976
2012-04-07 02:49:36
How Long have You Played Runescape?
3 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
No
What is your general programming knowledge?
I have written lots of java applets in my undergraduate research including a wireless sensor network simulation using 2D grahpics. I am good in java, but can code in python, php, and javascript. I am new to pascal but found it quite easy to pick up. I created my own Gilded Altar script, and Nature runecrafting scripts, in the last couple weeks, but they are buggy, so I am submitting AstralRunecrafter which is a lot more organized
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
########################################################
#############JohnBrown Astral Runecrafter###############
########################################################
Time Running: 1 Hours, 43 Seconds
Successful Trips: 28 (Limit 300)
Failed Trips: 0 (Limit 10)
Essence Crafted: 1204
########################################################
########################################################
3 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
No
What is your general programming knowledge?
I have written lots of java applets in my undergraduate research including a wireless sensor network simulation using 2D grahpics. I am good in java, but can code in python, php, and javascript. I am new to pascal but found it quite easy to pick up. I created my own Gilded Altar script, and Nature runecrafting scripts, in the last couple weeks, but they are buggy, so I am submitting AstralRunecrafter which is a lot more organized
Are you a member of any other communities?
No
Tell us about yourself…
From: johnbrown8976
I am a undergraduate student at Grambling State University, USA, majoring in Computer Science, graduating May 2012. I have been coding only in Java since 2007, but am interested in learning C and its derivatives. I have presented my java projects in Wireless Sensors Network. I learned PHP, python, javascript, HTML in my high school, and have quite good knowledge of scripting language. My interest is software coding, my dream is to be a software engineer. I usually code for hours for my undergraduate assignments, and find it entertaining.
Please show us one (or multiple) of your scripts.
program AstralRuneSlowAndSteady;
{$DEFINE SMART} // This is how we include SMART; it HAS to be called BEFORE SRL!
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i SRL/SRL/misc/paintsmart.simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].Pin := ''; //Leave blank if the player doesn't have a bank pin
end;
var
//Global Variables
TotalEssenceCrafted, ExtraEssenceFromPouch, SuccessTrip, MaxTrips, //Variables used in Paint
StartTime, ElapsedTime, MaxRetryTimeLimit, MaxFailureCount, //Uses markTime to detect if Stuck
FailureCount:Integer; //How many times failed/stuck
Status: String;//Current Status e.g Walking to Bank
CompleteTrip,//Confirms that all steps to Altar complete without error
ForceCloseScript:Boolean; //FailSafe to forceClose Loop if stuck.
Procedure Initialize;
begin
{************Instructions*************
**************************************
1. Place Pouches (small, medium, large) on [FIRST 3 SLOTS]
-No support for Giant Pouch.
-Automatically repairs pouch using NPC contact.
-Detects degraded Large Pouch, assuming Medium degrades later
2. Place Pure Essence, Astral rune, Air rune, Cosmic rune VISIBLE on bank
-Runes are used for NPC contact spell to repair pouch.
-REQUIREMENT: Lunar SpellBook Activated
3. Start the script anywhere on Runescape
-Teleports to Lunar Isle Loadstone on startup.
-REQUIREMENT: Lunar Isle Loadstone unlocked.
**************************************
**************************************}
TotalEssenceCrafted := 0;
SuccessTrip := 0; //Successful trip
MaxTrips := 300;
FailureCount := 0;
MaxRetryTimeLimit := 20000; //Retry time for each action
MaxFailureCount := 10; //Terminate script if stuck too many times
end;
Procedure Proggy;
begin
ClearDebug;
writeln('########################################################');
writeln('#############JohnBrown Astral Runecrafter###############');
writeln('########################################################');
writeln('Time Running :' + TimeRunning);
writeln('Successful Trips :' + IntToStr(SuccessTrip) + ' (Limit ' + IntToStr(MaxTrips) + ')');
writeln('Failed Trips :' + IntToStr(FailureCount) + ' (Limit ' + IntToStr(MaxFailureCount) + ')');
writeln('Essence Crafted :' + IntToStr(TotalEssenceCrafted));
writeln('########################################################');
writeln('########################################################');
writeln('');
end;
Function FindObjectUsingTPA(color, tol, dist, ranX, ranY, clickType:Integer; upText:array of string):Boolean;
Var
x, y: Integer;
TPA: TPointArray;
TPA_Array: T2DPointArray;
i, TPA_Length: Integer;
begin
if not FindColorsSpiralTolerance(MSCX,MSCY,TPA,color,MSX1,MSY1,MSX2,MSY2,tol) then
exit;
TPA_Array := SplitTPA(TPA,dist);
TPA_Length := High(TPA_Array);
SortATPASize(TPA_Array, true);//sorts the biggest Area first
for i:=0 to TPA_Length-1 do
begin
wait(50+random(50));
if MiddleTPAEx(TPA_Array[i], x, y) then
begin
MMouse(x,y,ranX,ranY);
wait(100+random(75));
if IsUpTextMultiCustom(upText) then
begin
ClickMouse2(clickType);
Result := True;
exit;
end;
end;
end;
Result := False;
end;
Procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalrandoms;
case random(80) of
0: begin
HoverSkill(SKILL_RUNECRAFTING, false);
wait(1987 + random(432));
end;
10: PickUpMouse;
20: begin
MakeCompass('N');
wait(160 + random(43));
MakeCompass('S');
wait(84 + random(133));
MakeCompass('N');
FindNormalrandoms;
end;
30: randomMovement;
40: BoredHuman;
50: ExamineInv;
60: randomRClick;
70: SetAngle(SRL_ANGLE_LOW);
79: SetAngle(SRL_ANGLE_NONE);
end;
end;
Procedure SmartGraphics;
var
box:TBox;
x1, y1, x2, y2: Integer;
begin
x1 := 15;
y1 := 200;
x2 := 400;
y2 := 280;
//Paints the Canvas with Status Report
box := IntToBox(x1-10, y1-10, x2, y2);
SMART_DrawBoxEx(true, box, clWhite);
SMART_DrawText(x1, y1, StatChars, 'Status : ' + Status,clWhite);
SMART_DrawText(x1, y1+20, StatChars, 'Time : ' + TimeRunning,clWhite);
SMART_DrawText(x1, y1+40, StatChars, 'Trip : Success(' + IntToStr(SuccessTrip) +
') Fail(' + IntToStr(FailureCount) +
') Maximum(' + IntToStr(MaxTrips) + ') ',clWhite);
SMART_DrawText(x1, y1+60, StatChars, 'Essence Crafted: ' + IntToStr(TotalEssenceCrafted),clWhite);
end;
Procedure Output(OutputString:String; elapsedTime:Integer);
var
timeString:string;
begin
if elapsedTime<>0 then
timeString := ' (' + IntToStr((MaxRetryTimeLimit-elapsedTime) div 1000) + ' seconds)';
Status := OutputString + timeString;
SmartGraphics;
end;
Function OpenBankScreen:Boolean;
begin
Output('Starting up.',0);
wait(500 + random(500));
SetAngle(SRL_ANGLE_HIGH);
MarkTime(StartTime);
repeat //Loops until Bank Screen
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
Output('Searching Banker.',ElapsedTime);
if FindObjectUsingTPA(4033386, 10, 10, 2, 2, mouse_Right, ['al Banker','Sirsal','anker']) then
begin
Output('Banker found. Banking.',ElapsedTime);
wait(100 + random(150));
ChooseOption('ank Sirsal');
wait(3000 + random(500));//Wait for Banking to complete
end;
until BankScreen;
Result := True;
end;
Function RepairPouch:Boolean; //repair pouch using NPC contact
var
dtm_air, dtm_cosmic, dtm_astral, dtm_NPC, x, y:Integer;
begin
dtm_air := DTMFromString('mggAAAHicY2NgYJgFxBOBeDIQzwTiZUC8HIhXAfEKIF4HxBuBeBNU7vq5syiYgYEJjEWAJDbMiANDAADo3xH+');
dtm_cosmic := DTMFromString('mlwAAAHicY2dgYDgGxGeA+CyUfRiILwDxFSBeAcRLgHgNEG8A4p1AvA2IVwFxSUE+w8VzsnDMwMAExyJAEhdmxIOhAAAvPhF1');
dtm_astral := DTMFromString('mbQAAAHicY2VgYDBjZGCwA2IrIDYAYl0grgTiciBugGIQ+9DKQwwt9XUMuRkZDBEhIWC+CFA/OmbEgsEAAPq2DAM=');
dtm_NPC := DTMFromString('mlwAAAHicY2dgYFBnZGAwBGI5INYAYmUg1gNibSB2A2IXKLYHYm8g9gJifyB+/foVUDcjViwCJHFh7DogGAoAhLsGeg==');
Output('Repairing Pouch.',0);
wait(2000+random(200));
if not OpenBankScreen then
exit;
Output('Withdrawing runes for NPC contact.',0);
wait(1000+random(200));
if not WithdrawItem(dtm_air, 'DTM', 1, 'une', [10]) then
exit;
wait(500+random(200));
if not WithdrawItem(dtm_air, 'DTM', 1, 'une', [10]) then
exit;
wait(1000+random(200));
if not WithdrawItem(dtm_astral, 'DTM', 1, 'une', [10]) then
exit;
wait(1000+random(200));
if not WithdrawItem(dtm_cosmic, 'DTM', 1, 'une', [10]) then
exit;
if BankScreen then
begin
wait(400 + random(200));
CloseBank;
end;
wait(400 + random(200));
GameTab(tab_Magic);
Output('Clicking NPC contact teleport spell', 0);
wait(2000+random(200));
if FindDTM(dtm_NPC, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
wait(200+random(200));
Mouse(x, y, 5, 5, mouse_Left);
Output('Waiting for the List of NPC to appear', 0);
wait(4000+random(200));
Mouse(420,315,40,2,mouse_Right);
Output('Select speak to NPC', 0);
wait(1000+random(200));
ChooseOption('peak');
Output('Contacting NPC, please wait.',0);
wait(10000);
Output('Conversation with NPC',0);
MarkTime(startTime);
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
//Selects 1, Might mistime click (I don't know how to read text)
wait(1000);
SendKeys('1',200);
wait(1000);
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
while not ClickContinue(true, true) do
begin
wait(100+random(100));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
ClickContinue(true,true);
end;
end;
FreeDTM(dtm_air);
FreeDTM(dtm_cosmic);
FreeDTM(dtm_astral);
FreeDTM(dtm_NPC);
Result := True;
end;
Function StartBanking:Boolean;
var
dtm_pureEss, dtm_pouchL, dtm_pouchM, dtm_pouchS, dtm_pouchLD,
x,y:Integer;
begin
FindNormalrandoms;
wait(1000);
//Degraded Large pouch
dtm_pouchLD := DTMFromString('mrAAAAHic42BgYHjHyMDwnBFCfwHiH0D8Aog/APFbIA4C4jAgjoDiYCD2BWJvIHYBYktTQwZHGwswra2hyqCqpMBgZ2XGEBjoxiAlxcEgArQDH2YkgGEAAIYCD2A=');
GameTab(tab_Inv);
wait(1000);
if FindDTM(dtm_pouchLD, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Output('Found Degraded Large Pouch. Repairing.',0);
wait(2000);
if not RepairPouch then
begin
Output('Error: Cannot repair pouch',0);
wait(2000);
ForceCloseScript := True;
Logout;
exit;
end;
end;
wait(1000);
dtm_pureEss := DTMFromString('mggAAAHicY2NgYKgE4hwgLgDiBiBuB+IOIL4ExfeA+AEQ3wDi8yC1GRlAkgkDiwBJLiyYEQeGAACPWQmG');
dtm_pouchL := DTMFromString('mwQAAAHic42RgYOhiZGCYDsSTgbgdiBuAuAmIW4C4G4gnAbE/EAcAcTgQRwJxGBB7A7EjEDsAsTMQ+7haAU1jwotFgCQhzEgEhgMAYt4JRg==');
dtm_pouchM := DTMFromString('mrAAAAHic42BgYEhgZGCIAeIIII4F4iwgTgfiTCCOBmJ/IPYA4kComiAg9gRiRyC2B+JgHwegKUw4sQiQxIcZCWAYAACEBQcP');
dtm_pouchS := DTMFromString('m1gAAAHic42JgYDBjZGDQB2JdILYBYgcgtgZiPSA2goobA7EfEHsBcTAQh0H5ILUuQBwK5dsDcaCXHdBUJoJYBEgSgxmJxAgAAA9OBto=');
if not OpenBankScreen then
exit;
wait(1000 + random(200));
Deposit(4,28,True);// Deposit items 4-28
wait(300 + random(100));
if not WithdrawItem(dtm_pureEss, 'DTM', 28, 'ure', [10]) then
begin
Output('Error: Out of pure essence.',0)
ForceCloseScript := True;
Logout;
Result := False;
exit;
end;
wait(1000+random(100));
ExtraEssenceFromPouch := 0; //Counts essence in pouch
if FindDTM(dtm_pouchS, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
wait(200+random(100));
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('ill Small');
ExtraEssenceFromPouch := extraEssenceFromPouch + 2;
end;
if FindDTM(dtm_pouchM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
wait(200+random(100));
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('ill Medium');
ExtraEssenceFromPouch := extraEssenceFromPouch + 5;
end;
if FindDTM(dtm_pouchL, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
wait(200+random(100));
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('ill Large');
ExtraEssenceFromPouch := extraEssenceFromPouch + 8;
end;
wait(500+random(200));
WithdrawItem(dtm_pureEss, 'DTM', 28, 'ure', [10]);
if BankScreen then
begin
wait(400 + random(200));
CloseBank;
end;
FreeDTM(dtm_pureEss);
FreeDTM(dtm_pouchL);
FreeDTM(dtm_pouchM);
FreeDTM(dtm_pouchS);
Antiban;
wait(700 + random(300));
Result := true;
end;
Function Walk_BankToAltar:Boolean;
var
path: array[0..4] of TPointArray;
randomPath: Integer;
begin
FindNormalrandoms;
SPS_Setup(RUNESCAPE_SURFACE,['0_2','0_3']);
SetAngle(SRL_ANGLE_HIGH);
Output('Walking towards Altar',0);
path[0] := [Point(230, 950),Point(240, 975),Point(265, 975),Point(290, 995),Point(275, 1060),Point(275, 1100),Point(315, 1145),Point(350, 1160),Point(415, 1160),Point(450, 1150),Point(450, 1190)];
path[1] := [Point(239,959),Point(274,972),Point(309,1000),Point(275,1060),Point(291,1113),Point(325,1143),Point(373,1170),Point(407,1180),Point(437,1153),Point(466,1175)];
path[2] := [Point(248,959),Point(275,961),Point(296,1000),Point(289,1062),Point(300,1109),Point(331,1150),Point(377,1189),Point(411,1175),Point(449,1167),Point(455,1180)];
path[3] := [Point(240,966),Point(282,963),Point(301,1012),Point(295,1076),Point(305,1120),Point(330,1144),Point(357,1164),Point(420,1184),Point(456,1175),Point(485,1185)];
path[4] := [Point(243,967),Point(271,981),Point(310,1016),Point(288,1064),Point(308,1133),Point(337,1155),Point(368,1172),Point(412,1172),Point(447,1181),Point(461,1190)];
randomPath := random(5);
Result := SPS_WalkPath(path[randomPath]);
end;
Function CraftAstralRunes:Boolean;
//Returns false if cannot find Astral rune in inventory after crafting
var
extend:extended;
x,y,dtm_astral_rune, dtm_pouchS, dtm_pouchM, dtm_pouchL:Integer;
begin
FindNormalrandoms;
wait(1500 + random(1000));//wait for character to come to COMPLETE STOP
dtm_astral_rune := DTMFromString('mbQAAAHicY2VgYDBjZGCwA2IrIDYAYl0grgTiciBugGIQ+9DKQwwt9XUMuRkZDBEhIWC+CFA/OmbEgsEAAPq2DAM=');
dtm_pouchL := DTMFromString('mwQAAAHic42RgYOhiZGCYDsSTgbgdiBuAuAmIW4C4G4gnAbE/EAcAcTgQRwJxGBB7A7EjEDsAsTMQ+7haAU1jwotFgCQhzEgEhgMAYt4JRg==');
dtm_pouchM := DTMFromString('mrAAAAHic42BgYEhgZGCIAeIIII4F4iwgTgfiTCCOBmJ/IPYA4kComiAg9gRiRyC2B+JgHwegKUw4sQiQxIcZCWAYAACEBQcP');
dtm_pouchS := DTMFromString('m1gAAAHic42JgYDBjZGDQB2JdILYBYgcgtgZiPSA2goobA7EfEHsBcTAQh0H5ILUuQBwK5dsDcaCXHdBUJoJYBEgSgxmJxAgAAA9OBto=');
//Checks if Astral Rune crafted in the Inventory
GameTab(tab_Inv);
MarkTime(StartTime);
while not FindDTMRotated(dtm_astral_rune, x, y, MIX1, MIY1, MIX2, MIY2, -Pi/4, Pi/4, Pi/60, extend) do
begin
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
//finds the Altar using TPA
if not FindObjectUsingTPA(8883597, 10, 10, 20, 20, mouse_Left, ['une','une Altar','raft']) then
Output('Searching for Altar.',ElapsedTime);
wait(3000);
end;
wait(2000);
if FindDTMRotated(dtm_pouchS, x, y, MIX1, MIY1, MIX2, MIY2, -Pi/4, Pi/4, Pi/60, extend) then
begin
wait(500+random(100));
Mouse(x, y, 5, 5, mouse_Right);
wait(100+random(100));
ChooseOption('pty Small');
end;
if FindDTMRotated(dtm_pouchM, x, y, MIX1, MIY1, MIX2, MIY2, -Pi/4, Pi/4, Pi/60, extend) then
begin
wait(500+random(100));
Mouse(x, y, 5, 5, mouse_Right);
wait(100+random(100));
ChooseOption('pty Medium');
end;
if FindDTMRotated(dtm_pouchL, x, y, MIX1, MIY1, MIX2, MIY2, -Pi/4, Pi/4, Pi/60, extend) then
begin
wait(500+random(100));
Mouse(x, y, 5, 5, mouse_Right);
wait(100+random(100));
ChooseOption('pty Large');
end;
wait(800+random(200));
FindObjectUsingTPA(8883597, 10, 10, 20, 20, mouse_Left, ['une','une Altar','raft']);
wait(1000+random(500));
FreeDTM(dtm_astral_rune);
FreeDTM(dtm_pouchL);
FreeDTM(dtm_pouchM);
FreeDTM(dtm_pouchS);
Output('Altar found. Crafting runes.',0);
Antiban;
Result := True;
end;
Function TeleportToLoadstone:Boolean;
var
dtm_HomeTeleport, dtm_LoadstoneMap, x, y:Integer;
extend:Extended;
begin
FindNormalrandoms;
dtm_HomeTeleport := DTMFromString('mbQAAAHicY2VgYOBjZGAQhmIOIGYH4vNAfBmITwDxSSh735FPDLGBSxna5twA46zIAwwiQP1caJgRCwYDAGgLDdg=');
GameTab(tab_Magic);
MarkTime(StartTime);
while not FindDTMRotated(dtm_HomeTeleport, x, y, MIX1, MIY1, MIX2, MIY2, -Pi/4, Pi/4, Pi/60, extend) do
begin //Clicks the Home Teleport Icon
wait(1000 + random(200));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
Output('Home Teleport',ElapsedTime);
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
end;
FreeDTM(dtm_HomeTeleport);//Free DTM
MMouse(x,y,4,4);
wait(300 + random(200));
ClickMouse2(true);
dtm_LoadstoneMap := DTMFromString('mggAAAHicY2NgYEgF4iwgzoPSiUAcB8RzgXgalF4KxEuAeA4QK/i3M6jFTmRg1glnYNYOY1i7aAbDo+PrGUSActgwIw4MAQBbFg3z');
MarkTime(StartTime);
while not FindDTMRotated(dtm_LoadstoneMap, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, extend) do
begin //Clicks the Lunar Isle Loadstone Map
Output('Loading Loadstones Map.',ElapsedTime);
wait(1000 + random(200));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
end;
FreeDTM(dtm_LoadstoneMap);//Free DTM
MMouse(x,y,10,10);
wait(300 + random(200));
ClickMouse2(true);
Result := True;
end;
Function Walk_LoadstoneToBank:Boolean;
var
path, TPA:TPointArray;
newPosition:TPoint;
begin
FindNormalrandoms;
SetAngle(SRL_ANGLE_HIGH);
//checks colors around Loadstone to confirm arrival
MarkTime(StartTime);
while True do
begin
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
Output('Teleporting to Loadstone',ElapsedTime);
if FindColorsSpiralTolerance(MSCX,MSCY,TPA,8166842,MSX1,MSY1,MSX2,MSY2,10) then
if FindColorsSpiralTolerance(MSCX,MSCY,TPA,10120213,MSX1,MSY1,MSX2,MSY2,10) then
begin
wait(1000 + random(500)); //Waits for Loadstone animation to complete
break;
end;
end;
wait(3000);
SPS_Setup(RUNESCAPE_SURFACE,['0_2','0_3']);
SetAngle(SRL_ANGLE_HIGH);
path := [Point(180, 975),Point(235, 970),Point(235, 950)];
Output('Walking to bank.',0);
SPS_WalkPath(path);
MarkTime(StartTime);
newPosition := SPS_GetMyPos;
while newPosition.x < 190 do
begin
wait(500+random(500));
ElapsedTime := TimeFromMark(StartTime);//How long inside loop
if(ElapsedTime > MaxRetryTimeLimit) then //Fail safe
exit;
Output('Walking to bank.',ElapsedTime);
SPS_WalkPath(path);
newPosition := SPS_GetMyPos;
end;
Result := True;
end;
Procedure AwesomeAstralCrafter;
begin
CompleteTrip := False; //Checks if the whole trip is complete.
if TeleportToLoadstone then //Home Teleport to Lunar Isle Loadstone
if Walk_LoadstoneToBank then //Walks from Loadstone to Bank
if StartBanking then //Banking Successful
if Walk_BankToAltar then //Walks from Bank To Altar
if CraftAstralRunes then //Craft Astral Runes at the Altar
CompleteTrip := True;
if not CompleteTrip then //If any steps failed
begin
FailureCount := FailureCount + 1;
if FailureCount > MaxFailureCount then //Forces the script to close after 10 failures.
ForceCloseScript := True;
if ForceCloseScript then //If maximum failures reached, exit script.
exit;
exit;
end;
end;
begin
// These 4 lines HAVE to be set BEFORE you call SetupSRL;
Smart_Server := 25;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Initialize; //Initialize all variables
while (SuccessTrip < MaxTrips) and (not ForceCloseScript) do
begin
AwesomeAstralCrafter;
if completeTrip then
begin
SuccessTrip := SuccessTrip + 1;
TotalEssenceCrafted := TotalEssenceCrafted + 28 + ExtraEssenceFromPouch;
end;
Proggy;
end;
Logout(); //Log outs after total trips
end.
########################################################
#############JohnBrown Astral Runecrafter###############
########################################################
Time Running: 1 Hours, 43 Seconds
Successful Trips: 28 (Limit 300)
Failed Trips: 0 (Limit 10)
Essence Crafted: 1204
########################################################
########################################################