SRL Archive - Archive

aaron126 - SRL Member Application


aaron126

2013-05-25 16:44:20

How Long have You Played Runescape?
7 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
I worked with C++ for 2 years, java for a year, SQL for 3 years, and I've learned pascal recently


Are you a member of any other communities?
none that have anything to do with runescape


Tell us about yourself…
From: aaron126
well, ~4 years ago I started working with java on Runescape private servers, I owned my own server. Though it was not very successful (only around 20 players online at peak)
I did that for a year, then i started playing World of Warcraft private servers, and eventually decided I'd apply for a developer position. I got the position, and was working with SQL database management and C++ game programming. I was shortly promoted to a senior position. not sure if it was skill, or lack of skill from other people, but still. Shortly after, i was promoted again, to be in charge of 3 servers, with a population of 2,500 players online at peak hours. I was paid approx $25/hr, depending on the task I was doing. However I felt that I was relied on far too much, and that they should look for more than just one person to run their servers. The stress of carrying that big of a development project made me resign.
that's pretty much been my programming "career". I'm a highschool student at the moment, and am a freelance programmer.



Please show us one (or multiple) of your scripts.

(******************************************************************)
(* *
* *
* iFalconry Script By: *
* Aaron126 *
* *
* Big thanks to the makers of the following scripts: *
* INeedBots AIO Chopper *
* Elfyyy's Pest Control *
* Waffle's Power Fletcher 9001 *
* Hoodz Fighter *
* *
* *
* ---- HOW TO USE ---- *
* Go to a hunting location, with the falcon *
* Set your desired KebbitType *
* Start the script *
* *
* *)
(******************************************************************)


program iFalconry;
{$define SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/Misc/SmartGraphics.Simba}

var
Arrow, MArrow, ChatScrolledDown, StrangeBox, CustomWaitTime, CheckRandomTime, CoinSlot, HuntingLevelsGained, AntiBanTime, RepeatCount, KebbitsCaught, ChatColors1, ColorTolerance:Integer;
ScreenX1, ScreenY1, ScreenX2, ScreenY2, ExpGained, CurrHP, LastHP, FailedCatchCount, LastX, LastY:Integer;
Status:String;
MSCTP:Tpoint;
FoundTolerance:Boolean;
KebbitColor:Array[0..1] of Array [1..7] of Array [0..3] of Integer;
KebbitName:Array [1..7] of Array [0..8] of String;


(******************************************************************************)
(* CONFIGURATION *)
(******************************************************************************)
const
(*KebbitType is a bitmask value of what kebbits you want to catch.
What is a bitmask? it's a way of being able to have multiple things happen
(in this case catching multiple types of kebbit) without needing to have
multiple options.

How to use:
1: Spotted Kebbit
2: Dark Kebbit
4: Dashing Kebbit

if I wanted to catch Dark kebbit and Spotted Kebbit, I'd add their values
together, and my KebbitType would be 3.
if I wanted to catch all of them, I'd add all of their values together,
and my KebbitType would be 7.

If you have any questions, post on the script thread and I'll be happy to
answer them. :) *)

KebbitType = 3;
CSpottedKebbitColor = 0; // 0 = using auto-color determined by script
CDarkKebbitColor = 0; // 0 = using auto-color determined by script
CDashingKebbitColor = 0; // 0 = using auto-color determined by script

BuryBones = False; // bury or drop bones (more hunter exp if you drop)
MouseMoveSpeed = 15; // speed at which the mouse moves (recommend between 10 and 18)

DrawBoxes = True; // draw kebbit boxes, disable if you expernece crashes related to smart graphics
AutoUpdate = True; // enable automatic updating of the script

Procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Username goes here
Players[0].Pass := ''; //Password goes here
Players[0].Nick := ''; //Character name (excluding first letter)
Players[0].LampSkill := SKILL_HUNTER;
Players[0].Active := True;
end;
(******************************************************************************)
(* END OF COFIGURATION *)
(******************************************************************************)


const
Version = '1.6';

procedure UpdateScript;
var
NewFile:integer;
OnlineVersion, NewScript, NewFilePath:string;
begin
if (AutoUpdate) then
begin
writeln('Checking for script updates...');
OnlineVersion := GetPage('http://pastebin.com/raw.php?i=AaZEPywk');
writeln('Latest Version: '+OnlineVersion);
writeln('Current Version: '+Version)
if (trim(OnlineVersion) > Version) then
begin
writeln(' ******************************************************');
writeln(' * NEW SCRIPT VERSION AVAILABLE! *');
writeln(' * ...DOWNLOADING NOW... *');
writeln(' ******************************************************');
NewScript := GetPage('http://pastebin.com/raw.php?i=SkaGC8Lr');
NewFilePath := ScriptPath+ 'iFalconry['+OnlineVersion+'].simba';
NewFile := Rewritefile(NewFilePath, true);
try
begin
WriteFileString(NewFile, NewScript);
writeLn(' * SUCCESSFULLY DOWNLOADED TO: *');
writeln(' * '+NewFilePath+' *');
writeln(' * Open the new file if you wish to use it! *');
writeln(' ******************************************************');
end
except
begin
writeLn('Fatal error writing to '+NewFilePath+'!!');
terminatescript;
end;
end;
CloseFile(NewFile);
TerminateScript;
end else
writeLn('You have the latest version of the script!');
wait(2500);
end else
begin
Writeln('');
Writeln('WARNING: Autoupdate is disabled');
Writeln('');
Writeln('To manually download the latest script, go to: http://pastebin.com/raw.php?i=SkaGC8Lr ');
Writeln('');
wait(3000);
exit;
end;
end;

function DashingKebbitColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.53);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 7442856, MSX1, MSY1, MSX2, MSY2, 23);
if (Length(arP) = 0) then
begin
// Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 10.07) and (X <= 55.83) and (Y >= 10.03) and (Y <= 58.43) and (Z >= 5.66) and (Z <= 54.80) then
begin
Result := arC[i];
Writeln('Searching for Dashing Kebbit Color: ' + IntToStr(arC[i]));
Break;
end;
end;

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

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

function SpottedKebbitColor: 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.05, 0.10);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 3559009, MSX1, MSY1, MSX2, MSY2, 12);
if (Length(arP) = 0) then
begin
// Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
_FindAllRandoms(true, []);
ColorToRGB(arC[i], R, G, B);

if (R >= 57) and (R <= 136) and (G >= 45) and (G <= 110) and (B >= 31) and (B <= 77) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 2.96) and (X <= 16.79) and (Y >= 2.94) and (Y <= 16.63) and (Z >= 1.76) and (Z <= 9.18) then
begin
Result := arC[i];
Writeln('Searching for Spotted Kebbit Color: ' + IntToStr(arC[i]));
Break;
end;
end;
end;

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

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

function DarkKebbitColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(2.78, 0.35);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 2896428, MSX1, MSY1, MSX2, MSY2, 12);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
_FindAllRandoms(true, []);
ColorToRGB(arC[i], R, G, B);

if (R >= 19) and (R <= 73) and (G >= 16) and (G <= 73) and (B >= 16) and (B <= 79) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 0.57) and (X <= 6.38) and (Y >= 0.57) and (Y <= 6.58) and (Z >= 0.59) and (Z <= 8.16) then
begin
Result := arC[i];
Writeln('Searching for Dark Kebbit Color:' + IntToStr(arC[i]));
Break;
end;
end;
end;

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

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

procedure DeclareVariables;
begin
ScreenX1 := 10;
ScreenY1 := 10;
ScreenX2 := 510;
ScreenY2 := 330;
Arrow := BitmapFromString(9, 12, 'meJxjZGCY/ecvJmJkYACi6l9/MRH' + 'ZUnG//pCBfHAjy5+/yUBK33+RgYDuxyUOAHsH3rA=');
MArrow := BitmapFromString(7, 11, 'meJxjZGBgxIY2/f2HjKgiWP3rLzL' + 'CI+j/6w8ywhSBIJOfvzGR1PdfmAgAUjaGrw==');
ChatScrolledDown := BitmapFromString(15, 19, 'meJy10k9LAkEch/H1EmJ/wEA6iB' + 'BREFLYEqWIuFoiblpgLcrCHsSIoKigIOoQdKhD0Cno1GvoPfbIF34' + 'sWx06BM/BnfkwOztOynF2o7PGYFw9CKnSHWz7AW21++Q2u2q91qKU' + '4xDGxkuNvUn1joAqlj3J/+vi/XP8/BE9vIX3r2p4+6KC6yd1ePnoH' + '9+Akfzund7xmKg9umpF56q6H4JZU5IpxeBUOmOsOTypH43cnR7jvD' + 'cumUWmp2cxkt8x2VLgzFxWTNX6UWJlw8iZ+ZxJlk3g+D6R2YW8ZH6' + '5WFgt8XUbno/hiMDaJ2uCkbnCksnFtU1wyesYtrdLkkn2ANbd4Mxt' + 'w7/Jsh8YtvOkhPwRx789vqYCFyuTi8ffJ6MjShjFua24FTCzekzEW' + 'dl9RrK3P93PL0mcu+E=');
StrangeBox := DTMFromString('mwQAAAHic42RgYHBiYmAwQ8J+SNgZiN2A+BlQ3QMGCP0GiO8C8SMo/wMU97W0AElGvNiIgTDAbwIEwwEAyPkMaQ==');
MSCTP := Point(MSCX, MSCY);
CustomWaitTime := 0;
CheckRandomTime := 0;
CoinSlot := 0;
HuntingLevelsGained := 0;
MarkTime(AntiBanTime);
RepeatCount := 0;
KebbitsCaught := 0;
ChatColors1 := 0;
ColorTolerance := 0;
FailedCatchCount := 0;
FoundTolerance := False;
ExpGained := 0;
MouseSpeed := MouseMoveSpeed;

// pascals failure to properly support bitmasking, we meet again...

case (KebbitType) of // do this for a performance improvement
1:
begin
if (CSpottedKebbitColor = 0) then
KebbitColor[0][1][0] := SpottedKebbitColor
else
KebbitColor[1][1][0] := CSpottedKebbitColor;
end;
2:
begin
if (CDarkKebbitColor = 0) then
KebbitColor[0][2][0] := DarkKebbitColor
else
KebbitColor[1][2][0] := CDarkKebbitColor;
end;
3:
begin
if (CSpottedKebbitColor = 0) then
KebbitColor[0][3][0] := SpottedKebbitColor
else
KebbitColor[1][3][0] := CSpottedKebbitColor;

if (CDarkKebbitColor = 0) then
KebbitColor[0][3][1] := DarkKebbitColor
else
KebbitColor[1][3][1] := CDarkKebbitColor;
end;
4:
begin
if (CDashingKebbitColor = 0) then
KebbitColor[0][4][0] := DashingKebbitColor
else
KebbitColor[1][4][0] := CDashingKebbitColor;
end;
5:
begin
if (CSpottedKebbitColor = 0) then
KebbitColor[0][5][0] := SpottedKebbitColor
else
KebbitColor[1][5][0] := CSpottedKebbitColor;

if (CDashingKebbitColor = 0) then
KebbitColor[0][5][1] := DashingKebbitColor
else
KebbitColor[0][5][1] := CDashingKebbitColor;
end;
6:
begin
if (CDarkKebbitColor = 0) then
KebbitColor[0][6][0] := DarkKebbitColor
else
KebbitColor[1][6][0] := CDarkKebbitColor;

if (CDashingKebbitColor = 0) then
KebbitColor[0][6][1] := DashingKebbitColor
else
KebbitColor[1][6][1] := CDashingKebbitColor;
end;
7:
begin
if (CSpottedKebbitColor = 0) then
KebbitColor[0][7][0] := SpottedKebbitColor
else
KebbitColor[1][7][0] := CSpottedKebbitColor;

if (CDarkKebbitColor = 0) then
KebbitColor[0][7][1] := DarkKebbitColor
else
KebbitColor[1][7][1] := CDarkKebbitColor;

if (CDashingKebbitColor = 0) then
KebbitColor[0][7][2] := DashingKebbitColor
else
KebbitColor[1][7][2] := CDashingKebbitColor;
end;
end;

KebbitColor[0][1][1] := 0;
KebbitColor[0][2][1] := 0;
KebbitColor[0][3][2] := 0;
KebbitColor[0][4][1] := 0;
KebbitColor[0][5][2] := 0;
KebbitColor[0][6][2] := 0;
KebbitColor[0][7][3] := 0;

KebbitName[1][0] := 'ot';
KebbitName[1][1] := 'otted';
KebbitName[1][2] := 'Spotted';

KebbitName[2][0] := 'ar';
KebbitName[2][1] := 'ark';
KebbitName[2][2] := 'Dark';

KebbitName[3][0] := 'ar';
KebbitName[3][1] := 'ark';
KebbitName[3][2] := 'Dark';
KebbitName[3][3] := 'ot';
KebbitName[3][4] := 'otted';
KebbitName[3][5] := 'Spotted';

KebbitName[4][0] := 'ash';
KebbitName[4][1] := 'ashing';
KebbitName[4][2] := 'Dashing';

KebbitName[5][0] := 'ash';
KebbitName[5][1] := 'ashing';
KebbitName[5][2] := 'Dashing';
KebbitName[5][3] := 'ot';
KebbitName[5][4] := 'otted';
KebbitName[5][5] := 'Spotted';

KebbitName[6][0] := 'ash';
KebbitName[6][1] := 'ashing';
KebbitName[6][2] := 'Dashing';
KebbitName[6][3] := 'ar';
KebbitName[6][4] := 'ark';
KebbitName[6][5] := 'Dark';


KebbitName[7][0] := 'ebbit';

if ((KebbitType < 1) or (KebbitType > 7)) then
begin
writeln(' FATAL! KebbitType must be between 0 and 7');
TerminateScript;
end;
end;

Function ReplaceText(Text:String; Characters,ReplaceWith:TStringArray): String;
var
i:Integer;
EndText:String;
Begin
EndText := Text;
for i:= 0 to high(Characters) do
begin
if (i <= high(ReplaceWith)) then
EndText := ReplaceWrap(EndText, Characters[i], ReplaceWith[i], [rfReplaceAll])
else
EndText := ReplaceWrap(EndText, Characters[i], ReplaceWith[high(ReplaceWith)], [rfReplaceAll]);
end;
Result := EndText;
End;

Function GetUpTextCustom(Color: String): String;
Var
WhiteT,BlueT,YellowT,OrangeT,FoundText: String;
Begin
case (LowerCase(Color)) of
'white':
WhiteT:=(GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'UpChars07')+' ');
'blue':
BlueT:=GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
'yellow':
YellowT:=GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
'orange':
OrangeT:=GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
'all':
begin
WhiteT:=(GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'UpChars07')+' ');
BlueT:=GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
YellowT:=GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
OrangeT:=GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
end;
end;
FoundText:= WhiteT + BlueT + YellowT + OrangeT;
FoundText:= ReplaceText(FoundText, ['.','/','\',',','*','^','"','`','@','#','$','%'], ['']);
Result:=FoundText;
End;

Function ContainsText(CheckText: String; Text: TStringArray): Boolean;
Var
TheText: String;
i, n: Integer;
Begin
TheText := CheckText;
n := High(Text);
For i := 0 to n do
If (Pos(Text[i], TheText) > 0) then
Begin
Result := True;
Exit;
End;
End;

Function isUpTextCustom(text: TStringArray; color: String): Boolean;
begin
result := (ContainsText(GetUpTextCustom(color), text));
end;

function FindObjTPACustom(var X, Y: Integer; Color, Tol, CTS, ObjWidth, ObjHeight, minCount, maxCount: Integer; UpText: TStringArray; TextColor: String): Boolean;
var
I, tCTS, XDif, YDif: Integer;
myPoint: TPoint;
Points: TPointArray;
aPoints: T2DPointArray;
begin
Result := False;
if not LoggedIn then exit;
tCTS := GetColorToleranceSpeed;
CTS := Integer(CTS * 9 mod 3 <> 0);
ColorToleranceSpeed(CTS);
FindColorsSpiralTolerance(X, Y, Points, Color, MSX1, MSY1, MSX2, MSY2, Tol);
if Length(Points) = 0 then
begin
ColorToleranceSpeed(tCTS);
Exit;
end;
ColorToleranceSpeed(1);
aPoints := TPAtoATPAEx(Points, ObjWidth, ObjHeight);
SortATPAFromFirstpoint(aPoints,Point(x,y));
SetLength(Points, 0);

for I := 0 to High(aPoints) do
begin
_FindAllRandoms(true, []);
writeln(IntToStr(Length(aPoints[i])));
if ((Length(aPoints[i]) >= minCount) and (Length(aPoints[i]) <= 5)) then
begin
myPoint := MiddleTPA(aPoints[i]);

XDif := (myPoint.x - LastX);
YDif := (myPoint.y - LastY);

if (((XDif > 10) or (XDif < -10)) or ((YDif > 10) or (YDif < -10))) then // prevent stupid mouse spams
begin
MMouse(myPoint.X, myPoint.Y, 0, 0);
GetMousePos(X, Y);
LastX := X;
LastY := Y;
wait(RandomRange(30,50));
if (isUpTextCustom(UpText, TextColor)) then
begin
Result := True;
ColorToleranceSpeed(tCTS);
exit;
end;
end;
end;
end;
ColorToleranceSpeed(tCTS);
end;

Function Moving:Boolean;
var
MovingPixels:Integer; // todo: make this a global var for debugging
MovCheckBox:TBox;
begin
Wait(100); // lets make sure we're moving first
MovCheckBox := IntToBox(0, 0, 517, 340);
MovingPixels := (AveragePixelShift(MovCheckBox, 25, 100));
Result := (MovingPixels > 30000);
end;

function FindStrangeBox:Boolean;
var
x,y:Integer;
begin
Result := findDTM(StrangeBox, x, y, MIX1, MIY1, MIX2, MIY2);
end;

Procedure _SolveBox;
var
st2: Integer;
shapeQ, shape, ans: string;
numQ, num: Integer;
x, y: Integer;
Solved:Boolean;
begin
if not (FindStrangeBox) then
exit
else
begin
findDTM(StrangeBox, x, y, MIX1, MIY1, MIX2, MIY2);
mmouse(x,y,2,2);
wait(RandomRange(100,150));
if (isUpTextCustom(['box','Box','ox','range','Str'], 'orange')) then
begin
writeln('Found Strange Box!');
ClickMouse2(Mouse_Left);
wait(2000);
end else
exit;
end;

while FindStrangeBox do
begin
WriteLn('Found a box, solving...');
Wait(1000);
GetQuestion(numQ, shapeQ);
if (shapeQ = '') and (numQ = 10) then
exit;
WriteLn('Question is:');
if shapeQ = '' then
WriteLn('Which shape has number ' + IntToStr(numQ))
else
WriteLn('What number is the ' + shapeQ);
st2 := GetSystemTime;
repeat
GetBoxSide;
Shape:=GetShape;
Num:=GetNumber;
UnFreeze;
if DebugBox then
Wait(2000) Else
if (num = numQ) or (shape = shapeQ) then
begin
if num = numQ then
ans := shape
else
ans := IntToStr(num);
WriteLn('Answer is ' + ans);
if FindText(x, y, ans, upchars07, 116, 286, 183, 311) then
begin
Mouse(150, 300, 7, 7, True);
takeScreen(SRL_Randoms[17].name);
WriteLn('******** SOLVED BOX RANDOM ********');
Solved := True;
Exit;
end;
if FindText(x, y, ans, upchars07, 235, 286, 302, 311) then
begin
Mouse(260, 300, 7, 7, True);
takeScreen(SRL_Randoms[17].name);
WriteLn('******** SOLVED BOX RANDOM ********');
Solved := True;
Exit;
end;
if FindText(x, y, ans, upchars07, 350, 286, 417, 311) then
begin
Mouse(370, 300, 7, 7, True);
takeScreen(SRL_Randoms[17].name);
WriteLn('******** SOLVED BOX RANDOM ********');
Solved := true;
Exit;
end;
end;
until GetSystemTime > st2 + 12000;
Wait(1500 + Random(1000));

if not (Solved) then
_SolveBox;
end;

if Length(NumberArray)>0 then
begin
FreeNumbers;
SetLength(NumberArray,0);
end;
if Length(ShapeArray)>0 then
SetLength(ShapeArray,0);
end;

procedure Proggy;
var
TimeGone, KebbitsPH, HuntExpPH:Integer;
begin
TimeGone := (GetTimeRunning/1000);
KebbitsPH :=(3600*(KebbitsCaught))/((TimeGone));
HuntExpPH :=(3600*(ExpGained))/((TimeGone));
ClearDebug;
writeln(' **********************************************');
writeln(' * iFalconry Version '+Version);
writeln(' **********************************************');
case (KebbitType) of
1: writeln(' * Currently Catching: Spotted Kebbit');
2: writeln(' * Currently Catching: Dark Kebbit');
3: writeln(' * Currently Catching: Spotted and Dark Kebbit');
4: writeln(' * Currently Catching: Dashing Kebbit');
5: writeln(' * Currently Catching: Spotted and Dashing Kebbit');
6: writeln(' * Currently Catching: Dark and Dashing Kebbit');
7: writeln(' * Currently Catching: All Kebbit');
end;
writeln(' * Kebbits Caught: '+IntToStr(KebbitsCaught));
writeln(' * Hunting Levels Gained: '+IntToStr(HuntingLevelsGained));
writeln(' * Hunting Experience Gained: '+IntToStr(ExpGained));
writeln(' * Hunting Experience Per Hour: '+IntToStr(HuntExpPH));
writeln(' * Status: '+Status);
writeln(' * Time Running: '+TimeRunning);
writeln(' **********************************************');
end;

Function HasCombatColors:Boolean;
var
X, Y: integer;
begin
result := (FindColor(X, Y, 255, 223, 127, 295, 175) and FindColor(X, Y, 65280, 223, 127, 295, 175));
end;

procedure CheckCombat;
begin
if (HasCombatColors) then
begin
Ftab(Tab_stats);
CurrHP := (GetSkillInfo('hitpoints', true));
Wait(RandomRange(200, 500));
if ((CurrHP+1) < LastHP) then
begin
Proggy;
runaway(RandomDirection, True, 1, RandomRange(2000,4000));
repeat until not (Moving);
LastHP := CurrHP;
end;
end;
end;

procedure CheckForRandoms(CheckInv:Boolean); // we do this to prevent crashes due to spamming FindAllRandoms
begin
// if (TimeFromMark(CheckRandomTime) >= 1000) then
// begin
if (FindStrangeBox and CheckInv) then
_SolveBox
else
_FindAllRandoms(CheckInv, []);

CheckCombat;
// MarkTime(CheckRandomTime);
// end;
end;

Function Mode(Numbers:TIntegerArray):Integer;
var
Count:TIntegerArray;
Color, i, j, n:Integer;
begin
// how does simba not already have a function to get mode? o.0
Color := 0;
Result := 0;
SetLength(Count,30);

for i := 0 to high(Numbers) do
begin
for j := 0 to high(Numbers) do
begin
if (Numbers[i] = Numbers[j]) then
Count[i] := (Count[i]+1);
end;
end;

for n := 0 to high(Numbers) do
begin
if ((Count[n] > Count[n+1]) and (Count[n+1] <> 0)) then
Result := (Numbers[n]);
end;
if (Result = 0) then
Result := (Numbers[1]);
end;

Procedure FixChatCustom;
var
x, y, ScrollX, ScrollY: Integer;
begin
// FixChat doesn't work.. at all..
if not (Loggedin) then
LoginPlayer;
ScrollX := 504;
ScrollY := 453;
ClickToContinue; // genie random doesn't click to continue.. so it gets stuck in a loop if this isn't here
if not (FindBitMap(ChatScrolledDown, x, y)) then
begin
mmouse(ScrollX, ScrollY, 4, 4);
wait(RandomRange(30,70));

while not (FindBitMap(ChatScrolledDown, x, y)) do
HoldMouse(ScrollX, ScrollY, mouse_left);

ReleaseMouse(ScrollX, ScrollY, mouse_left);
end;
end;

Function HighCustom(TheArray:TIntegerArray):Integer;
var
i:Integer;
begin
for i:=0 to high(TheArray) do
begin
if (TheArray[i] = 0) then
begin
if (i = 0) then
begin
Result := i
// writeln('HIGHCUSTOM: '+IntToStr(i));
exit;
end else
begin
Result := i - 1;
// writeln('HIGHCUSTOM: '+IntToStr(i-1));
exit;
end;
end;
end;
end;

procedure SMART_DrawBoxesCustom(Clear, Fill: Boolean; TBA: TBoxArray; Color: Integer);
var
i:Integer;
begin
if not (DrawBoxes) then
exit;
// SMART_ClearCanvas is called in SMART_DrawBoxes before it checks if coords
// are valid.... extremely stupid and causes crashes.
for i:=0 to high(TBA) do
begin
if (TBA[i].X1 < 0) then
TBA[i].X1 := 0;
if (TBA[i].X2 < 0) then
TBA[i].X2 := 0;
if (TBA[i].Y1 < 0) then
TBA[i].Y1 := 0;
if (TBA[i].Y2 < 0) then
TBA[i].Y2 := 0;
end;

SMART_DrawBoxes(Clear, Fill, TBA, Color);
end;

procedure HoverSkillCustom(Skill: variant; Click: Boolean);
var
TP: TPoint;
begin
// if click is false, more than half the time, HoverSkill hover incorrectly. someone
// copy pasted fail code, and caused this.
GameTab(Tab_stats);

TP := SkillToCoords(Skill);

if(Click)then
begin
MouseBox(TP.X-15, TP.Y-10, TP.X+15, TP.Y-10, mouse_left);
Wait(3000+Random(3000));
CloseWindow;
end else begin
MMouse(TP.X, TP.Y, 30, 20);
Wait(1000 + Random(500));
end;
end;

Function GetBlackChatCount:Integer;
begin
result := (CountColor(0, 6, 343, 496, 459));
end;

Procedure SetGameChat;
begin
mmouse(95, 490, 15, 7);
wait(RandomRange(50,110));
ClickMouse2(Mouse_Left);
end;

procedure SkillFailSafe;
var
X, Y:Integer;
begin
if FindColor(X, Y, 8042720, 485, 11, 515, 32) then
begin
MouseBox(X+1, Y+1, X+1, Y+1, mouse_left);
wait(RandomRange(400,700))
end;
end;

procedure RotateCamera;
begin
MakeCompass(RandomRange(0, 360));
end;

Procedure CustomWait(CustomTime:Integer; CheckInv:Boolean);
begin
MarkTime(CustomWaitTime);
repeat
if (CustomTime > 99) then
begin
CheckForRandoms(CheckInv);
end;
until (TimeFromMark(CustomWaitTime) >= CustomTime);
end;

Function LeveledUp:Boolean;
begin
result := ((CountColor(16711680,209,438,364,451) > 20) or (CountColor(16777215,209,438,364,451) > 20));
end;

function RetrieveFalcon(Kebbit:String):Boolean;
var
x, y:Integer;
begin
Status := 'Retrieving Falcon';
Proggy;
CheckForRandoms(False);
KebbitsCaught := KebbitsCaught+1;

if (ContainsText(Kebbit, ['otted','Spot','pot'])) then
ExpGained := ExpGained+104
else
if (ContainsText(Kebbit, ['ark','Dark'])) then
ExpGained := ExpGained+132
else
if (ContainsText(Kebbit, ['ash','Dash','shing'])) then
ExpGained := ExpGained+156;

repeat
CheckForRandoms(False);
if (FindBitMap(Arrow, x, y)) then
begin
x:= x+3;
y:= y+22;
case (RandomRange(1,13)) of
1..6:
mmouse(x,y,5,5);
7..9:
mmouse(x,y,3,7);
10..13:
mmouse(x,y,7,7);
end;
Customwait(RandomRange(100,300), false);

if (isUpTextCustom(['etrie','Retrieve','trie'], 'white')) then
begin
case (RandomRange(1,35)) of
1..20:
begin
case (RandomRange(1,10)) of
1..9:
begin
ClickMouse2(mouse_right);
WaitOptionEx('etrie', 'npc', ClickLeft, RandomRange(50,140));
end;
10:
ClickMouse2(mouse_left);
end;
end;
21..35:
begin
case (RandomRange(1,13)) of
1..12:
ClickMouse2(mouse_left);
13:
begin
ClickMouse2(mouse_right);
WaitOptionEx('etrie', 'npc', ClickLeft, RandomRange(50,140));
end;
end;
end;
end;
CustomWait(RandomRange(700,1000), false);
end else
begin
case Random(3) of
1:
begin
RotateCamera;
CheckForRandoms(false);
end
end;
end;
repeat until not (Moving);
Customwait(RandomRange(600,700), false);
if (LeveledUp) then
begin
HuntingLevelsGained := HuntingLevelsGained + 1;
repeat
ClickContinue(true);
until not (LeveledUp);
end;
end else
begin
RadialWalkTolerance(1767418,0,360,60,0,0,0);
repeat
CheckForRandoms(false);
until not (Moving);
end;
CheckForRandoms(false);
FixChatCustom;
until (FindBlackChatMessage('retrieve') or FindBlackChatMessage('advanced a'));
CheckForRandoms(true);

Result := true;
end;

function WaitForFalcon(Kebbit:String):Boolean;
var
FalconSentTime, ChatColors2, x ,y:Integer;
begin
Status := 'Waiting for Falcon to return';
Proggy;
MarkTime(FalconSentTime);
CheckForRandoms(True);
repeat
ChatColors2 := Mode([GetBlackChatCount, GetBlackChatCount, GetBlackChatCount, GetBlackChatCount, GetBlackChatCount]);
CheckForRandoms(False);
until ((ChatColors1 <> ChatColors2) or (FindBitMap(Arrow, x, y) or FindBitMap(MArrow, x, y)) or (TimeFromMark(FalconSentTime) >= 7000));

CheckForRandoms(False);
FixChatCustom;
if (FindBlackChatMessage('success') or (FindBitMap(Arrow, x, y) or FindBitMap(MArrow, x, y))) then
begin
RetrieveFalcon(Kebbit);
FailedCatchCount := 0;
end else
if (FindBlackChatMessage('try to catch')) then
FailedCatchCount := FailedCatchCount+1;
CheckForRandoms(True);

Result := true;
end;

Procedure AntiBan;
begin
if (TimeFromMark(AntiBanTime) < 1000) then
exit;
Status := 'Antiban';
Proggy;
case RandomRange(0,80) of
0..9:
RotateCamera;
10..11:
SetAngle(SRL_ANGLE_HIGH);
12:
begin
HoverSkillCustom('hunter', false);
CustomWait(RandomRange(3000,7000), false);
SkillFailSafe;
case Random(15) of
1:
begin
HoverSkillCustom('hitpoints', false);
CustomWait(RandomRange(3000,7000), false);
SkillFailSafe;
end;
end;
GameTab(tab_inv);
end;
14:
Boredhuman;
15:
RandomMovement;
16:
begin
RandomRClick;
CustomWait(RandomRange(1500,2000), true);
end;
17:
begin
MMouseOffClient('random');
CustomWait(RandomRange(2000,3000), true);
end;
end;
CheckForRandoms(true);
MarkTime(AntiBanTime);
end;

Procedure Drop;
var
MouseX, MouseY, DropCount, _InvCount:Integer;
CoinsInInv:Boolean;
begin
GameTab(Tab_Inv);
CheckForRandoms(true);
AntiBan;
Status := 'Dropping items';
Proggy;
DropCount := 0;
MouseX := 575;
MouseY := 230;
_InvCount := 0;

if (CoinsInInv) then
_InvCount := _InvCount + 1;

repeat
CheckForRandoms(true);
if (DropCount >= 1) then
MouseX := MouseX + 45;

case (DropCount) of
4:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
8:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
12:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
16:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
20:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
24:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
end;

CheckForRandoms(True);
DropCount := DropCount + 1;
if (not (DropCount = CoinSlot) and (ExistsItem(DropCount))) then
begin
mmouse(RandomRange(MouseX-5,MouseX+7), RandomRange(MouseY-10,MouseY+10), 2, 2);
Customwait(RandomRange(30,50), true);

CheckForRandoms(True);
if (not isUpTextCustom(['alf','half','key','of a k','of a K','Half','Key'], 'orange')) then // don't drop half keys, they're worth moneys!
begin
if (not isUpTextCustom(['oins','coins','Coins','ins','Coi','coi','oin'], 'orange')) then
begin
if ((not isUpTextCustom(['ones','Bones','bones','bone','Bone','Bon','bon'], 'orange')) or not (BuryBones)) then
begin
Clickmouse2(mouse_right);
case (RandomRange(1,25)) of
1..23:
WaitOptionEx('rop ', 'action', ClickLeft, RandomRange(20, 60));
24..25:
WaitOptionEx('xamine', 'action', ClickLeft, RandomRange(25, 70));
end;
CheckForRandoms(True);
end else
begin
ClickMouse2(mouse_left); // bury
Customwait(RandomRange(1300,1500), true);
end;
end else
begin
_InvCount := _InvCount + 1;
if (CoinsInInv = False) then
begin
CoinsInInv := True;
CoinSlot := DropCount;
end;
end;
end else
_InvCount := _InvCount + 1;
end;

CheckForRandoms(True);

If Not LoggedIn Then
Begin
Loginplayer;
CustomWait(RandomRange(2000,3000), True);
End;
until (DropCount >= 28)

if ((InvCount <> _InvCount) and (RepeatCount < 3)) then
begin
RepeatCount := RepeatCount + 1;
writeln('InvCount: '+IntToStr(InvCount)+' _InvCount: '+IntToStr(_InvCount));
Drop;
exit;
end;
RepeatCount := 0;
CheckForRandoms(True);
end;

function GetKebbitColor(_KebbitType,Itr:Integer):Integer;
begin
if (KebbitColor[1][_KebbitType][Itr] <> 0) then
Result := KebbitColor[1][_KebbitType][Itr]
else
begin
case (KebbitType) of // do this for a performance improvement
1:KebbitColor[0][1][0] := SpottedKebbitColor;
2:KebbitColor[0][2][0] := DarkKebbitColor;
3:
begin
KebbitColor[0][3][0] := DarkKebbitColor;
KebbitColor[0][3][1] := SpottedKebbitColor;
end;
4:KebbitColor[0][4][0] := DashingKebbitColor;
5:
begin
KebbitColor[0][5][0] := DashingKebbitColor;
KebbitColor[0][5][1] := SpottedKebbitColor;
end;
6:
begin
KebbitColor[0][6][0] := DashingKebbitColor;
KebbitColor[0][6][1] := DarkKebbitColor;
end;
7:
begin
KebbitColor[0][7][0] := DashingKebbitColor;
KebbitColor[0][7][1] := DarkKebbitColor;
KebbitColor[0][7][2] := SpottedKebbitColor;
end;
end;

Result := KebbitColor[0][_KebbitType][Itr];
end;
end;

procedure FindKebbit;
var
i,x,y,FailedFindingCount:Integer;
FoundKebbit:Boolean;
KebbitUpText:String;
begin
ChatColors1 := Mode([GetBlackChatCount, GetBlackChatCount, GetBlackChatCount, GetBlackChatCount, GetBlackChatCount]);
repeat
if not (Loggedin) then
LoginPlayer;

if (FailedFindingCount > 2000) then
begin
writeln(' FATAL! Couldnt find Kebbit');
Logout;
TerminateScript;
end;

CheckForRandoms(true);
Status := 'Looking For Kebbit';
Proggy;
for i:=0 to highcustom(KebbitColor[0][KebbitType]) do
begin
CheckForRandoms(true);
if (FindObjTPACustom(x, y, GetKebbitColor(KebbitType, i), 1, 1, 10, 10, 2, 5, KebbitName[KebbitType], 'yellow')) then
begin
CheckForRandoms(True);
KebbitUpText := GetUpTextCustom('yellow');
CheckForRandoms(True);
case (RandomRange(1,43)) of
1..15:
begin
case (RandomRange(1,16)) of
1..13:
if (isUpTextCustom(['atch','Catch','tch'], 'white')) then
begin
ClickMouse2(mouse_left);
KebbitColor[1][KebbitType][i] := KebbitColor[0][KebbitType][i];
WaitForFalcon(KebbitUpText);
CheckForRandoms(True);
FoundKebbit := True;
exit;
end;
14..16:
begin
ClickMouse2(mouse_right);
CustomWait(RandomRange(40,70), true);
if (OptionsExist(['atch', 'Catch'], true)) then
begin
ChooseOption('atch');
KebbitColor[1][KebbitType][i] := KebbitColor[0][KebbitType][i];
WaitForFalcon(KebbitUpText);
CheckForRandoms(True);
FoundKebbit := True;
exit;
end;
end
end;
end;
16..43:
begin
case (RandomRange(1,18)) of
1..15:
begin
ClickMouse2(mouse_right);
CustomWait(RandomRange(40,70), true);
if (OptionsExist(['atch', 'Catch'], true)) then
begin
ChooseOption('atch');
KebbitColor[1][KebbitType][i] := KebbitColor[0][KebbitType][i];
WaitForFalcon(KebbitUpText);
CheckForRandoms(True);
FoundKebbit := True;
exit;
end;
end;
16..18:
begin
if (isUpTextCustom(['atch','Catch','tch'], 'white')) then
begin
ClickMouse2(mouse_left);
KebbitColor[1][KebbitType][i] := KebbitColor[0][KebbitType][i];
WaitForFalcon(KebbitUpText);
CheckForRandoms(True);
FoundKebbit := True;
exit;
end;
end;
end;
end;
end;
end else
if (Random(500) = 1) then
RotateCamera;
end;
FailedFindingCount := FailedFindingCount+1;
CheckForRandoms(true);
until (FoundKebbit);
end;

begin
UpdateScript;
activateclient;
DeclarePlayer;
SetupSRL();
SRL_CombatRandoms := False;
DeclareVariables;
Status := 'Starting up...';
Proggy;
if not (Loggedin) then
LoginPlayer;
CheckForRandoms(true);
SetGameChat;
FixChatCustom;
SetRun(true);
ToggleSplitPrivateChat(false);
SetBrightness(4);
CurrHP := GetSkillInfo('hitpoints', true);
customwait(randomrange(1500,2000), false);
LastHP := CurrHP;
SetAngle(SRL_ANGLE_HIGH);
repeat
CheckForRandoms(true);
if not (Loggedin) then
LoginPlayer
else
begin
if (InvCount > 23) then
Drop
else
FindKebbit;
CheckForRandoms(true);
AntiBan;
end;
until (false);
end.



(******************************************************************)
(* *
* *
* PowerFlop Script By: *
* Aaron126 *
* *
* Big thanks to the makers of the following scripts: *
* INeedBots AIO Chopper *
* Elfyyy's Pest Control *
* Waffle's Power Fletcher 9001 *
* Hoodz Fighter *
* *
* *
* ---- HOW TO USE ---- *
* set the logtype *
* If not wielding, set the AxeSlot *
* If Fletching, have a knife in KnifeSlot *
* Start the script near the tree of your choice *
* *
* *)
(******************************************************************)
Program PowerFlop;
{$define SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/Misc/SmartGraphics.Simba}
var
HPBox, ChopBox, TreeBox, MovCheckBox:TBox;
Status, LogName, TreeName, WarningInfo: string;
BowsMade, FletchLevelsGained, WCLevelsGained, LogsChopped, TimeGone, LogsPH, BowsPH, LastHP, AxeFailSafeTime, AxeFailSafe, AxeFailSafe1, AxeFailSafe2, TreeColor, FletchExpPH, WCExpPH, ExpPerBow, ExpPerLog, WCExpGained, FletchExpGained, X1, Y1, X2, Y2, MovingPixels, TreeMovingPixels, PlayerMovingPixels, CheckRandomTime, DrawBoxTime, AntiBanTime, TreeAntiBanTime, KnifeX, KnifeY, CustomWaitTime, NITime, DropCount, _InvCount, CoinSlot, CurrHP, RepeatCount:Integer;
AxeFailSafeToggle, InitWait, InCombat, CoinsInInv, IsInWait, _CheckInv, DebugOverride:Boolean;

(******************************************************************************)
(* CONFIGURATION *)
(******************************************************************************)

const
RandomBreaks = True; // simulate random human breaks
BreakChance = 300; // how frequent the breaks will occur: the higher the number, the less frequent (default:300)

Fletching = True; // True means you'll fletch the logs you chop, false means you'll drop the logs
BowType = 1; // the type of bow you want to make (1 = longbow, 2 = shortbow)
KnifeSlot = 1; // Inventory slot that your knife is in, 0 if not fletching (1 through 28)

AxeSlot = 0; // Inventory slot that your axe is in, 0 if wielding your axe (1 through 28)
LogType = 'willow';
(*
LogType: type of log you want to cut / fletch
Supprted types: Regular, Oak, Willow, Maple, Yew, Magic
*)

DrawBoxes = False; // disable if you experience script crashes related to box creation
AutoUpdate = True; // automatic downloading of the script when a new version comes out
EnableRandoms = True; // enable detection of random events
Debug = False; // extra logging for debugging

Procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Username goes here
Players[0].Pass := ''; //Password goes here
Players[0].Nick := ''; //Character name (excluding first letter)
Players[0].LampSkill := SKILL_WOODCUTTING;
Players[0].Active := True;
end;
(******************************************************************************)
(* END OF COFIGURATION *)
(******************************************************************************)
const
Version = '2.11';

procedure UpdateScript;
var
NewFile:integer;
OnlineVersion, NewScript, NewFilePath:string;
begin
if (AutoUpdate) then
begin
writeln('Checking for script updates...');
OnlineVersion := GetPage('http://pastebin.com/raw.php?i=XJCd6hFE');
writeln('Latest Version: '+OnlineVersion);
writeln('Current Version: '+Version)
if (trim(OnlineVersion) > Version) then
begin
writeln(' ******************************************************');
writeln(' * NEW SCRIPT VERSION AVAILABLE! *');
writeln(' * ...DOWNLOADING NOW... *');
writeln(' ******************************************************');
NewScript := GetPage('http://pastebin.com/raw.php?i=Nf6cMQQH');
NewFilePath := ScriptPath+ 'PowerFlop['+OnlineVersion+'].simba';
NewFile := Rewritefile(NewFilePath, true);
try
begin
WriteFileString(NewFile, NewScript);
writeLn(' * SUCCESSFULLY DOWNLOADED TO: *');
writeln(' * '+NewFilePath+' *');
writeln(' * Open the new file if you wish to use it! *');
writeln(' ******************************************************');
end
except
begin
writeLn('Fatal error writing to '+NewFilePath+'!!');
terminatescript;
end;
end;
CloseFile(NewFile);
TerminateScript;
end else
writeLn('You have the latest version of the script!');
wait(2500);
end else
begin
Writeln('');
Writeln('WARNING: Autoupdate is disabled');
Writeln('');
Writeln('To manually download the latest script, go to: http://pastebin.com/raw.php?i=Nf6cMQQH ');
Writeln('');
wait(3000);
exit;
end;
end;

procedure Proggy;
begin
TimeGone := (GetTimeRunning/1000);
LogsPH :=(3600*(LogsChopped))/((TimeGone));
BowsPH :=(3600*(BowsMade))/((TimeGone));
FletchExpGained := (BowsMade*ExpPerBow);
WCExpGained := (LogsChopped*ExpPerLog);
FletchExpPH :=(3600*(FletchExpGained))/((TimeGone));
WCExpPH :=(3600*(WCExpGained))/((TimeGone));
ClearDebug;
writeln(' **********************************************');
writeln(' * PowerFlop Version '+Version);
writeln(' **********************************************');

if (Fletching) then
begin
if (bowType = 1) then
begin
if (LogName = 'Logs') then
writeln(' * Currently Making: longbows')
else
writeln(' * Currently Making: '+LogName+' longbows');
end else
begin
if (LogName = 'Logs') then
writeln(' * Currently Making: shortbows')
else
writeln(' * Currently Making: '+LogName+' shortbows');
end;
end;

writeln(' * Woodcutting levels gained: '+IntToStr(WCLevelsGained));
if (Fletching) then
writeln(' * Fletching levels gained: '+IntToStr(FletchLevelsGained));
writeln(' * Woodcutting experience gained: '+IntToStr(WCExpGained) +' Exp/Hr: '+IntToStr(WCExpPH));
if (Fletching) then
writeln(' * Fletching experience gained: '+IntToStr(FletchExpGained)+' Exp/Hr: '+IntToStr(FletchExpPH));
writeln(' * Logs Chopped: '+IntToStr(LogsChopped)+' Logs/Hr: '+IntToStr(LogsPH));
if (Fletching) then
writeln(' * Bows Made: '+IntToStr(BowsMade) +' Bows/Hr: '+IntToStr(BowsPH));
writeln(' * Time Running: '+TimeRunning);
Writeln(' * Status: ' + Status);
writeln(' **********************************************');
if (WarningInfo <> '') then
begin
writeln(' * WARNINGS');
writeln(' * '+WarningInfo);
writeln(' **********************************************');
end;
if (DebugOverride) then
begin
writeln(' * DEBUG');
writeln(' **********************************************');
writeln(' * AxeFailSafe: '+IntToStr(AxeFailSafe));
writeln(' * MovingPixels: '+IntToStr(MovingPixels)+' | TreeMovingPixels: '+IntToStr(TreeMovingPixels)+' | PlayerMovingPiels: '+IntToStr(PlayerMovingPixels));
writeln(' * CheckRandomTime: '+IntToStr(TimeFromMark(CheckRandomTime))+' | AntiBanTime: '+IntToStr(TimeFromMark(AntiBanTime))+' | TreeAntiBanTime: '+IntToStr(TimeFromMark(TreeAntiBanTime)));
writeln(' * CurrHP: '+IntToStr(CurrHP)+' | LastHP: '+IntToStr(LastHP));
writeln(' * _InvCount:'+IntToStr(_InvCount)+' | DropCount:'+IntToStr(DropCount)+' | RepeatCount: '+IntToStr(RepeatCount));
writeln(' * KnifeX: '+IntToStr(KnifeX)+' KnifeY: '+IntToStr(KnifeY));
writeln(' * AxeSlot: '+IntToStr(AxeSlot)+' | KnifeSlot: '+IntToStr(KnifeSlot)+' | CoinSlot: '+IntToStr(CoinSlot));
writeln(' * InitWait: '+BoolToStr(InitWait)+' | InCombat: '+BoolToStr(InCombat)+' | CoinsInInv: '+BoolToStr(CoinsInInv)+' | IsInWait: '+BoolToStr(IsInWait)+' | _CheckInv: '+BoolToStr(_CheckInv));
writeln(' **********************************************');
end;
end;

Function ContainsText(CheckText: String; Text: TStringArray): Boolean;
Var
TheText: String;
i, n: Integer;
Begin
TheText := CheckText;
n := High(Text);
For i := 0 to n do
If (Pos(Text[i], TheText) > 0) then
Begin
Result := True;
Exit;
End;
End;

Function Moving:Boolean;
begin
Wait(100); // lets make sure we're moving first
MovCheckBox := IntToBox(0, 0, 517, 340);
MovingPixels := (AveragePixelShift(MovCheckBox, 100, 400));
Result := (MovingPixels > 60000);
Proggy;
end;

Function IsEnkUp:Boolean;
begin
if (LogName = 'Magic') then
begin
TreeMovingPixels := (AveragePixelShift(TreeBox, 200, 600) - 10);
Result := (TreeMovingPixels > 25)
end else
begin
TreeMovingPixels := (AveragePixelShift(TreeBox, 200, 600));
Result := (TreeMovingPixels > 25);
end;
Proggy;
end;

Function isChopping:Boolean;
begin
PlayerMovingPixels := (AveragePixelShift(ChopBox, 250, 500));
Result := (PlayerMovingPixels > 150);
// writeln(IntToStr(AveragePixelShift(ChopBox, 250, 500)));
Proggy;
end;

procedure SkillFailSafe;
var
X, Y:Integer;
begin
if FindColor(X, Y, 8042720, 485, 11, 515, 32) then
begin
status := 'Found a skill interface, closing'
Proggy;
MouseBox(X+1, Y+1, X+1, Y+1, mouse_left);
wait(RandomRange(400,700))
end;
end;

Procedure FindStrangePlant; // this might be a bad idea.
var
x, y: Integer;
begin
if ((FindObj(x, y, 'ra', 13926569, 5)) or (FindObj(x, y, 'ra', 8013408, 5))) then
begin
Wait(RandomRange(20, 50));
if (IsUpText('ick')) then
begin
mmouse(x, y, 1, 1);
Wait(RandomRange(20, 100));
mouse(x, y, 0, 0, false);
Wait(RandomRange(20, 100));
ChooseOption('ick');
Wait(RandomRange(100, 2000));
end;
end;
end;

procedure CheckForRandoms(CheckInv:Boolean); // we do this to prevent crashes due to spamming FindAllRandoms
begin
if (TimeFromMark(CheckRandomTime) >= 1500) then
begin
_CheckInv := CheckInv;
Proggy;
_FindAllRandoms(CheckInv, []);
FindStrangePlant;
MarkTime(CheckRandomTime);
end;
end;

Function HasCombatColors:Boolean;
var
X, Y: integer;
begin
result := (FindColor(X, Y, 255, 223, 127, 295, 175) or FindColor(X, Y, 65280, 223, 127, 295, 175));
end;

procedure CheckCombat;
begin
if (HasCombatColors) then
begin
Ftab(Tab_stats);
CurrHP := (GetSkillInfo('hitpoints', true));
Wait(RandomRange(200, 500));
if ((CurrHP+1) < LastHP) then
begin
InCombat := True;
Proggy;
runaway(RandomDirection, True, 1, RandomRange(2000,4000));
if ((CurrHP <= 5) and not (ContainsText(WarningInfo, ['HEALTH']))) then
begin
WarningInfo := (WarningInfo+'| LOW HEALTH('+IntToStr(CurrHP)+') |');
end;
repeat
Moving
until not (Moving);
LastHP := CurrHP;
end;
InCombat := False;
end;
end;

Procedure StopActions;
begin
Proggy;
mmouse(MSCX, MSCY, 0, 0);
wait(RandomRange(50,100));
if (IsUpText('ere')) then
mouse(MSCX, MSCY, 1, 1, true)
else
begin
mouse(MSCX, MSCY, 1, 1, false);
WaitOptionEx('ere', 'All', ClickLeft, RandomRange(50,100));
end;
if (EnableRandoms) then
CheckForRandoms(True);
end;

Procedure CustomWait(CustomTime:Integer; CheckInv:Boolean);
begin
MarkTime(CustomWaitTime);
repeat
if (CustomTime > 99) then
begin
IsInWait := True;
CheckForRandoms(CheckInv);
CheckCombat;

if (ischopping) and not (Moving) then
if (IsEnkUp) then
StopActions;
end;
Proggy;
until (TimeFromMark(CustomWaitTime) >= CustomTime);
IsInWait := False;
end;

procedure SetupScript;
begin
AxeFailSafe := 0;
InitWait := false;
AxeFailSafeToggle := False;
InCombat := False;
CoinsInInv := False;
IsInWait := False;
DebugOverride := Debug;
MarkTime(AxeFailSafeTime);
MarkTime(TreeAntiBanTime);
MarkTime(AntiBanTime);
MarkTime(CheckRandomTime);
BowsMade := 0;
FletchLevelsGained := 0;
WCLevelsGained := 0;
LogsChopped := 0;
_InvCount := 0;
CoinSlot := 0;
if (DrawBoxes) then
SMART_ClearCanvas;
HPBox := (IntToBox(223, 127, 295, 175));
ChopBox := (IntToBox(MSCX - 20, MSCY - 36, MSCX + 20, MSCY + 10));
if (DrawBoxes) then
SMART_DrawBoxes(false, false, [HPBox, ChopBox], -1);
Status := 'Starting Up...';
Proggy;
end;

Procedure DefineLogs;
begin
TreeName := '';

if (LogType= 'Logs') or (LogType = 'Regular') or (LogType = 'logs') or (LogType = 'regular') or (LogType = 'ogs') or (LogType = 'log') or (LogType = 'Log') then
begin
TreeColor := 11304;
TreeName := 'Tree';
LogName := 'Logs';
ExpPerLog := 25;
if (bowType = 1) then
ExpPerBow := 10
else
ExpPerBow := 5;
end else
if (LogType = 'Oak') or (LogType ='ak') or (LogType = 'oak') then
begin
TreeColor := 5085064;
TreeName := 'Oak';
LogName := 'Oak';
ExpPerLog := 38;
if (bowType = 1) then
ExpPerBow := 25
else
ExpPerBow := 17;
end else
if (LogType = 'Willow') or (LogType = 'illow') or (LogType = 'willow') then
begin
TreeColor := 5468282;
TreeName := 'Willow';
LogName := 'Willow';
ExpPerLog := 67;
if (bowType = 1) then
ExpPerBow := 41
else
ExpPerBow := 33;
end else
if (LogType = 'Maple') or (LogType = 'aple') or (LogType = 'maple') then
begin
TreeColor := 6455;
TreeName := 'Maple';
LogName := 'Maple';
ExpPerLog := 100;
if (BowType = 1) then
ExpPerBow := 58
else
ExpPerBow := 50;
end else
if (LogType = 'Yew') or (LogType = 'ew') or (LogType = 'yew') then
begin
TreeColor := 2189148;
TreeName := 'Yew';
LogName := 'Yew';
ExpPerLog := 175;
if (BowType = 1) then
ExpPerBow := 75
else
ExpPerBow := 67;
end else
if (LogType = 'Magic') or (LogType = 'agic') or (LogType = 'magic') then
begin
TreeColor := 7579819;
TreeName := 'Mag';
LogName := 'Magic';
ExpPerLog := 250;
if (BowType = 1) then
ExpPerBow := 92
else
ExpPerBow := 83;
end;

if (TreeName = '') then
begin
writeln(' FATAL! Invalid LogType specified');
TerminateScript;
end;
end;

procedure DoChopAntiSpam;
begin
if(AxeFailSafeToggle = false) then
begin
AxeFailSafeToggle := true;
AxeFailSafe1 := invcount;
Marktime(AxeFailSafeTime);
end
else
begin
if(TimeFromMark(AxeFailSafeTime) > 15000) then
begin
AxeFailSafeToggle := false;
AxeFailSafe2 := invcount;
if(AxeFailSafe2 > AxeFailSafe1) then
begin
InitWait := True;
AxeFailSafe := 0;
AxeFailSafe1 := invcount;
end
else
begin
InitWait := false;
AxeFailSafe := AxeFailSafe + 1;
end;
end;
end;
end;

Procedure ClearBox(Box:TBox); // no real purpose yet, mainly here for future use
begin
if (DrawBoxes) then
SMART_ClearCanvasArea(Box);
end;

Procedure RefreshBox(Box:TBox);
begin
if (TimeFromMark(DrawBoxTime) >= 4000) then // limit refreshing box to once every 4 seconds to prevent crashes
begin
if (DrawBoxes) then
begin
SMART_ClearCanvasArea(Box);
SMART_DrawBox(Box);
end;
end;
end;

Procedure TreeAntiBan;
begin
if (TimeFromMark(TreeAntiBanTime) < 1500) then
exit;

CheckCombat;
Status := 'Tree Antiban';
Proggy;
CustomWait(randomrange(250,750), False);
case Random(50) of
1..3:
begin
HoverSkill('woodcutting', false);
CustomWait(RandomRange(2500,7000), false);
SkillFailSafe;
if (Fletching) then
If (Random(4) = 1) then
begin
HoverSkill('Fletching', false);
CustomWait(RandomRange(3200,6500),false);
SkillFailSafe;
end;
end;
2..4:
begin
if (Fletching) then
begin
HoverSkill('Fletching', false);
CustomWait(RandomRange(3200,6500),false);
SkillFailSafe;
end;
end;
5..6:
RandomRClick;
7..8:
MMouseOffClient('random');
9..10:
SmallRandomMouse;
end;
MarkTime(TreeAntiBanTime);
end;

Procedure AntiBan;
begin
if (TimeFromMark(AntiBanTime) < 1000) then
exit;
CheckCombat;
Status := 'Antiban';
Proggy;
case Random(80) of
0..1:
begin
MakeCompass(RandomRange(0, 90));
CustomWait(RandomRange(1000,2000), True);
end;
2..3:
begin
MakeCompass(RandomRange(90, 180));
CustomWait(RandomRange(1000,2000), True);
end;
4..5:
begin
if not (ischopping) then
begin
SetAngle(SRL_ANGLE_LOW);
CustomWait(RandomRange(1000,2000), True);
end;
end;
6..7:
begin
SetAngle(SRL_ANGLE_HIGH);
CustomWait(RandomRange(1000,2000), True);
end;
8..9:
begin
MakeCompass(RandomRange(180,270));
CustomWait(RandomRange(1000,2000), True);
end;
10..11:
begin
MakeCompass(RandomRange(270,360));
CustomWait(RandomRange(1000,2000), True);
end;
12:
begin
HoverSkill('woodcutting', false);
CustomWait(RandomRange(3000,7000), false);
SkillFailSafe;
case Random(6) of
1:
begin
HoverSkill('Fletching', false);
CustomWait(RandomRange(3000,7000), false);
SkillFailSafe;
end;
end;
end;
13:
begin
HoverSkill('Fletching', false);
CustomWait(RandomRange(2700,6800), false);
SkillFailSafe;
case Random(5) of
1:
begin
HoverSkill('Woodcutting', false);
CustomWait(RandomRange(2500,7000),false)
SkillFailSafe;
end;
end;
end;
14:
Boredhuman;
15:
RandomMovement;
16:
RandomRClick;
17:
MMouseOffClient('random');
end;
MarkTime(AntiBanTime);
end;

Procedure RandomBreak;
begin
if (RandomBreaks) then
begin
Case Random(BreakChance) Of
1:
begin
Status := 'Taking a break';
Proggy;
CustomWait(40000 + random(7400), true);
end;
2:
begin
Status := 'Taking a break';
Proggy;
CustomWait(25500 + Random(8550), true);
end;
3:
begin
Status := 'Taking a break';
Proggy;
CustomWait(60040 + random(6759), true);
end;
4:
begin
Status := 'Taking a break';
Proggy;
CustomWait(20400 + random(2549), true);
end;
end;
end;
end;
Procedure randomWaitTime;
begin
Proggy;
case random(1000) of
1..800:
CustomWait(RandomRange(300, 700), True);
801..960:
CustomWait(RandomRange(400, 900), True);
961..1000:
CustomWait(RandomRange(500, 1000), True);
end;
end;

Procedure randomMouseClick(mx,my: Integer);
begin
case random(200) of
1..160: Mouse(RandomRange(mx - 7, mx + 7), RandomRange(my - 7, my + 7), 2, 2, true);
161..190: Mouse(RandomRange(mx - 9, mx + 9), RandomRange(my - 9, my + 9), 2, 2, true);
191..200: Mouse(RandomRange(mx - 12, mx + 12), RandomRange(my - 12, my + 12), 2, 2, true);
end;
Proggy;
end;

Procedure Drop;
var
MouseX, MouseY:Integer;
begin
CheckCombat;
if (Fletching) then
Status := 'Dropping Bows'
else
Status := 'Dropping Logs';
Proggy;
GameTab(Tab_Inv);
DropCount := 0;
MouseX := 575;
MouseY := 230;
_InvCount := 0;

if ((AxeSlot <> 0) and ((KnifeSlot = 0) or not (Fletching))) or ((AxeSlot = 0) and ((KnifeSlot <> 0) and (Fletching))) then
_InvCount := 1
else
if ((AxeSlot <> 0) and ((KnifeSlot <> 0) and (Fletching))) then
_InvCount := 2;

if (CoinsInInv) then
_InvCount := _InvCount+1;

repeat
if (DropCount >= 1) then
MouseX := MouseX + 45;

case (DropCount) of
4:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
8:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
12:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
16:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
20:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
24:
begin
MouseX := 570;
MouseY := MouseY + 35;
end;
end;

DropCount := DropCount + 1;
if not ((DropCount = KnifeSlot) and (Fletching)) and not (DropCount = AxeSlot) and not (DropCount = CoinSlot) and (ExistsItem(DropCount)) then
begin
mmouse(RandomRange(MouseX-5,MouseX+5), RandomRange(MouseY-10,MouseY+5), 2, 2);
CustomWait(RandomRange(20, 60), True);

if (not isUpText('alf')) then // don't drop half keys, they're worth moneys!
begin
if (not isUpText('oins')) then
begin
if (not isUpText('roke') and (not isUpText('xe')) and (not isUpText('nife'))) then
begin
if ((not isUpText(LogName+' log') and (not (isUpText('Log') and (LogName = 'Logs')))) or not (Fletching)) then
begin
if ((isUpText('bow')) and (Fletching)) then
begin
BowsMade := BowsMade+1;
LogsChopped := LogsChopped+1;
end else
if ((IsUpText(LogName+' log') or (IsUpText('Log') and (LogName = 'Logs'))) and not (Fletching)) then
LogsChopped := LogsChopped+1;

Clickmouse2(mouse_right);
CustomWait(RandomRange(30, 50), True);
if not (ChooseOptionMultiEx(['roken','xe'],'All',Nothing)) then
begin
WaitOptionEx('rop ', 'action', ClickLeft, RandomRange(20, 60));
end;

end else
if (isUpText(LogName+' log') or (isUpText('Log') and (LogName = 'Logs'))) then
_InvCount := _InvCount + 1;
end else
begin
if (isUpText('roke') or isUpText('xe')) then
begin
if not (ContainsText(WarningInfo, ['AxeSlot'])) then
WarningInfo := (WarningInfo+'| AxeSlot may be set incorrectly |');
end
else
if (isUpText('nife')) then
if not (ContainsText(WarningInfo, ['KnifeSlot'])) then
WarningInfo := (WarningInfo+'| KnifeSlot may be set incorrectly |');
_InvCount := _InvCount + 1;
end;
end else
begin
_InvCount := _InvCount + 1;
if (CoinsInInv = False) then
begin
CoinsInInv := True;
CoinSlot := DropCount;
end;
end;
end else
begin
_InvCount := _InvCount + 1;
end;
end;

Proggy;

if (EnableRandoms) then
CheckForRandoms(True);

If Not LoggedIn Then
Begin
Loginplayer;
CustomWait(RandomRange(2000,3000), True);
End;
until (DropCount >= 28)

if ((InvCount <> _InvCount) and (RepeatCount < 3)) then
begin
RepeatCount := RepeatCount + 1;
Drop;
exit;
end
else
if (RepeatCount > 2) then
begin
if not (ContainsText(WarningInfo, ['RepeatCount'])) then
WarningInfo := (WarningInfo+' | RepeatCount exceeding 2, enabling debug. Please post debug information on script thread | ');
DebugOverride := True;
end;
RepeatCount := 0;
end;

Procedure GetKnifeCoords;
begin
KnifeX := 0;
KnifeY := 0;

case (KnifeSlot) of
1:
begin
KnifeX := 575;
KnifeY := 230;
end;
2:
begin
KnifeX := 620;
KnifeY := 230;
end;
3:
begin
KnifeX := 665;
KnifeY := 230;
end;
4:
begin
KnifeX := 710;
KnifeY := 230;
end;
5:
begin
KnifeX := 575;
KnifeY := 265;
end;
6:
begin
KnifeX := 620;
KnifeY := 265;
end;
7:
begin
KnifeX := 665;
KnifeY := 265;
end;
8:
begin
KnifeX := 710;
KnifeY := 265;
end;
9:
begin
KnifeX := 575;
KnifeY := 300;
end;
10:
begin
KnifeX := 620;
KnifeY := 300;
end;
11:
begin
KnifeX := 665;
KnifeY := 300;
end;
12:
begin
KnifeX := 710;
KnifeY := 300;
end;
13:
begin
KnifeX := 575;
KnifeY := 335;
end;
14:
begin
KnifeX := 620;
KnifeY := 335;
end;
15:
begin
KnifeX := 665;
KnifeY := 335;
end;
16:
begin
KnifeX := 710;
KnifeY := 335;
end;
17:
begin
KnifeX := 575;
KnifeY := 370;
end;
18:
begin
KnifeX := 620;
KnifeY := 370;
end;
19:
begin
KnifeX := 665;
KnifeY := 370;
end;
20:
begin
KnifeX := 710;
KnifeY := 370;
end;
21:
begin
KnifeX := 575;
KnifeY := 405;
end;
22:
begin
KnifeX := 620;
KnifeY := 405;
end;
23:
begin
KnifeX := 665;
KnifeY := 405;
end;
24:
begin
KnifeX := 710;
KnifeY := 405;
end;
25:
begin
KnifeX := 575;
KnifeY := 440;
end;
26:
begin
KnifeX := 620;
KnifeY := 440;
end;
27:
begin
KnifeX := 665;
KnifeY := 440;
end;
28:
begin
KnifeX := 710;
KnifeY := 440;
end;
end;

if (KnifeSlot > 28) then
begin
writeln(' FATAL! Invalid KnifeSlot specified, must be between 0 and 28!');
TerminateScript;
end;
end;

Procedure Fletch;
var
itFailed: boolean;
Time, RandomNumb: integer;
begin
CheckCombat;
itFailed := True;

if (FindBlackChatMessage('Nothing interesting')) and (TimeFromMark(NITime) >= 30000) then // we're trying to use the knife on a bow? say what?
begin
MarkTime(NITime);
Drop;
exit;
end;

Status := 'Fletching';
GameTab(Tab_Inv);
randomWaitTime;
mmouse(KnifeX, KnifeY, 5, 5);
CustomWait(RandomRange(20,70), true);
Clickmouse2(mouse_left);
randomWaitTime;

repeat
RandomNumb := (RandomRange(1,28));
until (RandomNumb <> AxeSlot) and (RandomNumb <> KnifeSlot) and (RandomNumb <> CoinSlot);

case RandomNumb of
1: mmouse(575,230,6,6);
2: mmouse(620,230,6,6);
3: mmouse(665,230,6,6);
4: mmouse(710,230,6,6);
5: mmouse(575,265,6,6);
6: mmouse(620,265,6,6);
7: mmouse(665,265,6,6);
8: mmouse(710,265,6,6);
9: mmouse(575,300,6,6);
10: mmouse(620,300,6,6);
11: mmouse(665,300,6,6);
12: mmouse(710,300,6,6);
13: mmouse(575,335,6,6);
14: mmouse(620,335,6,6);
15: mmouse(665,335,6,6);
16: mmouse(710,335,6,6);
17: mmouse(575,370,6,6);
18: mmouse(620,370,6,6);
19: mmouse(665,370,6,6);
20: mmouse(710,370,6,6);
21: mmouse(575,405,6,6);
22: mmouse(620,405,6,6);
23: mmouse(665,405,6,6);
24: mmouse(710,405,6,6);
25: mmouse(575,440,6,6);
26: mmouse(620,440,6,6);
27: mmouse(665,440,6,6);
28: mmouse(710,440,6,6);
end;

Clickmouse2(mouse_left);

randomWaitTime;
if (LogName = 'Magic') then
begin
if (bowType = 1) then
mmouse(RandomRange(379, 381),RandomRange(403, 410),2,2);
if (bowType = 2) then
mmouse(RandomRange(143, 147), RandomRange(404, 410),2,2);
end else
if (LogName = 'Logs') then
begin
if (bowType = 1) then
mmouse(RandomRange(300, 340),RandomRange(404, 410),2,2);
if (bowType = 2) then
mmouse(RandomRange(180, 220),RandomRange(404, 410),2,2);
end else
begin
if (bowType = 1) then
mmouse(RandomRange(257, 263),RandomRange(404, 410),2,2);
if (bowType = 2) then
mmouse(RandomRange(107, 113),RandomRange(404, 410),2,2);
end;

randomWaitTime;
if (isUpTextMultiCustom(['ake', 'Mak'])) then
begin
itFailed := False;
Clickmouse2(mouse_right);
CustomWait(randomRange(300,800), True);
chooseOptionMulti(['X']);
CustomWait(RandomRange(600, 800), True);
if (CountColor(0, 214, 395, 304, 406) = 277) then
begin
CustomWait(RandomRange(250,600), True);
TypeSendEx(IntToStr(RandomRange(28,435)), true);
MarkTime(Time);
repeat
CheckCombat;
if (EnableRandoms) then
CheckForRandoms(True);
antiBan;
if (CountColor(16711680,209,438,364,451) = 285) then //Checking for levelup
begin
FletchLevelsGained := FletchLevelsGained + 1;
Proggy;
CustomWait(RandomRange(1293,1560), True);
Fletch;
exit;
end;
If Not LoggedIn Then
begin
Loginplayer;
CustomWait(RandomRange(2000,3000), True);
end;
until (FindBlackChatMessage('run out')) or (TimeFromMark(Time) > (48000 + Random(500)));
end;
end;

if (itFailed) then
Fletch
else
Drop;
end;

Procedure ChopTree;
var
x, y: Integer;
begin
If Not LoggedIn Then
Begin
Loginplayer;
CustomWait(RandomRange(2000,3000), True);
End;

Status := 'Looking for tree';
Proggy;

if not (IsChopping) then
Antiban
else
TreeAntiban;

SetAngle(SRL_ANGLE_HIGH);
if((FindObj(x, y, TreeName, TreeColor, 10)) and (ContainsText(GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 13423640, 65, 'UpChars07'), [TreeName]))) then
begin
ClearBox(TreeBox);
if (CountColor(16711680,209,438,364,451) = 285) then
begin
WCLevelsGained := WCLevelsGained + 1;
CustomWait(RandomRange(1293,1560), True);
Proggy;
end;

if (EnableRandoms) then
CheckForRandoms(True);

if ((FindBlackChatMessage('nt damages')) or (FindBlackChatMessage('ou do not have an axe'))) then
begin
Proggy;
writeln('Oh shoot... Your axe broke!');
Logout;
TerminateScript;
end;

CustomWait(RandomRange(20,50), true);
Mouse(x, y, 0, 0, false);
if not (WaitOptionEx('hop down '+TreeName, 'Object', ClickLeft, RandomRange(50,100))) then
ChopTree;
InitWait := true;
Status := 'Chopping Tree';
Proggy;
// at this point, we're walking to the tree. so lets wait until we get there to do anything else
repeat
Moving
until not (Moving);
// alright, we'are at the tree, get the updated coordinates
if((FindObj(x, y, TreeName, TreeColor, 10)) and (ContainsText(GetTextAtExWrap(35, 8, 170, 21, 0, 5, 1, 13423640, 65, 'UpChars07'), [TreeName]))) then
begin
if (EnableRandoms) then
CheckForRandoms(True);

if not (IsChopping) and not (InvFull) then
begin
ChopTree;
exit;
end;

Status := 'Calculating tree coordinates';
Proggy;
X1 := x-4;
Y1 := y-4;
X2 := x+4;
Y2 := y+4;
TreeBox := IntToBox(X1, Y1, X2, Y2);
CustomWait(50, True);
RefreshBox(TreeBox);
end else // hmmm cant find the tree that we JUST clicked! something must be wrong, lets stop
StopActions;
end;

if (InvFull) then
begin
ClearBox(TreeBox);
if (Fletching) then
Fletch
else
Drop;
end;
end;

Begin
UpdateScript;
DeclarePlayer;
SetupSRL;
If Not LoggedIn Then
Begin
Loginplayer;
CustomWait(RandomRange(2000,3000), True);
End;
GetKnifeCoords;
SetBrightness(4);
SetupScript;
DefineLogs;
ClearDebug;
CurrHP := GetSkillInfo('hitpoints', true);
customwait(randomrange(1500,2000), false);
LastHP := CurrHP;
AxeFailSafe1 := invcount;
AxeFailSafe2 := invcount;
CustomWait(RandomRange(2000, 2500), True);
repeat
if (EnableRandoms) then
CheckForRandoms(True);
CheckCombat;
DoChopAntiSpam;
RandomBreak;
if(InvFull) then
begin
ClearBox(TreeBox);
if (Fletching) then
Fletch
else
Drop;
end else
begin
if(not(isChopping)) then
ChopTree
else
begin
if (IsEnkUp) then
StopActions
else
if(not (InitWait)) then
ChopTree
else
if(not(CountColorTolerance(TreeColor, MSCX-80, MSCY-80, MSCX+80, MSCY+80, 15) > 1)) then
ChopTree;
Treeantiban;
end;
end;
until (AxeFailSafe > 10)
writeln('FATAL! AXEFAILSAFE: '+IntToStr(AxeFailSafe));
Logout;
TerminateScript;
end.

Sjoe

2013-05-25 16:56:18

Could u attach your scripts in simba code here?

aaron126

2013-05-25 16:58:54

From: Sjoe
Could u attach your scripts in simba code here?


sure thing, done ^^

I can attach some of my C++ work as well if you'd like.

NKN

2013-05-25 17:34:36

From: aaron126
sure thing, done ^^

I can attach some of my C++ work as well if you'd like.


He means put the scirpts in Simba tags

aaron126

2013-05-25 17:39:49

From: NKN
He means put the scirpts in Simba tags


ah, my bad. Sorry. Done.

rj

2013-05-25 17:42:16

Try to use custom atpa functions those are aca generated

aaron126

2013-05-25 18:08:58

I'm just going to assume I'm being denied.
Anything I can improve on if I apply in the future, other than the custom atpa functions as Barbrady said?

Sjoe

2013-05-25 18:11:59

From: aaron126
I'm just going to assume I'm being denied.
Anything I can improve on if I apply in the future, other than the custom atpa functions as Barbrady said?


Yeah and stay active! It's also a community rank. Helping people around and stuff :)

rj

2013-05-25 18:31:36

From: aaron126
I'm just going to assume I'm being denied.
Anything I can improve on if I apply in the future, other than the custom atpa functions as Barbrady said?


Hey! Don't have that additude. Just make those custom tapas, walking, and use logical code

The Mayor

2013-05-25 18:42:02

Your script is very nice considering you joined at the end of March. As Sjoe pointed out, it's not just about your script. We as voters look to see if you have a good attitude and are willing to help others and contribute positively to the community. If you haven't read this then please do.

In terms of your script, TPAs/ATPAs are a must. It's all good and well finding a colour and clicking on it, but your ability to manipulate a colours TPA to your needs is necessary, especially in a members app to show us you understand the concept.

From: aaron126
I'm just going to assume I'm being denied


Don't say that, you app has only been open for a few hours :(

Vinyl Scratch

2013-05-25 21:08:54

From: Officer Barbrady
Hey! Don't have that additude. Just make those custom tapas, walking, and use logical code


Hey! Don't get onto him, we were all disappointed when we failed our first app. I remember a a few people getting especially upset about it.


@OP, As other people have said, Waking, custom TPAs and ATPAs, more logic in your code, and you'll be in in no time! You're also a bit new, if you could work on that that would be great. Just talk and help people where needed, and you'll be uber respected and get more yes votes.

That's all I have time for, I might be able to give more details later, but for now I'm leaving with this.

Gonna have to vote no, but best of luck on your app.

King

2013-05-26 01:05:51

Voted no for the above mentioned reasons, dont worry, I was denied my first time as well :) Keep learning and learning, It can be done, also the script is nice for your time here! Keep it up man! I look forward to seeing another app from you!

StickToTheScript

2013-06-03 12:05:44

I believe that you should probably hang around here a bit longer and post a bit more. I would like to see you around here a bit more and would not mind getting to know you a bit.

I would also like to see that list of scripts you used as a guide go down. Its not that's its a bad thing, but creativity and the ability to do things on your own are both nice things to be able to do! :D

But for now its a no. Maybe next time!

footballjds

2013-06-14 10:44:28

From: Officer Barbrady
Try to use custom atpa functions those are aca generated


meh, really doesn't matter? I mean I generally truncate a few lines outta the generated code but if a program can get me somethign 100% faster and more accurately there's no reason to sit down for an hour.

That'd be like making a DDTM with the color picker when you have the ability to use the DDTM creator.

Now, that being said, ATPA's

Wetish

2013-06-14 22:59:45

From: footballjds
meh, really doesn't matter? I mean I generally truncate a few lines outta the generated code but if a program can get me somethign 100% faster and more accurately there's no reason to sit down for an hour.

That'd be like making a DDTM with the color picker when you have the ability to use the DDTM creator.

Now, that being said, ATPA's


I find that it depends what you are using them for. The generated code may work in most cases, but sometimes you need to write your own code to get an adequate result. Since this is an application, I would expect custom methods to show a higher level of knowledge.

Justin

2013-07-01 09:17:24

Sorry - Look's like you aren't becoming a SRL Member at this stage. Don't give up! Keep trying, Read over what other members have said on what you can improve and try to implement them into your script. You may apply again in 2 weeks.

Cheers,

Justin.