Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker

Estamos de volta o/ ... Ou não.Eu amo a -Dark
Doações para o fórum abertas, clique aqui e saiba mais.
Últimos assuntos
» Ainda temos gente aqui?
Spell baseada em Stats EmptyQui 25 Nov 2021, 14:04 por Halt

» [Dúvida] Como tirar a porcentagem de esquiva
Spell baseada em Stats EmptySex 19 Nov 2021, 17:14 por Halt

» Pokémon Genesis Online! (PGO)
Spell baseada em Stats EmptyQua 05 Jul 2017, 18:08 por Lexar

» Tileset Converter to MV
Spell baseada em Stats EmptySex 12 maio 2017, 14:07 por Douggi

» Pack Resources, Sprites e etc
Spell baseada em Stats EmptyQua 23 Dez 2015, 12:30 por raydengv

» Download RPG Maker 2003 + RTP em português
Spell baseada em Stats EmptyTer 22 Dez 2015, 11:14 por ::KimMax::

» Fantasy Art Online
Spell baseada em Stats EmptyDom 18 Out 2015, 18:42 por daviih123

» Você vai ter medo do Nerve gear?
Spell baseada em Stats EmptySáb 25 Jul 2015, 17:02 por Kirito-kun

» O Barato é louco
Spell baseada em Stats EmptySáb 27 Jun 2015, 16:26 por Halt

» Download RPG Maker 2000 + RTP em português
Spell baseada em Stats EmptyQui 21 maio 2015, 20:28 por Wismael


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

1Spell baseada em Stats Empty Spell baseada em Stats Dom 13 Jan 2013, 12:41

Halt

Halt
Administrador
Administrador
thales12 escreveu: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

https://arenarpgmaker.forumeiros.com

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]

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