Implemented Kites, PlayerNPCs and C. Shop Surprise & Tweaked login
Added code support for Kites. Reviewed concurrent access issues with pet autopot. Addressed PlayerStorage issue where characters would not be properly deregistered from channel PlayerStorage in certain situations. Implemented harp quest (questid 3314) because of reasons. Added SFX to signalize KC/NLC subway departing/approaching. Changed traveling time values to work similarly to GMS. Properly developed the PlayerNPC feature in the source. Added autodeployable PlayerNPC system and Hall of Fame. Solved a glitch with NLC mayor's quiz questline that would allow a player to restart the quiz as many times one would see fit. Added a custom server flag that allows overwriting the ToT 999 mobs to a new value (technically it doesn't overwrite, rather sets the player at quest start with 999 - n credited mobs). Fixed permanent pets expiring after a while. Added code support for Cash Shop Surprise item. Reviewed login handler system as a whole, protecting many exposed flaws. Solved a bug with ULTRA_THREE_SNAILS sometimes taking wrong etc shell from inventory.
This commit is contained in:
@@ -29,36 +29,55 @@ status = -1;
|
||||
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
|
||||
job = 310;
|
||||
|
||||
spawnPnpc = false;
|
||||
spawnPnpcFee = 7000000;
|
||||
jobType = 3;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("So you decided to become a #rBowman#k?");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rBowman#k.");
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, didn't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
if(spawnPnpcFee > 0) {
|
||||
sendStr += " I can do it for you, for the fee of #b " + numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
||||
}
|
||||
|
||||
cm.sendYesNo(sendStr);
|
||||
} else {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("So you decided to become a #rBowman#k?");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rBowman#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 300) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("Haha...I knew you'd breeze through that test. I'll admit, you are a great bowman. I'll make you much stronger than you're right now. before that, however... you;ll need to choose one of two paths given to you. It'll be a difficult decision for you to make, but... if there's any question to ask, please do so.");
|
||||
else if (cm.haveItem(4031011)){
|
||||
cm.sendOk("Go and see the #b#p1072002##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendYesNo("Hmmm... you have grown a lot since I last saw you. I don't see the weakling I saw before, and instead, look much more like a bowman now. Well, what do you think? Don't you want to get even more powerful than that? Pass a simple test and I'll do just that for you. Do you want to do it?");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 3 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020010##k of Ossyria talked to me about you. I see that you are interested in making the leap to the amazing world of the third job advancement for archers. To achieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat her and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 300) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("Haha...I knew you'd breeze through that test. I'll admit, you are a great bowman. I'll make you much stronger than you're right now. before that, however... you;ll need to choose one of two paths given to you. It'll be a difficult decision for you to make, but... if there's any question to ask, please do so.");
|
||||
else if (cm.haveItem(4031011)){
|
||||
cm.sendOk("Go and see the #b#p1072002##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendYesNo("Hmmm... you have grown a lot since I last saw you. I don't see the weakling I saw before, and instead, look much more like a bowman now. Well, what do you think? Don't you want to get even more powerful than that? Pass a simple test and I'll do just that for you. Do you want to do it?");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 3 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020010##k of Ossyria talked to me about you. I see that you are interested in making the leap to the amazing world of the third job advancement for archers. To achieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat her and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,14 +88,37 @@ function action(mode, type, selection) {
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (actionx["1stJob"]){
|
||||
if (status == 0)
|
||||
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
|
||||
@@ -161,110 +203,3 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
function start() {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
|
||||
else {
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if (cm.getLevel() >= 30 && cm.getJobId() == 300) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
|
||||
else if (cm.haveItem(4031010)){
|
||||
cm.sendOk("Go and see the #b#p1072002##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
|
||||
} else if (cm.isQuestStarted(100100)) {
|
||||
if (cm.isQuestCompleted(100101))
|
||||
cm.sendOk("Alright, now take this to #bRene#k.");
|
||||
else {
|
||||
|
||||
cm.startQuest(100101);
|
||||
}
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
status++;
|
||||
if (mode == 0 && type != 1)
|
||||
status -= 2;
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else if (mode != 1 || status == 7 && type != 1 || (cm.haveItem(4031010) && status == 2)){
|
||||
if (mode == 0 && status == 2)
|
||||
cm.sendOk("Make up your mind and visit me again.");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (actionx["1stJob"]){
|
||||
if (status == 0)
|
||||
|
||||
else if (status == 1)
|
||||
|
||||
else if (status == 2) {
|
||||
|
||||
cm.sendOk("So be it! Now go, and go with pride.");
|
||||
} else {
|
||||
cm.sendNext("Make some room in your inventory and talk to me again.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if(actionx["2ndJob"]){
|
||||
if (status == 0){
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendSimple("Alright, when you have made your decision, click on [I'll choose my occupation] at the bottom.#b\r\n#L0#Please explain to me what being the Hunter is all about.\r\n#L1#Please explain to me what being the Crossbowman is all about.\r\n#L2#I'll choose my occupation!");
|
||||
else {
|
||||
cm.sendNext("Good decision. You look strong, but I need to see if you really are strong enough to pass the test, it's not a difficult test, so you'll do just fine. Here, take my letter first... make sure you don't lose it!");
|
||||
if(!cm.isQuestStarted(100000)) cm.startQuest(100000);
|
||||
}
|
||||
} else if (status == 1){
|
||||
if (!cm.haveItem(4031012)){
|
||||
if (cm.canHold(4031010)){
|
||||
if (!cm.haveItem(4031010))
|
||||
cm.gainItem(4031010, 1);
|
||||
cm.sendNextPrev("Please get this letter to #b#p1072002##k who's around #b#m106010000##k near Henesys. She is taking care of the job of an instructor in place of me. Give her the letter and she'll test you in place of me. Best of luck to you.");
|
||||
} else {
|
||||
cm.sendNext("Please, make some space in your inventory.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
if (selection < 2){
|
||||
cm.sendNext("Not done.");
|
||||
status -= 2;
|
||||
} else
|
||||
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#Hunter\r\n#L1#Crossbowman");
|
||||
}
|
||||
} else if (status == 2){
|
||||
job += selection * 10;
|
||||
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your desicion here, right?");
|
||||
} else if (status == 3){
|
||||
if (cm.haveItem(4031012))
|
||||
cm.gainItem(4031012, -1);
|
||||
cm.completeQuest(100002);
|
||||
cm.sendNext("Alright, you're the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + " from here on out. Hunters are the intelligent bunch with incredible vision, able to pierce the arrow through the heart of the monsters with ease... please train yourself each and everyday. I'll help you become even stronger than you already are.");
|
||||
if (cm.getJobId() != job)
|
||||
cm.changeJobById(job);
|
||||
} else if (status == 4)
|
||||
cm.sendNextPrev("I have just given you a book that gives you the list of skills you can acquire as a " + (job == 310 ? "hunter" : "crossbowman") + ". Also your etc inventory has expanded by adding another row to it. Your max HP and MP have increased, too. Go check and see for it yourself.");
|
||||
else if (status == 5)
|
||||
cm.sendNextPrev("I have also given you a little bit of #bSP#k. Open the #bSkill Menu#k located at the bottomleft corner. you'll be able to boost up the newer acquired 2nd level skills. A word of warning, though. You can't boost them up all at once. Some of the skills are only available after you have learned other skills. Make sure yo remember that.");
|
||||
else if (status == 6)
|
||||
cm.sendNextPrev((job == 310 ? "Hunter" : "Crossbowman") + " need to be strong. But remember that you can't abuse that power and use it on a weakling. Please use your enormous power the right way, because... for you to use that the right way, that is much harden than just getting stronger. Please find me after you have advanced much further. I'll be waiting for you.");
|
||||
}
|
||||
}*/
|
||||
@@ -30,36 +30,55 @@ status = -1;
|
||||
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
|
||||
job = 110;
|
||||
|
||||
spawnPnpc = false;
|
||||
spawnPnpcFee = 7000000;
|
||||
jobType = 1;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("Do you want to become a Warrior? You need to meet some criteria in order to do so.#b You should be at least in level 10, with at least 35 in STR#k. Let's see...");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rWarrior#k.");
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, didn't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
if(spawnPnpcFee > 0) {
|
||||
sendStr += " I can do it for you, for the fee of #b " + numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
||||
}
|
||||
|
||||
cm.sendYesNo(sendStr);
|
||||
} else {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("Do you want to become a Warrior? You need to meet some criteria in order to do so.#b You should be at least in level 10, with at least 35 in STR#k. Let's see...");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rWarrior#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 100) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("Oh... you came back safe! I knew you'd breeze through. I'll admit, you are a strong, formidable Warrior! Alright, I'll make you an even stronger Warrior than you already are. But before that, you need to choose one of the three paths that you'll be given. It isn't going to be easy, so if you have and questions, feel free to ask.");
|
||||
else if (cm.haveItem(4031008)){
|
||||
cm.sendOk("Go and see the #b#p1072000##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && (cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 1 && !cm.getPlayer().gotPartyQuestItem("JBP")))) {
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("I was waiting for you. Few days ago, I heard about you from #b#p2020008##k in Ossyria. Well... I'd like to test your strength. There is a secret passage near the ant tunnel. Nobody but you can go into that passage. If you go into the passage, you will meat my the other self. Beat him and bring #b#t4031059##k to me.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Wow... You beat my the other self and brought #b#t4031059##k to me. Good! this surely proves your strength. In terms of strength, you are ready to advance to 3th job. As I promised, I will give #b#t4031057##k to you. Give this necklace to #b#p2020008##k in Ossyria and you will be able to take second test of 3rd job advancement. Good Luck~");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 100) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("Oh... you came back safe! I knew you'd breeze through. I'll admit, you are a strong, formidable Warrior! Alright, I'll make you an even stronger Warrior than you already are. But before that, you need to choose one of the three paths that you'll be given. It isn't going to be easy, so if you have and questions, feel free to ask.");
|
||||
else if (cm.haveItem(4031008)){
|
||||
cm.sendOk("Go and see the #b#p1072000##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && (cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 1 && !cm.getPlayer().gotPartyQuestItem("JBP")))) {
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("I was waiting for you. Few days ago, I heard about you from #b#p2020008##k in Ossyria. Well... I'd like to test your strength. There is a secret passage near the ant tunnel. Nobody but you can go into that passage. If you go into the passage, you will meat my the other self. Beat him and bring #b#t4031059##k to me.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Wow... You beat my the other self and brought #b#t4031059##k to me. Good! this surely proves your strength. In terms of strength, you are ready to advance to 3th job. As I promised, I will give #b#t4031057##k to you. Give this necklace to #b#p2020008##k in Ossyria and you will be able to take second test of 3rd job advancement. Good Luck~");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,14 +89,37 @@ function action(mode, type, selection) {
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJob"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("Make up your mind and visit me again.");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJob"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("Make up your mind and visit me again.");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (actionx["1stJob"]){
|
||||
if (status == 0)
|
||||
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
|
||||
|
||||
@@ -30,36 +30,55 @@ status = -1;
|
||||
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
|
||||
job = 210;
|
||||
|
||||
spawnPnpc = false;
|
||||
spawnPnpcFee = 7000000;
|
||||
jobType = 2;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 8)
|
||||
cm.sendNext("Want to be a magician? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 8#k, with getting INT as your top priority. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rMagician#k.");
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, didn't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
if(spawnPnpcFee > 0) {
|
||||
sendStr += " I can do it for you, for the fee of #b " + numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
||||
}
|
||||
|
||||
cm.sendYesNo(sendStr);
|
||||
} else {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 8)
|
||||
cm.sendNext("Want to be a magician? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 8#k, with getting INT as your top priority. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rMagician#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 200) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
|
||||
else if (cm.haveItem(4031009)){
|
||||
cm.sendOk("Go and see the #b#p1072001##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 2 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020009##k of Ossyria talked to me about you. I see that you are interested in making the leap to the enlightened of the third job advancement for magicians. To archieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest of evil in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k from my clone. You can find him inside a hole in space which is deep in a forest of evil.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 200) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
|
||||
else if (cm.haveItem(4031009)){
|
||||
cm.sendOk("Go and see the #b#p1072001##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 2 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020009##k of Ossyria talked to me about you. I see that you are interested in making the leap to the enlightened of the third job advancement for magicians. To archieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest of evil in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k from my clone. You can find him inside a hole in space which is deep in a forest of evil.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,14 +89,37 @@ function action(mode, type, selection) {
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else if (mode != 1 || status == 7 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type == 0)){
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if (mode != 1 || status == 7 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type == 0)){
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (actionx["1stJob"]){
|
||||
if (status == 0)
|
||||
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little sinister mind, and... yeah... so, what do you think? Wanna be the Magician?");
|
||||
|
||||
@@ -29,38 +29,57 @@ status = -1;
|
||||
actionx = {"1stJob" : false, "2ndjob" : false, "3thJobI" : false, "3thJobC" : false};
|
||||
job = 410;
|
||||
|
||||
spawnPnpc = false;
|
||||
spawnPnpcFee = 7000000;
|
||||
jobType = 4;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("Want to be a thief? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10, with your DEX over 25#k. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rThief#k.");
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, didn't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
if(spawnPnpcFee > 0) {
|
||||
sendStr += " I can do it for you, for the fee of #b " + numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
||||
}
|
||||
|
||||
cm.sendYesNo(sendStr);
|
||||
} else {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("Want to be a thief? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10, with your DEX over 25#k. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rThief#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 400) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
|
||||
else if (cm.haveItem(4031011)){
|
||||
cm.sendOk("Go and see the #b#p1072003##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 4 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020011##k of Ossyria talked to me about you. I see that you are interested in making the leap to the dark world of the third job advancement for thieves. To archieve that goal, I will have to test your strength in orden to see whether you are worthy of the advancement. There is an opening in the middle of a deep swamp in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else if (cm.isQuestStarted(6141)) {
|
||||
cm.warp(910300000, 3);
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 400) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.haveItem(4031012))
|
||||
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
|
||||
else if (cm.haveItem(4031011)){
|
||||
cm.sendOk("Go and see the #b#p1072003##k.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 4 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020011##k of Ossyria talked to me about you. I see that you are interested in making the leap to the dark world of the third job advancement for thieves. To archieve that goal, I will have to test your strength in orden to see whether you are worthy of the advancement. There is an opening in the middle of a deep swamp in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else if (cm.isQuestStarted(6141)) {
|
||||
cm.warp(910300000, 3);
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,14 +90,37 @@ function action(mode, type, selection) {
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (actionx["1stJob"]){
|
||||
if (status == 0)
|
||||
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little sinister mind, and... yeah... so, what do you think? Wanna be the Rogue?");
|
||||
|
||||
@@ -29,33 +29,52 @@ status = -1;
|
||||
actionx = {"1stJob" : false, "2ndjob" : false, "2ndjobT" : false, "3thJobI" : false, "3thJobC" : false};
|
||||
job = 510;
|
||||
|
||||
spawnPnpc = false;
|
||||
spawnPnpcFee = 7000000;
|
||||
jobType = 5;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("Want to be a pirate? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10#k. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rPirate#k.");
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, didn't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
if(spawnPnpcFee > 0) {
|
||||
sendStr += " I can do it for you, for the fee of #b " + numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
||||
}
|
||||
|
||||
cm.sendYesNo(sendStr);
|
||||
} else {
|
||||
if (cm.getJobId() == 0) {
|
||||
actionx["1stJob"] = true;
|
||||
if (cm.getLevel() >= 10)
|
||||
cm.sendNext("Want to be a pirate? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10#k. Let's see.");
|
||||
else {
|
||||
cm.sendOk("Train a bit more and I can show you the way of the #rPirate#k.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 500) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.isQuestCompleted(2191) || cm.isQuestCompleted(2192))
|
||||
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
|
||||
else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 5 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020013##k of Ossyria talked to me about you. I see that you are interested in making the leap to the world of the third job advancement for pirates. To archieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a cave on Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020013##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (cm.getLevel() >= 30 && cm.getJobId() == 500) {
|
||||
actionx["2ndJob"] = true;
|
||||
if (cm.isQuestCompleted(2191) || cm.isQuestCompleted(2192))
|
||||
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
|
||||
else
|
||||
cm.sendNext("The progress you have made is astonishing.");
|
||||
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 5 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
|
||||
actionx["3thJobI"] = true;
|
||||
cm.sendNext("There you are. A few days ago, #b#p2020013##k of Ossyria talked to me about you. I see that you are interested in making the leap to the world of the third job advancement for pirates. To archieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a cave on Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
|
||||
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
|
||||
cm.sendNext("Please, bring me the #b#t4031059##k.");
|
||||
cm.dispose();
|
||||
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
|
||||
actionx["3thJobC"] = true;
|
||||
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020013##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
|
||||
} else {
|
||||
cm.sendOk("You have chosen wisely.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,14 +85,37 @@ function action(mode, type, selection) {
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
|
||||
if (mode == 0 && status == 2 && type == 1)
|
||||
cm.sendOk("You know there is no other choice...");
|
||||
if (!(mode == 0 && type != 1)){
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (actionx["1stJob"]){
|
||||
if (status == 0)
|
||||
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little slang, and... yeah... so, what do you think? Wanna be the Pirate?");
|
||||
|
||||
@@ -20,9 +20,64 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
* @author BubblesDev, Rich for text
|
||||
* @author BubblesDev, Rich for text, Ronan for PNPCs
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
var spawnPnpc = false;
|
||||
var spawnPnpcFee = 7000000;
|
||||
var minJobType = 11;
|
||||
var maxJobType = 15;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function start() {
|
||||
cm.sendOk("Welcome to the Knights Chamber.");
|
||||
cm.dispose();
|
||||
var jobType = parseInt(cm.getJobId() / 100);
|
||||
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, didn't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
if(spawnPnpcFee > 0) {
|
||||
sendStr += " I can do it for you, for the fee of #b " + numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
||||
}
|
||||
|
||||
cm.sendYesNo(sendStr);
|
||||
} else {
|
||||
cm.sendOk("Welcome to the Knights Chamber.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
status++;
|
||||
if (mode == 0 && type != 1)
|
||||
status -= 2;
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,57 @@
|
||||
var status = 0;
|
||||
|
||||
var spawnPnpc = false;
|
||||
var spawnPnpcFee = 7000000;
|
||||
var jobType = 21;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, didn't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
if(spawnPnpcFee > 0) {
|
||||
sendStr += " I can do it for you, for the fee of #b " + numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
||||
}
|
||||
|
||||
cm.sendYesNo(sendStr);
|
||||
} else {
|
||||
cm.sendOk("Behold, the distinguished brave heroes of Rien! Those stout hearts are who have been protecting our people since long ago, our valiant comrades.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
cm.sendOk("Behold, the distinguished brave heroes of Rien! Those stout hearts are who have been protecting our people since long ago, our valiant comrades.");
|
||||
cm.dispose();
|
||||
status++;
|
||||
if (mode == 0 && type != 1)
|
||||
status -= 2;
|
||||
if (status == -1){
|
||||
start();
|
||||
return;
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
99
scripts/npc/2012027.js
Normal file
99
scripts/npc/2012027.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Harp String C
|
||||
Hidden Street - Eliza’s Garden (200010303)
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
var harpNote = 'C';
|
||||
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
|
||||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
|
||||
if(idx != -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
cm.message("You've missed the note... Start over again.");
|
||||
} else {
|
||||
nextNote = harpSong[idx + 1];
|
||||
|
||||
if(nextNote == '|') {
|
||||
idx++;
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if(idx == 14) {
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||||
} else if(idx == 22) {
|
||||
cm.message("Up above the world so high,");
|
||||
} else if(idx == 30) {
|
||||
cm.message("like a diamond in the sky.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
scripts/npc/2012028.js
Normal file
99
scripts/npc/2012028.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Harp String D
|
||||
Hidden Street - Eliza’s Garden (200010303)
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
var harpNote = 'D';
|
||||
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
|
||||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
|
||||
if(idx != -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
cm.message("You've missed the note... Start over again.");
|
||||
} else {
|
||||
nextNote = harpSong[idx + 1];
|
||||
|
||||
if(nextNote == '|') {
|
||||
idx++;
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if(idx == 14) {
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||||
} else if(idx == 22) {
|
||||
cm.message("Up above the world so high,");
|
||||
} else if(idx == 30) {
|
||||
cm.message("like a diamond in the sky.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
scripts/npc/2012029.js
Normal file
99
scripts/npc/2012029.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Harp String E
|
||||
Hidden Street - Eliza’s Garden (200010303)
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
var harpNote = 'E';
|
||||
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
|
||||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
|
||||
if(idx != -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
cm.message("You've missed the note... Start over again.");
|
||||
} else {
|
||||
nextNote = harpSong[idx + 1];
|
||||
|
||||
if(nextNote == '|') {
|
||||
idx++;
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if(idx == 14) {
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||||
} else if(idx == 22) {
|
||||
cm.message("Up above the world so high,");
|
||||
} else if(idx == 30) {
|
||||
cm.message("like a diamond in the sky.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
scripts/npc/2012030.js
Normal file
99
scripts/npc/2012030.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Harp String F
|
||||
Hidden Street - Eliza’s Garden (200010303)
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
var harpNote = 'F';
|
||||
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
|
||||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
|
||||
if(idx != -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
cm.message("You've missed the note... Start over again.");
|
||||
} else {
|
||||
nextNote = harpSong[idx + 1];
|
||||
|
||||
if(nextNote == '|') {
|
||||
idx++;
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if(idx == 14) {
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||||
} else if(idx == 22) {
|
||||
cm.message("Up above the world so high,");
|
||||
} else if(idx == 30) {
|
||||
cm.message("like a diamond in the sky.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
scripts/npc/2012031.js
Normal file
99
scripts/npc/2012031.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Harp String G
|
||||
Hidden Street - Eliza’s Garden (200010303)
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
var harpNote = 'G';
|
||||
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
|
||||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
|
||||
if(idx != -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
cm.message("You've missed the note... Start over again.");
|
||||
} else {
|
||||
nextNote = harpSong[idx + 1];
|
||||
|
||||
if(nextNote == '|') {
|
||||
idx++;
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if(idx == 14) {
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||||
} else if(idx == 22) {
|
||||
cm.message("Up above the world so high,");
|
||||
} else if(idx == 30) {
|
||||
cm.message("like a diamond in the sky.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
scripts/npc/2012032.js
Normal file
99
scripts/npc/2012032.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Harp String A
|
||||
Hidden Street - Eliza’s Garden (200010303)
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
var harpNote = 'A';
|
||||
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
|
||||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
|
||||
if(idx != -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
cm.message("You've missed the note... Start over again.");
|
||||
} else {
|
||||
nextNote = harpSong[idx + 1];
|
||||
|
||||
if(nextNote == '|') {
|
||||
idx++;
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if(idx == 14) {
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||||
} else if(idx == 22) {
|
||||
cm.message("Up above the world so high,");
|
||||
} else if(idx == 30) {
|
||||
cm.message("like a diamond in the sky.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
scripts/npc/2012033.js
Normal file
99
scripts/npc/2012033.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Harp String B
|
||||
Hidden Street - Eliza’s Garden (200010303)
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
var harpNote = 'B';
|
||||
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
|
||||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
|
||||
if(idx != -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
|
||||
cm.message("You've missed the note... Start over again.");
|
||||
} else {
|
||||
nextNote = harpSong[idx + 1];
|
||||
|
||||
if(nextNote == '|') {
|
||||
idx++;
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
if(idx == 14) {
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||||
} else if(idx == 22) {
|
||||
cm.message("Up above the world so high,");
|
||||
} else if(idx == 30) {
|
||||
cm.message("like a diamond in the sky.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,24 +40,20 @@ function action(mode, type, selection) {
|
||||
else
|
||||
status--;
|
||||
if (status == 0 && mode == 1) {
|
||||
if (!cm.isQuestStarted(4900)){
|
||||
if (cm.isQuestCompleted(4911)) {
|
||||
cm.sendNext("Good job! You've solved all of my questions about NLC. Enjoy your trip!");
|
||||
cm.dispose();
|
||||
} else if (cm.isQuestCompleted(4900) || cm.isQuestStarted(4900)) { // thanks imbee for pointing out the quiz leak
|
||||
cm.sendNext("Hey, pay attention, I'm trying to quiz you on another question, fam!");
|
||||
cm.dispose();
|
||||
} else {
|
||||
var selStr = "What up! Name's Icebyrd Slimm, mayor of New Leaf City! Happy to see you accepted my invite. So, what can I do for you?#b"
|
||||
var info = new Array("What is this place?","Who is Professor Foxwit?","What's a Foxwit Door?","Where are the MesoGears?","What is the Krakian Jungle?","What's a Gear Portal?","What do the street signs mean?","What's the deal with Jack Masque?","Lita Lawless looks like a tough cookie, what's her story?","When will new boroughs open up in the city?","I want to take the quiz!");
|
||||
for (var i = 0; i < info.length; i++)
|
||||
selStr += "\r\n#L" + i + "# " + info[i] + "#l";
|
||||
cm.sendSimple(selStr);
|
||||
}
|
||||
else if (!cm.isQuestStarted(4911)){
|
||||
cm.sendNext("Good job! You've solved all of my questions about NLC. Enjoy of your trip!");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
cm.sendNext("Hey, pay attention, I'm trying to quiz you on another question!");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if(status == 1 && !cm.isQuestStarted(4900)) {
|
||||
} else if(status == 1) {
|
||||
switch (selection) {
|
||||
case 0:
|
||||
cm.sendNext("I've always dreamed of building a city. Not just any city, but one where everyone was welcome. I used to live in Kerning City, so I decided to see if I could create a city. As I went along in finding the means to do so, I encountered many people, some of whom I've come to regard as friends. Like Professor Foxwit-he's our resident genius; saved him from a group of man-eating plants. Jack Masque is an old hunting buddy from Amoria-almost too smooth of a talker for his own good. Lita and I are old friends from Kerning City-she's saved me a few times with that weapon of hers; so I figured she was a perfect choice for Town Sheriff. It took a bit of persuasion, but she came to believe her destiny lies here. About our resident explorer, Barricade came searching for something; he agreed to bring whatever he found to the museum. I'd heard stories about him and his brother when I was still in Kerning City. And Elpam...well, let's just say he's not from around here. At all. We've spoken before, and he seems to mean well, so I've allowed him to stay. I just realized that I've rambled quite a bit! What else would you like to know?");
|
||||
@@ -103,9 +99,10 @@ function action(mode, type, selection) {
|
||||
if (cm.getLevel() >= minlevel) {
|
||||
cm.sendNext("No problem. I'll give you something nice if you answer them correctly!");
|
||||
cm.startQuest(4900);
|
||||
}
|
||||
else
|
||||
} else {
|
||||
cm.sendNext("Eager, are we? How about you explore a bit more before I let you take the quiz?");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
|
||||
233
scripts/npc/9977777.js
Normal file
233
scripts/npc/9977777.js
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Ronan
|
||||
Hidden Street - Developers' Headquarters (777777777)
|
||||
HeavenMS developer info.
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var status;
|
||||
|
||||
var anthemSong = "Field/anthem/brazil"; // sound src: https://c7.rbxcdn.com/f91060652a6e9fbfbf92cb1418435448
|
||||
var ambientSong = "Bgm04/Shinin'Harbor";
|
||||
|
||||
var feature_tree = [];
|
||||
var feature_cursor;
|
||||
|
||||
var tabs = ["PQs", "Skills", "Quests", "Player Social Network", "Cash & Items", "Monsters, Maps & Reactors", "PQ potentials", "Player potentials", "Server potentials", "Admin/GM commands", "Project"];
|
||||
|
||||
function addFeature(feature) {
|
||||
feature_cursor.push(feature);
|
||||
}
|
||||
|
||||
function writeFeatureTab_PQs() {
|
||||
addFeature("HPQ/KPQ/LPQ/LMPQ/OPQ/EllinPQ/PiratePQ.");
|
||||
addFeature("MagatiaPQ/HorntailPQ/AmoriaPQ/TreasurePQ.");
|
||||
addFeature("CWKPQ as Expedition-based event.");
|
||||
addFeature("Scarga/Horntail/Showa/Balrog/Zakum/Pinkbean.");
|
||||
addFeature("GuildPQ & queue with multi-lobby systems available.");
|
||||
addFeature("Brand-new PQs: BossRushPQ, CafePQ.");
|
||||
addFeature("Mu Lung Dojo.");
|
||||
addFeature("Capt. Latanica with party fighting the boss.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_Skills() {
|
||||
addFeature("Reviewed many skills, such as V. Star and M. Door.");
|
||||
addFeature("Maker skill features properly developed.");
|
||||
addFeature("Chair Mastery - map chair boosts HP/MP rec.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_Quests() {
|
||||
addFeature("Doll house quest functional.");
|
||||
addFeature("Quests are now rewarding items properly.");
|
||||
addFeature("Selection of rewards works properly.");
|
||||
addFeature("Loads of quests have been patched.");
|
||||
addFeature("Lots of job questlines have been reviewed.");
|
||||
addFeature("Rewarding system now looks up for item stacking.");
|
||||
addFeature("3rd job quiz with all 40-question pool available.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_PlayerSocialNetwork() {
|
||||
addFeature("Guild and Alliance system fully functional.");
|
||||
addFeature("Party for novices-only (may still be disabled locally).");
|
||||
addFeature("Thoroughly reviewed P. Shops and H. Merchants.");
|
||||
addFeature("Transactions on Merchs instantly announced to owner.");
|
||||
addFeature("Game minirooms with semi-functional pw system.");
|
||||
addFeature("Proper item pickup cooldown on non-owned items.");
|
||||
addFeature("Improved ranking system, with daily movement.");
|
||||
addFeature("Automated support for Player NPCs and Hall of Fame.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_CashItems() {
|
||||
addFeature("EXP/DROP/Cosmetic Coupons.");
|
||||
addFeature("EXP/DROP Coupon as buff effect during active time.");
|
||||
addFeature("Great deal of cash items functional.");
|
||||
addFeature("New town scroll: antibanish. Counters boss banishes.");
|
||||
addFeature("Inventory system checks for free slot & stack space.");
|
||||
addFeature("Storage with 'Arrange Items' feature functional.");
|
||||
addFeature("Vega's spell.");
|
||||
addFeature("Owl of Minerva.");
|
||||
addFeature("Pet item ignore.");
|
||||
addFeature("New Year's card.");
|
||||
addFeature("Kite.");
|
||||
addFeature("Cash Shop surprise.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_MonstersMapsReactors() {
|
||||
addFeature("Every monsterbook card is now droppable.");
|
||||
addFeature("Added meso drop data for many missing mobs.");
|
||||
addFeature("Monsterbook displays updated drop data info.");
|
||||
addFeature("Every skill/mastery book is now obtainable.");
|
||||
addFeature("Mobs now can drop more than one of the same equip.");
|
||||
addFeature("Added Boss HP Bar for dozens of bosses.");
|
||||
addFeature("Game will favor showing the targeted boss HPbar.");
|
||||
addFeature("Boats, elevator and other travel mechanics functional.");
|
||||
addFeature("C. Balrog's boat approaching visual effect functional.");
|
||||
addFeature("PQs, Taxis and events warps players to random SPs.");
|
||||
addFeature("PQ boxes sprays items when opened, GMS-like.");
|
||||
addFeature("Reviewed Masteria, W. Tour, N. Desert and Neo City.");
|
||||
addFeature("Giant Cake boss drops s. bags and Maple items.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_PQpotentials() {
|
||||
addFeature("Lobby system: Same channel, multiple PQ instances.");
|
||||
addFeature("Exped system: Many parties can join a same instance.");
|
||||
addFeature("Guild queue: guild registration for the GPQ.");
|
||||
addFeature("EIM Pool system: optimized instance loadouts.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_Playerpotentials() {
|
||||
addFeature("Adventurer Mount quests functional.");
|
||||
addFeature("All Equipment levels up.");
|
||||
addFeature("Player level rates.");
|
||||
addFeature("Gain fame by quests.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_Serverpotentials() {
|
||||
addFeature("Multi-worlds.");
|
||||
addFeature("Inventory auto-gather and auto-sorting feature.");
|
||||
addFeature("Enhanced auto-pot system: smart pet potion handle.");
|
||||
addFeature("Enhanced buff system: best buffs effects takes place.");
|
||||
addFeature("Enhanced AP auto-assigner: focus on eqp demands.");
|
||||
addFeature("Pet pickup gives preference to player attacks.");
|
||||
addFeature("Channel capacity bar and worlds with capacity check.");
|
||||
addFeature("Diseases visible for others, even after changing maps.");
|
||||
addFeature("Poison damage value visible for other players.");
|
||||
addFeature("M. book announcer displays info based on demand.");
|
||||
addFeature("Custom jail system.");
|
||||
addFeature("Delete Character.");
|
||||
addFeature("Autosaver (periodically saves player's data on DB).");
|
||||
addFeature("Fixed and randomized HP/MP growth rate available.");
|
||||
addFeature("Prevented 'NPC gone after some uptime' issue.");
|
||||
addFeature("Automatic account registration - thanks shavit!");
|
||||
}
|
||||
|
||||
function writeFeatureTab_AdminGMcommands() {
|
||||
addFeature("Server commands layered by GM levels.");
|
||||
addFeature("Spawn Zakum/Horntail/Pinkbean.");
|
||||
addFeature("Several new commands.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_Project() {
|
||||
addFeature("Organized project code.");
|
||||
addFeature("Highly updated drop data.");
|
||||
addFeature("Highly configurable server.");
|
||||
addFeature("Fixed/added many missing packet opcodes.");
|
||||
addFeature("Uncovered many opcodes throughout the source.");
|
||||
addFeature("Reviewed many Java aspects that needed attention.");
|
||||
addFeature("Protected many flaws with login management system.");
|
||||
addFeature("ThreadTracker: runtime tool for deadlock detection.");
|
||||
addFeature("Heavily reviewed future task management, spawning much less threads and relieving task overload on the TimerManager.");
|
||||
}
|
||||
|
||||
function writeAllFeatures() {
|
||||
var re = /[ ,&\/]+/g;
|
||||
|
||||
for(var i = 0; i < tabs.length; i++) {
|
||||
feature_cursor = [];
|
||||
|
||||
var tabName = (tabs[i]).replace(re, "");
|
||||
eval("writeFeatureTab_" + tabName)();
|
||||
|
||||
feature_tree.push(feature_cursor);
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(anthemSong));
|
||||
status = -1;
|
||||
writeAllFeatures();
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(ambientSong));
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(ambientSong));
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
var sendStr = "HeavenMS was developed on the timespan of 3 years, based on where Solaxia left. On the meantime many nice features emerged, development aimed to get back the old GMS experience. Now many of these so-long missing features are gracefully presented to you in the shape of this server. Long live MapleStory!!\r\n\r\nThese are the features of #bHeavenMS#k:\r\n\r\n";
|
||||
for(var i = 0; i < tabs.length; i++) {
|
||||
sendStr += "#L" + i + "##b" + tabs[i] + "#k#l\r\n";
|
||||
}
|
||||
|
||||
cm.sendSimple(sendStr);
|
||||
} else if(status == 1) {
|
||||
var tabName;
|
||||
|
||||
for(var i = 0; i < tabs.length; i++) {
|
||||
if(selection == i) {
|
||||
tabName = feature_tree[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var sendStr = "#b" + tabs[selection] + "#k:\r\n\r\n";
|
||||
for(var i = 0; i < tabName.length; i++) {
|
||||
sendStr += " #L" + i + "# " + tabName[i];
|
||||
sendStr += "#l\r\n";
|
||||
}
|
||||
|
||||
cm.sendPrev(sendStr);
|
||||
} else {
|
||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(ambientSong));
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateSelectionMenu(array) {
|
||||
var menu = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
menu += "#L" + i + "#" + array[i] + "#l\r\n";
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ function addCommand(comm, desc) {
|
||||
desc_cursor.push(desc);
|
||||
}
|
||||
|
||||
function writeSolaxiaCommandsLv6() { //Admin
|
||||
function writeHeavenMSCommandsLv6() { //Admin
|
||||
comm_cursor = comm_lv6;
|
||||
desc_cursor = desc_lv6;
|
||||
|
||||
@@ -57,7 +57,7 @@ function writeSolaxiaCommandsLv6() { //Admin
|
||||
addCommand("clearquest", "");
|
||||
}
|
||||
|
||||
function writeSolaxiaCommandsLv5() { //Developer
|
||||
function writeHeavenMSCommandsLv5() { //Developer
|
||||
comm_cursor = comm_lv5;
|
||||
desc_cursor = desc_lv5;
|
||||
|
||||
@@ -77,7 +77,7 @@ function writeSolaxiaCommandsLv5() { //Developer
|
||||
addCommand("set", "");
|
||||
}
|
||||
|
||||
function writeSolaxiaCommandsLv4() { //SuperGM
|
||||
function writeHeavenMSCommandsLv4() { //SuperGM
|
||||
comm_cursor = comm_lv4;
|
||||
desc_cursor = desc_lv4;
|
||||
|
||||
@@ -99,7 +99,7 @@ function writeSolaxiaCommandsLv4() { //SuperGM
|
||||
//addCommand("playernpc", "");
|
||||
}
|
||||
|
||||
function writeSolaxiaCommandsLv3() { //GM
|
||||
function writeHeavenMSCommandsLv3() { //GM
|
||||
comm_cursor = comm_lv3;
|
||||
desc_cursor = desc_lv3;
|
||||
|
||||
@@ -154,7 +154,7 @@ function writeSolaxiaCommandsLv3() { //GM
|
||||
addCommand("hair", "");
|
||||
}
|
||||
|
||||
function writeSolaxiaCommandsLv2() { //JrGM
|
||||
function writeHeavenMSCommandsLv2() { //JrGM
|
||||
comm_cursor = comm_lv2;
|
||||
desc_cursor = desc_lv2;
|
||||
|
||||
@@ -191,7 +191,7 @@ function writeSolaxiaCommandsLv2() { //JrGM
|
||||
addCommand("unbug", "");
|
||||
}
|
||||
|
||||
function writeSolaxiaCommandsLv1() { //Donator
|
||||
function writeHeavenMSCommandsLv1() { //Donator
|
||||
comm_cursor = comm_lv1;
|
||||
desc_cursor = desc_lv1;
|
||||
|
||||
@@ -204,7 +204,7 @@ function writeSolaxiaCommandsLv1() { //Donator
|
||||
addCommand("recharge", "");
|
||||
}
|
||||
|
||||
function writeSolaxiaCommandsLv0() { //Common
|
||||
function writeHeavenMSCommandsLv0() { //Common
|
||||
comm_cursor = comm_lv0;
|
||||
desc_cursor = desc_lv0;
|
||||
|
||||
@@ -231,19 +231,19 @@ function writeSolaxiaCommandsLv0() { //Common
|
||||
addCommand("luk", "");
|
||||
}
|
||||
|
||||
function writeSolaxiaCommands() {
|
||||
writeSolaxiaCommandsLv0(); //Common
|
||||
writeSolaxiaCommandsLv1(); //Donator
|
||||
writeSolaxiaCommandsLv2(); //JrGM
|
||||
writeSolaxiaCommandsLv3(); //GM
|
||||
writeSolaxiaCommandsLv4(); //Developer
|
||||
writeSolaxiaCommandsLv5(); //SuperGM
|
||||
writeSolaxiaCommandsLv6(); //Admin
|
||||
function writeHeavenMSCommands() {
|
||||
writeHeavenMSCommandsLv0(); //Common
|
||||
writeHeavenMSCommandsLv1(); //Donator
|
||||
writeHeavenMSCommandsLv2(); //JrGM
|
||||
writeHeavenMSCommandsLv3(); //GM
|
||||
writeHeavenMSCommandsLv4(); //Developer
|
||||
writeHeavenMSCommandsLv5(); //SuperGM
|
||||
writeHeavenMSCommandsLv6(); //Admin
|
||||
}
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
writeSolaxiaCommands();
|
||||
writeHeavenMSCommands();
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
65
scripts/npc/rank_user.js
Normal file
65
scripts/npc/rank_user.js
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
* @Author Ronan
|
||||
* Player NPC Ranking System */
|
||||
|
||||
importPackage(Packages.constants);
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
var pnpc = cm.getPlayerNPCByScriptid(cm.getNpc());
|
||||
|
||||
if(pnpc != null) {
|
||||
var branchJobName = GameConstants.getJobName(pnpc.getJob());
|
||||
|
||||
var rankStr = "Hi, I am #b" + pnpc.getName() + "#k, #r" + GameConstants.ordinal(pnpc.getWorldJobRank()) + "#k in the #r" + branchJobName + "#k class to reach the max level and obtain a statue on " + GameConstants.WORLD_NAMES[cm.getPlayer().getWorld()] + ".\r\n";
|
||||
rankStr += "\r\n World rank: #e#b" + GameConstants.ordinal(pnpc.getWorldRank()) + "#k#n";
|
||||
rankStr += "\r\n Overall " + branchJobName + " rank: #e#b" + GameConstants.ordinal(pnpc.getOverallJobRank()) + "#k#n";
|
||||
rankStr += "\r\n Overall rank: #e#b" + GameConstants.ordinal(pnpc.getOverallRank()) + "#k#n";
|
||||
|
||||
cm.sendOk(rankStr);
|
||||
} else {
|
||||
cm.sendOk("Hi, how're you doing?");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user