- 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.
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.
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.