المستوي:
جبتلكم انهارده Fortress Kill Counter
بيجمع الKills الMembers ال في ال جيلد بيجبها و كل ما يجيبو 100 كل يتكتب Notice
[Guildname has destroyed 50 Enimes]
بس لازم طبعا تكون شعال علي Vsro Multi Tolls لأني ظبطو عليه
لينك تحميل نسخه VSri Multi Tools
لعرض المحتوى , تحتاج إلى تسجيل الدخول أو إنشاء حساب.
نبداء ب الTables
_FW_COUNTER
كود:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: Table [dbo].[_FW_COUNTER] Script Date: 23/06/2020 08:00:21 م ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[_FW_COUNTER](
[No.] [int] IDENTITY(1,1) NOT NULL,
[Guild_Name] [varchar](max) NULL,
[kills] [int] NULL,
CONSTRAINT [PK___HITLERT__C7D1C6D019F64CE0] PRIMARY KEY CLUSTERED
(
[No.] 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
Trigger
كود:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: Trigger [dbo].[FW_COUNTER_NOTICE] Script Date: 23/06/2020 08:01:44 م ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[FW_COUNTER_NOTICE]
ON [dbo].[_FW_COUNTER]
after insert,update,delete
as
---------------------------- Q1 -----------------------------------------------------------------
declare @Guildname Varchar(100)
SET @Guildname = (select Guild_name from _FW_COUNTER)
declare @kills int = (select kills from _FW_COUNTER)
IF @Kills IN (50, 100, 200, 300, 400, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1600, 1700, 1800, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2800, 2900, 3000)
insert into SRO_VT_SHARDLOG..iLegend_Tool (Service,Type,Message,Date) Values (1,'Notice',''+@Guildname+' has destroyed '+CAST(@kills as nvarchar)+' Enimes',Getdate())
GO
_AddLogChar
كود:
DECLARE @Killer1 Varchar(64),
@Killer2 Varchar(64),
@Charname Varchar(100),
@Guildname Varchar(100)
SET @Killer1 = SUBSTRING(@Desc, CHARINDEX('His(', @Desc), CHARINDEX('): no job,', @Desc) - CHARINDEX('His(', @Desc) + LEN('): no job,'))
SET @killer2 = REPLACE(@Killer1,'His(','');
SET @killer2 = REPLACE(@Killer2,'): no job,','');
SET @Charname = (Select Charname16 From SRO_VT_SHARD.._Char Where CharID = @CharID)
SET @Guildname = (Select name From SRO_VT_SHARD.._Guild Where ID = (select GuildID from SRO_VT_SHARD.._Char Where CharName16 = @Killer2))
declare @kills int = (select kills from _FW_COUNTER)
If (@EventID = '20' and @strPos like '%0x%' and @Desc like '%freebattle%')
begin
If exists (select * from SRO_VT_SHARDLOG.._FW_COUNTER where Guild_name = @Guildname)
begin
Update SRO_VT_SHARDLOG.._FW_COUNTER Set Kills = Kills+1 where Guild_name = @Guildname
End
ELSE Insert Into SRO_VT_SHARDLOG.._FW_COUNTER (Guild_name,kills) values (@Guildname,1)
End
لو وجهتك اي مشكله اكتبلي في الكومينتات انا موجود دايما!
بالتوفيق
التعديل الأخير: