Initial re-upload

This commit is contained in:
2024-01-19 03:56:28 -05:00
commit 170dac174c
25040 changed files with 16444288 additions and 0 deletions

70
scripts/npc/1002000.js Normal file

File diff suppressed because one or more lines are too long

74
scripts/npc/1002002.js Normal file
View File

@@ -0,0 +1,74 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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: Xterminator
NPC Name: Pison
Map(s): Victoria Road : Lith Harbor (104000000)
Description: Florina Beach Tour Guide
*/
var status = 0;
function start() {
cm.sendSimple("Have you heard of the beach with a spectacular view of the ocean called #bFlorina Beach#k, located near Lith Harbor? I can take you there right now for either #b1500 mesos#k, or if you have a #bVIP Ticket to Florina Beach#k with you, in which case you'll be there for free.\r\n\r\n#L0##b I'll pay 1500 mesos.#l\r\n#L1# I have a VIP Ticket to Florina Beach.#l\r\n#L2# What is a VIP Ticket to Florina Beach#k?#l");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if ((mode == 0 && type == 1) || mode == -1 || (mode == 0 && status == 1)) {
if (type == 1) {
cm.sendNext("You must have some business to take care of here. You must be tired from all that traveling and hunting. Go take some rest, and if you feel like changing your mind, then come talk to me.");
}
cm.dispose();
return;
} else {
status -= 2;
}
}
if (selection == 0) {
status++;
}
if (status == 1) {
if (selection == 1) {
cm.sendYesNo("So you have a #bVIP Ticket to Florina Beach#k? You can always head over to Florina Beach with that. Alright then, but just be aware that you may be running into some monsters there too. Okay, would you like to head over to Florina Beach right now?");
} else if (selection == 2) {
cm.sendNext("You must be curious about a #bVIP Ticket to Florina Beach#k. Haha, that's very understandable. A VIP Ticket to Florina Beach is an item where as long as you have in possession, you may make your way to Florina Beach for free. It's such a rare item that even we had to buy those, but unfortunately I lost mine a few weeks ago during my precious summer break.");
}
} else if (status == 2) {
if (type != 1 && selection != 0) {
cm.sendNextPrev("I came back without it, and it just feels awful not having it. Hopefully someone picked it up and put it somewhere safe. Anyway, this is my story and who knows, you may be able to pick it up and put it to good use. If you have any questions, feel free to ask.");
cm.dispose();
} else {
if (cm.getMeso() < 1500 && selection == 0) {
cm.sendNext("I think you're lacking mesos. There are many ways to gather up some money, you know, like... selling your armor... defeating monsters... doing quests... you know what I'm talking about.");
} else if (!cm.haveItem(4031134) && selection != 0) {
cm.sendNext("Hmmm, so where exactly is your #bVIP Ticket to Florina\r\nBeach#k? Are you sure you have one? Please double-check.");
} else {
if (selection == 0) {
cm.gainMeso(-1500);
}
cm.getPlayer().saveLocation("FLORINA");
cm.warp(110000000, "st00");
}
cm.dispose();
}
}
}

70
scripts/npc/1002003.js Normal file
View File

@@ -0,0 +1,70 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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: Xterminator
NPC Name: Mr. Goldstein
Map(s): Victoria Road : Lith Harbour (104000000)
Description: Extends Buddy List
*/
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 0 && mode == 0) {
cm.sendNext("I see... you don't have as many friends as I thought you would. Hahaha, just kidding! Anyway if you feel like changing your mind, please feel free to come back and we'll talk business. If you make a lot of friends, then you know ... hehe ...");
cm.dispose();
return;
} else if (status >= 1 && mode == 0) {
cm.sendNext("I see... I don't think you don't have as many friends as I thought you would. If not, you just don't have 240,000 mesos with you right this minute? Anyway, if you ever change your mind, come back and we'll talk business. That is, of course, once you have get some financial relief. .. hehe ...");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendYesNo("I hope I can make as much as yesterday... well, hello! Don't you want to extend your buddy list? You look like someone who'd have a whole lot of friends... well, what do you think? With some money I can make it happen for you. Remember, though, it only applies to one character at a time, so it won't affect any of your other characters on your account. Do you want to extend your buddy list?");
} else if (status == 1) {
cm.sendYesNo("Alright, good call! It's not that expensive actually. #b240,000 mesos and I'll add 5 more slots to your buddy list#k. And no, I won't be selling them individually. Once you buy it, it's going to be permanently on your buddy list. So if you're one of those that needs more space there, then you might as well do it. What do you think? Will you spend 240,000 mesos for it?");
} else if (status == 2) {
var capacity = cm.getPlayer().getBuddylist().getCapacity();
if (capacity >= 50 || cm.getMeso() < 240000) {
cm.sendNext("Hey... are you sure you have #b240,000 mesos#k? If so, then check and see if you have extended your buddy list to the max. Even if you pay up, the most you can have on your buddy list is #b50#k.");
cm.dispose();
} else {
var newcapacity = capacity + 5;
cm.gainMeso(-240000);
cm.getPlayer().setBuddyCapacity(newcapacity)
cm.sendOk("Alright! Your buddy list will have 5 extra slots by now. Check and see for it yourself. And if you still need more room on your buddy list, you know who to find. Of course, it isn't going to be for free ... well, so long ...");
cm.dispose();
}
}
}
}

61
scripts/npc/1002004.js Normal file
View File

@@ -0,0 +1,61 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
VIP Cab - Victoria Road : Lith Harbor (104000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var cost = 10000;
function start() {
cm.sendNext("Hi there! This cab is for VIP customers only. Instead of just taking you to different towns like the regular cabs, we offer a much better service worthy of VIP class. It's a bit pricey, but... for only 10,000 mesos, we'll take you safely to the \r\n#bAnt Tunnel#k.");
}
function action(mode, type, selection) {
status++;
if (mode == -1) {
cm.dispose();
return;
} else if (mode == 0) {
cm.sendOk("This town also has a lot to offer. Find us if and when you feel the need to go to the Ant Tunnel Park.");
cm.dispose();
return;
}
if (status == 1) {
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
cost /= ((cm.getJobId() == 0) ? 10 : 1);
} else if (status == 2) {
if (cm.getMeso() < cost) {
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
} else {
cm.gainMeso(-cost);
cm.warp(105070001);
}
cm.dispose();
}
}

25
scripts/npc/1002005.js Normal file
View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.getPlayer().getStorage().sendStorage(cm.getClient(), 1002005);
cm.dispose();
}

25
scripts/npc/1002006.js Normal file
View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.sendNext("Hi, I'm #b#p1002006##k. Nice to meet you.")
cm.dispose();
}

70
scripts/npc/1002007.js Normal file
View File

@@ -0,0 +1,70 @@
var status = 0;
var maps = [100000000, 102000000, 101000000, 103000000, 120000000];
var cost = [1000, 1000, 800, 1000, 800];
var selectedMap = -1;
var mesos;
function start() {
if (cm.hasItem(4032313, 1)) {
cm.sendNext("I see that you have a coupon to go to Henesys. One moment, I'll bring you there right over!");
} else {
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
}
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 1 && mode == 0) {
cm.dispose();
return;
} else if (status >= 2 && mode == 0) {
cm.sendNext("There's a lot to see in this town, too. Come back and find us when you need to go to a different town.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
if (cm.hasItem(4032313, 1)) {
cm.gainItem(4032313, -1);
cm.warp(maps[0], 0);
cm.dispose();
return;
}
var selStr = "";
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

77
scripts/npc/1002100.js Normal file
View File

@@ -0,0 +1,77 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
// Jane the Alchemist
var status = -1;
var amount = -1;
var items = [[2000002, 310], [2022003, 1060], [2022000, 1600], [2001000, 3120]];
var item;
function start() {
if (cm.isQuestCompleted(2013)) {
cm.sendNext("It's you ... thanks to you I was able to get a lot done. Nowadays I've been making a bunch of items. If you need anything let me know.");
} else {
if (cm.isQuestCompleted(2010)) {
cm.sendNext("You don't seem strong enough to be able to purchase my potion ...");
} else {
cm.sendOk("My dream is to travel everywhere, much like you. My father, however, does not allow me to do it, because he thinks it's very dangerous. He may say yes, though, if I show him some sort of a proof that I'm not the weak girl that he thinks I am ...");
}
cm.dispose();
}
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == 0 && type == 1) {
cm.sendNext("I still have quite a few of the materials you got me before. The items are all there so take your time choosing.");
}
cm.dispose();
return;
}
if (status == 0) {
var selStr = "Which item would you like to buy?#b";
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##i" + items[i][0] + "# (Price : " + items[i][1] + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 1) {
item = items[selection];
var recHpMp = ["300 HP.", "1000 HP.", "800 MP", "1000 HP and MP."];
cm.sendGetNumber("You want #b#t" + item[0] + "##k? #t" + item[0] + "# allows you to recover " + recHpMp[selection] + " How many would you like to buy?", 1, 1, 100);
} else if (status == 2) {
cm.sendYesNo("Will you purchase #r" + selection + "#k #b#t" + item[0] + "#(s)#k? #t" + item[0] + "# costs " + item[1] + " mesos for one, so the total comes out to be #r" + (item[1] * selection) + "#k mesos.");
amount = selection;
} else if (status == 3) {
if (cm.getMeso() < item[1] * amount) {
cm.sendNext("Are you lacking mesos by any chance? Please check and see if you have an empty slot available at your etc. inventory, and if you have at least #r" + (item[1] * selectedItem) + "#k mesos with you.");
} else {
if (cm.canHold(item[0])) {
cm.gainMeso(-item[1] * amount);
cm.gainItem(item[0], amount);
cm.sendNext("Thank you for coming. Stuff here can always be made so if you need something, please come again.");
} else {
cm.sendNext("Please check and see if you have an empty slot available at your etc. inventory.");
}
}
cm.dispose();
}
}

59
scripts/npc/1012000.js Normal file
View File

@@ -0,0 +1,59 @@
var status = 0;
var maps = [104000000, 102000000, 101000000, 103000000, 120000000];
var cost = [1000, 1000, 800, 1000, 800];
var selectedMap = -1;
var mesos;
function start() {
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 1 && mode == 0) {
cm.dispose();
return;
} else if (status >= 2 && mode == 0) {
cm.sendNext("There's a lot to see in this town, too. Come back and find us when you need to go to a different town.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

218
scripts/npc/1012002.js Normal file
View File

@@ -0,0 +1,218 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Vicious
Victoria Road : Henesys Market (100000100)
Refining NPC:
* Bows - 10-40
* Crossbows - 12-50
* Archer Gloves - 10-60 + upgrades
* Processed Wood/Screws
* Arrows/Bronze Arrows/Steel Arrows
*/
var status = -1;
var selectedType = -1;
var selectedItem = -1;
var item;
var items;
var mats;
var matQty;
var cost;
var qty = 1;
var equip;
function start() {
cm.getPlayer().setCS(true);
var selStr = "Hello. I am Vicious, retired Sniper. However, I used to be the top student of Athena Pierce. Though I no longer hunt, I can make some archer items that will be useful for you...#b"
var options = ["Create a bow", "Create a crossbow", "Make a glove", "Upgrade a glove", "Create materials", "Create Arrows"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
cm.dispose();
return;
}
if (status == 0) {
if (selection == 0) { //bow refine
var selStr = "I may have been a Sniper, but bows and crossbows aren't too much different. Anyway, which would you like to make?#b";
items = [1452002, 1452003, 1452001, 1452000, 1452005, 1452006, 1452007];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k - Bowman Lv. " + (10 + (i * 5)) + "#l#b";
}
} else if (selection == 1) { //xbow refine
var selStr = "I was a Sniper. Crossbows are my specialty. Which would you like me to make for you?#b";
items = [1462001, 1462002, 1462003, 1462000, 1462004, 1462005, 1462006, 1462007];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k - Bowman Lv. " + (10 + (i * 5)) + "#l#b";
}
} else if (selection == 2) { //glove refine
var selStr = "Okay, so which glove do you want me to make?#b";
items = [1082012, 1082013, 1082016, 1082048, 1082068, 1082071, 1082084, 1082089];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k - Bowman Lv. " + (15 + (i * 5) > 40 ? ((i - 1) * 10) : 15 + (i * 5)) + "#l#b";
}
} else if (selection == 3) { //glove upgrade
var selStr = "Upgrade a glove? That shouldn't be too difficult. Which did you have in mind?#b";
items = [1082015, 1082014, 1082017, 1082018, 1082049, 1082050, 1082069, 1082070, 1082072, 1082073, 1082085, 1082083, 1082090, 1082091];
for (var i = 0, x = 0; i < items.length; i++, x += (i + 1) % 2 == 0 ? 1 : 0) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##k" + "##k - Bowman Lv. " + (20 + (x * 5) > 40 ? ((x - 1) * 10) : 20 + (x * 5)) + "#l#b";
}
} else if (selection == 4) { //material refine
var selStr = "Materials? I know of a few materials that I can make for you...#b";
var materials = ["Make Processed Wood with Tree Branch", "Make Processed Wood with Firewood", "Make Screws (packs of 15)"];
for (var i = 0; i < materials.length; i++) {
selStr += "\r\n#L" + i + "# " + materials[i] + "#l";
}
} else if (selection == 5) { //arrow refine
var selStr = "Arrows? Not a problem at all.#b";
items = [2060000, 2061000, 2060001, 2061001, 2060002, 2061002];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "##t" + items[i] + "##l";
}
}
selectedType = selection;
cm.sendSimple(selStr);
if (selection != 4) {
status++;
}
} else if (status == 1) {
selectedItem = selection;
items = [4003001, 4003001, 4003000];
var matSet = [4000003, 4000018, [4011000, 4011001]];
var matQtySet = [10, 5, [1, 1]];
item = items[selection];
mats = matSet[selection];
matQty = matQtySet[selection];
cost = 0;
cm.sendGetNumber("So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?", 1, 1, 100)
} else if (status == 2) {
if (selectedType != 4) {
selectedItem = selection;
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
} // thanks br1337 for showing such a simple exploit with quantity on NPC crafters
if (selectedType == 0) { //bow refine
var matSet = [[4003001, 4000000], [4011001, 4003000], [4003001, 4000016], [4011001, 4021006, 4003000], [4011001, 4011006, 4021003, 4021006, 4003000], [4011004, 4021000, 4021004, 4003000], [4021008, 4011001, 4011006, 4003000, 4000014]];
var matQtySet = [[5, 30], [1, 3], [30, 50], [2, 2, 8], [5, 5, 3, 3, 30], [7, 6, 3, 35], [1, 10, 3, 40, 50]];
var costSet = [800, 2000, 3000, 5000, 30000, 40000, 80000];
} else if (selectedType == 1) { //xbow refine
var matSet = [[4003001, 4003000], [4011001, 4003001, 4003000], [4011001, 4003001, 4003000], [4011001, 4021006, 4021002, 4003000], [4011001, 4011005, 4021006, 4003001, 4003000], [4021008, 4011001, 4011006, 4021006, 4003000], [4021008, 4011004, 4003001, 4003000], [4021008, 4011006, 4021006, 4003001, 4003000]];
var matQtySet = [[7, 2], [1, 20, 5], [1, 50, 8], [2, 1, 1, 10], [5, 5, 3, 50, 15], [1, 8, 4, 2, 30], [2, 6, 30, 30], [2, 5, 3, 40, 40]];
var costSet = [1000, 2000, 3000, 10000, 30000, 50000, 80000, 200000];
} else if (selectedType == 2) { //glove refine
var matSet = [[4000021, 4000009], [4000021, 4000009, 4011001], [4000021, 4000009, 4011006], [4000021, 4011006, 4021001], [4011000, 4011001, 4000021, 4003000], [4011001, 4021000, 4021002, 4000021, 4003000], [4011004, 4011006, 4021002, 4000030, 4003000], [4011006, 4011007, 4021006, 4000030, 4003000]];
var matQtySet = [[15, 20], [20, 20, 2], [40, 50, 2], [50, 2, 1], [1, 3, 60, 15], [3, 1, 3, 80, 25], [3, 1, 2, 40, 35], [2, 1, 8, 50, 50]];
var costSet = [5000, 10000, 15000, 20000, 30000, 40000, 50000, 70000];
} else if (selectedType == 3) { //glove upgrade
var matSet = [[1082013, 4021003], [1082013, 4021000], [1082016, 4021000], [1082016, 4021008], [1082048, 4021003], [1082048, 4021008], [1082068, 4011002], [1082068, 4011006], [1082071, 4011006], [1082071, 4021008], [1082084, 4011000, 4021000], [1082084, 4011006, 4021008], [1082089, 4021000, 4021007], [1082089, 4021007, 4021008]];
var matQtySet = [[1, 2], [1, 1], [1, 3], [1, 1], [1, 3], [1, 1], [1, 4], [1, 2], [1, 4], [1, 2], [1, 1, 5], [1, 2, 2], [1, 5, 1], [1, 2, 2]];
var costSet = [7000, 7000, 10000, 12000, 15000, 20000, 22000, 25000, 30000, 40000, 55000, 60000, 70000, 80000];
} else if (selectedType == 5) { //arrow refine
var matSet = [[4003001, 4003004], [4003001, 4003004], [4011000, 4003001, 4003004], [4011000, 4003001, 4003004], [4011001, 4003001, 4003005], [4011001, 4003001, 4003005]];
var matQtySet = [[1, 1], [1, 1], [1, 3, 10], [1, 3, 10], [1, 5, 15], [1, 5, 15]];
var costSet = [0, 0, 0, 0, 0, 0]
}
if (selectedType != 4) {
item = items[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1) {
prompt += "a #t" + item + "#?";
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + (matQty[i] * qty) + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + (matQty * qty) + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + (cost * qty) + " meso";
}
cm.sendYesNo(prompt);
} else if (status == 3) {
var complete = true;
if (cm.getMeso() < (cost * qty)) {
cm.sendOk("Sorry, but this is how I make my living. No meso, no item.");
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete) {
cm.sendOk("Surely you, of all people, would understand the value of having quality items? I can't do that without the items I require.");
} else {
var recvItem = item, recvQty;
if (item >= 2060000 && item <= 2060002) //bow arrows
{
recvQty = 1000 - (item - 2060000) * 100;
} else if (item >= 2061000 && item <= 2061002) //xbow arrows
{
recvQty = 1000 - (item - 2061000) * 100;
} else if (item == 4003000)//screws
{
recvQty = 15 * qty;
} else {
recvQty = qty;
}
if (cm.canHold(recvItem, recvQty)) {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -(matQty[i] * qty));
}
} else {
cm.gainItem(mats, -(matQty * qty));
}
cm.gainMeso(-(cost * qty));
cm.gainItem(recvItem, recvQty);
cm.sendOk("A perfect item, as usual. Come and see me if you need anything else.");
} else {
cm.sendOk("Please make sure you have room in your inventory, and talk to me again.");
}
}
cm.dispose();
}
}

158
scripts/npc/1012005.js Normal file
View File

@@ -0,0 +1,158 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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: Xterminator
NPC Name: Cloy
Map(s): Victoria Road : Henesys Park (100000200)
Description: Pet Master
*/
var status = -2;
var sel;
function start() {
status = -2
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 == -1) {
cm.sendNext("Hmm... are you raising one of my kids by any chance? I perfected a spell that uses Water of Life to blow life into a doll. People call it the #bPet#k. If you have one with you, feel free to ask me questions.");
} else if (status == 0) {
cm.sendSimple("What do you want to know more of?#b\r\n#L0#Tell me more about Pets.#l\r\n#L1#How do I raise Pets?#l\r\n#L2#Do Pets die too?#l\r\n#L3#What are the commands for Brown and Black Kitty?#l\r\n#L4#What are the commands for Brown Puppy?#l\r\n#L5#What are the commands for Pink and White Bunny?#l\r\n#L6#What are the commands for Mini Kargo?#l\r\n#L7#What are the commands for Rudolph and Dasher?#l\r\n#L8#What are the commands for Black Pig?#l\r\n#L9#What are the commands for Panda?#l\r\n#L10#What are the commands for Husky?#l\r\n#L11#What are the commands for Dino Boy and Dino Girl?#l\r\n#L12#What are the commands for Monkey?#l\r\n#L13#What are the commands for Turkey?#l\r\n#L14#What are the commands for White Tiger?#l\r\n#L15#What are the commands for Penguin?#l\r\n#L16#What are the commands for Golden Pig?#l\r\n#L17#What are the commands for Robot?#l\r\n#L18#What are the commands for Mini Yeti?#l\r\n#L19#What are the commands for Jr. Balrog?#l\r\n#L20#What are the commands for Baby Dragon?#l\r\n#L21#What are the commands for Green/Red/Blue Dragon?#l\r\n#L22#What are the commands for Black Dragon?#l\r\n#L23#What are the commands for Jr. Reaper?#l\r\n#L24#What are the commands for Porcupine?#l\r\n#L25#What are the commands for Snowman?#l\r\n#L26#What are the commands for Skunk?#l\r\n#L27#Please teach me about transferring pet ability points.#l");
} else if (status == 1) {
sel = selection;
if (selection == 0) {
status = 3;
cm.sendNext("So you want to know more about Pets. Long ago I made a doll, sprayed Water of Life on it, and cast spell on it to create a magical animal. I know it sounds unbelievable, but it's a doll that became an actual living thing. They understand and follow people very well.");
} else if (selection == 1) {
status = 6;
cm.sendNext("Depending on the command you give, pets can love it, hate, and display other kinds of reactions to it. If you give the pet a command and it follows you well, your intimacy goes up. Double click on the pet and you can check the intimacy, level, fullness and etc...");
} else if (selection == 2) {
status = 11;
cm.sendNext("Dying... well, they aren't technically ALIVE per se, so I don't know if dying is the right term to use. They are dolls with my magical power and the power of Water of Life to become a live object. Of course while it's alive, it's just like a live animal...");
} else if (selection == 3) {
cm.sendNext("These are the commands for #rBrown Kitty and Black Kitty#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bcutie#k (Level 10 ~ 30)\r\n#bup, stand, rise#k (Level 20 ~ 30)");
} else if (selection == 4) {
cm.sendNext("These are the commands for #rBrown Puppy#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, baddog, dummy#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpee#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bdown#k (Level 10 ~ 30)\r\n#bup, stand, rise#k (Level 20 ~ 30)");
} else if (selection == 5) {
cm.sendNext("These are the commands for #rPink Bunny and White Bunny#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bhug#k (Level 10 ~ 30)\r\n#bsleep, sleepy, gotobed#k (Level 20 ~ 30)");
} else if (selection == 6) {
cm.sendNext("These are the commands for #rMini Kargo#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpee#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 10 ~ 30)\r\n#bthelook, charisma#k (Level 10 ~ 30)\r\n#bdown#k (Level 10 ~ 30)\r\n#bgoodboy, goodgirl#k (Level 20 ~ 30)");
} else if (selection == 7) {
cm.sendNext("These are the commands for #rRudolph and Dasher#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bup, stand#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#bmerryxmas, merrychristmas#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#btalk, say, chat#k (Level 11 ~ 30)\r\n#blonely, alone#k (Level 11 ~ 30)\r\n#bcutie#k (Level 11 ~ 30)\r\n#bmush, go#k (Level 21 ~ 30)");
} else if (selection == 8) {
cm.sendNext("These are the commands for #rBlack Pig#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1~30)\r\n#bhand#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bsmile#k (Level 10 ~ 30)\r\n#bthelook, charisma#k (Level 20 ~ 30)");
} else if (selection == 9) {
cm.sendNext("These are the commands for #rPanda#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bchill, relax#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bletsplay#k (Level 10 ~ 30)\r\n#bmeh, bleh#k (Level 10 ~ 30)\r\n#bsleep#k (Level 20 ~ 30)");
} else if (selection == 10) {
cm.sendNext("These are the commands for #rHusky#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, baddog, dummy#k (Level 1 ~ 30)\r\n#bhand#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bdown#k (Level 10 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bup, stand, rise#k (Level 20 ~ 30)");
} else if (selection == 11) {
cm.sendNext("These are the commands for #rDino Boy and Dino Girl#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bsmile, laugh#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bcutie#k (Level 10 ~ 30)\r\n#bsleep, nap, sleepy#k (Level 20 ~ 30)");
} else if (selection == 12) {
cm.sendNext("These are the commands for #rMonkey#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#brest#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpee#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bup, stand#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bplay#k (Level 10 ~ 30)\r\n#bmelong#k (Level 10 ~ 30)\r\n#bsleep, gotobed, sleepy#k (Level 20 ~ 30)");
} else if (selection == 13) {
cm.sendNext("These are the commands for #rTurkey#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno, rudeboy, mischief#k (Level 1 ~ 30)\r\n#bstupid#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bup, stand#k (Level 1 ~ 30)\r\n#btalk, chat, gobble#k (Level 10 ~ 30)\r\n#byes, goodboy#k (Level 10 ~ 30)\r\n#bsleepy, birdnap, doze#k (Level 20 ~ 30)\r\n#bbirdeye, thanksgiving, fly, friedbird, imhungry#k (Level 30)");
} else if (selection == 14) {
cm.sendNext("These are the commands for #rWhite Tiger#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#brest, chill#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bactsad, sadlook#k (Level 10 ~ 30)\r\n#bwait#k (Level 20 ~ 30)");
} else if (selection == 15) {
cm.sendNext("These are the commands for #rPenguin#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 10 ~ 30)\r\n#bhug, hugme#k (Level 10 ~ 30)\r\n#bwing, hand#k (Level 10 ~ 30)\r\n#bsleep#k (Level 20 ~ 30)\r\n#bkiss, smooch, muah#k (Level 20 ~ 30)\r\n#bfly#k (Level 20 ~ 30)\r\n#bcute, adorable#k (Level 20 ~ 30)");
} else if (selection == 16) {
cm.sendNext("These are the commands for #rGolden Pig#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 11 ~ 30)\r\n#bloveme, hugme#k (Level 11 ~ 30)\r\n#bsleep, sleepy, gotobed#k (Level 21 ~ 30)\r\n#bignore / impressed / outofhere#k (Level 21 ~ 30)\r\n#broll, showmethemoney#k (Level 21 ~ 30)");
} else if (selection == 17) {
cm.sendNext("These are the commands for #rRobot#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bup, stand, rise#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#bbad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#battack, charge#k (Level 1 ~ 30)\r\n#biloveyou#k (Level 1 ~ 30)\r\n#bgood, thelook, charisma#k (Level 11 ~ 30)\r\n#bspeack, talk, chat, say#k (Level 11 ~ 30)\r\n#bdisguise, change, transform#k (Level 11 ~ 30)");
} else if (selection == 18) {
cm.sendNext("These are the commands for #rMini Yeti#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad, no, badboy, badgirl#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bdance, boogie, shakeit#k (Level 1 ~ 30)\r\n#bcute, cutie, pretty, adorable#k (Level 1 ~ 30)\r\n#biloveyou, likeyou, mylove#k (Level 1 ~ 30)\r\n#btalk, chat, say#k (Level 11 ~ 30)\r\n#bsleep, nap, sleepy, gotobed#k (Level 11 ~ 30)");
} else if (selection == 19) {
cm.sendNext("These are the commands for #rJr. Balrog#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bliedown#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#biloveyou|mylove|likeyou#k (Level 1 ~ 30)\r\n#bcute|cutie|pretty|adorable#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bsmirk|crooked|laugh#k (Level 1 ~ 30)\r\n#bmelong#k (Level 11 ~ 30)\r\n#bgood|thelook|charisma#k (Level 11 ~ 30)\r\n#bspeak|talk|chat|say#k (Level 11 ~ 30)\r\n#bsleep|nap|sleepy#k (Level 11 ~ 30)\r\n#bgas#k (Level 21 ~ 30)");
} else if (selection == 20) {
cm.sendNext("These are the commands for #rBaby Dragon#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#biloveyou|loveyou#k (Level 1 ~ 30)\r\n#bpoop#k (Level 1 ~ 30)\r\n#bstupid|ihateyou|dummy#k (Level 1 ~ 30)\r\n#bcutie#k (Level 11 ~ 30)\r\n#btalk|chat|say#k (Level 11 ~ 30)\r\n#bsleep|sleepy|gotobed#k (Level 11 ~ 30)");
} else if (selection == 21) {
cm.sendNext("These are the commands for #rGreen/Red/Blue Dragon#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 15 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 15 ~ 30)\r\n#biloveyou|loveyou#k (Level 15 ~ 30)\r\n#bpoop#k (Level 15 ~ 30)\r\n#bstupid|ihateyou|dummy#k (Level 15 ~ 30)\r\n#btalk|chat|say#k (Level 15 ~ 30)\r\n#bsleep|sleepy|gotobed#k (Level 15 ~ 30)\r\n#bchange#k (Level 21 ~ 30)");
} else if (selection == 22) {
cm.sendNext("These are the commands for #rBlack Dragon#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 15 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 15 ~ 30)\r\n#biloveyou|loveyou#k (Level 15 ~ 30)\r\n#bpoop#k (Level 15 ~ 30)\r\n#bstupid|ihateyou|dummy#k (Level 15 ~ 30)\r\n#btalk|chat|say#k (Level 15 ~ 30)\r\n#bsleep|sleepy|gotobed#k (Level 15 ~ 30)\r\n#bcutie, change#k (Level 21 ~ 30)");
} else if (selection == 23) {
cm.sendNext("These are the commands for #rJr. Reaper#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#bplaydead, poop#k (Level 1 ~ 30)\r\n#btalk|chat|say#k (Level 1 ~ 30)\r\n#biloveyou, hug#k (Level 1 ~ 30)\r\n#bsmellmyfeet, rockout, boo#k (Level 1 ~ 30)\r\n#btrickortreat#k (Level 1 ~ 30)\r\n#bmonstermash#k (Level 1 ~ 30)");
} else if (selection == 24) {
cm.sendNext("These are the commands for #rPorcupine#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bno|bad|badgirl|badboy#k (Level 1 ~ 30)\r\n#biloveyou|hug|goodboy#k (Level 1 ~ 30)\r\n#btalk|chat|say#k (Level 1 ~ 30)\r\n#bcushion|sleep|knit|poop#k (Level 1 ~ 30)\r\n#bcomb|beach#k (Level 10 ~ 30)\r\n#btreeninja#k (Level 20 ~ 30)\r\n#bdart#k (Level 20 ~ 30)");
} else if (selection == 25) {
cm.sendNext("These are the commands for #rSnowman#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bstupid, ihateyou, dummy#k (Level 1 ~ 30)\r\n#bloveyou, mylove, ilikeyou#k (Level 1 ~ 30)\r\n#bmerrychristmas#k (Level 1 ~ 30)\r\n#bcutie, adorable, cute, pretty#k (Level 1 ~ 30)\r\n#bcomb, beach/bad, no, badgirl, badboy#k (Level 1 ~ 30)\r\n#btalk, chat, say/sleep, sleepy, gotobed#k (Level 10 ~ 30)\r\n#bchang#k (Level 20 ~ 30)");
} else if (selection == 26) {
cm.sendNext("These are the commands for #rSkunk#k. The level mentioned next to the command shows the pet level required for it to respond.\r\n#bsit#k (Level 1 ~ 30)\r\n#bbad/no/badgirl/badboy#k (Level 1 ~ 30)\r\n#brestandrelax, poop#k (Level 1 ~ 30)\r\n#btalk/chat/say, iloveyou#k (Level 1 ~ 30)\r\n#bsnuggle/hug, sleep, goodboy#k (Level 1 ~ 30)\r\n#bfatty, blind, badbreath#k (Level 10 ~ 30)\r\n#bsuitup, bringthefunk#k (Level 20 ~ 30)");
} else if (selection == 27) {
status = 14;
cm.sendNext("In order to transfer the pet ability points, closeness and level, Pet AP Reset Scroll is required. If you take this\r\nscroll to Mar the Fairy in Ellinia, she will transfer the level and closeness of the pet to another one. I am especially giving it to you because I can feel your heart for your pet. However, I can't give this out for free. I can give you this book for 250,000 mesos. Oh, I almost forgot! Even if you have this book, it is no use if you do not have a new pet to transfer the Ability points.");
}
if (selection > 2 && selection < 27) {
cm.dispose();
}
} else if (status == 2) {
if (sel == 0) {
cm.sendNextPrev("But Water of Life only comes out little at the very bottom of the World Tree, so I can't give him too much time in life... I know, it's very unfortunate... but even if it becomes a doll again I can always bring life back into it so be good to it while you're with it.");
} else if (sel == 1) {
cm.sendNextPrev("Talk to the pet, pay attention to it and its intimacy level will go up and eventually his overall level will go up too. As the intimacy level rises, the pet's overall level will rise soon after. As the overall level rises, one day the pet may even talk like a person a little bit, so try hard raising it. Of course it won't be easy doing so...");
} else if (sel == 2) {
cm.sendNextPrev("After some time... that's correct, they stop moving. They just turn back to being a doll, after the effect of magic dies down and Water of Life dries out. But that doesn't mean it's stopped forever, because once you pour Water of Life over, it's going to be back alive.");
} else if (sel == 27) {
cm.sendYesNo("250,000 mesos will be deducted. Do you really want to buy?");
}
} else if (status == 3) {
if (sel == 0) {
cm.sendNextPrev("Oh yeah, they'll react when you give them special commands. You can scold them, love them... it all\r\ndepends on how you take care of them. They are afraid to leave their masters so be nice to them, show them love. They can get sad and lonely fast...");
} else if (sel == 1) {
cm.sendNextPrev("It may be a live doll but they also have life so they can feel the hunger too. #bFullness#k shows the level of hunger the pet's in. 100 is the max, and the lower it gets, it means that the pet is getting hungrier. After a while, it won't even follow your command and be on the offensive, so watch out over that.");
} else if (sel == 2) {
cm.sendNextPrev("Even if it someday moves again, it's sad to see them stop altogether. Please be nice to them while they are alive and moving. Feed them well, too. Isn't it nice to know that there's something alive that follows and listens to only you?");
} else if (sel == 27) {
if (cm.getMeso() < 250000 || !cm.canHold(4160011)) {
cm.sendOk("Please check if your inventory has empty slot or you don't have enough mesos.");
} else {
cm.gainMeso(-250000);
cm.gainItem(4160011, 1);
}
cm.dispose();
}
} else if (status == 4) {
if (sel != 1) {
cm.dispose();
}
cm.sendNextPrev("Oh yes! Pets can't eat the normal human food. Instead my disciple #bDoofus#k sells #bPet Food#k at the Henesys Market so if you need food for your pet, find Henesys. It'll be a good idea to buy the food in advance and feed the pet before it gets really hungry.");
} else if (status == 5) {
cm.sendNextPrev("Oh, and if you don't feed the pet for a long period of time, it goes back home by itself. You can take it out of its home and feed it but it's not really good for the pet's health, so try feeding him on a regular basis so it doesn't go down to that level, alright? I think this will do.");
} else {
cm.dispose();
}
}
}

59
scripts/npc/1012006.js Normal file
View File

@@ -0,0 +1,59 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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: Xterminator, Moogra
NPC Name: Trainer Bartos
Map(s): Victoria Road : Pet-Walking Road (100000202)
Description: Pet Trainer
*/
var status = 0;
function start() {
cm.sendSimple("Do you have any business with me?\r\n#L0##bPlease tell me about this place.#l\r\n#L1#I'm here through a word from Mar the Fairy...#k#l");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else if (mode == 0) {
cm.sendNext("Hmmm ... too busy to do it right now? If you feel like doing it, though, come back and find me.");
cm.dispose();
} else {
status++;
if (status == 1) {
if (selection == 0) {
if (cm.haveItem(4031035)) {
cm.sendNext("Get that letter, jump over obstacles with your pet, and take that letter to my brother Trainer Frod. Give him the letter and something good is going to happen to your pet.");
cm.dispose();
} else {
cm.sendYesNo("This is the road where you can go take a walk with your pet. You can just walk around with it, or you can train your pet to go through the obstacles here. If you aren't too close with your pet yet, that may present a problem and he will not follow your command as much... So, what do you think? Wanna train your pet?");
}
} else {
cm.sendOk("Hey, are you sure you've met #bMar the Fairy#k? Don't lie to me if you've never met her before because it's obvious. That wasn't even a good lie!!");
cm.dispose();
}
} else if (status == 2) {
cm.gainItem(4031035, 1);
cm.sendNext("Ok, here's the letter. He wouldn't know I sent you if you just went there straight, so go through the obstacles with your pet, go to the very top, and then talk to Trainer Frod to give him the letter. It won't be hard if you pay attention to your pet while going through obstacles. Good luck!");
cm.dispose();
}
}
}

51
scripts/npc/1012007.js Normal file
View File

@@ -0,0 +1,51 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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: Xterminator
NPC Name: Trainer Frod
Map(s): Victoria Road : Pet-Walking Road (100000202)
Description: Pet Trainer
*/
function start() {
if (cm.haveItem(4031035)) {
cm.sendNext("Eh, that's my brother's letter! Probably scolding me for thinking I'm not working and stuff...Eh? Ahhh...you followed my brother's advice and trained your pet and got up here, huh? Nice!! Since you worked hard to get here, I'll boost your intimacy level with your pet.");
} else {
cm.sendOk("My brother told me to take care of the pet obstacle course, but ... since I'm so far away from him, I can't help but wanting to goof around ...hehe, since I don't see him in sight, might as well just chill for a few minutes.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode < 1) {
cm.dispose();
} else {
if (cm.getPlayer().getNoPets() == 0) {
cm.sendNextPrev("Hmmm ... did you really get here with your pet? These obstacles are for pets. What are you here for without it?? Get outta here!");
} else {
cm.gainItem(4031035, -1);
cm.gainTameness(2);
cm.sendNextPrev("What do you think? Don't you think you have gotten much closer with your pet? If you have time, train your pet again on this obstacle course...of course, with my brother's permission.");
}
cm.dispose();
}
}

124
scripts/npc/1012008.js Normal file
View File

@@ -0,0 +1,124 @@
/*
* @Author - Sparrow
* @NPC - 1012008 - Casey the Game Master
* @Map - 100000203 - Henesys Game Park
*/
var status;
var current;
var omok = [4080000, 4080001, 4080002, 4080003, 4080004, 4080005];
var omok1piece = [4030000, 4030000, 4030000, 4030010, 4030011, 4030011];
var omok2piece = [4030001, 4030010, 4030011, 4030001, 4030010, 4030001];
var omokamount = 99;
var text = "The set also differs based on what kind of pieces you want to use for the game. Which set would you like to make?"
function start() {
current = 0;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1 && current > 0) {
cm.dispose();
return;
} else {
if (mode == 1) {
status++;
} else {
status--;
}
}
if (status == 0) {
cm.sendSimple("Hey, you look like you need a breather from all that hunting. You should be enjoying the life, just like I am. Well, if you have a couple of items, I can trade you for an item you can play minigames with. Now... what can I do for you?#b\r\n#L0#Create a minigame item#l\r\n#L1#Explain to me what the minigames are about#l#k");
} else if (status == 1) {
if (selection == 0) {
cm.sendSimple("You want to make the minigame item? Minigames aren't something you can just go ahead and play right off the bat. For each minigame, you'll need a specific set of items. Which minigame it em do you want to make?#b\r\n#L4#Omok Set#l\r\n#L5#A Set of Match Cards#l#k");
} else if (selection == 1) {
cm.sendSimple("You want to learn more about the minigames? Awesome! Ask me anything. Which minigame do you want to know more about?#b\r\n#L2#Omok#l\r\n#L3#Match Cards#l#k");
}
} else if (status == 2) {
if (selection == 2) {
current = 1;
cm.sendNext("Here are the rules for Omok, so listen carefully. Omok is a game in which you and your opponent take turns laying a piece on the table until someone finds a way to lay 5 consecutive pieces in a line, be it horizontal, diagonal, or vertical. For starters, only the ones with an #bOmok Set#k can open a game room.");
} else if (selection == 3) {
current = 2;
cm.sendNext("Here are the rules for Match Cards, so listen carefully. As the name suggests, Match Cards is simply finding a matching pair among the number of cards laid on the table. When all the matching pairs are found, then the person with more matching pairs will win the game. Just like Omok, you'll need #bA set of Match Cards#k to open the game room.");
} else if (selection == 4) {
current = 3;
cm.sendNext("You want to play #bOmok#k, huh? To play it, you'll need the Omok Set. Only the ones with that item can open the room for a game of Omok, and you can play this game almost anywhere except for a few places at the market place.");
} else if (selection == 5) {
current = 4;
if (cm.haveItem(4030012, 15)) {
cm.gainItem(4030012, -15);
cm.gainItem(4080100, 1);
cm.dispose();
} else {
cm.sendNext("You want #bA set of Match Cards#k? Hmm...to make A set of Match Cards, you'll need some #bMonster Cards#k. Monster Card can be obtained by taking out the monsters all around the island. Collect 15 Monster Cards and you can make a set of A set of Match Cards."); //Lmfao a set of A set xD
cm.dispose();
}
}
} else if (status == 3) {
if (current == 1) {
cm.sendNextPrev("Every game of Omok will cost you #r100 mesos#k. Even if you don't have an #bOmok Set#k, you can enter the room and play. However, if you don't possess 100 mesos, then you won't be allowed to enter in the room at all. The person opening the game room also needs 100 mesos to open the room (or else there's no game). If you run out of mesos during the game, then you're automatically kicked out of the room!");
} else if (current == 2) {
cm.sendNextPrev("Every game of Match Cards will cost you #r100 mesos#k. Even if you don't have #bA set of Match Cards#k, you can enter the room and play. However, if you don't possess 100 mesos, then you won't be allowed to enter in the room at all. The person opening the game room also needs 100 mesos to open the room (or else there's no game). If you run out of mesos during the game, then you're automatically kicked out of the room!");
} else if (current == 3) {
for (var i = 0; i < omok.length; i++) {
text += "\r\n#L" + i + "##b#t" + omok[i] + "##k#l";
}
cm.sendSimple(text);
}
} else if (status == 4) {
if (current == 1 || current == 2) {
cm.sendNextPrev("Enter the room, and when you're ready to play, click on #bReady#k.\r\nOnce the visitor clicks on #bReady#k, the room owner can press #bStart#k to begin the game. If an unwanted visitor walks in, and you don't want to play with that person, the room owner has the right to kick the visitor out of the room. There will be a square box with x written on the right of that person. Click on that for a cold goodbye, okay?"); //Oh yeah, because people WALK in Omok Rooms.
} else if (current == 3) {
if (cm.haveItem(omok1piece[selection], omokamount) && cm.haveItem(omok2piece[selection], omokamount) && cm.haveItem(4030009, 1)) {
cm.gainItem(omok1piece[selection], -omokamount);
cm.gainItem(omok2piece[selection], -omokamount);
cm.gainItem(4030009, -1);
cm.gainItem(omok[selection], 1);
cm.dispose();
} else {
cm.sendNext("#bYou want to make #t" + omok[selection] + "##k? Hmm...get me the materials, and I can do just that. Listen carefully, the materials you need will be: #r" + omokamount + " #t" + omok1piece[selection] + "#, " + omokamount + " #t" + omok2piece[selection] + "#, 1 #t" + 4030009 + "##k. The monsters will probrably drop those every once in a while...");
cm.dispose();
}
}
} else if (status == 5) {
if (current == 1) {
cm.sendNextPrev("When the first game starts, #bthe room owner goes first#k. Beward that you'll be given a time limit, and you may lose your turn if you don't make your move on time. Normally, 3 x 3 is not allowed, but if there comes a point that it's absolutely necessary to put your piece there or face ending the game, then you can put it there. 3 x 3 is allowed as the last line of defense! Oh, and it won't count if it's #r6 or 7 straight#k. Only 5!");
} else if (current == 2) {
cm.sendNextPrev("Oh, and unlike Omok, when you create the game room for Match Cards, you'll need to set your game on the number of cards you'll use for the game. There are 3 modes avaliable, 3x4, 4x5, and 5x6, which will require 12, 20, and 30 cards respectively. Remember that you won't beable to change it up once the room is open, so if you really wish to change it up, you may have to close the room and open another one.");
}
} else if (status == 6) {
if (current == 1) {
cm.sendNextPrev("If you know your back is against the wall, you can request a #bRedo#k. If the opponent accepts your request, then you and your opponent's last moves will cancel out. If you ever feel the need to go to the bathroom, or take an extended break, you can request a #btie#k. The game will end in a tie if the opponent accepts the request. Tip: this may be a good way to keep your friendships in tact.");
} else if (current == 2) {
cm.sendNextPrev("When the first game starts, #bthe room owner goes first.#k Beware that you'll be given a time limit, and you may lose your turn if you don't make your move on time. When you find a matching pair on your turn, you'll get to keep your turn, as long as you keep finding a pair of matching cards. Use your memorizing skills to make a streak.");
}
} else if (status == 7) {
if (current == 1) {
cm.sendPrev("When the next game starts, the loser will go first. Also, no one is allowed to leave in the middle of a game. If you do, you may need to request either a #bforfeit or tie#k. (Of course, if you request a forfeit, you'll lose the game.) And if you click on 'Leave' in the middle of the game and call to leave after the game, you'll leave the room right after the game is over. This will be a much more useful way to leave.");
cm.dispose();
} else if (current == 2) {
cm.sendNextPrev("If you and your opponent have the same number of matched pairs, then whoever had a longer streak of matched pairs will win. If you ever feel the need to go to the bathroom, or take an extended break, you can request a #btie#k. The game will end in a tie if the opponent accepts the request. Tip: this may be a good way to keep your friendships in tact.");
}
} else if (status == 8) {
if (current == 2) {
cm.sendPrev("When the next game starts, the loser will go first. Also, no one is allowed to leave in the middle of a game. If you do, you may need to request either a #bforfeit or tie#k. (Of course, if you request a forfeit, you'll lose the game.) And if you click on 'Leave' in the middle of the game and call to leave after the game, you'll leave the room right after the game is over. This will be a much more useful way to leave.");
cm.dispose();
}
}
}

25
scripts/npc/1012009.js Normal file
View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.getPlayer().getStorage().sendStorage(cm.getClient(), 1012009);
cm.dispose();
}

219
scripts/npc/1012100.js Normal file
View File

@@ -0,0 +1,219 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Athena Pierce
Bowman Job Advancement
Victoria Road : Bowman Instructional School (100000201)
*/
status = -1;
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 310;
spawnPnpc = false;
spawnPnpcFee = 7000000;
jobType = 3;
function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven'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 " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
cm.sendNext("So you decided to become a #rbowman#k? There are some standards to meet, y'know... #bYour level should be at least 10, with at least " + cm.getFirstJobStatRequirement(jobType) + "#k. Let's see."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} 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();
}
}
}
function action(mode, type, selection) {
status++;
if (mode == -1 && selection == -1) {
cm.dispose();
return;
} else 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;
}
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if (PlayerNPC.spawnPlayerNPC(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) {
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType)) {
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
} else {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rBowman#k.");
cm.dispose();
}
} else if (status == 1) {
if (cm.canHold(1452051) && cm.canHold(2070000)) {
if (cm.getJobId() == 0) {
cm.changeJobById(300);
cm.gainItem(1452051, 1);
cm.gainItem(2060000, 1000);
cm.resetStats();
}
cm.sendNext("Alright, from here out, you are a part of us! You'll be living the life of a wanderer at ..., but just be patient as soon, you'll be living the high life. Alright, it ain't much, but I'll give you some of my abilities... HAAAHHH!!!");
} else {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
} else if (status == 3) {
cm.sendNextPrev("Now a reminder. Once you have chosen, you cannot change up your mind and try to pick another path. Go now, and live as a proud Bowman.");
} else {
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#L3#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.");
cm.dispose();
} else {
cm.sendNext("Please, make some space in your inventory.");
cm.dispose();
}
} else {
if (selection < 3) {
if (selection == 0) { //hunter
cm.sendNext("Archers that master #rBows#k.\r\n\r\n#bHunters#k have a higher damage/minute output in early levels, with attacks having a faster pace but slightly weaker than Crossbowmans. #bHunters#k get #rArrow Bomb#k, a slightly weaker attack that can cause up to 6 enemies to get stunned.");
} else if (selection == 1) { //crossbowman
cm.sendNext("Archers that master #rCrossbows#k.\r\n\r\n#bCrossbowmans'#k attack power grows higher the higher level you are, when compared to Hunters. #bCrossbowmans#k get #rIron Arrow#k, a stronger attack that does not home on enemies but can go through walls.");
}
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.sendNext("Alright, you're the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + " from here on out. " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + "s 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.");
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("Since she is a clone of myself, you can expect a tough battle ahead. He uses a number of special attacking skills unlike any you have ever seen, and it is your task to successfully take him one on one. There is a time limit in the secret passage, so it is crucial that you defeat him within the time limit. I wish you the best of luck, and I hope you bring the #b#t4031059##k with you.");
}
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);
cm.dispose();
}
}

115
scripts/npc/1012103.js Normal file
View File

@@ -0,0 +1,115 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Natalie
Henesys VIP Hair/Hair Color Change.
GMS-like revised by Ronan -- contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair_v = Array(30060, 30140, 30200, 30210, 30310, 33040, 33100);
var fhair_v = Array(31150, 31300, 31350, 31700, 31740, 34050, 34110);
var hairnew = Array();
function start() {
status = -1;
action(1, 0, 0);
}
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function action(mode, type, selection) {
if (mode < 1) {
cm.dispose();
} else {
status++;
if (status == 0) {
cm.sendSimple("I'm the head of this hair salon. If you have a #b#t5150001##k or a #b#t5151001##k allow me to take care of your hairdo. Please choose the one you want.\r\n#L1#Haircut: #i5150001##t5150001##l\r\n#L2#Dye your hair: #i5151001##t5151001##l");
} else if (status == 1) {
if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_v.length; i++) {
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fhair_v.length; i++) {
pushIfItemExists(hairnew, fhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendStyle("I can totally change up your hairstyle and make it look so good. Why don't you change it up a bit? If you have #b#t5150001##k I'll change it for you. Choose the one to your liking~.", hairnew);
} else if (selection == 2) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair() / 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendStyle("I can totally change your haircolor and make it look so good. Why don't you change it up a bit? With #b#t51051001##k I'll change it for you. Choose the one to your liking.", haircolor);
}
} else if (status == 2) {
cm.dispose();
if (beauty == 1) {
if (cm.haveItem(5420002)) { // thanks MedicOP for noticing uncoded functionality for Hair Membership coupons
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150001)) {
cm.gainItem(5150001, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 2) {
if (cm.haveItem(5151001)) {
cm.gainItem(5151001, -1);
cm.setHair(haircolor[selection]);
cm.sendOk("Enjoy your new and improved haircolor!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
}
if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150001, 1);
cm.sendOk("Enjoy!");
} else if (selection == 1 && cm.getMeso() >= haircolorprice) {
cm.gainMeso(-haircolorprice);
cm.gainItem(5151001, 1);
cm.sendOk("Enjoy!");
} else {
cm.sendOk("You don't have enough mesos to buy a coupon!");
}
}
}
}
}

138
scripts/npc/1012104.js Normal file
View File

@@ -0,0 +1,138 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Brittany
Henesys Random Hair/Hair Color Change.
GMS-like revised by Ronan -- contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair_r = Array(30060, 30140, 30200, 30210, 30310, 30610, 33040, 33100);
var fhair_r = Array(31070, 31080, 31150, 31300, 31350, 31700, 34050, 34110);
var mhair_e = Array(30030, 30140, 30200, 30210, 30310, 30610, 33040, 33100);
var fhair_e = Array(31070, 31150, 31300, 31350, 31430, 31700, 34050, 34110);
var hairnew = Array();
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("I'm Brittany the assistant. If you have #b#t5150000##k, #b#t5150010##k or #b#t5151000##k by any chance, then how about letting me change your hairdo?\r\n#L0#Haircut: #i5150000##t5150000##l\r\n#L1#Haircut: #i5150010##t5150010##l\r\n#L2#Dye your hair: #i5151000##t5151000##l");
} else if (status == 1) {
if (selection == 0) {
beauty = 3;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_r.length; i++) {
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fhair_r.length; i++) {
pushIfItemExists(hairnew, fhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendYesNo("If you use the REG coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that even you didn't think was possible. Are you going to use #b#t5150000##k and really change your hairstyle?");
} else if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_e.length; i++) {
pushIfItemExists(hairnew, mhair_e[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fhair_e.length; i++) {
pushIfItemExists(hairnew, fhair_e[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendYesNo("If you use the EXP coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that even you didn't think was possible. Are you going to use #b#t5150010##k and really change your hairstyle?");
} else if (selection == 2) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair() / 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendYesNo("If you use a regular coupon your hair will change RANDOMLY. Do you still want to use #b#t5151000##k and change it up?");
}
} else if (status == 2) {
cm.dispose();
if (beauty == 1) {
if (cm.haveItem(5150010) == true) {
cm.gainItem(5150010, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
} else if (beauty == 2) {
if (cm.haveItem(5151000) == true) {
cm.gainItem(5151000, -1);
cm.setHair(haircolor[Math.floor(Math.random() * haircolor.length)]);
cm.sendOk("Enjoy your new and improved haircolor!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
} else if (beauty == 3) {
if (cm.haveItem(5150000) == true) {
cm.gainItem(5150000, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
} else if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150010, 1);
cm.sendOk("Enjoy!");
} else if (selection == 1 && cm.getMeso() >= haircolorprice) {
cm.gainMeso(-haircolorprice);
cm.gainItem(5151000, 1);
cm.sendOk("Enjoy!");
} else {
cm.sendOk("You don't have enough mesos to buy a coupon!");
}
}
}
}
}

62
scripts/npc/1012105.js Normal file
View File

@@ -0,0 +1,62 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Ms. Tan
Henesys Skin Change.
*/
var status;
var skin = Array(0, 1, 2, 3, 4);
var price = 1000000;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Well, hello! Welcome to the Henesys Skin-Care! Would you like to have a firm, tight, healthy looking skin like mine? With a #b#t5153000##k, you can let us take care of the rest and have the kind of skin you've always wanted~!\r\n#L1#Skin Care: #i5153000##t5153000##l");
} else if (status == 1) {
if (cm.haveItem(5153000)) {
cm.sendStyle("With our specialized machine, you can see yourself after the treatment in advance. What kind of skin-treatment would you like to do? Choose the style of your liking.", skin);
} else {
cm.sendOk("Um... you don't have the skin-care coupon you need to receive the treatment. Sorry, but I am afraid we can't do it for you...");
cm.dispose();
}
} else {
cm.gainItem(5153000, -1);
cm.setSkin(selection);
cm.sendOk("Enjoy your new and improved skin!");
cm.dispose();
}
}
}

132
scripts/npc/1012112.js Normal file
View File

@@ -0,0 +1,132 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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 BubblesDev
* @author Ronan
* @NPC Tory
*/
var status = 0;
var em = null;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (cm.getMapId() == 100000200) {
if (status == 0) {
em = cm.getEventManager("HenesysPQ");
if (em == null) {
cm.sendOk("The Henesys PQ has encountered an error.");
cm.dispose();
return;
} else if (cm.isUsingOldPqNpcStyle()) {
action(1, 0, 0);
return;
}
cm.sendSimple("#e#b<Party Quest: Primrose Hill>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nI'm Tory. Inside here is a beautiful hill where the primrose blooms. There's a tiger that lives in the hill, Growlie, and he seems to be looking for something to eat. Would you like to head over to the hill of primrose and join forces with your party members to help Growlie out?#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I would like to " + (cm.getPlayer().isRecvPartySearchInviteEnabled() ? "disable" : "enable") + " Party Search.\r\n#L2#I would like to hear more details.\r\n#L3#I would like to redeem an instance hat.");
} else if (status == 1) {
if (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("Hi there! I'm Tory. This place is covered with mysterious aura of the full moon, and no one person can enter here by him/herself.");
cm.dispose();
} else if (!cm.isLeader()) {
cm.sendOk("If you'd like to enter here, the leader of your party will have to talk to me. Talk to your party leader about this.");
cm.dispose();
} else {
var eli = em.getEligibleParty(cm.getParty());
if (eli.size() > 0) {
if (!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Someone is already attempting the PQ. Please wait for them to finish, or find another channel.");
}
} else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
cm.dispose();
}
} else if (selection == 1) {
var psState = cm.getPlayer().toggleRecvPartySearchInvite();
cm.sendOk("Your Party Search status is now: #b" + (psState ? "enabled" : "disabled") + "#k. Talk to me whenever you want to change it back.");
cm.dispose();
} else if (selection == 2) {
cm.sendOk("#e#b<Party Quest: Primrose Hill>#k#n\r\nCollect primrose seeds from the flowers at the bottom part of the map and drop them by the platforms above the stage. Primrose seed color must match to grow the seeds, so test until you find the correct combination. When all the seeds have been planted, that is, starting second part of the mission, scout the Moon Bunny while it prepares Rice Cakes for the hungry Growlie. Once Growlie becomes satisfied, your mission is complete.");
cm.dispose();
} else {
cm.sendYesNo("So you want to exchange #b20 #b#t4001158##k for the instance-designed hat?");
}
} else {
if (cm.hasItem(4001158, 20)) {
if (cm.canHold(1002798)) {
cm.gainItem(4001158, -20);
cm.gainItem(1002798, 20);
cm.sendNext("Here it is. Enjoy!");
}
} else {
cm.sendNext("You don't have enough #t4001158# to buy it yet!");
}
cm.dispose();
}
} else if (cm.getMapId() == 910010100) {
if (status == 0) {
cm.sendYesNo("Thank you for aiding in the effort of feeding the Growlie. As a matter of fact, your team has already been rewarded for reaching this far. With this problem now solved, there is another issue happening right now, if you are interessed check #bTommy#k there for the info. So, are you returning straight to Henesys now?");
} else if (status == 1) {
if (cm.getEventInstance().giveEventReward(cm.getPlayer())) {
cm.warp(100000200);
} else {
cm.sendOk("It seems you are short on space in one of your inventories. Please check that first to get rewarded properly.");
}
cm.dispose();
}
} else if (cm.getMapId() == 910010400) {
if (status == 0) {
cm.sendYesNo("So, are you returning to Henesys now?");
} else if (status == 1) {
if (cm.getEventInstance() == null) {
cm.warp(100000200);
} else if (cm.getEventInstance().giveEventReward(cm.getPlayer())) {
cm.warp(100000200);
} else {
cm.sendOk("It seems you are short on space in one of your inventories. Please check that first to get rewarded properly.");
}
cm.dispose();
}
}
}
}

75
scripts/npc/1012113.js Normal file
View File

@@ -0,0 +1,75 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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 BubblesDev
* @author Ronan
* @npc Tommy (HPQ)
*/
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) {
cm.dispose();
} else {
status++;
if (cm.getPlayer().getMap().getId() == 910010100) { //Clear map
if (status == 0) {
cm.sendNext("Hello, there! I'm Tommy. There's a Pig Town nearby where we're standing. The pigs there are rowdy and uncontrollable to the point where they have stolen numerous weapons from travelers. They were kicked out from their towns, and are currently hiding out at the Pig Town.");
} else if (status == 1) {
if (cm.isEventLeader()) {
cm.sendYesNo("What do you think about making your way there with your party members and teach those rowdy pigs a lesson?");
} else {
cm.sendOk("Interessed? Tell your party leader to talk to me to head there!");
cm.dispose();
}
} else if (status == 2) {
cm.getEventInstance().startEventTimer(5 * 60000);
cm.getEventInstance().warpEventTeam(910010200);
cm.dispose();
}
} else if (cm.getPlayer().getMap().getId() == 910010200) { //Bonus map
if (status == 0) {
cm.sendYesNo("Would you like to exit the bonus now?");
} else {
cm.warp(910010400);
cm.dispose();
}
} else if (cm.getPlayer().getMap().getId() == 910010300) { //Exit map
if (status == 0) {
cm.sendOk("You will now be warped out, thank you for helping us!");
} else {
cm.warp(100000200);
cm.dispose();
}
}
}
}

97
scripts/npc/1012114.js Normal file
View File

@@ -0,0 +1,97 @@
/*
Growlie (that fatass uhh.. hungry lion or whatever)
@author FightDesign (RageZONE)
@author Ronan
*/
var status = 0;
var chosen = -1;
function clearStage(stage, eim) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.giveEventPlayersStageReward(stage);
}
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 0) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 0) {
status += ((chosen == 2) ? 1 : -1);
} else {
status++;
}
if (status == 0) {
if (cm.isEventLeader()) {
cm.sendSimple("Growl! I am Growlie, always ready to protect this place. What brought you here?\r\n#b#L0# Please tell me what this place is all about.#l\r\n#L1# I have brought #t4001101#.#l\r\n#L2# I would like to leave this place.#l");
} else {
cm.sendSimple("Growl! I am Growlie, always ready to protect this place. What brought you here?\r\n#b#L0# Please tell me what this place is all about.#l\r\n#L2# I would like to leave this place.#l");
}
} else if (status == 1) {
if (chosen == -1) {
chosen = selection;
}
if (chosen == 0) {
cm.sendNext("This place can be best described as the prime spot where you can taste the delicious rice cakes made by Moon Bunny every full moon.");
} else if (chosen == 1) {
if (cm.haveItem(4001101, 10)) {
cm.sendNext("Oh... isn't this rice cake made by Moon Bunny? Please hand me the rice cake. Mmmm ... these seems delicious. Please come see me next time for more #b#t4001101##k. Have a safe trip home!");
} else {
cm.sendOk("I advise you to check and make sure that you have indeed gathered up #b10 #t4001101#s#k.");
cm.dispose();
}
} else if (chosen == 2) {
cm.sendYesNo("Are you sure you want to leave?");
} else {
cm.dispose();
}
} else if (status == 2) {
if (chosen == 0) {
cm.sendNextPrev("Gather up the primrose seeds from the primrose leaves all over this area, and plant the seeds at the footing near the crescent moon to see the primrose bloom. There are 6 types of primroses, and all of them require different footings. It is imperative that the footing fits the seed of the flower.");
} else if (chosen == 1) {
cm.gainItem(4001101, -10);
var eim = cm.getEventInstance();
clearStage(1, eim);
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.killAllMonstersNotFriendly();
eim.clearPQ();
cm.dispose();
} else {
if (mode == 1) {
cm.warp(910010300);
} else {
cm.sendOk("You better collect some delicious rice cakes for me then, because time is running out, Growl!");
}
cm.dispose();
}
} else if (status == 3) {
if (chosen == 0) {
cm.sendNextPrev("When the flowers of primrose blooms, the full moon will rise, and that's when the Moon Bunnies will appear and start pounding the mill. Your task is to fight off the monsters to make sure that Moon Bunny can concentrate on making the best rice cake possible.");
}
} else if (status == 4) {
if (chosen == 0) {
cm.sendNextPrev("I would like for you and your party members to cooperate and get me 10 rice cakes. I strongly advise you to get me the rice cakes within the allotted time.");
}
} else {
cm.dispose();
}
}
}

13
scripts/npc/1012115.js Normal file
View File

@@ -0,0 +1,13 @@
function start() {
var status = cm.getQuestStatus(20706);
if (status == 0) {
cm.sendNext("It looks like there's nothing suspicious in the area.");
} else if (status == 1) {
cm.forceCompleteQuest(20706);
cm.sendNext("You have spotted the shadow! Better report to #p1103001#.");
} else if (status == 2) {
cm.sendNext("The shadow has already been spotted. Better report to #p1103001#.");
}
cm.dispose();
}

4
scripts/npc/1012116.js Normal file
View File

@@ -0,0 +1,4 @@
function start() {
cm.sendNext("It looks like there's nothing suspecious in the area.");
cm.dispose();
}

116
scripts/npc/1012117.js Normal file
View File

@@ -0,0 +1,116 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC Name: Big Headward
Map(s): Victoria Road : Henesys Hair Salon (100000104)
Description: Random haircut
GMS-like revised by Ronan -- contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var mhair_r = Array(30010, 30070, 30080, 30090, 30100, 30690, 30760, 33000);
var fhair_r = Array(31130, 31530, 31820, 31920, 31940, 34000, 34030);
var mhair_v = Array(30010, 30070, 30080, 30090, 30100, 30480, 30560, 30690, 30760, 30850, 30890, 30930, 30950);
var fhair_v = Array(31020, 31130, 31510, 31530, 31820, 31860, 31890, 31920, 31940, 31950, 34000);
var hairnew = Array();
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hi, I'm #p1012117#, the most charming and stylish stylist around. If you're looking for the best looking hairdos around, look no further!\r\n\#L0##i5150040##t5150040##l\r\n\#L1##i5150044##t5150044##l");
} else if (status == 1) {
if (selection == 0) {
beauty = 1;
cm.sendYesNo("If you use this REGULAR coupon, your hair may transform into a random new look...do you still want to do it using #b#t5150040##k, I will do it anyways for you. But don't forget, it will be random!");
} else {
beauty = 2;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_v.length; i++) {
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
} else {
for (var i = 0; i < fhair_v.length; i++) {
pushIfItemExists(hairnew, fhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendStyle("Using the SPECIAL coupon you can choose the style your hair will become. Pick the style that best provides you delight...", hairnew);
}
} else if (status == 2) {
if (beauty == 1) {
if (cm.haveItem(5150040) == true) {
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_r.length; i++) {
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
} else {
for (var i = 0; i < fhair_r.length; i++) {
pushIfItemExists(hairnew, fhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.gainItem(5150040, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
} else if (beauty == 2) {
if (cm.haveItem(5150044) == true) {
cm.gainItem(5150044, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
cm.dispose();
}
}
}

49
scripts/npc/1012118.js Normal file
View File

@@ -0,0 +1,49 @@
var status = -1;
var map = 910060000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
} else if (cm.isQuestActive(22515) || cm.isQuestActive(22516) || cm.isQuestActive(22517) || cm.isQuestActive(22518)) {
cm.sendYesNo("Would you like to go in the special Training Center?");
status = 1;
} else {
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
}
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
} else if (status == 2) {
cm.warp(910060100, 0);
cm.dispose();
}
}

50
scripts/npc/1012119.js Normal file
View File

@@ -0,0 +1,50 @@
var status = -1;
var map = 910060000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
} else if (cm.isQuestActive(22515) || cm.isQuestActive(22516) || cm.isQuestActive(22517) || cm.isQuestActive(22518)) {
cm.sendYesNo("Would you like to enter the special Training Center?");
status = 1;
} else {
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
}
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
} else if (status == 2) {
cm.warp(910060100, 0);
cm.dispose();
}
}

24
scripts/npc/1013001.js Normal file
View File

@@ -0,0 +1,24 @@
var status = -1;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
cm.dispose();
return;
} else {
status++;
}
if (status == 0) {
cm.sendNext("You, who are destined to be a Dragon Master... You have finally arrived.", 1);
} else if (status == 1) {
cm.sendNextPrev("Go and fulfill your duties as the Dragon Master...", 1);
} else if (status == 2) {
cm.warp(900090101, 0);
cm.dispose();
}
}

6
scripts/npc/1013002.js Normal file
View File

@@ -0,0 +1,6 @@
function start() {
cm.forceCompleteQuest(22011);
cm.playerMessage(5, "You have acquired a Dragon Egg.");//actually getInfoMessage
cm.warp(900090103, 0);
cm.dispose();
}

13
scripts/npc/1013104.js Normal file
View File

@@ -0,0 +1,13 @@
function start() {
if (cm.isQuestStarted(22007)) {
if (!cm.haveItem(4032451)) {
cm.gainItem(4032451, true);
cm.sendNext("#b(You have obtained an Egg. Deliver it to Utah.)");
} else {
cm.sendNext("#b(You have already obtained an Egg. Take the Egg you have and give it to Utah.)");
}
} else {
cm.sendNext("#b(You don't need to take an egg now.)#k");
}
cm.dispose();
}

10
scripts/npc/1013200.js Normal file
View File

@@ -0,0 +1,10 @@
function start() {
if (!cm.isQuestStarted(22015)) {
cm.sendOk("#b(You are too far from the Piglet. Go closer to grab it.)");
} else {
cm.gainItem(4032449, true);
cm.forceCompleteQuest(22015);
cm.playerMessage(5, "You have rescued the Piglet.");
}
cm.dispose();
}

44
scripts/npc/10200.js Normal file
View File

@@ -0,0 +1,44 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
var status = -1;
function start() {
cm.sendNext("Bowmen are blessed with dexterity and power, taking charge of long-distance attacks, providing support for those at the front line of the battle. Very adept at using landscape as part of the arsenal.");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Bowman, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Bowman?");
} else if (status == 1) {
cm.lockUI();
cm.warp(1020300, 0);
cm.dispose();
}
}

44
scripts/npc/10201.js Normal file
View File

@@ -0,0 +1,44 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
var status = -1;
function start() {
cm.sendNext("Magicians are armed with flashy element-based spells and secondary magic that aids party as a whole. After the 2nd job adv., the elemental-based magic will provide ample amount of damage to enemies of opposite element.");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Magician, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Magician?");
} else if (status == 1) {
cm.lockUI();
cm.warp(1020200, 0);
cm.dispose();
}
}

44
scripts/npc/10202.js Normal file
View File

@@ -0,0 +1,44 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
var status = -1;
function start() {
cm.sendNext("Warriors possess an enormous power with stamina to back it up, and they shine the brightest in melee combat situation. Regular attacks are powerful to begin with, and armed with complex skills, the job is perfect for explosive attacks.");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Warrior, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Warrior?");
} else if (status == 1) {
cm.lockUI();
cm.warp(1020100, 0);
cm.dispose();
}
}

44
scripts/npc/10203.js Normal file
View File

@@ -0,0 +1,44 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
var status = -1;
function start() {
cm.sendNext("Thieves are a perfect blend of luck, dexterity, and power that are adept at the surprise attacks against helpless enemies. A high level of avoidability and speed allows Thieves to attack enemies from various angles.");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Thief, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Thief?");
} else if (status == 1) {
cm.lockUI();
cm.warp(1020400, 0);
cm.dispose();
}
}

44
scripts/npc/10204.js Normal file
View File

@@ -0,0 +1,44 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
var status = -1;
function start() {
cm.sendNext("Pirates are blessed with outstanding dexterity and power, utilizing their guns for long-range attacks while using their power on melee combat situations. Gunslingers use elemental-based bullets for added damage, while Infighters transform to a different being for maximum effect.");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == 0) {
cm.sendNext("If you wish to experience what it's like to be a Pirate, come see me again.");
}
cm.dispose();
return;
}
if (status == 0) {
cm.sendYesNo("Would you like to experience what it's like to be a Pirate?");
} else if (status == 1) {
cm.lockUI();
cm.warp(1020500, 0);
cm.dispose();
}
}

235
scripts/npc/1022000.js Normal file
View File

@@ -0,0 +1,235 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Dances with Balrog
Warrior Job Advancement
Victoria Road : Warriors' Sanctuary (102000003)
Custom Quest 100003, 100005
*/
status = -1;
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 110;
spawnPnpc = false;
spawnPnpcFee = 7000000;
jobType = 1;
function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven'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 " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
cm.sendNext("Do you want to become a #rwarrior#k? You need to meet some criteria in order to do so.#b You should be at least in level 10, and at least " + cm.getFirstJobStatRequirement(jobType) + "#k. Let's see..."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} 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();
}
}
}
function action(mode, type, selection) {
status++;
if (mode == -1 && selection == -1) {
cm.dispose();
return;
} else 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;
}
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if (PlayerNPC.spawnPlayerNPC(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) {
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType)) {
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
} else {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rWarrior#k.");
cm.dispose();
}
} else if (status == 1) {
if (cm.canHold(1302077)) {
if (cm.getJobId() == 0) {
cm.changeJobById(100);
cm.gainItem(1302077, 1);
cm.resetStats();
}
cm.sendNext("From here on out, you are going to the Warrior path. This is not an easy job, but if you have discipline and confidence in your own body and skills, you will overcome any difficulties in your path. Go, young Warrior!");
} else {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
} else if (status == 3) {
cm.sendNextPrev("Now a reminder. Once you have chosen, you cannot change up your mind and try to pick another path. Go now, and live as a proud Warrior.");
} else {
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 Fighter is all about.\r\n#L1#Please explain to me what being the Page is all about.\r\n#L2#Please explain to me what being the Spearman is all about.\r\n#L3#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(100003)) {
cm.startQuest(100003);
}
}
} else if (status == 1) {
if (!cm.haveItem(4031012)) {
if (cm.canHold(4031008)) {
if (!cm.haveItem(4031008)) {
cm.gainItem(4031008, 1);
}
cm.sendNextPrev("Please get this letter to #b#p1072000##k who's around #b#m102020300##k near Perion. He is taking care of the job of an instructor in place of me. Give him the letter and he'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 < 3) {
if (selection == 0) { //fighter
cm.sendNext("Warriors that master #rSwords or Axes#k.\r\n\r\n#rFighters#k get #bRage#k, which boosts your party's weapon attack by 10. During 2nd job this is strongly appreciated, as it is free (except for -10 wep def, which is not going to impact the damage you take much at all), takes no Use slots and increases each party member's damage (except Mages) by several hundreds. The other classes can give themselves a weapon attack boost as well, but need items to do so. #rFighters#k also get #bPower Guard#k, reducing touch damage by 40% and deals it back to the monster. This is the main reason why #rFighters#k are considered soloers is because this reduces pot costs immensely.");
} else if (selection == 1) { //page
cm.sendNext("Warriors that master #rSwords or Maces/Blunt weapons#k.\r\n\r\n#rPages#k get #bThreaten#k, a skill that lowers the enemies' weapon defense and weapon attack by 20; this is mostly used to lower damage dealt to you. Pages also get #bPower Guard#k, reducing touch damage by 40% and deals it back to the monster. This is one of the main reason why #bPages/WKs#k are considered soloers, that's because this reduces pot costs immensely. Of course, constant KB and #bIce Charge#k helps also to the soloing factor.");
} else { //spearman
cm.sendNext("Warriors that master #rSpears or Polearms#k.\r\n\r\n#rSpearmen#k get #bHyper Body#k, which boosts your max HP/MP and that of your party by 60% when maxed. This skill is particularly useful for helping partied Thieves, Archers, and Mages to survive more hits from enemies and/or PQ bosses. They also get #bIron Will#k which gives +20 wep def and +20 mag def for 300 sec. It is basically a nerfed Bless with 100 seconds more duration but gives no accuracy or avoidability bonus. Even with this skill maxed, it isn't even close to being in the same league as Power Guard and is why Spearmen/Dark Knights are not considered a soloing class.");
}
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#Fighter\r\n#L1#Page\r\n#L2#Spearman");
}
}
} else if (status == 2) {
if (cm.haveItem(4031008)) {
cm.dispose();
return;
}
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 110 ? "#bFighter#k" : job == 120 ? "#bPage#k" : "#bSpearman#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? Are you sure about this?");
} else if (status == 3) {
if (cm.haveItem(4031012)) {
cm.gainItem(4031012, -1);
}
cm.completeQuest(100005);
if (job == 110) {
cm.sendNext("Alright, you have now become the #bFighter#k. A fighter strives to become the strongest of the strong, and never stops fighting. Don't ever lose that will to fight, and push forward 24/7. I'll help you become even stronger than you already are.");
} else if (job == 120) {
cm.sendNext("Alright, you have now become a #bPage#k! Pages have high intelligence and bravery, which I hope you'll employ throughout your journey to the right path. I'll help you become much stronger than you already are.");
} else {
cm.sendNext("Alright, you have now become the #bSpearman#k. The Spearman use the power of darkness to take out the enemies, always in shadows... Please believe in yourself and your awesome power as you go in your journey. I'll help you become much stronger than you are right now.");
}
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 == 110 ? "fighter" : job == 120 ? "page" : "spearman") + ". 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 == 110 ? "Fighter" : job == 120 ? "Page" : "Spearman") + " 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.");
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("My the other self is quite strong. He uses many special skills and you should fight with him 1 on 1. However, people cannot stay long in the secret passage, so it is important to beat him ASAP. Well... Good luck I will look forward to you bringing #b#t4031059##k to me.");
}
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);
cm.dispose();
}
}
/* 3th Job Part
PORTAL 20 MINUTES.
*/

59
scripts/npc/1022001.js Normal file
View File

