السلام عليكم انا عايز بعد انتهاء الفورتيس يدى ريورد ضفت الكويرى دة
_FortressReward
كود PHP:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_FortressReward] Script Date: 11/15/2018 8:35:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_FortressReward]
@CharID int,
@EventID tinyint,
@Data2 int
as
declare @CheckMembersJG INT
declare @CheckMembersHT INT
declare @CheckMembersCO INT
declare @CheckMembersBA INT
declare @GuildWinnerReward INT
declare @JanganMaster INT
declare @JanganMembers INT
declare @HotanMaster INT
declare @HotanMembers INT
declare @ConstMaster INT
declare @ConstMembers INT
declare @BanditMaster INT
declare @BanditMembers INT
declare @fortresslog1 varchar (512)
declare @fortresslog2 varchar (512)
declare @CharName varchar (64)
set @CheckMembersJG = (select GuildID from SRO_VT_SHARD.dbo._SiegeFortress where FortressID = 1)
set @CheckMembersHT = (select GuildID from SRO_VT_SHARD.dbo._SiegeFortress where FortressID = 3)
set @CheckMembersCO = (select GuildID from SRO_VT_SHARD.dbo._SiegeFortress where FortressID = 4)
set @CheckMembersBA = (select GuildID from SRO_VT_SHARD.dbo._SiegeFortress where FortressID = 6)
set @JanganMaster = (select CharID from SRO_VT_SHARD.dbo._GuildMember where GuildID = @CheckMembersJG and Permission = '-1')
set @HotanMaster = (select CharID from SRO_VT_SHARD.dbo._GuildMember where GuildID = @CheckMembersHT and Permission = '-1')
set @ConstMaster = (select CharID from SRO_VT_SHARD.dbo._GuildMember where GuildID = @CheckMembersCO and Permission = '-1')
set @BanditMaster = (select CharID from SRO_VT_SHARD.dbo._GuildMember where GuildID = @CheckMembersBA and Permission = '-1')
DECLARE @GuildMasterJG 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 = @JanganMaster)
EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @UserID = @GuildMasterJG, @PkgID = NULL, @NumSilk = '250', @Price = 99
-----------
DECLARE @GuildMasterHT 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 = @HotanMaster)
EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @UserID = @GuildMasterHT, @PkgID = NULL, @NumSilk = '250', @Price = 99
-----------
DECLARE @GuildMasterCT 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 = @ConstMaster)
EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @UserID = @GuildMasterCT, @PkgID = NULL, @NumSilk = '250', @Price = 99
-----------
DECLARE @GuildMasterBA 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 = @BanditMaster)
EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @UserID = @GuildMasterBA, @PkgID = NULL, @NumSilk = '250', @Price = 99
-----------
update SRO_VT_ACCOUNT.dbo.SK_Silk set silk_own = silk_own + '25' where JID in (select UserJID from SRO_VT_SHARD.dbo._User where CharID in
(select CharID from SRO_VT_SHARD.dbo._GuildMember where GuildID = @CheckMembersJG and Permission = '0'))
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_SD_TOKEN_02',1,1
------------Insert line 2 Auto Notice---------
SET @JGMasterN = ( SELECT CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @JanganMaster )
SET @HTMasterN = ( SELECT CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @HotanMaster )
SET @COMasterN = ( SELECT CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @ConstMaster )
SET @BAMasterN = ( SELECT CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @BanditMaster )
set @JGLOG = '[ '+@JGMasterN+' ] is the guild master who occupied Jangan Fortress.'
set @HTLOG = '[ '+@HTMasterN+' ] is the guild master who occupied Hotan Fortress.'
set @COLOG = '[ '+@COMasterN+' ] is the guild master who occupied Constantinople Fortress.'
set @BALOG = '[ '+@BAMasterN+' ] is the guild master who occupied Bandit Fortress.'
SET @fortresslog1 = '250 Silk added for guild masters & 25 Silk added for guild member'
SET @fortresslog2 = 'Fortress war reward updated , Good luck on next Fortress War (TS )'
INSERT INTO SRO_VT_SHARDLOG.DBO.PlusNotice VALUES (0, @JGLOG, GETDATE())
INSERT INTO SRO_VT_SHARDLOG.DBO.PlusNotice VALUES (0, @HTLOG, GETDATE()+0.1)
INSERT INTO SRO_VT_SHARDLOG.DBO.PlusNotice VALUES (0, @COLOG, GETDATE()+0.2)
INSERT INTO SRO_VT_SHARDLOG.DBO.PlusNotice VALUES (0, @BALOG, GETDATE()+0.3)
INSERT INTO SRO_VT_SHARDLOG.DBO.PlusNotice VALUES (0, @fortresslog1, GETDATE()+0.4)
INSERT INTO SRO_VT_SHARDLOG.DBO.PlusNotice VALUES (0, @fortresslog2, GETDATE()+0.5)
ودة
memo_add
كود PHP:
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_Memo_Add] Script Date: 11/15/2018 8:34:30 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
------------------------------------------------
-- # PROCEDURE _Memo_Add ¼أ¶أپ¤
------------------------------------------------
ALTER procedure [dbo].[_Memo_Add]
--أ‡أٹآ؟أ¤ أ†أ„¶أ³¹أŒأ…أچ
@TargetCharName varchar(64),
@SenderCharName varchar(64),
@Message varchar(300),
--آ؛أژ°آ، أ†أ„¶أ³¹أŒأ…أچ
@MAX_MEMO_COUNT int
as
begin transaction
declare @target_charid int
set @target_charid = (select CharID from _Char where CharName16 = @TargetCharName)
if (@@error <> 0 or @@rowcount = 0 )
begin
--±×·±¾أ–´أ‚ ¾أ¸¾î~
rollback transaction
return -1
end
declare @memo_count int
select @memo_count = count(*) from _Memo where CharID = @target_charid
if( @memo_count >= @MAX_MEMO_COUNT )
begin
-- أ‚أٹأپأ¶أ‡أ”أ€أŒ ²أ‹أƒآ،³×~
rollback transaction
return -2
end
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- EUROPE_SYSTEM (أƒأ–أ€أژأˆ£)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
declare @RefObjID int
select @RefObjID = RefObjID from _Char with (nolock) where CharName16 = @SenderCharName
if (@@error <> 0 or @@rowcount = 0 )
begin
rollback transaction
return -4
end
declare @RecordDate smalldatetime
set @RecordDate = GetDate()
insert _Memo (CharID, FromCharName,Message,Date,Status,RefObjID) values( @target_charid, @SenderCharName, @Message, @RecordDate, 0, @RefObjID )
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
if (@@error <> 0 or @@rowcount = 0 )
begin
rollback transaction
--أˆ£°î!!
return -3
end
commit transaction
return @@identity
If (@TargetCharName like 'TS' and @SenderCharName in (select Charname from SRO_VT_SHARDLOG.dbo.Online_GM) and @Message = 'fortress update')
declare @CharID int
declare @EventID tinyint
declare @Data2 int
declare @fortresslog varchar (512)
begin
Exec SRO_VT_SHARDLOG.dbo._FortressReward @charid,@EventID,@Data2
end
حضرتك دة كان فى القسم التانى وجيت ارد فى الموضوع قلتلى ممنوع ارد فى موضوع قديم كان اسمو تجميعت سيستمات كان مكتوب ايفنت للفورتريس ور فانا جربتو عندى بس مشتغلش ولو تعرف حاجة احسن من دة ياريت حضرتك تفيدنى كل الى انا عايزو انى اول ما الفورتيس يخلص الجلد الكسبان يجيلو الريورد الكوين الى انا عايز احددو
انت المفروض بتبعت رسالة من شخصية اسمها متسجل في التابل دا Online_GM لشخصية اسمها Ts و تقول في الرسالة دي update frotress دا اللي فهمته من البروسيدجر انت بقي بتعمل كدا ؟
DECLARE item_cur CURSOR FOR SELECT DISTINCT CharName FROM ___FortressReward ORDER BY CharName
OPEN item_cur FETCH NEXT FROM item_cur INTO @CharName WHILE @@FETCH_STATUS = 0 BEGIN EXEC _ADD_ITEM_EXTERN @CharName, @ItemCodeName, 20, 1 FETCH NEXT FROM item_cur INTO @CharName END
PRINT @CharName CLOSE item_cur
DEALLOCATE item_cur
ودة كذلك احطو فين ولا اعدل علية ازاى
كود PHP:
USE [SRO_VT_SHARD] GO
/****** Object: Table [dbo].[___FortressReward] Script Date: 9/23/2014 553 AM ******/ SET ANSI_NULLS ON GO
SET QUOTED_IDENTIFIER ON GO
SET ANSI_PADDING ON GO
CREATE TABLE [dbo].[___FortressReward]( [GuildID] [int] NOT NULL, [CharID] [int] NOT NULL, [CharName] [varchar](64) NOT NULL, [MemberClass] [tinyint] NOT NULL, [CharLevel] [tinyint] NOT NULL, [GP_Donation] [int] NOT NULL, [JoinDate] [smalldatetime] NOT NULL, [Permission] [int] NULL, [Contribution] [int] NULL, [GuildWarKill] [int] NULL, [GuildWarKilled] [int] NULL, [Nickname] [varchar](64) NULL, [RefObjID] [int] NULL, [SiegeAuthority] [tinyint] NULL, CONSTRAINT [PK_______GuildMember] PRIMARY KEY CLUSTERED ( [GuildID] ASC, [CharID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY] ) ON [PRIMARY]
GO
SET ANSI_PADDING OFF GO
ALTER TABLE [dbo].[___FortressReward] ADD DEFAULT ((0)) FOR [RefObjID] GO
ALTER TABLE [dbo].[___FortressReward] ADD DEFAULT ((0)) FOR [SiegeAuthority] GO
ودة كريتو تمام بس هيتعدل فية حاجة ولالا
كود PHP:
Select * From _GuildMember Where GuildID = 'GuildID
ودة هعمل بية اية بردو
كود PHP:
Update _RefObjCommon Set CanTrade = '0' ,CanBuy = '0' ,CanDrop ='0' Where CodeName128 = 'CodeItem'
ودة
كود PHP:
USE [SRO_VT_SHARD] GO TRUNCATE TABLE [dbo].[___FortressReward]