ShieldBlock Algorithm

Hello is anyone on the block algorithm for shield??

which makes it possible to block? for example, gives a 25% chance to block is 25%?

Most of the formulas for EO are either random, do nothing or are missing. You will need VB6 to edit the source code to change the values. I do believe there’s a few posts regarding adding block,etc in the tutorial section.

Here’s part of the current “Block Formula”

! Public Function CanPlayerBlock(ByVal index As Long) As Boolean
! Dim rate As Long
! Dim rndNum As Long
! CanPlayerBlock = False
! rate = 0
! ’ TODO : make it based on shield lulz
! End Function

You can add something like


CanPlayerBlock = False

if RAND(1, 100) < 26 then and GetPlayerEquipment(index, shield) > 0 then CanPlayerBlock = true

…… http://www.touchofdeathforums.com/community/index.php?/topic/120075-eo-adding-real-defence-server-only/

this will create “real defence” aka hard to hit things might need adjusting . >.>

You can add something like


CanPlayerBlock = False

if RAND(1, 100) < 26 then and GetPlayerEquipment(index, shield) > 0 then CanPlayerBlock = true

doesn’t the first return statement cause control to exit the sub? (This means that the if statement might never be executed)

Remember that this is VB6. A function will still go as far as it can before it truly returns the value. Come to think of it, I don’t know what the default value of a boolean variable is (probably false) before its set by something. If it is by default false, then having that line in the function is redundant.

Dark this is system for all armor i think abiut only % to block

Log in to reply