@@ -0,0 +1,59 @@
var status = 0;
var maps = [104000000, 100000000, 101000000, 103000000, 120000000];
var cost = [1000, 1000, 800, 1000, 800];
var selectedMap = -1;
var mesos;
function start() {
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 1 && mode == 0) {
cm.dispose();
return;
} else if (status >= 2 && mode == 0) {
cm.sendNext("There's a lot to see in this town, too. Come back and find us when you need to go to a different town.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

213
scripts/npc/1022003.js Normal file
View File

@@ -0,0 +1,213 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Mr. Thunder
Victoria Road: Perion (102000000)
Refining NPC:
* Minerals
* Jewels
* Shields
* Helmets
*/
var status = 0;
var selectedType = -1;
var selectedItem = -1;
var item;
var mats;
var matQty;
var cost;
var qty;
var equip;
function start() {
cm.getPlayer().setCS(true);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Hm? Who might you be? Oh, you've heard about my forging skills? In that case, I'd be glad to process some of your ores... for a fee.#b"
var options = ["Refine a mineral ore", "Refine a jewel ore", "Upgrade a helmet", "Upgrade a shield"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0) { //mineral refine
var selStr = "So, what kind of mineral ore would you like to refine?#b";
var minerals = ["Bronze", "Steel", "Mithril", "Adamantium", "Silver", "Orihalcon", "Gold"];
for (var i = 0; i < minerals.length; i++) {
selStr += "\r\n#L" + i + "# " + minerals[i] + "#l";
}
cm.sendSimple(selStr);
equip = false;
} else if (selectedType == 1) { //jewel refine
var selStr = "So, what kind of jewel ore would you like to refine?#b";
var jewels = ["Garnet", "Amethyst", "Aquamarine", "Emerald", "Opal", "Sapphire", "Topaz", "Diamond", "Black Crystal"];
for (var i = 0; i < jewels.length; i++) {
selStr += "\r\n#L" + i + "# " + jewels[i] + "#l";
}
cm.sendSimple(selStr);
equip = false;
} else if (selectedType == 2) { //helmet refine
var selStr = "Ah, you wish to upgrade a helmet? Then tell me, which one?#b";
var helmets = ["Blue Metal Gear#k - Common Lv. 15#b", "Yellow Metal Gear#k - Common Lv. 15#b", "Metal Koif#k - Warrior Lv. 10#b", "Mithril Koif#k - Warrior Lv. 10#b", "Steel Helmet#k - Warrior Lv. 12#b", "Mithril Helmet#k - Warrior Lv. 12#b", "Steel Full Helm#k - Warrior Lv. 15#b",
"Mithril Full Helm#k - Warrior Lv. 15#b", "Iron Viking Helm#k - Warrior Lv. 20#b", "Mithril Viking Helm#k - Warrior Lv. 20#b", "Steel Football Helmet#k - Warrior Lv. 20#b", "Mithrill Football Helmet#k - Warrior Lv. 20#b", "Mithril Sharp Helm#k - Warrior Lv. 22#b", "Gold Sharp Helm#k - Warrior Lv. 22#b",
"Orihalcon Burgernet Helm#k - Warrior Lv. 25#b", "Gold Burgernet Helm#k - Warrior Lv. 25#b", "Great Red Helmet#k - Warrior Lv. 35#b", "Great Blue Helmet#k - Warrior Lv. 35#b", "Mithril Nordic Helm#k - Warrior Lv. 40#b", "Gold Nordic Helm#k - Warrior Lv. 40#b", "Mithril Crusader Helm#k - Warrior Lv. 50#b",
"Silver Crusader Helm#k - Warrior Lv. 50#b", "Old Steel Nordic Helm#k - Warrior Lv. 55#b", "Old Mithril Nordic Helm#k - Warrior Lv. 55#b"];
for (var i = 0; i < helmets.length; i++) {
selStr += "\r\n#L" + i + "# " + helmets[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
} else if (selectedType == 3) { //shield refine
var selStr = "Ah, you wish to upgrade a shield? Then tell me, which one?#b";
var shields = ["Adamantium Tower Shield#k - Warrior Lv. 40#b", "Mithril Tower Shield#k - Warrior Lv. 40#b", "Silver Legend Shield#k - Warrior Lv. 60#b", "Adamantium Legend Shield#k - Warrior Lv. 60#b"];
for (var i = 0; i < shields.length; i++) {
selStr += "\r\n#L" + i + "# " + shields[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
}
if (equip) {
status++;
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0) { //mineral refine
var itemSet = [4011000, 4011001, 4011002, 4011003, 4011004, 4011005, 4011006];
var matSet = [4010000, 4010001, 4010002, 4010003, 4010004, 4010005, 4010006];
var matQtySet = [10, 10, 10, 10, 10, 10, 10];
var costSet = [300, 300, 300, 500, 500, 500, 800];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //jewel refine
var itemSet = [4021000, 4021001, 4021002, 4021003, 4021004, 4021005, 4021006, 4021007, 4021008];
var matSet = [4020000, 4020001, 4020002, 4020003, 4020004, 4020005, 4020006, 4020007, 4020008];
var matQtySet = [10, 10, 10, 10, 10, 10, 10, 10, 10];
var costSet = [500, 500, 500, 500, 500, 500, 500, 1000, 3000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?";
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3 && mode == 1) {
if (equip) {
selectedItem = selection;
qty = 1;
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
if (selectedType == 2) { //helmet refine
var itemSet = [1002042, 1002041, 1002002, 1002044, 1002003, 1002040, 1002007, 1002052, 1002011, 1002058, 1002009, 1002056, 1002087, 1002088, 1002050, 1002049, 1002047, 1002048, 1002099, 1002098, 1002085, 1002028, 1002022, 1002101];
var matSet = [[1002001, 4011002], [1002001, 4021006], [1002043, 4011001], [1002043, 4011002], [1002039, 4011001], [1002039, 4011002], [1002051, 4011001], [1002051, 4011002], [1002059, 4011001], [1002059, 4011002],
[1002055, 4011001], [1002055, 4011002], [1002027, 4011002], [1002027, 4011006], [1002005, 4011005], [1002005, 4011006], [1002004, 4021000], [1002004, 4021005], [1002021, 4011002], [1002021, 4011006], [1002086, 4011002],
[1002086, 4011004], [1002100, 4011007, 4011001], [1002100, 4011007, 4011002]];
var matQtySet = [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 2], [1, 2], [1, 3], [1, 3], [1, 3], [1, 3], [1, 4], [1, 4], [1, 5], [1, 5], [1, 3], [1, 3],
[1, 5], [1, 6], [1, 5], [1, 4], [1, 1, 7], [1, 1, 7]];
var costSet = [500, 300, 500, 800, 500, 800, 1000, 1500, 1500, 2000, 1500, 2000, 2000, 4000, 4000, 5000, 8000, 10000, 12000, 15000, 20000, 25000, 30000, 30000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 3) { //shield refine
var itemSet = [1092014, 1092013, 1092010, 1092011];
var matSet = [[1092012, 4011003], [1092012, 4011002], [1092009, 4011007, 4011004], [1092009, 4011007, 4011003]];
var matQtySet = [[1, 10], [1, 10], [1, 1, 15], [1, 1, 15]];
var costSet = [100000, 100000, 120000, 120000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1) {
prompt += "a #t" + item + "#?";
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] * qty + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost * qty + " meso";
}
cm.sendYesNo(prompt);
} else if (status == 4 && mode == 1) {
var complete = true;
if (!cm.canHold(item, qty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("I'm afraid you cannot afford my services.");
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete) {
cm.sendOk("I'm afraid you're missing something for the item you want. See you another time, yes?");
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
}
} else {
cm.gainItem(mats, -matQty * qty);
}
cm.gainMeso(-cost * qty);
cm.gainItem(item, qty);
cm.sendOk("There, finished. What do you think, a piece of art, isn't it? Well, if you need anything else, you nkow where to find me.");
}
cm.dispose();
}
}

212
scripts/npc/1022004.js Normal file
View File

@@ -0,0 +1,212 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Mr. Smith
Victoria Road: Perion (102000000)
Refining NPC:
* Warrior Gloves - 10-60 + upgrades
* Processed Wood/Screws
*/
var status = 0;
var selectedType = -1;
var selectedItem = -1;
var item;
var mats;
var matQty;
var cost;
var qty;
var equip;
function start() {
cm.getPlayer().setCS(true);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Um... Hi, I'm Mr. Thunder's apprentice. He's getting up there in age, so he handles most of the heavy-duty work while I handle some of the lighter jobs. What can I do for you?#b"
var options = ["Make a glove", "Upgrade a glove", "Create materials"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0) { //glove refine
var selStr = "Okay, so which glove do you want me to make?#b";
var items = ["Juno#k - Warrior Lv. 10#b", "Steel Fingerless Gloves#k - Warrior Lv. 15#b", "Venon#k - Warrior Lv. 20#b", "White Fingerless Gloves#k - Warrior Lv. 25#b",
"Bronze Missel#k - Warrior Lv. 30#b", "Steel Briggon#k - Warrior Lv. 35#b", "Iron Knuckle#k - Warrior Lv. 40#b", "Steel Brist#k - Warrior Lv. 50#b", "Bronze Clench#k - Warrior Lv. 60#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
} else if (selectedType == 1) { //glove upgrade
var selStr = "Upgrade a glove? That shouldn't be too difficult. Which did you have in mind?#b";
var crystals = ["Steel Missel#k - Warrior Lv. 30#b", "Orihalcon Missel#k - Warrior Lv. 30#b", "Yellow Briggon#k - Warrior Lv. 35#b", "Dark Briggon#k - Warrior Lv. 35#b",
"Adamantium Knuckle#k - Warrior Lv. 40#b", "Dark Knuckle#k - Warrior Lv. 40#b", "Mithril Brist#k - Warrior Lv. 50#b", "Gold Brist#k - Warrior Lv. 50#b",
"Sapphire Clench#k - Warrior Lv. 60#b", "Dark Clench#k - Warrior Lv. 60#b"];
for (var i = 0; i < crystals.length; i++) {
selStr += "\r\n#L" + i + "# " + crystals[i] + "#l";
}
cm.sendSimple(selStr);
equip = true;
} else if (selectedType == 2) { //material refine
var selStr = "Materials? I know of a few materials that I can make for you...#b";
var materials = ["Make Processed Wood with Tree Branch", "Make Processed Wood with Firewood", "Make Screws (packs of 15)"];
for (var i = 0; i < materials.length; i++) {
selStr += "\r\n#L" + i + "# " + materials[i] + "#l";
}
cm.sendSimple(selStr);
equip = false;
}
if (equip) {
status++;
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 2) { //material refine
var itemSet = [4003001, 4003001, 4003000];
var matSet = [4000003, 4000018, [4011000, 4011001]];
var matQtySet = [10, 5, [1, 1]];
var costSet = [0, 0, 0];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?";
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3 && mode == 1) {
if (equip) {
selectedItem = selection;
qty = 1;
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
if (selectedType == 0) { //glove refine
var itemSet = [1082003, 1082000, 1082004, 1082001, 1082007, 1082008, 1082023, 1082009, 1082059];
var matSet = [[4000021, 4011001], 4011001, [4000021, 4011000], 4011001, [4011000, 4011001, 4003000], [4000021, 4011001, 4003000], [4000021, 4011001, 4003000],
[4011001, 4021007, 4000030, 4003000], [4011007, 4011000, 4011006, 4000030, 4003000]];
var matQtySet = [[15, 1], 2, [40, 2], 2, [3, 2, 15], [30, 4, 15], [50, 5, 40], [3, 2, 30, 45], [1, 8, 2, 50, 50]];
var costSet = [1000, 2000, 5000, 10000, 20000, 30000, 40000, 50000, 70000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //glove upgrade
var itemSet = [1082005, 1082006, 1082035, 1082036, 1082024, 1082025, 1082010, 1082011, 1082060, 1082061];
var matSet = [[1082007, 4011001], [1082007, 4011005], [1082008, 4021006], [1082008, 4021008], [1082023, 4011003], [1082023, 4021008],
[1082009, 4011002], [1082009, 4011006], [1082059, 4011002, 4021005], [1082059, 4021007, 4021008]];
var matQtySet = [[1, 1], [1, 2], [1, 3], [1, 1], [1, 4], [1, 2], [1, 5], [1, 4], [1, 3, 5], [1, 2, 2]];
var costSet = [20000, 25000, 30000, 40000, 45000, 50000, 55000, 60000, 70000, 80000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1) {
prompt += "a #t" + item + "#?";
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] * qty + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost * qty + " meso";
}
cm.sendYesNo(prompt);
} else if (status == 4 && mode == 1) {
var complete = true;
var recvItem = item, recvQty;
if (item == 4003000)//screws
{
recvQty = 15 * qty;
} else {
recvQty = qty;
}
if (!cm.canHold(recvItem, recvQty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("I may still be an apprentice, but I do need to earn a living.");
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete) {
cm.sendOk("I'm still an apprentice, I don't know if I can substitute other items in yet... Can you please bring what the recipe calls for?");
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
}
} else {
cm.gainItem(mats, -matQty * qty);
}
if (cost > 0) {
cm.gainMeso(-cost * qty);
}
cm.gainItem(recvItem, recvQty);
cm.sendOk("Did that come out right? Come by me again if you have anything for me to practice on.");
}
cm.dispose();
}
}

25
scripts/npc/1022005.js Normal file
View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.getPlayer().getStorage().sendStorage(cm.getClient(), 1022005);
cm.dispose();
}

55
scripts/npc/1022101.js Normal file
View File

@@ -0,0 +1,55 @@
/*
Copyright (C) This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License 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/>.
*/
/**
Rooney - Happyville Warp NPC
**/
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) {
cm.sendYesNo("Santa told me to go to here, only he didn't told me when... I hope I'm here on the right time! Oh! By the way, I'm Rooney, I can take you to #bHappyVille#k. Are you ready to go?");
} else {
cm.getPlayer().saveLocation("HAPPYVILLE");
cm.warp(209000000, 0);
cm.dispose();
}
}
}

222
scripts/npc/1022101_old.js Normal file
View File

@@ -0,0 +1,222 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Rooney
Map Name (Map ID)
Used to exchange VP for Maple Leaves, and Maple Leaves for rewards.
*/
var itemToUse = 4001126;
var chairs = [3010000, 3010001, 3010002, 3010003, 3010004, 3010005, 3010006, 3010007, 3010008, 3010009, 3010010, 3010011, 3010012, 3010013, 3010015, 3010016, 3010017, 3010018, 3010019, 3010022, 3010023, 3010024, 3010025, 3010026, 3010028, 3010040, 3010041, 3010043, 3010045, 3010046, 3010047, 3010057, 3010058, 3010060, 3010061, 3010062, 3010063, 3010064, 3010065, 3010066, 3010067, 3010069, 3010071, 3010072, 3010073, 3010080, 3010081, 3010082, 3010083, 3010084, 3010085, 3010097, 3010098, 3010099, 3010101, 3010106, 3010116, 3011000, 3012005, 3012010, 3012011];
var scrolls = [2040603, 2044503, 2041024, 2041025, 2044703, 2044603, 2043303, 2040807, 2040806, 2040006, 2040007, 2043103, 2043203, 2043003, 2040506, 2044403, 2040903, 2040709, 2040710, 2040711, 2044303, 2043803, 2040403, 2044103, 2044203, 2044003, 2043703];
var weapons = [1302020, 1302030, 1302033, 1302058, 1302064, 1302080, 1312032, 1322054, 1332025, 1332055, 1332056, 1372034, 1382009, 1382012, 1382039, 1402039, 1412011, 1412027, 1422014, 1422029, 1432012, 1432040, 1432046, 1442024, 1442030, 1442051, 1452016, 1452022, 1452045, 1462014, 1462019, 1462040, 1472030, 1472032, 1472055, 1482020, 1482021, 1482022, 1492020, 1492021, 1492022, 1092030, 1092045, 1092046, 1092047];
var nxAmount = 3000;
var chairAmount = 2;
var weaponAmount = 2;
var buffAmount = 2;
var hiredMerchantLength = 7;
var buff1ID = 2022273;
var buff2ID = 2022179;
var status;
var vp;
var choice;
function start() {
//vp = cm.getClient().getVotePoints();
//if(vp == null)
vp = 0;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 0) {
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0 && mode == 1) {
if (cm.getPlayer().getLevel() < 20) {
cm.sendOk("Hello, I am the Vote Point exchanger for #rMapleSolaxia#k!\r\n\r\nI am sorry, but I can only exchange Vote Points for players #blevel 20 or over#k.");
cm.dispose();
return;
}
var outStr = "Hello, I am the Vote Point exchanger for #rMapleSolaxia#k!\r\n";
outStr += "You currently have #r#c" + itemToUse + "##k #t" + itemToUse + "# and #r" + vp + "#k Vote Points.#b\r\n\r\n";
outStr += "#L0#I would like to exchange my vote points for Maple Leaves#l\r\n";
outStr += "#L1#I would like to exchange 1 #t" + itemToUse + "# for " + nxAmount + " NX Cash#l\r\n";
outStr += "#L2#I would like to exchange 1 #t" + itemToUse + "# for " + chairAmount + " Random Chair" + (chairAmount > 1 ? "s" : "") + "#l\r\n";
outStr += "#L3#I would like to exchange 1 #t" + itemToUse + "# for " + weaponAmount + " Maple Weapons#l\r\n";
outStr += "#L4#I would like to exchange 1 #t" + itemToUse + "# for " + buffAmount + " #t" + buff1ID + "#s and " + buffAmount + " #t" + buff2ID + "#s#l\r\n";
outStr += "#L5#I would like to exchange 1 #t" + itemToUse + "# for a " + hiredMerchantLength + " Day Hired Merchant#l\r\n";
cm.sendSimple(outStr);
} else if (status == 1) {
choice = selection;
if (selection > 0) {
if (!cm.haveItem(itemToUse) && vp == 0) {
cm.sendOk("I'm sorry, but you don't have any #t" + itemToUse + " or Vote Points.");
cm.dispose();
return;
}
}
if (selection == 0) {
// Exchange VP for leaves
if (vp <= 0) {
cm.sendOk("I'm sorry, but you don't have any Vote Points to exchange!");
cm.dispose();
return;
}
cm.sendYesNo("Would you like to exchange " + vp + " Vote Point" + (vp > 0 ? "s" : "") + " for " + vp + " #t" + itemToUse + "# " + (vp > 0 ? "s" : "") + "?");
} else if (selection == 1) {
// Exchange 1 Leaf for Cash
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + nxAmount + " NX Cash?");
} else if (selection == 2) {
// Exchange 1 Leaf for Chair
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + chairAmount + " Random Chair" + (chairAmount > 1 ? "s" : "") + "?");
} else if (selection == 3) {
// Exchange 1 Leaf for Maple Weapons
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + weaponAmount + " Random Maple Weapons?");
} else if (selection == 4) {
// Exchange 1 Leaf for Apples/Cheese
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for " + buffAmount + " #t" + buff1ID + "# and #t" + buff2ID + "#?");
} else if (selection == 5) {
// Echange 1 Leaf for Merchant
cm.sendYesNo("Would you like to exchange 1 #t" + itemToUse + "# for a " + hiredMerchantLength + " Day Hired Merchant?");
} else {
cm.dispose();
}
} else if (status == 2) {
var useVP = false;
if (!cm.hasItem(itemToUse) && vp > 0) {
useVP = true;
}
const InventoryType = Java.type('client.inventory.InventoryType');
if (choice == 0) {
// VP Exchange
if (!cm.canHold(itemToUse)) {
cm.sendOk("It looks like you don't have enough space in your #rETC#k inventory to hold the #t" + itemToUse + "#" + (vp > 0 ? "s" : "") + ".");
cm.dispose();
return;
}
cm.getClient().useVotePoints(vp);
cm.gainItem(itemToUse, vp);
cm.dispose();
} else if (choice == 1) {
// Leaf for Cash
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.getPlayer().getCashShop().gainCash(1, nxAmount);
const PacketCreator = Java.type('tools.PacketCreator');
cm.getPlayer().sendPacket(PacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX"));
cm.logLeaf(nxAmount + " NX");
cm.dispose();
} else if (choice == 2) {
if (!cm.getPlayer().getInventory(InventoryType.SETUP).isFull(chairAmount)) {
var chairStr = "";
for (var i = 0; i < chairAmount; i++) {
var chair = chairs[Math.floor(Math.random() * chairs.length)];
cm.gainItem(chair, 1, true);
chairStr += chair + " ";
}
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.logLeaf("Chair ID: " + chairStr);
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if (choice == 3) {
if (!cm.getPlayer().getInventory(InventoryType.EQUIP).isFull(weaponAmount)) {
var weaponStr = "";
for (var i = 0; i < weaponAmount; i++) {
var weapon = weapons[Math.floor(Math.random() * weapons.length)];
cm.gainItem(weapon, 1, true, true);
weaponStr += weapon + " ";
}
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.logLeaf("Maple Weapon IDs: " + weaponStr);
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if (choice == 4) {
if (!cm.getPlayer().getInventory(InventoryType.USE).isFull(2)) {
cm.gainItem(buff1ID, buffAmount, true);
cm.gainItem(buff2ID, buffAmount, true);
cm.gainItem(itemToUse, -1);
cm.logLeaf(buffAmount + " cheeses and apples");
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold the items!");
}
} else if (choice == 5) {
if (!cm.haveItem(5030000, 1)) {
if (!cm.getPlayer().getInventory(InventoryType.CASH).isFull(1)) {
cm.gainItem(5030000, 1, false, true, 1000 * 60 * 60 * 24 * hiredMerchantLength);
if (useVP) {
cm.getClient().useVotePoints(1);
} else {
cm.gainItem(itemToUse, -1);
}
cm.logLeaf(hiredMerchantLength + " day hired merchant");
cm.dispose();
} else {
cm.sendOk("Please make sure you have enough space to hold these items!");
}
} else {
cm.sendOk("I can't give you a merchant if you already have one!");
}
}
} else {
cm.dispose();
}
}
}

43
scripts/npc/1022104.js Normal file
View File

@@ -0,0 +1,43 @@
var status = -1;
var map = 910220000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

43
scripts/npc/1022105.js Normal file
View File

@@ -0,0 +1,43 @@
var status = -1;
var map = 910220000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

71
scripts/npc/1032000.js Normal file
View File

@@ -0,0 +1,71 @@
var status = 0;
var maps = [104000000, 102000000, 100000000, 103000000, 120000000];
var cost = [1000, 1000, 1000, 1000, 800];
var selectedMap = -1;
var mesos;
var hasCoupon = false;
function start() {
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 1 && mode == 0) {
cm.dispose();
return;
} else if (status >= 2 && mode == 0) {
cm.sendNext("There's a lot to see in this town, too. Come back and find us when you need to go to a different town.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
if (maps[selection] == 100000000 && cm.getMapId() == 101000000 && cm.haveItem(4032288)) {
cm.sendYesNo("Hmm, I see you have been recommended by Neinheart to come to Victoria Island to improve your knightly skills. Well, just this time the ride will be free of charges. Will you take the ride?");
hasCoupon = true;
} else {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
}
selectedMap = selection;
} else if (status == 3) {
if (!hasCoupon) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
} else {
cm.gainItem(4032288, -1);
}
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

229
scripts/npc/1032001.js Normal file
View File

@@ -0,0 +1,229 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Grendel the Really Old
Magician Job Advancement
Victoria Road : Magic Library (101000003)
Custom Quest 100006, 100008, 100100, 100101
*/
status = -1;
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 210;
spawnPnpc = false;
spawnPnpcFee = 7000000;
jobType = 2;
function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven'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 " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
cm.sendNext("Want to be a #rmagician#k? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 8#k, with getting " + cm.getFirstJobStatRequirement(jobType) + " as your top priority. Let's see."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} 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();
}
}
}
function action(mode, type, selection) {
status++;
if (mode == -1 && selection == -1) {
cm.dispose();
return;
} else if (mode == 0 && type == 0) {
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;
}
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if (PlayerNPC.spawnPlayerNPC(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) {
if (cm.getLevel() >= 8 && cm.canGetFirstJob(jobType)) {
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?");
} else {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rMagician#k.");
cm.dispose();
}
} else if (status == 1) {
if (cm.canHold(1372043)) {
if (cm.getJobId() == 0) {
cm.changeJobById(200);
cm.gainItem(1372043, 1);
cm.resetStats();
}
cm.sendNext("Alright, from here out, you are a part of us! You'll be living the life of a wanderer at ..., but just be patient as soon, you'll be living the high life. Alright, it ain't much, but I'll give you some of my abilities... HAAAHHH!!!");
} else {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
} else if (status == 3) {
cm.sendNextPrev("But remember, skills aren't everything. Your stats should support your skills as a Magician, also. Magicians use INT as their main stat, and LUK as their secondary stat. If raising stats is difficult, just use #bAuto-Assign#k");
} else if (status == 4) {
cm.sendNextPrev("Now, one more word of warning to you. If you fail in battle from this point on, you will lose a portion of your total EXP. Be extra mindful of this, since you have less HP than most.");
} else if (status == 5) {
cm.sendNextPrev("This is all I can teach you. Good luck on your journey, young Magician.");
} else {
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 Wizard (Fire / Poison) is all about.\r\n#L1#Please explain to me what being the Wizard (Ice / Lighting) is all about.\r\n#L2#Please explain to me what being the Cleric is all about.\r\n#L3#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(100006)) {
cm.startQuest(100006);
}
}
} else if (status == 1) {
if (!cm.haveItem(4031012)) {
if (cm.canHold(4031009)) {
if (!cm.haveItem(4031009)) {
cm.gainItem(4031009, 1);
}
cm.sendNextPrev("Please get this letter to #b#p1072001##k who's around #b#m101020000##k near Ellinia. He is taking care of the job of an instructor in place of me. Give him the letter and he'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 < 3) {
if (selection == 0) {
cm.sendNext("Magicians that master #rFire/Poison-based magic#k.\r\n\r\n#bWizards#k are a active class that deal magical, elemental damage. These abilities grants them a significant advantage against enemies weak to their element. With their skills #rMeditation#k and #rSlow#k, #bWizards#k can increase their magic attack and reduce the opponent's mobility. #bFire/Poison Wizards#k contains a powerful flame arrow attack and poison attack."); //f/p mage
} else if (selection == 1) {
cm.sendNext("Magicians that master #rIce/Lightning-based magic#k.\r\n\r\n#bWizards#k are a active class that deal magical, elemental damage. These abilities grants them a significant advantage against enemies weak to their element. With their skills #rMeditation#k and #rSlow#k, #bWizards#k can increase their magic attack and reduce the opponent's mobility. #bIce/Lightning Wizards#k have a freezing ice attack and a striking lightning attack."); //i/l mage
} else {
cm.sendNext("Magicians that master #rHoly magic#k.\r\n\r\n#bClerics#k are a powerful supportive class, bound to be accepted into any Party. That's because the have the power to #rHeal#k themselves and others in their party. Using #rBless#k, #bClerics#k can buff the attributes and reduce the amount of damage taken. This class is on worth going for if you find it hard to survive. #bClerics#k are especially effective against undead monsters."); //cleric
}
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#Wizard (Fire / Poison)\r\n#L1#Wizard (Ice / Lighting)\r\n#L2#Cleric");
}
}
} else if (status == 2) {
if (cm.haveItem(4031009)) {
cm.dispose();
return;
}
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 210 ? "#bWizard (Fire / Poison)#k" : job == 220 ? "#bWizard (Ice / Lighting)#k" : "#bCleric#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(100008);
cm.sendNext("Alright, you're the " + (job == 210 ? "#bWizard (Fire / Poison)#k" : job == 220 ? "#bWizard (Ice / Lighting)#k" : "#bCleric#k") + " from here on out. Mages and wizards are the intelligent bunch with incredible magical prowess, able to pierce the mind and the psychological structure 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 == 210 ? "#bWizard (Fire / Poison)#k" : job == 220 ? "#bWizard (Ice / Lighting)#k" : "#bCleric#k") + ". 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 you remember that.");
} else if (status == 6) {
cm.sendNextPrev((job == 210 ? "Wizard (Fire / Poison)" : job == 220 ? "Wizard (Ice / Lighting)" : "Cleric") + " 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.");
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("Since he is a clone of myself, you can expect a tough battle ahead. He uses a number of special attacking skills unlike any you have ever seen, and it is your task to successfully take him one on one. There is a time limit in the secret passage, so it is crucial that you defeat him within the time limit. I wish you the best of luck, and I hope you bring the #b#t4031059##k with you.");
}
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);
cm.dispose();
}
}

218
scripts/npc/1032002.js Normal file
View File

@@ -0,0 +1,218 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Francois
Victoria Island: Ellinia (101000000)
Refining NPC: (magicians)
* Gloves
* Glove Upgrades
* Hats
* Wand
* Staff
*/
var status = 0;
var selectedType = -1;
var selectedItem = -1;
var item;
var mats;
var matQty;
var cost;
function start() {
cm.getPlayer().setCS(true);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Welcome to my eco-safe refining operation! What would you like today?#b"
var options = ["Make a glove", "Upgrade a glove", "Upgrade a hat", "Make a wand", "Make a staff"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0) { //glove refine
var selStr = "So, what kind of glove would you like me to make?#b";
var items = ["Lemona#k - Magician Lv. 15#b", "Blue Morrican#k - Magician Lv. 20#b", "Ocean Mesana#k - Magician Lv. 25#b", "Red Lutia#k - Magician Lv. 30#b", "Red Noel#k - Magician Lv. 35#b", "Red Arten#k - Magician Lv. 40#b",
"Red Pennance#k - Magician Lv. 50#b", "Steel Manute#k - Magician Lv. 60#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
} else if (selectedType == 1) { //glove upgrade
var selStr = "So, what kind of glove are you looking to upgrade to?#b";
var items = ["Green Morrican#k - Magician Lv. 20#b", "Purple Morrican#k - Magician Lv. 20#b", "Blood Mesana#k - Magician Lv. 25#b", "Dark Mesana#k - Magician Lv. 25#b", "Blue Lutia#k - Magician Lv. 30#b", "Black Lutia#k - Magician Lv. 30#b",
"Blue Noel#k - Magician Lv. 35#b", "Dark Noel#k - Magician Lv. 35#b", "Blue Arten#k - Magician Lv. 40#b", "Dark Arten#k - Magician Lv. 40#b", "Blue Pennance#k - Magician Lv. 50#b", "Dark Pennance#k - Magician Lv. 50#b",
"Gold Manute#k - Magician Lv. 60#b", "Dark Manute#k - Magician Lv. 60#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
} else if (selectedType == 2) { //hat upgrade
var selStr = "A hat? Which one were you thinking of?#b";
var items = ["Steel Pride#k - Magician Lv. 30#b", "Golden Pride#k - Magician Lv. 30#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
} else if (selectedType == 3) { //wand refine
var selStr = "A wand, huh? Prefer the smaller weapon that fits in your pocket? Which type are you seeking?#b";
var items = ["Wooden Wand#k - Common Lv. 8#b", "Hardwood Wand#k - Common Lv. 13#b", "Metal Wand#k - Common Lv. 18#b", "Ice Wand#k - Magician Lv. 23#b", "Mithril Wand#k - Magician Lv. 28#b",
"Wizard Wand#k - Magician Lv. 33#b", "Fairy Wand#k - Magician Lv. 38#b", "Cromi#k - Magician Lv. 48#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
} else if (selectedType == 4) { //staff refine
var selStr = "Ah, a staff, a great symbol of one's power! Which are you looking to make?#b";
var items = ["Wooden Staff#k - Magician Lv. 10#b", "Sapphire Staff#k - Magician Lv. 15#b", "Emerald Staff#k - Magician Lv. 15#b", "Old Wooden Staff#k - Magician Lv. 20#b", "Wizard Staff#k - Magician Lv. 25#b",
"Arc Staff#k - Magician Lv. 45#b"];
for (var i = 0; i < items.length; i++) {
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
}
cm.sendSimple(selStr);
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0) { //glove refine
var itemSet = [1082019, 1082020, 1082026, 1082051, 1082054, 1082062, 1082081, 1082086];
var matSet = [4000021, [4000021, 4011001], [4000021, 4011006], [4000021, 4021006, 4021000], [4000021, 4011006, 4011001, 4021000],
[4000021, 4021000, 4021006, 4003000], [4021000, 4011006, 4000030, 4003000], [4011007, 4011001, 4021007, 4000030, 4003000]];
var matQtySet = [15, [30, 1], [50, 2], [60, 1, 2], [70, 1, 3, 2], [80, 3, 3, 30], [3, 2, 35, 40], [1, 8, 1, 50, 50]];
var costSet = [7000, 15000, 20000, 25000, 30000, 40000, 50000, 70000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //glove upgrade
var itemSet = [1082021, 1082022, 1082027, 1082028, 1082052, 1082053, 1082055, 1082056, 1082063, 1082064, 1082082, 1082080, 1082087, 1082088];
var matSet = [[1082020, 4011001], [1082020, 4021001], [1082026, 4021000], [1082026, 4021008], [1082051, 4021005],
[1082051, 4021008], [1082054, 4021005], [1082054, 4021008], [1082062, 4021002], [1082062, 4021008],
[1082081, 4021002], [1082081, 4021008], [1082086, 4011004, 4011006], [1082086, 4021008, 4011006]];
var matQtySet = [[1, 1], [1, 2], [1, 3], [1, 1], [1, 3], [1, 1], [1, 3], [1, 1], [1, 4],
[1, 2], [1, 5], [1, 3], [1, 3, 5], [1, 2, 3]];
var costSet = [20000, 25000, 30000, 40000, 35000, 40000, 40000, 45000, 45000, 50000, 55000, 60000, 70000, 80000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 2) { //hat upgrade
var itemSet = [1002065, 1002013];
var matSet = [[1002064, 4011001], [1002064, 4011006]];
var matQtySet = [[1, 3], [1, 3]];
var costSet = [40000, 50000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 3) { //wand refine
var itemSet = [1372005, 1372006, 1372002, 1372004, 1372003, 1372001, 1372000, 1372007];
var matSet = [4003001, [4003001, 4000001], [4011001, 4000009, 4003000], [4011002, 4003002, 4003000], [4011002, 4021002, 4003000],
[4021006, 4011002, 4011001, 4003000], [4021006, 4021005, 4021007, 4003003, 4003000], [4011006, 4021003, 4021007, 4021002, 4003002, 4003000]];
var matQtySet = [5, [10, 50], [1, 30, 5], [2, 1, 10], [3, 1, 10], [5, 3, 1, 15], [5, 5, 1, 1, 20], [4, 3, 2, 1, 1, 30]];
var costSet = [1000, 3000, 5000, 12000, 30000, 60000, 120000, 200000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 4) { //staff refine
var itemSet = [1382000, 1382003, 1382005, 1382004, 1382002, 1382001];
var matSet = [4003001, [4021005, 4011001, 4003000], [4021003, 4011001, 4003000], [4003001, 4011001, 4003000],
[4021006, 4021001, 4011001, 4003000], [4011001, 4021006, 4021001, 4021005, 4003000, 4000010, 4003003]];
var matQtySet = [5, [1, 1, 5], [1, 1, 5], [50, 1, 10], [2, 1, 1, 15], [8, 5, 5, 5, 30, 50, 1]];
var costSet = [2000, 2000, 2000, 5000, 12000, 180000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make a #t" + item + "#? In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost + " meso";
}
cm.sendYesNo(prompt);
} else if (status == 3 && mode == 1) {
var complete = true;
if (!cm.canHold(item, 1)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
} else if (cm.getMeso() < cost) {
cm.sendOk("Sorry, but all of us need money to live. Come back when you can pay my fees, yes?")
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i])) {
complete = false;
}
}
} else if (!cm.haveItem(mats, matQty)) {
complete = false;
}
}
if (!complete) {
cm.sendOk("Uhm... I don't keep extra material on me. Sorry. ");
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i]);
}
} else {
cm.gainItem(mats, -matQty);
}
if (cost > 0) {
cm.gainMeso(-cost);
}
cm.gainItem(item, 1);
cm.sendOk("It's a success! Oh, I've never felt so alive! Please come back again!");
}
cm.dispose();
}
}

82
scripts/npc/1032003.js Normal file
View File

@@ -0,0 +1,82 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Shane - Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var check = 0;
function start() {
if (cm.getLevel() < 25) {
cm.sendOk("You must be a higher level to enter the Forest of Patience.");
cm.dispose();
check = 1;
} else {
cm.sendYesNo("Hi, i'm Shane. I can let you into the Forest of Patience for a small fee. Would you like to enter for #b5000#k mesos?");
}
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
if (check != 1) {
if (cm.getPlayer().getMeso() < 5000) {
cm.sendOk("Sorry but it doesn't like you have enough mesos!")
cm.dispose();
} else {
if (cm.isQuestStarted(2050)) {
cm.warp(101000100, 0);
} else if (cm.isQuestStarted(2051)) {
cm.warp(101000102, 0);
} else if (cm.getLevel() >= 25 && cm.getLevel() < 50) {
cm.warp(101000100, 0);
} else if (cm.getLevel() >= 50) {
cm.warp(101000102, 0);
}
cm.gainMeso(-5000);
cm.dispose();
}
}
}
}
}

36
scripts/npc/1032004.js Normal file
View File

@@ -0,0 +1,36 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Shane 1032004
* @Author Moogra
*/
function start() {
cm.sendYesNo("Would you like to return to Ellinia?");
}
function action(mode, type, selection) {
if (mode > 0) {
cm.warp(101000000, 0);
}
cm.dispose();
}

61
scripts/npc/1032005.js Normal file
View File

@@ -0,0 +1,61 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
VIP Cab - Victoria Road : Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var cost = 10000;
function start() {
cm.sendNext("Hi there! This cab is for VIP customers only. Instead of just taking you to different towns like the regular cabs, we offer a much better service worthy of VIP class. It's a bit pricey, but... for only 10,000 mesos, we'll take you safely to the \r\n#bAnt Tunnel#k.");
}
function action(mode, type, selection) {
status++;
if (mode == -1) {
cm.dispose();
return;
} else if (mode == 0) {
cm.sendOk("This town also has a lot to offer. Find us if and when you feel the need to go to the Ant Tunnel Park.");
cm.dispose();
return;
}
if (status == 1) {
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
cost /= ((cm.getJobId() == 0) ? 10 : 1);
} else if (status == 2) {
if (cm.getMeso() < cost) {
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
} else {
cm.gainMeso(-cost);
cm.warp(105070001);
}
cm.dispose();
}
}

25
scripts/npc/1032006.js Normal file
View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.getPlayer().getStorage().sendStorage(cm.getClient(), 1032006);
cm.dispose();
}

29
scripts/npc/1032007.js Normal file
View File

@@ -0,0 +1,29 @@
var status = 0;
var cost = 5000;
function start() {
cm.sendYesNo("Hello, I'm in charge of selling tickets for the ship ride to Orbis Station of Ossyria. The ride to Orbis takes off every 15 minutes, beginning on the hour, and it'll cost you #b" + cost + " mesos#k. Are you sure you want to purchase #b#t4031045##k?");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.sendNext("You must have some business to take care of here, right?");
cm.dispose();
return;
}
status++;
if (status == 1) {
if (cm.getMeso() >= cost && cm.canHold(4031045)) {
cm.gainItem(4031045, 1);
cm.gainMeso(-cost);
cm.dispose();
} else {
cm.sendOk("Are you sure you have #b" + cost + " mesos#k? If so, then I urge you to check your etc. inventory, and see if it's full or not.");
cm.dispose();
}
}
}
}

31
scripts/npc/1032008.js Normal file
View File

@@ -0,0 +1,31 @@
function start() {
if (cm.haveItem(4031045)) {
var em = cm.getEventManager("Boats");
if (em.getProperty("entry") == "true") {
cm.sendYesNo("Do you want to go to Orbis?");
} else {
cm.sendOk("The boat to Orbis is already travelling, please be patient for the next one.");
cm.dispose();
}
} else {
cm.sendOk("Make sure you got a Orbis ticket to travel in this boat. Check your inventory.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode <= 0) {
cm.sendOk("Okay, talk to me if you change your mind!");
cm.dispose();
return;
}
var em = cm.getEventManager("Boats");
if (em.getProperty("entry") == "true") {
cm.warp(101000301);
cm.gainItem(4031045, -1);
cm.dispose();
} else {
cm.sendOk("The boat to Orbis is ready to take off, please be patient for the next one.");
cm.dispose();
}
}

49
scripts/npc/1032009.js Normal file
View File

@@ -0,0 +1,49 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
Purin (On Boat ) 1032009
**/
var status = 0;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (status == 0) {
cm.sendYesNo("Do you wish to leave the boat?");
status++;
} else {
if (mode < 1) {
cm.dispose();
} else {
if (status == 1) {
cm.sendNext("Alright, see you next time. Take care.");
status++;
} else if (status == 2) {
cm.warp(101000300, 0);// back to orbis
cm.dispose();
}
}
}
}

117
scripts/npc/1032100.js Normal file
View File

@@ -0,0 +1,117 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Arwen the Fairy - Victoria Road : Ellinia (101000000)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var item;
var selected;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 1 && mode == 0) {
cm.dispose();
return;
} else if (status == 2 && mode == 0) {
cm.sendNext("It's not easy making " + item + ". Please get the materials ready.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
if (cm.getLevel() >= 40) {
cm.sendNext("Yeah... I am the master alchemist of the fairies. But the fairies are not supposed to be in contact with a human being for a long period of time... A strong person like you will be fine, though. If you get me the materials, I'll make you a special item.");
} else {
cm.sendOk("I can make rare, valuable items but unfortunately I can't make it to a stranger like you.");
cm.dispose();
}
} else if (status == 1) {
cm.sendSimple("What do you want to make?#b\r\n#L0#Moon Rock#l\r\n#L1#Star Rock#l\r\n#L2#Black Feather#l");
} else if (status == 2) {
selected = selection;
if (selection == 0) {
item = "Moon Rock";
cm.sendYesNo("So you want to make a Moon Rock? To do that you need to refine one of each of these: #bBronze Plate#k, #bSteel Plate#k,\r\n#bMithril Plate#k, #bAdamantium Plate#k, #bSilver Plate#k, #bOrihalcon Plate#k and #bGold Plate#k. Throw in 10,000 mesos and I'll make it for you.");
} else if (selection == 1) {
item = "Star Rock";
cm.sendYesNo("So you want to make a Star Rock? To do that you need to refine one of each of these: #bGarnet#k, #bAmethyst#k, #bAquaMarine#k, #bEmerald#k, #bOpal#k, #bSapphire#k, #bTopaz#k, #bDiamond#k and #bBlack Crystal#k. Throw in 15,000 mesos and I'll make it for you.");
} else if (selection == 2) {
item = "Black Feather";
cm.sendYesNo("So you want to make a Black Feather? To do that you need #b1 Flaming Feather#k, #b1 Moon Rock#k and #b1 Black Crystal#k. Throw in 30,000 mesos and I'll make it for you. Oh yeah, this piece of feather is a very special item, so if you drop it by any chance, it'll disappear, as well as you won't be able to give it away to someone else.");
}
} else if (status == 3) {
if (selected == 0) {
if (cm.haveItem(4011000) && cm.haveItem(4011001) && cm.haveItem(4011002) && cm.haveItem(4011003) && cm.haveItem(4011004) && cm.haveItem(4011005) && cm.haveItem(4011006) && cm.getMeso() >= 10000) {
cm.gainMeso(-10000);
for (var i = 4011000; i < 4011007; i++) {
cm.gainItem(i, -1);
}
cm.gainItem(4011007, 1);
cm.sendNext("Ok here, take " + item + ". It's well-made, probably because I'm using good materials. If you need my help down the road, feel free to come back.");
} else {
cm.sendNext("Are you sure you have enough mesos? Please check and see if you have the refined #bBronze Plate#k, #bSteel Plate#k,\r\n#bMithril Plate#k, #bAdamantium Plate#k, #bSilver Plate#k, #bOrihalcon Plate#k and #bGold Plate#k, one of each.");
}
} else if (selected == 1) {
if (cm.haveItem(4021000) && cm.haveItem(4021001) && cm.haveItem(4021002) && cm.haveItem(4021003) && cm.haveItem(4021004) && cm.haveItem(4021005) && cm.haveItem(4021006) && cm.haveItem(4021007) && cm.haveItem(4021008) && cm.getMeso() >= 15000) {
cm.gainMeso(-15000);
for (var j = 4021000; j < 4021009; j++) {
cm.gainItem(j, -1);
}
cm.gainItem(4021009, 1);
cm.sendNext("Ok here, take " + item + ". It's well-made, probably because I'm using good materials. If you need my help down the road, feel free to come back.");
} else {
cm.sendNext("Are you sure you have enough mesos? Please check and see if you have the refined #bGarnet#k, #bAmethyst#k, #bAquaMarine#k, #bEmerald#k, #bOpal#k, #bSapphire#k, #bTopaz#k, #bDiamond#k and #bBlack Crystal#k, one of each.");
}
} else if (selected == 2) {
if (cm.haveItem(4001006) && cm.haveItem(4011007) && cm.haveItem(4021008) && cm.getMeso() >= 30000) {
cm.gainMeso(-30000);
for (var k = 4001006; k < 4021009; k += 10001) {
cm.gainItem(k, -1);
}
cm.gainItem(4031042, 1);
cm.sendNext("Ok here, take " + item + ". It's well-made, probably because I'm using good materials. If you need my help down the road, feel free to come back.");
} else {
cm.sendNext("Are you sure you have enough mesos? Please check and see if you have the refined #bGarnet#k, #bAmethyst#k, #bAquaMarine#k, #bEmerald#k, #bOpal#k, #bSapphire#k, #bTopaz#k, #bDiamond#k and #bBlack Crystal#k, one of each.");
}
}
cm.dispose();
}
}
}

128
scripts/npc/1032102.js Normal file
View File

@@ -0,0 +1,128 @@
/*
@author RMZero213 (RaGEZONE)
Just keep this header here and don't claim that you made it.
*/
/*
1032102.js
Mar the Fairy
Dragon Evolver
*/
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.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendYesNo("I am Mar the Fairy. If you have a dragon at level 15 or higher and a rock of evolution, I can evolve your dragon. If you are lucky, you may even get a black one! Would you like me to do so?");
} else if (status == 1) {
if (cm.haveItem(5000028, 1)) {
cm.gainItem(5000028, -1);
cm.gainItem(5000029, 1);
cm.sendOk("I don't know how you got that egg, but it has hatched, apparently!");
cm.dispose();
} else if (cm.getPlayer().getPet(0) == null) {
cm.sendOk("Make sure your pet is equipped on slot 1.");
cm.dispose();
} else if (cm.getPlayer().getPet(0).getItemId() < 5000029 || cm.getPlayer().getPet(0).getItemId() > 5000033 || !cm.haveItem(5380000, 1)) {
cm.sendOk("You do not meet the requirements. You need #i5380000##t5380000#, as well as either one of #d#i5000029##t5000029##k, #g#i5000030##t5000030##k, #r#i5000031##t5000031##k, #b#i5000032##t5000032##k, or #e#i5000033##t5000033##n equipped on slot 1. Please come back when you do.");
cm.dispose();
} else if (cm.getPlayer().getPet(0).getLevel() < 15) {
cm.sendOk("Your pet must be level 15 or above to evolve.");
cm.dispose();
} else if (cm.haveItem(5000029, 2) || cm.haveItem(5000030, 2) || cm.haveItem(5000031, 2) || cm.haveItem(5000032, 2) || cm.haveItem(5000033, 2)) {
cm.sendSimple("You have a dragon which isn't out, and as well as a dragon which is out. I can remove one for you. Remember that the data for the dragon I am removing will be lost.\r\n#r#L0#Remove my CASH first slot.#l#k\r\n#b#L1#Remove the first dragon in my inventory.#l#k\r\n#g#L2#No thanks.#l#k");
} else {
var i;
for (i = 0; i < 3; i++) {
if (cm.getPlayer().getPet(i) != null && cm.getPlayer().getPet(i).getItemId() == 5000029) {
pet = cm.getPlayer().getPet(i);
break;
}
}
if (i == 3) {
cm.sendOk("You either don't have a pet dragon ready to evolve or you lack #b#t5380000##k.");
cm.dispose();
return;
}
var id = cm.getPlayer().getPet(i).getItemId();
//var name = cm.getPlayer().getPet(i).getName();
//var level = cm.getPlayer().getPet(i).getLevel();
//var closeness = cm.getPlayer().getPet(i).getCloseness();
//var fullness = cm.getPlayer().getPet(i).getFullness();
//ItemInformationProvider ii = ItemInformationProvider.getInstance();
if (id < 5000029 || id > 5000033) {
cm.sendOk("Something wrong, try again.");
cm.dispose();
}
var rand = 1 + Math.floor(Math.random() * 10);
var after = 0;
if (rand >= 1 && rand <= 3) {
after = 5000030;
} else if (rand >= 4 && rand <= 6) {
after = 5000031;
} else if (rand >= 7 && rand <= 9) {
after = 5000032;
} else if (rand == 10) {
after = 5000033;
} else {
cm.sendOk("Something wrong. Try again.");
cm.dispose();
}
/*if (name.equals(ItemInformationProvider.getInstance().getName(id))) {
name = ItemInformationProvider.getInstance().getName(after);
}*/
cm.gainItem(5380000, -1);
cm.evolvePet(i, after);
cm.sendOk("Your dragon has now evolved!! It used to be a #i" + id + "# #t" + id + "#, and now it's a #i" + after + "# #t" + after + "#!");
cm.dispose();
}
} else if (status == 2) {
if (selection == 0) {
const InventoryManipulator = Java.type('client.inventory.manipulator.InventoryManipulator');
const InventoryType = Java.type('client.inventory.InventoryType');
InventoryManipulator.removeFromSlot(cm.getClient(), InventoryType.CASH, 1, 1, true);
cm.sendOk("Your cash first slot is removed.");
} else if (selection == 1) {
if (cm.haveItem(5000029, 2)) {
cm.gainItem(5000029, -1);
} else if (cm.haveItem(5000030, 2)) {
cm.gainItem(5000030, -1);
} else if (cm.haveItem(5000031, 2)) {
cm.gainItem(5000031, -1);
} else if (cm.haveItem(5000032, 2)) {
cm.gainItem(5000032, -1);
} else if (cm.haveItem(5000033, 2)) {
cm.gainItem(5000033, -1);
}
cm.sendOk("The first dragon in your inventory is removed.");
} else if (selection == 2) {
cm.sendOk("Okay, come back next time.");
}
cm.dispose();
}
}
}

55
scripts/npc/1032109.js Normal file
View File

@@ -0,0 +1,55 @@
/*
NPC: Corner of the Magic Library
MAP: Hidden Street - Magic Library (910110000)
QUEST: Maybe it's Grendel! (20718)
*/
var status;
var mobId = 2220100; //Blue Mushroom
function start() {
if (!cm.isQuestStarted(20718)) { // thanks Stray, Ari
cm.dispose();
return;
}
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 0)) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if (status == 0) {
cm.sendOk("A mysterious black figure appeared and summoned a lot of angry monsters!");
} else if (status == 1) {
var player = cm.getPlayer();
var map = player.getMap();
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
for (var i = 0; i < 10; i++) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(117, 183));
}
for (var i = 0; i < 10; i++) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(4, 183));
}
for (var i = 0; i < 10; i++) {
map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-109, 183));
}
cm.completeQuest(20718, 1103003);
cm.gainExp(4000 * cm.getPlayer().getExpRate());
cm.dispose();
}
}

31
scripts/npc/1032110.js Normal file
View File

@@ -0,0 +1,31 @@
/*
NPC: Corner of the Magic Library
MAP: Hidden Street - Magic Library (910110000)
QUEST: Maybe it's Grendel! (20718)
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 0)) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if (status == 0) {
cm.sendOk("Nothing remarkable here.");
} else if (status == 1) {
cm.dispose();
}
}

44
scripts/npc/1032111.js Normal file
View File

@@ -0,0 +1,44 @@
/*
NPC: Small Tree Stump
MAP: Victoria Road - Top of the Tree That Grew (101010103)
QUEST: Maybe it's Arwen! (20716)
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 0)) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if (status == 0) {
if (cm.isQuestStarted(20716)) {
if (!cm.hasItem(4032142)) {
if (cm.canHold(4032142)) {
cm.gainItem(4032142, 1);
cm.sendOk("You bottled up some of the clear tree sap. #i4032142#");
} else {
cm.sendOk("Make sure you have a free spot in your ETC inventory.");
}
} else {
cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
}
} else {
cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
}
} else if (status == 1) {
cm.dispose();
}
}

43
scripts/npc/1032113.js Normal file
View File

@@ -0,0 +1,43 @@
var status = -1;
var map = 910120000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

43
scripts/npc/1032114.js Normal file
View File

@@ -0,0 +1,43 @@
var status = -1;
var map = 910120000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

57
scripts/npc/1040000.js Normal file
View File

@@ -0,0 +1,57 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2019 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/>.
*/
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) {
if (cm.isQuestStarted(28177) && !cm.haveItem(4032479)) {
if (cm.canHold(4032479)) {
cm.gainItem(4032479, 1);
cm.sendOk("Huh, are you looking for me? Chief Stan sent you here, right? But hey, I am not the suspect you seek. If I have some proof? Here, take this and return it to #b#p1012003##k.");
} else {
cm.sendOk("Hey, make a slot available before talking to me.");
}
} else {
cm.sendOk("Zzzzzz...");
}
cm.dispose();
}
}
}

53
scripts/npc/1043000.js Normal file
View File

@@ -0,0 +1,53 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Sabi JQ herb pile #1
*/
function start() {
var prizes = Array(1040052, 1040054, 1040130, 1041143, 1042013, 1042022, 1042034, 1042084, 1042098, 1042117, 1702002, 1702015);
var chances = Array(10, 10, 10, 15, 10, 10, 10, 10, 10, 10, 5, 5);
var totalodds = 0;
var choice = 0;
for (var i = 0; i < chances.length; i++) {
var itemGender = (Math.floor(prizes[i] / 1000) % 10);
if ((cm.getPlayer().getGender() != itemGender) && (itemGender != 2)) {
chances[i] = 0;
}
}
for (var i = 0; i < chances.length; i++) {
totalodds += chances[i];
}
var randomPick = Math.floor(Math.random() * totalodds) + 1;
for (var i = 0; i < chances.length; i++) {
randomPick -= chances[i];
if (randomPick <= 0) {
choice = i;
randomPick = totalodds + 100;
}
}
if (cm.isQuestStarted(2050)) {
cm.gainItem(4031020, 1);
}
cm.gainItem(prizes[choice], 1);
cm.warp(101000000, 0);
cm.dispose();
}

54
scripts/npc/1043001.js Normal file
View File

@@ -0,0 +1,54 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Sabi JQ herb pile #1
*/
function start() {
var prizes = Array(1060041, 1060048, 1060116, 1061113, 1061130, 1061139, 1062009, 1062017, 1062024, 1062056, 1062061, 1702045, 1702114);
var chances = Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 5, 5);
var totalodds = 0;
var choice = 0;
for (var i = 0; i < chances.length; i++) {
var itemGender = (Math.floor(prizes[i] / 1000) % 10);
if ((cm.getPlayer().getGender() != itemGender) && (itemGender != 2)) {
chances[i] = 0;
}
}
for (var i = 0; i < chances.length; i++) {
totalodds += chances[i];
}
var randomPick = Math.floor(Math.random() * totalodds) + 1;
for (var i = 0; i < chances.length; i++) {
randomPick -= chances[i];
if (randomPick <= 0) {
choice = i;
randomPick = totalodds + 100;
}
}
if (cm.isQuestStarted(2051)) {
cm.gainItem(4031032, 1);
}
cm.gainItem(prizes[choice], 1);
cm.warp(101000000, 0);
cm.dispose();
}

231
scripts/npc/1052001.js Normal file
View File

@@ -0,0 +1,231 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Dark Lord
Thief Job Advancement
Victoria Road : Thieves' Hideout (103000003)
Custom Quest 100009, 100011
*/
status = -1;
actionx = {"1stJob": false, "2ndjob": false, "3thJobI": false, "3thJobC": false};
job = 410;
spawnPnpc = false;
spawnPnpcFee = 7000000;
jobType = 4;
function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven'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 " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
}
cm.sendYesNo(sendStr);
} else {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
cm.sendNext("Want to be a #rthief#k? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10, with at least your " + cm.getFirstJobStatRequirement(jobType) + "#k. Let's see."); // thanks Vcoc for noticing a need to state and check requirements on first job adv starting message
} 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();
}
}
}
function action(mode, type, selection) {
status++;
if (mode == -1 && selection == -1) {
cm.dispose();
return;
} else 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;
}
const PlayerNPC = Java.type('server.life.PlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if (PlayerNPC.spawnPlayerNPC(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) {
if (cm.getLevel() >= 10 && cm.canGetFirstJob(jobType)) {
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?");
} else {
cm.sendOk("Train a bit more until you reach the base requirements and I can show you the way of the #rThief#k.");
cm.dispose();
}
} else if (status == 1) {
if (cm.canHold(2070000) && cm.canHoldAll([1472061, 1332063])) {
if (cm.getJobId() == 0) {
cm.changeJobById(400);
cm.gainItem(2070015, 500);
cm.gainItem(1472061, 1);
cm.gainItem(1332063, 1);
cm.resetStats();
}
cm.sendNext("Alright, from here out, you are a part of us! You'll be living the life of a wanderer at ..., but just be patient as soon, you'll be living the high life. Alright, it ain't much, but I'll give you some of my abilities... HAAAHHH!!!");
} else {
cm.sendNext("Make some room in your inventory and talk back to me.");
cm.dispose();
}
} else if (status == 2) {
cm.sendNextPrev("You've gotten much stronger now. Plus every single one of your inventories have added slots. A whole row, to be exact. Go see for it yourself. I just gave you a little bit of #bSP#k. When you open up the #bSkill#k menu on the lower left corner of the screen, there are skills you can learn by using SP's. One warning, though: You can't raise it all together all at once. There are also skills you can acquire only after having learned a couple of skills first.");
} else if (status == 3) {
cm.sendNextPrev("Now a reminder. Once you have chosen, you cannot change up your mind and try to pick another path. Go now, and live as a proud Thief.");
} else {
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 Assassin is all about.\r\n#L1#Please explain to me what being the Bandit is all about.\r\n#L3#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(100009)) {
cm.startQuest(100009);
}
}
} else if (status == 1) {
if (!cm.haveItem(4031012)) {
if (cm.canHold(4031011)) {
if (!cm.haveItem(4031011)) {
cm.gainItem(4031011, 1);
}
cm.sendNextPrev("Please get this letter to #b#p1072003##k who's around #b#m102040000##k near Kerning City. He is taking care of the job of an instructor in place of me. Give him the letter and he'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 < 3) {
if (selection == 0) { //assassin
cm.sendNext("Thieves that master #rClaws#k.\r\n\r\n#bAssassins#k are far ranged attackers. They are quite Meso efficient and have good damage potential, but cost more than Bandits.");
} else if (selection == 1) { //bandit
cm.sendNext("Thieves that master #rDaggers#k.\r\n\r\n#bBandits#k are quick melee attackers and are quite powerful among the 2nd jobs. They aren't as Meso efficient as Assassins and do not have the benefit of ranged attack but make up for it in much greater raw power.");
}
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#Assassin\r\n#L1#Bandit");
}
}
} else if (status == 2) {
if (cm.haveItem(4031011)) {
cm.dispose();
return;
}
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 410 ? "#bAssassin#k" : "#bBandit#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(100011);
if (job == 410) {
cm.sendNext("Alright, from here on out you are the #bAssassin#k. Assassins have quick hands and quicker feets to dominate the enemies. Please keep training. I'll make you even more powerful than you are right now!");
} else {
cm.sendNext("Alright, you're the #bBandit from here on out. Bandits revel in shadows and darkness, waiting until the right time comes for them to stick a dagger through the enemy's hearth, suddenly and swiftly... please keep training. I'll make you even more powerful than you are right now.");
}
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 == 410 ? "assassin" : "bandit") + ". 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 == 410 ? "Assassin" : "Bandit") + " 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.");
}
} else if (actionx["3thJobI"]) {
if (status == 0) {
if (cm.getPlayer().gotPartyQuestItem("JB3")) {
cm.getPlayer().removePartyQuestItem("JB3");
cm.getPlayer().setPartyQuestItemObtained("JBP");
}
cm.sendNextPrev("Since he is a clone of myself, you can expect a tough battle ahead. He uses a number of special attacking skills unlike any you have ever seen, and it is your task to successfully take him one on one. There is a time limit in the secret passage, so it is crucial that you defeat him within the time limit. I wish you the best of luck, and I hope you bring the #b#t4031059##k with you.");
}
} else if (actionx["3thJobC"]) {
cm.getPlayer().removePartyQuestItem("JBP");
cm.gainItem(4031059, -1);
cm.gainItem(4031057, 1);
cm.dispose();
}
}

250
scripts/npc/1052002.js Normal file
View File

@@ -0,0 +1,250 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* JM from tha Streetz
Victoria Road: Kerning City (103000000)
Refining NPC:
* Gloves
* Glove Upgrade
* Claw
* Claw Upgrade
* Processed Wood/Screws
* Note: JM by default is used as a Megaphone shop. To move this shop to Frederick in the FM,
* following MySQL command:
* UPDATE `shops` SET `npcid`='9030000' WHERE (`shopid`='0')
*/
var status = 0;
var selectedType = -1;
var selectedItem = -1;
var item;
var mats;
var matQty;
var cost;
var qty;
var equip;
function start() {
cm.getPlayer().setCS(true);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Pst... If you have the right goods, I can turn it into something niice...#b"
var options = ["Create a glove", "Upgrade a glove", "Create a claw", "Upgrade a claw", "Create materials"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0) { //glove refine
var selStr = "So, what kind of glove would you like me to make?#b";
var gloves = ["Work Gloves#k - Common Lv. 10#b", "Brown Duo#k - Thief Lv. 15#b", "Blue Duo#k - Thief Lv. 15#b", "Black Duo#k - Thief Lv. 15#b", "Bronze Mischief#k - Thief Lv. 20#b", "Bronze Wolfskin#k - Thief Lv. 25#b", "Steel Sylvia#k - Thief Lv. 30#b",
"Steel Arbion#k - Thief Lv. 35#b", "Red Cleave#k - Thief Lv. 40#b", "Blue Moon Glove#k - Thief Lv. 50#b", "Bronze Pow#k - Thief Lv. 60#b"];
for (var i = 0; i < gloves.length; i++) {
selStr += "\r\n#L" + i + "# " + gloves[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
} else if (selectedType == 1) { //glove upgrade
var selStr = "An upgraded glove? Sure thing, but note that upgrades won't carry over to the new item... #b";
var gloves = ["Mithril Mischief#k - Thief Lv. 20#b", "Dark Mischief#k - Thief Lv. 20#b", "Mithril Wolfskin#k - Thief Lv. 25#b",
"Dark Wolfskin#k - Thief Lv. 25#b", "Silver Sylvia#k - Thief Lv. 30#b", "Gold Sylvia#k - Thief Lv. 30#b", "Orihalcon Arbion#k - Thief Lv. 35#b", "Gold Arbion#k - Thief Lv. 35#b", "Gold Cleave#k - Thief Lv. 40#b",
"Dark Cleave#k - Thief Lv. 40#b", "Red Moon Glove#k - Thief Lv. 50#b", "Brown Moon Glove#k - Thief Lv. 50#b", "Silver Pow#k - Thief Lv. 60#b", "Gold Pow#k - Thief Lv. 60#b"];
for (var i = 0; i < gloves.length; i++) {
selStr += "\r\n#L" + i + "# " + gloves[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
} else if (selectedType == 2) { //claw refine
var selStr = "So, what kind of claw would you like me to make?#b";
var claws = ["Steel Titans#k - Thief Lv. 15#b", "Bronze Igor#k - Thief Lv. 20#b", "Meba#k - Thief Lv. 25#b", "Steel Guards#k - Thief Lv. 30#b", "Bronze Guardian#k - Thief Lv. 35#b", "Steel Avarice#k - Thief Lv. 40#b", "Steel Slain#k - Thief Lv. 50#b"];
for (var i = 0; i < claws.length; i++) {
selStr += "\r\n#L" + i + "# " + claws[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
} else if (selectedType == 3) { //claw upgrade
var selStr = "An upgraded claw? Sure thing, but note that upgrades won't carry over to the new item...#b";
var claws = ["Mithril Titans#k - Thief Lv. 15#b", "Gold Titans#k - Thief Lv. 15#b", "Steel Igor#k - Thief Lv. 20#b", "Adamantium Igor#k - Thief Lv. 20#b", "Mithril Guards#k - Thief Lv. 30#b", "Adamantium Guards#k - Thief Lv. 30#b",
"Silver Guardian#k - Thief Lv. 35#b", "Dark Guardian#k - Thief Lv. 35#b", "Blood Avarice#k - Thief Lv. 40#b", "Adamantium Avarice#k - Thief Lv. 40#b", "Dark Avarice#k - Thief Lv. 40#b", "Blood Slain#k - Thief Lv. 50#b", "Sapphire Slain#k - Thief Lv. 50#b"];
for (var i = 0; i < claws.length; i++) {
selStr += "\r\n#L" + i + "# " + claws[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
} else if (selectedType == 4) { //material refine
var selStr = "Materials? I know of a few materials that I can make for you...#b";
var materials = ["Make Processed Wood with Tree Branch", "Make Processed Wood with Firewood", "Make Screws (packs of 15)"];
for (var i = 0; i < materials.length; i++) {
selStr += "\r\n#L" + i + "# " + materials[i] + "#l";
}
equip = false;
cm.sendSimple(selStr);
}
if (equip) {
status++;
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 4) { //material refine
var itemSet = [4003001, 4003001, 4003000];
var matSet = [4000003, 4000018, [4011000, 4011001]];
var matQtySet = [10, 5, [1, 1]];
var costSet = [0, 0, 0];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?";
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3 && mode == 1) {
if (equip) {
selectedItem = selection;
qty = 1;
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
if (selectedType == 0) { //glove refine
var itemSet = [1082002, 1082029, 1082030, 1082031, 1082032, 1082037, 1082042, 1082046, 1082075, 1082065, 1082092];
var matSet = [4000021, [4000021, 4000018], [4000021, 4000015], [4000021, 4000020], [4011000, 4000021], [4011000, 4011001, 4000021], [4011001, 4000021, 4003000], [4011001, 4011000, 4000021, 4003000], [4021000, 4000014, 4000021, 4003000], [4021005, 4021008, 4000030, 4003000], [4011007, 4011000, 4021007, 4000030, 4003000]];
var matQtySet = [15, [30, 20], [30, 20], [30, 20], [2, 40], [2, 1, 10], [2, 50, 10], [3, 1, 60, 15], [3, 200, 80, 30], [3, 1, 40, 30], [1, 8, 1, 50, 50]];
var costSet = [1000, 7000, 7000, 7000, 10000, 15000, 25000, 30000, 40000, 50000, 70000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //glove upgrade
var itemSet = [1082033, 1082034, 1082038, 1082039, 1082043, 1082044, 1082047, 1082045, 1082076, 1082074, 1082067, 1082066, 1082093, 1082094];
var matSet = [[1082032, 4011002], [1082032, 4021004], [1082037, 4011002], [1082037, 4021004], [1082042, 4011004], [1082042, 4011006], [1082046, 4011005], [1082046, 4011006], [1082075, 4011006], [1082075, 4021008], [1082065, 4021000], [1082065, 4011006, 4021008], [1082092, 4011001, 4000014], [1082092, 4011006, 4000027]];
var matQtySet = [[1, 1], [1, 1], [1, 2], [1, 2], [1, 2], [1, 1], [1, 3], [1, 2], [1, 4], [1, 2], [1, 5], [1, 2, 1], [1, 7, 200], [1, 7, 150]];
var costSet = [5000, 7000, 10000, 12000, 15000, 20000, 22000, 25000, 40000, 50000, 55000, 60000, 70000, 80000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 2) { //claw refine
var itemSet = [1472001, 1472004, 1472007, 1472008, 1472011, 1472014, 1472018];
var matSet = [[4011001, 4000021, 4003000], [4011000, 4011001, 4000021, 4003000], [1472000, 4011001, 4000021, 4003001], [4011000, 4011001, 4000021, 4003000], [4011000, 4011001, 4000021, 4003000], [4011000, 4011001, 4000021, 4003000], [4011000, 4011001, 4000030, 4003000]];
var matQtySet = [[1, 20, 5], [2, 1, 30, 10], [1, 3, 20, 30], [3, 2, 50, 20], [4, 2, 80, 25], [3, 2, 100, 30], [4, 2, 40, 35]];
var costSet = [2000, 3000, 5000, 15000, 30000, 40000, 50000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 3) { //claw upgrade
var itemSet = [1472002, 1472003, 1472005, 1472006, 1472009, 1472010, 1472012, 1472013, 1472015, 1472016, 1472017, 1472019, 1472020];
var matSet = [[1472001, 4011002], [1472001, 4011006], [1472004, 4011001], [1472004, 4011003], [1472008, 4011002], [1472008, 4011003], [1472011, 4011004], [1472011, 4021008], [1472014, 4021000], [1472014, 4011003], [1472014, 4021008], [1472018, 4021000], [1472018, 4021005]];
var matQtySet = [[1, 1], [1, 1], [1, 2], [1, 2], [1, 3], [1, 3], [1, 4], [1, 1], [1, 5], [1, 5], [1, 2], [1, 6], [1, 6]];
var costSet = [1000, 2000, 3000, 5000, 10000, 15000, 20000, 25000, 30000, 30000, 35000, 40000, 40000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make ";
if (qty == 1) {
prompt += "a #t" + item + "#?";
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] * qty + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost * qty + " meso";
}
cm.sendYesNo(prompt);
} else if (status == 4 && mode == 1) {
var complete = true;
var recvItem = item, recvQty;
if (item == 4003000)//screws
{
recvQty = 15 * qty;
} else {
recvQty = qty;
}
if (!cm.canHold(recvItem, recvQty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("I'm afraid you cannot afford my services.");
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete) {
cm.sendOk("What are you trying to pull? I can't make anything unless you bring me what I ask for.");
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
}
} else {
cm.gainItem(mats, -matQty * qty);
}
if (cost > 0) {
cm.gainMeso(-cost * qty);
}
cm.gainItem(recvItem, recvQty);
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
}
cm.dispose();
}
}

203
scripts/npc/1052003.js Normal file
View File

@@ -0,0 +1,203 @@
/* Chris
Victoria Road : Kerning City Repair Shop (103000006)
Refining NPC:
* Minerals
* Jewels
* Special - Iron Hog's Metal Hoof x 100 into Steel Plate
* Claws
*/
var status = 0;
var selectedType = -1;
var selectedItem = -1;
var item;
var mats;
var matQty;
var cost;
var qty;
var equip;
var last_use; //last item is a use item
function start() {
cm.getPlayer().setCS(true);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) { // hope types 2 & 3 works as well, as 1 and 4 END CHAT
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
var selStr = "Yes, I do own this forge. If you're willing to pay, I can offer you some of my services.#b"
var options = ["Refine a mineral ore", "Refine a jewel ore", "I have Iron Hog's Metal Hoof...", "Upgrade a claw"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 1) {
selectedType = selection;
if (selectedType == 0) { //mineral refine
var selStr = "So, what kind of mineral ore would you like to refine?#b";
var minerals = ["Bronze", "Steel", "Mithril", "Adamantium", "Silver", "Orihalcon", "Gold"];
for (var i = 0; i < minerals.length; i++) {
selStr += "\r\n#L" + i + "# " + minerals[i] + "#l";
}
equip = false;
cm.sendSimple(selStr);
} else if (selectedType == 1) { //jewel refine
var selStr = "So, what kind of jewel ore would you like to refine?#b";
var jewels = ["Garnet", "Amethyst", "Aquamarine", "Emerald", "Opal", "Sapphire", "Topaz", "Diamond", "Black Crystal"];
for (var i = 0; i < jewels.length; i++) {
selStr += "\r\n#L" + i + "# " + jewels[i] + "#l";
}
equip = false;
cm.sendSimple(selStr);
} else if (selectedType == 2) { //foot refine
var selStr = "You know about that? Not many people realize the potential in the Iron Hog's Metal Hoof... I can make this into something special, if you want me to.";
equip = false;
cm.sendYesNo(selStr);
} else if (selectedType == 3) { //claw refine
var selStr = "Ah, you wish to upgrade a claw? Then tell me, which one?#b";
var claws = ["Blood Gigantic#k - Thief Lv. 60#b", "Sapphire Gigantic#k - Thief Lv. 60#b", "Dark Gigantic#k - Thief Lv. 60#b"];
for (var i = 0; i < claws.length; i++) {
selStr += "\r\n#L" + i + "# " + claws[i] + "#l";
}
equip = true;
cm.sendSimple(selStr);
}
if (equip) {
status++;
}
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0) { //mineral refine
var itemSet = [4011000, 4011001, 4011002, 4011003, 4011004, 4011005, 4011006];
var matSet = [4010000, 4010001, 4010002, 4010003, 4010004, 4010005, 4010006];
var matQtySet = [10, 10, 10, 10, 10, 10, 10];
var costSet = [300, 300, 300, 500, 500, 500, 800];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //jewel refine
var itemSet = [4021000, 4021001, 4021002, 4021003, 4021004, 4021005, 4021006, 4021007, 4021008];
var matSet = [4020000, 4020001, 4020002, 4020003, 4020004, 4020005, 4020006, 4020007, 4020008];
var matQtySet = [10, 10, 10, 10, 10, 10, 10, 10, 10];
var costSet = [500, 500, 500, 500, 500, 500, 500, 1000, 3000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 2) { //special refine
var itemSet = [4011001, 1];
var matSet = [4000039, 1];
var matQtySet = [100, 1];
var costSet = [1000, 1]
item = itemSet[0];
mats = matSet[0];
matQty = matQtySet[0];
cost = costSet[0];
}
var prompt = "So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?";
cm.sendGetNumber(prompt, 1, 1, 100)
} else if (status == 3) {
if (equip) {
selectedItem = selection;
qty = 1;
} else {
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
}
last_use = false;
if (selectedType == 3) { //claw refine
var itemSet = [1472023, 1472024, 1472025];
var matSet = [[1472022, 4011007, 4021000, 2012000], [1472022, 4011007, 4021005, 2012002], [1472022, 4011007, 4021008, 4000046]];
var matQtySet = [[1, 1, 8, 10], [1, 1, 8, 10], [1, 1, 3, 5]];
var costSet = [80000, 80000, 100000]
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
if (selectedItem != 2) {
last_use = true;
}
}
var prompt = "You want me to make ";
if (qty == 1) {
prompt += "a #t" + item + "#?";
} else {
prompt += qty + " #t" + item + "#?";
}
prompt += " In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] * qty + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty * qty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost * qty + " meso";
}
cm.sendYesNo(prompt);
} else if (status == 4) {
var complete = true;
if (!cm.canHold(item, qty)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
} else if (cm.getMeso() < cost * qty) {
cm.sendOk("Cash only, no credit.");
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i] * qty)) {
complete = false;
}
}
} else if (!cm.haveItem(mats, matQty * qty)) {
complete = false;
}
}
if (!complete) {
cm.sendOk("I cannot accept substitutes. If you don't have what I need, then I won't be able to help you.");
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i] * qty);
}
} else {
cm.gainItem(mats, -matQty * qty);
}
cm.gainMeso(-cost * qty);
cm.gainItem(item, qty);
cm.sendNext("Phew... I almost didn't think that would work for a second... Well, I hope you enjoy it, anyway.");
}
cm.dispose();
}
}
}

83
scripts/npc/1052004.js Normal file
View File

@@ -0,0 +1,83 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Denma the Owner
Henesys VIP Eye Change.
GMS-like revised by Ronan -- contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var beauty = 0;
var price = 1000000;
var mface_v = Array(20000, 20001, 20003, 20004, 20005, 20006, 20007, 20008, 20012, 20014, 20015, 20022, 20028, 20031);
var fface_v = Array(21000, 21001, 21002, 21003, 21004, 21005, 21006, 21007, 21008, 21012, 21013, 21014, 21023, 21026);
var facenew = Array();
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) // disposing issue with stylishs found thanks to Vcoc
{
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Well, hello! Welcome to the Henesys Plastic Surgery! Would you like to transform your face into something new? With a #b#t5152001##k, you can let us take care of the rest and have the face you've always wanted~!\r\n#L2#Plastic Surgery: #i5152001##t5152001##l");
} else if (status == 1) {
if (selection == 2) {
facenew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mface_v.length; i++) {
pushIfItemExists(facenew, mface_v[i] + cm.getPlayer().getFace() % 1000 - (cm.getPlayer().getFace() % 100));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fface_v.length; i++) {
pushIfItemExists(facenew, fface_v[i] + cm.getPlayer().getFace() % 1000 - (cm.getPlayer().getFace() % 100));
}
}
cm.sendStyle("Let's see... I can totally transform your face into something new. Don't you want to try it? For #b#t5152001##k, you can get the face of your liking. Take your time in choosing the face of your preference.", facenew);
}
} else if (status == 2) {
cm.dispose();
if (cm.haveItem(5152001) == true) {
cm.gainItem(5152001, -1);
cm.setFace(facenew[selection]);
cm.sendOk("Enjoy your new and improved face!");
} else {
cm.sendOk("Hmm ... it looks like you don't have the coupon specifically for this place. Sorry to say this, but without the coupon, there's no plastic surgery for you...");
}
}
}
}

86
scripts/npc/1052005.js Normal file
View File

@@ -0,0 +1,86 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Dr. Feeble
Henesys Random Eye Change.
GMS-like revised by Ronan -- contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var beauty = 0;
var price = 1000000;
var mface_r = Array(20000, 20005, 20008, 20012, 20016, 20022, 20032);
var fface_r = Array(21000, 21002, 21008, 21014, 21020, 21024, 21029);
var facenew = Array();
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hi, I pretty much shouldn't be doing this, but with a #b#t5152000##k, I will do it anyways for you. But don't forget, it will be random!\r\n#L2#Plastic Surgery: #i5152000##t5152000##l");
} else if (status == 1) {
if (selection == 2) {
facenew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mface_r.length; i++) {
pushIfItemExists(facenew, mface_r[i] + cm.getPlayer().getFace()
% 1000 - (cm.getPlayer().getFace()
% 100));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fface_r.length; i++) {
pushIfItemExists(facenew, fface_r[i] + cm.getPlayer().getFace()
% 1000 - (cm.getPlayer().getFace()
% 100));
}
}
cm.sendYesNo("If you use the regular coupon, your face may transform into a random new look...do you still want to do it using #b#t5152000##k?");
}
} else if (status == 2) {
cm.dispose();
if (cm.haveItem(5152000) == true) {
cm.gainItem(5152000, -1);
cm.setFace(facenew[Math.floor(Math.random() * facenew.length)]);
cm.sendOk("Enjoy your new and improved face!");
} else {
cm.sendOk("Hmm ... it looks like you don't have the coupon specifically for this place. Sorry to say this, but without the coupon, there's no plastic surgery for you...");
}
}
}
}

47
scripts/npc/1052006.js Normal file
View File

@@ -0,0 +1,47 @@
var status = -1;
var zones = 0;
var cost = 1000;
function start() {
cm.sendNext("Hi, I'm the ticket salesman.");
if (cm.isQuestStarted(2055) || cm.isQuestCompleted(2055)) {
zones++;
}
if (cm.isQuestStarted(2056) || cm.isQuestCompleted(2056)) {
zones++;
}
if (cm.isQuestStarted(2057) || cm.isQuestCompleted(2057)) {
zones++;
}
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
cm.dispose();
return;
}
if (status == 0) {
if (zones == 0) {
cm.dispose();
} else {
var selStr = "Which ticket would you like?#b";
for (var i = 0; i < zones; i++) {
selStr += "\r\n#L" + i + "#Construction site B" + (i + 1) + " (" + cost + " mesos)#l";
}
cm.sendSimple(selStr);
}
} else if (status == 1) {
if (cm.getMeso() < cost) {
cm.sendOk("You do not have enough mesos.");
} else {
cm.gainMeso(-cost);
if (selection < 0 || selection > zones) {
cm.getClient().disconnect(false, false);
return;
}
cm.gainItem(4031036 + selection, 1);
}
cm.dispose();
}
}

86
scripts/npc/1052007.js Normal file
View File

@@ -0,0 +1,86 @@
var status = 0;
var ticketSelection = -1;
var text = "Here's the ticket reader.";
var hasTicket = false;
var NLC = false;
var em;
function start() {
cm.sendSimple("Pick your destination.\n\r\n#L0##bKerning Square Shopping Center#l\n\n\r\n#L1#Enter Contruction Site#l\r\n#L2#New Leaf City#l");
}
function action(mode, type, selection) {
em = cm.getEventManager("Subway");
if (mode == -1) {
cm.dispose();
return;
} else if (mode == 0) {
cm.dispose();
return;
} else {
status++;
}
if (status == 1) {
if (selection == 0) {
var em = cm.getEventManager("KerningTrain");
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("The passenger wagon is already full. Try again a bit later.");
}
cm.dispose();
} else if (selection == 1) {
if (cm.haveItem(4031036) || cm.haveItem(4031037) || cm.haveItem(4031038)) {
text += " You will be brought in immediately. Which ticket you would like to use?#b";
for (var i = 0; i < 3; i++) {
if (cm.haveItem(4031036 + i)) {
text += "\r\n#b#L" + (i + 1) + "##t" + (4031036 + i) + "#";
}
}
cm.sendSimple(text);
hasTicket = true;
} else {
cm.sendOk("It seems as though you don't have a ticket!");
cm.dispose();
}
} else if (selection == 2) {
if (!cm.haveItem(4031711) && cm.getPlayer().getMapId() == 103000100) {
cm.sendOk("It seems you don't have a ticket! You can buy one from Bell.");
cm.dispose();
return;
}
if (em.getProperty("entry") == "true") {
cm.sendYesNo("It looks like there's plenty of room for this ride. Please have your ticket ready so I can let you in. The ride will be long, but you'll get to your destination just fine. What do you think? Do you want to get on this ride?");
} else {
cm.sendNext("We will begin boarding 1 minute before the takeoff. Please be patient and wait for a few minutes. Be aware that the subway will take off right on time, and we stop receiving tickets 1 minute before that, so please make sure to be here on time.");
cm.dispose();
}
}
} else if (status == 2) {
if (hasTicket) {
ticketSelection = selection;
if (ticketSelection > -1) {
cm.gainItem(4031035 + ticketSelection, -1);
cm.warp(103000897 + (ticketSelection * 3), "st00"); // thanks IxianMace for noticing a few scripts having misplaced warp SP's
hasTicket = false;
cm.dispose();
return;
}
}
if (cm.haveItem(4031711)) {
if (em.getProperty("entry") == "false") {
cm.sendNext("We will begin boarding 1 minute before the takeoff. Please be patient and wait for a few minutes. Be aware that the subway will take off right on time, and we stop receiving tickets 1 minute before that, so please make sure to be here on time.");
} else {
cm.gainItem(4031711, -1);
cm.warp(600010004);
}
cm.dispose();
}
}
}

35
scripts/npc/1052008.js Normal file
View File

@@ -0,0 +1,35 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Shumi JQ Chest #1
*/
function start() {
prizes = [4020000, 4020001, 4020002, 4020003, 4020004];
if (cm.isQuestStarted(2055)) {
cm.gainItem(4031039, 1);
} else {
cm.gainItem(4020000 + ((Math.random() * 5) | 0), 1);
}
cm.warp(103000100, 0);
cm.dispose();
}

35
scripts/npc/1052009.js Normal file
View File

@@ -0,0 +1,35 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Shumi JQ Chest #2
*/
function start() {
prizes = [4020005, 4020006, 4020007, 4020008, 4010000];
if (cm.isQuestStarted(2056)) {
cm.gainItem(4031040, 1);
} else {
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)], 1);
}
cm.warp(103000100, 0);
cm.dispose();
}

35
scripts/npc/1052010.js Normal file
View File

@@ -0,0 +1,35 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Shumi JQ Chest #3
*/
function start() {
prizes = [4010001, 4010002, 4010003, 4010004, 4010005, 4010006, 4010007];
if (cm.isQuestStarted(2057)) {
cm.gainItem(4031041, 1);
} else {
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)], 1);
}
cm.warp(103000100, 0);
cm.dispose();
}

56
scripts/npc/1052011.js Normal file
View File

@@ -0,0 +1,56 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Exit
Warp NPC to Subway Ticketing Booth (103000100)
located in B1 <Area 1> (103000900)
located in B1 <Area 2> (103000901)
located in B2 <Area 1> (103000903)
located in B2 <Area 2> (103000904)
located in B3 <Area 1> (103000906)
located in B3 <Area 2> (103000907)
located in B3 <Area 3> (103000908)
*/
var status = 0;
function start() {
cm.sendNext("This device is connected to outside.");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else if (mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
} else {
status++;
if (status == 1) {
cm.sendNextPrev("Are you going to give up and leave this place?")
} else if (status == 2) {
cm.sendYesNo("You'll have to start from scratch the next time you come in...");
} else if (status == 3) {
cm.warp(103000100, 0);
cm.dispose();
}
}
}

63
scripts/npc/1052012.js Normal file
View File

@@ -0,0 +1,63 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC ID: 1052012
NPC NAME: Mong from Kong
@author Ronan
*/
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) {
cm.sendYesNo("So, are you going to use the Internet Cafe? There is a fee to use the spaces there, that is #b5,000 mesos#k. Are you going to enter the Cafe?");
} else if (status == 1) {
if (cm.getMeso() < 5000) {
cm.sendOk("Oh, you don't have the money, right? Sorry, I can't let you in.");
} else {
cm.gainMeso(-5000);
cm.warp(193000000, "out00");
}
cm.dispose();
}
}
}

