Exp gain & Chaos scroll fix + Diet's MK Overhaul
Fixed issues with negative experience being distributed to characters when killing a mob, rendering "Exp reset". Fixed chaos scroll behaving oddly. Refactored debuff expirations to manage one list with registered debuffs and expire times, thus lifting some load from the TimerManager. Added concurrency protection on how World deals with parties. Thanks to the DietStory dev team, fixed some issues with the MK maps.
This commit is contained in:
35
scripts/quest/20710.js
Normal file
35
scripts/quest/20710.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Author: DietStory dev team
|
||||
NPC: Matthias
|
||||
Quest: Hidden Inside the Trash Can
|
||||
*/
|
||||
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection){
|
||||
if(mode == -1){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0 && status == 0){
|
||||
qm.sendOk("What? Are you declining the mission? Fine, do it like that. I'll just report it straight to #p1101002#.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0){
|
||||
status--;
|
||||
}
|
||||
else{
|
||||
status++;
|
||||
}
|
||||
|
||||
|
||||
if(status == 0){
|
||||
qm.sendAcceptDecline("You don't really instill confidence in me, but since you're a Cygnus Knight and all... and since no one else can go on a search right now... Okay, let me explain to you what this mission is about.");
|
||||
}
|
||||
else if(status == 1){
|
||||
qm.forceStartQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
110
scripts/quest/2293.js
Normal file
110
scripts/quest/2293.js
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
This file is part of the DietStory Maple Story Server
|
||||
Copyright (C) 2017
|
||||
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: Benji
|
||||
NPC Name: Maestro Rho
|
||||
Map(s): Kerning Square Lobby
|
||||
Description: The Last Song
|
||||
*/
|
||||
|
||||
importPackage(Packages.client);
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
if(mode == -1 || (mode == 0 && status == 0)){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
if(status == 0)
|
||||
{
|
||||
qm.sendNext("Do you remember the last song that the Spirit of Rock played? I can think of a few songs that he may be imitating, so listen carefully and tell me which song it is. #bYou only get one chance,#k so please choose wisely.");
|
||||
}
|
||||
qm.forceStartQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
|
||||
function end(mode, type, selection)
|
||||
{
|
||||
if(mode == -1 || (mode == 0 && status == 0)){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
if (status == 0)
|
||||
{
|
||||
qm.sendSimple("Here, I'll give you some samples. Please listen to them and choose one. Please listen carefully before making your choide.\r\n\
|
||||
\t#b#L1# Listen to song No. 1#l \r\n\
|
||||
\t#L2# Listen to Song No. 2#l \r\n\
|
||||
\t#L3# Listen to Song No. 3#l \r\n\
|
||||
\r\n\
|
||||
\t#e#L4# Enter the correct song.#l");
|
||||
}
|
||||
else if(status == 1)
|
||||
{
|
||||
if(selection == 1)
|
||||
{
|
||||
qm.playSound("Party1/Failed");
|
||||
qm.sendOk("Awkwardly familiar...");
|
||||
status = -1;
|
||||
}
|
||||
else if(selection == 2)
|
||||
{
|
||||
qm.playSound("Coconut/Failed");
|
||||
qm.sendOk("Was it this?");
|
||||
status = -1;
|
||||
}
|
||||
else if(selection == 3)
|
||||
{
|
||||
qm.playSound("quest2293/Die");
|
||||
qm.sendOk("You heard that?");
|
||||
status = -1;
|
||||
}
|
||||
else if(selection == 4)
|
||||
{
|
||||
qm.sendGetNumber("Now, please tell me the answer. You only get #bone chance#k, so please choose wisely. Please enter #b1, 2, or 3#k in the window below.\r\n",1,1,3);
|
||||
}
|
||||
}
|
||||
else if(status == 2)
|
||||
{
|
||||
if(selection == 1)
|
||||
{
|
||||
qm.sendOk("Obviously you don't enjoy music.");
|
||||
qm.dispose();
|
||||
}
|
||||
else if(selection == 2)
|
||||
{
|
||||
qm.sendOk("I suppose you could get #b#eone#n#k more chance.");
|
||||
qm.dispose();
|
||||
}
|
||||
else if(selection == 3)
|
||||
{
|
||||
qm.sendOk("So that was the song he was playing... Well, it wasn't my song after all, but I'm glad I can know that now with certainty. Thank you so much.");
|
||||
qm.gainExp(32500 * qm.getPlayer().getExpRate());
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
30
scripts/quest/2325.js
Normal file
30
scripts/quest/2325.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
QUEST: Jame's Whereabouts (1)
|
||||
NPC: James
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function end(mode, type, selection){
|
||||
if(mode == -1){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
if(status == 0){
|
||||
qm.sendNext("I... I am scared... Please... please help me...");
|
||||
}
|
||||
else if(status == 1){
|
||||
qm.sendNextPrev("Don't be afriad, #b#p1300005##k sent me here.", 2);
|
||||
}
|
||||
else if(status == 2){
|
||||
qm.sendOk("What? My brother sent you here? Ahhh... I am safe now. Thank you so much...");
|
||||
qm.forceCompleteQuest();
|
||||
qm.gainExp(6000 * qm.getPlayer().getExpRate());
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
33
scripts/quest/2327.js
Normal file
33
scripts/quest/2327.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
QUEST: James's Whereabouts (3)
|
||||
NPC: James
|
||||
Why tf does this quest exist?!
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection){
|
||||
if(mode == -1){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0 && status == 0){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
if(status == 0){
|
||||
qm.sendNext("Hey! Thank you for bringing me a #b#t4001317##k.");
|
||||
}
|
||||
else if(status == 1){
|
||||
qm.sendNextPrev("I plan to escape from here wearing the #b#t4001317##k. Give me a minute to put it on. Talk to you soon...");
|
||||
}
|
||||
else if(status == 2){
|
||||
qm.forceStartQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
17
scripts/quest/2332.js
Normal file
17
scripts/quest/2332.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
QUEST: Where's Violetta?
|
||||
NPC: none
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection){
|
||||
if(qm.hasItem(4032388) && !qm.isQuestStarted(2332)){
|
||||
qm.forceStartQuest();
|
||||
qm.getPlayer().showHint("I must find Violetta. (quest started)");
|
||||
}
|
||||
qm.dispose();
|
||||
}
|
||||
|
||||
function end(mode, type, selection){
|
||||
}
|
||||
65
scripts/quest/2333.js
Normal file
65
scripts/quest/2333.js
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
QUEST: Where's Violetta?
|
||||
NPC: none
|
||||
*/
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
var status = -1;
|
||||
var timeLimit = 10; //10 minutes
|
||||
var eventTimer = 1000 * 60 * timeLimit;
|
||||
var mobId = 3300008; //Prime Minister
|
||||
|
||||
function start(mode, type, selection){
|
||||
if(mode == -1 || (mode == 0 && status == 0)){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
|
||||
if(status == 0){
|
||||
qm.sendAcceptDecline("Please help me!");
|
||||
}
|
||||
else if(status == 1){
|
||||
qm.sendNext("The #bPrime Minister#k is the one who plotted all this! Oh no! Here he comes...");
|
||||
}
|
||||
else if (status == 2){
|
||||
qm.forceStartQuest();
|
||||
var eim = qm.getEventInstance();
|
||||
eim.startEventTimer(eventTimer);
|
||||
qm.getPlayer().getMap().getPortal(1).setPortalState(false);
|
||||
qm.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(292, 143));
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function end(mode, type, selection){
|
||||
if(mode == -1 || (mode == 0 && status == 0)){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
|
||||
if(status == 0){
|
||||
qm.sendNext("Hurray! #b#h ##k you defeated the #bPrime Minister#k.");
|
||||
}
|
||||
else if(status == 1){
|
||||
qm.gainExp(15000 * qm.getPlayer().getExpRate());
|
||||
qm.forceCompleteQuest();
|
||||
|
||||
var eim = qm.getEventInstance();
|
||||
qm.getPlayer().getMap().getPortal(1).setPortalState(true);
|
||||
eim.stopEventTimer();
|
||||
eim.warpEventTeam(106021600);
|
||||
|
||||
eim.dispose();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
46
scripts/quest/2334.js
Normal file
46
scripts/quest/2334.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
QUEST: The Identity of the Princess
|
||||
NPC: Violetta
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection){
|
||||
if(mode == -1 || (mode == 0 && status == 0)){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
|
||||
if(status == 0){
|
||||
qm.forceStartQuest();
|
||||
qm.sendNext("Thank you so much, #b#h ##k. You are the hero that has saved our empire from danger. I'm so grateful for what you've done. I dont know how to thank you. And please understand why I can't show you my face.");
|
||||
}
|
||||
else if(status == 1){
|
||||
qm.sendNextPrev("It's humiliating to say this, but ever since I was a baby, my family has kept my face veiled from the world. They feared of men falling hopelessly in love with me. I've grown so accustomed to it that I even shy away from women. I know, it's rude of me to have my back turned against the hero, but I'll need some time to muster my courage before I can greet you face to face.");
|
||||
}
|
||||
else if(status == 2){
|
||||
qm.sendNextPrev("I see...\r\n#b(Wow, how pretty could she be?)", 2);
|
||||
}
|
||||
else if(status == 3){
|
||||
qm.sendNextPrev("#b(What the--)", 2);
|
||||
}
|
||||
else if(status == 4){
|
||||
qm.sendNextPrev("#b(Is that what's considered pretty in the world of mushrooms?!)", 2);
|
||||
}
|
||||
else if(status == 5){
|
||||
qm.sendNextPrev("I'm so shy, I'm blushing. Anyways, thank you, #b#h ##k.");
|
||||
}
|
||||
else if(status == 6){
|
||||
qm.forceStartQuest();
|
||||
qm.gainExp(1000 * qm.getPlayer().getExpRate());
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function end(mode, type, selection){}
|
||||
41
scripts/quest/2335.js
Normal file
41
scripts/quest/2335.js
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
QUEST: Eliminating the Rest
|
||||
NPC: Violetta
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection){
|
||||
if(mode == -1 || (mode == 0 && status == 0)){
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else if(mode == 0)
|
||||
status--;
|
||||
else
|
||||
status++;
|
||||
|
||||
|
||||
if(status == 0){
|
||||
qm.sendNext("This is not the end, #b#h ##k. Minions of the #bPrime Minister#k can still be found scattered throughout the castle.");
|
||||
}
|
||||
else if(status == 1){
|
||||
qm.sendAcceptDecline("From what I've heard, there is a place near #bSkyscraper 3#k where a group of Prime Minister's minions can be found. I've picked up a key that the Prime Minister dropped the other day. Here, use this key.");
|
||||
}
|
||||
else if(status == 2){
|
||||
if(qm.canHold(4032405)){
|
||||
qm.gainItem(4032405, 1);
|
||||
qm.sendNext("For one last time, good luck.");
|
||||
}
|
||||
else{
|
||||
qm.sendOk("Please have a free space in your ETC inventory.");
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
else if(status == 3){
|
||||
qm.forceStartQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function end(mode, type, selection){}
|
||||
28
scripts/quest/2342.js
Normal file
28
scripts/quest/2342.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
QUEST: Recovered Royal Seal.
|
||||
NPC: Violetta
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection){
|
||||
if(!qm.hasItem(4001318) && qm.isQuestStarted(2331) && !qm.isQuestCompleted(2331)){
|
||||
if(qm.canHold(4001318)){
|
||||
qm.forceStartQuest();
|
||||
qm.gainItem(4001318, 1);
|
||||
qm.forceCompleteQuest();
|
||||
qm.sendOk("Looks like you forgot to pick up the #b#t4001318##k when you fought with the #bPrime Minister#k. This is very important to our kingdom, so please deliver this to my father as soon as possible.");
|
||||
qm.dispose();
|
||||
}
|
||||
else{
|
||||
qm.sendOk("Please free up one spot in your ETC inventory");
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
else{
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function end(mode, type, selection){
|
||||
}
|
||||
Reference in New Issue
Block a user