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!

[Release] Rebirth NPC [No Compiling Needed]

Skilled Illusionist
Joined
Apr 17, 2008
Messages
386
Reaction score
0
Credits to kakashirock Rock for the Idea. Basically What it does is Checks to see if the character is lvl 200. Then lvls the character to 201 so that their exp will be 0. And then at the end drops their lvl to 1 and changes the class to Beginner.
Any Way heres the Script Enjoy!

Rebirth NPC Script V3:
Code:
/*
@    Author : Snow
@
@    NPC = NAME
@    Map =  MAP
@    NPC MapId = MAPID
@    Function = Rebirth Player
@
*/

var status = 0;

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {

         
         if (mode == -1) {//ExitChat
        cm.dispose();
    
    }else if (mode == 0){//No
        cm.sendOk("Ok, talk to me when your sure you want to #bRebirth#k.");
        cm.dispose();

    }else{            //Regular Talk
        if (mode == 1)
            status++;
        else
            status--;
        
                 if (status == 0) {
        cm.sendYesNo("Welcome, great hero. You have been through a long and challenging road, and you have become immensely strong. If you bring me a Maple Coin,I can use my magic to increase your power even further, and surpass your limits! You will become a level 1 Beginner again, but you will keep your stats the same and all the Skill in you Hot Keys. Do you wish to be reborn? #b(Note: Please Make Sure you Have Room for all your Equipment in your Inventory. Also Make Sure you use all your SP. As it won't Be useable in your next Job. )#k" );
        }else if (status == 1) {
        if(cm.getChar().getLevel() < 200){
        cm.sendOk("Sorry, You have to be level 200 to rebirth.");
        cm.dispose();
        }else{
        cm.sendOk("#bGood-Job#k, you have qualified for a #eRebirth#n.");
        }
         }else if (status == 2) {
        cm.getChar().levelUp();
        cm.unequipEverything()
        cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);
        cm.sendNext("Enjoy your rebirth!(Note: You will have to Change Channels For the Full Effect to Take Place.");
        cm.getChar().setLevel(2);
        cm.dispose();
        }            
          }
     }
Credits to: kylec510 For Editting the Script So CCIng is uneccesary, and for removing the SP
+Rep Me if you enjoyed! XD
 
Last edited:
Junior Spellweaver
Joined
Apr 22, 2008
Messages
128
Reaction score
0
@ Author : Snow
@
@ NPC = NAME
@ Map = MAP
@ NPC MapId = MAPID
@ Function = Rebirth Player

Do i need to fill up this all?
 
Skilled Illusionist
Joined
Apr 17, 2008
Messages
386
Reaction score
0
@ Author : Snow
@
@ NPC = NAME
@ Map = MAP
@ NPC MapId = MAPID
@ Function = Rebirth Player

Do i need to fill up this all?

no thats just author notes
 
Junior Spellweaver
Joined
Apr 22, 2008
Messages
128
Reaction score
0
Can give me some ID of NPC that are free to be used? @_@
I save it it script/npc right? @_@
 
Skilled Illusionist
Joined
Apr 17, 2008
Messages
386
Reaction score
0
Can give me some ID of NPC that are free to be used? @_@

erm lol thats alot. The ones that i would use would either be Spiegelman (2042002) or Nana(H) (9201001)
 
Newbie Spellweaver
Joined
Mar 1, 2008
Messages
24
Reaction score
0
hmm any bug found ?like exp problem...stats problem skill problem~
 
Junior Spellweaver
Joined
Apr 22, 2008
Messages
128
Reaction score
0
erm lol thats alot. The ones that i would use would either be Spiegelman (2042002) or Nana(H) (9201001)

Oh, i'll use spiegelman ba =D

Thanks!
 
Skilled Illusionist
Joined
Apr 17, 2008
Messages
386
Reaction score
0
hmm any bug found ?like exp problem...stats problem skill problem~

i didnt reset the stats or skill because. i want people to make hybrid characters. (I.e all the skills left on their key map will stay their and they can use them but they will have a different class)
 
Skilled Illusionist
Joined
Apr 11, 2008
Messages
302
Reaction score
0
Thanks for this!! as what you stated earlier I'm also having problem compiling the set exp. I'll test it now
 
Skilled Illusionist
Joined
Apr 17, 2008
Messages
386
Reaction score
0
Thanks for this!! as what you stated earlier I'm also having problem compiling the set exp. I'll test it now

might wanna use v.3 so u dont have to cc after talking. and also it sets all remaining sp to 0. so that players dont get the lacking lvl 1 and 2 skills error
 
Skilled Illusionist
Joined
Apr 11, 2008
Messages
302
Reaction score
0
might wanna use v.3 so u dont have to cc after talking. and also it sets all remaining sp to 0. so that players dont get the lacking lvl 1 and 2 skills error

Wow even much better xD Thanks again!
 
Skilled Illusionist
Joined
Apr 11, 2008
Messages
302
Reaction score
0
well its a little buggy atm. you stay lvl 1 until you cc. So just use the old script. i reposted it

My server only has 1 channel lol and what do you mean it stays at lvl 1? like you dont level or what?
 
Skilled Illusionist
Joined
Apr 17, 2008
Messages
386
Reaction score
0
My server only has 1 channel lol and what do you mean it stays at lvl 1? like you dont level or what?

like i mean its not permanent. If you log out you'll come back as lvl 201
 
Skilled Illusionist
Joined
Apr 11, 2008
Messages
302
Reaction score
0
like i mean its not permanent. If you log out you'll come back as lvl 201

can you post the old one again?

Edit: Nevermind I fixed the whole script. This script will reborn you 100% now. It sets your level to 1, resets ur exp to 0 and changes your job to beginner without ccing or relogging. Enjoy!

/*
@ Author : Snow
@
@ NPC = NAME
@ Map = MAP
@ NPC MapId = MAPID
@ Function = Rebirth Player
@
*/

var status = 0;

function start() {
status = -1;
action(1, 0, 0);
}

function action(mode, type, selection) {


if (mode == -1) {//ExitChat
cm.dispose();

}else if (mode == 0){//No
cm.sendOk("Ok, talk to me when you're sure you want to be #bReborn#k.");
cm.dispose();

}else{ //Regular Talk
if (mode == 1)
status++;
else
status--;

if (status == 0) {
cm.sendYesNo("Welcome, great hero. You have been through a long and challenging road, and you have become immensely strong. I can increase your power even further, and surpass your limits! You will become a level 1 #bBeginner#k again, but you will keep your stats the same and all the skills in your #bhot keys#k. Do you wish to be #rReborn#k?");
}else if (status == 1) {
if(cm.getChar().getLevel() < 200){
cm.sendOk("Sorry, You have to be level 200 to rebirth.");
cm.dispose();
}else{
cm.sendOk("#bGood-Job#k, you have been qualified for a #eRebirth#n.");
}
}else if (status == 2) {
wui = 1;
var statup = new java.util.ArrayList();
var p = cm.c.getPlayer();
cm.getChar().levelUp();
cm.unequipEverything()
cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);
cm.sendNext("You have bee reborned! Good luck on your next journey.");
cm.setLevel(2);
statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LEVEL, java.lang.Integer.valueOf(1)));
p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
cm.dispose();
}
}
}

EDIT: Also add this at NPCConversationManager.java then compile

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));
}
 
Last edited:
Back
Top