Dynamic Exp Rate

Newbie Spellweaver
Joined
Apr 20, 2015
Messages
46
Reaction score
0
I'd like to change a littlee thing in my server,
to make it fair for non mobbing jobs i'd like to make my exp rate relative to the monster
level.
which means if a monster is on higher lvl than the character by 5+ levels he will get 2X exp rate
if by 10+ levels he will get 3X exp rate,
and if a monster is lower than the character level he will get 0.8x exp rate from the monster and such...
my exp rate on the server is 15 , so if a player is level 30 and the monster 43 he will get 45X exp rate

If someone could just write a little code for netbeans and tell me where to put it it will be much
appreceated!

(server based on dynasty repack)

Someone gave me this :

if(mob.getLevel() > playerLevel)
multiplier = 1.2
else if(mob.getLevel() < playerLevel)
multiplier = 0.8
else
multiplier = 1

int exp = (int) (mob.getExp() * multiplier)

but when I put it in netbeans I get an error for the first line
 
Last edited:
Find the function where exp is gained upon killing a mob, and access the killed mob object within the source, get it's level and compare to the player's level.
 
Upvote 0
Find the function where exp is gained upon killing a mob, and access the killed mob object within the source, get it's level and compare to the player's level.
I'm really bad at it , could you please guide me through it? I just need a stable code to put somewhere in netbeans, pretty sure it will be
enough
 
Upvote 0
Find the function where exp is gained upon killing a mob, and access the killed mob object within the source, get it's level and compare to the player's level.


if(mob.getLevel() > playerLevel)
multiplier = 1.2
else if(mob.getLevel() < playerLevel)
multiplier = 0.8
else
multiplier = 1

int exp = (int) (mob.getExp() * multiplier)

How can I use this in my netbeans ? , where to put it the first line always get's an error
 
Last edited:
Upvote 0
if(mob.getLevel() > playerLevel)
multiplier = 1.2
else if(mob.getLevel() < playerLevel)
multiplier = 0.8
else
multiplier = 1

int exp = (int) (mob.getExp() * multiplier)

How can I use this in my netbeans ? , where to put it the first line always get's an error

again.. people are not going to spoonfeed you. For starters, that is not even valid code and copy-pasting it will only throw errors. You're going to need a basic understanding of programming to see why that code won't work, and looking around OdinMS for where the code is needed to be placed.
 
Upvote 0
Back