Dev.Ahmed_Elnashary |
24-02-2017 05:40 PM |
FortressWar Event
بصوا انا شوفت الevent دا قبل كده فحبيت اعمله عندي في السيرفر بس مشتغلش عرفت بعدين اني في حاجات كتير ناقصه في الeven دا فحبيت احط الايفينت هنا و اللي يعرف حاجه يعدل عليها و دي افاده للناس كلها !
الافكار اللي انا عايز اعملها في الايفينت
-1 يدي الreward في يوم معين بس في الاسبوع علشان الناس اللي عامله الfortress كذا يوم عندها في السيرفر
-2 ممكن التعديل علي الايفينت دا يبقي coins هو معمول انه يدي سيلك
-3 الناس اللي عامله يومين الفورتريس يبقي يوم coins ويوم سيلك دي حاجه حلوه و هتفيد الناس بردو
فياريت اللي يعرف يعدي علي حاجه و يشغله علشان هو ناقص فيه يعدي و نفيد بعض و مع مرور الوقت ممكن الناس تستغله في حاجات تاني ! كتير دا بعمني هتريحك انت من انك تيدي الrewward بتاع الناس كل اسبوع يبقي auto علي طول و منها fun للناس
producer
كود:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_FortressReward] Script Date: 03/28/2014 17:52:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create 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)
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'))
plus notice system
كود:
DECLARE @JGMasterN varchar (128)
DECLARE @HTMasterN varchar (128)
DECLARE @COMasterN varchar (128)
DECLARE @BAMasterN varchar (128)
DECLARE @JGLOG VARCHAR (128)
DECLARE @HTLOG VARCHAR (128)
DECLARE @COLOG VARCHAR (128)
DECLARE @BALOG VARCHAR (128)
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 ( X-Gaming )'
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
كود:
If (@TargetCharName like 'DAN_EVENT' 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
|