Triger rec rune
Quote:
USE [PS_Chatlog]
GO
/****** Object: Trigger [dbo].[ARIA_REC_RUN] Script Date: 02/04/2016 21:52:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ==================================================
-------- *ARIA* ----------
-- ==================================================
ALTER TRIGGER [dbo].[ARIA_REC_RUN]
ON [dbo].[ChatLog]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Chatdata varchar(30) = (SELECT ChatData FROM inserted)
IF @Chatdata = 'Link'
BEGIN
DECLARE @recrun int = (select itemid from PS_GameData.dbo.UserStoredItems
where UserUID = UserUID and ItemID=ItemID and Slot = 1)
------------------------------------------------------------
IF (@recrun=100230)----------------RECRUN ITEMID-------------
begin
update PS_GameData.dbo.UserStoredItems
SET Craftname = 40404040404050202070
WHERE UserUID = userUID and Slot = 0 and Type in (16,17,18,19,20,21,24,31,32,33,34,35,36,39)
begin
update PS_GameData.dbo.UserStoredItems
SET Craftname = 40404040404000000020
WHERE UserUID = userUID and Slot = 0 and Type in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22,23,40)
begin
delete from PS_GameData.dbo.UserStoredItems
WHERE UserUID = UserUID AND Slot = 1
END
end
FAIL:
DELETEChatData:
DELETE FROM ChatLog
WHERE CharID = CharID AND ChatData = @Chatdata
END
end
end