Results 1 to 2 of 2

Thread: helpp?

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

    Default helpp?

    program New;

    {.include SRL/SRL.Scar}

    var iron, x, y :integer;

    begin
    Wait (3000)
    iron := DTMFromString('78DA6314626060E0614001C17EBE0CFF813 42' +
    '310FF0702467E208383010D302291405A0C48B0619A83A246 1148' +
    '70113047164808A2AAC8484C40550392974055A3A3A981AA0 6E41' +
    '661FC760100B8C8097B');
    if (FindDTM(iron,x, y,557, 213, 602, 252)) then
    begin
    MMouse(x, y, 1, 1);
    Mouse(x, y, 1, 1, true);
    writeln('Congratz! You have just found your first DTM!')

    end;
    end.


    it just moves the rly rly rly slowly slightly
    any ideas?

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Try changing the MouseSpeed:

    SCAR Code:
    program New;

    {.include SRL/SRL.Scar}

    var
      iron, x, y :integer;

    begin
      Wait (3000)
      iron := DTMFromString('78DA6314626060E0614001C17EBE0CFF813 42'   +
      '310FF0702467E208383010D302291405A0C48B0619A83A246 1148' +
      '70113047164808A2AAC8484C40550392974055A3A3A981AA0 6E41' +
      '661FC760100B8C8097B');
       
      if (FindDTM(iron,x, y,557, 213, 602, 252)) then
        begin
          MouseSpeed:= X; //Change this to whatever speed you like. Faster = Higher
          MMouse(x, y, 1, 1);
          Mouse(x, y, 1, 1, true);
          writeln('Congratz! You have just found your first DTM!')
        end;
    end.

    To make it look a bit neater, use procedures, and capitalise the commands.

    SCAR Code:
    program New;

    {.include SRL/SRL.Scar}

    const
      Tries = 10; //Times to try to find the DTM - makes it more reliable

    var
      Iron, X, Y, Trys : Integer;

    procedure LoadDTM;
    begin
      Wait (3000)
      Iron := DTMFromString('78DA6314626060E0614001C17EBE0CFF813 42'   +
      '310FF0702467E208383010D302291405A0C48B0619A83A246 1148' +
      '70113047164808A2AAC8484C40550392974055A3A3A981AA0 6E41' +
      '661FC760100B8C8097B');
    end;

    procedure FindIt;
    begin
      Inc(Trys);  
      if (FindDTM(iron,x, y,557, 213, 602, 252)) then
        begin
          MouseSpeed:= X; //Change this to whatever speed you like. Faster = Higher
          MMouse(x, y, 1, 1);
          Mouse(x, y, 1, 1, True);
          WriteLn('Congratz! You have just found your first DTM!')
        end;
    end;

    begin
      LoadDTM;
      repeat
        FindIt;
      until(Trys = Tries);
    end.

    As you can see, I added some bits so that it tries to find the DTM "Tries" amount of times before giving up, making it a bit more reliable. I could show you how to improve it even more, but I don't have time right now.

    Hope I helped,
    Richard
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HELPP DTMs!!
    By wattup in forum OSR Help
    Replies: 4
    Last Post: 11-24-2007, 07:26 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
  •