SRL Archive - Archive

Lancerawks - SRL Member Application - Decision needed


Hobbit

2009-04-19 09:57:05

Application on behalf of Lancerawks:


What is the meaning to life?
The answer is relitive depending on who you are and your belifs. For me personaly to seek out knowlage and wisdom, and fofill my evolutionary purpose ;]

Where you Referred to SRL? If yes, by whom?
oo00o, my brother

Programming Knowledge
I was programing in Macromedia Flash Actionscript for about a year. Its a very basic and easy to learn language.

Other Communitys
none

How Long have You Played Runescape?
i think.. 4 years on and off?

Are you affilated in anyway with Jagex LTD? (yes / no)
no

Example of your work (script) :

{
LANCE'S VARROK YEW CHOPPER AND BANKER
Made By: Lancerawks
}

program YewChopAndBank;
{.Include SRL/SRL/Misc/SMART.SCAR}
{.include SRL\SRL.Scar}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
{
Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
}
{
Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
}
{
Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
}
end;

var
x, y, waitTree, DirtPath, PathColor, TreeX, TreeY, ClickColor, CheckColor, time, loads, initialXP, gainedXP,count : Integer;
invFul, Side : String;
AxeEquipted, waiting : Boolean;

{Miscellaneous Functions}

procedure SetupSmart;
begin
SMARTSetupEx({121}160, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
end;

procedure Report;
begin
time := GetTimeRunning;
ClearDebug;
Writeln('=============================================');
Writeln('.::Lancerawks Varrock Yew Chopper & Banker::.');
Writeln('Script has run for: ' + IntToStr((time/1000)/60) + ' min');
if AxeEquipted then Writeln('Script has banked: ' + IntToStr(loads*28) + ' logs');
if not AxeEquipted then Writeln('Script has banked: ' + IntToStr(loads*27) + ' logs');
Writeln('Script has banked: ' + IntToStr(loads) + ' loads');
Writeln('=============================================');
end;

Procedure AntiBan;//Made By SmarterChild
begin
if not LoggedIn then Exit;
case Random(100) of
0..4:RandomRClick;
5..18:HoverSkill('woodcutting',False);
19..30:SleepAndMoveMouse(7000);
31..56:RandomRClick;
57:BoredHuman;
58..59:HoverSkill('random',False);
60:RandomMovement;
61:Wait(1500 + Random(750));
62:begin
SetAngle(false);
Wait(Random(560 + Random(450)));
MakeCompass('W');
SetAngle(true);
MakeCompass('N');
end;
end;
Exit;
end;

procedure SWait;
begin
case Random(3) of
0: Wait(1000 + Random(300));
1: Wait(500 + Random(500));
2: Wait(500 + Random(1000));
end;
end;

function AreWeLevelUp: boolean; //Made by Mormonman
begin
if not LoggedIn then Exit;
if ClickContinue(True, False) then
begin
if FindNPCChatText('lations', Nothing) then
begin
Writeln('Yay, we got a new level!');
Inc(ReportVars[3]);// not needed... is script specific
ClickContinue(True, True);
Result := True;
end;
end;
if FINDNPCCHATTEXT('ntinue', Nothing) then ClickToContinue;
end;

function RanInt(magnitude : Integer) : Integer;
var
product : Integer;
begin
product := Random(magnitude+1) - Random(magnitude+1);
if(product=0) then Result := Random(magnitude) - Random(magnitude)
else Result := product;
end;


function AxeCheck : Boolean;
begin
if not LoggedIn then Exit;
GameTab(4);
if (GetColor(583, 219) <> 3424328) then
begin
case Random(3) of
0: MMouse(583 + RanInt(3), 219 + RanInt(3), 2, 2);
1: MMouse(573 + RanInt(3), 232 + RanInt(3), 2, 2);
2: MMouse(584 + RanInt(3), 225 + RanInt(3), 2, 2);
end;
Wait(500+Random(300));
if IsUpText('chet') then
begin
Writeln('Axe Found in: Inventory');
AxeEquipted := False;
Result := True;
Exit;
end;
end else
if(not AxeEquipted) then
begin
GameTab(5);
MMouse(587 + RanInt(5), 303 + RanInt(5), 2, 2);
Wait(500+Random(300));
if IsUpText('chet') then
begin
Writeln('Axe Found in: Inventory');
AxeEquipted := True;
Result := True;
Exit;
end;
end;
end;

function FindBirdsNest : Boolean; {this function is not working properly yet but im including it just as another example of one of my TPA's}
var
Color: TIntegerArray;
x, y, i : Integer;

begin
if InvFull or not LoggedIn then Exit;
Color := [3952984, 1713706, 1581604];
for i := 0 to 2 do
begin
if FindObjTPA(x, y, Color[i], 10, -1, 20, 20, 4, ['Take', 'Bird', 'nest']) then
begin
MMouse(x, y, 2, 2);
if IsUpText('nest') then
begin
Mouse(x, y, 4, 4, False);
ChooseOption('take');
Result := true;
Exit;
end;
end;
end;
end;

{Tree Cutting Functions}

function TreeSymbol(tol:Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..17] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 613;
dtmMainPoint.y := 209;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 493070;
dtmMainPoint.Tolerance := tol;

dtmSubPoints[0].x := 613;
dtmSubPoints[0].y := 209;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 493070;
dtmSubPoints[0].Tolerance := tol;

dtmSubPoints[1].x := 611;
dtmSubPoints[1].y := 204;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1403918;
dtmSubPoints[1].Tolerance := tol;

dtmSubPoints[2].x := 614;
dtmSubPoints[2].y := 204;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 493070;
dtmSubPoints[2].Tolerance := tol;

dtmSubPoints[3].x := 615;
dtmSubPoints[3].y := 205;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 493070;
dtmSubPoints[3].Tolerance := tol;

dtmSubPoints[4].x := 616;
dtmSubPoints[4].y := 206;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 10592425;
dtmSubPoints[4].Tolerance := tol;

dtmSubPoints[5].x := 617;
dtmSubPoints[5].y := 208;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 493070;
dtmSubPoints[5].Tolerance := tol;

dtmSubPoints[6].x := 615;
dtmSubPoints[6].y := 211;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 692509;
dtmSubPoints[6].Tolerance := tol;

dtmSubPoints[7].x := 610;
dtmSubPoints[7].y := 211;
dtmSubPoints[7].AreaSize := 0;
dtmSubPoints[7].AreaShape := 0;
dtmSubPoints[7].Color := 413455;
dtmSubPoints[7].Tolerance := tol;

dtmSubPoints[8].x := 608;
dtmSubPoints[8].y := 209;
dtmSubPoints[8].AreaSize := 0;
dtmSubPoints[8].AreaShape := 0;
dtmSubPoints[8].Color := 413455;
dtmSubPoints[8].Tolerance := tol;

dtmSubPoints[9].x := 612;
dtmSubPoints[9].y := 214;
dtmSubPoints[9].AreaSize := 0;
dtmSubPoints[9].AreaShape := 0;
dtmSubPoints[9].Color := 1058370;
dtmSubPoints[9].Tolerance := tol;

dtmSubPoints[10].x := 612;
dtmSubPoints[10].y := 202;
dtmSubPoints[10].AreaSize := 0;
dtmSubPoints[10].AreaShape := 0;
dtmSubPoints[10].Color := 196874;
dtmSubPoints[10].Tolerance := tol;

dtmSubPoints[11].x := 617;
dtmSubPoints[11].y := 204;
dtmSubPoints[11].AreaSize := 0;
dtmSubPoints[11].AreaShape := 0;
dtmSubPoints[11].Color := 196874;
dtmSubPoints[11].Tolerance := tol;

dtmSubPoints[12].x := 619;
dtmSubPoints[12].y := 209;
dtmSubPoints[12].AreaSize := 0;
dtmSubPoints[12].AreaShape := 0;
dtmSubPoints[12].Color := 196874;
dtmSubPoints[12].Tolerance := tol;

dtmSubPoints[13].x := 617;
dtmSubPoints[13].y := 214;
dtmSubPoints[13].AreaSize := 0;
dtmSubPoints[13].AreaShape := 0;
dtmSubPoints[13].Color := 196874;
dtmSubPoints[13].Tolerance := tol;

dtmSubPoints[14].x := 612;
dtmSubPoints[14].y := 216;
dtmSubPoints[14].AreaSize := 0;
dtmSubPoints[14].AreaShape := 0;
dtmSubPoints[14].Color := 196874;
dtmSubPoints[14].Tolerance := tol;

dtmSubPoints[15].x := 607;
dtmSubPoints[15].y := 214;
dtmSubPoints[15].AreaSize := 0;
dtmSubPoints[15].AreaShape := 0;
dtmSubPoints[15].Color := 196874;
dtmSubPoints[15].Tolerance := tol;

dtmSubPoints[16].x := 605;
dtmSubPoints[16].y := 209;
dtmSubPoints[16].AreaSize := 0;
dtmSubPoints[16].AreaShape := 0;
dtmSubPoints[16].Color := 196874;
dtmSubPoints[16].Tolerance := tol;

dtmSubPoints[17].x := 607;
dtmSubPoints[17].y := 204;
dtmSubPoints[17].AreaSize := 0;
dtmSubPoints[17].AreaShape := 0;
dtmSubPoints[17].Color := 196874;
dtmSubPoints[17].Tolerance := tol;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;


function ChangeYew : String;
var
tol, maxTol : Integer;

begin
if not LoggedIn then Exit;
tol := 5;
maxTol := 50;
repeat {661}
if DTMRotated(TreeSymbol(tol), x, y, 661, MMY1, MMX2, MMY2) then
begin
Mouse(x - Random(5), y + 10 + Random(2), 2, 2, true);
FFlag(0);
Result := 'RIGHT';
Side := 'RIGHT';
Report;
Writeln('Walking to the: ' + Result);
Break;
Exit;
end; {609}
if DTMRotated(TreeSymbol(tol), x, y, MMX1, MMY1, 609, MMY2) then
begin
Mouse(x-10+Random(2), y+Random(5)-Random(2), 2, 2, true);
FFlag(0);
Result := 'LEFT';
Side := 'LEFT';
Report;
Writeln('Walking to the: ' + Result);
Break;
Exit;
end;
Report;
Writeln('Repeating TreeSymbol Surch with ' + IntToStr(tol) + 'tolerance.');
tol := tol + 5;
until(tol >= maxTol);
FreeDTM(TreeSymbol(tol))
end;

function TreeAtMouse: Boolean;
begin
if (IsUpText('ew')) then Result := True;
if (not IsUpText('ew')) then Result := False;
end;

function CutYew: Boolean;
var
x, y, waitTree, count, i : integer;
Color: TIntegerArray;
Switch : Boolean;

begin
if(InvFull or not LoggedIn) then Exit;
Result := False;
Color := [4820866, 2648669, 3240805, 4359803, 1987656, 3109735, 5544845, 2907218, 2583903, 5412233, 3439984, 4950398, 3440241];
for i := 0 to 12 do
begin
if(FindObjTPA(x, y, Color[i], 7, -1, 30, 30, 4, ['ew', 'Yew'])) then
begin
waiting := false;
SWait;
MMouse(x, y, 3, 3);
if IsUpText('ew') then
begin
Mouse(x, y, 4, 4, True);
Switch := True;
Result := true;
Exit;
end;
end else
begin
inc(count);
Wait(500+Random(300));
Report
Writeln('Timer Till Yew Switch: ' + IntToStr(count) + '/10');
if(count >= 10) then
begin
ChangeYew;
count := 0;
waiting := true;
Exit;
end;
end;
end;
end;

{Path Walking Functions}

function TreeTryangle : Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 650;
dtmMainPoint.y := 87;
dtmMainPoint.AreaSize := 5;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := PathColor;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 661;
dtmSubPoints[0].y := 87;
dtmSubPoints[0].AreaSize := 5;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := PathColor;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 655;
dtmSubPoints[1].y := 85;
dtmSubPoints[1].AreaSize := 5;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := PathColor;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 655;
dtmSubPoints[2].y := 91;
dtmSubPoints[2].AreaSize := 5;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := PathColor;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 664;
dtmSubPoints[3].y := 84;
dtmSubPoints[3].AreaSize := 5;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := PathColor;
dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 665;
dtmSubPoints[4].y := 91;
dtmSubPoints[4].AreaSize := 5;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := PathColor;
dtmSubPoints[4].Tolerance := 0;

dtmSubPoints[5].x := 648;
dtmSubPoints[5].y := 87;
dtmSubPoints[5].AreaSize := 5;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := PathColor;
dtmSubPoints[5].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;




function GrandExchangeDTM(tol: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..8] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 620;
dtmMainPoint.y := 110;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7305079;
dtmMainPoint.Tolerance := tol+5;

dtmSubPoints[0].x := 620;
dtmSubPoints[0].y := 110;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7305079;
dtmSubPoints[0].Tolerance := tol;

dtmSubPoints[1].x := 618;
dtmSubPoints[1].y := 104;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := tol;

dtmSubPoints[2].x := 622;
dtmSubPoints[2].y := 104;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := tol;

dtmSubPoints[3].x := 626;
dtmSubPoints[3].y := 107;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := tol;

dtmSubPoints[4].x := 626;
dtmSubPoints[4].y := 112;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 195836;
dtmSubPoints[4].Tolerance := tol;

dtmSubPoints[5].x := 621;
dtmSubPoints[5].y := 117;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 195836;
dtmSubPoints[5].Tolerance := tol;

dtmSubPoints[6].x := 617;
dtmSubPoints[6].y := 116;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 195836;
dtmSubPoints[6].Tolerance := tol;

dtmSubPoints[7].x := 613;
dtmSubPoints[7].y := 107;
dtmSubPoints[7].AreaSize := 0;
dtmSubPoints[7].AreaShape := 0;
dtmSubPoints[7].Color := 195836;
dtmSubPoints[7].Tolerance := tol;

dtmSubPoints[8].x := 613;
dtmSubPoints[8].y := 112;
dtmSubPoints[8].AreaSize := 0;
dtmSubPoints[8].AreaShape := 0;
dtmSubPoints[8].Color := 195836;
dtmSubPoints[8].Tolerance := tol;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

Function FindPathColor : Integer;
var
Color : TIntegerArray;
TPA : TPointArray;
Position : TPoint;
x, y, i, maxTol, tol : Integer;

begin
if not LoggedIn then Exit;
maxTol := 50;
tol := 15 ;
Color := [6060935, 6653078, 5931140, 5732736];
for i := 0 to 3 do
repeat
if FindColorsTolerance(TPA, Color[i], 627, 40, 685, 102, tol) then
begin
for i := 0 to High(TPA) do
begin
Position := TPA[i];
Result := GetColor(Position.x, Position.y);
Writeln('PathColor(' + IntToStr(Position.x) + ', ' + IntToStr(Position.y) + '): ' + IntToStr(Result));
Writeln('Tolerance: ' + IntToStr(tol));
Exit;
end;
end else
begin
tol := tol + 10;
end;
until(tol >= maxTol);
Writeln('Could Not Find PathColor');
end;



{Function FindPathColor : Integer;
var
tol, maxTol : Integer;

begin
tol := 5;
maxTol := 50;
repeat
if(DTMRotated(DirtPathDTM(tol), x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Writeln('LOOKATTHEMOUSE');
MMouse(x, y, 2, 2);
Wait(3000);
Result := GetColor(x, y);
Report;
Writeln('Path Color: ' + IntToStr(GetColor(x, y)));
FreeDTM(DirtPathDTM(tol));
Exit;
end;
tol := tol + 5;
until(tol >= maxTol);
if(not DTMRotated(DirtPathDTM(tol), x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Report;
WriteLn('Could not find the Path Color.');
WriteLn('Logging out and terminateing script.');
Logout;
TerminateScript;
end;
FreeDTM(DirtPathDTM(tol));
end;}
{627}
function FindTreeTryangle(x1, y1, x2, y2 : Integer) : Boolean;
begin
if not LoggedIn then Exit;
Wait(300+Random(500));
if DTMRotated(TreeTryangle, x, y, x1, y1, x2, y2) then
begin
Writeln('Tree Tryangle Found: On the path');
Mouse(x+Random(3)-Random(3), y+Random(3)-Random(3), 2, 2, true);
FFlag(0);
FreeDTM(TreeTryangle);
Result := True;
Exit;
end else Writeln('Could not find Tree Tryangle: Not on the path');
FreeDTM(TreeTryangle);
end;

function FindGE(click : Boolean) : Boolean;
var
tol, maxTol : Integer;

begin
if not LoggedIn then Exit;
tol := 35;
maxTol := 60;
repeat
if DTMRotated(GrandExchangeDTM(tol), x, y, MMX1, MMY1, MMX2, MMY2) then
begin
if click then
begin
case Random(2) of
0: Mouse(x+(Random(3)+10), y+Random(6), 2, 2, True);
1: Mouse(x+(Random(3)+10), y-Random(6), 2, 2, True);
end;
end;
Report;
Writeln('Grand Exchange Found');
FreeDTM(GrandExchangeDTM(tol));
Result := True;
Exit;
end;
if not DTMRotated(GrandExchangeDTM(tol), x, y, MMX1, MMY1, MMX2, MMY2) then
begin
tol := tol + 5;
Report;
Writeln('Repeating Grand Exchange surch with' + IntToStr(tol) + ' tolerance');
end;
until(tol >= maxTol);
FreeDTM(GrandExchangeDTM(tol));
end;

function WalkToGE : Boolean;
var
tol, maxTol, PathColor : Integer;

begin
if not LoggedIn then Exit;
if(FindGE(false)) then
begin
Writeln('Charicture may be lost.. Trying to preform WalkToGE Function when already there.');
Exit;
end;
if(Side = 'RIGHT') then ChangeYew;
tol := 15;
maxTol := 60;
PathColor := FindPathColor;
AntiBan
Writeln('Preforming Radial Walk');
RadialWalk(PathColor, 200, 260, 40, 99, 99);
AntiBan
Wait(Random(300)+100);
AntiBan
Wait(Random(300)+100);
if not FindTreeTryangle(MMX1, 89, 639, MMY2) then Writeln('Cant find the TreeTryangle: off path');
AntiBan
{Failsafe: makeing sure you are clicking on a walkable part of the map}
x := 580+RanInt(5);
y := 84+RanInt(5);
if (GetColor(x, y) = 15132907) then x := x - (5+Random(5));
Writeln('Makeing the 1st Blind Click');
Mouse(x, y, 2, 2, True);
AntiBan
AntiBan
FFlag(0);
{Failsafe: makeing sure you are clicking on a walkable part of the map}
x := 575+random(5)-random(5);
y := 93+random(5)-random(5)
if (GetColor(x, y) = 15132907) then x := x - (5+Random(5));
Writeln('Makeing the 2nd Blind Click');
Mouse(x, y, 2, 2, True);
AntiBan
AntiBan
FFlag(0);
if FindGE(true) then Result := true;
AntiBan
end;

procedure WalkToYews;
var
PathColor : Integer;

begin
if not LoggedIn then Exit;
PathColor := FindPathColor;
Writeln('RadialWalk 1');
RadialWalk(PathColor, 90, 90, 72, 99, 99);
Wait(Random(300)+100);
AntiBan
if not FindTreeTryangle(636, 50, MMX2, MMY2) then
begin
Writeln('RadialWalk 2');
RadialWalk(PathColor, 90, 85, 60, 99, 99);
Wait(Random(300)+100);
AntiBan
end;
Wait(Random(300)+100);
AntiBan
Writeln('RadialWalk 3');
RadialWalk(PathColor, 0, 60, 72, 99, 99);
Wait(Random(300)+100);
AntiBan
end;

function DepositYews: Boolean;
begin
if not LoggedIn then Exit;
SWait;
Deposit(2, 28, True);
Inc(loads);
if(InvFull) then Result := False;
if(not InvFull) then
begin
CloseBank;
AntiBan;
Result := True;
end;
end;

function ChooseOptionMultiFast(Texts: TStringArray): Boolean; // I did NOT make this function. The normal srl ChoseOption function wasnt opening the bank properly, so somone from IRC made this for me. I am very sorry but i cant remember who it was that made this, but who ever did Credit to you :]
var B, T: TBox;
TextTPA, TPA: TPointArray;
I, C, H, HH: Integer;

P: TPoint;
begin
Result := False;
GetClientDimensions(B.X2, B.Y2);
B.X1 := 0; B.Y1 := 0;
FindColorsTolerance(TPA, 4674653, B.X1, B.Y1, B.X2, B.Y2, 0);
If Length(TPA) < 10 Then Exit;
B.X2 := 0;
B.Y2 := 0;
P := TPA[0];
For I := 0 To High(TPA) - 1 Do
If TPA[i].X = TPA[I+1].X - 1 Then
Begin
If C > 5 Then
Begin
B.X1 := P.X;
B.Y1 := P.Y;
Break;
End Else
C := C + 1;
End Else
Begin
P := TPA[I + 1];
C := 0;
End;
If I = Length(TPA) Then
Begin
WriteLn('Choose Option Menu Getting Failed');
Exit;
End;
InvertTPA(TPA);
C := 0;
P := TPA[0];
For I := 0 To High(TPA) - 1 Do
If TPA[i].X = TPA[I+1].X + 1 Then
Begin
If C > 5 Then
Begin
B.X2 := P.X;
B.Y2 := P.Y;
Break;
End Else
C := C + 1;
End Else
Begin
P := TPA[I + 1];
C := 0;
End;
If I = Length(TPA) Then
Begin
WriteLn('Choose Option Menu Getting Failed');
Exit;
End; H := High(Texts);
For I := 0 To H do
begin
TextTPA := LoadTextTPA(Texts[i], UpChars, HH);
FindColorsTolerance(TPA, 16777215, B.X1, B.Y1, B.X2, B.Y2, 3);
If FindTextTPAInTPA(HH, TextTPA, TPA, TPA) Then
Begin
T := GetTPABounds(TPA);
Result := True;
Mouse(B.X1 + 5, T.y1 - 4, B.X2 - B.X1 - 5, 13, True);
Exit;
End;
end;
MMouse(B.X1 - 50, B.Y1 - 50, 40, B.Y2 - B.Y1);
Wait(200 + Random(100));
end;

function ChooseOptionFast(Text: String): Boolean; // I did NOT make this function. The normal srl ChoseOption function wasnt opening the bank properly, so somone from IRC made this for me. I am very sorry but i cant remember who it was that made this, but who ever did Credit to you :]
begin
Result := ChooseOptionMultiFast([Text]);
end;

function GE_OpenBank: Boolean; //Made by SmarterChild thanks buddy x]
var
Colorz: TIntegerArray;
TPA: TPointArray;
ATPA: T2DPointArray;
i: Integer;
begin
if not LoggedIn then exit;
Result := False;
Colorz := [470584, 1408164, 1474215, 1073278, 268832];
X:= MSCX;
Y:= MSCY;
for i := 0 to 4 do
begin
FindColorsSpiralTolerance(x, y, TPA, Colorz[i], 153, 111, 246, 257, 7);
begin
if Length(TPA) = 0 then Continue;
ATPA := SplitTPA(TPA, 22);
for i := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 3, 3);
Wait(100+Random(100));
if IsUpText('anker') then
begin
Wait(100 + Random(200));
Mouse(x, y, 4, 4, False);
Wait(400 + Random(200));
ChooseOptionFast('Bank');
Wait(Random(100)+300);
WriteLn('Opening bank');
Result:= True;
end;
end;
end;
end;
end;

procedure BankingLoop;
begin
if not LoggedIn then Exit;
AntiBan;
if(FindGE(false)) then
begin
Writeln('begining banking procedure');
GE_OpenBank;
DepositYews;
end else
begin
Writeln('Script Terminated: you were not standing close to the grand exchange while the banking procedure took place');
{AntiBan;
LogOut;
TerminateScript; }
end;
end;

procedure ScriptSetup;
begin
SetupSRL;
SetupSmart;
ActivateClient;
ClearDebug;
DeclarePlayers;
if not LoggedIn then LogInPlayer;
SetAngle(true);
MakeCompass('n');
SetRun(true);
if not AxeCheck then
begin
Logout;
TerminateScript;
end;
waitTree := 0;
PathColor := FindPathColor;
end;

procedure MainLoop;
begin
repeat
repeat
repeat
Report;
CutYew;
repeat
//FindBirdsNest;
SWait;
AreWeLevelUp;
until((not TreeAtMouse) or InvFull);
until(InvFull);
WalkToGE;
FFlag(0);
Wait(1000+RanInt(500));
AntiBan;
BankingLoop;
if(not InvFull) then WalkToYews else
begin
Writeln('Logging Out: Banking Procedure Didnt Work');
AntiBan;
LogOut;
TerminateScript;
end;
until(not LoggedIn);
NextPlayer(false);
until(CurrentPlayer >= HowManyPlayers);
TerminateScript;
end;

begin
ScriptSetup;
MainLoop;
end.

ZaSz

2009-04-19 09:59:51

poll

Hobbit

2009-04-19 10:00:57

Calm down im adding it :p

Richard

2009-04-19 13:58:08

Yes, I like it, just a couple of things:

Procedure AntiBan;//Made By SmarterChild
begin
if not LoggedIn then Exit;
case Random(100) of
0..4:RandomRClick;
5..18:HoverSkill('woodcutting',False);
19..30:SleepAndMoveMouse(7000);
31..56:RandomRClick;
57:BoredHuman;
58..59:HoverSkill('random',False);
60:RandomMovement;
61:Wait(1500 + Random(750));
62:begin
SetAngle(false);
Wait(Random(560 + Random(450)));
MakeCompass('W');
SetAngle(true);
MakeCompass('N');
end;
end;
Exit;<-- Why Exit here
end;

Why do you need an exit there, if the only line left in the procedure is the final end? :p

procedure Report;
begin
time := GetTimeRunning;
ClearDebug;
Writeln('=============================================');
Writeln('.::Lancerawks Varrock Yew Chopper & Banker::.');
Writeln('Script has run for: ' + IntToStr((time/1000)/60) + ' min');
if AxeEquipted then Writeln('Script has banked: ' + IntToStr(loads*28) + ' logs');
if not AxeEquipted then Writeln('Script has banked: ' + IntToStr(loads*27) + ' logs');
Writeln('Script has banked: ' + IntToStr(loads) + ' loads');
Writeln('=============================================');
end;

2 things on the progress report. First thing, you don't need to call time, theres a function in SRL called TimeRunning, and you can just put that in there and lose a line. Another thing, when you're adding up the logs, you don't account for random items, you could use CountItems (even though this doesn't work at current).

procedure SWait;
begin
case Random(3) of
0: Wait(1000 + Random(300));
1: Wait(500 + Random(500));
2: Wait(500 + Random(1000));
end;
end;

Surely if you just do Wait(500 + Random(1000)); it will account for all of those?

Just wondering, whats wrong with the SRL tree bitmap? Because your DTM is rather huge :p


Theres probably more things, but I'm going out in a minute and I've rushed this.

Good job.

Pure1993

2009-04-19 13:58:50

No

All of the more complex things were not created by him:

function AreWeLevelUp: boolean; //Made by Mormonman

function ChooseOptionMultiFast(Texts: TStringArray): Boolean; // I did NOT make this function. The normal srl ChoseOption function wasnt opening the bank properly, so somone from IRC made this for me. I am very sorry but i cant remember who it was that made this, but who ever did Credit to you :]

function ChooseOptionFast(Text: String): Boolean; // I did NOT make this function. The normal srl ChoseOption function wasnt opening the bank properly, so somone from IRC made this for me. I am very sorry but i cant remember who it was that made this, but who ever did Credit to you :]

function GE_OpenBank: Boolean; //Made by SmarterChild thanks buddy x]


Using FindDTMRotated is slow, doesn't work on the minimap, because by rotating the compass, the pixels aren't always exactly where they should be, so they could fail.
The DDTMs have also been created by a DDTM creator, not a single self created or majorly edited DDTM (I wouldn't hold it against him if he had at least renamed the subpoints/mainpoints in an appropriate manner).


function DepositYews: Boolean;
begin
if not LoggedIn then Exit;
SWait;
Deposit(2, 28, True);
Inc(loads);
if(InvFull) then Result := False;
if(not InvFull) then
begin
CloseBank;
AntiBan;
Result := True;
end;
end;

Erm, yeah, there is also 1 problem in the banking: The AxeEquipted boolean isn't used at all, in fact, the AxeCheck procedure isn't used at all here. What if the axe happens to be in the second slot? It would just be taken to the bank, leaving you to chop the trees with your hands… I am all for barbarian skilling, but that's just plain suicide for your bones… :rolleyes: (a little bit of sarcasm there… ;) )

Well, good luck for your app, but I would advise you to bring a bit more individuality and more of your own functions into your scripts. ;)

One thing I forgot to say: It's a nice script overall, but I simply believe that you should still improve you scripting a bit before becomming a member, just my personal opinion. :)

Edit: sorry, one of the things I said was a mistake I overlooked, Edited out

Naike

2009-04-19 16:43:15

Yes.
Richard and pure1993 covered most stuff i thing ^^

Floor66

2009-04-19 16:46:45

N1ke, 1993 said no :p
Anyway, No from me.

Work on your standards and use more of your OWN custom functions/procedures.

NiCbaZ

2009-04-19 18:12:31

Just because he used some other peoples functions.. doesnt mean no.. i mean he uses..

Standards,
DDTM's,
AutoColor

thats a great app imp

NCDS

2009-04-19 18:33:45

Im going to have to vote no.

Mainly for the same reasons as 1993.

I dont like that the only procedures that have somewhat complex things in them werent even made by you.

And all the spelling errors in you App. doesnt make you look very professional or knowledgeable so you should probably spell check.

Also, try to avoid global variables, especially X and Y.

Good Attempt tho.

Floor66

2009-04-19 18:39:38

From: NiCbaZ
Just because he used some other peoples functions.. doesnt mean no.. i mean he uses..

Standards,
DDTM's,
AutoColor

thats a great app imp


His standards are off…

Richard

2009-04-19 18:41:36

From: Floor66
His standards are off…


In his defence, standards don't affect the efficiency/reliability of a script.

Have you looked inside the includes much :p

Floor66

2009-04-19 18:43:14

Meh, I'm standard nazi.
HTML/PHP/SCAR ; I'm just too neat :p

JAD

2009-04-19 19:38:59

From: Richard
In his defence, standards don't affect the efficiency/reliability of a script.

Have you looked inside the includes much :p


If the people with improper standards who wrote the srl include applied for srl members I would automatic no them too.




Yes from me. You've obviously put a lot of effort into learning to script and I applaud you for that. Keep up the good work!

Griff

2009-04-19 20:40:55

Standards are off quite a bit, as said above, try working on those, and then get hobbit to edit your app. You have a good, long script, but your bif functions are made by other people. Also, there are a few spots where you could save some code, and make the script less laggy. I think I'm going to have to vote no, but it was a very good app, and if you don't get in, I'm almost certain you will on your next try in a month.

boberman

2009-04-19 21:34:36

It's a No from me. As was said before, a lot of the script was written by someone/something else, and no credit was given anywhere. This isn't acceptable.

Another reason though
function WalkToGE : Boolean;
var
tol, maxTol, PathColor : Integer;

begin
if not LoggedIn then Exit;
if(FindGE(false)) then
begin
Writeln('Charicture may be lost.. Trying to preform WalkToGE Function when already there.');
Exit;
end;
if(Side = 'RIGHT') then ChangeYew;
tol := 15;
maxTol := 60;
PathColor := FindPathColor;
AntiBan
Writeln('Preforming Radial Walk');
RadialWalk(PathColor, 200, 260, 40, 99, 99);
AntiBan
Wait(Random(300)+100);
AntiBan
Wait(Random(300)+100);
if not FindTreeTryangle(MMX1, 89, 639, MMY2) then Writeln('Cant find the TreeTryangle: off path');
AntiBan
{Failsafe: makeing sure you are clicking on a walkable part of the map}
x := 580+RanInt(5);
y := 84+RanInt(5);
if (GetColor(x, y) = 15132907) then x := x - (5+Random(5));
Writeln('Makeing the 1st Blind Click');
Mouse(x, y, 2, 2, True);
AntiBan
AntiBan
FFlag(0);
{Failsafe: makeing sure you are clicking on a walkable part of the map}
x := 575+random(5)-random(5);
y := 93+random(5)-random(5)
if (GetColor(x, y) = 15132907) then x := x - (5+Random(5));
Writeln('Makeing the 2nd Blind Click');
Mouse(x, y, 2, 2, True);
AntiBan
AntiBan
FFlag(0);
if FindGE(true) then Result := true;
AntiBan
end;

When I see something like this, I have to think that I can't trust anything else that was written. Get color is horrible to use because it has no sort of tolerance for when the colors WILL change. It is pretty hard to tell what is intended because the if statements aren't properly indented, it's just a mess.

Your main loop is another place I cringe at. The excessive use of repeat loops makes me wonder if the script is doing what you think it is.

So here are my recommendations.

1. If you didn't write all of a piece of code, give credit to whomever you took it from (and get permission to use it if at all possible)
2. While I usually don't care so much about standards, the standards in you script are pretty bad, work on proper indention. Easy to read code is easy to maintain code.
3. Make your script more flexible, add more failsafes and use procedures that aren't likely to fail so often.

Good luck next time. You doing well, just not close enough for my tastes.

3Garrett3

2009-04-19 22:00:31

I vote no. People are not giving reasons for yes. They haven't read it over well enough and realized that the complex parts are not even his own. So I vote no, because he cannot make complex things by himself, and the parts I know are 100% his… just give me the chills :(


function ChangeYew : String;
var
tol, maxTol : Integer;

begin
if not LoggedIn then Exit;
tol := 5;
maxTol := 50;
repeat {661}
if DTMRotated(TreeSymbol(tol), x, y, 661, MMY1, MMX2, MMY2) then
begin
Mouse(x - Random(5), y + 10 + Random(2), 2, 2, true);
FFlag(0);
Result := 'RIGHT';
Side := 'RIGHT';
Report;
Writeln('Walking to the: ' + Result);
Break;
Exit;
end; {609}
if DTMRotated(TreeSymbol(tol), x, y, MMX1, MMY1, 609, MMY2) then
begin
Mouse(x-10+Random(2), y+Random(5)-Random(2), 2, 2, true);
FFlag(0);
Result := 'LEFT';
Side := 'LEFT';
Report;
Writeln('Walking to the: ' + Result);
Break;
Exit;
end;
Report;
Writeln('Repeating TreeSymbol Surch with ' + IntToStr(tol) + 'tolerance.');
tol := tol + 5;
until(tol >= maxTol);
FreeDTM(TreeSymbol(tol))
end;

Just one more small thing. Why do you even use 'maxTol' when you could simply write the number 50. Its pretty simple. If it were a variable, you could use maxTol, but you just declare its value and don't change it, so it could make it more simple to use the number instead of a variable in that situation.

Wizzup?

2009-04-19 22:25:47

From: Floor66
Meh, I'm standard nazi.
HTML/PHP/SCAR ; I'm just too neat :p


HTML and PHP don't have any real standards, it is used in a lot of different ways.

Good app, but I have to agree with the rest, most sophisticated functions are not made by you. I can understand why you have them, if SRL fails, it is of course usefull to use those.
If your walking had been just a bit neater I would have given a yes. :)

Yes anyway.

3Garrett3

2009-04-19 22:37:51

Yes anyway? :\

Okay. I have a question. Is the 17/18 point DDTM a symbol? Doesn't findsymbol still work?

lordsaturn

2009-04-21 10:41:15

Try to keep global variables to a minimum please.

Nice use of maths in AxeCheck.

An 18 point DDTM, with not a single dynamic value? Why not just use DTMFromString, or FindSymbol for that matter.

FreeDTM(TreeSymbol(tol)) will throw an access violation, because you are not freeing a variable. Just store TreeSymbol(tol) to a variable earlier in the function.


if (IsUpText('ew')) then Result := True;
if (not IsUpText('ew')) then Result := False;
could be reduced to
Result := IsUpText('ew');
Looks better, and neater.

I like that you have a lot of colors in CutYew, but why not just use a median color with a big tolerance? Perhaps you should check out ColorToleranceSpeed2 in the tutorial section.

Walking functions could be better, you could reduce your redundant code with loops. Try reading this tutorial, specifically the section on inefficient code. No failsafes in the banking loop?

It seems that a lot of this script isn't yours, and the most advanced object finding (TPAs) is not yours either. However I like your attitude at the forums, but today is not your day.

No. :(

EvilChicken!

2009-04-21 16:32:36

Noticed one thing; DDTMs are taking up a huge amount of lines in his script.
Just thought I'd let you know. ><"

ZephyrsFury

2009-04-21 17:32:48

I'm confused. The standards are pretty much perfect. :rolleyes:

jakeyboy29

2009-04-22 00:48:11

From: zephyrsfury
i'm confused. The standards are pretty much perfect. :rolleyes:


+1

yes.

ian.

2009-04-23 00:48:53

I think it's decent, definitely a good Junior Member script, but some things could be improved/shortened. I can't decide on yes or no, and since I just became a member I don't think I should vote, but I think if he learned a little more it would be a definite yes from me :)

Hobbit

2009-04-23 06:29:49

@ 99_

http://www.villavu.com/forum/showthread.php?t=24420

ian.

2009-04-24 07:31:27

Hobbit, that's why I've yet to vote on an application. ;)

mormonman

2009-04-24 07:53:57

Meh… I won't vote, but I do remember helpin' this dude on IRC(the level up procedure). His procedure was pretty good, but mine had some extra stuff that he wanted to use, so why would he not use it. Good guy… holdin' vote though. Does he have the url for this, because he hasn't responded?

P1nky

2009-04-24 18:56:23

Yes, he has potential.

Though i see quite a bit of stuff that can be improved :)
Gl.

Sir R. M8gic1an

2009-05-05 16:19:35

your poll has already closed. Now we await an admin's decision :)

~RM

Hobbit

2009-05-05 18:55:29

14 - Yes
16 - No

Almost

Read the suggestions given by the SRL members and read a few more tutorials and improve on your script then come back and apply in 2 weeks time :)