SRL Archive - Archive

xaviarrob - SRL Member Application Form


xaviarrob

2008-06-30 22:48:46

<!– BEGIN TEMPLATE: formanswers –>
xaviarrob - SRL Member Application Form
xaviarrob

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
Java

Other Communitys
runehq,moparisthebest

How Long have You Played Runescape
2 years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

Im working on getting my scripting skills up to help out community. Im working on releasing a script that does a complete tutorial island run, and after that it trains the character at chickens,cows, or goblins and will train certain skills (Ex:Strength, Range). Im makeing this for an easy auto to make a pure.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

{*********** <<–Xaviar–>> ***********
Edgeville Yew Chop n Bank
V1.62
Requires Scar 3.14 & SRL 14+

Description
Chops the yews just south of edgeville and then banks them.

Instructions
Fill in all relevant options below. Make sure
windows display settings are set to 32bit, put
axe anywhere in your backpack or hand, make sure
your players are in the Edgeville, Tree Gnome
Stronghold or Catherby Bank.
and run the script. Simple! Enjoy :)

*********** <<–Xaviar–>> ***********}

program Simple_Yew_Cut_n_Bank_Ed;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}
const
{*******************************************************************************
Enter Options & Your Details Here
*******************************************************************************}

{******************* Overall Maximum Values (Not per player) *******************
************** Script finishes when any max limit has been reached. ************
***************************** enter 0 for infinite ****************************}
TMaxLoads = 0; // Enter the total number of loads to bank.
TMaxLogs = 0; // Enter the total number of yews to chop.
TMaxTime = 0; // Enter the total time to run in minutes.
TMaxXp = 0; // Enter the total amount of XP you want to earn.

{************************** Maximum Values per player **************************
************** Player finishes when any max limit has been reached. ************
***************************** enter 0 for infinite ****************************}
PMaxLoads = 0; // Enter the number of loads to bank per player.
PMaxLogs = 0; // Enter the number of yews to chop per player.
PMaxTime = 0; // Enter the time to run in minutes per player.
PMaxLevel = 0; // Enter Woodcutting Level you wish each player to achieve.
PMaxXp = 0; // Enter the amount of XP you want each player to earn.

{***************************** Change Player after *****************************
********** Player will bank and change when any value has been reached. ********
**************************** default value are best ****************************
***************************** enter 0 for infinite ****************************}
SessLoads = 0; // Change player when loads banked has been reached.
SessTime = 0; // Change player when time in minutes has been reached.
SleepTime = 0; // Time in minutes you want to wait beween players logging out and in.

{********************************** SRL Stats **********************************
***** SRL Stats records information about how many logs cut, loads banked *****
***** randoms solved etc *****
***** Sign-Up for your SRL Stats ID Here: www.stats.srl-forums.com *****
***** this is not the same as your SRL Forums Username or Password *****
*******************************************************************************}
SRL_ID = ''; // Your SRL Stats ID (Not Username) it is 4 numbers
SRL_PASS = ''; // Your SRL Stats Password (If you do not have an ID or Password leave Blank)

{**************************** Miscellaneous Options ***************************}
DebugOn = false; // true to enable dedug mode (saves screenshots in SCAR dir when things go wrong)
HideScar = 'notepad'; // Enter the name of any program you want SCAR to disguise itself as.

{*******************************************************************************
* Do not alter anything in this section unless you really know what your doing *
* Move on and enter the Players Details, you will then be ready to start. *
*******************************************************************************}
BankCashierColour = 195836; // Colour of Bank Cashier in Mini Map. The Yellow Dot. You Should not have to change this.
UCBversion = 'V1.62'; // Version of this script

var
locations: Array of String;
NestSeedDTM, NestRingDTM, NestEggDTM, YewDTM, MagicDTM: integer;
FirstDeposit, x, y: integer;
CIBReason, DumpVar: String;
KeepPlayer, CIBTrue: boolean;

{******************************* Player Details *******************************}
procedure DeclarePlayers;
begin
NumberOfPlayers(1); // Enter the amount of players here.
{**********************************************
* The players Nick is used to detect talking *
* Randoms. So it is very important to set *
* this correctly. *
* Enter a 3 to 4 character lowercase version *
* of your username. e.g. if 'Evil Bob' was *
* your username 'vil' would be the only valid*
* option as "Bob" or "Evi" would be wrong *
* because they show up in runescape with *
* UpperCase Letters. *
*********************************************}
Players[0].Name := 'ChangeMe'; // Enter your Runescape UserName here.
Players[0].Pass := 'ChangeMe'; // Enter your Runescape PassWord here.
Players[0].Nick := 'ChangeMe'; // Enter your Nick here **Very Important Read Note Above**
Players[0].pin := '0000'; // Enter your Runescape Bank Pin here, Leave at '0000' if you don't have one.
Players[0].Active := true; // Set to true if you want to use this player, false if you don't.
Players[0].Strings[1]:= 'woodcutting'; // Choose skill you want any genie lamps aquired to be used on. (Must be spelt exactly as it is in skill list)
Players[0].Loc := 'E'; // This is the Starting Location of your player enter:
//'E' for Edgeville Bank, 'SM' for Tree Gnome Stronghold Bank to Chop Magic Trees,
//'CY' for Catherby Yews

{<<—————– Add Additional Players Below this Line ——————-
{******************* Copy Paste for more players ******************}

// Players[1].Name := 'ChangeMe'; // This is where you add more players. To enable the player remove
// Players[1].Pass := 'ChangeMe'; // the '//' from the begining of each line, fill in the correct details
// Players[1].Nick := 'ChangeMe'; // as you did for Players[0] and do not forget to change the value of
// Players[1].pin := '0000'; // NumberOfPlayers to reflect any additional players.
// Players[1].Active := true; // You can add as many players as you like, just copy this player and
// Players[1].Strings[1]:= 'woodcutting'; // change the number of the new player i.e Players[1] to Players[2]
// Players[1].Loc := 'E'; //

end; {<<———– Additional Players Above this Line ———————–}



function CoordsToDegrees(x, y: integer): integer;
var d: double;
begin
x := x - 260;
y := y - 160;
d := ArcTan2(y, x) * (180 div Pi) + 90;
if d < 0 then d := d + 360;
result := round(abs(d - 360) + rs_GetCompassAngleDegrees);
if result >= 360 then result := result - 360;
end;

{*******************************************************************************
procedure MakeCompassCoords(x, y: integer);
Description: Moves Compass so that target x & y coordinates are directly north
of your player.
*******************************************************************************}
procedure MakeCompassCoords(x, y: integer);
begin
MakeCompass(IntToStr(CoordsToDegrees(x, y)));
end;

{*******************************************************************************
function DigitGroup(MyNumber: integer) string;
Description: Formats an integer into groups of 3 seperated by commas and returns
a formatted string. i.e "1234567" would become "1,234,567".
I know there is probably an easier way of doing this and probably
an existing function. i just can not remember it!
*******************************************************************************}
function DigitGroup(MyNumber: integer): string;
var b: integer;
a, c: string;
begin
a := IntToStr(MyNumber);
b := length(a) + 1;
c := ',';
if b > 4 then
repeat
b := b - 3;
if b > 1 then insert(c, a, b);
until b < 3;
result := a;
end;

{*******************************************************************************
function Find2TPApoints(TPA1, TPA2: TPointArray; w, h: Integer): TPointArray;
Description: Small function to find two points within different TPA arrays that
fall within a defined distance from each other.
Returns the mid value between every pair of points that match.
TPA1: First TPoint Array
TPA2: Second TPoint Array
w: Width (Maximum Distance points can be apart on the x axis)
h: Height(Maximum Distance points can be apart on the y axis)
*******************************************************************************}
function Find2TPApoints(TPA1, TPA2: TPointArray; w, h: Integer): TPointArray;
var i1, i2, l1, l2, r: LongInt;
begin
l1 := High(TPA1);
l2 := High(TPA2);
r := 0;
for i1 := 0 to l1 do
begin
for i2 := 0 to l2 do
begin
if (ABS(TPA1[i1].x - TPA2[i2].x) <= w) and (ABS(TPA1[i1].y - TPA2[i2].y) <= h) then
begin
Inc(r);
SetLength(Result, r + 1);
result[r].x := ((TPA1[i1].x + TPA2[i2].x) div 2);
result[r].y := ((TPA1[i1].y + TPA2[i2].y) div 2);
end;
end;
end;
end;

{*******************************************************************************
function CheckAxe: boolean;
Description: Small function to check if part of the phrase:
You do not have an axe which you have the woodcutting level to use.
is present as the last black message in the chat box. It does this
as it is quicker and less system intensive than parsing for dtms
or bitmaps. Use this function immediately after clicking a tree.
Returns True if Axe is Present and False if No Axe is Present.
*******************************************************************************}
function CheckAxe: boolean;
begin
if Pos('an axe', GetBlackChatMessage) = 17 then
begin
writeln('You do not have a suitable axe….');
result := false;
end else result := true;
end;

{*******************************************************************************
procedure EndAllPlayers;
Description: Sets all players to inactive.
*******************************************************************************}
procedure EndAllPlayers;
var i: integer;
begin
for i := 0 to Length(Players) - 1 do
begin
Players.Active := false;
end;
end;

{*******************************************************************************
function FindObjOld(var cx, cy: Integer; Text: String; color, tolerance: Integer): Boolean;
By: Stupid3ooo and modified by Ron.
Description: Finds Object.
*******************************************************************************}

function FindObjOld(var cx, cy: Integer; Text: string; color, tolerance: Integer): Boolean;
var
a, c, i, x1, y1, x2, y2: Integer;
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
Break;
a := a + 1;
if (a = 1) or (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(cx, cy, color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(cx, cy, 0, 0)
Wait(50+Random(50));
if (IsUpText(Text)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;

{*******************************************************************************
function MyFindBirdsNest: boolean;
Description: Attempts to a Find Birds Nest if one is dropped & Pick it up.
If it can not find one within 90 seconds it exits as Fallen Birds
Nests do not last that long. beta version Records a failure to
find the birds nest.
*******************************************************************************}
function MyFindBirdsNest: boolean;
var OriginalDegrees, NewDegree, StartFBN, x, y, i, ctab: Integer;
b: boolean;
begin
if not LoggedIn then exit;
if Pos('nest falls', GetBlackChatMessage) = 10 then
begin
b := false;
result := true;
writeln('Birds Nest Drop Detected. Attempting To Find It…');
MarkTime(StartFBN);
SetAngle(true);
OriginalDegrees := Round(rs_GetCompassAngleDegrees);
NewDegree := OriginalDegrees;
ctab := GetCurrentTab;
repeat
if (FindObjOld(x, y, 'Take Bird', 3623505, 6)) then
begin
WriteLn('Birds Nest Found. Picking Up…');
Mouse(x, y, 1, 1, True);
Flag;
Wait(500 + Random(500));
Birdsnest := Birdsnest + 1;
GameTab(4);
SetAngle(true);
MakeCompass(IntToStr(OriginalDegrees));
GameTab(ctab);
for i := 1 to 5 do
begin
Mouse(575, 225, 3, 3, False);
Wait(300 + Random(500));
ChooseOption('xamine');
Wait(1000 + Random(1000));
if Pos('nest falls', GetBlackChatMessage) <> 10 then exit;
end;
SRLRandomsReport;
exit;
end else
begin
if b then
begin
SetAngle(false);
b := false;
end else
begin
SetAngle(True);
NewDegree := (NewDegree + 25 + Random(30));
MakeCompass(IntToStr(NewDegree));
b := true;
end;
end;
until TimeFromMark(StartFBN) > 90000;
WriteLn('Birds Nest Not Found Within Required Time. Aborting…');
MakeCompass(IntToStr(OriginalDegrees));
SetAngle(True);
GameTab(ctab);

for i := 1 to 28 do
begin
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
Mouse(x, y, 5, 5, false);
Wait(300 + Random(500));
ChooseOption('Examine');
Wait(1000 + Random(1000));
if Pos('nest falls', GetBlackChatMessage) <> 10 then exit;
end else
begin
GameTab(5);
Wait(1000 + Random(900));
Mouse(580, 300, 5, 5, false);
Wait(300 + Random(500));
ChooseOption('xamine');
Wait(1000 + Random(1000));
end;
end;
exit;
end;
end;

{*******************************************************************************
function MyObjectFinder(var x, y: Integer; UpTxt: String; objcol, objsize, offsetx, offsety, ax1, ay1, ax2, ay2: integer): Boolean;
Description: My object finder in beta..
*******************************************************************************}
function MyObjectFinder(var x, y: Integer; UpTxt: String; objcol, objsize, offsetx, offsety, ax1, ay1, ax2, ay2: integer): Boolean;
var objTPA: TpointArray;
ATPA: T2DPointArray;
h, i, cx, cy: integer;
begin
cx := ((ax2 - ax1) div 2);
cy := ((ay2 - ay1) div 2);
FindColorsSpiralTolerance(cx, cy, objTPA, objcol, ax1, ay1, ax2, ay2, 4);
if Length(objTPA) > 0 then
begin
ATPA := SplitTPAEx(objTPA, objsize, objsize);
h := High(ATPA);
if Length(ATPA) > 0 then
begin
for i := 0 to h do
begin
MiddleTPAEx(ATPA, x, y);
x := x + offsetx;
y := y + offsety;
MMouse(x, y, 1, 1);
wait(600 + Random(600));
if IsUpText(UpTxt) or (UpTxt = 'none') then
begin
result := true;
exit;
end;
i := i + 1;
wait(500 + Random(500));
end;
end;
end;
writeln('Could not find Object');
end;

{*******************************************************************************
function FindTree(var a, b: Integer; Treetype : String): Boolean;
By: Negaal (Slightly modded by me for this script)
Description: Finds Trees and returns x & y coords.
Treetype: tree, yew, oak, willow, all
*******************************************************************************}
function FindTree(var a, b: Integer; Treetype : String): Boolean;
var
TPA : TpointArray;
ATPA: T2DPointArray;
i, C, CTS, Count, treecol: integer;
Uptext : String;
Colors : Array of integer;
SortedTPA : TPointArray;
x, y, z, h, s, l : extended;
begin
Case lowercase(TreeType) of
'tree' : begin
Uptext := 'ree';
treecol:= 2446923;
end;
'oak' : begin
UpText := 'ak';
treecol:= 2446923;
end;
'willow' : begin
UpText := 'illo';
treecol:= 2446923;
end;
'yew' : begin
UpText := 'ew';
treecol:= 2966339;
end;
'magic' : begin
UpText := 'agic';
treecol:= 2966339;
end;
'all' : begin
UpText := 'hop d';
treecol:= 2446923;
end;
end;
CTS := GetColorToleRanceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.15, 0.5);
FindColorsSpiralTolerance(mscx, mscy, TPA, treecol, msx1, msy1, msx2, msy2, 10);
ColorToleranceSpeed(CTS);
SetColorspeed2Modifiers(0.2, 0.2);
TPA:=ReArrangeandShortenArrayEx(TPA, 5, 5);
Colors := GetColors(TPA);
SetLength(SortedTPA, Length(TPA));
Count := 0;
for C := 0 to High(TPA) do
begin
colortoxyz(colors, x, y, z);
if(x > 1)and(x < 22)and(y > 0)and(y < 11)and(z > 1)and(z < 28)then
begin
colortohsl(colors, h, s, l);
if (h > 17)and(h < 22)and(s > 23)and(s < 62)and(l > 7)and(l < 45) then
begin
SortedTPA[Count] := TPA[C];
Count := Count + 1;
end;
end;
end;
SetLength(SortedTPA, Count);
SortedTPA := TPA;
begin
ATPA := SplitTPAEx(SortedTPA, 12, 12);
SortATPAFrom(ATPA, IntToPoint(mscx, mscy));
for i := 0 to High(ATPA) do
if Length(ATPA) >= 50 then
begin
MiddleTPAEx(ATPA, a, b);
MMouse(a-10, b-10, 21, 21);
Wait(50 + random(50));
if IsUpText(UpText)then
begin
Result := True;
Getmousepos(a, b);
Exit;
end;
end;
end;
end;

{*******************************************************************************
procedure DropUnwanted;
Description: Drops unwanted items..
*******************************************************************************}
procedure DropUnwanted;
var x, y, i, DTMa2z: integer;
UnwantedDTM: Array of Integer;
begin
SetLength(UnwantedDTM, 11);
UnwantedDTM[0] := DTMFromString('78DA63E4656060E0624001F764EF307000694' + // Security Book
'620FE0F048C4C408610031A60442281340F906021A0460A487010' +
'50230C24C4F1AB0100A6DF0671');
UnwantedDTM[1] := DTMFromString('78DA631461606010604001CB26C7337000694' + // Baguette
'620FE0F048CEC408604031A60442281B434906021420D1F013502' +
'84ED020096E3065E');
UnwantedDTM[2] := DTMFromString('78DA631460606010624001FC45CE0C1C409A1' + // Frog Token
'188FF0301232B90C1C4800618914820AD00245808A89103120A04' +
'D480EC91C3AF06000AB00582');
UnwantedDTM[3] := DTMFromString('78DA63E46160601067400117CF9B31B002694' + // Strength Potion (2)
'620FE0F048C1C40060F031A60442281343F906025A0461848C812' +
'50C34A580D00B1530683');
UnwantedDTM[4] := DTMFromString('78DA63E4606060006124505815CCC006A4198' + // Spinach Roll
'1F83F103082E49918D000231209A4F98850C30324B809A8612252' +
'8D207E3500026305B3');
UnwantedDTM[5] := DTMFromString('78DA631467606010624001B37A3C185881342' + // Triangle Sandwich
'310FF0702466E20839F010D302291405A09487010502307242409' +
'A81101122AF8D500008613065A');
UnwantedDTM[6] := DTMFromString('78DA6314646060E0614001829D620C6C409A1' + // Kebab
'188FF0301233F90C1CC800618914820CD0224F809A8E102129204' +
'D44813360700F2D80550');
UnwantedDTM[7] := DTMFromString('78DA63E46560601064400197E74931B002694' + // Beer
'620FE0F048C2C40063F031A60442281B414116A40763113A14686' +
'801A3620C14A408D109090C2AF0600467D066B');
UnwantedDTM[8] := DTMFromString('78DA63E4656060E06140017545D60C6C409A1' + // Bread Roll
'188FF0301230790C1C68006189148202D4C841A7120C14D400DC8' +
'3D4204D4B0020901FC6A000D0605D5');
UnwantedDTM[9] := DTMFromString('78DA6314626060E0614001930A5D18D880342' + // Pie
'310FF070246901A660634C0884402692520C147408D30901027A0' +
'861548F0E35703005E7D05F9');
UnwantedDTM[10]:= DTMFromString('78DA63E4656060E061400173BA23195881342' + // Square Sandwich
'310FF0702460120439C010D302291405A02D31C0C35FC40829580' +
'1A7620C149400DC80C21FC6A005AC00632');

GameTab(4);

for i := 0 to High(UnwantedDTM) do
begin
DTMa2z := UnwantedDTM
if FindDTM(DTMa2z, x, y, 546, 203, 737, 466) then
begin
mouse(x, y, 2, 2, false);
wait(500 + Random(500));
ChooseOption('rop');
wait(1000 + Random(1000));
end;
FreeDTM(DTMa2z);
end;

{ if CoinAmount('Inv') > 0 and CoinAmount('Inv') < 299 then // Drop Coins if less than 299 (Not Working Yet)
begin
coinbmp := loadcoinbmp;
FindBitmapToleranceIn(coinbmp, x, y, 546, 203, 737, 466, 1);
writeln(IntToStr(x) + ' ' + IntToStr(y));
mouse(x, y, 3, 3, false);
wait(500 + Random(500));
ChooseOption('rop');
wait(1000 + Random(1000));
FreeBitmap(coinbmp);
end; }
end;

{*******************************************************************************
function MyInPin(pin: String): Boolean;
by: RSN / Starblaster100 (Modded by Xaviar to cope if incorrect pin has been entered.)
Description: Puts in bank pin. Results True if XXX
*******************************************************************************}

function MyInPin(pin: string): Boolean;
var
iNumber, i, i2, i3: Integer;
begin
i := 0;
i3 := 0;
result := true;
repeat
for iNumber := 1 to Length(pin) do
begin
MMouse(395, 175, 10, 10);
Wait(500 + Random(500));
ClickText(pin[iNumber], upchars, 1, 1, 512, 336, True);
Wait(200 + Random(200));
end;

i2 := 0;
i3 := i3 + 1;

while not BankScreen or (i2 <= 3) do
begin
if (Pos('ncorrect', lowercase(GetTalkingNPCName)) > 10) or (Pos('t know', lowercase(GetTalkingNPCName)) > 4) then
begin
i := i + 1;
if i <= 3 then ClickContinue(true, true) else
begin
writeln('Wrong Pin Entered 3 times. Logging Out');
LogOut;
result := false;
exit;
end;
end else wait(800);
i2 := i2 + 1
end;
Wait(100);
if i3 >= 3 then
begin
writeln('Wrong Pin Entered 3 times. Logging Out');
result := false;
exit;
end;
until BankScreen or not LoggedIn;
end;


{*******************************************************************************
function PTimeRunning: String;
By: from Phalanxs script/RsN (Slighted Modded by Xaviar for Player Time)
Description: Returns Time since ST (Script StartTime).
*******************************************************************************}
function PTimeRunning: String;
var
RHours, Minutes, Seconds, RMinutes, RSeconds: LongInt;
Time: string;
begin
Seconds := ((GetSystemTime div 1000) - PlayerStartTime);
Minutes := Seconds div 60;
RHours := Minutes div 60;
Time := IntToStr(Seconds) + ' Seconds';
if Minutes <> 0 then
begin
RSeconds := Seconds mod (Minutes * 60);
Time := IntToStr(Minutes) + ' Minutes and ' + IntToStr(RSeconds) +
' Seconds';
end;
if RHours <> 0 then
begin
RMinutes := Minutes mod (RHours * 60);
RSeconds := Seconds mod (Minutes * 60);
Time := IntToStr(RHours) + ' Hours, ' + IntToStr(RMinutes) +
' Minutes and ' + IntToStr(RSeconds) + ' Seconds';
end;
Result := Time;
end;

{*******************************************************************************
procedure FinalUCBReport;
Description: Displays the final report.
*******************************************************************************}
procedure FinalUCBReport;
var i, TLoads, TYews, TMagic, TXP, TBSeeds, TBRings, TBEggs, TRands: integer;
trstring: string;
begin
for i := 0 to Length(Players) - 1 do
begin
TLoads := TLoads + Players.Banked;
TYews := TYews + Players.Integers[4];
TMagic := TMagic + Players.Integers[8];
TXP := TXP + Players.Integers[3];
TBSeeds := TBSeeds + Players.Integers[5];
TBRings := TBRings + Players.Integers[6];
TBEggs := TBEggs + Players.Integers[7];
TRands := TRands + Players.Integers[9];
end;

writeLn('###################################################################');
writeLn(' Ultra Cut n Bank ' + UCBversion);
writeLn(' Final Report');
writeLn(' Ran for: ' + TimeRunning);
writeLn(' Total Players: ' + IntToStr(Length(Players)));
writeLn(' Total Banks: ' + DigitGroup(TLoads));
if TYews > 0 then writeLn(' Total Yew Logs Banked: ' + DigitGroup(TYews));
if TMagic > 0 then writeLn(' Total Magic Logs Banked: ' + DigitGroup(TMagic));
if TBSeeds > 0 then writeLn(' Birds Nests (Seeds) Banked: ' + DigitGroup(TBSeeds));
if TBRings > 0 then writeLn(' Birds Nests (Rings) Banked: ' + DigitGroup(TBRings));
if TBEggs > 0 then writeLn(' Birds Nests (Eggs) Banked: ' + DigitGroup(TBEggs));
if TRands > 0 then writeLn(' Random Event Items Banked: ' + DigitGroup(TRands));
writeLn(' Total XP earned: ' + DigitGroup(TXP));
writeLn('###################################################################');
for i := 0 to Length(Players) - 1 do
begin
if Players.Active then trstring := 'Yes' else trstring := 'no';
writeln('Player' + IntToStr(i) + ' Still Active? ' + trstring + '. earned: ' + IntToStr(Players.Integers[3]) + ' XP. reason ended: ' + Players.Strings[2]);
end;
SendSRLReport;
end;

{*******************************************************************************
procedure UCBPlayerReport(ReasonPlayerEnded: String; DebugImage, LoggedInFail: boolean);
Description: Displays Report when called on current totals.
Quits and Saves/Displays a Debug image when appropriate.
ReasonPlayerEnded: String explaing why, when, where it UCBPlayerReport was called. Enter None if Not Ended
DebugImage: Boolean, If true will save & display a screen capture of moment script ended.
LoggedInFail: Bolean, Checks to see if script is being called because of "not LoggedIn" being called
LoggedIn ocasionally reports the wrong status, with this option enabled it will wait
and re-check a few times before either continuing or returning.
*******************************************************************************}
procedure UCBPlayerReport(ReasonPlayerEnded: String; DebugImage, LoggedInFail: boolean);
var i: integer;
d: string;
b: boolean;
begin
if Players[CurrentPlayer].Booleans[3] and DebugImage then SaveScreenshot('UCBDebug.bmp');

if LoggedInFail then
begin
if DebugOn then SaveScreenshot('UCBLogin-Debug.bmp');
for i := 1 to 5 do
begin
// writeln('LogggedIn Returned "False", Retry ' + IntToStr(i) + ' of 10');
wait(2000);
if LoggedIn then
begin
writeln('LoggedIn Failure Recovered..');
ReasonPlayerEnded := 'none';
exit;
end;
end;
end;

if LoggedIn then
begin
Players[CurrentPlayer].Integers[3] := (GetXP('woodcutting') - Players[CurrentPlayer].Integers[1]);
Players[CurrentPlayer].Integers[2] := GetSkillInfo('woodcutting',false);
Players[CurrentPlayer].Integers[12]:= XpTillNextLevel('woodcutting');
wait(500 + Random(600));
end;

// I did want to have the GetSkillInfo Check in CheckIfBank procedure however it created
// a conflict with CountItemDTM constantly switching between GameTabs..
if (PMaxLevel > 0) and (PMaxLevel <= GetSkillInfo('woodcutting',False)) then ReasonPlayerEnded := 'Woodcutting Skill Level ' + IntToStr(GetSkillInfo('woodcutting',False)) + ' Reached';
if (PMaxXp > 0) and (PMaxXp <= (GetXP('woodcutting') - Players[CurrentPlayer].Integers[1])) then ReasonPlayerEnded := 'Your Requested XP earned for this player has been reached';

writeLn('###################################################################');
writeLn(' Ultra Cut n Bank ' + UCBversion);
writeLn(' Player Report for: ' + Players[CurrentPlayer].Name);
writeln(' Location: ' + Players[CurrentPlayer].Loc);
writeLn(' Ran for: ' + PTimeRunning);
writeLn(' Loads Banked: ' + DigitGroup(Players[CurrentPlayer].Banked));

if Players[CurrentPlayer].Integers[4] > 0 then writeLn(' Yew Logs Banked: ' + DigitGroup(Players[CurrentPlayer].Integers[4]));

if Players[CurrentPlayer].Integers[8] > 0 then writeLn(' Magic Logs Banked: ' + DigitGroup(Players[CurrentPlayer].Integers[8]));

if Players[CurrentPlayer].Integers[5] > 0 then writeLn(' Birds Nests (Seeds) Banked: ' + DigitGroup(Players[CurrentPlayer].Integers[5]));

if Players[CurrentPlayer].Integers[6] > 0 then writeLn(' Birds Nests (Rings) Banked: ' + DigitGroup(Players[CurrentPlayer].Integers[6]));

if Players[CurrentPlayer].Integers[7] > 0 then writeLn(' Birds Nests (Eggs) Banked: ' + DigitGroup(Players[CurrentPlayer].Integers[7]));

if Players[CurrentPlayer].Integers[9] > 0 then writeLn(' Random Event Items Banked: ' + DigitGroup(Players[CurrentPlayer].Integers[9]));

if (PMaxLoads > 0) and (PMaxLoads <= Players[CurrentPlayer].Banked) then
begin
ReasonPlayerEnded := 'Total Player Loads Banked Limit Reached.';
if LoggedIn then LogOut;
KeepPlayer := false;
end;

b := true;

if (ReasonPlayerEnded <> 'none') then
begin
writeLn(' Reason Player Ended: ' + ReasonPlayerEnded);
Players[CurrentPlayer].Strings[2] := ReasonPlayerEnded;
if LoggedIn then LogOut;
if not Players[CurrentPlayer].Booleans[2] then KeepPlayer := false;
b := false;
end;

if (SessLoads > 0) and (Players[CurrentPlayer].Integers[11] >= SessLoads) and b then
begin
Players[CurrentPlayer].Booleans[2] := true;
writeLn(' Reason Player Ended: Maximum Loads Banked this session…');
end;

if Players[CurrentPlayer].Integers[2] > Players[CurrentPlayer].level[20] then d := 'now' else d := 'still';
writeLn(' Player ' + Players[CurrentPlayer].Name + ' Started at Level ' + IntToStr(Players[CurrentPlayer].level[20]) + ' and is ' + d + ' at Level ' + IntToStr(Players[CurrentPlayer].Integers[2]));

writeLn(' You earned ' + DigitGroup(Players[CurrentPlayer].Integers[3]) + ' xp This session with ' + DigitGroup(Players[CurrentPlayer].Integers[12]) + ' xp to the next Level');
writeLn(' Overall Running Time: ' + TimeRunning);
writeLn('###################################################################');
CIBTrue := false;
SRLRandomsReport;
SendSRLReport;
end;

{*******************************************************************************
function CheckIfBank: Boolean;
By: Xaviar
Description: Returns True if any condition that may require banking is met.
*******************************************************************************}
function CheckIfBank: Boolean;
var i, TLoads, TLogs, TXP: integer;
begin
if not LoggedIn then exit;
result := true;
if CIBTrue then exit;
result := false;
GameTab(4);
if InvFull then
begin
DropUnwanted;
wait(500);
if InvFull then result := true;
end;

CIBReason := 'none';

for i := 0 to Length(Players) - 1 do
begin
TLoads := TLoads + Players.Banked;
TLogs := TLogs + Players.Integers[4] + Players.Integers[8];
TXP := TXP + Players.Integers[3];
end;

if (TMaxTime > 0) and (TMaxTime <= ((GetTimeRunning div 1000) div 60)) then
begin
writeLn('Maximum Overall Time Limit Reached….');
result := true;
CIBTrue := true;
CIBReason := 'Maximum Overall Time Limit Reached.';
EndAllPlayers;
exit;
end;

if (TMaxLogs > 0) and (TMaxLogs <= TLogs) then
begin
writeLn('Total Logs Banked limit reached….');
result := true;
CIBTrue := true;
CIBReason := 'Total Logs Banked limit reached.';
EndAllPlayers;
exit;
end;

if (TMaxLoads > 0) and (TMaxLoads <= TLoads) then
begin
writeLn('Total Loads Banked limit reached…..');
result := true;
CIBTrue := true;
CIBReason := 'Total Loads Banked limit reached.';
EndAllPlayers;
exit;
end;

if (TMaxXp > 0) and (TMaxXp <= TXP) then
begin
writeLn('Total amount of XP earned limit has been reached…..');
result := true;
CIBTrue := true;
CIBReason := 'Total amount of XP earned limit has been reached.';
EndAllPlayers;
exit;
end;

if (PMaxTime > 0) and (PMaxTime <= (((GetSystemTime - Players[CurrentPlayer].Integers[10]) div 1000) div 60)) then
begin
writeLn('Maximum Total Time Limit for this player has been reached….');
result := true;
CIBTrue := true;
CIBReason := 'Maximum Time Limit for this player has been reached.';
exit;
end;

if (SessTime > 0) and (SessTime <= (((GetSystemTime div 1000) - PlayerStartTime) div 60)) then
begin
writeLn('Maximum Time reached for this session…');
result := true;
CIBTrue := true;
CIBReason := 'Maximum Time reached for this session… Changing Player.';
Players[CurrentPlayer].Booleans[2] := true;
exit;
end;

if (PMaxLogs > 0) and (PMaxLogs <= Players[CurrentPlayer].Integers[4] +
Players[CurrentPlayer].Integers[8] + CountItemsDtm('inv', YewDTM) + CountItemsDtm('inv', MagicDTM)) then
begin
writeLn('Maximum Logs for player reached');
result := true;
CIBTrue := true;
CIBReason := 'Total Player Logs Cut Limit Reached.';
exit;
end;
end;

{*******************************************************************************
function ExistsItemCustom(i: Integer): Boolean;
By: WT-Fakawi Slightly Modded to avoid GameTab Warnings.
Description: Checks if item in inventory at specified position exists
*******************************************************************************}

function ExistsItemCustom(i: Integer): Boolean;
var
x, y:Integer;
TB: TBox;
begin
TB := InvBox(i);
Result := FindColor(x, y, 65536, TB.x1 + 5, TB.y1 + 5, TB.x2 - 5, TB.y2 - 5);
end;

{*******************************************************************************
Function GetInvItemBoundsCustom(InvSpot: Integer; T: TBox): Boolean;
By: Wizzup? Slightly Modded to avoid GameTab Warnings.
Description: If item exists, returns TBox of the item, else returns the normal InvBox.
*******************************************************************************}

Function GetInvItemBoundsCustom(InvSpot: Integer; Var T: TBox): Boolean;

Var
TPA: TPointArray;

Begin
T := InvBox(InvSpot);
FindColorsTolerance(TPA, 65536, T.x1, T.y1, T.x2, T.y2, 0);
If Length(TPA) = 0 Then
Begin
Result := False;
T := InvBox(InvSpot);
Exit;
End;
Result := True;
T := GetTPABounds(TPA);
End;

{*******************************************************************************
procedure MMouseItemCustom(i: Integer);
By: WT-Fakawi Slightly Modded to avoid GameTab Warnings.
Description: Moves mouse to specified inventory spot
*******************************************************************************}

procedure MMouseItemCustom(i: Integer);
var
TB: TBox;
x, y: integer;
begin
GetInvItemBoundsCustom(I, TB);
MouseBox(TB.X1 + 4, TB.Y1 + 4, TB.X2 - 4, TB.Y2 - 4, 3);
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
end;

{*******************************************************************************
procedure DepositCustom(slot, toslot, vType: Integer);
by: WT-Fakawi/PPLSUQBAWLZ/Stupid3ooo/Town Slightly Modded to avoid GameTab Warnings.
Description: Deposits from Slot to ToSlot.
vType True = Deposit All. vType False = Deposit one by one.
Any integer is deposit with Deposit X. (except for 5 and 10)
*******************************************************************************}
Procedure DepositCustom(SlotFrom, SlotTo: Integer; vType: Variant);

Var
DepositX: Boolean;
All: Variant;
I, T, x, y: Integer;

Begin
If Not BankScreen Then
Exit;
If vType = 2 Then
srl_Warn('Deposit', '2 now means store per 2, not ''All''', 15);
DepositX := False;
Case VarType(vType) Of
3: Begin
DepositX := Not InIntArray([1, 5, 10], vType);
If vType = 1 Then
All := False
Else
All := True;
End;
11: All := vType;
End;
For I := SlotFrom To SlotTo Do
Begin
If Not ExistsItemCustom(I) Then
Continue;
MMouseItemCustom(I);
If DepositX Then
Begin
ChooseOption('Store X');
T := GetSystemTime;
While (Not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2)) And (GetSystemTime - T < 3000) Do
Wait(100);
TypeSend(vType);
End Else If VarType(vType) = 3 Then
ChooseOption('Store ' + vType)
Else
ChooseOption('Store All');
Wait(RandomRange(200, 300));
T := GetSystemTime;
While ExistsItemCustom(I) And (GetSystemTime - T < 2000) Do
Wait(50);
End;
End;

{*******************************************************************************
procedure CountBankedItems;
By: Xaviar
Description: Add all items in the back pack to a running total before banking.
*******************************************************************************}
procedure CountBankedItems;
var a, b, c, d, e, f, i: integer;
begin
if not LoggedIn then exit;
a := 0;
for i := 1 to 28 do if (ExistsItemCustom(i)) then a := a + 1;
b := CountItemsDtm('inv', YewDTM);
c := CountItemsDtm('inv', NestSeedDTM);
d := CountItemsDtm('inv', NestRingDTM);
e := CountItemsDtm('inv', NestEggDTM);
f := CountItemsDtm('inv', MagicDTM);

Players[CurrentPlayer].Integers[4] := (Players[CurrentPlayer].Integers[4] + b);
Players[CurrentPlayer].Integers[5] := (Players[CurrentPlayer].Integers[5] + c);
Players[CurrentPlayer].Integers[6] := (Players[CurrentPlayer].Integers[6] + d);
Players[CurrentPlayer].Integers[7] := (Players[CurrentPlayer].Integers[7] + e);
Players[CurrentPlayer].Integers[8] := (Players[CurrentPlayer].Integers[8] + f);
Players[CurrentPlayer].Integers[9] := (Players[CurrentPlayer].Integers[9] + (a - b - c - d - e - f));
Players[CurrentPlayer].Integers[11] := (Players[CurrentPlayer].Integers[11] + 1);
Players[CurrentPlayer].Banked := (Players[CurrentPlayer].Banked + 1);

// SRL Stats Reporting
ReportVars[0] := (ReportVars[0] + b); // Yews Banked Reported to SRL Stats
ReportVars[1] := (ReportVars[1] + (c + d + e)); // Birds Nests Banked Reported to SRL Stats
ReportVars[2] := (ReportVars[2] + (a - b - c - d - e - f)); // Randoms Items Banked Reported to SRL Stats
ReportVars[3] := (ReportVars[3] + 1); // Loads Banked Reported to SRL Stats
ReportVars[4] := (ReportVars[4] + f); // Magic Logs Banked Reported to SRL Stats
Banks := (Banks + 1); // Official Banked Stats for Global SRL Report
end;

{*******************************************************************************
function AutoTreeSymb: Integer;
By: Xaviar and ACA2
Description: Finds colour of Tree Symbol.
*******************************************************************************}
function AutoTreeSymb: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.23, 1.71);

if not (FindColorsTolerance(arP, 822033, MMX1, MMY1, MMX2, MMY2, 9)) then
begin
Writeln('Failed to find the tree symbol by AutoColour.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
if (rs_OnMinimap(arP.x, arP.y)) then
begin
ColorToRGB(arC, R, G, B);

if (R >= 0) and (R <= 41) and (G >= 108) and (G <= 164) and (B >= 0) and (B <= 35) then
begin
ColorToXYZ(arC, X, Y, Z);

if (X >= 5.47) and (X <= 13.91) and (Y >= 10.93) and (Y <= 26.59) and (Z >= 1.83) and (Z <= 5.93) then
begin
Result := arC;
Break;
end;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then Writeln('AutoColor failed to find the Tree Symbol colour.');
end;

{*******************************************************************************
function AutoShopSymb: Integer;
By: Xaviar and ACA2
Description: Finds colour of Tree Symbol.
*******************************************************************************}
function AutoShopSymb: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.20, 1.48);

if not (FindColorsTolerance(arP, 2781117, MMX1, MMY1, MMX2, MMY2, 7)) then
begin
Writeln('Failed to find the shop symbol by AutoColour.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
if (rs_OnMinimap(arP.x, arP.y)) then
begin
ColorToRGB(arC, R, G, B);

if (R >= 164) and (R <= 203) and (G >= 89) and (G <= 136) and (B >= 25) and (B <= 69) then
begin
ColorToXYZ(arC, X, Y, Z);

if (X >= 19.72) and (X <= 33.05) and (Y >= 15.88) and (Y <= 29.42) and (Z >= 3.23) and (Z <= 9.22) then
begin
Result := arC;
Break;
end;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then Writeln('AutoColor failed to find the Shop Symbol colour.');
end;

{*******************************************************************************
function AutoBankSymb: Integer;
By: Xaviar and ACA2
Description: Finds colour of Bank Symbol.
*******************************************************************************}
function AutoBankSymb: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.45);

if not (FindColorsTolerance(arP, 3002600, MMX1, MMY1, MMX2, MMY2, 13)) then
begin
Writeln('Failed to find the bank symbol by AutoColour.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
if (rs_OnMinimap(arP.x, arP.y)) then
begin
ColorToRGB(arC, R, G, B);

if (R >= 205) and (R <= 255) and (G >= 181) and (G <= 227) and (B >= 0) and (B <= 96) then
begin
ColorToXYZ(arC, X, Y, Z);

if (X >= 42.74) and (X <= 68.56) and (Y >= 46.79) and (Y <= 75.55) and (Z >= 7.39) and (Z <= 21.44) then
begin
Result := arC;
Break;
end;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then Writeln('AutoColor failed in finding the bank symbol color.');
end;

{*******************************************************************************
function FindMMTPA(var x, y: integer; color, tol, cts, ObjWidth, ObjHeight, minCount :Integer): Boolean;
By: Wizzup? Modded by Xaviar for use in MiniMap
Description: Finds object using WizzyPlugin functions.
Starts with a Spiral from x and y.
Put in the color, Tolerance and ColorToleranceSpeed.
If you dont know what colortolerancespeed to choose, put in -1.
ObjWidth and ObjHeight are the parameters TPAToATPAEx uses, thus filtering
the MSs FindColorsSpiralTolerance points in boxes defined by
ObjWidth and ObjHeigth.
minCount is the amount of colors it should at least find in a Object box.
*******************************************************************************}
function FindMMTPA(var x, y: integer; color, tol, cts, ObjWidth, ObjHeight, minCount :Integer): Boolean;
var
I, tcts: Integer;
myPoint: TPoint;
Points: TPointArray;
aPoints: T2DPointArray;
begin
tcts := GetColorToleranceSpeed;
if not (cts >= 0) and (cts <= 2) then
cts := 1; // Standard.
ColorToleranceSpeed(cts);
FindColorsSpiralTolerance(x, y, Points, Color, MMX1, MMY1, MMX2, MMY2, Tol);
aPoints := TPAtoATPAEx(Points, ObjWidth, ObjHeight);
SetLength(Points, 0);
for I := 0 to Length(aPoints) - 1 do
begin
if Length(aPoints) < minCount then
Continue;
myPoint := MiddleTPA(aPoints);
ColorToleranceSpeed(1);
x := myPoint.X;
y := myPoint.Y;
Result := True;
ColorToleranceSpeed(tcts);
ColorToleranceSpeed(cts);
end;
ColorToleranceSpeed(tcts);
end;

{*******************************************************************************
function GetIconColours: boolean;
By: Xaviar
Description: Gets Current Colour of Bank and Tree Icons in Mini Map
*******************************************************************************}
function GetIconColours: boolean;
var sf, i: integer;
begin
result := false;
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: GetIconColours.', false, true);
exit;
end;

MarkTime(sf);
i := 0;
repeat
if TimeFromMark(sf) >= 15000 then
begin
i := i + 1;
writeLn('Cannot Find Bank Icon.. Logging Out and In Again to Change Icon Position.');
if i >= 5 then
begin
UCBPlayerReport('Could Not Find Bank Icon After 5 Login Attempts.', false, false);
exit;
end;
Logout;
LoginPlayer;
MarkTime(sf);
SetRun(true);
end;

if AutoBankSymb > 0 then
begin
Players[CurrentPlayer].Integers[15] := AutoBankSymb;
writeln('Found Bank Symbol by AutoColour, Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[15]));
Break;
end else if FindSymbol(x, y, 'tree') then
begin
Players[CurrentPlayer].Integers[15] := GetColor(x + 1, y);
writeln('Found Bank by Symbol, Bank Symbol Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[15]));
Break;
end;
writeln('Please make sure your players location is set correctly and you are in the correct bank.');
writeln('Trying to find bank symbol again…');
writeln(' ');
wait(5000 + Random(3000));
until Players[CurrentPlayer].Integers[15] > 0;

MarkTime(sf);

i := 5;
repeat
if TimeFromMark(sf) >= 15000 then
begin
writeLn('Cannot Find Tree Icon.. moving position and trying again.');
If FindColor(x, y, Players[CurrentPlayer].Integers[15], 550, 7, 682, 161) then
begin
mouse(x - 3, y + i, 6, 3, true);
flag;
wait(500);
i := i + 30;
end else mouse(625, 85 + i, 6, 3, true);
end;

if i >= 70 then
begin
UCBPlayerReport('Could Not Find Tree Icon After 3 attempts to reposition.', false, false);
exit;
end;

if AutoTreeSymb > 0 then
begin
Players[CurrentPlayer].Integers[16] := AutoTreeSymb;
writeln('Found Tree Symbol by AutoColour, Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[16]));
end else if FindSymbol(x, y, 'tree') then
begin
Players[CurrentPlayer].Integers[16] := GetColor(x + 2, y);
writeln('Found Tree by Symbol, Tree Symbol Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[16]));
end;
wait(50);
until Players[CurrentPlayer].Integers[16] > 0;

result := true;
end;

{*******************************************************************************
function FindTheAxe(var AxePos: integer; var TypeOfAxe: string; AxeInInv: boolean): boolean;
By: Xaviar
Description: Attempts to find an axe in the players inventory or hand.
If an axe is found it checks to see if the player can use it for
woodcutting and checks to see if it can be wielded. If an axe has to be
in the inventory it always moves it to slot 1 if it isn;t already there.
AxeInInv: Set to True and it will move axe from hand to inventory slot 1 if it can.
Set to False and it will move axe from inventory to hand.
AxePos: Returns 0 if no axe is found, 1 if Axe is in hand & 2 if axe is in inventory.
It does this because even if you have Set AxeInv to False it is still
possible that the axe may not be wieldable. Usefull to know if depositing in bank etc.
TypeOfAxe: Return the Type of Axe Being used or 'None Found' if no axe is present.

FindTheAxe returns True if a usable axe is found.
*******************************************************************************}
type AllAxes = record
AxeDTM: integer;
AxeName: string;
MinLvl: integer;
AttLvl: integer;
end;
function FindTheAxe(var AxePos: integer; var TypeOfAxe: string; AxeInInv: boolean): boolean;
var ax, ay, SklWood, SklAtt, ctab, DTMAxe: integer;
i: integer;
AxeList: Array of AllAxes;
begin
SetLength(AxeList, 8);
AxeList[0].AxeDTM := DTMFromString('78DA6314616060E0664001A962BC0CFC409A1' +
'188FF0301231790C1C58006189148202D03243809A81106124204' +
'D430010919FC6A00E8B5053D');
AxeList[0].AxeName := 'Dragon Axe';
AxeList[0].AttLvl := 60;
AxeList[0].MinLvl := 61;

AxeList[1].AxeDTM := DTMFromString('78DA639CCEC4C0F09401051485F1318800694' +
'620FE0F048C4B806AEEA2AA718E4864E082AA0101C6C54035F751' +
'D5D887C6A1AA590A547313558D4B740A8A1A00CFA10E03');
AxeList[1].AxeName := 'Rune Axe';
AxeList[1].AttLvl := 40;
AxeList[1].MinLvl := 41;

AxeList[2].AxeDTM := DTMFromString('78DA6374606060686440014D497C0C22409A1' +
'188FF0301A337905187AAC6C6D786810BAA0604187D804415AA1A' +
'7B7F7B5435BE40A21C558D73B0338A1A00C1660AA8');
AxeList[2].AxeName := 'Adamant Axe';
AxeList[2].AttLvl := 30;
AxeList[2].MinLvl := 31;

AxeList[3].AxeDTM := DTMFromString('78DA633CC4C4C010C0C8800C5A53F81852803' +
'448F43F10309E05AAF14155636111CCC0055503028CE7816A5C51' +
'D5D839C4A2AA3981A9C6C52D0D450D0061FC0C64');
AxeList[3].AxeName := 'Mithril Axe';
AxeList[3].AttLvl := 20;
AxeList[3].MinLvl := 21;

AxeList[4].AxeDTM := DTMFromString('78DA63E4656060E06240038C0C1C609281E13' +
'F1030F200194C986A1024901606126CA82AC4444450D5B0020919' +
'FCE60000E9AC04AD');
AxeList[4].AxeName := 'Black Axe';
AxeList[4].AttLvl := 10;
AxeList[4].MinLvl := 6;

AxeList[5].AxeDTM := DTMFromString('78DA63CC636260D8C3C8800C5A53F81852803' +
'448F43F10305602D5EC4055939B9ACAC0055503028CD540351B51' +
'D594E5E5A2AA29C154D3545989A20600C3BC0E32');
AxeList[5].AxeName := 'Steel Axe';
AxeList[5].AttLvl := 5;
AxeList[5].MinLvl := 6;

AxeList[6].AxeDTM := DTMFromString('78DA63BCC9C4C0309191010498182020C6859' +
'34103488344FF0301E353A04C2F230332F0707161E082AA0101C6' +
'0740356DA86A22838351D5BC00AAE94655932ACA89AAE639A6394' +
'1DEDE286A00B1F90F6D');
AxeList[6].AxeName := 'Iron Axe';
AxeList[6].AttLvl := 1;
AxeList[6].MinLvl := 1;

AxeList[7].AxeDTM := DTMFromString('78DA63EC626060086140016DA97C0C22409A1' +
'188FF0301E33420C307558D97A5220317540D08304E051201A86A' +
'DCCCE451D54C07129EA86AFC6C5450D40000D77E0AA2');
AxeList[7].AxeName := 'Bronze Axe';
AxeList[7].AttLvl := 1;
AxeList[7].MinLvl := 1;

ctab := GetCurrentTab;
SklWood := GetSkillInfo('woodcutting',False);
SklAtt := GetSkillInfo('attack', False);

for i := 0 to High(AxeList) do
begin
GameTab(4);
DTMAxe := AxeList.AxeDTM;
if FindDTM(DTMAxe, ax, ay, 546, 203, 737, 466) then
begin
if (SklWood < AxeList.MinLvl) then
begin
writeLn('Found ' + AxeList.AxeName + ' but you do not have a high enough Woodcutting level to use it.');
writeLn('You Need to be Woocutting Level ' + IntToStr(AxeList.MinLvl) + ' or higher.');
writeLn('Looking for another axe……….');
end else
begin
if (SklAtt >= AxeList.AttLvl) and not AxeInInv then
begin
writeLn('Found a ' + AxeList.AxeName + ' and moving it into your players hand.');
Mouse(ax, ay, 10, 4, true);
wait(600 + Random(600));
AxePos := 1;
AxeInInv := false;
end else
begin
if (ax < 600) and (ay < 245) then writeLn('Found a ' + AxeList.AxeName + '.') else
begin
writeLn('Found a ' + AxeList.AxeName + 'and moving it to slot 1.');
MMouse(ax, ay, 0, 0);
HoldMouse(ax, ay, true);
wait(600 + Random(600));
MMouse(575, 230, 0, 0);
ReleaseMouse(575, 230, true);
end;
AxePos := 2;
AxeInInv := true;
end;
wait(500 + Random(400));
result:= true;
FreeDTM(DTMAxe);
GameTab(ctab);
TypeOfAxe := AxeList.AxeName;
exit;
end;
end;
end;

for i := 0 to High(AxeList) do
begin
GameTab(5);
DTMAxe := AxeList.AxeDTM;
if FindDTM(DTMAxe, ax, ay, 568, 285, 603, 321) then
begin
AxePos := 1;
if AxeInInv then
begin
writeLn('Found a ' + AxeList.AxeName + ' in your players hand. Moving to slot 1 of inventory.');
Mouse(ax, ay, 1, 1, true);
wait(700 + random(700));
GameTab(4);
wait(700 + random(700));
FindDTM(DTMAxe, ax, ay, 546, 203, 737, 466);
if not (ax < 600) and (ay < 245) then
begin
MMouse(ax, ay, 0, 0);
HoldMouse(ax, ay, true);
wait(600 + Random(600));
MMouse(575, 230, 0, 0);
ReleaseMouse(575, 230, true);
end;
AxePos := 2;
end else writeLn('Found a ' + AxeList.AxeName + ' in your players hand.');
result:= true;
FreeDTM(DTMAxe);
GameTab(ctab);
TypeOfAxe := AxeList.AxeName;
exit;
end;
end;
AxePos := 0;
result:= false;
TypeOfAxe := 'None Found';
FreeDTM(DTMAxe);
GameTab(ctab);
end;

{*******************************************************************************
function FindBothYews: boolean;
By: Xaviar
Description: Find Both Tree Icons in Mini Map
*******************************************************************************}
function FindBothYews: boolean;
var x2, y2, y3: integer;
begin
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: FindBothYews.', false, true);
if not KeepPlayer then exit;
end;
MakeCompass('N');
SetAngle(true);
x2:= 626; y2:= 25; y3:= 140;
if FindColorSpiral(x2, y2, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161) then
begin
if FindColorSpiral(x2, y3, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161) then
begin
if y3 - y2 > 25 then
begin
result:= true
exit;
end else result:= false;
end else result:= false;
end else result:= false;
UCBPlayerReport('Could Not Find Both Yew Symbols (Function: FindBothYews)', true, false);
end;

{*******************************************************************************
function FindTopYew: integer;
By: Xaviar
Description: Find Top Yew Based on Icon Colour and Area of Map..
Needs Tweaking Searches whole of Mini Map instead of small area
*******************************************************************************}
function FindTopYew: integer;
var y2: integer;
begin
x:= 626; y:= 25; y2:= y;
if FindColorSpiral(x, y, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161) then
begin
result:= y - y2;
end else result:= -1;
end;

{*******************************************************************************
function FindBottomYew integer;
By: Xaviar
Description: Find Bottom Yew Based on Icon Colour and Area of Map..
Needs Tweaking Searches whole of Mini Map instead of small area
*******************************************************************************}

function FindBottomYew: integer;
var y2: integer;
begin
x:= 626; y:= 140; y2:= y;
if FindColorSpiral(x, y, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161) then
begin
result:= y2 - y;
end else result:= -1;
end;


{*******************************************************************************
function BankItems: boolean;
By: Xaviar
Description: Banks all items once bank is open and returns true if successful.
*******************************************************************************}
function BankItems: boolean;
begin
if not LoggedIn then exit;
Wait(600 + Random(500));
if PinScreen then
begin
if not MyInPin(Players[CurrentPlayer].Pin) then
begin
UCBPlayerReport('BankItems: Failed to enter correct pin after 3 attempts.', false, false);
exit;
end;
end;
wait(500 + Random(500));
if BankScreen then result := true else exit;
CountBankedItems;
DepositCustom(FirstDeposit,28,true);
wait(500 + Random(1000));
DepositCustom(FirstDeposit,28,true); // Just as a Double Check because, although it rarely happens, it does occasionally fail to bank all items.
wait(500 + Random(1000));
CloseBank;
UCBPlayerReport(CIBReason, false, false);
CIBTrue := false;
end;

{*******************************************************************************
procedure AntiBan;
Description: Basic AntiBan Proceedure.
*******************************************************************************}
procedure AntiBan;
var OriginalDegrees: integer;
begin
case random(6) of
0: begin
OriginalDegrees := Round(rs_GetCompassAngleDegrees);
RandomMovement;
MakeCompass(IntToStr(OriginalDegrees));
SetAngle(true);
end;
1: begin
Players[CurrentPlayer].Integers[12]:= XpTillNextLevel('woodcutting');
Players[CurrentPlayer].Integers[2] := GetSkillInfo('woodcutting',false);
Players[CurrentPlayer].Integers[3] := (GetXP('woodcutting') - Players[CurrentPlayer].Integers[1]);
end;
2: PickUpMouse;
3: begin
OriginalDegrees := Round(rs_GetCompassAngleDegrees);
BoredHuman;
MakeCompass(IntToStr(OriginalDegrees));
SetAngle(true);
end;
4: begin
OriginalDegrees := Round(rs_GetCompassAngleDegrees);
RandomMovement;
MakeCompass(IntToStr(OriginalDegrees));
SetAngle(true);
end;
5: begin
OriginalDegrees := Round(rs_GetCompassAngleDegrees);
BoredHuman;
MakeCompass(IntToStr(OriginalDegrees));
SetAngle(true);
end;
end;
end;

{*******************************************************************************
function StrangePlantFinder: Boolean;
By: Xaviar
Description: Tries to detect the presence of a Strange Plant and pick it if found.
this function is in beta testing please report back any problems..
StrangePlantFinder: Returns true if it finds a plant.
*******************************************************************************}
function StrangePlantFinder: Boolean;
var l, spx, spy, StartSPF, FruitCount, FruitDTM: integer;
TPA1, TPA2, TPA3: TPointArray;
Begin
if not LoggedIn then exit;
result := false
spx := MSCX;
spy := MSCY;
if FindColorTolerance(spx, spy, 945749, MSCX - 100, MSCY - 110, MSCX + 100, MSCY + 90, 4) and FindColorTolerance(spx, spy, 743503, MSCX - 100, MSCY - 110, MSCX + 100, MSCY + 90, 4) then
begin
FindColorsSpiralTolerance(spx, spy, TPA1, 945749, MSX1, MSY1, MSX2, MSY2, 4);
FindColorsSpiralTolerance(spx, spy, TPA2, 743503, MSX1, MSY1, MSX2, MSY2, 4);
SetLength(TPA1, High(TPA1) + 1);
SetLength(TPA2, High(TPA2) + 1);
TPA3 := Find2TPApoints(TPA1, TPA2, 18, 18);
l := High(TPA3);
if l >= 0 then
begin
if FindObjTPA(spx, spy, 945749, 4, -1, 18, 18, 4, ['trange']) then
begin
writeln('Found Strange Plant attempting to Pick fruit.');
FruitDTM := DTMFromString('78DA63E4646060E0654001B30A8E30B001694' +
'620FE0F048CDC400633031A60442281B40090E026A08607488812' +
'50C30A244408A861C67433BA1A008467066B');
FruitCount := CountItemsDtm('inv', FruitDTM);
Result := True;
MarkTime(StartSPF);
repeat
if FindObjTPA(spx, spy, 945749, 4, -1, 18, 18, 4, ['trange']) then
begin
MMouse(spx, spy, 1, 1);
wait(250 + Random(250));
if IsUpText('trange') then
begin
wait(250 + Random(250));
Mouse(spx, spy, 1, 1, false);
wait(250 + Random(250));
ChooseOption('ick');
wait(500 + Random(600));
if Pos('ready to', GetBlackChatMessage) > 5 then wait(2000 + Random(1000)) else //Text: The fruit isn't ready to be picked yet…
if (Pos('fruit from', GetBlackChatMessage) > 5) or (CountItemsDtm('inv', FruitDTM) > FruitCount) then //Text: You pick the fruit from the plant.
begin
result := true;
writeln('Picked Fruit From Strange Plant.. Waiting for plant to die…');
FreeDTM(FruitDTM);
repeat
BoredHuman;
wait(2000 + random(1000));
until not FindObjTPA(spx, spy, 945749, 4, -1, 18, 18, 4, ['trange']) or FindFight;
Plants := Plants + 1;
SRLRandomsReport;
exit;
end else if Pos('unable', GetBlackChatMessage) > 5 then //Text: You're unable to pick the fruit.
begin
result := false;
writeln('The plant is not after you.. Waiting for plant to go…');
FreeDTM(FruitDTM);
repeat
BoredHuman;
wait(2000 + random(1000));
until not FindObjTPA(spx, spy, 945749, 4, -1, 18, 18, 4, ['trange']) or FindFight;
exit;
end;
end;
end else break;
until (TimeFromMark(StartSPF) > 120000) or FindFight;
writeln('Failed to Pick Fruit From Strange Plant');
FreeDTM(FruitDTM);
end;
end;
end;
end;

procedure CustomEdRunAway(WaitTime: integer); forward;

{*******************************************************************************
function CheckForAllRandoms: boolean;
By: Xaviar
Description: checks for combination of standard and cutom randoms. ongoing…
*******************************************************************************}
function CheckForAllRandoms: boolean;
begin
if Pos('tch sp', lowercase(GetTalkingNPCName)) > 0 then ClickContinue(true, true);
if FindNormalRandoms then result := true;
if FindInventoryRandoms then result := true;
if FindNonInventoryRandoms then result := true;
if FindTalk then result := true;
if Pos('arnav', lowercase(GetTalkingNPCName)) > 0 then
begin
UCBPlayerReport('CheckForAllRandoms: Capt Arnav, unsolvable random.', false, false);
result := false;
exit;
end;
if StrangePlantFinder then result := true;
if FindFight then
begin
Case lowercase(Players[CurrentPlayer].Loc) of
'edgeville' : CustomEdRunAway((Random(9000) + 3000));
'tree gnome stronghold - magic' : RunAway('E', true, 1, 3000);
'catherby yews' : RunAway('E', true, 1, 3000);
end;
end;
end;

{*******************************************************************************
procedure CutTillDown(treetype: string);
By: Xaviar
Description: Calls CheckForAllRandoms, Re-Clicks On Tree & Calls AntiBan functions
until Tree has Been Fully Cut Down. will not work without FindTree Function.
*******************************************************************************}
procedure CutTillDown(treetype: string);
var cdx, cdy, sc, RandWait: integer;
treetxt: string;
begin
treetype := lowercase(treetype);
treetxt := capitalize(treetype);
delete(treetxt,4,20);
cdx := MSCX;
cdy := MSCY;
if FindTree(cdx, cdy, treetype) then
begin
FindEnt(cdx, cdy, true);
MakeCompassCoords(cdx, cdy);
flag;
MyFindBirdsNest;
if CheckForAllRandoms then if FindTree(cdx, cdy, treetype) then
begin
if not KeepPlayer then exit;
If not FindEnt(cdx, cdy, false) then Mouse(cdx - 2, cdy - 2, 4, 4, true);
MakeCompassCoords(cdx, cdy);
flag;
end;
wait(1500 + Random(500));
if not CheckAxe then UCBPlayerReport('CutTillDown: Unable to cut down tree. CheckAxe = False', false, false);
if not KeepPlayer then exit;

MarkTime(sc);
RandWait := (12000 + Random(30000));
cdx := ((MSCX - 7) + Random(15));
cdy := ((MSCY - 94) + Random(8));
repeat
if not LoggedIn then
begin
UCBPlayerReport('CutTillDown: Not Logged In. Lost Connection or Unsolveable Random?', true, true);
if not KeepPlayer then exit;
end;

FindEnt(cdx, cdy, true);
if TimeFromMark(sc) > RandWait then
begin
if not FindEnt(cdx, cdy, true) then
begin
if CheckForAllRandoms then if FindTree(cdx, cdy, treetype) then
begin
if not KeepPlayer then exit;
If not FindEnt(cdx, cdy, false) then Mouse(cdx - 2, cdy - 2, 4, 4, true);
MakeCompassCoords(cdx, cdy);
wait(500 + Random(500));
flag;
end;

if random(100) >= 90 then
begin
AntiBan;
cdx := ((MSCX - 3) + Random(7));
cdy := ((MSCY - 95) + Random(7));
mmouse(cdx, cdy, 0, 0);
end else
begin
if FindTree(cdx, cdy, treetype) then
begin
Mouse(cdx - 3, cdy - 3, 6, 6, true);
MakeCompassCoords(cdx, cdy);
wait(random(500));
mmouse(cdx - 2, cdy - 2, 4, 4);
cdx := ((MSCX - 7) + Random(15));
cdy := ((MSCY - 94) + Random(8));
wait(1000 + Random(2000));
mmouse(cdx, cdy, 0, 0);
flag;
if not CheckAxe then
begin
UCBPlayerReport('CutTillDown: Unable to cut down tree, possible broken axe. CheckAxe = False', false, false);
if not KeepPlayer then exit;
end;
end else exit;
end;
end;
MarkTime(sc);
RandWait := (12000 + Random(30000));
end;
if CheckForAllRandoms or MyFindBirdsNest then if FindTree(cdx, cdy, treetype) then
begin
if not KeepPlayer then exit;
If not FindEnt(cdx, cdy, false) then Mouse(cdx - 3, cdy - 3, 6, 6, true);
MakeCompassCoords(cdx, cdy);
wait(500 + Random(500));
flag;
end;
wait(800);
until not IsUpText('down ' + treetxt) or CheckIfBank;
end;
end;

{*******************************************************************************
procedure LoadAllDTM(LoadIntoMemory: boolean);
By: Xaviar
Description: Set to true to load all DTMs into memory or false to unload.
*******************************************************************************}
procedure LoadAllDTM(LoadIntoMemory: boolean);
begin
if LoadIntoMemory then
begin
YewDTM := DTMFromString('78DA6314666060E06740017ED65C60214620F' +
'E0F048C9C40061B031A60442281B434906026A04611D32E0C3562' +
'404282801A907BC4F1AB0100B63D057D');
MagicDTM := DTMFromString('78DA631466606010644001C5598E0CAC409A1' +
'188FF0301231790C1C58006189148202D0324D808A8510212E204' +
'D488010919026A388184347E3500250B061A');
NestSeedDTM := DTMFromString('78DA6314646060E0614001FE11DC0CFC409A1' +
'188FF0301232790C1CA8006189148202D0C245808A891C1B40B43' +
'8D08901025A006E41E61FC6A00BFF8057E');
NestRingDTM := DTMFromString('78DA63E4636060E06240013B168A33F003694' +
'620FE0F048CEC40062B031A60442281B430906021A0461A48F011' +
'5003B25884801A2620C18B5F0D00489B0623');
NestEggDTM := DTMFromString('78DA63E4656060106040014E363A0C2C409A1' +
'188FF03012388C3C38006189148202D08249809A8110312AC04D4' +
'C802097E026A40EE15C1AF0600ADB10568');
end else
begin
FreeDTM(YewDTM);
FreeDTM(MagicDTM);
FreeDTM(NestSeedDTM);
FreeDTM(NestRingDTM);
FreeDTM(NestEggDTM);
end;
end;

{*******************************************************************************
function NoMorePlayers: boolean;
By: Xaviar
Description: Checks to see if any more players are still active.
returns true if there are no more active players.
*******************************************************************************}
function NoMorePlayers: boolean;
var i: integer;
begin
for i := 0 to Length(Players) - 1 do
begin
if Players.Active then
begin
result := false;
exit;
end;
end;
result := true;
end;

{********************************* Edgeville Procedures *********************************}
{*******************************************************************************
procedure GoToEdgeBank;
By: Xaviar
Description: Tries to Find Bank and Bank all Items
*******************************************************************************}
procedure GoToEdgeBank;
var i, c: integer;
begin
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: GoToEdgeBank.', false, true);
if not KeepPlayer then exit;
end;
MakeCompass('N');
SetRun(True);
If FindTopYew >= 0 then
begin
writeLn('Running to Bank');
Mouse(x + 18, y - 10, 10, 10, true);
wait(800 + Random(500));
Flag;
wait(600 + Random(600));
c := 1;
repeat
If FindColor(x, y, Players[CurrentPlayer].Integers[15], 550, 7, 682, 161) then
begin
if FindMMTPA(x, y, BankCashierColour, 1, -1, 10, 20, 5) then
begin
Mouse(x - 3, y -1, 2, 2, true);
wait(700 + Random(700));
Flag;
wait(600 + Random(600));
i := 0;
repeat
If OpenBankFast('eb') then
begin
if BankItems then i := 10;
SetRun(true);
exit;
end else i := i + 1;
until i >= 4;
if i < 10 then
begin
UCBPlayerReport('OpenBankFast cannot find the Bank Booth after 6 attempts.', true, false);
KeepPlayer := false;
exit;
end;
end;
If FindTopYew < 0 then c := 10;
end;
c := c + 1;
until c >= 10;
UCBPlayerReport('GoToEdgeBank Procedure Could Not Find Bank or Tree Icons.', true, false);
exit;
end else UCBPlayerReport('GoToEdgeBank Procedure Could Not Find Tree Icons.', true, false);
end;

{*******************************************************************************
procedure MoveToEdgeYews;
By: Xaviar
Description: Moves to Top or Bottom Yew tree assuming you are in the bank.
*******************************************************************************}
procedure MoveToEdgeYews;
var i: integer;
begin
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: MoveToEdgeYews.', false, true);
if not KeepPlayer then exit;
end;

writeLn('Moving to Yews');
i := 0;
repeat
i := i + 1;
if Random(2) = 1 then
begin
if FindTopYew >= 0 then
begin
Mouse(x + 3, y + 5, 5, 5, true);
wait(600 + Random(600));
Flag;
wait(600 + Random(600));
SetRun(false);
GameTab(4);
exit;
end;
end else
begin
If FindBottomYew >= 0 then
begin
Mouse(x + 23, y, 7, 20, true);
wait(600 + Random(600));
Flag;
wait(600 + Random(600));
FindBottomYew;
Mouse(x + 4, y - 4, 5, 3, true);
wait(600 + Random(600));
Flag;
wait(600 + Random(600));
SetRun(false);
GameTab(4);
exit;
end;
end;
until i >= 20;
writeln('Unable to find Yews');
end;

{*******************************************************************************
procedure CustomEdRunAway(WaitTime: integer);
By: Xaviar
Description: Custom Run Away Procedure for edgeville as the SRL RunAway Procedure
usually fails to come back due to the walls around edgeville yews.
WaitTime: MilliSeconds.
*******************************************************************************}
procedure CustomEdRunAway(WaitTime: integer);
var StartedWaiting, i: integer;
GotToBank: boolean;
begin;
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: CustomEdRunAway.', false, true);
if not KeepPlayer then exit;
end;
MakeCompass('N');
SetRun(True);
If FindTopYew >= 0 then
begin
Mouse(x + 17, y - 5, 10, 5, true);
writeLn('Running Away From Fight');
Flag;
wait(1000 + Random(2000));
i := 1;
repeat
If FindColor(x, y, Players[CurrentPlayer].Integers[15], 550, 7, 682, 161) then
begin
GotToBank := true
Mouse(x, y + 15, 3, 3, true);
Flag;
wait(1000 + Random(2000));
MarkTime(StartedWaiting);
repeat
FTWait(Random(4));
AntiBan;
if FindFight then
begin
UCBPlayerReport('Still Fighting Even After RunAway: Random May have Poisoned or Followed you.', true, false);
exit;
end;
until WaitTime <= TimeFromMark(StartedWaiting);
end else
begin
if i = 3 then
begin
writeln('Could not Find BankIconColour Attempt ' + IntToStr(i) + ' Logging out and Trying Again…');
Logout;
end;
GotToBank := false;
i := i + 1;
wait(5000);
if not LoggedIn then LoginPlayer;
end;
until (i >= 6) or GotToBank;
if not GotToBank then
begin
UCBPlayerReport('Find BankIconColour failed during procedure: Cust<input type="button" >omEdRunAway', true, false);
exit;
end;
end else If FindTopYew >= 0 then
begin
CustomEdRunAway((Random(90000) + 30000));
exit;
end else
begin
UCBPlayerReport('Could Not FindTopYew During Procedure: CustomEdRunAway', true, false);
exit;
end;
SRLRandomsReport;
MakeCompass('N');
MoveToEdgeYews;
end;

{*******************************************************************************
procedure ChangeEdTree;
By: Xaviar
Description: Changes Yew Tree at Edgeville. Moves Up if your at Bottom Yew and VisaVersa.
*******************************************************************************}
procedure ChangeEdTree;
begin
if FindBothYews then
begin
CheckForAllRandoms;
If FindTopYew < FindBottomYew then
begin
FindTopYew;
Mouse(x + 2, y + 8, 4, 4, true);
DropUnwanted;
Flag;
end else if FindTopYew > FindBottomYew then
begin
FindBottomYew;
Mouse(x + 2, y - 8, 4, 4, true);
DropUnwanted;
MakeCompass(IntToStr(115 + Random(40)));
Flag;
end;
end;
end;

{*******************************************************************************
procedure CutDownEdYew;
By: Xaviar
Description: Start Cutting Down Yew Trees in Edgeville
*******************************************************************************}
procedure CutDownEdYew;
var FirstCut: boolean;
sc: integer;
begin
If not FindTree(x, y, 'yew') and LoggedIn then ChangeEdTree;
FirstCut:= true;
MarkTime(sc);
repeat
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('CutDownEdYew: 2 Not Logged In. Lost Connection or Unsolveable Random?', true, true);
if not KeepPlayer then exit;
end;
If FindTree(x, y, 'yew') then
begin
FirstCut:= false;
If not FindEnt(x, y, true) then
begin
Mouse(x - 3, y - 3, 6, 6, true);
wait(600 + Random(600));
if not CheckAxe then UCBPlayerReport('CutDownEdYew: Unable to cut down tree. CheckAxe = False', false, false);
if not KeepPlayer then exit;
CutTillDown('yew');
MarkTime(sc);
MyFindBirdsNest;
end;
end else If not FirstCut and not CheckIfBank then
begin
ChangeEdTree;
FirstCut := true;
end else if (TimeFromMark(sc) > 60000) then
begin
FirstCut := false
MarkTime(sc);
end else if random(1000) <= 20 then AntiBan;
CheckForAllRandoms;
wait(800);
until CheckIfBank;
end;

{*************************** Tree Gnome Stronghold Procedures ***************************}

{*******************************************************************************
function MoveToStM: boolean;
By: Xaviar
Description: Moves Player to the Magic Tree/Farming Tree Patch Area near the Bank in
the Tree Gnome Stronghold based on the tree icon or the rock.
*******************************************************************************}
function MoveToStM: boolean;
var i, tx, ty: integer;
begin
MakeCompass('N');
if (Players[CurrentPlayer].Integers[16] > 0) and (Players[CurrentPlayer].Integers[17] > 0) then i := 2 else
if (Players[CurrentPlayer].Integers[16] > 0) then i := 1 else
if (Players[CurrentPlayer].Integers[17] > 0) then i := 0 else i := 3;
tx := 576;
ty := 94;
if (i < 3) then
begin
wait(500 + Random(500));
result := true;
if (i = 2) then i := Random(2);
case i of
0: begin
tx := 630;
ty := 84;
if FindColorSpiral(tx, ty, Players[CurrentPlayer].Integers[17], 563, 44, 640, 105) then
mouse(tx - 2, ty + 6, 4, 4, true) else result := false;
end;
1: begin
if FindColorSpiral(tx, ty, Players[CurrentPlayer].Integers[16], 550, 50, 703, 161) then
mouse(tx + 3, ty - 4, 3, 3, true) else result := false;
end;
end;
wait(600 + Random(600));
flag;
wait(600 + Random(600));
end;
end;

{*******************************************************************************
procedure MoveToSrongMage;
By: Xaviar
Description: Moves Player from Bank in the Tree Gnome Stronghold to the nearby Magic Tree/Farming Tree Patch Area.
*******************************************************************************}
procedure MoveToSrongMage;
var x, y, i: integer;
begin
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('MoveToSrongMage: Not Logged In. Lost Connection or Unsolveable Random?', true, true);
if not KeepPlayer then exit;
end;
MakeCompass('N');
SetAngle(true);
writeln('Moving To Magic Trees…');
if not (Players[CurrentPlayer].Integers[14] > 0) then Players[CurrentPlayer].Integers[14] := getcolor(580, 40);
if not (Players[CurrentPlayer].Integers[13] > 0) then Players[CurrentPlayer].Integers[13] := FindLadderColor;
if FindColorSpiral(x, y, Players[CurrentPlayer].Integers[13], 610, 86, 640, 145) then
begin
mouse(x - 3, y - 3, 6, 6, true);
wait(600 + Random(600));
flag;
wait(1500 + Random(800));
end else
begin
UCBPlayerReport('MoveToSrongMage: Did not find stairs in expected area?', true, false);
exit;
end;

i := 0;
repeat
if MyObjectFinder(x, y, 'own', 11344405, 1, 30, 0, 160, 60, 390, 250) then
begin
mmouse(x, y, 0, 0);
if IsUpText('own') then
begin
i := 10;
mouse(x, y, 0, 0, true);
end else i := i + 1;
repeat wait(250) until (getcolor(580, 40) <> Players[CurrentPlayer].Integers[14]);
end else
begin
if i >= 5 then
begin
UCBPlayerReport('MoveToSrongMage: Could not find Staircase down', false, false);
exit;
end;
i := i + 1;
FindColorSpiral(x, y, Players[CurrentPlayer].Integers[13], 615, 65, 645, 100)
mouse(x - 3, y - 3, 6, 6, true);
wait(1000 + Random(500));
flag;
wait(600 + Random(600));
end;
until i >= 9;


if not (Players[CurrentPlayer].Integers[16] > 0) then
begin
if AutoTreeSymb > 0 then
begin
Players[CurrentPlayer].Integers[16] := AutoTreeSymb;
writeln('Found Tree Symbol by AutoColour, Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[16]));
end else if FindSymbol(x, y, 'tree') then
begin
Players[CurrentPlayer].Integers[16] := GetColor(x + 1, y);
writeln('Found Tree by Symbol, Tree Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[16]));
FindColorSpiral(x, y, Players[CurrentPlayer].Integers[16], MMX1, MMY1, MMX2, MMY2);
end;
end;

if not (Players[CurrentPlayer].Integers[17] > 0) then Players[CurrentPlayer].Integers[17] := FindRockColor;

if not MoveToStM then
begin
mouse(576, 94, 5, 5, true);
flag;
wait(600 + Random(500));
end;
end;

{*******************************************************************************
procedure procedure CutDownStrongMage;
By: Xaviar
Description: Cuts Down the Magic Trees.
*******************************************************************************}
procedure CutDownStrongMage;
var cdx, cdy: integer;
first, d: boolean;
begin
first := true;
repeat
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('CutDownStrongMage: 2 Not Logged In. Lost Connection or Unsolveable Random?', true, true);
if not KeepPlayer then exit;
end;
cdx := 175;
cdy := 250;
if FindTree(cdx, cdy, 'magic') then
begin
If not FindEnt(cdx, cdy, false) then Mouse(cdx - 3, cdy - 3, 6, 6, true);
d := true;
if first then
begin
SetRun(false);
first := false;
end;
CutTillDown('magic');
end else if FindTree(cdx, cdy, 'yew') then
begin
If not FindEnt(cdx, cdy, false) then Mouse(cdx - 3, cdy - 3, 6, 6, true);
d := true;
if first then
begin
SetRun(false);
first := false;
end;
CutTillDown('yew');
end else if d then
begin
MakeCompass('N');
cdx := MMCX;
cdy := MMCY;
if FindColorSpiral(cdx, cdy, Players[CurrentPlayer].Integers[16], MMX1 + 10, MMY1 + 10, MMX2 - 10, MMY2 - 10) then
mouse(cdx + 3, cdy - 6, 3, 3, true);
wait(500 + Random(500));
flag;
wait(600 + Random(600));
d := false;
end else if (random(1000) <= 60) then AntiBan;
wait(100);
DropUnwanted;
CheckForAllRandoms;
if not KeepPlayer then exit;
wait(800);
until CheckIfBank;
end;

{*******************************************************************************
procedure GoToStrongBankS;
By: Xaviar
Description: Moves Player from Magic tree/Farming Tree Patch in the Tree Gnome Stronghold
area to the nearby bank, then banks all items and calls for a report.
*******************************************************************************}
procedure GoToStrongBankS;
var lx, ly, x, y, i: integer;
begin
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('MoveToSrongMage: 2 Not Logged In. Lost Connection or Unsolveable Random?', true, true);
if not KeepPlayer then exit;
end;
MakeCompass('N');
wait(600 + Random(600));
if FindColorSpiral(lx, ly, Players[CurrentPlayer].Integers[13], 650, 60, 675, 95) then
begin
mouse(lx - 2 , ly - 2, 4, 4, true);
SetRun(true);
SetAngle(true);
wait(1000 + Random(1000));
flag;
wait(1000 + Random(600));
end else if FindColorSpiral(lx, ly, Players[CurrentPlayer].Integers[13], 645, 55, 703, 105) then
begin
mouse(lx - 2 , ly - 2, 4, 4, true);
SetRun(true);
SetAngle(true);
wait(1000 + Random(1000));
flag;
wait(1000 + Random(600));
end else
begin
UCBPlayerReport('GoToStrongBankS Did not find stairs in expected area?', true, false);
exit;
end;
i := 1;
repeat
if MyObjectFinder(x, y, 'up', 471108, 12, 0, 0, 160, 60, 390, 300) then
begin
mouse(x - 1, y - 1, 2, 2, true);
wait(600 + Random(600));
flag;
wait(1000 + Random(600));
repeat wait(500) until (getcolor(580, 40) = Players[CurrentPlayer].Integers[14]);
i := 20;
end else if FindColorSpiral(lx, ly, Players[CurrentPlayer].Integers[13], 615, 65, 645, 100) then
begin
mouse(lx - 2 , ly - 2, 4, 4, true);
wait(1000 + Random(500));
flag;
wait(600 + Random(600));
i := i + 1;
end;

if (i >= 10) and (i < 15) then
begin
UCBPlayerReport('GoToStrongBankS: Failed to find Bank Staircase after 10 attempts.', true, false);
exit;
end;
until i >= 11;

mouse(628, 50, 10, 10, true);
wait(700 + Random(600));
flag;
wait(600 + Random(600));
i := 0;
repeat
if FindObjTPA(x, y, 806921, 12, -1, 8, 8, 4, ['banker']) then
begin
Mouse(x - 1, y - 1, 2, 2, False);
Wait(300 + Random(500));
flag;
wait(600 + Random(600));
ChooseOption('ank ');
Wait(300 + Random(500));
flag;
wait(600 + Random(600));
if BankItems then exit else mouse(190, 130, 6, 6, true);
end else
begin
mouse(190, 130, 6, 6, true);
Wait(300 + Random(500));
flag;
wait(1000 + Random(600));
end;
i := i + 1;
until i >= 5;
UCBPlayerReport('GoToStrongBankS: Failed to Bank with Dwarf Banker', true, false);
end;

{********************************* Catherby Procedures **********************************}

{*******************************************************************************
function GetShopIconColour: boolean;
By: Xaviar
Description: Gets Current Colour of Candle Shop Icon in Mini Map
*******************************************************************************}
function GetShopIconColour: boolean;
var sf, i, csx, csy: integer;
begin
result := false;
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: GetShopIconColour.', false, true);
exit;
end;
MarkTime(sf);
i := 0;
repeat
if TimeFromMark(sf) >= 20000 then
begin
Players[CurrentPlayer].Integers[18] := AutoShopSymb;
if Players[CurrentPlayer].Integers[18] > 0 then
begin
writeln('Found Shop Symbol by AutoColour: ' + IntToStr(Players[CurrentPlayer].Integers[18]));
result := true;
exit;
end;
i := i + 1;
writeLn('Cannot Shop Icon.. Logging Out and In Again to Change Icon Position.');
if i >= 5 then
begin
UCBPlayerReport('Could Shop Icon After 5 Login Attempts.', false, false);
exit;
end;
Logout;
LoginPlayer;
MarkTime(sf);
SetRun(true);
end;
wait(50);
until FindSymbol(csx, csy, 'shop');


Players[CurrentPlayer].Integers[18] := GetColor(csx - 2, csy + 2);
writeln('Found Shop Symbol Colour: ' + IntToStr(Players[CurrentPlayer].Integers[18]));
result := true;
end;

{*******************************************************************************
procedure MoveToCathYews;
By: Xaviar
Description: Moves to the Yew trees west of Catherby Bank assuming you are in the bank.
*******************************************************************************}
procedure MoveToCathYews;
var mcx, mcy, TreeSymbDTM: integer;
begin
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: MoveToCathYews.', false, true);
if not KeepPlayer then exit;
end;
writeLn('Moving to Yews');
if FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[18], 550, 7, 703, 161) then
begin
if (mcx - 40) <= MMX1 then mcx := mcx + 40;
mouse(mcx - 35, mcy - 12, 5, 5, true);
MakeCompass('W');
wait(3500 + Random(500));
flag;
wait(800 + Random(500));
mouse(620, 40, 5, 10, true);
wait(1000 + Random(500));
flag;
wait(800 + Random(500));
end else
begin
UCBPlayerReport('MoveToCathYews: Could Not Find Shop.', false, false);
exit;
end;

if not (Players[CurrentPlayer].Integers[17] > 0) then Players[CurrentPlayer].Integers[17] := FindRockColor;

mcx := 615;
mcy := 10;

if FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[17], 550, 7, 703, 161) then
begin
mouse(mcx, mcy, 1, 1, true);
wait(3500 + Random(500));
flag;
wait(800 + Random(500));
end else
begin
UCBPlayerReport('MoveToCathYews: Could Not Find the Rocks East of Yew Trees.', false, false);
exit;
end;

if not (Players[CurrentPlayer].Integers[16] > 0) then
begin
if AutoTreeSymb > 0 then
begin
Players[CurrentPlayer].Integers[16] := AutoTreeSymb;
writeln('Found Tree Symbol by AutoColour, Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[16]));
FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161);
mouse(mcx - 1, mcy + 7, 2, 3, true);
wait(2000 + Random(500));
flag;
wait(800 + Random(500));
end else
begin
if not FindSymbol(mcx, mcy, 'tree') then
begin
TreeSymbDTM := DTMFromString('78DA63AC6662603063400162290A0C36409A1' +
'188FF03016305A61A41315930CD08E503001032067E');
mcx := 627;
mcy := 10;
if FindDTM(TreeSymbDTM, mcx, mcy, 550, 7, 703, 161) then
begin
Players[CurrentPlayer].Integers[16] := GetColor(mcx, mcy);
writeln('Found Tree by DTM, Tree Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[16]));
FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161);
mouse(mcx - 1, mcy + 4, 2, 3, true);
wait(2000 + Random(500));
flag;
wait(800 + Random(500));
end else
begin
writeln('Could not find tree colour by DTM.');
mouse(615, 39, 10, 5, true);
wait(1500 + Random(500));
flag;
end;
FreeDTM(TreeSymbDTM);
exit;
end else
begin
Players[CurrentPlayer].Integers[16] := GetColor(mcx + 1, mcy);
writeln('Found Tree by Symbol, Tree Colour is: ' + IntToStr(Players[CurrentPlayer].Integers[16]));
FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161);
mouse(mcx - 2, mcy + 2, 4, 4, true);
wait(1500 + Random(500));
flag;
exit;
end;
end;
end else
begin
FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161);
mouse(mcx - 1, mcy + 2, 2, 3, true);
wait(2000 + Random(500));
flag;
wait(600 + Random(500));
end;
end;

{*******************************************************************************
procedure procedure CutDownCathYews;
By: Xaviar
Description: Starts Cutting Down the Yew Trees West of Catherby.
*******************************************************************************}
procedure CutDownCathYews;
var cdx, cdy, cdct: integer;
first, d: boolean;
begin
first := true;
MarkTime(cdct);
repeat
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('CutDownCathYews: 2 Not Logged In. Lost Connection or Unsolveable Random?', true, true);
if not KeepPlayer then exit;
end;

if FindTree(cdx, cdy, 'yew') then
begin
If not FindEnt(cdx, cdy, false) then Mouse(cdx - 3, cdy - 3, 6, 6, true);
d := true;
if first then
begin
SetRun(false);
first := false;
end;
CutTillDown('yew');
end else if d then
begin
cdx := 627;
cdy := 85;
MakeCompass('N');
wait(300 + Random(500));
if FindColorSpiral(cdx, cdy, Players[CurrentPlayer].Integers[16], MMX1, MMY1, MMX2, MMY2) then
begin
mouse(cdx + 4, cdy - 3, 6, 6, true);
wait(600 + Random(500));
flag;
end;
d := false;
end else if (random(1000) <= 60) then AntiBan;
if TimeFromMark(cdct) > 90000 then
begin
d := true;
MarkTime(cdct);
end;

wait(100);
DropUnwanted;
CheckForAllRandoms;
if not KeepPlayer then exit;
wait(800);
until CheckIfBank;
end;

{*******************************************************************************
procedure BankAtCatherby;
By: Xaviar
Description: Moves to the Catherby Bank and banks.
*******************************************************************************}
procedure BankAtCatherby;
var i, mcx, mcy: integer;
b: boolean;
begin
if not KeepPlayer then exit;
if not LoggedIn then
begin
UCBPlayerReport('Not Logged in During Procedure: BankAtCatherby.', false, true);
if not KeepPlayer then exit;
end;

writeLn('Heading back to the Bank');
b := false;
i := 0;
repeat
if FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[17], 550, 7, 703, 161) then
begin
mouse(mcx - 2, mcy, 4, 4, true);
GetMousePos(mcx, mcy);
MakeCompass('E');
SetRun(true);
wait(3000 + Random(1000));
flag;
mouse(620 , 22, 5, 5, true);
wait(1500 + Random(500));
b := true;
flag;
end else
begin
MakeCompass('E');
SetRun(true);
if (Players[CurrentPlayer].Integers[16] > 0) then
begin
if FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[16], 550, 7, 703, 161) then
begin
mouse(mcx - 3, mcy - 20, 6, 6, true);
wait(1500 + Random(500));
flag;
wait(600 + Random(500));
end;
end else
begin
mouse(620, 35, 25, 6, true);
wait(800 + Random(500));
flag;
wait(600 + Random(500));
end;
end;
i := i + 1;
if i > 4 then
begin
UCBPlayerReport('BankAtCatherby: Could Not Find Rocks.', false, false);
exit;
end;
until b;
mcx := 615;
mcy := 10;

b := false;
i := 0;
repeat
if FindColorSpiral(mcx, mcy, Players[CurrentPlayer].Integers[18], MMX1, MMY1, MMX2, 125) then
begin
mouse(mcx - 2, mcy, 3, 4, true);
MakeCompass('N');
wait(3200 + Random(1000));
flag;
wait(600 + Random(500));
b := true;
end else
begin
mouse(620, 60, 10, 5, true);
wait(1000 + Random(600));
flag;
wait(600 + Random(500));
end;
i := i + 1;
if i > 4 then
begin
UCBPlayerReport('BankAtCatherby: Could Not Find Shop.', false, false);
exit;
end;
until b;
mcx := 650;
mcy := 35;

if FindMMTPA(mcx, mcy, BankCashierColour, 1, -1, 28, 14, 10) then
begin
mouse(mcx + 1, mcy, 2, 3, true);
wait(1000 + Random(500));
flag;
wait(600 + Random(500));
end else
begin
UCBPlayerReport('BankAtCatherby: Could Not Find Bank.', false, false);
exit;
end;

i := 0;
repeat
mmouse(180, 115, 150, 30);
wait(800 + Random(500));
if IsUpText('oot') then
begin
GetMousePos(mcx, mcy);
Mouse(mcx, mcy, 0, 0, False);
Wait(300 + Random(500));
flag;
wait(600 + Random(500));
ChooseOption('ckl');
wait(600 + Random(500));
flag;
Wait(300 + Random(500));
if BankItems then exit else mouse(621, 80, 4, 3, true);
end else
begin
mcx := 625;
mcy := 77;
if FindMMTPA(mcx, mcy, BankCashierColour, 1, -1, 28, 14, 10) then
begin
mouse(mcx + 1, mcy, 2, 3, true);
wait(500 + Random(500));
flag;
wait(600 + Random(500));
end;
end;
wait(800);
i := i + 1;
until i >= 30;
UCBPlayerReport('BankAtCatherby: Failed to Bank with Banker', true, false);
end;

{**********************************************************************************************}
{*******************************************************************************
procedure SetupUCB;
By: Xaviar
Description: Sets up the basics.
*******************************************************************************}
procedure SetupUCB;
begin
Disguise(HideScar);
ScriptID := '611';
SRLID := SRL_ID;
SRLPassword := SRL_PASS;
DeclarePlayers;
ActivateClient;
SetArrayLength(locations,3);
locations[0] := 'Edgeville';
locations[1] := 'Tree Gnome Stronghold - Magic';
locations[2] := 'Catherby Yews';
LoadAllDTM(true);
ClearDebug;
ClearReport;
CurrentPlayer:= 0;
KeepPlayer := Players[0].Active;
end;

{*******************************************************************************
procedure StartNextPlayer;
By: Xaviar
Description: Sets up everything required for the next player to LogIn.
*******************************************************************************}
procedure StartNextPlayer;
var i, MinChopLvl: integer;
begin
logout;
KeepPlayer := true;
Players[CurrentPlayer].Booleans[2] := false;
Players[CurrentPlayer].Integers[11] := 0;

i := 1;
repeat
LoginPlayer;
writeln('Starting…');
wait(2000);
i := i + 1;
until LoggedIn or (i > 5);

if not Players[CurrentPlayer].Booleans[1] then
begin
case lowercase(Players[CurrentPlayer].Loc) of
'e' : begin
Players[CurrentPlayer].Loc := locations[0];
MinChopLvl := 60;
end;
'sm' : begin
Players[CurrentPlayer].Loc := locations[1];
MinChopLvl := 75;
end;
'cy' : begin
Players[CurrentPlayer].Loc := locations[2];
MinChopLvl := 60;
end;
end;
GameTab(11);
wait(500 + Random(500));
if (getcolor(701, 229) <> 10855845) then Mouse(713, 229, 3, 3, True);
SetRun(true);
wait(500 + Random(500));
GetAllLevels;
Players[CurrentPlayer].Booleans[1] := true;
Players[CurrentPlayer].Booleans[3] := DebugOn;
Players[CurrentPlayer].Integers[1] := GetXP('woodcutting');
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].level[20];
Players[CurrentPlayer].Integers[10] := GetSystemTime;
Players[CurrentPlayer].Integers[12]:= XpTillNextLevel('woodcutting');
end;

SRL_Logs := SRL_Logs + 1;
GameTab(4);
if not FindTheAxe(FirstDeposit, DumpVar, false) then
begin
writeln('Could not find any axes, logging out player ' + Players[CurrentPlayer].Name);
KeepPlayer := false;
exit;
end;

MakeCompass('N');
SetAngle(true);

LampSkill := Players[CurrentPlayer].Strings[1];

if (Players[CurrentPlayer].level[20] < MinChopLvl) then
begin
writeln(Players[CurrentPlayer].Name + ' does not have a high enough woodcutting level.');
KeepPlayer := false;
exit;
end;
end;

{*******************************************************************************
procedure MyRandomPlayerNext(active: boolean);
By: Xaviar
Description: Chooses a Random Active Player from the Players Array.
*******************************************************************************}
procedure MyRandomPlayerNext(active: boolean);
var i, c: integer;
ap: array of integer;
begin
Logout;
c := 0;
Players[CurrentPlayer].Active := active;
for i := 0 to Length(Players) - 1 do
begin
if Players.Active then
begin
SetArrayLength(ap, c + 1);

ap[c] := i;
c := c + 1;
end;
end;

if c = 1 then
begin
CurrentPlayer := ap[0];
writeln('You are currently using the only Active Player…');
exit;
end else if c > 1 then
begin
repeat
i := Random©
until ap <> CurrentPlayer;
CurrentPlayer := ap;
end;
logout;
end;

{*******************************************************************************
Main looped procedures for each location
*******************************************************************************}
procedure CutStrongMage;
begin
MoveToSrongMage;
CutDownStrongMage;
GoToStrongBankS;
end;

procedure CutCathYews;
begin

if not (Players[CurrentPlayer].Integers[18] > 0) then if not GetShopIconColour then
begin
UCBPlayerReport('CutCathYews: Could not get Shop Icon Colour.', false, false);
exit;
end;

MoveToCathYews;
CutDownCathYews;
BankAtCatherby;
end;

procedure CutEdgeYews;
begin
if not (Players[CurrentPlayer].Integers[15] > 0) and
not (Players[CurrentPlayer].Integers[16] > 0) then
begin
if not GetIconColours then
begin
KeepPlayer := false;
exit;
end;
end;
MoveToEdgeYews;
CutDownEdYew;
GoToEdgeBank;
end;

{*******************************************************************************
The Main Program Starts Here
*******************************************************************************}
begin
SetupSRL;
SetupUCB;
MyRandomPlayerNext(KeepPlayer)
repeat
StartNextPlayer;
while LoggedIn and KeepPlayer and not NoMorePlayers do
begin
Case lowercase(Players[CurrentPlayer].Loc) of
'edgeville' : CutEdgeYews;
'tree gnome stronghold - magic' : CutStrongMage;
'catherby yews' : CutCathYews;
end;
end;
if not LoggedIn and not Players[CurrentPlayer].Booleans[2] then KeepPlayer := false;
if not NoMorePlayers then MyRandomPlayerNext(KeepPlayer);
if not NoMorePlayers then
begin
if SleepTime > 0 then
begin
writeln('Waiting ' + IntToStr(SleepTime) + ' Minutes until ' + Players[CurrentPlayer].Name + ' Logs in…');
wait((SleepTime * 60) * 1000);
writeln('Waiting Finished…');
end;
end;
until NoMorePlayers;
FinalUCBReport;
LoadAllDTM(false);
end.

{*******************************************************************************
Non Standard Players Array Definitions for my reference..
Players[CurrentPlayer].Integers[1] = Initial Woodcutting XP
Players[CurrentPlayer].Integers[2] = Players Current Woodcutting Level
Players[CurrentPlayer].Integers[3] = Players Earned XP
Players[CurrentPlayer].Integers[4] = Players Yews Banked
Players[CurrentPlayer].Integers[5] = Players Birds Nests Banked (Seeds)
Players[CurrentPlayer].Integers[6] = Players Birds Nests Banked (Rings)
Players[CurrentPlayer].Integers[7] = Players Birds Nests Banked (Eggs)
Players[CurrentPlayer].Integers[8] = Players Magic Logs Banked
Players[CurrentPlayer].Integers[9] = Players Random Items Banked.
Players[CurrentPlayer].Integers[10] = System Time when player Started.
Players[CurrentPlayer].Integers[11]= Amount of times Player has Banked this session.
Players[CurrentPlayer].Integers[12]= Buffer for XP till next level.
Players[CurrentPlayer].Integers[13]= Ladder Colour.
Players[CurrentPlayer].Integers[14]= Black Background Colour.
Players[CurrentPlayer].Integers[15]= Bank Symbol Colour.
Players[CurrentPlayer].Integers[16]= Tree Symbol Colour.
Players[CurrentPlayer].Integers[17]= Rock Colour
Players[CurrentPlayer].Integers[18]= Shop Symbol Colour.
Players[CurrentPlayer].Booleans[1] = Players First LogIn false = first
Players[CurrentPlayer].Booleans[2] = Change Player true = change
Players[CurrentPlayer].Booleans[3] = true = debug mode
Players[CurrentPlayer].Booleans[4] = Players First Trip to Tree. false = first
Players[CurrentPlayer].Strings[1] = Lampskill for genie lamp
Players[CurrentPlayer].Strings[2] = Reason Player ended
*******************************************************************************}

——————————————————
<!– END TEMPLATE: formanswers –>

Scaper

2008-06-30 23:54:08

is this a pee take or summit?? use [*scar][*/scar] tags with out the * and there isnt even an end to ya script wtf this is 100% leeched or summit im gunna put it in scar and have closer look it just copied out of SRL whats the point of that haha lmao


close delete

Raskolnikov

2008-07-01 01:32:27

Nice try and I second what scaper said.

Only one application too

Edit:

Wow nice job plagurizing!!!

{------------------------- <<--PriSoner-->> -------------------------------
--------------- Simple Yew Cutter & Banker (Edgeville) -------------------
--------------- V1.12 beta -------------------
--------------- Requires Scar 3.12c or 3.14 & SRL 13+ -------------------
--------------------------------------------------------------------------
------------------------- Description --------------------------------
--------------- Chops yews just south of edgeville -------------------
--------------- and banks them. Deals with randoms -------------------
--------------- where possible & has basic Anti-Ban. -------------------
--------------- only deals with 1 player -------------------
--------------------------------------------------------------------------
--------------- Put axe into backpack or hand, -------------------
--------------- place you character in the edgeville -------------------
--------------- bank and run the script. Simple! -------------------
--------------------------------------------------------------------------
--------------- Fill in your username, password, bank -------------------
--------------- pin if you have one set, time you want -------------------
--------------- the script to run & max loads/yews. -------------------
--------------- See end of script for version notes. -------------------
--------------------------------------------------------------------------

##########################################################################
##########################################################################
##### #####
##### THIS IS MY FIRST SCRIPT USE WITH CAUTION AND #####
##### SUPERVISE WHILST IN USE! #####
##### #####
##### YOU HAVE BEEN WARNED!! #####
##### #####
##########################################################################
##########################################################################}

program Simple_Yew_Cut_n_Bank_Ed;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}

// -----------------------------------------------------------------------
// -------------- Change your details in this section --------------------
// -----------------------------------------------------------------------
const
PlayerName = 'ChangeMe'; // Enter your runescape username here.
PlayerPass = 'ChangeMe'; // Enter your Runescape password here.

// PlayerNick is for Talking Randoms Checking. Enter a 3 character lowercase version of your username.
PlayerNick = 'ChangeMe'; // i.e. if "Evil Bob" was your username "vil" would be the only valid option "Bob" & "Evi"
// would be wrong and because they show up in runescape with Capital Letters.

PlayerPin = 0000; // If you have a Bank Pin set enter it here. If you don't leave it at 0000
PickSkill = 'runecraft'; // Choose skill you want any genie lamps aquired to be used on. (Must be spelt exactly as it is in skill list)
HideScar = 'NAV32'; // Enter the name of any program you want scar to disguise itself as.

SRL_ID = ''; // Get them here [url]http://www.stats.srl-forums.com/[/url] - This is not the same as your SRL Forum Username & Pass
SRL_PASS = ''; // If you do not have one leave empty.

// -----------------------------------------------------------------------
// ----- Enter the maximums below. Your player will go to the bank, bank all items in your
// ----- back pack & log out if any condition is met. Enter 0 for infinite.
// -----------------------------------------------------------------------
maxloads = 0; // Enter the number of loads to collect.
maxyews = 0; // Enter the number of yews to chop.
maxtime = 0; // Enter the maximum time to run in minutes.
maxlevel = 0; // Enter Maximum Woodcutting Level you wish to achieve.
maxxp = 0; // Enter the amount of XP you want to earn this session.

// -----------------------------------------------------------------------
// ---- Do not alter below this line unless you know what your doing! ----
// -----------------------------------------------------------------------

YewColour = 1865575; // Colour of Yew Tree Foliage. Yew Should not have to change this. LoL
BankCashierColour = 195836; // Colour of Bank Cashier in Mini Map. The Yellow Dot. You Should not have to change this.
SYBCversion = 'V1.12 beta'; // Version of this script

var
YewCoords: TPointArray;
NestSeedDTM, NestCountSeeds, NestRingDTM, NestCountRings, NestCountEggs, NestEggDTM: integer;
BirdsNestsMissed, LoadsBanked, CurrentTree, BankIconColour, TreeIconColour: integer;
YewDTM, YewCount, x, y, i, RndItemCount, DTMAxe, FirstDeposit: integer;
InitialXP, EarnedXP, InitialLvl, CurrentLvl, NextXpLvl: integer;
CIBReason, DumpVar: String;

// -----------------------------------------------------------------------
// Basic Standard Setup of Players.. Only 1 player currently supported.
// -----------------------------------------------------------------------
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;

HowManyPlayers:= 1;
CurrentPlayer:= 0;
NumberOfPlayers(HowManyPlayers);

SRLID := SRL_ID;
SRLPassword := SRL_PASS;

Players[0].Name := PlayerName;
Players[0].Pass := PlayerPass;
Players[0].Nick := PlayerNick;
Players[0].Active := True;
Players[0].pin := PlayerPin;
Players[0].Integers[1] := 0;

Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars);
end;

// -----------------------------------------------------------------------
// Function: DigitGroup(MyNumber: integer) string; by PriSoner
// Formats an integer into groups of 3 seperated by commas and returns
// a formatted string. i.e integer "1234567" would become string "1,234,567".
// I know there is probably an easier way of doing this and probably an existing
// function. i just can't remember it.. My brain has stopped working!
// -----------------------------------------------------------------------
function DigitGroup(MyNumber: integer): string;
var b: integer;
a, c: string;
begin
a := IntToStr(MyNumber);
b := length(a) + 1;
c := ',';
if b > 4 then
repeat
b := b - 3;
if b > 1 then insert(c, a, b);
until b < 3;
result := a;
end;

// -----------------------------------------------------------------------
// Function: CheckAxe: boolean;
// By: PriSoner
// Small function to check if part of the phrase:
// "You do not have an axe which you have the woodcutting level to use."
// is present as the last black message in the chat box. It does this as it
// is quicker and less system intensive than parsing for dtm's or bitmaps.
// Use this function immediately after clicking a tree.
// Returns True if Axe is Present and False if No Axe is Present.
// -----------------------------------------------------------------------
function CheckAxe: boolean;
begin
if Pos('an axe', GetBlackChatMessage) = 17 then
begin
writeln('You do not have a suitable axe....');
result := false;
end else result := true;
end;

