GS-Zone

DESAFIOS Ir al Indice

Moderadores: Moderadores de Argentum, Especialistas de Argentum, Especialistas de Programación

6

Nota » 27 Dic 2011 18:11

Bueno, me dieron un Sistema de Desafios al cual le falta algo,:

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:

  1.                Case "/DESAFIAR"
  2.  
  3.            If UserList(UserIndex).flags.EnDuelo = True Then
  4.           Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No puedes usar este comando en duelo." & FONTTYPE_INFO)
  5.              Exit Sub
  6.              End If
  7.            If UserList(UserIndex).Pos.Map = 63 Then
  8.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No puedes participar de un desafio estando encarcelado." & FONTTYPE_INFO)
  9.              Exit Sub
  10.              End If
  11.  
  12.  
  13.                 If UserList(UserIndex).flags.Muerto = 1 Then
  14.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Estas muerto !!" & FONTTYPE_INFO)
  15.                 Exit Sub
  16.                 End If
  17.  
  18.                 If HayDesafio = False Then
  19.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No hay ningun desafio, para crear uno tipea '/DESAFIO'" & FONTTYPE_DESAFIO)
  20.                 Exit Sub
  21.                 End If
  22.  
  23.                 If UserList(UserIndex).flags.Participante_EnDesafio = True Then
  24.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Ya estas dentro del desafio." & FONTTYPE_INFO)
  25.                Exit Sub
  26.                 End If
  27.  
  28.                 If HayParticipante_Desafio = True Then
  29.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Ya hay un usuario participando del desafio." & FONTTYPE_INFO)
  30.                 Exit Sub
  31.                 End If
  32.  
  33.                 If UserList(UserIndex).flags.Creador_EnDesafio = True Then
  34.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No puedes entrar en tu mismo desafio." & FONTTYPE_INFO)
  35.                 Exit Sub
  36.                 End If
  37.  
  38.                 If UserList(UserIndex).flags.YaParticipoDesafio = 1 Then
  39.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Ya has participado en el desafio actual." & FONTTYPE_INFO)
  40.                 Exit Sub
  41.                 End If
  42.  
  43.                If HayDesafio = True Then
  44.  
  45.                NivelMinimoDesafio = Nivel_CreadorDesafio - 48
  46.  
  47.                If UserList(UserIndex).Stats.ELV < NivelMinimoDesafio Then
  48.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Debes ser superior a nível " & NivelMinimoDesafio & " para poder participar en el desafio actual." & FONTTYPE_DESAFIO)
  49.                Exit Sub
  50.                End If
  51.  
  52.  
  53.                YaParticiparonDesafio = True
  54.                UserList(UserIndex).flags.YaParticipoDesafio = 1
  55.                UserList(UserIndex).flags.EnDesafio = True
  56.                HayParticipante_Desafio = True
  57.                UserList(UserIndex).flags.Participante_EnDesafio = True
  58.  
  59.                SendUserStatsBox UserIndex
  60.  
  61.                UserEntraDesafio = UserIndex
  62.                UserList(UserIndex).flags.UltiDesafiante = UserList(UserCreaDesafio).name
  63.  
  64.                Call WarpUserChar(UserEntraDesafio, Map_Desafio, 59, 54, True)
  65.  
  66.                Call WarpUserChar(UserCreaDesafio, Map_Desafio, 75, 65, True)
  67.  
  68.                Call SendData(SendTarget.ToAll, 0, 0, "|| " & UserList(UserEntraDesafio).name & " entró al desafio." & FONTTYPE_DESAFIO)
  69.  
  70.                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)
  71.  
  72.                End If
  73.  
  74.                Exit Sub


/SALIRDESAFIO:

  1.               Case "/SALIRDESAFIO"
  2.  
  3.                If UserList(UserIndex).flags.Creador_EnDesafio = True Then
  4.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Eres el creador del desafio, para cancelarlo tipea '/CANCELARDESAFIO'" & FONTTYPE_DESAFIO)
  5.                Exit Sub
  6.                End If
  7.  
  8.                If UserList(UserIndex).flags.Participante_EnDesafio = False Then
  9.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
  10.                Exit Sub
  11.                End If
  12.  
  13.                If UserList(UserIndex).flags.EnDesafio = False Then
  14.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
  15.                Exit Sub
  16.                End If
  17.  
  18.               If UserList(UserIndex).flags.EnDesafio = True Then
  19.                If UserList(UserIndex).flags.Participante_EnDesafio = True Then
  20.  
  21.                Call Participante_Cancelo_Desafio(UserIndex, UserCreaDesafio)
  22.  
  23.                End If
  24.               End If
  25.  
  26.                Exit Sub


/ABANDONARDESAFIO:

  1.               Case "/ABANDONARDESAFIO"
  2.  
  3.                If UserList(UserIndex).flags.Creador_EnDesafio = True Then
  4.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Para abandonar el Desafio Tipéa '/CANCELARDESAFIO'" & FONTTYPE_DESAFIO)
  5.                Exit Sub
  6.                End If
  7.  
  8.                If UserList(UserIndex).flags.Participante_EnDesafio = False Then
  9.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
  10.                Exit Sub
  11.                End If
  12.  
  13.                If UserList(UserIndex).flags.EnDesafio = False Then
  14.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
  15.                Exit Sub
  16.                End If
  17.  
  18.               If UserList(UserIndex).flags.EnDesafio = True Then
  19.                If UserList(UserIndex).flags.Participante_EnDesafio = True Then
  20.  
  21.                Call Participante_Cancelo_Desafio(UserIndex, UserCreaDesafio)
  22.  
  23.                End If
  24.               End If
  25.  
  26.                Exit Sub


/CANCELARDESAFIO:

  1.               Case "/CANCELARDESAFIO"
  2.  
  3.                If UserList(UserIndex).flags.EnDesafio = False Then
  4.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No estas en desafio." & FONTTYPE_INFO)
  5.                Exit Sub
  6.                End If
  7.  
  8.                If UserList(UserIndex).flags.Creador_EnDesafio = False Then
  9.                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||No eres el creador del desafio, para salir del mismo tipea '/SALIRDESAFIO'" & FONTTYPE_DESAFIO)
  10.                Exit Sub
  11.               End If
  12.  
  13.               If UserList(UserIndex).flags.EnDesafio = True Then
  14.               If UserList(UserIndex).flags.Creador_EnDesafio = True Then
  15.               'If MapData(UserList(UserIndex).Pos.Map).NpcIndex > 0 Then
  16.               'QuitarNPC NpcIndex
  17.               'End If
  18.  
  19.              Call Creador_Cancelo_Desafio(UserIndex, UserEntraDesafio)
  20.  
  21.               End If
  22.              End If
  23.             Case "/J6"
  24.             If UserList(UserIndex).flags.Muerto = 1 Then
  25.                 Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z12")
  26.                 Exit Sub
  27.             End If


La parte donde es el Error me parece:

  1. If UserList(UserIndex).flags.EnDesafio = True Then
  2.    
  3.          If UserList(UserIndex).flags.Participante_EnDesafio = True Then
  4.    
  5.          UserList(UserIndex).flags.YaParticipoDesafio = 1
  6.          UserList(UserIndex).flags.Participante_EnDesafio = False
  7.          UserList(UserIndex).flags.EnDesafio = False
  8.          HayParticipante_Desafio = False
  9.  
  10.         Call WarpUserChar(UserIndex, 1, 51, 51)
  11.  
  12.         Call SendData(SendTarget.ToAll, 0, 0, "||" & UserList(UserCreaDesafio).name & " derrotó a " & UserList(UserIndex).name & ", para participar tipea '/DESAFIAR'" & FONTTYPE_INFO)
  13.              UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio = UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio + 1 'Rondas Desafio
  14.        'UserList(UserCreaDesafio).Ranking.MaxRondasDesafio = UserList(UserCreaDesafio).Ranking.MaxRondasDesafio + 1 /RANKING
  15.        'Call GuardarRanking("Desafio", UserCreaDesafio)
  16.  
  17.         UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio = UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio + 1 'Rondas Desafio
  18.  
  19.        If UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio >= 5 Then
  20.  
  21.          Select Case UserList(UserCreaDesafio).flags.UsuariosMatadosEnDesafio
  22.  
  23.        Case 5
  24.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 5 rondas consecutivas ganadas." & "~255~255~255~1~0"
  25.        Case 10
  26.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 10 rondas consecutivas ganadas." & "~255~255~255~1~0"
  27.        Case 15
  28.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 15 rondas consecutivas ganadas." & "~255~255~255~1~0"
  29.        Case 20
  30.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 20 rondas consecutivas ganadas." & "~255~255~255~1~0"
  31.        Case 30
  32.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 30 rondas consecutivas ganadas." & "~255~255~255~1~0"
  33.        Case 50
  34.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 50 rondas consecutivas ganadas." & "~255~255~255~1~0"
  35.        Case 70
  36.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 70 rondas consecutivas ganadas." & "~255~255~255~1~0"
  37.        Case 80
  38.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 80 rondas consecutivas ganadas." & "~255~255~255~1~0"
  39.        Case 90
  40.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 90 rondas consecutivas ganadas." & "~255~255~255~1~0"
  41.        Case 100
  42.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 100 rondas consecutivas ganadas." & "~255~255~255~1~0"
  43.        Case 120
  44.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 120 rondas consecutivas ganadas." & "~255~255~255~1~0"
  45.        Case 140
  46.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 140 rondas consecutivas ganadas." & "~255~255~255~1~0"
  47.        Case 160
  48.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 160 rondas consecutivas ganadas." & "~255~255~255~1~0"
  49.        Case 250
  50.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 250 rondas consecutivas ganadas." & "~255~255~255~1~0"
  51.        Case 500
  52.        SendData SendTarget.ToAll, UserIndex, 0, "||" & UserList(UserCreaDesafio).name & " lleva 500 rondas consecutivas ganadas." & "~255~255~255~1~0"
  53.  
  54.        End Select
  55.  
  56.        End If
  57.       End If
  58.  
  59.         If UserList(UserIndex).flags.Creador_EnDesafio = True Then
  60.  
  61.        If HayParticipante_Desafio = True Then
  62.                            YaParticiparonDesafio = False
  63.  
  64.        UserList(UserEntraDesafio).flags.EnDesafio = False
  65.        UserList(UserEntraDesafio).flags.YaParticipoDesafio = 0
  66.        UserList(UserEntraDesafio).flags.Participante_EnDesafio = False
  67.        End If
  68.        HayDesafio = False
  69.        HayParticipante_Desafio = False
  70.  
  71.  
  72.        UserList(UserIndex).flags.Creador_EnDesafio = False
  73.        UserList(UserIndex).flags.EnDesafio = False
  74.        Nivel_CreadorDesafio = 0
  75.        NivelMinimoDesafio = 0
  76.  
  77.        UserList(UserEntraDesafio).Stats.GLD = UserList(UserEntraDesafio).Stats.GLD + 60000
  78.      '  SendUserStatsBox UserEntraDesafio
  79.  
  80.        SendData SendTarget.ToIndex, UserEntraDesafio, 0, "||Has ganado 60.000 monedas de oro." & FONTTYPE_SERVER
  81.  
  82.        Call WarpUserChar(UserEntraDesafio, 1, 50, 50, True)
  83.  
  84.        Call SendData(SendTarget.ToAll, 0, 0, "||" & UserList(UserEntraDesafio).name & " derrotó a " & UserList(UserIndex).name & "." & "~100~100~100~1~0")
  85.    UserList(UserIndex).flags.UsuariosMatadosEnDesafio = 0 'Rondas desafio
  86.    Dim jki As Integer
  87.    For jki = 1 To LastUser
  88.             If UserList(jki).flags.YaParticipoDesafio = 1 Then
  89.             UserList(jki).flags.YaParticipoDesafio = 0
  90.             UserList(jki).flags.UltiDesafiante = vbNullString
  91.             End If


Grácias.

Edit: Problema (1) SOLUCIONADO, solo falta el problema 2 :), les dejo el Userdie que tengo,:

  1. Sub UserDie(ByVal UserIndex As Integer)
  2. Call SendData(SendTarget.ToIndex, UserIndex, 0, "ICEDIE")
  3. On Error GoTo ErrorHandler
  4.  
  5.     'Sonido
  6.     If UCase$(UserList(UserIndex).Genero) = "MUJER" Then
  7.         Call SonidosMapas.ReproducirSonido(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, e_SoundIndex.MUERTE_MUJER)
  8.     Else
  9.         Call SonidosMapas.ReproducirSonido(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, e_SoundIndex.MUERTE_HOMBRE)
  10.     End If
  11.    
  12.     'Quitar el dialogo del user muerto
  13.     Call SendData(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, "QDL" & UserList(UserIndex).char.CharIndex)
  14.    
  15.     UserList(UserIndex).Stats.MinHP = 0
  16.     UserList(UserIndex).Stats.MinSta = 0
  17.     UserList(UserIndex).flags.AtacadoPorNpc = 0
  18.     UserList(UserIndex).flags.AtacadoPorUser = 0
  19.     UserList(UserIndex).flags.Envenenado = 0
  20.     UserList(UserIndex).flags.Muerto = 1
  21.    
  22.     If UserList(UserIndex).Pos.Map = 64 Then 'mapa de duelo para que sea sacado
  23.         Call WarpUserChar(UserIndex, 1, 50, 50, True)
  24.         Call SendData(ToIndex, UserIndex, 0, "||Has diso vencido debes abandonar la zona de duelos." & FONTTYPE_WARNING)
  25.     End If
  26.    
  27.     Dim AN As Integer
  28.    
  29.     AN = UserList(UserIndex).flags.AtacadoPorNpc
  30.    
  31.     If AN > 0 Then
  32.         Npclist(AN).Movement = Npclist(AN).flags.OldMovement
  33.         Npclist(AN).Hostile = Npclist(AN).flags.OldHostil
  34.         Npclist(AN).flags.AttackedBy = ""
  35.     End If
  36.    
  37.     '<<<< Paralisis >>>>
  38.     If UserList(UserIndex).flags.Paralizado = 1 Then
  39.         UserList(UserIndex).flags.Paralizado = 0
  40.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "PARADOK")
  41.        
  42.     End If
  43.    
  44.     '<<< Estupidez >>>
  45.     If UserList(UserIndex).flags.Estupidez = 1 Then
  46.         UserList(UserIndex).flags.Estupidez = 0
  47.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "NESTUP")
  48.     End If
  49.    
  50.     '<<<< Descansando >>>>
  51.     If UserList(UserIndex).flags.Descansar Then
  52.         UserList(UserIndex).flags.Descansar = False
  53.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "DOK")
  54.     End If
  55.    
  56.     '<<<< Meditando >>>>
  57.     If UserList(UserIndex).flags.Meditando Then
  58.         UserList(UserIndex).flags.Meditando = False
  59.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "MEDOK")
  60.     End If
  61.    
  62.     '<<<< Invisible >>>>
  63.     If UserList(UserIndex).flags.Invisible = 1 Or UserList(UserIndex).flags.Oculto = 1 Then
  64.         UserList(UserIndex).flags.Oculto = 0
  65.         UserList(UserIndex).flags.Invisible = 0
  66.         'no hace falta encriptar este NOVER
  67.         Call SendData(SendTarget.ToMap, 0, UserList(UserIndex).Pos.Map, "NOVER" & UserList(UserIndex).char.CharIndex & ",0")
  68.     End If
  69.    
  70.     If TriggerZonaPelea(UserIndex, UserIndex) <> TRIGGER6_PERMITE Then
  71.         ' << Si es newbie no pierde el inventario >>
  72.         If Not EsNewbie(UserIndex) Or Criminal(UserIndex) Then
  73.             Call TirarTodo(UserIndex)
  74.         Else
  75.             If EsNewbie(UserIndex) Then Call TirarTodosLosItemsNoNewbies(UserIndex)
  76.         End If
  77.     End If
  78.    
  79.     ' DESEQUIPA TODOS LOS OBJETOS
  80.     'desequipar armadura
  81.     If UserList(UserIndex).Invent.ArmourEqpObjIndex > 0 Then
  82.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.ArmourEqpSlot)
  83.     End If
  84.     'desequipar arma
  85.     If UserList(UserIndex).Invent.WeaponEqpObjIndex > 0 Then
  86.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.WeaponEqpSlot)
  87.     End If
  88.     'desequipar casco
  89.     If UserList(UserIndex).Invent.CascoEqpObjIndex > 0 Then
  90.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.CascoEqpSlot)
  91.     End If
  92.     'desequipar herramienta
  93.     If UserList(UserIndex).Invent.HerramientaEqpObjIndex > 0 Then
  94.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.HerramientaEqpSlot)
  95.     End If
  96.     'desequipar municiones
  97.     If UserList(UserIndex).Invent.MunicionEqpObjIndex > 0 Then
  98.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.MunicionEqpSlot)
  99.     End If
  100.     'desequipar escudo
  101.     If UserList(UserIndex).Invent.EscudoEqpObjIndex > 0 Then
  102.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.EscudoEqpSlot)
  103.     End If
  104.    
  105.     ' << Reseteamos los posibles FX sobre el personaje >>
  106.     If UserList(UserIndex).char.loops = LoopAdEternum Then
  107.         UserList(UserIndex).char.FX = 0
  108.         UserList(UserIndex).char.loops = 0
  109.     End If
  110.    
  111.     ' << Restauramos el mimetismo
  112.     If UserList(UserIndex).flags.Mimetizado = 1 Then
  113.         UserList(UserIndex).char.Body = UserList(UserIndex).CharMimetizado.Body
  114.         UserList(UserIndex).char.Head = UserList(UserIndex).CharMimetizado.Head
  115.         UserList(UserIndex).char.CascoAnim = UserList(UserIndex).CharMimetizado.CascoAnim
  116.         UserList(UserIndex).char.ShieldAnim = UserList(UserIndex).CharMimetizado.ShieldAnim
  117.         UserList(UserIndex).char.WeaponAnim = UserList(UserIndex).CharMimetizado.WeaponAnim
  118.         UserList(UserIndex).Counters.Mimetismo = 0
  119.         UserList(UserIndex).flags.Mimetizado = 0
  120.     End If
  121.    
  122.     '<< Cambiamos la apariencia del char >>
  123.     If UserList(UserIndex).flags.Navegando = 0 Then
  124.         UserList(UserIndex).char.Body = iCuerpoMuerto
  125.         UserList(UserIndex).char.Head = iCabezaMuerto
  126.         UserList(UserIndex).char.ShieldAnim = NingunEscudo
  127.         UserList(UserIndex).char.WeaponAnim = NingunArma
  128.         UserList(UserIndex).char.CascoAnim = NingunCasco
  129.     Else
  130.         UserList(UserIndex).char.Body = iFragataFantasmal ';)
  131.     End If
  132.    
  133.     Dim i As Integer
  134.     For i = 1 To MAXMASCOTAS
  135.        
  136.         If UserList(UserIndex).MascotasIndex(i) > 0 Then
  137.                If Npclist(UserList(UserIndex).MascotasIndex(i)).Contadores.TiempoExistencia > 0 Then
  138.                     Call MuereNpc(UserList(UserIndex).MascotasIndex(i), 0)
  139.                Else
  140.                     Npclist(UserList(UserIndex).MascotasIndex(i)).MaestroUser = 0
  141.                     Npclist(UserList(UserIndex).MascotasIndex(i)).Movement = Npclist(UserList(UserIndex).MascotasIndex(i)).flags.OldMovement
  142.                     Npclist(UserList(UserIndex).MascotasIndex(i)).Hostile = Npclist(UserList(UserIndex).MascotasIndex(i)).flags.OldHostil
  143.                     UserList(UserIndex).MascotasIndex(i) = 0
  144.                     UserList(UserIndex).MascotasType(i) = 0
  145.                End If
  146.         End If
  147.        
  148.     Next i
  149.    
  150.     UserList(UserIndex).NroMacotas = 0
  151.    
  152.     If Criminal(UserIndex) Then
  153.     Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z33")
  154.     Else
  155.     Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z34")
  156.     End If
  157.    
  158.     'If MapInfo(UserList(UserIndex).Pos.Map).Pk Then
  159.     '        Dim MiObj As Obj
  160.     '        Dim nPos As WorldPos
  161.     '        MiObj.ObjIndex = RandomNumber(554, 555)
  162.     '        MiObj.Amount = 1
  163.     '        nPos = TirarItemAlPiso(UserList(UserIndex).Pos, MiObj)
  164.     '        Dim ManchaSangre As New cGarbage
  165.     '        ManchaSangre.Map = nPos.Map
  166.     '        ManchaSangre.X = nPos.X
  167.     '        ManchaSangre.Y = nPos.Y
  168.     '        Call TrashCollector.Add(ManchaSangre)
  169.     'End If
  170.    
  171.     '<< Actualizamos clientes >>
  172.     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)
  173.     Call SendUserStatsBox(UserIndex)
  174.     Call SendUserHitBox(UserIndex)
  175.     Call EnviarDopa(UserIndex)
  176.    
  177.    
  178.     '<<Castigos por party>>
  179.     If UserList(UserIndex).PartyIndex > 0 Then
  180.         Call mdParty.ObtenerExito(UserIndex, UserList(UserIndex).Stats.ELV * -10 * mdParty.CantMiembros(UserIndex), UserList(UserIndex).Pos.Map, UserList(UserIndex).Pos.X, UserList(UserIndex).Pos.Y)
  181.     End If
  182. Exit Sub
  183.  
  184. If UserList(UserIndex).flags.EnDuelo = True Then
  185. UserList(UserIndex).flags.EnDuelo = False
  186. Call WarpUserChar(UserIndex, 1, 50, 50)
  187. Call SendData(SendTarget.ToAll, 0, 0, "||Duelos> " & UserList(UserIndex).name & " ha sido vencido." & FONTTYPE_TALK)
  188. Exit Sub
  189. End If
  190. Exit Sub
  191.  
  192. ErrorHandler:
  193.     Call LogError("Error en SUB USERDIE. Error: " & Err.Number & " Descripción: " & Err.Description)
  194. End Sub
  195.  
Última edición por Ilaisa el 28 Dic 2011 02:50, editado 1 vez en total

Imagen

Ilaisa
<Aprendiendo a Programar>
227
Newbie [4]
Registrado: Diciembre 2011
Mensajes: 128

Nota » 27 Dic 2011 18:42

lo primero es poner un if para que tenga que ser de X nivel para usarlo y para lo segundo postea lo que hay que poner el en userdie.

Imagen


Gaara escribió:Me Caen Mal El Tipo De Personas Que Cuando Estas leveleando En Gathering(Por ejemplo)
Viene Un Neutro y te mata...Volves y Te Mata Lo Bardeas y le avisa al Gm y Te banea :@
Barrilete cósmico ^^
359
Aprendiz [6]
Registrado: Años de membresía
Ubicación: en mi casa
Mensajes: 439
Aportes: 2

Nota » 27 Dic 2011 18:58

1)
  1. If UserList(UserIndex).stats.ELV < 44 Then
  2. Call SendData(SendTarget.ToIndex, UserIndex, 0, "||Necesitas ser nivel 44 o más para utilizar este comando." & FONTTYPE_INFO)
  3. Exit Sub
  4. End If


2) Pasame el userdie.

Imagen

Imagen

TE AMO SKYFUN SOS MI FANNNNNNNNNNNNNNNNNNNNN
HAO Staff
409
Dragon Ancestral [2]
Registrado: Años de membresía
Ubicación: Buenos Aires
Mensajes: 2745
Aportes: 28
Premios: 1
Embajador (1)

