The Transformice
Ola Seja Bem Vindo Ao The Transformice

Ajude-nos Se registrando e Rápido e Pratico

O Melhor fórum mDe Transformice
Buscar
 
 

Resultados por:
 


Rechercher Busca avançada

Os membros mais ativos da semana

Adicione o Banner
Últimos assuntos
» DDTank Pirata
Qui Mar 19, 2015 12:34 pm por ShutdownRoot

» Vagas No Forum
Dom Fev 03, 2013 10:06 am por ηikηicius

» Colocando música no cafofo
Ter Jan 29, 2013 5:00 am por ηikηicius

» Novo mice !! SlorkMice
Ter Jan 29, 2013 4:58 am por ηikηicius

» ninjas rapidos
Ter Jan 29, 2013 4:50 am por ηikηicius

» [Manutenção] 25/01
Sex Jan 25, 2013 8:00 pm por ηikηicius

» Comandos Player SQL
Sex Jan 25, 2013 6:25 pm por ηikηicius

» Source 1.61 100% desbugada
Sex Jan 25, 2013 6:24 pm por ηikηicius

» Best Friend Firt
Sex Jan 25, 2013 6:20 pm por ηikηicius

Palavras chave


[MP] Arrumando Ranking

Ir em baixo

[MP] Arrumando Ranking

Mensagem  Universal em Qua Set 26, 2012 5:27 pm

Olá ratolos da área Transformice :O

Venho lhes postar o ranking em forma classment em que muitos gostam, estilo esse: (É igual)




Bem, para colocar esse ranking basta substituir o seu comando "ranking", por esse:

elif event == "classement" or event == "ranking":
# Comando INTERAMENTE criado por Darkangel
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]])


# pega os titulos dos top player
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])])




Isso tudo ae..

Bem, até mais espero que vocês tenham gostado

DEÊM um AGRADECER se gostaram e breve postarei MAIS coisas.
avatar
Universal
Ratinho
Ratinho

Mensagens : 52
Reputação : 2
Data de inscrição : 26/09/2012
Idade : 19

Ver perfil do usuário

Voltar ao Topo Ir em baixo

Voltar ao Topo

- Tópicos similares

 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum