'ViSro Project
'Created by GoneUp, Daxter
'(2012)
Namespace Functions
Public Class cWhitestats
Private ReadOnly weaponArray() As UInt64 = New UInt64() {1073741824, 33554432, 1048576, 32768, 1024, 32, 1}
Private ReadOnly equipementArray() As UInt64 = New UInt64() {33554432, 1048576, 32768, 1024, 32, 1}
Private ReadOnly shieldArray() As UInt64 = New UInt64() {33554432, 1048576, 32768, 1024, 32, 1}
Private ReadOnly accesoryArray() As UInt64 = New UInt64() {32, 1}
Public PerDurability As Byte
Public PerPhyRef As Byte
Public PerMagRef As Byte
Public PerPhyAtk As Byte
Public PerMagAtk As Byte
Public PerPhyDef As Byte
Public PerMagDef As Byte
Public PerBlock As Byte
Public PerCritical As Byte
Public PerAttackRate As Byte
Public PerParryRate As Byte
Public PerPhyAbs As Byte
Public PerMagAbs As Byte
Public Sub New()
End Sub
Public Sub New(ByVal ItemType As Type, ByVal ws As UInt64)
SetWhitestats(ItemType, ws)
End Sub
Public Function GetWhiteStats(ByVal ItemType As Type) As ULong
Dim ws As ULong = 0
Select Case ItemType
Case Type.Equipment
ws += Math.Round(31 * PerDurability / 100)
ws += Math.Round(31 * PerPhyRef / 100) * 32
ws += Math.Round(31 * PerMagRef / 100) * 1024
ws += Math.Round(31 * PerPhyDef / 100) * 32768
ws += Math.Round(31 * PerMagDef / 100) * 1048576
ws += Math.Round(31 * PerParryRate / 100) * 33554432
Case Type.Shield
ws += Math.Round(31 * PerDurability / 100)
ws += Math.Round(31 * PerPhyRef / 100) * 32
ws += Math.Round(31 * PerMagRef / 100) * 1024
ws += Math.Round(31 * PerBlock / 100) * 32768
ws += Math.Round(31 * PerPhyDef / 100) * 1048576
ws += Math.Round(31 * PerMagDef / 100) * 33554432
Case Type.Weapon
ws += Math.Round(31 * PerDurability / 100)
ws += Math.Round(31 * PerPhyRef / 100) * 32
ws += Math.Round(31 * PerMagRef / 100) * 1024
ws += Math.Round(31 * PerAttackRate / 100) * 32768
ws += Math.Round(31 * PerPhyAtk / 100) * 1048576
ws += Math.Round(31 * PerMagAtk / 100) * 33554432
ws += Math.Round(31 * PerCritical / 100) * 1073741824
Case Type.Accesory
ws += Math.Round(31 * PerPhyAbs / 100)
ws += Math.Round(31 * PerMagAbs / 100) * 32
End Select
Return ws
End Function
Public Sub SetWhitestats(ByVal ItemType As Type, ByVal ws As UInt64)
Dim round As Byte = 0
Dim array As ULong()
Select Case ItemType
Case Type.Weapon
array = weaponArray
Case Type.Shield
array = shieldArray
Case Type.Equipment
array = equipementArray
Case Type.Accesory
array = equipementArray
End Select
Dim results As Byte() = New Byte(array.Length) {}
Do While (round < array.Length)
Dim counter As Int32 = 31
Do While (counter <> 0)
Dim value As UInt64 = (Convert.ToUInt64(counter) * array(round))
If (ws >= value) Then
results(round) = Convert.ToInt32(Math.Round(((Convert.ToDouble(counter) / 31) * 100)))
ws = (ws - value)
Exit Do
End If
counter -= 1
Loop
round += 1
Loop
Select Case ItemType
Case Type.Weapon
PerCritical = results(0)
PerMagAtk = results(1)
PerPhyAtk = results(2)
PerAttackRate = results(3)
PerMagRef = results(4)
PerPhyRef = results(5)
PerDurability = results(6)
Case Type.Shield
PerMagDef = results(0)
PerPhyRef = results(1)
PerBlock = results(2)
PerMagRef = results(3)
PerPhyRef = results(4)
PerDurability = results(5)
Case Type.Equipment
PerParryRate = results(0)
PerMagDef = results(1)
PerPhyDef = results(2)
PerMagRef = results(3)
PerPhyRef = results(4)
PerDurability = results(5)
Case Type.Accesory
PerMagAbs = results(0)
PerPhyAbs = results(1)
End Select
End Sub
Public Function GetItemType(ByVal ClassB As Byte) As Type
Select Case ClassB
Case 1, 2, 3, 9, 10, 11 'Equipment
Return Type.Equipment
Case 4
Return Type.Shield
Case 6
Return Type.Weapon
Case 5, 12
Return Type.Accesory
End Select
Return Nothing
End Function
Enum Type
Weapon
Shield
Accesory
Equipment
End Enum
End Class
End Namespace
And love to see people making great stuff in vb.net (against saying 99% of population that vb.net sucks)
'ViSro Project
'Created by GoneUp, Daxter
'(2012)
Namespace Functions
Public Class cWhitestats
Private ReadOnly weaponArray() As UInt64 = New UInt64() {1073741824, 33554432, 1048576, 32768, 1024, 32, 1}
Private ReadOnly equipementArray() As UInt64 = New UInt64() {33554432, 1048576, 32768, 1024, 32, 1}
Private ReadOnly shieldArray() As UInt64 = New UInt64() {33554432, 1048576, 32768, 1024, 32, 1}
Private ReadOnly accesoryArray() As UInt64 = New UInt64() {32, 1}
Public PerDurability As Byte
Public PerPhyRef As Byte
Public PerMagRef As Byte
Public PerPhyAtk As Byte
Public PerMagAtk As Byte
Public PerPhyDef As Byte
Public PerMagDef As Byte
Public PerBlock As Byte
Public PerCritical As Byte
Public PerAttackRate As Byte
Public PerParryRate As Byte
Public PerPhyAbs As Byte
Public PerMagAbs As Byte
Public Sub New()
End Sub
Public Sub New(ByVal ItemType As Type, ByVal ws As UInt64)
SetWhitestats(ItemType, ws)
End Sub
Public Function GetWhiteStats(ByVal ItemType As Type) As ULong
Dim ws As ULong = 0
Select Case ItemType
Case Type.Equipment
ws += Math.Round(31 * PerDurability / 100)
ws += Math.Round(31 * PerPhyRef / 100) * 32
ws += Math.Round(31 * PerMagRef / 100) * 1024
ws += Math.Round(31 * PerPhyDef / 100) * 32768
ws += Math.Round(31 * PerMagDef / 100) * 1048576
ws += Math.Round(31 * PerParryRate / 100) * 33554432
Case Type.Shield
ws += Math.Round(31 * PerDurability / 100)
ws += Math.Round(31 * PerPhyRef / 100) * 32
ws += Math.Round(31 * PerMagRef / 100) * 1024
ws += Math.Round(31 * PerBlock / 100) * 32768
ws += Math.Round(31 * PerPhyDef / 100) * 1048576
ws += Math.Round(31 * PerMagDef / 100) * 33554432
Case Type.Weapon
ws += Math.Round(31 * PerDurability / 100)
ws += Math.Round(31 * PerPhyRef / 100) * 32
ws += Math.Round(31 * PerMagRef / 100) * 1024
ws += Math.Round(31 * PerAttackRate / 100) * 32768
ws += Math.Round(31 * PerPhyAtk / 100) * 1048576
ws += Math.Round(31 * PerMagAtk / 100) * 33554432
ws += Math.Round(31 * PerCritical / 100) * 1073741824
Case Type.Accesory
ws += Math.Round(31 * PerPhyAbs / 100)
ws += Math.Round(31 * PerMagAbs / 100) * 32
End Select
Return ws
End Function
Public Sub SetWhitestats(ByVal ItemType As Type, ByVal ws As UInt64)
Dim round As Byte = 0
Dim array As ULong()
Select Case ItemType
Case Type.Weapon
array = weaponArray
Case Type.Shield
array = shieldArray
Case Type.Equipment
array = equipementArray
Case Type.Accesory
array = equipementArray
End Select
Dim results As Byte() = New Byte(array.Length) {}
Do While (round < array.Length)
Dim counter As Int32 = 31
Do While (counter <> 0)
Dim value As UInt64 = (Convert.ToUInt64(counter) * array(round))
If (ws >= value) Then
results(round) = Convert.ToInt32(Math.Round(((Convert.ToDouble(counter) / 31) * 100)))
ws = (ws - value)
Exit Do
End If
counter -= 1
Loop
round += 1
Loop
Select Case ItemType
Case Type.Weapon
PerCritical = results(0)
PerMagAtk = results(1)
PerPhyAtk = results(2)
PerAttackRate = results(3)
PerMagRef = results(4)
PerPhyRef = results(5)
PerDurability = results(6)
Case Type.Shield
PerMagDef = results(0)
PerPhyRef = results(1)
PerBlock = results(2)
PerMagRef = results(3)
PerPhyRef = results(4)
PerDurability = results(5)
Case Type.Equipment
PerParryRate = results(0)
PerMagDef = results(1)
PerPhyDef = results(2)
PerMagRef = results(3)
PerPhyRef = results(4)
PerDurability = results(5)
Case Type.Accesory
PerMagAbs = results(0)
PerPhyAbs = results(1)
End Select
End Sub
Public Function GetItemType(ByVal ClassB As Byte) As Type
Select Case ClassB
Case 1, 2, 3, 9, 10, 11 'Equipment
Return Type.Equipment
Case 4
Return Type.Shield
Case 6
Return Type.Weapon
Case 5, 12
Return Type.Accesory
End Select
Return Nothing
End Function
Enum Type
Weapon
Shield
Accesory
Equipment
End Enum
End Class
End Namespace
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)
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?
I can recognize your codes at first look with var names, you always use cWhiteStats sWhiteStats and so on c and s are classics for GoneUp :P (since nclientless)
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.Weapon, variance) Main.Log(stat.PerCritical)
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.Weapon, variance)
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.
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
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.
[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..
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.