MMORPG
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Últimos assuntos
» Eclipse naruto V1.0,1.1
Transformação por spell. I_icon_minitimeTer Out 28, 2014 8:44 am por Kaue

» { Equipemanto }
Transformação por spell. I_icon_minitimeQua Mar 26, 2014 8:24 pm por Emanuelb2

» Ajuda :D plis
Transformação por spell. I_icon_minitimeTer Mar 11, 2014 9:00 pm por jamethon

» [Deleta por favo esse topico]
Transformação por spell. I_icon_minitimeSeg Mar 10, 2014 10:55 pm por Emanuelb2

» [PERGUNTA] Como Por sistemas de reset automático e diminuir os mapas? [ EEB ]
Transformação por spell. I_icon_minitimeSeg Mar 10, 2014 10:25 pm por Kaue

» [Recrutamento] PA ( para quem sabe manusear Pixel Art )
Transformação por spell. I_icon_minitimeDom Mar 09, 2014 8:41 pm por Kaue

» Eclipse Origins 2.0 DOWLOAD(ATT)
Transformação por spell. I_icon_minitimeDom Mar 09, 2014 6:10 pm por Emanuelb2

» Ganhar Item ao Matar Player
Transformação por spell. I_icon_minitimeDom Mar 09, 2014 6:15 am por Kaue

» Oque acontece com o administrador do forum!
Transformação por spell. I_icon_minitimeSex Mar 07, 2014 3:21 pm por Kaue

Parceiros
Fórum grátis


Transformação por spell.

Ir para baixo

Transformação por spell. Empty Transformação por spell.

Mensagem por Kaue Qua Fev 27, 2013 7:22 pm

Ao você usar uma spell vc se transforma.. e dps de um tempo vc volta ao normal..

Configuravel no spelleditor

Abra o Client~Side:

Na frmEditorSpell crie uma frame igual essa img:

Transformação por spell. 2mpyg4i

Frame Name: fraTrans
Frame Caption: Transformação
Picture Name: picSprite2
1º Scrl Name: scrlTrans
2º Scrl Name: scrlForça
3º Scrl Name: scrlDef
4º Scrl Name: scrlAgi
5º Scrl Name: scrlWill
6º Scrl Name: scrlInt
7º Scrl Name: scrlAnima
8º Scrl Name: scrlTempo
1º lbl Name: lblTrans
2º lbl Name: lblFor
3º lbl Name: lblDef
4º lbl Name: lblAgi
5º lbl Name: lblWill
6º lbl Name: lblInt
7º lbl Name: lblAnima
8º lbl Name: lblTempo
1º lbl Caption: Sprite: None
2º lbl Caption: Força: None
3º lbl Caption: Defesa: None
4º lbl Caption: Agilidade: None
5º lbl Caption: Willpower: None
6º lbl Caption: Inteligencia: None
7º lbl Caption: Animação: None
8º lbl Caption: Duração: None

Coloque a Frame em Visible False.

de 2 clicks na scrlTrans e adicione:

Código:
lblTrans.Caption = "Sprite: " & scrlTrans.Value
Spell(EditorIndex).trans = scrlTrans.Value

de 2 clicks na scrlForça e adicione:

Código:
lblFor.Caption = "Força: " & scrlForça.Value
Spell(EditorIndex).Força = scrlForça.Value

de 2 clicks na scrlDef e adicione:

Código:
lblDef.Caption = "Defesa: " & scrlDef.Value
Spell(EditorIndex).Defesa = scrlDef.Value

de 2 clicks na scrlAgi e adicione:

Código:
lblAgi.Caption = "Agilidade: " & scrlAgi.Value
Spell(EditorIndex).Agilidade = scrlAgi.Value


de 2 clicks na scrlWill e adicione:

Código:
lblWill.Caption = "Willpower: " & scrlWill.Value
Spell(EditorIndex).Willpower = scrlWill.Value

de 2 clicks na scrlInt e adicione:

Código:
lblInt.Caption = "Inteligencia: " & scrlInt.Value
Spell(EditorIndex).Inteligencia = scrlInt.Value

de 2 clicks na scrlAnima e adicione:

l
Código:
blAnima.Caption = "Animação: " & Trim$(Animation(scrlAnima.Value).Name)
Spell(EditorIndex).Anima = scrlAnima.Value

de 2 clicks na scrlTempo e adicione:

Código:
lblTempo.Caption = "Duração: " & scrlTempo.Value & "s"
Spell(EditorIndex).Tempo = scrlTempo.Value

na List do cmbType adicione:
Trans
depois de 2 clicks na cmbType e adicione:

Código:
If cmbType.ListIndex = SPELL_TYPE_TRANS Then
        fraTrans.Visible = True
        Else
      fraTrans.Visible = False
    End If

procure por:

Código:
StunDuration As Long

em baixo adicione:

Código:
trans As Long
    Força As Long
    Defesa As Long
    Agilidade As Long
    Willpower As Long
    Inteligencia As Long
    Anima As Long
    Tempo As Long

dps na Private Type PlayerRec adicione:

Código:
Tempo(1 To MAX_PLAYER_SPELLS) As Long

dps procure por:

Código:
Public Const SPELL_TYPE_WARP As Byte = 4

abaixo adicione:

Código:
Public Const SPELL_TYPE_TRANS As Byte = 5

dps procure por:

Código:
.scrlRange.Value = Spell(EditorIndex).Range

em baixo adicione:

Código:
.scrlTrans.Value = Spell(EditorIndex).trans
        .scrlForça.Value = Spell(EditorIndex).Força
        .scrlDef.Value = Spell(EditorIndex).Defesa
        .scrlAgi.Value = Spell(EditorIndex).Agilidade
        .scrlWill.Value = Spell(EditorIndex).Willpower
        .scrlInt.Value = Spell(EditorIndex).Inteligencia
        .scrlAnima.Value = Spell(EditorIndex).Anima
        .scrlTempo.Value = Spell(EditorIndex).Tempo

Client~Side terminado, Abra o Server~Side:
Procure por:

Código:
Public Const SPELL_TYPE_WARP As Byte = 4

abaixo adicione:

Código:
Public Const SPELL_TYPE_TRANS As Byte = 5

procure por:

Código:
StunDuration As Long

abaixo adicione:

Código:
Trans As Long
    Força As Long
    Defesa As Long
    Agilidade As Long
    Willpower As Long
    Inteligencia As Long
    Anima As Long
    Tempo As Long

na Private Type TempPlayerRec adicione:

Código:
 Tempo(1 To MAX_PLAYER_SPELLS) As Long
Trans as Long
MySprite As Long

na Sub JoinGame em cima do End Sub adicione:

Código:
 TempPlayer(index).MySprite = GetPlayerSprite(index)

no ServerLoop em cima de:

Código:
' Check for disconnections every half second

adicione:

Código:
If TempPlayer(i).Trans > 0 Then
                        If Tick > TempPlayer(i).Trans Then
                            SendAnimation GetPlayerMap(i), 20, 0, 0, TARGET_TYPE_PLAYER, i
                            TempPlayer(i).Trans = 0
                            SetPlayerSprite i, TempPlayer(i).MySprite
                            SendPlayerData i
                            AcabarTrans i
                        End If
                    End If

na Sub LeftGame(ByVal index As Long) adicione em baixo de:

Código:
 Dim n As Long, i As Long
    Dim tradeTarget As Long

o codigo:

