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

Magia "linear"

2 participantes

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

1Magia "linear" Empty Magia "linear" Qui Fev 16, 2012 10:58 pm

Terabin

Terabin
Administrador
Administrador

Client Side

Primeiramente vá ao frmEditor_Spell e encontre a ComboBox chamada "cmbType" e, adicione na list "Linear"

Agora você clica duas vezes na cmbType e Adicione o seguinte code:

Código:
If cmbType.text = "Linear" Then
scrlRange.Value = 0
chkAOE.Value = 1
End If



No modConstant procure por:

Código:
Public Const SPELL_TYPE_WARP As Byte = 4


E logo abaixo coloque:

Código:
Public Const SPELL_TYPE_LINEAR As Byte = 5


Server Side

No modConstant procure por:

Código:
Public Const SPELL_TYPE_WARP As Byte = 4


E logo abaixo coloque:

Código:
Public Const SPELL_TYPE_LINEAR As Byte = 5


Agora vá ao modCombat e procure por:

Código:
find out what kind of spell it is! self cast, target or AOE


E acima dessa linha adicione:

Código:
        With Spell(Spellnum)
            If .Type = SPELL_TYPE_LINEAR Then
                InUseLinear Index, SpellNum
                Exit Sub
            End If
        End With


Ainda no modCombat você adiciona no Final dele:

Código:
        Sub InUseLinear(ByVal Index as Integer, ByVal SpellNum as Long)
        Dim I As Integer
        Dim Calculate As Long
        Dim Mapa As Long
        Mapa = GetPlayerMap(Index)

        I = 1
        Do While I < Spell(SpellNum).AoE

            Select Case GetPlayerDir(Index)

                Case Dir_Up
                    Calculate = GetPlayerY(Index) - I
                    If Calculate <= 0 Then Exit Sub
                    If Map(Mapa).Tile(GetPlayerX(Index), GetPlayerY(Index) - I).Type = Tile_Type_Blocked Then Exit Sub
                    IsUseLinear Index, SpellNum, Mapa, GetPlayerX(Index), GetPlayerY(Index) - I

                Case Dir_Down
                    Calculate = GetPlayerY(Index) + I
                    If Calculate >= Map(I).MaxY Then Exit Sub
                    If Map(Mapa).Tile(GetPlayerX(Index), GetPlayerY(Index) + I).Type = Tile_Type_Blocked Then Exit Sub
                    IsUseLinear Index, SpellNum, Mapa, GetPlayerX(Index), GetPlayerY(Index) + I

                Case Dir_Left
                    Calculate = GetPlayerX(Index) - I
                    If Calculate <= 0 Then Exit Sub
                    If Map(Mapa).Tile(GetPlayerX(Index) - I, GetPlayerY(Index)).Type = Tile_Type_Blocked Then Exit Sub
                    IsUseLinear Index, SpellNum, Mapa, GetPlayerX(Index) - I, GetPlayerY(Index)

                Case Dir_Right
                    Calculate = GetPlayerX(Index) + I
                    If Calculate >= Map(I).MaxX Then Exit Sub
                    If Map(Mapa).Tile(GetPlayerX(Index) + I, GetPlayerY(Index)).Type = Tile_Type_Blocked Then Exit Sub
                    IsUseLinear Index, SpellNum, Mapa, GetPlayerX(Index) + I, GetPlayerY(Index)
            End Select
            I = I + 1
        Loop
    End Sub

    Function IsUseLinear(ByVal Index As Integer, ByVal SpellNum As Integer, ByVal Mapa As Integer, ByVal X As Byte, ByVal Y As Byte)
        Dim I As Long

        SendAnimation Mapa, Spell(SpellNum).SpellAnim, X, Y

        'Loop Global Npc
        For I = 1 To MAX_MAP_NPCS
            If MapNpc(Mapa).Npc(I).Num > 0 And MapNpc(Mapa).Npc(I).X = X And MapNpc(Mapa).Npc(I).Y = Y And MapNpc(Mapa).Npc(I).Vital(HP) > 0 Then PlayerAttackNpc Index, I, Spell(SpellNum).Vital, SpellNum
        Next

        'Loop Global Player
        For I = 1 To Player_HighIndex
            If GetPlayerMap(I) = Mapa And GetPlayerX(I) = X And GetPlayerY(I) = Y Then PlayerAttackPlayer Index, I, Spell(SpellNum).Vital, SpellNum
        Next
    End Function


Creditos:

V force

https://pokepokepoke.forumeiros.com

2Magia "linear" Empty Re: Magia "linear" Seg Fev 20, 2012 10:54 pm

wyvern670

wyvern670
Iniciante
Iniciante

Terabin nao ta aparecendo a opçao Linear na hora de editar os spells

3Magia "linear" Empty Re: Magia "linear" Ter Fev 21, 2012 1:10 pm

wyvern670

wyvern670
Iniciante
Iniciante

ja sei pq tava dando erro Very Happy
eu tava esquecendo de por o Linear na list Razz

Conteúdo patrocinado



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

Tópicos semelhantes

-

» Spell Linear,
» Transformação por magia

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