1) Yo quiero que el Nivel Mínimo para usar el comando /DESAFIO sea 48 y para usar /DESAFIAR sea 44.
2) Bueno el problema del Código que tengo es que cuando el Creador del Desafio mata al que puso /DESAFIAR no lo lleva a Ulla al que puso /DESAFIAR, y si el que puso /DESAFIAR mata al Creador del Desafio no LOS lleva a ulla tmp.
Les dejo el Código que puedo sacár del Servidor porque no encuentro el Aporte:
/DESAFIAR:
- Case "/DESAFIAR"
- If UserList(UserIndex).flags.EnDuelo = True Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No puedes usar este comando en duelo." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).Pos.Map = 63 Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No puedes participar de un desafio estando encarcelado." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.Muerto = 1 Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Estas muerto !!" & FONTTYPE_INFO)
- Exit Sub
- End If
- If HayDesafio = False Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No hay ningun desafio, para crear uno tipea '/DESAFIO'" & FONTTYPE_DESAFIO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.Participante_EnDesafio = True Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Ya estas dentro del desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If HayParticipante_Desafio = True Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Ya hay un usuario participando del desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.Creador_EnDesafio = True Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No puedes entrar en tu mismo desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.YaParticipoDesafio = 1 Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Ya has participado en el desafio actual." & FONTTYPE_INFO)
- Exit Sub
- End If
- If HayDesafio = True Then
- NivelMinimoDesafio = Nivel_CreadorDesafio - 48
- If UserList(UserIndex).Stats.ELV < NivelMinimoDesafio Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Debes ser superior a nível " & NivelMinimoDesafio & " para poder participar en el desafio actual." & FONTTYPE_DESAFIO)
- Exit Sub
- End If
- YaParticiparonDesafio = True
- UserList(UserIndex).flags.YaParticipoDesafio = 1
- UserList(UserIndex).flags.EnDesafio = True
- HayParticipante_Desafio = True
- UserList(UserIndex).flags.Participante_EnDesafio = True
- SendUserStatsBox UserIndex
- UserEntraDesafio = UserIndex
- UserList(UserIndex).flags.UltiDesafiante = UserList(UserCreaDesafio).name
- Call WarpUserChar(UserEntraDesafio, Map_Desafio, 59, 54, True)
- Call WarpUserChar(UserCreaDesafio, Map_Desafio, 75, 65, True)
- Call SendData(SendTarget.ToAll, 0, 0, "|| " & UserList(UserEntraDesafio).name & " entró al desafio." & FONTTYPE_DESAFIO)
- Call SendData(SendTarget.ToIndex, UserCreaDesafio, 0, "|| " & UserList(UserEntraDesafio).name & " (Nível: " & UserList(UserEntraDesafio).Stats.ELV & " - Clase: " & UserList(UserEntraDesafio).Clase & ") entró a la arena de desafios." & FONTTYPE_DESAFIO)
- End If
- Exit Sub
/SALIRDESAFIO:
- Case "/SALIRDESAFIO"
- If UserList(UserIndex).flags.Creador_EnDesafio = True Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Eres el creador del desafio, para cancelarlo tipea '/CANCELARDESAFIO'" & FONTTYPE_DESAFIO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.Participante_EnDesafio = False Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.EnDesafio = False Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.EnDesafio = True Then
- If UserList(UserIndex).flags.Participante_EnDesafio = True Then
- Call Participante_Cancelo_Desafio(UserIndex, UserCreaDesafio)
- End If
- End If
- Exit Sub
/ABANDONARDESAFIO:
- Case "/ABANDONARDESAFIO"
- If UserList(UserIndex).flags.Creador_EnDesafio = True Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Para abandonar el Desafio Tipéa '/CANCELARDESAFIO'" & FONTTYPE_DESAFIO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.Participante_EnDesafio = False Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.EnDesafio = False Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.EnDesafio = True Then
- If UserList(UserIndex).flags.Participante_EnDesafio = True Then
- Call Participante_Cancelo_Desafio(UserIndex, UserCreaDesafio)
- End If
- End If
- Exit Sub
/CANCELARDESAFIO:
- Case "/CANCELARDESAFIO"
- If UserList(UserIndex).flags.EnDesafio = False Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.Creador_EnDesafio = False Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No eres el creador del desafio, para salir del mismo tipea '/SALIRDESAFIO'" & FONTTYPE_DESAFIO)
- Exit Sub
- End If
- If UserList(UserIndex).flags.EnDesafio = True Then
- If UserList(UserIndex).flags.Creador_EnDesafio = True Then
- 'If MapData(UserList(UserIndex).Pos.Map).NpcIndex > 0 Then
- 'QuitarNPC NpcIndex
- 'End If
- Call Creador_Cancelo_Desafio(UserIndex, UserEntraDesafio)
- End If
- End If
- Case "/J6"
- If UserList(UserIndex).flags.Muerto = 1 Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z12")
- Exit Sub
- End If
La parte donde es el Error me parece:
- If UserList(UserIndex).flags.EnDesafio = True Then
- If UserList(UserIndex).flags.Participante_EnDesafio = True Then
- UserList(UserIndex).flags.YaParticipoDesafio = 1
- UserList(UserIndex).flags.Participante_EnDesafio = False
- UserList(UserIndex).flags.EnDesafio = False
- HayParticipante_Desafio = False
- Call WarpUserChar(UserIndex, 1, 51, 51)
- Call SendData(SendTarget.ToAll, 0, 0, "||" & UserList(UserCreaDesafio).name & " derrotó a " & UserList(UserIndex).name & ", para participar tipea '/DESAFIAR'" & FONTTYPE_INFO)
- UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio = UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio + 1 'Rondas Desafio
- 'UserList(UserCreaDesafio).Ranking.MaxRondasDesafio = UserList(UserCreaDesafio).Ranking.MaxRondasDesafio + 1 /RANKING
- 'Call GuardarRanking("Desafio", UserCreaDesafio)
- UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio = UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio + 1 'Rondas Desafio
- If UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio >= 5 Then
- Select Case UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio
- Case 5
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 5 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 10
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 10 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 15
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 15 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 20
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 20 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 30
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 30 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 50
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 50 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 70
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 70 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 80
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 80 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 90
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 90 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 100
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 100 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 120
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 120 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 140
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 140 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 160
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 160 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 250
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 250 rondas consecutivas ganadas." & "~255~255~255~1~0"
- Case 500
- SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 500 rondas consecutivas ganadas." & "~255~255~255~1~0"
- End Select
- End If
- End If
- If UserList(UserIndex).flags.Creador_EnDesafio = True Then
- If HayParticipante_Desafio = True Then
- YaParticiparonDesafio = False
- UserList(UserEntraDesafio).flags.EnDesafio = False
- UserList(UserEntraDesafio).flags.YaParticipoDesafio = 0
- UserList(UserEntraDesafio).flags.Participante_EnDesafio = False
- End If
- HayDesafio = False
- HayParticipante_Desafio = False
- UserList(UserIndex).flags.Creador_EnDesafio = False
- UserList(UserIndex).flags.EnDesafio = False
- Nivel_CreadorDesafio = 0
- NivelMinimoDesafio = 0
- UserList(UserEntraDesafio).Stats.GLD = UserList(UserEntraDesafio).Stats.GLD + 60000
- ' SendUserStatsBox UserEntraDesafio
- SendData SendTarget.ToIndex, UserEntraDesafio, 0, "||Has ganado 60.000 monedas de oro." & FONTTYPE_SERVER
- Call WarpUserChar(UserEntraDesafio, 1, 50, 50, True)
- Call SendData(SendTarget.ToAll, 0, 0, "||" & UserList(UserEntraDesafio).name & " derrotó a " & UserList(UserIndex).name & "." & "~100~100~100~1~0")
- UserList(UserIndex).flags.UsuariosMatadosEnDesafio = 0 'Rondas desafio
- Dim jki As Integer
- For jki = 1 To LastUser
- If UserList(jki).flags.YaParticipoDesafio = 1 Then
- UserList(jki).flags.YaParticipoDesafio = 0
- UserList(jki).flags.UltiDesafiante = vbNullString
- End If
Grácias.
Edit: Problema (1) SOLUCIONADO, solo falta el problema 2
- Sub UserDie(ByVal UserIndex As Integer)
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "ICEDIE")
- On Error GoTo ErrorHandler
- 'Sonido
- If UCase$(UserList(UserIndex).Genero) = "MUJER" Then
- Call SonidosMapas.ReproducirSonido(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, e_SoundIndex.MUERTE_MUJER)
- Else
- Call SonidosMapas.ReproducirSonido(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, e_SoundIndex.MUERTE_HOMBRE)
- End If
- 'Quitar el dialogo del user muerto
- Call SendData(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, "QDL" & UserList(UserIndex).char.CharIndex)
- UserList(UserIndex).Stats.MinHP = 0
- UserList(UserIndex).Stats.MinSta = 0
- UserList(UserIndex).flags.AtacadoPorNpc = 0
- UserList(UserIndex).flags.AtacadoPorUser = 0
- UserList(UserIndex).flags.Envenenado = 0
- UserList(UserIndex).flags.Muerto = 1
- If UserList(UserIndex).Pos.Map = 64 Then 'mapa de duelo para que sea sacado
- Call WarpUserChar(UserIndex, 1, 50, 50, True)
- Call SendData(ToIndex, UserIndex, 0, "||Has diso vencido debes abandonar la zona de duelos." & FONTTYPE_WARNING)
- End If
- Dim AN As Integer
- AN = UserList(UserIndex).flags.AtacadoPorNpc
- If AN > 0 Then
- Npclist(AN).Movement = Npclist(AN).flags.OldMovement
- Npclist(AN).Hostile = Npclist(AN).flags.OldHostil
- Npclist(AN).flags.AttackedBy = ""
- End If
- '<<<< Paralisis >>>>
- If UserList(UserIndex).flags.Paralizado = 1 Then
- UserList(UserIndex).flags.Paralizado = 0
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "PARADOK")
- End If
- '<<< Estupidez >>>
- If UserList(UserIndex).flags.Estupidez = 1 Then
- UserList(UserIndex).flags.Estupidez = 0
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "NESTUP")
- End If
- '<<<< Descansando >>>>
- If UserList(UserIndex).flags.Descansar Then
- UserList(UserIndex).flags.Descansar = False
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "DOK")
- End If
- '<<<< Meditando >>>>
- If UserList(UserIndex).flags.Meditando Then
- UserList(UserIndex).flags.Meditando = False
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "MEDOK")
- End If
- '<<<< Invisible >>>>
- If UserList(UserIndex).flags.Invisible = 1 Or UserList(UserIndex).flags.Oculto = 1 Then
- UserList(UserIndex).flags.Oculto = 0
- UserList(UserIndex).flags.Invisible = 0
- 'no hace falta encriptar este NOVER
- Call SendData(SendTarget.ToMap, 0, UserList(UserIndex).Pos.Map, "NOVER" & UserList(UserIndex).char.CharIndex & ",0")
- End If
- If TriggerZonaPelea(UserIndex, UserIndex) <> TRIGGER6_PERMITE Then
- ' << Si es newbie no pierde el inventario >>
- If Not EsNewbie(UserIndex) Or Criminal(UserIndex) Then
- Call TirarTodo(UserIndex)
- Else
- If EsNewbie(UserIndex) Then Call TirarTodosLosItemsNoNewbies(UserIndex)
- End If
- End If
- ' DESEQUIPA TODOS LOS OBJETOS
- 'desequipar armadura
- If UserList(UserIndex).Invent.ArmourEqpObjIndex > 0 Then
- Call Desequipar(UserIndex, UserList(UserIndex).Invent.ArmourEqpSlot)
- End If
- 'desequipar arma
- If UserList(UserIndex).Invent.WeaponEqpObjIndex > 0 Then
- Call Desequipar(UserIndex, UserList(UserIndex).Invent.WeaponEqpSlot)
- End If
- 'desequipar casco
- If UserList(UserIndex).Invent.CascoEqpObjIndex > 0 Then
- Call Desequipar(UserIndex, UserList(UserIndex).Invent.CascoEqpSlot)
- End If
- 'desequipar herramienta
- If UserList(UserIndex).Invent.HerramientaEqpObjIndex > 0 Then
- Call Desequipar(UserIndex, UserList(UserIndex).Invent.HerramientaEqpSlot)
- End If
- 'desequipar municiones
- If UserList(UserIndex).Invent.MunicionEqpObjIndex > 0 Then
- Call Desequipar(UserIndex, UserList(UserIndex).Invent.MunicionEqpSlot)
- End If
- 'desequipar escudo
- If UserList(UserIndex).Invent.EscudoEqpObjIndex > 0 Then
- Call Desequipar(UserIndex, UserList(UserIndex).Invent.EscudoEqpSlot)
- End If
- ' << Reseteamos los posibles FX sobre el personaje >>
- If UserList(UserIndex).char.loops = LoopAdEternum Then
- UserList(UserIndex).char.FX = 0
- UserList(UserIndex).char.loops = 0
- End If
- ' << Restauramos el mimetismo
- If UserList(UserIndex).flags.Mimetizado = 1 Then
- UserList(UserIndex).char.Body = UserList(UserIndex).CharMimetizado.Body
- UserList(UserIndex).char.Head = UserList(UserIndex).CharMimetizado.Head
- UserList(UserIndex).char.CascoAnim = UserList(UserIndex).CharMimetizado.CascoAnim
- UserList(UserIndex).char.ShieldAnim = UserList(UserIndex).CharMimetizado.ShieldAnim
- UserList(UserIndex).char.WeaponAnim = UserList(UserIndex).CharMimetizado.WeaponAnim
- UserList(UserIndex).Counters.Mimetismo = 0
- UserList(UserIndex).flags.Mimetizado = 0
- End If
- '<< Cambiamos la apariencia del char >>
- If UserList(UserIndex).flags.Navegando = 0 Then
- UserList(UserIndex).char.Body = iCuerpoMuerto
- UserList(UserIndex).char.Head = iCabezaMuerto
- UserList(UserIndex).char.ShieldAnim = NingunEscudo
- UserList(UserIndex).char.WeaponAnim = NingunArma
- UserList(UserIndex).char.CascoAnim = NingunCasco
- Else
- UserList(UserIndex).char.Body = iFragataFantasmal ';)
- End If
- Dim i As Integer
- For i = 1 To MAXMASCOTAS
- If UserList(UserIndex).MascotasIndex(i) > 0 Then
- If Npclist(UserList(UserIndex).MascotasIndex(i)).Contadores.TiempoExistencia > 0 Then
- Call MuereNpc(UserList(UserIndex).MascotasIndex(i), 0)
- Else
- Npclist(UserList(UserIndex).MascotasIndex(i)).MaestroUser = 0
- Npclist(UserList(UserIndex).MascotasIndex(i)).Movement = Npclist(UserList(UserIndex).MascotasIndex(i)).flags.OldMovement
- Npclist(UserList(UserIndex).MascotasIndex(i)).Hostile = Npclist(UserList(UserIndex).MascotasIndex(i)).flags.OldHostil
- UserList(UserIndex).MascotasIndex(i) = 0
- UserList(UserIndex).MascotasType(i) = 0
- End If
- End If
- Next i
- UserList(UserIndex).NroMacotas = 0
- If Criminal(UserIndex) Then
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z33")
- Else
- Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z34")
- End If
- 'If MapInfo(UserList(UserIndex).Pos.Map).Pk Then
- ' Dim MiObj As Obj
- ' Dim nPos As WorldPos
- ' MiObj.ObjIndex = RandomNumber(554, 555)
- ' MiObj.Amount = 1
- ' nPos = TirarItemAlPiso(UserList(UserIndex).Pos, MiObj)
- ' Dim ManchaSangre As New cGarbage
- ' ManchaSangre.Map = nPos.Map
- ' ManchaSangre.X = nPos.X
- ' ManchaSangre.Y = nPos.Y
- ' Call TrashCollector.Add(ManchaSangre)
- 'End If
- '<< Actualizamos clientes >>
- Call ChangeUserChar(SendTarget.ToMap, 0, UserList(UserIndex).Pos.Map, val(UserIndex), UserList(UserIndex).char.Body, UserList(UserIndex).char.Head, UserList(UserIndex).char.Heading, NingunArma, NingunEscudo, NingunCasco)
- Call SendUserStatsBox(UserIndex)
- Call SendUserHitBox(UserIndex)
- Call EnviarDopa(UserIndex)
- '<<Castigos por party>>
- If UserList(UserIndex).PartyIndex > 0 Then
- Call mdParty.ObtenerExito(UserIndex, UserList(UserIndex).Stats.ELV * -10 * mdParty.CantMiembros(UserIndex), UserList(UserIndex).Pos.Map, UserList(UserIndex).Pos.X, UserList(UserIndex).Pos.Y)
- End If
- Exit Sub
- If UserList(UserIndex).flags.EnDuelo = True Then
- UserList(UserIndex).flags.EnDuelo = False
- Call WarpUserChar(UserIndex, 1, 50, 50)
- Call SendData(SendTarget.ToAll, 0, 0, "||Duelos> " & UserList(UserIndex).name & " ha sido vencido." & FONTTYPE_TALK)
- Exit Sub
- End If
- Exit Sub
- ErrorHandler:
- Call LogError("Error en SUB USERDIE. Error: " & Err.Number & " Descripción: " & Err.Description)
- End Sub





227![Newbie [4] Newbie [4]](./images/ranks/Rango3.gif)


![Aprendiz [6] Aprendiz [6]](./images/ranks/Rango11.gif)



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

![Aprendiz [2] Aprendiz [2]](./images/ranks/Rango7.gif)
