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:
ronancpl
2017-10-04 02:35:52 -03:00
parent 6445f0b4e4
commit 3a882c7f31
141 changed files with 1719 additions and 524 deletions

View File

@@ -0,0 +1,110 @@
var minPlayers = 1;
var timeLimit = 20; //20 minutes
var eventTimer = 1000 * 60 * timeLimit;
var exitMap = 106021400;
function init(){}
function setup(difficulty, lobbyId){
var eim = em.newInstance("KingPepe_" +lobbyId);
eim.getInstanceMap(106021500).resetFully();
eim.getInstanceMap(106021500).allowSummonState(false);
respawn(eim);
eim.startEventTimer(eventTimer);
return eim;
}
function afterSetup(eim){}
function respawn(eim){
var map = eim.getMapInstance(exitMap);
map.allowSummonState(true);
map.instanceMapRespawn();
eim.schedule("respawn", 10000);
}
function playerEntry(eim, player){
var yetiMap = eim.getMapInstance(106021500);
player.changeMap(yetiMap, yetiMap.getPortal(1));
}
function scheduledTimeout(eim){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
return false;
}
function playerDead(eim, player){}
function playerDisconnected(eim, player){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++){
if(party.get(i).equals(player))
removePlayer(eim, player);
else
playerExit(eim, party.get(i));
}
eim.dispose();
}
function monsterValue(eim, mobId){
return -1;
}
function leftParty(eim, player){
var party = eim.getPlayers();
if(party.size() < minPlayers){
for(var i = 0; i < party.size(); i++){
playerExit(eim, party.get(i));
}
eim.dispose();
}
else{
playerExit(eim, player);
}
}
function disbandParty(eim){}
function playerUnregistered(eim, player){}
function playerExit(eim, player){
eim.unregisterPlayer(player);
player.changeMap(exitMap, 2);
}
function moveMap(eim, player){
if(player.getMap().getId() == exitMap){
removePlayer(eim, player);
eim.dispose();
}
}
function removePlayer(eim, player){
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function cancelSchedule(){}
function dispose(){}
function clearPQ(eim){}
function monsterKilled(mob, eim){}
function allMonstersDead(eim){}

View File

@@ -0,0 +1,108 @@
var minPlayers = 1;
var entryMap = 106021402;
var exitMap = 106021600;
function init(){}
function setup(difficulty, lobbyId){
var eim = em.newInstance("MK_PrimeMinister_" +lobbyId);
eim.getInstanceMap(106021601).resetFully();
eim.getInstanceMap(106021601).allowSummonState(false);
respawn(eim);
return eim;
}
function afterSetup(eim){}
function respawn(eim){
var map = eim.getMapInstance(entryMap);
map.allowSummonState(true);
map.instanceMapRespawn();
eim.schedule("respawn", 10000);
}
function playerEntry(eim, player){
var weddinghall = eim.getMapInstance(106021601);
player.changeMap(weddinghall, weddinghall.getPortal(1));
}
function scheduledTimeout(eim){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(entryMap);
return false;
}
function playerDead(eim, player){}
function playerDisconnected(eim, player){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++){
if(party.get(i).equals(player))
removePlayer(eim, player);
else
playerExit(eim, party.get(i));
}
eim.dispose();
}
function monsterValue(eim, mobId){
return -1;
}
function leftParty(eim, player){
var party = eim.getPlayers();
if(party.size() < minPlayers){
for(var i = 0; i < party.size(); i++){
playerExit(eim, party.get(i));
}
eim.dispose();
}
else{
playerExit(eim, player);
}
}
function disbandParty(eim){}
function playerUnregistered(eim, player){}
function playerExit(eim, player){
eim.unregisterPlayer(player);
player.changeMap(entryMap, 2);
}
function moveMap(eim, player){
if(player.getMap().getId() == exitMap || player.getMap().getId() == entryMap){
removePlayer(eim, player);
eim.dispose();
}
}
function removePlayer(eim, player){
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(entryMap);
}
function cancelSchedule(){}
function dispose(){}
function clearPQ(eim){}
function monsterKilled(mob, eim){}
function allMonstersDead(eim){}

