Results 1 to 8 of 8

Thread: Reset TimeRunning

  1. #1
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Reset TimeRunning

    Can I reset the TimeRunning in a procedure or somewhere in a script?

    Because I want it wait until its logged in, and do some other procedure, then just start the time count.

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by CephaXz View Post
    Can I reset the TimeRunning in a procedure or somewhere in a script?

    Because I want it wait until its logged in, and do some other procedure, then just start the time count.
    You can use MarkTime.


    ~Home

  3. #3
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    as home said
    Simba Code:
    MarkTime(LoggedIn);
    then when you want to know how long it has been since:
    Simba Code:
    TimeFromMark(LoggedIn);

  4. #4
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So how do I make it in my progress report? Using InttoStr?

    EDIT: I got it to become the time running on my progress report. But I could not get it to become the XP/Hour because I need the time to be divided by 1000.
    Last edited by CephaXz; 05-23-2012 at 10:30 PM.

  5. #5
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Of the top of my head i believe it would be

    Writeln(Timefrommark(Loggedin));


    Or something along those lines

    Witht the divided by 1000 i think its

    Procedure(blabla() / 1000); or something along those lines to :3

  6. #6
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    TimeFromMark just returns an integer. Do your math on that, then use IntToStr() in your string.

    For example:

    Simba Code:
    var
      mark, time: Integer;

    MarkTime(mark);
    //.. do some stuff
    Stuff();
    time = timeFromMark(mark);
    WriteLn('XP per hour: ' + floattoStr(time/1000/3600));

    I think that's the right maths.. :P
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  7. #7
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks everyone for the help. I'll try it when I get home, although I don't know what's a float lol

  8. #8
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by CephaXz View Post
    Thanks everyone for the help. I'll try it when I get home, although I don't know what's a float lol
    ...
    Definition: Float is short for floating point and is a fundamental (i.e. built into the compiler) type used to define numbers with fractional parts.
    The float type can represent values ranging from approximately 1.5 × 10−45 to 3.4 × 1038 with a precision of 7 digits.

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
  •