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!

v83 Rebirth System

Elite Diviner
Joined
Mar 30, 2013
Messages
456
Reaction score
42
First, navigate to your MapleCharacter, and search for 'saveToDB'

On the line that starts off with :

Code:
ps = con.prepareStatement("UPDATE characters SET level = ?, fame = ?, str = ?, dex = ?, luk = ?, `int` = ?, exp = ?, gachaexp = ?, hp = ?, mp = ?, maxhp = ?, maxmp = ?, sp = ?, ap = ?, gm = ?, skincolor = ?, gender = ?, job = ?, hair = ?, face = ?, map = ?, meso = ?, hpMpUsed = ?, spawnpoint = ?, party = ?, buddyCapacity = ?, messengerid = ?, messengerposition = ?, mountlevel = ?, mountexp = ?, mounttiredness= ?, equipslots = ?, useslots = ?, setupslots = ?, etcslots = ?,  monsterbookcover = ?, vanquisherStage = ?, dojoPoints = ?, lastDojoStage = ?, finishedDojoTutorial = ?, vanquisherKills = ?, matchcardwins = ?, matchcardlosses = ?, matchcardties = ?, omokwins = ?, omoklosses = ?, omokties = ? WHERE id = ?", Statement.RETURN_GENERATED_KEYS);

add a

Code:
, reborns = ?

after omokties = ?.


Then on

Code:
ps = con.prepareStatement("INSERT INTO characters (level, fame, str, dex, luk, `int`, exp, gachaexp, hp, mp, maxhp, maxmp, sp, ap, gm, skincolor, gender, job, hair, face, map, meso, hpMpUsed, spawnpoint, party, buddyCapacity, messengerid, messengerposition, mountlevel, mounttiredness, mountexp, equipslots, useslots, setupslots, etcslots, monsterbookcover, vanquisherStage, dojopoints, lastDojoStage, finishedDojoTutorial, vanquisherKills, matchcardwins, matchcardlosses, matchcardties, omokwins, omoklosses, omokties, accountid, name, world) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS);

add a
Code:
, ?

to the end of it and a

Code:
, reborns)

after
Code:
, world,
and before
Code:
)VALUES (?,

Find out how many question marks you have, then for the last one, put the number in the following:

Code:
ps.setnt(49,reborns);

Where 49 is your final number. You enter that in the respective place, after

Code:
ps.setInt(47, omokties);

You then need to enter the command for the actual rebirth, which is


Code:
        } else if (sub[0].equals("rebirtha")) {
            if (chr.getLevel() > 199) {
                chr.setReborns(chr.getReborns() + 1);
                chr.setLevel(1);
                chr.setExp(0);
                chr.setJob(MapleJob.LEGEND);
                chr.updateSingleStat(MapleStat.LEVEL, 1);
                chr.updateSingleStat(MapleStat.JOB, 0);
                chr.updateSingleStat(MapleStat.EXP, 0);
            }
        } else if (sub[0].equals("rebirthn")) {
            if (chr.getLevel() > 199) {
                chr.setReborns(chr.getReborns() + 1);
                chr.setLevel(1);
                chr.setExp(0);
                chr.setJob(MapleJob.NOBLESSE);
                chr.updateSingleStat(MapleStat.LEVEL, 1);
                chr.updateSingleStat(MapleStat.JOB, 0);
                chr.updateSingleStat(MapleStat.EXP, 0);
            }
        } else if (sub[0].equals("rebirthe")) {
            if (chr.getLevel() > 199) {
                chr.setReborns(chr.getReborns() + 1);
                chr.setLevel(1);
                chr.setExp(0);
                chr.setJob(MapleJob.BEGINNER);
                chr.updateSingleStat(MapleStat.LEVEL, 1);
                chr.updateSingleStat(MapleStat.JOB, 0);
                chr.updateSingleStat(MapleStat.EXP, 0);
            }


This is assuming that you already have the function setReborns, if not, you need to navigate to client.MapleCharacter and add this anywhere in there:

Code:
    public void setReborns(int r) {
        this.reborns = r;
    }

And add this to the top under public clas MapleCharacter extends AbstractAnimatedMapleMapObject {

Code:
private int reborns;

You know need to add the column reborns to the SQL if not already there.

Run this in your SQL, replacing MoopleDevRev120 with whatever DB you have:

Code:
USE MoopleDevRev120;


ALTER TABLE `characters` ADD `reborns` int(11) NOT NULL default '0';


Now you need to go in, type !level 200, then type @Rebirtha, then @save to save that rebirth, then run over to your SQL and make sure the value has updated. The commands for @save and @level 200 will be below;





@save

Code:
        } else if (sub[0].equals("save")) {
            chr.saveToDB(true);
            chr.message("Saved.");


@level [number]

Code:
        } else if (sub[0].equals("level")) {
            chr.setLevel(Integer.parseInt(sub[1]));
            chr.gainExp(-chr.getExp(), false, false);
            chr.updateSingleStat(MapleStat.LEVEL, chr.getLevel());



I set those both to player commands incase someone does not know how to make themselves gm; sounds stupid but ive seen it.



If I happen to left something out, please let me know so I may include this, but this was the most basic rebirth system I could think of. Credits to whoever created @level command, as I had found it already in the source, so maybe MoopleDev?
 
Last edited:
Skilled Illusionist
Joined
Jul 19, 2012
Messages
313
Reaction score
11
I hope you don't just rip it off a source that has it fully coded and release them here. this is something all source already have. nonetheless good job.
 
Skilled Illusionist
Joined
Jun 23, 2012
Messages
349
Reaction score
144
You should just take all these releases and compile them into one thread, if you do release more.
On topic, this is probably in every source you look at now, including the lowrates and clean sources.
As bbhing98 said above, if you ripped this off a source, theres really no accomplishment here.
If you did however, code this on your own, good job on trying!
 
Elite Diviner
Joined
Mar 30, 2013
Messages
456
Reaction score
42
I just took a Mooplerev120, and deleted everything I could think of that a normal high-rate server would have, and started from scratch. And I probably will not as the rest is mostly just commands, npc's, and some quest's.
 
Newbie Spellweaver
Joined
Dec 23, 2010
Messages
54
Reaction score
4
I just took a Mooplerev120, and deleted everything I could think of that a normal high-rate server would have, and started from scratch. And I probably will not as the rest is mostly just commands, npc's, and some quest's.

so what you're saying is this works with moopledevs latest revision??
 
Junior Spellweaver
Joined
Jan 10, 2017
Messages
105
Reaction score
6
But here I miss the NPC or a command?
 
Newbie Spellweaver
Joined
Feb 20, 2020
Messages
14
Reaction score
0
Im having same issue on where to put the command code above

} else if (sub[0].equals("rebirtha")) {
if (chr.getLevel() > 199) {
chr.setReborns(chr.getReborns() + 1);
chr.setLevel(1);
chr.setExp(0);
chr.setJob(MapleJob.LEGEND);
chr.updateSingleStat(MapleStat.LEVEL, 1);
chr.updateSingleStat(MapleStat.JOB, 0);
chr.updateSingleStat(MapleStat.EXP, 0);
}
} else if (sub[0].equals("rebirthn")) {
if (chr.getLevel() > 199) {
chr.setReborns(chr.getReborns() + 1);
chr.setLevel(1);
chr.setExp(0);
chr.setJob(MapleJob.NOBLESSE);
chr.updateSingleStat(MapleStat.LEVEL, 1);
chr.updateSingleStat(MapleStat.JOB, 0);
chr.updateSingleStat(MapleStat.EXP, 0);
}
} else if (sub[0].equals("rebirthe")) {
if (chr.getLevel() > 199) {
chr.setReborns(chr.getReborns() + 1);
chr.setLevel(1);
chr.setExp(0);
chr.setJob(MapleJob.BEGINNER);
chr.updateSingleStat(MapleStat.LEVEL, 1);
chr.updateSingleStat(MapleStat.JOB, 0);
chr.updateSingleStat(MapleStat.EXP, 0);
}
 
Back
Top