Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Transformação por Imagem

3 participantes

Ir para baixo

Transformação por Imagem Empty Transformação por Imagem

Mensagem  Pablo Sex Set 21, 2012 6:33 pm

Atentendo ao pedido do Bardock, estou fazendo o tutorial. É algo sistema, porém pode dar trabalho. É um tutorial que ao clicar em uma imagem, você irá se transformar. Neste tutorial, fiz com 3 transformações.

O primeiro passo é criar uma pasta dentro da GFX. Após isso, mude o nome da pasta para Fotos. Agora, crie mais 2 pastas, uma com o nome de Goku e a outra de Vegeta. Lá você coloca 4 fotos para o Goku e 4 na pasta Vegeta:

Client~Side

Agora, vá na frmMirage, crie 4 imagens, com os nomes: picTrans0, picTrans1, picTrans2 e picTrans3.

Dê duplo clique na picTrans0 e adicione:

Código:
Call SendTransNormal
Na picTrans1:

Código:
Call SendTransSsj
Na picTrans2:

Código:
Call SendTransSsj2
Na picTrans3:

Código:
Call SendTransSsj3
Procure por:

Código:
Sub SendLeaveParty()
Dim Packet As String

    Packet = "LEAVEPARTY" & END_CHAR
    Call SendData(Packet)
End Sub
Embaixo adicione:

Código:

Sub SendTransNormal()
Dim Packet As String

    Packet = "TNORMAL" & END_CHAR
    Call SendData(Packet)
End Sub

Sub SendTransSsj()
Dim Packet As String

    Packet = "TSSJ" & END_CHAR
    Call SendData(Packet)
End Sub

Sub SendTransSsj2()
Dim Packet As String

    Packet = "TSSJ2" & END_CHAR
    Call SendData(Packet)
End Sub

Sub SendTransSsj3()
Dim Packet As String

    Packet = "TSSJ3" & END_CHAR
    Call SendData(Packet)
End Sub
Agora procure por:

Código:
    If Parse(0) = "itembreak" Then
        ItemDur(Val(Parse(1))).Item = Val(Parse(2))
        ItemDur(Val(Parse(1))).Dur = Val(Parse(3))
        ItemDur(Val(Parse(1))).done = 1
        Exit Sub
    End If
Embaixo adicione:

Código:
    ' :::::::::::::::::::::::
    ' :: Class Pic request ::
    ' :::::::::::::::::::::::
    If Parse(0) = "classpic" Then
        If GetPlayerClass(MyIndex) = 1 Then
            frmMirage.picTrans0.Picture = LoadPicture(App.Path & "\GFX\Fotos\Goku\0.jpg")
            frmMirage.picTrans1.Picture = LoadPicture(App.Path & "\GFX\Fotos\Goku\1.jpg")
            frmMirage.picTrans2.Picture = LoadPicture(App.Path & "\GFX\Fotos\Goku\2.jpg")
            frmMirage.picTrans3.Picture = LoadPicture(App.Path & "\GFX\Fotos\Goku\3.jpg")
        ElseIf GetPlayerClass(MyIndex) = 2 Then
            frmMirage.picTrans0.Picture = LoadPicture(App.Path & "\GFX\Fotos\Vegeta\0.jpg")
            frmMirage.picTrans1.Picture = LoadPicture(App.Path & "\GFX\Fotos\Vegeta\1.jpg")
            frmMirage.picTrans2.Picture = LoadPicture(App.Path & "\GFX\Fotos\Vegeta\2.jpg")
            frmMirage.picTrans3.Picture = LoadPicture(App.Path & "\GFX\Fotos\Vegeta\3.jpg")
        Else
            frmMirage.picTrans0.Visible = False
            frmMirage.picTrans1.Visible = False
            frmMirage.picTrans2.Visible = False
            frmMirage.picTrans3.Visible = False
        End If
    End If

Server~Side

Procure por:

