Kết quả 11 đến 18 của 18
-
09-07-13, 08:16 PM #11
-
11-07-13, 10:26 PM #12
-
11-07-13, 11:43 PM #13
- Ngày tham gia
- Mar 2011
- Đang ở
- Hoa Quả Sơn
- Bài viết
- 1,986
- Thanks
- 239
- Thanked 676 Times in 455 Posts
Ðề: Vấn đề về thế hệ? NwebMu ai nhìn xem giúp mình sai ở đâu với
Dùng trigger cũ này là được..............
CREATE TRIGGER TheHe
ON [dbo].[MEMB_STAT]
FOR UPDATE
AS
BEGIN
DECLARE
@slg_thehe tinyint,
@Acc nvarchar(10),
@TheHe nvarchar(50),
@SV nvarchar (20)
SET @slg_thehe =2
-- Check tai khoan adm_block
IF NOT EXISTS (SELECT memb___id FROM MEMB_INFO WHERE memb___id='adm_block')
BEGIN
INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name) VALUES ('adm_block',[dbo].[fn_md5]('132465798','adm_block'),'ADMBLOCK')
END
-- Block tai khoan
UPDATE MEMB_INFO SET bloc_code=1 WHERE memb___id='adm_block' AND bloc_code<>1
-- Tao nhan vat 1
IF NOT EXISTS (SELECT Name FROM Character WHERE Name='NhamSV1' AND AccountID='adm_block')
BEGIN
DELETE Character WHERE Name='NhamSV1' AND AccountID<>'adm_block'
EXEC WZ_CreateCharacter 'adm_block', 'NhamSV1', 0
END
-- Tao nhan vat 2
IF NOT EXISTS (SELECT Name FROM Character WHERE Name='NhamSV2' AND AccountID='adm_block')
BEGIN
DELETE Character WHERE Name='NhamSV2' AND AccountID<>'adm_block'
EXEC WZ_CreateCharacter 'adm_block', 'NhamSV2', 32
END
-- Tao nhan vat 3
IF NOT EXISTS (SELECT Name FROM Character WHERE Name='NhamSV3' AND AccountID='adm_block')
BEGIN
DELETE Character WHERE Name='NhamSV3' AND AccountID<>'adm_block'
EXEC WZ_CreateCharacter 'adm_block', 'NhamSV3', 64
END
-- Tao nhan vat 4
IF NOT EXISTS (SELECT Name FROM Character WHERE Name='NhamSV4' AND AccountID='adm_block')
BEGIN
DELETE Character WHERE Name='NhamSV4' AND AccountID<>'adm_block'
EXEC WZ_CreateCharacter 'adm_block', 'NhamSV4', 80
END
-- Tao nhan vat 5
IF NOT EXISTS (SELECT Name FROM Character WHERE Name='NhamSV5' AND AccountID='adm_block')
BEGIN
DELETE Character WHERE Name='NhamSV5' AND AccountID<>'adm_block'
EXEC WZ_CreateCharacter 'adm_block', 'NhamSV5', 16
END
-- Block nhan vat thuoc tai khoan adm_block
UPDATE Character SET CtlCode=99 WHERE AccountID='adm_block' AND CtlCode<>99
-- END CHECK ACC ADM_BLOCK
SELECT @Acc=memb___id,@SV=ServerName FROM inserted WHERE ConnectStat='1'
SELECT @TheHe=thehe FROM MEMB_INFO WHERE memb___id=@Acc
-- BEGIN Khong ap dung The he
if(@slg_thehe=1)
BEGIN
UPDATE Character SET CtlCode=0 WHERE AccountID!='adm_block' AND AccountID=@Acc AND CtlCode=99 AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='' WHERE GameID1='NhamSV1' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID2='' WHERE GameID2='NhamSV2' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID3='' WHERE GameID3='NhamSV3' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID4='' WHERE GameID4='NhamSV4' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID5='' WHERE GameID5='NhamSV5' AND Id=@Acc AND Id!='adm_block'
END
-- END Khong ap dung The he
ELSE
BEGIN
-- BEGIN Ap dung the he
-- The he moi
IF(@TheHe=2)
BEGIN
IF(@SV='Sub-1' OR @SV='Sub-2' OR @SV='Sub-3' OR @SV='Sub-4' OR @SV='Sub-5' OR @SV='Sub-6' OR @SV='Sub-7' OR @SV='Sub-8' OR @SV='CTC')
BEGIN
UPDATE Character SET CtlCode=99 WHERE AccountID!='adm_block' AND AccountID=@Acc AND (CtlCode=0 OR CtlCode=18) AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='NhamSV1' WHERE Id=@Acc AND (GameID1 IS NULL OR GameID1='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID2='NhamSV2' WHERE Id=@Acc AND (GameID2 IS NULL OR GameID2='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID3='NhamSV3' WHERE Id=@Acc AND (GameID3 IS NULL OR GameID3='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID4='NhamSV4' WHERE Id=@Acc AND (GameID4 IS NULL OR GameID4='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID5='NhamSV5' WHERE Id=@Acc AND (GameID5 IS NULL OR GameID5='') AND Id!='adm_block'
END
ELSE
BEGIN
UPDATE Character SET CtlCode=0 WHERE AccountID!='adm_block' AND AccountID=@Acc AND CtlCode=99 AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='' WHERE GameID1='NhamSV1' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID2='' WHERE GameID2='NhamSV2' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID3='' WHERE GameID3='NhamSV3' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID4='' WHERE GameID4='NhamSV4' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID5='' WHERE GameID5='NhamSV5' AND Id=@Acc AND Id!='adm_block'
END
END
ELSE
-- The he cu
BEGIN
IF(@SV='Sub-1' OR @SV='Sub-2' OR @SV='Sub-3' OR @SV='Sub-4' OR @SV='Sub-5' OR @SV='Sub-6' OR @SV='Sub-7' OR @SV='Sub-8' OR @SV='CTC')
BEGIN
UPDATE Character SET CtlCode=0 WHERE AccountID!='adm_block' AND AccountID=@Acc AND CtlCode=99 AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='' WHERE GameID1='NhamSV1' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID2='' WHERE GameID2='NhamSV2' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID3='' WHERE GameID3='NhamSV3' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID4='' WHERE GameID4='NhamSV4' AND Id=@Acc AND Id!='adm_block'
UPDATE AccountCharacter SET GameID5='' WHERE GameID5='NhamSV5' AND Id=@Acc AND Id!='adm_block'
END
ELSE
BEGIN
UPDATE Character SET CtlCode=99 WHERE AccountID!='adm_block' AND AccountID=@Acc AND (CtlCode=0 OR CtlCode=18) AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='NhamSV1' WHERE Id=@Acc AND (GameID1 IS NULL OR GameID1='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID2='NhamSV2' WHERE Id=@Acc AND (GameID2 IS NULL OR GameID2='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID3='NhamSV3' WHERE Id=@Acc AND (GameID3 IS NULL OR GameID3='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID4='NhamSV4' WHERE Id=@Acc AND (GameID4 IS NULL OR GameID4='') AND Id!='adm_block'
UPDATE AccountCharacter SET GameID5='NhamSV5' WHERE Id=@Acc AND (GameID5 IS NULL OR GameID5='') AND Id!='adm_block'
END
END
-- END Ap dung the he
END
END
-
Các thành viên gởi lời cảm ơn đến Hào Hoa Công Tử vì bài viết này !
bistro007_hp (12-07-13)
-
12-07-13, 12:56 AM #14
- Ngày tham gia
- Jun 2011
- Đang ở
- Hải Phòng
- Bài viết
- 1,536
- Thanks
- 302
- Thanked 703 Times in 388 Posts
Ðề: Vấn đề về thế hệ? NwebMu ai nhìn xem giúp mình sai ở đâu với
-
13-07-13, 07:20 AM #15
-
13-07-13, 07:54 AM #16
- Ngày tham gia
- Jan 2012
- Đang ở
- ---Ở Nhà---
- Bài viết
- 327
- Thanks
- 119
- Thanked 275 Times in 111 Posts
Ðề: Vấn đề về thế hệ? NwebMu ai nhìn xem giúp mình sai ở đâu với
Khách viếng thăm hãy cùng freepro2101 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
13-07-13, 09:43 AM #17
- Ngày tham gia
- Jul 2012
- Đang ở
- https://t.me*********
- Bài viết
- 976
- Thanks
- 520
- Thanked 470 Times in 280 Posts
Ðề: Vấn đề về thế hệ? NwebMu ai nhìn xem giúp mình sai ở đâu với
Khách viếng thăm hãy cùng YouTobe xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
13-07-13, 04:18 PM #18
Các Chủ đề tương tự
-
[MU] Cài Nwebmu v5.12 bị lỗi
Bởi babjvjncy trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 1Bài viết cuối: 09-02-13, 08:55 AM -
[MU] Cần giúp đỡ về NWebMU - NBB
Bởi ktyenmy trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 17Bài viết cuối: 11-10-12, 10:29 AM -
[MU] Lỗi Cài NwebMu Giúp Mình Với
Bởi gaubon trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 3Bài viết cuối: 22-06-12, 11:24 PM -
[MU] Ai giúp em về NWebMU với......
Bởi jackylong911 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 11Bài viết cuối: 12-05-12, 10:08 AM -
Xin hỏi về NwebMU 2.0
Bởi godhoang trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 1Bài viết cuối: 19-02-11, 08:12 PM