Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 04:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



calculating item % (white stats)

Discussion on calculating item % (white stats) within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old 09/13/2012, 23:00   #31
 
elite*gold: 0
Join Date: Apr 2009
Posts: 120
Received Thanks: 17
@Stratti thanks but im still having some trouble

This is the stats of a weapon
Code:
73 06 50 D2 03 00 00 00
This is the actual stats from client
Code:
41% [Critical] 
28% [Mag Dmg]
15% [Phy Dmg]
0%  [Hit Rate]
3%  [Mag Rein]
61% [Phy Rein]
61% [Dura]
That's my tool's output
Code:
96% [Critical] 
58% [Mag Dmg]
32% [Phy Dmg]
0%  [Hit Rate]
9%  [Mag Rein]
22% [Phy Rein]
9%  [Dura]
If I used the stats in this my tool outputs exactly the same stats as pergian did.
supermando is offline  
Old 09/14/2012, 14:33   #32
 
GoneUp's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 201
Received Thanks: 73
Quote:
Originally Posted by supermando View Post
@Stratti thanks but im still having some trouble

This is the stats of a weapon
Code:
73 06 50 D2 03 00 00 00
This is the actual stats from client
Code:
41% [Critical] 
28% [Mag Dmg]
15% [Phy Dmg]
0%  [Hit Rate]
3%  [Mag Rein]
61% [Phy Rein]
61% [Dura]
That's my tool's output
Code:
96% [Critical] 
58% [Mag Dmg]
32% [Phy Dmg]
0%  [Hit Rate]
9%  [Mag Rein]
22% [Phy Rein]
9%  [Dura]
If I used the stats in this my tool outputs exactly the same stats as pergian did.

Some time ago, I made a class to do this job. Maybe it helps you. It's not that fine, but it works.


(Coded in vb.net, you can easily convert it online to C#)
GoneUp is offline  
Thanks
2 Users
Old 09/15/2012, 03:42   #33

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,654
@up
If pastebin is blocked in anbody else's country: (Its blocked here)

And love to see people making great stuff in vb.net (against saying 99% of population that vb.net sucks)
sarkoplata is offline  
Old 09/19/2012, 16:02   #34
 
elite*gold: 0
Join Date: Jun 2007
Posts: 79
Received Thanks: 19
Here is a C# version ( Converted not tested )
cyberninjah is offline  
Old 09/20/2012, 00:04   #35
 
iNiperx's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 610
Received Thanks: 152
Quote:
Originally Posted by sarkoplata View Post
@up
If pastebin is blocked in anbody else's country: (Its blocked here)

And love to see people making great stuff in vb.net (against saying 99% of population that vb.net sucks)
I don't think vb.net sux but people says it all the time so i changed C#.. i guess is nice to know another program, still learning x)
iNiperx is offline  
Old 09/30/2012, 00:45   #36

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,654
Whatever I tried, If ingame the stat is: 16%, tool shows 22%, otherways, it's all true, but at some values the client and tool show different. Seems like client change it as it want. Any idea?
sarkoplata is offline  
Old 09/30/2012, 01:03   #37
 
GoneUp's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 201
Received Thanks: 73
Wich Tool? :P
GoneUp is offline  
Old 09/30/2012, 01:09   #38

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,654
Quote:
Originally Posted by GoneUp View Post
Wich Tool? :P
My fuser tool () I'm trying to add stone fusing option too.

Used your class to get stats aswell, same. Ingame it shows 16%, but calculating it give 22%. And this happens for 16%, the 41% etc. works normally.

sarkoplata is offline  
Old 09/30/2012, 12:37   #39
 
GoneUp's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 201
Received Thanks: 73
Can you post the uint64 and a ingame screen of the item?
GoneUp is offline  
Old 09/30/2012, 13:52   #40

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,654
UInt64 = 7516192768



Tool says 23% Crit ratio (it works at stats like 41% etc. but at this it fail)

Code:

PHP Code:
  ElseIf packet.Opcode = &HB151 Then
                                        Dim variance 
As UInt64
                                        context
.RelaySecurity.Send(packet)
                                        
Dim typeid_1 As Byte packet.ReadUInt8()

                                        If 
Not typeid_1 2 Then
                                            
Try
                                                
Dim typeid_2 As Byte packet.ReadUInt8()

                                                
Main.Log("Type Id[2]: " typeid_2)

                                                
Dim success As Byte packet.ReadUInt8()

                                         
                                                
Dim itemslot As Byte packet.ReadUInt8()

                                                
Dim Unknown3 As UInt32 packet.ReadUInt32()

                                                
Dim itemid As UInt32 packet.ReadUInt32
                                                Dim plusvalue 
As Byte packet.ReadUInt8
                                                variance 
packet.ReadUInt64()
                                                
Dim durability As UInt32 packet.ReadUInt32

                                                Dim bluecount 
As Byte packet.ReadUInt8
                                                packet
.ReadUInt8()
                                                
packet.ReadUInt8()
                                                
packet.ReadUInt8()
                                                
packet.ReadUInt8()

                                                
Dim stat As New cWhitestats(cWhitestats.Type.Weaponvariance)
                                                
Main.Log(stat.PerCritical
sarkoplata is offline  
Old 09/30/2012, 22:13   #41
 
GoneUp's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 201
Received Thanks: 73
Quote:
Originally Posted by sarkoplata View Post
UInt64 = 7516192768

Tool says 23% Crit ratio (it works at stats like 41% etc. but at this it fail)

Code:

PHP Code:
  ElseIf packet.Opcode = &HB151 Then
                                        Dim variance 
As UInt64
                                        context
.RelaySecurity.Send(packet)
                                        
Dim typeid_1 As Byte packet.ReadUInt8()

                                        If 
Not typeid_1 2 Then
                                            
Try
                                                
Dim typeid_2 As Byte packet.ReadUInt8()

                                                
Main.Log("Type Id[2]: " typeid_2)

                                                
Dim success As Byte packet.ReadUInt8()

                                         
                                                
Dim itemslot As Byte packet.ReadUInt8()

                                                
Dim Unknown3 As UInt32 packet.ReadUInt32()

                                                
Dim itemid As UInt32 packet.ReadUInt32
                                                Dim plusvalue 
As Byte packet.ReadUInt8
                                                variance 
packet.ReadUInt64()
                                                
Dim durability As UInt32 packet.ReadUInt32

                                                Dim bluecount 
As Byte packet.ReadUInt8
                                                packet
.ReadUInt8()
                                                
packet.ReadUInt8()
                                                
packet.ReadUInt8()
                                                
packet.ReadUInt8()

                                                
Dim stat As New cWhitestats(cWhitestats.Type.Weaponvariance)
                                                
Main.Log(stat.PerCritical
It's quite a bit senseless.
To trace it I split the value into their bits:
Code:
00111
00000
00000
00000
00000
00000
00000
The 00111 represents the weapon value: 7
And (7/31) * 100 gives us 22,58 ~ 23.

Dunno why the client writes 16%. Any Ideas?
GoneUp is offline  
Old 09/30/2012, 22:21   #42
 
elite*gold: 0
Join Date: Jan 2009
Posts: 313
Received Thanks: 667
You'll never see a +23%
Code:
0	0%
1	3%
2	6%
3	9%
4	12%
5	16%
6	19%
7	22%
8	25%
9	29%
10	32%
11	35%
12	38%
13	41%
14	45%
15	48%
16	51%
17	54%
18	58%
19	61%
20	64%
21	67%
22	70%
23	74%
24	77%
25	80%
26	83%
27	87%
28	90%
29	93%
30	96%
31	100%
DaxterSoul is offline  
Old 09/30/2012, 22:35   #43

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,654
Quote:
Originally Posted by DaxterSoul View Post
You'll never see a +23%
Code:
0	0%
1	3%
2	6%
3	9%
4	12%
5	16%
6	19%
7	22%
8	25%
9	29%
10	32%
11	35%
12	38%
13	41%
14	45%
15	48%
16	51%
17	54%
18	58%
19	61%
20	64%
21	67%
22	70%
23	74%
24	77%
25	80%
26	83%
27	87%
28	90%
29	93%
30	96%
31	100%
It return 22,58 ~ 23. and if you round it to higher it's 23%.
Still does not solve the mysticity why client says 16%.

(1 thing blew my mind, ingame says "Critical 5 (+16%)", and (5/31 * 100) = 16. Maybe it give the value, not the percantage?)
sarkoplata is offline  
Old 10/01/2012, 00:22   #44
 
elite*gold: 0
Join Date: Jan 2009
Posts: 313
Received Thanks: 667
You're sending those values wrong.
Crit+3% is 1073741824 and you want around 23% what is not present, so you choose Crit+22%.
7 *1073741824 = 7516192768, just as you said.


I'll work out a simple class for VB.NET & C# tomorrow hope that will clear things up
DaxterSoul is offline  
Old 10/01/2012, 09:55   #45
 
GoneUp's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 201
Received Thanks: 73
Quote:
Originally Posted by DaxterSoul View Post
You're sending those values wrong.
Crit+3% is 1073741824 and you want around 23% what is not present, so you choose Crit+22%.
7 *1073741824 = 7516192768, just as you said.


I'll work out a simple class for VB.NET & C# tomorrow hope that will clear things up
To correct it: the value is from the server, but our calculated value and the ingame value doesn't match.
GoneUp is offline  
Reply


Similar Threads Similar Threads
[Help]Editing Item Stats
12/21/2011 - Cabal Online - 2 Replies
Someone know how to make something like this?: Thor's Screenshots - Xfire Thor's Screenshots - Xfire If you know please share...dont matter if it works on private server or official server!
Changing item stats
01/06/2011 - CO2 Private Server - 3 Replies
Hi all, I got Kimo's source version 5095. I want to change my item stats, I first thought that if i go into the database search for the item and then change it attack,defense etc etc it will change it in game to. So i went to cq_item and then searched for shield changed added some more defense and then saved after that I restarted the server so i want to look for the changes and i see that there are no changes. So my question is what am i doing wrong?
char stats, and item stats
01/27/2010 - Lineage 2 - 6 Replies
hi all today.. on a private server. i made a verry strange exp..... some clannies called me to come to HS to help for pvp as i came there i seen mass pvp arround 30 ppl all hitted 1 person ................ a S dagger items drago set and AS i watched it.... he needed for everyone just 1 or 2 hits beamed arround like hell..
1 to +12 item stats any one?
11/29/2007 - Conquer Online 2 - 3 Replies
:confused: 1 to +12 item stats any one?
Unequip item but still keep its stats
09/28/2006 - World of Warcraft - 7 Replies
1) Get the spider's kiss dagger. 2) Get 2 other weapons. 3) Equip the skd in your main hand. 4) Put one weapon in your off hand. 5) The thrid weapon in your inventory. 6) Switch the main weapon with your off hand (skd should be in your off hand now) 7) Switch your skd with your inventory weapon. Cool You should have the bonus of your skd even though its in your inventory.



All times are GMT +2. The time now is 04:46.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.