Aldeia RPG

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

Suporte ao desenvolvimento de jogos


2 participantes

    Spell Linear

    jadieljr
    jadieljr
    Banido
    Banido


    Mensagens : 38
    Créditos : 32

    Spell Linear Empty Spell Linear

    Mensagem por jadieljr Sáb Nov 12, 2011 11:49 pm

    Nome:Skill Linear
    Nivel de Dificuldade : 3/5
    Utiliza: VisualBasic 6.0

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

    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 e V-force (pela criação do sistema)
    jadieljr (por disponibilizar aqui no Fórum e Organizar o Tópico)
    thales12
    thales12
    Membro de Honra
    Membro de Honra


    Mensagens : 322
    Créditos : 108

    Ficha do personagem
    Nível: 1
    Experiência:
    Spell Linear Left_bar_bleue0/0Spell Linear Empty_bar_bleue  (0/0)
    Vida:
    Spell Linear Left_bar_bleue30/30Spell Linear Empty_bar_bleue  (30/30)

    Spell Linear Empty Re: Spell Linear

    Mensagem por thales12 Sex Dez 23, 2011 12:05 pm

    Sistema nao funciona, tópico trancado e movido ao Bau.


    _________________
    Meu fã ? Meu Amigo ? Entao Use !

    Spell Linear Thalesfan
    Spell Linear Mv0yg8

    Minha Sign:

    Spell Linear Zkqt5e

      Data/hora atual: Qui Mar 28, 2024 11:44 am