Aldeia RPG

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

Suporte ao desenvolvimento de jogos


+6
bejaflo1
Himinato
Vitribopio
Tayllor
Valentine
thales12
10 participantes

    Transformação por Spell

    thales12
    thales12
    Membro de Honra
    Membro de Honra


    Mensagens : 322
    Créditos : 108

    Ficha do personagem
    Nível: 1
    Experiência:
    Transformação por Spell Left_bar_bleue0/0Transformação por Spell Empty_bar_bleue  (0/0)
    Vida:
    Transformação por Spell Left_bar_bleue30/30Transformação por Spell Empty_bar_bleue  (30/30)

    Transformação por Spell Empty Transformação por Spell

    Mensagem por thales12 Sáb Nov 24, 2012 4:17 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 !

    Créditos: Thales por fazer o sistema e Tutorial
    Créditos: Eduardo por adicionar Tempo


    _________________
    Meu fã ? Meu Amigo ? Entao Use !

    Transformação por Spell Thalesfan
    Transformação por Spell Mv0yg8

    Minha Sign:

    Transformação por Spell Zkqt5e
    Valentine
    Valentine
    Administrador
    Administrador


    Medalhas : Transformação por Spell ZgLkiRU
    Mensagens : 5336
    Créditos : 1163

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

    Mensagem por Valentine Dom Nov 25, 2012 8:58 pm

    + 1 crédito tio thalesito!
    avatar
    Tayllor
    Iniciante
    Iniciante


    Mensagens : 33
    Créditos : 0

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

    Mensagem por Tayllor Qui Dez 06, 2012 4:02 pm

    O codigo Força, Defesa, Agilidade, WillPower, Inteligencia usado no ultimo codigo do server.vbp ta dando erro aqui. :/


    _________________
    Transformação por Spell Nwrmq110
    http://tutorpg.forumeiro.com/
    avatar
    Vitribopio
    Novato
    Novato


    Mensagens : 7
    Créditos : 0

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

    Mensagem por Vitribopio Seg Mar 10, 2014 11:45 pm

    cara me explica mais essa parte n consigo achar
        
    [size=11.818181991577148]Private Type PlayerRec[/size]


    Tempo(1 To MAX_PLAYER_SPELLS) As Long

    Vlw
    avatar
    Vitribopio
    Novato
    Novato


    Mensagens : 7
    Créditos : 0

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

    Mensagem por Vitribopio Ter Mar 11, 2014 12:13 pm

    Mas ajuda ae pf
    avatar
    Himinato
    Novato
    Novato


    Mensagens : 19
    Créditos : 0

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

    Mensagem por Himinato Qui maio 08, 2014 10:08 am

    o meu de este erro, como eu ajeito ?

    Transformação por Spell 35a8vt3
    avatar
    bejaflo1
    Iniciante
    Iniciante


    Mensagens : 49
    Créditos : 3

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

    Mensagem por bejaflo1 Ter maio 13, 2014 2:30 pm

    Realmente tem erros s aqui tb deu erro
    avatar
    falcon459
    Novato
    Novato


    Mensagens : 7
    Créditos : 0

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

    Mensagem por falcon459 Qua maio 28, 2014 3:24 am

    os caras nem testam e post Tutoriais cheios de erros '-' se vai postar alguma coisa testem Porfavor
    Lord Pegason
    Lord Pegason
    Novato
    Novato


    Mensagens : 5
    Créditos : 1

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

    Mensagem por Lord Pegason Qua maio 28, 2014 12:15 pm

    falcon459 escreveu:os caras nem testam e post Tutoriais cheios de erros '-' se vai postar alguma coisa testem Porfavor

    Por causa de gente igual você que 95% das pessoas que contribuem com tutoriais não fazem questão de compartilhar opinião mais...

    Você deveria agradecer de pegar a "ideia" (que é o principal) e refazer, reajustar o que for necessário. Se não se acha capaz de fazer isso, creio que CRIAR jogos não é a sua área. 

     Very Happy
    avatar
    falcon459
    Novato
    Novato


    Mensagens : 7
    Créditos : 0

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

    Mensagem por falcon459 Qua maio 28, 2014 4:37 pm

    Enves de vc falar tanta bosta então ja que vc é foda pq vc não da um jeito de arrumar o Código então 5 Pessoa pediram para ajudar ou se quer dar uma mão mais ja que troxas como vcs que não ajuda ninguém e fica puxando saco dos outros deveria ficar quetinho e não falar nada eu realmente agradeço o pessoal que posta os tuturiais mais o que falam la , olha gente eu testei e esta funcionando qualquer coisa é só me falar esses eu respeito respeito muito , caras que postam tutoriais sem nem falar que testou ou ao menos dar uma ajuda só pra ganhar crédito
    não merece agradecimento nenhum então ao envés se vc ficar puxando saco dos caras pq vc não tenta ajudar essas pessoas que estão falando que deu erro ou pedido ajudar seu otário e se tem gente procurando tutoriais é pq não sabem mexer muito bem no VB pensa antes de falar qualquer coisa ou tira essas bolas da boca pra falar , se esse thales12 voltar falar olha agora eu testei e esta funcionando ai eu vou dar um credito e agradecer ele caso contrario não vou fazer isso.


    Esse tutorial é fodas pra caramba se desse certo ficaria Muito legal mais ja que tem tantos errors vc não pode esperar que alguém venha e fala nossa foda pra caramba muito bom mais não consigo da erro '-'

    Conteúdo patrocinado


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

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Qui maio 16, 2024 11:47 pm