Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Add-On]Exp rate per Rebirth

Status
Not open for further replies.
Joined
Feb 27, 2010
Messages
12
Reaction score
6
I decided to help out the community since I am quitting my server. (Aka: My first release on ragezone)

This is for high rate server who want EXP rate to decrease for each Rebirth they do.

Sorry about the messiness, My coding is always messy :glare:

Add this in your MapleCharacter.Java, Inside setRates()

PHP:
int newexprate = ServerConstants.EXP_RATE;
        int numReborns = getReborns();
        int looper = 0;
        while (numReborns - 1000 > 0){
                numReborns -= 1000;
                looper++;
            }
        int rb1000 = 1000;

        if (looper == 0){ // 1-1000rb
            while ((numReborns - 5) >= 0) {
                numReborns -= 5;
            newexprate = (newexprate - 1);
            }
            }
        if (looper == 1){ // 1000-2000 rb
            while ((rb1000 - 5) >= 0) {
                rb1000 -= 5;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;
            while ((numReborns - 10) >= 0) {
                numReborns -= 10;
            newexprate = (newexprate - 1);
            }
            }
        if (looper == 2){ // 2000-3000rb
            while ((rb1000 - 5) >= 0) {
            rb1000 -= 5;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;

            while ((rb1000 - 10) >= 0) {
            rb1000 -= 10;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;

            while ((numReborns - 100) >= 0) {
            numReborns -= 100;
            newexprate = (newexprate - 1);
            }
            this.dropRate = 2;
            }

            if (looper >= 3){ // 3000rb+
                while ((rb1000 - 5) >= 0) { // 1-1000
                rb1000 -= 5;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;
                while ((rb1000 - 10) >= 0) { // 1000-2000
                rb1000 -= 10;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;
                while ((rb1000 - 20) >= 0) { // 3000-4000
                rb1000 -= 20;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;

                while ((numReborns - 50) >= 0 && newexprate >= 50) {//4000+
                numReborns -= 50;
                newexprate = (newexprate - 1);
                }
                this.dropRate = 1;
                }
        if (newexprate < 50){
            newexprate = 50;
        }
        this.expRate = newexprate;
        message("Your Rates are currently :" + getRates());
And Don't forget to add
PHP:
setRates();
into your
PHP:
doReborn()
Credits : Me

Don't forget to thank me if this helped :]
 
Last edited by a moderator:
Legendary Battlemage
Member
Joined
Dec 13, 2010
Messages
649
Reaction score
140
Re: -Exp rate per Rebirth

LOLOL at

"credits : me"

Good job tho, i dont need it but its nice
 
Initiate Mage
Joined
Jan 1, 2011
Messages
9
Reaction score
0
Re: -Exp rate per Rebirth

Thx i was waiting for this :p
 
Joined
Feb 27, 2010
Messages
12
Reaction score
6
Re: -Exp rate per Rebirth

LOLOL at

"credits : me"

Good job tho, i dont need it but its nice

What's so funny about the credits?

I coded it for my own server but I don't need it anymore.

I usually keep my source private, but this is the first time releasing it :]
 
Last edited:
Experienced Elementalist
Joined
Nov 11, 2007
Messages
208
Reaction score
18
Re: -Exp rate per Rebirth

I remembered I did this on an old source a long time ago, I wanted to test out my coding ability and well, they're still horrible now.
 
Elite Diviner
Member
Joined
Sep 25, 2008
Messages
457
Reaction score
37
Re: -Exp rate per Rebirth

Code:
int newexprate = ServerConstants.EXP_RATE;
        int numReborns = getReborns();
        int looper = 0;
        while (numReborns - 1000 > 0){
                numReborns -= 1000;
                looper++;
            }
        int rb1000 = 1000;
             Switch(looper)
            { 
             case 0;
             while ((numReborns - 5) >= 0) {
             numReborns -= 5;
             newexprate = (newexprate - 1);
             break:
             case 1;
             while ((rb1000 - 5) >= 0) {
                rb1000 -= 5;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;
            while ((numReborns - 10) >= 0) {
                numReborns -= 10;
            newexprate = (newexprate - 1);
            }
            break:
            case 2;
            while ((rb1000 - 5) >= 0) {
            rb1000 -= 5;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;

            while ((rb1000 - 10) >= 0) {
            rb1000 -= 10;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;

            while ((numReborns - 100) >= 0) {
            numReborns -= 100;
            newexprate = (newexprate - 1);
            }
            this.dropRate = 2;
            break:
            case 3;
                while ((rb1000 - 5) >= 0) { // 1-1000
                rb1000 -= 5;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;
                while ((rb1000 - 10) >= 0) { // 1000-2000
                rb1000 -= 10;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;
                while ((rb1000 - 20) >= 0) { // 3000-4000
                rb1000 -= 20;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;

                while ((numReborns - 50) >= 0 && newexprate >= 50) {//4000+
                numReborns -= 50;
                newexprate = (newexprate - 1);
                }
                this.dropRate = 1;
                break:
}
        if (newexprate < 50){
            newexprate = 50;
        }
        this.expRate = newexprate;
        message("Your Rates are currently :" + getRates());

LolWhut


If you're gonna do it with if statements rather than a switch, atleast use else if...
lolololol
 
Last edited:
Joined
Feb 27, 2010
Messages
12
Reaction score
6
Re: -Exp rate per Rebirth

Code:
int newexprate = ServerConstants.EXP_RATE;
        int numReborns = getReborns();
        int looper = 0;
        while (numReborns - 1000 > 0){
                numReborns -= 1000;
                looper++;
            }
        int rb1000 = 1000;
             Switch(looper)
            { 
             case 0;
             while ((numReborns - 5) >= 0) {
             numReborns -= 5;
             newexprate = (newexprate - 1);
             break:
             case 1;
             while ((rb1000 - 5) >= 0) {
                rb1000 -= 5;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;
            while ((numReborns - 10) >= 0) {
                numReborns -= 10;
            newexprate = (newexprate - 1);
            }
            break:
            case 2;
            while ((rb1000 - 5) >= 0) {
            rb1000 -= 5;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;

            while ((rb1000 - 10) >= 0) {
            rb1000 -= 10;
            newexprate = (newexprate - 1);
            }
            rb1000 = 1000;

            while ((numReborns - 100) >= 0) {
            numReborns -= 100;
            newexprate = (newexprate - 1);
            }
            this.dropRate = 2;
            break:
            case 3;
                while ((rb1000 - 5) >= 0) { // 1-1000
                rb1000 -= 5;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;
                while ((rb1000 - 10) >= 0) { // 1000-2000
                rb1000 -= 10;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;
                while ((rb1000 - 20) >= 0) { // 3000-4000
                rb1000 -= 20;
                newexprate = (newexprate - 1);
                }
                rb1000 = 1000;

                while ((numReborns - 50) >= 0 && newexprate >= 50) {//4000+
                numReborns -= 50;
                newexprate = (newexprate - 1);
                }
                this.dropRate = 1;
                break:
}
        if (newexprate < 50){
            newexprate = 50;
        }
        this.expRate = newexprate;
        message("Your Rates are currently :" + getRates());

LolWhut


If you're gonna do it with if statements rather than a switch, atleast use else if...
lolololol

Yeah, I know... I'm a very lazy/messy coder.

but I had a different idea in mind while I was coding it but I changed my mind during it. :):
 
Junior Spellweaver
Joined
Oct 31, 2008
Messages
149
Reaction score
45
Re: -Exp rate per Rebirth

On mine it just lowers your experience rate by 45% for each rebirth you have. It's fairly evil, especially with a base exp rate of 40x. :D
 
Junior Spellweaver
Joined
Oct 12, 2010
Messages
152
Reaction score
39
Re: -Exp rate per Rebirth

Anyway , good for the first release !!! Good luck :D:
 
Status
Not open for further replies.
Back
Top