Konu Yazar
- Haz
- 2,699
- 1
Evet başlıkda belirttiğim gibi Bu özelliği kullanamıyorum Premium veremiyorum userlere. Sql KodLarında sorun war galiba
✪ DeathKO ✪ | v.1098 MYKO | ASCEND | Rekor Ödül Havuzu | Büyük Academy : 06 Mart 2026 - HAZIR OL!
Evet başlıkda belirttiğim gibi Bu özelliği kullanamıyorum Premium veremiyorum userlere. Sql KodLarında sorun war galiba
-- Premium Service
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
CREATE PROCEDURE [dbo].[ADD_PREM_USER]
@AccountID varchar(27),
@nType 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,@nType,@nDays,GETDATE())
print @AccountID +' kullanıcısına '+ convert(varchar,@nType) +' 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=@nType where strAccountID = @AccountID
print @AccountID +' kullanıcısına '+ convert(varchar,@nType) +' olarak' + convert(varchar,@nDays) + 'gün olarak değişti'
RETURN
END
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
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 ekleme: exec add_prem_user 'hesap',tip,gün
tip değerleri
1 normal
2 ultra
3 bronze
4 silver
5 gold
6 prime
7 platinium
8 royal
hepsinin tek ortak özelliği ölünce %1 exp kaybederler
1-2-3-4 np alımında 5 np fazla
5 np alımında 6 np fazla
6-7-8 12 np fazla alır
item tamiri için ise
1-2 %10
3 %20
4 %30
5 %40
6-7-8 %50 az ücret öder
exp kazanımı
*normal %10 fazla alıor
*ultra %15
*bronze %20
*silver %25
*gold %30
*fazla exp alıo
*prime %40
*platinum %400
*royal ise levele göre
*değişio
*1-51 arası %400
*51-60 %300
*60-70 %200
*70-80 %120
*80+ %100