// -----------------------------------------------------------------------
// Procedure: MyFindBirdsNest;
// By: Prisoner
// Beta Testing
// Attempts to a Find Birds Nest if one is dropped & Pick it up.
// If it can't find one within 90 seconds it exits as Fallen Birds Nests do not last that long.
// beta version Records a failure to find the birds nest.
// -----------------------------------------------------------------------
procedure MyFindBirdsNest;
var OriginalDegrees, NewDegree, StartFBN, x, y, i, ctab: Integer;
b: boolean;
begin
if not LoggedIn then exit;
if Pos('nest falls', GetBlackChatMessage) = 10 then
begin
b := false;
writeln('Birds Nest Drop Detected. Attempting To Find It...');
MarkTime(StartFBN);
SetAngle(true);
OriginalDegrees := Round(rs_GetCompassAngleDegrees);
NewDegree := OriginalDegrees;
ctab := GetCurrentTab;
repeat
if (FindObj(x, y, 'Take Bird', 3623505, 6)) then
begin
WriteLn('Birds Nest Found. Picking Up...');
Mouse(x, y, 1, 1, True);
Flag;
Wait(500 + Random(500));
Birdsnest := Birdsnest + 1;
GameTab(4);
SetAngle(true);
MakeCompass(IntToStr(OriginalDegrees));
GameTab(ctab);
for i := 1 to 5 do
begin
Mouse(575, 225, 3, 3, False);
Wait(300 + Random(500));
ChooseOption('xamine');
Wait(1000 + Random(1000));
if Pos('nest falls', GetBlackChatMessage) <> 10 then exit;
end;

