Neo City + Revamped EllinPQ + New Release
Fixed Neo City area, now playable. Overhauled the EllinPQ mechanics, such as the "CLEAR" effect when passing maps, and some bug fixes along the way. Refactored a lot of out-of-place classes and properly renamed a few others through the project. Updated readme and licenses through the source, preparing the stage for the new release.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
This file is part of the MapleSolaxiaV2 Maple Story Server
|
||||
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
|
||||
Copyleft (L) 2017 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
|
||||
49
scripts/npc/2082004.js
Normal file
49
scripts/npc/2082004.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
|
||||
Copyleft (L) 2017 RonanLana
|
||||
|
||||
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/>.
|
||||
*/
|
||||
/* Andy
|
||||
Tera Forest Time Gate
|
||||
*/
|
||||
|
||||
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("Hi, I am Andy, the time traveler from a not so distant future. I have come to avert the creation of machines by the greedy people of this time. They went berserk on my time and consumed everything to dust. I must stop it at any cost!");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
95
scripts/npc/2083006.js
Normal file
95
scripts/npc/2083006.js
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
@Author Ronan
|
||||
(Neo Tokyo Teleporter)
|
||||
*/
|
||||
|
||||
var quests = [3719, 3724, 3730, 3736, 3742, 3748];
|
||||
var array = ["Year 2021 - Average Town Entrance", "Year 2099 - Midnight Harbor Entrance", "Year 2215 - Bombed City Center Retail District", "Year 2216 - Ruined City Intersection", "Year 2230 - Dangerous Tower Lobby", "Year 2503 - Air Battleship Bow"/*, "Year 2227 - Dangerous City Intersection"*/];
|
||||
var limit;
|
||||
|
||||
function start() {
|
||||
if(!cm.isQuestCompleted(3718)) {
|
||||
cm.sendOk("The time machine has not been activated yet.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
for(limit = 0; limit < quests.length; limit++) {
|
||||
if(!cm.isQuestCompleted(quests[limit])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(limit == 0) {
|
||||
cm.sendOk("Prove your valor against the #bGuardian Nex#k before unlocking next Neo City maps.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
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) {
|
||||
var menuSel = generateSelectionMenu(array, limit);
|
||||
cm.sendSimple(menuSel);
|
||||
} else if(status == 1) {
|
||||
var mapid = 0;
|
||||
|
||||
switch (selection) {
|
||||
case 0:
|
||||
mapid = 240070100;
|
||||
break;
|
||||
case 1:
|
||||
mapid = 240070200;
|
||||
break;
|
||||
case 2:
|
||||
mapid = 240070300;
|
||||
break;
|
||||
case 3:
|
||||
mapid = 240070400;
|
||||
break;
|
||||
case 4:
|
||||
mapid = 240070500;
|
||||
break;
|
||||
case 5:
|
||||
mapid = 240070600;
|
||||
break;
|
||||
/*case 6:
|
||||
mapid = 683070400;
|
||||
break;*/
|
||||
}
|
||||
|
||||
if (mapid > 0) {
|
||||
cm.warp(mapid, 1);
|
||||
} else {
|
||||
cm.sendOk("Complete your mission first.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateSelectionMenu(array, limit) { // nice tool for generating a string for the sendSimple functionality
|
||||
var menu = "";
|
||||
|
||||
var len = Math.min(limit, array.length);
|
||||
for (var i = 0; i < len; i++) {
|
||||
menu += "#L" + i + "#" + array[i] + "#l\r\n";
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,50 +1,130 @@
|
||||
var status = -1;
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Ellin
|
||||
* @map: Ellin PQ
|
||||
* @func: Ellin PQ Coordinator
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
var mapid;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
mapid = cm.getPlayer().getMapId();
|
||||
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
switch(cm.getPlayer().getMapId()) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && status == 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
var ellinStr = ellinMapMessage(mapid);
|
||||
|
||||
if(mapid == 930000000) {
|
||||
cm.sendNext(ellinStr);
|
||||
} else if(mapid == 930000300) {
|
||||
var eim = cm.getEventInstance();
|
||||
|
||||
if(eim.getIntProperty("statusStg4") == 0) {
|
||||
eim.showClearEffect(cm.getMap().getId());
|
||||
eim.setIntProperty("statusStg4", 1);
|
||||
}
|
||||
|
||||
cm.sendNext(ellinStr);
|
||||
} else if(mapid == 930000400) {
|
||||
if (cm.haveItem(4001169, 20)) {
|
||||
if(cm.isEventLeader()) {
|
||||
cm.sendNext("Oh you have brought them! We can now continue, shall we proceed?");
|
||||
} else {
|
||||
cm.sendOk("You have brought them, but you're not the leader! Please let the leader hand me the marbles...");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if(cm.getEventInstance().gridCheck(cm.getPlayer()) != 1) {
|
||||
cm.sendNext(ellinStr);
|
||||
|
||||
cm.getEventInstance().gridInsert(cm.getPlayer(), 1);
|
||||
status = -1;
|
||||
} else {
|
||||
var mobs = cm.getMap().countMonsters();
|
||||
|
||||
if(mobs > 0) {
|
||||
if (!cm.haveItem(2270004)) {
|
||||
if(cm.canHold(2270004, 10)) {
|
||||
cm.gainItem(2270004, 10);
|
||||
cm.sendOk("Take 10 #t2270004#. First, #rweaken the #o9300174##k and, once it gets low health, use the item I gave you to capture them.");
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
cm.sendOk("Please make space on your USE inventory before receiving the purifiers!");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
cm.sendYesNo(ellinStr + "\r\n\r\nIt may be you are #rwilling to quit#k? Please double-think it, maybe your partners are still trying this instance.");
|
||||
}
|
||||
} else {
|
||||
cm.sendYesNo("You guys caught all the #o9300174#. Let the party leader hand all #b20 #t4001169##k to me to proceed." + "\r\n\r\nIt may be you are #rwilling to quit#k? Please double-think it, maybe your partners are still trying this instance.");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cm.sendYesNo(ellinStr + "\r\n\r\nIt may be you are #rwilling to quit#k? Please double-think it, maybe your partners are still trying this instance.");
|
||||
}
|
||||
} else if(status == 1) {
|
||||
if(mapid == 930000000) {
|
||||
} else if(mapid == 930000300) {
|
||||
cm.getEventInstance().warpEventTeam(930000400);
|
||||
} else if(mapid == 930000400) {
|
||||
if(cm.haveItem(4001169, 20) && cm.isEventLeader()) {
|
||||
cm.gainItem(4001169, -20);
|
||||
cm.getEventInstance().warpEventTeam(930000500);
|
||||
} else {
|
||||
cm.warp(930000800);
|
||||
}
|
||||
} else {
|
||||
cm.warp(930000800);
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ellinMapMessage(mapid) {
|
||||
switch(mapid) {
|
||||
case 930000000:
|
||||
cm.sendNext("Welcome. Please enter the portal.");
|
||||
break;
|
||||
return "Welcome to the Forest of Poison Haze. Proceed by entering the portal.";
|
||||
|
||||
case 930000100:
|
||||
cm.sendNext("We have to eliminate all these contaminated monsters!");
|
||||
break;
|
||||
return "The #b#o9300172##k have taken the area. We have to eliminate all these contaminated monsters to proceed further.";
|
||||
|
||||
case 930000200:
|
||||
cm.sendNext("We have to eliminate all these contaminated reactors!");
|
||||
break;
|
||||
return "A great spine has blocked the way ahead. To remove this barrier we must retrieve the poison the #b#o9300173##k carries to deter the overgrown spine. However, the poison in natural state can't be handled, as it is way too concentrated. Use the #bfountain#k over there to dilute it.";
|
||||
|
||||
case 930000300:
|
||||
cm.getEventInstance().warpEventTeam(930000400);
|
||||
break;
|
||||
return "Oh great, you have reached me. We can now proceed further inside the forest.";
|
||||
|
||||
case 930000400:
|
||||
if (cm.haveItem(4001169,20)) {
|
||||
cm.getEventInstance().warpEventTeam(930000500);
|
||||
cm.gainItem(4001169,-20);
|
||||
} else if (!cm.haveItem(2270004)) {
|
||||
if(cm.canHold(2270004,10)) {
|
||||
cm.gainItem(2270004,10);
|
||||
cm.sendOk("Good luck in purifying these monsters!");
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Make space on your USE inventory before receiving the purifiers!");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("We have to purify all these contaminated monsters! Get me 20 Monster Marbles from them!");
|
||||
}
|
||||
break;
|
||||
return "The #b#o9300175##k took over this area. However they are not ordinary monsters, then regrow pretty fast, #rnormal weapon and magic does no harm to it#k at all. We have to purify all these contaminated monsters, using #b#t2270004##k! Let your group leader get me 20 Monster Marbles from them.";
|
||||
|
||||
case 930000600:
|
||||
cm.sendNext("This is it! Place the Magic Stone on the Altar!");
|
||||
break;
|
||||
return "The root of all problems of the forest! Place the obtained Magic Stone on the Altar and prepare yourselves!";
|
||||
|
||||
case 930000700:
|
||||
cm.warp(930000800,0);
|
||||
break;
|
||||
return "This is it, you guys did it! Thank you so much for purifying the forest!!";
|
||||
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -14,12 +14,12 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
}
|
||||
if (status == 0) {
|
||||
cm.sendYesNo("Would you like to get out?");
|
||||
cm.sendYesNo("Would you like to exit this instance? Your party members may have to abandon it as well, so take that in mind.");
|
||||
} else if (status == 1) {
|
||||
cm.removeAll(4001163);
|
||||
cm.removeAll(4001169);
|
||||
cm.removeAll(2270004);
|
||||
cm.warp(930000800,0);
|
||||
cm.warp(930000800);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -5,19 +5,32 @@ function start() {
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
switch(cm.getPlayer().getMapId()) {
|
||||
case 930000500:
|
||||
if (!cm.haveItem(4001163)) {
|
||||
cm.sendNext("Get me the Purple Stone of Magic from here.");
|
||||
} else {
|
||||
cm.getEventInstance().warpEventTeam(930000600);
|
||||
}
|
||||
break;
|
||||
}
|
||||
cm.dispose();
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if(!cm.haveItem(4001163) || !cm.isEventLeader()) {
|
||||
cm.sendYesNo("Let your party leader show me the Purple Stone of Magic from here.\r\n\r\nOr maybe you want to #rleave this forest#k? Leaving now means to abandon your partners here, take that in mind.");
|
||||
} else {
|
||||
cm.sendNext("Great, you have the Purple Stone of Magic. I shall show you guys #bthe path leading to the Stone Altar#k. Come this way.");
|
||||
}
|
||||
} else if(status == 1) {
|
||||
if (!cm.haveItem(4001163)) {
|
||||
cm.warp(930000800);
|
||||
} else {
|
||||
cm.getEventInstance().warpEventTeam(930000600);
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user