Kayıt
27 Mayıs 2016
Mesajlar
2.139
Beğeniler
1.179
Şehir
Muğla
Takımı
Galatasaray

  • Merhaba arkadaşlar sorunsuz çalışan wanted hero sistemini paylaşacağım.

Wanted Hero Sistem nedir ?
  • Bu sistem job esnasında belirlenen miktarda player kestiğinizde kademe kademe size bazı buffları veren bir sistemdir.
Kurulum :
  • Aşağıda vermiş olduğum kodları ilk önce SQL'e query yapın daha sonra vermiş olduğumu linki indirerek içerisindeki dosyaları ve kodları gerekli yerlere uygulayınız.
Kodlar :
  • Wanted Prosedürü;
    Kod:
    USE [SRO_VT_LOG]
    GO
    /****** Object:  StoredProcedure [dbo].[_Wanted]    Script Date: 08/04/2014 16:15:04 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    
    CREATE   procedure [dbo].[_Wanted]
    @CharID        int,
    @EventID        tinyint,
    @Desc        varchar(128)
    as
    
    Declare @Kc int
    Declare @CharName VARCHAR(52) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)     
    DECLARE @K_Name VARCHAR(512) = @Desc
          SELECT @K_Name = REPLACE(@K_Name, LEFT(@K_Name, CHARINDEX('(', @K_Name)), '')
          SELECT @K_Name = REPLACE(@K_Name, RIGHT(@K_Name, CHARINDEX(')', REVERSE(@K_Name))), '')
     ----- Killed CharID
          DECLARE @K_CharID INT =(SELECT  CharID FROM [SRO_VT_SHARD].[dbo].[_Char] WHERE CharName16 = @K_Name)
     ------
    -- Check if he kills the char more than 3 times 
    DECLARE @PKill int = (select COUNT(*) from _RowKills where KillerID = @CharID and KilledID = @K_CharID)     
    DECLARE   @maxK int = (select COUNT(Kills) from _RowKills where KillerID = @CharID and Kills = '1') 
    IF ( @PKill <= '2' and   @maxK <= '50' )
       BEGIN
    INSERT INTO _RowKills (KillerID , KilledID , Kills) VALUES (@CharID , @K_CharID,'1')
              END   
    ----- End inserting           
             
               
    declare   @NiceName varchar (52) = (select NickName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
    
    SET @Kc = (SELECT COUNT(Kills) FROM _RowKills WHERE KillerID = @CharID and Kills = '1' )--and Recived = 'OFF')   
    --- if he kills 10 in row give him the buff      -- give Wanted level 1 
    IF @Kc = '10' AND NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID between '35141' and '35144')
            BEGIN
     INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID )
     ---- Values
     VALUES (@CharID , 0 , 35140 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 )
     INSERT INTO PlusNotice VALUES ('0',+@CharName+' : is Wanted "Hero Mode - 10Kills in row [Wanted Lv1]"',GETDATE())
          END 
               
     --- if he kills 20 in row give him the buff      -- give Wanted level 2 
    IF @Kc = '20'  AND NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where  CharID = @CharID and JobID between '35141' and '35144')
    BEGIN
    INSERT INTO PlusNotice VALUES ('0',+@CharName+' : is Wanted "Hero Mode - 20Kills in row [Wanted Lv2]"',GETDATE())
    IF EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35140')
    BEGIN
    DELETE FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID  and JobID = '35140'   
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID ) VALUES (@CharID , 0 , 35141 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 ) 
    END
    ElSE IF NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35140')
    BEGIN
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID )  VALUES (@CharID , 0 , 35141 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 )
             END
                END
      --- if he kills 30 in row give him the buff      -- give Wanted level 3 
    IF @Kc = '30' AND NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where  CharID = @CharID and JobID between '35142' and '35144')
    BEGIN
    INSERT INTO PlusNotice VALUES ('0',+@CharName+' : is Wanted "Hero Mode - 30Kills in row [Wanted Lv3]"',GETDATE())
    IF EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35141' or CharID = @CharID and JobID = '35140')
    BEGIN
    DELETE FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID  and JobID = '35141' or CharID = @CharID and JobID = '35140'   
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID ) VALUES (@CharID , 0 , 35142 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 ) 
    END
    ElSE IF NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35141' or CharID = @CharID and JobID = '35140')
    BEGIN
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID )  VALUES (@CharID , 0 , 35142 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 )
             END
                END   
     --- if he kills 40 in row give him the buff      -- give Wanted level 4 
    IF @Kc = '40' AND NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where  CharID = @CharID and JobID between '35143' and '35144')
    BEGIN
    INSERT INTO PlusNotice VALUES ('0',+@CharName+' : is Wanted "Hero Mode - 40Kills in row [Wanted Lv4]"',GETDATE())
    IF EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35142' or CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID = '35141')
    BEGIN
    DELETE FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID  and JobID = '35142' or CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID = '35141'   
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID ) VALUES (@CharID , 0 , 35143 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 ) 
    END
    ElSE IF NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35142' or CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID = '35141')
    BEGIN
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID )  VALUES (@CharID , 0 , 35143 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 )
             END
                END     
    --- if he kills 50 in row give him the buff      -- give Wanted level 5 
    IF @Kc = '50' AND NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where  CharID = @CharID and JobID = '35144')
    BEGIN
    INSERT INTO PlusNotice VALUES ('0',+@CharName+' : is Wanted "Hero Mode - 50Kills in row [Wanted Lv5]"',GETDATE())
    DELETE FROM _RowKills WHERE KillerID = @CharID
    IF EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35143' or CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID = '35141' or CharID = @CharID and JobID = '35143')
    BEGIN
    DELETE FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID  and JobID = '35143' or CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID = '35141' or CharID = @CharID and JobID = '35143'   
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID ) VALUES (@CharID , 0 , 35144 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 ) 
    END
    ElSE IF NOT EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob where CharID = @CharID and JobID = '35143' or CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID = '35141' or CharID = @CharID and JobID = '35143')
    BEGIN
    INSERT INTO SRO_VT_SHARD.dbo._TimedJob (CharID ,Category , JobID , TimeToKeep , Data1 , Data2 , Data3 , Data4 , Data5 , Data6, Data7 , Data8 , Serial64 , JID )  VALUES (@CharID , 0 , 35144 , 7200000 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 72339069015696862 , 0 )
             END
                END                               
    print 'extraloob.com için kullanıma sunulmuştur.'
  • RowKills_ Prosedürü;
    Kod:
    USE [SRO_VT_LOG]
    GO
    
    /****** Object:  Table [dbo].[_RowKills]    Script Date: 09/05/2014 00:25:08 ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    SET ANSI_PADDING ON
    GO
    
    CREATE TABLE [dbo].[_RowKills](
       [ID] [int] IDENTITY(1,1) NOT NULL,
       [KillerID] [int] NULL,
       [KilledID] [varchar](50) NULL,
       [Kills] [int] NULL,
    CONSTRAINT [PK__RowKills] 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
    print 'extraloob.com için kullanıma sunulmuştur.'
  • AddLogChar; (AS'dan sonra ekleyiniz.)
    Kod:
    --- Wanted System       
    if @EventID = '19'   -- Count kills
       BEGIN
    if (@strPos like '%(0x63ec)%')
        BEGIN
       IF (@Desc LIKE '%Trader, Neutral, no freebattle team%'    -- Trader
          OR @Desc LIKE '%Hunter, Neutral, no freebattle team%'    -- Hunter
          OR @Desc LIKE '%Robber, Neutral, no freebattle team%'    -- Thief
          ) BEGIN
         
          DECLARE   @KilledName VARCHAR(512) = @Desc
          DECLARE @ReqLevel INT = 0
          SELECT   @KilledName = REPLACE   @KilledName, LEFT   @KilledName, CHARINDEX('(',   @KilledName)), '')
          SELECT   @KilledName = REPLACE   @KilledName, RIGHT   @KilledName, CHARINDEX(')', REVERSE   @KilledName))), '')
          SELECT @ReqLevel = CurLevel FROM [SRO_VT_SHARD].[dbo].[_Char] WHERE CharName16 =   @KilledName
          if @ReqLevel >= 115
          BEGIN
        Exec [_Wanted] @CharID , @EventID , @Desc
             End
               END
                 END
                   END
    if @EventID = '20' -- if dies
    BEGIN
    IF (@Desc LIKE '%Trader, Neutral, no freebattle team%'    -- Trader
          OR @Desc LIKE '%Hunter, Neutral, no freebattle team%'    -- Hunter
          OR @Desc LIKE '%Robber, Neutral, no freebattle team%'    -- Thief
          ) BEGIN
       UPDATE _RowKills SET Kills = '0' WHERE KillerID = @CharID
       IF EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._TimedJob WHERE CharID = @CharID AND JobID = '35140' or CharID = @CharID and JobID between '35141' and '35144')
        BEGIN
         DELETE FROM SRO_VT_SHARD.dbo._TimedJob WHERE CharID = @CharID and JobID = '35140' or CharID = @CharID and JobID between '35141' and '35144'
             END
                END
                   END
    --------- End of wanted system 
    ------------------------------------------------------------------
    
    print 'extraloob.com için kullanıma sunulmuştur.'
Link :
Örnek Fotoğraf :



 
Son düzenleme:
Kayıt
30 Nisan 2010
Mesajlar
125
Beğeniler
8
Şehir
İstanbul
Takımı
Fenerbahce
Bir çok server sahibinin aradığı bir yenilik teşekkürler yararlı paylaşım iyi forumlar
 
Yukarı Alt