Ok I finally figured it out by taking portions of other scripts. I feel ashamed of who I took the template from because I can't remember where I saw it. But I re-did a bunch of it so it now sets your level to 1 AND your job to a beginner.
Shall we start?
Ok first open up NPCconversation.java (I forgot where I just searched it up in my folder lol)
add this:
public void setExp(int exp) {
getPlayer().updateSingleStat(MapleStat.EXP, Integer.valueOf(exp));
}
public void setLevel(int level) {
getPlayer().setLevel(level);
getPlayer().updateSingleStat(MapleStat.LEVEL, Integer.valueOf(level));
}
Okay now that we defined those..
Now, I did this with Nana because I felt she was the appropriate person ~_^
but here is my script
The biggest problem I saw on other peoples was that for changing jobs the would do cm.changejob(000) or cm.changejob(BEGINNER) but for me those didn't work. I went into other job changing people and saw cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (cm.getChar().getMapId() != 100000000) {
cm.dispose();
return;
}
if (mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
status++;
if (status == 0) {
cm.sendYesNo("<here is where you would put what you want to say here. I saw someone require pocky to do it so i added it too" );
}
else if (status == 1) {
if (cm.haveItem(4140000, 1) && cm.getChar().getLevel() == 200) {
cm.sendOk("You are now Reborn!");
cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);
cm.unequipEverything();
cm.gainItem(4140000,-1);
cm.setLevel(1);
cm.setExp(0);
}
else if (cm.getChar().getLevel() < 200) {
cm.sendOk("You have to be level 200 to rebirth.");
}
else {
cm.sendOk("You did not bring me my Pocky D:");
}
cm.dispose();
}
}
}
and that works.


Reply With Quote![[Tut] How to add rebirth into your private server!](http://ragezone.com/hyper728.png)

