SRL Archive - Archive

lancerawks - SRL Member Application


Lance

2009-05-13 11:42:35

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


Are you affilated in anyway with Jagex LTD?
no

Were you Referred to SRL?
oo00o


What is your general programming knowledge?
Flash Actionscript


Are you a member of any other communities?
nope


Tell us about yourself…
From: lancerawks
Hello im Lance, i like scripting. since ive discovered srl its been my #1 hobby haha. I did just enter an application, but Hobbit gave me permision to fix it up and enter it again in a weeks time



Please show us one (or multiple) of your scripts.
program YewChopAndBank;
{.Include SRL/SRL/Misc/SMART.SCAR}
{.include SRL\SRL.Scar}
{
.____ ____ ____ __ _____.___.
| | _____ ____ ____ ____ ______ \ \ / /____ ______________ ____ ____ | | __ \__ | | ______ _ __
| | \__ \ / \_/ ___\/ __ \ / ___/ \ Y /\__ \\_ __ \_ __ \/ _ \_/ ___\| |/ / / | |/ __ \ \/ \/ /
| |___ / __ \| | \ \__\ ___/ \___ \ \ / / __ \| | \/| | \( <_> ) \___| < \____ \ ___/\ /
|_______ (____ /___| /\___ >___ >____ > \___/ (____ /__| |__| \____/ \___ >__|_ \ / ______|\___ >\/\_/
\/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
_________ .__
\_ ___ \| |__ ____ ______ ______ ____ ___________
/ \ \/| | \ / _ \\____ \\____ \ / _ \_/ __ \_ __ \
\ \___| Y ( <_> ) |_> > |_> > <_> ) ___/| | \/
\______ /___| /\____/| __/| __/ \____/ \___ >__|
\/ \/ |__| |__| \/


.=========================================================================.
| Instructions: |
`=========================================================================`
| |
| Make sure your axe is either Equipted or in your 1st Inventory Slot |
| |
| Setup all your charictures in between the two yew trees |
|_______________________________________________________________________|

.=========================================================================.
| Thanks To: |
`=========================================================================`
| |
| SmarterChild - for adding me to MSN and teaching me how to script |
| |
| All the people who voted yes - for being so generous |
| |
| All the people who voted no - for showing me how i can improve |
| |
| All the guys on IRC - for putting up with my nooby questions |
|_______________________________________________________________________|
}

const
world = 160;
chance = 90{%}; //The persent chance of doing antiban.

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

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
Players[0].Integers[0] := 2; // Fight style to use
{
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active := True;
Players[1].Integers[0] := 2;
}
{
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active := True;
Players[2].Integers[0] := 2;
}
{
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active := True;
Players[3].Integers[0] := 2;
}
end;

var
PathColor, time, loads, waitTree, count : Integer;
AntibanChance : Extended;
Side : String;
AxeEquipted, waiting : Boolean;
waitTime : LongInt;

{Miscellaneous Functions}

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

function Terminate(reason : String) : Boolean;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
if not AllPlayersInactive then
begin
Writeln('Logging out, and starting with your next player. Reason: ' + reason);
LogOut;
NextPlayer(false);
Result := True;
Exit;
end else
begin
Writeln('No more active players, Script Terminated. Reason: ' + reason);
LogOut;
TerminateScript;
Result := True;
Exit;
end;
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;

procedure Report;
begin
time := GetTimeRunning;
ClearDebug;
Writeln('.=============================================.');
Writeln('|.::Lancerawks Varrock Yew Chopper & Banker::.|');
Writeln('`=============================================`');
Writeln('Script has ran for: ' + TimeRunning);
Writeln('Script has banked: ' + IntToStr(loads) + ' loads');
Writeln('=============================================');
end;

procedure AntiBan;
var
ChanceInt : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms
ChanceInt := Round(AntibanChance);
Writeln('Performing Antiban: ' + IntToStr(chance) + '% - ' + IntToStr(ChanceInt) + '/8');
case Random(ChanceInt) of
0: begin
HoverSkill('Random', False);
Wait(1000+RanInt(200));
end;
1: begin
HoverSkill('Woodcutting', False);
Wait(1000+RanInt(200));
end;
2: begin
RandomRClick;
Wait(200+RanInt(50));
end;
3: case Random(3) of
0: begin
MakeCompass('E');
Wait(10+RanInt(5));
MakeCompass('S');
SetAngle(false);
Wait(10+RanInt(5));
MakeCompass('N');
SetAngle(true);
Wait(10+RanInt(5));
end;
1: begin
MakeCompass('W');
Wait(10+RanInt(5));
MakeCompass('E');
SetAngle(false);
Wait(10+RanInt(5));
MakeCompass('N');
SetAngle(true);
Wait(10+RanInt(5));
end;
2: begin
MakeCompass('S');
Wait(10+RanInt(5));
MakeCompass('W');
SetAngle(false);
Wait(10+RanInt(5));
MakeCompass('N');
SetAngle(true);
Wait(10+RanInt(50));
end;
end;
4: begin
SetAngle(false);
Wait(50+RanInt(10));
SetAngle(true);
end;
5: case Random(3) of
0: SleepAndMoveMouse(4000 + RanInt(2000));
1: SleepAndMoveMouse(1000 + Random(1000) + RanInt(80));
2: SleepAndMoveMouse(30000 + Random(10000) + RanInt(2000));
end;
6: PickUpMouse;
7: BoredHuman;
8: RandomMovement;
end;
end;

procedure NPCChatCheck;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
if FindNPCChatText('lations', ClickLeft) then
Writeln('Congratz, you just gained a Woodcutting Level!');
if FindNPCChatText('ntinue', ClickLeft) then
Writeln('Found NPC Chat: "Click to continue", and clicked to continue');
end;

function AxeCheck : Boolean;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
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+RanInt(100));
if IsUpText('chet') then
begin
Writeln('Axe Found in: Inventory');
AxeEquipted := False;
Result := True;
Exit;
end;
end;
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: Equipted');
AxeEquipted := True;
Result := True;
Exit;
end;
end;
end;

function FindBirdsNest : Boolean; {this function needs to be tested before I include it in the script. Due to birdsnests being rare and every time one apears someone grabs it, i havent had the chance to test it yet.}
var
TPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;

begin
if InvFull or not LoggedIn then Exit;
FindNormalRandoms;
if FindColorsTolerance(TPA, 3952984, MSX1, MSY1, MSX2, MSY2, 7) then
begin
for i := 0 to High(TPA) do
begin
MyPoint := TPA[i];
if FindColorsTolerance(TPA, 1713706, MyPoint.x - 10, MyPoint.y - 10, MyPoint.x + 10, MyPoint.y + 10, 7) then
begin
for i := 0 to High(TPA) do
begin
MyPoint := TPA[i];
if FindColorsTolerance(TPA, 1581604, MyPoint.x - 20, MyPoint.y - 20, MyPoint.x + 20, MyPoint.y + 20, 7) then
begin
MMouse(MyPoint.x, MyPoint.y, 2, 2);
if IsUpText('nest') then
begin
GetMousePos(x, y)
Mouse(x, y, 0, 0, False);
ChooseOption('take');
Result := true;
Exit;
end;
end;
end;
end;
end;
end;
end;

{Tree Cutting Functions}

function ChangeYew : String;
var
x, y : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
if FindSymbolIn(x, y, 'tree', 650, MMY1, MMX2, 126) then
begin
Mouse(x + RanInt(5), y + 10 + RanInt(2), 2, 2, true);
FFlag(10);
Result := 'RIGHT';
Side := 'RIGHT';
Report;
Writeln('Walking to the: ' + Result);
Exit;
end;
if FindSymbolIn(x, y, 'tree', 557, MMY1, 610, 126) then
begin
Mouse(x - 10 + RanInt(2), y + RanInt(4), 2, 2, true);
FFlag(10);
Result := 'LEFT';
Side := 'LEFT';
Report;
Writeln('Walking to the: ' + Result);
Exit;
end;
end;

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

begin
if(InvFull or not LoggedIn) then Exit;
FindNormalRandoms;
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;
Wait(500+RanInt(100));
MMouse(x, y, 3, 3);
if IsUpText('ew') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, 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 PathDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [1..6] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 688;
dtmMainPoint.y := 114;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := PathColor;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[1].x := 696;
dtmSubPoints[1].y := 98;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := PathColor;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 697;
dtmSubPoints[2].y := 133;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := PathColor;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 693;
dtmSubPoints[3].y := 85;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := PathColor;
dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 655;
dtmSubPoints[4].y := 110;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := PathColor;
dtmSubPoints[4].Tolerance := 0;

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

dtmSubPoints[6].x := 677;
dtmSubPoints[6].y := 116;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := PathColor;
dtmSubPoints[6].Tolerance := 0;

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


function GrandExchangeDTM(tol: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [1..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[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(PathType : String) : Integer;
var
Color : TIntegerArray;
TPA : TPointArray;
Position : TPoint;
i, tol : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
tol := 15 ;
if PathType = 'dirt' then Color := [6060935, 6653078, 5931140, 5732736];
if PathType = 'stone' then Color := [7568253];
if (PathType <> 'stone') and (PathType <> 'dirt') then
begin
Writeln('FindPathColor function was called improperly');
Logout;
TerminateScript;
end;
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 >= 50);
Writeln('Could Not Find PathColor');
end;
function FindPath : Boolean;
var
x, y : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
repeat
if DTMRotated(PathDTM, x, y, 627, 40, MMX2, MMY2) then
begin
while (GetColor(x, y) <> PathColor) do x := x - 5;
Mouse(x, y, 2, 2, True);
Wait(1000+RanInt(300));
FFlag(10);
Report;
Writeln('PathDTM Found');
FreeDTM(PathDTM);
Result := True;
Exit;
end;
inc(count);
Wait(3000+RanInt(500));
until(count > 5);
FreeDTM(PathDTM);
end;

function FindGE(click : Boolean) : Boolean;
var
x, y, tol : Integer;
DTM : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
tol := 35;
repeat
DTM := GrandExchangeDTM(tol);
if DTMRotated(DTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x+10, y, 2, 2, True);
Wait(1000+RanInt(500));
FFlag(10);
Report;
Writeln('Grand Exchange Found');
FreeDTM(DTM);
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 >= 60);
FreeDTM(DTM);
end;

function WalkPath(step : Integer) : Boolean;//Steps 1, 2, 3 are walking To the GE. Steps 4, 5, 6 are walking back.
var
x, y, count : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
count := 0;
Writeln('Preforming Step ' + IntToStr(step) + ' of Path Walking');
case step of
1: begin
if FindSymbolIn(x, y, 'water', MMX1, MMY1, 670, MMY2) then
begin
Writeln('Walking Left');
RadialRoadWalk(PathColor, 265, 285, 45, 1, -1);
if FindSymbolIn(x, y, 'water', MMX1, MMY1, 670, MMY2) then
begin
Writeln('Found Tree Symbol');
Mouse(x-10, y, 2, 2, true);
end;
end;
repeat
if RadialRoadWalk(PathColor, 180, 270, 65, 1, -1) then
begin
FFlag(10);
Result := True;
Writeln('Step ' + IntToStr(step) + ' was sucsessful');
Exit;
end else
begin
inc(count);
PathColor := FindPathColor('dirt');
Writeln('Pathwalking Unsucsessful: Repeating try ' + intToStr(count));
end;
until(count>4);
end;

2: begin
repeat
if RadialRoadWalk(PathColor, 265, 280, 65, 1, 0) then
begin
FFlag(10);
Result := True;
Writeln('Step ' + IntToStr(step) + ' was sucsessful');
Exit;
end else
begin
inc(count);
PathColor := FindPathColor('dirt');
Writeln('Pathwalking Unsucsessful: Repeating try ' + intToStr(count));
end;
until(count>4);
end;

3: begin
if GetColor(575, 80) <> FindPathColor('stone') then
begin
Mouse(570, 80, 2, 2, True);
Wait(1000+RanInt(200));
FFlag(20);
end else
begin
Mouse(575, 80, 2, 2, True);
Wait(1000+RanInt(200));
FFlag(20);
end;
end;

4: begin
repeat
if RadialRoadWalk(PathColor, 92, 88, 65, -1, 0) then
begin
FFlag(10);
Result := True;
Writeln('Step ' + IntToStr(step) + ' was sucsessful');
Exit;
end else
begin
inc(count);
PathColor := FindPathColor('dirt');
Writeln('Pathwalking Unsucsessful: Repeating try ' + intToStr(count));
end;
until(count>4);
end;

5: begin
Wait(500+RanInt(100));
repeat
if FindPath then Exit;
Inc(count)
until(count > 5);
repeat
if RadialRoadWalk(PathColor, 90, 88, 65, -1, 0) then
begin
FFlag(10);
Result := True;
Writeln('Step ' + IntToStr(step) + ' was sucsessful');
Exit;
end else
begin
inc(count);
PathColor := FindPathColor('dirt');
Writeln('Pathwalking Unsucsessful: Repeating try ' + intToStr(count));
end;
until(count>4);
end;

6: begin
repeat
if RadialRoadWalk(PathColor, 50, 0, 68, -1, 0) then
begin
FFlag(10);
Result := True;
Writeln('Step ' + IntToStr(step) + ' was sucsessful');
Exit;
end else
begin
inc(count);
PathColor := FindPathColor('dirt');
Writeln('Pathwalking Unsucsessful: Repeating try ' + intToStr(count));
end;
until(count>4);
end;
end;
end;

function WalkToGE : Boolean;
var
x, y : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
if(Side = 'RIGHT') then ChangeYew;
Wait(2000+RanInt(200));
FFlag(20);
if FindSymbol(x, y, 'tree') then
begin
if WalkPath(1) then
if WalkPath(2) then
if WalkPath(3) then
begin
FindGE(true);
Wait(1000+RanInt(200));
FFlag(10);
Result := True;
Exit;
end;
end;
end;

function WalkToYews : Boolean;
var
x, y : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
WalkPath(4);
WalkPath(5);
WalkPath(6);
if FindSymbol(x, y, 'tree') then
begin
Result := True;
Exit;
end;
end;

function DepositYews: Boolean;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
Wait(500+RanInt(100));
if AxeEquipted then Deposit(1, 28, True);
if not AxeEquipted then Deposit(2, 28, True);
if(not InvFull) then
begin
Inc(loads);
Result := True;
end;
end;

function OpenGEBank : Boolean;
var
TPA : TPointArray;
Position : TPoint;
HairColor, SkinColor : TIntegerArray;
i, H, x, y : Integer;

begin
if not LoggedIn then Exit;
FindNormalRandoms;
HairColor := [404534, 1342114, 335911, 1275292];
SkinColor := [7107701, 4870224, 2895663];
Writeln('Opening Bank');
Wait(2000+RanInt(500));

MMouse(214, 169, 5, 5);
Wait(200+RanInt(20));
if IsUpText('anker') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(100+RanInt(30));
ChooseOption('Bank Banker');
Wait(1000+RanInt(300));
if BankScreen then
begin
Result := True;
Exit;
end;
end;

for i := 0 to 3 do
begin
if FindColorsTolerance(TPA, HairColor[i], 226, 121, 259, 256, 50) then
begin
Position := TPA[i];
x := Position.x
y := Position.y
for i := 0 to 2 do
begin
if FindColorsTolerance(TPA, SkinColor[i], x-10, y-10, x+10, y+10, 50) then
begin
H := High(TPA);
for i := 0 to H do
begin
Position := TPA[i];
MMouse(Position.x, Position.y, 2, 2);
Wait(50+RanInt(10));
if IsUpText('anker') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(100+RanInt(30));
ChooseOption('Bank Banker');
Wait(1000+RanInt(300));
if BankScreen then
begin
Result := True;
Exit;
end;
end;
end;
end;
end;
end;
end;
end;

function BankingLoop : Boolean;
var
count : Integer;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
AntiBan;
if(FindGE(false)) then
begin
Writeln('begining banking procedure');
repeat
Wait(1000+RanInt(500));
Inc(count);
until(OpenGEBank or (count > 10));
DepositYews;
CloseBank;
if not AxeEquipted and (GetColor(585, 220) <> 3424328) then
Terminate('The axe has been banked.');
end else
begin
if FindPath then
begin
WalkPath(6);
Wait(500+RanInt(200));
FFlag(10);
Exit;
end else
Terminate('you were not standing close to the grand exchange while the banking procedure took place');
end;
if InvFull then Terminate('Banking Procedure didnt work');
end;

procedure ScriptSetup;
begin
ClearDebug;
Writeln('.____ ____ ____ __ _____.___.');
Writeln('| | _____ ____ ____ ____ ______ \ \ / /____ ______________ ____ ____ | | __ \__ | | ______ _ __');
Writeln('| | \__ \ / \_/ ___\/ __ \ / ___/ \ Y /\__ \\_ __ \_ __ \/ _ \_/ ___\| |/ / / | |/ __ \ \/ \/ /');
Writeln('| |___ / __ \| | \ \__\ ___/ \___ \ \ / / __ \| | \/| | \( <_> ) \___| < \____ \ ___/\ /');
Writeln('|_______ (____ /___| /\___ >___ >____ > \___/ (____ /__| |__| \____/ \___ >__|_ \ / ______|\___ >\/\_/');
Writeln(' \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/');
Writeln(' _________ .__');
Writeln(' \_ ___ \| |__ ____ ______ ______ ____ ___________');
Writeln(' / \ \/| | \ / _ \\____ \\____ \ / _ \_/ __ \_ __ \');
Writeln(' \ \___| Y ( <_> ) |_> > |_> > <_> ) ___/| | \/');
Writeln(' \______ /___| /\____/| __/| __/ \____/ \___ >__|');
Writeln(' \/ \/ |__| |__| ');
Wait(1000);
ClearDebug;
SetupSRL;
SetupSmart;
ActivateClient;
DeclarePlayers;
if not LoggedIn then LogInPlayer;
SetAngle(true);
MakeCompass('N');
SetRun(true);
if not AxeCheck then Terminate('Could not find Axe');
waitTree := 0;
{Setting Fixed Variables}
PathColor := FindPathColor('dirt');
AntibanChance := ((8 / chance) * 100);
end;

procedure MainLoop;
begin
repeat
repeat
repeat
Report;
CutYew;
MarkTime(waitTime);
repeat
//FindBirdsNest;
FindNormalRandoms;
Wait(1000+RanInt(100));
NPCChatCheck;
if(TimeFromMark(waitTime) >= (60000 + Random(30000))) then Antiban; // if idle for up to 90 milliseconds ~ 1.5 min then perform antiban to keep yourself from logging out.
until((not IsUpText('hop')) or InvFull);
until(InvFull);
WalkToGE;
BankingLoop;
WalkToYews;
until(not LoggedIn);
NextPlayer(false);
until(AllPlayersInactive);
TerminateScript;
end;

begin
ScriptSetup;
MainLoop;
end.

Da 0wner

2009-05-13 11:51:52

Looks nice. I won't vote though because I am tired right now and can't really analyze the code. But it has been more then a week since your last application.

Sir R. M8gic1an

2009-05-13 11:58:38

edited out the password, and i think it's a bit early to re-apply already….

~RM

Da 0wner

2009-05-13 12:03:52

The account is a level 3 newb. He gave it to the general public already :p.
Lancerawks - SRL Member Application - Decision needed - 04-19-2009, 06:57 AM

From: lancerawks
Hello im Lance, i like scripting. since ive discovered srl its been my #1 hobby haha. I did just enter an application, but Hobbit gave me permision to fix it up and enter it again in a weaks time ( i belive its been a weak? i cant remember which day i posted it)

ZephyrsFury

2009-05-13 12:11:29

The script looks nice. You've made considerable improvements on your application script and you've got a good eagerness to learn. I also like your enthusiam and your general attitude.

So thats a yes from me. Good luck. :)

Pure1993

2009-05-13 14:26:47

I've told you I would vote yes if you were to apply with this script, and that is what I'll do now… good luck :)

