- 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 :
add a
after omokties = ?.
Then on
add a
to the end of it and a
after
and before
Find out how many question marks you have, then for the last one, put the number in the following:
Where 49 is your final number. You enter that in the respective place, after
You then need to enter the command for the actual rebirth, which is
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:
And add this to the top under public clas MapleCharacter extends AbstractAnimatedMapleMapObject {
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:
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
@level [number]
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?
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,
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: