SRL Archive - Archive

bbri06 - SRL Member Application


bbri06

2009-12-26 16:20:36

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
Don't know who. Was someone on sythe way to long ago for me to remember.


What is your general programming knowledge?
Only Pascal, I've forgotten most of the other ones I knew.


Are you a member of any other communities?
www.sythe.org - only one I frequent


Tell us about yourself…
From: bbri06
My name is Brian and I'm 15 years old. I enjoy most computer related activities and gaming. I also enjoy Volleyball, law, and psychology. I'm currently learning to play guitar and having a lot of fun doing it.



Please show us one (or multiple) of your scripts.
/////////////BBri06's Catherby Yew Chopper and Banker/////////////
//Uses SMART and SRL //
//Start at the grouping of yews west of Catherby //
//Fill out declare players //
//Please post errors //
//Thanks to most of [url]www.villavu.com/forums[/url] and namely Coh3n and //
//MasterKill for their great tutorials //
//////////////////////////////////////////////////////////////////

program BBYewCutter;

{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}

var
x, y, cutcolor, timefs, timefs2, Loads, BreakTimer, DDTMTolerance: integer;

procedure DeclarePlayers;
begin
NumberOfPlayers(4);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; // 3 or four letters form your character's name
Players[0].Active := true;
Players[0].Booleans[0] := false; //true for wielding axe, false for in inventory
Players[0].Strings[0] := 'mining'; // second skill to hover over
Players[0].Integers[0] := 200; //time in minutes before breaking, will have random time added
Players[0].Integers[1] := 40; //Loads to cut before terminating
Players[0].Strings[1] := ''; //Pin if you have one, leave blank if you don't have a pin

Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''; // 3 or four letters form your character's name
Players[1].Active := false;
Players[1].Booleans[0] := true; //true for wielding axe, false for in inventory
Players[1].Strings[0] := ''; // second skill to hover over
Players[1].Integers[0] := 200; //time in minutes before breaking, will have random time added
Players[1].Integers[1] := 40; //Loads to cut before terminating
Players[1].Strings[1] := ''; //Pin if you have one, leave blank if you don't have a pin

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := ''; // 3 or four letters form your character's name
Players[2].Active := false;
Players[2].Booleans[0] := true; //true for wielding axe, false for in inventory
Players[2].Strings[0] := ''; // second skill to hover over
Players[2].Integers[0] := 200; //time in minutes before breaking, will have random time added
Players[2].Integers[1] := 40; //Loads to cut before terminating
Players[2].Strings[1] := ''; //Pin if you have one, leave blank if you don't have a pin

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := ''; // 3 or four letters form your character's name
Players[3].Active := false;
Players[3].Booleans[0] := true; //true for wielding axe, false for in inventory
Players[3].Strings[0] := ''; // second skill to hover over
Players[3].Integers[0] := 200; //time in minutes before breaking, will have random time added
Players[3].Integers[1] := 40; //Loads to cut before terminating
Players[3].Strings[1] := ''; //Pin if you have one, leave blank if you don't have a pin
end;

function SetBankDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..6] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 888;
dtmMainPoint.y := 191;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 1;
dtmMainPoint.Color := 14014432;
dtmMainPoint.Tolerance := DDTMTolerance;

dtmSubPoints[0].x := 888;
dtmSubPoints[0].y := 191;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 1;
dtmSubPoints[0].Color := 14014432;
dtmSubPoints[0].Tolerance := DDTMTolerance;

dtmSubPoints[1].x := 891;
dtmSubPoints[1].y := 191;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 1;
dtmSubPoints[1].Color := 14014432;
dtmSubPoints[1].Tolerance := DDTMTolerance;

dtmSubPoints[2].x := 891;
dtmSubPoints[2].y := 194;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 1;
dtmSubPoints[2].Color := 14014432;
dtmSubPoints[2].Tolerance := DDTMTolerance;

dtmSubPoints[3].x := 891;
dtmSubPoints[3].y := 195;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 1;
dtmSubPoints[3].Color := 7502458;
dtmSubPoints[3].Tolerance := DDTMTolerance;

dtmSubPoints[4].x := 891;
dtmSubPoints[4].y := 197;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 1;
dtmSubPoints[4].Color := 7502458;
dtmSubPoints[4].Tolerance := DDTMTolerance;

dtmSubPoints[5].x := 888;
dtmSubPoints[5].y := 194;
dtmSubPoints[5].AreaSize := 1;
dtmSubPoints[5].AreaShape := 1;
dtmSubPoints[5].Color := 14014432;
dtmSubPoints[5].Tolerance := DDTMTolerance;

