Quick fix-up + Happyville

Fixed bug introduced on last update regarding events without
event_schedule defined. Added path to Happyville maps, and raid boss
event.
This commit is contained in:
ronancpl
2017-04-26 16:01:12 -03:00
parent 939b214fb5
commit f5fbb038e9
35 changed files with 1138 additions and 422 deletions

View File

@@ -1,214 +1,45 @@
/*
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();
}
}
/*
Copyright (C) This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
Rooney - Happyville Warp NPC
**/
var status = 0;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (status == 0) {
cm.sendYesNo("Santa told me to go to here, only he didn't told me when... I hope i'm here on the right time! Oh! By the way, I'm Rooney, I can take you to #bHappyVille#k. Are you ready to go?");
status++;
} else {
if ((status == 1 && type == 1 && selection == -1 && mode == 0) || mode == -1) {
cm.dispose();
} else {
cm.getPlayer().saveLocation("HAPPYVILLE");
cm.warp(209000000, 0);
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,32 @@
/*
* Cliff - Happy Ville NPC
*/
var status = -1;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status > 0) {
status--;
} else {
cm.dispose();
return;
}
}
if (status == 0) {
cm.sendNext("Do you see a bunch of snowmen standing around there? Go talk to one of them, and it'll take you to the famous Christmas tree here that is just humongous. The tree can be decorated using various kinds of ornaments. What do you think? Sounds fun, right?");
} else if (status == 1) {
cm.sendNextPrev("Only 6 can be at the place where the tree is at once, and you can't #btrade or open store#k there. The ornaments that you drop can only be picked back up by yourself, so don't worry about losing your ornaments here.");
} else if (status == 2) {
cm.sendNextPrev("Of course, the items that are dropped in there will never disappear. Once you get out of there through the snowman that's inside, all the items you've dropped at that map will come back to you, so you won't have to pick all those items up before leaving the place. Isn't that sweet?");
} else if (status == 3) {
cm.sendPrev("Well then, go see #p2002001#, buy some Christmas ornaments there, and then decorate the tree with those~ Oh yeah! The biggest, the most beautiful ornament cannot be bought from him. It's probably ... taken by a monster ... huh huh ..");
cm.dispose();
}
}

View File

@@ -19,14 +19,30 @@
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("We have a beautiful christmas tree.\r\nDo you want to see/decorate it?");
}
function action(made, by, osiris) {
if(made == 1)
cm.warp(209000001);
else
cm.sendOk("Come back later.");
cm.dispose();
/* 2001001 - Metal Bucket Snowman
@author Ronan
*/
var status = -1;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 0)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("We have a beautiful christmas tree.\r\nDo you want to see/decorate it?");
} else if(status == 1) {
cm.warp(209000001);
cm.dispose();
}
}
}

View File

@@ -19,11 +19,30 @@
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/>.
*/
//lol at old script -- Moogra
/* 2001002 - Metal Bucket Snowman
@author Ronan
*/
var status = -1;
function start() {
cm.sendYesNo("We have a beautiful christmas tree.\r\nDo you want to see/decorate it?");
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.warp(209000001);
cm.dispose();
if (mode < 0)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("We have a beautiful christmas tree.\r\nDo you want to see/decorate it?");
} else if(status == 1) {
cm.warp(209000002);
cm.dispose();
}
}
}

View File

@@ -19,11 +19,30 @@
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/>.
*/
//lol at old script -- Moogra
/* 2001003 - Straw Hat Snowman
@author Ronan
*/
var status = -1;
function start() {
cm.sendYesNo("We have a beautiful christmas tree.\r\nDo you want to see/decorate it?");
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.warp(209000001);
cm.dispose();
if (mode < 0)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("We have a beautiful christmas tree.\r\nDo you want to see/decorate it?");
} else if(status == 1) {
cm.warp(209000003);
cm.dispose();
}
}
}

View File

@@ -19,11 +19,30 @@
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/>.
*/
/* 2001004 - Scarf Snowman
@author Ronan
*/
var status = -1;
function start() {
cm.sendYesNo("We have a beautiful christmas tree.\r\nDo you want to see/decorate it?");
action(1,0,0);
}
function action(m, t, s) {
if (m > 0)
cm.warp(209000001);
cm.dispose();
function action(mode, type, selection) {
if (mode < 0)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("So, are you ready to head out of here?");
} else if(status == 1) {
cm.warp(209000000, 3);
cm.dispose();
}
}
}

View File

@@ -19,18 +19,25 @@
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/>.
*/
/* Rupi by Moogra
Happyville Warp NPC
*/
/**
Rupi- Happyville Warp NPC
**/
function start() {
cm.sendYesNo("Do you want to " + (cm.getPlayer().getMap().getId() == 101000000 ? "go to" : "get out of") + "Happyville?");
cm.sendYesNo("Do you want to get out of Happyville?");
}
function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else
cm.warp(cm.getPlayer().getMap().getId() == 101000000 ? 209000000 : 101000000, 0);
else {
var map = cm.getPlayer().getSavedLocation("HAPPYVILLE");
if (map == -1)
map = 101000000;
cm.warp(map, 0);
}
cm.dispose();
}

View File

@@ -1,70 +1,56 @@
/*
* Aran / Cygnus Job Advancer
* v83 MoopleDEV Rev 116
* Author: ShEtY
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/>.
*/
/* 9000021 - Gaga
BossRushPQ recruiter
@author Ronan
*/
var status = -1;
var ask = "Oh, I see you've grown stronger! Do you wish to job advance?";
var job;
var koc = new Array();
var status;
function start() {
cm.sendNext("Hey #e#h ##n, I'm the Aran & Cygnus Job Advancer.");
status = -1;
action(1, 0, 0);
}
function action(m, t, s) {
status++;
if (m != 1) {
function action(mode, type, selection) {
if (mode < 0)
cm.dispose();
return;
}
if (status == 0) {
if (cm.getJobId() < 1000 ||cm.getJobId() % 10 == 2) {
cm.dispose();
} else if (cm.getJobId() % 10 == 1 && cm.getJobId() < 2000) {
cm.dispose();
} else if (cm.getJobId() % 1000 == 0 && cm.getJobId() != 0 && cm.getLevel() >= 10) {
if (cm.getJobId() == 1000) {
for (var i = 1; i < 6; i++)
koc.push(cm.getJobId() + 100 * i);
var list = "What class of Cygnus Knight do you wish to advance to?";
for (var k = 0; k < koc.length; k++)
list += "\r\n#L" + k + "#" + cm.getJobName(koc[k]) + "#l";
cm.sendSimple(list);
} else if (cm.getJobId() == 2000) {
job = cm.getJobId() + 100;
cm.sendYesNo(ask);
}
else {
if (mode == 1)
status++;
else
cm.dispose();
} else if (cm.getJobId() % 1000 != 0) {
if (cm.getJobId() % 100 == 0 && cm.getLevel() >= 30) {
job = cm.getJobId() + 10;
cm.sendYesNo(ask);
} else if (cm.getJobId() % 10 == 0 && cm.getLevel() >= 70) {
job = cm.getJobId() + 1;
cm.sendYesNo(ask);
} else if (cm.getJobId() % 10 == 1 && cm.getJobId() >= 2000 && cm.getLevel() >= 120) {
job = cm.getJobId() + 1;
cm.sendYesNo(ask);
}
}
} else if (status == 1) {
if (cm.getJobId() != 1000) {
if (cm.getJobId() == 2000) {
cm.changeJobById(job);
cm.maxMastery();
cm.resetStats();
cm.dispose();
} else {
cm.changeJobById(job);
cm.dispose();
}
} else if (cm.getJobId() == 1000) {
cm.changeJobById(koc[s]);
cm.resetStats();
status--;
if (status == 0) {
cm.sendNext("Hey, traveler! I am #p9000021#, and my job is to recruit travelers like you, who eagers for new challenges daily. Right now, my team is holding contests that thoroughly tests the mental and physical capabilities of adventurers like you.");
} else if(status == 1) {
cm.sendNext("These contests involve #bsequential boss fights#k, with some resting spots between some sections. These will require some strategy time and enough supplies at hand, as they are not common fights.");
} else if(status == 2) {
cm.sendAcceptDecline("If you feel you are powerful enough, you can join others like you at where we are hosting the contests of power. ... So, what is your decision? Will you come to where the contests are being held right now?");
} else if(status == 3) {
cm.sendOk("Very well. Remember, there you can assemble a team or take on the fightings on your own, it's up to you. Good luck!");
} else if(status == 4) {
cm.warp(970030000);
cm.dispose();
}
}
}
}

View File

@@ -0,0 +1,70 @@
/*
* Aran / Cygnus Job Advancer
* v83 MoopleDEV Rev 116
* Author: ShEtY
*/
var status = -1;
var ask = "Oh, I see you've grown stronger! Do you wish to job advance?";
var job;
var koc = new Array();
function start() {
cm.sendNext("Hey #e#h ##n, I'm the Aran & Cygnus Job Advancer.");
}
function action(m, t, s) {
status++;
if (m != 1) {
cm.dispose();
return;
}
if (status == 0) {
if (cm.getJobId() < 1000 ||cm.getJobId() % 10 == 2) {
cm.dispose();
} else if (cm.getJobId() % 10 == 1 && cm.getJobId() < 2000) {
cm.dispose();
} else if (cm.getJobId() % 1000 == 0 && cm.getJobId() != 0 && cm.getLevel() >= 10) {
if (cm.getJobId() == 1000) {
for (var i = 1; i < 6; i++)
koc.push(cm.getJobId() + 100 * i);
var list = "What class of Cygnus Knight do you wish to advance to?";
for (var k = 0; k < koc.length; k++)
list += "\r\n#L" + k + "#" + cm.getJobName(koc[k]) + "#l";
cm.sendSimple(list);
} else if (cm.getJobId() == 2000) {
job = cm.getJobId() + 100;
cm.sendYesNo(ask);
}
else
cm.dispose();
} else if (cm.getJobId() % 1000 != 0) {
if (cm.getJobId() % 100 == 0 && cm.getLevel() >= 30) {
job = cm.getJobId() + 10;
cm.sendYesNo(ask);
} else if (cm.getJobId() % 10 == 0 && cm.getLevel() >= 70) {
job = cm.getJobId() + 1;
cm.sendYesNo(ask);
} else if (cm.getJobId() % 10 == 1 && cm.getJobId() >= 2000 && cm.getLevel() >= 120) {
job = cm.getJobId() + 1;
cm.sendYesNo(ask);
}
}
} else if (status == 1) {
if (cm.getJobId() != 1000) {
if (cm.getJobId() == 2000) {
cm.changeJobById(job);
cm.maxMastery();
cm.resetStats();
cm.dispose();
} else {
cm.changeJobById(job);
cm.dispose();
}
} else if (cm.getJobId() == 1000) {
cm.changeJobById(koc[s]);
cm.resetStats();
cm.dispose();
}
}
}

View File

@@ -19,40 +19,11 @@
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/>.
*/
/* 9010021 - Wolf Spirit Ryko
BossRushPQ recruiter
/* 9010021 - Wolf Spirit Ryko
@author Ronan
*/
var status;
function start() {
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) {
cm.sendNext("Heed me, human. I hail from a distant plane and came to this world to take a glimpse on the power level of the best of the dwellers of this world.");
} else if(status == 1) {
cm.sendNext("Oh, don't get me wrong, our civilization are of the type that makes researches for the sake of science, we have no regards for domination or disturbances whatsoever.");
} else if(status == 2) {
cm.sendNext("These contests involve #bsequential boss fights#k, with some resting spots between some sections. This will require some strategy time and enough supplies at hand, as these are not common fights.");
} else if(status == 3) {
cm.sendAcceptDecline("If you feel you are powerful enough, you can join others like you at where we are hosting the contests of power. ... So, what is your decision? Will you come to where the contests are being held right now?");
} else if(status == 4) {
cm.sendOk("Very well. Remember, there you can assemble a team or take on the fightings on your own, it's up to you. Good luck!");
} else if(status == 5) {
cm.warp(970030000);
cm.dispose();
}
}
cm.sendOk("... I came from distant planes to assist the fight against the #rBlack Magician#k. Right now I search my master, have you seen him?");
cm.dispose();
}

View File

@@ -0,0 +1,8 @@
/**
Simon - Happyville
**/
function start() {
cm.sendOk("Hi there!");
cm.dispose();
}

View File

@@ -0,0 +1,8 @@
function start() {
cm.sendOk("You didn't hear it from Rooney? It's a dress-up party, and you can't enter unless you've transformed into something else. I hear that Cliff has something that you may be looking for...");
action(1,0,0);
}
function action(mode, type, selection) {
cm.dispose();
}

View File

@@ -0,0 +1,42 @@
/**
Happy - Happy ville
By Ronan
**/
var status = -1;
function start() {
if(cm.getMap().getMonsters().size() > 1) { //reactor as a monster? wtf
cm.sendOk("Defeat all monsters before talking to me.");
cm.dispose();
return;
}
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 0 && mode == 0) {
cm.sendOk("Talk to me again when you want to.");
cm.dispose();
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("#b<Raid Quest: Happyville>#k\r\nA raid is nothing but joining many people in an attempt to defeat extremely powerful creatures. Here is no different. Here, everyone can take part in defeating the spawned creature. At the moment the are none, what will you do?\r\n#b\r\n#L0#Spawn Kid Snowman.\r\n#L1#Spawn Lost Rudolph.\r\n#L2#Nothing, just chilling.#k");
} else if(status == 1) {
if(selection == 0) {
cm.getMap().spawnMonsterOnGroundBelow(9500317, 1700, 80);
} else if(selection == 1) {
cm.getMap().spawnMonsterOnGroundBelow(9500320, 1700, 80);
} else {
cm.sendOk("Fine then.");
}
cm.dispose();
}
}
}

View File

@@ -1,34 +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/>.
*/
/* Roudolph Happyville Warp NPC
By Moogra
*/
function start() {
cm.sendYesNo("Do you want to go to the Extra Frosty Snow Zone ?#l");
}
function action(mode, type, selection) {
if (mode > 0)
cm.warp(209080000, 0);
cm.dispose();
}
/**
Roodolph - Happy ville
By fantier123
**/
var status;
function start() {
status = 0;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.sendOk("Talk to me again when you want to.");
cm.dispose();
}
if (mode == 1)
status++;
else
status--;
if (status == 1) {
if (cm.getChar().getMapId() == 209000000) {
cm.sendYesNo("Do you wish to head to where the #bSnow Sprinkler#k is?");
status = 9;
} else if (cm.getChar().getMapId() == 209080000) {
cm.sendYesNo("Do you wish to return to Happyville?");
status = 19;
}
else {
cm.sendOk("You alright?");
cm.dispose();
}
}
else if (status == 10) {
cm.warp(209080000, 0);
cm.dispose();
}
else if (status == 20) {
cm.warp(209000000, 0);
cm.dispose();
}
else {
cm.sendOk("You alrighty?");
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/>.
*/
/* Roudolph Happyville Warp NPC
By Moogra
*/
function start() {
cm.sendYesNo("Do you want to go to the Extra Frosty Snow Zone ?#l");
}
function action(mode, type, selection) {
if (mode > 0)
cm.warp(209080000, 0);
cm.dispose();
}

View File

@@ -0,0 +1,8 @@
/**
Santa - Happyville
**/
function start() {
cm.sendOk("Welcome to #bHappyville#k, young traveler. Do you have any wishes?");
cm.dispose();
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.openNpc(9209100);
return false;
}

View File

@@ -0,0 +1,3 @@
function act() {
rm.dropItems();
}