SRL Archive - Archive

scuz 10 - SRL Member Application


scuz 10

2010-01-24 17:17:42

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?
C, C++, pascal, some java


Are you a member of any other communities?
No


Tell us about yourself…
From: scuz 10
I am 19 years old, in College and majoring in Electrical Engineering. I have taken several college courses on C and C++, and I eager to learn more. I have been playing runescape for over 7 years (since i was in 6th grade), and my main account is level 138. I've been playing since rs1 and I know everything there is to know about the game. I enjoy scripting in scar, and I am always ready to learn new things.



Please show us one (or multiple) of your scripts.
{.Script Info:
# ScriptName = varrock miner
# Author = scuz 10
# Description = mines any type of ore - tin, copper, iron (only one type though). will add more options soon
# Version = 0.2
# Date = 1/19/2010
# Comments = start logged out with pickaxe in first inventory slot in varrock bank.

# SRL App Tool = You should Apply for members if you havent cheated!
[==================================]
[= Result: 95%
[==================================]

# credits: bobbohobbo for the application tool
coh3n for his tutorial
the srl community :D
/Script Info}


//comment smart.scar '//' to use runescape
program New;
//{.Include srl/srl/Misc/smart.Scar}
// {.Include srl/srl.scar}
{.Include srl/srl.scar}
{.Include srl/srl/Misc/debug.Scar}
{.Include SRL/SRL/Misc/Users.Scar}

type RandomClick = (Percent50Chance,Percent20Chance,
Percent10Chance);
TRock = record
Name: String;
Color:TColor;
Huemod, Satmod : Extended;
Tol : Integer;
Func : function: Boolean;
end;
TRockArray=array Of TRock;

function LoadRockInfo(Name : string) : TRock; forward;

Var
Rocks: TRockArray;
foundRock:Boolean;

var
x,y,i, iii, PrevCount, loads : Integer;

procedure WalktoMine();
var
TPA : TPointArray;
ATPA : T2DPointArray;
begin
if not LoggedIn then Exit;
writeln('Walking path one');
FindColorsSpiralTolerance(MMCX + 60, MMCY,TPA, 5790807, MMX1, MMY1, MMX2, MMY2, 14);
ATPA :=TPAToATPA(TPA,3);
SortATPAFrom(ATPA, Point(MMCX + 60, MMCY));
//debugatpa(atpa, '');
x:= (iAbs((atpa[0][0].x - atpa[1][0].x)) + atpa[0][0].x);
y:= (iAbs((atpa[0][0].y - atpa[1][0].y)) + atpa[0][0].y);

If Mouseflag(x, y - 10, 0,0,0) then
begin
writeln('made path one');
wait(2000+Random(450));
end else
begin
writeln('didn''t make path one');
nextplayer(false);
exit;
end;

writeln('Walking Path 2');
if FindColorsSpiralTolerance(MMCX + 15, MMCY - 10,TPA, 198383, MMCX-40, MMCY-40, MMCX+40, MMCY+40, 15)then
begin
mouse(tpa[0].x + 40, tpa[0].y, 10, 3, True);
debugatpa(atpa, '');
end else
begin
writeln('didn''t make path two :(');
nextplayer(false);
exit;
end;
fflag(0);
//main mouse procs
begin
writeln('Walking path 3');
for i:= 0 to 3 do
if FindColor(x,y, FindTreeColor, 632-(10*i), 156-(10*i),632+(10*i), 156+(10*i))then
begin
Mouse(x + 10,y, 5, 0, True);
break;
end else
wait(80);

if not Flagpresent then
begin
writeln('didn''t make path three :(');
nextplayer(false);
exit;
end else
fflag(0);
writeln('Walking fouth path');
FindColorsSpiralTolerance(MMCX - 60, MMCY + 40,TPA, 5790807,MMX1, MMY1, MMX2, MMY2, 14);

Mouse(TPA[0].x + 80,TPA[0].y,5,5,True);
if not Flagpresent then
begin
writeln('didn''t make path fiur :(');
nextplayer(false);
exit;
end else
fflag(0);
WriteLn('Walking path 5');
Mouse(650, 152,5,5,True);
if not Flagpresent then
begin
writeln('didn''t make path five :(');
nextplayer(false);
exit;
end else
fflag(0);

WriteLn('Walking path 6, at mine!');
Mouse(mmcx + 60, mmcy,5,5,True);
if not Flagpresent then
begin
writeln('didn''t make path 6:(');
nextplayer(false);
exit;
end else
fflag(0);
if FindSymbol(X, Y, 'mining spot') Then
mouse(x - 15, y + 5, 2, 2, True)
else
begin
Writeln('could not make mine :-(');
nextplayer(false);
exit;
end;
flag;
end;
WriteLn('Time to hit rocks :)');
end;

function FindRocks : Boolean;
var TPA : TPointArray;
ATPA :T2DPointArray;
I, T :Integer;
Info: TRock;
begin
if not LoggedIn then Exit;
Info:= LoadRockInfo(Players[CurrentPlayer].Strings[0]);
GameTab(4);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(Info.HueMod,Info.SatMod);
writeLn('Finding '+Info.Name+' Rock!');
FindColorsSpiralTolerance(MSCX,MSCY, TPA, Info.Color, MSX1, MSY1, MSX2, MSY2, Info.Tol);
ATPA:=SplitTPA(TPA, 7);
SortATPAFromSize(ATPA, 90,True);
T := GetSystemTime;
for i:= 0 to High(ATPA) Do
if MiddleTPAEx(ATPA[i], x, y) then
begin
MMouse(x,y, 0, 0);
if not Animating(IntToBox(x-40, y-40, x+40, y+40), 200, 130) then
if WaitUpText('ock', 330) then
begin
Mouse(x,y, 0, 0, true);
FoundRock := True;
Result:= True;
writeln('Found rock in: '+IntToStr(GetSystemTime-T)+' msec..');
Break;
end;
end;
end;

function LoadRockInfo(Name : string) : TRock;
begin
if not LoggedIn then Exit;
SetLength(Rocks,3); //0 - tin, 1 - copper, 2 - iron

case Lowercase(Name) of
'tin' : begin
Rocks[0].Name:= 'Tin';
Rocks[0].Color:= 8092546;
Rocks[0].Huemod:= 0.24;
Rocks[0].Satmod:= 0.07;
Rocks[0].Tol:= 14;
end;

'copper': begin
Rocks[1].Name:= 'Copper';
Rocks[1].Color:= 4022666;
Rocks[1].Huemod:= 0.03;
Rocks[1].Satmod:= 0.08;
Rocks[1].Tol:= 9;
end;

'iron': begin
Rocks[2].Name:= 'Iron';
Rocks[2].Color:= 2568006;
Rocks[2].Huemod:= 0.07;
Rocks[2].Satmod:= 0.13;
Rocks[2].Tol:= 5;
end;
end;
for iii:= 0 to High(Rocks) Do
begin
Rocks[iii].Func:= @FindRocks;
if not (Lowercase(Name) <> Rocks[iii].Name) then
begin
Result := Rocks[iii];
Break;
end;
end;
end;

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
0: RandomRClick;
1: PickUpMouse();
2: RandomMovement;
3: ExamineInv();
4..7: begin
GameTab(RandomRange(TAB_Combat,TAB_LOgout));
Wait(800+Random(700));
FindNormalRandoms;
end;
8..10 : SleepAndMoveMouse(2000);
end;
end;

procedure WaitWhileMine;
var iy : shortint;

begin
if not LoggedIn then Exit;
while (invcount = prevcount) and (Iy < 100) do
begin
if Integer(Trunc(Sin(90))*2=Random(4)) > 0 Then
AntiBan;
Inc(iy)
end;
if invcount > prevcount then
writeln('Mined Rock');
wait(8);
Exit;
end;

procedure MineOres;
begin
if not LoggedIn then Exit;
repeat
FoundRock:= False;
PrevCount := InvCount();
If not Rocks[iii].Func() then
WaitWhileMine
else
if FoundRock then
begin
writeln('found the rock!');
WaitWhileMine;
end;
until(InvFull) XOR (Integer(LoggedIn) <1);
if not LoggedIn then
begin
Writeln('The currentplayer logged out');
NextPlayer(False);
end;
end;

function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 663;
dtmMainPoint.y := 47;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindTreeColor;
dtmMainPoint.Tolerance := 50;

dtmSubPoints[0].x := 663;
dtmSubPoints[0].y := 47;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindTreeColor;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 667;
dtmSubPoints[1].y := 45;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindTreeColor;
dtmSubPoints[1].Tolerance := 90;

dtmSubPoints[2].x := 666;
dtmSubPoints[2].y := 49;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 604732;
dtmSubPoints[2].Tolerance := 90;

dtmSubPoints[3].x := 661;
dtmSubPoints[3].y := 44;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindTreeColor;
dtmSubPoints[3].Tolerance := 90;

dtmSubPoints[4].x := 669;
dtmSubPoints[4].y := 34;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8817034;
dtmSubPoints[4].Tolerance := 90;

dtmSubPoints[5].x := 675;
dtmSubPoints[5].y := 41;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 8817034;
dtmSubPoints[5].Tolerance := 90;

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

function GetToVEB : Boolean;
var
BankerTPA :TPointArray;
ATPA :T2DPointArray;
P:TPoint;
begin
if not LoggedIn then Exit;
if not FindSymbol(x, y, 'bank') then
writeln('Symbol not found - trying TPABankers')
else
begin
Result := True;
MouseFlag(x,y, 0,0,0);
Exit;
end;
FindColorsTolerance(BankerTPA,195836, MMX1, MMY1, MMX2, MMY2,15);
ATPA:= SplitTPA(BankerTPA,7);
SortATPASize(ATPA,True);
P:= MiddleTPA(ATPA[0]);
Mouse(P.X -15,P.Y -10, 30, 3, True);
//debugatpa(atpa, '');
if not Flagpresent then
Result:= False
else
fflag(0);
end;


procedure Bank;
var TempDTM:Integer;
TP:TPointArray;
begin
if not LoggedIn then Exit;
TempDTM:= SetDDTM;
if DTMRotated(TempDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X + 9,Y,0,0, True);
FFlag(0);
end;
FreeDTM(TempDTM);
begin
TP := [Point(Round(60 * Sin(335 * Pi / 180)) + MMCX,
Round(-60 * Cos(335 * Pi / 180)) + MMCY),
Point(Round(70 * Sin(346 * Pi / 180)) + MMCX,
Round(-70 * Cos(346 * Pi / 180)) + MMCY),
{ next path}
Point(Round(65 * Sin(360 * Pi / 180)) + MMCX,
Round(-65 * Cos(360 * Pi / 180)) + MMCY),
Point(Round(70 * Sin(350 * Pi / 180)) + MMCX,
Round(-70 * Cos(350 * Pi / 180)) + MMCY),
{ next path}
Point(Round(65 * Sin(340 * Pi / 180)) + MMCX,
Round(-65 * Cos(340 * Pi / 180)) + MMCY),
Point(Round(70 * Sin(330 * Pi / 180)) + MMCX,
Round(-70 * Cos(330 * Pi / 180)) + MMCY)];
Mouse(RandomRange(TP[0].x, TP[1].x),
RandomRange(TP[0].y, TP[1].y), 2, 2, True);
FFlag(0);
writeln('Walked path one');
Mouse(RandomRange(TP[2].x, TP[3].x),
RandomRange(TP[2].y, TP[3].y), 2, 2, True);
FFlag(0);
writeln('Walked path two');

Mouse(RandomRange(TP[4].x, TP[5].x),
RandomRange(TP[4].y, TP[5].y), 2, 2, True);
FFlag(0);
writeln('Walked path three');
end;
MouseFlag(MMCX - 70,MMCY,0,0,0);
if not GetToVEB then
begin
writeln('didn''t make the bank :-----{');
nextplayer(false);
exit;
end;
if OpenBankFast('veb') then
if BankScreen then
Deposit(2, 28, True);
CloseBank;
Inc(Loads);
disguise('Banked '+IntToStr(Loads)+' loads!');
Writeln('banked :)');
end;

begin
SetupSRL;
SRLPlayerForm(False, [], ['Loads'],
['Rock to mine (Tin, Copper or Iron)'], []);
{$IFDEF SRL_SMART}
SetTargetDC(SMARTGetDC);
{$ENDIF}
writeln('loaded!');
if not loggedin then loginplayer;
repeat
repeat
WalktoMine;
MineOres;
Bank;
until (loads >= Players[CurrentPlayer].Integers[0]) or not loggedin;
NextPlayer(loads >= Players[CurrentPlayer].Integers[0]);
until(PlayersActive=0);
terminatescript;
end.

Timer

2010-01-24 17:19:24

Holding vote… Leaning towards a No.

0wn 4 skill

2010-01-24 17:26:41

The guy has a 138. If he puts as much effort into SRL as he does into Runescape then I imagine he will make a valued member.

But onto the script… I believe you have showed a good understanding for Scar, SRL and the way it works.

DTMs: YES
Banking: YES
Multi-Player: NO - It doesn't bother me too much but you could easily add it at some stage.
Walking: YES

YES.

@Timer, your comments aren't exactly constructive. A simple 'Yes' or 'No' is unfair to say the least…

Timer

2010-01-24 17:28:33

From: 0wn 4 skill
The guy has a 138. If he puts as much effort into SRL as he does into Runescape then I imagine he will make a valued member.

But onto the script… I believe you have showed a good understanding for Scar, SRL and the way it works.

DTMs: YES
Banking: YES
Multi-Player: NO - It doesn't bother me too much but you
Walking: YES

YES.

@Timer, your comments aren't exactly constructive. A simple 'Yes' or 'No' is unfair to say the least…

I love lacking information. Its kind of obvious to read tutorial islands stuff… Oh well.

Kyle Undefined

2010-01-24 17:29:21

Your script needs a lot of standards work and just looks…funky. I'm holding my vote for now.

~Camo

0wn 4 skill

2010-01-24 17:30:11

From: Camo Developer
Your script needs a lot of standards work and just looks…funky. I'm holding my vote for now.

~Camo


Actually yeah - STANDARDS MAN!

JAD

2010-01-24 17:33:51

From: Camo Developer
Your script needs a lot of standards work and just looks…funky. I'm holding my vote for now.

~Camo


Would it make you vote yes if he just ran it through an auto standardizer like a lot of people do? (I did for my members application a long time ago). Doesn't take much skill to do that/show any more knowledge of SCAR at all.

I vote yes. Solid script, activity in the community, been here long enough. Definitely.

Kyle Undefined

2010-01-24 17:51:04

It's not just the standards, it's the way he does some of the code.

~Camo

scuz 10

2010-01-24 18:24:37

Here you go guys. Cleaned up my code a bit to make it easier for you guys to read, but I like my standards. They're much more readable for me, but I am still learning.

Also, I dont know if this is even important to you guys, but I forgot to add that I also have access to the veteran server on rsc.

Thanks for your input everyone.

Timer

2010-01-24 18:47:44

Alright, yes. ;)

Awkwardsaw

2010-01-24 21:03:45

you can change

'tin' : begin
Rocks[0].Name:= 'Tin';
Rocks[0].Color:= 8092546;
Rocks[0].Huemod:= 0.24;
Rocks[0].Satmod:= 0.07;
Rocks[0].Tol:= 14;
end;

to

'tin' : begin
with rocks[0] do
begin
Name:= 'Tin';
Color:= 8092546;
Huemod:= 0.24;
Satmod:= 0.07;
Tol:= 14;
end;
end;

etc for the other 3 rocks. :)

i think it looks nicer, better standards and such :)

im voting yes, because you are willing to learn, active, and the script is nice over all

Sir R. M8gic1an

2010-01-25 03:06:48

I see potential. Yes.

~RM

Iroki

2010-01-25 04:35:12


function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
[...]
dtmMainPoint.Color := FindTreeColor;
dtmMainPoint.Tolerance := 50;
[...]
dtmSubPoints[0].Color := FindTreeColor;
....

It'll be faster if you just make another var, maybe TreeColor and at the begining of function you can put: TreeColor := Findtreecolor; and repleace all FindTreeColor; with TreeColor; Your script'll be faster and it looks better :P

But of course, multiplayer'd be adventage but Yes for me.

~ Iroki

WT-Fakawi

2010-01-25 04:43:04

Yes from me too.

noidea

2010-01-25 07:49:24

:) mhmmmm

Wanted

2010-01-25 10:35:13

From: Iroki

function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
[...]
dtmMainPoint.Color := FindTreeColor;
dtmMainPoint.Tolerance := 50;
[...]
dtmSubPoints[0].Color := FindTreeColor;
....

It'll be faster if you just make another var, maybe TreeColor and at the begining of function you can put: TreeColor := Findtreecolor; and repleace all FindTreeColor; with TreeColor; Your script'll be faster and it looks better :P

But of course, multiplayer'd be adventage but Yes for me.

~ Iroki


Yes, you should definitaly do that, calling tree color for every sub point is a bad idea, not just slow.

var
TreeColor: Integer;
begin
TreeColor := GetTreeColor;
if (TreeColor < 1) then
begin
WriteLn('Tree color not detected!');
Exit;
end;
DTMSubPoint[I].Color := TreeColor; //not "get" tree color
end;

Naum

2010-01-25 11:35:44

Yes from me, people have mainly covered what I would have said.
You could use a for..to..do loop for your mouse procedures, this would make the code look nearer and make it more efficient.

Naike

2010-01-25 16:40:51

Potential, at it's finest.

Yes.

scuz 10

