Results 1 to 2 of 2

Thread: Need help adding a rest feature

  1. #1
    Join Date
    Nov 2011
    Location
    Puerto Rico
    Posts
    905
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help adding a rest feature

    Tittle says it all would appreciate it
    (\__/)
    ( O.o )This is Bunny.
    ( > < )Copy Bunny into your signature to help him on his way to world domination.

  2. #2
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    This is a procedure I used in one of my scripts:

    Simba Code:
    procedure Replenish;
    var
      i: integer;
    begin
      if ColorWait(500, 255, 742, 107, 760, 119) then
    // Looking for the color 255, the red to the right of the run energy button
      begin
        SetRest;
        MarkTime(i);
        repeat
          Wait(1000+Random(1000));
        until(ColorWait(500, 65280, 742, 107, 760, 119) or (TimeFromMark(i) > 30000));
    // Looking for the color 65280, the green to the right of the run energy button
        Wait(3000+Random(1000));
      end;
    end;

    Since the text turns green when you hit 75+ energy, I implemented a few second wait after the loop was finished to make sure the energy gets to at least 90+ energy before ending.

    You should call it often in your script since it will only replenish the run energy if it's below 25 energy.
    Last edited by Runaway; 02-22-2012 at 08:17 PM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •