Kayıtlı Üye
- Katılım
- 26 Ağustos 2012
- Mesajlar
- 885
- Konu Yazar
- #1
Uyumlu Version : 1298
(diğerleri denenmemiştir.)
Uyumlu Ebenezer : Soacs
(diğerleri denenmemiştir.)
Eklememiz Gerekenler
1-Premium Servis tablomuzu oluşturalım
Kod:
CREATE TABLE [dbo].[PREMIUM_SERVICE]( [strAccountID] [varchar](27) NOT NULL, [strType] [smallint] NOT NULL, [nDays] [smallint] NOT NULL, [PremStart] [smalldatetime] NOT NULL ) ON [PRIMARY] GO SET ANSI_PADDING ON GO ALTER TABLE [dbo].[PREMIUM_SERVICE] ADD CONSTRAINT [DF_PREMIUM_SERVICE_PremStart] DEFAULT (getdate()) FOR [PremStart] GO
2-Premium ekleme prosedürümüzü oluşturalım
Kod:
CREATE PROCEDURE [dbo].[ADD_PREM_USER] @AccountID varchar(27), @
nty
pe smallint, @nDays smallint AS declare @ID varchar(27) SELECT @ID = count(strAccountID) FROM PREMIUM_SERVICE where strAccountID = @AccountID IF @ID = 0 BEGIN print @AccountID +' kullanıcısının aktif bir premium uyeligi yok' print @AccountID +' kullanıcısına premium ekleniyor' INSERT INTO PREMIUM_SERVICE VALUES (@AccountID @
nty
pe,@nDays,GETDATE()) print @AccountID +' kullanıcısına '+ convert(varchar @
nty
pe) +' olarak' + convert(varchar,@nDays) + 'gün eklendi' RETURN END BEGIN print @AccountID +' kullanıcısının aktif bir premium uyeligi var' print @AccountID +' kullanıcısının premium üyeliği değişiyor' update PREMIUM_SERVICE set ndays = ndays + @ndays,strType @
nty
pe where strAccountID = @AccountID print @AccountID +' kullanıcısına '+ convert(varchar @
nty
pe) +' olarak' + convert(varchar,@nDays) + 'gün olarak değişti' RETURN END
3-Load Premium tablomuzu oluşturalım.
Kod:
CREATE PROCEDURE [dbo].[LOAD_PREMIUM_SERVICE_USER] @AccountID varchar(27), @nRet1 smallint OUTPUT, @nRet2 smallint OUTPUT AS SET NOCOUNT ON; DECLARE @nRow smallint SET @nRow = 0 DECLARE @Type smallint SET @Type = null DECLARE @Days float SET @Days = null DECLARE @Days2 float SET @Days2 = null DECLARE @Days3 smallint SET @Days3 = null DECLARE @Math float SET @Math = null SELECT top 1 @nRow = COUNT(strAccountID) FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID IF @nRow = 0 BEGIN DELETE FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID SET @nRet1 = 0 --Fail (Account don´t have premium service) SET @nRet2 = 0 --Fail (Account don´t have premium service) RETURN END SELECT top 1 @Type = strType, @Days = convert(float,datediff(SECOND,getDate(),PremStart)), @Days2=convert(float,nDays*86400) FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID set @Math = CEILING((@Days+@Days2)/86400) if (@Math) > 0 BEGIN SET @Days3= @Math SET @nRet1 = @Type SET @nRet2 = @Days3 RETURN END if (@Math) <= 0 BEGIN DELETE FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID SET @nRet1 = 0 --Fail (Account don´t have premium service) SET @nRet2 = 0 --Fail (Account don´t have premium service) RETURN END
4-Update Premium prosedürümüzü oluşturalım
Kod:
CREATE PROCEDURE [dbo].[UPDATE_PREMIUM_SERVICE_USER] @AccountID varchar(27), @Days smallint AS SET NOCOUNT ON; if @Days = 0 BEGIN --UPDATE PREMIUM_SERVICE SET nDays = @Days WHERE strAccountID = @AccountID DELETE FROM PREMIUM_SERVICE where strAccountID = @AccountID END
Premium Türleri
Kod:
1 Normal 2 Ultra 3 Bronze 4 Silver 5 Gold 6 Prime 7 Platinum 8 Royal
Özellikleri
Kod:
National Point : Karşı ırktan gelen npye ek olarak gelir. Partye girince eksilme veya bölünme olmaz.
1-2-3-4 = (+5) 5 = (+6) 6-7-8 = (+12)
Item Rpr : Eşyaları tamir ederken alınan ücreti daha az öder.
1-2 = (%10) 3 = (%20) 4 = (%30) 5 = (%40) 6-7-8 = (%50)
Exp : Gelen exp mixtarında artış sağlar.
1-Normal = (%10) 2-Ultra = (%15) 3-Bronze = (%20) 4-Silver = (%25) 5-Gold = (%30) 6-Prime = (%40) 7-Platinum = (%400) 8-Royal Level'e Göre : 1-51 = (%400) 51-60 = (%300) 60-70 = (%200) 70-80 = (%120) 80+ = (%100)
Ortak Özellik :
*Ölüm esnasında exp kaybı %5'den %1'e düşer.
Premium Eklemek
Kod:
exec add_prem_user 'hesap',tip,gün
-hesap kısmına userin oyuna giriş ID'sini yazıyoruz. -tip kısmına 1-2-3 gibi premium tipini yazıyoruz. -gün kısmına da kaç gün olacağını belirtiyoruz.
Örnek : (1 Aylık Platinum Premium Ekleyelim)
exec add_prem_user
'XirTR'
,
7
,
30
Sistemin yapımı bana ait değildir.
(diğerleri denenmemiştir.)
Uyumlu Ebenezer : Soacs
(diğerleri denenmemiştir.)
Eklememiz Gerekenler
1-Premium Servis tablomuzu oluşturalım
Kod:
CREATE TABLE [dbo].[PREMIUM_SERVICE]( [strAccountID] [varchar](27) NOT NULL, [strType] [smallint] NOT NULL, [nDays] [smallint] NOT NULL, [PremStart] [smalldatetime] NOT NULL ) ON [PRIMARY] GO SET ANSI_PADDING ON GO ALTER TABLE [dbo].[PREMIUM_SERVICE] ADD CONSTRAINT [DF_PREMIUM_SERVICE_PremStart] DEFAULT (getdate()) FOR [PremStart] GO
2-Premium ekleme prosedürümüzü oluşturalım
Kod:
CREATE PROCEDURE [dbo].[ADD_PREM_USER] @AccountID varchar(27), @
nty
pe smallint, @nDays smallint AS declare @ID varchar(27) SELECT @ID = count(strAccountID) FROM PREMIUM_SERVICE where strAccountID = @AccountID IF @ID = 0 BEGIN print @AccountID +' kullanıcısının aktif bir premium uyeligi yok' print @AccountID +' kullanıcısına premium ekleniyor' INSERT INTO PREMIUM_SERVICE VALUES (@AccountID @
nty
pe,@nDays,GETDATE()) print @AccountID +' kullanıcısına '+ convert(varchar @
nty
pe) +' olarak' + convert(varchar,@nDays) + 'gün eklendi' RETURN END BEGIN print @AccountID +' kullanıcısının aktif bir premium uyeligi var' print @AccountID +' kullanıcısının premium üyeliği değişiyor' update PREMIUM_SERVICE set ndays = ndays + @ndays,strType @
nty
pe where strAccountID = @AccountID print @AccountID +' kullanıcısına '+ convert(varchar @
nty
pe) +' olarak' + convert(varchar,@nDays) + 'gün olarak değişti' RETURN END
3-Load Premium tablomuzu oluşturalım.
Kod:
CREATE PROCEDURE [dbo].[LOAD_PREMIUM_SERVICE_USER] @AccountID varchar(27), @nRet1 smallint OUTPUT, @nRet2 smallint OUTPUT AS SET NOCOUNT ON; DECLARE @nRow smallint SET @nRow = 0 DECLARE @Type smallint SET @Type = null DECLARE @Days float SET @Days = null DECLARE @Days2 float SET @Days2 = null DECLARE @Days3 smallint SET @Days3 = null DECLARE @Math float SET @Math = null SELECT top 1 @nRow = COUNT(strAccountID) FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID IF @nRow = 0 BEGIN DELETE FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID SET @nRet1 = 0 --Fail (Account don´t have premium service) SET @nRet2 = 0 --Fail (Account don´t have premium service) RETURN END SELECT top 1 @Type = strType, @Days = convert(float,datediff(SECOND,getDate(),PremStart)), @Days2=convert(float,nDays*86400) FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID set @Math = CEILING((@Days+@Days2)/86400) if (@Math) > 0 BEGIN SET @Days3= @Math SET @nRet1 = @Type SET @nRet2 = @Days3 RETURN END if (@Math) <= 0 BEGIN DELETE FROM PREMIUM_SERVICE WHERE strAccountID = @AccountID SET @nRet1 = 0 --Fail (Account don´t have premium service) SET @nRet2 = 0 --Fail (Account don´t have premium service) RETURN END
4-Update Premium prosedürümüzü oluşturalım
Kod:
CREATE PROCEDURE [dbo].[UPDATE_PREMIUM_SERVICE_USER] @AccountID varchar(27), @Days smallint AS SET NOCOUNT ON; if @Days = 0 BEGIN --UPDATE PREMIUM_SERVICE SET nDays = @Days WHERE strAccountID = @AccountID DELETE FROM PREMIUM_SERVICE where strAccountID = @AccountID END
Premium Türleri
Kod:
1 Normal 2 Ultra 3 Bronze 4 Silver 5 Gold 6 Prime 7 Platinum 8 Royal
Özellikleri
Kod:
National Point : Karşı ırktan gelen npye ek olarak gelir. Partye girince eksilme veya bölünme olmaz.
1-2-3-4 = (+5) 5 = (+6) 6-7-8 = (+12)
Item Rpr : Eşyaları tamir ederken alınan ücreti daha az öder.
1-2 = (%10) 3 = (%20) 4 = (%30) 5 = (%40) 6-7-8 = (%50)
Exp : Gelen exp mixtarında artış sağlar.
1-Normal = (%10) 2-Ultra = (%15) 3-Bronze = (%20) 4-Silver = (%25) 5-Gold = (%30) 6-Prime = (%40) 7-Platinum = (%400) 8-Royal Level'e Göre : 1-51 = (%400) 51-60 = (%300) 60-70 = (%200) 70-80 = (%120) 80+ = (%100)
Ortak Özellik :
*Ölüm esnasında exp kaybı %5'den %1'e düşer.
Premium Eklemek
Kod:
exec add_prem_user 'hesap',tip,gün
-hesap kısmına userin oyuna giriş ID'sini yazıyoruz. -tip kısmına 1-2-3 gibi premium tipini yazıyoruz. -gün kısmına da kaç gün olacağını belirtiyoruz.
Örnek : (1 Aylık Platinum Premium Ekleyelim)
exec add_prem_user
'XirTR'
,
7
,
30
Sistemin yapımı bana ait değildir.