Inception
2012-02-08 01:18:59
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?
Java, C#, PHP, SQL, Pascal, HTML
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?
Java, C#, PHP, SQL, Pascal, HTML
Are you a member of any other communities?
No
Tell us about yourself…
From: Inception
I am currently a senior in college pursuing a major in computer science and minors in management information systems and mathematics. The past two summers I have worked at Microsoft, developing and maintaining internal tools.
I enjoy being active and I am currently on the wrestling team. I also enjoy music and play drums in a cover band. I am a pretty easy going guy and would enjoy getting to know you all a little more!
Please show us one (or multiple) of your scripts.
{______________________________________________________________________________
| Inception's Chop & Fletch v1.0.1 |
| By: Inception |
|------------------------------------------------------------------------------|
| Instructions |
|------------------------------------------------------------------------------|
| Set your players up below with these things in mind: |
| - This is a members only script. |
| - If you plan on having your hatchet in your inventory, set the |
| variables accordingly or it will be banked. |
|------------------------------------------------------------------------------|
|------------------------------------------------------------------------------|
| Please post progress reports and feedback on the forums!! |
|______________________________________________________________________________|}
{$DEFINE SMART}
{$i SRL\SRL.simba}
const
// Fill in your SRL Stats!
SRLStats_User = '';
SRLStats_Password = '';
DebugMode = True;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Character Name
Pass := ''; // Character Pass
Pin := ''; // Character Pin
Nick := ''; // Character Nickname
Active := True; // Use player in script?
Member := True; // You must be a member to use this script.
Strings[0] := 'maple'; // Type of tree to chop....
// maple
Strings[1] := 'long'; // Type of bow to fletch....
// short, long
Booleans[0] := True; // Hatchet in inventory?
Booleans[1] := True; // Take breaks?
Integers[0] := 100; // Number of loads to do
end;
{ with Players[1] do
begin
Name := ''; // Character Name
Pass := ''; // Character Pass
Pin := ''; // Character Pin
Nick := ''; // Character Nickname
Active := True; // Use player in script?
Member := True; // You must be a member to use this script.
Strings[0] := 'maple'; // Type of tree to chop....
// maple
Strings[1] := 'long'; // Type of bow to fletch....
// short, long
Booleans[0] := False; // Hatchet in inventory?
Booleans[1] := True; // Take breaks?
Integers[0] := 100; // Number of loads to do
end;}
end;
Type
TTPAItem = Record
OutLine, Width, Height, Color: Integer;
end;
Type
LocationVar = Record
ColorMods, X, Y, Z: Array [0..1] of Extended;
DTMs: Array[0..3] of Integer;
Color, Tolerance: Integer;
end;
var
x, y, FullLoad, Loads, Levels, TotalLevels: Integer;
BreakTime, Breaks, LastMove: Integer;
WcExp, FlExp: Integer;
StatVar: String;
Leveled: Boolean;
aFound: Extended;
Log: TTPAItem;
LocVars: LocationVar;
{*******************************************************************************
procedure Debug(S: String);
Description: Prints debug statements if set to true.
*******************************************************************************}
procedure Debug(S: String);
begin
if DebugMode then
Writeln(S);
Status(S);
end;
{*******************************************************************************
procedure Antiban;
Description: Performs antiban actions.
*******************************************************************************}
procedure Antiban;
begin
if not LoggedIn or FindNormalRandoms then
Exit;
case Random(500) Of
0: begin Debug('Performing Antiban'); GameTab(tab_Stats); HoverSkill('Woodcutting', False); Wait(1500 + Random(500)); GameTab(tab_Inv); Wait(1000 + Random(500)); end;
1: begin Debug('Performing Antiban'); GameTab(tab_Stats); HoverSkill('Woodcutting', False); Wait(1500 + Random(500)); GameTab(tab_Inv); Wait(1000 + Random(500)); end;
2: begin Debug('Performing Antiban'); PickUpMouse; Wait(1500 + Random(500)); end;
3: begin Debug('Performing Antiban'); ExamineInv; Wait(1500 + Random(500)); end;
4: begin Debug('Performing Antiban'); GameTab(tab_Stats); HoverSkill('Random', False); Wait(1500 + Random(500)); GameTab(tab_Inv); Wait(1000 + Random(500)); end;
end;
end;
{*******************************************************************************
function TPAItem(logOutLine, logWidth, logHeight, logColor: Integer): TTPAItem;
By: Narcle
Description: Creates a TTPAItem object.
*******************************************************************************}
function TPAItem(logOutLine, logWidth, logHeight, logColor: Integer): TTPAItem;
begin
with Result do
begin
OutLine := logOutLine;
Width := logWidth;
Height := logHeight;
Color := logColor;
end;
end;
{*******************************************************************************
function FindTPAItem(Item: TTPAItem; B: TBox): Boolean;
By: Narcle
Description: Will return true the TTPAItem is found.
*******************************************************************************}
function FindTPAItem(Item: TTPAItem; B: TBox): Boolean;
var
TPA: TPointArray;
Bt: TBox;
x, y: Integer;
T: TPoint;
begin
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
Bt := GetTPABounds(TPA);
T := MiddleTPA(TPA);
if (Length(TPA) = Item.OutLine) and (iAbs(Bt.x2-Bt.x1) = Item.Width) and (iAbs(Bt.y2-Bt.y1) = Item.Height) then
if Item.Color > -1 then
Result := FindColorTolerance(x, y, Item.Color, T.x, T.y, T.x, T.y, 4)
else
Result := True;
end;
{*******************************************************************************
function UpdateItem(var Item: TTPAItem; InvN: integer; ForcedUpdate: Boolean): Boolean;
By: Narcle
Description: Updates the specified item in your inventory.
*******************************************************************************}
Function UpdateItem(var Item: TTPAItem; InvN: integer; ForcedUpdate: Boolean): Boolean;
var
TPA: TPointArray;
T: TPoint;
B: TBox;
begin
if InvN < 1 then
Exit;
if not ForcedUpdate then
if (Item.OutLine > 0) then
Exit;
if ForcedUpdate then
WriteLn('Item wasn''t detected attempting a TPA update.');
Wait(300+random(200));
B := InvBox(InvN);
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
B := GetTPABounds(TPA);
T := MiddleTPA(TPA);
Item := TPAItem(Length(TPA), iAbs(B.x2-B.x1), iAbs(B.y2-B.y1), GetColor(T.x, T.y));
Result := True;
Writeln('Item := TPAItem('+inttostr(Item.Outline) +', '+inttostr(Item.Width)+', '+inttostr(Item.Height)+', '+inttostr(Item.Color)+');');
Exit;
end;
{*******************************************************************************
function InvItemCount(Item: TTPAItem): Integer;
Description: Returns the number of specified items that are in your inventory.
*******************************************************************************}
function InvItemCount(Item: TTPAItem): Integer;
var
i, n: integer;
begin
for i := 1 to 28 do
if FindTPAItem(Item, InvBox(i)) then
begin
Inc(n);
end;
Result := n;
end;
{*******************************************************************************
function FindAndClick(Text: String): Boolean;
Description: Finds the specified text in the chat box and clicks.
*******************************************************************************}
function FindAndClick(Text: String): Boolean;
var
Timer: Integer;
T: TPoint;
begin
Timer := GetSystemTime + 1000 + Random(500);
repeat
Wait(50 + Random(50));
if (GetSystemTime > Timer) or not LoggedIn then
Exit;
until FindTextTpaEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, T.x, T.y, Text, statchars, Nothing)
Wait(RandomRange(150, 300));
MouseBox(T.x-20, T.y-30, T.x+20, T.y+8, 1);
Result := True;
end;
{*******************************************************************************
function UpText: String
Description: Returns the UpText for the current player.
*******************************************************************************}
function UpText: String;
begin
case (Players[CurrentPlayer].Strings[0]) of
'maple': Result := 'Maple';
end;
end;
{*******************************************************************************
procedure SetLocVars;
Description: Sets the location variables that will be used to find trees and
places on the map.
*******************************************************************************}
procedure SetLocVars;
begin
with LocVars do
begin
Color := 1781336;
Tolerance := 8;
ColorMods[0] := 0.06;
ColorMods[1] := 0.28;
X[0] := 2.53;
X[1] := 9.26;
Y[0] := 2.05;
Y[1] := 7.31;
Z[0] := 0.82;
Z[1] := 2.61;
DTMs[0] := DTMFromString('mggAAAHicY2NgYKhhYmCoB+IlUGwDxD5AbA6UkwBiUyAOBuJAIDYE4pQyDYaOCfMYuqsDGUryCxj6ezsZwvPUGPiBctgw0CgGRiwYAgDxhgyK');
DTMs[1] := DTMFromString('mbQAAAHicY2VgYKhiYmDIA+J1QLwKiEOAuBYo7gLEQQwQdhYQP793j6G4XY+huzqQoSS/gKGuWZeBHyiOjoHaGRjRMBgAAFt7DJI=');
DTMs[2] := DTMFromString('mbQAAAHicY2VgYIhiYmBIBeJuIC4BYmsgLgaKGwCxLxBPAOIIIH5+7x5Dx4R5DN3VgQwl+QUM5c26DPxAcXQM1M7AiIbBAAA2PAxc');
//[0] = Chop, [1] = Bank, [2] = Bank2
end;
end;
{*******************************************************************************
procedure SetStatsVars;
Description: Sets the stats variables.
*******************************************************************************}
procedure SetStatsVars;
begin
case Players[CurrentPlayer].Strings[0] of
'maple':
begin
StatVar := 'Maple Logs';
WcExp := (FullLoad * 100);
case Players[CurrentPlayer].Strings[1] of
'short': FlExp := (FullLoad * 50);
'long' : FlExp := (FullLoad * 58);
end;
end;
end;
end;
{*******************************************************************************
procedure FrDTM;
Description: Frees the DTMs.
*******************************************************************************}
procedure FrDTM;
begin
Debug('Freeing DTMs...');
FreeDTM(LocVars.DTMs[0]);
FreeDTM(LocVars.DTMs[1]);
FreeDTM(LocVars.DTMs[2]);
end;
{*******************************************************************************
procedure ResetBreakTimer;
Description: Resets the timers.
*******************************************************************************}
procedure ResetBreakTimer;
begin
BreakTime := GetSystemTime + RandomRange(50 * 60000, 120 * 60000);
end;
{*******************************************************************************
function TreeColor: Integer;
by: ACA v2 by Nielsie95 and Sumilion
Description: AutoColors a tree and returns the color.
*******************************************************************************}
function TreeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(LocVars.ColorMods[0], LocVars.ColorMods[1]);
FindColorsSpiralTolerance(MSCX, MSCY, arP, LocVars.Color, MSX1, MSY1, MSX2, MSY2, LocVars.Tolerance);
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 >= LocVars.X[0]) and (X <= LocVars.X[1]) and (Y >= LocVars.Y[0]) and (Y <= LocVars.Y[1]) and (Z >= LocVars.Z[0]) and (Z <= LocVars.Z[1]) 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 IsMovingWait;
Description: Waits while you are moving.
*******************************************************************************}
procedure IsMovingWait;
begin
while IsMoving do
begin
Wait(RandomRange(500, 1000));
end;
end;
{*******************************************************************************
function IsChopping: Boolean;
Description: Returns true if you are chopping.
*******************************************************************************}
function IsChopping: Boolean;
begin
Wait(500);
if (AveragePixelShift(IntToBox(245, 150, 275, 195), 250, 500) > 300) then
Result:= True
end;
{*******************************************************************************
procedure toBank;
Description: Walks to the bank.
*******************************************************************************}
procedure ToBank;
begin
if not LoggedIn or FindNormalRandoms then
Exit;
Debug('Going to bank...');
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');
Antiban;
if FindDTMRotated(LocVars.DTMs[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) or FindDTMRotated(LocVars.DTMs[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
Wait(1000);
end else
begin
Debug('Failed to find DTM. Using second method');
Mouse(620, 117, 1, 1, True);
Fflag(6);
Wait(1000);
end;
end;
{*******************************************************************************
procedure toChop;
Description: Walks to the woodcutting area.
*******************************************************************************}
procedure ToChop;
begin
if not LoggedIn or FindNormalRandoms then
Exit;
Debug('Going to chop...');
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');
Antiban;
if FindDTMRotated(LocVars.DTMs[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
Fflag(6);
Wait(RandomRange(500, 1000));
end else
begin
Debug('Failed to find DTM. Using second method.');
Mouse(636, 55, 5, 5, True);
Fflag(6);
Wait(RandomRange(500, 1000));
end;
Antiban;
IsMovingWait;
end;
{*******************************************************************************
procedure Bank;
Description: Opens the bank and deposits your items.
*******************************************************************************}
procedure Bank;
var
p, t: Integer;
begin
if not LoggedIn or FindNormalRandoms or (InvCount < 1) then
Exit;
IsMovingWait;
Antiban;
Inc(Loads);
t := 0;
repeat
Inc(t);
Debug('Attempting to open bank. Attempt: ' + IntToStr(t));
MakeCompass('n');
Wait(RandomRange(700, 1000));
if not OpenBankNPC then
OpenBank('clt', True, True);
Wait(1000);
until BankScreen or PinScreen or (t = 5);
if PinScreen then
begin
p := 0;
repeat
InPin(Players[CurrentPlayer].Pin);
Inc(p);
until BankScreen or (p = 5) or not LoggedIn;
end;
if (t = 5) or (p = 5) then
begin
Debug('Failed to open bank.');
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Loc := 'Failed to open bank.';
Logout;
Exit;
end;
if BankScreen then
begin
Debug('Bank opened...');
if Players[CurrentPlayer].Booleans[0] then
begin
Deposit(2, 28, True);
end else
DepositAll;
Wait(1000 + Random(500));
CloseBank;
end;
end;
{*******************************************************************************
procedure AdjustCamera;
Description: Rotates the camera when searching for a tree.
*******************************************************************************}
procedure AdjustCamera;
var
rotate: String;
begin
if not LoggedIn or FindNormalRandoms then
Exit;
if LastMove = 0 then
begin
case Random(2) of
0: rotate := 'e';
1: rotate := 'w';
end;
end;
if LastMove = 1 then
begin
case Random(2) of
0: rotate := 'n';
1: rotate := 'w';
end;
end;
if LastMove = 2 then
begin
case Random(2) of
0: rotate := 'n';
1: rotate := 'e';
end;
end;
case rotate of
'n':
begin
Debug('Adjusting North.');
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');
LastMove := 0;
Exit;
end;
'e':
begin
Debug('Adjusting East.');
SetAngle(SRL_ANGLE_LOW);
MakeCompass('e');
LastMove := 1;
Exit;
end;
'w':
begin
Debug('Adjusting West.');
SetAngle(SRL_ANGLE_LOW);
MakeCompass('w');
LastMove := 2;
Exit;
end;
end;
end;
{*******************************************************************************
procedure AttemptChop;
Description: Attempts to chop down a tree.
*******************************************************************************}
procedure AttemptChop;
var
i, r, c: Integer;
begin
if not LoggedIn or FindNormalRandoms or InvFull then
Exit;
Debug('Searching for tree...');
i := 0;
repeat
Inc(i);
if FindObjTPA(x, y, TreeColor, 5, 1, 15, 80, 100, ['hop']) then
begin
if IsUpText('own ' + UpText) then
c := Random(2)
else
c := 1;
case c of
0: begin
Mouse(x, y, 5, 5, True);
end;
1: begin
Mouse(x, y, 5, 5, False);
ChooseOption('own ' + UpText);
LastMove := 0;
end;
end;
Debug('Chopping....');
IsMovingWait;
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
Exit;
end;
Antiban;
Wait(1000);
until i = 5;
Debug('Cannot find tree on your screen. Attempting to change angles.');
r := 0
repeat
begin
Inc(r);
AdjustCamera;
Wait(1000);
end;
until (r = 15) or FindObjTPA(x, y, TreeColor, 5, 1, 15, 80, 100, ['hop'])
if not (r = 15) then
begin
AttemptChop;
Exit;
end;
if (i = 5) and (r = 15) then
begin
Debug('Failed to find tree.');
Players[CurrentPlayer].Loc := 'Failed to find tree.';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
end;
{*******************************************************************************
procedure ChopWait;
Description: Performs checks while chopping.
*******************************************************************************}
procedure ChopWait;
begin
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
repeat
if not LoggedIn or FindNormalRandoms then
Exit;
Antiban;
if not IsChopping and not InvFull then
begin
Debug('Idle character.');
Wait(RandomRange(500, 3000)); // Don't want to move instantly.
AttemptChop;
end;
if not Leveled then
if LevelUp then
begin
Leveled := True;
Debug(Players[CurrentPlayer].Nick + ' has just leveled up!');
Inc(Levels);
ClickToContinue;
AttemptChop;
end;
until InvFull;
Wait(RandomRange(500, 3000)); // Don't want to move instantly.
end;
{*******************************************************************************
function FletchBow: Boolean;
Description: Fletches the logs in your inventory.
*******************************************************************************}
function FletchBow: Boolean;
var
x, y, i: Integer;
RandInv: Integer;
B: TBox;
begin
if not LoggedIn or FindNormalRandoms then
Exit;
Debug('Fletching started...');
GameTab(Tab_Inv);
if Players[CurrentPlayer].Booleans[0] then
begin
RandInv := RandomRange(2, 28);
end else
RandInv := RandomRange(1, 28);
if InvItemCount(Log) <> FullLoad then
begin
Debug('2nd fletching method.');
for i := (29 - FullLoad) to 28 do
begin
InvMouse(i, mouse_Right);
if WaitUptext('raft ' + UpText, 500) then
begin
RandInv := i;
Break;
end;
Inc(i);
end;
end;
B := InvBox(RandInv);
if not FindTPAItem(Log, B) then
UpdateItem(Log, RandInv, True);
repeat
MouseBox(B.X1, B.Y1, B.X2, B.Y2, 3);
until IsUpText('raft ' + UpText)
if IsUpText('raft ' + UpText) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
end;
Antiban;
FindAndClick('Knife');
if FindAndClick(Players[CurrentPlayer].Strings[1]+'bow') then
Result := True
else
Exit;
end;
{*******************************************************************************
procedure FletchWait;
Description: Performs checks while fletching.
*******************************************************************************}
procedure FletchWait;
var
ItemsLeft, Timer: Integer;
Leveled: Boolean;
begin
Antiban;
Timer := GetSystemTime + 90000 + RandomRange(1000, 2000);
repeat
if not LoggedIn or FindNormalRandoms then
Exit;
ItemsLeft := InvItemCount(Log);
if not Leveled then
if LevelUp then
begin
Leveled := True;
Debug(Players[CurrentPlayer].Name + ' has just leveled up!');
Inc(Levels);
ClickToContinue;
GameTab(tab_Stats);
HoverSkill('Fletching', False);
Wait(2000 + RandomRange(500, 1000));
GameTab(tab_Inv);
Timer := GetSystemTime + 90000 + RandomRange(1000, 2000);
FletchBow;
end;
if (GetSystemTime > Timer) then
begin
Debug('Timed out fletching');
Timer := GetSystemTime + 60000 + RandomRange(1000, 2000);
FletchBow;
end;
until (ItemsLeft = 0)
Antiban;
Debug('Finished fletching.');
end;
{*******************************************************************************
procedure ProgressReport;
Description: Prints out your progress report.
*******************************************************************************}
procedure ProgressReport;
begin
stats_IncVariable(StatVar + ' Chopped', FullLoad);
stats_IncVariable(StatVar + ' Fletched', FullLoad);
stats_IncVariable('Total Levels Gained', Levels);
stats_IncVariable('Loads Done', 1);
stats_IncVariable('Times Banked', 1);
stats_IncVariable('Woodcutting EXP (Gained)', WcExp);
stats_IncVariable('Fletching EXP (Gained)', FlExp);
writeln('');
SRLRandomsReport;
stats_Commit;
if (Levels > 0) then
begin
Levels := 0;
Inc(TotalLevels);
end;
if not LoggedIn and (Players[CurrentPlayer].Loc = '') then
Players[CurrentPlayer].Loc := 'Suspected random event.';
writeln('/~~~~~~~~~~~Inception''s Chop & Fletch v1.0.1~~~~~~~~~~~~');
writeln('| Character: ' + Players[CurrentPlayer].Nick);
if not LoggedIn then
writeln('| Reason for logging out: ' + Players[CurrentPlayer].Loc);
writeln('| Finishing load #' + IntToStr(Loads));
writeln('| Running for: ' + TimeRunning);
if Breaks > 0 then
writeln('| # of breaks: ' + IntToStr(Breaks));
if TotalLevels > 0 then
writeln('| Levels gained: ' + IntToStr(TotalLevels));
writeln('| Chopped & Fletched: ' + IntToStr(Loads*FullLoad));
writeln('| WC Experience: ' + IntToStr(Loads*WcExp));
writeln('| FL Experience: ' + IntToStr(Loads*FlExp));
writeln('| WC Experience/Hour: ' + IntToStr(Round((Loads*WcExp*60)/(GetTimeRunning/60000))));
writeln('| FL Experience/Hour: ' + IntToStr(Round((Loads*FlExp*60)/(GetTimeRunning/60000))));
writeln('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;
{*******************************************************************************
procedure TakeBreak;
Description: Logs your character out for a random time.
*******************************************************************************}
procedure TakeBreak;
var
H, M, S, T, BreakFor: integer;
begin
if (GetSystemTime >= BreakTime) and Players[CurrentPlayer].Booleans[1] then
begin
CloseWindow;
Logout;
Inc(Breaks);
BreakFor := RandomRange(10 * 60000, 25 * 60000);
ConvertTime(BreakFor, H, M, S);
Writeln('Break for: ' + IntToStr(M)+ 'm:' + IntToStr(S)+ 's');
Disguise(Players[CurrentPlayer].Nick + ' Break for: ' + IntToStr(M)+ 'm:' + IntToStr(S)+ 's');
MarkTime(T);
Repeat
Wait(1000);
until (BreakFor < TimeFromMark(T))
ResetBreakTimer;
LogInPlayer;
Disguise('C&F: ' + Players[CurrentPlayer].Name);
Wait(4000);
FindNormalRandoms;
Antiban;
end;
end;
{*******************************************************************************
procedure SetupPlayer;
Description: Sets up the current character.
*******************************************************************************}
procedure SetupPlayer;
begin
Debug('Player setup...');
SetAngle(SRL_ANGLE_HIGH);
ResetBreakTimer;
GameTab(tab_Inv);
Loads := 0;
Leveled := False;
LastMove := 0;
Disguise('C&F: ' + Players[CurrentPlayer].Nick);
end;
{*******************************************************************************
procedure EndOfScript;
Description: Things to do when the script is terminated.
*******************************************************************************}
procedure EndOfScript;
begin
FrDTM;
writeln('');
writeln('Thank you for using my Chop & Fletch Script!');
writeln('Please post progress reports and bugs on the');
writeln('forums! :)');
writeln(' -Inception');
end;
{*******************************************************************************
procedure ScriptStart;
Description: Actions to perform at the beginning of the script.
*******************************************************************************}
procedure ScriptStart;
begin
ClearDebug;
Debug('SMART & SRL Loading...');
Smart_Server := 22;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
AddOnTerminate('EndOfScript');
DeclarePlayers;
if Players[CurrentPlayer].Nick = '' then
Players[CurrentPlayer].Nick := Capitalize(Copy(Players[CurrentPlayer].Name, 1, 4));
if Players[CurrentPlayer].Booleans[0] then
FullLoad := 27 //# of logs
else
FullLoad := 28;
if (SRLStats_User = '') then
SetupSRLStats(574, 'Anonymous', 'anon1337')
else
SetupSRLStats(574, SRLStats_User, SRLStats_Password);
SetLocVars;
MouseSpeed := 18;
LoginPlayer;
Wait(4000);
SetupPlayer;
SetStatsVars;
end;
{*******************************************************************************
procedure MainLoop;
Description: The main loop.
*******************************************************************************}
procedure MainLoop;
begin
ScriptStart;
repeat
if LoggedIn then
begin
ToChop;
AttemptChop;
ChopWait;
if FletchBow then
FletchWait;
ToBank;
Bank;
end;
ProgressReport;
TakeBreak;
until (Loads >= Players[CurrentPlayer].Integers[0]) or (not LoggedIn);
NextPlayer(Players[CurrentPlayer].Active);
end;
begin
MainLoop;
EndOfScript;
end.