Jump to content

Recommended Posts

Posted

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
  • 2 months later...
Posted (edited)

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
  • 8 months later...

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...