Código:
        Case "dtrade"
            N = Player(Index).TradePlayer

            ' Check if anyone trade with player
            If N < 1 Then
                Call PlayerMsg(Index, "Ninguém pediu para negociar com você.", Pink)
                Exit Sub
            End If

            Call PlayerMsg(Index, "O pedido de negociação foi rejeitado.", Pink)
            Call PlayerMsg(N, GetPlayerName(Index) & " rejeitou seu pedido de negociação.", Pink)
            Player(Index).TradePlayer = 0
            Player(Index).InTrade = 0
            Player(N).TradePlayer = 0
            Player(N).InTrade = 0
            Exit Sub
Adicione embaixo:

Código:

Case "tnormal"
Call RecebeNor(Index)
Exit Sub
     
        Case "tssj"
Call RecebeSsj(Index)
Exit Sub
     
        Case "tssj2"
Call RecebeSsj2(Index)
Exit Sub
         
      Case "tssj3"
Call RecebeSsj3(Index)
Exit Sub
Agora no final do modServerTCP, adicione:

Código:
Sub SendClassPicRequest(ByVal Index As Long)
    Dim Packet As String

    Packet = "CLASSPIC" & END_CHAR
    Call SendDataTo(Index, Packet)
End Sub
No Final do ModServerTCP Adicione :

Código:
Sub RecebeNor(ByVal Index As Long)

If GetPlayerClass(Index) = 1 Then
            If GetPlayerSprite(Index) = 0 Then
            Exit Sub
                ElseIf GetPlayerSprite(Index) = 1 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 10000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 10000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 10000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 10000)
                    ElseIf GetPlayerSprite(Index) = 2 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 35000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 35000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 35000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 35000)
                ElseIf GetPlayerSprite(Index) = 3 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 85000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 85000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 85000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 85000)
                End If
                Call SetPlayerSprite(Index, 0)
                Call PlayerMsg(Index, "Você voltou ao normal!", BrightBlue)
                Call SendPlayerData(Index)
                ElseIf GetPlayerClass(Index) = 2 Then
                If GetPlayerSprite(Index) = 5 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 10000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 10000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 10000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 10000)
                ElseIf GetPlayerSprite(Index) = 6 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 35000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 35000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 35000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 35000)
                ElseIf GetPlayerSprite(Index) = 7 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 85000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 85000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 85000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 85000)
                End If
                Call SetPlayerSprite(Index, 4)
                Call PlayerMsg(Index, "Você voltou ao normal!", BrightBlue)
                Call BattleMsg(Index, "Normal!", Yellow, 0)
                Call SendPlayerData(Index)
                ElseIf GetPlayerClass(Index) = 3 Then
                If GetPlayerSprite(Index) = 9 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 10000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 10000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 10000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 10000)
                ElseIf GetPlayerSprite(Index) = 10 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 35000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 35000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 35000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 35000)
                ElseIf GetPlayerSprite(Index) = 11 Then
                    Call SetPlayerstr(Index, GetPlayerstr(Index) - 85000)
                    Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 85000)
                    Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 85000)
                    Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) - 85000)
                End If
                Call SetPlayerSprite(Index, 8)
                Call PlayerMsg(Index, "Você voltou ao normal!", BrightBlue)
                Call BattleMsg(Index, "Normal!", Yellow, 0)
                Call SendPlayerData(Index)
                Exit Sub
            End If
           
            Call SavePlayer(Index)
            Call SendStats(Index)
            Call SendPlayerData(Index)
        Exit Sub
End Sub

Sub RecebeSsj(ByVal Index As Long)
If GetPlayerClass(Index) = 1 Then
                If GetPlayerLevel(Index) >= 100 Then
                    If GetPlayerSprite(Index) = 0 Then
                        Call SetPlayerSprite(Index, 1)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 10000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 10000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 10000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 10000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                    End If
                Else
                    Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                End If
            ElseIf GetPlayerClass(Index) = 2 Then
                If GetPlayerLevel(Index) >= 100 Then
                    If GetPlayerSprite(Index) = 4 Then
                        Call SetPlayerSprite(Index, 5)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 10000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 10000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 10000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 10000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                        End If
                    Else
                        Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                    End If
                ElseIf GetPlayerClass(Index) = 3 Then
                If GetPlayerLevel(Index) >= 100 Then
                    If GetPlayerSprite(Index) = 8 Then
                        Call SetPlayerSprite(Index, 9)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 10000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 10000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 10000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 10000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                        End If
                    Else
                        Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                    End If
                Exit Sub
