Servidor:
Buscan:
- CreateFX ' CFX
Abajo:
- CreateParticle ' CFF
Agregan al final del mod Protocol:
- ''
- ' Prepares the "CreateParticle" message and returns it.
- '
- ' @param UserIndex User to which the message is intended.
- ' @param CharIndex Character upon which the Particle will be created.
- ' @param Particle Particle index to be displayed over the new character.
- ' @return The formated message ready to be writen as is on outgoing buffers.
- ' @remarks The data is not actually sent until the buffer is properly flushed.
- Public Function PrepareMessageCreateParticle(ByVal CharIndex As Integer, ByVal Particle As Integer) As String
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Modified by: Emanuel Matías (Dunkan)
- 'For "ParticleSystem" of Menduz - emanuel.m@dunkancorp.com
- 'Last Modification: 03/08/11
- 'Prepares the "CreateParticle" message and returns it
- '***************************************************
- With auxiliarBuffer
- Call .WriteByte(ServerPacketID.CreateParticle)
- Call .WriteInteger(CharIndex)
- Call .WriteInteger(Particle)
- PrepareMessageCreateParticle = .ReadASCIIStringFixed(.length)
- End With
- End Function
- ' Writes the "CreateParticle" message to the given user's outgoing data buffer.
- '
- ' @param UserIndex User to which the message is intended.
- ' @param CharIndex Character upon which the Particle will be created.
- ' @param Particle Particle index to be displayed over the new character.
- ' @param ParticleLoops Number of times the Particle should be rendered.
- ' @remarks The data is not actually sent until the buffer is properly flushed.
- Public Sub WriteCreateParticle(ByVal UserIndex As Integer, ByVal CharIndex As Integer, ByVal Particle As Integer)
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Modified by: Emanuel Matías (Dunkan)
- 'For "ParticleSystem" of Menduz - emanuel.m@dunkancorp.com
- 'Last Modification: 03/08/11
- 'Writes the "CreateParticle" message to the given user's outgoing data buffer
- '***************************************************
- On Error GoTo Errhandler
- Call UserList(UserIndex).outgoingData.WriteASCIIStringFixed(PrepareMessageCreateParticle(CharIndex, Particle))
- Exit Sub
- Errhandler:
- If Err.Number = UserList(UserIndex).outgoingData.NotEnoughSpaceErrCode Then
- Call FlushBuffer(UserIndex)
- Resume
- End If
- End Sub
Reemplazan el HandleMeditate:
- Private Sub HandleMeditate(ByVal UserIndex As Integer)
- '***************************************************
- 'Author: Juan Martín Sotuyo Dodero (Maraxus)
- 'Last Modification: 01/08/11 (Samke)
- 'Implemente el Sistema de Particulas al Meditar
- '***************************************************
- With UserList(UserIndex)
- 'Remove packet ID
- Call .incomingData.ReadByte
- 'Dead users can't use pets
- If .flags.Muerto = 1 Then
- Call WriteConsoleMsg(UserIndex, "¡¡Estás muerto!! Solo podés usar meditar cuando estás vivo.", FontTypeNames.FONTTYPE_INFO)
- Exit Sub
- End If
- 'Can he meditate?
- If .Stats.MaxMAN = 0 Then
- Call WriteConsoleMsg(UserIndex, "Sólo las clases mágicas conocen el arte de la meditación", FontTypeNames.FONTTYPE_INFO)
- Exit Sub
- End If
- 'Admins don't have to wait :D
- ' If Not .flags.Privilegios And PlayerType.User Then
- ' .Stats.MinMAN = .Stats.MaxMAN
- ' Call WriteConsoleMsg(UserIndex, "Mana restaurado", FontTypeNames.FONTTYPE_VENENO)
- ' Call WriteUpdateMana(UserIndex)
- ' Exit Sub
- ' End If
- Call WriteMeditateToggle(UserIndex)
- If .flags.Meditando Then _
- Call WriteConsoleMsg(UserIndex, "Dejas de meditar.", FontTypeNames.FONTTYPE_INFO)
- .flags.Meditando = Not .flags.Meditando
- 'Barrin 3/10/03 Tiempo de inicio al meditar
- If .flags.Meditando Then
- .Counters.tInicioMeditar = GetTickCount() And &H7FFFFFFF
- Call WriteConsoleMsg(UserIndex, "Te estás concentrando. En " & Fix(TIEMPO_INICIOMEDITAR / 1000) & " segundos comenzarás a meditar.", FontTypeNames.FONTTYPE_INFO)
- .Char.loops = INFINITE_LOOPS
- 'Show proper Particle according to level
- If .Stats.ELV < 13 Then
- .Char.Particle = FXIDs.FXMEDITARCHICO
- ElseIf .Stats.ELV < 25 Then
- .Char.Particle = FXIDs.FXMEDITARMEDIANO
- ElseIf .Stats.ELV < 35 Then
- .Char.Particle = FXIDs.FXMEDITARGRANDE
- ElseIf .Stats.ELV < 42 Then
- .Char.Particle = FXIDs.FXMEDITARXGRANDE
- Else
- .Char.Particle = FXIDs.FXMEDITARXXGRANDE
- End If
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(.Char.CharIndex, .Char.Particle))
- Else
- .Counters.bPuedeMeditar = False
- .Char.Particle = 0
- .Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(.Char.CharIndex, 0))
- End If
- End With
- End Sub
Reemplazan el Enum FXIDs:
- Public Enum FXIDs
- FXWARP = 1
- FXMEDITARCHICO = 2
- FXMEDITARMEDIANO = 3
- FXMEDITARGRANDE = 4
- FXMEDITARXGRANDE = 5
- FXMEDITARXXGRANDE = 6
- End Enum
Buscan:
- UserList(UserIndex).Char.FX = 0
- UserList(UserIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateFX(UserList(UserIndex).Char.CharIndex, 0, 0))
Abajo agregan:
- UserList(UserIndex).Char.Particle = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(UserList(UserIndex).Char.CharIndex, 0))
Buscamos:
- If UserList(UserIndex).Stats.MinMAN >= UserList(UserIndex).Stats.MaxMAN Then
- Call WriteConsoleMsg(UserIndex, "Has terminado de meditar.", FontTypeNames.FONTTYPE_INFO)
- Call WriteMeditateToggle(UserIndex)
- UserList(UserIndex).flags.Meditando = False
- UserList(UserIndex).Char.FX = 0
- UserList(UserIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateFX(UserList(UserIndex).Char.CharIndex, 0, 0))
- Exit Sub
- End If
Reemplazamos por:
- If UserList(UserIndex).Stats.MinMAN >= UserList(UserIndex).Stats.MaxMAN Then
- Call WriteConsoleMsg(UserIndex, "Has terminado de meditar.", FontTypeNames.FONTTYPE_INFO)
- Call WriteMeditateToggle(UserIndex)
- UserList(UserIndex).flags.Meditando = False
- UserList(UserIndex).Char.Particle = 0
- UserList(UserIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(UserList(UserIndex).Char.CharIndex, 0))
- Exit Sub
- End If
Buscamos:
- If UserList(UserIndex).flags.Meditando Then
- If daño > Fix(UserList(UserIndex).Stats.MinHP / 100 * UserList(UserIndex).Stats.UserAtributos(eAtributos.Inteligencia) * UserList(UserIndex).Stats.UserSkills(eSkill.Meditar) / 100 * 12 / (RandomNumber(0, 5) + 7)) Then
- UserList(UserIndex).flags.Meditando = False
- Call WriteMeditateToggle(UserIndex)
- Call WriteConsoleMsg(UserIndex, "Dejas de meditar.", FontTypeNames.FONTTYPE_INFO)
- UserList(UserIndex).Char.FX = 0
- UserList(UserIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateFX(UserList(UserIndex).Char.CharIndex, 0, 0))
- End If
- End If
Reemplazamos por:
- If UserList(UserIndex).flags.Meditando Then
- If daño > Fix(UserList(UserIndex).Stats.MinHP / 100 * UserList(UserIndex).Stats.UserAtributos(eAtributos.Inteligencia) * UserList(UserIndex).Stats.UserSkills(eSkill.Meditar) / 100 * 12 / (RandomNumber(0, 5) + 7)) Then
- UserList(UserIndex).flags.Meditando = False
- Call WriteMeditateToggle(UserIndex)
- Call WriteConsoleMsg(UserIndex, "Dejas de meditar.", FontTypeNames.FONTTYPE_INFO)
- UserList(UserIndex).Char.Particle = 0
- UserList(UserIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(UserList(UserIndex).Char.CharIndex, 0))
- End If
- End If
Buscamos:
- If .flags.Paralizado = 0 Then
- If .flags.Meditando Then
- 'Stop meditating, next action will start movement.
- .flags.Meditando = False
- .Char.FX = 0
- .Char.loops = 0
- Call WriteMeditateToggle(UserIndex)
- Call WriteConsoleMsg(UserIndex, "Dejas de meditar.", FontTypeNames.FONTTYPE_INFO)
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateFX(.Char.CharIndex, 0, 0))
- Else
Reemplazamos por:
- If .flags.Paralizado = 0 Then
- If .flags.Meditando Then
- 'Stop meditating, next action will start movement.
- .flags.Meditando = False
- .Char.Particle = 0
- .Char.loops = 0
- Call WriteMeditateToggle(UserIndex)
- Call WriteConsoleMsg(UserIndex, "Dejas de meditar.", FontTypeNames.FONTTYPE_INFO)
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(.Char.CharIndex, 0))
- Else
Agregan en el Type Char:
- Particle As Integer
CLIENTE:
Mod declaraciones:
- Public Particle_Count As Byte
Sub main:
- Particle_Count = 1
Agregan en el Public Type Char:
- DX_ParticleCount As Integer
Buscan:
- CreateFX ' CFX
Abajo:
- CreateParticle ' CFF
Debajo de:
- Case ServerPacketID.CreateFX ' CFX
- Call HandleCreateFX
Ponen:
- Case ServerPacketID.CreateParticle ' CFF
- Call HandleCreateParticle
Al final del Protocol:
- ''
- ' Handles the CreateParticle message.
- Private Sub HandleCreateParticle()
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Modified by: Emanuel Matías (Dunkan)
- 'Last Modification: 03/08/11
- 'emanuel.m@dunkancorp.com
- '***************************************************
- If incomingData.Length < 7 Then
- Err.Raise incomingData.NotEnoughDataErrCode
- Exit Sub
- End If
- 'Remove packet ID
- Call incomingData.ReadByte
- Dim CharIndex As Integer
- CharIndex = incomingData.ReadInteger()
- charlist(CharIndex).DX_ParticleCount = incomingData.ReadInteger()
- If charlist(CharIndex).DX_ParticleCount = 0 Then
- Particle_Count = Particle_Count + 1
- Engine.Particle_Group_Make Particle_Count, 0, charlist(CharIndex).Pos.X, charlist(CharIndex).Pos.Y, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0
- Engine.Particle_Remove CInt(Particle_Count), CInt(charlist(CharIndex).Pos.X), CInt(charlist(CharIndex).Pos.Y)
- End If
- If charlist(CharIndex).DX_ParticleCount = 1 Then _
- Engine.Render_Particle charlist(CharIndex).DX_ParticleCount, charlist(CharIndex).Pos.X, charlist(CharIndex).Pos.Y
- If charlist(CharIndex).DX_ParticleCount = 2 Then _
- Engine.Render_Particle charlist(CharIndex).DX_ParticleCount, charlist(CharIndex).Pos.X, charlist(CharIndex).Pos.Y
- If charlist(CharIndex).DX_ParticleCount = 3 Then _
- Engine.Render_Particle charlist(CharIndex).DX_ParticleCount, charlist(CharIndex).Pos.X, charlist(CharIndex).Pos.Y
- If charlist(CharIndex).DX_ParticleCount = 4 Then _
- Engine.Render_Particle charlist(CharIndex).DX_ParticleCount, charlist(CharIndex).Pos.X, charlist(CharIndex).Pos.Y
- If charlist(CharIndex).DX_ParticleCount = 5 Then _
- Engine.Render_Particle charlist(CharIndex).DX_ParticleCount, charlist(CharIndex).Pos.X, charlist(CharIndex).Pos.Y
- If charlist(CharIndex).DX_ParticleCount = 6 Then _
- Engine.Render_Particle charlist(CharIndex).DX_ParticleCount, charlist(CharIndex).Pos.X, charlist(CharIndex).Pos.Y
- Call RefreshAllChars
- End Sub
Agregan en el clsDX8Engine:
- Public Sub Particle_Remove(Index As Integer, map_x As Integer, map_y As Integer)
- '*********************************************************
- '****** Coded by Dunkan (emanuel.m@dunkancorp.com) *******
- '*********************************************************
- MapData(map_x, map_y).particle_group = 0
- End Sub
- Public Sub Particle_Group_Remove(Particle_Count As Integer)
- '*********************************************************
- '****** Coded by Dunkan (emanuel.m@dunkancorp.com) *******
- '*********************************************************
- Dim i As Integer
- For i = 1 To Particle_Count
- Call Particle_Group_Make(i, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1)
- Next
- End Sub
- Function Render_Particle(ParticleCountVar As Integer, X As Long, Y As Long)
- '*********************************************************
- '****** Coded by Dunkan (emanuel.m@dunkancorp.com) *******
- '*********************************************************
- Particle_Count = Particle_Count + 1
- Particle_Group_Make Particle_Count, 0, X, Y, Particula(ParticleCountVar).VarZ, Particula(ParticleCountVar).VarX, Particula(ParticleCountVar).VarY, Particula(ParticleCountVar).AlphaInicial, Particula(ParticleCountVar).RedInicial, Particula(ParticleCountVar).GreenInicial, _
- Particula(ParticleCountVar).BlueInicial, Particula(ParticleCountVar).AlphaFinal, Particula(ParticleCountVar).RedFinal, Particula(ParticleCountVar).GreenFinal, Particula(ParticleCountVar).BlueFinal, Particula(ParticleCountVar).NumOfParticles, Particula(ParticleCountVar).Gravity, Particula(ParticleCountVar).Texture, Particula(ParticleCountVar).size, Particula(ParticleCountVar).Life
- End Function
Explicación:
Ahora deberán modificar el Particles.ini que viene con las particulas de Menduz... los NROS de las perticulas los modifican en el servidor, acá.
- Public Enum FXIDs
- FXWARP = 1
- FXMEDITARCHICO = 2
- FXMEDITARMEDIANO = 3
- FXMEDITARGRANDE = 4
- FXMEDITARXGRANDE = 5
- FXMEDITARXXGRANDE = 6
- End Enum
Ejemplo de Particles.ini:
[INIT]
Total=2
[1]
Name=Meditacion1
VarZ=0
VarX=1
VarY=-10
AlphaInicial=255
RedInicial=100
GreenInicial=100
BlueInicial=255
AlphaFinal=1
RedFinal=10
GreenFinal=10
BlueFinal=40
NumOfParticles=700
Gravity=-6
Texture=19716
Size=5
Life=500
[2]
Name=Meditacion2
VarZ=0
VarX=1
VarY=-13
AlphaInicial=255
RedInicial=255
GreenInicial=100
BlueInicial=100
AlphaFinal=1
RedFinal=200
GreenFinal=70
BlueFinal=70
NumOfParticles=700
Gravity=-8
Texture=19716
Size=5
Life=500




475![Oraculo [5] Oraculo [5]](./images/ranks/Rango29.gif)



![Dragon Ancestral [3] Dragon Ancestral [3]](./images/ranks/Rango32.gif)



![Dragon Ancestral [6] Dragon Ancestral [6]](./images/ranks/Rango35.gif)



![Dragon Ancestral [2] Dragon Ancestral [2]](./images/ranks/Rango31.gif)

![Dragon Ancestral [4] Dragon Ancestral [4]](./images/ranks/Rango33.gif)


![Dragon Ancestral [1] Dragon Ancestral [1]](./images/ranks/Rango30.gif)
