Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. Private Const MinotauroNPC As Integer = 692
  4. Private Const ObjInvotarMinotauro As Integer = 1241
  5. Private Const ObjRequisito As Integer = 1218
  6.  
  7. Private TmpNpcIndex As Integer
  8.  
  9. Private NombreMinotauro As String
  10. Private MinutosMinotauro As Byte
  11. Public EstadoMinotauro As Byte
  12.  
  13. Private Function PuedeAccionMinotauro(ByVal UserIndex As Integer, ByVal TempCharIndex As Integer) As Boolean
  14.  
  15.     PuedeAccionMinotauro = False
  16.  
  17.     If EstadoMinotauro = 2 Then
  18.         Call WriteChatOverHead(UserIndex, "El Minotauro fué liberado hace poco y debes esperar un tiempo para poder liberarlo de nuevo.", Npclist(TempCharIndex).Char.CharIndex, vbWhite)
  19.         Exit Function
  20.     End If
  21.  
  22.     If UserList(UserIndex).flags.Minotauro = 1 Then
  23.         Call WriteChatOverHead(UserIndex, "No puedes liberar el Minotauro más veces.", Npclist(TempCharIndex).Char.CharIndex, vbWhite)
  24.         Exit Function
  25.     End If
  26.  
  27.     If Not TieneObjetos(ObjRequisito, 1, UserIndex) Then
  28.         Call WriteChatOverHead(UserIndex, "Necesitas un Hilo de Ariadna que poseen algunas Viudas Negras para liberar el Minotauro.", Npclist(TempCharIndex).Char.CharIndex, vbWhite)
  29.         Exit Function
  30.     Else
  31.         Call QuitarObjetos(ObjRequisito, 1, UserIndex)
  32.     End If
  33.  
  34.     PuedeAccionMinotauro = True
  35.  
  36. End Function
  37.  
  38. Public Sub AccionMinotauro(ByVal UserIndex As Integer, ByVal NpcIndex As Integer)
  39.  
  40.     If Not PuedeAccionMinotauro(UserIndex, NpcIndex) Then Exit Sub
  41.  
  42.     With UserList(UserIndex)
  43.         If StrComp(NombreMinotauro, vbNullString) = 0 Then
  44.  
  45.             Dim PosMinotauro As WorldPos
  46.  
  47.             PosMinotauro.Map = RandomNumber(1, NumMaps)
  48.             PosMinotauro.X = RandomNumber(50, 80)
  49.             PosMinotauro.Y = RandomNumber(50, 80)
  50.  
  51.             TmpNpcIndex = SpawnNpc(MinotauroNPC, PosMinotauro, True, False)
  52.  
  53.             If TmpNpcIndex > 0 Then
  54.                 Call WriteChatOverHead(UserIndex, "Aprisa!, El Minotauro ha huido al verte, búscalo y mátalo antes de que lo haga cualquier otro...", Npclist(NpcIndex).Char.CharIndex, vbWhite)
  55.                 Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("El Minotauro ha sido liberado por " & .Name, FontTypeNames.FONTTYPE_PARTY))
  56.  
  57.                 NombreMinotauro = UCase$(.Name)
  58.                 EstadoMinotauro = 1
  59.                 MinutosMinotauro = 30
  60.             End If
  61.  
  62.         Else
  63.             If StrComp(NombreMinotauro, UCase$(.Name)) = 0 Then
  64.                 Call WriteChatOverHead(UserIndex, "El Minotauro fué liberado por otro personaje, debes esperar que sea capturado.", Npclist(NpcIndex).Char.CharIndex, vbWhite)
  65.             Else
  66.                 Call WriteChatOverHead(UserIndex, "Aprisa!, El Minotauro ha huido al verte, búscalo y mátalo antes de que lo haga cualquier otro...", Npclist(NpcIndex).Char.CharIndex, vbWhite)
  67.             End If
  68.         End If
  69.     End With
  70.  
  71. End Sub
  72.  
  73. Public Sub MuereMinotauro(ByVal UserIndex As Integer, ByVal NumNpc As Integer)
  74.  
  75.     If StrComp(NumNpc, MinotauroNPC) = 0 Then
  76.         With UserList(UserIndex)
  77.             If StrComp(NombreMinotauro, UCase$(.Name)) = 0 Then
  78.                 .Stats.SkillPts = .Stats.SkillPts + 200
  79.                 .Stats.Puntos = .Stats.Puntos + 1000
  80.                 '.Stats.Fama = .Stats.Fama + 50000
  81.                .flags.Minotauro = 1
  82.  
  83.                 Call WriteConsoleMsg(UserIndex, "Has ganado 200 Puntos Habilidades Libres para Asignar.", FontTypeNames.FONTTYPE_INFO)
  84.                 Call WriteConsoleMsg(UserIndex, "Has ganado 1000 DraGPuntos.", FontTypeNames.FONTTYPE_INFO)
  85.                 'Call WriteConsoleMsg(UserIndex, "Has ganado mucha Popularidad.", FontTypeNames.FONTTYPE_INFO)
  86.  
  87.                 Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("El Minotauro ha sido asesinado por " & .Name & " que fué el Personaje que lo liberó, los Dioses le han otorgado los Poderes del Minotauro!!", FontTypeNames.FONTTYPE_PARTY))
  88.                 'Call SendUserStatsFama(UserIndex)
  89.                Call WriteSendSkills(UserIndex)
  90.                 Call WriteLevelUp(UserIndex, 1, .Stats.SkillPts)
  91.             Else
  92.                 Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("El Minotauro ha sido asesinado por " & .Name & ", este personaje no lo liberó y los Dioses no le conceden los Poderes del Minotauro.", FontTypeNames.FONTTYPE_PARTY))
  93.             End If
  94.         End With
  95.  
  96.         NombreMinotauro = vbNullString
  97.         EstadoMinotauro = 2
  98.         MinutosMinotauro = 0
  99.     End If
  100.  
  101. End Sub
  102.  
  103. Public Sub ConteoMinotauro()
  104.  
  105.     If EstadoMinotauro = 1 Then
  106.         MinutosMinotauro = MinutosMinotauro - 1
  107.  
  108.         If MinutosMinotauro < 1 Then
  109.  
  110.             If TmpNpcIndex > 0 Then
  111.                 If Npclist(TmpNpcIndex).NPCtype = eNPCType.Minotauro Then
  112.                     EstadoMinotauro = 2
  113.                     NombreMinotauro = vbNullString
  114.  
  115.                     Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("El Minotauro no ha sido encontrado y desaparece.", FontTypeNames.FONTTYPE_PARTY))
  116.                     Call QuitarNPC(TmpNpcIndex)
  117.                 End If
  118.             End If
  119.  
  120.         Else
  121.  
  122.             Dim ID As Integer
  123.             ID = NameIndex(NombreMinotauro)
  124.  
  125.             If ID > 0 Then
  126.                 Call WriteConsoleMsg(ID, "Debes matar al Minotauro antes de " & MinutosMinotauro & " minutos.", FontTypeNames.FONTTYPE_VENENO)
  127.             End If
  128.  
  129.             Select Case MinutosMinotauro
  130.                 Case 5, 10, 15, 20, 25
  131.                     If TmpNpcIndex > 0 Then
  132.                         Call SendData(SendTarget.ToAdmins, 0, PrepareMessageConsoleMsg("GM> El minotauro esta en " & Npclist(TmpNpcIndex).pos.Map & "-" & Npclist(TmpNpcIndex).pos.X & "-" & Npclist(TmpNpcIndex).pos.Y, FontTypeNames.FONTTYPE_GUILD))
  133.                     End If
  134.                 Case Else
  135.                     Exit Sub
  136.             End Select
  137.         End If
  138.  
  139.     End If
  140.  
  141. End Sub
  142.  
  143. Public Sub ConvertirMinotauro(ByVal UserIndex As Integer, ByVal Slot As Byte)
  144.  
  145.     With UserList(UserIndex)
  146.  
  147.         If .flags.Minotauro = 0 Then Exit Sub
  148.         If .Counters.Minotauro <> 0 Then Exit Sub
  149.         If .flags.Berseker <> 0 Then Exit Sub
  150.         If .flags.Transformado <> 0 Then Exit Sub
  151.  
  152.         .Counters.Minotauro = 1000
  153.  
  154.         .flags.OldBody = .Char.Body
  155.         .flags.OldHead = .Char.Head
  156.  
  157.         With .Char
  158.             Call ChangeUserChar(UserIndex, 380, 0, .Heading, .WeaponAnim, .ShieldAnim, .CascoAnim, .BotasAnim)
  159.             Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessageCreateFX(.CharIndex, 25, 0))
  160.         End With
  161.  
  162.     End With
  163.  
  164. End Sub
  165.  
  166. Public Sub EfectoMinotauro(ByVal UserIndex As Integer)
  167.  
  168.     With UserList(UserIndex)
  169.         If .Counters.Minotauro > 0 Then
  170.             .Counters.Minotauro = .Counters.Minotauro - 1
  171.             If .Counters.Minotauro < 1 Then
  172.                 Call ChangeUserChar(UserIndex, .flags.OldBody, .flags.OldHead, .Char.Heading, .Char.WeaponAnim, .Char.ShieldAnim, .Char.CascoAnim, .Char.BotasAnim)
  173.                 Exit Sub
  174.             End If
  175.         End If
  176.     End With
  177.  
  178. End Sub
  179.  
  180. Public Sub DesconectaMinotauro(ByVal UserIndex As Integer)
  181.  
  182.     With UserList(UserIndex)
  183.         If .Counters.Minotauro > 0 Then
  184.             .Counters.Minotauro = 0
  185.             Call ChangeUserChar(UserIndex, .flags.OldBody, .flags.OldHead, .Char.Heading, .Char.WeaponAnim, .Char.ShieldAnim, .Char.CascoAnim, .Char.BotasAnim)
  186.             .flags.OldHead = 0
  187.             .flags.OldBody = 0
  188.         End If
  189.     End With
  190.  
  191. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement