Convidado Convidado
| Assunto: Ranking De Level (ate 5 pessoas ) Dom 12 Set 2010, 21:33 | |
| Abra o Client~Sidepra começar tudo precisamos abrir o Ranking, então crie um botão e dentro dele Adicione - Código:
-
If PicLevel.Visible = True Then PicLevel.Visible = False frmMainMenu.lstLEVEL.Clear Else PicLevel.Visible = True Call SendData("level" & SEP_CHAR & END_CHAR) End If Primeiro Crie uma Picture na frmMainMenu com o nome PicLevel e dentro dela uma ListBox com o nome lstLEVEL Em seguida Procure por: - Código:
-
If casestring = "allchars" Then
n = 1
frmChars.Visible = True frmSendGetData.Visible = False
frmChars.lstChars.Clear
For i = 1 To MAX_CHARS Name = parse(n) Msg = parse(n + 1) Level = Val(parse(n + 2))
If Trim$(Name) = vbNullString Then frmChars.lstChars.addItem "Free Character Slot" Else frmChars.lstChars.addItem Name & " a level " & Level & " " & Msg End If
n = n + 3 Next i
frmChars.lstChars.ListIndex = 0
Exit Sub End If Abaixo Adicione - Código:
-
If Parse(0) = "level" Then frmMainMenu.lstLEVEL.AddItem (Parse(1) & " Level:" & Parse(2)) frmMainMenu.lstLEVEL.AddItem (Parse(3) & " Level:" & Parse(4)) frmMainMenu.lstLEVEL.AddItem (Parse(5) & " Level:" & Parse(6)) frmMainMenu.lstLEVEL.AddItem (Parse(7) & " Level:" & Parse(8)) frmMainMenu.lstLEVEL.AddItem (Parse(9) & " Level:" & Parse(10)) frmMainMenu.PicLevel.Visible = True Exit Sub End If agora no Server~SideProcure por - Código:
-
Case "acclogin" Call Packet_AccountLogin(Index, Parse(1), Parse(2), Val(Parse(3)), Val(Parse(4)), Val(Parse(5)), Parse(6)) Exit Sub Abaixo Adicione - Código:
-
Case "level" Call SendDataTo(Index, "level" & SEP_CHAR & GetVar(App.Path & "\Level.ini", "1", "Nome") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "1", "Level") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "2", "Nome") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "2", "Level") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "3", "Nome") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "3", "Level") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "4", "Nome") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "4", "Level") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "5", "Nome") & SEP_CHAR & GetVar(App.Path & "\Level.ini", "5", "Level") & SEP_CHAR & END_CHAR) Exit Sub Agora procure por - Código:
-
Sub CheckPlayerLEvelUp Lá no final desta sub adicione - Código:
-
If GetPlayerLevel(Index) > Val(ReadINI("1", "Level", App.Path & "\Level.ini")) Then Call WriteINI("1", "Nome", GetPlayerName(Index), App.Path & "\Level.ini") Call WriteINI("1", "Level", GetPlayerLevel(Index), App.Path & "\Level.ini") Call WriteINI("3", "Nome", Val(ReadINI("2", "Nome", App.Path & "\Level.ini")), App.Path & "\Level.ini") Call WriteINI("3", "Level", Val(ReadINI("2", "Level", App.Path & "\Level.ini")), App.Path & "\Level.ini") Call WriteINI("2", "Nome", Val(ReadINI("1", "Nome", App.Path & "\Level.ini")), App.Path & "\Level.ini") Call WriteINI("2", "Level", Val(ReadINI("1", "Level", App.Path & "\Level.ini")), App.Path & "\Level.ini") End If If GetPlayerLevel(Index) > Val(ReadINI("2", "Level", App.Path & "\Level.ini")) Then Call WriteINI("3", "Nome", Val(ReadINI("2", "Nome", App.Path & "\Level.ini")), App.Path & "\Level.ini") Call WriteINI("3", "Level", Val(ReadINI("2", "Level", App.Path & "\Level.ini")), App.Path & "\Level.ini") Call WriteINI("2", "Nome", GetPlayerName(Index), App.Path & "\Level.ini") Call WriteINI("2", "Level", GetPlayerLevel(Index), App.Path & "\Level.ini") End If If GetPlayerLevel(Index) > Val(ReadINI("3", "Level", App.Path & "\Level.ini")) Then Call WriteINI("3", "Nome", GetPlayerName(Index), App.Path & "\Level.ini") Call WriteINI("3", "Level", GetPlayerLevel(Index), App.Path & "\Level.ini") End If Exit Sub Em seguida crie um Arquivo com o nome Level.ini e o conteudo - Código:
-
[1] Nome=Tio Lucas :P Level=100 [2] Nome=Tio Lendario :P Level=100 [3] Nome=Tio Boas :P Level=100 [4] Nome=Tio Hatakki :P Level=100 [5] Nome=Tio Lopo :P Level=100 Pronto seu Ranking automático está pronto Como Usar: Aperte o botão que colocou na frmMainMenu e Tchan! Crédito: Boafesta Por fazer o Ranking Crédito: Lucas Lopo Por adaptar para Eclipse e para o MainMenu e agora com ate 5 ou mais players no ranking xD Crédito: Lendario Por tirar o bug do botao ^^ Crédito: Thalesbliss Por Postar. [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem] |
|
Lucas Roberto Administrador
Mensagens : 711
| |