Nota » 27 Dic 2011 19:24

De dónde saco el Userdie, que tengo que buscar y que tengo que pegar :(, me pueden ayudar porfavor.

Edit: Analizé un poco los Códigos y encontré el UserDie, creo que es este el que necesitan :D :

  1. Sub UserDie(ByVal UserIndex As Integer)
  2. Call SendData(SendTarget.ToIndex, UserIndex, 0, "ICEDIE")
  3. On Error GoTo ErrorHandler
  4.  
  5.     'Sonido
  6.     If UCase$(UserList(UserIndex).Genero) = "MUJER" Then
  7.         Call SonidosMapas.ReproducirSonido(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, e_SoundIndex.MUERTE_MUJER)
  8.     Else
  9.         Call SonidosMapas.ReproducirSonido(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, e_SoundIndex.MUERTE_HOMBRE)
  10.     End If
  11.    
  12.     'Quitar el dialogo del user muerto
  13.     Call SendData(SendTarget.ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, "QDL" & UserList(UserIndex).char.CharIndex)
  14.    
  15.     UserList(UserIndex).Stats.MinHP = 0
  16.     UserList(UserIndex).Stats.MinSta = 0
  17.     UserList(UserIndex).flags.AtacadoPorNpc = 0
  18.     UserList(UserIndex).flags.AtacadoPorUser = 0
  19.     UserList(UserIndex).flags.Envenenado = 0
  20.     UserList(UserIndex).flags.Muerto = 1
  21.    
  22.     If UserList(UserIndex).Pos.Map = 64 Then 'mapa de duelo para que sea sacado
  23.         Call WarpUserChar(UserIndex, 1, 50, 50, True)
  24.         Call SendData(ToIndex, UserIndex, 0, "||Has diso vencido debes abandonar la zona de duelos." & FONTTYPE_WARNING)
  25.     End If
  26.    
  27.     Dim AN As Integer
  28.    
  29.     AN = UserList(UserIndex).flags.AtacadoPorNpc
  30.    
  31.     If AN > 0 Then
  32.         Npclist(AN).Movement = Npclist(AN).flags.OldMovement
  33.         Npclist(AN).Hostile = Npclist(AN).flags.OldHostil
  34.         Npclist(AN).flags.AttackedBy = ""
  35.     End If
  36.    
  37.     '<<<< Paralisis >>>>
  38.     If UserList(UserIndex).flags.Paralizado = 1 Then
  39.         UserList(UserIndex).flags.Paralizado = 0
  40.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "PARADOK")
  41.        
  42.     End If
  43.    
  44.     '<<< Estupidez >>>
  45.     If UserList(UserIndex).flags.Estupidez = 1 Then
  46.         UserList(UserIndex).flags.Estupidez = 0
  47.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "NESTUP")
  48.     End If
  49.    
  50.     '<<<< Descansando >>>>
  51.     If UserList(UserIndex).flags.Descansar Then
  52.         UserList(UserIndex).flags.Descansar = False
  53.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "DOK")
  54.     End If
  55.    
  56.     '<<<< Meditando >>>>
  57.     If UserList(UserIndex).flags.Meditando Then
  58.         UserList(UserIndex).flags.Meditando = False
  59.         Call SendData(SendTarget.ToIndex, UserIndex, 0, "MEDOK")
  60.     End If
  61.    
  62.     '<<<< Invisible >>>>
  63.     If UserList(UserIndex).flags.Invisible = 1 Or UserList(UserIndex).flags.Oculto = 1 Then
  64.         UserList(UserIndex).flags.Oculto = 0
  65.         UserList(UserIndex).flags.Invisible = 0
  66.         'no hace falta encriptar este NOVER
  67.         Call SendData(SendTarget.ToMap, 0, UserList(UserIndex).Pos.Map, "NOVER" & UserList(UserIndex).char.CharIndex & ",0")
  68.     End If
  69.    
  70.     If TriggerZonaPelea(UserIndex, UserIndex) <> TRIGGER6_PERMITE Then
  71.         ' << Si es newbie no pierde el inventario >>
  72.         If Not EsNewbie(UserIndex) Or Criminal(UserIndex) Then
  73.             Call TirarTodo(UserIndex)
  74.         Else
  75.             If EsNewbie(UserIndex) Then Call TirarTodosLosItemsNoNewbies(UserIndex)
  76.         End If
  77.     End If
  78.    
  79.     ' DESEQUIPA TODOS LOS OBJETOS
  80.     'desequipar armadura
  81.     If UserList(UserIndex).Invent.ArmourEqpObjIndex > 0 Then
  82.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.ArmourEqpSlot)
  83.     End If
  84.     'desequipar arma
  85.     If UserList(UserIndex).Invent.WeaponEqpObjIndex > 0 Then
  86.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.WeaponEqpSlot)
  87.     End If
  88.     'desequipar casco
  89.     If UserList(UserIndex).Invent.CascoEqpObjIndex > 0 Then
  90.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.CascoEqpSlot)
  91.     End If
  92.     'desequipar herramienta
  93.     If UserList(UserIndex).Invent.HerramientaEqpObjIndex > 0 Then
  94.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.HerramientaEqpSlot)
  95.     End If
  96.     'desequipar municiones
  97.     If UserList(UserIndex).Invent.MunicionEqpObjIndex > 0 Then
  98.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.MunicionEqpSlot)
  99.     End If
  100.     'desequipar escudo
  101.     If UserList(UserIndex).Invent.EscudoEqpObjIndex > 0 Then
  102.         Call Desequipar(UserIndex, UserList(UserIndex).Invent.EscudoEqpSlot)
  103.     End If
  104.    
  105.     ' << Reseteamos los posibles FX sobre el personaje >>
  106.     If UserList(UserIndex).char.loops = LoopAdEternum Then
  107.         UserList(UserIndex).char.FX = 0
  108.         UserList(UserIndex).char.loops = 0
  109.     End If
  110.    
  111.     ' << Restauramos el mimetismo
  112.     If UserList(UserIndex).flags.Mimetizado = 1 Then
  113.         UserList(UserIndex).char.Body = UserList(UserIndex).CharMimetizado.Body
  114.         UserList(UserIndex).char.Head = UserList(UserIndex).CharMimetizado.Head
  115.         UserList(UserIndex).char.CascoAnim = UserList(UserIndex).CharMimetizado.CascoAnim
  116.         UserList(UserIndex).char.ShieldAnim = UserList(UserIndex).CharMimetizado.ShieldAnim
  117.         UserList(UserIndex).char.WeaponAnim = UserList(UserIndex).CharMimetizado.WeaponAnim
  118.         UserList(UserIndex).Counters.Mimetismo = 0
  119.         UserList(UserIndex).flags.Mimetizado = 0
  120.     End If
  121.    
  122.     '<< Cambiamos la apariencia del char >>
  123.     If UserList(UserIndex).flags.Navegando = 0 Then
  124.         UserList(UserIndex).char.Body = iCuerpoMuerto
  125.         UserList(UserIndex).char.Head = iCabezaMuerto
  126.         UserList(UserIndex).char.ShieldAnim = NingunEscudo
  127.         UserList(UserIndex).char.WeaponAnim = NingunArma
  128.         UserList(UserIndex).char.CascoAnim = NingunCasco
  129.     Else
  130.         UserList(UserIndex).char.Body = iFragataFantasmal ';)
  131.     End If
  132.    
  133.     Dim i As Integer
  134.     For i = 1 To MAXMASCOTAS
  135.        
  136.         If UserList(UserIndex).MascotasIndex(i) > 0 Then
  137.                If Npclist(UserList(UserIndex).MascotasIndex(i)).Contadores.TiempoExistencia > 0 Then
  138.                     Call MuereNpc(UserList(UserIndex).MascotasIndex(i), 0)
  139.                Else
  140.                     Npclist(UserList(UserIndex).MascotasIndex(i)).MaestroUser = 0
  141.                     Npclist(UserList(UserIndex).MascotasIndex(i)).Movement = Npclist(UserList(UserIndex).MascotasIndex(i)).flags.OldMovement
  142.                     Npclist(UserList(UserIndex).MascotasIndex(i)).Hostile = Npclist(UserList(UserIndex).MascotasIndex(i)).flags.OldHostil
  143.                     UserList(UserIndex).MascotasIndex(i) = 0
  144.                     UserList(UserIndex).MascotasType(i) = 0
  145.                End If
  146.         End If
  147.        
  148.     Next i
  149.    
  150.     UserList(UserIndex).NroMacotas = 0
  151.    
  152.     If Criminal(UserIndex) Then
  153.     Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z33")
  154.     Else
  155.     Call SendData(SendTarget.ToIndex, UserIndex, 0, "Z34")
  156.     End If
  157.    
  158.     'If MapInfo(UserList(UserIndex).Pos.Map).Pk Then
  159.     '        Dim MiObj As Obj
  160.     '        Dim nPos As WorldPos
  161.     '        MiObj.ObjIndex = RandomNumber(554, 555)
  162.     '        MiObj.Amount = 1
  163.     '        nPos = TirarItemAlPiso(UserList(UserIndex).Pos, MiObj)
  164.     '        Dim ManchaSangre As New cGarbage
  165.     '        ManchaSangre.Map = nPos.Map
  166.     '        ManchaSangre.X = nPos.X
  167.     '        ManchaSangre.Y = nPos.Y
  168.     '        Call TrashCollector.Add(ManchaSangre)
  169.     'End If
  170.    
  171.     '<< Actualizamos clientes >>
  172.     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)
  173.     Call SendUserStatsBox(UserIndex)
  174.     Call SendUserHitBox(UserIndex)
  175.     Call EnviarDopa(UserIndex)
  176.    
  177.    
  178.     '<<Castigos por party>>
  179.     If UserList(UserIndex).PartyIndex > 0 Then
  180.         Call mdParty.ObtenerExito(UserIndex, UserList(UserIndex).Stats.ELV * -10 * mdParty.CantMiembros(UserIndex), UserList(UserIndex).Pos.Map, UserList(UserIndex).Pos.X, UserList(UserIndex).Pos.Y)
  181.     End If
  182. Exit Sub
  183.  
  184. If UserList(UserIndex).flags.EnDuelo = True Then
  185. UserList(UserIndex).flags.EnDuelo = False
  186. Call WarpUserChar(UserIndex, 1, 50, 50)
  187. Call SendData(SendTarget.ToAll, 0, 0, "||Duelos> " & UserList(UserIndex).name & " ha sido vencido." & FONTTYPE_TALK)
  188. Exit Sub
  189. End If
  190. Exit Sub
  191.  
  192. ErrorHandler:
  193.     Call LogError("Error en SUB USERDIE. Error: " & Err.Number & " Descripción: " & Err.Description)
  194. End Sub
  195.  


Espero que sea ese :D

Imagen

Ilaisa
<Aprendiendo a Programar>
227
Newbie [4]
Registrado: Diciembre 2011
Mensajes: 128

Nota » 28 Dic 2011 03:34

Cambia esto:
If UserList(UserIndex).Pos.Map = 64 Then 'mapa de duelo para que sea sacado

por esto:
If UserList(UserIndex).Pos.Map = 2 Then 'mapa de duelo para que sea sacado

El problema es de la pos nada mas ;)

Imagen
Crónicas de Arcania: El Despertar. Próximamente...
<Crónicas de Arcania>
274
Aprendiz [2]
Registrado: Años de membresíaAños de membresíaAños de membresía
Mensajes: 263
Aportes: 1

Nota » 29 Dic 2011 01:19

Bueno, les paso a explicar, lo que yo quiero es que si el el usuario que puso /DESAFIO mata al usuario que puso /DESAFIAR, al que puso /DESAFIAR lo mande a ulla, y que diga que espera otro contrincante (lo cual ya lo dice si se fijan en los codigos pero no lo manda a ulla ni manda el msg) y si el que puso /DESAFIAR mata al que puso /DESAFIO los mande a ulla a los dos y diga "(el que puso /desafio) há perdido el Desafio"

Si analizan los Códigos se daran cuenta los que les quiero decir :D

Imagen

Ilaisa
<Aprendiendo a Programar>
227
Newbie [4]
Registrado: Diciembre 2011
Mensajes: 128


Volver a AO 0.11.5

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados