Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.
Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.

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

Magias baseadas em status

3 participantes

Ir para baixo  Mensagem [Página 1 de 1]

1Magias baseadas em status Empty Magias baseadas em status Qui Fev 16, 2012 10:50 pm

Terabin

Terabin
Administrador
Administrador

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:
 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

Créditos: Thales

https://pokepokepoke.forumeiros.com

2Magias baseadas em status Empty Re: Magias baseadas em status Ter Fev 21, 2012 1:03 pm

wyvern670

wyvern670
Iniciante
Iniciante

Como assim? nao entendi pra que q serve o.O

3Magias baseadas em status Empty Re: Magias baseadas em status Ter Fev 21, 2012 8:56 pm

Sakuray

Sakuray
Colaborador
Colaborador

Se fosse fizer uma magia vamos supor pra Rock Lee, ele utiliza Taijutsu, então, seu dano da sua magia sera aumentado com taijutsu...

Peguei de exemplo o naruto e.e

http://narutoghostonline.blogspot.com

Conteúdo patrocinado



Ir para o topo  Mensagem [Página 1 de 1]

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