2010-01-25 19:23:30

Thanks for the encouragement and the suggestions everyone, I really appreciate it!

How long does my application stay open for before a final decision is made?

0wn 4 skill

2010-01-25 19:24:57

Until someone gets off their arse and accepts you :)

17:2! I might aswell say Congratz now!

Brain

2010-01-25 19:25:53

you only applied yesterday, I would still say maybe up to a week or so, depending on how a passing mod/admin feels.

scuz 10

2010-01-25 19:37:30

From: Brain
you only applied yesterday, I would still say maybe up to a week or so, depending on how a passing mod/admin feels.


Alright, I was just wondering how the rest of this process works.

Thanks for the update.

0wn 4 skill

2010-01-25 19:51:32

From: Brain
you only applied yesterday, I would still say maybe up to a week or so, depending on how a passing mod/admin feels.


hmmm… it didnt take that long for me.

I mean, there isnt any question that the community feels this guy should be a member.

RAM

2010-01-25 22:46:32

From: scuz 10
Alright, I was just wondering how the rest of this process works.

Thanks for the update.


fate 1101

Afiliation with this person ?

Brain

2010-01-25 22:55:19

fate 1101

Join Date
12-28-2008
Total Posts
0


in case anyone else was wondering…

scuz 10

2010-01-25 23:23:48

