Hello dear ragezoners~
This community has been very helpful in my learning of maplestory developement, and since gms-like releases have fallen a bit short in recent times, i decided to give a little something back to the community. I'm fairly new to NPC scripting (well, coding in general), so there's guaranteed to be a lot of room for improvement in these scripts, but they do what they are supposed to at the very least, and hopefully they might be of use for some.
Monster drops:
itemid - monsterid
4031856 - 9001006
4031857 - 9001005
Features:
Gives AP/SP on job advancement.
Gives level 10 knuckle+gun+bullets on 1st job advancement.
Checks for which job advancement quest is started (Brawler or Gunslinger path), and sends you to the correct room.
Checks which of the two path quests has been completed, and gives the correct advancement.
GMS-like conversation.
Kyrin (1090000.js)
Spoiler:
Code:/* Kyrin - The Nautilus - Navigation Room(120000101) Made by Cygnus */ importPackage(net.sf.odinms.client); var status = 0; var job; function start() { status = -1; action(1, 0, 0); } function action(mode, type, selection) { if (mode == -1) { cm.dispose(); } else { if (mode == 0 && status == 2) { cm.sendOk("Make up your mind and visit me again."); cm.dispose(); return; } if (mode == 1) status++; else status--; if (status == 0) { if (cm.getJob().equals(net.sf.odinms.client.MapleJob.BEGINNER)) { if (cm.getLevel() >= 10 && cm.getChar().getDex() >= 20) cm.sendNext("So you decided to become a #rPirate#k?"); 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.getJob().equals(net.sf.odinms.client.MapleJob.PIRATE)) { if (cm.getQuestStatus(2192).equals(net.sf.odinms.client.MapleQuestStatus.Status.COMPLETED)) { status = 20; cm.sendNext("I knew you'd pass the test as expected. You had some impressive moves in there. Not bad at all! Now as promised, you will become a #bGunslinger#k."); } else if (cm.getQuestStatus(2191).equals(net.sf.odinms.client.MapleQuestStatus.Status.COMPLETED)) { status = 30; cm.sendNext("I knew you'd pass the test as expected. You had some impressive moves in there. Not bad at all! Now as promised, you will become a #bBrawler#k."); } else if (cm.getQuestStatus(2191).equals(net.sf.odinms.client.MapleQuestStatus.Status.STARTED)) { status = 15; cm.sendYesNo("Would you like to take the test for the second job advancement?"); } else if (cm.getQuestStatus(2192).equals(net.sf.odinms.client.MapleQuestStatus.Status.STARTED)) { status = 10; cm.sendYesNo("Would you like to take the test for the second job advancement?"); } else { cm.sendOk("You need to start my quest before I can allow you to advance any further...") cm.dispose(); } } else if ((cm.getJob().equals(MapleJob.BRAWLER) || cm.getJob().equals(MapleJob.GUNSLINGER)) && cm.getQuestStatus(100100).equals(MapleQuestStatus.Status.STARTED)) { if (cm.getQuestStatus(100101).equals(MapleQuestStatus.Status.COMPLETED) && (cm.haveItem(4031057))) { cm.sendOk("Alright, now bring #b#i4031057##t4031057##k to #bPedro#k."); } else if (cm.haveItem(4031059,1)) { cm.sendNext("Wow... You beat my the other self and brought #b#t4031059##kto me. Good! this surely proves your strength. In terms of strength, you are ready to advance to 3rd job. As I promised, I will give #b#t4031057##k to you. Give this necklace to #b#p2020013##k in Ossyria and you will be able to take second test of 3rd job advancement. Good Luck!"); cm.completeQuest(100101); cm.gainItem(4031059, -1); cm.gainItem(4031057) cm.dispose(); } else if (cm.getQuestStatus(100101).equals(MapleQuestStatus.Status.COMPLETED) && !(cm.haveItem(4031057))) { cm.sendOk ("Why would you dispose of such an important necklace? \r\nOh well, here, have another one.") cm.gainItem(4031057) } else if (cm.getQuestStatus(100101).equals(MapleQuestStatus.Status.STARTED)) { cm.sendOk("There is a secret passage near the ant tunnel. If you go into the passage, you will meet my other self. Beat him and bring the#b #t4031059##k to me."); } else { cm.sendOk("I was expecting you. A few days ago, I heard about you from #b#p2020013##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 meet my other self. Beat him and bring the #b#t4031059##k to me."); cm.startQuest(100101); } cm.dispose(); } else { cm.sendOk("You have chosen wisely."); cm.dispose(); } } } if (status == 1) { cm.sendNextPrev("It is an important and final choice. You will not be able to turn back."); } else if (status == 2) { cm.sendYesNo("Do you want to become a #rPirate#k?"); } else if (status == 3) { if (cm.getJob().equals(net.sf.odinms.client.MapleJob.BEGINNER)) cm.changeJob(net.sf.odinms.client.MapleJob.PIRATE); cm.getChar().gainSp(1); cm.gainItem(2330000,1000); cm.gainItem(1492000,1); cm.gainItem(1482000,1); cm.sendOk("So be it! Now go, and go with pride."); cm.dispose(); } else if (status == 11) { cm.sendNext("Okay, now I'll take you to the test room. Here are the instructions: defeat the Octopirates and gather up #b15 Potent Wind Crystals#k. The Octopirates you'll see here are highly trained and very storng, so I suggest you really buckle down and get ready for this."); } else if (status == 12) { cm.sendNextPrev("Oh, and for the sake of training Gunslingers, those Octos will not be affected unless hit with #bDouble Shot#k. And one more thing, when you enter the test room, I'll remove all the Potent Power Crystal you have. Yes, you'll be starting off from scratch."); } else if (status == 13) { cm.removeAll(4031857); cm.removeAll(4031856); cm.warp(108000500); } else if (status == 16) { cm.sendNext("Okay, now I'll take you to the test room. Here are the instructions: defeat the Octopirates and gather up #b15 Potent Power Crystals#k. The Octopirates you'll see here are highly trained and very storng, so I suggest you really buckle down and get ready for this.") } else if (status == 17) { cm.sendNextPrev("Oh, and for the sake of training Brawlers, those Octos will not be affected unless hit with #bFlash Fist#k. And one more thing, when you enter the test room, I'll remove all the Potent Power Crystal you have. Yes, you'll be starting off from scratch."); } else if (status == 18) { cm.removeAll(4031857); cm.removeAll(4031856); cm.warp(108000502); } else if (status == 21) { cm.sendNext("From here on out, you are a #bGunslinger#k. Gunslingers are notable for their long-range attacks with sniper-like accuracy and of course, using Guns as their primary weapon. You should continue training to truly master your skills. If you are having trouble training, I'll be there to help."); cm.changeJob(net.sf.odinms.client.MapleJob.GUNSLINGER); cm.getChar().gainAp(5); cm.getChar().gainSp(1); cm.removeAll(4031857); } else if (status == 22) { cm.sendNext("I have just given you a skill book that entails the skills for Gunslingers, one that you'll find very helpful. I also boosted your MaxHP and MaxMP. Check it out for yourself."); } else if (status == 23) { cm.sendNextPrev("I have given you a little bit of #bSP#k, so I suggest you open the #bskill menu#k right now. You'll be able to enhance your newly-acquired 2nd job skills. Beware that not all skills can be enhanced from the get go. There are some skills that you can only acquire after mastering basic skills."); } else if (status == 24) { cm.sendNextPrev("Gunslingers are deadly at range combat, but that doesn't mean they have the right to bully the weak. Gunslingers will need to use their immense power in positive ways, and that is actually harder than just training to gain strength. I hope you follow this creed as you leave your mark in this world as a Gunslinger. I will see you when you have accomplished everything you can as a Gunslinger. I'll be waiting for you here."); } else if (status == 31) { cm.sendNext("From here on out, you are a #bBrawler#k. Brawlers rule the world with the power of their bare firsts... Which means they need to train the body more than others. If you have any trouble training, I'll be more than happy to help."); cm.changeJob(net.sf.odinms.client.MapleJob.BRAWLER); cm.getChar().gainAp(5); cm.getChar().gainSp(1); cm.removeAll(4031856); } else if (status == 32) { cm.sendNext("I have just given you a skill book that entails Brawler skills, you'll find it very helpful. I also boosted your MaxHP and MaxMP. Check it out for yourself."); } else if (status == 33) { cm.sendNextPrev("I have given you a little bit of #bSP#k, so I suggest you open the #bskill menu#k right now. You'll be able to enhance your newly-acquired 2nd job skills. Beware that not all skills can be enhanced from the get go. There are some skills that you can only acquire after mastering basic skills."); } else if (status == 34) { cm.sendNextPrev("Brawlers need to be a powerful force, but that doesn't mean they have the right to bully the weak. True Brawlers use their immense power in positive ways, which is much harder than just training to gain strength. I hope you follow this creed as you leave your mark in this world as a Brawler. I will see you when you have accomplished everything you can as a Brawler. I'll be waiting for you here."); } } }
Kyrin - Inside the test map (1072008.js)
Spoiler:Code:/*Kyrin - Pirate Test room 108000500-108000503 Made by Cygnus */ var status = 0; function start() { status = -1; action(1, 0, 0); } function action(mode, type, selection) { if (mode == -1) { cm.dispose(); } else { if (mode == 1) status++; else status--; if (status == 0) { if ((cm.getPlayer().getMapId() == 108000502) && cm.haveItem(4031856,15)) { cm.sendNext("Ohhh... So you managed to gather up #r15 Potent Power Crystals#k! Wasn't it tough? That's amazing... Alright then, now let's talk about The Nautilus."); } else if ((cm.getPlayer().getMapId() == 108000502) && !(cm.haveItem(4031856,15))) { cm.sendNext("You will have to collect me #v4031856##r15 Potent Power Crystals#k. Good luck."); status = 5 } else if ((cm.getPlayer().getMapId() == 108000500) && cm.haveItem(4031857,15)) cm.sendNext("Ohhh... So you managed to gather up #b15 Potent Wind Crystal#k! Wasn't it tough? That's amazing... Alright then, now let's talk about The Nautilus."); else if ((cm.getPlayer().getMapId() == 108000500) && !(cm.haveItem(4031857,15))){ cm.sendNext("You will have to collect me #v4031857##b15 Potent Wind Crystal#k. Good luck."); status = 5 } else { cm.sendOk("Uwotm8") cm.dispose(); } } else if (status == 1) { cm.sendNextPrev("These crystals can only be used here, so I'll just take them back."); } else if (status == 2) { cm.warp(120000101, 0); cm.dispose(); } else if (status == 6) { cm.dispose } } }
Pedro 3rd Job Adv NPC (2020013.js)
Spoiler:Code:/* Pedro - El Nath: Chief's Residence (211000001) Made By Cygnus */ importPackage(net.sf.odinms.client); status = -1; var job; var sel; actionx = {"Mental" : false, "Physical" : false}; function start() { if (!(cm.getJob().equals(MapleJob.BRAWLER) || cm.getJob().equals(MapleJob.GUNSLINGER))){ cm.sendOk("May #rSimplicity#k be with you!"); cm.dispose(); return; }else if (cm.getLevel() <=69){ cm.sendOk("You're not ready yet..."); cm.dispose(); return; } if (cm.haveItem(4031058)) actionx["Mental"] = true; else if (cm.haveItem(4031057)) actionx["Physical"] = true; cm.sendSimple("Can I help you#b " + cm.getPlayer().getName() + "#k?\r\n#L0#I want to make the 3rd job advancement."); //\r\n#L1#Please allow me to do the Zakum Dungeon Quest } function action(mode, type, selection){ status++; if (mode == 0 && type == 0) { status -= 2; } else if ((mode != 1) || (status > 2 && !actionx["Mental"]) || (status > 3)) { if (mode == 0 && type == 1) cm.sendNext("Make up your mind."); cm.dispose(); return; } if (actionx["Mental"]) { if (status == 0) cm.sendNext("Great job completing the mental part of the test. You have wisely answered all the questions correctly. I must say, I am quite impressed with the level of wisdom you have displayed there. Please hand me the necklace first, before we take on the next step."); else if (status == 1) cm.sendYesNo("Great! You may now become the kind of Pirate you've always dreamed of! With newfound power and stellar new skills, your power has endless possibilities! Before we proceed, however, please check and see that you have used up all your Skill Points. You must use up all the SP's you've earned up to Level 70 in order for you to make the 3rd job advancement. Since you've already chosen which of the two paths you wanted to take for Pirates for the 2nd job advancement, this will not require much thought. Do you wish to make the job advancement right now?"); else if (status == 2) { if (cm.getPlayer().getRemainingSp() > 0) if (cm.getPlayer().getRemainingSp() > (cm.getLevel() - 70) * 3) { cm.sendNext("Please, use all your SP before continuing."); cm.dispose(); return; } cm.completeQuest(100102); if (cm.getJob().equals(MapleJob.BRAWLER)) { cm.changeJob(MapleJob.MARAUDER); cm.getChar().gainAp(5); cm.getChar().gainSp(1); cm.gainItem(4031058, -1); cm.sendNext("Great! You are now a #bMarauder#k. As a Marauder, you will learn some of the most sophisticated skills related to melee-based attacks. #bEnergy Charge#k is a skill that allows you to store your power and the damage you received into a special form of energy. Once this ball of energy is charged, you may use #bEnergy Blast#k to apply maximum damage against your enemies, and also use #bEnergy Drain#k to steal your enemy's HP to recover your own. #bTransformation#k will allow you to transform into a superhuman being with devastating melee attacks, and while transformed, you can use #bShockwave#k to cause a mini-earthquake and inflict massive damage to your enemies."); } if (cm.getJob().equals(MapleJob.GUNSLINGER)) { cm.changeJob(MapleJob.OUTLAW); cm.getChar().gainAp(5); cm.getChar().gainSp(1); cm.gainItem(4031058, -1); cm.sendNext("Great! You are now an #bOutlaw#k. As an Outlaw, you will become a true pistolero, a master of every known Gun attack, as well as a few other skills to help you vanquish evil. #bBurst Fire#k is a more powerful version of Double Shot, shooting more bullets and causing more damage at the same time. You also now have the ability to summon a loyal #bOctopus#k and the swooping #bGaviota#k as your trusty allies, while attacking your enemies using #bBullseye#k. You can also use element-based attacks by using #rFlamethrower#k and #bIce Splitter#k.") } } else if (status == 3) { cm.sendNext("I have also given you Skill Points and Ability Points, so please apply them when you get a chance. Now that you have made the job advancement, I believe you have now become a formidable Pirate. Remember, though, that this will open up a whole new set of difficult journeys for you to take. Come see me when you feel like you have reached the pinnacle of your current Pirate skills, and have nothing else to train for. Then, and only then, will I help you obtain ultimate power.") } } else if (actionx["Physical"]){ if (status == 0) cm.sendNext("Great job completing the mental part of the test. You have wisely answered all the questions correctly. I must say, I am quite impressed with the level of wisdom you have displayed there. Please hand me the necklace first, before we take on the next step."); else if (status == 1) { if (cm.haveItem(4031057)) { cm.gainItem(4031057, -1); cm.completeQuest(100101); cm.startQuest(100102) } cm.sendNext("Here's the 2nd half of the test. This test will determine whether you are smart enough to take the next step towards greatness. There is a dark, snow-covered area called the Holy Ground at the snowfield in Ossyria, where even the monsters can't reach. On the center of the area lies a huge stone called the Holy Stone. You'll need to offer a special item as the sacrifice, then the Holy Stone will test your wisdom right there on the spot."); } else if (status == 2) cm.sendOk("You'll need to answer each and every question given to you with honesty and conviction. If you correctly answer all the questions, then the Holy Stone will formally accept you and hand you #b#t4031058##k. Bring back the necklace, and I will help you to the next step forward. Good luck."); } else if (cm.getQuestStatus(100102).equals(MapleQuestStatus.Status.STARTED)){ cm.sendOk("Go, talk with the #b#p2030006##k and bring me #i4031058# \r\n#b#t4031058##k."); cm.dispose(); } else if (cm.getQuestStatus(100101).equals(MapleQuestStatus.Status.COMPLETED)) { cm.sendOk("Now, go see #b#p2030006##k and bring me #b#i4031058#\r\n#t4031058##k.You'll need to answer the #b#p2030006#s#k each and every question with honesty and conviction. Bring back the necklace, and I will help you to the next step forward. Good luck."); cm.dispose(); } else if (cm.getQuestStatus(100100).equals(MapleQuestStatus.Status.STARTED)) { cm.sendOk("The mental half of the test can only start after you pass the physical part of the test. #b#t4031057##k will be the proof that you have indeed passed the test. I'll let \r\n#b#p1090000##k know in advance that you're making your way there, so get ready. It won't be easy, but I have the utmost faith in you. Good luck."); cm.dispose(); } else { if (sel == undefined) sel = selection; if (sel == 0){ if (cm.getPlayer().getLevel() >= 70 && cm.getJob().equals(MapleJob.BRAWLER) || cm.getJob().equals(MapleJob.GUNSLINGER)) { if (status == 0) cm.sendYesNo("Hmm. So you want to be a stronger pirate by making the 3rd job advancement? First i can say congratulations. Few have this level of dedication. I can certainly make you stronger with my powers, but I'll need to test your strength to see if your training has been adequate. Many come professing their strength, few are actually able to prove it. Are you ready for me to test your strength?"); else if (status == 1) { cm.sendNext("Great! Now you will have to prove your strength and intelligence. Let me first explain the strength test. Do you remember #bKyrin#k from The Nautilus who helped you make the 1st and 2nd job advancements? Go to see her and she will give you a task to fulfill. Complete the task and you will receive #bThe Necklace of Strength#k from Kyrin."); cm.startQuest(100100); } } } else { cm.sendNext("Not done yet."); cm.dispose(); } }
Edit; Forgot to add, this is most likely only useful for v.62 servers, i don't know whether or not higher versions have these features or not.


Reply With Quote