exit;
end else
begin
if b then
begin
SetAngle(false);
b := false;
end else
begin
SetAngle(True);
NewDegree := (NewDegree + 25 + Random(30));
MakeCompass(IntToStr(NewDegree));
b := true;
end;
end;
until TimeFromMark(StartFBN) > 90000;
WriteLn('Birds Nest Not Found Within Required Time. Aborting...');
BirdsNestsMissed := BirdsNestsMissed + 1; // Temporary reporting to see how effective function is.
MakeCompass(IntToStr(OriginalDegrees));
SetAngle(True);
GameTab(ctab);

for i := 1 to 28 do
begin
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
Mouse(x, y, 5, 5, false);
Wait(300 + Random(500));
ChooseOption('Examine');
Wait(1000 + Random(1000));
if Pos('nest falls', GetBlackChatMessage) <> 10 then exit;
end else
begin
GameTab(5);
Wait(1000 + Random(900));
Mouse(580, 300, 5, 5, false);
Wait(300 + Random(500));
ChooseOption('xamine');
Wait(1000 + Random(1000));
end;
end;
exit;
end;
end;

// -----------------------------------------------------------------------
// Just a small little procedure to drop unwanted items..
// ongoing depending on what other useless items I find that randoms give
// -----------------------------------------------------------------------
procedure DropUnwanted;
var x, y, i, DTMa2z: integer;
UnwantedDTM: Array of Integer;
begin
SetLength(UnwantedDTM, 8);
UnwantedDTM[0] := DTMFromString('78DA63E4656060E0624001F764EF307000694' + // Security Book
'620FE0F048C4C408610031A60442281340F906021A0460A487010' +
'50230C24C4F1AB0100A6DF0671');
UnwantedDTM[1] := DTMFromString('78DA631461606010604001CB26C7337000694' + // Baguette
'620FE0F048CEC408604031A60442281B434906021420D1F013502' +
'84ED020096E3065E');
UnwantedDTM[2] := DTMFromString('78DA631460606010624001FC45CE0C1C409A1' + // Frog Token
'188FF0301232B90C1C4800618914820AD00245808A89103120A04' +
'D480EC91C3AF06000AB00582');
UnwantedDTM[3] := DTMFromString('78DA63E46160601067400117CF9B31B002694' + // Strength Potion (2)
'620FE0F048C1C40060F031A60442281343F906025A0461848C812' +
'50C34A580D00B1530683');
UnwantedDTM[4] := DTMFromString('78DA63E4606060006124505815CCC006A4198' + // Spinach Roll
'1F83F103082E49918D000231209A4F98850C30324B809A8612252' +
'8D207E3500026305B3');
UnwantedDTM[5] := DTMFromString('78DA631467606010624001B37A3C185881342' + // Triangle Sandwich
'310FF0702466E20839F010D302291405A09487010502307242409' +
'A81101122AF8D500008613065A');
UnwantedDTM[6] := DTMFromString('78DA6314646060E0614001829D620C6C409A1' + // Kebab
'188FF0301233F90C1CC800618914820CD0224F809A8E102129204' +
'D44813360700F2D80550');
UnwantedDTM[7] := DTMFromString('78DA63E46560601064400197E74931B002694' + // Beer
'620FE0F048C2C40063F031A60442281B414116A40763113A14686' +
'801A3620C14A408D109090C2AF0600467D066B');

GameTab(4);

for i := 0 to High(UnwantedDTM) do
begin
DTMa2z := UnwantedDTM[i]
if FindDTM(DTMa2z, x, y, 546, 203, 737, 466) then
begin
mouse(x, y, 2, 2, false);
wait(500 + Random(500));
ChooseOption('rop');
wait(1000 + Random(1000));
end;
FreeDTM(DTMa2z);
end;

{ if CoinAmount('Inv') > 0 and CoinAmount('Inv') < 299 then // Drop Coins if less than 299 (Not Working Yet)
begin
coinbmp := loadcoinbmp;
FindBitmapToleranceIn(coinbmp, x, y, 546, 203, 737, 466, 1);
writeln(IntToStr(x) + ' ' + IntToStr(y));
mouse(x, y, 3, 3, false);
wait(500 + Random(500));
ChooseOption('rop');
wait(1000 + Random(1000));
FreeBitmap(coinbmp);
end; }
end;

// -----------------------------------------------------------------------
// Displays Report when called on current totals.
// Quits and Saves/Displays a Debug image when appropriate.
//
// SYCBReport(ReasonCalled: String; FinalSYBCReport, DebugImage: boolean);
// ReasonCalled: String explaing why, when, where it SYCBReport was called.
// FinalSYBCReport: Boolean, If true will end script and display final report along with ReasonCalled
// DebugImage: Boolean, If true will save & display a screen capture of moment script ended.
// LoggedInFail: Bolean, Checks to see if script is being called because of "not LoggedIn" being called
// LoggedIn ocasionally reports the wrong status, with this option enabled it will wait
// and re-check a few times before either continuing or returning.
// -----------------------------------------------------------------------
procedure SYCBReport(ReasonCalled: String; FinalSYBCReport, DebugImage, LoggedInFail: boolean);
var x, y, i: integer;
d: string;
begin
if LoggedInFail then
begin
SaveScreenshot('SYCBLogin-Debug.bmp');
GetClientDimensions(x, y);
DisplayDebugImgWindow(x, y);
LoadDebugBitmap('SYCBLogin-Debug.bmp');

