Transformação por Imagem
3 participantes
:: Elysium Engine :: Tutoriais
Página 1 de 1
Transformação por Imagem
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:
Na picTrans1:
- Código:
Call SendTransNormal
Na picTrans2:
- Código:
Call SendTransSsj
Na picTrans3:
- Código:
Call SendTransSsj2
Procure por:
- Código:
Call SendTransSsj3
Embaixo adicione:
- Código:
Sub SendLeaveParty()
Dim Packet As String
Packet = "LEAVEPARTY" & END_CHAR
Call SendData(Packet)
End SubAgora procure por:
- 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 SubEmbaixo adicione:
- 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
- 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:Adicione embaixo:
- 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 SubAgora no final do modServerTCP, adicione:
- 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 SubNo 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 SubE para concluir, no final da Sub JoinGame(ByVal Index As Long), Antes do End Sub 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É isso. Lembrando que no tutorial não existe transformação para a classe 3.
- Código:
'Mandar imagens das classes
Call SendClassPicRequest(Index)
Créditos:
Lenon – Por Fazer o Tutorial
Re: Transformação por Imagem
Já sabia mais tudo bem né !
+ 1
+ 1
Hades'- Membro
- Mensagens : 34
Agradecimentos : 4
Data de inscrição : 23/08/2012
Idade : 27
Localização : quarto
Re: Transformação por Imagem
Mais tipo Pablo Se o cara Fika trasformando e destraformando buga os ponto '-' Pelomenos aki deu esse erro '-'
Guiinholp- Novato
- Mensagens : 7
Agradecimentos : 1
Data de inscrição : 22/08/2012
Idade : 29
:: Elysium Engine :: Tutoriais
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
Seg Abr 08, 2013 7:18 pm por L Mars
» PlayGame chego !!
Qua Out 17, 2012 1:59 pm por PlayGame
» Dragon Ball Z Moster Online
Ter Out 16, 2012 8:19 pm por Myke ~
» [EEB]Sistema de Guerra ninja Basic Por ComandButton
Ter Out 16, 2012 8:14 pm por Myke ~
» Meus tutorias
Dom Out 14, 2012 4:55 pm por PlayGame
» Avaliem esse's desenho
Dom Out 14, 2012 4:36 pm por PlayGame
» Tutorial Mapper - Como avaliar um mapa
Sáb Out 13, 2012 4:52 pm por NeeTo
» Movimentação Wasd e Setas V2.0
Qui Out 11, 2012 6:14 pm por Myke ~
» Level Maximo 1000
Qui Out 11, 2012 6:10 pm por Myke ~