Código:
If TempPlayer(index).Trans > 0 Then
        SetPlayerSprite index, TempPlayer(index).MySprite
        Call SetPlayerStat(index, Stats.Strength, GetPlayerRawStat(index, Stats.Strength) - Spell(index).Força)
        Call SetPlayerStat(index, Stats.Endurance, GetPlayerRawStat(index, Stats.Endurance) - Spell(index).Defesa)
        Call SetPlayerStat(index, Stats.Agility, GetPlayerRawStat(index, Stats.Agility) - Spell(index).Agilidade)
        Call SetPlayerStat(index, Stats.Willpower, GetPlayerRawStat(index, Stats.Willpower) - Spell(index).Willpower)
        Call SetPlayerStat(index, Stats.Intelligence, GetPlayerRawStat(index, Stats.Intelligence) - Spell(index).Inteligencia)
    End If

procure por:

Código:
' see if cooldown has finished

em baixo adicione:

Código:
If TempPlayer(index).Trans > GetTickCount Then Exit Sub

na subCastSpell em cima de:

Código:
' find out what kind of spell it is! self cast, target or AOE

adicione:

Código:
'Transformaçao
      With Spell(SpellNum)
        If .Type = SPELL_TYPE_TRANS Then
            Call SetPlayerSprite(index, Spell(index).Trans)
            Call SetPlayerStat(index, Stats.Strength, GetPlayerRawStat(index, Stats.Strength)  Spell(index).Força)
            Call SetPlayerStat(index, Stats.Endurance, GetPlayerRawStat(index, Stats.Endurance)  Spell(index).Defesa)
            Call SetPlayerStat(index, Stats.Agility, GetPlayerRawStat(index, Stats.Agility)  Spell(index).Agilidade)
            Call SetPlayerStat(index, Stats.Willpower, GetPlayerRawStat(index, Stats.Willpower)  Spell(index).Willpower)
            Call SetPlayerStat(index, Stats.Intelligence,
GetPlayerRawStat(index, Stats.Intelligence)  Spell(index).Inteligencia)
            Call SetPlayerVital(index, Vitals.MP, GetPlayerVital(index, Vitals.MP) - MPCost)
            Call SendVital(index, Vitals.MP)
            Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index))
            TempPlayer(index).Trans = GetTickCount  (Spell(index).Tempo * 1000)
            SendAnimation GetPlayerMap(index), Spell(index).Anima, 0, 0, TARGET_TYPE_PLAYER, index
            TempPlayer(index).SpellCD(spellslot) = GetTickCount  (Spell(SpellNum).CDTime * 1000)
            Call PlayerMsg(index, GetPlayerName(index) & " - Você se
 Transformou! Para:  " & Trim$(Spell(SpellNum).Name), Cyan)
            SendPlayerData index
          SavePlayer index
        SendStats index
      End If
    End With

no final da modGameLogic adicione:

Código:
Public Sub AcabarTrans(ByVal index As Long)
If index < 1 Or index > MAX_PLAYERS Then Exit Sub
Call SetPlayerStat(index, Stats.Strength, GetPlayerRawStat(index, Stats.Strength) - Spell(index).Força)
Call SetPlayerStat(index, Stats.Endurance, GetPlayerRawStat(index, Stats.Endurance) - Spell(index).Defesa)
Call SetPlayerStat(index, Stats.Agility, GetPlayerRawStat(index, Stats.Agility) - Spell(index).Agilidade)
Call SetPlayerStat(index, Stats.Willpower, GetPlayerRawStat(index, Stats.Willpower) - Spell(index).Willpower)
Call SetPlayerStat(index, Stats.Intelligence, GetPlayerRawStat(index, Stats.Intelligence) - Spell(index).Inteligencia)
SendAnimation GetPlayerMap(index), Spell(index).Anima, 0, 0, TARGET_TYPE_PLAYER, index
Call PlayerMsg(index, "O Tempo Limite da Sua Transformação Acabou...", DarkGrey)
TempPlayer(index).Trans = 0
SendPlayerData index
SavePlayer index
SendStats index
End Sub




Fim !

Kaue
Admin

Mensagens : 54
Pontos : 93
Reputação : 1
Data de inscrição : 19/12/2012

https://mmorpg.forumeiros.net

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

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