Torrent of Flame

2009-05-13 14:33:10

It contains a script! OMFG!

I voted yes. I didnt see when your last app was but I have seen you about.

One thing I dont like is the fact that you use FindObjTPA, you could make a real TPA for treecutting if you wanted too.

Floor66

2009-05-13 17:59:01

Yes from me, You did well ;)

Wizzup?

2009-05-13 18:00:42

Yes from me. You improved a lot on the script. :)

Hobbit

2009-05-13 18:01:15

From: Rasta Magician
edited out the password, and i think it's a bit early to re-apply already….

~RM


it was 1 vote away last time and its been like2 and a half weeks so I allowed it.

Yes

P1nky

2009-05-13 18:54:57

YES!
Thanks for using DDtms/TPAs/RRW!!! those are the major ones i concetrate on and vote depending if you used those.

Good Job dude!

Lance

2009-05-13 19:20:16

hey thanks guys :] im glad you all like it, Torrent Of Flame isnt FindObjTPA the same anyways? i suppose i could have made a fancy shmancy TPA :P

Torrent of Flame

2009-05-13 19:35:02

From: lancerawks
hey thanks guys :] im glad you all like it, Torrent Of Flame isnt FindObjTPA the same anyways? i suppose i could have made a fancy shmancy TPA :P


Yehh It is I suppose, meh. People moaned at me when I used it :'(

:P

Blumblebee

2009-05-13 19:35:04

Your active, work hard to improve, and a not bad script, you even use your ddtms properly, something you dont see in apps very much. so its a yes from me. Good luck

Torrent of Flame

2009-05-13 19:39:07

From: Blumblebee
Your active, work hard to improve, and a not bad script, you even use your ddtms properly, something you dont see in apps very much. so its a yes from me. Good luck


I can't even use DDTM's properly :D

Lance

2009-05-13 22:18:50

haha well, im happy about 9 yes's and 0 no's. i didnt think id get so many yesses on the first day o.O

marpis

2009-05-13 22:27:32

yes from me. even nava2 can't say no for this one
but:
Varrock Yew Cutter & Banker: [][][][][][][][][][] - 80% Compleate
you send here a 80% ready script? :D why not 100%?

Lance

2009-05-14 03:36:09

oops haha it should be 95% now. i mean scripts never are realy finished are they? theres always another bug to fix. i suppose it is ready for people to use if they want though

Nadeem

2009-05-14 03:53:46

OMG… I haven't seen an actual script in this section in ages xP YES from me!

But the real reason:
Good script! Coding seems fairly clean. Though minor clean ups can be adjusted, and small standards correction such as:
if not YourFunc then Exit;
Should be:
if(not(YourFund))then Exit;
I like your use of failsafes through out the script, ex: on radial walking.

Overall, good job! Keep up the good work! And welcome to SRL Members :)



~NS

Da 0wner

2009-05-14 03:55:46

I like to use
if not LoggedIn then
exit;
etc..
If it's not correct standards, oh well…doesn't make it that much harder to read.

mormonman

2009-05-14 04:00:00

-.- I voted yes last time, and this is even better. I like that you actually did some "alright" walking.

ZaSz

2009-05-14 04:09:04

I would've combined the ddtm's into 1 procedure using cases

example

function CustomDDTM(ddtmtoload:string;tolisoptional:integer): Integer;
begin
case ddtmtoload of
'path': begin blah blah end;
'ge':begin blah blah end;
end;
end;

saves a few lines :)

Yes.

Wizzup?

2009-05-14 05:00:03

From: Nadeem
OMG… I haven't seen an actual script in this section in ages xP YES from me!

But the real reason:
Good script! Coding seems fairly clean. Though minor clean ups can be adjusted, and small standards correction such as:
if not YourFunc then Exit;
Should be:
if(not(YourFund))then Exit;
I like your use of failsafes through out the script, ex: on radial walking.

Overall, good job! Keep up the good work! And welcome to SRL Members :)



~NS


Why would you add parentheses where you don't need them? It only decreases readability.

Griff

2009-05-14 05:09:53

Looks really good, and you're an active member. I'll vote yes once you edit your post and spell week correctly.

Nadeem

2009-05-14 06:12:29

Hmmm Wizzup, its in the standards list.. :/ Have I been misinformed or something?

Iron Man

2009-05-14 06:33:44

Yes. Good luck (doesn't look like you'll need it!)

Da 0wner

2009-05-14 06:50:45

See,
From: Da 0wner
I like to use
if not LoggedIn then
exit;
etc..
If it's not correct standards, oh well…doesn't make it that much harder to read.

I don't like it with parentheses..

Lance

2009-05-14 10:19:56

From: griff721
Looks really good, and you're an active member. I'll vote yes once you edit your post and spell week correctly.


i did :] haha sorry i have horrible spelling :S can you belive im 19? and i spell like a 5 year old haha.

and yeah, i personaly find
if not blah then Exit;
to be MUCH more readable without all the parentheses to muddle it up. If those are the standards maby they should be changed =[ lol

Tniffoc

2009-05-14 13:07:48

I'm not voting. I the first thing I do when I come to an application is Ctrl-F for FindObjTPA and not vote if it exists.

Home

2009-05-14 13:53:04

Yes from me.. I see lot of progress in your script (: Keep it up!

~Home

BobboHobbo

2009-05-14 15:45:34

From: Tniffoc
I'm not voting. I the first thing I do when I come to an application is Ctrl-F for FindObjTPA and not vote if it exists.


-.-. Compare this script to his old application, It was massively improved.

Yes from me goodluck xD.

Wizzup?

2009-05-14 16:42:49

From: Tniffoc
I'm not voting. I the first thing I do when I come to an application is Ctrl-F for FindObjTPA and not vote if it exists.


Someone could have written his own FindObjTPA… :)

Floor66

2009-05-14 17:51:45

Hah yeah. I've done that once before I knew of FindObjTPA LOL. I made one for the MM and one for the MS (so one for radial walking and one for object finding actually).

Lance

2009-05-14 19:33:35

i dont understand what is wrong with FindObjTPA? i mean there are other TPA's i did make in that script, and isnt it pretty much the same thing? i mean i know i wouldnt use it when there were a whole lot of the same colors that your trying to find on your map cause then it will go about mouseing over everything haha, but for something like yew trees it works well dosnt it?

Pure1993

2009-05-14 19:59:11

it's just too basic ;)
it is always a good way to show that you understand something by creating your individual searching function. ;)

Floor66

2009-05-14 20:07:26

Yup. Using all the pre-made functions will not show much knowledge for TPA's, but I know you do know them ;)

marpis

2009-05-14 21:03:43

From: Nadeem
Hmmm Wizzup, its in the standards list.. :/ Have I been misinformed or something?


throw away your standards list and use your own logics. extra brackets make script messy

From: Pure1993
it's just too basic ;)
it is always a good way to show that you understand something by creating your individual searching function. ;)


so basically he could copy paster the findobjTPA function from SRL, add there something or take something away and that'd give him extra points?

TPA should not be a must in scripts where it's not necessary.
besides, in this script there are TPA's, so why cry about using FindobjTPA?
SRL functions are made to be used (except for findobj() :|)


Who voted no? ARGUMENTS PLEASE!

Pure1993

2009-05-14 22:03:23

From: marpis

so basically he could copy paster the findobjTPA function from SRL, add there something or take something away and that'd give him extra points?

TPA should not be a must in scripts where it's not necessary.
besides, in this script there are TPA's, so why cry about using FindobjTPA?
SRL functions are made to be used (except for findobj() :|)


No, just adding a line or getting rid of one wouldn't change anything (except maybe ending in a bad mark if he forgot to creadit the srl libary ;) ) BUT if he would have used an inidvidual searching function, it would probably yield even better results, and it would demonstrate his knowledge about TPAs.

Also, Using the FindObject function demonstrates so form of lazyness… Every search function should look different, depending on what you are searching. For example, a fish spot finding function could look for the colors over at least 3 seconds (because, you might look for it while the rings on the water are not visible), then combine the arrays before using the tpatoatpa function. Finding trees on the other hand would be a lot more accurate using the third colorspeedmodifier.

Of course, I expect neither of the two examples in a member app, but they are nice examples to show that using object.scar is not something that should happen regularly.

Lance

2009-05-14 22:49:37

i understand what you mean pure1993, i still have a lot to learn about TPA's lol. mine are still quite basic

Da 0wner

2009-05-15 05:52:04

CTS 2 is fine to use for tree finding Pure. CTS 3 is overdoing it :p.

Pure1993

2009-05-15 16:18:27

lol, like those 500 ms more or less matter ;)
and hey, it never hurt to be a bit over secure… :D
I was just giving example on why you might want to use something other than object.scar ^^

marpis

2009-05-15 17:22:32

From: Pure1993
Every search function should look different


that is not true, that is overdoing. we are not sending a rocket to outer space, we are just looking for colors on our screen. there is no need to make a separate function for npcs, trees, ground objects, rocks etc. they can all be found perfectly with just 1.

Pure1993

2009-05-15 17:56:55

yeah, okay, it could be that I'm just a bit paranoid over color searching functions… anyway, I am not discriminating against anyone who isn't making their custom search functions, nor will I complain, but personally, I will always create individual searching functions. Just for the fun of it. (little TPA addict here… also tried to do map walking based on color occurance of different shades of grass… didn't work too well, but it was a really bad spot anyway ;)) ^^

Anyway, gratz on that poll, looking really good there ;)

Lance

2009-05-15 23:04:24

lol well an example of where FindObjTPA would be bad is in the OpenGEBank function. theres just sooo much grey everywhere, pluss theres tonz of charictures all around that all have similar colors to the hair and face colors of the bankers, so if you used FindObjTPA it would probably go bazerk mousing over everything on the screen. So places like that i would deff make my own TPA's. but like i said before at the Yew tree location the trees are pretty much the only thing of that color so such an advanced TPA dosnt realy seem nessisary lol.

Sir R. M8gic1an

2009-05-16 05:45:59

Great attitude.

~RM

Tniffoc

2009-05-16 07:54:13

From: Wizzup?
Someone could have written his own FindObjTPA… :)


Well, then he would have odd standards! :)

Gu3st...

2009-05-16 11:22:43

Tniffoc: FindObjectsTPA is a great way for finding objects ;)

First application I visit since it re-opened (mainly because they all was like "Please let me in, I will be helping people!!!"), and I am surprised! I love you'r attitude and to script better can be learned (even though the script looks awesome).

lordsaturn

2009-05-17 08:49:14

I love it, every aspect of your script is failsafed.

Antiban could be shortened a bit, such as
MakeCompass(90*Random(4));

Standards are pretty good, but slightly inconsistent.

Also, ChangeTree probably wont work sometimes, since there are 3 tree symbols rather than two. You could check out my GE Yew Cutter for some tips.

Object finding could be improved (FindObj..). Try using a median color with specific tolerance rather than moving the mouse across the screen atleast 50 times before jumping to a failsafe.

FindPathColor probably wont work, there are no color value range checks. Perhaps read a couple tuts on autocoloring and cts2. Try this one.

Nice usage of DDTMs, I haven't seen them used correctly in applications in a while. :p
Though there is one major flaw that stands out. Your DTM is not freed every iteration of the repeat loop, only if it is found. Thus causing a memory leak. :(

I love your walking, very failsafed, very nice. Though your OpenGEBank could be improved. Try finding colors of both hair and skin and comparing distances.

Good script overall, I like your helpful posts, and I'm going to have to say yes. :)

Once again, if you'd like some more tips, please check out my GE Yew Cutter in my siggie.

Dynamite

2009-05-17 09:52:16

Great attitude, you seem like a nice guy.
I'm not voting cause there is no need, so i guess well done on Member :)

T~M

Lance

2009-05-18 01:10:12

From: lordsaturn

Also, ChangeTree probably wont work sometimes, since there are 3 tree symbols rather than two. You could check out my GE Yew Cutter for some tips.

FindPathColor probably wont work, there are no color value range checks. Perhaps read a couple tuts on autocoloring and cts2. Try this one.


Both the ChangeTree and FindPathColor work 100% on my computer (unless ofcourse you are positioned in a place where the tree symbol is not entirely on your map) you can test them if youd like though XD
but yes thankyou i will deffinatley look at your GE yew cutter. I think the part that needs attention is the banking and maby alittle more work on the walking, it could use a few more failsafes.

Wizzup?

2009-05-18 15:27:58

In.