138
scripts/npc/1052013.js Normal file
View File

@@ -0,0 +1,138 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2019 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/>.
*/
/*
NPC ID: 1052013
NPC NAME: Computer
@author Ronan
*/
var status;
var pqArea;
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 (cm.getMapId() != 193000000) {
var eim = cm.getEventInstance();
if (status == 0) {
if (!eim.isEventCleared()) {
var couponsNeeded = eim.getIntProperty("couponsNeeded");
if (cm.isEventLeader()) {
if (cm.haveItem(4001007, couponsNeeded)) {
cm.sendNext("Your team collected all the needed coupons, good work!");
cm.gainItem(4001007, couponsNeeded);
eim.clearPQ();
cm.dispose();
} else {
cm.sendYesNo("Your team must collect #r" + couponsNeeded + "#k coupons to complete this instance. Talk to me when you have the right amount in hands... Or you want to #bquit now#k? Note that if you quit now #ryour team will be forced to quit#k as well.");
}
} else {
cm.sendYesNo("Your team must collect #r" + couponsNeeded + "#k coupons to complete this instance. Let your leader talk to me with the right amount in hands... Or you want to #bquit now#k? Note that if you quit now your team #rmay become undermanned#k to further continue this instance.");
}
} else {
if (!eim.giveEventReward(cm.getPlayer())) {
cm.sendOk("Please make a room on your ETC inventory to receive the prize.");
cm.dispose();
} else {
cm.warp(193000000);
cm.dispose();
}
}
} else if (status == 1) {
cm.warp(193000000);
cm.dispose();
}
} else {
var levels = ["#m190000000#", "#m191000000#", "#m192000000#", "#m195000000#", "#m196000000#", "#m197000000#"];
if (status == 0) {
var sendStr = "Premium Road is a place of multiple areas with monsters of most various types gathered together, an ideal place for grinding EXP and erasers for the #p1052014#. Select the area you are willing to face:\r\n\r\n#b";
for (var i = 0; i < 6; i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if (status == 1) {
pqArea = selection + 1;
em = cm.getEventManager("CafePQ_" + pqArea);
if (em == null) {
cm.sendOk("The CafePQ_" + pqArea + "has encountered an error.");
cm.dispose();
return;
} else if (cm.isUsingOldPqNpcStyle()) {
status = 1;
action(1, 0, 0);
return;
}
cm.sendSimple("#e#b<Party Quest: Premium Road - " + levels[selection] + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nThe #p1052014# operates differently than the common ones. They do not use mesos or gachapon tickets, rather #rERASERS#k, that can be obtained by completing the missions held on the Premium Road. To go there, you must find partners and attend to a Party Quest. When teamed up and ready, have your #bparty leader#k talk to me.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I would like to " + (cm.getPlayer().isRecvPartySearchInviteEnabled() ? "disable" : "enable") + " Party Search.\r\n#L2#I would like to hear more details.");
} else if (status == 2) {
if (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("You can participate in the party quest only if you are in a party.");
cm.dispose();
} else if (!cm.isLeader()) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
} else {
var eli = em.getEligibleParty(cm.getParty());
if (eli.size() > 0) {
if (!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
}
} else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
cm.dispose();
}
} else if (selection == 1) {
var psState = cm.getPlayer().toggleRecvPartySearchInvite();
cm.sendOk("Your Party Search status is now: #b" + (psState ? "enabled" : "disabled") + "#k. Talk to me whenever you want to change it back.");
cm.dispose();
} else {
cm.sendOk("#e#b<Party Quest: Premium Road>#k#n\r\nOn the maps ahead, you will face many common-leveled mobs to face on. Grind all the required coupons from them and give it to me. All members will then receive a eraser, corresponding with the level faced. Insert on the machine #bmany of the same eraser or multiple different ones#k to have a better chance on greater prizes.");
cm.dispose();
}
}
}
}
}

262
scripts/npc/1052014.js Normal file
View File

@@ -0,0 +1,262 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2019 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
* @npc: Vending Machine
* @map: 193000000 - Premium Road - Kerning City Internet Cafe
* @func: Cafe PQ Rewarder
*/
var status;
var itemSet_lv6 = [1442046, 1432018, 1102146, 1102145, 2022094, 2022544, 2022123, 2022310, 2040727, 2041058, 2040817, 4000030, 4003005, 4003000, 4011007, 4021009, 4011008, 3010098];
var itemQty_lv6 = [1, 1, 1, 1, 35, 15, 20, 20, 1, 1, 1, 30, 30, 30, 1, 1, 3, 1];
var itemSet_lv5 = [1382015, 1382016, 1442044, 1382035, 2022310, 2022068, 2022069, 2022190, 2022047, 2040727, 2040924, 2040501, 4000030, 4003005, 4003000, 4011003, 4011006, 4021004, 3010099];
var itemQty_lv5 = [1, 1, 1, 1, 20, 40, 40, 30, 30, 1, 1, 1, 20, 20, 25, 3, 2, 3, 1];
var itemSet_lv4 = [1332029, 1472027, 1462032, 1492019, 2022045, 2022048, 2022094, 2022123, 2022058, 2041304, 2041019, 2040826, 2040758, 4000030, 4003005, 4003000, 4010007, 4011003, 4021003, 3010016, 3010017];
var itemQty_lv4 = [1, 1, 1, 1, 45, 40, 25, 20, 60, 1, 1, 1, 1, 10, 10, 20, 5, 1, 1, 1, 1];
var itemSet_lv3 = [1302058, 1372008, 1422030, 1422031, 1022082, 2022279, 2022120, 2001001, 2001002, 2022071, 2022189, 2040914, 2041001, 2041041, 2041308, 4031203, 4000030, 4003005, 4003000, 4010004, 4010006, 4020000, 4020006, 3010002, 3010003];
var itemQty_lv3 = [1, 1, 1, 1, 1, 65, 40, 40, 40, 25, 25, 1, 1, 1, 1, 10, 7, 10, 8, 5, 5, 5, 5, 1, 1];
var itemSet_lv2 = [1022073, 1012098, 1012101, 1012102, 1012103, 2022055, 2022056, 2022103, 2020029, 2020032, 2020031, 2022191, 2022016, 2043300, 2043110, 2043800, 2041001, 2040903, 4031203, 4000021, 4003005, 4003000, 4003001, 4010000, 4010001, 4010003, 4010004, 4020004, 3010004, 3010005];
var itemQty_lv2 = [1, 1, 1, 1, 1, 40, 40, 40, 40, 60, 60, 60, 60, 1, 1, 1, 1, 1, 4, 6, 7, 5, 2, 4, 4, 3, 3, 4, 1, 1];
var itemSet_lv1 = [1302021, 1302024, 1302033, 1082150, 1002419, 2022053, 2022054, 2020032, 2022057, 2022096, 2022097, 2022192, 2020030, 2010005, 2022041, 2030000, 2040100, 2040004, 2040207, 2048004, 4031203, 4000021, 4003005, 4003000, 4003001, 4010000, 4010001, 4010002, 4010005, 4020004];
var itemQty_lv1 = [1, 1, 1, 1, 1, 20, 20, 20, 20, 20, 25, 25, 25, 50, 50, 12, 1, 1, 1, 1, 3, 4, 2, 2, 1, 2, 2, 2, 2, 2];
var levels = ["Tier 1", "Tier 2", "Tier 3", "Tier 4", "Tier 5", "Tier 6"];
var tickets = [0, 0, 0, 0, 0, 0];
var coinId = 4001158;
var coins = 0;
var hasCoin = false;
var currentTier;
var curItemQty;
var curItemSel;
var advance = true;
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 && advance) {
status++;
} else {
status--;
}
advance = true;
if (status == 0) {
hasCoin = cm.haveItem(coinId);
cm.sendNext("This is the vending machine of the Internet Cafe. Place your erasers or #t" + coinId + "# earned throughout the quests to redeem a prize. You can place #bany amount of erasers#k, however take note that placing #rdifferent erasers#k and #rbigger shots of any of them#k will improve the reward possibilities!");
} else if (status == 1) {
var sendStr;
currentTier = getRewardTier();
if (currentTier >= 0) {
sendStr = "With the items you have currently placed, you can retrieve a #r" + levels[currentTier] + "#k prize. Place erasers:";
} else {
sendStr = "You have placed no erasers yet. Place erasers:";
}
var listStr = "";
for (var i = 0; i < tickets.length; i++) {
listStr += "#b#L" + i + "##t" + (4001009 + i) + "##k";
if (tickets[i] > 0) {
listStr += " - " + tickets[i] + " erasers";
}
listStr += "#l\r\n";
}
if (hasCoin) {
listStr += "#b#L" + tickets.length + "##t" + coinId + "##k";
if (coins > 0) {
listStr += " - " + coins + " feathers";
}
listStr += "#l\r\n";
}
cm.sendSimple(sendStr + "\r\n\r\n" + listStr + "#r#L" + getRewardIndex(hasCoin) + "#Retrieve a prize!#l#k\r\n");
} else if (status == 2) {
if (selection == getRewardIndex(hasCoin)) {
if (currentTier < 0) {
cm.sendPrev("You have set no erasers. Insert at least one to claim a prize.");
advance = false;
} else {
givePrize();
cm.dispose();
}
} else {
var tickSel;
if (selection < tickets.length) {
tickSel = 4001009 + selection;
} else {
tickSel = coinId;
}
curItemQty = cm.getItemQuantity(tickSel);
curItemSel = selection;
if (curItemQty > 0) {
cm.sendGetText("How many of #b#t" + tickSel + "##k do you want to insert on the machine? (#r" + curItemQty + "#k available)#k");
} else {
cm.sendPrev("You have got #rnone#k of #b#t" + tickSel + "##k to insert on the machine. Click '#rBack#k' to return to the main interface.");
advance = false;
}
}
} else if (status == 3) {
var text = cm.getText();
try {
var placedQty = parseInt(text);
if (isNaN(placedQty) || placedQty < 0) {
throw true;
}
if (placedQty > curItemQty) {
cm.sendPrev("You cannot insert the given amount of erasers (#r" + curItemQty + "#k available). Click '#rBack#k' to return to the main interface.");
advance = false;
} else {
if (curItemSel < tickets.length) {
tickets[curItemSel] = placedQty;
} else {
coins = placedQty;
}
cm.sendPrev("Operation succeeded. Click '#rBack#k' to return to the main interface.");
advance = false;
}
} catch (err) {
cm.sendPrev("You must enter a positive number of erasers to insert. Click '#rBack#k' to return to the main interface.");
advance = false;
}
status = 2;
} else {
cm.dispose();
}
}
}
function getRewardIndex(hasCoin) {
return (!hasCoin) ? tickets.length : tickets.length + 1;
}
function getRewardTier() {
var points = getPoints();
if (points <= 6) {
if (points <= 0) {
return -1;
} else {
return 0;
}
}
if (points >= 46) {
return 5;
}
return Math.floor((points - 6) / 8);
}
function getPoints() {
var points = 0;
for (var i = 0; i < tickets.length; i++) {
if (tickets[i] <= 0) {
continue;
}
points += (6 + ((tickets[i] - 1) * getTicketMultiplier(i))); //6 from uniques + rest from each ticket difficulty
}
points += Math.ceil(0.46 * coins); // 100 coins for a LV6 tier item.
return points;
}
function getTicketMultiplier(ticket) {
if (ticket == 1 || ticket == 3) {
return 3;
} else {
return 1;
}
}
function givePrize() {
var lvTarget, lvQty;
if (currentTier == 0) {
lvTarget = itemSet_lv1;
lvQty = itemQty_lv1;
} else if (currentTier == 1) {
lvTarget = itemSet_lv2;
lvQty = itemQty_lv2;
} else if (currentTier == 2) {
lvTarget = itemSet_lv3;
lvQty = itemQty_lv3;
} else if (currentTier == 3) {
lvTarget = itemSet_lv4;
lvQty = itemQty_lv4;
} else if (currentTier == 4) {
lvTarget = itemSet_lv5;
lvQty = itemQty_lv5;
} else {
lvTarget = itemSet_lv6;
lvQty = itemQty_lv6;
}
if (!hasRewardSlot(lvTarget, lvQty)) {
cm.sendOk("Check for an available space on your inventory before retrieving a prize.");
} else {
var rnd = Math.floor(Math.random() * lvTarget.length);
for (var i = 0; i < tickets.length; i++) {
cm.gainItem(4001009 + i, -1 * tickets[i]);
}
cm.gainItem(coinId, -1 * coins);
cm.gainItem(lvTarget[rnd], lvQty[rnd]);
}
}
function hasRewardSlot(lvTarget, lvQty) {
for (var i = 0; i < lvTarget.length; i++) {
if (!cm.canHold(lvTarget[i], lvQty[i])) {
return false;
}
}
return true;
}

113
scripts/npc/1052015.js Normal file
View File

@@ -0,0 +1,113 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2019 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
* @npc: Billy
* @map: 193000000 - Premium Road - Kerning City Internet Cafe
* @func: Cafe PQ Reward Announcer
*/
var status;
var itemSet_lv6 = [1442046, 1432018, 1102146, 1102145, 2022094, 2022544, 2022123, 2022310, 2040727, 2041058, 2040817, 4000030, 4003005, 4003000, 4011007, 4021009, 4011008, 3010098];
var itemQty_lv6 = [1, 1, 1, 1, 35, 15, 20, 20, 1, 1, 1, 30, 30, 30, 1, 1, 3, 1];
var itemSet_lv5 = [1382015, 1382016, 1442044, 1382035, 2022310, 2022068, 2022069, 2022190, 2022047, 2040727, 2040924, 2040501, 4000030, 4003005, 4003000, 4011003, 4011006, 4021004, 3010099];
var itemQty_lv5 = [1, 1, 1, 1, 20, 40, 40, 30, 30, 1, 1, 1, 20, 20, 25, 3, 2, 3, 1];
var itemSet_lv4 = [1332029, 1472027, 1462032, 1492019, 2022045, 2022048, 2022094, 2022123, 2022058, 2041304, 2041019, 2040826, 2040758, 4000030, 4003005, 4003000, 4010007, 4011003, 4021003, 3010016, 3010017];
var itemQty_lv4 = [1, 1, 1, 1, 45, 40, 25, 20, 60, 1, 1, 1, 1, 10, 10, 20, 5, 1, 1, 1, 1];
var itemSet_lv3 = [1302058, 1372008, 1422030, 1422031, 1022082, 2022279, 2022120, 2001001, 2001002, 2022071, 2022189, 2040914, 2041001, 2041041, 2041308, 4031203, 4000030, 4003005, 4003000, 4010004, 4010006, 4020000, 4020006, 3010002, 3010003];
var itemQty_lv3 = [1, 1, 1, 1, 1, 65, 40, 40, 40, 25, 25, 1, 1, 1, 1, 10, 7, 10, 8, 5, 5, 5, 5, 1, 1];
var itemSet_lv2 = [1022073, 1012098, 1012101, 1012102, 1012103, 2022055, 2022056, 2022103, 2020029, 2020032, 2020031, 2022191, 2022016, 2043300, 2043110, 2043800, 2041001, 2040903, 4031203, 4000021, 4003005, 4003000, 4003001, 4010000, 4010001, 4010003, 4010004, 4020004, 3010004, 3010005];
var itemQty_lv2 = [1, 1, 1, 1, 1, 40, 40, 40, 40, 60, 60, 60, 60, 1, 1, 1, 1, 1, 4, 6, 7, 5, 2, 4, 4, 3, 3, 4, 1, 1];
var itemSet_lv1 = [1302021, 1302024, 1302033, 1082150, 1002419, 2022053, 2022054, 2020032, 2022057, 2022096, 2022097, 2022192, 2020030, 2010005, 2022041, 2030000, 2040100, 2040004, 2040207, 2048004, 4031203, 4000021, 4003005, 4003000, 4003001, 4010000, 4010001, 4010002, 4010005, 4020004];
var itemQty_lv1 = [1, 1, 1, 1, 1, 20, 20, 20, 20, 20, 25, 25, 25, 50, 50, 12, 1, 1, 1, 1, 3, 4, 2, 2, 1, 2, 2, 2, 2, 2];
var levels = ["Tier 1", "Tier 2", "Tier 3", "Tier 4", "Tier 5", "Tier 6"];
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
var sendStr = "The #bInternet Cafe Party Quest#k rewards players with ticket-like #bfigure erasers#k, that can be used on the vending machine to retrieve prizes. By further increasing the stakes, one can get better prizes, separated by #rtiers#k.\r\n\r\nThe possible rewards for each tier are depicted here:\r\n\r\n#b";
for (var i = 0; i < 6; i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if (status == 1) {
var lvTarget, lvQty;
if (selection == 0) {
lvTarget = itemSet_lv1;
lvQty = itemQty_lv1;
} else if (selection == 1) {
lvTarget = itemSet_lv2;
lvQty = itemQty_lv2;
} else if (selection == 2) {
lvTarget = itemSet_lv3;
lvQty = itemQty_lv3;
} else if (selection == 3) {
lvTarget = itemSet_lv4;
lvQty = itemQty_lv4;
} else if (selection == 4) {
lvTarget = itemSet_lv5;
lvQty = itemQty_lv5;
} else {
lvTarget = itemSet_lv6;
lvQty = itemQty_lv6;
}
var sendStr = "The following items are being awarded at #b" + levels[selection] + "#k:\r\n\r\n";
for (var i = 0; i < lvTarget.length; i++) {
sendStr += " #L" + i + "# #i" + lvTarget[i] + "# #t" + lvTarget[i] + "#";
if (lvQty[i] > 1) {
sendStr += " (" + lvQty[i] + ")";
}
sendStr += "#l\r\n";
}
cm.sendPrev(sendStr);
} else if (status == 2) {
cm.dispose();
}
}
}

59
scripts/npc/1052016.js Normal file
View File

@@ -0,0 +1,59 @@
var status = 0;
var maps = [104000000, 102000000, 100000000, 101000000, 120000000];
var cost = [1000, 1000, 1000, 800, 800];
var selectedMap = -1;
var mesos;
function start() {
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 1 && mode == 0) {
cm.dispose();
return;
} else if (status >= 2 && mode == 0) {
cm.sendNext("There's a lot to see in this town, too. Come back and find us when you need to go to a different town.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
var selStr = "";
if (cm.getJobId() == 0) {
selStr += "We have a special 90% discount for beginners.";
}
selStr += "Choose your destination, for fees will change from place to place.#b";
for (var i = 0; i < maps.length; i++) {
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
}
cm.sendSimple(selStr);
} else if (status == 2) {
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
selectedMap = selection;
} else if (status == 3) {
if (cm.getJobId() == 0) {
mesos = cost[selectedMap] / 10;
} else {
mesos = cost[selectedMap];
}
if (cm.getMeso() < mesos) {
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
cm.dispose();
return;
}
cm.gainMeso(-mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

25
scripts/npc/1052017.js Normal file
View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.getPlayer().getStorage().sendStorage(cm.getClient(), 1052017);
cm.dispose();
}

120
scripts/npc/1052100.js Normal file
View File

@@ -0,0 +1,120 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Don Giovanni
Kerning VIP Hair/Hair Color Change.
GMS-like revised by Ronan -- contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair_v = Array(30040, 30130, 30780, 30850, 30860, 30920, 33040);
var fhair_v = Array(31090, 31140, 31330, 31440, 31760, 31880, 34050);
var hairnew = Array();
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) // disposing issue with stylishs found thanks to Vcoc
{
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hello! I'm Don Giovanni, head of the beauty salon! If you have either #b#t5150003##k or #b#t5151003##k, why don't you let me take care of the rest? Decide what you want to do with your hair...\r\n#L1#Haircut: #i5150003##t5150003##l\r\n#L2#Dye your hair: #i5151003##t5151003##l");
} else if (status == 1) {
if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_v.length; i++) {
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fhair_v.length; i++) {
pushIfItemExists(hairnew, fhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.sendStyle("I can totally change up your hairstyle and make it look so good. Why don't you change it up a bit? If you have #b#t5150003##k I'll change it for you. Choose the one to your liking~.", hairnew);
} else if (selection == 2) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair() / 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendStyle("I can totally change your haircolor and make it look so good. Why don't you change it up a bit? With #b#t5151003##k I'll change it for you. Choose the one to your liking.", haircolor);
}
} else if (status == 2) {
cm.dispose();
if (beauty == 1) {
if (cm.haveItem(5420003)) {
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150003)) {
cm.gainItem(5150003, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 2) {
if (cm.haveItem(5151003)) {
cm.gainItem(5151003, -1);
cm.setHair(haircolor[selection]);
cm.sendOk("Enjoy your new and improved haircolor!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
}
if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150003, 1);
cm.sendOk("Enjoy!");
} else if (selection == 1 && cm.getMeso() >= haircolorprice) {
cm.gainMeso(-haircolorprice);
cm.gainItem(5151003, 1);
cm.sendOk("Enjoy!");
} else {
cm.sendOk("You don't have enough mesos to buy a coupon!");
}
}
}
}
}

146
scripts/npc/1052101.js Normal file
View File

@@ -0,0 +1,146 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Andre
Kerning Random Hair/Hair Color Change.
GMS-like revised by Ronan -- contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair_r = Array(30040, 30130, 30520, 30770, 30780, 30850, 30920, 33040);
var fhair_r = Array(31060, 31140, 31330, 31440, 31520, 31750, 31760, 31880, 34050);
var mhair_e = Array(30130, 30430, 30520, 30770, 30780, 30850, 30920, 33040);
var fhair_e = Array(31060, 31140, 31330, 31520, 31760, 31880, 34010, 34050);
var hairnew = Array();
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("I'm Andre, Don's assistant. Everyone calls me Andre, though. If you have a #b#t5150002##k, #b#t5150011##k or a #b#t5151002##k, please let me change your hairdo!\r\n#L0#Haircut: #i5150002##t5150002##l\r\n#L1#Haircut: #i5150011##t5150011##l\r\n#L2#Dye your hair: #i5151002##t5151002##l");
} else if (status == 1) {
if (selection == 0) {
beauty = 3;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_r.length; i++) {
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fhair_r.length; i++) {
pushIfItemExists(hairnew, fhair_r[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
}
cm.sendYesNo("If you use the REG coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that I came up with. Are you going to use #b#t5150011##k and really change your hairstyle?");
} else if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for (var i = 0; i < mhair_e.length; i++) {
pushIfItemExists(hairnew, mhair_e[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for (var i = 0; i < fhair_e.length; i++) {
pushIfItemExists(hairnew, fhair_e[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
}
cm.sendYesNo("If you use the EXP coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that I came up with. Are you going to use #b#t5150011##k and really change your hairstyle?");
} else if (selection == 2) {
beauty = 2;
haircolor = Array();
var current = parseInt(cm.getPlayer().getHair()
/ 10) * 10;
for (var i = 0; i < 8; i++) {
pushIfItemExists(haircolor, current + i);
}
cm.sendYesNo("If you use a regular coupon your hair will change RANDOMLY. Do you still want to use #b#t5151002##k and change it up?");
}
} else if (status == 2) {
cm.dispose();
if (beauty == 1) {
if (cm.haveItem(5150011) == true) {
cm.gainItem(5150011, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 2) {
if (cm.haveItem(5151002) == true) {
cm.gainItem(5151002, -1);
cm.setHair(haircolor[Math.floor(Math.random() * haircolor.length)]);
cm.sendOk("Enjoy your new and improved haircolor!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry...");
}
}
if (beauty == 3) {
if (cm.haveItem(5150002) == true) {
cm.gainItem(5150002, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
if (beauty == 0) {
if (selection == 0 && cm.getMeso() >= hairprice) {
cm.gainMeso(-hairprice);
cm.gainItem(5150011, 1);
cm.sendOk("Enjoy!");
} else if (selection == 1 && cm.getMeso() >= haircolorprice) {
cm.gainMeso(-haircolorprice);
cm.gainItem(5151002, 1);
cm.sendOk("Enjoy!");
} else {
cm.sendOk("You don't have enough mesos to buy a coupon!");
}
}
}
}
}

57
scripts/npc/1052107.js Normal file
View File

@@ -0,0 +1,57 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Small Street Light
Kerning deep Subway areas
Nothing at all.
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendAcceptDecline("This is a small lamp with a switch. Would you like to turn it on?");
return;
} else if (status == 1) {
cm.weakenAreaBoss(5090000, "You have turned the lamp on. Shade's strength will rapidly weaken due to the light.");
}
cm.dispose();
}
}

52
scripts/npc/1052109.js Normal file
View File

@@ -0,0 +1,52 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Trash Can 1
*/
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) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

32
scripts/npc/1052110.js Normal file
View File

@@ -0,0 +1,32 @@
/*
Trash Can 2
Kerning Subway
*/
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) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

46
scripts/npc/1052111.js Normal file
View File

@@ -0,0 +1,46 @@
/*
Trash Can 3
Kerning Subway
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
} else if (mode == 0) {
status--;
} else {
status++;
}
if (status == 0) {
if (cm.isQuestStarted(20710)) {
if (!cm.hasItem(4032136)) {
if (cm.canHold(4032136)) {
cm.gainItem(4032136, 1);
cm.sendNext("You have found a #b#t4032136##k in the trash can! #i4032136#");
} else {
cm.sendOk("#i4032136# Not enough space in your ETC inventory.");
}
} else {
cm.sendOk("Just a trash can sitting there.");
}
} else {
cm.sendOk("Just a trash can sitting there.");
}
} else if (status == 1) {
cm.dispose();
}
}
}

32
scripts/npc/1052112.js Normal file
View File

@@ -0,0 +1,32 @@
/*
Trash Can 4
Kerning Subway
*/
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) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

43
scripts/npc/1052113.js Normal file
View File

@@ -0,0 +1,43 @@
var status = -1;
var map = 910310000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

43
scripts/npc/1052114.js Normal file
View File

@@ -0,0 +1,43 @@
var status = -1;
var map = 910310000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
}
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
}
}

79
scripts/npc/1052115.js Normal file
View File

