SRL Archive - SRL Bugs

Varrock Autocolor broke


MylesMadness

2010-06-28 19:56:29

Varrock autocolor doesn't work for me or ReadySteadyGo

Coh3n

2010-06-28 20:10:08

From: MylesMadness
Varrock autocolor doesn't work for me or ReadySteadyGo

Works fine for me?

program new;
{$i SRL/SRL.scar}

begin
SetupSRL;

Wait(RandomRange(200, 500));
RadialWalkAutoColor(srl_VarrockRoadColor, 0, 45, 70, 3, 3);
end.

** Warning in LoadAutoColor: Function Successful: Found Color = 8424071 **

MylesMadness

2010-06-28 20:54:26

But is that the right color? It gave me a color that wasn't right

Blumblebee

2010-06-28 20:55:38

make your own simple autocolor if that ones not working. Autocoloring is pretty simple to do :)

MylesMadness

2010-06-28 20:56:52

From: Blumblebee
make your own simple autocolor if that ones not working. Autocoloring is pretty simple to do :)
I know its not, but it should still be fixed in srl…

ReadySteadyGo

2010-06-28 21:02:29

It's working for me on this login, but the last two logins it didn't find it. Weird.

Coh3n

2010-06-28 21:19:58

From: ReadySteadyGo
It's working for me on this login, but the last two logins it didn't find it. Weird.

Are you using a tolerance? If so, maybe it's not hight enough? I always use 10 and I've never had it fail.

MylesMadness

2010-06-28 21:48:28

** Warning in LoadAutoColor: Function Successful: Found Color = 8554636 ** but the color is 9014929. A tolerance wouldn't help if the autocolor itself was giving wrong colors

Coh3n

2010-06-28 22:02:33

From: MylesMadness
** Warning in LoadAutoColor: Function Successful: Found Color = 8554636 ** but the color is 9014929. A tolerance wouldn't help if the autocolor itself was giving wrong colors

Where did you get 9014929 from? Look at the arrays in AutoColors.scar. Those are all the colours I picked for each road. There are 100s of possibilities.

And how wouldn't a tolerance help? The autocolour returns the colour 8554636, then when you use RadialWalkTolerance, it puts the tolerance on that colour.

MylesMadness

2010-06-28 22:05:21

9014929 is the real road color.

And wouldn't a tolerance not work if the color without tolerance is on the minimap?

noidea

2010-06-28 22:08:03

From: MylesMadness
9014929 is the real road color.

And wouldn't a tolerance not work if the color without tolerance is on the minimap?


There is no real road colour… The roads are multiple colours.

MylesMadness

2010-06-28 22:11:11

By real I meant actual at the time.

Coh3n

2010-06-28 22:12:01

From: MylesMadness
9014929 is the real road color.

And wouldn't a tolerance not work if the color without tolerance is on the minimap?

What noidea said, and no, if a colour is on the minimap, adding a tolerance on it would still work…

The thing about autocolouring is that it may find a certain colour (without tolerance) on the minimap, but it may not be in the specific location you're looking for, that's why you should always use a tolerance.

E: @Myles: There is a lot more than one colour at one time. Just pick a different spot on the road and chances are it won't be the same as one ~5 pixels away.

MylesMadness

2010-06-28 23:29:45

I'll screenshot it tommorow, it's not finding a color on the road. And isn't the point of autocolor to not tolerance

noidea

2010-06-29 00:04:55

From: MylesMadness
I'll screenshot it tommorow, it's not finding a color on the road. And isn't the point of autocolor to not tolerance


That simply is not possible any more with many of the roads with runetek5.
There was debate about returning an int array for auto colouring, but it looks like that was thrown away.

Nava2

2010-06-29 10:19:16

noidea, thats what we do now xD

Check out the new AutoColor.scar, Coh3n and I rewrote it to use a massive int array of colours, it will then find the best colour.

MylesMadness

2010-06-29 11:10:11

And thats with 10 tolerance.

i luffs yeww

2010-06-29 16:09:19

