Rebirth Quest NPC

Newbie Spellweaver
Joined
Jul 25, 2008
Messages
29
Reaction score
0
Since my server has been on the rocks and I am no longer taking a position of Developer (Damn you Anu what will I do with my time now?) I've decided to take the remainder of the break to release/fix a few of my old projects.

Code:
/*
Malady Rebirth Quest NPC~ Made by Ebilme(Lahos)
*/

importPackage(net.sf.odinms.tools);
importPackage(net.sf.odinms.client);



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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendSimple("What do you want? Are you after my treats again!? Well I'm not in the mood, infact I think I'll give something better than candy.\n\
How about you be a dear and get me #b10 #t4000151##ks,#b 1 #t5220001##k,and #b200,000,000 Mesos#k and I might just #bRebirth#k you.\r\n \n\
#L1#I've got the goods!#l\r\n\#L2#You smell like candy#l");
			} else if (status == 1) {
			if (selection == 1) {
                            if ((cm.haveItem(4000151, 10)) && (cm.haveItem(5220001)) && (cm.getMeso() >= 200000000)) {
				       
                                	
                                        
                                  
                                        cm.gainItem(5220001, -1);
                                	cm.gainItem(4000151, -10);
                                        cm.gainMeso(-200000000);
					
					
                           var statup = new java.util.ArrayList();
                            var p= cm.c.getPlayer();
                                        cm.getChar().levelUp();
    
        cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);
        
	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();   
                    cm.sendOk("There you got your reborn, now go away!");
                                        
}                       

                else if (!cm.haveItem(4000151, 10)) {
			cm.sendOk("LIES!, you don't have my #bArmbands#k!!");
			cm.dispose();
			}
			else if (!cm.haveItem(5220001)) {
			cm.sendOk("LIES!, you don't have an #Event Ticket#k!");
			cm.dispose();
			}
			else if (!cm.getMeso() <= 200000000) {
			cm.sendOk("LIES!, you don't have enough Mesos!");
			cm.dispose();
			}
                                
                
                
                
                
                
			} else if (status == 2) {
			} else if (selection == 2) {
                                            cm.getLevel() >= 0 
		cm.sendOk("Ahh, you waste my time! GO AWAY!");			
               
		cm.dispose();
}
else{
cm.sendOk("!");

			}
		}
	}
}

Just copy and paste that into your 9201028.js. Some of you may plan on asking why put a quest on rebirth if there is already an @rebirth command. The server I worked for didn't really believe in blistering quick leveling and super high rates so I made this NPC to slow down the rebirth process even a little bit.

Feel free to change any of the quest items.
 
Re: [Release] Rebirth Quest NPC

Code:
                          var statup = new java.util.ArrayList();
                            var p= cm.c.getPlayer();
                                        cm.getChar().levelUp();
    
        cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);
        
	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();

change to

Code:
      cm.doReborn();
      cm.dispose();

if u have real reborn and u want it to count on rankings.

edit: correct me if im wrong.
 
Re: [Release] Rebirth Quest NPC

Code:
                          var statup = new java.util.ArrayList();
                            var p= cm.c.getPlayer();
                                        cm.getChar().levelUp();
    
        cm.changeJob(net.sf.odinms.client.MapleJob.BEGINNER);
        
	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();

change to

Code:
      cm.doReborn();
      cm.dispose();

if u have real reborn and u want it to count on rankings.

Ooh toushe, never thought of that :[
 
Re: [Release] Rebirth Quest NPC

just make two scripts.. O_o?

Code:
/*
Malady Rebirth Quest NPC~ Made by Ebilme(Lahos)
*/

importPackage(net.sf.odinms.tools);
importPackage(net.sf.odinms.client);



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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendSimple("What do you want? Are you after my treats again!? Well I'm not in the mood, infact I think I'll give something better than candy.\n\
How about you be a dear and get me #b10 #t4000151##ks,#b 1 #t5220001##k,and #b200,000,000 Mesos#k and I might just #bRebirth#k you.\r\n \n\
#L1#I've got the goods!#l\r\n\#L2#You smell like candy#l");
			} else if (status == 1) {
			if (selection == 1) {
                            if ((cm.haveItem(4000151, 10)) && (cm.haveItem(5220001)) && (cm.getMeso() >= 200000000)) {
				       
                                	
                                        
                                  
                                        cm.gainItem(5220001, -1);
                                	cm.gainItem(4000151, -10);
                                        cm.gainMeso(-200000000);
					
					
      cm.doReborn();
      cm.dispose();                    
      cm.sendOk("There you got your reborn, now go away!");
                                        
}                       

                else if (!cm.haveItem(4000151, 10)) {
			cm.sendOk("LIES!, you don't have my #bArmbands#k!!");
			cm.dispose();
			}
			else if (!cm.haveItem(5220001)) {
			cm.sendOk("LIES!, you don't have an #Event Ticket#k!");
			cm.dispose();
			}
			else if (!cm.getMeso() <= 200000000) {
			cm.sendOk("LIES!, you don't have enough Mesos!");
			cm.dispose();
			}
                                
                
                
                
                
                
			} else if (status == 2) {
			} else if (selection == 2) {
                                            cm.getLevel() >= 0 
		cm.sendOk("Ahh, you waste my time! GO AWAY!");			
               
		cm.dispose();
}
else{
cm.sendOk("!");

			}
		}
	}
}

= real reborns quest :3
 
Re: [Release] Rebirth Quest NPC

just make two scripts.. O_o?

Code:
/*
Malady Rebirth Quest NPC~ Made by Ebilme(Lahos)
*/

importPackage(net.sf.odinms.tools);
importPackage(net.sf.odinms.client);



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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendSimple("What do you want? Are you after my treats again!? Well I'm not in the mood, infact I think I'll give something better than candy.\n\
How about you be a dear and get me #b10 #t4000151##ks,#b 1 #t5220001##k,and #b200,000,000 Mesos#k and I might just #bRebirth#k you.\r\n \n\
#L1#I've got the goods!#l\r\n\#L2#You smell like candy#l");
			} else if (status == 1) {
			if (selection == 1) {
                            if ((cm.haveItem(4000151, 10)) && (cm.haveItem(5220001)) && (cm.getMeso() >= 200000000)) {
				       
                                	
                                        
                                  
                                        cm.gainItem(5220001, -1);
                                	cm.gainItem(4000151, -10);
                                        cm.gainMeso(-200000000);
					
					
      cm.doReborn();
      cm.dispose();                    
      cm.sendOk("There you got your reborn, now go away!");
                                        
}                       

                else if (!cm.haveItem(4000151, 10)) {
			cm.sendOk("LIES!, you don't have my #bArmbands#k!!");
			cm.dispose();
			}
			else if (!cm.haveItem(5220001)) {
			cm.sendOk("LIES!, you don't have an #Event Ticket#k!");
			cm.dispose();
			}
			else if (!cm.getMeso() <= 200000000) {
			cm.sendOk("LIES!, you don't have enough Mesos!");
			cm.dispose();
			}
                                
                
                
                
                
                
			} else if (status == 2) {
			} else if (selection == 2) {
                                            cm.getLevel() >= 0 
		cm.sendOk("Ahh, you waste my time! GO AWAY!");			
               
		cm.dispose();
}
else{
cm.sendOk("!");

			}
		}
	}
}

= real reborns quest :3

*Staples paper over to hide shame*
 
Re: [Release] Rebirth Quest NPC

lol im not even srue if this it right Im not a coder lol if u need a job try fms we need a coder/gm :P
 
Re: [Release] Rebirth Quest NPC

lol brb my walk come online and contact Stephaniie soon I hve to go for my walk lol

edit: u can press my siggy lol
 
Re: [Release] Rebirth Quest NPC

@rebirth
or rebirth on website >.>
if your willing to add this you'll have to remove @rebirth, and rebirth npc, and rebirth on the website >.<
nty xP
 
Re: [Release] Rebirth Quest NPC

Like I mentioned before, it was for a server that didn't want to have people leveling and rebirthing 100 times a day. Additionally they had only donaters able to use the @rebirth command.
 
Back