Cliente:
Buscamos:
- Online '/ONLINE
Abajo ponemos:
- SendDuelo '/DUELO
- BackDuelo '/SALIRDUELO
Buscamos:
- ''
- ' Writes the "GuildRequestDetails" message to the outgoing data buffer.
- '
- ' @param guild The guild whose details are requested.
- ' @remarks The data is not actually sent until the buffer is properly flushed.
- Public Sub WriteGuildRequestDetails(ByVal guild As String)
- '***************************************************
- 'Autor: Juan Martín Sotuyo Dodero (Maraxus)
- 'Last Modification: 05/17/06
- 'Writes the "GuildRequestDetails" message to the outgoing data buffer
- '***************************************************
- With outgoingData
- Call .WriteByte(ClientPacketID.GuildRequestDetails)
- Call .WriteASCIIString(guild)
- End With
- End Sub
Abajo ponemos:
- ''
- ' Writes the "BackDuelo" message to the outgoing data buffer.
- '
- ' @remarks The data is not actually sent until the buffer is properly flushed.
- Public Sub WriteBackDuelo()
- '***************************************************
- 'Autor: Martín Gomez (Samke)
- 'Last Modification: 23/08/2011
- 'Writes the "BackDuelo" message to the outgoing data buffer
- '***************************************************
- Call outgoingData.WriteByte(ClientPacketID.BackDuelo)
- End Sub
- ''
- ' Writes the "SendDuelo" message to the outgoing data buffer.
- '
- ' @remarks The data is not actually sent until the buffer is properly flushed.
- Public Sub WriteSendDuelo()
- '***************************************************
- 'Autor: Martín Gomez (Samke)
- 'Last Modification: 23/08/2011
- 'Writes the "SendDuelo" message to the outgoing data buffer
- '***************************************************
- Call outgoingData.WriteByte(ClientPacketID.SendDuelo)
- End Sub
Buscamos:
- Case "/SEGUIR"
- Call WriteNPCFollow
Abajo ponemos:
- Case "/DUELO"
- Call WriteSendDuelo
- Case "/SALIRDUELO"
- Call WriteBackDuelo
Servidor:
Buscamos:
- Public ServerSoloGMs As Integer
Abajo ponemos:
- Public Duelo As tDuelo
- Public Type tDuelo
- UsUaRiOs As Byte
- EnDuelo As Byte
- End Type
Buscamos:
- '<< Actualizamos clientes >>
- Call ChangeUserChar(UserIndex, UserList(UserIndex).Char.body, UserList(UserIndex).Char.Head, UserList(UserIndex).Char.heading, NingunArma, NingunEscudo, NingunCasco)
- Call WriteUpdateUserStats(UserIndex)
Abajo ponemos:
- ' Sacamos usuario del Duelo cuando muere
- If Duelo.EnDuelo = 1 Then
- Duelo.EnDuelo = 0
- Duelo.UsUaRiOs = Duelo.UsUaRiOs - 1
- Call WarpUserChar(UserIndex, 1, 51, 46, True)
- Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Servidor> " & UserList(UserIndex).name & " a muerto en duelo. Quien quiera ingresar /Duelo.", FontTypeNames.FONTTYPE_INFOBOLD))
- End If
Buscamos:
- ' Si el usuario habia dejado un msg en la gm's queue lo borramos
- If Ayuda.Existe(UserList(UserIndex).name) Then Call Ayuda.Quitar(UserList(UserIndex).name)
Abajo ponemos:
- ' Sacamos usuario del Duelo si se desonecta
- If Duelo.EnDuelo = 1 Then
- Duelo.EnDuelo = 0
- Duelo.UsUaRiOs = Duelo.UsUaRiOs - 1
- Call WarpUserChar(UserIndex, 1, 51, 46, True)
- Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Servidor> " & UserList(UserIndex).name & " se desconecto en duelo. Quien quiera ingresar /Duelo.", FontTypeNames.FONTTYPE_INFOBOLD))
- End If
Buscamos:
- Online '/ONLINE
Abajo ponemos:
- SendDuelo '/DUELO
- BackDuelo '/SALIRDUELO
Buscamos:
- Case ClientPacketID.NPCFollow '/SEGUIR
- Call HandleNPCFollow(UserIndex)
Abajo ponemos:
- Case ClientPacketID.SendDuelo '/DUELO
- Call HandleSendDuelo(UserIndex)
- Case ClientPacketID.BackDuelo '/SALIRDUELO
- Call HandleBackDuelo(UserIndex)
Buscamos:
- ''
- ' Handles the "Online" message.
- '
- ' @param userIndex The index of the user sending the message.
- Private Sub HandleOnline(ByVal UserIndex As Integer)
- '***************************************************
- 'Author: Juan Martín Sotuyo Dodero (Maraxus)
- 'Last Modification: 05/17/06
- '
- '***************************************************
- Dim i As Long
- Dim Count As Long
- With UserList(UserIndex)
- 'Remove packet ID
- Call .incomingData.ReadByte
- For i = 1 To LastUser
- If LenB(UserList(i).name) <> 0 Then
- If UserList(i).flags.Privilegios And (PlayerType.User Or PlayerType.Consejero) Then _
- Count = Count + 1
- End If
- Next i
- Call WriteConsoleMsg(UserIndex, "Número de usuarios: " & CStr(Count), FontTypeNames.FONTTYPE_INFO)
- End With
- End Sub
Abajo ponemos:
- ''
- ' Handles the "BackDuelo" message.
- '
- ' @param userIndex The index of the user sending the message.
- Private Sub HandleBackDuelo(ByVal UserIndex As Integer)
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Last Modification: 23/08/2011
- '***************************************************
- With UserList(UserIndex)
- 'Remove packet ID
- Call .incomingData.ReadByte
- If Duelo.EnDuelo = 1 Then
- Duelo.UsUaRiOs = Duelo.UsUaRiOs - 1
- Duelo.EnDuelo = 0
- Call WarpUserChar(UserIndex, 1, 51, 46, True)
- Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Servidor> " & UserList(UserIndex).name & " a abandonado la sala de duelos. Quien quiera ingresar /Duelo.", FontTypeNames.FONTTYPE_INFOBOLD))
- End If
- End With
- End Sub
- ''
- ' Handles the "SendDuelo" message.
- '
- ' @param userIndex The index of the user sending the message.
- Private Sub HandleSendDuelo(ByVal UserIndex As Integer)
- '***************************************************
- 'Author: Martín Gomez (Samke)
- 'Last Modification: 23/08/2011
- '***************************************************
- With UserList(UserIndex)
- 'Remove packet ID
- Call .incomingData.ReadByte
- If UserList(UserIndex).flags.Muerto Then
- Call WriteConsoleMsg(UserIndex, "Servidor> No puedes ingresar al torneo si estas muerto.", FontTypeNames.FONTTYPE_INFOBOLD)
- Exit Sub
- End If
- If UserList(UserIndex).Counters.Pena >= 1 Then
- Call WriteConsoleMsg(UserIndex, "Servidor> No puedes ingresar al torneo si estas en la carcel.", FontTypeNames.FONTTYPE_INFOBOLD)
- Exit Sub
- End If
- If Duelo.UsUaRiOs < 2 Then ' Cupos
- Duelo.UsUaRiOs = Duelo.UsUaRiOs + 1
- Duelo.EnDuelo = 1
- Call WarpUserChar(UserIndex, 1, 74, 30, True)
- Call WriteConsoleMsg(UserIndex, "Servidor> Has ingresado al duelo.", FontTypeNames.FONTTYPE_INFOBOLD)
- Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Servidor> " & UserList(UserIndex).name & " a entrado a la sala de duelos. ¡Buena suerte!", FontTypeNames.FONTTYPE_INFOBOLD))
- Else
- Call WriteConsoleMsg(UserIndex, "Servidor> La sala de duelo esta ocupada.", FontTypeNames.FONTTYPE_INFOBOLD)
- End If
- End With
- End Sub
Comandos:
- /DUELO
- /SALIRDUELO
Saludos







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

![Aprendiz [1] Aprendiz [1]](./images/ranks/Rango6.gif)

![Aprendiz [7] Aprendiz [7]](./images/ranks/Rango12.gif)
