Results 1 to 23 of 23

Thread: SCAR Assistant by EvilChicken!

  1. #1
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    SCAR Assistant by EvilChicken!

    SCAR Assistant
    - By EvilChicken!

    Latest version: 0.0.4b, updated 14.01. Status: Working



    Hello, fellow community members of SRL.
    This is SCAR Assistant, an application I have been working on for quite some time now.

    SCAR Assistant is a simple code generator written for use with SCAR Divi and the SRL include library. The application was mainly written for the purpose of significantly reducing the time and effort it takes to create autocoloring and object finding functions when scripting in SCAR.

    Found below is a brief intro the the application, for detailed description of it's features, scroll further down.

    It works in a very simple three-step way which is roughly explained below.

    1. Open up a image from where you want to pick your colors by pressing Ctrl + O or clicking File and then Open bitmap. The image must be a bitmap to avoid color data loss caused by image compression. Alternatively, press F5 to capture a screenshot of your desktop.

    Note: As you might notice, all screenshots and new images you open, will open in new tabs.

    2. Pick the colors you want to target by clicking at the points of the opened image containing the desired color. To ease this process, there are two small boxes in the application's top-right corner, over the listbox. They are linked together, so they look like one big rectangle. The rightmost of these squares show an enlarged 5*5 box surrounding your cursor, while the left box simply shows the color of the pixel that is positioned under your mouse cursor.

    Tip: SCAR Assistant has it's own zooming tool with the ability to zoom in from 50 to 2000% on the area surrounding your cursor. To display this tool, click Help > Zoom Assistant.
    The slider bar under the image allows you to change zoom level, and if you right-click the status bar, (located at the very bottom of Zoom Assistant's window) you get the possibility to toggle Zoom Assistant's crosshair on/off and enter a custom zoom level (in percent) if you find the slider bar bothersome to use.


    3. Pick desired function type and fill in the parameters needed for generation of the selected function. As you can see, the two functions are split up in two different tabs, Autocoloring and Object finding.

    The Autocoloring tab is for generating functions for finding a specific color in RuneScape, most commonly within the minimap boundaries. These could be dynamic roadcolors, watercolors, et cetera. If you haven't already, you might want to take a look at SRL's AutoColor.scar include, to see the functions used to find the dynamic colors on RuneScape's minimap.

    In the first group, "colorspaces", you can choose from three; RGB, HSL and XYZ. The preset values of these (the values in the editboxes) should give you a slight idea about the effectiveness range of those three, but they are of course nothing more than preset values, and are meant to be customized.

    If you aren't experienced with autocoloring in SCAR, this tutorial is brilliant to start off with before you begin making them. (Ehm, "you".. )

    Note: Autocoloring only support one color in the listbox at a time for now.

    The checkboxes next to the colorspace tolerance values simply indicate whether the corresponding colorspace will be used.

    The second group, "Result" simply changes the result of the function. If the "Return color" button is checked, the generated function will return the found color (if any) as an integer. However, if the "Click color" button is checked, the generated function will click the found color (again, if any) and result True/False depending on if the target color was found.

    Finally, the checkbox named "Spiral search?" determines where SCAR starts the search. If the checkbox is ticked, it will start from MMCX, MMCY, which are the RS minimap's center coordinates. If not checked, it will start from the top-left corner and search from there.

    If an autocoloring function is what you need, fill in the needed values, pick a template color and press the "Create Function" button. The code will be generated as an entire script ready to be ran and tested in RuneScape. If you only need the function and nothing more, simply highlight the code you want to copy, and press Ctrl + C, then paste it in SCAR. Otherwise, it might be easier to just click the debug box and press Ctrl + A followed by Ctrl + C. This will copy the entire content of the active debug box.

    However, if you need to find an object in RuneScape, you need to switch over to the "Object finding" tab. Here, the first group you'll notice is the "Object finding method" group with two options; simple "FindColor" and the more advanced "2D TPA". The main difference between these two is simply that the "2D TPA" function is better. While "FindColor" only will find the first color closest to the search starting point, the twodimensional TPointArray will search for all matching colors within the given coordinates, store the coordinates of those into an array of TPoints, split them into boxes (decided by given "Object width/height" values) and then check for uptext correspondance.

    Note: if you want to know more about object finding using almighty TPAs, you might want to check out this tutorial.

    So basically, TPointArrays for object finding would be preferred in most cases.

    Next, we have the "Uptext" and "Tolerance" boxes, which will be there no matter what object finding technique you pick. "Uptext" is the text that is shown when you hover the target object in RS, and this is the text that the GetUpText; function returns. This text is mainly used to confirm that you're about to click the correct object, as there sometimes might be a lot of different objects on the RuneScape screen that have the same colors, which might confuse SCAR.

    So, in the "UpText" box, there should be a small part of this text. The text you enter in this box should preferably be unique for the object you're searching for, and not contain capital letters. Though GetUpText works with capitals in RS, there has been reported issues. So for example if the object you're searching for, has "Take Banana" as uptext, you might want to use "anana" as uptext.

    Next thing is the "Tolerance" editbox. This basically decides the tolerance for the color search. If you have picked many unique colors for the object you want to find, you might want to use a low tolerance, maybe 5 - 10, but if you've picked few colors, raising the tolerance to 20+ would be wise. Again, this depends on whether there are a lot of other objects with similar colors on the RS mainscreen where your target object is. Use simple logics and it would work out pretty easily once you get more experienced with SCAR scripting.

    If you picked the "2D TPA" object finding method, there will also be two boxes named "Object width" and "Object height". These are used for the previously mentioned sorting of the found colors, where the TPoints containing the coordinates for the found colors get split up into groups with width and height parameters decided by these.

    Object width is how many pixels wide your object is, and object height is how many pixels high your target object is.

    Tip: if you have trouble seeing how high/wide your object is, use the Zoom Assistant to quickly find out and save time.

    ColorToleranceSpeed is .. slightly advanced stuff, if you don't know what it is, it's best to leave it at the default setting, which is 1. If you want to know more about ColorToleranceSpeed and it's modifiers, you might be interested in this nifty tutorial.

    Almost finished, but you're probably wondering what that "Use SmartColors?" checkbox does?
    Originally created by Tarajunky, SmartColors is a progressive way of finding objects. Simply explained, the function will first search for the colors you picked with 0 tolerance. These colors will be stored in a global variable array. If it finds the objects using zero tolerance, it will move the color which was used to find the object, one place ahead in the previously mentioned color array, if it isn't already in the first place if the array.

    If the search with zero tolerance is of no result, a new search, this time with given tolerance, will be executed. If it finds the object this time, it will add the color used to find the object, to previously mentioned global color array.


    .. aaand I think that's it? It's not that much, I just elaborated it beyond what was necessary. Furthermoar, you can also:

    • Add colors using decimal, RGB, HSL or XYZ color values. (Right-click the color listbox and choose "Add" option in the popupmenu.)
    • Save the created function. (Press File, then click "Save function".)
    • View Zoom Assistant. (Press Help, then select "Zoom Assistant".)
    • Toggle crosshair on/off and enter a custom zoom percentage for Zoom Assistant. (Right-click the status bar and select desired option.)
    • Take a screenshot. (Press F5 anytime while having the application activated.)
    • Add new tabs to the debug box. (Right-click the debug box and choose "Add Tab".)
    • View and print picked color`s RGB, HSL and XYZ values. (Double-click desired color in the color listbox.)



    For final words, I'd like to underline that all feedback and bug reports will be greatly appreciated. Please do tell me if I was unclear at any point, and feel fre to ask if you have questions.

    Changelog:
    14.01: Version 0.4b released, contains an RS account creator, otherwise only small visual changes. Hopefully the "Vista bug" is fixed, needs confirmation.

  2. #2
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    WOW, nice!

    I just fooled with some of the features for a bit, seems great. Nice job

    One thing - Make the default window size a bit bigger? As it is right now you have to scroll over to see the zoom thing on the top right.

  3. #3
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, it only support 1 color... You might want to add multiple colors for a more accurate search. You can do it by getting the middle color then add the highest tolerance value(comparing all the colors). Therefore, you can add HSL, RGB and XYZ tolerance. Or, you can store the colors in an array and searching for every color in 3D point array.
    Anyways, GJ


  4. #4
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    just downloaded and now testing...
    ya you need to make the default size a little bigger, cuz its got scroll bars

  5. #5
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    lmao wow you wrote alot have to read it...
    nice though

  6. #6
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    Oh, it only support 1 color... You might want to add multiple colors for a more accurate search. You can do it by getting the middle color then add the highest tolerance value(comparing all the colors). Therefore, you can add HSL, RGB and XYZ tolerance. Or, you can store the colors in an array and searching for every color in 3D point array.
    Anyways, GJ
    Thankyou, I'm planning to add support for multiple colors, I just need to get this current issue I ahve out of the way. Tell me, do you see scrollbars on the bottom of the application? (See pic below for example.)

    http://img154.imageshack.us/img154/7817/scarassistantrf8.jpg
    Using Runescapian's pic, thanks

    Quote Originally Posted by mormonman View Post
    just downloaded and now testing...
    ya you need to make the default size a little bigger, cuz its got scroll bars
    And tell me, are you by any chance also using vista?





    I would be really grateful if anybody who might know what this scrollbar-thingy is caused by, told me the cause. You see, I'm using XP and I see no scrollbars. Though, I think I messed up something with the main form's properties.

  7. #7
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    great but when ur on the zoom assistant it lags a bit this should defo be added to SRL

  8. #8
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    This is brillant for newer scripters, i was thinking of something like this but more of a script builder..
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  9. #9
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by EvilChicken! View Post
    And tell me, are you by any chance also using vista?
    yes... i know shame on me!

  10. #10
    Join Date
    Jul 2008
    Location
    England
    Posts
    763
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    isn't this like ACA?
    lol

  11. #11
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Quickmarch View Post
    isn't this like ACA?
    Yes, Yes it is

  12. #12
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Version 0.4b released, my main concern is still the "Vista bug" where the application had a scrollbar at the bottom due to disabled window resizing.

    Well, I made the application resizeable again (though it looks really ugly when enlarged/shrunk past original size) and this will hopefully fix it. Please let me know whether it did or not.

    And, also, this update contains a RS account maker. Nothing advanced at all, mainly just for the convenience.

    Enjoy

    Quote Originally Posted by ~~Joker~~ View Post
    lmao wow you wrote alot have to read it...
    nice though
    You better read it! x3
    I spent over 3-4 hours writing that in total.. '__'

  13. #13
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    EvilChicken! i love you~(not gay)

    MAKES IT SO MORE EASY~!!!!
    what's ACA?

    Edit: I ran the new one on Vista and the scrollbar was gone~

  14. #14
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    scrollbar is gone... for vista idk about others!

  15. #15
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    scrollbar is gone... for vista idk about others!
    Thank you good sir! (Assuming you meant that the previously present scrollbar that was there in the previous version, is no longer there?)
    Exactly what I needed to hear, but I would still appreciate if other users with Vista could confirm this.

    But, now my mission will be to add more features.
    Apart from multi-color support. what more should I add to this?

    Quote Originally Posted by leather cock View Post
    EvilChicken! i love you~(not gay)

    MAKES IT SO MORE EASY~!!!!
    what's ACA?
    And I love your name >:3

    .. thanks for the nice comment ^^

    ACA is an AutoColorAid, also a code generator. It's much better than this, but the thing I don't like about it is that there is no possibility for adding extra tolerance, so the functions will (atleast for me) stop functioning pretty quickly.

  16. #16
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is getting better and better..

    I still remember when you sended this to me the first time

    I noticed a thing rather quick, A way to delete the Images taken?.
    Atm, i get 10+ images after a while and i can't delete them ;/

    However, Nice work

  17. #17
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice this supports multiple colors
    I found a bug, when you load your image in the 'Autocoloring' tab and you switch to 'Object Finding' tab, you have to load the image again. And btw, the scrollbar is gone for me too.
    I looked at the output in Object Finding, and found out that even if you set CTS to 1, 2 or 3 the tolerance is the same. That would make the CTS 3 or 2 color range too high if you set the tolerance to something like 25. You could do smething like this:
    SCAR Code:
    Tolerance := Ceil(Tolerance / CTS);
    So if you set CTS to 1, the tolerance will be 15(example), in CTS 2 would be 8 and in CTS 5. You could also adapt this to avoid similar tolerances with low set tolerance, but I don't think someone will use low tolerance for object finding


  18. #18
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by N1ke! View Post
    This is getting better and better..

    I still remember when you sended this to me the first time

    I noticed a thing rather quick, A way to delete the Images taken?.
    Atm, i get 10+ images after a while and i can't delete them ;/

    However, Nice work
    That thing has always bothered you
    I don't see the point of adding it, as it would require me to do much more work than what is needed, when you simply could restart the program if it bothers you that much.

    Quote Originally Posted by Cazax View Post
    Nice this supports multiple colors
    I found a bug, when you load your image in the 'Autocoloring' tab and you switch to 'Object Finding' tab, you have to load the image again. And btw, the scrollbar is gone for me too.
    I looked at the output in Object Finding, and found out that even if you set CTS to 1, 2 or 3 the tolerance is the same. That would make the CTS 3 or 2 color range too high if you set the tolerance to something like 25. You could do smething like this:
    SCAR Code:
    Tolerance := Ceil(Tolerance / CTS);
    So if you set CTS to 1, the tolerance will be 15(example), in CTS 2 would be 8 and in CTS 5. You could also adapt this to avoid similar tolerances with low set tolerance, but I don't think someone will use low tolerance for object finding
    .. I haven't made a change to it, it has always supported picking of multiple colors, it just doesn't mix them, like ACA does. What it doesn't do, is to add the color to the listbox if you already have it there. I should maybe add this to first post, thanks for notifying me.

    I'm glad to hear that the scrollbar is gone
    But, the bug you found, isn't a bug.

    I like your tolerance idea, but the whole reason why I made SCAR Assistant in the first place, was to have a code generator with the possibility of entering custom tolerance. This both has it's good sides, and it's bad sides -- but I believe that the good sides compromises for the less great.

    Both of you, thank you for your input

  19. #19
    Join Date
    May 2007
    Location
    Sydney, Australia (Faggot Region)
    Posts
    1,465
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    This is Great for making accounts


  20. #20
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by simtoon View Post
    This is Great for making accounts
    Don't make more than 5 a day for you own benefit i luv this program.

  21. #21
    Join Date
    Jun 2009
    Location
    Hiding
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  22. #22
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by austin2162 View Post
    And whats the problem???
    I do visit every 2-6 months

  23. #23
    Join Date
    Jun 2009
    Location
    Hiding
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    it has scroll bars...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cooks Assistant
    By benjaa in forum RS3 Outdated / Broken Scripts
    Replies: 18
    Last Post: 12-10-2008, 07:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •