Thread: [PI] How do i find a players activity

Results 1 to 9 of 9
  1. #1 [PI] How do i find a players activity 
    Registered Member
    Join Date
    Nov 2013
    Posts
    85
    Thanks given
    4
    Thanks received
    0
    Rep Power
    8
    hi guys how do i find a players activity for the amount of time they have being playing, or can i have the command please? a command would be really appreciated.
    Thanks
    Reply With Quote  
     

  2. #2  
    Member of the Imagine Cult

    Join Date
    Feb 2013
    Posts
    519
    Thanks given
    21
    Thanks received
    7
    Rep Power
    59
    Umm, not possible unless done manually. For example, you can build a system to record that person's client's screen, but I don't know how to do that and I have never seen it done before

    Other best choice is to have a variable in each player's files called "tracked", and set it to false as default.

    Now go into actionhandler, clickingbuttons, and other classes that are intractable, and put something that checks to see if "tracked" is true, and if it is, it records that players action into a certain ".txt" file. And then you can make a command which changes the "tracked" to true, and or false when the command is used with that players name.

    Logging: Google "Log commands site:rune-server.org", copy and paste and change to your liking. Then have this method executed from each class with different directions.
    Command: Make a copy of your "setrights" or "ban" command, and change it to where the instead of "banned = true", it says "tracked = true", and then make one for "tracked = false"

    This is probably the best solution as I don't think there is a think to track exactly what the player is doing, but of course... nothing is impossible
    Reply With Quote  
     

  3. #3  
    Banned [PI] How do i find a players activity Market Banned


    Join Date
    Jan 2011
    Age
    26
    Posts
    3,112
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    are you asking to find out how long a player has been playing?
    Reply With Quote  
     

  4. #4  
    Member of the Imagine Cult

    Join Date
    Feb 2013
    Posts
    519
    Thanks given
    21
    Thanks received
    7
    Rep Power
    59
    Quote Originally Posted by lare96 View Post
    are you asking to find out how long a player has been playing?
    I thought he meant like how to see what the player is doing like "trading at 3pm, clicked object 46 at 4pm" ... and so on Idk
    Reply With Quote  
     

  5. #5  
    Registered Member Tylwr's Avatar
    Join Date
    Jul 2012
    Age
    26
    Posts
    478
    Thanks given
    105
    Thanks received
    42
    Rep Power
    15
    There's a tutorial for this based on the system milliseconds, and converts to min, hours, days. Google it.
    Reply With Quote  
     

  6. #6  
    Registered Member Mont's Avatar
    Join Date
    Oct 2014
    Posts
    32
    Thanks given
    1
    Thanks received
    3
    Rep Power
    6
    Quote Originally Posted by FiveRiverFlo View Post
    Umm, not possible unless done manually. For example, you can build a system to record that person's client's screen, but I don't know how to do that and I have never seen it done before

    Other best choice is to have a variable in each player's files called "tracked", and set it to false as default.

    Now go into actionhandler, clickingbuttons, and other classes that are intractable, and put something that checks to see if "tracked" is true, and if it is, it records that players action into a certain ".txt" file. And then you can make a command which changes the "tracked" to true, and or false when the command is used with that players name.

    Logging: Google "Log commands site:rune-server.org", copy and paste and change to your liking. Then have this method executed from each class with different directions.
    Command: Make a copy of your "setrights" or "ban" command, and change it to where the instead of "banned = true", it says "tracked = true", and then make one for "tracked = false"

    This is probably the best solution as I don't think there is a think to track exactly what the player is doing, but of course... nothing is impossible
    "tracked" - that's not the proper term. Flagging is the term Jagex uses and from their they monitor various things including mouse movement ect.
    The computer industry is the only industry that is more fashion-driven than women's fashion. - DR. Richard Stallman
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Oct 2014
    Posts
    28
    Thanks given
    0
    Thanks received
    9
    Rep Power
    29
    dawntained has a hours online system, download that and use it as a reference.
    Reply With Quote  
     

  8. Thankful user:


  9. #8  
    Registered Member
    Join Date
    Nov 2013
    Posts
    85
    Thanks given
    4
    Thanks received
    0
    Rep Power
    8
    Quote Originally Posted by lare96 View Post
    are you asking to find out how long a player has been playing?
    You seem to be the only one understand, yes I am..

    Anybody know how I can see how longer the player has been playing for?
    Reply With Quote  
     

  10. #9  
    Member of the Imagine Cult

    Join Date
    Feb 2013
    Posts
    519
    Thanks given
    21
    Thanks received
    7
    Rep Power
    59
    Go to your "Client" class and fine:
    Code:
    public void initialize() {
    Look to the bottom of the method for the 'starter'. Most servers already have this, and it is perfect for our purposes.

    Since the starter is only called once, we will find the if statement that checks if the starter has been given, in most cases,
    Code:
    if (addStarter)
    and place
    Code:
    joinTime = System.currentTimeMillis();
    In the statement. This will set joinTime to the time the player created the account.

    Now this method will determine how many minutes you have played so far:
    Code:
    public String getTimesinceJoin()
    	{
    		long millis = System.currentTimeMillis() - joinTime;
    		int minutes = (int) ((millis/ 1000) / 60);
    		return "Has been "+(minutes)+" minutes since the player joined.";
    	}
    This should work if you know how to set it up properly, and yes I did take this out of someone's tutorial and gave it a twist to match your purpose. Hopefully this was helpful.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 04-09-2013, 12:14 AM
  2. Replies: 8
    Last Post: 01-11-2013, 04:54 PM
  3. Replies: 6
    Last Post: 08-08-2011, 11:25 AM
  4. Replies: 3
    Last Post: 07-26-2011, 12:15 PM
  5. [PI] How do I find the source IP?
    By Zebra in forum Help
    Replies: 11
    Last Post: 03-18-2011, 03:22 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •