Results 1 to 6 of 6

Thread: Help needed

  1. #1
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help needed

    Ok, so iwas just first started learning how to script about 2 days ago. This is one of my starter scripts im trying to do as a first one, I want it to simply Find the color or a chicken and click it.
    Please fix it and explain the problem, i click start and all it does is say script executed but it does not find the color or click it. Please if possible Tell me some better methods also, Please don't make it to complicated and explain it if you can.

    program Chicken;

    var
    x,y: Integer;

    const
    FindChicken = 2968160 ;

    procedure Find1;
    begin
    If(FindColorSpiral(x,y,FindChicken,0,0,20,50)) then
    begin
    MoveMouse(x,y);
    Wait(400);
    ClickMouse(x,y,true);
    end;
    end;
    begin
    Find1;
    end.
    end.

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

    Default

    Nice to see you started learning scripting.

    I'm a bit busy so i can't teach you..

    But you should post your work in [Scar] [//scar] Note : Its only one /

  3. #3
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Please, tell me where do i find this? I Do not know much to the whereabouts of things on this website yet since i only came a little while ago from nexus =s

  4. #4
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is what you have:
    SCAR Code:
    program Chicken;

    var
      x,y: Integer;

    const
      FindChicken = 2968160 ;

    procedure Find1;
    begin
      If(FindColorSpiral(x,y,FindChicken,0,0,[B]20,50[/B])) then
      begin
        MoveMouse(x,y);
        Wait(400);
        ClickMouse(x,y,true);
      end;
    end;
    begin
      Find1;
    end.
    [B]end.[/B]

    A few mistakes are highlighted in bold there - firstly, you are only searching for that colour in the a 20x50 box at the top of the RS Client. You should try increasing 20, 50 to the actual size of the RS game. (I forget what it is).

    Also, you have one too many 'end.'s (although it doesn't matter, nothing after 'end.' is executed.

    HTH,
    -Agent

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

    Default

    SCAR Code:
    program Chicken;
    {.include srl/srl.scar}
    var
      x,y: Integer;

    const
      FindChicken = 2968160;
      Tolerance = 15;

    procedure Find1;
    begin
      If FindObj(x, y, 'ttac', FindChicken, Tolerance) then
      begin
        Mouse(x, y, 5, 5, True);
      end;
    end;

    begin
      SetupSRL;
      Find1;
    end.

    Fixed it. Added SRL, fixed standards and replaced some functions. Try using SRL for RS related scripts. Remember to post in SCAR tags [scar] [/*scar] (without the *). Look at tutorials for more info

    EDIT: forgot that xraye, thanks.


  6. #6
    Join Date
    Dec 2007
    Location
    Los Angeles, California
    Posts
    606
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Right before "Find1" add "SetUpSRL".

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. eek. A little help needed:
    By malotthouse in forum OSR Help
    Replies: 4
    Last Post: 02-18-2008, 06:01 PM
  2. Help needed
    By faster789 in forum OSR Help
    Replies: 2
    Last Post: 09-30-2007, 03:11 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
  •