Alerd Posted March 24, 2013 Author Share Posted March 24, 2013 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%? Link to comment Share on other sites More sharing options...
Agoraphobic Posted March 24, 2013 Share Posted March 24, 2013 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 More sharing options...
Matt Posted March 24, 2013 Share Posted March 24, 2013 You can add something like```CanPlayerBlock = Falseif RAND(1, 100) < 26 then and GetPlayerEquipment(index, shield) > 0 then CanPlayerBlock = true``` Link to comment Share on other sites More sharing options...
DMF Posted March 24, 2013 Share Posted March 24, 2013 ….. 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 . >.> Link to comment Share on other sites More sharing options...
abhi2011 Posted March 25, 2013 Share Posted March 25, 2013 > 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 More sharing options...
Matt Posted March 25, 2013 Share Posted March 25, 2013 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 More sharing options...
Alerd Posted March 25, 2013 Author Share Posted March 25, 2013 Dark this is system for all armor i think abiut only % to block Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now