Page 5 of 7 FirstFirst ... 34567 LastLast
Results 101 to 125 of 162

Thread: Scar++

  1. #101
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Seroko View Post
    So does this like make a scar++ lib for C++ so you can user scar-like procs in c++? Sorry trying to understand what this is. yay for being on my phone and can't open cpp/h files
    Pretty much. This makes it so you should be able to take just about any Scar function or procedure and call it in C++ in almost the same fashion.

  2. #102
    Join Date
    May 2008
    Location
    Here :p
    Posts
    194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wtf i dnt understand any how to use it i have very limited c++ knowlage but i wanna learn it unfortunatly your instructions are not written in english i understand how to get it ive got it but how do i include it? i have Dev-Cpp (FTW) had it a while but could you please for the people who dnt know loads about c++ exsplain how to include it

  3. #103
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bazzbarrett View Post
    wtf i dnt understand any how to use it i have very limited c++ knowlage but i wanna learn it unfortunatly your instructions are not written in english i understand how to get it ive got it but how do i include it? i have Dev-Cpp (FTW) had it a while but could you please for the people who dnt know loads about c++ exsplain how to include it
    on the top of your program you should have
    #include <scar++.h>

    You can either have this, or you can copy every .h file into ../Dev-CPP/include folder and then put the libScar++.a file into the ../Dev-CPP/lib folder.

    In a new project you should go Project->Project Options->Parameters->Add Library or Object. Then find your libScar++.a file and select it.

    After that, it should make it so you can build a scar++ program. Maybe someday Ill add a devpak to the front page.

    Once you do that, make sure that Scar++.dll is in the same folder as the program you build.

  4. #104
    Join Date
    Feb 2007
    Posts
    211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    May I suggest changing your linker options from something like

    ..\..\..\..\libz.a
    to something a little more friendly such as....

    -lgdi32
    -lz
    Current Project: Catching up on what I missed, re-writing some old includes I done in the past.
    Upcoming Project: Open For Suggestions

  5. #105
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Seroko View Post
    May I suggest changing your linker options from something like
    to something a little more friendly such as....
    good point, I'm not using dev-c++ at the moment, but once I boot up a windows computer Ill be sure to make that change.

  6. #106
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    I'm pretty sure he's talking about whatever command like compiler you are using. Instead of specifying the path somewhere else, try (This would link to the X library):

    Code:
    gcc xtest.c -o xtest -lX11
    On Linux systems its usually traditional to only have one library of each, unlike Windows, where each program usually makes you get another copy.

    EDIT:

    Although, since he does specifically mention the the Windows gdi file -- I imagine that his linking command would search the project directory...
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  7. #107
    Join Date
    Feb 2007
    Posts
    211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by R0b0t1 View Post
    I'm pretty sure he's talking about whatever command like compiler you are using. Instead of specifying the path somewhere else, try (This would link to the X library):

    Code:
    gcc xtest.c -o xtest -lX11
    On Linux systems its usually traditional to only have one library of each, unlike Windows, where each program usually makes you get another copy.

    EDIT:

    Although, since he does specifically mention the the Windows gdi file -- I imagine that his linking command would search the project directory...
    I am unsure about linux systems since I have always used windows, I was being fairly specific for dev-c++ because if I remember correctly thats the compiler they have the project set up with in the svn, which you could just add that to the linker for more friendly distribution.
    Current Project: Catching up on what I missed, re-writing some old includes I done in the past.
    Upcoming Project: Open For Suggestions

  8. #108
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Stickied...



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  9. #109
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    NEWS! (nope, its not dead)

    I added FindDTMRotated and gave DTMs some better support. Soon I will be adding OCR capabilities via DTMS. Stay tuned!

  10. #110
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Been getting the emails on the changesets, good luck on speeding up color finding.


  11. #111
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Bobarkinator View Post
    Been getting the emails on the changesets, good luck on speeding up color finding.
    , Well, I already know how to do it, its just a matter of not being lazy and implementing it. I would like it to be pretty clean, but that looks almost impossible to do .

    The main slowdown is using the GetPixel call from windows. It is very slow. A faster method would be using BitBlt to copy the data over and then reading the direct pixel data. BitBlt is extremely fast in copying over pixels (depending on the speed of your video card, if you have a modern one that can play runescape, or use scar, you'll be fine)

    Using the current method, it too me 2 seconds to scan a 640x480 area. Thats way too slow, and most of that time was spent in the "FindColorsTolerance" function.

    But, on the bright side, once this is implemented that lag should pretty much disappear.

  12. #112
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by boberman View Post
    , Well, I already know how to do it, its just a matter of not being lazy and implementing it. I would like it to be pretty clean, but that looks almost impossible to do .

    The main slowdown is using the GetPixel call from windows. It is very slow. A faster method would be using BitBlt to copy the data over and then reading the direct pixel data. BitBlt is extremely fast in copying over pixels (depending on the speed of your video card, if you have a modern one that can play runescape, or use scar, you'll be fine)

    Using the current method, it too me 2 seconds to scan a 640x480 area. Thats way too slow, and most of that time was spent in the "FindColorsTolerance" function.

    But, on the bright side, once this is implemented that lag should pretty much disappear.
    GetPixel is indeed, way too slow. Are you planning to keep scar++ cross platform? Cause you'd need to use WINE if you want to use BitBlt...



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  13. #113
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    GetPixel is indeed, way too slow. Are you planning to keep scar++ cross platform? Cause you'd need to use WINE if you want to use BitBlt...
    My intentions where eventually to make it cross platform. Since its inception it hasn't been cross platform. It runs under wine as is, (im developing under linux). It is more important to me to have it working well on windows and then worry about linux. There just isn't enough linux demand to program it so that it is cross platform from the beginning.

    *edit* as a small note, I sped up Color finding by a LARGE amount. As a result, DTMs operate at a usable speed now

    *Edit 2* DTM color finding is now as fast as SCAR (it is slightly slower when a color match is on the screen, however, it is MUCH faster if no match is found on screen). Color finding in general is faster then scar.

    *Edit 3* Big News! Scar++ can now be compiled natively on linux! I'm sure you're pleased. First, get Scar++, then cp Makefile.linux to Makefile. Then type in "make clean && make && sudo make install" And viola! You have scar++ on your nice linux machine!

  14. #114
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i need a lil help ok i downloaded allt he files through tortoise SVN then i goto the folder and i have a bunch of files what do i do ith em??

    also if i open the Scar++ pack thing i get this error



    then i press ok and this opens



    any help muchl appreciated please

  15. #115
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Scaper View Post
    i need a lil help ok i downloaded allt he files through tortoise SVN then i goto the folder and i have a bunch of files what do i do ith em??

    also if i open the Scar++ pack thing i get this error



    then i press ok and this opens



    any help muchl appreciated please
    Ok, I don't have much along an installer going yet, and the pac doesn't work all that great. To manually install scar++, put all the .h files into a folder named scar++ in your include folder. Then put libScar++.a into your lib folder. After that, place the scar++ dll in the folder that contains the project you will be working on.

    The scar++ dll that is in the file has zlib built into it, so there is no worries about having to find that. If you want to compile scar++ on your own, you will have to get zlib installed on your machine (sometimes a pain).

    When you are compiling projects based on scar++, make sure you have the scar++ in your linker.

  16. #116
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    This seems awesome boberman. If I ever get my Dec-C++ Compiler to stop giving me errors on Hello World apps, I will definitely give this a try!
    DFM Form Parser - SCAR Obfuscator - Master Keylogger - RuneScape Stats Grabber - Index Cards

  17. #117
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    I am taking a Intro to C++ programming class right now this semester. The teacher is great so I am sure I will learn a lot. Already got cout and cin working for me, haha.

    I am hoping by the end of the semester I will be able to help you out with it. If I don't learn enough to help this project I am hoping that I will have enough understanding to help me learn more on via internet more easily.

    Take a look at the course schedule and lecture let me know if you think it covers a decent amount or gives a good basis.

    http://staffwww.fullcoll.edu/brippe/.../lectures.aspx

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  18. #118
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by HyperSecret View Post
    I am taking a Intro to C++ programming class right now this semester. The teacher is great so I am sure I will learn a lot. Already got cout and cin working for me, haha.

    I am hoping by the end of the semester I will be able to help you out with it. If I don't learn enough to help this project I am hoping that I will have enough understanding to help me learn more on via internet more easily.

    Take a look at the course schedule and lecture let me know if you think it covers a decent amount or gives a good basis.

    http://staffwww.fullcoll.edu/brippe/.../lectures.aspx
    While it covers the needed subjects, it kind of crams a lot of stuff in, but looks complete at least for the basics (how well it is taught is another matter).

    If you would like to help, I would suggest searching through the windows API in MSDN and also the XLib manual. Once you feel you can understand the functions there, you would be a great asset.

    Go ahead and take a look at Scar++ and maybe even scar, if you see a function in scar that you want to implement, and think you can implement, by all means do it and post the results here. I will be more then happy to add any additions.

  19. #119
    Join Date
    Jun 2007
    Posts
    246
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Does scar++ support reflectioN? If it doesnt will it eveR? Maybe i could help if it doesn'T.

  20. #120
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    it would be easily possible to make scar++ load smart.dll and run it.
    Join the Official SRL IRC channel. Learn how to Here.

  21. #121
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Yakman View Post
    it would be easily possible to make scar++ load smart.dll and run it.
    Yep, the plugin capabilities are there, One would just have to load the file (the easy part) and define the plugins correctly (the hard part). But, it should be able to load all Scar plugins theoretically.

  22. #122
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Yakman View Post
    it would be easily possible to make scar++ load smart.dll and run it.
    When scar++ was just starting out, Ben did it and I think I still have the code somewhere.


  23. #123
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Bobarkinator View Post
    When scar++ was just starting out, Ben did it and I think I still have the code somewhere.
    It's already in. Checkout the plugin.cpp file. Not exactly like ben did it, but the concept is the same.

  24. #124
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Code:
    #include "Plugins.h"
    #include <iostream>
    
    using namespace std;
    
    typedef long (*GetFunctionInfo)(int index, void** address, char** def) __attribute__((stdcall));
    typedef long (*GetFunctionCount)() __attribute__((stdcall));
    
    void lower(char* str) {
        while (*str != 0) {
            *str = (char) tolower(*str);
            *str++;
        }
    }
    
    PluginLoader::PluginLoader(const char* pluginDir) {
        cout << "Loading plugins from " << pluginDir << "\n";
        int dirlen = strlen(pluginDir);
        char search[MAX_PATH];
        char temp[MAX_PATH];
        strcpy(search, pluginDir);
        strcat(search, "/*.dll");
        HANDLE find;
        WIN32_FIND_DATA file;
        find = FindFirstFile(search, &file);
        if (find != INVALID_HANDLE_VALUE) {
            do {
                strcpy(temp, pluginDir);
                strcat(temp, "/");
                strcat(temp, file.cFileName);
                cout << "Loading " << file.cFileName << "\n";
                HINSTANCE inst = LoadLibrary(temp);
                if (inst) {
                    handles.push_back(inst);
                    GetFunctionCount count = (GetFunctionCount)GetProcAddress(inst,"GetFunctionCount");
                    GetFunctionInfo info = (GetFunctionInfo)GetProcAddress(inst,"GetFunctionInfo");
                    if (count != 0 && info != 0) {
                        long functions = count();
                        for (int i = 0; i < functions; i++) {
                            try {
                                void* address;
                                char* def = (char*)malloc(512);
                                if (info(i,&address,&def) == -1) break;
                                char* ref = def; 
                                lower(def);
                                while (*def == ' ') def++;
                                while (*def != ' ') def++;
                                while (*def == ' ') def++;
                                char* start = def;
                                while ((*def != ' ') && (*def != '(') && (*def != ':') && (*def != ';')) def++;
                                *def = 0;
                                char* name = (char*)malloc(def - start + 1);
                                strcpy(name, start);
                                addrs[name] = address;
                                cout << "\t" << name << "\n";
                                free(ref);
                            } catch (...) {
                                cout << "Error loading function index " << i << " from " << file.cFileName << "\n";
                            }
                        }
                    }
                }
            } while (FindNextFile(find, &file));
            cout << "Done loading plugins!\n";
            FindClose(find);
        } 
    }
    
    PluginLoader::~PluginLoader() {
        while (!handles.empty()) {
            FreeLibrary(handles.back());
            handles.pop_back();
        }
        map<const char*, void*>::iterator it;
        for (it = addrs.begin(); it != addrs.end(); it++) {
            free((void*)(it->first));
        }
        addrs.clear();
    }
    
    void* PluginLoader::getMethodAddress(const char* name) {
        char* lowerName;
        lowerName = (char*)malloc(strlen(name)+1);
        strcpy(lowerName, name);
        lower(lowerName);
        if (addrs.end() != addrs.find(lowerName))
            return addrs[lowerName];
        return 0;
    }
    From Plugins.cc, CBAS beta B
    Interested in C# and Electrical Engineering? This might interest you.

  25. #125
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Scar++ Downloader

    Even though the instructions are find, i found a topic where some one asked how to download scar++, so i guess a few more people would have the same problem (Just read boberman's instructions! :P).

    anyway, for the people that are to lazy to read, i've created a programm for helping those people i've also included the source code so you could see what it does. because its an in C# i've also included it in a txt for the ones that cant open it.

    it still requiers svn. (i wonder if people will actualy use my programm :P)
    Busy working on realtime C# ray tracer

Page 5 of 7 FirstFirst ... 34567 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 09-22-2008, 12:32 PM
  2. SCAR Divi 3.01 DONT associate .scar files!!!
    By chimpy in forum News and General
    Replies: 1
    Last Post: 04-21-2007, 08:49 PM
  3. Replies: 28
    Last Post: 06-22-2006, 04:27 PM

Posting Permissions

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