Grant the best Hunter,Trader and thief a Title or reward

Results 1 to 15 of 15
  1. #1
    SilkRoad vSro Service MaDenGo is offline
    MemberRank
    Aug 2012 Join Date
    vSro CommunityLocation
    512Posts

    shout Grant the best Hunter,Trader and thief a Title or reward

    This'll grant the best hunter/trader/thief a title based on 'Level, Contribution, Exp'
    Else you will be able to edit or add rewards ( coins , silk or anything )

    here we go.
    _AddLogChar -> (SRO_VT_LOG -> Programmability -> Stored Procedures -> Right click on _AddLogChar and press on 'Modify')
    Code:
    IF @eventID = 9
    BEGIN
    declare @CidTrader int,
     @CidThief int,
     @CidHunter int,
    @TTrader int,
    @THunter int,
     @tthief int;
    SELECT TOP 1 @CidTrader = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 1 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidThief = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 2 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidHunter = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 3 Order By Exp,Contribution,Level DESC
    -- #########################################
    -- Replace '1, 2, 3' with the title's hwanlevel, Name explanation. 'T' means title, 'Hunter' means hunter? lol you got it now.
    -- #########################################
    SET @THunter = 1
    SET @TTrader = 2
    SET @tthief = 3
    -- #########################################
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @TTrader
    WHERE CharID = @CidTrader
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @tthief
    WHERE CharID = @CidThief
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @THunter
    WHERE CharID = @CidHunter
    
    END
    Copied & Credit to ²²Rock²²
    Thank you


  2. #2
    Moderator Blacksheep25 is offline
    ModeratorRank
    Jan 2009 Join Date
    715Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Thanks for sharing MaDenGo

    Quote Originally Posted by POWEREDSHELL View Post
    Fail...
    At least he is contributing to the silkroad section

  3. #3
    No avatar RenePunik is offline
    MemberRank
    Feb 2013 Join Date
    1,431Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Can you explain more?, i don't understand anything.

  4. #4
    Apprentice Icewalk is offline
    MemberRank
    Apr 2014 Join Date
    5Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    can not be instant. Close Server, the works will be open?
    Last edited by Icewalk; 05-08-14 at 10:48 AM.

  5. #5
    SilkRoad vSro Service MaDenGo is offline
    MemberRank
    Aug 2012 Join Date
    vSro CommunityLocation
    512Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Quote Originally Posted by RenePunik View Post
    Can you explain more?, i don't understand anything.
    This procedure automatic select Top Job Rank players [ Trader , Hunter and Thief ] and auto give them title name reward

  6. #6
    Apprentice JusTry is offline
    MemberRank
    Sep 2013 Join Date
    Qena, EgyptLocation
    11Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Good Jop

    But we need new release like new website xD If you can release new website so it will be awesome

  7. #7
    Enthusiast CandyQ is offline
    MemberRank
    Dec 2013 Join Date
    48Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._RandomPlayerID'. The module will still be created; however, it cannot run successfully until the object exists.
    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._GetRandomTime'. The module will still be created; however, it cannot run successfully until the object exists.
    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._RandomPlayerID'. The module will still be created; however, it cannot run successfully until the object exists.
    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._GetRandomTime'. The module will still be created; however, it cannot run successfully until the object exists.
    :/ ?

  8. #8
    SilkRoad vSro Service MaDenGo is offline
    MemberRank
    Aug 2012 Join Date
    vSro CommunityLocation
    512Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Quote Originally Posted by CandyQ View Post
    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._RandomPlayerID'. The module will still be created; however, it cannot run successfully until the object exists.
    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._GetRandomTime'. The module will still be created; however, it cannot run successfully until the object exists.
    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._RandomPlayerID'. The module will still be created; however, it cannot run successfully until the object exists.
    The module '_AddLogChar' depends on the missing object 'SRO_VT_SHARD.dbo._GetRandomTime'. The module will still be created; however, it cannot run successfully until the object exists.
    :/ ?
    Don't tell me that you replaced your AddLogChar procedure with my procedure
    just copy my procedure and add it on AddLogChar and execute and feedback

  9. #9
    Enthusiast geomangy011 is offline
    MemberRank
    Aug 2013 Join Date
    EgyptLocation
    44Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    What Is This Shiiiiiit ??
    All Of The Game Will Be The Best You Don't Make Title delete from the char when another player be the best
    Learning how to make a full system then realese it

    - - - Updated - - -

    Take This

    Table
    Code:
    USE [LOG_DB]
    GO
    
    /****** Object:  Table [dbo].[best_job]    Script Date: 8/14/2014 4:07:10 AM ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE TABLE [dbo].[best_job](
        [charid] [int] NOT NULL,
        [oldhwan] [int] NOT NULL
    ) ON [PRIMARY]
    
    GO
    _AddLogChar
    Code:
    IF @eventID = 9
    BEGIN
    declare @CidTrader int,
     @CidThief int,
     @CidHunter int,
    @TTrader int,
    @THunter int,
     @tthief int;
    SELECT TOP 1 @CidTrader = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 1 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidThief = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 2 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidHunter = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 3 Order By Exp,Contribution,Level DESC
    declare @oldhwantrader int = (select hwanlevel from sro_vt_shard.._char where charid @CidTrader)
    declare @oldhwanthief int = (select hwanlevel from sro_vt_shard.._char where charid @CidThief)
    declare @oldhwanhunter int = (select hwanlevel from sro_vt_shard.._char where charid @CidHunter)
    declare @oldtrader int = (select charid from sro_vt_shard.._char where hwanlevel=@TTrader)
    declare @oldthief int = (select charid from sro_vt_shard.._char where hwanlevel @tthief)
    declare @oldhunter int = (select charid from sro_vt_shard.._char where hwanlevel=@THunter)
    -- #########################################
    -- Replace '1, 2, 3' with the title's hwanlevel, Name explanation. 'T' means title, 'Hunter' means hunter? lol you got it now.
    -- #########################################
    SET @THunter = 1
    SET @TTrader = 2
    SET @tthief = 3
    -- #########################################
    if exists (select * from best_job where charid @CidTrader)
    begin
    if ( @oldhwantrader != @TTrader )
    begin
    update best_job set oldhwan @oldhwantrader where charid @CidTrader
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwantrader WHERE CharID = @oldtrader
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @TTrader WHERE CharID = @CidTrader
    end
    if not exists (select * from best_job where charid @CidTrader)
    begin
    if ( @oldhwantrader != @TTrader )
    begin
    insert into best_job values  @CidTrader @oldhwantrader)
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwantrader WHERE CharID = @oldtrader
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @TTrader WHERE CharID = @CidTrader
    end
    if exists (select * from best_job where charid @CidThief)
    begin
    if ( @oldhwanthief != @tthief )
    begin
    update best_job set oldhwan @oldhwanthief where charid @CidThief
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanthief WHERE CharID = @oldthief
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @tthief WHERE CharID = @CidThief
    end
    if not exists (select * from best_job where charid @CidThief)
    begin
    if ( @oldhwanthief != @tthief )
    begin
    insert into best_job values  @CidThief @oldhwanthief)
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanthief WHERE CharID = @oldthief
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @tthief WHERE CharID = @CidThief
    end
    if exists (select * from best_job where charid @CidHunter)
    begin
    if ( @oldhwanhunter != @THunter )
    begin
    update best_job set oldhwan @oldhwanhunter where charid @CidHunter
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanhunter WHERE CharID = @oldhunter
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @THunter WHERE CharID = @CidHunter
    end
    if not exists (select * from best_job where charid @CidHunter)
    begin
    if ( @oldhwanhunter != @THunter )
    begin
    insert into best_job values  @CidHunter @oldhwanhunter)
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanhunter WHERE CharID = @oldhunter
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @THunter WHERE CharID = @CidHunter
    end
    END
    Check It And Say You Are The Best

  10. #10
    NewEvolust.Com xxNukertube is offline
    MemberRank
    Jul 2012 Join Date
    Ceres, Goias, BLocation
    215Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    change the procedure to register log from old title in one table

  11. #11
    Apprentice Abohema is offline
    MemberRank
    Mar 2013 Join Date
    11Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Quote Originally Posted by geomangy011 View Post
    What Is This Shiiiiiit ??
    All Of The Game Will Be The Best You Don't Make Title delete from the char when another player be the best
    Learning how to make a full system then realese it

    - - - Updated - - -

    Take This

    Table
    Code:
    USE [LOG_DB]
    GO
    
    /****** Object:  Table [dbo].[best_job]    Script Date: 8/14/2014 4:07:10 AM ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE TABLE [dbo].[best_job](
        [charid] [int] NOT NULL,
        [oldhwan] [int] NOT NULL
    ) ON [PRIMARY]
    
    GO
    _AddLogChar
    Code:
    IF @eventID = 9
    BEGIN
    declare @CidTrader int,
     @CidThief int,
     @CidHunter int,
    @TTrader int,
    @THunter int,
     @tthief int;
    SELECT TOP 1 @CidTrader = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 1 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidThief = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 2 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidHunter = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 3 Order By Exp,Contribution,Level DESC
    declare @oldhwantrader int = (select hwanlevel from sro_vt_shard.._char where charid @CidTrader)
    declare @oldhwanthief int = (select hwanlevel from sro_vt_shard.._char where charid @CidThief)
    declare @oldhwanhunter int = (select hwanlevel from sro_vt_shard.._char where charid @CidHunter)
    declare @oldtrader int = (select charid from sro_vt_shard.._char where hwanlevel=@TTrader)
    declare @oldthief int = (select charid from sro_vt_shard.._char where hwanlevel @tthief)
    declare @oldhunter int = (select charid from sro_vt_shard.._char where hwanlevel=@THunter)
    -- #########################################
    -- Replace '1, 2, 3' with the title's hwanlevel, Name explanation. 'T' means title, 'Hunter' means hunter? lol you got it now.
    -- #########################################
    SET @THunter = 1
    SET @TTrader = 2
    SET @tthief = 3
    -- #########################################
    if exists (select * from best_job where charid @CidTrader)
    begin
    if ( @oldhwantrader != @TTrader )
    begin
    update best_job set oldhwan @oldhwantrader where charid @CidTrader
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwantrader WHERE CharID = @oldtrader
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @TTrader WHERE CharID = @CidTrader
    end
    if not exists (select * from best_job where charid @CidTrader)
    begin
    if ( @oldhwantrader != @TTrader )
    begin
    insert into best_job values  @CidTrader @oldhwantrader)
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwantrader WHERE CharID = @oldtrader
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @TTrader WHERE CharID = @CidTrader
    end
    if exists (select * from best_job where charid @CidThief)
    begin
    if ( @oldhwanthief != @tthief )
    begin
    update best_job set oldhwan @oldhwanthief where charid @CidThief
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanthief WHERE CharID = @oldthief
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @tthief WHERE CharID = @CidThief
    end
    if not exists (select * from best_job where charid @CidThief)
    begin
    if ( @oldhwanthief != @tthief )
    begin
    insert into best_job values  @CidThief @oldhwanthief)
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanthief WHERE CharID = @oldthief
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @tthief WHERE CharID = @CidThief
    end
    if exists (select * from best_job where charid @CidHunter)
    begin
    if ( @oldhwanhunter != @THunter )
    begin
    update best_job set oldhwan @oldhwanhunter where charid @CidHunter
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanhunter WHERE CharID = @oldhunter
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @THunter WHERE CharID = @CidHunter
    end
    if not exists (select * from best_job where charid @CidHunter)
    begin
    if ( @oldhwanhunter != @THunter )
    begin
    insert into best_job values  @CidHunter @oldhwanhunter)
    end
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @oldhwanhunter WHERE CharID = @oldhunter
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @THunter WHERE CharID = @CidHunter
    end
    END
    Check It And Say You Are The Best
    This is ugly and it won't work.. I have updated it but I haven't really tested it so here;

    So here it is;


    Run a query and Execute this:
    Code:
    CREATE TABLE _Top3J
    (
    Trader int,
    Thief int,
    Hunter int,
    Count int
    );

    _AddLogChar -> (SRO_VT_LOG -> Programmability -> Stored Procedures -> Right click on _AddLogChar and press on 'Modify')


    Code:
    IF @eventID = 9
    BEGIN
    declare @CidTrader int, @CidThief int, @CidHunter int,
    @TTrader int,
    @THunter int, @tthief int;
    SELECT TOP 1 @CidTrader = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 1 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidThief = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 2 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidHunter = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 3 Order By Exp,Contribution,Level DESC
    -- #########################################
    -- Replace '1, 2, 3' with the title's hwanlevel, Name explanation. 'T' means title, 'Hunter' means hunter? lol you got it now.
    -- #########################################
    SET @THunter = 1
    SET @TTrader = 2
    SET @tthief = 3
    -- #########################################
    -- removing the titles
    -- #########################################
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = 0
    WHERE HwanLevel in (@THunter, @TTrader, @tthief)
    -- #########################################
    
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @TTrader
    WHERE CharID = @CidTrader
    
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @tthief
    WHERE CharID = @CidThief
    
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @THunter
    WHERE CharID = @CidHunter
    
    
    -- ######################################################################
    -- Some log shit, I haven't really tested it as I no longer own a server.
    -- ######################################################################
    IF NOT EXISTS (SELECT * FROM _Top3J where Trader = @CidTrader AND Thief = @CidThief AND Hunter = @CidHunter AND Count > 0)
    BEGIN
    INSERT INTO _Top3J
    SELECT @CidTrader, @CidThief, @CidHunter, 1
    END
    ELSE
    BEGIN
    UPDATE _Top3J
    SET Count += 1
    END
    
    
    END

    And press 'Execute'. There you're.


    Thank you!

  12. #12
    Enthusiast geomangy011 is offline
    MemberRank
    Aug 2013 Join Date
    EgyptLocation
    44Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Quote Originally Posted by Abohema View Post
    This is ugly and it won't work.. I have updated it but I haven't really tested it so here;

    So here it is;


    Run a query and Execute this:
    Code:
    CREATE TABLE _Top3J
    (
    Trader int,
    Thief int,
    Hunter int,
    Count int
    );

    _AddLogChar -> (SRO_VT_LOG -> Programmability -> Stored Procedures -> Right click on _AddLogChar and press on 'Modify')


    Code:
    IF @eventID = 9
    BEGIN
    declare @CidTrader int, @CidThief int, @CidHunter int,
    @TTrader int,
    @THunter int, @tthief int;
    SELECT TOP 1 @CidTrader = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 1 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidThief = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 2 Order By Exp,Contribution,Level DESC
    SELECT TOP 1 @CidHunter = CharID from SRO_VT_SHARD.._CharTrijob WHERE JobType = 3 Order By Exp,Contribution,Level DESC
    -- #########################################
    -- Replace '1, 2, 3' with the title's hwanlevel, Name explanation. 'T' means title, 'Hunter' means hunter? lol you got it now.
    -- #########################################
    SET @THunter = 1
    SET @TTrader = 2
    SET @tthief = 3
    -- #########################################
    -- removing the titles
    -- #########################################
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = 0
    WHERE HwanLevel in (@THunter, @TTrader, @tthief)
    -- #########################################
    
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @TTrader
    WHERE CharID = @CidTrader
    
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @tthief
    WHERE CharID = @CidThief
    
    
    UPDATE SRO_VT_SHARD.._Char set HwanLevel = @THunter
    WHERE CharID = @CidHunter
    
    
    -- ######################################################################
    -- Some log shit, I haven't really tested it as I no longer own a server.
    -- ######################################################################
    IF NOT EXISTS (SELECT * FROM _Top3J where Trader = @CidTrader AND Thief = @CidThief AND Hunter = @CidHunter AND Count > 0)
    BEGIN
    INSERT INTO _Top3J
    SELECT @CidTrader, @CidThief, @CidHunter, 1
    END
    ELSE
    BEGIN
    UPDATE _Top3J
    SET Count += 1
    END
    
    
    END

    And press 'Execute'. There you're.


    Thank you!
    No Comment !!!
    But i Have 1 Ask
    Do You Think For 1 Sec Is There Any different between the system which realese and what you write !!!!!!!!!

  13. #13
    Apprentice Abohema is offline
    MemberRank
    Mar 2013 Join Date
    11Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    Quote Originally Posted by geomangy011 View Post
    No Comment !!!
    But i Have 1 Ask
    Do You Think For 1 Sec Is There Any different between the system which realese and what you write !!!!!!!!!
    You did just comment (facepalm). Do you think I understand what you're saying?
    All I changed was: adding a query to delete the titles then re-grant them and log.

  14. #14
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    erm... both queries are not ideal. The entire job system is horribly coded... you could just execute a query that checks for highest point count and assign the hwan level based on jobId.

  15. #15
    Member Syloxx is offline
    MemberRank
    Aug 2014 Join Date
    GermanyLocation
    68Posts

    Re: Grant the best Hunter,Trader and thief a Title or reward

    i have done a query like this already, but its for sale.

    Config Table:

    if someone is interested let me know



Advertisement