Convidado Convidado
| Assunto: Teleport por Imagem Sáb 05 Nov 2011, 22:51 | |
| Nome do Sistema: Teleport por ImagemNível de Dificuldade: 3/5Usa-se:Visual Basic 6.0Começando
Va na pasta data files\graphics\ e crie uma nova pasta chamada imagens e dentro dela adicione 2 fotos uma com nome "1" , "2" sem aspas
Client~Side
Na frmMain crie 2 picture box com as configurações:
- Citação :
- Picture1
Name: picTele1
Picture2
Name: picTele2
Dentro da picTele1 adicione:
- Código:
-
Call SendTele1
E dentro da picTele2 adicione:
- Código:
-
Call SendTele2
E agora no final do modClientTcp adicione:
- Código:
-
Public Sub SendTele1() Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong CTele1 SendData Buffer.ToArray() Set Buffer = Nothing End Sub
Public Sub SendTele2() Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong CTele2 SendData Buffer.ToArray() Set Buffer = Nothing End Sub
Em modEnumerations ache:
- Código:
-
' Make sure CMSG_COUNT is below everything else CMSG_COUNT
E em cima adicione:
- Código:
-
CTele1 CTele2
Agora procure por:
- Código:
-
' Make sure SMSG_COUNT is below everything else SMSG_COUNT
E acima adicione:
- Código:
-
SImagens
Procure por:
- Código:
-
HandleDataSub(SPartyVitals) = GetAddress(AddressOf HandlePartyVitals)
E abaixo adicione:
- Código:
-
HandleDataSub(SImagens) = GetAddress(AddressOf HandleImagens)
Agora no final do modHandleData adicione:
- Código:
-
Private Sub HandleImagens(ByVal Index As Long, ByRef Data() As Byte, ByVal EditorIndex As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer
If GetPlayerClass(Index) = 1 Then frmMain.picTele1.Picture = LoadPicture(App.Path & "\data files\graphics\imagens\1.bmp") frmMain.picTele2.Picture = LoadPicture(App.Path & "\data files\graphics\imagens\2.bmp") ElseIf GetPlayerClass(Index) = 2 Then ' Aqui é se vocÊ quiser pro mais classes End If
Set Buffer = Nothing End Sub
Serve~Side
Procure por:
- Código:
-
HandleDataSub(CPartyLeave) = GetAddress(AddressOf HandlePartyLeave)
E abaixo adicione:
- Código:
-
HandleDataSub(CTele1) = GetAddress(AddressOf HandleTele1) HandleDataSub(CTele2) = GetAddress(AddressOf HandleTele2 )
E no final do modHandleData adicione:
- Código:
-
Sub HandleTele1(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer If GetPlayerLevel(Index) >= 10 Then Call PlayerWarp(Index, 1, 2, 3) ' 1 é o mapa, 2 o X do mapa e 3 o Y do mapa End If Set Buffer = Nothing End Sub
Sub HandleTele2(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer If GetPlayerLevel(Index) >= 10 Then Call PlayerWarp(Index, 1, 2, 3) ' 1 é o mapa, 2 o X do mapa e 3 o Y do mapa End If Set Buffer = Nothing End Sub
Em modEnumerations ache:
- Código:
-
' Make sure CMSG_COUNT is below everything else CMSG_COUNT
E em cima adicione:
- Código:
-
CTele1 CTele2
Agora procure por:
- Código:
-
' Make sure SMSG_COUNT is below everything else SMSG_COUNT
E acima adicione:
- Código:
-
SImagens E no final do modServeTcp adicione:
- Código:
-
Sub SendImagens(ByVal Index As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SImagens SendDataToMap GetPlayerMap(Index), Buffer.ToArray() Set Buffer = Nothing End Sub
Procure por:
- Código:
-
Call SendHotbar(Index)
E abaixo adicione:
- Código:
-
Call SendImagens(Index)
Creditos:
Ricardo(por criar o sistema) e jadiel848 (por disponibilizar aqui no Fórum) |
|
Convidado Convidado
| Assunto: Re: Teleport por Imagem Sáb 05 Nov 2011, 22:53 | |
| Legal o tutorial ! Valeu. |
|
Convidado Convidado
| Assunto: Re: Teleport por Imagem Dom 06 Nov 2011, 08:36 | |
| Da pra apaga meus tutos, meus tutos eu que posto viu... |
|
Conteúdo patrocinado
| Assunto: Re: Teleport por Imagem | |
| |
|