Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

About max plus

Newbie Spellweaver
Joined
Jun 22, 2015
Messages
10
Reaction score
3
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:
[COLOR=#007700]IF (@[/COLOR][COLOR=#0000BB]Operation [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]90 [/COLOR][COLOR=#007700]AND @[/COLOR][COLOR=#0000BB]strDesc like [/COLOR][COLOR=#DD0000]'%Opt: +13%'[/COLOR][COLOR=#007700])
[/COLOR][COLOR=#0000BB]BEGIN
UPDATE SRO_VT_SHARD[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]dbo[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]_Items SET OptLevel [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]12 WHERE Serial64 [/COLOR][COLOR=#007700]= @[/COLOR][COLOR=#0000BB]ItemSerial
END [/COLOR]
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:
Junior Spellweaver
Joined
Jul 2, 2012
Messages
151
Reaction score
13
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.
 
Newbie Spellweaver
Joined
Jun 22, 2015
Messages
10
Reaction score
3
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..
 
Experienced Elementalist
Joined
Aug 22, 2013
Messages
208
Reaction score
125
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  @[I][B][URL="https://forum.ragezone.com/members/1333442518.html"]Even[/URL][/B][/I]tID = 4 OR @[I][B][URL="https://forum.ragezone.com/members/1333442518.html"]Even[/URL][/B][/I]tID = 6)
BEGIN
    /* Get JID info */
    SELECT @[I][B][URL="https://forum.ragezone.com/members/1335.html"]User[/URL][/B][/I]JID = UserJID FROM [SRO_VT_SHARD].[dbo].[_User] WITH (NOLOCK) WHERE CharID = @[I][B][URL="https://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]ID
    /* 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 = @[I][B][URL="https://forum.ragezone.com/members/1335.html"]User[/URL][/B][/I]JID 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 = @[I][B][URL="https://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]ID 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 ;)
 
Newbie Spellweaver
Joined
Aug 22, 2014
Messages
68
Reaction score
19
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  @[I][B][URL="https://forum.ragezone.com/members/1333442518.html"]Even[/URL][/B][/I]tID = 4 OR @[I][B][URL="https://forum.ragezone.com/members/1333442518.html"]Even[/URL][/B][/I]tID = 6) BEGIN     /* Get JID info */     SELECT @[I][B][URL="https://forum.ragezone.com/members/1335.html"]User[/URL][/B][/I]JID = UserJID FROM [SRO_VT_SHARD].[dbo].[_User] WITH (NOLOCK) WHERE CharID = @[I][B][URL="https://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]ID     /* 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 = @[I][B][URL="https://forum.ragezone.com/members/1335.html"]User[/URL][/B][/I]JID 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 = @[I][B][URL="https://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]ID 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?
 
Newbie Spellweaver
Joined
Jul 20, 2006
Messages
63
Reaction score
4
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 ?
 
Newbie Spellweaver
Joined
Dec 15, 2012
Messages
87
Reaction score
0
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



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 :)
 
Newbie Spellweaver
Joined
Jul 20, 2006
Messages
63
Reaction score
4
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



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.
 
Junior Spellweaver
Joined
Aug 24, 2012
Messages
182
Reaction score
21
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)
Code:
DECLARE  [USER=447213]Max[/USER]Plus TINYINT = 13;
UPDATE	I
SET		OptLevel =  [USER=447213]Max[/USER]Plus
FROM	shardDB.._Inventory I
INNER JOIN	shardDB.._Items IT
ON		I.ItemID = IT.ID64
WHERE	I.CharID =  [USER=551894]Char[/USER]ID

You could do that for _Chest, _InvCos

Have fun ^^


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