Conexão Maker

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

2 participantes

    Skill Linear

    Kurogane
    Kurogane
    Administrador
    Administrador


    Mensagens : 14
    Level : 4
    Data de inscrição : 01/11/2010
    Idade : 29

    Skill Linear Empty Skill Linear

    Mensagem por Kurogane Ter Nov 01, 2011 3:14 pm

    Introdução :
    As Skill Lineares São Aqueles segue uma direção Unica em forma de Linha ou Reta .

    ~Requerimento~
    •Noção de Programação(VB6) 2/5
    •Estudo de Programação(VB6) 2~3/5
    •Computador/Net (Capitão Obvio xD)

    Ao Abrir o Client Side

    Primeiramente vamos 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

    Procure No modConstant :

    Código:
    Public Const SPELL_TYPE_WARP As Byte = 4
    Debaixo desta Linha Adicione :
    Código:
    Public Const SPELL_TYPE_LINEAR As Byte = 5

    A Parte Do Nosso Client Ja está feita vamos para o Servidor agora .

    Abra o Servidor Side No modConstant procure por:

    Código:
    Public Const SPELL_TYPE_WARP As Byte = 4

    Debaixo Desta Linha Adicione

    Código:
    Public Const SPELL_TYPE_LINEAR As Byte = 5

    Procure Agora no modCombat pela Linha:

    Código:
    find out what kind of spell it is! self cast, target or AOE
    Em cima desta linha você Adiciona :
    Código:
     With Spell(Spellnum)
                If .Type = SPELL_TYPE_LINEAR Then
                    InUseLinear Index, SpellNum
                    Exit Sub
                End If
            End With

    No Final da desta Sub , Antes de End Sub , você Adiciona :

    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

    Pronto , Tudo Certo , agora só Executar .

    ~Créditos :Ricardo
    avatar
    Ricardo
    Administrador
    Administrador


    Mensagens : 5
    Level : 0
    Data de inscrição : 01/11/2011

    Skill Linear Empty Re: Skill Linear

    Mensagem por Ricardo Ter Nov 01, 2011 11:59 pm

    Isso e uma flaude creditos meu e do V force e de mais ninguem

      Tópicos semelhantes

      -

      Data/hora atual: Qui Mar 28, 2024 9:13 am