SilkRoad Service Database Editor , Sys

SilkRoad Service Database Editor , Sys

SilkRoad Service Database Editor, Systems, cap, degree, Filter, autoevent, Gameserver, VPS Dedicated, setup, 2 server one machine



Vsro New Top 300 (system)

Share
avatar
Trixy
Admin
Admin

Posts : 22
Join date : 2018-06-19
Age : 31
Location : USA

Vsro New Top 300 (system)

Post by Trixy on Fri Jun 29, 2018 6:59 am

Welcome to Game Network Online
That system not release by Game Network Online 
But release AntiCheat with auto ban system one day
if you try cheated
plus remove your reward automatic 

Code:
USE [SRO_VT_LOG]
GO

/****** Object:  Table [dbo].[_Top300]    Script Date: 2/21/2018 7:20:40 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[_Top300](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [CharName] [varchar](64) NULL,
    [CharID] [int] NULL,
    [IsNumb] [int] NULL,
    [JID] [int] NULL,
    [strUserID] [varchar](64) NULL,
 CONSTRAINT [PK__Top300] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


Code:
USE [SRO_VT_LOG]
GO

/****** Object:  Table [dbo].[_Top300_Anti_Cheat]    Script Date: 2/21/2018 7:21:05 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[_Top300_Anti_Cheat](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [CharName] [varchar](64) NULL,
    [CharID] [int] NULL,
    [IsNumb] [int] NULL,
    [JID] [int] NULL,
    [strUserID] [varchar](64) NULL,
 CONSTRAINT [PK__Top300_Anti_Cheat] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO





add that in table _Top300Reward
Code:
ITEM_COS_P_EXTENSION    ITEM_COS_P_RABBIT_SCROLL    300    100     Hyrray! youre on the top 100 players to reach 100, therefore a reward will be automatically sent to your storage!
ITEM_COS_P_EXTENSION    ITEM_COS_P_RABBIT_SCROLL    150    200     Hyrray! youre on the top 200 players to reach 100, therefore a reward will be automatically sent to your storage!
ITEM_COS_P_EXTENSION    ITEM_COS_P_RABBIT_SCROLL    50    300     Hyrray! youre on the top 300 players to reach 100, therefore a reward will be automatically sent to your storage!



Code:
USE [SRO_VT_LOG]
GO
/****** Object:  StoredProcedure [dbo].[_Reward_Top_Max_Level]    Script Date: 2/21/2018 7:23:19 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER procedure [dbo].[_Reward_Top_Max_Level]
    @CharID INT
AS
DECLARE @Count int = (SELECT COUNT(*) FROM [SRO_VT_LOG].dbo._Top300)
           ,@CharName varchar(64) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WITH (NOLOCK) WHERE CharID = @CharID)
           ,@cNAME VarChar(MAX) = (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 = [RewardNo1], @RewardNo2 =  [RewardNo2],@SilkReward=SilkCountReward , @Notice = Notice FROM  [SRO_VT_LOG].dbo._Top300Reward WITH (NOLOCK) WHERE PlayersCount =  @StartC
            
    --- Main Items To Help ---
    IF Not EXISTS (Select JID From [SRO_VT_LOG].[dbo].[_Top300] where JID =@UserID)
    Begin
      INSERT INTO [SRO_VT_LOG].dbo._Top300 (CharName,CharID,IsNumb,JID,strUserID) VALUES (@CharName,@CharID,@Count,@UserID,@UserID2)
    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
---- SILK For All Types ----
    EXEC SRO_VT_ACCOUNT.[CGI].[CGI_WebPurchaseSilk_Own] @UserID,@SilkReward  
    end

    IF  EXISTS (Select JID From [SRO_VT_LOG].[dbo].[_Top300] where  CharID not like @CharID)
    BEGIN
     INSERT INTO [SRO_VT_LOG].dbo.[_Top300_Anti_Cheat] (CharName,CharID,IsNumb,JID,strUserID) VALUES (@CharName,@CharID,@Count,@UserID,@UserID2)
    
      END
      --*************************************************** Anti Cheat Top 300 Created by SafyStar ***************************************************
      Declare @SerialNO INT =(select MAX (SerialNO)SerialNo from SRO_VT_ACCOUNT.._BlockedUser)+1
    If   Exists (select JID from _Top300_Anti_Cheat where JID =@UserID and CharID not like (@CharID))
    Begin
         Update [SRO_VT_ACCOUNT]..SK_Silk set silk_own = silk_own-300 where JID =@UserID
       Insert INTO [SRO_VT_ACCOUNT].._BlockedUser (UserJID,UserID,Type,SerialNo,timeBegin,timeEnd) Values (@UserID,@UserID2,1,@SerialNO,GetDate(),GetDate()+1)
    
       END

Add that in _Addlogchar in SRO_VT_LOG

Code:
-- Top #300 --By SafyStar
    IF @EventID  = '22' AND @Data2 = '100'
    AND NOT EXISTS (SELECT * FROM [SRO_VT_LOG].dbo._Top300 WITH (NOLOCK) WHERE CharID = @CharID)
    BEGIN      
    EXEC [SRO_VT_LOG].dbo.[_Reward_Top_Max_Level] @CharID
    END





_________________

    Current date/time is Sat Sep 22, 2018 9:51 am