Aqui,esse sisteminha serve pra você se transformar por comando.É a base de Sprite e dbz soh pra amostra.
Dentro do script tem tudo explicado.Fiz como exemplo 2 Personagens e 2 transformações(ssj e ssj2)
Créditos DENTRO do script
Client~
procure por
em baixo adicioneSelect Case Command(0)
Case "/ssj"
Trans 1
Case "/ssj2"
Trans 2
Case "/normal"
Normal
no ModClientTCP,lá no final
adicione
Sub Trans(ByVal Trans As Byte)
Dim Buffer As clsBuffer
Set Buffer = New clsBuffer
Buffer.WriteLong CTrans
Buffer.WriteByte Trans
SendData Buffer.ToArray()
Set Buffer = Nothing
'dshfox
'OhYehBeibi.Blogspot.com
'OhYehBeibi.Webs.Com
End Sub
Sub Normal()
Dim Buffer As clsBuffer
Set Buffer = New clsBuffer
Buffer.WriteLong CVoltarNormal
SendData Buffer.ToArray()
Set Buffer = Nothing
'dshfox
'OhYehBeibi.Blogspot.com
'OhYehBeibi.Webs.Com
End Sub
no modEnumerations,procure por
em baixo coloquecuntradeitem
CTrans
CVoltarNormal
Client Acabado
Server~
procure por
em baixo adicioneHandleDataSub(CUntradeItem) = GetAddress(AddressOf HandleUntradeItem)
HandleDataSub(CTrans) = GetAddress(AddressOf HandleTransformação)
HandleDataSub(CVoltarNormal) = GetAddress(AddressOf HandleVoltarNormal)
la no final desse Módulo(handledata)
coloque essas subs
Sub HandleTransformação(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
'DshFox
'OhYehBeibi.Webs.Com
'OhYehBeibi.Blogspot.com
Dim Buffer As clsBuffer
Dim trans As Byte
Set Buffer = New clsBuffer
Buffer.WriteBytes Data()
trans = Buffer.ReadByte
Set Buffer = Nothing
Select Case trans
Case 1 'SJJ
'===========
'Trans do Goku
'=============
If GetPlayerSprite(Index) = 1 Then 'sprite goku normal
If GetPlayerLevel(Index) >= 5 Then ' se tiver lvl 5
SetPlayerSprite Index, 2 'sprite do goku ssj
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) + 30
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) + 30
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) + 30
SendPlayerData Index
SendStats Index
Else: PlayerMsg Index, "Não tem o level necessário", Red
End If
Exit Sub
End If
'=================
'Trans de Outro personagem;Vegita
'=================
If GetPlayerSprite(Index) = 3 Then ' sprite normal do vegita
If GetPlayerLevel(Index) >= 5 Then 'se for lvl 5 ou maior
SetPlayerSprite Index, 4 'sprite ssj do vegita
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) + 30
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) + 30
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) + 30
SendPlayerData Index
SendStats Index
Else: PlayerMsg Index, "Não tem o level necessário", Red
End If
Exit Sub
End If
'----'
'Fim da Trans1 "ssj"
'--
Case 2 'SSJ2
'==========
'Trans SSJ2 do goku
'--------
If GetPlayerSprite(Index) = 1 Then ' se ele não tiver transformado
If GetPlayerLevel(Index) >= 10 Then ' se ele tiver lvl 10
SetPlayerSprite Index, 5 ' sprite ssj2 do goku
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) + 60
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) + 60
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) + 60
SendPlayerData Index
SendStats Index
Else: PlayerMsg Index, "Não tem o level necessário", Red
End If
'Else: PlayerMsg Index, "Precisa voltar ao normal se quizer se transformar em outro nível", Red
Exit Sub
End If
If GetPlayerSprite(Index) = 3 Then ' se ele não tiver transformado
If GetPlayerLevel(Index) >= 10 Then ' se ele tiver lvl 10
SetPlayerSprite Index, 6 ' sprite ssj2 do vegita
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) + 60
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) + 60
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) + 60
SendPlayerData Index
SendStats Index
Else: PlayerMsg Index, "Não tem o level necessário", Red
End If
'Else: PlayerMsg Index, "Precisa voltar ao normal se quizer se transformar em outro nível", Red
Exit Sub
End If
'==========
'Fim da trans SSJ2
'==========
Case 3 ' SSJ3
'agora,eh soh repetir pegando de exemplo os 2 casos acima
Case 4 'ssj4
Case 5 'ssj5..
'pode add qntas quizer mas tem q ser ANTES do end select
End Select
End Sub
Sub HandleVoltarNormal(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim Buffer As clsBuffer
Set Buffer = New clsBuffer
Buffer.WriteBytes Data()
Set Buffer = Nothing
'DshFox
'OhYehBeibi.Webs.Com
'OhYehBeibi.Blogspot.com
Select Case GetPlayerSprite(Index)
Case 2 'sprite goku ssj
SetPlayerSprite Index, 1 'sprite do goku normal
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) - 30
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) - 30
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) - 30
SendPlayerData Index
SendStats Index
Exit Sub
Case 4 'sprite vegita ssj
SetPlayerSprite Index, 3 'sprite do vegita normal
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) - 30
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) - 30
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) - 30
SendPlayerData Index
SendStats Index
Exit Sub
Case 5 'sprite goku ssj2
SetPlayerSprite Index, 1 'sprite do goku normal
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) - 60
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) - 60
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) - 60
SendPlayerData Index
SendStats Index
Exit Sub
Case 6 'sprite vegita ssj2
SetPlayerSprite Index, 3 'sprite do vegita normal
SetPlayerStat Index, Stats.strength, GetPlayerStat(Index, Stats.strength) - 60
SetPlayerStat Index, Stats.endurance, GetPlayerStat(Index, Stats.endurance) - 60
SetPlayerStat Index, Stats.intelligence, GetPlayerStat(Index, Stats.intelligence) - 60
SendPlayerData Index
SendStats Index
Exit Sub
End Select
End Sub
procure por
em baixoCUntradeItem
adicione
CTrans
CVoltarNormal
Pronto =D
Pra simplificar,eu coloquei as trans dentro de uma soh sub
entao
no client,qndo tu for adicionar mais transformações
é soh postar
trans NumeroDaTransFormação
Testado e Aprovado