Universo Games
Ola , Convidado

Spell Linear Logo1110

Você ainda não e cadastrado então cadastre-se e veja todas as atualizações no Mundo RPG!!!
Universo Games
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Universo Games

Suporte e Desenvolvimento só no Universo Games
 
InícioInício  PortalPortal  EventosEventos  PublicaçõesPublicações  Últimas imagensÚltimas imagens  RegistarRegistar  EntrarEntrar  
Ola Convidado, Seja Bem vindo a equipe lhe deseja boa sorte no seu projeto!

 

 Spell Linear

Ir para baixo 
AutorMensagem
Lucas Roberto
Administrador
Administrador
Lucas Roberto


Mensagens : 711

Spell Linear Empty
MensagemAssunto: Spell Linear   Spell Linear EmptySex 03 Jun 2011, 14:39

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
Código:
Public Const SPELL_TYPE_SCRIPTED = 6
e embaixo dele add:

Código:
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



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 Lienar(Index, SpelL(SpellNum).Range, SpelL(SpellNum).Data1, SpellNum)
Exit Sub
end If



Server Side Finalized

Tutorial By:Kira
Ir para o topo Ir para baixo
https://universogamesmmo.forumeiros.com
Convidado
Convidado
Anonymous



Spell Linear Empty
MensagemAssunto: Re: Spell Linear   Spell Linear EmptySáb 11 Jun 2011, 03:43

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
Código:
Public Const SPELL_TYPE_SCRIPTED = 6
e embaixo dele add:

Código:
Public Const SPELL_TYPE_LINEAR = 7


Client Side Finalized

----------------------
Server Side

procure por
Código:
Public Const SPELL_TYPE_SCRIPTED = 6
e embaixo dele add:

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
Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Spell Linear Empty
MensagemAssunto: Re: Spell Linear   Spell Linear EmptySáb 11 Jun 2011, 13:23

não entendi nada
você pois a mesma coisa que o Lucas Roberto aposto
mais como e iniciante esta de boa Obrigado por cadastra na universo
Seja bem-vindo

estou aqui para lhe atender

Ir para o topo Ir para baixo
Convidado
Convidado
Anonymous



Spell Linear Empty
MensagemAssunto: Re: Spell Linear   Spell Linear EmptySáb 11 Jun 2011, 15:08

Obrigado.Mais no que o lucas roberto aposto nao tinha essa parte pra o server side.

Procure por:
Código:
Public Const SPELL_TYPE_SCRIPTED = 6
Abaixo bote:
Código:
Public Const SPELL_TYPE_LINEAR = 7
Se nao fizer isso dara erro aki
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

e essa linha
Código:
Call Lienar(Index, SpelL(SpellNum).Range, SpelL(SpellNum).Data1, SpellNum)
Se você olhar bem ali no começo ta escrito errado entao la em cima eu ja apostei concertado Wink.

Att.Teteu
Ir para o topo Ir para baixo
Lucas Roberto
Administrador
Administrador
Lucas Roberto


Mensagens : 711

Spell Linear Empty
MensagemAssunto: Re: Spell Linear   Spell Linear EmptySáb 11 Jun 2011, 15:17

assim obrigado por corrir o meu erro +1
Ir para o topo Ir para baixo
https://universogamesmmo.forumeiros.com
Convidado
Convidado
Anonymous



Spell Linear Empty
MensagemAssunto: Re: Spell Linear   Spell Linear EmptySáb 11 Jun 2011, 15:19

Obrigado lucas roberto estamos aki pra ajudar e pra ser ajudado quando preciso. [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Ir para o topo Ir para baixo
Conteúdo patrocinado





Spell Linear Empty
MensagemAssunto: Re: Spell Linear   Spell Linear Empty

Ir para o topo Ir para baixo
 
Spell Linear
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» Spell Linear 100%
» Magia Reta (Spell Linear)
» [ALL]Memorize Spell
» Magias linear (EO V2.0)
» Desaprender Spell

Permissões neste sub-fórumNão podes responder a tópicos
Universo Games :: Criação de Jogos :: Eclipse :: Tutoriais-
Ir para: