About max plus

Results 1 to 9 of 9
  1. #1
    Apprentice LoftLog is offline
    MemberRank
    Jun 2015 Join Date
    10Posts

    About max plus

    So since I was working on server and I some tutorials from this community I want to share what I did for some people who didn't know... I found alot of "guides" for max plus and they were all the same:
    Code:
    IF (@Operation = 90 AND @strDesc like '%Opt: +13%')
    BEGIN
    UPDATE SRO_VT_SHARD.dbo._Items SET OptLevel = 12 WHERE Serial64 = @ItemSerial
    END 
    But this way it is exploitable, if you success you can drop item and client will still think that it dropped +13 lets say if +12 is max plus. And when you pick it up it stays +13 in database too.... So that is useless. So I made a trigger I don't know alot about perfomance so I just want you guys to tell me if that gonna affect perfomance alot....
    Here is the Trigger on dbo._Items:
    Code:
    SET ANSI_NULLS ONGO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Made by LogLoft From RageZone.
    -- =============================================
    CREATE TRIGGER [dbo].[MaxPlus] 
       ON  [dbo].[_Items]
       AFTER INSERT,DELETE,UPDATE
    AS 
    BEGIN
        -- SET NOCOUNT ON added to prevent extra result sets from
        -- interfering with SELECT statements.
        SET NOCOUNT ON;
        UPdate _Items
        SET OptLevel = 20 where OptLevel between 21 and 150 --20is max plus so i used 20 also it doesnt matter if it is with adv or not :)
    
    
    END
    
    
    GO
    You can use ofc the same bug here but after every plus on the server same trigger will be triggered so if you want to save item you have to keep it dropped on the ground :D Ofcourse it is same thing to make auto query like for every 2 minutes...
    Last edited by LoftLog; 06-07-15 at 04:09 PM.


  2. #2
    Proficient Member tschulian is offline
    MemberRank
    Jul 2012 Join Date
    ErlangenLocation
    151Posts

    Re: About max plus

    You should trigger it via the SerialNumber ([Serial64]).

    update SRO_VT_SHARD.. _Items
    SET OptLevel = 20 -- this is your wished max plus
    where OptLevel > 20 and Serial64 = @$variable
    This should save a lot of executing time.

  3. #3
    Apprentice LoftLog is offline
    MemberRank
    Jun 2015 Join Date
    10Posts

    Re: About max plus

    Well yeah but then the same bug in game appears. If you drop the item after you made it bigger than max plus and you relog or teleport after you pick it up it is still same and it won't change unless the query is runned again in this case if some one does alchemy. Well I don't know what to do at this point... There should be max plus somewhere probably in gameserver or somewhere because I when i try to make +250 to +251 it auto cancels..

  4. #4
    Don't touch my Nutella! Witchy Moo is offline
    MemberRank
    Aug 2013 Join Date
    SingaporeLocation
    208Posts

    Re: About max plus

    Safest way is to do this when character login/logout, since changing item plus from database trigger or _AddLogItem query without refreshing the client will cause misinformation between client and server and it might cause the client dc coz wrong information received from the server. Say, someone did +13 and you force real time query back to +12 and then the client succeeded the 2nd time (client reads +14 while server reads +12)

    This is what I applied in my server:
    Code:
    -- Login/Logout sequence
    IF  @EventID = 4 OR @EventID = 6)
    BEGIN
        /* Get JID info */
        SELECT @UserJID = UserJID FROM [SRO_VT_SHARD].[dbo].[_User] WITH (NOLOCK) WHERE CharID = @CharID
        /* Begin: Item Plus check */
        UPDATE [SRO_VT_SHARD].[dbo].[_Items] SET OptLevel = 12 WHERE OptLevel > 12 AND ID64 IN (SELECT ItemID FROM [SRO_VT_SHARD].[dbo].[_Chest] WITH (NOLOCK) WHERE UserJID = @UserJID AND ItemID > 0)
        UPDATE [SRO_VT_SHARD].[dbo].[_Items] SET OptLevel = 12 WHERE OptLevel > 12 AND ID64 IN (SELECT ItemID FROM [SRO_VT_SHARD].[dbo].[_Inventory] WITH (NOLOCK) WHERE CharID = @CharID AND ItemID > 0)
    END
    Well, that's excluding Adv Elixir ;), if you want to check Adv elixir do check [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] table :)

    have fun ;)

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

    Re: About max plus

    Quote Originally Posted by Witchy Moo View Post
    Safest way is to do this when character login/logout, since changing item plus from database trigger or _AddLogItem query without refreshing the client will cause misinformation between client and server and it might cause the client dc coz wrong information received from the server. Say, someone did +13 and you force real time query back to +12 and then the client succeeded the 2nd time (client reads +14 while server reads +12) This is what I applied in my server:
    Code:
    -- Login/Logout sequence IF  @EventID = 4 OR @EventID = 6) BEGIN     /* Get JID info */     SELECT @UserJID = UserJID FROM [SRO_VT_SHARD].[dbo].[_User] WITH (NOLOCK) WHERE CharID = @CharID     /* Begin: Item Plus check */     UPDATE [SRO_VT_SHARD].[dbo].[_Items] SET OptLevel = 12 WHERE OptLevel > 12 AND ID64 IN (SELECT ItemID FROM [SRO_VT_SHARD].[dbo].[_Chest] WITH (NOLOCK) WHERE UserJID = @UserJID AND ItemID > 0)     UPDATE [SRO_VT_SHARD].[dbo].[_Items] SET OptLevel = 12 WHERE OptLevel > 12 AND ID64 IN (SELECT ItemID FROM [SRO_VT_SHARD].[dbo].[_Inventory] WITH (NOLOCK) WHERE CharID = @CharID AND ItemID > 0) END
    Well, that's excluding Adv Elixir ;), if you want to check Adv elixir do check [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] table :) have fun ;)
    huh... Guild Storage, COS Inventory and why u trigger it on Login & Logout?

  6. #6
    Member hellangel2 is offline
    MemberRank
    Jul 2006 Join Date
    cardosoLocation
    85Posts

    Re: About max plus

    But with this command Item back to MAX PLUS when DISCONECT OR use return or Teleport .. if he make a +13 and no teleport can use item normal ..

    some one know how we can force char teleport ou back town when sucess alquimy + 13 ?

  7. #7
    Member kotsh is offline
    MemberRank
    Dec 2012 Join Date
    87Posts

    Re: About max plus

    i have made it for my self for max plus
    weapons and shields +23 no adv
    sets +18 no adv
    accs +21 no adv

    ---------Max Plus
    ------- Weapons +23 Max No ADV
    IF(@Operation=90 AND @dwData > 1507350 and @ItemRefID in (40312,40313,40314,40333,40334,40335,40354,40355,40356,40375,40376,40377,40396,40397,40398,40417,40418,40419,40438,40439,40440,40459,40460,40461,40480,40481,40482,40501,40502,40503,39367,39368,39369,39388,39389,39390,39409,39410,39411,39430,39431,39432,39451,39452,39453,39472,39473,39474))
    begin
    update SRO_VT_SHARD.._Items set OptLevel = 23 where Serial64 = @ItemSerial and OptLevel > 23
    end
    ------- Set +18
    IF(@Operation=90 AND @dwData > 1179665 and @ItemRefID in (40522,40523,40524,40543,40544,40545,40564,40565,40566,40585,40586,40587,40606,40607,40608,40627,40628,40629,40648,40649,40650,40669,40670,40671,40690,40691,40692,40711,40712,40713,40732,40733,40734,40753,40754,40755,40774,40775,40776,40795,40796,40797,40816,40817,40818,40837,40838,40839,40858,40859,40860,40879,40880,40881,40900,40901,40902,40921,40922,40923,40942,40943,40944,40963,40964,40965,40984,40985,40986,41005,41006,41007,41026,41027,41028,41047,41048,41049,41068,41069,41070,41089,41090,41091,41110,41111,41112,41131,41132,41133,41152,41153,41154,41173,41174,41175,41194,41195,41196,41215,41216,41217,41236,41237,41238,41257,41258,41259,39493,39494,39495,39514,39515,39516,39535,39536,39537,39556,39557,39558,39577,39578,39579,39598,39599,39600,39619,39620,39621,39640,39641,39642,39661,39662,39663,39682,39683,39684,39703,39704,39705,39724,39725,39726,39745,39746,39747,39766,39767,39768,39787,39788,39789,39808,39809,39810,39829,39830,39831,39850,39851,39852,39871,39872,39873,39892,39893,39894,39913,39914,39915,39934,39935,39936,39955,39956,39957,39976,39977,39978,39997,39998,39999,40018,40019,40020,40039,40040,40041,40060,40061,40062,40081,40082,40083,40102,40103,40104,40123,40124,40125,40144,40145,40146,40165,40166,40167,40186,40187,40188,40207,40208,40209,40228,40229,40230))
    begin
    update SRO_VT_SHARD.._Items set OptLevel = 18 where Serial64 = @ItemSerial and OptLevel > 18
    end
    ------- accs +21
    IF(@Operation=90 AND @dwData > 1376276 and @ItemRefID in (41278,41279,41280,41299,41300,41301,41320,41321,41322,40249,40250,40251,40270,40271,40272,40291,40292,40293))
    begin
    update SRO_VT_SHARD.._Items set OptLevel = 21 where Serial64 = @ItemSerial and OptLevel > 21
    end

    - - - Updated - - -

    this alot if items id because i made it on all my using items from D13 to d14 for all weapons for example
    and about @dwData you can get it by trying plusing and trace it to know the number of plus :)

  8. #8
    Member hellangel2 is offline
    MemberRank
    Jul 2006 Join Date
    cardosoLocation
    85Posts

    Re: About max plus

    Quote Originally Posted by kotsh View Post
    i have made it for my self for max plus
    weapons and shields +23 no adv
    sets +18 no adv
    accs +21 no adv

    ---------Max Plus
    ------- Weapons +23 Max No ADV
    IF(@Operation=90 AND @dwData > 1507350 and @ItemRefID in (40312,40313,40314,40333,40334,40335,40354,40355,40356,40375,40376,40377,40396,40397,40398,40417,40418,40419,40438,40439,40440,40459,40460,40461,40480,40481,40482,40501,40502,40503,39367,39368,39369,39388,39389,39390,39409,39410,39411,39430,39431,39432,39451,39452,39453,39472,39473,39474))
    begin
    update SRO_VT_SHARD.._Items set OptLevel = 23 where Serial64 = @ItemSerial and OptLevel > 23
    end
    ------- Set +18
    IF(@Operation=90 AND @dwData > 1179665 and @ItemRefID in (40522,40523,40524,40543,40544,40545,40564,40565,40566,40585,40586,40587,40606,40607,40608,40627,40628,40629,40648,40649,40650,40669,40670,40671,40690,40691,40692,40711,40712,40713,40732,40733,40734,40753,40754,40755,40774,40775,40776,40795,40796,40797,40816,40817,40818,40837,40838,40839,40858,40859,40860,40879,40880,40881,40900,40901,40902,40921,40922,40923,40942,40943,40944,40963,40964,40965,40984,40985,40986,41005,41006,41007,41026,41027,41028,41047,41048,41049,41068,41069,41070,41089,41090,41091,41110,41111,41112,41131,41132,41133,41152,41153,41154,41173,41174,41175,41194,41195,41196,41215,41216,41217,41236,41237,41238,41257,41258,41259,39493,39494,39495,39514,39515,39516,39535,39536,39537,39556,39557,39558,39577,39578,39579,39598,39599,39600,39619,39620,39621,39640,39641,39642,39661,39662,39663,39682,39683,39684,39703,39704,39705,39724,39725,39726,39745,39746,39747,39766,39767,39768,39787,39788,39789,39808,39809,39810,39829,39830,39831,39850,39851,39852,39871,39872,39873,39892,39893,39894,39913,39914,39915,39934,39935,39936,39955,39956,39957,39976,39977,39978,39997,39998,39999,40018,40019,40020,40039,40040,40041,40060,40061,40062,40081,40082,40083,40102,40103,40104,40123,40124,40125,40144,40145,40146,40165,40166,40167,40186,40187,40188,40207,40208,40209,40228,40229,40230))
    begin
    update SRO_VT_SHARD.._Items set OptLevel = 18 where Serial64 = @ItemSerial and OptLevel > 18
    end
    ------- accs +21
    IF(@Operation=90 AND @dwData > 1376276 and @ItemRefID in (41278,41279,41280,41299,41300,41301,41320,41321,41322,40249,40250,40251,40270,40271,40272,40291,40292,40293))
    begin
    update SRO_VT_SHARD.._Items set OptLevel = 21 where Serial64 = @ItemSerial and OptLevel > 21
    end

    - - - Updated - - -

    this alot if items id because i made it on all my using items from D13 to d14 for all weapons for example
    and about @dwData you can get it by trying plusing and trace it to know the number of plus :)


    But with ur system need wait player use return ou Disconnect to item back? we need force player return to no delay item.

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

    Re: About max plus

    A packet filter would be the best solution for this. Otherwise, you could use the if op = 90 and dwData > bla bla bla, but this occasionally fails. So you could add in addlogchar => if eventid 4/6 => update shard.._Items set OptLevel = @MaxPlus where CharID = @CharID... this way no matter if he relogs drops or whatever, when he has the item equipped or anywhere in his inventory/storage/cosStrg it will "fix" his item plus..
    (the above query won't work though, because _Items has no CharID col)
    Spoiler:
    Code:
    DECLARE  @MaxPlus TINYINT = 13;
    UPDATE	I
    SET		OptLevel =  @MaxPlus
    FROM	shardDB.._Inventory I
    INNER JOIN	shardDB.._Items IT
    ON		I.ItemID = IT.ID64
    WHERE	I.CharID =  @CharID
    You could do that for _Chest, _InvCos


    Have fun ^^


    Edit:
    Spoiler:
    Sorry, similar post already posted, forgot to read everything on da topic :/



Advertisement