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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   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...