Ir para conteúdo
  • Cadastre-se
  • 0

Online time ranking.


Nuno Wust

Pergunta

Pessoal como vocês podem vir na print abaixo:

kz9df7X.png ...

 

Quero inverter para dia, horas e minutos online... é possivel? Segue a script abaixo:

 

---------------------------------------------------------

 

if event == "122" and count >= 10000 :
st.takeItems(ADENA_ID,10000)
htmltext_ini = "<html><head><title>Time Online Info</title></head><body><table width=300><tr><td><font color =\"FFFFFF\">Pos.</td><td><center><font color =\"FFFFFF\">*** Player ***</color></center></td><td><center>*** Time ***</center></td></tr>"
htmltext_info =""
color = 1
pos = 0
con = L2DatabaseFactory.getInstance().getConnection()
pks = con.prepareStatement("SELECT char_name,onlinetime FROM characters WHERE onlinetime>0 and accesslevel=0 order by onlinetime desc limit 1000000")
rs = pks.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 =\"FFFFFF\">"
color = 2
htmltext_info = htmltext_info + "<tr><td><center><font color =\"FFFFFF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_onlinetime + "</center></td></tr>"
elif color == 2:
color_text = "<font color =\"FFFFFF\">"
color = 1
htmltext_info = htmltext_info + "<tr><td><center><font color =\"FFFFFF\">" + posstr + "</td><td><center>" + color_text + char_name +"</center></td><td><center>" + char_onlinetime + "</center></td></tr>"
htmltext_end = ""
htmltext_pklist = htmltext_ini + htmltext_info + htmltext_end
con.close()
return htmltext_pklist
elif event == "122" and count >= 10000 :
htmltext = ""
return htmltext
-----------------------------------------------------------------------
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts recomendados


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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...




×
×
  • Criar Novo...

Important Information

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.