Baleog Membro
Mensagens : 9 Moeda : 13 Pontos : 5 Data de inscrição : 18/01/2013 Idade : 31 Localização : Silicon & Synapse
| Assunto: [Tutorial]Char com Raça Sex Jan 18, 2013 4:58 pm | |
| Client~SideVá a frmNewChar, crie um Timer e mude suas propriedades: - Código:
-
(Name) - tmrRaca Enabled - True Interval - 1000 Na frmNewChar, crie 3 (ou mais, depende do seu MMORPG) Check Box, agora renomei-os assim: - Código:
-
chkRaca1 chkRaca2 chkRaca3 Agora de duplo clique no tmrRaca e acressente o seguinte código: - Código:
-
If chkRaca1.Value = Checked Then chkRaca2.Value = Unchecked chkRaca3.Value = Unchecked chkRaca2.Enabled = False chkRaca3.Enabled = False ElseIf chkRaca2.Value = Checked Then chkRaca1.Value = Unchecked chkRaca3.Value = Unchecked chkRaca1.Enabled = False chkRaca3.Enabled = False ElseIf chkRaca3.Value = Checked Then chkRaca1.Value = Unchecked chkRaca2.Value = Unchecked chkRaca1.Enabled = False chkRaca2.Enabled = False End If Vá ao modTypes e procure por: - Citação :
- EmoticonPlayed As Boolean
Dê um Enter e coloque: - Código:
-
Raca As Long Continuando no modTypes, procure por: - Código:
-
Player(Index).EmoticonPlayed = True Abaixo adicione: - Código:
-
Player(Index).Raca = 1 Continuando no modTypes, procure por: - Código:
-
Sub SetPlayerSP(ByVal Index As Long, ByVal SP As Long) Player(Index).SP = SP
If GetPlayerSP(Index) > GetPlayerMaxSP(Index) Then Player(Index).SP = GetPlayerMaxSP(Index) End If End Sub Dê um Enter e coloque: - Código:
-
Function GetPlayerRaca(ByVal Index As Long) As Long GetPlayerRaca = Player(Index).Raca End Function
Sub SetPlayerRaca(ByVal Index As Long, ByVal RacaNum As Long) Player(Index).Raca = RacaNum End Sub Vá ao modGameLogic e procure por: - Código:
-
Case MENU_STATE_ADDCHAR Abaixo adicione: - Código:
-
Dim Raca As Long If frmNewChar.chkRaca1.Value = Checked Then Raca = 1 End If If frmNewChar.chkRaca2.Value = Checked Then Raca = 2 End If If frmNewChar.chkRaca.Value = Checked Then Raca = 3 End If Continuando no modGameLogic, procure por: - Código:
-
frmNewChar.Hide If ConnectToServer = True Then Call SetStatus("Conectado, enviando pedido de criação de personagem...") If frmNewChar.optMale.Value = True Then Call SendAddChar(frmNewChar.txtName, 0, frmNewChar.cmbClass.ListIndex + 1, frmChars.lstChars.ListIndex + 1) Else Call SendAddChar(frmNewChar.txtName, 1, frmNewChar.cmbClass.ListIndex + 1, frmChars.lstChars.ListIndex + 1) End If End If Mude para: - Código:
-
frmNewChar.Hide If ConnectToServer = True Then Call SetStatus("Conectado, enviando pedido de criação de personagem...") If frmNewChar.optMale.Value = True Then Call SendAddChar(frmNewChar.txtName, 0, frmNewChar.cmbClass.ListIndex + 1, frmChars.lstChars.ListIndex + 1, Raca) Else Call SendAddChar(frmNewChar.txtName, 1, frmNewChar.cmbClass.ListIndex + 1, frmChars.lstChars.ListIndex + 1, Raca) End If End If Vá ao modClientTPC e procure por: - Código:
-
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long) Dim Packet As String
Packet = "addachara" & SEP_CHAR & Trim(Name) & SEP_CHAR & Sex & SEP_CHAR & ClassNum & SEP_CHAR & Slot & SEP_CHAR & END_CHAR Call SendData(Packet) End Sub
Mude para: - Código:
-
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long, ByVal Raca As Long) Dim Packet As String
Packet = "addachara" & SEP_CHAR & Trim(Name) & SEP_CHAR & Sex & SEP_CHAR & ClassNum & SEP_CHAR & Slot & SEP_CHAR & Raca & SEP_CHAR & END_CHAR Call SendData(Packet) End Sub Server~SideNo modDataBase, procure por: - Código:
-
Sub AddChar(ByVal Index As Long, _ ByVal Name As String, _ ByVal Sex As Byte, _ ByVal ClassNum As Byte, _ ByVal CharNum As Long, _) Mude para: - Código:
-
Sub AddChar(ByVal Index As Long, _ ByVal Name As String, _ ByVal Sex As Byte, _ ByVal ClassNum As Byte, _ ByVal CharNum As Long, _ ByVal RacaPath As Long) Continuando no modDataBase, procure por: - Código:
-
If Trim$(Player(Index).Char(CharNum).Name) = vbNullString Then Player(Index).CharNum = CharNum Player(Index).Char(CharNum).Name = Name Player(Index).Char(CharNum).Sex = Sex Player(Index).Char(CharNum).Class = ClassNum Mude para: - Código:
-
If Trim$(Player(Index).Char(CharNum).Name) = vbNullString Then Player(Index).CharNum = CharNum Player(Index).Char(CharNum).Name = Name Player(Index).Char(CharNum).Sex = Sex Player(Index).Char(CharNum).Class = ClassNum Player(Index).Char(CharNum).Raca = RacaPath Continuando no modDataBase, procure por: - Código:
-
Call PutVar(FileName, "CHAR" & i, "Guildaccess", STR(Player(Index).Char(i).Guildaccess)) Abaixo adicione: - Código:
-
Call PutVar(FileName, "CHAR" & i, "Raca", STR(Player(Index).Char(i).Raca)) No modTypes, procure por: - Código:
-
' Posição Map As Long x As Byte y As Byte Dir As Byte Friends(1 To MAX_FRIENDS) As String Dê um Enter e adicione: - Código:
-
Raca As Long Continuando no modTypes, procure por: - Código:
-
Emoticon As Long Abaixo adicione: - Código:
-
Raca As Long Continuando no modTypes, procure por: - Código:
-
Player(Index).Char(CharNum).Magi = 0 Abaixo adicione: - Código:
-
Player(Index).Char(CharNum).Raca = 1 Continuando no modTypes, procure por: - Código:
-
Player(Index).Char(i).Magi = 0 Abaixo adicione: - Código:
-
Player(Index).Char(i).Raca = 1 Continuando no modTypes, procure por: - Código:
-
Sub SetPlayerWeaponSlot(ByVal Index As Long, _ InvNum As Long) Player(Index).Char(Player(Index).CharNum).WeaponSlot = InvNum End Sub Dê um Enter e adicione: - Código:
-
Function GetPlayerRaca(ByVal Index As Long) As Long GetPlayerRaca = Player(Index).Char(Player(Index).CharNum).Raca End Function
Sub SetPlayerRaca(ByVal Index As Long, _ ByVal RacaNum As Long) Player(Index).Char(Player(Index).CharNum).Raca = RacaNum End Sub Vá ao clsCommandse procure por: - Código:
-
Private Declare Function GetPrivateProfileString& Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal ReturnedString$, ByVal RSSize&, ByVal FileName$)
Dê Enter e adicione: - Código:
-
Function GetPlayerRaca(ByVal Index As Long) As Long GetPlayerRaca = Player(Index).Char(Player(Index).CharNum).Raca End Function
Sub SetPlayerRaca(ByVal Index As Long, _ ByVal RacaNum As Long) Player(Index).Char(Player(Index).CharNum).Raca = RacaNum End Sub Vá ao modServerTPC e procure por: - Código:
-
Case "addachara" Name = Parse(1) Sex = Val(Parse(2)) Class = Val(Parse(3)) CharNum = Val(Parse(4)) Mude para: - Código:
-
Case "addachara" Dim RacaPath As Long Name = Parse(1) Sex = Val(Parse(2)) Class = Val(Parse(3)) CharNum = Val(Parse(4)) RacaPath = Val(Parse(5)) Continuando no modServerTPC, procure por: - Código:
-
Call AddChar(Index, Name, Sex, Class, CharNum) Mude para: - Código:
-
Call AddChar(Index, Name, Sex, Class, CharNum, RacaPath) Tutorial terminado Espero que tenham gostado, caso dê errado, foi porque você fez algo errado... Créditos: ~ Lenon ~ Eu | |
|
Sonart Admin
Mensagens : 118 Moeda : 195 Pontos : 25 Data de inscrição : 08/01/2013 Idade : 28
Ficha de personagem Experiência: (0/0) Avatar: https://2img.net/h/oi63.tinypic.com/14tr6m8.png
| Assunto: Re: [Tutorial]Char com Raça Sex Jan 18, 2013 7:27 pm | |
| Muito interessante... vó testar +1 ;D | |
|
Renanr Membro
Mensagens : 19 Moeda : 31 Pontos : 5 Data de inscrição : 17/01/2013
| Assunto: Re: [Tutorial]Char com Raça Sex Jan 18, 2013 9:44 pm | |
| Um bom sistema para jogos medievais tipo raça. Ou até alguns dbzs .. +1 por ajudar o fórum trazendo mais um sistema =) | |
|
SSO Moderador.G
Mensagens : 83 Moeda : 117 Pontos : 6 Data de inscrição : 06/01/2013
| Assunto: Re: [Tutorial]Char com Raça Sex Jan 18, 2013 10:06 pm | |
| Obrigado por compartilhar . +1 de credito | |
|
Conteúdo patrocinado
| Assunto: Re: [Tutorial]Char com Raça | |
| |
|