for i := 1 to 15 do
begin
writeln('LogggedIn Returned "False", Retry ' + IntToStr(i) + ' of 15');
wait(1000 + Random(500));
if LoggedIn then
begin
writeln('LoggedIn Failure Recovered..');
FinalSYBCReport := false;
exit;
end;
end;
end;

if LoggedIn then
begin
EarnedXp := (GetXP('woodcutting') - InitialXP);
wait(500 + Random(600));
CurrentLvl := GetSkillInfo('woodcutting',false);
wait(500 + Random(600));
NextXpLvl := XpTillNextLevel('woodcutting');
end;

if DebugImage then
begin
SaveScreenshot('SYCBDebug.bmp');
GetClientDimensions(x, y);
DisplayDebugImgWindow(x, y);
LoadDebugBitmap('SYCBDebug.bmp');
end;


// I did want to have the GetSkillInfo Check in CheckIfBank procedure however it created
// a conflict with CountItemDTM constantly switching between GameTabs..
if (maxlevel > 0) and (maxlevel <= GetSkillInfo('woodcutting',False)) then
begin
FinalSYBCReport := true;
ReasonCalled := 'Woodcutting Skill Level ' + IntToStr(GetSkillInfo('woodcutting',False)) + ' Reached';
end;

if (maxxp > 0) and (maxxp <= (GetXP('woodcutting') - InitialXP)) then
begin
FinalSYBCReport := true;
ReasonCalled := 'Your Requested XP earned has been reached';
end;

writeLn('##################################################################');
writeLn(' Simple Yew Cutter & Banker (Edgeville) ' + SYBCversion);
writeLn(' Ran for: ' + TimeRunning);
writeLn(' Loads Banked: ' + DigitGroup(LoadsBanked));
writeLn(' Yew Logs Banked: ' + DigitGroup(YewCount));
if NestCountSeeds > 0 then writeLn('Birds Nests (Seeds) Banked: ' + DigitGroup(NestCountSeeds));

if NestCountRings > 0 then writeLn('Birds Nests (Rings) Banked: ' + DigitGroup(NestCountRings));

if NestCountEggs > 0 then writeLn(' Birds Nests (Eggs) Banked: ' + DigitGroup(NestCountEggs));

if BirdsNestsMissed > 0 then writeLn(' Birds Nests Missed: ' + DigitGroup(BirdsNestsMissed));

if RndItemCount > 0 then writeLn(' Random Event Items Banked: ' + DigitGroup(RndItemCount));

if CurrentLvl > InitialLvl then d := 'now' else d := 'still';
writeLn(' You Started at Level ' + DigitGroup(InitialLvl) + ' you are ' + d + ' at Level ' + DigitGroup(CurrentLvl));

writeLn(' You earned ' + DigitGroup(EarnedXp) + 'xp This session with ' + DigitGroup(NextXpLvl) + 'xp to the next Level');
if (maxloads > 0) and (maxloads <= LoadsBanked) then
begin
writeLn(' Script Ended: Maximum Loads Banked Limit Reached.');
writeLn('##################################################################');
if LoggedIn then LogOut;
SendSRLReport;
TerminateScript;
end;

if FinalSYBCReport then
begin
writeLn(' Script Ended: ' + ReasonCalled);
writeLn('##################################################################');
if LoggedIn then LogOut;
SendSRLReport;
TerminateScript;
end;

writeLn('##################################################################');
SendSRLReport;
end;

// -----------------------------------------------------------------------
// Returns True if any condition that may require banking is met.
// -----------------------------------------------------------------------
Function CheckIfBank: Boolean;
begin
result := false;
GameTab(4);
if InvFull then
begin
DropUnwanted;
wait(500);
if InvFull then result := true;
end;

if (maxtime > 0) and (maxtime <= ((GetTimeRunning div 1000) div 60)) then
begin
writeLn('maxtime true');
result := true;
CIBReason := 'Maximum Time Limit Reached';
exit;
end;

if (maxyews > 0) and (maxyews <= YewCount + CountItemsDtm('inv', YewDTM)) then
begin
writeLn('maxyews true');
result := true;
CIBReason := 'Maximum Yew Logs Cut Limit Reached';
exit;
end;
end;

// -----------------------------------------------------------------------
// Add all items in the back pack to a running total before banking.
// -----------------------------------------------------------------------
procedure CountBankedItems;
var a, b, c, d, e: integer;
begin
a := InvCount;
b := CountItemsDtm('inv', YewDTM);
c := CountItemsDtm('inv', NestSeedDTM);
d := CountItemsDtm('inv', NestRingDTM);
e := CountItemsDtm('inv', NestEggDTM);

RndItemCount := (RndItemCount + (a - b - c - d));
YewCount := (YewCount + b);
NestCountSeeds := (NestCountSeeds + c);
NestCountRings := (NestCountRings + d);
NestCountEggs := (NestCountEggs + e);
LoadsBanked := LoadsBanked + 1;


// SRL Stats Reporting
ReportVars[0] := ReportVars[0] + b; // Yews Banked Reported to SRL Stats
ReportVars[1] := (ReportVars[1] + (c + d + e)); // Birds Nests Banked Reported to SRL Stats
ReportVars[2] := (ReportVars[2] + (a - b - c - d - e)); // Randoms Items Banked Reported to SRL Stats
ReportVars[3] := ReportVars[3] + 1; // Loads Banked Reported to SRL Stats
Banks := Banks + 1; // Official Banked Stats for Global SRL Report
end;

// -----------------------------------------------------------------------
// Get Current Colour of Bank and Tree Icons in Mini Map
// -----------------------------------------------------------------------
Procedure GetIconColours;
var StartFind: integer;
var i: integer;
begin
if not LoggedIn then SYCBReport('Not Logged in During Procedure: GetIconColours.', true, false, true);
MarkTime(StartFind);
i := 0;
repeat
if TimeFromMark(StartFind) >= 20000 then
begin
i := i + 1;
writeLn('Cannot Find Bank Icon.. Logging Out and In Again to Change Icon Position.');
if i >= 5 then SYCBReport('Could Not Find Bank Icon After 5 Login Attempts.', true, true, false);
Logout;
LoginPlayer;
MarkTime(StartFind);
end;

until FindSymbol(x, y, 'bank');

BankIconColour:= GetColor(x + 1, y);

If FindSymbol(x, y, 'tree') then
begin
TreeIconColour:= GetColor(x + 2, y);
end else
begin
SYCBReport('Cannot find tree icon. Quitting', true, true, false);
end;
end;

// -----------------------------------------------------------------------
// Function: FindTheAxe(var AxePos: integer; var TypeOfAxe: string; AxeInInv: boolean): boolean; (beta)
// By: Prisoner
// Attempts to find an axe in the players inventory or hand.
// If an axe is found it checks to see if the player can use it for woodcutting
// and checks to see if it can be wielded. If an axe has to be in the inventory
// it always moves it to slot 1 if it isn;t already there.
// AxeInInv: Set to True and it will move axe from hand to inventory slot 1.
// Set to False and it will move axe from inventory to hand.
// AxePos: Returns 0 if no axe is found, 1 if Axe is in hand & 2 if axe is in inventory.
// It does this because even if you have Set AxeInv to False it is still
// possible that the axe may not be wieldable. Usefull to know if depositing in bank etc.
// TypeOfAxe: Return the Type of Axe Being used or 'None Found' if no axe is present.
// The function returns True if a usable axe is found.
// -----------------------------------------------------------------------
type AllAxes = record
AxeDTM: integer;
AxeName: string;
MinLvl: integer;
AttLvl: integer;
end;
function FindTheAxe(var AxePos: integer; var TypeOfAxe: string; AxeInInv: boolean): boolean;
var ax, ay, SklWood, SklAtt, ctab: integer;
i: integer;
AxeList: Array of AllAxes;
begin
SetLength(AxeList, 8);
AxeList[0].AxeDTM := DTMFromString('78DA6314616060E0664001A962BC0CFC409A1' +
'188FF0301231790C1C58006189148202D03243809A81106124204' +
'D430010919FC6A00E8B5053D');
AxeList[0].AxeName := 'Dragon Axe';
AxeList[0].AttLvl := 60;
AxeList[0].MinLvl := 61;

AxeList[1].AxeDTM := DTMFromString('78DA639CCEC4C0F09401051485F1318800694' +
'620FE0F048C4B806AEEA2AA718E4864E082AA0101C6C54035F751' +
'D5D887C6A1AA590A547313558D4B740A8A1A00CFA10E03');
AxeList[1].AxeName := 'Rune Axe';
AxeList[1].AttLvl := 40;
AxeList[1].MinLvl := 41;

AxeList[2].AxeDTM := DTMFromString('78DA6374606060686440014D497C0C22409A1' +
'188FF0301A337905187AAC6C6D786810BAA0604187D804415AA1A' +
'7B7F7B5435BE40A21C558D73B0338A1A00C1660AA8');
AxeList[2].AxeName := 'Adamant Axe';
AxeList[2].AttLvl := 30;
AxeList[2].MinLvl := 31;

AxeList[3].AxeDTM := DTMFromString('78DA633CC4C4C010C0C8800C5A53F81852803' +
'448F43F10309E05AAF14155636111CCC0055503028CE7816A5C51' +
'D5D839C4A2AA3981A9C6C52D0D450D0061FC0C64');
AxeList[3].AxeName := 'Mithril Axe';
AxeList[3].AttLvl := 20;
AxeList[3].MinLvl := 21;

AxeList[4].AxeDTM := DTMFromString('78DA63E4656060E06240038C0C1C609281E13' +
'F1030F200194C986A1024901606126CA82AC4444450D5B0020919' +
'FCE60000E9AC04AD');
AxeList[4].AxeName := 'Black Axe';
AxeList[4].AttLvl := 10;
AxeList[4].MinLvl := 6;

AxeList[5].AxeDTM := DTMFromString('78DA63CC636260D8C3C8800C5A53F81852803' +
'448F43F10305602D5EC4055939B9ACAC0055503028CD540351B51' +
'D594E5E5A2AA29C154D3545989A20600C3BC0E32');
AxeList[5].AxeName := 'Steel Axe';
AxeList[5].AttLvl := 5;
AxeList[5].MinLvl := 6;

AxeList[6].AxeDTM := DTMFromString('78DA63BCC9C4C0309191010498182020C6859' +
'34103488344FF0301E353A04C2F230332F0707161E082AA0101C6' +
'0740356DA86A22838351D5BC00AAE94655932ACA89AAE639A6394' +
'1DEDE286A00B1F90F6D');
AxeList[6].AxeName := 'Iron Axe';
AxeList[6].AttLvl := 1;
AxeList[6].MinLvl := 1;

AxeList[7].AxeDTM := DTMFromString('78DA63EC626060086140016DA97C0C22409A1' +
'188FF0301E33420C307558D97A5220317540D08304E051201A86A' +
'DCCCE451D54C07129EA86AFC6C5450D40000D77E0AA2');
AxeList[7].AxeName := 'Bronze Axe';
AxeList[7].AttLvl := 1;
AxeList[7].MinLvl := 1;

ctab := GetCurrentTab;
SklWood := GetSkillInfo('woodcutting',False);
SklAtt := GetSkillInfo('attack', False);

for i := 0 to High(AxeList) do
begin
GameTab(4);
DTMAxe := AxeList[i].AxeDTM;
if FindDTM(DTMAxe, ax, ay, 546, 203, 737, 466) then
begin
if (SklWood < AxeList[i].MinLvl) then
begin
writeLn('Found ' + AxeList[i].AxeName + ' but you do not have a high enough Woodcutting level to use it.');
writeLn('You Need to be Woocutting Level ' + IntToStr(AxeList[i].MinLvl) + ' or higher.');
writeLn('Looking for another axe..........');
end else
begin
if (SklAtt >= AxeList[i].AttLvl) and not AxeInInv then
begin
writeLn('Found ' + AxeList[i].AxeName + ' Moving to Hand.');
Mouse(ax, ay, 10, 4, true);
wait(600 + Random(600));
AxePos := 1;
AxeInInv := false;
end else
begin
if (ax < 600) and (ay < 245) then writeLn('Found ' + AxeList[i].AxeName + '.') else
begin
writeLn('Found ' + AxeList[i].AxeName + ' Moving to Slot 1.');
MMouse(ax, ay, 0, 0);
HoldMouse(ax, ay, true);
wait(600 + Random(600));
MMouse(575, 230, 0, 0);
ReleaseMouse(575, 230, true);
end;
AxePos := 2;
AxeInInv := true;
end;
wait(500 + Random(400));
result:= true;
FreeDTM(DTMAxe);
GameTab(ctab);
TypeOfAxe := AxeList[i].AxeName;
exit;
end;
end;
end;

for i := 0 to High(AxeList) do
begin
GameTab(5);
DTMAxe := AxeList[i].AxeDTM;
if FindDTM(DTMAxe, ax, ay, 568, 285, 603, 321) then
begin
AxePos := 1;
if AxeInInv then
begin
writeLn('Found ' + AxeList[i].AxeName + ' in Hand. Moving to Slot 1 of Inventory.');
Mouse(ax, ay, 1, 1, true);
wait(700 + random(700));
GameTab(4);
wait(700 + random(700));
FindDTM(DTMAxe, ax, ay, 546, 203, 737, 466);
if not (ax < 600) and (ay < 245) then
begin
MMouse(ax, ay, 0, 0);
HoldMouse(ax, ay, true);
wait(600 + Random(600));
MMouse(575, 230, 0, 0);
ReleaseMouse(575, 230, true);
end;
AxePos := 2;
end else writeLn('Found ' + AxeList[i].AxeName + ' in Hand.');
result:= true;
FreeDTM(DTMAxe);
GameTab(ctab);
TypeOfAxe := AxeList[i].AxeName;
exit;
end;
end;
AxePos := 0;
result:= false;
TypeOfAxe := 'None Found';
FreeDTM(DTMAxe);
GameTab(ctab);
end;

// -----------------------------------------------------------------------
// Find Both Tree Icons in Mini Map
// -----------------------------------------------------------------------

function FindBothYews: boolean;
var x2, y2, y3: integer;
begin
if not LoggedIn then SYCBReport('Not Logged in During Procedure: FindBothYews.', true, false, true);
MakeCompass('N');
SetAngle(true);
x2:= 626; y2:= 25; y3:= 140;
if FindColorSpiral(x2, y2, TreeIconColour, 550, 7, 703, 161) then
begin
if FindColorSpiral(x2, y3, TreeIconColour, 550, 7, 703, 161) then
begin
if y3 - y2 > 25 then
begin
result:= true
exit;
end else result:= False;
end else result:= False;
end else result:= False;
SYCBReport('Could Not Find Both Yew Symbols (Function: FindBothYews)', true, true, false);
end;

