Finding the silrkoad percentages

08/26/2013 15:43 Rubba-Lipped Robba#1
Hi guys,

I`m working on a website for a little silkroad pserver at the moment and I want to display the item-infos of every item a char is carrying.

Im using these queries to find the common information about an item. The problem is that the second query only returns the default values of the item, not the pimped ones.

Code:
SELECT * 
FROM   sro_vt_shard.dbo._items AS item 
       LEFT JOIN sro_vt_shard.dbo._refitemnames AS n 
              ON n.itemid = item.refitemid 
WHERE  item.id64 = XXXXXXXXX
Code:
SELECT * 
FROM   sro_vt_shard.dbo._refobjcommon AS refcommon 
       LEFT JOIN sro_vt_shard.dbo._refobjitem AS refitem 
              ON refitem.id = refcommon.link 
WHERE  refcommon.id = XXXX
I believe that these bits of info are located in the columns in MagParam1-12, Serial64 and Variance. But these columns only contain strange numbers without any pattern.

These are the connections between database and item that i already found out, but please remember that these are only the correct values of the items that you bought from an NPC (+0% no blues).

PHP Code:
        //Required level: ReqLevel1
        //PattackMax_L: Physical Attack Lower
        //PattackMax_U: Physical Attack Upper
        //PAttackInc: Physical Attack Increase
        //MAttackMin_L: Magical Attack Lower
        //MAttackMin_U: Magical Attack Uppwer
        //MAttackInc: Magical Attach Increase
        //Dur_L: Durability
        //Range: Attack distance : 10
        //HR_L: Attack Rate (HR_U, HRInc)
        //Critical: CHR_L (CHR_U)
        //PAStrMin_L to PAStrMax_L: Physical reinforce
        //MAInt_Min_L to MAInt_Max_L: Magical reinforce
        //ReqGender: 1 = male, 0 = female, 2 = both
        //MaxMagicOptCount: Max. no. of magic options: XUnit 
Does anyone know how some of the pservers get these data on their websites? :confused:

greetz Rubba-Lipped Robba
08/26/2013 20:30 Schickl#2
OptLevel = plus of the item
Variance = white stats(5 bits each)
Data = Durability/Count
MagParamXX = blues(each column holds one)
08/26/2013 22:05 Rubba-Lipped Robba#3
Thank you very much for your informative reply. But there is one thing I don't understand. In which way is the info about the blues stored in the magparamxx columns?

For example: I have a spear with the following values in the Mentioned columns.
Magparam 1: 25769803853
Magparam 2: 25769803847
Magparam 3: 25769803985
Magparam 4: 25769803997
Magparam 5: 687194767449
Magparam 6: 429496729713

[Only registered and activated users can see links. Click Here To Register...]

Can someone say what each line represents?

Greetz
08/28/2013 06:39 Royalblades#4
google bitwise operations and u get ur pattern :P
08/29/2013 02:16 Rubba-Lipped Robba#5
Are you shure that we really need bitwise Operations here? Why should joymax store their data in such an abstruse way >.< Does anymore know the right way to do this? I think I will search myself to death :D

Schickls post brought me a big step towards the solution. The percentages are already correct if the item does not have a +X
08/30/2013 11:18 .iGold#6
Well
here's a simple but alternative way.
Add MagParam1 : add 99999 - Restart server. check which one is added
Add MagParam2 : add 99999 - Restart server. check which blue is added.
etc,etc,etc.
Write them down, then you know MagParam1 : Ex: STR
etc

Regards
08/30/2013 18:44 Schickl#7
MagParams are QWORDS.
The lower 4 Bytes are the ID(_RefMagicOpt)
The higher 4 Bytes are the value