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


3 participantes

    Spell Basiado em Stats

    thales12
    thales12
    Membro de Honra
    Membro de Honra


    Mensagens : 322
    Créditos : 108

    Ficha do personagem
    Nível: 1
    Experiência:
    Spell Basiado em Stats Left_bar_bleue0/0Spell Basiado em Stats Empty_bar_bleue  (0/0)
    Vida:
    Spell Basiado em Stats Left_bar_bleue30/30Spell Basiado em Stats Empty_bar_bleue  (30/30)

    Spell Basiado em Stats Empty Spell Basiado em Stats

    Mensagem por thales12 Qua Dez 21, 2011 1:13 pm

    Spell Basiado em tal Stats

    no client~Side vai na frmEditor_spell crie uma frm chamada:

    fraBaseStat
    Basiado em Stat

    dentro dela adicione:

    uma hscrolbar com name:

    scrlBaseStat

    em cima adicione uma label com name e caption:

    lblBaseStat
    Stat:Nenhum
    dps de 2 clicks na scrlbasestat e adicione:

    Código:
     
    Select Case scrlBaseStat.Value
      Case 0
        lblBaseStat.Caption = "Stat:Nenhum"
      Case 1
        lblBaseStat.Caption = "Stat:Strength"
      Case 2
        lblBaseStat.Caption = "Stat:Intelligence"
      Case 3
        lblBaseStat.Caption = "Stat:Agillity"
      Case 4
        lblBaseStat.Caption = "Stat:Endurance"
      Case 5
        lblBaseStat.Caption = "Stat:WillPower"
    End Select

        Spell(EditorIndex).BaseStat = scrlBaseStat.Value

    na private type spell rec adicione:

    Código:
    BaseStat As Byte

    dps na spelleditorinit procure por:

    Código:
    .scrlStun.Value = Spell(EditorIndex).StunDuration

    em baixo adicione:

    Código:
    .scrlBaseStat.Value = Spell(EditorIndex).BaseStat

    agora no server~side na private type spell rec adicione:

    Código:
    BaseStat As Byte

    na castspell procure por:

    Código:
    ' set the vital
        Vital = Spell(spellnum).Vital
        AoE = Spell(spellnum).AoE
        range = Spell(spellnum).range

    mude para:

    Código:
    ' set the vital
        Vital = GetSpellBaseStat(index, SpellNum)
        AoE = Spell(SpellNum).AoE
        Range = Spell(SpellNum).Range

    dps procure por:

    Código:
    Public Sub HandleDoT_Player(ByVal Index As Long, ByVal dotNum As Long)
        With TempPlayer(Index).DoT(dotNum)
            If .Used And .Spell > 0 Then
                ' time to tick?
                If GetTickCount > .Timer + (Spell(.Spell).Interval * 1000) Then
                    If CanPlayerAttackPlayer(.Caster, Index, True) Then
                        PlayerAttackPlayer .Caster, Index, Spell(.Spell).Vital
                    End If
                    .Timer = GetTickCount
                    ' check if DoT is still active - if player died it'll have been purged
                    If .Used And .Spell > 0 Then
                        ' destroy DoT if finished
                        If GetTickCount - .StartTime >= (Spell(.Spell).duration * 1000) Then
                            .Used = False
                            .Spell = 0
                            .Timer = 0
                            .Caster = 0
                            .StartTime = 0
                        End If
                    End If
                End If
            End If
        End With
    End Sub

    e mude para:

    Código:
    Public Sub HandleDoT_Player(ByVal index As Long, ByVal dotNum As Long)
        With TempPlayer(index).DoT(dotNum)
            If .Used And .Spell > 0 Then
                ' time to tick?
                If GetTickCount > .Timer + (Spell(.Spell).Interval * 1000) Then
                    If CanPlayerAttackPlayer(.Caster, index, True) Then
                        PlayerAttackPlayer .Caster, index, RAND(1, GetSpellBaseStat(.Caster, .Spell))
                    End If
                    .Timer = GetTickCount
                    ' check if DoT is still active - if player died it'll have been purged
                    If .Used And .Spell > 0 Then
                        ' destroy DoT if finished
                        If GetTickCount - .StartTime >= (Spell(.Spell).Duration * 1000) Then
                            .Used = False
                            .Spell = 0
                            .Timer = 0
                            .Caster = 0
                            .StartTime = 0
                        End If
                    End If
                End If
            End If
        End With
    End Sub

    agora procuure por:

    Código:
    Public Sub HandleDoT_Npc(ByVal mapNum As Long, ByVal Index As Long, ByVal dotNum As Long)
        With MapNpc(mapNum).NPC(Index).DoT(dotNum)
            If .Used And .Spell > 0 Then
                ' time to tick?
                If GetTickCount > .Timer + (Spell(.Spell).Interval * 1000) Then
                    If CanPlayerAttackNpc(.Caster, Index, True) Then
                        PlayerAttackNpc .Caster, Index, Spell(.Spell).Vital, , True
                    End If
                    .Timer = GetTickCount
                    ' check if DoT is still active - if NPC died it'll have been purged
                    If .Used And .Spell > 0 Then
                        ' destroy DoT if finished
                        If GetTickCount - .StartTime >= (Spell(.Spell).duration * 1000) Then
                            .Used = False
                            .Spell = 0
                            .Timer = 0
                            .Caster = 0
                            .StartTime = 0
                        End If
                    End If
                End If
            End If
        End With
    End Sub

    e mude para:

    Código:
    Public Sub HandleDoT_Npc(ByVal MapNum As Long, ByVal index As Long, ByVal dotNum As Long)
        With MapNpc(MapNum).Npc(index).DoT(dotNum)
            If .Used And .Spell > 0 Then
                ' time to tick?
                If GetTickCount > .Timer + (Spell(.Spell).Interval * 1000) Then
                    If CanPlayerAttackNpc(.Caster, index, True) Then
                        PlayerAttackNpc .Caster, index, RAND(1, GetSpellBaseStat(.Caster, .Spell)), , True
                    End If
                    .Timer = GetTickCount
                    ' check if DoT is still active - if NPC died it'll have been purged
                    If .Used And .Spell > 0 Then
                        ' destroy DoT if finished
                        If GetTickCount - .StartTime >= (Spell(.Spell).Duration * 1000) Then
                            .Used = False
                            .Spell = 0
                            .Timer = 0
                            .Caster = 0
                            .StartTime = 0
                        End If
                    End If
                End If
            End If
        End With
    End Sub

    no final da modgamelogic adicione:

    Código:
    Public Function GetSpellBaseStat(ByVal index As Long, ByVal SpellNum As Long) As Long

      If SpellNum > 0 Then
          Select Case Spell(SpellNum).BaseStat
              Case 1
                  GetSpellBaseStat = GetPlayerStat(index, Stats.strength) * 1.5 + GetPlayerLevel(index) / 6.2 + Spell(SpellNum).Vital
              Case 2
                  GetSpellBaseStat = GetPlayerStat(index, Stats.Intelligence) * 1.5 + GetPlayerLevel(index) / 6.2 + Spell(SpellNum).Vital
              Case 3
                  GetSpellBaseStat = GetPlayerStat(index, Stats.Agility) * 1.5 + GetPlayerLevel(index) / 6.2 + Spell(SpellNum).Vital
              Case 4
                  GetSpellBaseStat = GetPlayerStat(index, Stats.Endurance) * 1.5 + GetPlayerLevel(index) / 6.2 + Spell(SpellNum).Vital
              Case 5
                  GetSpellBaseStat = GetPlayerStat(index, Stats.Willpower) * 1.5 + GetPlayerLevel(index) / 6.2 + Spell(SpellNum).Vital
     
              End Select
        End If
         
    End Function

    fim, credits ao titio thales


    Última edição por thales12 em Dom Mar 18, 2012 5:25 pm, editado 2 vez(es)


    _________________
    Meu fã ? Meu Amigo ? Entao Use !

    Spell Basiado em Stats Thalesfan
    Spell Basiado em Stats Mv0yg8

    Minha Sign:

    Spell Basiado em Stats Zkqt5e
    tenchuzinho
    tenchuzinho
    Experiente
    Experiente


    Mensagens : 574
    Créditos : 10

    Spell Basiado em Stats Empty Re: Spell Basiado em Stats

    Mensagem por tenchuzinho Qua Dez 21, 2011 2:08 pm

    Ja tem um topico desse seu safado !!! pode oclocar os creditos ...

    Topico:

    http://aldeiarpgbr.forumeiros.com/t1993-eo-spell-baseada-no-stats-que-voce-quiser


    _________________
    Very Happy
    thales12
    thales12
    Membro de Honra
    Membro de Honra


    Mensagens : 322
    Créditos : 108

    Ficha do personagem
    Nível: 1
    Experiência:
    Spell Basiado em Stats Left_bar_bleue0/0Spell Basiado em Stats Empty_bar_bleue  (0/0)
    Vida:
    Spell Basiado em Stats Left_bar_bleue30/30Spell Basiado em Stats Empty_bar_bleue  (30/30)

    Spell Basiado em Stats Empty Re: Spell Basiado em Stats

    Mensagem por thales12 Qua Dez 21, 2011 6:14 pm

    tenchuzinho escreveu:Ja tem um topico desse seu safado !!! pode oclocar os creditos ...

    Topico:

    http://aldeiarpgbr.forumeiros.com/t1993-eo-spell-baseada-no-stats-que-voce-quiser

    sabia q alguem ia falar isso, shaushauhsuah

    mais vc ta errado ! :)
    o outro tutorial, nao funciona ! :)
    sem contar q o meu e diferente e funciona ! :)
    mais perguntas ?


    _________________
    Meu fã ? Meu Amigo ? Entao Use !

    Spell Basiado em Stats Thalesfan
    Spell Basiado em Stats Mv0yg8

    Minha Sign:

    Spell Basiado em Stats Zkqt5e
    gabriel190
    gabriel190
    Membro Ativo
    Membro Ativo


    Mensagens : 278
    Créditos : 19

    Spell Basiado em Stats Empty Re: Spell Basiado em Stats

    Mensagem por gabriel190 Qua Dez 21, 2011 7:20 pm

    Funciona sim! Eu to usando!


    _________________
    Spell Basiado em Stats Scaled.php?server=546&filename=signpnu
    Spell Basiado em Stats Xna
    Spell Basiado em Stats Fanbarpw
    Spell Basiado em Stats AIymW

    Conteúdo patrocinado


    Spell Basiado em Stats Empty Re: Spell Basiado em Stats

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Sex Abr 26, 2024 3:36 pm