Results 1 to 3 of 3

Thread: Help on simple script

  1. #1
    Join Date
    Aug 2007
    Location
    The cardboard box down the street
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help on simple script

    Code:
    program New;
    
    var
    x,y: Integer;
    
    const
    brushcolor= 16711680;
    begin
    if(Findcolor(x,y,brushcolor,0,0,600,600)) then
     begin
     MovemouseSmoothEx(x,y +random(0),20,40,45,25,20);
     Wait(100+random(10));
     Clickmouse(x,y,true);
     end else
     Writeln('Did not find the brush!')
     end;
    
    begin
     Holdmouse(180,157,true);
     Wait(100);
     ReleaseMouse(180,273,true);
     Writeln('Draw first line')
    end.
    I always get this error:
    Line 16: [Error] (16:4): period ('.') expected in script

    All im trying to do is get paint to draw a line with the spraypaint.
    Yes im a noob at this scar stuff.

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

    Default

    well first you need to make procedures so that you can call upon them to run in the script when you want.

    here this should work for what you want:

    SCAR Code:
    program New;

    var
      x,y: Integer;

    const
      brushcolor= 16711680;

    procedure ClickBrush;
    begin
      if(Findcolor(x,y,brushcolor,0,0,600,600)) then
      begin
        MovemouseSmoothEx(x,y,0,20,40,45,25);
        Wait(100+random(10));
        Clickmouse(x,y,true);
      end else
      Writeln('Did not find the brush!')
    end;

    procedure DrawLine;
    begin
      Holdmouse(180,157,true);
      Wait(100);
      ReleaseMouse(180,273,true);
      Writeln('Draw first line')
    end;

    begin
      ClickBrush;
      DrawLine;
    end.

    also having the random(0) wont do anything b/c there is nothing that it is randomizing so that should work let me know if there is somethin wrong, also you had to many parameters/numbers in the MousemouseSmoothEx function i fixed that for ya

    also your standards a pretty far off, read up on that w/ the search button and its ez

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


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

    Default

    O_o first of all, wrong section, should be posted in script help section, and second, it doesnt move mouse, it just click at one spot and stays... =\ you should try SRL in your scripts, because that will help A LOT when u start scripting for RS but good try

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with this simple script...
    By Drakan in forum OSR Help
    Replies: 7
    Last Post: 10-17-2007, 10:23 PM
  2. need a simple script
    By dark1463 in forum RS3 Outdated / Broken Scripts
    Replies: 22
    Last Post: 08-24-2007, 03:56 PM
  3. First Simple Script
    By trigoon in forum First Scripts
    Replies: 10
    Last Post: 03-31-2007, 03:45 AM
  4. Replies: 5
    Last Post: 03-26-2007, 07:57 PM
  5. Need Help with simple script
    By looneytoon in forum OSR Help
    Replies: 4
    Last Post: 01-07-2007, 11:00 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
  •