Results 1 to 10 of 10

Thread: Need Very Litte Script!! :p

  1. #1
    Join Date
    Feb 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Need Very Litte Script!! :p

    I need a script that can click on these either one of these colors, when one of them comes up on the screen, not constant, like around 6-10 minutes ( thats about how long it takes for the color to show up).

    Shouldn't take long TY (doesn't really have to bee anything special),
    If you could post it here as a file that would be awesome

    Colors:
    8355721
    9013908
    8092805
    7829633

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

    Default

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
      var x,y,xs,ys,xe,ye: Integer;
      const
      tol = 15; //how much tolerance do you want? Raise if it's not finding the color
    begin
      SetupSRL;
      repeat
        if (FindColorTolerance(x,y,8355721,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
        if (FindColorTolerance(x,y,9013908,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
        if (FindColorTolerance(x,y,8092805,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
        if (FindColorTolerance(x,y,7829633,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
      until(false);
    end.

    That should work (It's constantly looking for it but it doesn't really matter I don't think ). It'll stop when you click Ctrl+Alt+S.

    EDIT: Oops, thanks Hy (below), NOW it should work.

  3. #3
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Runescapian321 View Post
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
      var x,y,xs,ys,xe,ye: Integer;
      const
      tol = 15; //how much tolerance do you want? Raise if it's not finding the color
    begin
      repeat
        if (FindColorTolerance(x,y,8355721,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
        if (FindColorTolerance(x,y,9013908,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
        if (FindColorTolerance(x,y,8092805,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
        if (FindColorTolerance(x,y,7829633,xs,ys,xe,ye,tol)) then
          begin
            mouse(x,y,0,0,true);
          end;
      until(false);
    end.

    That should work (It's constantly looking for it but it doesn't really matter I don't think ). It'll stop when you click Ctrl+Alt+S.
    Forgot SetupSRL;


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  4. #4
    Join Date
    Feb 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    where does that go?

    I tried using tut's but its out of my league i can click and move mouse ROFL

  5. #5
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    That is the whole script.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  6. #6
    Join Date
    Feb 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You guys are Gods
    +Rep given
    TY

  7. #7
    Join Date
    Feb 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 26: [Error] (34:1): Duplicate identifier 'UpChars' in script srl\srl\core\Globals.scar

  8. #8
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    what srl are u using because that error is not from the script, its from globals.scar



  9. #9
    Join Date
    Feb 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    scar 3.14 with the update rev to 14

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

    Default

    Try replacing your Globals.scar file with this: (I don't even have an 'Upchars' identifier in my Globals.scar, are you sure you have rev 14?)

    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               ยป Global Variables                            --//
    //-----------------------------------------------------------------//
    // * procedure LoadSRLBitMaps;                   // * by SRL Dev Team
    // * procedure FreeSRLBitMaps;                   // * by Ron

    { const SRLVersionNumber;
      Description: Repository Version Number. }



    var
      TalkAfterRandoms: Boolean;
     
    { var bmpAdmin, bmpMod, Lamp, BoxMask: Integer;
      Description: Global Bitmaps. Need to be Global because of SCAR Memory leaks. }

    var
      bmpAdmin, bmpMod, Lamp, BoxMask: Integer;

    { var RoadColor, WaterColor, BankColor: Integer;
      Description: Three variables you will almost always use. :) }

    var
      RoadColor, WaterColor, BankColor: Integer;

    { var LampSkill: String;
      Description: Set Lamp skill. }

    var
      LampSkill: string;
     
    { const MMX1, MMY1, MMX2, MMY2;
      Description: MiniMap Edge Points. }

    const
      MMX1 = 550;
      MMY1 = 8;
      MMX2 = 703;
      MMY2 = 161;

    { const MMCX, MMCY;
      Description: MiniMap Centre Point. }

    const
      MMCX = 627;
      MMCY = 85;

    { const MSX1, MSY1, MSX2, MSY2;
      Description: Main Screen EdgePoints. }

    const
      MSX1 = 1;
      MSY1 = 1;
      MSX2 = 516;
      MSY2 = 338;

    { const MSCX, MSCY;
      Description: Main Screen Centre Points. }

    const
      MSCX = 259;
      MSCY = 170;

    { const MIX1, MIY1, MIX2, MIY2;
      Description: Inventory EdgePoints. }

    const
      MIX1 = 547;
      MIY1 = 202;
      MIX2 = 737;
      MIY2 = 466;

    { const MICX, MICY;
      Description: Inventory Centre Points. }

    const
      MICX = 642;
      MICY = 334;

    { const MCX1, MCY1, MCX2, MCY2;
      Description: Chat Screen EdgePoints. }

    const
      MCX1 = 4;
      MCY1 = 342;
      MCX2 = 496;
      MCY2 = 460;

    { const MCCX, MCCY;
      Description: Chat Screen Centre Points. }

    const
      MCCX = 250;
      MCCY = 401;

    //****************************************************************************//
    // * I tried to make these Bitmaps Local, but I got after a couple of hours
    // *  running scripts, CTB and DB handle errors. So sorry, declared them global
    //****************************************************************************//

    {*******************************************************************************
    procedure LoadSRLBitMaps;
    By: SRL Dev Team
    Description: Loads SRL Bitmaps into memory.
    *******************************************************************************}


    procedure LoadSRLBitMaps;
    begin
      bmpMod := BitmapFromString(9, 6, 'beNqbPn0RWeDBgwdAkgEMkBnT' +
           'p0+HS6GR+KVwAgAGXFQr');
      bmpAdmin := BitmapFromString(9, 6, 'beNqbp/j9PwcZ6P//FiDJAA' +
           'bIjGvzFOFSaCR+KZwIALniVEk=');
      Lamp := BitmapFromString(6, 6, 'beNrzdWpr4a2qBCEZGQYGBkYgAr' +
           'KLCnmtLKHczRtF8nJ5/f05dHVBIgYKCkAyPY3DzZUDogUoEubrBFE' +
           'M4UJEIAwICvGyDgMAG0ERxQ==');
      BoxMask := BitmapFromString(25, 25, 'beNpjYMAF/mMABtIBLo0km' +
           'UyS7bhMJtsLyCbASQoBJUFKSeCMGjVq1KhRw94ouCFUKfFwcck2h4' +
           'wqgCQHEDSZEo8QdjYABzDsFA==');
    end;

    {*******************************************************************************
    procedure FreeSRLBitMaps;
    By: Ron
    Description: Frees SRL Bitmaps into memory.
    *******************************************************************************}


    procedure FreeSRLBitmaps;
    begin
      FreeBitmap(bmpMod);
      FreeBitmap(bmpAdmin);
      FreeBitmap(Lamp);
      FreeBitmap(BoxMask);
    end;

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
  •