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

[EO] Exp Scaling (Super Easy)


kira423
 Share

Recommended Posts

Ok so this is like my 2nd tutorial and probably one of the simplest you will see me post. Basically I have modified the way EXP is calculated once a player is so many levels higher than the NPC that that player kills.

THERE ARE 2 WAYS OF DOING THIS

* NOTE THIS AFFECTS PARTY EXP SHARING TOO

Server Side only

**Way #1** (Only scales the Exp when the attacking player is so many levels higher than the NPC)

In **ModCombat** in **Sub PlayerAttackNpc** find
```
' Make sure we dont get less then 0
        If exp < 0 Then
            exp = 1
        End If
```
Under Add

```
'Make sure higher level players aren't camping on lower level creatures for EXP
    If NPC(npcNum).Level - 5 < GetPlayerLevel(attacker) Then
        exp = Round(NPC(npcNum).exp / GetPlayerLevel(attacker))
    End If
```
–------------------------------------------------------------

**Way #2** (Always scales your Exp)

In the same file and sub as above find

```
' Calculate exp to give attacker
        exp = Npc(npcNum).exp
```
change to

```
exp = Round(NPC(npcNum).exp / GetPlayerLevel(attacker))
```

Here is a little breakdown for those of you who have no idea what this code is saying, so you can modify it to your needs.

In the code (WAY #1) **- 5** signifies how many levels different the player has to be from the NPC in order for the EXP scaling to take effect. You can make this number whatever number you wish.

The exp is equal to the amount of exp that you put in for your NPC to have DIVIDED (/) by the attacking players level, meaning if you are level 100 and the NPC gives you 100 EXP you will only gain 1 EXP when you kill that creature.

If you are in a party the exp is divided as stated above, and then split between all of the party members.

I am not sure as to why I explained all of that as it doesn't take rocket science to know >.<
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...