SRL Archive - OSR Help

Object Colors changing?


aaron126

2013-05-22 14:58:03

(I made this thread in Old School->Help and support as well, cause I'm not entirely sure where this should go)

So.. my script iFalconry….
hunts kebbit.

lets say I set the kebbit color to 10. and it works flawlessly.

Now lets say I exit smart and simba, restart everything. (also means i logged out)

script is the same as it was before, but now, for some reason, it's not detecting the kebbit with the exact same color used before.


Can anyone explain this? Does Runescape change the colors of objects/creatures over time or something? If so, how do you compensate for this?

I've had to make an automated procedure to determine the tolerance of the creature every time the script starts…. But this has unfortunate side effects, like thinking trees are kebbit.

Janilabo

2013-05-22 15:29:51

Ello @aaron126!

Solution is CTS2.
AutoColorAid Remake (by @CynicRus)
AutoColorAid v2 (by @nielsie95 & @Sumilion)
Scripting Tutorial #3: Using Auto Color Aid (ACA) (video tutorial @YouTube by @YoHoJo)
Using Simple CTS2/TPA's (tutorial by @Footy)
Warrior's Tutorial (great tutorial website by @x[Warrior]x3500)
Custom Banking: Explained (tutorial by @NKN)
Tutorial - How to find Moving NPC/Monster (tutorial by @Nemesis3X)

Here is something you could do to wrestle with this problem (this is actually something I did for MSSL's Bank Booth detection in RuneScape 2007):
1. Hop to NEXT world X*
2. Take a screenshot (Prt Sc)
3. Paste the image to your image editing software (Paint for example)
4. Save it to some folder as 24-bit bitmap, name it something like "img_ID.bmp"** (name the folder with your object OR something that you'll remember, that the images are for particular object data)
5. Logout and reload RuneScape applet - NOTE: It is important you'll RELOAD! Because the colors change during reloading. This is why I recommend you use webbrowser for data collecting (image saving)
6. Repeat those steps through every world!
7. Now, you need to go through every image with ACA, making sure you get your CTS2 to match each one of em. ***
If ACA doesn't match with object in the image, then pick those colors from that particular image and continue. ;)
You'll need to pick the colors from first image before you start the matching process with the next upcoming images, obvious…

* X = the next world in World Selection list
** ID = number of the image
*** A little tip: You could cut those objects from the images to a single image, which makes the color matching a lot quicker for you - then you can just pick color and click the *Mark best color*. :) Without going through 1-by-1
(Make sure the image is visible for ACA on-screen when you hit F5 in ACA)

NOTE: You could pick those colors from runtime (while server hopping and reloading), but the bad doing thing is that, if you get your CTS2 to detect too much stuff, then you'll need to start colorpicking again… This is where the images will be really useful, because you don't need to do all that reloading again.

Sorry about messy post. :p

I attached you Banking.zip that contains images of bank booths and deposit boxes (collected from several banks), which I used for color matching using ACA.
Maybe you'll get the main idea when you take a look at em.

Regards,
-Jani

aaron126

2013-05-22 15:54:39

From: Janilabo
Ello @aaron126!

Here is something you could do to wrestle with this problem (this is actually something I did for MSSL's Bank Booth detection in RuneScape 2007):
1. Hop to NEXT world X*
2. Take a screenshot (Prt Sc)
3. Paste the image to your image editing software (Paint for example)
4. Save it to some folder as 24-bit bitmap, name it something like "img_ID.bmp"** (name the folder with your object OR something that you'll remember, that the images are for particular object data)
5. Logout and reload RuneScape applet - NOTE: It is important you'll RELOAD! Because the colors change during reloading. This is why I recommend you use webbrowser for data collecting (image saving)
6. Repeat those steps through every world!
7. Now, you need to go through every image with ACA, making sure you get your CTS2 to match each one of em. ***
If ACA doesn't match with object in the image, then pick those colors from that particular image and continue. ;)
You'll need to pick the colors from first image before you start the matching process with the next upcoming images, obvious…

* X = the next world in World Selection list
** ID = number of the image
*** A little tip: You could cut those objects from the images to a single image, which makes the color matching a lot quicker for you - then you can just pick color and click the *Mark best color*. :) Without going through 1-by-1
(Make sure the image is visible for ACA on-screen when you hit F5 in ACA)

NOTE: You could pick those colors from runtime (while server hopping and reloading), but the bad doing thing is that, if you get your CTS2 to detect too much stuff, then you'll need to start colorpicking again… This is where the images will be really useful, because you don't need to do all that reloading again.

Sorry about the messy post. :p

-Jani


unfortunately for creatures, I don't think bitmaps would work. as the creature could be facing a different way than the camera when the bitmap was made, and throw the bitmap off completely, wouldn't it?
Also, this seems like a LOT of work that I'd need to go through, for such a little result.
But thanks for confirming my suspicions of colors changing ^.^

I may rewrite the Color Tolerance procedure in my script to determine the color itself instead of tolerance…
one more question, color tolerance. I assume it works the same as it sounds, the tolerance (positive or negative) that the bot will recognize a certain color.

So if I have a tolerance of 1… is that a positive or negative color difference of 1000?

ex: if my color is 300000, and tolerance is 1, bot will look for colors between 299000 and 301000?

Janilabo

2013-05-22 16:01:18

From: aaron126
unfortunately for creatures, I don't think bitmaps would work. as the creature could be facing a different way than the camera when the bitmap was made, and throw the bitmap off completely, wouldn't it?
Also, this seems like a LOT of work that I'd need to go through, for such a little result.
But thanks for confirming my suspicions of colors changing ^.^

I may rewrite the Color Tolerance procedure in my script to determine the color itself instead of tolerance…
one more question, color tolerance. I assume it works the same as it sounds, the tolerance (positive or negative) that the bot will recognize a certain color.

So if I have a tolerance of 1… is that a positive or negative color difference of 1000?

ex: if my color is 300000, and tolerance is 1, bot will look for colors between 299000 and 301000?
No, no, no.. I am not talking about using bitmaps for objects, I am talking about using color finding with CTS2 (including TPA's?). So, this is something you should take a look at..
I am updating my post and adding some more stuff for it, check out those links I added in. :)
(You are correct about bitmaps not working for mainscreen objects, thats true)

But yeah, if you'll learn to use CTS2 and TPA's (TPointArray's), you can easily beat this problem.

aaron126

2013-05-22 16:29:25

From: Janilabo
No, no, no.. I am not talking about using bitmaps for objects, I am talking about using color finding with CTS2 (including TPA's?). So, this is something you should take a look at..
I am updating my post and adding some more stuff for it, check out those links I added in. :)
(You are correct about bitmaps not working for mainscreen objects, thats true)

But yeah, if you'll learn to use CTS2 and TPA's (TPointArray's), you can easily beat this problem.


aaah. alright, thanks.
p.s thats a lot of banks, lol.

Janilabo

2013-05-22 16:33:49

From: aaron126
aaah. alright, thanks.
p.s thats a lot of banks, lol.
No problem. ..and LOL yeah there's a "few"! :p
I wanted to make sure I can detect bank booth's correctly in every world - without having to pick more colors every now and then (the CTS2's I am using in MSSL still work for every bank in any world).

By the way, take a look at my post again, because I updated it a little more.
Included some tutorial's, that you might find useful. :)

-Jani