From: RAM
fate 1101

Afiliation with this person ?


Never heard of them? I cant access that link it wants a username/password. In what way is he even remotely associated with me?

JAD

2010-01-25 23:27:25

I don't see what the point of a secret ballot is if the staff looks at who voted what. But what does Fate have to do with this?

Timer

2010-01-25 23:37:27

Matching IP? :p

scuz 10

2010-01-25 23:38:23

From: Timer
Matching IP? :p


I guess he uses the same isp as me…i get a new IP every couple months. I've never heard of him before…

Timer

2010-01-25 23:41:23

I think I've heard this before.. (not accusing you of anything)

scuz 10

2010-01-25 23:44:55

From: Timer
I think I've heard this before.. (not accusing you of anything)


Honestly?….

That guy has 0 posts. Has he ever logged in again from the same ip as me again? Nope…

Timer

2010-01-25 23:47:48

I'm talking on my own SRL app. But you never know, more then one account is against the rules, if I remember correctly.

scuz 10

2010-01-25 23:51:15

From: Timer
I'm talking on my own SRL app. But you never know, more then one account is against the rules, if I remember correctly.


Check the dates, it would be impossible for us to have registered around the same time if what I'm saying is true. I've worked really hard to learn how to script, and it will be quite a shame if my application gets denied over something so insignificant. It's not my fault that some random person signed up with the same ip as me. He has 0 posts and isn't even active. This is very frustrating….

NCDS

2010-01-25 23:58:00

From: scuz 10
Check the dates, it would be impossible for us to have registered around the same time if what I'm saying is true. I've worked really hard to learn how to script, and it will be quite a shame if my application gets denied over something so insignificant. It's not my fault that some random person signed up with the same ip as me. He has 0 posts and isn't even active. This is very frustrating….


