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

WebRPG


 
InícioInício  PortalPortal  Últimas imagensÚltimas imagens  ProcurarProcurar  RegistarRegistar  EntrarEntrar  

 

 Sistema De Spell Linear

Ir para baixo 
AutorMensagem
FuckStyle

FuckStyle


Mensagens : 23
Data de inscrição : 07/12/2011

Sistema De Spell Linear Empty
MensagemAssunto: Sistema De Spell Linear   Sistema De Spell Linear I_icon_minitimeSex Dez 09, 2011 1:43 am

é isso ae.. ja venho com mas um tutorial ..

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
Ir para o topo Ir para baixo
 
Sistema De Spell Linear
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» Sistema De VIP
» Sistema De Clima
» Sistema De Buff
» Sistema De Cash
» Sistema De Suicidio..

Permissões neste sub-fórumNão podes responder a tópicos
WebRPG :: Eclipse Origins :: Tutoriais Eclipse Origins-
Ir para: