Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.
Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.

Você não está conectado. Conecte-se ou registre-se

Transformação Por Imagem

Ir para baixo  Mensagem [Página 1 de 1]

1Transformação Por Imagem Empty Transformação Por Imagem Sex Fev 17, 2012 4:26 pm

mrfly

mrfly
Colaborador
Colaborador

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:


Call SendTransNormal

Na picTrans1:


Call SendTransSsj

Na picTrans2:


Call SendTransSsj2

Na picTrans3:


Call SendTransSsj3

Procure por:


Sub SendLeaveParty()
Dim Packet As String

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

Embaixo adicione:

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:


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:


' :::::::::::::::::::::::
' :: 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:


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:


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:


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 :


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, Cool
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:


'Mandar imagens das classes
Call SendClassPicRequest(Index)

É isso. Lembrando que no tutorial não existe transformação para a classe 3.

Ir para o topo  Mensagem [Página 1 de 1]

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