Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Request] Show Damage/Defense/AtkSpeed/Crit


Kaymak
 Share

Recommended Posts

Hello, i have already search in the whole community but i found nothing sadly.

I'm using E.O 3.0 Engine, and i want to show the statistic of my stats like this:

![](http://flyff-wiki.webzen.com/images/8/8c/Stats2.png)

That meanst i want to show how much ATK i have how Much Critical in % Defense and attackspeed. Maybe someone can help me out there how to do this :)!
Thank you alot!
Link to comment
Share on other sites

> well we talked in skype but he is not responsing my messages anymore.. so i think there are 2 reasons
>
>  
>
> Reason 1: He took a shower slipped on the soap and died
>
> Reason 2: He dont want to help anymore :P

Reason 3: he didn't figure out how to?

Well if you still need help, pm me on skype: hisherwin

EO doesn't have a proper damage formula so you can't expect it to be accurate because EO use Randomize Damaging from 1 to Max Damage.. also the Defense attribute that was being use is Agility.. the Endurance Stats is for the HP :P
Link to comment
Share on other sites

for anyone who comes across this thread and wants to know how it got done, here it is: (It's all done client-side)

Step 1: Add a label in the picCharacter named "lblStatistics"

Step 2: Client-side

add these functions to the bottom of modGameLogic

>! ```
>! Function GetPlayerDamage(ByVal index As Long) As Long
If index <= 0 Or index > MAX_PLAYERS Then Exit Function
Dim weaponNum As Long

GetPlayerDamage = 0

' Check for subscript out of range
If IsPlaying(index) = False Or index <= 0 Or index > MAX_PLAYERS Then
Exit Function
End If
If GetPlayerEquipment(index, Weapon) > 0 Then
weaponNum = GetPlayerEquipment(index, Weapon)
GetPlayerDamage = 0.085 * 5 * GetPlayerStat(index, Strength) * Item(weaponNum).Data2 + (GetPlayerLevel(index) / 5)
Else
GetPlayerDamage = 0.085 * 5 * GetPlayerStat(index, Strength) + (GetPlayerLevel(index) / 5)
End If
End Function
>! Function GetPlayerBlockChance(ByVal index As Long) As Long

Dim i As Long
Dim n As Long

If index <= 0 Or index > MAX_PLAYERS Then Exit Function

GetPlayerBlockChance = 0

If GetPlayerEquipment(index, shield) > 0 Then
i = (GetPlayerStat(index, Stats.Endurance) \ 2) + (GetPlayerLevel(index) \ 2)
>! GetPlayerBlockChance = i
End If
End Function
>! Function GetPlayerCriticalHitChance(ByVal index As Long) As Long
>! Dim i As Long
Dim n As Long

If index <= 0 Or index > MAX_PLAYERS Then Exit Function

GetPlayerCriticalHitChance = 0

If GetPlayerEquipment(index, Weapon) > 0 Then
i = (GetPlayerStat(index, Stats.Strength) \ 2) + (GetPlayerLevel(index) \ 2)
>! GetPlayerCriticalHitChance = i
End If
End Function
>! Function GetPlayerProtection(ByVal index As Long) As Long
Dim Armor As Long
Dim Helm As Long
Dim Whetstone As Long ' New
Dim Boots As Long ' New
Dim Glove As Long ' New
Dim Ring As Long ' New
Dim Enchant As Long ' New
>! GetPlayerProtection = 0
>! ' Check for subscript out of range
If IsPlaying(index) = False Or index <= 0 Or index > Player_HighIndex Then
Exit Function
End If
>! Armor = GetPlayerEquipment(index, Equipment.Armor)
Helm = GetPlayerEquipment(index, Equipment.Helmet)
Whetstone = GetPlayerEquipment(index, Equipment.Whetstone) ' New
Boots = GetPlayerEquipment(index, Equipment.Boots) ' New
Glove = GetPlayerEquipment(index, Equipment.Glove) ' New
Ring = GetPlayerEquipment(index, Equipment.Ring) ' New
Enchant = GetPlayerEquipment(index, Equipment.Enchant) ' New
GetPlayerProtection = (GetPlayerStat(index, Stats.Endurance) \ 5)
>! If Armor > 0 Then
GetPlayerProtection = GetPlayerProtection + Item(Armor).Data2
End If
>! If Helm > 0 Then
GetPlayerProtection = GetPlayerProtection + Item(Helm).Data2
End If
' New
If Whetstone > 0 Then
GetPlayerProtection = GetPlayerProtection + Item(Whetstone).Data2
End If
>! If Boots > 0 Then
GetPlayerProtection = GetPlayerProtection + Item(Boots).Data2
End If
>! If Glove > 0 Then
GetPlayerProtection = GetPlayerProtection + Item(Glove).Data2
End If
>! If Ring > 0 Then
GetPlayerProtection = GetPlayerProtection + Item(Ring).Data2
End If
>! If Enchant > 0 Then
GetPlayerProtection = GetPlayerProtection + Item(Enchant).Data2
End If
' /New
End Function
>! Function GetPlayerVitalRegen(ByVal index As Long, ByVal Vital As Vitals) As Long
Dim i As Long
>! ' Prevent subscript out of range
If IsPlaying(index) = False Or index <= 0 Or index > MAX_PLAYERS Then
GetPlayerVitalRegen = 0
Exit Function
End If
>! Select Case Vital
Case HP
i = (GetPlayerStat(index, Stats.willpower) * 0.8) + 6
Case MP
i = (GetPlayerStat(index, Stats.willpower) / 4) + 12.5
End Select
>! If i < 2 Then i = 2
GetPlayerVitalRegen = i
End Function
>! ```

Step 3: still in modGameLogic search for "Sub gameLoop()" and in this part I wanted to use tmr500 but Kaymak only had tmr250 available (next to what I wanted)

let's refer to the timers as tmr### where ### is 500 or 250 depending on what you have, 500 being preferable

above "tmr### = Tick + ###" paste:

>! ```
>! If frmMain.picCharacter.Visible Then
Dim spd As Double
spd = 1
If GetPlayerEquipment(MyIndex, Weapon) > 0 Then
spd = Item(GetPlayerEquipment(MyIndex, Weapon)).Speed / 1000
End If

'update statistics
frmMain.lblStatistics.Caption = "Dmg Per Second: " & (GetPlayerDamage(MyIndex) / spd) & vbCrLf & "Dmg Reduction: " & GetPlayerProtection(MyIndex) & vbCrLf & _
"Critical Chance: " & GetPlayerCriticalHitChance(MyIndex) & "%" & vbCrLf & "Block Chance: " & GetPlayerBlockChance(MyIndex) & "%" & vbCrLf & _
"Health Regen: " & GetPlayerVitalRegen(MyIndex, HP)
End If
>! ```

And you're done, I know… simple !  ;D

If you come across any errors, please note that this was made 'especially' for Kaymak which used an engine that is based of EO 2.0, probably those errors could be because he has added stuff to it, like the extra equipment slots, and remember that the formulas might be changed, the formulas were 'ripped' from the server-side and changed a bit to give only the chance/etc

[EDIT] final result should look something like this:

![](http://s3.postimg.org/aux4jcthv/new_char_window.png)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...