Source for my MapleSolaxiaV2 (v83 MapleStory).
This commit is contained in:
ronancpl
2015-11-02 23:17:21 -02:00
parent 324982e94f
commit 972517e7b2
1675 changed files with 261831 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
/*
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);
}
cm.dispose();
}
}
}

View File

@@ -0,0 +1,69 @@
/*
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();
}
}
}
}

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/>.
*/
/**
-- 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){
if(mode == 0)
cm.sendNext("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();
}
}

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();
}

View File

@@ -0,0 +1,64 @@
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.sendOk("I see that you have a coupon to go to Henesys. One moment while I bring you 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.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
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;
}
if (cm.getJobId() == 0) {
mesos = -cost[selectedMap] / 10;
} else {
mesos = -cost[selectedMap];
}
cm.gainMeso(mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

View File

@@ -0,0 +1,73 @@
/*
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();
}
}

View File

@@ -0,0 +1,54 @@
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.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
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;
}
if (cm.getJobId() == 0) {
mesos = -cost[selectedMap] / 10;
} else {
mesos = -cost[selectedMap];
}
cm.gainMeso(mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

View File

@@ -0,0 +1,192 @@
/*
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;
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]))
complete = false;
}else if (!cm.haveItem(mats, matQty))
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 {
if (cm.canHold(item)) {
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));
if (item >= 2060000 && item <= 2060002) //bow arrows
cm.gainItem(item, 1000 - (item - 2060000) * 100);
else if (item >= 2061000 && item <= 2061002) //xbow arrows
cm.gainItem(item, 1000 - (item - 2061000) * 100);
else if (item == 4003000)//screws
cm.gainItem(4003000, 15 * qty);
else
cm.gainItem(item, qty);
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();
}
}

View File

@@ -0,0 +1,145 @@
/*
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 = -1;
var sel;
function start() {
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.");
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if(mode == 0 && status >= 2)
status -= 2;
else{
cm.dispose();
return;
}
}
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.");
return;
}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 if (status == 6)
cm.dispose();
}

View File

@@ -0,0 +1,58 @@
/*
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();
}
}
}

View File

@@ -0,0 +1,50 @@
/*
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.gainCloseness(2, 0);
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();
}
}

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();
}

View File

@@ -0,0 +1,261 @@
/*
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;
function start() {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
if (cm.getLevel() >= 10)
cm.sendNext("So you decided to become a #rBowman#k?");
else {
cm.sendOk("Train a bit more and I can show you the way of the #rBowman#k.");
cm.dispose();
}
} else if (cm.getLevel() >= 30 && cm.getJobId() == 300) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
cm.sendNext("Haha...I knew you'd breeze through that test. I'll admit, you are a great bowman. I'll make you much stronger than you're right now. before that, however... you;ll need to choose one of two paths given to you. It'll be a difficult decision for you to make, but... if there's any question to ask, please do so.");
else if (cm.haveItem(4031011)){
cm.sendOk("Go and see the #b#p1072002##k.");
cm.dispose();
} else
cm.sendYesNo("Hmmm... you have grown a lot since I last saw you. I don't see the weakling I saw before, and instead, look much more like a bowman now. Well, what do you think? Don't you want to get even more powerful than that? Pass a simple test and I'll do just that for you. Do you want to do it?");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 3 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
actionx["3thJobI"] = true;
cm.sendNext("There you are. A few days ago, #b#p2020010##k of Ossyria talked to me about you. I see that you are interested in making the leap to the amazing world of the third job advancement for archers. To achieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat her and bring #b#t4031059##k back with you.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
cm.sendNext("Please, bring me the #b#t4031059##k.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
actionx["3thJobC"] = true;
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
} else {
cm.sendOk("You have chosen wisely.");
cm.dispose();
}
}
function action(mode, type, selection) {
status++;
if (mode == 0 && type != 1)
status -= 2;
if (status == -1){
start();
return;
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
cm.sendOk("You know there is no other choice...");
if (!(mode == 0 && type != 1)){
cm.dispose();
return;
}
}
if (actionx["1stJob"]){
if (status == 0)
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
else if (status == 1){
if (cm.canHold(1452051) && cm.canHold(2060000)){
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
cm.dispose();
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.haveItem(4031012))
cm.sendSimple("Alright, when you have made your decision, click on [I'll choose my occupation] at the bottom.#b\r\n#L0#Please explain to me what being the Hunter is all about.\r\n#L1#Please explain to me what being the Crossbowman is all about.\r\n#L2#I'll choose my occupation!");
else
cm.sendNext("Good decision. You look strong, but I need to see if you really are strong enough to pass the test, it's not a difficult test, so you'll do just fine. Here, take my letter first... make sure you don't lose it!");
} 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 < 2){
cm.sendNext("Not done.");
status -= 2;
} else
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#Hunter\r\n#L1#Crossbowman");
}
} else if (status == 2){
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your desicion here, right?");
} else if (status == 3){
if (cm.haveItem(4031012))
cm.gainItem(4031012, -1);
cm.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 weaking. 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();
}
}
/*
function start() {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
if (cm.getLevel() >= 10)
else {
cm.dispose();
}
} else {
if (cm.getLevel() >= 30 && cm.getJobId() == 300) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
else if (cm.haveItem(4031010)){
cm.sendOk("Go and see the #b#p1072002##k.");
cm.dispose();
} else
} else if (cm.isQuestStarted(100100)) {
if (cm.isQuestCompleted(100101))
cm.sendOk("Alright, now take this to #bRene#k.");
else {
cm.startQuest(100101);
}
cm.dispose();
} else {
cm.sendOk("You have chosen wisely.");
cm.dispose();
}
}
}
function action(mode, type, selection) {
status++;
if (mode == 0 && type != 1)
status -= 2;
if (status == -1){
start();
return;
} else if (mode != 1 || status == 7 && type != 1 || (cm.haveItem(4031010) && status == 2)){
if (mode == 0 && status == 2)
cm.sendOk("Make up your mind and visit me again.");
if (!(mode == 0 && type != 1)){
cm.dispose();
return;
}
}
if (actionx["1stJob"]){
if (status == 0)
else if (status == 1)
else if (status == 2) {
cm.sendOk("So be it! Now go, and go with pride.");
} else {
cm.sendNext("Make some room in your inventory and talk to me again.");
cm.dispose();
}
}
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.haveItem(4031012))
cm.sendSimple("Alright, when you have made your decision, click on [I'll choose my occupation] at the bottom.#b\r\n#L0#Please explain to me what being the Hunter is all about.\r\n#L1#Please explain to me what being the Crossbowman is all about.\r\n#L2#I'll choose my occupation!");
else {
cm.sendNext("Good decision. You look strong, but I need to see if you really are strong enough to pass the test, it's not a difficult test, so you'll do just fine. Here, take my letter first... make sure you don't lose it!");
if(!cm.isQuestStarted(100000)) cm.startQuest(100000);
}
} else if (status == 1){
if (!cm.haveItem(4031012)){
if (cm.canHold(4031010)){
if (!cm.haveItem(4031010))
cm.gainItem(4031010, 1);
cm.sendNextPrev("Please get this letter to #b#p1072002##k who's around #b#m106010000##k near Henesys. She is taking care of the job of an instructor in place of me. Give her the letter and she'll test you in place of me. Best of luck to you.");
} else {
cm.sendNext("Please, make some space in your inventory.");
cm.dispose();
}
} else {
if (selection < 2){
cm.sendNext("Not done.");
status -= 2;
} else
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#Hunter\r\n#L1#Crossbowman");
}
} else if (status == 2){
job += selection * 10;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your desicion here, right?");
} else if (status == 3){
if (cm.haveItem(4031012))
cm.gainItem(4031012, -1);
cm.completeQuest(100002);
cm.sendNext("Alright, you're the " + (job == 310 ? "#bHunter#k" : "#bCrossbowman#k") + " from here on out. Hunters are the intelligent bunch with incredible vision, able to pierce the arrow through the heart of the monsters with ease... please train yourself each and everyday. I'll help you become even stronger than you already are.");
if (cm.getJobId() != job)
cm.changeJobById(job);
} else if (status == 4)
cm.sendNextPrev("I have just given you a book that gives you the list of skills you can acquire as a " + (job == 310 ? "hunter" : "crossbowman") + ". Also your etc inventory has expanded by adding another row to it. Your max HP and MP have increased, too. Go check and see for it yourself.");
else if (status == 5)
cm.sendNextPrev("I have also given you a little bit of #bSP#k. Open the #bSkill Menu#k located at the bottomleft corner. you'll be able to boost up the newer acquired 2nd level skills. A word of warning, though. You can't boost them up all at once. Some of the skills are only available after you have learned other skills. Make sure yo remember that.");
else if (status == 6)
cm.sendNextPrev((job == 310 ? "Hunter" : "Crossbowman") + " need to be strong. But remember that you can't abuse that power and use it on a weaking. 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.");
}
}*/

View File

