Procurar
Entrar
Últimos assuntos
Top dos mais postadores
Niak (5977) | ||||
qυicкscσρє™ (5569) | ||||
тнєвєєsτ™ (5194) | ||||
Sheik (4936) | ||||
THIΛĞØ (4651) | ||||
HeaD (4252) | ||||
Civilization (4150) | ||||
Stronda (4146) | ||||
Arthur29 (4099) | ||||
ϟ Nunnes (4050) |
Os membros mais ativos do mês
Nenhum usuário |
Alinhando Ranking
2 participantes
Página 1 de 1
Alinhando Ranking
Tutorial
Vá na source, de Ctrl + F e pesquise por "elif event == "ranking": (Sem aspas)
Remova o comando que estava e coloque este:
Aperte F5 e Teste!
Vá na source, de Ctrl + F e pesquise por "elif event == "ranking": (Sem aspas)
Remova o comando que estava e coloque este:
- Código:
elif event == "classement" or event == "ranking":
Userlist = []
dbcur.execute('select name, saves, first, cheese from users')
rrfRows = dbcur.fetchall()
if rrfRows is None:
pass
else:
for rrf in rrfRows:
Userlist.append(rrf)
#Saves
SaveList={}
SaveListDisp=[]
for user in Userlist:
SaveList[user[0]] = user[1]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([1, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([2, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([3, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([4, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([5, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([6, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([7, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([8, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([9, mSL, SaveList[mSL]])
del SaveList[mSL]
mSL=max(SaveList.iterkeys(), key=lambda k: SaveList[k])
SaveListDisp.append([10, mSL, SaveList[mSL]])
del SaveList[mSL]
#Firsts
FirstList={}
FirstListDisp=[]
for user in Userlist:
FirstList[user[0]] = user[2]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([1, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([2, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([3, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([4, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([5, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([6, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([7, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([8, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([9, mSL, FirstList[mSL]])
del FirstList[mSL]
mSL=max(FirstList.iterkeys(), key=lambda k: FirstList[k])
FirstListDisp.append([10, mSL, FirstList[mSL]])
del FirstList[mSL]
#Cheese
CheeseList={}
CheeseListDisp=[]
for user in Userlist:
CheeseList[user[0]] = user[3]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([1, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([2, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([3, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([4, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([5, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([6, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([7, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([8, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([9, mSL, CheeseList[mSL]])
del CheeseList[mSL]
mSL=max(CheeseList.iterkeys(), key=lambda k: CheeseList[k])
CheeseListDisp.append([10, mSL, CheeseList[mSL]])
savetitle0 = self.server.getCurrentTitle(str(SaveListDisp[0][1]))
savetitle1 = self.server.getCurrentTitle(str(SaveListDisp[1][1]))
savetitle2 = self.server.getCurrentTitle(str(SaveListDisp[2][1]))
savetitle3 = self.server.getCurrentTitle(str(SaveListDisp[3][1]))
savetitle4 = self.server.getCurrentTitle(str(SaveListDisp[4][1]))
savetitle5 = self.server.getCurrentTitle(str(SaveListDisp[5][1]))
savetitle6 = self.server.getCurrentTitle(str(SaveListDisp[6][1]))
savetitle7 = self.server.getCurrentTitle(str(SaveListDisp[7][1]))
savetitle8 = self.server.getCurrentTitle(str(SaveListDisp[8][1]))
savetitle9 = self.server.getCurrentTitle(str(SaveListDisp[9][1]))
cheesetitle0 = self.server.getCurrentTitle(str(CheeseListDisp[0][1]))
cheesetitle1 = self.server.getCurrentTitle(str(CheeseListDisp[1][1]))
cheesetitle2 = self.server.getCurrentTitle(str(CheeseListDisp[2][1]))
cheesetitle3 = self.server.getCurrentTitle(str(CheeseListDisp[3][1]))
cheesetitle4 = self.server.getCurrentTitle(str(CheeseListDisp[4][1]))
cheesetitle5 = self.server.getCurrentTitle(str(CheeseListDisp[5][1]))
cheesetitle6 = self.server.getCurrentTitle(str(CheeseListDisp[6][1]))
cheesetitle7 = self.server.getCurrentTitle(str(CheeseListDisp[7][1]))
cheesetitle8 = self.server.getCurrentTitle(str(CheeseListDisp[8][1]))
cheesetitle9 = self.server.getCurrentTitle(str(CheeseListDisp[9][1]))
firsttitle0 = self.server.getCurrentTitle(str(FirstListDisp[0][1]))
firsttitle1 = self.server.getCurrentTitle(str(FirstListDisp[1][1]))
firsttitle2 = self.server.getCurrentTitle(str(FirstListDisp[2][1]))
firsttitle3 = self.server.getCurrentTitle(str(FirstListDisp[3][1]))
firsttitle4 = self.server.getCurrentTitle(str(FirstListDisp[4][1]))
firsttitle5 = self.server.getCurrentTitle(str(FirstListDisp[5][1]))
firsttitle6 = self.server.getCurrentTitle(str(FirstListDisp[6][1]))
firsttitle7 = self.server.getCurrentTitle(str(FirstListDisp[7][1]))
firsttitle8 = self.server.getCurrentTitle(str(FirstListDisp[8][1]))
firsttitle9 = self.server.getCurrentTitle(str(FirstListDisp[9][1]))
self.sendData("\x1A"+"\x0A", [str(SaveListDisp[0][1])+","+str(savetitle0)+","+str(SaveListDisp[0][2])+","+str(SaveListDisp[1][1])+","+str(savetitle1)+","+str(SaveListDisp[1][2])
+","+str(SaveListDisp[2][1])+","+str(savetitle2)+","+str(SaveListDisp[2][2])
+","+str(SaveListDisp[3][1])+","+str(savetitle3)+","+str(SaveListDisp[3][2])
+","+str(SaveListDisp[4][1])+","+str(savetitle4)+","+str(SaveListDisp[4][2])
+","+str(SaveListDisp[5][1])+","+str(savetitle5)+","+str(SaveListDisp[5][2])
+","+str(SaveListDisp[6][1])+","+str(savetitle6)+","+str(SaveListDisp[6][2])
+","+str(SaveListDisp[7][1])+","+str(savetitle7)+","+str(SaveListDisp[7][2])
+","+str(SaveListDisp[8][1])+","+str(savetitle8)+","+str(SaveListDisp[8][2])
+","+str(SaveListDisp[9][1])+","+str(savetitle9)+","+str(SaveListDisp[9][2])
,
str(CheeseListDisp[0][1])+","+str(cheesetitle0)+","+str(CheeseListDisp[0][2])
+","+str(CheeseListDisp[1][1])+","+str(cheesetitle1)+","+str(CheeseListDisp[1][2])
+","+str(CheeseListDisp[2][1])+","+str(cheesetitle2)+","+str(CheeseListDisp[2][2])
+","+str(CheeseListDisp[3][1])+","+str(cheesetitle3)+","+str(CheeseListDisp[3][2])
+","+str(CheeseListDisp[4][1])+","+str(cheesetitle4)+","+str(CheeseListDisp[4][2])
+","+str(CheeseListDisp[5][1])+","+str(cheesetitle5)+","+str(CheeseListDisp[5][2])
+","+str(CheeseListDisp[6][1])+","+str(cheesetitle6)+","+str(CheeseListDisp[6][2])
+","+str(CheeseListDisp[7][1])+","+str(cheesetitle7)+","+str(CheeseListDisp[7][2])
+","+str(CheeseListDisp[8][1])+","+str(cheesetitle8)+","+str(CheeseListDisp[8][2])
+","+str(CheeseListDisp[9][1])+","+str(cheesetitle9)+","+str(CheeseListDisp[9][2])
,
str(FirstListDisp[0][1])+","+str(firsttitle0)+","+str(FirstListDisp[0][2])
+","+str(FirstListDisp[1][1])+","+str(firsttitle1)+","+str(FirstListDisp[1][2])
+","+str(FirstListDisp[2][1])+","+str(firsttitle2)+","+str(FirstListDisp[2][2])
+","+str(FirstListDisp[3][1])+","+str(firsttitle3)+","+str(FirstListDisp[3][2])
+","+str(FirstListDisp[4][1])+","+str(firsttitle4)+","+str(FirstListDisp[4][2])
+","+str(FirstListDisp[5][1])+","+str(firsttitle5)+","+str(FirstListDisp[5][2])
+","+str(FirstListDisp[6][1])+","+str(firsttitle6)+","+str(FirstListDisp[6][2])
+","+str(FirstListDisp[7][1])+","+str(firsttitle7)+","+str(FirstListDisp[7][2])
+","+str(FirstListDisp[8][1])+","+str(firsttitle8)+","+str(FirstListDisp[8][2])
+","+str(FirstListDisp[9][1])+","+str(firsttitle9)+","+str(FirstListDisp[9][2])])
Aperte F5 e Teste!
qυicкscσρє™- Membro Formado
- Mensagens : 5569
Reputação : 2230
Pontos : 4875
Tópicos semelhantes
» Alinhando ranking
» [Tutorial] Alinhando Ranking
» [TUTO] Comando ranking
» [Tutorial] Arrumando Ranking
» [Tutorial] Ranking PK e HERO Acumulativo!
» [Tutorial] Alinhando Ranking
» [TUTO] Comando ranking
» [Tutorial] Arrumando Ranking
» [Tutorial] Ranking PK e HERO Acumulativo!
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
Sáb Ago 24, 2024 9:59 am por Civilization
» [UF] Reinauguração da Universal Fórum
Seg Jul 08, 2024 8:54 pm por Reset
» Reencontro Mensal
Sex Nov 24, 2023 5:04 pm por -Destruidor
» O que VOCÊ faz hoje em dia
Ter Set 05, 2023 11:49 pm por αvαsŧ™
» mais um ano xD
Ter Ago 22, 2023 11:16 am por SouthPark.
» Retorno do Droops.
Qui Mar 09, 2023 6:32 pm por , WallMaster
» 10 anos de Universal Fórum
Ter maio 10, 2022 4:47 pm por Reset
» Saudades rs'
Qui Mar 17, 2022 11:24 pm por HeaD
» Saudades de vocês
Sáb Fev 05, 2022 3:52 pm por -Gui
» Sim... é mais um post de um antigo usuário com saudade do fórum
Qua Nov 17, 2021 9:35 pm por HeaD