Desineria RPG Maker
Você esta conectado na Desineria RPG Maker!

Participe do fórum, é rápido e fácil

Desineria RPG Maker
Você esta conectado na Desineria RPG Maker!
Desineria RPG Maker
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Transformação por imagem bom para jogos de pokemon etc.

Ir para baixo

Transformação por imagem bom para jogos de pokemon etc. Empty Transformação por imagem bom para jogos de pokemon etc.

Mensagem  wesleyhero Qui Nov 03, 2011 5:46 pm

Começando

Va na pasta data files\graphics\ e crie uma nova pasta chamada imagens e dentro dela adicione 2 fotos uma com nome "normal" e outra com nome "trans", sem aspas

Client~Side

Na frmMain crie 2 picture box com as configurações:


Picture1

Name: picNormal

Picture2

Name: picTrans


Dentro da picNormal adicione:
Código:
    Call SendNormal

E dentro da picTrans adicione:
Código:
    Call SendTrans

E agora no final do modClientTcp adicione:
Código:
Public Sub SendNormal()
    Dim Buffer As clsBuffer
    Set Buffer = New clsBuffer
   
    Buffer.WriteLong CNormal
   
    SendData Buffer.ToArray()
    Set Buffer = Nothing
End Sub

Public Sub SendTrans()
    Dim Buffer As clsBuffer
    Set Buffer = New clsBuffer
   
    Buffer.WriteLong CTrans
   
    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:
    CNormal
    CTrans

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.picNormal.Picture = LoadPicture(App.Path & "\data files\graphics\imagens\normal.bmp")
        frmMain.picTrans.Picture = LoadPicture(App.Path & "\data files\graphics\imagens\trans.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(CNormal) = GetAddress(AddressOf HandleNormal)
    HandleDataSub(CTrans) = GetAddress(AddressOf HandleTrans)

E no final do modHandleData adicione:
Código:
Sub HandleNormal(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim Buffer As clsBuffer
   
    If GetPlayerSprite(Index) = 2 Then
        If GetPlayerClass(Index) = 1 Then
            Call SetPlayerSprite(Index, 1)
            Call SetPlayerStat(Index, Stats.Strength, GetPlayerRawStat(Index, Stats.Strength) - 1)
            Call SetPlayerStat(Index, Stats.Endurance, GetPlayerRawStat(Index, Stats.Endurance) - 1)
        End If
    End If
   
    Set Buffer = Nothing
End Sub

Sub HandleTrans(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim Buffer As clsBuffer
   
    If GetPlayerSprite(Index) = 1 Then
        If GetPlayerClass(Index) = 1 Then
            Call SetPlayerSprite(Index, 2)
            Call SetPlayerStat(Index, Stats.Strength, GetPlayerRawStat(Index, Stats.Strength) + 1)
            Call SetPlayerStat(Index, Stats.Endurance, GetPlayerRawStat(Index, Stats.Endurance) + 1)
        End If
    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:
    CNormal
    CTrans

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)

espero que ajude no jogo de vcs se gostou clika no + ^^

depois quando tiver tem po postarei imagens ^^
wesleyhero
wesleyhero
Moderador Global
Moderador Global

Mensagens : 11
Pontos : 33
Reputação : 9
Data de inscrição : 02/11/2011

Desineria RPG Maker
Nível de atividade Nível de atividade:
Transformação por imagem bom para jogos de pokemon etc. Left_bar_bleue34/1000Transformação por imagem bom para jogos de pokemon etc. Empty_bar_bleue  (34/1000)

Ir para o topo Ir para baixo

Ir para o topo


 
Permissões neste sub-fórum
Não podes responder a tópicos