Results 1 to 7 of 7

Thread: TimeFromMark

  1. #1
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    TimeFromMark

    ok, i have made a MarkTime at the start of a loop, and what i want it to do is when the TimeFromMark is greater than 1800000 for it to exit out of its current loop and run a new procedure.

    i have tryed
    SCAR Code:
    Procedure StartMining;        
    begin
      MarkTime(Timer);
      repeat
      FindObj(x, y, 'Rocks', 5077416, 40);
      Mouse(x, y, 2, 2, True);
      Wait(2500 + random(1500));
      GasFound(x, y);
      FightCheck;
      AntiBanMining;
      Wait(1500 + random(1000));
      until(InvFull);
      begin
        GameTab(4);
        Wait(250);
        DropToPosition(2, 28);
        FightCheck;
        m:=m+27;
        Report;
        if(TimeFromMark(Timer) < 1800000) then
        begin
          Tele;
          Exit;
        end;
        StartMining;
      end;
    end;

    but this did not work, did i do someting wrong??

    thanks for any help

  2. #2
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    The timer check isn't in the loop..

  3. #3
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    it is aint it, once in Inventory is full then it runs that part

  4. #4
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    The loop is between

    SCAR Code:
    repeat
    until

    .. So it won't break from the loop. And exit; exits the current procedure, it doesn't break the loop, incase you wanted it to break the loop.

  5. #5
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, so just make sure is this correct?

    SCAR Code:
    Procedure StartMining;
    begin
      MarkTime(Timer);
      repeat
      if(TimeFromMark(Timer) < 1800000) then
      begin
        Tele;
        Break;
      end;
      FindObj(x, y, 'Rocks', 5077416, 40);
      Mouse(x, y, 2, 2, True);
      Wait(2500 + random(1500));
      GasFound(x, y);
      FightCheck;
      AntiBanMining;
      Wait(1500 + random(1000));
      until(InvFull);
      begin
        GameTab(4);
        Wait(250);
        DropToPosition(2, 28);
        FightCheck;
        m:=m+27;
        Report;
        StartMining;
      end;
    end;

    EDIT

    ok made the changes and when i run the script it just runs fine however it does not wait the time told to, instead it just runs the new procedure.

  6. #6
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You've faced the thing the wrong way. This is the right way:
    SCAR Code:
    (TimeFromMark(Timer) >= 1800000)

    -Knives

  7. #7
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh bloody hell, what a noob, sorry that was the most easy thing to solve, been working on this the whole day so not thinking right.

    thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. TimeFromMark help
    By mat_de_b in forum OSR Help
    Replies: 4
    Last Post: 09-07-2007, 09:14 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
  •