Sistema: Spell Linear
Linguagem: VB6

Vamos la.

Client VB !!

FrmSpelleditor
Irar encontrar algo escrito cmbtype ao clicar nele do lado inferior direito tera as propriedades dele !!
Vá em list e add no ultimo :

Código:

Linear


Agora procure por isso :

Código:

Public Const SPELL_TYPE_SCRIPTED = 6


de baixo add :

Código:

Public Const SPELL_TYPE_LINEAR = 7


Serve VB
ModGamelogic

Procure por :

Código:

Public Const SPELL_TYPE_SCRIPTED = 6


debaixo add :

Código:

Public Const SPELL_TYPE_LINEAR = 7


No final do ModGamelogic add :

Código:

Sub Linear(Byval Index as Integer,Byval Range as Byte,Byval Damage as Long,byval Spell as integer)
Dim I as byte
dim Map as integer
Dim Dir as byte
Dim X as byte
dim Y as byte

Dir = getplayerdir(index)
x = getplayerx(index)
y = getplayery(index)
Map = getplayermap(index)
For I = 1 to Range

select case Dir
Case 0
Call SpellAnim(spell , Index, X, Y - i)
Call CheckAttackNPC(index, Map, X, Y - i, Damage)

Case 1
Call SpellAnim(spell , Index, X, Y + i)
Call CheckAttackNPC(index, Map, X, Y + i, Damage)

Case 2
Call SpellAnim(spell, Index, X - i, Y)
Call CheckAttackNPC(index, Map, X - i, Y, Damage)

Case 3
Call SpellAnim(spell, Index, X + i, Y)
Call CheckAttackNPC(index, Map, X + i, Y, Damage)

End Select
Next I

End Sub

Sub SpellAnim(ByVal SpellNum As Long,byval Index as integer, ByVal X As Long, ByVal Y As Long)
    Call SendDataToMap(getplayermap(index), "scriptspellanim" & SEP_CHAR & SpellNum & SEP_CHAR & Spell(SpellNum).SpellAnim & SEP_CHAR & Spell(SpellNum).SpellTime & SEP_CHAR & Spell(SpellNum).SpellDone & SEP_CHAR & X & SEP_CHAR & Y & SEP_CHAR & Spell(SpellNum).Big & END_CHAR)
End Sub

Sub CheckAttackNPC(byval Index as integer,Byval map as integer,byval x as integer,byval y as integer,byval Damage as integer)
dim count as Integer
count = 1
do while count < 16
if getnpcx(map, count) = x AND getnpcy(map, count) = y then
Call DamageNPC(index, count, Damage)
exit sub
end if
count = count + 1
loop
Call CheckAttackPlayer(index, map, x, y, Damage)
End Sub

Sub CheckAttackPlayer(byval index as integer,byval map as integer,byval x as integer,byval y as integer,byval Damage as long)
dim count as integer
count = 1
do while count < 51
if count = index then
if isplaying(count) then
if getplayermap(count) = map AND getplayerx(count) = x AND getplayery(count) = y then
If GetMapMoral(GetPlayerMap(index)) = 0 Then
Call DamagePlayer(index, count, Damage)
else
Call PlayerMsg(index, "Safe Zone!", 12)
end if
end if
end if
end if
count = count + 1
loop
End Sub

Sub DamageNPC(ByVal Index As Long, ByVal NPCnum As Long, ByVal Damage As Long)
    Call AttackNpc(Index, NPCnum, Damage)
    Call SendDataTo(Index, "BLITPLAYERDMG" & SEP_CHAR & Damage & SEP_CHAR & NPCnum & END_CHAR)
End Sub

Sub DamagePlayer(ByVal Index As Long, ByVal PIndex As Long, ByVal Damage As Long)
    Call AttackPlayer(Index, PIndex, Damage)
End Sub

Public Function GetMapMoral(ByVal MapNum As Long) As Byte
    GetMapMoral = Map(MapNum).Moral
End Function

Function GetNpcX(ByVal MapNum As Long, ByVal MapNpcNum As Long)

    If MapNpcNum < 1 Or MapNpcNum > 25 Then
    Else
        GetNpcX = MapNPC(MapNum, MapNpcNum).X
    End If

End Function


Function GetNpcY(ByVal MapNum As Long, ByVal MapNpcNum As Long)

    If MapNpcNum > 0 Then
        GetNpcY = MapNPC(MapNum, MapNpcNum).Y
    End If

End Function


Procure por :

Código:

If Spell(SpellNum).Type = SPELL_TYPE_SCRIPTED Then

        MyScript.ExecuteStatement "Scripts\Main.ess", "ScriptedSpell " & Index & "," & Spell(SpellNum).Data1

        Exit Sub
    End If


Debaixo add :

Código:

If Spell(SpellNum).Type = SPELL_TYPE_LINEAR Then
Call Linear(Index, SpelL(SpellNum).Range, SpelL(SpellNum).Data1, SpellNum)
Exit Sub
end If


Creditos Iurigor
ThxFox
BGames