some text

|

[ Querys ] - Resets + Pontos Ao Criar Char


DESATIVA A QUERY

IF EXISTS (SELECT name FROM sysobjects
WHERE name = 'MUC_BONUS' AND type = 'TR')
DROP TRIGGER MUC_BONUS
GO


ATIVA A QUERY

CREATE TRIGGER MUC_BONUS ON Dbo.Character FOR INSERT
AS
BEGIN

DECLARE
@ResetCount INT,
@Pontos INT,
@Dinheiro INT,
@Char varchar(10)
SELECT @Char = Name FROM INSERTED

SET @ResetCount = 10
SET @Pontos = 1000
SET @Dinheiro = 1000000000

UPDATE Dbo.Character
SET ResetCount = @ResetCount, LevelUpPoint = @Pontos, Money = @Dinheiro
WHERE Name = @Char
END

Anterior Proxima Página inicial