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

New class bug?


ilsu333
 Share

Recommended Posts

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

@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 dude
Edit 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

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

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

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 Select

With 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

@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 :-S

Editing 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

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