dtmSubPoints[6].x := 888;
dtmSubPoints[6].y := 195;
dtmSubPoints[6].AreaSize := 1;
dtmSubPoints[6].AreaShape := 1;
dtmSubPoints[6].Color := 7502458;
dtmSubPoints[6].Tolerance := DDTMTolerance;

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

function FindBankDDTM: Boolean;
var
BankDDTM: Integer;
begin
if(not(LoggedIn))then
exit;
BankDDTM := SetBankDDTM;
DDTMTolerance := 5;
repeat
if(not(DTMRotated(BankDDTM, x, y, MMX1, MMY1, MMX2, MMY2)))then
begin
IncEx(DDTMTolerance, 5);
FreeDTM(BankDDTM);
BankDDTM := SetBankDDTM;
result := false;
end else
begin
Mouse(x, y, 2, 2, true);
FFlag(5);
result := true;
break;
end;
until(DDTMTolerance >= 40) or (not(LoggedIn))
FreeDTM(BankDDTM);
end;

Function TimeToBreak: boolean;
begin
if(TimeFromMark(BreakTimer) >= (Players[0].Integers[0] * 60000))then
begin
MarkTime(BreakTimer);
result := true;
end else
result := false;
end;

Procedure BreakProc;
var
i, BreakTime: integer;
begin
BreakTime := (420000) + (random(300000));
Writeln('Breaking for: ' + IntToStr(BreakTime / 60000) + ' mins.');
Logout;
MarkTime(i);
While TimeFromMark(i) < BreakTime do
begin
wait(1000+random(1000));
end;
LoginPlayer;
end;

Procedure ProgressReport;
var
LogsCut: integer;
begin
if(Players[CurrentPlayer].Booleans[0])then
begin
LogsCut := Loads * 28;
end else
LogsCut := Loads * 27;
writeln('Bbri06"s Catherby Yew Cutter');
writeln('Time running: ' + TimeRunning);
writeln('Logs banked: ' + IntToStr(LogsCut));
end;

Procedure Randoms;
begin
LoadTeleRandoms;
FindNormalRandoms;
end;

Procedure Antiban;
begin
If(Not(LoggedIn))then
Exit;
Randoms;
if(TimeToBreak)then
BreakProc;
LevelUp;
Case(random(60))of
1: HoverSkill(Players[CurrentPlayer].strings[0], false);
2: PickUpMouse;
3: HoverSkill('Woodcutting', false);
4: RandomMovement;
5: ExamineInv;
6: BoredHuman;
7..10: RandomRClick;
11..60: Wait(550+random(1000));
end;
end;

Function IsCutting(TreeLoc: TPoint; TreeColor: integer): boolean;
var
CheckPoints: TPointArray;
begin
Randoms;
ColorToleranceSpeed(3);
FindColorsTolerance(CheckPoints, TreeColor, TreeLoc.x - 20, TreeLoc.y - 20, TreeLoc.x + 20, TreeLoc.y + 20, 5);
ColorToleranceSpeed(1);
result := High(CheckPoints) >= 15;
end;

Procedure OpenBankBB;
var
BankingPoints: TPointArray;
BankOption: TStringArray;
FilteredBankP: Array of TPointArray;
i, a, b: integer;
begin
if(not(LoggedIn))then
exit;
writeln('Attempting to open bank');
SetAngle(False);
MakeCompass('N');
SetArrayLength(BankOption, 2);
BankOption[0] := 'uick';
BankOption[1] := 'k Ban';
ColorToleranceSpeed(2);
FindColorsTolerance(BankingPoints, 11256805, msx1, msy1, msx2, msy2, 15);
if(Length(BankingPoints) = 0)then
FindColorsTolerance(BankingPoints, 8689587, msx1, msy1, msx2, msy2, 15);
FilteredBankP := SplitTPA(BankingPoints, 5);
for i := 0 to High(FilteredBankP) do
begin
MiddleTPAEx(FilteredBankP[i], a, b);
Mouse(a, b, 2, 2, false);
wait(100+random(100));
if(OptionsExist(BankOption, false))then
begin
ChooseOptionMultiEx(BankOption, 'all', clickleft);
wait(3000+random(1000));
if(BankScreen)then
begin
writeln('Bank opened successfully');
break;
end;
end;
end;
end;

Function Checkeroo(TimeIn: integer): boolean;
begin
if(not(LoggedIn))then
exit;
MarkTime(TimeFS2);
if(TimeFS2 - TimeIn > 40000)then
result := true;
end;