View File

@@ -0,0 +1,9 @@
importPackage(Packages.server.life);
function start(ms){
var mobId = 3300000 + (Math.floor(Math.random() * 3) + 5);
var player = ms.getPlayer();
var map = player.getMap();
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(-28, -67));
}

View File

@@ -19,7 +19,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* Trash Can
/* Trash Can 1
*/

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

@@ -0,0 +1,31 @@
/*
Trash Can 2
Kerning Subway
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

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

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

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

@@ -0,0 +1,31 @@
/*
Trash Can 4
Kerning Subway
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

View File

@@ -3,19 +3,16 @@
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/>.
*/
@@ -24,28 +21,37 @@
* @Author xXOsirisXx (BubblesDev)
*/
status = -1;
var status;
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.");
status = -1;
action(1, 0, 0);
}
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();
}
if (mode == -1 || !cm.isQuestStarted(2180)){
cm.dispose();
return;
}
else{
if (mode == 1) status++;
else status --;
if (status == 0){
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.");
}
else 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.sendOk("I can't give you the empty bottle because your inventory is full. Please make some room in your Etc window.");
}
cm.dispose();
}
}
}

40
scripts/npc/1300013.js Normal file
View File

@@ -0,0 +1,40 @@
/*
NPC: Blocked Entrance (portal?)
MAP: Mushroom Castle - East Castle Tower (106021400)
*/
var status;
function start(){
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if(mode == -1){
cm.dispose();
return;
}
else if(mode == 0 && status == 0){
cm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
if(status == 0){
cm.sendSimple("#L1#Enter to fight #bKing Pepe#k and #bYeti Brothers#k.#l");
}
else if(status == 1){
if(selection == 1){
var pepe = cm.getEventManager("KingPepeAndYetis");
pepe.setProperty("player", cm.getPlayer().getName());
pepe.startInstance(cm.getPlayer());
cm.dispose();
return;
}
}
}

View File

@@ -46,7 +46,7 @@ function start() {
}
}
else {
cm.sendSimple("Only few adventurers, from a selected public, are eligible to protect the Watch Hog.");
cm.sendOk("Only few adventurers, from a selected public, are eligible to protect the Watch Hog.");
}
cm.dispose();

View File

@@ -46,7 +46,7 @@ function action(mode, type, selection) {
var itemSet = new Array(2049100, 7777777);
var matSet = new Array(new Array(4031203,4001356,4000136,4000082,4001126,4080100,4000021,4003005));
var matQtySet = new Array(new Array(10,6,4,8,8,1,20,12));
var matQtySet = new Array(new Array(100,60,40,80,80,8,200,120));
var costSet = new Array(1200000, 7777777);
item = itemSet[selectedItem];
mats = matSet[selectedItem];

View File

@@ -1,5 +1,5 @@
function enter(pi) {
pi.playPortalSound();
pi.warp(106021300, 0);
pi.warp(106021300, 1);
return true;
}

View File

@@ -1,3 +1,23 @@
function enter(pi) {
pi.openNpc(1300013);
var questProgress = pi.getQuestProgress(2330, 3300005) + pi.getQuestProgress(2330, 3300006) + pi.getQuestProgress(2330, 3300007); //3 Yetis
if(questProgress == 3 && !pi.hasItem(4032388) && !pi.isQuestCompleted(2332)){
if(pi.canHold(4032388)){
pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it.")
pi.gainItem(4032388, 1);
}
else{
pi.getPlayer().message("Please make room in your ETC inventory.");
}
}
if(pi.isQuestStarted(2330) && questProgress < 3){
pi.openNpc(1300013);
}
else{
pi.playPortalSound();
pi.warp(106021401, 1);
}
return true;
}

View File

@@ -1,35 +1,48 @@
/*
This file is part of the ZeroFusion MapleStory Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
ZeroFusion organized by "RMZero213" <RMZero213@hotmail.com>
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/>.
*/
var dungeonid = 106021600;
var dungeons = 10;
function enter(pi) {
for(var i = 0; i < dungeons; i++) {
if (pi.getMap(dungeonid + i).getCharactersSize() == 0) {
pi.warp(dungeonid + i, 0);
return true;
}
if(pi.isQuestCompleted(2333) && pi.isQuestStarted(2331) && !pi.hasItem(4001318)){
pi.getPlayer().message("Lost the Royal Seal, eh? Worry not! Kevin's code here to save your hide.");
if(pi.canHold(4001318)){
pi.gainItem(4001318, 1);
}
else{
pi.getPlayer().message("Hey, how do you plan to hold this Seal when your inventory is full?");
}
}
pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later.");
return false;
}
if(pi.isQuestCompleted(2333)){
pi.playPortalSound();
pi.warp(106021600, 1);
return true;
}
else if(pi.isQuestStarted(2332) && pi.hasItem(4032388)){
if(pi.getPlayer().getParty() != null){
pi.getPlayer().showHint("The next part of the quest is solo only! Must leave party.");
return false;
}
else{
pi.forceCompleteQuest(2332, 1300002);
pi.getPlayer().message("You've found the princess!");
pi.giveCharacterExp(4400 * 1.5, pi.getPlayer());
var pm = pi.getEventManager("MK_PrimeMinister");
pm.setProperty("player", pi.getPlayer().getName());
pm.startInstance(pi.getPlayer());
return true;
}
}
else if(pi.isQuestStarted(2333) || (pi.isQuestCompleted(2332) && !pi.isQuestStarted(2333))){
if(pi.getPlayer.getParty() != null){
pi.getPlayer().showHint("The next part of the quest is solo only! Must leave party.");
return false;
}
else{
var pm = pi.getEventManager("MK_PrimeMinister");
pm.setProperty("player", pi.getPlayer().getName());
pm.startInstance(pi.getPlayer());
return true;
}
}
else{
pi.getPlayer().message("The door seems to be locked. Perhaps I can find a key to open it...");
return false;
}
}

22
scripts/portal/end_cow.js Normal file
View File

@@ -0,0 +1,22 @@
/*
By: Kevin
Map: Hidden Chamber - The Nautilus - Stable (912000100)
Quest: Find Fresh Milk (2180)
*/
function enter(pi){
if (pi.isQuestStarted(2180) && (pi.hasItem(4031847) || pi.hasItem(4031848) || pi.hasItem(4031849) || pi.hasItem(4031850))){
if (pi.hasItem(4031850)){
pi.warp(120000103);
return true;
}
else{
pi.getPlayer().dropMessage(5, "Your milk jug is not full...");
return false;
}
}
else{
pi.warp(120000103);
return true;
}
}

View File

@@ -0,0 +1,16 @@
function enter(pi) {
if(!pi.isQuestStarted(2335) || (pi.isQuestStarted(2335) && !pi.hasItem(4032405))){
pi.getPlayer().message("The door is locked securely. I will need a key if I want to go in there.");
return false;
}
if(pi.isQuestStarted(2335) && pi.hasItem(4032405)){
pi.forceCompleteQuest(2335, 1300002);
pi.giveCharacterExp(5000 * 1.5, pi.getPlayer());
pi.gainItem(4032405, -1);
}
pi.playPortalSound();
pi.warp(106021001, 1);
return true;
}

View File

@@ -0,0 +1,9 @@
function enter(pi) {
var eim = pi.getEventInstance();
eim.stopEventTimer();
eim.dispose();
pi.playPortalSound();
pi.warp(106021400, 2);
return true;
}

35
scripts/quest/20710.js Normal file
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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){
}