Si encuentran error avisen por ke a mi me anda de 10
SERVIDOR
Buscamos:
- Case "/online"
Y arriba agregamos:
- If UCase$(rdata) = "/ACT1v1" Then
- hay_torneo = 0
- Else
- hay_torneo = 1
- Call SendData(ToAll, 0, 0, "||Se han activado los duelos" & FONTTYPE_FIGHT)
- Exit Sub
- End If
- If UCase$(rdata) = "/DESACTIVAR1v1" Then
- Hay_torneo = 1
- Else
- Hay_torneo = 0
- Call SendData(ToAll, 0, 0, "||Se han desactivado los duelos" & FONTTYPE_FIGHT)
- Exit Sub
- End If
- If UCase$(rdata) = "/TORNEOS" Then
- frmtorneos.Show
- Exit sub
- end If
- Case "/PARTICIPAR"
- If entorneo Then
- Dim jugadores As Integer
- jugadores = val(GetVar(App.Path & "/logs/torneo.log", "CANTIDAD", "CANTIDAD"))
- Dim jugador As Integer
- For jugador = 1 To jugadores
- If UCase$(GetVar(App.Path & "/logs/torneo.log", "JUGADORES", "JUGADOR" & jugador)) = UCase$(UserList(UserIndex).Name) Then Exit Sub
- Next
- Call WriteVar(App.Path & "/logs/torneo.log", "CANTIDAD", "CANTIDAD", jugadores + 1)
- Call WriteVar(App.Path & "/logs/torneo.log", "JUGADORES", "JUGADOR" & jugadores + 1, UserList(UserIndex).Name)
- Call SendData(ToIndex, UserIndex, 0, "9T")
- Call SendData(ToAdmins, 0, 0, "2U" & UserList(UserIndex).Name)
- If EsNewbie(UserIndex) Then ' Evitamos q entren personajes newbies
- Call SendData(ToIndex, UserIndex, 0, "||¡Los newbies no pueden jugar torneos!" & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).POS.Map = 191 Then
- Call SendData(ToIndex, UserIndex, 0, "||Desde aqui no puedes poner el copmando /ULLA" & fONTTYPE_SERVER)
- Exit Sub
- End If
- If UserList(UserIndex).flags.Muerto Then ' Evitamos q entren personajes Muertos
- Call SendData(ToIndex, UserIndex, 0, "||¡Estás Muerto! No puedes ingresar al torneo!" & FONTTYPE_INFO)
- Exit Sub
- End If
- If MapInfo(191).NumUsers = 0 Then ' GALLE! Sumoneamos a los 8 primeros participantes.
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(1) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(1), 191, 49, 78, True)
- End If
- If MapInfo(191).NumUsers = 1 Then
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(2) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(2), 191, 54, 78, True)
- End If
- If MapInfo(191).NumUsers = 2 Then
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(3) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(3), 191, 59, 78, True)
- End If
- If MapInfo(191).NumUsers = 3 Then
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(4) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(4), 191, 49, 81, True)
- End If
- If MapInfo(191).NumUsers = 4 Then
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(5) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(5), 191, 54, 81, True)
- End If
- If MapInfo(191).NumUsers = 5 Then
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(6) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(6), 191, 59, 81, True)
- End If
- If MapInfo(191).NumUsers = 6 Then
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(7) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(7), 191, 49, 84, True)
- End If
- If MapInfo(191).NumUsers = 7 Then
- Call SendData(ToIndex, UserIndex, 0, "||Has entrado al torneo." & FONTTYPE_INFO)
- ParticipanteTorneo(8) = UserIndex
- Call WarpUserChar(ParticipanteTorneo(8), 191, 59, 84, True)
- Call SendData(ToAll, 0, 0, "||CUPO LLENO! FINALIZARON LAS INSCRIPCIONES!" & FONTTYPE_FENIX)
- End If
- End If
- Exit Sub
Luego creamos un nuevo modulo con el nombre
- frmtorneos
Dentro de ese formulario agregamos dos commandbuttons,que digan Activar Torneos
Y otro que diga desactivar torneos
Cklikeamos dos veces en el activar torneos y en el codigo ponemos:
- Call SendData("/act1v1")
Y en el de desactivar torneos pornemos
- Call SendData("/desactivar1v1")
Y en el modulo Declaraciones, debajo de Option Explicit. Agregamos:
- Public ParticipanteTorneo(1 To 8) As Integer
Nota:
En donde dice "MapInfo(191)", reemplanzen el 191 por el numero de mapa que uds eligieron como mapa de Sala de Espera..
Y luego donde dice, por ejemplo: "(ParticipanteTorneo(8), 191, 59, 84, True)" Cambien las coordenadas a donde desean q el jugador sea sumoneado.. para todos los participantes, es decir para PARTICIPANTETORNEO(1), (2), (3), etc..
Entonces,Lo que hace es activar los retos,desactivarlos,/participar los users ponen etc





![Oraculo [4] Oraculo [4]](./images/ranks/Rango28.gif)
909



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

![Legendario Inmortal [1] Legendario Inmortal [1]](./images/ranks/Rango36.gif)