@@ -0,0 +1,79 @@
var status = 0;
var section = 0;
//questid 29931, infoquest 7662
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
if (cm.getMapId() == 910320001) {
cm.warp(910320000, 0);
cm.dispose();
} else if (cm.getMapId() == 910330001) {
var itemid = 4001321;
if (!cm.canHold(itemid)) {
cm.sendOk("Please make room for 1 ETC slot.");
} else {
cm.gainItem(itemid, 1);
cm.warp(910320000, 0);
}
cm.dispose();
} else if (cm.getMapId() >= 910320100 && cm.getMapId() <= 910320304) {
cm.sendYesNo("Would you like to exit this place?");
status = 99;
} else {
cm.sendSimple("My name is Mr.Lim.\r\n#b#e#L1#Enter the Dusty Platform.#l#n\r\n#L2#Head towards Train 999.#l\r\n#L3#Receive a medal of <Honorary Employee>.#l#k");
}
} else if (status == 2) {
section = selection;
if (selection == 1) {
if (cm.getPlayer().getLevel() < 25 || cm.getPlayer().getLevel() > 30 || !cm.isLeader()) {
cm.sendOk("You must be in the Level Range 25-30 and be the party leader.");
} else {
if (!cm.start_PyramidSubway(-1)) {
cm.sendOk("The Dusty Platform is currently full at the moment.");
}
}
//todo
} else if (selection == 2) {
if (cm.haveItem(4001321)) {
if (cm.bonus_PyramidSubway(-1)) {
cm.gainItem(4001321, -1);
} else {
cm.sendOk("The Train 999 is currently full at the moment");
}
} else {
cm.sendOk("You do not have the Boarding Pass.");
}
} else if (selection == 3) {
var record = cm.getQuestRecord(7662);
var data = record.getCustomData();
if (data == null) {
record.setCustomData("0");
data = record.getCustomData();
}
var mons = parseInt(data);
if (mons < 10000) {
cm.sendOk("Please defeat at least 10,000 monsters in the Station and look for me again. Kills : " + mons);
} else if (cm.canHold(1142141) && !cm.haveItem(1142141)) {
cm.gainItem(1142141, 1);
cm.startQuest(29931);
cm.completeQuest(29931);
} else {
cm.sendOk("Please make room.");
}
}
cm.dispose();
} else if (status == 100) {
cm.warp(910320000, 0);
cm.dispose();
}
}

72
scripts/npc/1052125.js Normal file
View File

@@ -0,0 +1,72 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
NPC Name: June
Map(s): Kerning Square : 7th Floor
Description: Entrance to Spirit of Rock
Depart_topFloorEnter
request for a new song (block the portal before the spirit)
composition fee (block the portal before the spirit)
Say "NO" to Plagiarism (now we can open the portal)
*/
var status = -1;
function start() {
cm.sendSimple("Hold up! Access to this area is limited due to remodeling. I can only allow people who meet certain conditions to enter here.#b\n\r\n#L0#I'm helping #eBlake#n right now.#l\r\n#L1#I'm a #rVIP#b at this shopping Center!#l");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == 0 && type != 4) {
status -= 2;
} else {
cm.dispose();
return;
}
}
if (status == 0) {
if (selection == 0) {
if (cm.isQuestStarted(2286) || cm.isQuestStarted(2287) || cm.isQuestStarted(2288)) {
var em = cm.getEventManager("RockSpirit");
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("Uh... It looks like the rooms ahead are a bit crowded right now. Please wait around here for a bit, ok?");
}
cm.dispose();
return;
} else {
cm.sendOk("I did not hear anything from Blake that you are assisting him.");
}
} else {
if (cm.isQuestCompleted(2290)) {
if (cm.getPlayer().getLevel() > 50) {
cm.sendOk("The VIP area is available only for players #rlevel 50 or below#k.");
} else {
cm.sendOk("The VIP area only gets available after handing over #r#t4032521#s#k from the #b'Admission to the VIP Zone'#k quest.");
}
} else {
cm.sendOk("#rVIP#k? Yeah that is funny #rMr. VIP#k, now get lost before I call security.");
}
}
cm.dispose();
}
}

207
scripts/npc/1061000.js Normal file
View File

@@ -0,0 +1,207 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/* Chrishrama
Dungeon: Sleepywood (105040300)
Refining NPC:
* Shoes - All classes, 25 (20 for magicians)-60
*/
var status = 0;
var selectedType = -1;
var selectedItem = -1;
var item;
var mats;
var matQty;
var cost;
function start() {
cm.getPlayer().setCS(true);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
cm.dispose();
}
if (status == 0 && mode == 1) {
var selStr = "Hello, I live here, but don't underestimate me. How about I help you by making you a new pair of shoes?#b"
var options = ["Create a Warrior shoe", "Create a Bowman shoe", "Create a Magician shoe", "Create a Thief shoe"];
for (var i = 0; i < options.length; i++) {
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 1 && mode == 1) {
selectedType = selection;
var selStr;
var shoes;
if (selectedType == 0) { //warrior shoe
selStr = "Warrior shoes? Sure thing, which kind?#b";
shoes = ["Silver War Boots#k - Warrior Lv. 25#b", "Gold War Boots#k - Warrior Lv. 25#b", "Dark War Boots#k - Warrior Lv. 25#b",
"Emerald Battle Grieve#k - Warrior Lv. 30#b", "Mithril Battle Grieve#k - Warrior Lv. 30#b", "Silver Battle Grieve#k - Warrior Lv. 30#b", "Blood Battle Grieve#k - Warrior Lv. 30#b",
"Steel Trigger#k - Warrior Lv. 35#b", "Mithril Trigger#k - Warrior Lv. 35#b", "Dark Trigger#k - Warrior Lv. 35#b",
"Brown Jangoon Boots#k - Warrior Lv. 40#b", "Maroon Jangoon Boots#k - Warrior Lv. 40#b", "Blue Jangoon Boots#k - Warrior Lv. 40#b",
"Emerald Hildon Boots#k - Warrior Lv. 50#b", "Mithril Hildon Boots#k - Warrior Lv. 50#b", "Orihalcon Hildon Boots#k - Warrior Lv. 50#b", "Gold Hildon Boots#k - Warrior Lv. 50#b",
"Sapphire Camel Boots#k - Warrior Lv. 60#b", "Orihalcon Camel Boots#k - Warrior Lv. 60#b", "Blood Camel Boots#k - Warrior Lv. 60#b"];
} else if (selectedType == 1) { //bowman shoe
selStr = "Bowman shoes? Sure thing, which kind?#b";
shoes = ["Brown Jack Boots#k - Bowman Lv. 25#b", "Green Jack Boots#k - Bowman Lv. 25#b", "Red Jack Boots#k - Bowman Lv. 25#b",
"Red Hunter Boots#k - Bowman Lv. 30#b", "Blue Hunter Boots#k - Bowman Lv. 30#b", "Green Hunter Boots#k - Bowman Lv. 30#b", "Black Hunter Boots#k - Bowman Lv. 30#b", "Brown Hunter Boots#k - Bowman Lv. 30#b",
"Blue Silky Boots#k - Bowman Lv. 35#b", "Green Silky Boots#k - Bowman Lv. 35#b", "Red Silky Boots#k - Bowman Lv. 35#b",
"Red Pierre Shoes#k - Bowman Lv. 40#b", "Yellow Pierre Shoes#k - Bowman Lv. 40#b", "Brown Pierre Shoes#k - Bowman Lv. 40#b", "Blue Pierre Shoes#k - Bowman Lv. 40#b",
"Brown Steel-Tipped Boots#k - Bowman Lv. 50#b", "Green Steel-Tipped Boots#k - Bowman Lv. 50#b", "Blue Steel-Tipped Boots#k - Bowman Lv. 50#b", "Purple Steel-Tipped Boots#k - Bowman Lv. 50#b",
"Red Gore Boots#k - Bowman Lv. 60#b", "Blue Gore Boots#k - Bowman Lv. 60#b", "Green Gore Boots#k - Bowman Lv. 60#b"];
} else if (selectedType == 2) { //magician shoe
selStr = "Magician shoes? Sure thing, which kind?#b";
shoes = ["Blue Jewelery Shoes#k - Magician Lv. 20#b", "Purple Jewelery Shoes#k - Magician Lv. 20#b", "Red Jewelery Shoes#k - Magician Lv. 20#b",
"Silver Windshoes#k - Magician Lv. 25#b", "Yellow Windshoes#k - Magician Lv. 25#b", "Black Windshoes#k - Magician Lv. 25#b",
"Red Magicshoes#k - Magician Lv. 30#b", "Blue Magicshoes#k - Magician Lv. 30#b", "White Magicshoes#k - Magician Lv. 30#b", "Black Magicshoes#k - Magician Lv. 30#b",
"Purple Salt Shoes#k - Magician Lv. 35#b", "Red Salt Shoes#k - Magician Lv. 35#b", "Black Salt Shoes#k - Magician Lv. 35#b",
"Red Moon Shoes#k - Magician Lv. 40#b", "Blue Moon Shoes#k - Magician Lv. 40#b", "Gold Moon Shoes#k - Magician Lv. 40#b", "Dark Moon Shoes#k - Magician Lv. 40#b",
"Pink Goldwind Shoes#k - Magician Lv. 50#b", "Blue Goldwind Shoes#k - Magician Lv. 50#b", "Purple Goldwind Shoes#k - Magician Lv. 50#b", "Green Goldwind Shoes#k - Magician Lv. 50#b",
"Pink Goldrunners#k - Magician Lv. 60#b", "Green Goldrunners#k - Magician Lv. 60#b", "Orange Goldrunners#k - Magician Lv. 60#b", "Blue Goldrunners#k - Magician Lv. 60#b"];
} else if (selectedType == 3) { //thief shoe
selStr = "Thief shoes? Sure thing, which kind?#b";
shoes = ["Blue Lappy Shoes#k - Thief Lv. 25#b", "Red Lappy Shoes#k - Thief Lv. 25#b", "Green Lappy Shoes#k - Thief Lv. 25#b", "Black Lappy Shoes#k - Thief Lv. 25#b",
"Bronze Chain Boots#k - Thief Lv. 30#b", "Iron Chain Boots#k - Thief Lv. 30#b", "Silver Chain Boots#k - Thief Lv. 30#b", "Gold Chain Boots#k - Thief Lv. 30#b",
"Red White-Line Boots#k - Thief Lv. 35#b", "Green White-Line Boots#k - Thief Lv. 35#b", "Blue White-Line Boots#k - Thief Lv. 35#b",
"Black Red-Lined Shoes#k - Thief Lv. 40#b", "Black Green-Lined Shoes#k - Thief Lv. 40#b", "Black Yellow-Lined Shoes#k - Thief Lv. 40#b", "Black Blue-Lined Shoes#k - Thief Lv. 40#b",
"Blue Goni Shoes#k - Thief Lv. 50#b", "Red Goni Shoes#k - Thief Lv. 50#b", "Green Goni Shoes#k - Thief Lv. 50#b", "Purple Goni Shoes#k - Thief Lv. 50#b",
"Blood Moss Boots#k - Thief Lv. 60#b", "Gold Moss Boots#k - Thief Lv. 60#b", "Dark Moss Boots#k - Thief Lv. 60#b"];
}
for (var i = 0; i < shoes.length; i++) {
selStr += "\r\n#L" + i + "# " + shoes[i] + "#l";
}
cm.sendSimple(selStr);
} else if (status == 2 && mode == 1) {
selectedItem = selection;
if (selectedType == 0) { //warrior shoe
var itemSet = [1072051, 1072053, 1072052, 1072003, 1072039, 1072040, 1072041, 1072002, 1072112, 1072113, 1072000, 1072126, 1072127, 1072132, 1072133, 1072134, 1072135, 1072147, 1072148, 1072149];
var matSet = [[4011004, 4011001, 4000021, 4003000], [4011006, 4011001, 4000021, 4003000], [4021008, 4011001, 4000021, 4003000], [4021003, 4011001, 4000021, 4003000], [4011002, 4011001, 4000021, 4003000],
[4011004, 4011001, 4000021, 4003000], [4021000, 4011001, 4000021, 4003000], [4011001, 4021004, 4000021, 4000030, 4003000], [4011002, 4021004, 4000021, 4000030, 4003000], [4021008, 4021004, 4000021, 4000030, 4003000],
[4011003, 4000021, 4000030, 4003000, 4000033], [4011005, 4021007, 4000030, 4003000, 4000042], [4011002, 4021007, 4000030, 4003000, 4000041], [4021008, 4011001, 4021003, 4000030, 4003000],
[4021008, 4011001, 4011002, 4000030, 4003000], [4021008, 4011001, 4011005, 4000030, 4003000], [4021008, 4011001, 4011006, 4000030, 4003000], [4021008, 4011007, 4021005, 4000030, 4003000],
[4021008, 4011007, 4011005, 4000030, 4003000], [4021008, 4011007, 4021000, 4000030, 4003000]];
var matQtySet = [[2, 1, 15, 10], [2, 1, 15, 10], [1, 2, 20, 10], [4, 2, 45, 15], [4, 2, 45, 15], [4, 2, 45, 15], [4, 2, 45, 15], [3, 1, 30, 20, 25], [3, 1, 30, 20, 25], [2, 1, 30, 20, 25],
[4, 100, 40, 30, 100], [4, 1, 40, 30, 250], [4, 1, 40, 30, 120], [1, 3, 6, 65, 45], [1, 3, 6, 65, 45], [1, 3, 6, 65, 45], [1, 3, 6, 65, 45], [1, 1, 8, 80, 55], [1, 1, 8, 80, 55], [1, 1, 8, 80, 55]];
var costSet = [10000, 10000, 12000, 20000, 20000, 20000, 20000, 22000, 22000, 25000, 38000, 38000, 38000, 50000, 50000, 50000, 50000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 1) { //bowman shoe
var itemSet = [1072027, 1072034, 1072069, 1072079, 1072080, 1072081, 1072082, 1072083, 1072101, 1072102, 1072103, 1072118, 1072119, 1072120, 1072121, 1072122, 1072123, 1072124, 1072125, 1072144, 1072145, 1072146];
var matSet = [[4000021, 4011000, 4003000], [4000021, 4021003, 4003000], [4000021, 4021000, 4003000], [4000021, 4021000, 4003000], [4000021, 4021005, 4003000], [4000021, 4021003, 4003000],
[4000021, 4021004, 4003000], [4000021, 4021006, 4003000], [4021002, 4021006, 4000030, 4000021, 4003000], [4021003, 4021006, 4000030, 4000021, 4003000], [4021000, 4021006, 4000030, 4000021, 4003000],
[4021000, 4003000, 4000030, 4000024], [4021006, 4003000, 4000030, 4000027], [4011003, 4003000, 4000030, 4000044], [4021002, 4003000, 4000030, 4000009], [4011001, 4021006, 4021008, 4000030, 4003000, 4000033],
[4011001, 4021006, 4021008, 4000030, 4003000, 4000032], [4011001, 4021006, 4021008, 4000030, 4003000, 4000041], [4011001, 4021006, 4021008, 4000030, 4003000, 4000042], [4011006, 4021000, 4021007, 4000030, 4003000],
[4011006, 4021005, 4021007, 4000030, 4003000], [4011006, 4021003, 4021007, 4000030, 4003000]];
var matQtySet = [[35, 3, 10], [35, 1, 10], [35, 1, 10], [50, 2, 15], [50, 2, 15], [50, 2, 15], [50, 2, 15], [50, 2, 15],
[3, 1, 15, 30, 20], [3, 1, 15, 30, 20], [3, 1, 15, 30, 20], [4, 30, 45, 20], [4, 30, 45, 20], [5, 30, 45, 40], [5, 30, 45, 120],
[3, 3, 1, 60, 35, 80], [3, 3, 1, 60, 35, 150], [3, 3, 1, 60, 35, 100], [3, 3, 1, 60, 35, 250], [5, 8, 1, 75, 50], [5, 8, 1, 75, 50], [5, 8, 1, 75, 50]];
var costSet = [9000, 9000, 9000, 19000, 19000, 19000, 19000, 19000, 19000, 20000, 20000, 20000, 32000, 32000, 40000, 40000, 50000, 50000, 50000, 50000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 2) { //magician shoe
var itemSet = [1072019, 1072020, 1072021, 1072072, 1072073, 1072074, 1072075, 1072076, 1072077, 1072078, 1072089, 1072090, 1072091, 1072114, 1072115, 1072116, 1072117, 1072140, 1072141, 1072142, 1072143, 1072136, 1072137, 1072138, 1072139];
var matSet = [[4021005, 4000021, 4003000], [4021001, 4000021, 4003000], [4021000, 4000021, 4003000], [4011004, 4000021, 4003000], [4021006, 4000021, 4003000], [4021004, 4000021, 4003000],
[4021000, 4000021, 4003000], [4021002, 4000021, 4003000], [4011004, 4000021, 4003000], [4021008, 4000021, 4003000], [4021001, 4021006, 4000021, 4000030, 4003000], [4021000, 4021006, 4000021, 4000030, 4003000],
[4021008, 4021006, 4000021, 4000030, 4003000], [4021000, 4000030, 4000043, 4003000], [4021005, 4000030, 4000037, 4003000], [4011006, 4021007, 4000030, 4000027, 4003000], [4021008, 4021007, 4000030, 4000014, 4003000],
[4021009, 4011006, 4021000, 4000030, 4003000], [4021009, 4011006, 4021005, 4000030, 4003000], [4021009, 4011006, 4021001, 4000030, 4003000], [4021009, 4011006, 4021003, 4000030, 4003000],
[4021009, 4011006, 4011005, 4000030, 4003000], [4021009, 4011006, 4021003, 4000030, 4003000], [4021009, 4011006, 4011003, 4000030, 4003000], [4021009, 4011006, 4021002, 4000030, 4003000]];
var matQtySet = [[1, 30, 5], [1, 30, 5], [1, 30, 5], [1, 35, 10], [1, 35, 10], [1, 35, 10], [2, 50, 15], [2, 50, 15], [2, 50, 15],
[1, 50, 15], [3, 1, 30, 15, 20], [3, 1, 30, 15, 20], [2, 1, 40, 25, 20], [4, 40, 35, 25], [4, 40, 70, 25], [2, 1, 40, 20, 25], [2, 1, 40, 30, 30],
[1, 3, 3, 60, 40], [1, 3, 3, 60, 40], [1, 3, 3, 60, 40], [1, 3, 3, 60, 40], [1, 4, 5, 70, 50], [1, 4, 5, 70, 50], [1, 4, 5, 70, 50], [1, 4, 5, 70, 50]];
var costSet = [3000, 3000, 3000, 8000, 8000, 8000, 18000, 18000, 18000, 18000, 20000, 20000, 22000, 30000, 30000, 35000, 40000, 50000, 50000, 50000, 50000, 60000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
} else if (selectedType == 3) { //thief shoe
var itemSet = [1072084, 1072085, 1072086, 1072087, 1072032, 1072033, 1072035, 1072036, 1072104, 1072105, 1072106, 1072107, 1072108, 1072109, 1072110, 1072128, 1072130, 1072129, 1072131, 1072150, 1072151, 1072152];
var matSet = [[4021005, 4000021, 4003000], [4021000, 4000021, 4003000], [4021003, 4000021, 4003000], [4021004, 4000021, 4003000], [4011000, 4000021, 4003000], [4011001, 4000021, 4003000], [4011004, 4000021, 4003000], [4011006, 4000021, 4003000], [4021000, 4021004, 4000021, 4000030, 4003000], [4021003, 4021004, 4000021, 4000030, 4003000], [4021002, 4021004, 4000021, 4000030, 4003000], [4021000, 4000030, 4000033, 4003000], [4021003, 4000030, 4000032, 4003000], [4021006, 4000030, 4000040, 4003000], [4021005, 4000030, 4000037, 4003000], [4011007, 4021005, 4000030, 4000037, 4003000], [4011007, 4021000, 4000030, 4000043, 4003000], [4011007, 4021003, 4000030, 4000045, 4003000], [4011007, 4021001, 4000030, 4000036, 4003000], [4021008, 4011007, 4021005, 4000030, 4003000], [4021008, 4011007, 4011005, 4000030, 4003000], [4021008, 4011007, 4021000, 4000030, 4003000]];
var matQtySet = [[1, 35, 10], [1, 35, 10], [1, 35, 10], [1, 35, 10], [3, 50, 15], [3, 50, 15], [2, 50, 15], [2, 50, 15], [3, 1, 30, 15, 20], [3, 1, 30, 15, 20], [3, 1, 30, 15, 20],
[5, 45, 50, 30], [4, 45, 30, 30], [4, 45, 3, 30], [4, 45, 70, 30], [2, 3, 50, 200, 35], [2, 3, 50, 150, 35], [2, 3, 50, 80, 35], [2, 3, 50, 80, 35], [1, 1, 8, 75, 50], [1, 1, 5, 75, 50], [1, 1, 1, 75, 50]];
var costSet = [9000, 9000, 9000, 9000, 19000, 19000, 19000, 21000, 20000, 20000, 20000, 40000, 32000, 35000, 35000, 50000, 50000, 50000, 50000, 60000, 60000, 60000];
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
var prompt = "You want me to make a #t" + item + "#? In that case, I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
prompt += "\r\n#i" + mats[i] + "# " + matQty[i] + " #t" + mats[i] + "#";
}
} else {
prompt += "\r\n#i" + mats + "# " + matQty + " #t" + mats + "#";
}
if (cost > 0) {
prompt += "\r\n#i4031138# " + cost + " meso";
}
cm.sendYesNo(prompt);
} else if (status == 3 && mode == 1) {
var complete = true;
if (!cm.canHold(item, 1)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
} else if (cm.getMeso() < cost) {
cm.sendOk("Sorry, I can only accept meso.");
cm.dispose();
return;
} else {
if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (!cm.haveItem(mats[i], matQty[i])) {
complete = false;
}
}
} else if (!cm.haveItem(mats, matQty)) {
complete = false;
}
}
if (!complete) {
cm.sendOk("Sorry, but I have to have those items to get this exactly right. Perhaps next time.");
} else {
if (mats instanceof Array) {
for (var i = 0; i < mats.length; i++) {
cm.gainItem(mats[i], -matQty[i]);
}
} else {
cm.gainItem(mats, -matQty);
}
cm.gainMeso(-cost);
cm.gainItem(item, 1);
cm.sendOk("There, the shoes are ready. Be careful not to trip!");
}
cm.dispose();
}
}

70
scripts/npc/1061006.js Normal file
View File

@@ -0,0 +1,70 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
var status = 0;
var zones = 0;
var names = Array("Deep Forest of Patience 1", "Deep Forest of Patience 2", "Deep Forest of Patience 3");
var maps = Array(105040310, 105040312, 105040314);
var selectedMap = -1;
function start() {
cm.sendNext("You feel a mysterious force surrounding this statue.");
if (cm.isQuestStarted(2054) || cm.isQuestCompleted(2054)) {
zones = 3;
} else if (cm.isQuestStarted(2053) || cm.isQuestCompleted(2053)) {
zones = 2;
} else if (cm.isQuestStarted(2052) || cm.isQuestCompleted(2052)) {
zones = 1;
} else {
zones = 0;
}
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status >= 2 && mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 1) {
if (zones == 0) {
cm.dispose();
} else {
var selStr = "Its power allows you to will yourself deep inside the forest.#b";
for (var i = 0; i < zones; i++) {
selStr += "\r\n#L" + i + "#" + names[i] + "#l";
}
cm.sendSimple(selStr);
}
} else if (status == 2) {
cm.warp(maps[selection], 0);
cm.dispose();
}
}
}

31
scripts/npc/1061007.js Normal file
View File

@@ -0,0 +1,31 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.sendYesNo("Would you like to leave?");
}
function action(mode, type, selection) {
if (mode == 1) {
cm.warp(105040300, 0);
}
cm.dispose();
}

25
scripts/npc/1061008.js Normal file
View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
function start() {
cm.getPlayer().getStorage().sendStorage(cm.getClient(), 1061008);
cm.dispose();
}

80
scripts/npc/1061009.js Normal file
View File

@@ -0,0 +1,80 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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
1061009 - Door of Dimension
Enter 3rd job event
*/
function jobString(niche) {
if (niche == 1) {
return "warrior";
} else if (niche == 2) {
return "magician";
} else if (niche == 3) {
return "bowman";
} else if (niche == 4) {
return "thief";
} else if (niche == 5) {
return "pirate";
}
return "beginner";
}
function canEnterDimensionMap(mapid, jobid) {
if (mapid == 105070001 && (jobid >= 110 && jobid <= 130)) {
return true;
} else if (mapid == 105040305 && (jobid >= 310 && jobid <= 320)) {
return true;
} else if (mapid == 100040106 && (jobid >= 210 && jobid <= 230)) {
return true;
} else if (mapid == 107000402 && (jobid >= 410 && jobid <= 420)) {
return true;
} else if (mapid == 105070200 && (jobid >= 510 && jobid <= 520)) {
return true;
}
return false;
}
function start() {
if (canEnterDimensionMap(cm.getMapId(), cm.getJob().getId()) && cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)) {
var js = jobString(cm.getPlayer().getJob().getJobNiche());
var em = cm.getEventManager("3rdJob_" + js);
if (em == null) {
cm.sendOk("Sorry, but 3rd job advancement (" + js + ") is closed.");
} else {
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("Someone else is already challenging the clone. Please wait until the area is cleared.");
}
cm.dispose();
return;
}
}
cm.dispose();
}

46
scripts/npc/1061010.js Normal file
View File

@@ -0,0 +1,46 @@
var status = 0;
var summon;
var nthtext = "bonus";
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}//ExitChat
else if (mode == 0) {
cm.dispose();
}//No
else { //Regular Talk
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendYesNo("Would you like to leave?");
} else if (status == 1) {
var mapid = cm.getMapId(), exitid = mapid;
if (mapid == 108010101) {
exitid = 105040305;
} else if (mapid == 108010201) {
exitid = 100040106;
} else if (mapid == 108010301) {
exitid = 105070001;
} else if (mapid == 108010401) {
exitid = 107000402;
} else if (mapid == 108010501) {
exitid = 105070200;
}
if (mapid != exitid) {
cm.getPlayer().changeMap(exitid);
}
cm.dispose();
}
}
}

68
scripts/npc/1061012.js Normal file
View File

@@ -0,0 +1,68 @@
/*
NPC Name: Insiginificant Being
Map(s): Dungeon : Another Entrance
Description: Takes you to another Dimension
*/
function start() {
if (cm.getQuestStatus(6107) == 1 || cm.getQuestStatus(6108) == 1) {
var ret = checkJob();
if (ret == -1) {
cm.sendOk("Please form a party and talk to me again.");
} else if (ret == 0) {
cm.sendOk("Please make sure that your party is a size of 2.");
} else if (ret == 1) {
cm.sendOk("One of your party member's job is not eligible for entering the other world.");
} else if (ret == 2) {
cm.sendOk("One of your party member's level is not eligible for entering the other world.");
} else {
var em = cm.getEventManager("s4aWorld");
if (em == null) {
cm.sendOk("You're not allowed to enter with unknown reason. Try again.");
} else if (em.getProperty("started") === "true") {
cm.sendOk("Someone else is already attempting to defeat the Jr.Balrog in another world.");
} else {
var eli = em.getEligibleParty(cm.getParty());
if (eli.size() > 0) {
if (!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("A party in your name is already registered in this instance.");
}
} else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
}
}
} else {
cm.sendOk("You're not allowed to enter the other world with unknown reason.");
}
cm.dispose();
}
function action(mode, type, selection) {
}
function checkJob() {
var party = cm.getParty();
if (party == null) {
return -1;
}
// if (party.getMembers().size() != 2) {
// return 0;
// }
var it = party.getMembers().iterator();
while (it.hasNext()) {
var cPlayer = it.next();
if (cPlayer.getJobId() == 312 || cPlayer.getJobId() == 322 || cPlayer.getJobId() == 900) {
if (cPlayer.getLevel() < 120) {
return 2;
}
} else {
return 1;
}
}
return 3;
}

Some files were not shown because too many files have changed in this diff Show More