Function CheckForTrees: boolean;
var
TreesDTM: integer;
ReturnAngle: extended;
begin
TreesDTM := DTMFromString('78DA639CCDCCC0F087010C182114C3BBF71F1' +
'844A0FCFF40C03807A8E6376E3560F1B94035BF50D57C7AFF1E55' +
'CD0222D42CC2A286910955CD1222D42C256C170055DF1FDF');
SymbolAccuracy := 0.5;
if(FindSymbol(x, y, 'rare trees'))then
begin
writeln('Found tree symbol');
mouse(x, y + 7 + random(5), 2, 0, true);
FFlag(5);
result := true;
FreeDTM(TreesDTM);
Exit;
end;
if(not(FindDtmRotated(TreesDTM, x, y, MMX1, MMY1, MMX2, MMY2, Radians(-35), Radians(35), 0.02, ReturnAngle)))then
begin
result := false;
end else
begin
writeln('found trees via DTM');
result := true;
mouse(x - 15 - random(5), y + 15 + random(10), 2, 2, true)
FFlag(0);
end;
FreeDTM(TreesDTM);
end;

Function FindStore: boolean;
var
i: integer;
begin
SymbolAccuracy := 1.0;
for i := 0 to 5 do
begin
if(not(FindSymbol(x, y, 'store')))then
begin
SymbolAccuracy := SymbolAccuracy - 0.1;
end else
begin
writeln('Found store symbol');
mouse(x, y, 2, 2, true);
FFlag(0);
result := true;
exit;
end;
end;
result := false;
end;

Procedure ToTrees;
begin
if(not(LoggedIn))then
exit;
Writeln('Walking to trees');
Randoms;
if(FindStore)then
begin
if(not(LinearWalk(FindWaterColor, 270, 60, 4, 4)))then
begin
writeln('failed to walk to trees');
Players[CurrentPlayer].Active := False;
LogOut;
exit;
end else
FFlag(0);
repeat
Randoms;
if(CheckForTrees)then
break;
if(not(LinearWalk(FindWatercolor, 270, 60, 4, 4)))then
begin
writeln('failed to walk to trees');
Players[CurrentPlayer].Active := False;
LogOut;
exit;
end else
FFlag(10);
until(false)
end else
begin
writeln('Failed to walk to store icon');
Players[CurrentPlayer].Active := False;
LogOut;
end;
end;

Function FindBankSymbol: boolean;
var
i: integer;
begin
SymbolAccuracy := 1.0;
for i := 0 to 6 do
begin
if(not(FindSymbol(x, y, 'bank')))then
begin
writeln('Decreasing symbol accuracy');
SymbolAccuracy := SymbolAccuracy - 0.1;
end else
begin
writeln('Found bank symbol');
mouse(x, y, 2, 2, true);
FFlag(10);
result := true;
break;
end;
end;
end;

Function FindBank2: boolean;
var
BankDTM: Integer;
ReturnAngle: Extended;
begin
BankDTM := DTMFromString('78DA63CC676660906664000108C9C0F0FEE31' +
'F061128FF3F10301660AA498C8D87AB018B83D4C8A0AAD9BA723D' +
'AA9A42A01A3154356949C9A86AF231D520BB070400FE07113E');
if(not(FindBankDDTM))then
begin
if(not(FindDtmRotated(BankDTM, x, y, MMX1, MMY1, MMX2, MMY2, Radians(-35), Radians(35), 0.02, ReturnAngle))) then
begin
result := false;
end else
begin
result := true;
if(not(Rs_OnMiniMap(x + 5, y)))then
begin
result := false;
Exit;
end else
begin
writeln('Found bank DTM');
result := true;
Mouse(x, y, 2, 2, True);
FFlag(4);
FreeDTM(BankDTM);
Exit;
end;
end;
end else
begin
result := true;
writeln('Found bank DDTM');
OpenBankBB;
end;
FreeDTM(BankDTM);
end;

Procedure ToBank;
var
i: integer;
begin
if(not(loggedin))then
exit;
Randoms;
Writeln('Banking');
SetRun(true);
MakeCompass('N');
FindSymbol(x, y, 'rare trees');
mouse(x, y + 7 +random(7), 2, 0, true);
FFlag(0);
if(not(LinearWalk(FindWaterColor, 90, 60, 4, 4)))then
begin
writeln('Walking to bank failed');
Players[CurrentPlayer].Active := False;
LogOut;
exit;
end else
begin
FFlag(0);
SymbolAccuracy := 0.6;
repeat
Randoms;
if(FindSymbol(x, y, 'store'))then
begin
mouse(x, y, 2, 2, true);
FFlag(0);
break;
end;
if(not(LinearWalk(FindWaterColor, 90, 60, 4, 4)))then
begin
Players[CurrentPlayer].Active := False;
writeln('Walking to bank failed');
LogOut;
Exit;
end else
FFlag(0);
i := i + 1;
until(false)
end;
if(not(FindBank2))then
begin
writeln('Failed to find bank using DTMs, trying symbols');
if(not(FindBankSymbol))then
begin
writeln('Failed to find bank, terminating');
Players[CurrentPlayer].Active := False;
LogOut;
exit;
end else
OpenBankBB;
end else
OpenBankBB;
if(not(bankscreen))then
begin
if(PinScreen)then
begin
InPin(Players[CurrentPlayer].Strings[1]);
end else
begin
if(not(FindBank2))then
begin
if(not(FindBankSymbol))then
begin
writeln('Failed to bank');
Players[CurrentPlayer].Active := False;
LogOut;
end else
begin
OpenBankBB;
end;
end else
OpenBankBB;
end;
end;
if(Players[CurrentPlayer].Booleans[0])then
begin
Deposit(1, 27, true);
end else
Deposit(2, 27, true);
wait(200+random(200));
CloseBank;
Loads := Loads + 1;
ProgressReport;
end;

Function FindTree: TPoint;
var
TreePoints : TPointArray;
i, a, b :integer;
TreePointsSorted: Array of TPointArray;
ChopOption: TStringArray;
begin
Randoms;
ColorToleranceSpeed(3);
if(findColorSpiralTolerance(x,y, 5278847, MSX1, MSY1, MSX2, MSY2, 15))then
begin
if(FindColorsTolerance(TreePoints, 5278847, MSX1, MSY1, MSX2, MSY2, 2))then
begin
SetArrayLength(ChopOption, 1);
ChopOption[0] := 'Chop down Yew';
SortTPAFrom(TreePoints, inttopoint(mscx, mscy));
TreePointsSorted := SplitTPA(TreePoints, 15);
for i := 0 to High(TreePointsSorted) do
begin
MiddleTPAEX(TreePointsSorted[i], a ,b);
Mouse(a, b, 2, 2, false);
wait(350+random(100));
if(OptionsExist(ChopOption, false))then
begin
ChooseOption('Chop down Yew');
result := inttopoint(a, b);
break;
end;
end;
end;
end;
ColorToleranceSpeed(1);
end;

Procedure Cut;
var
Tree: TPoint;
begin
If(Not(LoggedIn))then
Exit;
Randoms;
MakeCompass('n');
SetAngle(True);
writeln('Starting cutting procedure');
repeat
if(Not(Findcolorspiraltolerance(x, y, 5278847, msx1, msy1, msx2, msy2, 10)))then
begin
If(Not(LoggedIn))then
Exit;
Randoms;
FindSymbol(x, y, 'rare trees');
Mouse(x, y+20+random(7), 2, 0, true);
FFlag(0);
if(Not(Findcolorspiraltolerance(x, y, 5278847, msx1, msy1, msx2, msy2, 10)))then
wait(3000+random(4000));
end else
begin
If(Not(LoggedIn))then
Exit;
Randoms;
cutcolor := getcolor(x,y);
Tree := FindTree;
Wait(750+random(750));
FFlag(0);
MarkTime(TimeFS);
If(IsCutting(Tree, cutcolor))then
begin
repeat
if(not(LoggedIn))then
exit;
Randoms;
Antiban;
if(not(IsCutting(Tree, cutcolor)))then
break;
if(InvCount = 28)then
break;
if(Checkeroo(TimeFS))then
break;
until(false)
end;
MakeCompass('N');
end;
until(InvCount=28)
end;

begin
Smart_Members := true;
Smart_Server := 0;
SetupSRL;
SetupWoodcutting;
DeclarePlayers;
LoginPlayer;
LampSkill := 'Woodcutting';
MarkTime(BreakTimer);
repeat
repeat
Cut;
ToBank;
ToTrees;
if(TimeToBreak)then
BreakProc;
until(Loads >= Players[CurrentPlayer].integers[1]) or not(LoggedIn)
NextPlayer(true);
until(false)
end.

Baked0420

2009-12-26 16:33:12

your DDTM uses different tolerances, but not different colors, but you show you know how to make one.

Uses breaks, that's a plus.