@@ -0,0 +1,99 @@
/*
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.
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair = Array(30030, 30020, 30000, 30310, 30330, 30060, 30150, 30410, 30210, 30140, 30120, 30200);
var fhair = Array(31050, 31040, 31000, 31150, 31310, 31300, 31160, 31100, 31410, 31030, 31080, 31070);
var hairnew = Array();
function start() {
status = -1;
action(1, 0, 0);
}
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#L0#I want to buy a coupon!#l\r\n#L1#Haircut: #i5150001##t5150001##l\r\n#L2#Dye your hair: #i5151001##t5151001##l");
else if (status == 1) {
if (selection == 0) {
beauty = 0;
cm.sendSimple("Which coupon would you like to buy?\r\n#L0#Haircut for " + hairprice + " mesos: #i5150001##t5150001##l\r\n#L1#Dye your hair for " + haircolorprice + " mesos: #i5151001##t5151001##l");
} else if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0)
for(var i = 0; i < mhair.length; i++)
hairnew.push(mhair[i] + parseInt(cm.getPlayer().getHair()% 10));
if (cm.getPlayer().getGender() == 1)
for(var i = 0; i < fhair.length; i++)
hairnew.push(fhair[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++)
haircolor.push(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(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!");
}
}
}
}

View File

@@ -0,0 +1,112 @@
/*
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.
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair = Array(30310, 30330, 30060, 30150, 30410, 30210, 30140, 30120, 30200, 30560, 30510, 30610, 30470);
var fhair = Array(31150, 31310, 31300, 31160, 31100, 31410, 31030, 31080, 31070, 31610, 31350, 31510, 31740);
var hairnew = Array();
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("I'm Brittany the assistant. If you have #b#t5150010##k or #b#t5151000##k by any chance, then how about letting me change your hairdo?\r\n#L0#I want to buy a coupon!#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 = 0;
cm.sendSimple("Which coupon would you like to buy?\r\n#L0#Haircut for " + hairprice + " mesos: #i5150010##t5150010##l\r\n#L1#Dye your hair for " + haircolorprice + " mesos: #i5151000##t5151000##l");
} else if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair.length; i++)
hairnew.push(mhair[i] + parseInt(cm.getPlayer().getHair()% 10));
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair.length; i++)
hairnew.push(fhair[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++)
haircolor.push(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...");
}
}
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...");
}
}
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!");
}
}
}
}
}

View File

@@ -0,0 +1,50 @@
/*
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 = 0;
var skin = Array(0, 1, 2, 3, 4);
var price = 1000000;
function start() {
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#I would like to buy a #b#t5153000##k for " + price + " mesos, please!#l\r\n\#L2#I already have a Coupon!#l");
}
function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else {
status++;
if (status == 1)
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 {
if (cm.haveItem(5153000)){
cm.gainItem(5153000, -1);
cm.setSkin(selection);
cm.sendOk("Enjoy your new and improved 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();
}
}
}

View File

@@ -0,0 +1,141 @@
/*
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
* @NPC Tory
*/
var status = 0;
var chosen = 0;
var min = 3;
var minLevel = 10;
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.getPlayer().getMapId() == 100000200) {
if (cm.getParty() == null || !cm.isLeader()) {
if (status == 0) {
cm.sendNext("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.");
} else if (status == 1) {
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 {
if (status == 0) {
cm.sendNext("I'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.");
} else if (status == 1) {
cm.sendSimple("Would you like to head over to the hill of primrose and join forces with your party members to help Growlie out?\r\n#b#L0# Yes, I will go.#l");
} else if (status == 2) {
var party = cm.getPartyMembers();
var onmap = 0;
for (var i = 0; i < party.size(); i++) {
if (party.get(i).getMap().getId() == 100000200) {
if (party.get(i).getLevel() < minLevel) {
cm.sendOk("A member of your party does not meet the level requirement.");
cm.dispose();
return;
}
onmap++;
}
}
if (onmap < min) {
cm.sendOk("A member of your party is not presently in the map.");
cm.dispose();
return;
}
if (cm.getClient().getChannelServer().getMapFactory().getMap(910010000).getAllPlayer().size() > 0) {
cm.sendOk("Someone is already attempting the PQ. Please wait for them to finish, or find another channel.");
cm.dispose();
return;
}
var em = cm.getEventManager("HenesysPQ");
if (em == null) {
cm.sendOk("This PQ is currently broken. Please report it on the forum!");
cm.dispose();
return;
}
var prop = em.getProperty("state");
if (prop == null || prop.equals("0")) { //Start the PQ
cm.removeHPQItems();
em.setProperty("latestLeader", cm.getPlayer().getName());
em.startInstance(cm.getParty(), cm.getPlayer().getMap());
} else {
cm.sendOk("Someone is already attempting the PQ. Please wait for them to finish, or find another channel.");
cm.dispose();
return;
}
cm.dispose();
}
}
} else if (cm.getPlayer().getMap().getId() == 910010100 || cm.getPlayer().getMap().getId() == 910010400) {
if (status == 0) {
cm.sendSimple("I appreciate you giving some rice cakes for the hungry Growlie. It looks like you have nothing else to do now. Would you like to leave this place?\r\n#L0#I want to give you the rest of my rice cakes.#l\r\n#L1#Yes, please get me out of here.#l");
} else if (status == 1) {
chosen = selection;
if (selection == 0) {
if (cm.getPlayer().getGivenRiceCakes() >= 20) {
if (cm.getPlayer().getGottenRiceHat()) {
cm.sendNext("Do you like the hat I gave you? I ate so much of your rice cake that I will have to say no to your offer of rice cake for a little while.");
cm.dispose();
} else {
cm.sendYesNo("I appreciate the thought, but I am okay now. I still have some of the rice cakes you gave me stored at home. To show you my appreciation, I prepared a small gift for you. Would you like to accept it?");
}
}
} else if (selection == 1) {
cm.warp(100000200);
cm.dispose();
}
cm.dispose();
} else if (status == 2) {
if (chosen == 1) {
if (cm.canHold(1002798)) { // we will let them try again if they can't
cm.gainItem(1002798);
cm.setGottenRiceHat(true);
cm.sendNext("It will really go well with you. I promise.");
} else {
cm.getPlayer().dropMessage(1, "EQUIP inventory full.");
}
cm.dispose();
} else if (cm.getPlayer().getGivenRiceCakes() < 20) {
cm.sendOk("Thank you for rice cake number " + cm.getPlayer().getGivenRiceCakes() + "!! I really appreciate it!");
}
}
}
}
}

View File

@@ -0,0 +1,66 @@
/*
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
* @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) {
cm.sendYesNo("What do you think about making your way there with your party members and teach those rowdy pigs a lesson?");
} else if (status == 2) {
cm.warp(910010200);
cm.dispose();
return;
}
} 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();
return;
}
} 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();
return;
}
}
}
}

View File

@@ -0,0 +1,104 @@
/*
Growlie (that fatass uhh.. hungry lion or whatever)
FightDesign @RageZONE
*/
importPackage(Packages.net.world);
importPackage(Packages.tools);
importPackage(java.awt);
var status = 0;
var chosen = -1;
function start() {
if (cm.isLeader()) {
var eim = cm.getEventManager("HenesysPQ").getInstance("HenesysPQ_" + cm.getParty().getLeader().getName());
if (eim.getProperty("clear").equals("true")) {
status = 50;
cm.sendNext("Mmmm ... this is delicious. Please come see me next time for more #b#t4001101##k. Have a safe trip home!");
} 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#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");
}
}
function action(mode, type, selection) {
if (mode < 0) {
cm.dispose();
return;
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 0)
status += chosen == 2 ? 1 : -1;
else
status++;
if (status == 51) {
var eim = cm.getEventManager("HenesysPQ").getInstance("HenesysPQ_" + cm.getParty().getLeader().getName());
eim.finishPQ();
cm.dispose();
return;
}
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.");
} 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();
return;
}
} 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.sendNext("Mmmm ... this is delicious. Please come see me next time for more #b#t4001101##k. Have a safe trip home!");
cm.gainItem(4001101, -10);
cm.givePartyExp("HenesysPQ");
var eim = cm.getEventManager("HenesysPQ").getInstance("HenesysPQ_" + cm.getParty().getLeader().getName());
eim.setProperty("clear", "true");
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.allowSummonState(false);
map.killAllMonstersNotFriendly();
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
cm.dispose();
} else {
if (mode == 1) {
var eim = cm.getEventManager("HenesysPQ").getInstance("HenesysPQ_" + cm.getParty().getLeader().getName());
eim.disbandParty();
} 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 (chosen == 1) {
var eim = cm.getEventManager("HenesysPQ").getInstance("HenesysPQ_" + cm.getParty().getLeader().getName());
eim.finishPQ();
cm.dispose();
}
} 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();
}
}
}

View File

@@ -0,0 +1,40 @@
var status = -1;
var map = 910060000;
var num = 5;
var maxp = 5;
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.isQuestStarted(22515) || cm.isQuestStarted(22516) || cm.isQuestStarted(22517) || cm.isQuestStarted(22518)) {
cm.sendYesNo("Would you like to go in the special Spore Training Center?");
status = 1;
}
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();
}
}

View File

@@ -0,0 +1,40 @@
var status = -1;
var map = 910060000;
var num = 5;
var maxp = 5;
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if (cm.isQuestStarted(22515) || cm.isQuestStarted(22516) || cm.isQuestStarted(22517) || cm.isQuestStarted(22518)) {
cm.sendYesNo("Would you like to go in the special Spore Training Center?");
status = 1;
}
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();
}
}

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) {
qm.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);
cm.dispose();
}
}

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);
cm.dispose();
}

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();
}

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();
}

View File

@@ -0,0 +1,43 @@
/*
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();
}
}

View File

@@ -0,0 +1,43 @@
/*
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();
}
}

View File

@@ -0,0 +1,43 @@
/*
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();
}
}

View File

@@ -0,0 +1,43 @@
/*
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();
}
}

View File

@@ -0,0 +1,43 @@
/*
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();
}
}

View File

@@ -0,0 +1,166 @@
/*
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;
function start() {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
if (cm.getLevel() >= 10)
cm.sendNext("Do you want to become a Warrior? You need to meet some criteria in order to do so.#b You should be at least in level 10, with at least 35 in STR#k. Let's see...");
else {
cm.sendOk("Train a bit more and I can show you the way of the #rWarrior#k.");
cm.dispose();
}
} else if (cm.getLevel() >= 30 && cm.getJobId() == 100) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
cm.sendNext("Oh... you came back safe! I knew you'd breeze through. I'll admit, you are a strong, formidable Warrior! Alright, I'll make you an even stronger Warrior than you already are. But before that, you need to choose one of the three paths that you'll be given. It isn't going to be easy, so if you have and questions, feel free to ask.");
else if (cm.haveItem(4031008)){
cm.sendOk("Go and see the #b#p1072000##k.");
cm.dispose();
} else
cm.sendNext("The progress you have made is astonishing.");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && (cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 1 && !cm.getPlayer().gotPartyQuestItem("JBP")))) {
actionx["3thJobI"] = true;
cm.sendNext("I was waiting for you. Few days ago, I heard about you from #b#p2020008##k in Ossyria. Well... I'd like to test your strength. There is a secret passage near the ant tunnel. Nobody but you can go into that passage. If you go into the passage, you will meat my the other self. Beat him and bring #b#t4031059##k to me.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
cm.sendNext("Please, bring me the #b#t4031059##k.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
actionx["3thJobC"] = true;
cm.sendNext("Wow... You beat my the other self and brought #b#t4031059##k to me. Good! this surely proves your strength. In terms of strength, you are ready to advance to 3th job. As I promised, I will give #b#t4031057##k to you. Give this necklace to #b#p2020008##k in Ossyria and you will be able to take second test of 3rd job advancement. Good Luck~");
} else {
cm.sendOk("You have chosen wisely.");
cm.dispose();
}
}
function action(mode, type, selection) {
status++;
if (mode == 0 && type != 1)
status -= 2;
if (status == -1){
start();
return;
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJob"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
cm.sendOk("Make up your mind and visit me again.");
if (!(mode == 0 && type != 1)){
cm.dispose();
return;
}
}
if (actionx["1stJob"]){
if (status == 0)
cm.sendNextPrev("It is an important and final choice. You will not be able to turn back.");
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 (Incomplete)");
} 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("One more warning. Once you have chosed you (Incomplete)");
} 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){
cm.sendNext("Make up your mind and then talk to me."); //there goes the explanation of the 3 WARRIOR PATHS.
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 weaking. 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.
*/

View File

@@ -0,0 +1,54 @@
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.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
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;
}
if (cm.getJobId() == 0) {
mesos = -cost[selectedMap] / 10;
} else {
mesos = -cost[selectedMap];
}
cm.gainMeso(mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

View File

@@ -0,0 +1,238 @@
/*
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 = new Array("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array(4011000,4011001,4011002,4011003,4011004,4011005,4011006);
var matSet = new Array(4010000,4010001,4010002,4010003,4010004,4010005,4010006);
var matQtySet = new Array(10,10,10,10,10,10,10);
var costSet = new Array(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 = new Array(4021000,4021001,4021002,4021003,4021004,4021005,4021006,4021007,4021008);
var matSet = new Array(4020000,4020001,4020002,4020003,4020004,4020005,4020006,4020007,4020008);
var matQtySet = new Array(10,10,10,10,10,10,10,10,10);
var costSet = new Array (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;
if (selectedType == 2){ //helmet refine
var itemSet = new Array(1002042,1002041,1002002,1002044,1002003,1002040,1002007,1002052,1002011,1002058,1002009,1002056,1002087,1002088,1002049,1002050,1002047,1002048,1002099,1002098,1002085,1002028,1002022,1002101);
var matSet = new Array(new Array(1002001,4011002),new Array(1002001,4021006),new Array(1002043,4011001),new Array(1002043,4011002),new Array(1002039,4011001),new Array(1002039,4011002),new Array(1002051,4011001),new Array(1002051,4011002),new Array(1002059,4011001),new Array(1002059,4011002),
new Array(1002055,4011001),new Array(1002055,4011002),new Array(1002027,4011002),new Array(1002027,4011006),new Array(1002005,4011006),new Array(1002005,4011005),new Array(1002004,4021000),new Array(1002004,4021005),new Array(1002021,4011002),new Array(1002021,4011006),new Array(1002086,4011002),
new Array(1002086,4011004),new Array(1002100,4011007,4011001),new Array(1002100,4011007,4011002));
var matQtySet = new Array(new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,1),new Array(1,2),new Array(1,2),new Array(1,3),new Array(1,3),new Array(1,3),new Array(1,3),new Array(1,4),new Array(1,4),new Array(1,5),new Array(1,5),new Array(1,3),new Array(1,3),
new Array(1,5),new Array(1,6),new Array(1,5),new Array(1,4),new Array(1,1,7),new Array(1,1,7));
var costSet = new Array(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 = new Array (1092014,1092013,1092010,1092011);
var matSet = new Array(new Array (1092012,4011003),new Array (1092012,4011002),new Array (1092009,4011007,4011004),new Array (1092009,4011007,4011003));
var matQtySet = new Array (new Array (1,10),new Array (1,10),new Array (1,1,15),new Array (1,1,15));
var costSet = new Array (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)) {
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]))
complete = false;
}
else if (!cm.haveItem(mats, matQty))
complete = false;
/* if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
{
if (matQty[i] * qty == 1) {
if (!cm.haveItem(mats[i]))
{
complete = false;
}
}
else {
if (!cm.haveItem(mats[i],matQty[i] * selection)) complete=false;
}
}
}
else {
if (!cm.haveItem(mats,matQty * selection)) 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();
}
}

View File

@@ -0,0 +1,234 @@
/*
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 = new Array("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array (4003001,4003001,4003000);
var matSet = new Array(4000003,4000018,new Array (4011000,4011001));
var matQtySet = new Array (10,5,new Array (1,1));
var costSet = new Array (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;
if (selectedType == 0){ //glove refine
var itemSet = new Array(1082003,1082000,1082004,1082001,1082007,1082008,1082023,1082009,1082059);
var matSet = new Array(new Array(4000021,4011001),4011001,new Array(4000021,4011000),4011001,new Array(4011000,4011001,4003000),new Array(4000021,4011001,4003000),new Array(4000021,4011001,4003000),
new Array(4011001,4021007,4000030,4003000),new Array(4011007,4011000,4011006,4000030,4003000));
var matQtySet = new Array(new Array(15,1),2,new Array(40,2),2,new Array(3,2,15),new Array(30,4,15),new Array(50,5,40),new Array(3,2,30,45),new Array(1,8,2,50,50));
var costSet = new Array(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 = new Array(1082005,1082006,1082035,1082036,1082024,1082025,1082010,1082011,1082060,1082061);
var matSet = new Array(new Array(1082007,4011001),new Array(1082007,4011005),new Array(1082008,4021006),new Array(1082008,4021008),new Array(1082023,4011003),new Array(1082023,4021008),
new Array(1082009,4011002),new Array(1082009,4011006),new Array(1082059,4011002,4021005),new Array(1082059,4021007,4021008));
var matQtySet = new Array (new Array(1,1),new Array(1,2),new Array(1,3),new Array(1,1),new Array(1,4),new Array(1,2),new Array(1,5),new Array(1,4),new Array(1,3,5),new Array(1,2,2));
var costSet = new Array (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;
if(!cm.canHold(item)) {
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]))
complete = false;
}
else if (!cm.haveItem(mats, matQty))
complete = false;
/*
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
{
if (matQty[i] * qty == 1) {
if (!cm.haveItem(mats[i]))
{
complete = false;
}
}
else {
if (!cm.haveItem(mats[i],matQty[i]*qty)) complete=false;
}
}
}
else {
if (!cm.haveItem(mats,matQty)) 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);
if (item == 4003000)//screws
cm.gainItem(4003000, 15 * qty);
else
cm.gainItem(item, qty);
cm.sendOk("Did that come out right? Come by me again if you have anything for me to practice on.");
}
cm.dispose();
}
}

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();
}

View File

@@ -0,0 +1,214 @@
/*
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 = new Array(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 = new Array(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 = new Array(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;
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);
cm.getPlayer().announce(Packages.tools.MaplePacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX"));
cm.logLeaf(nxAmount + " NX");
cm.dispose();
} else if(choice == 2) {
if(!cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.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(Packages.client.inventory.MapleInventoryType.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(Packages.client.inventory.MapleInventoryType.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(Packages.client.inventory.MapleInventoryType.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();
}
}
}

View File

@@ -0,0 +1,33 @@
var status = -1;
var map = 910220000;
var num = 5;
var maxp = 5;
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
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();
}
}
}

View File

@@ -0,0 +1,54 @@
var status = 0;
var maps = [104000000, 102000000, 100000000, 103000000, 120000000];
var cost = [1000, 1000, 1000, 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.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
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;
}
if (cm.getJobId() == 0) {
mesos = -cost[selectedMap] / 10;
} else {
mesos = -cost[selectedMap];
}
cm.gainMeso(mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

View File

@@ -0,0 +1,164 @@
/*
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;
function start() {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
if (cm.getLevel() >= 8)
cm.sendNext("Want to be a magician? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 8#k, with getting INT as your top priority. Let's see.");
else {
cm.sendOk("Train a bit more and I can show you the way of the #rMagician#k.");
cm.dispose();
}
} else if (cm.getLevel() >= 30 && cm.getJobId() == 200) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
else if (cm.haveItem(4031009)){
cm.sendOk("Go and see the #b#p1072001##k.");
cm.dispose();
} else
cm.sendNext("The progress you have made is astonishing.");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 2 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
actionx["3thJobI"] = true;
cm.sendNext("There you are. A few days ago, #b#p2020009##k of Ossyria talked to me about you. I see that you are interested in making the leap to the enlightened of the third job advancement for magicians. To archieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a deep forest of evil in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
cm.sendNext("Please, bring me the #b#t4031059##k from my clone. You can find him inside a hole in space which is deep in a forest of evil.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
actionx["3thJobC"] = true;
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
} else {
cm.sendOk("You have chosen wisely.");
cm.dispose();
}
}
function action(mode, type, selection) {
status++;
if (mode == 0 && type == 0)
status -= 2;
if (status == -1){
start();
return;
} else if (mode != 1 || status == 7 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
cm.sendOk("You know there is no other choice...");
if (!(mode == 0 && type == 0)){
cm.dispose();
return;
}
}
if (actionx["1stJob"]){
if (status == 0)
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little sinister mind, and... yeah... so, what do you think? Wanna be the Magician?");
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.sendPrev("This is all I can teach you. Good luck on your journey, young Magician.");
} 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){
cm.sendNext("Not done.");
status -= 2;
} else
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#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 weaking. 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();
}
}

View File

@@ -0,0 +1,249 @@
/*
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 = new Array("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array(1082019,1082020,1082026,1082051,1082054,1082062,1082081,1082086);
var matSet = new Array(4000021,new Array(4000021,4011001),new Array(4000021,4011006),new Array(4000021,4021006,4021000),new Array(4000021,4011006,4011001,4021000),
new Array(4000021,4021000,4021006,4003000),new Array(4021000,4011006,4000030,4003000),new Array(4011007,4011001,4021007,4000030,4003000));
var matQtySet = new Array(15,new Array(30,1),new Array(50,2),new Array(60,1,2),new Array(70,1,3,2),new Array(80,3,3,30),new Array(3,2,35,40),new Array(1,8,1,50,50));
var costSet = new Array(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 = new Array(1082021,1082022,1082027,1082028,1082052,1082053,1082055,1082056,1082063,1082064,1082082,1082080,1082087,1082088);
var matSet = new Array(new Array(1082020,4011001),new Array(1082020,4021001),new Array(1082026,4021000),new Array(1082026,4021008),new Array(1082051,4021005),
new Array(1082051,4021008),new Array(1082054,4021005),new Array(1082054,4021008),new Array(1082062,4021002),new Array(1082062,4021008),
new Array(1082081,4021002),new Array(1082081,4021008),new Array(1082086,4011004,4011006),new Array(1082086,4021008,4011006));
var matQtySet = new Array(new Array(1,1),new Array(1,2),new Array(1,3),new Array(1,1),new Array(1,3),new Array(1,1),new Array(1,3),new Array(1,1),new Array(1,4),
new Array(1,2),new Array(1,5),new Array(1,3),new Array(1,3,5),new Array(1,2,3));
var costSet = new Array (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 = new Array(1002065,1002013);
var matSet = new Array(new Array(1002064,4011001),new Array(1002064,4011006));
var matQtySet = new Array(new Array(1,3),new Array(1,3));
var costSet = new Array(40000,50000);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
}
else if (selectedType == 3){ //wand refine
var itemSet = new Array (1372005,1372006,1372002,1372004,1372003,1372001,1372000,1372007);
var matSet = new Array(4003001,new Array(4003001,4000001),new Array(4011001,4000009,4003000),new Array(4011002,4003002,4003000),new Array(4011002,4021002,4003000),
new Array(4021006,4011002,4011001,4003000),new Array(4021006,4021005,4021007,4003003,4003000),new Array(4011006,4021003,4021007,4021002,4003002,4003000));
var matQtySet = new Array (5,new Array(10,50),new Array(1,30,5),new Array(2,1,10),new Array(3,1,10),new Array(5,3,1,15),new Array(5,5,1,1,20),new Array(4,3,2,1,1,30));
var costSet = new Array (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 = new Array (1382000,1382003,1382005,1382004,1382002,1382001);
var matSet = new Array(4003001,new Array(4021005,4011001,4003000),new Array(4021003,4011001,4003000),new Array(4003001,4011001,4003000),
new Array(4021006,4021001,4011001,4003000),new Array(4011001,4021006,4021001,4021005,4003000,4000010,4003003));
var matQtySet = new Array (5,new Array(1,1,5),new Array(1,1,5),new Array(50,1,10),new Array(2,1,1,15),new Array(8,5,5,5,30,50,1));
var costSet = new Array (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)) {
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 (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
{
if (matQty[i] == 1) {
if (!cm.haveItem(mats[i]))
{
complete = false;
}
}
else {
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();
}
}

View File

@@ -0,0 +1,81 @@
/*
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();
}
}
}
}
}

View File

@@ -0,0 +1,34 @@
/*
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
* By 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();
}

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/>.
*/
/**
-- 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){
if(mode == 0)
cm.sendNext("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();
}
}

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();
}

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();
}
}
}
}

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.gainItem(4031045, -1);
cm.warp(101000301);
cm.dispose();
}
else{
cm.sendOk("The boat to Orbis is ready to take off, please be patient for the next one.");
cm.dispose();
}
}

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 go 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();
}
}
}
}

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/>.
*/
/**
-- 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<4011009; 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 = 4021000; k<4021009; k+=1001) {
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();
}
}
}

View File

@@ -0,0 +1,128 @@
/*
Made by RMZero213 of RaGEZONE forums.
Just keep this header here and don't claim that you made it.
*/
/*
1032102.js
Mar the Fairy
Dragon Evolver
*/
importPackage(Packages.client);
importPackage(Packages.server);
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
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 == 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.getChar().getPet() == null) {
cm.sendOk("Make sure your pet is equipped.");
cm.dispose();
} else if (cm.getChar().getPet().getItemId() < 5000029 || cm.getChar().getPet().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. Please come back when you do.");
cm.dispose();
} else if (cm.getChar().getPet().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.getPlayer().message("Pet could not be evolved.");
return;
}
var id = cm.getPlayer().getPet().getItemId();
var name = cm.getPlayer().getPet().getName();
var level = cm.getPlayer().getPet().getLevel();
var closeness = cm.getPlayer().getPet().getCloseness();
var fullness = cm.getPlayer().getPet().getFullness();
//MapleItemInformationProvider ii = MapleItemInformationProvider.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(MapleItemInformationProvider.getInstance().getName(id))) {
name = MapleItemInformationProvider.getInstance().getName(after);
}*/
//cm.unequipPet(cm.getC());
cm.getPlayer().unequipAllPets(); //IMPORTANT, you can bug/crash yourself if you don't unequip the pet to be deleted
cm.gainItem(5380000, -1);
qm.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) {
MapleInventoryManipulator.removeFromSlot(cm.getC(), MapleInventoryType.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();
}
}
}

View File

