Silkroad Max Levele Ulaşıp Ödül Verme Kodu Sizlerle.
Tabloyu Oluşturmak için aşağıdaki kodu okutalım
Kod:
USE [SRO_VT_LOG]
GO
/****** Object: Table [dbo].[_MaxLevelKontrol] Script Date: 20.03.2020 11:28:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[_MaxLevelKontrol](
[CharName] [varchar](max) NULL,
[Zaman] [datetime] NULL,
[index] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK__MaxLevelKontrol] PRIMARY KEY CLUSTERED
(
[index] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
_AddLogChar prosedürü en alt satıra eklenecek Kodlar
Aşağıdaki '100' Max Leveldir onu istediğiniz level yapıp aşağıdaki ödülleri değiştirebilirsiniz
Kod:
if (@EventID = 22)
BEGIN
if (@Data2 = 100)
BEGIN
declare @Charname16 varchar(64) = (select CharName16 from SRO_VT_SHARD.._Char where CharID = @CharID)
DECLARE @Date VARCHAR(100) = (SELECT GETDATE())
DECLARE @AccountID_1 varchar(128) = (Select AccountID From SRO_VT_SHARD.dbo._AccountJID as J inner join SRO_VT_SHARD.dbo._User as U ON J.JID = U.UserJID where CharID = @CharID)
if not exists (select CharName from _MaxLevelKontrol where CharName = @Charname16)
begin
insert into _MaxLevelKontrol values (@Charname16,@Date)
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_MALL_GLOBAL_CHATTING', 1, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_EVENT_REVERSE_RETURN_SCROLL', 50, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_ETC_E080723_HWAN_POTION', 5, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_MALL_RESURRECTION_60P_SCROLL', 5, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_MALL_DAMAGE_INC_10P_SCROLL', 1, 0
END
end
end
Tabloyu Oluşturmak için aşağıdaki kodu okutalım
Kod:
USE [SRO_VT_LOG]
GO
/****** Object: Table [dbo].[_MaxLevelKontrol] Script Date: 20.03.2020 11:28:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[_MaxLevelKontrol](
[CharName] [varchar](max) NULL,
[Zaman] [datetime] NULL,
[index] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK__MaxLevelKontrol] PRIMARY KEY CLUSTERED
(
[index] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
_AddLogChar prosedürü en alt satıra eklenecek Kodlar
Aşağıdaki '100' Max Leveldir onu istediğiniz level yapıp aşağıdaki ödülleri değiştirebilirsiniz
Kod:
if (@EventID = 22)
BEGIN
if (@Data2 = 100)
BEGIN
declare @Charname16 varchar(64) = (select CharName16 from SRO_VT_SHARD.._Char where CharID = @CharID)
DECLARE @Date VARCHAR(100) = (SELECT GETDATE())
DECLARE @AccountID_1 varchar(128) = (Select AccountID From SRO_VT_SHARD.dbo._AccountJID as J inner join SRO_VT_SHARD.dbo._User as U ON J.JID = U.UserJID where CharID = @CharID)
if not exists (select CharName from _MaxLevelKontrol where CharName = @Charname16)
begin
insert into _MaxLevelKontrol values (@Charname16,@Date)
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_MALL_GLOBAL_CHATTING', 1, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_EVENT_REVERSE_RETURN_SCROLL', 50, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_ETC_E080723_HWAN_POTION', 5, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_MALL_RESURRECTION_60P_SCROLL', 5, 0
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID_1, 'ITEM_MALL_DAMAGE_INC_10P_SCROLL', 1, 0
END
end
end