Video test
CitarUSE [MuOnline]
GO
ALTER Procedure [dbo].[WZ_GetResetInfo]
@Account varchar(10),
@Name varchar(10)
AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT ON;
-- Declaración de variables
DECLARE @Reset int;
DECLARE @ResetDay int;
DECLARE @ResetWek int;
DECLARE @ResetMon int;
-- Obtener valores actuales de ResetCount y otros campos
SELECT
@Reset = ResetCount,
@ResetDay = 0,
@ResetWek = 0,
@ResetMon = 0
FROM [dbo].[Character]
WHERE AccountID = @Account AND Name = @Name;
-- Actualizar LevelUpPoint basado en ResetCount
UPDATE [dbo].[Character]
SET LevelUpPoint = ResetCount * 500
WHERE AccountID = @Account AND Name = @Name;
-- Devolver resultados
SELECT
@Reset AS Reset,
@ResetDay AS ResetDay,
@ResetWek AS ResetWek,
@ResetMon AS ResetMon;
SET NOCOUNT OFF;
SET XACT_ABORT OFF;
END;
GO
Aclracion hacer Backup de la base de datos, test bien.
Crear Backup Automatico Con SqlBackupMaster (https://foro.configservermu.net/index.php?topic=40.0)
Sin que sea acumulativos los puntos
CitarUSE [MuOnline]
GO
ALTER Procedure [dbo].[WZ_GetResetInfo]
@Account varchar(10),
@Name varchar(10)
AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT ON;
-- Declaración de variables
DECLARE @Reset int;
DECLARE @ResetDay int;
DECLARE @ResetWek int;
DECLARE @ResetMon int;
-- Obtener valores actuales de ResetCount y otros campos
SELECT
@Reset = ResetCount,
@ResetDay = 0,
@ResetWek = 0,
@ResetMon = 0
FROM [dbo].[Character]
WHERE AccountID = @Account AND Name = @Name;
-- Actualizar LevelUpPoint a un valor fijo de 500
UPDATE [dbo].[Character]
SET LevelUpPoint = 500
WHERE AccountID = @Account AND Name = @Name;
-- Devolver resultados
SELECT
@Reset AS Reset,
@ResetDay AS ResetDay,
@ResetWek AS ResetWek,
@ResetMon AS ResetMon;
SET NOCOUNT OFF;
SET XACT_ABORT OFF;
END;
GO