End If
         
            Call SavePlayer(Index)
            Call SendStats(Index)
End Sub

Sub RecebeSsj2(ByVal Index As Long)
If GetPlayerClass(Index) = 1 Then
                If GetPlayerLevel(Index) >= 250 Then
                    If GetPlayerSprite(Index) = 1 Then
                        Call SetPlayerSprite(Index, 2)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 25000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 25000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 25000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 25000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                    End If
                Else
                    Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                End If
            ElseIf GetPlayerClass(Index) = 2 Then
                If GetPlayerLevel(Index) >= 250 Then
                    If GetPlayerSprite(Index) = 5 Then
                        Call SetPlayerSprite(Index, 6)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 25000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 25000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 25000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 25000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                        End If
                    Else
                        Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                    End If
                ElseIf GetPlayerClass(Index) = 3 Then
                If GetPlayerLevel(Index) >= 250 Then
                    If GetPlayerSprite(Index) = 9 Then
                        Call SetPlayerSprite(Index, 10)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 25000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 25000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 25000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 25000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                        End If
                    Else
                        Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                    End If
End If
                Exit Sub
           
            Call SendStats(Index)
            Call SavePlayer(Index)
End Sub

Sub RecebeSsj3(ByVal Index As Long)
If GetPlayerClass(Index) = 1 Then
                If GetPlayerLevel(Index) >= 400 Then
                    If GetPlayerSprite(Index) = 2 Then
                        Call SetPlayerSprite(Index, 3)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 50000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 50000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 50000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                    End If
                Else
                    Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                End If
            ElseIf GetPlayerClass(Index) = 2 Then
                If GetPlayerLevel(Index) >= 400 Then
                    If GetPlayerSprite(Index) = 6 Then
                        Call SetPlayerSprite(Index, 7)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 50000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 50000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 50000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                        End If
                    Else
                        Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                    End If
                ElseIf GetPlayerClass(Index) = 3 Then
                If GetPlayerLevel(Index) >= 400 Then
                    If GetPlayerSprite(Index) = 10 Then
                        Call SetPlayerSprite(Index, 11)
                        Call SetPlayerstr(Index, GetPlayerstr(Index) + 50000)
                        Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50000)
                        Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 50000)
                        Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 50000)
                        Call PlayerMsg(Index, "Você se transformou!", BrightBlue)
                        Call SendPlayerData(Index)
                        End If
                    Else
                        Call PlayerMsg(Index, "Você não tem os requisitos para se transformar!", BrightBlue)
                    End If
End If
                Exit Sub
         
            Call SavePlayer(Index)
            Call SendStats(Index)
End Sub
E para concluir, no final da Sub JoinGame(ByVal Index As Long), Antes do End Sub adicione:


Código:
    'Mandar imagens das classes
    Call SendClassPicRequest(Index)
É isso. Lembrando que no tutorial não existe transformação para a classe 3.

Créditos:

Lenon – Por Fazer o Tutorial
Pablo
Pablo
Admin

Mensagens : 1
Agradecimentos : 1
Data de inscrição : 21/08/2012

http://worldrpgbr.ativoforum.com

Ir para o topo Ir para baixo

Transformação por Imagem Empty Re: Transformação por Imagem

Mensagem  Hades' Sáb Set 22, 2012 2:06 am

Já sabia mais tudo bem né !
+ 1
Hades'
Hades'
Membro
Membro

Mensagens : 34
Agradecimentos : 4
Data de inscrição : 23/08/2012
Idade : 27
Localização : quarto

Ir para o topo Ir para baixo

Transformação por Imagem Empty Re: Transformação por Imagem

Mensagem  Guiinholp Sex Set 28, 2012 7:45 pm

Mais tipo Pablo Se o cara Fika trasformando e destraformando buga os ponto '-' Pelomenos aki deu esse erro '-'
Guiinholp
Guiinholp
Novato
Novato

Mensagens : 7
Agradecimentos : 1
Data de inscrição : 22/08/2012
Idade : 29

Ir para o topo Ir para baixo

Transformação por Imagem Empty Re: Transformação por Imagem

Mensagem  Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo


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