SCAR Code:
{ Setup:
1) Your character needs to be close ro in the fally east bank.
2) You need to have your logs visible when opening the Bank.
a) this means making sure you open the correct tab...
3) Be sure to actually have a tinderbox and logs...
4) Make sure your Reflection is updated.
5) Make sure your reflection and SMART is set up properly.
6) Run the script.
7) Check the script every 20 minutes for randoms and such.
Hint:
if you take longer than 9 seconds to light a log, go to line
177 and change the 9000 to any time that fits your need.
}
program PublicFallyAutoBurner;
{.Include SRL/SRL/Misc/SMART.SCAR}
{.Include SRL/SRL.SCAR}
{.include SRL/SRL/Reflection/Reflection.scar}
{.include SRL/SRL/Skill/Firemaking.scar}
var
TinderBoxDTM, TinderSpace, x, y, rx, ry, i, LogInteger: Integer;
cx, cy, ax, ay, SaveTime, GE, GL, EE, EL, SRLGE, ky: Integer;
Break1: Boolean;
procedure LoadTinderBox;
begin
TinderBoxDTM := DTMFromString('78DA637464626078CA8002DCED3819B880342' +
'310FF0702463FA09A170C688011AE06CCB305AAF948408D2950CD' +
'33026ABC816AAE13506305547387801A77A09A77F8D5000087E00' +
'D05');
end;
function WhichLog(Log: string): Integer;
begin
case LowerCase(Log) of
'normal': Result := DTMFromString('78DA63DCC3C4C0B08D91011964041A32B0026' +
'99828E336A09A43A86A40B2286A4E00D5EC25A0660D50CD2E026A' +
'8E01D56CC6AF0600A522086F');
'oak' : Result := DTMFromString('78DA63CC67626078C180027A739D185881342' +
'394CF580954F386010D30A2AAC900AAF948404D2C50CD33026A40' +
'763D21A02609A8E62D0135207FBD23A0A61AA8E6257E35001CE80' +
'C51');
'willow': Result := DTMFromString('78DA633463646058C68002023D6519B880345' +
'086E13F1030DA03594B18D000235C0D98E70864AD23A0C610C8DA' +
'4C408D3AA67BB0AA2160170007F70A3B');
'maple' : Result := DTMFromString('78DA633CC0C4C0F094010544D87233B002694' +
'620FE0F048CBB806A3E32A00146B81A30EF2C50CD1B026A4E01D5' +
'3C24A06623A67B30D46C03AA794B40CD61A09A7704D49C276C170' +
'00B4E123E');
'yew' : Result := DTMFromString('78DA6374656260E062644006114EDC0CAC401' +
'A24FA1F08187D806A5851D58064616AC03C3FA01A01026A6C806A' +
'4409A83103AA6127A0C61CA84690809A40A01A4E026A5C806A84F' +
'0AB010067C2077D');
end;
end;
procedure DeclarePlayers;
begin
SRLID := 'SRLID'; //This is a nummber of your SRL !!STATS!! account
SRLPassword := 'SRLPass'; //This is the password of your SRL !!STATS!! account
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username'; //Runescape username.
Players[0].Pass := 'password'; //Runescape Password.
Players[0].Nick := 'Nick'; // 3 to 4 lowercase letters of your name.
Players[0].Strings[0] := 'xxxx'; // your pin (if you have one)
Players[0].Strings[1] := 'willow'; //the tree to chop (avaible are: normal, oak, willow, maple and yew)
Players[0].Active := True;
end;
procedure WalkForth;
begin
if (not LoggedIn) then Exit;
WalkToTile( 3019, 3362, 2, 1);
Wait( 360);
FFlag(0);
Wait( 150 + random( 150) + random(125));
end;
procedure WalkBack;
begin
if (not LoggedIn) then Exit;
SRLGE := GetMe.Experience[11];
if (not TileOnMM(3013, 3355)) then
begin
WalkToTile( 3003, 3363, 1, 2);
Wait( 360);
FFlag(0);
Wait( 150 + random( 250) + random(125));
end;
WalkToTile( 3013, 3355, 1, 1);
Wait( 360);
FFlag(0);
Wait( 650 + random( 250) + random(125));
end;
function LightTheLogs: Boolean;
label
Break11, Break12;
begin
if (not LoggedIn) then Exit;
GameTab(4);
if FindDTM( TinderBoxDTM, rx, ry, MIX1, MIY1, MIX2, MIY2) then
begin
TinderSpace := CoordsToItem( rx, ry);
if FindDTM( LogInteger, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if (TinderSpace=1) then
begin
MouseItem( TinderSpace, True);
Wait(360 + random(240));
for i:=2 to 28 do
begin
if InvCount=1 then
begin
Result := True;
Exit;
end;
if (not (i = TinderSpace)) then
begin
if (i mod 2 = 0) then
begin
Break11:
Break1 := False;
MouseItem( i, True);
GetMyPos( cx, cy);
Wait(360 + random(240));
if i=28 then
begin
Wait(3000);
Exit;
end;
MouseItem( i + 1, True);
Wait(360 + random(240));
end else
begin
Break12:
Break1 := False;
MouseItem( TinderSpace, True);
GetMyPos( cx, cy);
Wait(360 + random(240));
MouseItem( TinderSpace, True);
Wait(360 + random(240));
end;
MarkTime(SaveTime);
repeat
Wait(50);
GetMyPos( ax, ay);
if InRange(TimeFromMark(SaveTime),500,800) then
begin
if InBlack then
begin
repeat
Wait(1000);
if not(InBlack) then Break;
until not(LoggedIn);
end;
if NoGameTab then
repeat
Wait(1000);
if not(NoGameTab) then Break;
until not(LoggedIn);
if TabExists(4) then
if FindNormalRandoms then
begin
Break1 := True;
Wait(360 + random(240));
Break;
end;
if Random(100) mod 12 = 0 then RC;
end;
if (TimeFromMark(SaveTime)>9000) then
begin
WalkToTile( ax, ay-1, 0, 0);
FFlag(0);
wait(360);
GetMyPos( ax, ay);
if ay = cy then
begin
ky := ay;
repeat
ky := ky - 1;
WalkToTile( ax, ky, 0, 0);
FFlag(0);
Wait(360);
GetMyPos( ax, ay);
until (ay + 1 <= cy);
end;
Break1 := True;
Break;
end;
until ((ax+1)=cx) or ((ax-1)=cx);
if Break1 then
begin
if (i mod 2 = 0) then
begin
MouseItem( TinderSpace, True);
Wait(360 + random(240));
goto Break11;
end else
begin
MouseItem( i, True);
Wait(360 + random(240));
goto Break12;
end;
end;
end;
end;
end;
end;
end;
Result := False;
Writeln(' We found no tinderbox...');
TerminateScript;
end;
function GetItems: Boolean;
begin
if (not LoggedIn) then Exit;
if (not OpenBankReflection('feb')) then
TerminateScript;
repeat
Wait(100);
if PinScreen then
InPin(Players[CurrentPlayer].Strings[0]);
until BankScreen;
Wait( 1300 +random(600));
if (not FindDTM( TinderBoxDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
if FindDTM( TinderBoxDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse( x, y, 0, 0, true);
Wait(424 + random(260));
end;
if InvCount > 1 then
begin
ArrangeInv;
for i:=2 to 28 do
begin
if ExistsItem(i) then
begin
MouseItem( i, false);
Wait(284 +random(62));
ChooseOption('ll');
Wait(284 +random(62));
end;
if InvCount = 1 then Break;
end;
end;
if FindDTM( LogInteger, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse( x, y, 0, 0, false);
Wait(224 + random(160));
ChooseOption( 'll');
Wait(424 + random(260));
CloseBank;
Result := True;
Exit;
end;
Result := False;
Writeln(' No logs were found...');
TerminateScript;
end;
procedure Proggy;
begin
EE := GetMe.Experience[11];
EL := GetMe.Levels[11];
Writeln('=============================================');
Writeln('===========Pure1993s Willow Burner===========');
Writeln('=============================================');
Writeln('Logs Burned: '+IntToStr((EE-Ge)/90));
Writeln('Time Running: '+TimeRunning);
Writeln('You started out with: '+IntToStr(GE)+'xp.');
Writeln('You gained '+IntToStr(EE-GE)+'xp!');
Writeln('Your current level is '+IntToStr(EL)+'.');
Writeln('You gained '+IntToStr(El-Gl)+' level(s).');
Writeln('==================Thank You==================');
Writeln('=============================================');
case Lowercase(Players[CurrentPlayer].Strings[1]) of
'normal' : ReportVars[0] := ((EE-SRLGE)/40);
'oak' : ReportVars[1] := ((EE-SRLGE)/60);
'willow' : ReportVars[2] := ((EE-SRLGE)/90);
'maple' : ReportVars[3] := ((EE-SRLGE)/135);
'yew' : ReportVars[4] := ((EE-SRLGE)/202); //this is rounded down by 0.5 exp
end;
SRLrandomsReport;
end;
begin
SetUpSrl;
SetupReflection;
ScriptId:= '951';
LoadTinderBox;
DeclarePlayers;
LoginPlayer;
GE := GetMe.Experience[11];
GL := GetMe.levels[11];
LogInteger := WhichLog(Players[CurrentPlayer].Strings[1]);
repeat
WalkBack;
SetAngle(True);
GetItems;
WalkForth;
LightTheLogs;
Proggy;
if not LoggedIn then
begin
Writeln('Well, you are logged out, this means you probably got a random...');
Writeln('We will terminate the script for safety reasons.');
TerminateScript;
end;
until false;
end.