SRL Archive - Archive

Inception - SRL Member Application


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…
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.

Scaper

2012-02-08 06:16:36

Hmmm you sure this is your code?

you got anyhing else you can show us?

holding vote atm

Kyle Undefined

2012-02-08 09:47:10

The most advanced pieces of this script was written by Narcle.

Also, you're using code straight out of ACA, which isn't bad, but I'd like to see you make your own AutoColor function.

It's a pretty advanced script for someone who just joined last month, and if it's 100% yours then fantastic job.

Holding my vote.

Inception

2012-02-08 13:15:32

From: Scaper
Hmmm you sure this is your code?


I'm not exactly sure what you mean by this. If you are asking if I copied someone else the answer is no. There are portions of my script that are from one of Narcle's scripts, but I asked him if I could use it and I credited him in the script.

E: If you want, I can post my firemaking script?

From: Kyle Undefined
The most advanced pieces of this script was written by Narcle.

Also, you're using code straight out of ACA, which isn't bad, but I'd like to see you make your own AutoColor function.

It's a pretty advanced script for someone who just joined last month, and if it's 100% yours then fantastic job.

Holding my vote.


The pieces that I used from Narcle were pretty much exactly what I needed. I could have wrote my own, but they would have turned out basically the same (I think), so I decided it would be better to use his and credit him for it. But nonetheless, you are right.

Creating my own AutoColor function isn't something I ever really thought about, but this is something I will try in the future.

Thank you! I have a pretty solid programming background so picking up a new language was no problem. I did watch a lot of tutorial videos by YoHoJo and read quite a few of the other tutorials around the site, which were very helpful.

Scaper

2012-02-08 13:36:15

I voted yes

PatDuffy

2012-02-08 13:52:17

Explain the functions used that are Narcles to prove you know how they work.

Mat

2012-02-08 14:11:02

From: PatDuffy
Explain the functions used that are Narcles to prove you know how they work.

Agree with Pat Pats Sexy ;)

Inception

2012-02-08 14:27:52

From: Mat
Agree with Pat Pats Sexy ;)


From: PatDuffy
Explain the functions used that are Narcles to prove you know how they work.


TPAItem creates a new TTPAItem, which is a record type that has the OutLine, Width, Height, and Color properties.

FindTPAItem starts by searching for an item in the given inventory slot by using the black outline of the item. If an item exists, boundaries are created for the item. Then the middle of the item is found. Tests are then perform to see whether the item in the inventory slot match the TTPAItem that was passed in. Then the color of the item is tested against the color of the TTPAItem to make sure a maple log isn’t confused with a willow log (Two items that have the same outline and size, but different colors at the center).

UpdateItem searches for the item in the inventory slot by using the black outline of the item, gets the boundaries and middle of the item. Then the function creates a new TTPAItem by calling TPAItem and passing in the length of the TPointArray (which is the outline of the item), the width and height, and the color that is at the center of the item.

Hero

2012-02-08 14:45:14

This feels like the "beginning" of something. I am holding as well until I see more comments from both sides.


Edit: how long have you know your languages?

Inception

2012-02-08 14:50:20

From: Hero
Edit: how long have you know your languages?


Java - around 5 years
C# - 2 years
PHP - 2 years
SQL - 2 years
HTML - 6 years
Pascal - 1 month :)

Kyle Undefined

2012-02-08 15:04:45

Seems good enough to me, voting Yes. First app I've voted Yes on in a while :p

Hobbit

2012-02-23 12:36:21

In!

Welcome :)