[Guide] Simple SQL query to check Max Plus of items during login/logout session

08/03/2015 12:45 witchymoo#1
Hello,

Here I'll share simple SQL query to check and update "Max Plus" (with and without Adv. Elixir) of items in 2 different methods: (doesn't matter which, both has same effect)

Method 1: Real time after fusing
Method 2: On login/logout session

Why login/logout session? well as far as I tried, changing item plus from database trigger or [_AddLogItem] query without refreshing the client will cause misinformation between client and server. And might cause the client dc or crash (no idea which), because of wrong information send to/received from the server. (CMIIW)

For example, someone did +13 and you force real time query back to +12. The database already have "+12", but the client still reads "+13"... then the player fused again and succeeded the 2nd time (this time client reads +14 while server reads +12), and they start hunting/hitting/killing whatever without teleporting... not sure what will happen :P

(Update: as its.soul confirmed, nothing will happen, so I added a "real time" max plus check during equipment fusing, even though the client has to teleport to refresh the visual side)

Update notes:
  1. This will work and might be useful if you run your server without additional 3rd party filter. But you won't need this if using filter such as K-Guard, SUPERMAN, Galullians or others, since those already have a feature for plus limit. :)
  2. If you use Method 1, you won't need to use Method 2 because Method 1 already update the "ItemID" itself. So it won't matter where the player put the item after fusing :)
Now the boring part: (Feel free to develop the query as you see fit)

Method 1. "Real time" check and update right after fusing. (Client needs to teleport to refresh visual side)

Procedure: [SRO_VT_LOG].[dbo].[_AddLogItem]


Method 2. Check and update during login/logout session for Inventory, Storage, and Guild Storage

Procedure: [SRO_VT_LOG].[dbo].[_AddLogChar]


To test, fuse some items with or without Adv Elixir to more than your Max Plus value, then teleport (to test method 1), or put those items in Inventory, Storage, and Guild Storage, then logout/login again (to test method 2). see if it works.

good luck and have fun ;)
08/03/2015 13:52 Eslam Galull#2
good release

about :
Quote:
then the player fused again and succeeded the 2nd time (this time client reads +14 while server reads +12), and they start hunting/hitting/killing whatever without teleporting... not sure what will happen :P
nothing will happen cuz clinet side is just a visual side..
08/03/2015 16:46 Xutan*#3
there is a much better way,
you could simply filter it, so when you are trying to pass the limit, nothing will happen and you will get a notice informing you that you can't fuse this item anymore.
08/03/2015 17:16 witchymoo#4
like reverting back to max plus when fusing?... if no problem with the client, then it'll do, coz i have no idea how to limit it on client side, so whenever succeeded the client will still show the latest value right?
08/03/2015 17:58 Xutan*#5
Quote:
Originally Posted by witchymoo View Post
like reverting back to max plus when fusing?... if no problem with the client, then it'll do, coz i have no idea how to limit it on client side, so whenever succeeded the client will still show the latest value right?
It will not fail or success, plus will not be changed in both sides db and client.
08/03/2015 18:01 witchymoo#6
Post updated, added another method to check and update real time on database side after fusing.

Quote:
Originally Posted by Xutan* View Post
It will not fail or success, plus will not be changed in both sides db and client.
About this, How do I filter it to follow your explanation?

thank you
08/03/2015 18:06 Xutan*#7
Quote:
Originally Posted by witchymoo View Post
Post updated, added another method to check and update real time on database side after fusing.



About this, How do I filter it to follow your explanation?

thank you
using a packet filter.
P.S. : that kguard which was released includes this feature. you can check the source and learn how to do it.
08/03/2015 18:12 witchymoo#8
Quote:
Originally Posted by Xutan* View Post
using a packet filter.
P.S. : that kguard which was released includes this feature. you can check the source and learn how to do it.
Ah alright, a 3rd party filter :)... I was wondering if we can do that without additional addon/filter.
08/03/2015 18:19 Xutan*#9
Quote:
Originally Posted by witchymoo View Post
Ah alright, a 3rd party filter :)... I was wondering if we can do that without additional addon/filter.
your AddLogChar way is the only way to do it without any additional addons. however, it's kinda bad. players will use items with high plus till they get a disconnect.

there is something easier, but requires a bot.
you can do the AddLogItem's way and send "/totown" to the char which passed the limit. so the visual of the item plus will get updated.
08/03/2015 18:51 Eslam Galull#10
as Xutan said : there is noway except addlogchar

using a 3rd part program is more useful adding more features ..
08/08/2015 01:57 Overlimit Developer#11
tested , good one
08/08/2015 17:21 Justin1337*#12
Great release witchy, but I have to agree a packet filter would work better. Still a nice idea though!