Back To Top
  • Hey Guest,
    If you are interested in ghosting, the Ghosting Awards from February 2025 all the way up to June 2025 have just been announced:

    Statement regarding the delays

    Ghosting Awards for February 2025

    Ghosting Awards for March 2025

    Ghosting Awards for April 2025

    Ghosting Awards for May 2025

    Ghosting Awards for June 2025
    Dismiss Notice
  • is there any way to find out how much playtime you have in frhd

    Discussion in 'Support and Questions' started by Tubiek, Nov 25, 2021.

    1. Calculus

      Calculus Community Developer Staff Member Administrator

      Awarded Medals
      Fair enough. I'll write a script that does it for you.
       
      AfterImage and ItsColinGuys like this.
    2. ItsColinGuys

      ItsColinGuys Well-Known Member Official Author

      i have an idea
      >hack freeriderhd
      >put in hour tracking script
       
    3. AfterImage

      AfterImage Well-Known Member Team Balloon Official Author

      Awarded Medals
      As well as the amount of time you spend scrolling, commenting, and the amount of time you spent failing tracks.
       
      ItsColinGuys likes this.
    4. ItsColinGuys

      ItsColinGuys Well-Known Member Official Author

      there should also be a script that counts how many of my posts are **** (crap) posts

      oh look it that, there is: 1,425
       
    5. AfterImage

      AfterImage Well-Known Member Team Balloon Official Author

      Awarded Medals
      Bro I think you are the only one playing FHRD
       
      TPlacella likes this.
    6. Calculus

      Calculus Community Developer Staff Member Administrator

      Awarded Medals
      Scrolling and commenting do not count towards your hours spent playing the game.
       
      AfterImage likes this.
    7. AfterImage

      AfterImage Well-Known Member Team Balloon Official Author

      Awarded Medals
      That is a fair point. Usually when one says time playing the game they mean the amount of time inside the game, but I can’t argue with that.
       
    8. Calculus

      Calculus Community Developer Staff Member Administrator

      Awarded Medals
      Nevermind. I am writing the script in nodejs because I hate CORS. Hence, you will need to ask me to check your stats, or do it yourself.
       
    9. ItsColinGuys

      ItsColinGuys Well-Known Member Official Author

      wait, youre actually going to commit to making this?

      if so, really cool
       
    10. Calculus

      Calculus Community Developer Staff Member Administrator

      Awarded Medals
      It's no trouble. Plus, I have some spare time.
       
      ItsColinGuys likes this.
    11. ItsColinGuys

      ItsColinGuys Well-Known Member Official Author

      that is actually rly cool, pls ping me when done
       
    12. Calculus

      Calculus Community Developer Staff Member Administrator

      Awarded Medals
      Code:
      import frhd, { Client } from "frhd";
      
      const { getCategory } = frhd;
      
      function format(t) {
          t = parseInt(t, 10);
          let e = Math.floor(t / 6e4)
              , i = (t - 6e4 * e) / 1e3;
          return i = i.toFixed(2),
          10 > e && (e = e),
          10 > i && (i = "0" + i),
          e + ":" + i;
      }
      
      const client = new Client();
      
      client.on("ready", async function() {
          getCategory("recently-added").then(async ({ tracks: [ track ] = [] }) => {
              if (track === void 0) {
                  throw new Error("Something went wrong!");
              }
      
              let total_run_ticks = 0;
              let latest_track_id = parseInt(track.slug);
              for (let t_id = 1001; t_id < latest_track_id; t_id++) {
                  const track = await this.tracks.fetch(t_id).catch((error) => undefined);
                  if (track === void 0) {
                      continue;
                  }
      
                  const [ race ] = await track.races.fetch(this.user.id);
                  if (race === void 0) {
                      continue;
                  }
      
                  total_run_ticks += race.runTicks;
              }
            
              console.log("Total run time: " + format(total_run_ticks));
          }).catch(function(error) {
              throw error;
          });
      });
      
      client.login({
          username: "guest",
          password: "password"
      });
      
       
      RubeGoldberger and ItsColinGuys like this.
    13. ItsColinGuys

      ItsColinGuys Well-Known Member Official Author

      well, where do i put this code, i dont know sh&**T about coding crap
       
    14. Calculus

      Calculus Community Developer Staff Member Administrator

      Awarded Medals
      You'd have to install nodejs, create a folder for your project, type "npm init -y" in the console, set the type in the package.json to module, paste the code in the main JavaScript file which you should've created after creating the folder for your project, and finally, type "node ." in console.
       
    15. ItsColinGuys

      ItsColinGuys Well-Known Member Official Author

      i have nodejs installed ill do it now thx
       
      Calculus likes this.
    16. ItsColinGuys

      ItsColinGuys Well-Known Member Official Author

      like for really man thats insane my man bro
       

    Share This Page