Jump to content

Gildartsthegreat

Members
  • Joined

  • Last visited

Everything posted by Gildartsthegreat

  1. Gildartsthegreat replied to Jack's post in a topic in 317
    thank you for this
  2. thanks will definatly check this out
  3. oo thanks ive been looking for this
  4. Gildartsthegreat replied to androkles's post in a topic in 317
    nice
  5. Gildartsthegreat replied to Tiller's post in a topic in OSRS
    tyty
  6. tyty
  7. xBox only cos of the controller
  8. Gildartsthegreat replied to thorpey's post in a topic in Introductions
    Welcome bro gl!
  9. Gildartsthegreat replied to AusDan's post in a topic in Introductions
    Welcome mate, hope you meet your goals here!
  10. Gildartsthegreat replied to FuckRSPSItSucks's post in a topic in Introductions
    welcome
  11. Gildartsthegreat replied to Gildartsthegreat's post in a topic in Introductions
    thanks guys
  12. Thank you!
  13. Gildartsthegreat replied to Seven's post in a topic in General Discussion
    maybe this but anything RSPS related https://www.rune-server.ee/black-market/virtual-items/selling/680400-displees-interface-editor.html
  14. This is a quick release/tutorial on getting 'Time Played' on a Valius or Vencillio base, only reason im posting it is because I haven't seen anyone release something like this and its my own work. I am OneTrueGodTet on R-S this is my work, Just wanted to post it here as well seeing as im new and not everyone may have access to it there https://www.rune-server.ee/runescape-development/rs2-server/tutorials/681945-vencillio-valius-time-played.htmlI'm not saying its perfect or that it dosen't need some tender love and care but here ya go.in rs2\entitiy\playerPlayer.java add the following imports: import com.mayhem.rs2.entity.player.net.TimePlayed import java.util.concurrent.TimeUnit; and add the following under: public class Player extends Entity { private TimePlayed time = new TimePlayed(this); public TimePlayed getTimePlayed(){ return time; } public long timePlayed; And still in Player.java add the following under: public void setShopCollection(long shopCollection) { public void setTimePlayed(long timePlayed) { this.timePlayed = timePlayed; } Next in rs2\entitiy\player\net Create a class called Timeplayed.java and add the following package com.mayhem.rs2.entity.player.net;import java.util.Calendar; import java.util.Date; import com.mayhem.rs2.entity.player.Player; import com.mayhem.rs2.entity.player.net.Client; public class TimePlayed { /** * The player */ private final Player player; /** * Initialized the start date */ private Calendar start = Calendar.getInstance(); /** *Initialized the end date */ private Calendar end = Calendar.getInstance(); /** * Constructor for the time played class * @param player - The player */ public TimePlayed(final Player player){ this.player = player; } /** * Records when the player logs in */ public void initilizeNewStart(){ start.setTime(new Date()); } /** * Records when the player logs out. */ public void initilizeNewEnd(){ end.setTime(new Date()); } /** * Gets the players start date * @return - the start date */ public Calendar getStartDate(){ return start; } /** * Gets the players end date * @return - The end date */ public Calendar getEndDate(){ return end; } /** * Gets the length of time that the player was logged in for * @return - Time */ public long getCurrentSession(){ return end.getTimeInMillis() - start.getTimeInMillis(); } /** * Formats the long into a time format * @return - The new format */ public String formatPlayersTime(){ long minute = (player.timePlayed / (1000 * 60)) % 60; long hour = (player.timePlayed / (1000 * 60 * 60)) % 24; long day = (player.timePlayed / (1000 * 60 * 60 * 24)); String format = day + " days " + hour + " hours " + minute + " min"; return format; } } Next step is optional i guess in playercommand.java add the following command case "playtime": { player.getTimePlayed().initilizeNewEnd(); player.timePlayed += player.getTimePlayed().getCurrentSession(); player.getTimePlayed().initilizeNewStart(); player.send(new SendMessage("You have played for @red@ " + player.getTimePlayed().formatPlayersTime())); } and add the following in CommandInterface.java "::playtime - updates and displays current playtime" in Playersave.java found in rs2\content\io: look for: public PlayerDetails(Player player) { and somewhere under that up to you add: timePlayed = (player.timePlayed + player.getTimePlayed().getCurrentSession()); Lastly in InformationTab.java, rs2\content\interfaces\impl\Quest Under "<col=ff9040>Online Staff: <col=75C934>" + World.getStaff(), Add "<col=ff9040>Time Played: <col=75C934>", "<col=75C934>" + player.getTimePlayed().formatPlayersTime(), Well thats it you should be able to get a decent working time played from that any criticism or improvements are welcome! If you found this helpful please leave a thanks or a rep+
  15. Gildartsthegreat posted a post in a topic in Introductions
    Hi guys, just recently got into coding and hosting my own project called TeraPS, im 23 years old live in London and enjoy playing a bit of BasketBall in my spare time.