Results 1 to 9 of 9

Thread: if 0 endurance true

  1. #1
    Join Date
    Jul 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Arrow if 0 endurance true

    well i need some help for my auto rester
    im not new here,ive been here in the ancient website,
    well i think it is it,
    i want to know what to use to make the script recognise when there is 0 endurance left

  2. #2
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    im not for sure, but i think theres an include to find out how much you have, like getrunpercentage.

    i cant look atm, sorry =[
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  3. #3
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well,

    SCAR Code:
    function NoEnergy : boolean;
    var
      s : string;
    begin
      result := GetMMLevels('run', s) = 0;
    end;

  4. #4
    Join Date
    Jul 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh damn thanks kyle
    always there to help =P
    ill need more help dont worry

  5. #5
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Function GetMMLevels(LevelType : String;var ColorSign : String): integer;

    For LevelType, use 'run' or 'energy' (case doesn't matter).
    For ColorSign, you need a string variable - it doesn't need anything assigned to it as the function assigns red, orange, yellow or green. It then returns the percentage, so if it returns 0, then that would mean that endurance/energy is at 0. You may want it to be a bit less specific than that though - maybe under 5% - just to make sure you don't miss it

    When done, it should look something like
    SCAR Code:
    if GetMMLevels('run', strVar) = 0 then
      // Start resting here
    strVar being a variable declared as string - name doesn't matter

    edit: My want for quality posts seems to have caused my downfall, oh no!
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  6. #6
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    uhhh
    SCAR Code:
    {*******************************************************************************
    function RunEnergy(Min: Integer): Boolean;
    By: lordsaturn
    Description: Toggles run if energy is greater or equal to MinEnergy. Results
                 true if energy is greater or equal to minimum.
    *******************************************************************************}


    function RunEnergy(Min: Integer): Boolean;
    var
      t: String;
    begin
      Result := (GetMMLevels('run', t) >= Min);
      if (Result) then SetRun(True);
    end;
    That..?

    Would be used like:
    SCAR Code:
    if RunEnergy > 15 then
      SetRun(True);

    That checks to see if you have more than 15% Run Energy, and if so, turn's on running.

    I believe that's what your looking for.

    You can find that along with all the other SRL includes if you just go to(on XP) My Computer --> Local Disk [C:]--> ProgramFiles --> Scar3.20 --> Includes --> SRL --> SRL and there you have it
    Last edited by NCDS; 07-16-2009 at 06:35 AM.

  7. #7
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Err, I've already solved it..

  8. #8
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    Err, I've already solved it..
    So is wrong then to show him SRL's includes because you answered his question..? -.-

  9. #9
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He wants to rest anyways.

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
  •