Update rebirth NPC to allow for path selection
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
@author wejrox
|
@author wejrox
|
||||||
*/
|
*/
|
||||||
var status;
|
var status;
|
||||||
|
var jobId = 0;
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
status = -1;
|
status = -1;
|
||||||
@@ -50,7 +51,7 @@ function action(mode, type, selection) {
|
|||||||
} else if (status === 2) {
|
} else if (status === 2) {
|
||||||
if (selection === 0) {
|
if (selection === 0) {
|
||||||
if (cm.getChar().getLevel() === 200) {
|
if (cm.getChar().getLevel() === 200) {
|
||||||
cm.sendYesNo("Are you sure you want to be reborn?");
|
cm.sendSimple("I see... and which path would you like to take? \r\n\r\n #L0##bExplorer (Beginner)#l \r\n #L1##bCygnus Knight (Noblesse)#l \r\n #L2##bAran (Legend)#l");
|
||||||
} else {
|
} else {
|
||||||
cm.sendOk("You are not level 200, please come back when you hit level 200.");
|
cm.sendOk("You are not level 200, please come back when you hit level 200.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
@@ -59,8 +60,19 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("See you soon!")
|
cm.sendOk("See you soon!")
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
} else if (status === 3 && type === 1) {
|
} else if (status === 3) {
|
||||||
cm.getChar().executeReborn();
|
// 0 => beginner, 1000 => noblesse, 2000 => legend
|
||||||
|
// makes this very easy :-)
|
||||||
|
jobId = selection * 1000;
|
||||||
|
|
||||||
|
var job = "";
|
||||||
|
if (selection === 0) job = "Beginner";
|
||||||
|
else if (selection === 1) job = "Noblesse";
|
||||||
|
else if (selection === 2) job = "Legend";
|
||||||
|
cm.sendYesNo("Are you sure you want to be reborn as a " + job + "?");
|
||||||
|
}
|
||||||
|
else if (status === 4 && type === 1) {
|
||||||
|
cm.getChar().executeRebornAsId(jobId);
|
||||||
cm.sendOk("You have now been reborn. That's a total of #r" + cm.getChar().getReborns() + "#k rebirths");
|
cm.sendOk("You have now been reborn. That's a total of #r" + cm.getChar().getReborns() + "#k rebirths");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user