// -----------------------------------------------------------------------
// Find Top and Bottom Trees Based on Icon Colour and Area of Map..
// Needs Tweaking Searches whole of Mini Map instead of small area
// -----------------------------------------------------------------------
function FindTopYew: integer;
var y2: integer;
begin
x:= 626; y:= 25; y2:= y;
if FindColorSpiral(x, y, TreeIconColour, 550, 7, 703, 161) then
begin
result:= y - y2;
end else result:= -1;
end;

function FindBottomYew: integer;
var y2: integer;
begin
x:= 626; y:= 140; y2:= y;
if FindColorSpiral(x, y, TreeIconColour, 550, 7, 703, 161) then
begin
result:= y2 - y;
end else result:= -1;
end;

// -----------------------------------------------------------------------
// Tries to Find Bank and Bank all Items
// -----------------------------------------------------------------------
Procedure GoToBank;
var i: integer;
begin
if not LoggedIn then SYCBReport('Not Logged in During Procedure: GoToBank.', true, false, true);
SetRun(True);
If FindTopYew >= 0 then
begin
writeLn('Running to Bank');
Mouse(x + 18, y - 10, 10, 10, true);
Flag;
wait(1000 + Random(500));
If FindColor(x, y, BankIconColour, 550, 7, 682, 161) then
begin
If FindColorSpiralTolerance(x, y, BankCashierColour, x - 5, y - 15, x + 20, y + 35, 2) then
begin
Mouse(x - 1, y -1, 2, 2, true);
Flag;
wait(1000 + Random(1000));
i := 0;
repeat
If OpenBankFast('eb') then
begin
if (PinScreen) then InPin(IntToStr(Players[CurrentPlayer].Pin));
CountBankedItems;
Deposit(FirstDeposit,28,2);
wait(500 + Random(1000));
Deposit(FirstDeposit,28,2); // Just as a Double Check because, although it rarely happens, it does occasionally fail to bank all items.
wait(500 + Random(1000));
CloseBank;
i := 10;
if CheckIfBank and not InvFull then
begin
SYCBReport(CIBReason, true, false, false);
end else SYCBReport('Just Finished Banking in GoToBank', false, false, false);
end else i := i + 1;
until i >= 6;
if i < 10 then SYCBReport('OpenBankFast cannot find the Bank Booth after 6 attempts.', true, true, false);
end;
end else If FindTopYew >= 0 then
begin
GoToBank;
exit;
end else SYCBReport('GoToBank Procedure Could Not Find Bank or Tree Icons.', true, true, false);
end else SYCBReport('GoToBank Procedure Could Not Find Tree Icons.', true, true, false);
end;

// -----------------------------------------------------------------------
// Basic AntiBan Proceedure.
// -----------------------------------------------------------------------
procedure AntiBan;
begin
case random(6) of
0: RandomRClick;
1: HoverSkill('woodcutting', False);
2: PickUpMouse;
3: BoredHuman;
4: RandomMovement;
5: BoredHuman;
end;
MakeCompass('N');
SetAngle(true);
end;

// -----------------------------------------------------------------------
// Moves to Top or Bottom Yew tree assuming you are in the bank.
// -----------------------------------------------------------------------
Procedure MoveToYews;
begin
if not LoggedIn then SYCBReport('Not Logged in During Procedure: MoveToYews.', true, false, true);

if Random(2) = 1 then
begin
writeLn('Moving to Top Yew');
CurrentTree := 1;
if FindTopYew >= 0 then
begin
SetRun(true);
Mouse(x + 3, y + 5, 5, 5, true);
Flag;
SetRun(false);
GameTab(4);
end else
begin
MoveToYews;
exit;
end;
end else
begin
writeLn('Moving to Bottom Yew');
CurrentTree := 0;
If FindBottomYew >= 0 then
begin
SetRun(true);
Mouse(x + 23, y, 7, 20, true);
Flag;
FindBottomYew;
Mouse(x + 4, y - 4, 5, 3, true);
Flag;
SetRun(false);
GameTab(4);
end else
begin
MoveToYews;
exit;
end;
end;
end;

// -----------------------------------------------------------------------
// Custom Run Away Procedure as the SRL RunAway Procedure usually fails to come back.
// Modified again to just run to bank as Random detection is now better
// WaitTime is MilliSeconds.
// This has not been fully tested (BETA)
// -----------------------------------------------------------------------
Procedure CustomRunAway(WaitTime: integer);
var StartedWaiting, i: integer;
GotToBank: boolean;
begin;
if not LoggedIn then SYCBReport('Not Logged in During Procedure: CustomRunAway.', true, false, true);
SetRun(True);
If FindTopYew >= 0 then
begin
Mouse(x + 17, y - 5, 10, 5, true);
writeLn('Running Away From Fight');
Flag;
wait(1000 + Random(2000));
i := 1;
repeat
If FindColor(x, y, BankIconColour, 550, 7, 682, 161) then
begin
GotToBank := true
Mouse(x, y + 15, 3, 3, true);
Flag;
wait(1000 + Random(2000));
MarkTime(StartedWaiting);
repeat
FTWait(Random(4));
AntiBan;
if FindFight then SYCBReport('Still Fighting Even After RunAway: Random May have Poisoned or Followed you.', true, true, false);
until WaitTime <= TimeFromMark(StartedWaiting);
end else
begin
writeln('Could not Find BankIconColour Attempt ' + IntToStr(i) + ' Logging out and Trying Again...');
GotToBank := false;
i := i + 1;
Logout;
wait(5000);
LoginPlayer;
end;
until (i >= 6) or GotToBank;
if not GotToBank then SYCBReport('Find BankIconColour failed during procedure: CustomRunAway', true, true, false);
end else If FindTopYew >= 0 then
begin
CustomRunAway((Random(90000) + 30000));
exit;
end else SYCBReport('Could Not FindTopYew During Procedure: CustomRunAway', true, true, false);
MoveToYews;
end;

// -----------------------------------------------------------------------
// Beta Strange Plant Finder by PriSoner
// please report back if this finds anything for you..
// -----------------------------------------------------------------------
function StrangePlantFinder: Boolean;
var StartSPF, FruitCount, FruitDTM: integer;
Begin
if not LoggedIn then exit;
FruitDTM := DTMFromString('78DA63E4646060E0654001B30A8E30B001694' +
'620FE0F048CDC400633031A60442281B40090E026A08607488812' +
'50C30A244408A861C67433BA1A008467066B');
FruitCount := CountItemsDtm('inv', FruitDTM);
result := false
if FindObjCustom(x, y, ['trange'], [6239818,945493,4269363], 3) then // I May use FindObjCustom Here
begin
writeln('Found Strange Plant attempting to Pick fruit.');
MarkTime(StartSPF);
Result := True;
repeat
FindObjCustom(x, y, ['trange'], [6239818,945493,4269363], 6);
Mouse(x, y, 1, 1, false);
wait(200 + Random(250));
ChooseOption('ick');
wait(500 + Random(600));
if Pos('ready to', GetBlackChatMessage) > 5 then wait(800 + Random(800)) else //Text: The fruit isn't ready to be picked yet...
if (Pos('fruit from', GetBlackChatMessage) > 5) or (CountItemsDtm('inv', FruitDTM) > FruitCount) then //Text: You pick the fruit from the plant.
begin
result := true;
writeln('Picked Fruit From Strange Plant.. Waiting for plant to die...');
FreeDTM(FruitDTM);
wait(4000 + random(1000));
BoredHuman;
wait(8000 + random(2000));
exit;
end else
if Pos('unable', GetBlackChatMessage) > 5 then //Text: You're unable to pick the fruit.
begin
result := false;
writeln('The plant is not after you.. Waiting for plant to go...');
FreeDTM(FruitDTM);
wait(4000 + random(1000));
BoredHuman;
wait(8000 + random(2000));
exit;
end;
until (TimeFromMark(StartSPF) > 90000) or FindFight;

writeln('Failed to Pick Fruit From Strange Plant');
FreeDTM(FruitDTM);
end;
end;

// -----------------------------------------------------------------------
// Basic Check For all Randoms, Uses Standard SRL Checks.
// -----------------------------------------------------------------------
procedure CheckForAllRandoms;
begin
FindNormalRandoms;
FindInventoryRandoms;
FindNonInventoryRandoms;
FindTalk;
StrangePlantFinder;
if FindFight then CustomRunAway((Random(9000) + 3000));
end;

// -----------------------------------------------------------------------
// Checks for Randoms, Occasionally Re-Clicks On Yew & Performs an AntiBan Functions
// Until Yew Tree has Been Fully Cut Down.
// -----------------------------------------------------------------------
Procedure CutTillDown;
var StartCut, RandWait: integer;
begin
MarkTime(StartCut);
RandWait := (12000 + Random(33000));
repeat
if not LoggedIn then SYCBReport('CutTillDown: Not Logged In. Lost Connection or Unsolveable Random?', true, true, true);
FindEnt(YewCoords[i].x, YewCoords[i].y, true)
if TimeFromMark(StartCut) > RandWait then
begin
if not FindEnt(YewCoords[i].x, YewCoords[i].y, true) then
begin
CheckForAllRandoms;
if IsUptext('down Yew') then
begin
if random(100) >= 90 then
begin
AntiBan;
end else
begin
Mouse(YewCoords[i].x, YewCoords[i].y, 5, 5, true);
wait(600 + Random(600));
if not CheckAxe then SYCBReport('CutTillDown: Unable to cut down tree. CheckAxe = False', true, false, false);
end;
end else exit;
end;
MarkTime(StartCut);
RandWait := (12000 + Random(33000));
end;
CheckForAllRandoms;
MyFindBirdsNest;
until not IsUpText('down Yew') or CheckIfBank;
end;

// -----------------------------------------------------------------------
// Find Yew Tree Foliage and Populate YewCoords
// -----------------------------------------------------------------------
Function FindYew: boolean;
begin
FindColorsSpiralTolerance(255, 166, YewCoords, YewColour, 5, 5, 515, 337, 4);
If Length(YewCoords) <= 0 then result := false
else for i:= 0 to High(YewCoords) do
begin
MMouse(YewCoords[i].x, YewCoords[i].y, 3, 3)
If IsUpText('down Yew') then
begin
result:= true;
exit;
end;
end;
result := false;
end;

// -----------------------------------------------------------------------
// Changes Tree. Moves up if your at Bottom Yew and VisaVersa.
// -----------------------------------------------------------------------
Procedure ChangeTree;
begin
if FindBothYews then
begin
CheckForAllRandoms;
If FindTopYew < FindBottomYew then
begin
FindTopYew;
Mouse(x + 4, y + 15, 5, 5, true);
Flag;
end else if FindTopYew > FindBottomYew then
begin
FindBottomYew;
Mouse(x + 4, y - 15, 5, 5, true);
Flag;
end;
end;
end;

// -----------------------------------------------------------------------
// Start Cutting Down Tree
// -----------------------------------------------------------------------
Procedure CutDownTree;
var FirstCut: boolean;
begin
FirstCut:= true;
repeat
if not LoggedIn then SYCBReport('CutDownTree: 2 Not Logged In. Lost Connection or Unsolveable Random?', true, true, true);
If FindYew then
begin
FirstCut:= false;
If not FindEnt(YewCoords[i].x, YewCoords[i].y, true) then
begin
Mouse(YewCoords[i].x, YewCoords[i].y, 4, 4, true);
wait(600 + Random(600));
if not CheckAxe then SYCBReport('CutDownTree: Unable to cut down tree. CheckAxe = False', true, false, false);
CutTillDown;
MyFindBirdsNest;
end;
end else If not FirstCut and not CheckIfBank then
begin
ChangeTree;
FirstCut := true;
end else if random(1000) <= 20 then AntiBan;
CheckForAllRandoms;
until CheckIfBank;
end;

// -----------------------------------------------------------------------
// Sets up all the initial items.
// -----------------------------------------------------------------------
Procedure SetupSYCB;
var i: integer;
begin
Disguise(HideScar);
ScriptID := '611';
DeclarePlayers;
i := 1;
repeat
LoginPlayer;
writeln('Waiting for S.M.A.R.T. client to load');
wait(2000);
i := i + 1;
until LoggedIn or (i > 60);

if not LoggedIn then LoginPlayer else Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars);

SRL_Logs := SRL_Logs + 1;
YewDTM := DTMFromString('78DA6314666060E06740017ED65C60214620F' +
'E0F048C9C40061B031A60442281B434906026A04611D32E0C3562' +
'404282801A907BC4F1AB0100B63D057D');
NestSeedDTM := DTMFromString('78DA6314646060E0614001FE11DC0CFC409A1' +
'188FF0301232790C1CA8006189148202D0C245808A891C1B40B43' +
'8D08901025A006E41E61FC6A00BFF8057E');
NestRingDTM := DTMFromString('78DA63E4636060E06240013B168A33F003694' +
'620FE0F048CEC40062B031A60442281B430906021A0461A48F011' +
'5003B25884801A2620C18B5F0D00489B0623');
NestEggDTM := DTMFromString('78DA6314626060E06240010252FC0C2C409A1' +
'188FF0301231B90C1CA800618914820CD07249809A81107194E40' +
'0DC8627E22CC21E01E004EC704D9');
ActivateClient;
YewCount := 0;
LoadsBanked := 0;
TreeIconColour := 0;
BankIconColour := 0;
NestCountSeeds := 0;
NestCountRings := 0;
BirdsNestsMissed := 0;
InitialXP := GetXP('woodcutting');
InitialLvl := GetSkillInfo('woodcutting',False);
NextXpLvl := XpTillNextLevel('woodcutting');
CurrentLvl := InitialLvl;

if (InitialXP < 65) then
begin
writeln('You need at least Level 65 to cut Yews. You are currently Level ' + IntToStr(InitialXP));
TerminateScript;
end;
Players[0].Level[8] := GetSkillInfo('hitpoints', False);
LampSkill := PickSkill;
ClearDebug;
ClearReport;
if not FindTheAxe(FirstDeposit, DumpVar, false) then SYCBReport('Could not find any axes.', true, false, false);
repeat
GetIconColours;
until (BankIconColour > 0) and (TreeIconColour > 0);
MakeCompass('N');
SetAngle(true);
end;

// --------------------- Program Starts --------------------------

begin
SetupSRL;
SetupSYCB;
repeat
MoveToYews;
CutDownTree;
GoToBank;
until not LoggedIn;
end.

// Version History:
// V1.00 beta First public beta release
// V1.01 beta Minor Tweaks to a few Coordinates & small counting fix.
// V1.02 beta Fixed a few bugs introduced when I cleaned up the script for release.
// Improved Item Count Function & Fixed intermitent problems with it.
// Created Custom Runaway From Fight Routine just for Edgeville Yew Area. (beta)
// V1.03 beta Fixed the intermittent FindTalk Random bug.
// Improved CustomRunAway procedure.
// Integrated SRL Stats.
// Minor bug fixes and optimisations.
// V1.04 beta Updated to work with SRL 11
// increased speed of cutting.
// V1.05 beta Fixed Minor Reorting issue for RandomItemsBanked
// Lots of small improvements.
// Last Version Posted in First Scripts, If you want further versions become a Junior Member.
// V1.06 beta Added Custom Procedure to Find Birds Nests when dropped from tree. (beta)
// Record failed attempts to find Birds Nest.
// added procedure to drop low value items from Random events
// improved random detection.
// V1.07 beta Added a procedure to wait and try again when a "not LoggedIn" event is detected
// Now saves and Displays a Screenshot for when "Not LoggedIn" event is detected to help debug
// Added Woodcutting Level, XP & Script Version to reporting
// V1.08 beta Added a Strange Plant Finder (Very Beta but works, needs refining in a major way)
// Tweaked AntiBan to start less often to improve speed of cutting
// Improved Reporting system and now Digit Groups all number to make them easy to read.
// V1.09 Fixed a conflict in StrangePlantFinder that caused an access violation (Cleared DTM and then Counted DTM)
// V1.10 beta Added support for SMART
// added more unwanted items to DropUnwanted array
// Changed CustomRunAway to shorter WaitTime & to just run to bank as RandomDetection is now better.
// Replaced custom CountItemDtm with offical SRL function: CountItemsDtm
// Tweaked my Bird Nest Finder to improve the guarantee that last text is changed to avoid a loop.
// Temp Fix to correct FindFight problem created by the SRL 12 & 13 update
// Dramatically reduced CPU overheads by removing all redundant Randoms checks.
// V1.11 beta Fixed my previous FindFight Fix. Fighting Randoms should be detected for everyone now.
// Major overhall of my FindTheAxe function turning it into a completely self contain function.
// Added Woodcutting/Attack Level checking & handling to FindTheAxe function.
// Added option to FindTheAxe to set axe position.
// Added a variable to FindTheAxe to determine axe location.
// Updated MyFindBirdsNest to return the GameTab position to where it was at before it was called.
// V1.12 beta Added Variable TypeOfAxe to the FindTheAxe. Returns the Type of Axe that is being used.
// Made some small changes in readiness for the switchover to a Multi-Player Script.
// Implemented new quick check function as a failsafe to check axe is present while chopping.
// Added a check to make sure a valid world is selected for S.M.A.R.T.
// Improved Strange Plant Finder and now also detects if plant is after other player.
// Reduced amount of times DropUnwanted is called. Now only calls it when needed.
// Improved CustomRunAway procedure. Now even more robust.
// Improved GoToBank procedure. Now even more robust.

PriSoner's work copied look at the program name…


Busted!!!!

Pseudoclosed

MasterKill

2008-07-01 02:14:36

oh it's copied.

xaviarrob don't act like a noob and write a script yourself.

Daniel

2008-07-01 04:20:34

I also believe this was the second script he copied to get into members? Check his last app, submitted just before this one ;)

Hobbit

2008-07-01 04:23:55

he copied two…
or is it just double app?

Anyways closed.

He has received 21 day suspension