calculating item % (white stats)

09/13/2012 23:00 supermando#31
@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 [Only registered and activated users can see links. Click Here To Register...] my tool outputs exactly the same stats as pergian did.
09/14/2012 14:33 GoneUp#32
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 [Only registered and activated users can see links. Click Here To Register...] 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.

[Only registered and activated users can see links. Click Here To Register...]
(Coded in vb.net, you can easily convert it online to C#)
09/15/2012 03:42 sarkoplata#33
@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)
09/19/2012 16:02 cyberninjah#34
Here is a C# version ( Converted not tested )
09/20/2012 00:04 iNiperx#35
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)
09/30/2012 00:45 sarkoplata#36
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?
09/30/2012 01:03 GoneUp#37
Wich Tool? :P
09/30/2012 01:09 sarkoplata#38
Quote:
Originally Posted by GoneUp View Post
Wich Tool? :P
My fuser tool ([Only registered and activated users can see links. Click Here To Register...]) 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.

09/30/2012 12:37 GoneUp#39
Can you post the uint64 and a ingame screen of the item?
09/30/2012 13:52 sarkoplata#40
UInt64 = 7516192768

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

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
09/30/2012 22:13 GoneUp#41
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?
09/30/2012 22:21 DaxterSoul#42
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%
09/30/2012 22:35 sarkoplata#43
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?)
10/01/2012 00:22 DaxterSoul#44
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.
[Only registered and activated users can see links. Click Here To Register...]

I'll work out a simple class for VB.NET & C# tomorrow hope that will clear things up
10/01/2012 09:55 GoneUp#45
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.
[Only registered and activated users can see links. Click Here To Register...]

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.