@@ -0,0 +1,33 @@
var status = -1;
var map = 910120000;
var num = 5;
var maxp = 5;
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
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();
}
}
}

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/>.
*/
/* 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();
}

View File

@@ -0,0 +1,50 @@
/*
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();
}

View File

@@ -0,0 +1,164 @@
/*
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;
function start() {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
if (cm.getLevel() >= 10)
cm.sendNext("Want to be a thief? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10, with your DEX over 25#k. Let's see.");
else {
cm.sendOk("Train a bit more and I can show you the way of the #rThief#k.");
cm.dispose();
}
} else if (cm.getLevel() >= 30 && cm.getJobId() == 400) {
actionx["2ndJob"] = true;
if (cm.haveItem(4031012))
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
else if (cm.haveItem(4031011)){
cm.sendOk("Go and see the #b#p1072003##k.");
cm.dispose();
} else
cm.sendNext("The progress you have made is astonishing.");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 4 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
actionx["3thJobI"] = true;
cm.sendNext("There you are. A few days ago, #b#p2020011##k of Ossyria talked to me about you. I see that you are interested in making the leap to the dark world of the third job advancement for thieves. To archieve that goal, I will have to test your strength in orden to see whether you are worthy of the advancement. There is an opening in the middle of a deep swamp in Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
cm.sendNext("Please, bring me the #b#t4031059##k.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
actionx["3thJobC"] = true;
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020011##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
} else if (cm.isQuestStarted(6141)) {
cm.warp(910300000, 3);
} else {
cm.sendOk("You have chosen wisely.");
cm.dispose();
}
}
function action(mode, type, selection) {
status++;
if (mode == 0 && type != 1)
status -= 2;
if (status == -1){
start();
return;
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
cm.sendOk("You know there is no other choice...");
if (!(mode == 0 && type != 1)){
cm.dispose();
return;
}
}
if (actionx["1stJob"]){
if (status == 0)
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little sinister mind, and... yeah... so, what do you think? Wanna be the Rogue?");
else if (status == 1){
if (cm.canHold(2070000) && cm.canHold(1472061)){
if (cm.getJobId() == 0){
cm.changeJobById(400);
cm.gainItem(2070000, 500);
cm.gainItem(1472061, 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("One more warning. Once you have chosed you (Incomplete)");
} 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){
cm.sendNext("Not done.");
status -= 2;
} else
cm.sendSimple("Now... have you made up your mind? Please choose the job you'd like to select for your 2nd job advancement. #b\r\n#L0#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 weaking. 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();
}
}

View File

@@ -0,0 +1,265 @@
/*
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 = new Array("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array (4003001,4003001,4003000);
var matSet = new Array(4000003,4000018,new Array (4011000,4011001));
var matQtySet = new Array (10,5,new Array (1,1));
var costSet = new Array (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;
if (selectedType == 0){ //glove refine
var itemSet = new Array(1082002,1082029,1082030,1082031,1082032,1082037,1082042,1082046,1082075,1082065,1082092);
var matSet = new Array(4000021,new Array(4000021,4000018),new Array(4000021,4000015),new Array(4000021,4000020),new Array(4011000,4000021),new Array(4011000,4011001,4000021),new Array(4011001,4000021,4003000),new Array(4011001,4011000,4000021,4003000),new Array(4021000,4000014,4000021,4003000),new Array(4021005,4021008,4000030,4003000),new Array(4011007,4011000,4021007,4000030,4003000));
var matQtySet = new Array(15,new Array(30,20),new Array(30,20),new Array(30,20),new Array(2,40),new Array(2,1,10),new Array(2,50,10),new Array(3,1,60,15),new Array(3,200,80,30),new Array(3,1,40,30),new Array(1,8,1,50,50));
var costSet = new Array(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 = new Array(1082033,1082034,1082038,1082039,1082043,1082044,1082047,1082045,1082076,1082074,1082067,1082066,1082093,1082094);
var matSet = new Array(new Array(1082032,4011002),new Array(1082032,4021004),new Array(1082037,4011002),new Array(1082037,4021004),new Array(1082042,4011004),new Array(1082042,4011006),new Array(1082046,4011005),new Array(1082046,4011006),new Array(1082075,4011006),new Array(1082075,4021008),new Array(1082065,4021000),new Array(1082065,4011006,4021008),new Array(1082092,4011001,4000014),new Array(1082092,4011006,4000027));
var matQtySet = new Array(new Array(1,1),new Array(1,1),new Array(1,2),new Array(1,2),new Array(1,2),new Array(1,1),new Array(1,3),new Array(1,2),new Array(1,4),new Array(1,2),new Array(1,5),new Array(1,2,1),new Array(1,7,200),new Array(1,7,150));
var costSet = new Array (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 = new Array(1472001,1472004,1472007,1472008,1472011,1472014,1472018);
var matSet = new Array(new Array(4011001,4000021,4003000),new Array(4011000,4011001,4000021,4003000),new Array(1472000,4011001,4000021,4003001),new Array(4011000,4011001,4000021,4003000),new Array(4011000,4011001,4000021,4003000),new Array(4011000,4011001,4000021,4003000),new Array(4011000,4011001,4000030,4003000));
var matQtySet = new Array(new Array(1,20,5),new Array(2,1,30,10),new Array(1,3,20,30),new Array(3,2,50,20),new Array(4,2,80,25),new Array(3,2,100,30),new Array(4,2,40,35));
var costSet = new Array(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 = new Array (1472002,1472003,1472005,1472006,1472009,1472010,1472012,1472013,1472015,1472016,1472017,1472019,1472020);
var matSet = new Array(new Array(1472001,4011002),new Array(1472001,4011006),new Array(1472004,4011001),new Array(1472004,4011003),new Array(1472008,4011002),new Array(1472008,4011003),new Array(1472011,4011004),new Array(1472011,4021008),new Array(1472014,4021000),new Array(1472014,4011003),new Array(1472014,4021008),new Array(1472018,4021000),new Array(1472018,4021005));
var matQtySet = new Array (new Array(1,1),new Array(1,1),new Array(1,2),new Array(1,2),new Array(1,3),new Array(1,3),new Array(1,4),new Array(1,1),new Array(1,5),new Array(1,5),new Array(1,2),new Array(1,6),new Array(1,6));
var costSet = new Array (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;
if(!cm.canHold(item)) {
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]))
complete = false;
}
else if (!cm.haveItem(mats, matQty))
complete = false;
/*
if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++)
{
if (matQty[i] * qty == 1)
if (!cm.haveItem(mats[i]))
complete = false;
else
if (!cm.haveItem(mats[i],matQty[i])) complete=false;
}
}
else
if (!cm.haveItem(mats,matQty)) 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);
if (item == 4003000)//screws
cm.gainItem(4003000, 15 * qty);
else
cm.gainItem(item, qty);
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
}
cm.dispose();
}
}

View File

@@ -0,0 +1,211 @@
/* 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)
status++;
else
cm.dispose();
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 = new Array("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array(4011000,4011001,4011002,4011003,4011004,4011005,4011006);
var matSet = new Array(4010000,4010001,4010002,4010003,4010004,4010005,4010006);
var matQtySet = new Array(10,10,10,10,10,10,10);
var costSet = new Array(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 = new Array(4021000,4021001,4021002,4021003,4021004,4021005,4021006,4021007,4021008);
var matSet = new Array(4020000,4020001,4020002,4020003,4020004,4020005,4020006,4020007,4020008);
var matQtySet = new Array(10,10,10,10,10,10,10,10,10);
var costSet = new Array (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 = new Array(4011001,1);
var matSet = new Array(4000039,1);
var matQtySet = new Array (100,1);
var costSet = new Array (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;
last_use = false;
if (selectedType == 3){ //claw refine
var itemSet = new Array (1472023,1472024,1472025);
var matSet = new Array(new Array (1472022,4011007,4021000,2012000),new Array (1472022,4011007,4021005,2012002),new Array (1472022,4011007,4021008,4000046));
var matQtySet = new Array (new Array (1,1,8,10),new Array (1,1,8,10),new Array (1,1,3,5));
var costSet = new Array (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)) {
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]))
complete = false;
}
else if (!cm.haveItem(mats, matQty))
complete = false;
/*if (mats instanceof Array) {
for (var i = 0; complete && i < mats.length; i++) {
if (matQty[i] * qty == 1) {
complete = cm.haveItem(mats[i]);
} else {
complete = cm.haveItem(mats[i], matQty[i] * qty);
}
}
} else {
complete = cm.haveItem(mats, matQty * qty);
}*/
}
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();
}
}

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.
*/
var status = 0;
var beauty = 0;
var price = 1000000;
var mface = Array(20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20012, 20014);
var fface = Array(21000, 21001, 21002, 21003, 21004, 21005, 21006, 21007, 21008, 21012, 21014);
var facenew = Array();
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("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#L1#I would like to buy a #b#t5152001##k for " + price + " mesos, please!#l\r\n\#L2#I already have a Coupon!#l");
} else if (status == 1) {
if (selection == 1) {
if(cm.getMeso() >= price) {
cm.gainMeso(-price);
cm.gainItem(5152001, 1);
cm.sendOk("Enjoy!");
} else
cm.sendOk("You don't have enough mesos to buy a coupon!");
cm.dispose();
} else if (selection == 2) {
facenew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mface.length; i++)
facenew.push(mface[i] + cm.getPlayer().getFace()% 1000 - (cm.getPlayer().getFace()% 100));
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fface.length; i++)
facenew.push(fface[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...");
}
}
}

View File

@@ -0,0 +1,91 @@
/*
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.
*/
var status = 0;
var beauty = 0;
var price = 1000000;
var mface = Array(20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20012, 20014);
var fface = Array(21000, 21001, 21002, 21003, 21004, 21005, 21006, 21007, 21008, 21012, 21014);
var facenew = Array();
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("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#L1#I would like to buy a #b#t5152000##k for " + price + " mesos, please!#l\r\n\#L2#I already have a Coupon!#l");
} else if (status == 1) {
if (selection == 1) {
if(cm.getMeso() >= price) {
cm.gainMeso(-price);
cm.gainItem(5152000, 1);
cm.sendOk("Enjoy!");
} else {
cm.sendOk("You don't have enough mesos to buy a coupon!");
}
cm.dispose();
} else if (selection == 2) {
facenew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mface.length; i++) {
facenew.push(mface[i] + cm.getPlayer().getFace()
% 1000 - (cm.getPlayer().getFace()
% 100));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fface.length; i++) {
facenew.push(fface[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...");
}
}
}
}

View File

@@ -0,0 +1,43 @@
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();
}
}

View File

@@ -0,0 +1,92 @@
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 City Subway#l\r\n#L1##bKerning square Shopping Center (Get on the subway)#l\n\n\r\n#L2#Enter Contruction Site#l\r\n#L3#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) {
cm.warp(103000101);
cm.dispose();
return;
} else if (selection == 1) {
var train = cm.getEventManager("KerningTrain");
train.newInstance("KerningTrain");
train.setProperty("player", cm.getPlayer().getName());
train.startInstance(cm.getPlayer());
cm.dispose();
return;
} else if (selection == 2) {
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();
return;
}
} else if (selection == 3) {
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();
return;
}
}
} else if (status == 2) {
if (hasTicket) {
ticketSelection = selection;
if (ticketSelection > -1) {
cm.gainItem(4031035 + ticketSelection, -1);
cm.warp(103000897 + (ticketSelection * 3));
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();
return;
}
}
}

View File

@@ -0,0 +1,33 @@
/*
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);
cm.dispose();
}

View File

@@ -0,0 +1,33 @@
/*
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);
cm.dispose();
}

View File

@@ -0,0 +1,33 @@
/*
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);
cm.dispose();
}

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/>.
*/
/* 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();
}
}
}

View File

@@ -0,0 +1,54 @@
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.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
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;
}
if (cm.getJobId() == 0) {
mesos = -cost[selectedMap] / 10;
} else {
mesos = -cost[selectedMap];
}
cm.gainMeso(mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

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();
}

View File

@@ -0,0 +1,110 @@
/*
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.
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair = Array(30030, 30020, 30000, 30130, 30350, 30190, 30110, 30180, 30050, 30040, 30160);
var fhair = Array(31050, 31040, 31000, 31060, 31090, 31020, 31130, 31120, 31140, 31330, 31010);
var hairnew = Array();
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("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#L0#I want to buy a coupon!#l\r\n#L1#Haircut: #i5150003##t5150003##l\r\n#L2#Dye your hair: #i5151003##t5151003##l");
} else if (status == 1) {
if (selection == 0) {
beauty = 0;
cm.sendSimple("Which coupon would you like to buy?\r\n#L0#Haircut for " + hairprice + " mesos: #i5150003##t5150003##l\r\n#L1#Dye your hair for " + haircolorprice + " mesos: #i5151003##t5151003##l");
} else if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair.length; i++)
hairnew.push(mhair[i] + parseInt(cm.getPlayer().getHair() % 10));
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair.length; i++)
hairnew.push(fhair[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++) {
haircolor.push(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(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!");
}
}
}
}

View File

@@ -0,0 +1,118 @@
/*
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.
*/
var status = 0;
var beauty = 0;
var hairprice = 1000000;
var haircolorprice = 1000000;
var mhair = Array(30130, 30350, 30190, 30110, 30180, 30050, 30040, 30160, 30770, 30620, 30550, 30520);
var fhair = Array(31060, 31090, 31020, 31130, 31120, 31140, 31330, 31010, 31520, 31440, 31750, 31620);
var hairnew = Array();
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("I'm Andre, Don's assistant. Everyone calls me Andre, though. If you have a #b#t5150011##k or a #b#t5151002##k, please let me change your hairdo!\r\n#L0#I want to buy a coupon!#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 = 0;
cm.sendSimple("Which coupon would you like to buy?\r\n#L0#Haircut for " + hairprice + " mesos: #i5150011##t5150011##l\r\n#L1#Dye your hair for " + haircolorprice + " mesos: #i5151002##t5151002##l");
} else if (selection == 1) {
beauty = 1;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair.length; i++) {
hairnew.push(mhair[i] + parseInt(cm.getPlayer().getHair()
% 10));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fhair.length; i++) {
hairnew.push(fhair[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#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++) {
haircolor.push(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 == 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!");
}
}
}
}
}

View File

@@ -0,0 +1,79 @@
var status = 0;
var section = 0;
importPackage(java.lang);
//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.forceStartQuest(29931);
cm.forceCompleteQuest(29931);
} else {
cm.sendOk("Please make room.");
}
}
cm.dispose();
} else if (status == 100) {
cm.warp(910320000,0);
cm.dispose();
}
}

View File

@@ -0,0 +1,73 @@
/*
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 rock = cm.getEventManager("RockSpirit");
rock.newInstance("RockSpirit");
rock.setProperty("player", cm.getPlayer().getName());
rock.startInstance(cm.getPlayer());
cm.dispose();
return;
} else {
cm.sendOk("I did not hear anything from Blake that you are assisting him.");
}
} else {
if (cm.isQuestCompleted(2291)) {
var rock = cm.getEventManager("VIPRockSpirit");
rock.newInstance("VIPRockSpirit");
rock.setProperty("player", cm.getPlayer().getName());
rock.startInstance(cm.getPlayer());
cm.dispose();
return;
} else {
cm.sendOk("#rVIP#k? Yeah that is funny #rMr. VIP#k, now get lost before I call security.");
}
}
cm.dispose();
}
}

View File

@@ -0,0 +1,221 @@
/*
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 = new Array("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array ("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 = new Array(1072051,1072053,1072052,1072003,1072039,1072040,1072041,1072002,1072112,1072113,1072000,1072126,1072127,1072132,1072133,1072134,1072135,1072147,1072148,1072149);
var matSet = new Array(new Array(4011004,4011001,4000021,4003000),new Array(4011006,4011001,4000021,4003000),new Array(4021008,4011001,4000021,4003000),new Array(4021003,4011001,4000021,4003000),new Array(4011002,4011001,4000021,4003000),
new Array(4011004,4011001,4000021,4003000),new Array(4021000,4011001,4000021,4003000),new Array(4011001,4021004,4000021,4000030,4003000),new Array(4011002,4021004,4000021,4000030,4003000),new Array(4021008,4021004,4000021,4000030,4003000),
new Array(4011003,4000021,4000030,4003000,4000033),new Array(4011005,4021007,4000030,4003000,4000042),new Array(4011002,4021007,4000030,4003000,4000041),new Array(4021008,4011001,4021003,4000030,4003000),
new Array(4021008,4011001,4011002,4000030,4003000),new Array(4021008,4011001,4011005,4000030,4003000),new Array(4021008,4011001,4011006,4000030,4003000),new Array(4021008,4011007,4021005,4000030,4003000),
new Array(4021008,4011007,4011005,4000030,4003000),new Array(4021008,4011007,4021000,4000030,4003000));
var matQtySet = new Array(new Array(2,1,15,10),new Array(2,1,15,10),new Array(1,2,20,10),new Array(4,2,45,15),new Array(4,2,45,15),new Array(4,2,45,15),new Array(4,2,45,15),new Array(3,1,30,20,25),new Array(3,1,30,20,25),new Array(2,1,30,20,25),
new Array(4,100,40,30,100),new Array(4,1,40,30,250),new Array(4,1,40,30,120),new Array(1,3,6,65,45),new Array(1,3,6,65,45),new Array(1,3,6,65,45),new Array(1,3,6,65,45),new Array(1,1,8,80,55),new Array(1,1,8,80,55),new Array(1,1,8,80,55));
var costSet = new Array(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 = new Array(1072027,1072034,1072069,1072079,1072080,1072081,1072082,1072083,1072101,1072102,1072103,1072118,1072119,1072120,1072121,1072122,1072123,1072124,1072125,1072144,1072145,1072146);
var matSet = new Array(new Array(4000021,4011000,4003000),new Array(4000021,4021003,4003000),new Array(4000021,4021000,4003000),new Array(4000021,4021000,4003000),new Array(4000021,4021005,4003000),new Array(4000021,4021003,4003000),
new Array(4000021,4021004,4003000),new Array(4000021,4021006,4003000),new Array(4021002,4021006,4000030,4000021,4003000),new Array(4021003,4021006,4000030,4000021,4003000),new Array(4021000,4021006,4000030,4000021,4003000),
new Array(4021000,4003000,4000030,4000024),new Array(4021006,4003000,4000030,4000027),new Array(4011003,4003000,4000030,4000044),new Array(4021002,4003000,4000030,4000009),new Array(4011001,4021006,4021008,4000030,4003000,4000033),
new Array(4011001,4021006,4021008,4000030,4003000,4000032),new Array(4011001,4021006,4021008,4000030,4003000,4000041),new Array(4011001,4021006,4021008,4000030,4003000,4000042),new Array(4011006,4021000,4021007,4000030,4003000),
new Array(4011006,4021005,4021007,4000030,4003000),new Array(4011006,4021003,4021007,4000030,4003000));
var matQtySet = new Array(new Array(35,3,10),new Array(35,1,10),new Array(35,1,10),new Array(50,2,15),new Array(50,2,15),new Array(50,2,15),new Array(50,2,15),new Array(50,2,15),
new Array(3,1,15,30,20),new Array(3,1,15,30,20),new Array(3,1,15,30,20),new Array(4,30,45,20),new Array(4,30,45,20),new Array(5,30,45,40),new Array(5,30,45,120),
new Array(3,3,1,60,35,80),new Array(3,3,1,60,35,150),new Array(3,3,1,60,35,100),new Array(3,3,1,60,35,250),new Array(5,8,1,75,50),new Array(5,8,1,75,50),new Array(5,8,1,75,50));
var costSet = new Array(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 = new Array(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 = new Array(new Array(4021005,4000021,4003000),new Array(4021001,4000021,4003000),new Array(4021000,4000021,4003000),new Array(4011004,4000021,4003000),new Array(4021006,4000021,4003000),new Array(4021004,4000021,4003000),
new Array(4021000,4000021,4003000),new Array(4021002,4000021,4003000),new Array(4011004,4000021,4003000),new Array(4021008,4000021,4003000),new Array(4021001,4021006,4000021,4000030,4003000),new Array(4021000,4021006,4000021,4000030,4003000),
new Array(4021008,4021006,4000021,4000030,4003000),new Array(4021000,4000030,4000043,4003000),new Array(4021005,4000030,4000037,4003000),new Array(4011006,4021007,4000030,4000027,4003000),new Array(4021008,4021007,4000030,4000014,4003000),
new Array(4021009,4011006,4021000,4000030,4003000),new Array(4021009,4011006,4021005,4000030,4003000),new Array(4021009,4011006,4021001,4000030,4003000),new Array(4021009,4011006,4021003,4000030,4003000),
new Array(4021009,4011006,4011005,4000030,4003000),new Array(4021009,4011006,4021003,4000030,4003000),new Array(4021009,4011006,4011003,4000030,4003000),new Array(4021009,4011006,4021002,4000030,4003000));
var matQtySet = new Array(new Array(1,30,5),new Array(1,30,5),new Array(1,30,5),new Array(1,35,10),new Array(1,35,10),new Array(1,35,10),new Array(2,50,15),new Array(2,50,15),new Array(2,50,15),
new Array(1,50,15),new Array(3,1,30,15,20),new Array(3,1,30,15,20),new Array(2,1,40,25,20),new Array(4,40,35,25),new Array(4,40,70,25),new Array(2,1,40,20,25),new Array(2,1,40,30,30),
new Array(1,3,3,60,40),new Array(1,3,3,60,40),new Array(1,3,3,60,40),new Array(1,3,3,60,40),new Array(1,4,5,70,50),new Array(1,4,5,70,50),new Array(1,4,5,70,50),new Array(1,4,5,70,50));
var costSet = new Array(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 = new Array(1072084,1072085,1072086,1072087,1072032,1072033,1072035,1072036,1072104,1072105,1072106,1072107,1072108,1072109,1072110,1072128,1072130,1072129,1072131,1072150,1072151,1072152);
var matSet = new Array(new Array(4021005,4000021,4003000),new Array(4021000,4000021,4003000),new Array(4021003,4000021,4003000),new Array(4021004,4000021,4003000),new Array(4011000,4000021,4003000),new Array(4011001,4000021,4003000),new Array(4011004,4000021,4003000),new Array(4011006,4000021,4003000),new Array(4021000,4021004,4000021,4000030,4003000),new Array(4021003,4021004,4000021,4000030,4003000),new Array(4021002,4021004,4000021,4000030,4003000),new Array(4021000,4000030,4000033,4003000),new Array(4021003,4000030,4000032,4003000),new Array(4021006,4000030,4000040,4003000),new Array(4021005,4000030,4000037,4003000),new Array(4011007,4021005,4000030,4000037,4003000),new Array(4011007,4021000,4000030,4000043,4003000),new Array(4011007,4021003,4000030,4000045,4003000),new Array(4011007,4021001,4000030,4000036,4003000),new Array(4021008,4011007,4021005,4000030,4003000),new Array(4021008,4011007,4011005,4000030,4003000),new Array(4021008,4011007,4021000,4000030,4003000));
var matQtySet = new Array(new Array(1,35,10),new Array(1,35,10),new Array(1,35,10),new Array(1,35,10),new Array(3,50,15),new Array(3,50,15),new Array(2,50,15),new Array(2,50,15),new Array(3,1,30,15,20),new Array(3,1,30,15,20),new Array(3,1,30,15,20),
new Array(5,45,50,30),new Array(4,45,30,30),new Array(4,45,3,30),new Array(4,45,70,30),new Array(2,3,50,200,35),new Array(2,3,50,150,35),new Array(2,3,50,80,35),new Array(2,3,50,80,35),new Array(1,1,8,75,50),new Array(1,1,5,75,50),new Array(1,1,1,75,50));
var costSet = new Array(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)) {
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 (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++) {
if (matQty[i] == 1) {
if (!cm.haveItem(mats[i]))
complete = false;
}
else {
if (!cm.haveItem(mats[i],matQty[i] * selection)) complete=false;
}
}
}
else {
if (!cm.haveItem(mats,matQty * selection)) 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();
}
}

View File

@@ -0,0 +1,67 @@
/*
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))
zones = 3;
else if (cm.isQuestStarted(2053))
zones = 2;
else if (cm.isQuestStarted(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();
}
}
}

View File

@@ -0,0 +1,30 @@
/*
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();
}

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();
}

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/>.
*/
/* Door of Dimension
Enter 3rd job event
*/
function start() {
if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)) {
if (cm.getPlayer().getMapId() == 105070001 && (cm.getJobId() >= 110 && cm.getJobId() <= 130))
cm.warp(108010300);
else if (cm.getPlayer().getMapId() == 105040305 && (cm.getJobId() >= 310 && cm.getJobId() <= 320))
cm.warp(108010100);
else if (cm.getPlayer().getMapId() == 100040106 && (cm.getJobId() >= 210 && cm.getJobId() <= 230))
cm.warp(108010200);
else if (cm.getPlayer().getMapId() == 107000402 && (cm.getJobId() >= 410 && cm.getJobId() <= 420))
cm.warp(108010400);
else if (cm.getPlayer().getMapId() == 105070200 && (cm.getJobId() >= 510 && cm.getJobId() <= 520))
cm.warp(108010500);
}
cm.dispose();
/*20 minutes*/
}
/*
1061010 - Crystal NPC
*/
/*var em = cm.getEventManager("3rdjob");
if (em == null)
cm.sendOk("Sorry, but 3rd job advancement is closed.");
else
em.newInstance(cm.getPlayer().getName()).registerPlayer(cm.getPlayer());
*/

View File

@@ -0,0 +1,34 @@
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){
if(cm.getMapId() == 108010101)cm.getPlayer().changeMap(105040305);
if(cm.getMapId() == 108010201)cm.getPlayer().changeMap(100040106);
if(cm.getMapId() == 108010301)cm.getPlayer().changeMap(105070001);
if(cm.getMapId() == 108010401)cm.getPlayer().changeMap(107000402);
if(cm.getMapId() == 108010501)cm.getPlayer().changeMap(105040305);
var em = cm.getEventManager("3rdjob");
em.getInstance(cm.getPlayer().getName()).unregisterPlayer(cm.getPlayer());
cm.dispose();
}
}
}

View File

@@ -0,0 +1,87 @@
/*/*
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 FateJiki
//@Author Even (modifier)
importPackage(Packages.server.expeditions);
importPackage(Packages.tools);
importPackage(Packages.scripting.event);
var status = 0;
var expedition;
var player;
var em;
var barlog_easy = MapleExpeditionType.BALROG_EASY;
var barlog_hard = MapleExpeditionType.BALROG_HARD;
function start(){
status = 0;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode <= 0) {
cm.dispose();
} else if (status == 0) {
cm.sendNext("Hi there. I am #b#nMu Young#n#k, the temple Keeper.");
status++;
} else if (BalrogPQ.partyLeader == "undefined") {
if (status == 1) {
var text = "This temple is currently under siege by the Balrog troops. We currently do not know who gave the orders. " +
"For a few weeks now, the #e#b Order of the Altair#n#k has been sending mercenaries, but they were eliminated every time." +
" So, traveler, would you like to try your luck at defeating this unspeakable horror? \r\n\r\n " +
"#L0#Yes. Please register me as party leader\r\n#L1#What is the #eOrder of the Altair?";
cm.sendSimple(text);
status++;
} else if (selection == 0) {
if (cm.getPlayer().getLevel() >= 70) {
BalrogPQ.partyLeader = cm.getPlayer().getName();
cm.sendOk("Success. Your name has been registered and you may enter the battlefield. Come speak to me when you're ready!");
cm.getPlayer().getMap().broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(0, cm.getPlayer().getName() + " is currently fighting the balrog on CH" + cm.getPlayer().getClient().getChannel() + ". To join, do @balrogpq."))
BalrogPQ.open(cm.getPlayer());
cm.dispose();
} else if (cm.getPlayer().getLevel() < 70) {
cm.sendOk("You must be at least level 70 to even consider battling the monster.");
cm.dispose();
}
} else if (selection == 1) {
cm.sendOk("The Order of the Altair is a group of elite mercenaries that oversee the world's economy and battle operations. It was founded 40 years ago right after Black Mage was defeated in hopes of forseeing the next possible attack.");
cm.dispose();
} else if (status == 3) {
cm.warp(105100300);
cm.dispose();
}
} else {
if (status == 1) {
cm.sendYesNo(BalrogPQ.partyLeader + "'s party is currently battling the Balrog. Would you like to assist?");
status++;
} else if(status == 2){
if (cm.getPlayer().getLevel() > 60 && cm.getPlayer().getClient().getChannel() == BalrogPQ.channel){
cm.warp(105100300);
cm.dispose();
} else {
cm.sendOk("You may not battle the balrog when you are below Lv60! \r\n\r\n Or maybe you are not on the right channel.. Try CH" + BalrogPQ.channel + ".");
cm.dispose();
}
}
}
}

View File

@@ -0,0 +1,81 @@
/*
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 --------------------------------------------------------------------------------
Hotel Receptionist - Sleepywood Hotel(105040400)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.3 - More Cleanup by Moogra (12/17/09)
1.2 - Cleanup and Statement fix by Moogra
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var regcost = 499;
var vipcost = 999;
var iwantreg = 0;
function start() {
cm.sendNext("Welcome. We're the Sleepywood Hotel. Our hotel works hard to serve you the best at all times. If you are tired and worn out from hunting, how about a relaxing stay at our hotel?");
}
function action(mode, type, selection) {
if (mode == -1 || (mode == 0 && status == 1))
cm.dispose();
else {
if (mode == 0 && status == 2) {
cm.sendNext("We offer other kinds of services, too, so please think carefully and then make your decision.");
cm.dispose();
return;
}
status++;
if (status == 1) {
cm.sendSimple("We offer two kinds of rooms for our service. Please choose the one of your liking.\r\n#b#L0#Regular sauna (" + regcost + " mesos per use)#l\r\n#L1#VIP sauna (" + vipcost + " mesos per use)#l");
iwantreg = 1;
} else if (status == 2) {
if (selection == 0)
cm.sendYesNo("You have chosen the regular sauna. Your HP and MP will recover fast and you can even purchase some items there. Are you sure you want to go in?");
else if (selection == 1) {
cm.sendYesNo("You've chosen the VIP sauna. Your HP and MP will recover even faster than that of the regular sauna and you can even find a special item in there. Are you sure you want to go in?");
iwantreg = 0;
}
} else if (status == 3) {
if (iwantreg == 1) {
if (cm.getMeso() >= regcost) {
cm.warp(105040401);
cm.gainMeso(-regcost);
} else
cm.sendNext("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + regcost + "mesos to stay at our hotel.");
} else {
if (cm.getMeso() >= vipcost) {
cm.warp(105040402);
cm.gainMeso(-vipcost);
} else
cm.sendNext("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + vipcost + "mesos to stay at our hotel.");
}
cm.dispose();
}
}
}

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/>.
*/
/* John JQ Flower pile #1
*/
function start() {
var prizes = Array(1040051, 1040127, 1040128, 1040133, 1040138, 1041000, 1041001, 1041110, 1041130, 1041139, 1042015, 1042017, 1042023, 1702001, 1702025);
var chances = Array(10, 10, 10, 10, 5, 10, 10, 10, 10, 5, 8, 8, 8, 9, 7);
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(2052))
cm.gainItem(4031025,10);
else cm.gainItem(prizes[choice],1);
cm.warp(105040300, 0);
cm.dispose();
}

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 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/>.
*/
/* John JQ Flower pile #2
*/
function start() {
var prizes = Array(1060034, 1060040, 1060049, 1060113, 1060121, 1061000, 1061001, 1061073, 1061089, 1061142, 1062010, 1062020, 1702140, 1702115);
var chances = Array(10, 10, 10, 10, 5, 10, 10, 10, 10, 5, 8, 8, 8, 8);
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(2053))
cm.gainItem(4031026,20);
else cm.gainItem(prizes[choice],1);
cm.warp(105040300, 0);
cm.dispose();
}

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 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/>.
*/
// John JQ Flower pile #3
function start() {
var prizes = Array(1050004, 1050015, 1050041, 1050044, 1050124, 1051021, 1051036, 1051075, 1051111, 1051138, 1052003, 1052006, 1052011, 1702024, 1702026);
var chances = Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 8, 8);
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(2054))
cm.gainItem(4031028,30);
else cm.gainItem(prizes[choice],1);
cm.warp(105040300, 0);
cm.dispose();
}

View File

@@ -0,0 +1,69 @@
/*
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/>.
*/
/* Warrior Job Instructor
Warrior 2nd Job Advancement
Victoria Road : West Rocky Mountain IV (102020300)
*/
var status = 0;
function start() {
if (cm.isQuestCompleted(100004)) {
cm.sendOk("You're truly a hero!");
cm.dispose();
} else if (cm.isQuestStarted(100003)) {
cm.completeQuest(100003);
cm.sendNext("Hmmm...it is definitely the letter from #bDances with Balrog#k...so you came all the way here to take the test and make the 2nd job advancement as the warrior. Alright, I'll explain the test to you. Don't sweat it too much, it's not that complicated.");
} else {
cm.sendOk("I can show you the way once your ready for it.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0 && cm.isQuestStarted(100003))
status = 5;
else if (status == 1)
cm.sendNextPrev("I'll send you to a hidden map. You'll see monsters you don't normally see. They look the same like the regular ones, but with a totally different attitude. They neither boost your experience level nor provide you with item.");
else if (status == 2)
cm.sendNextPrev("You'll be able to acquire a marble called #b#t4031013##k while knocking down those monsters. It is a special marble made out of their sinister, evil minds. Collect 30 of those, and then go talk to a colleague of mine in there. That's how you pass the test.");
else if (status == 3)
cm.sendYesNo("Once you go inside, you can't leave until you take care of your mission. If you die, your experience level will decrease..so you better really buckle up and get ready...well, do you want to go for it now?");
else if (status == 4)
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
cm.startQuest(100004);
cm.gainItem(4031008, -1);
else if (status == 5) {
cm.warp(108000300, 0);
cm.dispose();
} else {
cm.dispose();
}
}
}

View File

@@ -0,0 +1,69 @@
/*
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/>.
*/
/* Magician Job Instructor
Magician 2nd Job Advancement
Victoria Road : The Forest North of Ellinia (101020000)
*/
var status = 0;
function start() {
if (cm.isQuestCompleted(100007)) {
cm.sendOk("You're truly a hero!");
cm.dispose();
} else if (cm.isQuestStarted(100006)) {
cm.completeQuest(100006);
cm.sendNext("Hmmm...it is definitely the letter from #bGrendell the Really Old#k...so you came all the way here to take the test and make the 2nd job advancement as a magician. Alright, I'll explain the test to you. Don't sweat it too much, it's not that complicated.")
} else {
cm.sendOk("I can show you the way once your ready for it.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0 && cm.isQuestStarted(100007))
status = 5;
else if (status == 1)
cm.sendNextPrev("I'll send you to a hidden map. You'll see monsters you don't normally see. They look the same like the regular ones, but with a totally different attitude. They neither boost your experience level nor provide you with item.");
else if (status == 2)
cm.sendNextPrev("You'll be able to acquire a marble called #b#t4031013##k while knocking down those monsters. It is a special marble made out of their sinister, evil minds. Collect 30 of those, and then go talk to a colleague of mine in there. That's how you pass the test.");
else if (status == 3)
cm.sendYesNo("Once you go inside, you can't leave until you take care of your mission. If you die, your experience level will decrease.. So you better really buckle up and get ready...well, do you want to go for it now?");
else if (status == 4) {
cm.sendNext("Alright I'll let you in! Defeat the monsters inside, collect 30 Dark Marbles, then strike up a conversation with a colleague of mine inside. He'll give you #bThe Proof of a Hero#k, the proof that you've passed the test. Best of luck to you.");
cm.startQuest(100007);
cm.gainItem(4031009, -1);
}
else if (status == 5) {
cm.warp(108000200, 0);
cm.dispose();
}
else cm.dispose();
}
}

View File

@@ -0,0 +1,68 @@
/*
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/>.
*/
/* Bowman Job Instructor
Hunter Job Advancement
Warning Street : The Road to the Dungeon (106010000)
*/
var status = 0;
function start() {
if (cm.isQuestCompleted(100001)) {
cm.sendOk("You're truly a hero!");
cm.dispose();
} else if (cm.isQuestStarted(100000)) {
cm.completeQuest(100000);
cm.sendNext("Oh, isn't this a letter from #bAthena#k?");
} else {
cm.sendOk("I can show you the way once your ready for it.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0 && cm.isQuestStarted(100001))
status = 4;
if (status == 1)
cm.sendNextPrev("So you want to prove your skills? Very well...")
else if (status == 2)
cm.sendAcceptDecline("I will give you a chance if you're ready.");
else if (status == 3) {
cm.startQuest(100001);
cm.gainItem(4031010, -1);
cm.sendOk("You will have to collect me #b30 #t4031013##k. Good luck.")
} else if (status == 4) {
cm.warp(108000100);
cm.dispose();
}
else {
cm.dispose();
}
}
}

View File

@@ -0,0 +1,68 @@
/*
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/>.
*/
/* Thief Job Instructor
Thief 2nd Job Advancement
Victoria Road : Construction Site North of Kerning City (102040000)
*/
var status = 0;
function start() {
if (cm.isQuestCompleted(100010)) {
cm.sendOk("You're truly a hero!");
cm.dispose();
} else if (cm.isQuestStarted(100009)) {
cm.completeQuest(100009);
cm.sendNext("Oh, isn't this a letter from the #bDark Lord#k?");
} else {
cm.sendOk("I can show you the way once your ready for it.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0 && cm.isQuestStarted(100010))
status = 4;
if (status == 1)
cm.sendNextPrev("So you want to prove your skills? Very well...")
else if (status == 2)
cm.sendAcceptDecline("I will give you a chance if you're ready.");
else if (status == 3) {
cm.sendOk("You will have to collect me #b30 #t4031013##k. Good luck.")
cm.startQuest(100010);
cm.gainItem(4031011, -1);
} else if (status == 4) {
cm.warp(108000400, 0);
cm.dispose();
}
else {
cm.dispose();
}
}
}

View File

@@ -0,0 +1,39 @@
/*
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/>.
*/
function start() {
if (cm.haveItem(4031013,30)) {
cm.removeAll(4031013);
cm.completeQuest(100004);
cm.startQuest(100005);
cm.gainItem(4031012);
cm.sendNext("Ohhhhh.. you collected all 30 Dark Marbles!! It should have been difficult... just incredible! Alright. You've passed the test and for that, I'll reward you #bThe Proof of a Hero#k. Take that and go back to Perion.");
} else {
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode > 0)
cm.warp(102020300, 0);
cm.dispose();
}

View File

@@ -0,0 +1,39 @@
/*
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/>.
*/
function start() {
if (cm.haveItem(4031013,30)) {
cm.removeAll(4031013);
cm.completeQuest(100007);
cm.startQuest(100008);
cm.gainItem(4031012);
cm.sendNext("Ohhhhh.. you collected all 30 Dark Marbles!! It should have been difficult.. just incredible! Alright. You've passed the test and for that, I'll reward you #bThe Proof of a Hero#k. Take that and go back to Ellinia.");
} else {
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode > 0)
cm.warp(101020000, 1);
cm.dispose();
}

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 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 --------------------------------------------------------------------------------
Bowman Job Instructor - Ant Tunnel For Bowman (108000100)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.2 - Clean up by Moogra
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
**/
function start() {
if (cm.haveItem(4031013,30)) {
cm.removeAll(4031013);
cm.completeQuest(100001);
cm.startQuest(100002);
cm.gainItem(4031012);
cm.sendOk("You're a true hero! Take this and Athena will acknowledge you.");
} else {
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l")
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode > 0)
cm.warp(106010000, 1);
cm.dispose();
}

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 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 --------------------------------------------------------------------------------
Thief Job Instructor - Thief's Construction Site (108000400)
-- By ---------------------------------------------------------------------------------------------
Unknown
-- Version Info -----------------------------------------------------------------------------------
1.1 - Statement fix [Information]
1.0 - First Version by Unknown
---------------------------------------------------------------------------------------------------
*/
function start() {
if (cm.haveItem(4031013,30)) {
cm.removeAll(4031013);
cm.completeQuest(100010);
cm.startQuest(100011);
cm.gainItem(4031012);
cm.sendOk("You're a true hero! Take this and the Dark Lord will acknowledge you.");
} else {
cm.sendSimple("You will have to collect me #b30 #t4031013##k. Good luck. \r\n#b#L1#I would like to leave#l")
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode == 1)
cm.warp(102040000, 0);
cm.dispose();
}

View File

@@ -0,0 +1,40 @@
/**
Author: xQuasar
NPC: Kyrin - Pirate Job Advancer
Inside Test Room
**/
var status;
function start() {
status = -1;
action(1,0,0);
}
function action(mode,type,selection) {
if (status == -1) {
if (cm.getMapId() == 108000502) {
if (!(cm.haveItem(4031856,15))) {
cm.sendNext("Go, and get me 15 #bPotent Wind Crystals#k.");
cm.dispose();
} else {
status = 2;
cm.sendNext("Wow, you have brought me 15 #bPotent Wind Crystals#k! Congratulations. Let me warp you out now.");
}
} else if (cm.getMapId() == 108000501) {
if (!(cm.haveItem(4031857,15))) {
cm.sendNext("Go, and get me 15 #bPotent Power Crystals#k.");
cm.dispose();
} else {
status = 2;
cm.sendNext("Wow, you have brought me 15 #bPotent Power Crystals#k! Congratulations. Let me warp you out now.");
}
} else {
cm.sendNext("Error. Please report this.");
cm.dispose();
}
} else if (status == 2) {
cm.warp(120000101,0);
cm.dispose();
}
}

View File

@@ -0,0 +1,60 @@
/*
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 --------------------------------------------------------------------------------
Pison - Florina Beach(110000000)
-- By ---------------------------------------------------------------------------------------------
Information & Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.2 - Fixed and cleanup [Shootsource]
1.1 - Add null map check [Xterminator]
1.0 - First Version
---------------------------------------------------------------------------------------------------
**/
var status = 0;
var returnmap;
function start() {
returnmap = cm.getPlayer().getSavedLocation("FLORINA");
if (returnmap == -1)
returnmap = 104000000;
cm.sendNext("So you want to leave #b#m110000000##k? If you want, I can take you back to #b#m"+returnmap+"##k.");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
return;
} else if (mode == 0) {
cm.sendNext("You must have some business to take care of here. It's not a bad idea to take some rest at #m"+returnmap+"# Look at me; I love it here so much that I wound up living here. Hahaha anyway, talk to me when you feel like going back.");
cm.dispose();
return;
} else if (mode == 1) {
status++;
if (status == 1)
cm.sendYesNo("Are you sure you want to return to #b#m"+returnmap+"##k? Alright, we'll have to get going fast. Do you want to head back to #m"+returnmap+"# now?")
else {
cm.warp(returnmap);
cm.dispose();
}
}
}

View File

@@ -0,0 +1,168 @@
/*
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/>.
*/
/* Kyrin
Pirate Job Advancement
Custom Quest 100009, 100011
*/
status = -1;
actionx = {"1stJob" : false, "2ndjob" : false, "2ndjobT" : false, "3thJobI" : false, "3thJobC" : false};
job = 510;
function start() {
if (cm.getJobId() == 0) {
actionx["1stJob"] = true;
if (cm.getLevel() >= 10)
cm.sendNext("Want to be a pirate? There are some standards to meet. because we can't just accept EVERYONE in... #bYour level should be at least 10#k. Let's see.");
else {
cm.sendOk("Train a bit more and I can show you the way of the #rPirate#k.");
cm.dispose();
}
} else if (cm.getLevel() >= 30 && cm.getJobId() == 500) {
actionx["2ndJob"] = true;
if (cm.isQuestCompleted(2191) || cm.isQuestCompleted(2192))
cm.sendNext("I see you have done well. I will allow you to take the next step on your long road.");
else
cm.sendNext("The progress you have made is astonishing.");
} else if (actionx["3thJobI"] || (cm.getPlayer().gotPartyQuestItem("JB3") && cm.getLevel() >= 70 && cm.getJobId() % 10 == 0 && parseInt(cm.getJobId() / 100) == 5 && !cm.getPlayer().gotPartyQuestItem("JBP"))){
actionx["3thJobI"] = true;
cm.sendNext("There you are. A few days ago, #b#p2020013##k of Ossyria talked to me about you. I see that you are interested in making the leap to the world of the third job advancement for pirates. To archieve that goal, I will have to test your strength in order to see whether you are worthy of the advancement. There is an opening in the middle of a cave on Victoria Island, where it'll lead you to a secret passage. Once inside, you'll face a clone of myself. Your task is to defeat him and bring #b#t4031059##k back with you.");
} else if (cm.getPlayer().gotPartyQuestItem("JBP") && !cm.haveItem(4031059)){
cm.sendNext("Please, bring me the #b#t4031059##k.");
cm.dispose();
} else if (cm.haveItem(4031059) && cm.getPlayer().gotPartyQuestItem("JBP")){
actionx["3thJobC"] = true;
cm.sendNext("Nice work. You have defeated my clone and brought #b#t4031059##k back safely. You have now proven yourself worthy of the 3rd job advancement from the physical standpoint. Now you should give this necklace to #b#p2020013##k in Ossyria to take on the second part of the test. Good luck. You'll need it.");
} else {
cm.sendOk("You have chosen wisely.");
cm.dispose();
}
}
function action(mode, type, selection) {
status++;
if (mode == 0 && type != 1)
status -= 2;
if (status == -1){
start();
return;
} else if (mode != 1 || status == 7 && type != 1 || (actionx["1stJob"] && status == 4) || (cm.haveItem(4031008) && status == 2) || (actionx["3thJobI"] && status == 1)){
if (mode == 0 && status == 2 && type == 1)
cm.sendOk("You know there is no other choice...");
if (!(mode == 0 && type != 1)){
cm.dispose();
return;
}
}
if (actionx["1stJob"]){
if (status == 0)
cm.sendYesNo("Oh...! You look like someone that can definitely be a part of us... all you need is a little slang, and... yeah... so, what do you think? Wanna be the Pirate?");
else if (status == 1){
if (cm.canHold(2070000) && cm.canHold(1472061)){
if (cm.getJobId() == 0){
cm.changeJobById(500);
cm.gainItem(1492000, 1);
cm.gainItem(1482000, 1);
cm.gainItem(2330000, 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("One more warning. Once you have chosen, you (Incomplete)");
} else if(actionx["2ndJob"]){
if (status == 0){
if (cm.isQuestCompleted(2191) || cm.isQuestCompleted(2192))
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 Brawler is all about.\r\n#L1#Please explain to me what being the Gunslinger 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.");
} else if (status == 1){
if (!cm.isQuestCompleted(2191) && !cm.isQuestCompleted(2192)){
// Pirate works differently from the other jobs. It warps you directly in.
actionx["2ndJobT"] = true;
cm.sendYesNo("Would you like to take the test now?");
} else {
if (selection < 3) {
cm.sendNext("Not done.");
status -= 2;
} else
cm.sendNextPrev("You have a long road ahead of you still, but being a pirate will help you get there. Just keep that in mind and you will do fine.");
}
} else if (status == 2){
if (actionx["2ndJobT"]) {
var map = 0;
if(cm.isQuestStarted(2191))
map = 108000502;
else
map = 108000501;
if(cm.getPlayerCount(map) > 0) {
cm.sendOk("All the training maps are currently in use. Please try again later.");
cm.dispose();
} else {
cm.warp(map);
cm.dispose();
return;
}
} else {
if(cm.isQuestCompleted(2191))
job = 510;
else if(cm.isQuestCompleted(2192))
job = 520;
cm.sendYesNo("So you want to make the second job advancement as the " + (job == 510 ? "#bBrawler#k" : "#bGunslinger#k") + "? You know you won't be able to choose a different job for the 2nd job advancement once you make your decision here, right?");
}
} else if (status == 3){
if (cm.haveItem(4031012))
cm.gainItem(4031012, -1);
if(job == 510) cm.sendNext("From here on out, you are a #bBrawler#k. Brawlers rule the world with the power of their bare fists...which means they need to train their body more than others. If you have any trouble training, I'll be more than happy to help.");
else cm.sendNext("From here on out, you are a #bGunslinger#k. Gunslingers are notable for their long-range attacks with sniper-like accuracy and of course, using Guns as their primary weapon. You should continue training to truly master your skills. If you are having trouble training, I'll be here to help.");
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 == 510 ? "brawler" : "gunslinger") + ". 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 bottom left 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 == 510 ? "Brawlers" : "Gunslingers") + " need to be strong. But remember that you can't abuse that power and use it on a weaking. 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();
}
}

View File

@@ -0,0 +1,201 @@
/*
Serryl (1091003)
Location: The Nautilus
*/
/**
Author: xQuasar
*/
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 = "What? You want to make your own weapons and gloves? Seriously... it's tough to do it by yourself if you don't have experience... I'll help you out. I've been a pirate for 20 years, and for 20 years I have made various items for the crew here. It's easy for me.";
var options = new Array("Make a Knuckler","Make a Gun","Make a pair of gloves");
for (var i = 0; i < options.length; i++){
selStr += "\r\n#b#L" + i + "# " + options[i] + "#l#k";
}
cm.sendSimple(selStr);
}
else if (status == 1 && mode == 1) {
selectedType = selection;
if (selectedType == 0){ //Making a Knuckler
var selStr = "As long as you bring in the materials required, I'll make you a fine Knuckler. Which Knuckler would you like to make?";
var knucklers = new Array("Leather Arms (Level limit: 15, Pirate)", "Double Tail Knuckler (Level limit: 20, Pirate)", "Norman Grip (Level limit: 25, Pirate)", "Prime Hands (Level limit: 30, Pirate)", "Silver Maiden (Level limit: 35, Pirate)", "Neozard (Level limit: 40, Pirate)", "Fury Claw (Level limit: 50, Pirate)");
for (var i = 0; i < knucklers.length; i++){
selStr += "\r\n#b#L" + i + "# " + knucklers[i] + "#l#k";
}
equip = true;
cm.sendSimple(selStr);
}
else if (selectedType == 1){ //Making a Gun
var selStr = "As long as you bring in the materials required, I'll make you a fine Gun. Which Gun would you like to make?";
var guns = new Array("Dellinger Special (Level limit: 15, Pirate)", "The Negotiator (Level limit: 20, Pirate)", "Golden Hook (Level limit: 25, Pirate)", "Cold Mind (Level limit: 30, Pirate)", "Shooting Star (Level limit: 35, Pirate)", "Lunar Shooter (Level limit: 40, Pirate)", "Mr. Rasfelt (Level limit: 50, Pirate)");
for (var i = 0; i < guns.length; i++){
selStr += "\r\n#b#L" + i + "# " + guns[i] + "#l#k";
}
equip = true;
cm.sendSimple(selStr);
}
else if (selectedType == 2){ //Making a pair of pirate gloves
var selStr = "As long as you bring in the materials required, I'll make you a fine glove. Which glove would you like to make?";
var gloves = new Array ("Green Lagger Halfglove","Brown Leather Armour Glove","Hard Leather Glove","Yellow Tartis","Brown Jewelled","Brown Barbee","Brown Royce","Black Schult");
for (var i = 0; i < gloves.length; i++){
selStr += "\r\n#b#L" + i + "# " + gloves[i] + "#l#k";
}
equip = true;
cm.sendSimple(selStr);
}
if (equip)
status++;
}
else if (status == 3 && mode == 1) {
if (equip)
{
selectedItem = selection;
qty = 1;
}
else
qty = selection;
if (selectedType == 0){ //Making a Knuckler
var itemSet = new Array(1482001, 1482002, 1482003, 1482004, 1482005, 1482006, 1482007);
var matSet = new Array(4000021, new Array(4011001,4011000,4000021,4003000), new Array(4011000,4011001,4003000), new Array(4011000,4011001,4000021,4003000), new Array(4011000,4011001,4000021,4003000), new Array(4011000,4011001,4021000,4000021,4003000), new Array(4000039,4011000,4011001,4000030,4000021,4003000));
var matQtySet = new Array(20, new Array(1,1,10,5), new Array(2,1,10), new Array(1,1,30,10), new Array(2,2,30,20), new Array(1,1,2,50,20), new Array(150,1,2,20,20,20));
var costSet = new Array(1000,2000,5000,15000,30000,50000,100000);
var levelLimitSet = new Array(15,20,25,30,35,40,50);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
levelLimit = levelLimitSet[selectedItem];
}
else if (selectedType == 1){ //Making a Gun
var itemSet = new Array(1492001, 1492002, 1492003, 1492004, 1492005, 1492006, 1492007);
var matSet = new Array(new Array(4011000,4003000,4003001), new Array(4011000,4003000,4003001,4000021), new Array(4011000,4003000), new Array(4011001,4000021,4003000), new Array(4011006,4011001,4000021,4003000), new Array(4011004,4011001,4000021,4003000), new Array(4011006,4011004,4011001,4000030,4003000));
var matQtySet = new Array(new Array(1,5,1), new Array(1,10,5,10), new Array(2,10), new Array(2,10,10), new Array(10,2,5,10), new Array(1,2,10,20), new Array(1,2,4,30,30));
var costSet = new Array (1000,2000,5000,15000,30000,50000,100000);
var levelLimitSet = new Array(15,20,25,30,35,40,50);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
levelLimit = levelLimitSet[selectedItem];
}
else if (selectedType == 2){ //Making a pair of pirate gloves
var itemSet = new Array(1082180, 1082183, 1082186, 1082189, 1082192, 1082195, 1082198, 1082201);
var matSet = new Array(new Array(4000021,4021003),4000021,new Array(4011000,4000021),new Array(4021006,4000021,4003000),new Array(4011000,4000021,4003000),new Array(4000021,4011000,4011001,4003000),new Array(4011000,4000021,4000030,4003000),new Array(4011007,4021008,4021007,4000030,4003000));
var matQtySet = new Array(new Array(15,1),35,new Array(2,20),new Array(2,50,10),new Array(3,60,15),new Array(80,3,3,25),new Array(3,20,40,30),new Array(1,1,1,50,50));
var costSet = new Array(1000,8000,15000,25000,30000,40000,50000,70000);
var levelLimitSet = new Array(15,20,25,30,35,40,50,60);
item = itemSet[selectedItem];
mats = matSet[selectedItem];
matQty = matQtySet[selectedItem];
cost = costSet[selectedItem];
levelLimit = levelLimitSet[selectedItem];
}
prompt = "Making one #t" + item + "# requires the items listed below. The level limit for this item is " + levelLimit + ", so check and make sure you really need this item before getting it. What do you think? Do you really want one?\r\n";
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 pass = true;
if(!cm.canHold(item)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
}
else if (cm.getMeso() < cost * qty)
{
cm.sendNext("Check and make sure you have all the necessary items to make this. Also, make sure your Equips inventory has room. I can't give you the item if your inventory is full, you know.");
cm.dispose();
return;
}
else
{
if (mats instanceof Array) {
for(var i = 0; pass && i < mats.length; i++)
if (!cm.haveItem(mats[i], matQty[i]))
pass = false;
}
else if (!cm.haveItem(mats, matQty))
pass = false;
/*if (mats instanceof Array) {
for(var i = 0; pass && i < mats.length; i++)
{
if (matQty[i] * qty == 1) {
if (!cm.haveItem(mats[i]))
{
pass = false;
}
}
else {
var count = 0;
var iter = cm.getChar().getInventory(MapleInventoryType.ETC).listById(mats[i]).iterator();
while (iter.hasNext()) {
count += iter.next().getQuantity();
}
if (count < matQty[i] * qty)
pass = false;
}
}
}
else {
var count = 0;
var iter = cm.getChar().getInventory(MapleInventoryType.ETC).listById(mats).iterator();
while (iter.hasNext()) {
count += iter.next().getQuantity();
}
if (count < matQty * qty)
pass = false;
}
*/
}
if (pass == false)
cm.sendNext("Check and make sure you have all the necessary items to make this. Also, make sure your Equips inventory has room. I can't give you the item if your inventory is full, you know.");
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);
if (item == 4003000)//screws
cm.gainItem(4003000, 15 * qty);
else
cm.gainItem(item, qty);
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
}
cm.dispose();
}
}

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(), 1091004);
cm.dispose();
}

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/>.
*/
/*
* @Name Tangyoon
* @Author xXOsirisXx (BubblesDev)
*/
status = -1;
function start() {
cm.sendNext("Okay, I'll now send you to the stable where my cows are. Watch out for the calves that drink all the milk. You don't want your effort to go to waste.");
}
function action(mode, type, selection){
if (mode == -1 || !cm.isQuestStarted(2180)){
cm.dispose();
return;
} else if (mode == 0)
status--;
else
status++;
if (status == 1)
cm.sendNextPrev("It won't be easy to tell at a glance between a calf and a cow. Those calves may only be a month or two old, but they have already grown to the size of their mother. They even look alike...even I get confused at times! Good luck!");
else if (status == 2) {
if (cm.canHold(4031847)) {
cm.gainItem(4031847, 1);
cm.warp(912000100);
} else
cm.sendNextPrev("I can't give you the empty bottle because your inventory is full. Please make some room in your Etc window.");
cm.dispose();
}
}

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 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: Muirhat - Nautilus' Port
Created By: Cyndicate, shortened by Moogra
Function: No specific function, useless text.
*/
function start() {
cm.sendOk("The Black Magician and his followers. Kyrin and the Crew of Nautilus. \n They'll be chasing one another until one of them doesn't exist, that's for sure.");
cm.dispose();
}

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 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/>.
*/
/*
-- JavaScript -----------------
Jack - Nautilus' Port
-- Created By --
Cody/Cyndicate, totally recoded by Moogra
-- Function --
No specific function, useless text.
-- GMS LIKE --
*/
function start() {
cm.sendOk("(Scratch scratch...)");
cm.dispose();
}

View File

@@ -0,0 +1,53 @@
var status = 0;
var maps = [104000000, 102000000, 100000000, 101000000, 103000000];
var cost = [1000, 1000, 1000, 800, 1000];
var selectedMap = -1;
function start() {
cm.sendNext("Hello, I drive the Nautilus' Mid-Sized Taxi. 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.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
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;
}
if (cm.getJobId() == 0) {
mesos = -cost[selectedMap] / 10;
} else {
mesos = -cost[selectedMap];
}
cm.gainMeso(mesos);
cm.warp(maps[selectedMap], 0);
cm.dispose();
}
}
}

View File

@@ -0,0 +1,34 @@
/*
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 : XxOsirisxX (BubblesDev)
NPC Name: Shiny Stone
*/
function start() {
if(cm.isQuestStarted(2166)) {
cm.sendNext("It's a beautiful, shiny rock. I can feel the mysterious power surrounding it.");
cm.completeQuest(2166);
} else
cm.sendNext("I touched the shiny rock with my hand, and I felt a mysterious power flowing into my body.");
cm.dispose();
}

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 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/>.
*/
/*
-- JavaScript -----------------
Lord Jonathan - Nautilus' Port
-- Created By --
Cody/Cyndicate
-- Totally Recreated by Moogra--
-- Function --
No specific function, useless text.
-- GMS LIKE --
*/
function start() {
cm.sendOk("Who are you talking to me? If you're just bored, go bother somebody else.");
cm.dispose();
}

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