ilsu333 Posted January 27, 2011 Author Share Posted January 27, 2011 Hey,i'm new to Eclipse Origins,and i need you guys to help me with something…I made the map,added a monster,tested the existing classes against the monster (NPC),everything went fine,then i made a new class and it seems to be bugged,i can attack the monster,the demage works fine against him but when he attacks me back i die instantly (and it happends all the time),beside that my hp and mp are 100/100 and even if my char levels up they remain the same (made him level 100 but the hp and mp were the same)So can any1 help me?I got VB6,tryed to find something about classes there but i diden't find anything,please help me and thx in advance... Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 'GetPlayerMaxVital' in the server. You need to add a case for your new class. Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2011 Share Posted January 27, 2011 Can you just copy and paste one of the other character classes code and change the appropriate values? Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 Of course. I'll be adding a 'Case Else' to the next version so that all new classes automatically use that. You can then add a specific formula for them if you want. Link to comment Share on other sites More sharing options...
ilsu333 Posted January 27, 2011 Author Share Posted January 27, 2011 @Robin:> 'GetPlayerMaxVital' in the server. You need to add a case for your new class.The thing is…Im pretty newb,I installed vb6 for the first time in my life (I'm a pixel artist,never been in to programing) and I dunno how to use it properly...Can you please give me more details? :sad: because I can't find the "GetPlayerMaxVital" for any classes and beside that I renamed all the clases from the class.ini file and if I search for the new names I can't find them :(Edit...I think I found them :D ,thx alot dudeEdit again...Nope still the same...this its what i did:"Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long If index > MAX_PLAYERS Then Exit Function Select Case Vital Case HP Select Case GetPlayerClass(index) Case 1 ' Zaron Clan GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 15 + 150 Case 2 ' Buho Clan GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 5 + 65 Case 2 ' Rima Clan GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 5 + 65 End Select Case MP Select Case GetPlayerClass(index) Case 1 ' Zaron Clan GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 5 + 25 Case 2 ' Buho Clan GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 30 + 85 Case 3 ' Rima Clan GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 30 + 85 End Select"Changed the classes in ini folder to "Zaron Clan,Rima Clan and Byho Clan"...What am i doing wrong? :( Link to comment Share on other sites More sharing options...
xsdsdds Posted January 27, 2011 Share Posted January 27, 2011 I did all the cases, but still die in one hit.Edit: I've done the same thing as above too. Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2011 Share Posted January 27, 2011 Here is the original code you could go by if its at all usefull to you:```' ################################' ## Basic Calculations ##' ################################Function GetPlayerMaxVital(ByVal Index As Long, ByVal Vital As Vitals) As Long If Index > MAX_PLAYERS Then Exit Function Select Case Vital Case HP Select Case GetPlayerClass(Index) Case 1 ' Warrior GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Endurance) / 2)) * 15 + 150 Case 2 ' Mage GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Endurance) / 2)) * 5 + 65 End Select Case MP Select Case GetPlayerClass(Index) Case 1 ' Warrior GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Intelligence) / 2)) * 5 + 25 Case 2 ' Mage GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Intelligence) / 2)) * 30 + 85 End Select End Select``` Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 @ilsu333:> -snip-You didn't change the case in the health. You have "case 2" twice. It needs to be "case 3". Link to comment Share on other sites More sharing options...
xsdsdds Posted January 27, 2011 Share Posted January 27, 2011 So, uh, whats wrong with this:Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long If index > MAX_PLAYERS Then Exit Function Select Case Vital Case HP Select Case GetPlayerClass(index) Case 1 ' Knight GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 15 + 150 Case 2 ' Wizard GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 10 + 65 Case 3 ' Thief GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 10 + 65 Case 4 ' Warlock GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 10 + 65 End Select Case MP Select Case GetPlayerClass(index) Case 1 ' Knight GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 5 + 25 Case 2 ' Wizard GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 30 + 85 Case 3 ' Thief GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 5 + 25 Case 4 ' Warlock GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 10 + 45 End Select End SelectEnd Function Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 Nothing. Link to comment Share on other sites More sharing options...
xsdsdds Posted January 27, 2011 Share Posted January 27, 2011 So why doesn't it work? Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 Did you compile your server? Link to comment Share on other sites More sharing options...
xsdsdds Posted January 27, 2011 Share Posted January 27, 2011 What program can compile things? Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 @xsdsdds:> What program can compile things?VB6. Link to comment Share on other sites More sharing options...
ilsu333 Posted January 27, 2011 Author Share Posted January 27, 2011 @Robin:> You didn't change the case in the health. You have "case 2" twice. It needs to be "case 3".Fixed that and still doesn't work :( Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 @Robin:> Did you compile your server? Link to comment Share on other sites More sharing options...
ilsu333 Posted January 27, 2011 Author Share Posted January 27, 2011 @ilsu333:> Fixed that and still doesn't work :(edit:When i converted the vb6 file in to exe it say"d "variabiles are not defined" (or something like that) and i changed them all to 1 = 1,is that ok? :-S Link to comment Share on other sites More sharing options...
Yxxe Posted January 27, 2011 Share Posted January 27, 2011 @ilsu333:> "variabiles are not defined"That means you need to declare your variables. Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 @ilsu333:> edit:When I converted the vb6 file in to exe it say"d "variabiles are not defined" (or something like that) and I changed them all to 1 = 1,is that ok? :-SObviously not.Go read a tutorial on the basics of VB6. Link to comment Share on other sites More sharing options...
sirramza Posted January 27, 2011 Share Posted January 27, 2011 Or you can replace this:> ' ################################> ' ## Basic Calculations ##> ' ################################> > Function GetPlayerMaxVital(ByVal Index As Long, ByVal Vital As Vitals) As Long> If Index > MAX_PLAYERS Then Exit Function> Select Case Vital> Case HP> Select Case GetPlayerClass(Index)> Case 1 ' Warrior> GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Endurance) / 2)) * 15 + 150> Case 2 ' Mage> GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Endurance) / 2)) * 5 + 65> End Select> Case MP> Select Case GetPlayerClass(Index)> Case 1 ' Warrior> GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Intelligence) / 2)) * 5 + 25> Case 2 ' Mage> GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Intelligence) / 2)) * 30 + 85> End Select> End SelectWith this: (easy)> ' ################################> ' ## Basic Calculations ##> ' ################################> > Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long> If index > MAX_PLAYERS Then Exit Function> Select Case Vital> Case HP> GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Endurance) / 2)) * 10 + 105> > Case MP> GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 15 + 50> End Select> End Function Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 You can but that removes the option of having different classes with different vital calculations which is pretty much needed for balancing. Link to comment Share on other sites More sharing options...
sirramza Posted January 27, 2011 Share Posted January 27, 2011 yep I know, but is an easy and fast solution to adding classeshe can change it later, and add more cases anyway Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 I don't see how it's any more easy or fast than my solution of adding a Case Else. >_>You make it so new classes don't spawn without any health as well as keeping the original classes. Link to comment Share on other sites More sharing options...
ilsu333 Posted January 27, 2011 Author Share Posted January 27, 2011 @Robin:> Obviously not.> > Go read a tutorial on the basics of VB6.well i saved them like that (1 =1) and the server works fine i guess…I hope it won't mess up my server later :-S Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 @ilsu333:> well I saved them like that (1 =1) and the server works fine I guess…I hope it won't mess up my server later :-SEditing random shit that you don't know about is never a good idea. If it was something else it was something else for a reason. 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