Bem devido a muitos pedidos eu irei postar um tuto de spell
linear, porem ele não pega em eclipse origins, nem elysium, isso é para
responder possíveis perguntas, ele irá pegar nos outros demais
eclipse's, stable, 2.7 e assim vai.
Spell Linear
Client Side
Va no frmSpellEditor e adicione no cmbType + uma list chamada "Linear"
Logo vá no modConstant e procure por
Client Side Finalized
----------------------
Server Side
procure por
No final de modGameLogic add
Agora no mesmo module procure pela a sub CastSpell e embaixo de:
colocar
Server Side Finalized
Tutorial By:Kira
linear, porem ele não pega em eclipse origins, nem elysium, isso é para
responder possíveis perguntas, ele irá pegar nos outros demais
eclipse's, stable, 2.7 e assim vai.
Spell Linear
Client Side
Va no frmSpellEditor e adicione no cmbType + uma list chamada "Linear"
Logo vá no modConstant e procure por
- Código:
Public Const SPELL_TYPE_SCRIPTED = 6
- Código:
Public Const SPELL_TYPE_LINEAR = 7
Client Side Finalized
----------------------
Server Side
procure por
- Código:
Public Const SPELL_TYPE_SCRIPTED = 6
- Código:
Public Const SPELL_TYPE_LINEAR = 7 ' se nao por isso vai dar como se n existice.
No final de 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
Agora no mesmo module procure pela a sub CastSpell e embaixo de:
- Código:
If Spell(SpellNum).Type = SPELL_TYPE_SCRIPTED Then
MyScript.ExecuteStatement "Scripts\Main.ess", "ScriptedSpell " & Index & "," & Spell(SpellNum).Data1
Exit Sub
End If
colocar
- Código:
If Spell(SpellNum).Type = SPELL_TYPE_LINEAR Then
Call Linear(Index, SpelL(SpellNum).Range, SpelL(SpellNum).Data1, SpellNum) ' essa linha estava escrito Lienar
Exit Sub
end If
Server Side Finalized
Tutorial By:Kira