Jump to content
  • 0

[Script]Top online


Question

Posted

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.

4 answers to this question

Recommended Posts

  • 0
Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..