Reward a player after reaching max level

Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    Enthusiast Tyr is offline
    MemberRank
    Nov 2014 Join Date
    36Posts

    Reward a player after reaching max level

    here we go

    1- you have to create this table.
    USE [SRO_VT_SHARDLOG]
    GO

    /****** Object: Table [dbo].[MaxLeveL_Log] Script Date: 10/12/2014 1:48:39 PM ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    CREATE TABLE [dbo].[MaxLevel_Log](
    [CharID] [int] NULL
    [Done] [BIT] NULL
    ) ON [PRIMARY]

    GO


    then add this to LOG_DB..AddLogChar
    Declare @MaxLevelCount int = (Select Count(CharID) from MaxLevel_Log)
    declare @UserJID int = (select UserJID from SRO_VT_SHARD.._User where CharID =@CharID)
    declare @CharName varchar(max) = (select charname16 from SRO_VT_SHARD.._Char where CharID = @CharID)
    Declare @Done int = (select done from MaxLevel_Log where charid = @CharID)
    if (@EventID = '22' and @Data2 = '110')
    begin
    insert MaxLevel_Log (CharID,Done) values (@CharID,0)
    begin
    if @MaxLevelCount <= 50 and @Done = 0
    begin
    insert into PlusNotice (sent,Message)values(0,@Charname +' has reached level 110, ' + @MaxLevelCount + '/50')
    Update SRO_VT_ACCOUNT..SK_Silk set silk_own += 150 where JID = @UserJID
    update MaxLevel_Log set done = '1' where charid like @CharID
    end
    end
    end



    Cya
    Last edited by Tyr; 14-12-14 at 10:59 AM.


  2. #2
    kaju BadFist is offline
    MemberRank
    Nov 2011 Join Date
    833Posts

    Re: Reward a player after reaching max level

    if you dont make a system anti cheats this system is a failed. why because is easy to make lvl down how ? well if a player make pk lvl 16 and have 200k point he make for sure minimum 1 lvl down and there are other option to make down lvl.

  3. #3
    † Working in Secret † Madelyn is offline
    MemberRank
    Jun 2011 Join Date
    San CristóbalLocation
    658Posts

    Re: Reward a player after reaching max level

    well this is a bad release!
    Declare @CurrentLevel int = (select CurLevel from SRO_VT_SHARD.._Char where CharID = @CharID)
    this are cheatable easy, you need work with maxlevel now curlevel.

    if @MaxLevelCount <= 50 ?????
    where you said that is for reborned servers? the reborned servers are bad! best play Mu Online.

    declare @ReMainsilk int = (select silk_own from SRO_VT_ACCOUNT..SK_SILK where JID = @userJID)
    and Update SRO_VT_ACCOUNT..SK_Silk set silk_own = @Silkremain + 150 where JID = @userJID

    @ReMainsilk is not @Silkremain

    set silk_own = @Silkremain + 150
    set silk_own = silk_own + 150
    why declare other variable?

    Update SRO_VT_ACCOUNT..SK_Silk double .. ? this is a bomb! or you delete dbo?


    This content has given me eye cancer. sry ..

  4. #4
    Proficient Member pr0xy1337 is offline
    MemberRank
    Aug 2012 Join Date
    182Posts

    Re: Reward a player after reaching max level

    @Madelyn agree. We already pointed his mistakes at *e*pv*p but it seems that he likes what he did no matter he didn't test it.

    About your 5th point.. This works with no problems at all.. :)

  5. #5
    Enthusiast Tyr is offline
    MemberRank
    Nov 2014 Join Date
    36Posts

    Re: Reward a player after reaching max level

    table has been modified and addlogchar has been fixed. now it works with anti cheat

    - - - Updated - - -

    Quote Originally Posted by BadFist View Post
    if you dont make a system anti cheats this system is a failed. why because is easy to make lvl down how ? well if a player make pk lvl 16 and have 200k point he make for sure minimum 1 lvl down and there are other option to make down lvl.
    however he did .. the charid will still inserted in the table .. and it can't be duplicated ! so please dear mega mind stop showing us how (smart) are you

    - - - Updated - - -

    Quote Originally Posted by Madelyn View Post
    well this is a bad release!
    Declare @CurrentLevel int = (select CurLevel from SRO_VT_SHARD.._Char where CharID = @CharID)
    this are cheatable easy, you need work with maxlevel now curlevel.

    if @MaxLevelCount <= 50 ?????
    where you said that is for reborned servers? the reborned servers are bad! best play Mu Online.

    declare @ReMainsilk int = (select silk_own from SRO_VT_ACCOUNT..SK_SILK where JID = @userJID)
    and Update SRO_VT_ACCOUNT..SK_Silk set silk_own = @Silkremain + 150 where JID = @userJID

    @ReMainsilk is not @Silkremain

    set silk_own = @Silkremain + 150
    set silk_own = silk_own + 150
    why declare other variable?

    Update SRO_VT_ACCOUNT..SK_Silk double .. ? this is a bomb! or you delete dbo?


    This content has given me eye cancer. sry ..
    1-dear mega mind, stop showing us how stupid are you. why maxlevel? didn't you think that however he did, his charid will still inserted into the table?
    2? what's wrong here? i think you're just a beginner in sql !
    3- it was just a little mistake
    4- it will work at all.
    5- :facepalm:

  6. #6
    kaju BadFist is offline
    MemberRank
    Nov 2011 Join Date
    833Posts

    Re: Reward a player after reaching max level

    I'm smarter than you! i never make a mistake like this "Update SRO_VT_ACCOUNT..SK_Silk set silk_own = @Silkremain + 150 where JID = @userJID" you have to declare 2 variable when easy was "Update SRO_VT_ACCOUNT..SK_Silk set silk_own += 150 where JID = @userJID" when i release something i think 2 time how to make a good release and also player to cant cheats.

  7. #7
    Enthusiast valcro is offline
    MemberRank
    Sep 2011 Join Date
    SpainLocation
    31Posts

    Re: Reward a player after reaching max level

    If the SK_Silk table haven't got the UserJID record the update will fail.

    Better use

    Code:
    CGI.CGI_WebPurchaseSilk
    instead of updating the SK_Silk table directly, it will log the transaction and also update the silk ingame in real time.

  8. #8
    Enthusiast Tyr is offline
    MemberRank
    Nov 2014 Join Date
    36Posts

    Re: Reward a player after reaching max level

    Quote Originally Posted by valcro View Post
    If the SK_Silk table haven't got the UserJID record the update will fail.

    Better use

    Code:
    CGI.CGI_WebPurchaseSilk
    instead of updating the SK_Silk table directly, it will log the transaction and also update the silk ingame in real time.
    if it's a free silk server, ofc the userjid will exist.
    if it's a silk/h server, do you think getting lv 110 is too easy? you need at least 3 hours ! which means you'll get 1 silk atleast x_x

    - - - Updated - - -

    Quote Originally Posted by BadFist View Post
    I'm smarter than you! i never make a mistake like this "Update SRO_VT_ACCOUNT..SK_Silk set silk_own = @Silkremain + 150 where JID = @userJID" you have to declare 2 variable when easy was "Update SRO_VT_ACCOUNT..SK_Silk set silk_own += 150 where JID = @userJID" when i release something i think 2 time how to make a good release and also player to cant cheats.

    well, this was a little mistake and i have fixed it before you reply. now

  9. #9
    Enthusiast valcro is offline
    MemberRank
    Sep 2011 Join Date
    SpainLocation
    31Posts

    Re: Reward a player after reaching max level

    Quote Originally Posted by Tyr View Post
    if it's a free silk server, ofc the userjid will exist.
    if it's a silk/h server, do you think getting lv 110 is too easy? you need at least 3 hours ! which means you'll get 1 silk atleast x_x
    What if because an Unique event or whatever the PJ level up to 110 in minutes?

    But idk, im just telling you that if you use the SP I told you before, you wont have that problem, or you can go with an [IF( !JID) insert ELSE update ] but at least, as a release, tell the people that this thing will only work under your desired circunstances.

  10. #10
    Proficient Member pr0xy1337 is offline
    MemberRank
    Aug 2012 Join Date
    182Posts

    Re: Reward a player after reaching max level

    Quote Originally Posted by valcro View Post
    What if because an Unique event or whatever the PJ level up to 110 in minutes?

    But idk, im just telling you that if you use the SP I told you before, you wont have that problem, or you can go with an [IF( !JID) insert ELSE update ] but at least, as a release, tell the people that this thing will only work under your desired circunstances.
    Usually that could be done trough the registration page in a php script, to add the Silk data I mean but.. anyway:
    shard > stored procedures > _AddNewChar

    Find a place you like...

    Code:
    	DECLARE @JiD INT; SELECT @JiD = UserJID FROM _User with(nolock) WHERE CharID = @NewCharID
    	IF (NOT EXISTS(SELECT JID FROM SRO_VT_ACCOUNT.dbo.sk_silk with(nolock) where JID = @JiD))
    	BEGIN
    	INSERT INTO SRO_VT_ACCOUNT.dbo.sk_silk(JID,silk_own,silk_gift,silk_point) VALUES  @JiD,0,0,0)
    	END

  11. #11
    † Working in Secret † Madelyn is offline
    MemberRank
    Jun 2011 Join Date
    San CristóbalLocation
    658Posts

    Re: Reward a player after reaching max level

    #This is a bad thread, is not a release!

    1º i believe that you not use this by the number of errors that have.
    2º The details about the "release" arent specific, this is for reborned servers. not for normal.. the 90% of servers are normal not reborned.
    3º if your db is edited in .dbo. for .(nothing). why you think that this procedure, would work for all who use it?
    4º youre a noob here and you cant win friends being bad. you must need accept that is a bad release with errors .. it's all.
    #Reported to delete for be useless as hell.
    gl..

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

    Re: Reward a player after reaching max level

    He was just posting this to try and help people, cmon guys don't have to be like that. Even tho it wasn't an efficient procedure or didnt have anti cheat etc you guys could of helped him make it better instead of posting all this saying its a bad thread.

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

    Re: Reward a player after reaching max level

    You can always make a Coloumn at the end of _User and call it "HasRecievedReward" where the default value is always 0 -- that way when GS executes their queries it sets the

    then in the query adjust it to do the following ->

    If HasRecievedReward = 0 where CharId = @CharID
    -> then execute the Silk stored procedure
    -> set HasRecievedReward to 1

    done...

  14. #14
    (⌐■_■) NourAyman is offline
    MemberRank
    Feb 2012 Join Date
    Behind you :PLocation
    683Posts

    Re: Reward a player after reaching max level

    Quote Originally Posted by Jangan View Post
    You can always make a Coloumn at the end of _User and call it "HasRecievedReward" where the default value is always 0 -- that way when GS executes their queries it sets the

    then in the query adjust it to do the following ->

    If HasRecievedReward = 0 where CharId = @CharID
    -> then execute the Silk stored procedure
    -> set HasRecievedReward to 1

    done...
    i wonder that many are annoying before giving him that advice :/
    and they didn't :D
    @Tyr, You forgot something.
    Code:
    if   @done != 1
    begin
    add it before the insert statement.
    Last edited by NourAyman; 15-12-14 at 05:33 PM.

  15. #15
    Member ilowe is offline
    MemberRank
    Jun 2014 Join Date
    82Posts

    Re: Reward a player after reaching max level

    how items can inflict?



Page 1 of 2 12 LastLast

Advertisement