[help] issue with max stat via DB

05/25/2013 19:32 slayer456#1
Afternoon All,

I searched through epvp and found the info that I needed to do GM enchants and Max stats via sql. However, I cant seem to get them to actually stick. I go to the exact item that i need either via charitems or charstoreditems. I change the craftname to what i need it to be. for example: 06060600000606060660

if im not mistaken that should be the craftname for +6 str,rec,dex,luc 600 hp mp sp and enchant to 10. Regardless if i run an update script or change the craftname directly I can not get the changes to take affect in game or actually stay in affect in the db. Where am I going wrong?
05/26/2013 01:55 infinite59#2
You should add quotes ( ' ) for sql to consider the 0, or it will ignore it and this will fk your item ^^
05/26/2013 19:38 castor4878#3
not sure what means "considering zeros" ...

if you use '06060600000606060660' (with quotes) it's a string that will be stored w/o hidden mistake in the [Craftname] [varchar](20) field.

if you use 06060600000606060660 (w/o quotes) it's an octal number, mssql with considers the leading '0' to choose that octal base, it will so use 109801629298483632 (base 10) or 1861800061861B0 (base 16) and convert that number to store it in a varchar (yes repetition) field. this means 2 mistakes and a result likely unpredictable.

if the change is correct in DB, you shall relog the toon (and make sure it didn't make any in-ggame changes to the item otherwise the DB changes will be lost) to see these changes in-game.

also note that your enchantment figure is valid for "def enh." (so gear) only, for weapon (atk enh.) you store the enhacement level (not 50 + level).