Aclaracion:
Para poder implementar el codigo, debemos tener algun sistema de particulas ore en el Argentum Online, ya implementado.
En el cliente:
Buscamos:
- CreateFX ' CFX
Abajo ponemos:
- CreateParticle ' CFF
Buscamos:
- Case ServerPacketID.CreateFX ' CFX
- Call HandleCreateFX
Abajo ponemos:
- Case ServerPacketID.CreateParticle ' CFF
- Call HandleCreateParticle
Buscamos:
- ''
- ' Handles the CreateFX message.
- Private Sub HandleCreateFX()
- '***************************************************
- 'Author: Juan Martín Sotuyo Dodero (Maraxus)
- 'Last Modification: 05/17/06
- '
- '***************************************************
- If incomingData.length < 7 Then
- Err.Raise incomingData.NotEnoughDataErrCode
- Exit Sub
- End If
- 'Remove packet ID
- Call incomingData.ReadByte
- Dim CharIndex As Integer
- Dim fX As Integer
- Dim Loops As Integer
- CharIndex = incomingData.ReadInteger()
- fX = incomingData.ReadInteger()
- Loops = incomingData.ReadInteger()
- Call SetCharacterFx(CharIndex, fX, Loops)
- End Sub
Abajo ponemos:
- ''
- ' Handles the CreateParticle message.
- Private Sub HandleCreateParticle()
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Last Modification: 01/08/11
- '
- '***************************************************
- 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).particle_count = incomingData.ReadInteger()
- Call General_Char_Particle_Create(charlist(CharIndex).particle_count, CharIndex)
- Call RefreshAllChars
- End Sub
En el servidor:
Buscamos:
- CreateFX ' CFX
Abajo ponemos:
- CreateParticle ' CFF
Abajo de todo el mod Protocol ponemos:
- ''
- ' 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.
- ' @param ParticleLoops Number of times the Particle should be rendered.
- ' @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, ByVal ParticleLoops As Integer) As String
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Last Modification: 01/08/11
- 'Prepares the "CreateParticle" message and returns it
- '***************************************************
- With auxiliarBuffer
- Call .WriteByte(ServerPacketID.CreateParticle)
- Call .WriteInteger(CharIndex)
- Call .WriteInteger(Particle)
- Call .WriteInteger(ParticleLoops)
- 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, ByVal ParticleLoops As Integer)
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Last Modification: 01/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, ParticleLoops))
- Exit Sub
- Errhandler:
- If Err.Number = UserList(UserIndex).outgoingData.NotEnoughSpaceErrCode Then
- Call FlushBuffer(UserIndex)
- Resume
- End If
- End Sub
Buscamos el sub:
- Private Sub HandleMeditate(ByVal UserIndex As Integer)
Remplazamos por:
- ''
- ' Handles the "Meditate" message.
- '
- ' @param userIndex The index of the user sending the message.
- 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, INFINITE_LOOPS))
- Else
- .Counters.bPuedeMeditar = False
- .Char.Particle = 0
- .Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(.Char.CharIndex, 0, 0))
- End If
- End With
- End Sub
Buscamos:
- Public Enum FXIDs
Remplazamos hasta end enum por:
- Public Enum FXIDs ' Numero de Particulas, puse las de 11.5
- FXWARP = 1
- FXMEDITARCHICO = 34
- FXMEDITARMEDIANO = 2
- FXMEDITARGRANDE = 35
- FXMEDITARXGRANDE = 36
- FXMEDITARXXGRANDE = 36
- End Enum
Buscamos:
- UserList(UserIndex).Char.FX = 0
- UserList(UserIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateFX(UserList(UserIndex).Char.CharIndex, 0, 0))
Abajo ponemos:
- UserList(UserIndex).Char.Particle = 0
- UserList(UserIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateParticle(UserList(UserIndex).Char.CharIndex, 0, 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
Remplazamos 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, 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
Remplazamos 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, 0))
- End If
- End If
Buscamos:
- If UserList(VictimIndex).flags.Meditando Then
- UserList(VictimIndex).flags.Meditando = False
- Call WriteMeditateToggle(VictimIndex)
- Call WriteConsoleMsg(VictimIndex, "Dejas de meditar.", FontTypeNames.FONTTYPE_INFO)
- UserList(VictimIndex).Char.FX = 0
- UserList(VictimIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, VictimIndex, PrepareMessageCreateFX(UserList(VictimIndex).Char.CharIndex, 0, 0))
- End If
Remplazamos por:
- If UserList(VictimIndex).flags.Meditando Then
- UserList(VictimIndex).flags.Meditando = False
- Call WriteMeditateToggle(VictimIndex)
- Call WriteConsoleMsg(VictimIndex, "Dejas de meditar.", FontTypeNames.FONTTYPE_INFO)
- UserList(VictimIndex).Char.Particle = 0
- UserList(VictimIndex).Char.loops = 0
- Call SendData(SendTarget.ToPCArea, VictimIndex, PrepareMessageCreateParticle(UserList(VictimIndex).Char.CharIndex, 0, 0))
- 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
Remplazamos 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, 0))
- Else
En el Public Type Char ponemos:
- Particle As Integer
Muestra:

Saludos







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


![Oraculo [1] Oraculo [1]](./images/ranks/Rango25.gif)



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



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