Spell Linear
3 participantes
Página 1 de 1
Spell Linear
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
Public Const SPELL_TYPE_LINEAR = 7
Client Side Finalized
----------------------
Server Side
No final de modGameLogic add
colocar
Sistema pronto!
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
Public Const SPELL_TYPE_LINEAR = 7
Client Side Finalized
----------------------
Server Side
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
- 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 Lienar(Index, SpelL(SpellNum).Range, SpelL(SpellNum).Data1, SpellNum)
Exit Sub
end If[b]
Sistema pronto!
spectrus- Administrador
- Mensagens : 299
Estrelas Makers : 1466
Creditos : 49
Data de inscrição : 01/01/2011
Idade : 30
Localização : V.da conquista bahia
Re: Spell Linear
Arrume seu tutorial dessa forma ou nao funcionara
Spell Linear
Client Side
Va no frmSpellEditor e adicione no cmbType + uma list chamada "Linear"
Logo vá no modConstant e procure por [/b]
----------------------
Server Side
Procure:
No final de modGameLogic add
colocar
Sistema pronto!
E como a intenção de todos nos é ajudar + 1 credito.
Spell Linear
Client Side
Va no frmSpellEditor e adicione no cmbType + uma list chamada "Linear"
Logo vá no modConstant e procure por [/b]
- Código:
Public Const SPELL_TYPE_SCRIPTED = 6
- Código:
Public Const SPELL_TYPE_LINEAR = 7
----------------------
Server Side
Procure:
- Código:
Public Const SPELL_TYPE_SCRIPTED = 6
- Código:
Public Const SPELL_TYPE_LINEAR = 7
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
- 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)
Exit Sub
end If[b]
Sistema pronto!
E como a intenção de todos nos é ajudar + 1 credito.
teteu- Modelador
- Mensagens : 4
Estrelas Makers : 8
Creditos : 2
Data de inscrição : 03/07/2011
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|
Sex Dez 05, 2014 10:00 am por Fabio-3dgames
» Lost In Dreams chapter 01
Seg Nov 24, 2014 7:22 pm por slipknot
» A Makers Brasil ressuscitara em breve!!
Sáb Nov 01, 2014 2:26 pm por Francisco Souza
» Elysium Diamond 3.3.2
Sáb Nov 01, 2014 2:17 pm por Francisco Souza
» personagens e objetos 3d game builder
Seg Jul 28, 2014 2:33 pm por Reginaldo Aparecido Zanus
» fala galera \o obs auhsaush digita galera asygasyga
Dom Jul 06, 2014 1:40 am por anastiel
» tutorial headshot fps creator
Seg Jun 09, 2014 6:08 pm por EspinhosoGamer
» SnakeMod fps creator
Seg Jun 09, 2014 5:55 pm por EspinhosoGamer
» serial fps creator
Seg maio 26, 2014 7:35 pm por slipknot