Skip to content

[Script]Top online

Featured Replies

Hello maxcheaters.

  can anyone give me a script for l2jserver that will show 30top online players of  server.

i have try to do it alone but am so newbiew on scripts and i got nothing.

 

Thanks for reading.

SELECT char_name, onlinetime FROM characters ORDER DESC BY onlinetime;

 

Voilà, there's your script.

Don't forget LIMIT 0, 30

  • Author

something like this will work?

i can't test it couse i don't have the files on my pc and i don't want to try it on live server.

	if event == "3" and cantidad_pago >= 0 :
		st.takeItems(Precio_ID,0)
		total_asesinados = 0
		htmltext_ini = "<html><head><title>Top Online info</title></head><body><table width=300><tr><td><font color =\"FF00FF\"></td><td><center><font color =\"FFFF00\">Player</color></center></td><td><center>Time</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		onlinetime = con.prepareStatement("SELECT char_name, onlinetime FROM characters ORDER DESC BY onlinetime;>0 and accesslevel=0 order by pvpkills desc limit 30")
		rs = onlinetime.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_onlinetime = rs.getString("onlinetime")
			pos = pos + 1
			posstr = str(pos)
			if color == 1:
				color_text = "<font color =\"00FFFF\">"
				color = 2
				htmltext_info = htmltext_info + "<tr><td><center><font color =\"FF00FF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_onlinetime + "</center></td></tr>"
			elif color == 2:
				color_text = "<font color =\"FF0000\">"
				color = 1
				htmltext_info = htmltext_info + "<tr><td><center><font color =\"FF00FF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_onlinetime + "</center></td></tr>"
		htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " Online Time.</center></body></html>"
		htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_pklist
	elif event == "3" and cantidad_pago < 0 :
		htmltext = "<html><head><title>Top Online</title></head><body></body></html>"
		return htmltext

Something like that could work. Not the exact script you've posted, though.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.