عايز بريسودر ريوارد للاكونت الmale لوحده و الfemale لوحده يعنى الاكونت الmale ياخد هديه افاتار male و الاكونت ال female ياخد هديه افاتار female و ده البريسودر الى عايز فى الاضافه
كود PHP:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_Top300Sys] Script Date: 12/31/2017 3:41:35 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_Top300Sys]
@CharID INT
AS
DECLARE @Count int = (SELECT COUNT(*) FROM SRO_VT_SHARDLOG.dbo._Top300)
,@Cname VARCHAR(200) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
,@CharName varchar(64) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WITH (NOLOCK) WHERE CharID = @CharID)
,@UserID VARCHAR(50) = (SELECT UserJID FROM SRO_VT_SHARD.dbo._User WITH(NOLOCK) WHERE CharID = @CharID)
DECLARE @UserID2 VARCHAR(50) = (SELECT AccountID FROM SRO_VT_SHARD.dbo._AccountJID WITH(NOLOCK) WHERE JID = @UserID)
DECLARE @StartC int
SELECT @StartC = CASE WHEN @Count <= '99' THEN '100'
WHEN @Count <= '199' THEN '200'
WHEN @Count <= '299' THEN '300'
ELSE 0 END
DECLARE @RewardNo1 Varchar(65)
, @RewardNo2 Varchar(65)
, @Notice Varchar(512)
, @SilkReward int
SELECT @RewardNo1 = [Reward-No1], @RewardNo2 = [Reward-No2],@SilkReward=SilkCountReward , @Notice = Notice FROM SRO_VT_SHARDLOG.dbo._Top300Reward WITH (NOLOCK) WHERE PlayersCount = @StartC
--- Main Items To Help ---
INSERT INTO SRO_VT_SHARDLOG.dbo._Top300 (CharName,CharID,IsNumb) VALUES (@CharName,@CharID,@Count)
INSERT INTO SRO_VT_SHARDLOG.dbo.iLegend_Tool([Service],[Type],[Message],[Date]) Values ('1','Notice','Character Name is [' +@CharName + '] Has reached max level cogratulation you are top ['+ CAST(@Count AS NVARCHAR) +'/300] Please return scroll for your reward',GETDATE())
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_COS_P_EXTENSION' ,@data = 1, @CharName = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_COS_P_RABBIT_SCROLL' ,@data = 1,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_REVERSE_RETURN_SCROLL' ,@data = 10,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_GLOBAL_CHATTING' ,@data = 10,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_PREMIUM_GLOBAL_SILVERTIME' ,@data = 1,@CharName = @CName ,@opt_level = 0
EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk_Own] @UserID,@SilkReward
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_Top300Sys] Script Date: 12/31/2017 3:41:35 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_Top300Sys]
@CharID INT
AS
DECLARE @Count int = (SELECT COUNT(*) FROM SRO_VT_SHARDLOG.dbo._Top300)
,@Cname VARCHAR(200) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
,@CharName varchar(64) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WITH (NOLOCK) WHERE CharID = @CharID)
,@UserID VARCHAR(50) = (SELECT UserJID FROM SRO_VT_SHARD.dbo._User WITH(NOLOCK) WHERE CharID = @CharID)
DECLARE @UserID2 VARCHAR(50) = (SELECT AccountID FROM SRO_VT_SHARD.dbo._AccountJID WITH(NOLOCK) WHERE JID = @UserID)
DECLARE @CharGender int =(select RefObjID from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
if (@CharGender between 1907 and 1919 or @CharGender between 14875 and 14887)
begin
SET @CharGender = 1
end
if (@CharGender between 1920 and 1932 or @CharGender between 14888 and 14900)
begin
SET @CharGender = 0
end
DECLARE @StartC int
SELECT @StartC = CASE WHEN @Count <= '99' THEN '100'
WHEN @Count <= '199' THEN '200'
WHEN @Count <= '299' THEN '300'
ELSE 0 END
DECLARE @RewardNo1 Varchar(65)
, @RewardNo2 Varchar(65)
, @Notice Varchar(512)
, @SilkReward int
SELECT @RewardNo1 = [Reward-No1], @RewardNo2 = [Reward-No2],@SilkReward=SilkCountReward , @Notice = Notice FROM SRO_VT_SHARDLOG.dbo._Top300Reward WITH (NOLOCK) WHERE PlayersCount = @StartC
--- Main Items To Help ---
INSERT INTO SRO_VT_SHARDLOG.dbo._Top300 (CharName,CharID,IsNumb) VALUES (@CharName,@CharID,@Count)
INSERT INTO SRO_VT_SHARDLOG.dbo.iLegend_Tool([Service],[Type],[Message],[Date]) Values ('1','Notice','Character Name is [' +@CharName + '] Has reached max level cogratulation you are top ['+ CAST(@Count AS NVARCHAR) +'/300] Please return scroll for your reward',GETDATE())
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_COS_P_EXTENSION' ,@data = 1, @CharName = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_COS_P_RABBIT_SCROLL' ,@data = 1,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_REVERSE_RETURN_SCROLL' ,@data = 10,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_GLOBAL_CHATTING' ,@data = 10,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_PREMIUM_GLOBAL_SILVERTIME' ,@data = 1,@CharName = @CName ,@opt_level = 0
EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk_Own] @UserID,@SilkReward
IF (@CharGender = 0) --- Female Character #Ri3o----
Begin
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_AVATAR' ,@data = 1,@charname = @CName ,@opt_level = 0
END
IF (@CharGender = 1) --- Male Character #Ri3o----
Begin
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_AVATAR' ,@data = 1,@charname = @CName ,@opt_level = 0
END
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
انصحط متشتغلش بالموضوع ده فى موضوع هنا اسهل بكتير فى التعديل وانك تحط ال Reward اللى انت عايزها وكل 100 ليهم 3 Reward وكمان فى Reward لل Male و Female
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
المشاركة الأصلية كتبت بواسطة Dev.Ri3o
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
لو عايز تشتغل بال system اللى معاك يبقى هتعمل ده
كود:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_Top300Sys] Script Date: 12/31/2017 3:41:35 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_Top300Sys]
@CharID INT
AS
DECLARE @Count int = (SELECT COUNT(*) FROM SRO_VT_SHARDLOG.dbo._Top300)
,@Cname VARCHAR(200) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
,@CharName varchar(64) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WITH (NOLOCK) WHERE CharID = @CharID)
,@UserID VARCHAR(50) = (SELECT UserJID FROM SRO_VT_SHARD.dbo._User WITH(NOLOCK) WHERE CharID = @CharID)
DECLARE @UserID2 VARCHAR(50) = (SELECT AccountID FROM SRO_VT_SHARD.dbo._AccountJID WITH(NOLOCK) WHERE JID = @UserID)
DECLARE @CharGender int =(select RefObjID from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
if (@CharGender between 1907 and 1919 or @CharGender between 14875 and 14887)
begin
SET @CharGender = 1
end
if (@CharGender between 1920 and 1932 or @CharGender between 14888 and 14900)
begin
SET @CharGender = 0
end
DECLARE @StartC int
SELECT @StartC = CASE WHEN @Count <= '99' THEN '100'
WHEN @Count <= '199' THEN '200'
WHEN @Count <= '299' THEN '300'
ELSE 0 END
DECLARE @RewardNo1 Varchar(65)
, @RewardNo2 Varchar(65)
, @Notice Varchar(512)
, @SilkReward int
SELECT @RewardNo1 = [Reward-No1], @RewardNo2 = [Reward-No2],@SilkReward=SilkCountReward , @Notice = Notice FROM SRO_VT_SHARDLOG.dbo._Top300Reward WITH (NOLOCK) WHERE PlayersCount = @StartC
--- Main Items To Help ---
INSERT INTO SRO_VT_SHARDLOG.dbo._Top300 (CharName,CharID,IsNumb) VALUES (@CharName,@CharID,@Count)
INSERT INTO SRO_VT_SHARDLOG.dbo.iLegend_Tool([Service],[Type],[Message],[Date]) Values ('1','Notice','Character Name is [' +@CharName + '] Has reached max level cogratulation you are top ['+ CAST(@Count AS NVARCHAR) +'/300] Please return scroll for your reward',GETDATE())
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_COS_P_EXTENSION' ,@data = 1, @CharName = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_COS_P_RABBIT_SCROLL' ,@data = 1,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_REVERSE_RETURN_SCROLL' ,@data = 10,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_GLOBAL_CHATTING' ,@data = 10,@charname = @CName ,@opt_level = 0
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_MALL_PREMIUM_GLOBAL_SILVERTIME' ,@data = 1,@CharName = @CName ,@opt_level = 0
EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk_Own] @UserID,@SilkReward
IF (@CharGender = 0) --- Female Character #Ri3o----
Begin
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_AVATAR' ,@data = 1,@charname = @CName ,@opt_level = 0
END
IF (@CharGender = 1) --- Male Character #Ri3o----
Begin
EXEC SRO_VT_SHARD.[dbo].[_ADD_ITEM_EXTERN] @codename = 'ITEM_AVATAR' ,@data = 1,@charname = @CName ,@opt_level = 0
END
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
انصحط متشتغلش بالموضوع ده فى موضوع هنا اسهل بكتير فى التعديل وانك تحط ال Reward اللى انت عايزها وكل 100 ليهم 3 Reward وكمان فى Reward لل Male و Female
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]