Jump to content

Server Online Users Highest Peak 1.0


JayPee

Recommended Posts


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

Script Name: Server Online Users Highest Peak

Description: This script will determine your server highest peak of number of user onlines.

Version: 1.0

Requirements: You must have this:http://rathena.org/board/files/file/2339-fluxcp-addson-server-online-users-highest-peak/


//====================================================================================
//Script Name: Server Online Users Highest Peak
//SVN: Tested in rAthena r156513
//Developed By: JayPee Mateo
//Version: 1.0
//Requirement(s): FluxCP Server Highest Addon
//Description: This npc script will record the highest number of players that your server reach
//====================================================================================
- script Highest Peak -,{

OnPCLoginEvent:


set .currentUsersOL,getusers(1); //Current Online Users

//Query for the highest peak in the database
query_sql("SELECT `num_users` FROM `cp_highest_peak` ORDER BY `num_users` LIMIT 1",.@numUsers);
//Get the date
set .date$,gettime(7)+"-"+gettime(6)+"-"+gettime(5); 

set .highestPeak,.@numUsers[0]; //Highest Peak
if(getarraysize(.@numUsers) == 0)
{
//If not data found Insert statement
set .highestPeak,.currentUsersOL;
query_sql("INSERT INTO `cp_highest_peak`(num_users,peak_date) VALUES("+.highestPeak+",'"+.date$+"')"); //Insert new highest Peak
}
else
{
if(.currentUsersOL>.highestPeak)
{
announce ""+.currentUsersOL,bc_all;
set .highestPeak,.currentUsersOL; 
query_sql("UPDATE `cp_highest_peak`SET num_users='"+.highestPeak+"',peak_date='"+.date$+"'"); //Insert new highest Peak
}
}
end;

}

  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  145
  • Reputation:   14
  • Joined:  04/28/12
  • Last Seen:  

nice , I'll use this, thanks mr. Jaypee , kudos ~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Do I need to add any tables to my myphpadmin for this to work? I have never actually messed with sql in scripts.

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

How about putting it on a simple website not flux?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Honestly making a new webpage would probably work if I could seem to get it to work! I have tried just adding a webpage with no success.

Peopleperson49

***Sorry the second part of this message (now deleted) was actually for another message! My fingers type more than they were spost to!***

Edited by peopleperson49
Link to comment
Share on other sites

  • 8 months later...

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  308
  • Reputation:   24
  • Joined:  11/26/12
  • Last Seen:  

is there any script that PLAYER ONLINE and PEAK together? /ok

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...