Results 1 to 7 of 7

Thread: Help with My Script?

  1. #1
    Join Date
    Jun 2008
    Location
    Stocking you
    Posts
    264
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with My Script?

    okk....
    so ive been trying to make it so scar clicks on coins it finds on thw ground...
    however, it will only do it sometimes...
    heres the procedure im using:
    SCAR Code:
    procedure Using_MEOW;
    var
    Colors : TIntegerArray;
    begin
     Colors := [2411005, 2476797, 2345213, 1608366, 1608367, 1608623];
      For n := 0 to 5 do
      begin
       if FindObjTPA(d, e, Colors[n], 15, 0, 19, 19, 1, ['Coins','oins'])then
       begin
        Mouse(d, e, 8, 8, True);
    I'm pretty sure that the uptext isnt working atm...
    so any other way of finding these coins would be appreciated...
    plz no spam like..."looks good"
    because thats not what im asking..
    i want to know how to change it so it finds the coins every time and clicks on them.
    rainbows are red, violets are blue, shut the heck up,
    or I will crush you...

    Don't Poems just make you happy?

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    One tip would be to use Auto Color Aid (ACA) to autocolor the coins.

    And instead of using uptext (since its supposedly broken)
    Make a bitmap of the word Coins, or just Coi, or just a thin strip (2X however many pixels) of the word to use instead of uptext.

  3. #3
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If it's not moving the mouse to the coins often, try using some more tolerance. If I know the parameters to my FindObjTPA function correctly, you are only using 1 tolerance? That seems a bit low.

    You could also make a DTM of the up text if IsUpText isn't working. You could also just count the amount of colors the text has, although that may not be perfectly reliable.

  4. #4
    Join Date
    Jun 2008
    Location
    Stocking you
    Posts
    264
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    One tip would be to use Auto Color Aid (ACA) to autocolor the coins.

    And instead of using uptext (since its supposedly broken)
    Make a bitmap of the word Coins, or just Coi, or just a thin strip (2X however many pixels) of the word to use instead of uptext.
    i understand the bitmap and tahts what il probaly do...
    but what do you mean autocolor the coins?
    If it's not moving the mouse to the coins often, try using some more tolerance. If I know the parameters to my FindObjTPA function correctly, you are only using 1 tolerance? That seems a bit low.

    You could also make a DTM of the up text if IsUpText isn't working. You could also just count the amount of colors the text has, although that may not be perfectly reliable.
    Actually the 15 is the tolerance... the one is the how many of the 6 colors it should look for.
    I have it set so that it will only look for one color out of the six.
    rainbows are red, violets are blue, shut the heck up,
    or I will crush you...

    Don't Poems just make you happy?

  5. #5
    Join Date
    Jun 2008
    Location
    Stocking you
    Posts
    264
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this is my script now....
    it cant find the bitmap for uptext though...
    may have to do with new update?
    procedure Using_TelekineticGrab;
    var
    Colors : TIntegerArray;
    begin
    if FindColorTolerance(d, e, AutoColor, MSX1, MSY1, MSX2, MSY2, 15)then
    if FindOins(M, O)then
    begin
    Mouse(d, e, 8, 8, True);
    Writeln('Telegrabed Coins');
    AntiRandom;
    Wait(5000+random(3000));
    AntiBan;
    Wait(3000+random(2000));
    AntiBan;
    GameTab(Tab_Magic);
    end
    else
    begin
    Writeln('Could not find Uptext');
    findTelekinetic(x, y);
    Mouse(x, y, 8, 8, true);
    Wait(1000+random(300));
    Logout;
    TerminateScript;
    end
    else
    begin
    Writeln('Could not find Coins');
    findTelekinetic(x, y);
    Mouse(x, y, 8, 8, true);
    Wait(1000+random(300));
    Logout;
    TerminateScript;
    end
    end;
    rainbows are red, violets are blue, shut the heck up,
    or I will crush you...

    Don't Poems just make you happy?

  6. #6
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I heard that the new update broke SRL's uptext reading, so that shouldn't be a problem with your script. For the fastest upcoming fix, download the developers SvN if you haven't already.

  7. #7
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by xSaintias View Post
    but what do you mean autocolor the coins.
    If you go into you SRL folder, there is a sub-folder called "Scripting Tools". Inside that folder, there is an application called "AutoColor Aid v2". What is does is helps you make a function that will find the color of whichever object you want to find while the script is running. This means that even if the color changes slightly, SCAR should still find it.

    My All-In-One scripting guide includes a section on using ACA, if you want to take a look at it.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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