Reactory Factory Small Fix + Festival of Lights (NPC) (#449)

* Fixed the "INVALID ID" while warping to certain MAPID with XML existed. (Thanks to Ronan)
* Started to fix the quest "Festival of Lights" - Now Simon warps you to the Shalom Temple in Happville
This commit is contained in:
Jayden Seah
2019-04-19 11:29:37 +08:00
committed by Ronan Lana
parent 0b80389971
commit 060b984f48
2 changed files with 72 additions and 7 deletions

View File

@@ -1,8 +1,73 @@
/**
Simon - Happyville
**/
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
function start() {
cm.sendOk("Hi there!");
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/>.
*/
/*
-- HeavenMS 083 Script ----------------------------------------------------------------------------
NPC - Simon
-- By ---------------------------------------------------------------------------------------------
Jayd
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Jayd
---------------------------------------------------------------------------------------------------
*/
var status;
var smap = 681000000;
var hv = 209000000;
var tst, b2h;
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("Let me know if you've changed your mind!");
cm.dispose();
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
if (cm.getMapId() == hv) {
tst = 1; //to shalom temple
cm.sendYesNo("The Shalom Temple is unlike any other place in Happyville, would you like to head to #bShalom Temple#k?"); //not GMS lol
} else if (cm.getMapId() == smap) {
b2h = 1; //back to happyville
cm.sendYesNo("Would you like to head back to Happyville?");
}
} else if (status == 1) {
if (tst == 1) {
cm.warp(smap, 0);
cm.dispose();
} else if (b2h == 1) {
cm.warp(hv, 0);
cm.dispose();
}
}
}
}

View File

@@ -122,7 +122,7 @@ public class MapleReactorFactory {
int timeOut = -1;
for (MapleData fknexon : eventData.getChildren()) {
if (fknexon.getName().equals("timeOut")) {
if (fknexon.getName().equalsIgnoreCase("timeOut")) {
timeOut = MapleDataTool.getInt(fknexon);
} else {
Pair<Integer, Integer> reactItem = null;