Tópico Retirado da MMORPGBR
Server~Side
Server~Side
modCombat
Procure por:
- Código:
' set the vital
Vital = Spell(SpellNum).Vital
AoE = Spell(SpellNum).AoE
Range = Spell(SpellNum).Range
Acima adicione:
- Código:
If Spell(SpellNum).Type = SPELL_TYPE_DAMAGEHP Then
If Spell(SpellNum).IsAoE = True Then
InUseArea index, SpellNum
DidCast = True
End If
End If
E no final do modulo adicione:
- Código:
Function InUseArea(ByVal index As Long, ByVal SpellNum As Long)
Dim i As Long, n As Byte
Dim Mapa As Long, x As Byte, y As Byte
n = Spell(SpellNum).AoE
Mapa = GetPlayerMap(index)
For x = 0 To n
For y = 0 To n
SendAnimation Mapa, Spell(SpellNum).SpellAnim, GetPlayerX(index) - x, GetPlayerY(index) + y
SendAnimation Mapa, Spell(SpellNum).SpellAnim, GetPlayerX(index) + x, GetPlayerY(index) + y
SendAnimation Mapa, Spell(SpellNum).SpellAnim, GetPlayerX(index) - x, GetPlayerY(index) - y
SendAnimation Mapa, Spell(SpellNum).SpellAnim, GetPlayerX(index) + x, GetPlayerY(index) - y
Next
Next
For i = 1 To MAX_MAP_NPCS
If MapNpc(Mapa).NPC(i).x = x Then
If MapNpc(Mapa).NPC(i).y = y Then
PlayerAttackNpc index, i, Spell(SpellNum).Vital
End If
End If
Next
For i = 1 To Player_HighIndex
If i = GetPlayerMap(index) Then Exit Function
If GetPlayerMap(i) = Mapa Then
If GetPlayerX(i) = x Then
If GetPlayerY(i) = y Then
PlayerAttackPlayer index, i, Spell(SpellNum).Vital, SpellNum
End If
End If
End If
Next
End Function
Explicando
Para usar a Magia em Area basta selecionar no Editor de magias a opção de magia em area e depois no scrlAoE selecionar o tamanho da magia.
Créditos
Ricardo
Ricardo
Última edição por Valentine em Dom Jun 17, 2012 1:21 pm, editado 2 vez(es)