Sitemizi Daha Kaliteli Kullanmak İçin Lütfen Üye Olun
1- Sitemizde 7 Adet Moderatör Alınacaktır.
2- Admin 'e Kadar Yükselme Şansınız Var.
3- Sitemiz Yeni Tema ve Konularıyla Karşınızda...
4- Misafirken Sitemizden Faydalanma Oranınız %70 'dir .
Lütfen Foruma FİREFOX İle Giriniz ! İYİ FORUMLAR
YENİ SİTEMİZE TASINDIK WWW.PVPSERVERLER.ACE.ST
Sitemizi Daha Kaliteli Kullanmak İçin Lütfen Üye Olun
1- Sitemizde 7 Adet Moderatör Alınacaktır.
2- Admin 'e Kadar Yükselme Şansınız Var.
3- Sitemiz Yeni Tema ve Konularıyla Karşınızda...
4- Misafirken Sitemizden Faydalanma Oranınız %70 'dir .
Lütfen Foruma FİREFOX İle Giriniz ! İYİ FORUMLAR
YENİ SİTEMİZE TASINDIK WWW.PVPSERVERLER.ACE.ST
Would you like to react to this message? Create an account in a few clicks or log in to continue.
CREATE PROCEDURE ACCOUNT_LOGOUT @AccountID varchar(21), @nRet smallint OUTPUT AS BEGIN DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID SET @nRet = 1 END GO
DECLARE @Nation tinyint, @CharNum smallint,@Game int,@Limit int SET @Nation = 0 SET @CharNum = 0 SET @Limit = 800 Select @Game = Count(*) From CURRENTUSER
DECLARE @pwd varchar(13)
SET @pwd = null IF @Game <= @Limit BEGIN SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID END ELSE IF @Game > @Limit BEGIN SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and Premium > 0 END IF @pwd IS null BEGIN SET @nRet = 0 --SET @nRet = 4 RETURN END
ELSE IF @pwd <> @Password BEGIN SET @nRet = 0 --SET @nRet = 3 RETURN END
UPDATE TB_USER Set Premium = 0 Where strAccountID = @AccountID and PreDay = 0
SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID IF @@ROWCOUNT = 0 BEGIN SET @nRet = 1 RETURN END IF @CharNum = 0 BEGIN SET @nRet = 1 RETURN END ELSE BEGIN SET @nRet = @Nation+1 --SET @nRet = 1 RETURN END GO
3-)LOAD_PREMIUM_SERVICE_USER
Kod:
CREATE PROCEDURE LOAD_PREMIUM_SERVICE_USER @AccountID varchar(27), @nRet1 smallint OUTPUT, @nRet2 smallint OUTPUT AS DECLARE @nRow smallint SET @nRow = 0 DECLARE @Type smallint SET @Type = null DECLARE @Days smallint SET @Days = null SELECT @nRow = COUNT(*) FROM TB_USER WHERE strAccountID = @AccountID and Premium > 0 IF @nRow = 0 BEGIN SET @nRet1 = 0 SET @nRet2 = 0 RETURN END BEGIN TRAN SELECT @Type = Premium, @Days = PreDay FROM TB_USER WHERE strAccountID = @AccountID IF @Days = 0 BEGIN UPDATE TB_USER SET Premium = 0 WHERE strAccountID = @AccountID SET @nRet1 = 0 SET @nRet2 = 0 RETURN END COMMIT TRAN SET @nRet1 = @Type SET @nRet2 = @Days GO
4-)UPDATE_PREMIUM_SERVICE_USER
Kod:
CREATE PROCEDURE UPDATE_PREMIUM_SERVICE_USER @AccountID varchar(27), @Days smallint AS UPDATE TB_USER SET PreDay = @Days WHERE strAccountID = @AccountID UPDATE TB_USER SET Premium = 0 WHERE PreDay = 0 and Premium = 1 GO
INSERT INTO CURRENTUSER (nServerNo, strServerIP, strAccountID, strCharID, strClientIP ) Values (@ServerNo, @ServerIP, @AccountID, @CharID, @ClientIP ) set @nret=1 GO
6-)CLEAR_REMAIN_USERS
Kod:
CREATE PROCEDURE CLEAR_REMAIN_USERS @AccountID varchar(50) AS BEGIN TRAN DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID UPDATE TB_USER SET idays = 0 TRUNCATE TABLE CURRENTUSER COMMIT TRAN GO
DECLARE @Nation tinyint SET @Nation = 0 -- tid login method by samma 2004.02.24 DECLARE @pwd varchar(13)
SET @pwd = null
SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID and idays = 1 IF @pwd IS null BEGIN SET @nRet = 0 RETURN END
ELSE IF @pwd <> @Password BEGIN SET @nRet = 0 RETURN END
SELECT @Nation = bNation FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID exec otonp exec otonpsimgesi exec RANK_KNIGHTS IF @@ROWCOUNT = 0 BEGIN SET @nRet = 1 RETURN END BEGIN SET @nRet = 1 RETURN END BEGIN SET @nRet = @Nation+1 RETURN END GO
8-)TABLO EKLERİ
Kod:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TB_USER]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[TB_USER] GO
CREATE TABLE [dbo].[TB_USER] ( [Premium] [int] NULL [PreDay] [int] NULL ) ON [PRIMARY] GO