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

ShieldBlock Algorithm


Alerd
 Share

Recommended Posts

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
Link to comment
Share on other sites

> 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)
Link to comment
Share on other sites

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.
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...