Jump to content
  • 0

[help]Top Online Players


Absolute®

Question

Καλημερα. Θελω να φτιαξω ενα script για τον server μου που να λεει τους πιο Active παιχτες (Top Online) μηπως γινεται κανεις να βοηθησει?

π.χ

#PK Info

	if event == "1" and cantidad_pago >= 0 :
		st.takeItems(Precio_ID,0)
		total_asesinados = 0
		htmltext_ini = "<html><head><title>Pk Info</title></head><body><table width=300><tr><td><font color =\"FF00FF\"></td><td><center><font color =\"FFFF00\">Player</color></center></td><td><center>Kills</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		pks = con.prepareStatement("SELECT char_name,pkkills FROM characters WHERE pkkills>0 and accesslevel=0 order by pkkills desc limit 30")
		rs = pks.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_pkkills = rs.getString("pkkills")
			total_asesinados = total_asesinados + int(char_pkkills)
			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_pkkills + "</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_pkkills + "</center></td></tr>"
		htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " Pk's.</center></body></html>"
		htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_pklist
	elif event == "1" and cantidad_pago < 0 :
		htmltext = "<html><head><title>PK info Online</title></head><body><font color =\"FF0000\">Primero pagame...!! son 0 adenas.</body></html>"
		return htmltext

 

σε αυτον τον τυπο αλλα για τους Top Online του server

 

ευχαριστω για την προσοχη σας :)

περιμενω οπωσδηποτε!!!

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

den kserw an ksexasa kati den to ekana test, se txt to ekana tis allages

#Top Online Info

	if event == "1" 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>Online Time</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		ontime = con.prepareStatement("SELECT char_name,onlinetime FROM characters WHERE accesslevel=0 order by onlinetime desc limit 30")
		rs = ontime.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_ontime = rs.getString("onlinetime")
			total_asesinados = total_asesinados + int(char_ontime)
			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_ontime + "</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_ontime + "</center></td></tr>"
		htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " Pk's.</center></body></html>"
		htmltext_toponlinelist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_toponlinelist
	elif event == "1" and cantidad_pago < 0 :
		htmltext = "<html><head><title>=Online Info</title></head><body><font color =\"FF0000\">Primero pagame...!! son 0 adenas.</body></html>"
		return htmltext

Link to comment
Share on other sites

  • 0

den kserw an ksexasa kati den to ekana test, se txt to ekana tis allages

#Top Online Info

	if event == "1" 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>Online Time</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		ontime = con.prepareStatement("SELECT char_name,onlinetime FROM characters WHERE accesslevel=0 order by onlinetime desc limit 30")
		rs = ontime.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_ontime = rs.getString("onlinetime")
			total_asesinados = total_asesinados + int(char_ontime)
			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_ontime + "</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_ontime + "</center></td></tr>"
		htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " Pk's.</center></body></html>"
		htmltext_toponlinelist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_toponlinelist
	elif event == "1" and cantidad_pago < 0 :
		htmltext = "<html><head><title>=Online Info</title></head><body><font color =\"FF0000\">Primero pagame...!! son 0 adenas.</body></html>"
		return htmltext

θα το δοκιμασω και θα σου πω σε ευχαριστω πολυ

Link to comment
Share on other sites

  • 0

ekei pou leei if event="1"

prepei na to tairiakseis me ton ipolipo kodika

diladi to if event="1" antistixi sto top pk px to event="2" sto top pvp

ara afto 8a prepei na ginei if event = "3" an me katalaves

 

kai an sou einai efkolo kane post olo ton kodika mazi me to eero pou sou evgale

Link to comment
Share on other sites

  • 0

ekei pou leei if event="1"

prepei na to tairiakseis me ton ipolipo kodika

diladi to if event="1" antistixi sto top pk px to event="2" sto top pvp

ara afto 8a prepei na ginei if event = "3" an me katalaves

 

kai an sou einai efkolo kane post olo ton kodika mazi me to eero pou sou evgale

3 το ειχα βαλει μου λεει Script Error

Link to comment
Share on other sites

  • 0

kane ligo post to arxeio me to error na dw pou ekana to la8os

 

 

#Top Online Info

	if event == "1" 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>Online Time</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		ontime = con.prepareStatement("SELECT char_name,onlinetime FROM characters WHERE accesslevel=0 order by onlinetime desc limit 30")
		rs = ontime.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_ontime = rs.getString("onlinetime")
			total_asesinados = total_asesinados + int(char_ontime)
			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_ontime + "</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_ontime + "</center></td></tr>"
		htmltext_end = "</table><center><font color=\"FFFFFF\">" + "A Total of " + str(total_asesinados) + " Pk's.</center></body></html>"
		htmltext_toponlinelist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_toponlinelist
	elif event == "1" and cantidad_pago < 0 :
		htmltext = "<html><head><title>=Online Info</title></head><body><font color =\"FF0000\">Primero pagame...!! son 0 adenas.</body></html>"
		return htmltext

αυτο ειναι το δικο σου

Link to comment
Share on other sites

  • 0

dokimase afto

#Top Online Info

	if event == "1" :
		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>Online Time</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		ontime = con.prepareStatement("SELECT char_name,onlinetime FROM characters WHERE accesslevel=0 order by onlinetime desc limit 30")
		rs = ontime.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_ontime = rs.getString("onlinetime")
			total_asesinados = total_asesinados + int(char_ontime)
			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_ontime + "</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_ontime + "</center></td></tr>"
		htmltext_end = "</table></body></html>"
		htmltext_toponlinelist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_toponlinelist

 

edit

Link to comment
Share on other sites

  • 0

dokimase afto

#Top Online Info

	if event == "1" :
		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>Online Time</center></td></tr>"
		htmltext_info =""			
		color = 1
		pos = 0
		con = L2DatabaseFactory.getInstance().getConnection()
		ontime = con.prepareStatement("SELECT char_name,onlinetime FROM characters WHERE accesslevel=0 order by onlinetime desc limit 30")
		rs = ontime.executeQuery()
		while (rs.next()) :
			char_name = rs.getString("char_name")
			char_ontime = rs.getString("onlinetime")
			total_asesinados = total_asesinados + int(char_ontime)
			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_ontime + "</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_ontime + "</center></td></tr>"
		htmltext_end = "</table></body></html>"
		htmltext_toponlinelist = htmltext_ini + htmltext_info + htmltext_end
		con.close()
		return htmltext_toponlinelist

 

edit

Σε ευχαριστω παρα πολυ

το δοκιμασα και δουλευει jet

εισαι τελειος :Ρ

Link to comment
Share on other sites

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock