Results 1 to 14 of 14

Thread: First Script

  1. #1
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    First Script

    Ok, I am trying to make a bronze arrow buyer for right now, and it is basically a spin off of another buyer for feathers. I know not very creative but I figured before I made my own, I would try to change someone elses... But I really dont know what this line means :FindColor(x, y, 11316407, 363, 115, 391, 150);
    I know the first part is the color but what are the 3 digit things? Dont call me a noob, I couldnt understand the FAQs so I just went all out.

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

    Default

    the 3 digit numbers are the coordinates. in that there, thats a box of which it looks for a color in.

  3. #3
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    The four digit things are the box to search the color in.
    The 363 and 115 are the topleft corner of the box, and the 391 an 150 the bottom right corners of the box.
    I saw a page explaining this some time ago, I'll see if I can find it for you.
    I made a new script, check it out!.

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

    Default

    Quote Originally Posted by markus View Post
    The four digit things are the box to search the color in.
    The 363 and 115 are the topleft corner of the box, and the 391 an 150 the bottom right corners of the box.
    I saw a page explaining this some time ago, I'll see if I can find it for you.
    correction, those are 4 numbers seperate numbers, 3 digits :P

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Thanks i will see if I can get it to work now.

    It just right clicks on the top left corner on the runescape window? Anyone know why this is happening?


    Here is my script Someone wanna test or look at and tell me why?

    ///////////////////////////////////////////////////////////////////////////
    //////////////////////////////Bronze Arrow Buyer///////////////////////////
    /////////////////////////////By: 3Garrett3/////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////
    //Have your screen set to V-Bright. //
    //Press F12 to stop the script. //
    //Have Archery window open (Lowes). //
    ///////////////////////////////////////////////////////////////////////////

    program Arrowbuyer;
    {.include SRL/SRL.scar}

    begin
    repeat
    FindColor(x, y, 537172, 197, 78, 251, 60);
    MoveMouseSmooth(x, y);
    Mouse(x, y, 2, 2, False);
    ChooseOption(x, y, '10'); //You can change between 10, 5, and 1
    Wait(5000+random(300));
    until(IsFKeyDown(12))
    end.

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

    Default

    MoveMouseSmooth will get you banned.
    Make it this

    program Arrowbuyer;
    {.include SRL/SRL.scar}

    SCAR Code:
    begin
     repeat
      If FindColor(x, y, 537172, 197, 78, 251, 60) Then
      Begin
       Mouse(x, y, 2, 2, False);
       ChooseOption(x, y, '10'); //You can change between 10, 5, and 1
       Wait(5000+random(300));
      End;
     until(IsFKeyDown(12))
    end.

    Notice the indeents i made, they are called standards are really help people read your scripts more clearly,
    Also why not try making a DTM for the arrows in the shop, works better then color. Hers a DTM tutorial iv made.
    Try using one in your script:
    http://www.villavu.com/forum/showthread.php?t=564

  7. #7
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by yohojo8 View Post
    MoveMouseSmooth will get you banned.
    Make it this

    program Arrowbuyer;
    {.include SRL/SRL.scar}

    SCAR Code:
    begin
     repeat
      If FindColor(x, y, 537172, 197, 78, 251, 60) Then
      Begin
       Mouse(x, y, 2, 2, False);
       ChooseOption(x, y, '10'); //You can change between 10, 5, and 1
       Wait(5000+random(300));
      End;
     until(IsFKeyDown(12))
    end.

    Notice the indeents i made, they are called standards are really help people read your scripts more clearly,
    Also why not try making a DTM for the arrows in the shop, works better then color. Hers a DTM tutorial iv made.
    Try using one in your script:
    http://www.villavu.com/forum/showthread.php?t=564
    Ya I had the indents, they just never turned up when I pasted, And now the mouse doesnt move at all? Why wont this work!!?? I might as well quit, I suck at this. I cant even make the stupid mouse move!

  8. #8
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Ok sry about the double post, but I didnt quit and I need help with another error...
    SCAR Code:
    ///////////////////////////////////////////////////////////////////////////
    //////////////////////////////Bronze Arrow Buyer///////////////////////////
    /////////////////////////////By: 3Garrett3/////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////
    //Have your screen set to V-Bright.                                      //
    //Press F12 to stop the script.                                          //
    //Have Archery window open (Lowes).                                              //
    ///////////////////////////////////////////////////////////////////////////

    program Arrowbuyer;
    {.include SRL/SRL.scar}
    var Arrow
    begin
     repeat
     Arrow:= DTMFromString('78DA631467606090634001D922BC0CFF81342' +
           '310FF07024605204392010D302291405A1048881250C309241409' +
           'A801C9F3105003728B327E350096CF06C0');
      if FindDTM(Arrow,x,y,130,84,252,63) Then
      Begin
       Mouse(x, y, 2, 2, False);
       ChooseOption(x, y, '10'); //You can change between 10, 5, and 1
       Wait(5000+random(300));
      End;
     until(IsFKeyDown(12))
    end.
    And I get an error,,,
    Line 13: [Error] (17674:1): colon (':') expected in script C:\Program Files\SCAR 2.03\Scripts\DTMS\my first.scar The part where it thinks it should be is by the first begin.?
    Thx for the DTM guide by the way.

  9. #9
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by 3garrett3 View Post
    Ok sry about the double post, but I didnt quit and I need help with another error...
    SCAR Code:
    ///////////////////////////////////////////////////////////////////////////
    //////////////////////////////Bronze Arrow Buyer///////////////////////////
    /////////////////////////////By: 3Garrett3/////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////
    //Have your screen set to V-Bright.                                      //
    //Press F12 to stop the script.                                          //
    //Have Archery window open (Lowes).                                              //
    ///////////////////////////////////////////////////////////////////////////

    program Arrowbuyer;
    {.include SRL/SRL.scar}
    var
    Arrow : Integer; // You needed to set it as an integer.
    begin
     repeat
     Arrow:= DTMFromString('78DA631467606090634001D922BC0CFF81342' +
           '310FF07024605204392010D302291405A1048881250C309241409' +
           'A801C9F3105003728B327E350096CF06C0');
      if FindDTM(Arrow,x,y,130,84,252,63) Then
      Begin
       Mouse(x, y, 2, 2, False);
       ChooseOption(x, y, '10'); //You can change between 10, 5, and 1
       Wait(5000+random(300));
      End;
     until(IsFKeyDown(12))
    end.
    And I get an error,,,
    Line 13: [Error] (17674:1): colon (':') expected in script C:\Program Files\SCAR 2.03\Scripts\DTMS\my first.scar The part where it thinks it should be is by the first begin.?
    Thx for the DTM guide by the way.
    That should do it.

  10. #10
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Thanks alot but the mouse still doesnt move? Is something else wrong with it? It says running script but never moves anything?

  11. #11
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Well...

    You don't need to have the DTM inside of the Repeat...End;

    As for the mouse not moving. You have the tag right, but the script might not be finding the DTM.

    Try copying the script, pasting it in another scar window, and instead of having it click on the DTM, have it: "Writeln('DTM Found!"

    If it doesn't find it, redo the DTM.

  12. #12
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    I just needed to change
    SCAR Code:
    if FindDTM(Arrow,x,y,130,84,252,63) Then
    TO
    SCAR Code:
    if FindDTM(Arrow,x,y,1, 1, 200, 200) Then
    it right clicked on it but then this showed up...
    [Runtime Error] : Exception: Access violation at address 0064FEA2 in module 'scar.exe'. Read of address 00000000 in line 239 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Text.scar

  13. #13
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Place:

    SCAR Code:
    SetupSRL;

    At the top of your main loop.

  14. #14
    ronny.m.p Guest

    Default

    It emans you didn't put SetupSRL; or didnt drag the crosshair!

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
  •