Kết quả 1 đến 3 của 3
-
05-04-13, 08:53 PM #1
Xin hướng dẫn mở sub hỗ trợ tân thủ
Ví dụ như mình muốn mở 1 sub hỗ trợ tân phủ để các mem mới rs thấp vào train cho nhanh thì chỉnh file nào các bạn?
Mình muốn làm 1 sub mu cho các mem rs dưới 100 vào được, lớn hơn 100 thì vào ko đc!Khách viếng thăm hãy cùng nhungocshpy xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
05-04-13, 09:01 PM #2
- Ngày tham gia
- Nov 2011
- Đang ở
- ĐỊA NGỤC
- Bài viết
- 2,557
- Thanks
- 427
- Thanked 1,644 Times in 897 Posts
Ðề: Xin hướng dẫn mở sub hỗ trợ tân phủ
-
05-04-13, 09:28 PM #3
- Ngày tham gia
- Aug 2012
- Bài viết
- 349
- Thanks
- 84
- Thanked 138 Times in 49 Posts
Ðề: Xin hướng dẫn mở sub hỗ trợ tân thủ
USE [MuOnline]
GO
/****** Object: Trigger [dbo].[ServerGame] Script Date: 30/09/2012 10:21:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[ServerGame]
ON [dbo].[MEMB_STAT]
FOR UPDATE
AS
BEGIN
DECLARE
@ACCOUNT_ID nvarchar(10),
@S_NAME nvarchar(20)
SELECT @ACCOUNT_ID=memb___id,@S_NAME=ServerName FROM inserted
UPDATE [dbo].[Character] SET CumServer=1 WHERE AccountID=@ACCOUNT_ID AND Relifes=0 AND Resets < 51 AND Resets > -1
UPDATE [dbo].[Character] SET CumServer=2 WHERE AccountID=@ACCOUNT_ID AND Relifes=0 AND Resets > 50
UPDATE [dbo].[Character] SET CumServer=3 WHERE AccountID=@ACCOUNT_ID AND Relifes=1
UPDATE [dbo].[Character] SET CumServer=4 WHERE AccountID=@ACCOUNT_ID AND Relifes=2
UPDATE [dbo].[Character] SET CumServer=5 WHERE AccountID=@ACCOUNT_ID AND Relifes=3
UPDATE [dbo].[Character] SET CumServer=6 WHERE AccountID=@ACCOUNT_ID AND Relifes=4
UPDATE [dbo].[Character] SET CumServer=7 WHERE AccountID=@ACCOUNT_ID AND Relifes=5
IF @S_NAME='Main'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID
END
IF @S_NAME='GSCS'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID
END
ELSE IF @S_NAME='Sub1'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=1
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=2
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=3
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=4
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=5
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=6
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=7
END
ELSE IF @S_NAME='Sub2'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=1
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=2
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=3
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=4
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=5
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=6
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=7
END
ELSE IF @S_NAME='Sub3'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=1
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=2
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=3
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=4
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=5
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=6
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=7
END
ELSE IF @S_NAME='Sub4'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=1
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=2
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=3
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=4
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=5
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=6
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=7
END
ELSE IF @S_NAME='Sub5'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=1
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=2
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=3
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=4
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=5
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=6
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=7
END
ELSE IF @S_NAME='Sub6'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=1
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=2
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=3
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=4
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=5
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=6
UPDATE [dbo].[character] SET CtlCode=1 WHERE AccountID=@ACCOUNT_ID AND CumServer=7
END
ELSE IF @S_NAME='Sub7'
BEGIN
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=1
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=2
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=3
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=4
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=5
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=6
UPDATE [dbo].[character] SET CtlCode=0 WHERE AccountID=@ACCOUNT_ID AND CumServer=7
END
ENDKhách viếng thăm hãy cùng chuotkep xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
Các thành viên gởi lời cảm ơn đến chuotkep vì bài viết này !
freepro921(05-04-13)