BobosFTW Posted October 22, 2013 Posted October 22, 2013 Hey guys i would like to ask if anyone has a code so we can record MOST PLAYERS online ever on server.. i am using acis latest version and i want to put it on a info window when ur char logs but i dont have the code.. can anyone help me"?
0 BobosFTW Posted October 22, 2013 Author Posted October 22, 2013 its ok some1 pmed me with the code :) thnx for the help.. lock plz
0 Tryskell Posted October 22, 2013 Posted October 22, 2013 If the code isn't private/protected/whatever, you could post it here or create a Shares topic and point the link on that topic. It would eventually help others people who also search that feature. Ask to the code owner first, or ask the code owner to make it himself if he agrees.
0 xdem Posted October 22, 2013 Posted October 22, 2013 (edited) int maxOnlinePrev; @Override public void run() { Connection con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT online FROM maxOnlineTable"); ResultSet rset = statement.executeQuery(); maxOnlinePrev = rset.getInt("online"); statement.close(); rset.close(); if (maxOnlinePrev < L2World.getInstance().getAllPlayers().size) con.createStatement().executeUpdate("UPDATE maxOnlineTable SET online ="+ L2World.getInstance().getAllPlayers().size); con.close() } handwritten, there are possible mistakes, but this is the basic structure... You could work with your RAM too to avoid db connections in tasks but that demands edits on GS.java and shutdown.java so I avoided it Edited October 22, 2013 by xdem
Question
BobosFTW
Hey guys i would like to ask if anyone has a code so we can record MOST PLAYERS online ever on server.. i am using acis latest version and i want to put it on a info window when ur char logs but i dont have the code.. can anyone help me"?
3 answers to this question
Recommended Posts