Uses TPA's.

in one part you do:

 
if(condition)then
begin
statement;
end else
begin
statement;
statement;
end;

it's in check for trees, you don't need the first begin and end, since it's one statement after it, but it's not a big deal.

you do mapwalking which is good.

your main loop is an inifinite loop, you should make it until(PlayersActive=0) or something.


but you show most to all the thing people look for in a members app, it's pretty good, I like it. I vote yes :)

bbri06

2009-12-26 16:53:14

Thanks. I love constructive criticism so tear it to pieces :)

Gu3st...

2009-12-26 19:04:48

Have already seen the script, and I have been watching you since the beginning. My vote: Yes - of course :)

Naike

2009-12-26 19:13:26


Procedure Randoms;
begin
LoadTeleRandoms;
FindNormalRandoms;
end;

No need for LoadTeleRandoms; as it's used in SetupSRL.

cycrosism

2009-12-26 20:13:17

Yes. Although the walking could be improved

JPHamlett

2009-12-26 20:23:24

yes

mormonman

2009-12-26 21:24:12

From: bbri06
Thanks. I love constructive criticism so tear it to pieces :)

a
YES!

BobboHobbo

2009-12-27 00:09:18

You should Apply for members if you havent cheated!
[==================================]
[= Result: 98%
[==================================]


I saw your script earlier and thought it was great. Yes :).

Coh3n

2009-12-27 01:22:30


if(not(IsCutting(Tree, cutcolor)))then
break;
if(InvCount = 28)then
break;
if(Checkeroo(TimeFS))then
break;
Can be better written as:

if (not(IsCutting(Tree, cutcolor))) or (InvCount = 28) or (Checkeroo(TimeFS)) then

Yes.

Main

2009-12-27 02:22:57

Yesss

Kyle Undefined

2009-12-27 03:48:15

Yes :)

~Camo

Sabzi

2009-12-27 06:58:39

Yes!

Naike

2009-12-27 09:30:37

Forgot to vote..

Yes!

Awkwardsaw

2009-12-27 09:32:39

yeah :D

Bionicle

2009-12-27 11:16:46

I only have one word for this.
Yes.
Good job :D

Dervish

2009-12-27 11:29:17

Not enough posts… No. yes of course…

Bionicle

2009-12-27 11:30:24

From: Dr D. Dervish
Not enough posts… No. yes of course…


I really hope your kidding ..O_o

Gu3st...

2009-12-27 12:04:34

From: bionicle1800
I really hope your kidding ..O_o
Read the white text…

Bionicle

2009-12-27 12:41:08

From: Zyt3x
Read the white text…


:duh:

JPHamlett

2009-12-27 14:09:53

let me be the first to say welcome to SRL members

Griff

2009-12-27 15:00:38

Yes. Only because you are the same age as me and have the same interests. Or because it's a great script. Or because it's the Christmas season. Who knows.

Dervish

2009-12-27 15:49:01

From: bionicle1800
:duh:


Hahahaha never thought i'd get anyone with that trick xD.

bbri06

2009-12-27 18:11:54

Wow, thanks a lot for all the support and CnC. I'm going to edit those suggestions in.

Floor66

2009-12-27 18:40:13

Meh. Auto-in I guess :p Great script, attitude, etc.

bbri06

2009-12-28 15:24:27

Whoever voted no, could you please explain why. I want to know why you voted no so I can fix whatever the problem is.

Sir R. M8gic1an

2009-12-28 15:36:14

Welcome to Jah People :)

Edit: I'll leave this open in case he who voted no wishes to explain. It'd be lovely if we avoided any "in b4 close" posts ;)

~RM

bbri06

2009-12-28 15:43:50

Thanks! :)

Sabzi

2009-12-28 15:44:15

Sorry but inb4 close(hey, I couldn't resist) I just want to answer(no, not I have voted no, I have voted yes).
It may be just a already-in-why-not-vote-no type of vote. So if I were you I wouldn't worry about fatal problems in my script. Also congratulation!

Still it would be cool to know the real answer for the no.

Coh3n

2009-12-28 16:59:51

Probably someone voted no just to be a jackass.

Congrats! :D

EDIT: Sowwy RM ;)

Dynamite

2009-12-28 17:07:56

Sorry…
But I WOULD have voted yes.
Not very active :p

Main

2009-12-28 23:40:52

Lets all go on a troll hunt.
inb4close.

Gratz on yellow name.

Sir R. M8gic1an

2009-12-30 07:58:06

Closed. Congratulations.

The person can always PM you.

~RM