abhi2011 Posted October 27, 2012 Author Share Posted October 27, 2012 This is a vital generator that was made using [Richy's Experience Generator for EO](http://www.touchofdeathforums.com/community/index.php?/topic/129646-eo-experience-generator/) as a base. Credits go to him for making the base and to me for doing most of the edits.The code for the Generator can be found as an attachment. But for it to work a few source edits have to be made. Do these edits with VB6SERVER SIDE modTypesBelow```Public Options As OptionsRec```Add this```Public VitalGen As GenRec```In the same mod add anywhere```Public Type GenRecHealth(1 To Max_players) As LongMana(1 To Max_players) As LongEnd Type```In modDatabase add these anywhere```Public Sub LoadVitalFile(ByVal File As Byte)Dim filename As StringDim F As LongSelect Case FileCase 1Call CheckVitalFile(File)filename = App.path & "\data\health" & ".dat"F = FreeFileOpen filename For Binary As #FGet #F, , HealthGen.HealthClose #FCase 2Call CheckVitalFile(File)filename = App.path & "\data\mana" & ".dat"F = FreeFileOpen filename For Binary As #FGet #F, , ManaGen.ManaClose #FEnd SelectEnd SubPublic Sub CheckVitalFile(ByVal File As Byte)Select Case FileCase 1If Not FileExist("\data\health.dat") ThenCall SaveVitalFile(File)End IfCase 2If Not FileExist("\data\mana.dat") ThenCall SaveVitalFile(File)End IfEnd SelectEnd SubPublic Sub SaveVitalFile(ByVal File As Byte)Dim filename As StringDim F As LongSelect Case FileCase 1filename = App.path & "\data\health" & ".dat"F = FreeFileOpen filename For Binary As #FPut #F, , HealthGen.HealthClose #FCase 2filename = App.path & "\data\mana" & ".dat"F = FreeFileOpen filename For Binary As #FPut #F, , ManaGen.ManaEnd SelectEnd Sub```In the sub```Private Sub LoadGameData()```Before end sub add this```Call SetStatus("Loading Vitals Sheet...")Call LoadVitalFile(1)Call LoadVitalFile(2)```modCombatReplace the function```Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long```With this```Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As LongIf index > MAX_PLAYERS Then Exit FunctionSelect Case VitalCase HPSelect Case GetPlayerClass(index)Case 1 ' WarriorGetPlayerMaxVital = HealthGen.Health(GetPlayerLevel(index))Case 2 ' MageGetPlayerMaxVital = HealthGen.Health(GetPlayerLevel(index))Case Else ' Anything else - Warrior by defaultGetPlayerMaxVital = HealthGen.Health(GetPlayerLevel(index))End SelectCase MPSelect Case GetPlayerClass(index)Case 1 ' WarriorGetPlayerMaxVital = ManaGen.Mana(GetPlayerLevel(index))Case 2 ' MageGetPlayerMaxVital = ManaGen.Mana(GetPlayerLevel(index))Case Else ' Anything else - Warrior by defaultGetPlayerMaxVital = ManaGen.Health(GetPlayerLevel(index))End SelectEnd SelectEnd Function``` Link to comment Share on other sites More sharing options...
adisorn Posted October 27, 2012 Share Posted October 27, 2012 Is it can generate spells vit?Thanks Link to comment Share on other sites More sharing options...
tslusny Posted October 27, 2012 Share Posted October 27, 2012 No it is making Vitals (like HP, MP) for each level Link to comment Share on other sites More sharing options...
abhi2011 Posted October 28, 2012 Author Share Posted October 28, 2012 I suppose he meant does it make the MP. Link to comment Share on other sites More sharing options...
clark Posted October 28, 2012 Share Posted October 28, 2012 Abhi , i can't make it work on EA 3.0.17 (the one you sent me does unrecovarable dx8 error) please take a look at it :/ Link to comment Share on other sites More sharing options...
abhi2011 Posted October 28, 2012 Author Share Posted October 28, 2012 Yea overflow which check it out ASAP. 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