Don't get frustrated. I can't see your app getting denied for something like this. Your script is definitely members worthy though.

scuz 10

2010-01-26 00:00:01

From: NCDS
Don't get frustrated. I can't see your app getting denied for something like this. Your script is definitely members worthy though.


Thanks for the encouragement, I hope my application is still on the right track :)

Timer

2010-01-26 00:04:29

Nothing to worry about, worst comes to worst, they'll bad the fate account.

EDIT: good luck with getting in members. ;)

Brain

2010-01-26 00:09:29

Yeah, I don't see a huge problem unless RAM knows something crazy that we don't :p

I was worried that the fate guy was a massive flammer or banned or something, then you might have had a reason to worry, but it's just an old un-used account, don't get too flustered.

scuz 10

2010-01-26 00:22:56

Thanks everyone! I'm feeling hopeful once again :)

Kyle Undefined

2010-01-26 09:18:36

Re looked over the script, looks better and voting yes. Keep it up.

~Camo

Naum

2010-01-29 11:08:31

Welcome to members :)

scuz 10

2010-01-29 12:08:40

Thanks! Still waiting lol, pretty excited though!

ReadySteadyGo

2010-01-29 13:36:49

Hi mate, nice script

Just something I noticed, SortATPAFrom isn't working at the moment so I would change this to make sure it does what you want, because you've used FindColorsSpiralTolerence it will do the same thing.

 FindColorsSpiralTolerance(MMCX + 60, MMCY,TPA, 5790807, MMX1, MMY1, MMX2, MMY2, 14);
ATPA :=TPAToATPA(TPA,3);
SortATPAFrom(ATPA, Point(MMCX + 60, MMCY));

to this

FindColorsSpiralTolerance(MMCX + 60, MMCY,TPA, 5790807, MMX1, MMY1, MMX2, MMY2, 14);
ATPA :=TPAToATPA(TPA,3);
SortATPAFromFirstPoint(ATPA, Point(MMCX +60, MMCY));

Btw, it's a yes from me :) Good Luck!

Timer

2010-01-29 15:06:43

From: ReadySteadyGo
Hi mate, nice script

Just something I noticed, SortATPAFrom isn't working at the moment so I would change this to make sure it does what you want, because you've used FindColorsSpiralTolerence it will do the same thing.

 FindColorsSpiralTolerance(MMCX + 60, MMCY,TPA, 5790807, MMX1, MMY1, MMX2, MMY2, 14);
ATPA :=TPAToATPA(TPA,3);
SortATPAFrom(ATPA, Point(MMCX + 60, MMCY));

to this

FindColorsSpiralTolerance(MMCX + 60, MMCY,TPA, 5790807, MMX1, MMY1, MMX2, MMY2, 14);
ATPA :=TPAToATPA(TPA,3);
SortATPAFromFirstPoint(ATPA, Point(MMCX +60, MMCY));

Btw, it's a yes from me :) Good Luck!


Just to correct you, SortATPAFrom DOES work. It just doesn't do what you think it does. It sorts the inside of the TPointArray, without changing order of the T2DPointArray. SortATPAFromFirstPoint sorts the order of the T2DPointArray without changing the order of the number inside the TPAs.
Plus, Spiral doesn't do the SAME exact thing, just close to it, it searches out in a spiral, that doesn't mean it necessarily closest to that point, but in theory, yes it is.

Phran6

2010-01-29 17:02:56

Yes !

Wanted

2010-01-29 18:08:29

[Offtopic] Why would anyone ever need to sort the TPA inside a bunch of ATPAs? Just use SortTPA(ATPA) wtf??

ReadySteadyGo

2010-01-29 18:17:06

Thank you for clearing that up Timer. Can someone redefine this in SRL?

{*******************************************************************************
procedure SortATPAFrom(var a: T2DPointArray; const From: TPoint);
Description: Sorts the T2DPointArray a from the point From.
*******************************************************************************}

0wn 4 skill

2010-01-30 09:27:35

Whats the crack here..? scuz applied 2 days before ReadySteadyGo and yet Ready gets members first?

WT-Fakawi

2010-01-30 10:07:18

In. Welcome.