From c43003e3e279ac9c6e9d3180b5b241038a7bf601 Mon Sep 17 00:00:00 2001 From: Gapo2055 Date: Mon, 28 Oct 2024 14:45:32 -0300 Subject: [PATCH 1/2] Update Acciones.bas Mejoramos la informacion de la puerta del ducto al intentar abrirla. --- Codigo/Acciones.bas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Codigo/Acciones.bas b/Codigo/Acciones.bas index ec981252..3ea23a46 100644 --- a/Codigo/Acciones.bas +++ b/Codigo/Acciones.bas @@ -874,13 +874,20 @@ Sub AccionParaPuerta(ByVal Map As Integer, ByVal X As Byte, ByVal Y As Byte, ByV 104 puerta = ObjData(MapData(Map, X, Y).ObjInfo.ObjIndex) 106 If puerta.Llave = 1 And Not SinDistancia Then -108 Call WriteConsoleMsg(UserIndex, "La puerta esta cerrada con llave.", e_FontTypeNames.FONTTYPE_INFO) + If puerta.GrhIndex = 11445 Or puerta.GrhIndex = 11444 Or puerta.GrhIndex = 59878 Or puerta.GrhIndex = 59877 Then + Call WriteConsoleMsg(UserIndex, "Al parecer, alguien cerró esta puerta. Debe haber algún interruptor por algún lado...", e_FontTypeNames.FONTTYPE_INFO) + Else + Call WriteConsoleMsg(UserIndex, "La puerta esta cerrada con llave.", e_FontTypeNames.FONTTYPE_INFO) + End If Exit Sub End If 110 If puerta.Cerrada = 1 Then 'Abre la puerta 112 MapData(Map, X, Y).ObjInfo.ObjIndex = puerta.IndexAbierta 114 Call BloquearPuerta(Map, X, Y, False) + If puerta.GrhIndex = 11445 Or puerta.GrhIndex = 11444 Or puerta.GrhIndex = 59878 Or puerta.GrhIndex = 59877 Then + Call WriteConsoleMsg(UserIndex, "Has abierto la compuerta del ducto.", e_FontTypeNames.FONTTYPE_INFO) + End If Else 'Cierra puerta 116 MapData(Map, X, Y).ObjInfo.ObjIndex = puerta.IndexCerrada From 97c77996d55403ec0d291b7ed3c104fbbd6a0825 Mon Sep 17 00:00:00 2001 From: Gapo2055 Date: Mon, 28 Oct 2024 15:57:19 -0300 Subject: [PATCH 2/2] Captura a la bandera Realizamos varios cambios en el evento de captura a la bandera. -Tiempos de ejecucion del evento -Usuarios entre equipos no se pueden atacar -Sistema de recompensa en oro por ganar el evento. --- Codigo/ModCaptura.bas | 8 ++++---- Codigo/Modulo_UsUaRiOs.bas | 11 +++++++++++ Codigo/clsCaptura.cls | 39 +++++++++++++++++++++----------------- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/Codigo/ModCaptura.bas b/Codigo/ModCaptura.bas index 838105f3..0eaf9d4a 100644 --- a/Codigo/ModCaptura.bas +++ b/Codigo/ModCaptura.bas @@ -28,16 +28,16 @@ Attribute VB_Name = "ModCaptura" Option Explicit -Public Const CAPTURA_TIEMPO_ESPERA = 180 'Tiempo que dura la inscripcion +Public Const CAPTURA_TIEMPO_ESPERA = 90 'Tiempo que dura la inscripcion #If DEBUGGING Then Public Const CAPTURA_TIEMPO_INICIO_RONDA = 10 '60 'Tiempo hasta que se inicia la ronda #Else Public Const CAPTURA_TIEMPO_INICIO_RONDA = 60 '60 'Tiempo hasta que se inicia la ronda #End If -Public Const CAPTURA_TIEMPO_BANDERA = 10 'Tiempo que tiene que estar el user con la bandera en la base -Public Const CAPTURA_TIEMPO_MUERTE = 7 'Tiempo que tarda para poder revivir cuando muere -Public Const CAPTURA_TIEMPO_POR_MUERTE = 3 'Multiplicador de tiempo x veces que murio +Public Const CAPTURA_TIEMPO_BANDERA = 7 'Tiempo que tiene que estar el user con la bandera en la base +Public Const CAPTURA_TIEMPO_MUERTE = 5 'Tiempo que tarda para poder revivir cuando muere +Public Const CAPTURA_TIEMPO_POR_MUERTE = 2 'Multiplicador de tiempo x veces que murio Public Const MAP_SALA_ESPERA As Integer = 278 Public Const MAP_NEUTRAL As Integer = 276 diff --git a/Codigo/Modulo_UsUaRiOs.bas b/Codigo/Modulo_UsUaRiOs.bas index 946647ec..aa9963f4 100644 --- a/Codigo/Modulo_UsUaRiOs.bas +++ b/Codigo/Modulo_UsUaRiOs.bas @@ -3338,6 +3338,17 @@ Public Function CanAttackUser(ByVal AttackerIndex As Integer, ByVal AttackerVers CanAttackUser = eSameTeam Exit Function End If + + + ' Nueva verificación específica para Captura la Bandera + If UserList(attackerIndex).flags.jugando_captura = 1 And UserList(TargetIndex).flags.jugando_captura = 1 Then + If UserList(attackerIndex).flags.CurrentTeam = UserList(TargetIndex).flags.CurrentTeam Then + Call WriteConsoleMsg(attackerIndex, "¡No puedes atacar a miembros de tu propio equipo!", e_FontTypeNames.FONTTYPE_INFO) + CanAttackUser = eSameTeam + Exit Function + End If + End If + Dim T As e_Trigger6 'Estamos en una Arena? o un trigger zona segura? diff --git a/Codigo/clsCaptura.cls b/Codigo/clsCaptura.cls index b1f1525c..6a57f17f 100644 --- a/Codigo/clsCaptura.cls +++ b/Codigo/clsCaptura.cls @@ -119,10 +119,10 @@ Public Sub PasarSegundo() ElseIf tiempo_espera = 0 Then If participantes.Count < max_participantes / 2 Then reintentos = reintentos + 1 - If reintentos >= 5 Then + If reintentos >= 2 Then Call finalizarCaptura(-2) Else - tiempo_espera = 60 + tiempo_espera = 30 Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Eventos» Se extendieron las inscripciones por falta de participantes.", e_FontTypeNames.FONTTYPE_GUILD)) End If Else @@ -490,10 +490,22 @@ Public Sub finalizarCaptura(Optional Team As Integer = -1) ElseIf Team = 0 Then 'Hubo empate Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Eventos» ¡El evento de captura la bandera ha terminado en empate!.", e_FontTypeNames.FONTTYPE_GUILD)) Else - - 'Hay premios??? - - Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Eventos» ¡El evento de captura la bandera ha terminado! Ganador el equipo " & colorEquipo(team) & ".", e_FontTypeNames.FONTTYPE_GUILD)) + ' La recompensa para cada ganador será su inscripción de vuelta + el precio de inscripción de un perdedor + Dim recompensa As Long + recompensa = precio * 2 ' Tu inscripción + la inscripción de un perdedor + + ' Entregamos premio al equipo ganador + For Each participante In participantes + If participante.IsValid Then + If participante.Team = Team Then + UserList(participante.PlayerIndex).Stats.GLD = UserList(participante.PlayerIndex).Stats.GLD + recompensa + Call WriteUpdateGold(participante.PlayerIndex) + Call WriteConsoleMsg(participante.PlayerIndex, "¡Has recuperado tu inscripción y ganado " & PonerPuntos(precio) & " monedas de oro adicionales por ganar el evento!", e_FontTypeNames.FONTTYPE_GUILD) + End If + End If + Next participante + + Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Eventos> ¡El evento de captura la bandera ha terminado! Ganador el equipo " & colorEquipo(Team) & ".", e_FontTypeNames.FONTTYPE_GUILD)) End If @@ -516,17 +528,10 @@ Public Sub finalizarRonda(ByVal Team As Byte) rondasGanadas(Team) = rondasGanadas(Team) + 1 - If ronda_actual >= cantidad_rondas Then - 'Se termina la joda - - If rondasGanadas(1) > rondasGanadas(2) Then - Team = 1 - ElseIf rondasGanadas(2) > rondasGanadas(1) Then - Team = 2 - Else - Team = 0 - End If - + Dim rondasParaGanar As Integer + rondasParaGanar = (cantidad_rondas \ 2) + 1 ' División entera + 1 (ejemplo: en mejor de 3, necesitas 2 victorias) + + If rondasGanadas(Team) >= rondasParaGanar Then ' Si un equipo alcanza las rondas necesarias Call finalizarCaptura(CInt(Team)) Else Call iniciarRonda