Jop System Coin

بسم الله الرحمن الرحيم
دا سيستم تريد بيدي كوين لما تعمل تريد
عارف انه قديم و موجود في كذا حته بس كله مش شغال
واللي شغال معقد جدا فا عملت دا يا رب يعجبكوا
نبدا مع بعض
اول حاجه تعمل البروسيد دا
[REACT=1]
SQL:
USE [SRO_VT_SHARDLOG]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[_RoyalAutoCoinGranting]
@CharID INT
as

    Declare @JobType tinyint =
    (Select JobType from SRO_VT_SHARD.dbo._Chartrijob where CharID = @CharID)
    , @amount int
    , @elixiramount int
    , @dividerhunter bigint = 18500000
    , @dividertrader bigint = 8000000
    , @Dividercontrthiefs bigint = 60500000
    , @dividerthiefs bigint = 30000000
    , @dividerhunterex bigint = 8000000
    , @dividertraderex bigint = 3000000
    , @dividerthiefsex tinyint = 8000000
    , @Charname varchar(30) = (select CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
    , @contribution int = (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
    , @kills int;


If (@JobType = 1 )
 begin
        set @contribution =
            (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
        set @Charname =
            (select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
        Set @Amount =
            (select ROUND(@contribution/@Dividertrader,0))

    if @amount >=1
     begin
        Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
        Insert Into SRO_VT_SHARDLOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
        Values (@CharID,@amount,GETDATE())
        
    
     End
 end
 -- Hunter
If (@JobType = 3 )
 begin
        set @contribution =
            (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
        set @Charname =
            (select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
        Set @Amount =
            (select ROUND(@contribution/@Dividerhunter,0))

            
    if @amount >=1
     begin
        Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
        Insert Into SRO_VT_SHARDLOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
        Values (@CharID,@amount,GETDATE())
        
        
     End
 end


 --Now for thiefs

If (@JobType = 2 )
 begin
        set @contribution =
            (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
        set @Charname =
            (select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
        Set @Amount =
            (select ROUND(@contribution/@Dividerthiefs,0))

            
    if @amount >=1
     begin
        Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
        Insert Into SRO_VT_SHARDLOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
        Values (@CharID,@amount,GETDATE())
        
     End
 end
[/REACT]

تاني خطوه تعمل كريت للتاب دا
[REACT=1]
SQL:
USE [SRO_VT_SHARDLOG]


GO



/****** Object:  Table [dbo].[RoyalCoinLogHunters]    Script Date: 7.9.2022 14:47:55 ******/

SET ANSI_NULLS ON

GO



SET QUOTED_IDENTIFIER ON

GO



CREATE TABLE [dbo].[RoyalCoinLogHunters](

    [CharID] [int] NULL,

    [Amount] [int] NULL,

    [EventTime] [smalldatetime] NULL

) ON [PRIMARY]



GO
[/REACT]

اخر خطوه هتضيف دا في addlogchar
[REACT=1]
SQL:
 if (@EventID = 6) -- Auto Coin Granting and Contribution resetting logout


        Begin

            Exec SRO_VT_SHARDLOG.dbo._RoyalAutoCoinGranting @CharID

        end
[/REACT]


ملحوظه لازم تقفل الاكونت و تفتح علشان الريوارد يوصلك
 
عودة
أعلى