Results 1 to 7 of 7

Thread: Why is this script not working?

  1. #1
    Join Date
    Nov 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Why is this script not working?

    I get this error:
    iDENTIFIER EXPECTED IN LINE 63

    SCAR Code:
    procedure ChopTrees;
    var
      TreeColors: array[0..9] of integer;
      TC, x, y, TreesChopped: integer;
      begin
      TreesChopped:= 0;
      TreeColors[0]  := 1787205;
      TreeColors[1]  := 2970958;
      TreeColors[2]  := 2176309;
      TreeColors[3]  := 2576205;
      TreeColors[4]  := 1196085;
      TreeColors[5]  := 2051651;
      TreeColors[6]  := 1649451;
      TreeColors[7]  := 2713177;
      TreeColors[8]  := 4023131;
      TreeColors[9]  := 1798755;
      for TC:= 0 to 9 do
      repeat
        FindObj(x, y, 'Tree', TreeColors[TC], 30);
        MMouse(x, y, 0, 0);
        if (IsUpTextMulti('Tree', 'ree', 'Chop down')) then
        begin
          repeat
            ClickMouse(x, y, true);
            Wait(200);
    60        if (IsUpTextMulti( 'Tree', 'ree', 'Chop down')) then
    61      ClickMouse(x, y, true);
    62      until (IsUpTextMulti( 'Walk here', 'Examine', 'alk'));
    LINE 63    TreesChopped:= TreesChopped + 1;
    64  until TreesChopped= 27;
    end;

    WHAT SHOULD I CHANGE?

  2. #2
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    begin
          repeat
            ClickMouse(x, y, true);
            Wait(200);
            if (IsUpTextMulti( 'Tree', 'ree', 'Chop down')) then
            ClickMouse(x, y, true);
          until (IsUpTextMulti( 'Walk here', 'Examine', 'alk'));
        end;// Just added end should work
        TreesChopped:= TreesChopped + 1;
      until TreesChopped= 27;
    end;

    ~Stupedspam

  3. #3
    Join Date
    Nov 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    K, I need some more help.

    this isn´t working:

    procedure MakeShafts;
    var
    x, y: integer;
    begin
    Knife := DTMFromString('78DA631465606010664001A5B939609A11C A6' +
    '79402126C0C688011558D2C90E020A0460048C81250C30B24 6408' +
    'A8E106128AF8D500007531024F');
    Log := DTMFromString('78DA631461606010604001C591A6609A11C A6' +
    '7940112AC0C688011550D1790E020A0860548881050C30724 6409' +
    'A89100129204D428020931026A40F6F0E2570300C2020245' );
    FindDTM(Knife, x, y, 542, 186, 732, 465);
    if (IsUpText('Knife')) then
    ClickMouse(x, y, true);
    Wait(2000);
    FindDTM(Log, x, y, 542, 186, 732, 465);
    if (IsUpText('Logs')) then
    ClickMouse(x, y, true);
    Wait(2000);
    end;

    There´s no visible error but it just doesn´t clicks on the x and y coordinates after finding the DTM.

  4. #4
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Because you never order it to move the mouse to the coords that it finds the DTM at so the UpText is never 'knife'

    Also note that ClickMouse and MoveMouse are detectable in RS,
    instead i suggest using Mouse and MMouse as they are not detectable.

    This is how I would do it (I added comments hope it helps )

    SCAR Code:
    procedure MakeShafts;
    var
      x, y: integer;
    begin
      Knife := DTMFromString('78DA631465606010664001A5B939609A11C A6' +
        '79402126C0C688011558D2C90E020A0460048C81250C30B24 6408' +
        'A8E106128AF8D500007531024F');
      Log := DTMFromString('78DA631461606010604001C591A6609A11C A6' +
        '7940112AC0C688011550D1790E020A0860548881050C30724 6409' +
        'A89100129204D428020931026A40F6F0E2570300C2020245' );
      if FindDTM(Knife, x, y, 542, 186, 732, 465) then
      begin   //if DTM is found then..
        MMouse(x, y, 0, 0); //will move mouse to coords
        if (IsUpText('Knife')) then Mouse(x, y, 0, 0, true); //if uptext is there it will click
        Wait(2000);
      end else WriteLn('Knife DTM not found..'); //if DTM is NOT found it will debug this
      if FindDTM(Log, x, y, 542, 186, 732, 465) then
      begin  //if log DTM is found then..
        MMouse(x, y, 0, 0); //will move mouse to coords
        if (IsUpText('Logs')) then Mouse(x, y, 0, 0, true);
        Wait(2000);
      end else WriteLn('Log DTM not found..'); //if DTM is NOT found it will debug this
    end;

  5. #5
    Join Date
    Nov 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    tyvm

  6. #6
    Join Date
    Aug 2007
    Location
    Emo-land
    Posts
    1,109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Derek- View Post
    Also note that ClickMouse and MoveMouse are in RS,
    instead i suggest using Mouse and MMouse as they are not detectable.
    Is this due only due to the randomness you add, so if you write(which you wouldn't, you can do that easier using MMouse lol, but this is just an example):
    Code:
    MoveMouse(x + random(5), y + random(5));
    Is it actually more detectable by RS or is it just because MMouse forces you to put some degree of randomness?

    Thanks, this is a random but I think quite important question.
    Fr0zN_S0uL.

  7. #7
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Fr0zN_S0uL View Post
    Is this due only due to the randomness you add, so if you write(which you wouldn't, you can do that easier using MMouse lol, but this is just an example):
    Code:
    MoveMouse(x + random(5), y + random(5));
    Is it actually more detectable by RS or is it just because MMouse forces you to put some degree of randomness?

    Thanks, this is a random but I think quite important question.
    Fr0zN_S0uL.
    No not really.
    it's really because when using MoveMouse, instead of the mouse moving there human like, it automatically pops up at the specified coords.
    MMouse actually moves to the coords normally.

    The randomness in MMouse helps though to make it more human like so that the mouse doesn't keep moving to the same exact coords every time.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help, script not working.
    By bank in forum OSR Help
    Replies: 6
    Last Post: 02-03-2009, 06:25 PM
  2. Script not working.
    By Minkino in forum OSR Help
    Replies: 6
    Last Post: 10-02-2008, 09:53 AM
  3. a !WORKING! script...
    By gleninater in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 06-24-2007, 08:10 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
  •