Results 1 to 3 of 3

Thread: exp per hour

  1. #1
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default exp per hour

    Would this be right for calculating exp per hour? cause Im getting 60k + exp per hour with my new fighter.


    Note: these are just some of my procedures. Also Im multiplying strings[25] by 4 because it times the exp in the 15 MINUTE session to get the exp per hour.
    SCAR Code:
    procedure reportexp;
    begin
      writeln('Player Exp per hour (not including hp) : '+players[currentplayer].strings[25]);
     
    end;

    procedure expstarts;
    begin
      //att,str,def,hp exp starts
      players[currentplayer].integers[16] := GetMySkill(0,false); //att
      players[currentplayer].integers[17] := GetMySkill(2,false); //str
      players[currentplayer].integers[18] := GetMySkill(1,false); // def
      players[currentplayer].integers[28] := GetMySkill(3,false); // hp (not included in per hour.
    end;
    procedure calcexp;
    begin
      players[currentplayer].integers[9] := GetMySkill(0,false); //att new
      players[currentplayer].integers[10] := GetMySkill(2,false); //str
      players[currentplayer].integers[11] := GetMySkill(1,false); // def
     
      players[currentplayer].integers[12] := players[currentplayer].integers[9] - players[currentplayer].integers[16]
      players[currentplayer].integers[13] := players[currentplayer].integers[10] - players[currentplayer].integers[17]
      players[currentplayer].integers[14] := players[currentplayer].integers[11] - players[currentplayer].integers[18]
     
      players[currentplayer].strings[25] := inttostr(4 * (players[currentplayer].integers[12] +players[currentplayer].integers[13] + players[currentplayer].integers[18]));

    end;
    I do visit every 2-6 months

  2. #2
    Join Date
    Mar 2009
    Location
    Ireland
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    PerHour := 3600000 div (GetTimeRunning);
    ExpPerHour := (PerHHour * XPGained);
    what this does is calculate the time running, as a fraction of an hour, and multiply by exp gained to get the exp per hour...

    EDIT: Just declare both as integers

  3. #3
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I fixed it, needed to change the 18 in the adding procedure to 14.
    I do visit every 2-6 months

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
  •