^ Hmm.. That does seem to be a problem.. :p Try it with 15-20 tolerance?

ReadySteadyGo

2010-06-29 18:42:52

Why is


program new;
{$i SRL/SRL.scar}
var
x, y: Integer;

begin
SetupSRL;
ActivateClient;
Wait(RandomRange(200, 500));
x:=MMCX;
y:=MMCY;
FindColorSpiralTolerance(x, y, AutoColor(srl_RockColor), MMX1, MMY1, MMX2, MMY2, 0);
MMouse(x, y, 0, 0);
end.

It returns
** Warning in LoadAutoColor: Function Successful: Found Color = 3625809 **
Which is the white dot of my player.

Autocolor seriously needs changing.

Coh3n

2010-06-29 19:33:01

From: MylesMadness
And thats with 10 tolerance.

That image of the minimap looks very simple. It looks like the minimap before the RunTek5 update. It actually looks like the road is a constant colour. Either way, it looks like I didn't pick all the colours for the Varrock road. Read the last point in the first post of this thread.

From: ReadySteadyGo

** Warning in LoadAutoColor: Function Successful: Found Color = 3625809 **
Which is the white dot of my player.

Autocolor seriously needs changing.

I'm almost positive that the square white dot (your player) in the middle of the minimap is a constant colour (16777215, which is white).

Autocolor doesn't need changing, it was just rewritten and it's never failed for me. The only thing that should never need updating are the colours in the initial arrays, which wouldn't surprise me as Jagex changes around colours all the time.

ReadySteadyGo

2010-06-29 19:38:26

You're right about the white dot, sorry I thought I could input scar colour into the colour picker history. It just isn't finding the rock color though Coh3n no matter what tolerances I've tried.

Nava2

2010-06-30 03:08:27

SRL's autocolour use TAutoColorRecords which no one seems to grasp! Use the tolerances that the autocolour finds. As well, you need to setup your CTS speed vars to be correct.

Perhaps there needs to be more documentation on this, but the system that I developed ensures the uttmost accuracy in autocolouring. Please, check out how the new Autocolor should be used. The tutorials of old are NOT current and colours can't be used the same way.

Coh3n

2010-06-30 05:45:03

From: ReadySteadyGo
You're right about the white dot, sorry I thought I could input scar colour into the colour picker history. It just isn't finding the rock color though Coh3n no matter what tolerances I've tried.

What Nava said, and what I said above. I thought I had picked all the colours, but I easily could have missed some. Try opening some ACA files and seeing if the colours on your minimap are in the array. If not, add them and post the new list. :)

E: Have you tried RadialWalkAutoColour? Because it uses the proper tolerances and CTS. If that works, then you just aren't using it properly. >.<

noidea

2010-06-30 11:41:37

From: Coh3n
E: Have you tried RadialWalkAutoColour? Because it uses the proper tolerances and CTS. If that works, then you just aren't using it properly. >.<


Just a heads up, RadialWalkAutoColor isnt at the top of MapWalk.scar along with all the other functions. When I first looked I didnt think it was in there, so I had to ctrl F and find it.

ReadySteadyGo

2010-06-30 12:25:06

From: Coh3n
What Nava said, and what I said above. I thought I had picked all the colours, but I easily could have missed some. Try opening some ACA files and seeing if the colours on your minimap are in the array. If not, add them and post the new list. :)

E: Have you tried RadialWalkAutoColour? Because it uses the proper tolerances and CTS. If that works, then you just aren't using it properly. >.<



Ok, this is the rock I'm looking for. I've checked the ACA files (srl_RockColor and srl_MineRockColor) and picked over 10 new colours. None of them have matched up with the entries already there. RadialWalkAutoColor isn't working for me so it's not something I'm doing wrong. Is this a different kind of rock or something? It's at an altar… If not I will make a new ACA file, because it seems like there is a hell of a lot more than what's in there.

Coh3n

2010-06-30 17:59:57

From: ReadySteadyGo

Ok, this is the rock I'm looking for. I've checked the ACA files (srl_RockColor and srl_MineRockColor) and picked over 10 new colours. None of them have matched up with the entries already there. RadialWalkAutoColor isn't working for me so it's not something I'm doing wrong. Is this a different kind of rock or something? It's at an altar… If not I will make a new ACA file, because it seems like there is a hell of a lot more than what's in there.

You're probably right. I'm sure there are a lot of colours I missed (I can only do so much :p). Please make a new file. Oh, and be sure to delete the duplicates. ;)

MylesMadness

2010-06-30 19:58:18

RadialWalkAutoColour didn't work at all, So we(ReadySteady made the GetMode function, took him a ton of time to get that working and fast) just made a working autocolor function:
function GetMode(Arr: TIntegerArray): Integer;
var
i, count, tCount, r: Integer;
begin
QuickSort(Arr);
for i := 1 to High(Arr) do
if Arr[i] = Arr[i - 1] then
begin
tCount := tCount + 1;
if i = High(Arr) then
if Count < tCount then
begin
r := i - 1;
end;
end else
begin
if Count < tCount then
begin
r := i - 1;
Count := tCount;
end;
tCount := 0;
end;
Result := Arr[r]
end;

Function AutoColorRight(Which:Integer):Integer;
var
color:Integer;
Colors:TIntegerArray;
TPA:TPointArray;
begin
Color:=AutoColor(which);
FindColorsTolerance(TPA, Color, MMX1, MMY1, MMX2, MMY2, 15);
Colors:=GetColors(TPA);
Result:=getmode(Colors);
end;

ReadySteadyGo

2010-06-30 22:06:44

From: MylesMadness
RadialWalkAutoColour didn't work at all, So we(ReadySteady made the GetMode function, took him a ton of time to get that working and fast) just made a working autocolor function:
function GetMode(Arr: TIntegerArray): Integer;
var
i, count, tCount, r: Integer;
begin
QuickSort(Arr);
for i := 1 to High(Arr) do
if Arr[i] = Arr[i - 1] then
begin
tCount := tCount + 1;
if i = High(Arr) then
if Count < tCount then
begin
r := i - 1;
end;
end else
begin
if Count < tCount then
begin
r := i - 1;
Count := tCount;
end;
tCount := 0;
end;
Result := Arr[r]
end;

Function AutoColorRight(Which:Integer):Integer;
var
color:Integer;
Colors:TIntegerArray;
TPA:TPointArray;
begin
Color:=AutoColor(which);
FindColorsTolerance(TPA, Color, MMX1, MMY1, MMX2, MMY2, 15);
Colors:=GetColors(TPA);
Result:=getmode(Colors);
end;


nah it was you're idea. :) i like it a lot.

ReadySteadyGo

2010-06-30 22:12:04

From: Coh3n
You're probably right. I'm sure there are a lot of colours I missed (I can only do so much :p). Please make a new file. Oh, and be sure to delete the duplicates. ;)


when im not drunk i'll upload tjhe aca file i made… don't want to make a mistake. sorry myles for being a dick, was by accident.

ReadySteadyGo

2010-06-30 22:15:13

myles, you had the idea that time, i helped you out. but previously, i have had the idea and you have helped me out. i shouldn't have snapped (it sounds like snapping online). it works both ways, i didn't give you the credit. I'm sorry.

edit: I just triple posted.But i've had a really bad night. I lost my driving licence a while ago so i had no id and the hot spanish barmaid wouldn't serve me, but i reckon she fancied me because she would serve me every now and again, she just liked winding me up. any way, sorry myles!

MylesMadness

2010-06-30 22:50:10

I should have you gave you the credit in the first place. No harm no foul

3Garrett3

2010-07-01 00:00:00

I don't even understand. He gave you credit, you gave him credit. Where is the drunken tell-off…

ReadySteadyGo

2010-07-01 04:51:41

Yeah sorry about that. Not sure why I came on SRL… I feel pretty rough this morning. I saw a guy Autofellatio last night. Was mental.

Coh3n

2010-07-01 06:07:10

I see no reason why yours would work and SRL's wouldn't. Actually, you're using SRL's AutoColor in your function…

ReadySteadyGo

2010-07-01 06:32:26

It gives you the actual colour. You don't have to use tol. It doesn't work for rocks or trees. But it's very useful for roads.

Coh3n

2010-07-01 14:01:46


Function AutoColorRight(Which:Integer):Integer;
var
color:Integer;
Colors:TIntegerArray;
TPA:TPointArray;
begin
Color:=AutoColor(which);
FindColorsTolerance(TPA, Color, MMX1, MMY1, MMX2, MMY2, 15);
Colors:=GetColors(TPA);
Result:=getmode(Colors);
end;
Last time I checked, FindColorsTolerance uses tolerance, and what's GetMode suppose to do?

I'll try to explain things a little better for you. No matter what kind of autocolouring you use, it's going to tell you whether or not you've found a colour on the minimap. Just because it's found, doesn't mean it was found in the exact spot you want.

Also, by calling that function "AutoColorRight" are you insinuating that we did it wrong?

ReadySteadyGo

2010-07-01 14:56:08

It uses the same autocolor but returns the actual colour of the road when using tolerance. It's not actually changing anything you've already done. I think it's useful because when using radial walk if it finds a colour within the tolerance before it gets to the actual colour, it will use it.

I don't think myles was trying to undermine 'AutoColour' by calling it that. Say if I wanted open bank procedure with an extra feature, I might use the name FindBankBoothRight. There was no insult aimed with the naming of that function.

Coh3n

2010-07-01 15:01:31

From: ReadySteadyGo
It uses the same autocolor but returns the actual colour of the road when using tolerance. It's not actually changing anything you've already done. I think it's useful because when using radial walk if it finds a colour within the tolerance before it gets to the actual colour, it will use it.

You're using it the way it was meant to be used. ;) I'm not sure why RadialWalkAutoColor/RadialWalkTolerance wasn't working for you, but I've had no problems with it since this has been written.

From: ReadySteadyGo

I don't think myles was trying to undermine 'AutoColour' by calling it that. Say if I wanted open bank procedure with an extra feature, I might use the name FindBankBoothRight. There was no insult aimed with the naming of that function.

Lol I didn't think so, I was just wondering. :p

Kasi

2010-07-01 15:20:47

lol i hope you aint making a air crafter cus i just got the walking sorted for mine and yer the autocolor's off but it works with tol as 20

Coh3n

2010-07-01 16:18:51

From: pur3b100d
lol i hope you aint making a air crafter cus i just got the walking sorted for mine and yer the autocolor's off but it works with tol as 20

Hmm when I picked all the colours for Varrock road, I didn't travel to every corner of the city, so maybe there was a whole series of colours I missed. That would probably explain why the tolerance needs to be so high.

Nava2

2010-07-01 17:13:38

No one appears to be using it right!

Use the darn TAutoColor and use the freaking tolerances!

MylesMadness

2010-07-01 17:29:14

From: Nava2
No one appears to be using it right!

Use the darn TAutoColor and use the freaking tolerances!
RadialWalkAutoColor isn't using it right then.

Also, SRL's autocolor without tol:
Yep, no colors

My add-on to SRL's autocolor without tol:

Sabzi

2010-07-01 18:45:39

I was really curious about this so I quickly made this:
program new;
{$i srl/srl.scar}
{$i srl/srl/misc/debug.scar}

procedure Test;
var
TPA: TPointArray;
TACI: TAutoColorInfo;
x, y: Integer;

begin
TACI := AutoColorEx(srl_VarrockRoadColor);
x := MMCX;
y := MMCY;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(TACI.HueMod, TACI.SatMod);
FindColorsSpiralTolerance(x, y, TPA, TACI.Color, MMX1, MMY1, MMX2, MMY2, TACI.LumTol);
DebugTPA(TPA, '');
end;

begin
SetupSRL;
ActivateClient;
Test;
FreeSRL;
end.

Not sure if I'm using it right or not but it gave nice results(a bit too much tho).

Until I tried it with rock. It highlighted everything. When I used a lower tolerance it highlighted everything, except the rock :S. And the color wasn't even near the actual rock color.

Display mode is safe mode, right? And how should we exactly use the new AutoColoring? (I have read the Newly Added thread)

Coh3n

2010-07-01 23:24:11

From: MylesMadness
RadialWalkAutoColor isn't using it right then.

Also, SRL's autocolor without tol:
Yep, no colors

My add-on to SRL's autocolor without tol:

You are using a tolerance though. You're using a tolerance of 15 to get the points of the colour found from SRL's autocolor function.

From: Sabzi
I was really curious about this so I quickly made this:
program new;
{$i srl/srl.scar}
{$i srl/srl/misc/debug.scar}

procedure Test;
var
TPA: TPointArray;
TACI: TAutoColorInfo;
x, y: Integer;

begin
TACI := AutoColorEx(srl_VarrockRoadColor);
x := MMCX;
y := MMCY;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(TACI.HueMod, TACI.SatMod);
FindColorsSpiralTolerance(x, y, TPA, TACI.Color, MMX1, MMY1, MMX2, MMY2, TACI.LumTol);
DebugTPA(TPA, '');
end;

begin
SetupSRL;
ActivateClient;
Test;
FreeSRL;
end.

Not sure if I'm using it right or not but it gave nice results(a bit too much tho).

Until I tried it with rock. It highlighted everything. When I used a lower tolerance it highlighted everything, except the rock :S. And the color wasn't even near the actual rock color.

Display mode is safe mode, right? And how should we exactly use the new AutoColoring? (I have read the Newly Added thread)

I noticed that a few days after I initially released the new system. I have absolutely no idea what would cause it to highlight the whole minimap, and I haven't had the time to check. It doesn't make much sense because when you open all the rock colours in ACA, it highlights just the rocks. When I originally tested these, the rock colour was working perfect. I also tested it south of Lumbridge (although that shouldn't make a difference).

Oh, and yeah you're using it right. That's actually one of the ways I tested everything. :)

Nava2

2010-07-02 03:06:42

Abzi, you are the first I've seen to use the system to it's full capability :)

Also, the Rick colour iirc, is really really dynamic and rather than being related to a colour the colours are all related to each other in their own ways.

Sabzi

2010-07-02 05:43:55

From: Nava2
Also, the Rick colour iirc, is really really dynamic and rather than being related to a colour the colours are all related to each other in their own ways.


Yeah, I noticed that also when I was picking colors for one of your previous attempt to update the autocolors. Or it was something else, I don't remember :p.
It's sometimes blue, sometimes green, stupig Jagex … they can't stop us with this.

Blumblebee

2010-07-02 14:17:19

From: Sabzi
Yeah, I noticed that also when I was picking colors for one of your previous attempt to update the autocolors. Or it was something else, I don't remember :p.
It's sometimes blue, sometimes green, stupig Jagex … they can't stop us with this.


There isn't really that big of a reason to autocolor a rock though (although I found that FindRockColor() actually still works in most cases). A simple FindColorSpiral with tolerance works just fine too. I have a weird way of autocoloring that hasn't failed me yet, it simply just looks for the closest matching color on the screen to the color given (which is relatively easy to make to be honest). If you want it or you want to base something better off it let me know.

Sabzi

2010-07-02 14:34:00

I was only testing the new system.
But in the future I will remember your offer if I will need it ;).

Blumblebee

2010-07-02 14:36:19

From: Sabzi
I was only testing the new system.
But in the future I will remember your offer if I will need it ;).


oooh lol thought you were the one complaining (gotta love reading threads…). Haha well my bad :p

Coh3n

2010-07-02 15:12:17

From: Sabzi
I was only testing the new system.
But in the future I will remember your offer if I will need it ;).

It's also in MSI (Blumblebee, I'm just assuming it's the same system).