SRL Archive - Help and Support

Colors for mining rocks.


R0b0t1

2007-08-14 20:11:49

If anyone could get me these out of the game, I would be seriously gracious.

I'm making one of my scripts that will never work anyway (I hope), so I kinda need someone to get these for me, I just don't have the time.

I'm puting it in an array of TRock (I made the "type") as shown.


Procedure SetRockColors;
begin;
Rock[0].Name:= 'tin';
Rock[0].Color:= 0;
Rock[1].Name:= 'copper';
Rock[1].Color:= 0;
Rock[2].Name:= 'iron';
Rock[2].Color:= 0;
Rock[3].Name:= 'silver';
Rock[3].Color:= 0;
Rock[4].Name:= 'coal';
Rock[4].Color:= 0;
Rock[5].Name:= 'gold';
Rock[5].Color:= 0;
Rock[6].Name:= 'mithril';
Rock[6].Color:= 0;
Rock[7].Name:= 'adamant';
Rock[7].Color:= 0;
Rock[8].Name:= 'runite';
Rock[8].Color:= 0;
end;

I need all of those rocks, so pl0x help!

Payment: You get your name put in my script :D



Also: Should I keep on coding for it, or should I wait till SRL 4 is done?

Sp0rky

2007-08-14 20:17:06

Keep coding for it, then update if seen fit when srl 4 is released.


CopperColor := 4286610;
TinColor := 9277080;
ClayColor : = 4553880;
IronColor := 2370383;
SilverColor := 12434885;
CoalColor := 2834753;
GoldColor := 1881051;
MithrilColor := 7359564;
AdamantColor := 6322272;
RuniteColor := 8681306;

From wizzups power miner. No credit to me.

R0b0t1

2007-08-14 21:06:34

Ok… I wonder how current those are… =\ Well, I put a report bug in there for something…




If you're wondering at the possible waste of memory from creating another type, etc., I think I make up for it on my other mining management procedures.

Sp0rky

2007-08-14 21:14:50

I'm pretty sure they're very current.

rkroxpunk

2007-08-14 21:24:29

bmp autocolor ftw :D

R0b0t1

2007-08-14 21:49:47

No, I would rather DTM autocolor…


But I don't want to do that. To hard… Well, not really hard, but I think it would be almost impossible for non-inventory items.

Boreas

2007-08-14 23:46:19

Use my bitmap function in Nielsie's ACA. Get a few pics of each rock, black (0 in paint) out parts you want to ignore, and select them in ACA. It will tell you a good color and tol to use.

Edit: I think it's in public Snippets.

R0b0t1

2007-08-15 18:32:07

*gasp* My thread attracted a post by Boreas!


Now I must do what he says….



EDIT: Thats a lot of pictures…

Boreas

2007-08-15 23:41:26

Eh, 3 worlds for each rock, 2 angles each, makes 6 pics per rock, 9 rocks makes 54 pics. That should be more than enough.

Wizzup?

2007-08-16 04:51:41

From: Boreas
Eh, 3 worlds for each rock, 2 angles each, makes 6 pics per rock, 9 rocks makes 54 pics. That should be more than enough.

Should this work?

Function BetterColor(Colors: TIntegerArray): Integer;

Var
I: Integer;
H, S, L: Array Of Extended;
bH, bS, bL: Extended;

Begin
SetLength(H, Length(Colors);
SetLength(S, Length(Colors);
SetLength(L, Length(Colors);
For I := 0 To Length(Colors) - 1 Do
Begin
ColorToHSL(Colors[I], H[I], S[I], L[I]);
bH := bH + H[I];
bS := bS + S[I];
bL := bL + L[I];
End;
If Length(Colors) < 0 Then
Begin
bH := bH Div Length(Colors);
bS := bS Div Length(Colors);
bL := bL Div Length(Colors);
End;
Result := HSLToColor(bH, bS, bL);
End;

Killerdou

2007-08-16 05:06:21

it wouldnt, the arrays dont have a length assigned and i isnt an array so how can you get the length?

The Claw

2007-08-16 06:32:23

From: iloveit8
it wouldnt, the arrays dont have a length assigned and i isnt an array so how can you get the length?


what?

SetLength(H, Length(Colors);
SetLength(S, Length(Colors);
SetLength(L, Length(Colors);

it sets the array length from the TIntegerArray the user specifies, when using the Function

Killerdou

2007-08-16 06:39:31

note the time between the last edit and my post lol and it still says to length(i) but i s an integer;)

Wizzup?

2007-08-16 08:09:02

No it doesn't. :p

Santa_Clause

2007-08-16 08:13:53

Whoa?!! Did Wizzup just ask if something in SCAR would work?! Holy crap, the world's going to end soon.

Seriously Wizzup, were you just being modest or did you not know if it would work or not?

Killerdou

2007-08-16 08:26:00

i think it is more like, is this something that would be usefull for you…

Wizzup?

2007-08-16 08:53:36

From: SantaClause
Whoa?!! Did Wizzup just ask if something in SCAR would work?! Holy crap, the world's going to end soon.

Seriously Wizzup, were you just being modest or did you not know if it would work or not?


No, I wasn't sure if this would work (not by pascal code, but the way colors work)

Killerdou

2007-08-16 09:04:13

well hue is kinda like a circle (both halves are equel) so colors are slowly changing into each other in an non ending circle so im not sure if the hue part would work, but saturation and lumance should

Boreas

2007-08-16 10:32:03

Wizz that would prolly work if you picked a bunch of colors, but what I'm talking about is taking a bunch of pics, and finding a common color/tol.

Hugolord

2007-08-16 10:39:36

so whats the best way ?
cz i also need to autocolor these rocks but meh if Fakawi can't autocolor em then neither can i =S…

Killerdou

2007-08-16 10:45:02

you might want to use findcolorsspiraltolerance and then somehow find a way to tell apart different rocks;) then find the middle

Boreas

2007-08-16 10:48:22

You can use a modified SplitTPA by me or ATPAtoTPA I think by Wizz.

Killerdou

2007-08-16 10:49:40

use my findgroups, its better suited for the job, but you are better of making one yourself:)

R0b0t1

2007-08-16 15:12:49

Yeah, mind if I use that piece of code Wizzup?? I think I could use it in my miner.

Thanks for all the input, but I sadly don't think I want to edit 54 pictures. :p. I might try to uhh… Hmm… I don't know. But I might make an array of 5-10 different colors for each rock and put it through that function.

Wizzup?

2007-08-16 16:26:09

From: r0b0t1
Yeah, mind if I use that piece of code Wizzup?? I think I could use it in my miner.

Thanks for all the input, but I sadly don't think I want to edit 54 pictures. :p. I might try to uhh… Hmm… I don't know. But I might make an array of 5-10 different colors for each rock and put it through that function.


Sure, thats why I wrote it.
It basically puts out the most 'middle' color, so it won't find other colors fast.
It's mainly made for MainScreen autocoloring though.
If you want to autcolor the MM just use Nielsie's ACA. :)

R0b0t1

2007-08-16 16:52:09

Yep, I wanted to use this for finding the rock to mine, and this is how I would do it.

  1. Make an array of 5-6 different colors of the rock
  2. Take those arrays, and put them through your function. Make my gloabal variable for the rockcolor the result of the function
  3. When my script starts looking for a rock, it will use that color.
  4. If it does not find the rocks "middle" color, it will start a loop going through the 5-6 colors of the array
  5. Hopefully it find it by then


That sounds like a very basic way compared to what FindRoadColor and FindWaterColor does though. Never quite under stood those :p.

Wizzup?

2007-08-17 04:21:07

From: r0b0t1
Yep, I wanted to use this for finding the rock to mine, and this is how I would do it.

  1. Make an array of 5-6 different colors of the rock
  2. Take those arrays, and put them through your function. Make my gloabal variable for the rockcolor the result of the function
  3. When my script starts looking for a rock, it will use that color.
  4. If it does not find the rocks "middle" color, it will start a loop going through the 5-6 colors of the array
  5. Hopefully it find it by then


That sounds like a very basic way compared to what FindRoadColor and FindWaterColor does though. Never quite under stood those :p.


Meh the autocolor.scar is 1 template, it rarely works for me though. =\

R0b0t1

2007-08-17 13:28:31

Probably some errors calibrating the whostchamafuzzit that does the thggamagiet to get the right gogglemogoggle to intercept the color.


Always hated errors like that…

I'ma go make some DTM's to DTM auto color. Sounds more effective (After that error).

n3ss3s

2007-08-17 15:11:56

Wizzup pretends to be leet :p Jk/Jk :D

Im not so familiar with HSL, XYZ and what all there are, but I have poor autocoloring for net in my competition script :p Made it just for trying, not sure if works though.